Skip to content

Commit

Permalink
Added cancel cursor when hovering empty hex
Browse files Browse the repository at this point in the history
  • Loading branch information
xTammaro committed Oct 16, 2023
1 parent ffae277 commit ac80f16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/abilities/Stomper.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default (G) => {
const stomper = this.creature;
const ability = this;

// Take the closest ennemy in each direction within 3hex
// Take the closest enemy in each direction within 3hex
if (!this.isUpgraded()) {
G.grid.queryDirection({
fnOnConfirm: function () {
Expand All @@ -118,7 +118,7 @@ export default (G) => {
sourceCreature: stomper,
dashedHexesUnderCreature: true,
});
} // Once upgraded, can hit any ennemy within 3hex in any direction
} // Once upgraded, can hit any enemy within 3hex in any direction
else {
G.grid.queryDirection({
fnOnConfirm: function () {
Expand Down Expand Up @@ -147,8 +147,6 @@ export default (G) => {
dashedHexesUnderCreature: true,
fillOnlyHoveredCreature: true,
});
G.h

}
},

Expand Down
4 changes: 4 additions & 0 deletions src/utility/hexgrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,10 @@ export class HexGrid {


if (hex.reachable) {

if (o.fillOnlyHoveredCreature && !(hex instanceof Creature)) {
$j('canvas').css('cursor', 'not-allowed');
}

if (o.fillHexOnHover) {
this.cleanHex(hex);
Expand Down

0 comments on commit ac80f16

Please sign in to comment.