Add Hero Level max

This commit is contained in:
sladecraven 2022-07-26 22:58:33 +02:00
parent 40a8406761
commit 0c86b7f694
3 changed files with 15 additions and 1 deletions

View File

@ -61,6 +61,7 @@ export class PegasusActorSheet extends ActorSheet {
vices: duplicate(this.actor.getVices()),
encCapacity: this.actor.getEncumbranceCapacity(),
levelRemainingList: this.actor.getLevelRemainingList(),
maxLevelRemainingList: this.actor.getMaxLevelRemainingList(),
containersTree: this.actor.containersTree,
encCurrent: this.actor.encCurrent,
encHindrance: this.actor.encHindrance,

View File

@ -1381,6 +1381,15 @@ export class PegasusActor extends Actor {
return options.join("\n")
}
/* -------------------------------------------- */
getMaxLevelRemainingList() {
let options = []
for (let i = 0; i <= 12; i++) {
options.push(`<option value="${i}">${i}</option>`)
}
return options.join("\n")
}
/* -------------------------------------------- */
async startRoll(rollData) {
this.syncRoll(rollData);

View File

@ -1017,7 +1017,11 @@
</li>
<li class="flexrow">
<label class="short-label">Hero Level (max) : </label>
<input type="text" class="" name="data.biodata.maxlevelremaining" value="{{data.biodata.maxlevelremaining}}" data-dtype="Number" />
<select class="status-small-label color-class-common" type="text" name="data.biodata.maxlevelremaining" value="{{data.biodata.maxlevelremaining}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.biodata.maxlevelremaining}}
{{{@root.maxLevelRemainingList}}}
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="short-label">Hero Levels Remaining : </label>