Erwan
- Fix a bug when a token would be removed from game while being an attacker or a blocker. Potentially fix issue 42
This commit is contained in:
@@ -95,6 +95,7 @@ deja_vu.txt
|
|||||||
dingus_egg.txt
|
dingus_egg.txt
|
||||||
doomed_necromancer.txt
|
doomed_necromancer.txt
|
||||||
dragon_fodder.txt
|
dragon_fodder.txt
|
||||||
|
dragon_fodder2.txt
|
||||||
drain_life.txt
|
drain_life.txt
|
||||||
drift_of_the_dead.txt
|
drift_of_the_dead.txt
|
||||||
dross_harvester.txt
|
dross_harvester.txt
|
||||||
@@ -205,6 +206,7 @@ siege_gang_commander.txt
|
|||||||
shepherd_of_rot.txt
|
shepherd_of_rot.txt
|
||||||
shivan_hellkite.txt
|
shivan_hellkite.txt
|
||||||
shock.txt
|
shock.txt
|
||||||
|
shock2.txt
|
||||||
slate_of_ancestry.txt
|
slate_of_ancestry.txt
|
||||||
sleeper_agent.txt
|
sleeper_agent.txt
|
||||||
soulblast.txt
|
soulblast.txt
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#Testing Tokens
|
||||||
|
# Dragon Fodder (ALA) 174936
|
||||||
|
# text=Put two 1/1 red Goblin creature tokens into play.
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
hand:174936
|
||||||
|
manapool:{R}{1}
|
||||||
|
[PLAYER2]
|
||||||
|
inplay:mountain
|
||||||
|
hand:shock
|
||||||
|
[DO]
|
||||||
|
174936
|
||||||
|
eot
|
||||||
|
eot
|
||||||
|
next
|
||||||
|
#upkeep
|
||||||
|
next
|
||||||
|
#draw
|
||||||
|
next
|
||||||
|
#main
|
||||||
|
next
|
||||||
|
#begin
|
||||||
|
next
|
||||||
|
#attackers
|
||||||
|
-174936
|
||||||
|
next
|
||||||
|
#blockers
|
||||||
|
mountain
|
||||||
|
shock
|
||||||
|
-174936
|
||||||
|
next
|
||||||
|
#end
|
||||||
|
[ASSERT]
|
||||||
|
COMBATEND
|
||||||
|
[PLAYER1]
|
||||||
|
graveyard:174936
|
||||||
|
inplay:-174936
|
||||||
|
[PLAYER2]
|
||||||
|
graveyard:shock
|
||||||
|
inplay:mountain
|
||||||
|
life:20
|
||||||
|
[END]
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#Testing Combat Damage
|
||||||
|
[INIT]
|
||||||
|
COMBATATTACKERS
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:grizzly bears
|
||||||
|
[PLAYER2]
|
||||||
|
inplay:mountain
|
||||||
|
hand:shock
|
||||||
|
[DO]
|
||||||
|
grizzly bears
|
||||||
|
next
|
||||||
|
#blockers
|
||||||
|
mountain
|
||||||
|
shock
|
||||||
|
grizzly bears
|
||||||
|
next
|
||||||
|
#end
|
||||||
|
[ASSERT]
|
||||||
|
COMBATEND
|
||||||
|
[PLAYER1]
|
||||||
|
graveyard:grizzly bears
|
||||||
|
[PLAYER2]
|
||||||
|
graveyard:shock
|
||||||
|
inplay:mountain
|
||||||
|
life:20
|
||||||
|
[END]
|
||||||
@@ -373,7 +373,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
|
|||||||
if (go->players[0]->game->inPlay == event->from || go->players[1]->game->inPlay == event->from)
|
if (go->players[0]->game->inPlay == event->from || go->players[1]->game->inPlay == event->from)
|
||||||
{
|
{
|
||||||
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
||||||
if ((*it)->card == event->card->previous)
|
if ((*it)->card == event->card->previous || (*it)->card == event->card )
|
||||||
{
|
{
|
||||||
AttackerDamaged* d = *it;
|
AttackerDamaged* d = *it;
|
||||||
if (activeAtk == *it) activeAtk = NULL;
|
if (activeAtk == *it) activeAtk = NULL;
|
||||||
@@ -383,7 +383,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (vector<DefenserDamaged*>::iterator q = (*it)->blockers.begin(); q != (*it)->blockers.end(); ++q)
|
for (vector<DefenserDamaged*>::iterator q = (*it)->blockers.begin(); q != (*it)->blockers.end(); ++q)
|
||||||
if ((*q)->card == event->card->previous)
|
if ((*q)->card == event->card->previous || (*q)->card == event->card)
|
||||||
{
|
{
|
||||||
DefenserDamaged* d = *q;
|
DefenserDamaged* d = *q;
|
||||||
(*it)->blockers.erase(q);
|
(*it)->blockers.erase(q);
|
||||||
|
|||||||
Reference in New Issue
Block a user