Improved the Modal Double Faced cards for Zendikar set, added primitives that deals x damage divided on any target, added/fixed planeswalkers and improved kicker cost event handling.

This commit is contained in:
valfieri
2020-10-08 19:18:52 +02:00
parent ad26450151
commit a6a053e10e
9 changed files with 196 additions and 76 deletions

View File

@@ -3717,9 +3717,11 @@ int AAFlip::resolve()
if(forcetype != "" && _target) // Added to flip instants and sorceries as permanents (es. Zendikar Rising Modal Double Faced cards).
{
_target = _target->controller()->game->putInZone(_target,_target->currentZone,_target->controller()->game->battlefield, false);
_target = _target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->battlefield, false);
source->addType(forcetype);
source->controller()->game->battlefield->cardsSeenThisTurn.push_back(source);
WEvent * e = NEW WEventZoneChange(_target, _target->currentZone, _target->controller()->game->battlefield, true);
game->receiveEvent(e);
}
AbilityFactory af(game);

View File

@@ -236,7 +236,7 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
match = NULL;
}
if ((hasKickerCost == -1 && card->getManaCost()->getKicker()) || (hasKickerCost == 1 && !card->getManaCost()->getKicker()))
if ((hasKickerCost == -1 && (card->getManaCost()->getKicker() || card->basicAbilities[Constants::HASOTHERKICKER])) || (hasKickerCost == 1 && (!card->getManaCost()->getKicker() && !card->basicAbilities[Constants::HASOTHERKICKER])))
{
match = NULL;
}

View File

@@ -569,13 +569,13 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
if(shufflelibrary)
copy->owner->game->library->shuffle();//shouldnt we only ever do this if you clicked close on your library gui??????
WEvent * e = NEW WEventZoneChange(copy, from, to);
g->receiveEvent(e);
WEvent * e = NEW WEventZoneChange(copy, from, to);
g->receiveEvent(e);
}
if(inplaytoinplay)
{
WEvent * ep = NEW WEventCardControllerChange(copy);
g->receiveEvent(ep);
WEvent * ep = NEW WEventCardControllerChange(copy);
g->receiveEvent(ep);
}
return ret;

View File

@@ -12,8 +12,8 @@ WEvent::WEvent(int type) :
{
}
WEventZoneChange::WEventZoneChange(MTGCardInstance * card, MTGGameZone * from, MTGGameZone *to) :
WEvent(CHANGE_ZONE), card(card), from(from), to(to)
WEventZoneChange::WEventZoneChange(MTGCardInstance * card, MTGGameZone * from, MTGGameZone *to, bool forcetrigger) :
WEvent(CHANGE_ZONE), card(card), from(from), to(to), forcetrigger(forcetrigger) //Added a force trigger for modal double faced card (eg. Zendikar Rising)
{
}