ENH: Ascending AC
parent
611582f228
commit
c07bbb864f
|
@ -59,6 +59,7 @@
|
|||
"OSE.MovementShort": "MOV",
|
||||
"OSE.ArmorClass": "Armor Class",
|
||||
"OSE.ArmorClassShort": "AC",
|
||||
"OSE.AscArmorClassShort": "AAC",
|
||||
"OSE.SpellDC": "DC",
|
||||
"OSE.Thac0": "THAC0",
|
||||
"OSE.MeleeShort": "MEL",
|
||||
|
|
|
@ -7,6 +7,16 @@ export class OseActorSheet extends ActorSheet {
|
|||
}
|
||||
/* -------------------------------------------- */
|
||||
|
||||
getData() {
|
||||
const data = super.getData();
|
||||
|
||||
data.config = CONFIG.OSE;
|
||||
// Settings
|
||||
data.config.ascendingAC = game.settings.get('ose', 'ascendingAC');
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
activateListeners(html) {
|
||||
html.find('.saving-throw .attribute-name a').click(ev => {
|
||||
let actorObject = this.actor;
|
||||
|
|
|
@ -39,8 +39,6 @@ export class OseActorSheetCharacter extends OseActorSheet {
|
|||
getData() {
|
||||
const data = super.getData();
|
||||
|
||||
data.config = CONFIG.OSE;
|
||||
|
||||
for (let [a, score] of Object.entries(data.data.scores)) {
|
||||
data.data.scores[a].label = game.i18n.localize(`OSE.scores.${a}`);
|
||||
}
|
||||
|
|
|
@ -39,8 +39,6 @@ export class OseActorSheetMonster extends OseActorSheet {
|
|||
getData() {
|
||||
const data = super.getData();
|
||||
|
||||
data.config = CONFIG.OSE;
|
||||
|
||||
// Prepare owned items
|
||||
this._prepareItems(data);
|
||||
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
"value": 0,
|
||||
"mod": 0
|
||||
},
|
||||
"aac": {
|
||||
"value": 0,
|
||||
"mod": 0
|
||||
},
|
||||
"thac0": {
|
||||
"value": 19,
|
||||
"mod": 0
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<section class="flexrow">
|
||||
<ul class="attributes flexrow">
|
||||
<li class="attribute health">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Health' }}">{{ localize "OSE.HealthShort" }}</h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Health' }}">{{ localize "OSE.HealthShort" }}
|
||||
</h4>
|
||||
<div class="attribute-value multiple">
|
||||
<input name="data.hp.value" type="text" value="{{data.hp.value}}" data-dtype="Number"
|
||||
placeholder="10" />
|
||||
|
@ -10,11 +11,21 @@
|
|||
</div>
|
||||
</li>
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.ArmorClass' }}">{{ localize "OSE.ArmorClassShort" }}</h4>
|
||||
{{#if config.ascendingAC}}
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.ArmorClass' }}">
|
||||
{{ localize "OSE.AscArmorClassShort" }}</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.ac.value" type="text" value="{{data.ac.value}}" data-dtype="Number"
|
||||
placeholder="10" data-dtype="Number" />
|
||||
<input name="data.aac.value" type="text" value="{{data.aac.value}}" data-dtype="Number" placeholder="10"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
{{else}}
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.ArmorClass' }}">
|
||||
{{ localize "OSE.ArmorClassShort" }}</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.ac.value" type="text" value="{{data.ac.value}}" data-dtype="Number" placeholder="9"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Thac0' }}">{{ localize "OSE.Thac0" }}</h4>
|
||||
|
@ -25,27 +36,29 @@
|
|||
</li>
|
||||
{{#if config.individualInit}}
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Initiative' }}">{{ localize "OSE.InitiativeShort" }}</h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Initiative' }}">
|
||||
{{ localize "OSE.InitiativeShort" }}</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.initiative.value" type="text" value="{{data.initiative.value}}"
|
||||
placeholder="0" data-dtype="Number" />
|
||||
<input name="data.initiative.value" type="text" value="{{data.initiative.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if data.retainer.enabled}}
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Loyalty' }}">{{ localize "OSE.LoyaltyShort" }}</h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Loyalty' }}">{{ localize "OSE.LoyaltyShort" }}
|
||||
</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.retainer.loyalty" type="text" value="{{data.retainer.loyalty}}"
|
||||
placeholder="0" data-dtype="Number" />
|
||||
<input name="data.retainer.loyalty" type="text" value="{{data.retainer.loyalty}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title">{{ localize "OSE.MovementShort" }}</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.movement.value" type="text" value="{{data.movement.value}}"
|
||||
placeholder="0" data-dtype="Number" />
|
||||
<input name="data.movement.value" type="text" value="{{data.movement.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -55,34 +68,46 @@
|
|||
<div class="attribute-group">
|
||||
<ul class="attributes">
|
||||
<li class="attribute ability-score" data-score="str">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.str.long' }}"><a>{{ localize "OSE.scores.str.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.str.long' }}">
|
||||
<a>{{ localize "OSE.scores.str.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.scores.str.value" type="text" value="{{data.scores.str.value}}" placeholder="0" data-dtype="Number"/>
|
||||
<input name="data.scores.str.value" type="text" value="{{data.scores.str.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute ability-score" data-score="int">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.int.long' }}"><a>{{ localize "OSE.scores.int.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.int.long' }}">
|
||||
<a>{{ localize "OSE.scores.int.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.scores.int.value" type="text" value="{{data.scores.int.value}}" placeholder="0" data-dtype="Number"/>
|
||||
<input name="data.scores.int.value" type="text" value="{{data.scores.int.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute ability-score" data-score="wis">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.wis.long' }}"><a>{{ localize "OSE.scores.wis.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.wis.long' }}">
|
||||
<a>{{ localize "OSE.scores.wis.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.scores.wis.value" type="text" value="{{data.scores.wis.value}}" placeholder="0" data-dtype="Number"/>
|
||||
<input name="data.scores.wis.value" type="text" value="{{data.scores.wis.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute ability-score" data-score="dex">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.dex.long' }}"><a>{{ localize "OSE.scores.dex.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.dex.long' }}">
|
||||
<a>{{ localize "OSE.scores.dex.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.scores.dex.value" type="text" value="{{data.scores.dex.value}}" placeholder="0" data-dtype="Number"/>
|
||||
<input name="data.scores.dex.value" type="text" value="{{data.scores.dex.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute ability-score" data-score="con">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.con.long' }}"><a>{{ localize "OSE.scores.con.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.con.long' }}">
|
||||
<a>{{ localize "OSE.scores.con.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.scores.con.value" type="text" value="{{data.scores.con.value}}" placeholder="0" data-dtype="Number"/>
|
||||
<input name="data.scores.con.value" type="text" value="{{data.scores.con.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute ability-score" data-score="cha">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.cha.long' }}"><a>{{ localize "OSE.scores.cha.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.scores.cha.long' }}">
|
||||
<a>{{ localize "OSE.scores.cha.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.scores.cha.value" type="text" value="{{data.scores.cha.value}}" placeholder="0" data-dtype="Number"/>
|
||||
<input name="data.scores.cha.value" type="text" value="{{data.scores.cha.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -92,7 +117,8 @@
|
|||
<h4>{{localize 'OSE.panel.abilities'}}</h4>
|
||||
<div class="item-controls">
|
||||
{{#if owner}}
|
||||
<a class="item-control item-create" title='{{localize "OSE.Add"}}' data-type="ability"><i class="fas fa-plus"></i></a>
|
||||
<a class="item-control item-create" title='{{localize "OSE.Add"}}' data-type="ability"><i
|
||||
class="fas fa-plus"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -125,33 +151,39 @@
|
|||
<div class="attribute-group">
|
||||
<ul class="attributes">
|
||||
<li class="attribute saving-throw" data-save="death">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.death.long' }}"><a>{{ localize "OSE.saves.death.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.death.long' }}">
|
||||
<a>{{ localize "OSE.saves.death.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.death.value" type="text" value="{{data.saves.death.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute saving-throw" data-save="wand">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.wand.long' }}"><a>{{ localize "OSE.saves.wand.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.wand.long' }}">
|
||||
<a>{{ localize "OSE.saves.wand.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.wand.value" type="text" value="{{data.saves.wand.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute saving-throw" data-save="paralysis">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.paralysis.long' }}"><a>{{ localize "OSE.saves.paralysis.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.paralysis.long' }}">
|
||||
<a>{{ localize "OSE.saves.paralysis.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.paralysis.value" type="text" value="{{data.saves.paralysis.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
<input name="data.saves.paralysis.value" type="text" value="{{data.saves.paralysis.value}}"
|
||||
placeholder="0" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute saving-throw" data-save="breath">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.breath.long' }}"><a>{{ localize "OSE.saves.breath.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.breath.long' }}">
|
||||
<a>{{ localize "OSE.saves.breath.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.breath.value" type="text" value="{{data.saves.breath.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
<input name="data.saves.breath.value" type="text" value="{{data.saves.breath.value}}"
|
||||
placeholder="0" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute saving-throw" data-save="spell">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.spell.long' }}"><a>{{ localize "OSE.saves.spell.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.spell.long' }}">
|
||||
<a>{{ localize "OSE.saves.spell.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.spell.value" type="text" value="{{data.saves.spell.value}}" placeholder="0" />
|
||||
<input name="data.saves.spell.value" type="text" value="{{data.saves.spell.value}}"
|
||||
placeholder="0" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -10,11 +10,21 @@
|
|||
</div>
|
||||
</li>
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{localize 'OSE.ArmorClass'}}">{{ localize "OSE.ArmorClassShort" }}</h4>
|
||||
{{#if config.ascendingAC}}
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.ArmorClass' }}">
|
||||
{{ localize "OSE.AscArmorClassShort" }}</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.ac.value" type="text" value="{{data.ac.value}}" data-dtype="Number" placeholder="10"
|
||||
<input name="data.aac.value" type="text" value="{{data.aac.value}}" data-dtype="Number" placeholder="10"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
{{else}}
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.ArmorClass' }}">
|
||||
{{ localize "OSE.ArmorClassShort" }}</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.ac.value" type="text" value="{{data.ac.value}}" data-dtype="Number" placeholder="9"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{localize 'OSE.Thac0'}}">{{ localize "OSE.Thac0" }}</h4>
|
||||
|
@ -24,7 +34,8 @@
|
|||
</div>
|
||||
</li>
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{localize 'OSE.Attacks'}}">{{ localize "OSE.AttacksShort" }}</h4>
|
||||
<h4 class="attribute-name box-title" title="{{localize 'OSE.Attacks'}}">{{ localize "OSE.AttacksShort" }}
|
||||
</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.att.value" type="text" value="{{data.att.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
|
@ -32,15 +43,17 @@
|
|||
</li>
|
||||
{{#if data.retainer.enabled}}
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Loyalty' }}">{{ localize "OSE.LoyaltyShort" }}</h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.Loyalty' }}">{{ localize "OSE.LoyaltyShort" }}
|
||||
</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.retainer.loyalty" type="text" value="{{data.retainer.loyalty}}"
|
||||
placeholder="0" data-dtype="Number" />
|
||||
<input name="data.retainer.loyalty" type="text" value="{{data.retainer.loyalty}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title" title="{{localize 'OSE.Movement'}}">{{ localize "OSE.MovementShort" }}</h4>
|
||||
<h4 class="attribute-name box-title" title="{{localize 'OSE.Movement'}}">{{ localize "OSE.MovementShort" }}
|
||||
</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.movement.value" type="text" value="{{data.movement.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
|
@ -54,7 +67,8 @@
|
|||
<h4>{{localize 'OSE.panel.abilities'}}</h4>
|
||||
<div class="item-controls">
|
||||
{{#if owner}}
|
||||
<a class="item-control item-create" title='{{localize "OSE.Add"}}' data-type="ability"><i class="fas fa-plus"></i></a>
|
||||
<a class="item-control item-create" title='{{localize "OSE.Add"}}' data-type="ability"><i
|
||||
class="fas fa-plus"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -89,7 +103,8 @@
|
|||
<h4>{{localize 'OSE.panel.equipment'}}</h4>
|
||||
<div class="item-controls">
|
||||
{{#if owner}}
|
||||
<a class="item-control item-create" title='{{localize "OSE.Add"}}' data-type="item"><i class="fas fa-plus"></i></a>
|
||||
<a class="item-control item-create" title='{{localize "OSE.Add"}}' data-type="item"><i
|
||||
class="fas fa-plus"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -122,33 +137,39 @@
|
|||
<div class="attribute-group">
|
||||
<ul class="attributes">
|
||||
<li class="attribute saving-throw" data-save="death">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.death.long' }}"><a>{{ localize "OSE.saves.death.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.death.long' }}">
|
||||
<a>{{ localize "OSE.saves.death.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.death.value" type="text" value="{{data.saves.death.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute saving-throw" data-save="wand">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.wand.long' }}"><a>{{ localize "OSE.saves.wand.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.wand.long' }}">
|
||||
<a>{{ localize "OSE.saves.wand.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.wand.value" type="text" value="{{data.saves.wand.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute saving-throw" data-save="paralysis">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.paralysis.long' }}"><a>{{ localize "OSE.saves.paralysis.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.paralysis.long' }}">
|
||||
<a>{{ localize "OSE.saves.paralysis.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.paralysis.value" type="text" value="{{data.saves.paralysis.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
<input name="data.saves.paralysis.value" type="text" value="{{data.saves.paralysis.value}}"
|
||||
placeholder="0" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute saving-throw" data-save="breath">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.breath.long' }}"><a>{{ localize "OSE.saves.breath.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.breath.long' }}">
|
||||
<a>{{ localize "OSE.saves.breath.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.breath.value" type="text" value="{{data.saves.breath.value}}" placeholder="0"
|
||||
data-dtype="Number" />
|
||||
<input name="data.saves.breath.value" type="text" value="{{data.saves.breath.value}}"
|
||||
placeholder="0" data-dtype="Number" />
|
||||
</li>
|
||||
<li class="attribute saving-throw" data-save="spell">
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.spell.long' }}"><a>{{ localize "OSE.saves.spell.short" }}</a></h4>
|
||||
<h4 class="attribute-name box-title" title="{{ localize 'OSE.saves.spell.long' }}">
|
||||
<a>{{ localize "OSE.saves.spell.short" }}</a></h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.saves.spell.value" type="text" value="{{data.saves.spell.value}}" placeholder="0" />
|
||||
<input name="data.saves.spell.value" type="text" value="{{data.saves.spell.value}}"
|
||||
placeholder="0" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue