diff --git a/src/abilities/Gumble.ts b/src/abilities/Gumble.ts index 0d364cd12..fea58d0ff 100644 --- a/src/abilities/Gumble.ts +++ b/src/abilities/Gumble.ts @@ -17,11 +17,20 @@ export default (G: Game) => { G.abilities[14] = [ // First Ability: Gooey Body { - // Trigger when Gumble dies + /** + * When upgraded, allows Gumble to leap over units during movement phase + * (flying movement type). + */ + movementType: function () { + return this.isUpgraded() ? 'flying' : 'normal'; + }, + + // Trigger when Gumble dies (only when not upgraded) trigger: 'onCreatureDeath', require: function () { - return true; + // Only trigger on death when NOT upgraded (upgraded version provides leap ability instead) + return !this.isUpgraded(); }, activate: function (deadCreature: Creature) { @@ -39,20 +48,10 @@ export default (G: Game) => { deathHex, 'onStepIn', { - // Check if creature should be affected by the goo + // Always affect all units (allies and enemies) requireFn: function () { const creatureOnGoo = this.trap.hex.creature; - if (!creatureOnGoo) { - return false; - } - - // If upgraded, don't affect allied units - if (ability.isUpgraded()) { - return creatureOnGoo.player !== ability.creature.player; - } - - // Otherwise affect all units - return true; + return !!creatureOnGoo; }, effectFn: function (_, creature: Creature) { // Pin the creature in place for the current round diff --git a/src/utility/hex.ts b/src/utility/hex.ts index 1e3d3bd29..379e7d385 100644 --- a/src/utility/hex.ts +++ b/src/utility/hex.ts @@ -581,6 +581,10 @@ export class Hex { this.grid.displayHexesGroup.bringToTop(this.display); } else { this.display.loadTexture('hex_dashed'); + // When showGrid is active on empty hexes, show dashed at 25% opacity + if (this.displayClasses.match(/showGrid/g)) { + this.display.alpha = 0.25; + } } } else if (this.displayClasses.match(/deadzone/)) { this.display.loadTexture('hex_deadzone'); diff --git a/src/utility/hexgrid.ts b/src/utility/hexgrid.ts index 6dde46c9d..ed50de1e8 100644 --- a/src/utility/hexgrid.ts +++ b/src/utility/hexgrid.ts @@ -1456,18 +1456,19 @@ export class HexGrid { showGrid(val) { this.forEachHex((hex) => { - if (hex.creature) { - hex.creature.xray(val); - } - if (hex.drop) { return; } if (val) { hex.displayVisualState('showGrid'); + // Show dashed grid (not x-ray) for empty hexes so coordinates are visible on top of units + if (!hex.creature) { + hex.displayVisualState('dashed'); + } } else { hex.cleanDisplayVisualState('showGrid'); + hex.cleanDisplayVisualState('dashed'); } }); }