Skip to content

Commit

Permalink
Added a third skill use check for Abolished
Browse files Browse the repository at this point in the history
At the end of the turn check if Abolished has used his third skill, if not and the skill has been upgraded he gains extra movement distance.
  • Loading branch information
Luffy117 authored Dec 10, 2024
1 parent fc09214 commit 530d4b1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,7 @@ export default class Game {
onStartPhase(/* creature, callback */) {
const creature = arguments[0],
totalTraps = this.traps.length;
if (creature.abilities.some(ability => ability.title === 'Bonfire Spring')) {
creature.accumulatedTeleportRange += 1;
}

let trap: Trap;

for (let i = 0; i < totalTraps; i++) {
Expand Down Expand Up @@ -1295,6 +1293,10 @@ export default class Game {
// Removed individual args from definition because we are using the arguments variable.
onEndPhase(/* creature, callback */) {
const creature = arguments[0];
// Check if Abolished used third ability
if (creature.abilities.some(ability => ability.title === 'Bonfire Spring')) {
creature.accumulatedTeleportRange += 1;
}

this.triggerDeleteEffect('onEndPhase', creature);
this.triggerAbility('onEndPhase', arguments);
Expand Down

0 comments on commit 530d4b1

Please sign in to comment.