update some cards

removed phasedout trigger
add phasedoutbonus - ability
This commit is contained in:
Anthony Calosa
2017-02-22 18:25:39 +08:00
parent bb9d98cc0c
commit ff4911116c
12 changed files with 534 additions and 374 deletions

View File

@@ -5,6 +5,7 @@
#include "MTGGameZones.h"
#include "Damage.h"
#include "PhaseRing.h"
#include "AllAbilities.h"
WEvent::WEvent(int type) :
type(type)
@@ -236,9 +237,22 @@ WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) :
{
}
WEventCardPhasesOut::WEventCardPhasesOut(MTGCardInstance * card) :
WEventCardPhasesOut::WEventCardPhasesOut(MTGCardInstance * card, int turn) :
WEventCardUpdate(card)
{
if(card->getPhasedOutAbility().size())
{
AbilityFactory af(card->getObserver());
MTGAbility * a = af.parseMagicLine(card->getPhasedOutAbility(), card->getObserver()->mLayers->actionLayer()->getMaxId(), NULL, card->clone());
MTGAbility * poA = a->clone();
SAFE_DELETE(a);
poA->oneShot = true;
poA->canBeInterrupted = false;
MTGAbility *gatg = NEW GenericAddToGame(card->getObserver(), card->getObserver()->mLayers->actionLayer()->getMaxId(), card,NULL,poA->clone());
SAFE_DELETE(poA);
gatg->fireAbility();
//SAFE_DELETE(gatg);
}
}
WEventCardPhasesIn::WEventCardPhasesIn(MTGCardInstance * card) :