ENH: Default HD, compute movement for GM

master
U~man 2020-07-10 13:44:00 +02:00
parent d884e8323c
commit 97f7126835
3 changed files with 56 additions and 97 deletions

View File

@ -32,6 +32,7 @@ export class OseEntityTweaks extends FormApplication {
if (this.object.data.type === 'character') {
data.isCharacter = true;
}
data.user = game.user;
return data;
}

View File

@ -8,7 +8,7 @@
"loyalty": 0
},
"hp": {
"hd": "",
"hd": "1d8",
"value": 20,
"max": 20
},

View File

@ -1,105 +1,63 @@
<form autocomplete="off">
<div class="form-group">
<label for="spellcaster">{{localize "OSE.Spellcaster"}}</label>
<div class="form-fields">
<input
type="checkbox"
name="data.spells.enabled"
id="spellcaster"
{{checked
data.spells.enabled}}
/>
</div>
<div class="form-group">
<label for="spellcaster">{{localize "OSE.Spellcaster"}}</label>
<div class="form-fields">
<input type="checkbox" name="data.spells.enabled" id="spellcaster" {{checked
data.spells.enabled}} />
</div>
<div class="form-group">
<label for="retainer">{{localize "OSE.Retainer"}}</label>
<div class="form-fields">
<input
type="checkbox"
name="data.retainer.enabled"
id="retainer"
{{checked
data.retainer.enabled}}
/>
</div>
</div>
<div class="form-group">
<label for="retainer">{{localize "OSE.Retainer"}}</label>
<div class="form-fields">
<input type="checkbox" name="data.retainer.enabled" id="retainer" {{checked
data.retainer.enabled}} />
</div>
<div class="form-group">
<label>{{localize "OSE.InitiativeBonus"}}</label>
<div class="form-fields">
<input
type="text"
name="data.initiative.mod"
id="initiative"
value="{{data.initiative.mod}}"
data-dtype="Number"
/>
</div>
</div>
<div class="form-group">
<label>{{localize "OSE.InitiativeBonus"}}</label>
<div class="form-fields">
<input type="text" name="data.initiative.mod" id="initiative" value="{{data.initiative.mod}}"
data-dtype="Number" />
</div>
{{#if (eq this.type 'character')}}
<div class="form-group">
<label>{{localize "OSE.ExperienceBonus"}} (%)</label>
<div class="form-fields">
<input
type="text"
name="data.details.xp.bonus"
id="experience"
value="{{data.details.xp.bonus}}"
/>
</div>
</div>
{{#if (eq this.type 'character')}}
<div class="form-group">
<label>{{localize "OSE.ExperienceBonus"}} (%)</label>
<div class="form-fields">
<input type="text" name="data.details.xp.bonus" id="experience" value="{{data.details.xp.bonus}}" />
</div>
<div class="form-group">
<label>{{localize "OSE.MeleeBonus"}}</label>
<div class="form-fields">
<input
type="text"
name="data.thac0.mod.melee"
id="melee"
value="{{data.thac0.mod.melee}}"
data-dtype="Number"
/>
</div>
</div>
<div class="form-group">
<label>{{localize "OSE.MeleeBonus"}}</label>
<div class="form-fields">
<input type="text" name="data.thac0.mod.melee" id="melee" value="{{data.thac0.mod.melee}}" data-dtype="Number" />
</div>
<div class="form-group">
<label>{{localize "OSE.MissileBonus"}}</label>
<div class="form-fields">
<input
type="text"
name="data.thac0.mod.missile"
id="missile"
value="{{data.thac0.mod.missile}}"
data-dtype="Number"
/>
</div>
</div>
<div class="form-group">
<label>{{localize "OSE.MissileBonus"}}</label>
<div class="form-fields">
<input type="text" name="data.thac0.mod.missile" id="missile" value="{{data.thac0.mod.missile}}"
data-dtype="Number" />
</div>
<div class="form-group">
<label>{{localize "OSE.Encumbrance"}}</label>
<div class="form-fields">
<input
type="text"
name="data.encumbrance.max"
id="encumbrance"
value="{{data.encumbrance.max}}"
data-dtype="Number"
/>
</div>
</div>
<div class="form-group">
<label>{{localize "OSE.Encumbrance"}}</label>
<div class="form-fields">
<input type="text" name="data.encumbrance.max" id="encumbrance" value="{{data.encumbrance.max}}"
data-dtype="Number" />
</div>
<div class="form-group">
<label for="movementAuto">{{localize "OSE.Setting.MovementAuto"}}</label>
<div class="form-fields">
<input
type="checkbox"
name="data.config.movementAuto"
id="movementAuto"
{{checked
data.config.movementAuto}}
/>
</div>
</div>
<div class="form-group">
<label for="movementAuto">{{localize "OSE.Setting.MovementAuto"}}</label>
<div class="form-fields">
<input type="checkbox" name="data.config.movementAuto" id="movementAuto" {{checked
data.config.movementAuto}} {{#unless user.isGM}}disabled{{/unless}} />
</div>
{{/if}}
<footer class="sheet-footer">
<button type="submit">
<i class="fas fa-save"></i>{{localize "Save Changes"}}
</button>
</footer>
</form>
</div>
{{/if}}
<footer class="sheet-footer">
<button type="submit">
<i class="fas fa-save"></i>{{localize "Save Changes"}}
</button>
</footer>
</form>