Add draw/reach to effect/debug

develop
Nathan Steel 1 year ago
parent 916c0f2dcb
commit 87e91d4a6d

@ -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'){}
}

@ -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++){

@ -75,9 +75,11 @@
<select name="effect" id="effect">
<option value="hurt">Hurt</option>
<option value="heal">Heal</option>
<option value="draw">Draw</option>
<option value="">-- Add/Remove --</option>
<option value="flight">Flight</option>
<option value="reach">Reach</option>
<option value="equipCard">Equip</option>
<option value="unequipCard">unEquip</option>

Loading…
Cancel
Save