diff --git a/projects/mtg/bin/Res/test/circle_of_protection.txt b/projects/mtg/bin/Res/test/circle_of_protection.txt index 8555a22fd..e898103d9 100644 --- a/projects/mtg/bin/Res/test/circle_of_protection.txt +++ b/projects/mtg/bin/Res/test/circle_of_protection.txt @@ -4,8 +4,7 @@ COMBATATTACKERS [PLAYER1] inplay:1166 [PLAYER2] -inplay:1335 -manapool:{1} +inplay:1335,plains [DO] 1166 next @@ -16,6 +15,7 @@ no no #interrupt the actual damage yes +plains 1335 1166 endinterrupt @@ -28,7 +28,7 @@ inplay:1166 manapool:{0} life:20 [PLAYER2] -inplay:1335 +inplay:1335,plains manapool:{0} life:20 [END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/fledgling_imp2.txt b/projects/mtg/bin/Res/test/fledgling_imp2.txt index 5e076c594..2b695fcf0 100644 --- a/projects/mtg/bin/Res/test/fledgling_imp2.txt +++ b/projects/mtg/bin/Res/test/fledgling_imp2.txt @@ -5,13 +5,13 @@ COMBATATTACKERS [PLAYER1] inplay:air elemental [PLAYER2] -inplay:fledgling imp +inplay:fledgling imp,swamp hand:grizzly bears -manapool:{B} [DO] air elemental next #blockers +swamp fledgling imp choice 1 grizzly bears @@ -26,5 +26,6 @@ COMBATEND inplay:air elemental [PLAYER2] graveyard:grizzly bears,fledgling imp +inplay:swamp manapool:{0} [END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/force_of_nature2.txt b/projects/mtg/bin/Res/test/force_of_nature2.txt index 633409312..1294e3f75 100644 --- a/projects/mtg/bin/Res/test/force_of_nature2.txt +++ b/projects/mtg/bin/Res/test/force_of_nature2.txt @@ -1,6 +1,6 @@ #Testing That Force of nature accept GGGG to be paid [INIT] -UNTAP +UPKEEP [PLAYER1] life:20 inplay:1245 @@ -8,8 +8,6 @@ manapool:{G}{G}{G}{G} [PLAYER2] life:20 [DO] -next -#upkeep 1245 next #draw diff --git a/projects/mtg/bin/Res/test/rootwalla.txt b/projects/mtg/bin/Res/test/rootwalla.txt index a94de1e55..6f551fea9 100644 --- a/projects/mtg/bin/Res/test/rootwalla.txt +++ b/projects/mtg/bin/Res/test/rootwalla.txt @@ -1,5 +1,5 @@ #Does the limit work well on Rootwalla's ability ? -#player 1 tries to activate it twice. Does he get the manaburn because of the one time that didn't work ? +#player 1 tries to activate it twice. #does player 2 get 4 damages ? [INIT] FIRSTMAIN @@ -24,7 +24,7 @@ next [ASSERT] COMBATEND [PLAYER1] -life:18 +life:20 inplay:129707 manapool:{0} [PLAYER2] diff --git a/projects/mtg/include/Player.h b/projects/mtg/include/Player.h index 6c31ba393..a7cd8df31 100644 --- a/projects/mtg/include/Player.h +++ b/projects/mtg/include/Player.h @@ -29,7 +29,6 @@ class Player: public Damageable, public Targetable{ void unTapPhase(); MTGInPlay * inPlay(); ManaCost * getManaPool(); - int manaBurn(); void cleanupPhase(); virtual int Act(float dt){return 0;}; virtual int isAI(){return 0;}; diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 0bfacb389..de9f0b531 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -93,14 +93,9 @@ void GameObserver::nextGamePhase(){ mLayers->actionLayer()->Update(0); return nextGamePhase(); } - //manaBurn - if (currentGamePhase == Constants::MTG_PHASE_UNTAP || - currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN || - currentGamePhase == Constants::MTG_PHASE_COMBATBEGIN || - currentGamePhase == Constants::MTG_PHASE_SECONDMAIN || - currentGamePhase == Constants::MTG_PHASE_ENDOFTURN - ){ - currentPlayer->manaBurn(); + + for (int i=0; i < 2; i++){ + players[i]->getManaPool()->init(); } //After End of turn diff --git a/projects/mtg/src/Player.cpp b/projects/mtg/src/Player.cpp index a28946f19..8f5664fd8 100644 --- a/projects/mtg/src/Player.cpp +++ b/projects/mtg/src/Player.cpp @@ -59,13 +59,6 @@ ManaCost * Player::getManaPool(){ return manaPool; } -int Player::manaBurn(){ - int burn = manaPool->getConvertedCost(); - life -= burn; - manaPool->init(); - return burn; -} - int Player::testLife(){ if (life <=0){