Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue #2422 #2495

Merged
merged 2 commits into from
Oct 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 { 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 @@ -107,7 +108,7 @@
},

query() {
const ability = this;

Check warning on line 111 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 111 in src/abilities/Abolished.js

View workflow job for this annotation

GitHub Actions / test

Unexpected aliasing of 'this' to local variable
const abolished = this.creature;

// TODO: Visually show reduced damage hexes for 4-6 range
Expand All @@ -129,8 +130,13 @@
},

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 Expand Up @@ -209,7 +215,7 @@
return this.testRequirements();
},
query() {
const ability = this;

Check warning on line 218 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 218 in src/abilities/Abolished.js

View workflow job for this annotation

GitHub Actions / test

Unexpected aliasing of 'this' to local variable
const crea = this.creature;

// Relocates to any hex within range except for the current hex
Expand All @@ -229,7 +235,7 @@
});
},
activate(hex) {
const ability = this;

Check warning on line 238 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 238 in src/abilities/Abolished.js

View workflow job for this annotation

GitHub Actions / test

Unexpected aliasing of 'this' to local variable
ability.end();

if (this.isUpgraded()) {
Expand Down Expand Up @@ -312,7 +318,7 @@
return this.testRequirements();
},
query() {
const ability = this;

Check warning on line 321 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 321 in src/abilities/Abolished.js

View workflow job for this annotation

GitHub Actions / test

Unexpected aliasing of 'this' to local variable
const crea = this.creature;

// var inRangeCreatures = crea.hexagons[1].adjacentHex(1);
Expand All @@ -337,7 +343,7 @@
});
},
activate() {
const ability = this;

Check warning on line 346 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 346 in src/abilities/Abolished.js

View workflow job for this annotation

GitHub Actions / test

Unexpected aliasing of 'this' to local variable
ability.end();

const crea = this.creature;
Expand Down
Loading