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(), encCapacity: this.actor.getEncumbranceCapacity(),
levelRemainingList: this.actor.getLevelRemainingList(), levelRemainingList: this.actor.getLevelRemainingList(),
maxLevelRemainingList: this.actor.getMaxLevelRemainingList(), maxLevelRemainingList: this.actor.getMaxLevelRemainingList(),
disabledBonus: (this.actor.system.biodata.noautobonus) ? "" : "disabled",
containersTree: this.actor.containersTree, containersTree: this.actor.containersTree,
encCurrent: this.actor.encCurrent, encCurrent: this.actor.encCurrent,
encHindrance: this.actor.encHindrance, encHindrance: this.actor.encHindrance,

View File

@ -1443,6 +1443,9 @@ checkIfPossible() {
/* -------------------------------------------- */ /* -------------------------------------------- */
parseStatEffects() { 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) let effects = this.items.filter(effect => effect.type == "effect" && effect.system.genre == "positive" && effect.system.statdice)
for (let statKey in this.system.statistics) { for (let statKey in this.system.statistics) {
let stat = duplicate(this.system.statistics[statKey]) let stat = duplicate(this.system.statistics[statKey])
@ -1461,6 +1464,9 @@ parseStatEffects() {
/* -------------------------------------------- */ /* -------------------------------------------- */
parseStatusEffects() { 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)) let effects = this.items.filter(effect => effect.type == "effect" && effect.system.affectstatus && (Number(effect.system.effectlevel) > 0))
for (let statusKey in this.system.secondary) { for (let statusKey in this.system.secondary) {
let status = duplicate(this.system.secondary[statusKey]) let status = duplicate(this.system.secondary[statusKey])

View File

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

View File

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

View File

@ -869,6 +869,12 @@
<label class="generic-label">Hair</label> <label class="generic-label">Hair</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" /> <input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li> </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> </ul>
</div> </div>
<div> <div>

View File

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