diff --git a/public/debug.js b/public/debug.js index 9269e0e..6eed83f 100644 --- a/public/debug.js +++ b/public/debug.js @@ -47,6 +47,22 @@ function debugEffectFunction(damageAmount = null, targetId = null, targetId2 = n console.log(targetId+' Flight: '+flight[targetId]); } + if(effect == 'reach'){ + console.log(targetId+' Reach: '+reach[targetId]); + + console.log(effectAddRemove); + + if(effectAddRemove == 'remove'){ + removeReach(targetId); + }else{ + giveReach(targetId); + } + + console.log(targetId+' Reach: '+reach[targetId]); + } + if(effect == 'draw'){ + drawCard(damageAmount, targetPlayer); + } if(effect == 'equip'){} } diff --git a/public/effect.js b/public/effect.js index 44b6b85..60062d0 100644 --- a/public/effect.js +++ b/public/effect.js @@ -16,6 +16,16 @@ function removeFlight(card){ } return false; } +function giveReach(card){ + reach[card] = true; +} +function removeReach(card){ + if(card in reach){ + delete reach[card]; + return true; + } + return false; +} // Active function equip(){ @@ -27,6 +37,10 @@ function unequip(){ } +function drawCard(drawAmount, player){ + board.drawACard(player, drawAmount); +} + function heal(healAmount, healPlayer){ // For each heal 1..4 for(let i = 0; i < healAmount; i++){ diff --git a/public/index.html b/public/index.html index 509d2e7..d0d3f57 100644 --- a/public/index.html +++ b/public/index.html @@ -75,9 +75,11 @@