update some cards
removed phasedout trigger add phasedoutbonus - ability
This commit is contained in:
@@ -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) :
|
||||
|
||||
Reference in New Issue
Block a user