diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index a40bd199..c1cfa211 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -531,7 +531,7 @@ export class ExaltedThirdActorSheet extends ActorSheet { endings: 0, } // Iterate through items, allocating to containers - for (let i of sheetData.items) { + for (let i of actorData.items) { i.img = i.img || DEFAULT_TOKEN; if (i.type === 'item') { gear.push(i); diff --git a/module/actor/actor.js b/module/actor/actor.js index 3979584d..eaeb58e3 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -1645,7 +1645,7 @@ export async function spendEmbeddedItem(actor, item) { } } } - if (item.system.cost.commitmotes > 0) { + if (item.system.cost.commitmotes > 0 || item.system.activatable) { updateActive = true; } } diff --git a/module/apps/dice-roller.js b/module/apps/dice-roller.js index b39e0ea0..0d8335fd 100644 --- a/module/apps/dice-roller.js +++ b/module/apps/dice-roller.js @@ -1045,7 +1045,7 @@ export class RollForm extends FormApplication { case 'opposedRolls': return (this.object.rollType === 'useOpposingCharms'); case 'sameAbility': - return (charm.system.ability === this.object.ability || charm.system.ability === this.object.attribute); + return charm.type === 'charm' && (charm.system.ability === this.object.ability || charm.system.ability === this.object.attribute); } if (this.object.rollType === charm.system.autoaddtorolls) { return true; @@ -1065,7 +1065,7 @@ export class RollForm extends FormApplication { } for (var charmlist of Object.values(this.object.charmList)) { for (const charm of charmlist.list.filter(charm => charm.type !== 'charm' || charm.system.diceroller.enabled)) { - var existingAddedCharm = this.object.addedCharms.find((addedCharm) => addedCharm.id === charm._id); + var existingAddedCharm = this.object.addedCharms.find((addedCharm) => addedCharm._id === charm._id); if (existingAddedCharm) { charm.charmAdded = true; charm.timesAdded = existingAddedCharm.timesAdded; @@ -3044,7 +3044,7 @@ export class RollForm extends FormApplication { else { this.object.thresholdSuccesses = 0; } - if ((this.object.thresholdSuccesses >= 0 && this.object.rollType !== 'accuracy') || this.object.rollType === 'damage') { + if (this.object.rollType === 'damage' || (this.object.attackSuccesses >= this.object.defense && this.object.rollType !== 'accuracy')) { if (this.object.rollType === 'damage' && this.object.attackSuccesses < this.object.defense) { this.object.thresholdSuccesses = this.object.attackSuccesses - this.object.defense; await this.missAttack(false); @@ -3052,11 +3052,10 @@ export class RollForm extends FormApplication { else { await this._damageRoll(); await this._addTriggerBonuses('afterDamageRoll'); - } } else { - if (this.object.thresholdSuccesses < 0 && this.object.rollType !== 'accuracy') { + if (this.object.attackSuccesses < this.object.defense && this.object.rollType !== 'accuracy') { await this.missAttack(); } } diff --git a/module/apps/npc-generator.js b/module/apps/npc-generator.js index 9845d498..b1f8162c 100644 --- a/module/apps/npc-generator.js +++ b/module/apps/npc-generator.js @@ -108,7 +108,8 @@ export default class NPCGenerator extends FormApplication { height: 1100, resizable: true, submitOnChange: true, - closeOnSubmit: false + closeOnSubmit: false, + tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }] }); } diff --git a/module/config.js b/module/config.js index 90f67530..4694a4ff 100644 --- a/module/config.js +++ b/module/config.js @@ -322,6 +322,7 @@ exaltedthird.exaltcharmtypes = { solar: "Ex3.Solar", sovereign: "Ex3.Sovereign", umbral: "Ex3.Umbral", + universal: "Ex3.Universal", other: "Ex3.Other" }; @@ -1842,7 +1843,7 @@ exaltedthird.selects = { '': "Ex3.None", 'action': "Ex3.CharacterRolls", 'opposedRolls': "Ex3.OpposedRolls", - 'sameAbility': "Ex3.NonSameAbilityAttribute", + 'sameAbility': "Ex3.SameAbilityAttribute", 'attacks': "Ex3.Attacks", 'command': "Ex3.Command", 'grapple': "Ex3.Grapple", diff --git a/module/item/item-sheet.js b/module/item/item-sheet.js index a5cb7c2d..ea7bdda3 100644 --- a/module/item/item-sheet.js +++ b/module/item/item-sheet.js @@ -284,7 +284,7 @@ export class ExaltedThirdItemSheet extends ItemSheet { html.find('.show-roll-triggers-link').click(ev => { new Dialog({ title: `ReadMe`, - content: '

Instructions and Syntax.

', + content: '

Instructions and Syntax.

', buttons: { cancel: { label: "Close" } } diff --git a/module/template/item-template.js b/module/template/item-template.js index 82355765..990c7d5d 100644 --- a/module/template/item-template.js +++ b/module/template/item-template.js @@ -173,6 +173,7 @@ export class ItemMeritData extends CommonItemData { ...commonData, ...activatableData(), ...triggerData(), + autoaddtorolls: new fields.StringField({ initial: "" }), merittype: new fields.StringField({ initial: "story" }), parentitemid: new fields.StringField({ initial: "" }), archetypename: new fields.StringField({ initial: "" }), @@ -251,6 +252,7 @@ export class ItemSpecialAbilityData extends CommonItemData { ...commonData, ...activatableData(), ...triggerData(), + autoaddtorolls: new fields.StringField({ initial: "" }), } } } @@ -344,6 +346,7 @@ export class ItemSpellData extends CommonItemData { ...commonData, ...activatableData(), ...triggerData(), + autoaddtorolls: new fields.StringField({ initial: "" }), summary: new fields.StringField({ initial: "" }), circle: new fields.StringField({ initial: "terrestrial" }), keywords: new fields.StringField({ initial: "" }), diff --git a/system.json b/system.json index 78084790..34033e4f 100644 --- a/system.json +++ b/system.json @@ -4,7 +4,7 @@ "description": "Unofficial Exalted third edition system module for FoundryVTT! Portions of the materials are the copyrights and trademarks of Paradox Interactive AB, and are used with permission. All rights reserved. For more information please visit worldofdarkness.com.", "url": "https://github.com/Aliharu/Foundry-Ex3", "license": "LICENSE.txt", - "version": "2.9.3", + "version": "2.9.4", "compatibility": { "minimum": "11", "verified": "12", @@ -49,7 +49,7 @@ ], "relationships": [], "manifest": "https://raw.githubusercontent.com/Aliharu/Foundry-Ex3/master/system.json", - "download": "https://github.com/Aliharu/Foundry-Ex3/releases/download/v2.9.3/release2.9.3.zip", + "download": "https://github.com/Aliharu/Foundry-Ex3/releases/download/v2.9.4/release2.9.4.zip", "bugs": "https://github.com/Aliharu/Foundry-Ex3/issues", "gridDistance": 5, "gridUnits": "ft", diff --git a/templates/actor/npc-sheet.html b/templates/actor/npc-sheet.html index 230a23ec..062a83be 100644 --- a/templates/actor/npc-sheet.html +++ b/templates/actor/npc-sheet.html @@ -347,6 +347,17 @@

{{item.name}}

{{/each}} +
+ + + + +
+ {{#each system.traits.languages.selected as |v k|}} +
  • {{v}}
  • + {{/each}} +
    +
    {{> systems/exaltedthird/templates/actor/biography-tab.html}} diff --git a/templates/dialogues/npc-generator.html b/templates/dialogues/npc-generator.html index 0a0f3def..fa479156 100644 --- a/templates/dialogues/npc-generator.html +++ b/templates/dialogues/npc-generator.html @@ -1,222 +1,245 @@
    -
    -
    - - +
    +
    +
    + + +
    +
    + {{#ifEquals data.characterType 'npc'}} +
    + +
    +
    +
    +
    {{localize "Ex3.Template"}}
    + +
    +
    +
    {{localize "Ex3.PoolNumbers"}}
    + +
    +
    +
    {{localize "Ex3.NPCType"}}
    + +
    +
    + + +
    +
    + {{/ifEquals}} + {{#ifEquals data.character.npcType 'exalt'}} +
    + +
    +
    +
    +
    {{localize "Ex3.Exalt"}}
    + +
    + {{#if data.availableCastes}} +
    +
    {{localize "Ex3.Caste"}}/{{localize "Ex3.Aspect"}}
    + +
    + {{/if}} +
    + {{/ifEquals}} +
    + + + +
    +
    + {{#ifEquals data.characterType 'npc'}} +
    + +
    +
    + {{#each data.character.skills as |skill key|}} +
    +
    {{localize skill.label}}
    + +
    + {{/each}} +
    +
    + +
    +
    +
    +
    {{localize "Ex3.Sorcerer"}}
    + +
    +
    +
    {{localize "Ex3.SizeCategory"}}
    + +
    + {{#each data.character.numberTraits as |trait key|}} +
    + + +
    + {{/each}} +
    +
    {{localize "Ex3.Battlegroup"}}
    + +
    + {{#each data.character.traits as |trait key|}} +
    +
    {{localize trait.label}}
    + +
    + {{/each}} +
    + {{#if data.character.battlegroup}} +
    + +
    +
    +
    + +
    +
    +
    + + +
    +
    + + +
    +
    + {{/if}} + + {{/ifEquals}} +
    + +
    +
    + +
    +
    +
    +
    {{localize "Ex3.Type"}}
    + +
    +
    +
    {{localize "Ex3.Type"}}
    + +
    +
    +
    {{localize "Ex3.Weight"}}
    + +
    +
    +
    {{localize "Ex3.Artifact"}}
    + +
    +
    +
    + +
    +
    +
    +
    {{localize "Ex3.Type"}}
    + +
    +
    +
    {{localize "Ex3.WeaponType"}}
    + +
    +
    +
    {{localize "Ex3.Weight"}}
    + +
    +
    +
    {{localize "Ex3.Artifact"}}
    + +
    +
    +
    + +
    +
    +
    +
    {{localize "Ex3.Type"}}
    + +
    +
    +
    {{localize "Ex3.Weight"}}
    + +
    +
    +
    {{localize "Ex3.Artifact"}}
    + +
    +
    -
    - {{#ifEquals data.characterType 'npc'}} -
    - -
    -
    -
    -
    {{localize "Ex3.Template"}}
    - -
    -
    -
    {{localize "Ex3.PoolNumbers"}}
    - -
    -
    -
    {{localize "Ex3.NPCType"}}
    - -
    -
    - {{/ifEquals}} -
    - -
    -
    -
    -
    {{localize "Ex3.Exalt"}}
    - -
    - {{#if data.availableCastes}} -
    -
    {{localize "Ex3.Caste"}}/{{localize "Ex3.Aspect"}}
    - -
    - {{/if}} -
    - - -
    -
    - {{#ifEquals data.characterType 'npc'}} -
    - -
    -
    - {{#each data.character.skills as |skill key|}} -
    -
    {{localize skill.label}}
    - -
    - {{/each}} -
    -
    - -
    -
    -
    -
    {{localize "Ex3.Sorcerer"}}
    - -
    -
    -
    {{localize "Ex3.SizeCategory"}}
    - -
    - {{#each data.character.numberTraits as |trait key|}} -
    - - -
    - {{/each}} -
    -
    {{localize "Ex3.Battlegroup"}}
    - -
    - {{#each data.character.traits as |trait key|}} -
    -
    {{localize trait.label}}
    - -
    - {{/each}} -
    - {{#if data.character.battlegroup}} -
    - -
    -
    -
    - -
    -
    -
    - - -
    -
    - - -
    -
    - {{/if}} - - {{/ifEquals}} -
    - -
    -
    -
    -
    {{localize "Ex3.Type"}}
    - -
    -
    -
    {{localize "Ex3.Type"}}
    - -
    -
    -
    {{localize "Ex3.Weight"}}
    - -
    -
    -
    {{localize "Ex3.Artifact"}}
    - -
    -
    -
    - -
    -
    -
    -
    {{localize "Ex3.Type"}}
    - -
    -
    -
    {{localize "Ex3.WeaponType"}}
    - -
    -
    -
    {{localize "Ex3.Weight"}}
    - -
    -
    -
    {{localize "Ex3.Artifact"}}
    - -
    -
    -
    - -
    -
    -
    -
    {{localize "Ex3.Type"}}
    - -
    -
    -
    {{localize "Ex3.Weight"}}
    - -
    -
    -
    {{localize "Ex3.Artifact"}}
    - -
    -
    +
    \ No newline at end of file diff --git a/templates/item/item-merit-sheet.html b/templates/item/item-merit-sheet.html index 890d69e0..516aaf48 100644 --- a/templates/item/item-merit-sheet.html +++ b/templates/item/item-merit-sheet.html @@ -29,7 +29,7 @@

    -
    +
    {{localize "Ex3.Type"}}
    +
    +
    {{localize "Ex3.AutoAddToRolls"}}
    + +
    {{#ifEquals system.merittype 'sorcery'}}
    diff --git a/templates/item/item-specialability-sheet.html b/templates/item/item-specialability-sheet.html index 0287b7ac..792b3c0a 100644 --- a/templates/item/item-specialability-sheet.html +++ b/templates/item/item-specialability-sheet.html @@ -35,6 +35,12 @@

    +
    +
    {{localize "Ex3.AutoAddToRolls"}}
    + +
    {{> systems/exaltedthird/templates/actor/active-effects.html}}
    diff --git a/templates/item/item-spell-sheet.html b/templates/item/item-spell-sheet.html index a82da3aa..afbd19b3 100644 --- a/templates/item/item-spell-sheet.html +++ b/templates/item/item-spell-sheet.html @@ -53,7 +53,7 @@

    {{localize "Ex3.Summary"}}

    -
    +
    @@ -66,6 +66,12 @@

    +
    +
    {{localize "Ex3.AutoAddToRolls"}}
    + +
    {{> systems/exaltedthird/templates/actor/active-effects.html}}