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 https://github.com/FreezingMoon/AncientBeast/issues/2494 #2508

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
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
54 changes: 27 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/abilities/Chimera.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default (G) => {
},
team: this._targetTeam,
id: chimera.id,
flipped: chimera.flipped,
flipped: chimera.player.flipped,
hexes: G.grid.getHexMap(chimera.x - 3, chimera.y - 2, 0, false, matrices.frontnback3hex),
});
},
Expand Down
4 changes: 2 additions & 2 deletions src/abilities/Golden-Wyrm.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default (G) => {
},
team: this._targetTeam,
id: wyrm.id,
flipped: wyrm.flipped,
flipped: wyrm.player.flipped,
hexes: this._getHexes(),
});
},
Expand Down Expand Up @@ -348,7 +348,7 @@ export default (G) => {
optTest: this._confirmTarget,
team: this._targetTeam,
id: wyrm.id,
flipped: wyrm.flipped,
flipped: wyrm.player.flipped,
hexes: this._getHexes(),
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/abilities/Headless.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default (G) => {
},
team: this._targetTeam,
id: crea.id,
flipped: crea.flipped,
flipped: crea.player.flipped,
hexes: crea.getHexMap(matrices.frontnback2hex),
});
},
Expand Down
7 changes: 3 additions & 4 deletions src/abilities/Impaler.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,13 @@ export default (G) => {
query: function () {
const ability = this;
const creature = this.creature;

G.grid.queryCreature({
fnOnConfirm: function () {
ability.animation(...arguments);
},
team: this._targetTeam,
id: creature.id,
flipped: creature.flipped,
flipped: creature.player.flipped,
hexes: this._getHexes(),
});
},
Expand Down Expand Up @@ -168,7 +167,7 @@ export default (G) => {
},
team: this._targetTeam,
id: creature.id,
flipped: creature.flipped,
flipped: creature.player.flipped,
hexes: this._getHexes(),
});
},
Expand Down Expand Up @@ -288,7 +287,7 @@ export default (G) => {
},
team: this._targetTeam,
id: this.creature.id,
flipped: this.creature.flipped,
flipped: this.creature.player.flipped,
hexes: this._getHexes(),
});
},
Expand Down
4 changes: 2 additions & 2 deletions src/abilities/Infernal.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default (G) => {
},
team: this._targetTeam,
id: magmaSpawn.id,
flipped: magmaSpawn.flipped,
flipped: magmaSpawn.player.flipped,
hexes: this.creature.getHexMap(matrices.frontnback3hex),
});
},
Expand Down Expand Up @@ -202,7 +202,7 @@ export default (G) => {
team: Team.Both,
requireCreature: 0,
id: magmaSpawn.id,
flipped: magmaSpawn.flipped,
flipped: magmaSpawn.player.flipped,
choices: [magmaSpawn.getHexMap(this.map), magmaSpawn.getHexMap(this.map, true)],
});
},
Expand Down
4 changes: 2 additions & 2 deletions src/abilities/Knightmare.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default (G) => {
},
team: this._targetTeam,
id: this.creature.id,
flipped: this.creature.flipped,
flipped: this.creature.player.flipped,
hexes: this.creature.getHexMap(matrices.frontnback2hex),
});
},
Expand Down Expand Up @@ -170,7 +170,7 @@ export default (G) => {
},
team: this._targetTeam,
id: this.creature.id,
flipped: this.creature.flipped,
flipped: this.creature.player.flipped,
hexes: this.creature.getHexMap(matrices.frontnback2hex),
});
},
Expand Down
5 changes: 3 additions & 2 deletions src/abilities/Nutcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default (G) => {
},
team: this._targetTeam,
id: this.creature.id,
flipped: this.creature.flipped,
flipped: this.creature.player.flipped,
hexes: this.creature.getHexMap(matrices.frontnback2hex),
});
} else {
Expand Down Expand Up @@ -580,13 +580,14 @@ export default (G) => {
},
team: this._targetTeam,
id: this.creature.id,
flipped: this.creature.flipped,
flipped: this.creature.player.flipped,
hexes: this.creature.getHexMap(matrices.inlinefrontnback2hex),
optTest: function (creature) {
// Size restriction of 2 if unupgraded
return ability.isUpgraded() ? true : creature.size <= 2;
},
});

},

// activate() :
Expand Down
6 changes: 3 additions & 3 deletions src/abilities/Scavenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default (G) => {
},
team: this._targetTeam,
id: this.creature.id,
flipped: this.creature.flipped,
flipped: this.creature.player.flipped,
hexes: this.creature.getHexMap(matrices.frontnback2hex),
});
},
Expand Down Expand Up @@ -229,7 +229,7 @@ export default (G) => {
team: this._targetTeam,
id: [crea.id, trg.id],
size: size,
flipped: crea.player.flipped,
flipped: crea.player.player.flipped,
hexes: G.grid
.getFlyingRange(x, crea.y, distance, size, [crea.id, trg.id])
.filter(function (item) {
Expand Down Expand Up @@ -336,7 +336,7 @@ export default (G) => {
},
team: this._targetTeam,
id: this.creature.id,
flipped: this.creature.flipped,
flipped: this.creature.player.flipped,
hexes: this.creature.getHexMap(matrices.frontnback2hex),
});
},
Expand Down
4 changes: 2 additions & 2 deletions src/abilities/Stomper.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export default (G) => {
team: Team.Both,
requireCreature: 0,
id: stomper.id,
flipped: stomper.flipped,
flipped: stomper.player.flipped,
choices: [targets, targets2], // Target the front or back row
hexesDashed: dashed,
});
Expand Down Expand Up @@ -490,7 +490,7 @@ export default (G) => {
team: Team.Both,
requireCreature: 0,
id: stomper.id,
flipped: stomper.flipped,
flipped: stomper.player.flipped,
choices: [stomper.getHexMap(this.map), stomper.getHexMap(this.map, true)],
});
},
Expand Down
4 changes: 2 additions & 2 deletions src/abilities/Uncle-Fungus.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default (G) => {
},
team: this._targetTeam,
id: uncle.id,
flipped: uncle.flipped,
flipped: uncle.player.flipped,
hexes: uncle.getHexMap(matrices.frontnback2hex),
});
},
Expand Down Expand Up @@ -369,7 +369,7 @@ export default (G) => {
},
team: this._targetTeam,
id: uncle.id,
flipped: uncle.flipped,
flipped: uncle.player.flipped,
hexes: G.grid.getHexMap(uncle.x - 2, uncle.y - 2, 0, false, matrices.frontnback2hex),
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/abilities/Vehemoth.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export default (G) => {
},
team: this._targetTeam,
id: vehemoth.id,
flipped: vehemoth.flipped,
flipped: vehemoth.player.flipped,
hexes: this._getHexes(),
});
},
Expand Down
1 change: 1 addition & 0 deletions src/creature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ export class Creature {
}, // Optional args
size: this.size,
flipped: this.player.flipped,

id: this.id,
hexes: o.range,
ownCreatureHexShade: o.ownCreatureHexShade,
Expand Down