Fix #95 message for GM

This commit is contained in:
sladecraven 2022-10-05 10:24:42 +02:00
parent 6e69e151c5
commit a68db10676
6 changed files with 18 additions and 4 deletions

View File

@ -61,6 +61,7 @@ export class PegasusActorSheet extends ActorSheet {
encCapacity: this.actor.getEncumbranceCapacity(),
levelRemainingList: this.actor.getLevelRemainingList(),
maxLevelRemainingList: this.actor.getMaxLevelRemainingList(),
disabledBonus: (this.actor.system.biodata.noautobonus) ? "" : "disabled",
containersTree: this.actor.containersTree,
encCurrent: this.actor.encCurrent,
encHindrance: this.actor.encHindrance,

View File

@ -1443,6 +1443,9 @@ checkIfPossible() {
/* -------------------------------------------- */
parseStatEffects() {
if ( this.system.biodata.noautobonus) { // If we are in "no-bonus mode
return
}
let effects = this.items.filter(effect => effect.type == "effect" && effect.system.genre == "positive" && effect.system.statdice)
for (let statKey in this.system.statistics) {
let stat = duplicate(this.system.statistics[statKey])
@ -1461,6 +1464,9 @@ parseStatEffects() {
/* -------------------------------------------- */
parseStatusEffects() {
if ( this.system.biodata.noautobonus) { // If we are in "no-bonus mode
return
}
let effects = this.items.filter(effect => effect.type == "effect" && effect.system.affectstatus && (Number(effect.system.effectlevel) > 0))
for (let statusKey in this.system.secondary) {
let status = duplicate(this.system.secondary[statusKey])

View File

@ -253,7 +253,7 @@
],
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "10.0.32",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.32.zip",
"version": "10.1.0",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.0.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
}

View File

@ -37,6 +37,7 @@
"rolename": "",
"morality": 5,
"bonusselection": "",
"noautobonus": false,
"moralitythreshold": 0
}
},

View File

@ -869,6 +869,12 @@
<label class="generic-label">Hair</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li>
{{#if isGM}}
<li class="item flexrow">
<label class="generic-label">Manual bonuses only ?</label>
<input type="checkbox" class="change-worstfear" name="system.biodata.noautobonus" {{checked data.biodata.noautobonus}} />
</li>
{{/if}}
</ul>
</div>
<div>

View File

@ -18,7 +18,7 @@
</label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.value" value="{{stat2.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.bonus" value="{{stat2.bonus}}" data-dtype="Number" disabled/>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.bonus" value="{{stat2.bonus}}" data-dtype="Number" {{@root.disabledBonus}}/>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.max" value="{{stat2.max}}" data-dtype="Number"/>
</li>
{{/each}}
@ -27,7 +27,7 @@
<label class="status-small-label"><strong>{{data.nrg.label}}</strong></label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number" disabled/>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number" {{@root.disabledBonus}}/>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/>
<span class="small-label status-small-label">&nbsp;/ {{data.nrg.absolutemax}}</span>
</li>