Skip to content

Commit

Permalink
fix: fix toggling active abilities when passive ability is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosDj21 committed Oct 26, 2024
1 parent 6c712f8 commit ad34bb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ export class UI {
return i;
}

//If creature has no more available abilities to choose from, return -1
//Check if creature has at least one more ability to choose from
let creatureHaveAtleastOneAvailableAbility = false;
for(let y = i; y < 4; y++){
if(creature.abilities[y].require()){
Expand All @@ -768,6 +768,7 @@ export class UI {
}
}

//If creature has no more available abilities to choose from, return -1
if(!creatureHaveAtleastOneAvailableAbility){
game.activeCreature.queryMove();
this.selectAbility(-1);
Expand Down

0 comments on commit ad34bb7

Please sign in to comment.