Skip to content

Commit

Permalink
6.1.1 - basic V12 compatibility, other fixes
Browse files Browse the repository at this point in the history
close #254
  • Loading branch information
moo-man committed May 28, 2024
1 parent 5add697 commit ada2823
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions scripts/model/actor/components/combat.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class StandardCombatModel extends foundry.abstract.DataModel
}

addArmour(item) {
if (item.system.subtype === "shield") {
if (item.system.type === "shield") {
// Like below treat shield benefit as an step increase
this.defence.total += (parseInt(item.system.benefit) * 2);
} else {
Expand Down Expand Up @@ -202,7 +202,7 @@ export class StandardCombatModel extends foundry.abstract.DataModel
* creates and adds a wound based on how far the actors health has gone below zero
* @param {int} remaining
*/
async computeNewWound(remaining) {
computeNewWound(remaining) {

if (remaining >= 0)
return
Expand Down
5 changes: 1 addition & 4 deletions scripts/model/actor/standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ export class StandardActorModel extends BaseActorModel

computeBase()
{
if (game.ready)
{
this.doom = game.counter.doom // Add doom to actor data so it can be used with effects
}
this.doom = game.counter?.doom || 0
super.computeBase();
this.combat.computeWounds();
}
Expand Down
6 changes: 6 additions & 0 deletions scripts/system/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ export default function registerHooks() {
a._initialize();
}
})


if (game.release.generation == 12)
{
ui.notifications.warn("Please note that the <strong>Soulbound</strong> system has not been made fully compatible with V12 and issues may occur.")
}
})

/**
Expand Down
6 changes: 3 additions & 3 deletions scripts/system/tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Test {
async rollTest() {
this.roll = this.testData.roll ? Roll.fromData(this.testData.roll) : new Roll(`${this.numberOfDice}d6cs>=${this.testData.dn.difficulty}`);
this.testData.roll = this.roll.toJSON()
await this.roll.evaluate({async:true})
await this.roll.evaluate()
this.roll.dice[0].results.forEach((result, i) => {
result.index = i;
})
Expand Down Expand Up @@ -182,7 +182,7 @@ export default class Test {
user: game.user.id,
type: CONST.CHAT_MESSAGE_TYPES.ROLL,
speaker : this.context.speaker,
roll: this.roll,
rolls: [this.roll],
rollMode: game.settings.get("core", "rollMode"),
content: html,
flags: {
Expand All @@ -199,7 +199,7 @@ export default class Test {
if (this.message && !newMessage)
{
// Updating with a roll object causes validation error
delete chatData.roll
delete chatData.rolls
this.message.update(chatData)
}
else
Expand Down
2 changes: 1 addition & 1 deletion static/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@
"WOUND.DEADLY": "Deadly Wound",

"ERROR.ID": "ID for {name} already exists in collection. This Document has been given a unique ID.",
"ERROR.NoArchetypeItem": "No Archetype Item found.",
"ERROR.NoArchetypeItem": "No Archetype Item found on this Actor. Add an Archetype Item to fill in this field.",
"ERROR.NotEnoughFocus": "Not enough Focus!",
"ERROR.NotEnoughMettle": "Not enough Mettle!",
"ERROR.NotEnoughSuccesses": "Not Enough Successes to Overcast",
Expand Down
4 changes: 2 additions & 2 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "age-of-sigmar-soulbound",
"title": "Warhammer Age of Sigmar: Soulbound",
"description": "The first ever tabletop roleplaying game set in <b>Warhammer Age of Sigmar</b>. Take on the role of the Soulbound, explore and roleplay in the Mortal Realms, filled with gods, monsters, daemons, and demigods, and shape its future. ",
"version": "6.1.0",
"version": "6.1.1",
"minimumCoreVersion" : 11,
"compatibility" : {
"minimum" : 11,
Expand Down Expand Up @@ -57,6 +57,6 @@
"url": "https://github.com/moo-man/AoS-Soulbound-FoundryVTT",
"socket": true,
"manifest": "https://github.com/moo-man/AoS-Soulbound-FoundryVTT/releases/latest/download/system.json",
"download": "https://github.com/moo-man/AoS-Soulbound-FoundryVTT/releases/download/6.1.0/age-of-sigmar-soulbound.zip",
"download": "https://github.com/moo-man/AoS-Soulbound-FoundryVTT/releases/download/6.1.1/age-of-sigmar-soulbound.zip",
"license": "LICENSE.txt"
}

0 comments on commit ada2823

Please sign in to comment.