ENH: Initiative mod for monsters
parent
2c62d33c82
commit
7f333082fd
|
@ -5,6 +5,21 @@ export class OseActor extends Actor {
|
|||
* Extends data from base Actor class
|
||||
*/
|
||||
|
||||
prepareData() {
|
||||
super.prepareData();
|
||||
const data = this.data.data;
|
||||
|
||||
// Determine Initiative
|
||||
if (game.settings.get('ose', 'individualInit')) {
|
||||
data.initiative.value = data.initiative.mod ;
|
||||
if (this.data.type == 'character') {
|
||||
const mods = this.computeModifiers();
|
||||
data.initiative.value += mods.dex;
|
||||
}
|
||||
} else {
|
||||
data.initiative.value = 0;
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
/* Socket Listeners and Handlers
|
||||
/* -------------------------------------------- */
|
||||
|
|
|
@ -19,7 +19,7 @@ Hooks.once("init", async function () {
|
|||
* @type {String}
|
||||
*/
|
||||
CONFIG.Combat.initiative = {
|
||||
formula: "1d6 + @initiative.value + @initiative.mod",
|
||||
formula: "1d6 + @initiative.value",
|
||||
decimals: 2,
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,11 @@
|
|||
},
|
||||
"movement": {
|
||||
"base": 120
|
||||
}
|
||||
},
|
||||
"initative": {
|
||||
"value": 0,
|
||||
"mod": 0
|
||||
}
|
||||
},
|
||||
"spellcaster": {
|
||||
"spells": {
|
||||
|
@ -116,10 +120,6 @@
|
|||
"mod": 0
|
||||
}
|
||||
},
|
||||
"initative": {
|
||||
"value": 0,
|
||||
"mod": 0
|
||||
},
|
||||
"encumbrance": {
|
||||
"max": 1600
|
||||
},
|
||||
|
|
|
@ -23,6 +23,18 @@
|
|||
/>
|
||||
</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>
|
||||
</div>
|
||||
{{#if (eq this.type 'character')}}
|
||||
<div class="form-group">
|
||||
<label>{{localize "OSE.ExperienceBonus"}} (%)</label>
|
||||
|
@ -59,18 +71,6 @@
|
|||
/>
|
||||
</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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "OSE.Encumbrance"}}</label>
|
||||
<div class="form-fields">
|
||||
|
|
Loading…
Reference in New Issue