Skip to content

Commit

Permalink
Merge pull request #2495 from allmtz/abilities
Browse files Browse the repository at this point in the history
Fixes #2422
  • Loading branch information
DreadKnight authored Oct 1, 2023
2 parents 259f513 + 71a114d commit 86e89d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/abilities/Abolished.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Team } from '../utility/team';
import { Creature } from '../creature';
import { Effect } from '../effect';
import * as arrayUtils from '../utility/arrayUtils';
import { getPointFacade } from '../utility/pointfacade';

/** Creates the abilities
* @param {Object} G the game object
Expand Down Expand Up @@ -130,7 +131,12 @@ export default (G) => {

activate(path, args) {
const ability = this;

Check warning on line 133 in src/abilities/Abolished.js

View workflow job for this annotation

GitHub Actions / test

Unexpected aliasing of 'this' to local variable

Check warning on line 133 in src/abilities/Abolished.js

View workflow job for this annotation

GitHub Actions / test

Unexpected aliasing of 'this' to local variable
const target = arrayUtils.last(path).creature;
const hexWithTarget = path.find((hex) => {
const creature = getPointFacade().getCreaturesAt({ x: hex.x, y: hex.y })[0];
return creature && creature != this.creature;
});

const target = getPointFacade().getCreaturesAt(hexWithTarget.x, hexWithTarget.y)[0];

ability.end();
G.Phaser.camera.shake(0.01, 100, true, G.Phaser.camera.SHAKE_HORIZONTAL, true);
Expand Down

1 comment on commit 86e89d5

@vercel
Copy link

@vercel vercel bot commented on 86e89d5 Oct 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.