Skip to content

Commit

Permalink
fix: make the escort ability query function to align with the require…
Browse files Browse the repository at this point in the history
… function
  • Loading branch information
nohaibogdan1 committed Aug 24, 2024
1 parent da0598c commit f43a38b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/abilities/Scavenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default (G) => {
return false;
}

if (crea.remainingMove < trg.size) {
if (crea.remainingMove < trg.size + crea.size) {
// Unit too tired
this.message = 'Not enough movement points.';
return false;
Expand All @@ -181,7 +181,7 @@ export default (G) => {
const hexes = crea.getHexMap(matrices.inlinefrontnback2hex);
const trg = hexes[0].creature || hexes[1].creature;

const distance = Math.floor(crea.remainingMove / trg.size);
const distance = crea.remainingMove;
const size = crea.size + trg.size;

const trgIsInfront =
Expand Down

0 comments on commit f43a38b

Please sign in to comment.