Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/combat/js/hex.js b/combat/js/hex.js
- index 21f41c4..a9db9c8 100755
- --- a/combat/js/hex.js
- +++ b/combat/js/hex.js
- @@ -715,8 +715,16 @@ var HexGrid = Class.create({
- fnOnClick(G.grid.hexs[y][x],args);
- });
- - //ON CANCEL
- - this.$allInptHex.filter(".hex.not-reachable").bind('click', function(){ G.grid.lastClickedtHex = []; fnOnCancel(args); });
- + //ON CANCEL if creature clicked post it in log
- + this.$allInptHex.filter(".hex.not-reachable").bind('click', function(){ G.grid.lastClickedtHex = []; fnOnCancel(args);
- + var x = $j(this).attr("x")-0;
- + var y = $j(this).attr("y")-0;
- + for (var i = 1; i <= G.creatures.length; i++) {
- + if (G.creatures[i].pos.x == x && G.creatures[i].pos.y == y) {
- + G.log("Clicked: " + G.creatures[i].name + " " + G.creatures[i].type);
- + }
- + }
- + });
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement