Skip to content

Commit

Permalink
fix(bounty-hunter): Fixed the bounty hunter's ability to only trigger…
Browse files Browse the repository at this point in the history
… when enemy in range
  • Loading branch information
JoelFernandes09 committed Aug 6, 2023
1 parent ba65fa3 commit d3f0473
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/abilities/Bounty-Hunter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export default (G: Game) => {
trigger: 'onStartPhase',

require: function () {
// The ability is always active, but the bonuses are 0 and the name becomes "No One In Personal Space" if no one is next to BH
if (!this.testRequirements()) {
// Ability will only be triggered if enemy is in range rather
if (!this.atLeastOneTarget(this.creature.adjacentHexes(1), { team: Team.Enemy })) {
return false;
}

Expand All @@ -51,16 +51,6 @@ export default (G: Game) => {
obuff: 0,
abilityName: '',

getAbilityName: function () {
if (!this.atLeastOneTarget(this.creature.adjacentHexes(1), { team: Team.Enemy })) {
this.abilityName = 'No One In Personal Space';
return this.abilityName;
} else {
this.abilityName = 'Enemy In Personal Space!';
return this.abilityName;
}
},

getMovementBuff: function () {
// Decides how much the base value is modified by the buff, 50% if not upgraded and 100% if upgraded
if (!this.atLeastOneTarget(this.creature.adjacentHexes(1), { team: Team.Enemy })) {
Expand Down Expand Up @@ -93,7 +83,7 @@ export default (G: Game) => {
if (true) {
this.creature.replaceEffect(
new Effect(
this.getAbilityName(this.abilityName), // Ability name
'Enemy In Personal Space!', // Ability name
this.creature, // Caster
this.creature, // Target
'', // Trigger
Expand Down

0 comments on commit d3f0473

Please sign in to comment.