diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 524cd3bf0..1fc3a8966 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -49,6 +49,7 @@ force_of_nature2.txt force_of_nature3.txt ghost_warden.txt giant_growth.txt +giant_growth2.txt goblin_balloon_brigade.txt goblin_balloon_brigade2.txt goblin_king.txt diff --git a/projects/mtg/bin/Res/test/giant_growth2.txt b/projects/mtg/bin/Res/test/giant_growth2.txt new file mode 100644 index 000000000..eba6c2d90 --- /dev/null +++ b/projects/mtg/bin/Res/test/giant_growth2.txt @@ -0,0 +1,29 @@ +#Testing GiantGrowth (ICE) +[INIT] +COMBATATTACKERS +[PLAYER1] +hand:2570 +inplay:1250 +manapool:{G} +[PLAYER2] +life:20 +[DO] +2570 +1250 +1250 +next +#blockers +next +#combatdamage 2 +next +#endofcombat 2 +[ASSERT] +COMBATEND +[PLAYER1] +inplay:1250 +graveyard:2570 +manapool:{0} +life:20 +[PLAYER2] +life:15 +[END] \ No newline at end of file diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 7cbd736d4..f7319a7ff 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -22,7 +22,8 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * _belongs_to): attacker = 0; lifeOrig = life; belongs_to=_belongs_to; - owner = _belongs_to->library->owner; + owner = NULL; + if (_belongs_to) owner = _belongs_to->library->owner; lastController = owner; initAttackersDefensers(); life=toughness;