diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 4b47542..1fa4ac9 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -809,11 +809,12 @@ export class PegasusActor extends Actor { /* -------------------------------------------- */ async cleanupPerksIfTrauma() { - if ( this.getTraumaState == "severetrauma") { + if ( this.getTraumaState() == "severetrauma") { for (let perk of this.data.items) { if (perk.type == "perk") { this.cleanPerkEffects(perk.id) - this.updateEmbeddedDocuments('Item', [{ _id: itemId, 'data.used1': false, 'data.used2': false, 'data.used3': false }]) + this.updateEmbeddedDocuments('Item', [{ _id: perk.id, 'data.status': "ready", 'data.used1': false, 'data.used2': false, 'data.used3': false }]) + ChatMessage.create({ content: `Perk ${perk.name} has been deactivated due to Severe Trauma state !` } ) } } } @@ -835,6 +836,7 @@ export class PegasusActor extends Actor { } chatData.content = `
${this.name} is suffering from Severe Trauma and cannot use Perks at this time.= moralitythreshold-2) { + ChatMessage.create( {content: "WARNING: Your character is dangerously close to becoming corrupted and defeated. Start on a path of redemption!"} ) + this.warnMorality = true + } + let race = this.getRace() if (race && race.name && (race.name != this.data.data.biodata.racename)) { updates['data.biodata.racename'] = race.name @@ -1232,6 +1245,9 @@ export class PegasusActor extends Actor { if (overCapacity > 0) { effectsList.push({ label: "Encumbrance Hindrance", type: "hindrance", foreign: true, actorId: this.id, applied: false, value: overCapacity }) } + if (this.data.data.biodata.morality <= 0) { + effectsList.push({ label: "Morality Hindrance", type: "hindrance", foreign: true, actorId: this.id, applied: false, value: 3 }) + } let effects = this.data.items.filter(item => item.type == 'effect') for (let effect of effects) { effect = duplicate(effect) diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js index ed7a262..6831cde 100644 --- a/modules/pegasus-utility.js +++ b/modules/pegasus-utility.js @@ -729,9 +729,6 @@ export class PegasusUtility { let diceFormulaTab = [] for (let dice of rollData.dicePool) { let level = dice.level - if (dice.name == "stat") { - level += rollData.statLevelBonus - } diceFormulaTab.push(this.getFoundryDiceFromLevel(level)) } let diceFormula = '{' + diceFormulaTab.join(', ') + '}kh + ' + (rollData.stat?.mod || 0) diff --git a/system.json b/system.json index 9280c6a..4d42eba 100644 --- a/system.json +++ b/system.json @@ -180,9 +180,9 @@ "styles": [ "styles/simple.css" ], - "templateVersion": 95, + "templateVersion": 96, "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "0.6.2", + "version": "0.6.3", "background" : "./images/ui/pegasus_welcome_page.webp" } diff --git a/template.json b/template.json index 86e8946..722aebd 100644 --- a/template.json +++ b/template.json @@ -30,7 +30,7 @@ "gmnotes": "", "racename": "", "rolename": "", - "corruption": 0, + "morality": 5, "moralitythreshold": 0 } }, diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index c919a27..c80920f 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -221,14 +221,18 @@ - + {{#if (eq @root.traumaState "severetrauma")}} + Disabled + {{else}} + + {{/if}} {{#if (ne perk.data.status "ready")}} @@ -1003,8 +1007,12 @@
  • - - + + +
  • +
  • + +
  • diff --git a/templates/roll-dialog-generic.html b/templates/roll-dialog-generic.html index 60539ab..628442f 100644 --- a/templates/roll-dialog-generic.html +++ b/templates/roll-dialog-generic.html @@ -38,18 +38,18 @@  
  • +
    + Spec Dice : + +   +
    {{/if}} -
    - Spec Dice : - -   -
    {{/if}}