diff --git a/data/fh/challenges.json b/data/fh/challenges.json index 5b5640c21..665cb49b1 100644 --- a/data/fh/challenges.json +++ b/data/fh/challenges.json @@ -19,7 +19,8 @@ }, { "cardId": 1487, - "automation": "fully" + "automation": "fully", + "implemented": true }, { "cardId": 1488, diff --git a/package-lock.json b/package-lock.json index 615bc90ff..e02fe7ce2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gloomhavensecretariat", - "version": "0.101.0", + "version": "0.101.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gloomhavensecretariat", - "version": "0.101.0", + "version": "0.101.1", "license": "AGPL3", "dependencies": { "@angular/animations": "^18.2.8", diff --git a/package.json b/package.json index 946c57254..40a556a37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gloomhavensecretariat", - "version": "0.101.0", + "version": "0.101.1", "license": "AGPL3", "description": "Gloomhaven Secretariat is a Gloomhaven/Frosthaven Companion app.", "homepage": "https://gloomhaven-secretariat.de", diff --git a/src/app/game/businesslogic/ChallengesManager.ts b/src/app/game/businesslogic/ChallengesManager.ts index 497ff87c5..b6d9d6eab 100644 --- a/src/app/game/businesslogic/ChallengesManager.ts +++ b/src/app/game/businesslogic/ChallengesManager.ts @@ -10,6 +10,7 @@ export class ChallengesManager { game: Game; available: boolean = false; + enabled: boolean = false; constructor(game: Game) { this.game = game; @@ -78,7 +79,8 @@ export class ChallengesManager { } update() { - this.available = settingsManager.settings.fhChallenges && gameManager.fhRules() && this.game.party.buildings.find((buildingModel) => buildingModel.name == 'town-hall' && buildingModel.level && buildingModel.state != 'wrecked') != undefined + this.available = gameManager.fhRules() && this.game.party.buildings.find((buildingModel) => buildingModel.name == 'town-hall' && buildingModel.level && buildingModel.state != 'wrecked') != undefined; + this.enabled = settingsManager.settings.fhChallenges && this.available; if (this.available && this.game.edition) { // build challenge deck if not present diff --git a/src/app/game/businesslogic/EntityManager.ts b/src/app/game/businesslogic/EntityManager.ts index f51d06edb..aacc18a54 100644 --- a/src/app/game/businesslogic/EntityManager.ts +++ b/src/app/game/businesslogic/EntityManager.ts @@ -381,7 +381,7 @@ export class EntityManager { entityCondition.highlight = false; // apply Challenge #1487 - if (gameManager.challengesManager.available && gameManager.challengesManager.isActive(1487, 'fh') && entityCondition.types.indexOf(ConditionType.negative) && entityCondition.name != ConditionName.wound && entity instanceof Character && !this.isImmune(entity, entity, ConditionName.wound)) { + if (gameManager.challengesManager.enabled && gameManager.challengesManager.isActive(1487, 'fh') && entityCondition.types.indexOf(ConditionType.negative) && entityCondition.name != ConditionName.wound && entity instanceof Character && !this.isImmune(entity, entity, ConditionName.wound)) { this.addCondition(entity, new Condition(ConditionName.wound), active, off); } diff --git a/src/app/game/model/data/Challenges.ts b/src/app/game/model/data/Challenges.ts index e6895e546..7a7d51be9 100644 --- a/src/app/game/model/data/Challenges.ts +++ b/src/app/game/model/data/Challenges.ts @@ -7,6 +7,7 @@ export class ChallengeCard implements Editional { cardId: number = 0; edition: string = ""; automation: "fully" | "partial" | undefined; + implemented: boolean = false; } diff --git a/src/app/ui/figures/challenges/challenge-card.html b/src/app/ui/figures/challenges/challenge-card.html index 9933f0d1d..d9760bf0a 100644 --- a/src/app/ui/figures/challenges/challenge-card.html +++ b/src/app/ui/figures/challenges/challenge-card.html @@ -18,6 +18,9 @@