Fixed Legend rule for mutating cards, avoided spell targeting for mutated down cards, added new primitives.
This commit is contained in:
@@ -301,8 +301,6 @@ target=creature[flying]
|
||||
auto=damage:1
|
||||
auto=damage:1 target(creature[flying])
|
||||
auto=ability$!name(damage) choice target(creature[flying]) damage:1!$ controller
|
||||
auto=ability$!name(damage) choice target(creature[flying]) damage:1!$ controller
|
||||
auto=ability$!name(damage) choice target(creature[flying]) damage:1!$ controller
|
||||
text=Aerial Volley deals 3 damage divided as you choose among one, two, or three target creatures with flying.
|
||||
mana={G}
|
||||
type=Instant
|
||||
@@ -13550,6 +13548,33 @@ mana={1}{B}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Foriysian Brigade
|
||||
text=Foriysian Brigade can block an additional creature.
|
||||
mana={3}{W}
|
||||
type=Creature
|
||||
subtype=Human Soldier
|
||||
power=2
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Foriysian Interceptor
|
||||
abilities=flash,defender
|
||||
text=Flash (You may cast this spell any time you could cast an instant.) -- Defender -- Foriysian Interceptor can block an additional creature.
|
||||
mana={3}{W}
|
||||
type=Creature
|
||||
subtype=Human Soldier
|
||||
power=0
|
||||
toughness=5
|
||||
[/card]
|
||||
[card]
|
||||
name=Foriysian Totem
|
||||
auto={T}:add{R}
|
||||
auto={4}{R}:transforms((Giant Artifact Creature,setpower=4,settoughness=4,red,trample)) ueot all(this)
|
||||
text={T}: Add {R} to your mana pool. -- {4}{R}: Foriysian Totem becomes a 4/4 red Giant artifact creature with trample until end of turn. -- As long as Foriysian Totem is a creature, it can block an additional creature.
|
||||
mana={3}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Forked Lightning
|
||||
target=creature
|
||||
auto=damage:1
|
||||
@@ -13578,6 +13603,15 @@ mana={2}{W}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Fortuitous Find
|
||||
target=*[artifact;creature]|mygraveyard
|
||||
auto=choice name(Return target artifact or creature) moveto(myhand)
|
||||
auto=choice name(Return target artifact and creature) moveto(myhand) && moveto(myhand) target(*[artifact;creature]|mygraveyard)
|
||||
text=Choose one or both — -- • Return target artifact card from your graveyard to your hand. -- • Return target creature card from your graveyard to your hand.
|
||||
mana={2}{B}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Foulmire Knight // Profane Insight
|
||||
abilities=canplayfromexile,deathtouch,flash,adventure
|
||||
restriction=myturnonly
|
||||
@@ -13611,6 +13645,17 @@ mana={1}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Fowl Play
|
||||
target=creature
|
||||
auto=teach(creature) loseabilities
|
||||
auto=teach(creature) transforms((,setpower=1,settoughness=1))
|
||||
auto=teach(creature) transforms((,Chicken))
|
||||
text=Enchanted creature loses all abilities and is a 1/1 creature that counts as a Chicken.
|
||||
mana={2}{U}
|
||||
type=Enchantment
|
||||
subtype=Aura
|
||||
[/card]
|
||||
[card]
|
||||
name=Fractured Identity
|
||||
target=*[-land]
|
||||
auto=moveto(exile)
|
||||
@@ -13670,6 +13715,16 @@ power=2
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Frightful Delusion
|
||||
target=*|stack
|
||||
auto=fizzle
|
||||
auto=transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever
|
||||
auto=ability$!name(discard) notatarget(*|myhand) reject!$ opponent
|
||||
text=Counter target spell unless its controller pays {1}. That player discards a card.
|
||||
mana={2}{U}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Frilled Deathspitter
|
||||
auto=@damaged(this):damage:2 target(opponent,planeswalker)
|
||||
text=Enrage — Whenever Frilled Deathspitter is dealt damage, it deals 2 damage to target opponent or planeswalker.
|
||||
@@ -13823,6 +13878,19 @@ mana={B}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Fruitcake Elemental
|
||||
abilities=indestructible
|
||||
auto={3}:name(Opponent gains control) moveTo(opponentBattlefield) target(Fruitcake Elemental|battlefield)
|
||||
auto={3}:name(You gain control) moveTo(myBattlefield) target(Fruitcake Elemental|battlefield)
|
||||
auto=@each endofturn restriction{myturnonly}:damage:7 controller
|
||||
text=Fruitcake Elemental is indestructible. -- At the end of your turn, Fruitcake Elemental deals 7 damage to you. -- {3}: Target player gains control of Fruitcake Elemental.
|
||||
mana={1}{G}{G}
|
||||
type=Creature
|
||||
subtype=Elemental
|
||||
power=7
|
||||
toughness=7
|
||||
[/card]
|
||||
[card]
|
||||
name=Fry
|
||||
abilities=nofizzle
|
||||
target=creature,planeswalker[white;blue]
|
||||
@@ -14005,6 +14073,18 @@ mana={5}{U}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Gang of Devils
|
||||
auto=@movedTo(this|graveyard) from(battlefield):damage:1 target(player,creature)
|
||||
auto=@movedTo(this|graveyard) from(battlefield):ability$!name(damage) choice target(creature,player) damage:1!$ controller
|
||||
auto=@movedTo(this|graveyard) from(battlefield):ability$!name(damage) choice target(creature,player) damage:1!$ controller
|
||||
text=When Gang of Devils dies, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players.
|
||||
mana={5}{R}
|
||||
type=Creature
|
||||
subtype=Devil
|
||||
power=3
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Gang Up
|
||||
target=creature[power<=prex]
|
||||
auto=destroy
|
||||
@@ -17477,7 +17557,7 @@ auto=@movedTo(this|library) from(battlefield):all(parents) moveTo(myLibrary)
|
||||
auto=@movedTo(this|sideboard) from(battlefield):all(parents) moveTo(mySideboard)
|
||||
auto={9999}:equip
|
||||
other={3}{RG}{U}{U} name(Mutate)
|
||||
auto=transforms((,newability[@mutated(this):ability$!name(Reveal) reveal:1 revealzone(mylibrary) revealuntil(*[-artifact;-land;-instant;-sorcery]|mylibrary) optionone name(Choose non land permanent) target(<upto:1>*[-artifact;-land;-instant;-sorcery]|myreveal) moveto(mybattlefield) optiononeend optiontwo name(Put back into library) all(*|myreveal) bottomoflibrary optiontwoend revealend!$ controller]))
|
||||
auto=transforms((,newability[@mutated(this):ability$!name(Reveal) reveal:1 revealzone(mylibrary) revealuntil(*[-land;-instant;-sorcery]|mylibrary) optionone name(May move non land permanent on battlefield) target(<upto:1>*[-land;-instant;-sorcery]|myreveal) moveto(mybattlefield) optiononeend optiontwo name(Move revealed cards to exile) all(*|myreveal) moveto(myexile) optiontwoend afterrevealed name(Move last exiled non land permanent to hand) moveto(myhand) target(*[fresh;-land;-instant;-sorcery]|myexile) afterrevealedend revealend!$ controller]))
|
||||
auto=ifnot paid(alternative) then transforms((,newability[becomes(,,green,blue,red)])) forever all(this)
|
||||
auto=if paid(alternative) then name(Mutate Over) this(mutations<1) name(Mutate Over) choice name(Mutate Over) mutateover target(other creature[-human]|mybattlefield) && transforms((,newability[becomes(,,green,blue,red)])) forever
|
||||
auto=if paid(alternative) then name(Mutate Under) this(mutations<1) name(Mutate Under) choice name(Mutate Under) mutateunder target(other creature[-human]|mybattlefield)
|
||||
@@ -30553,11 +30633,11 @@ auto=@movedTo(this|exile) from(battlefield):all(parents) moveTo(myExile)
|
||||
auto=@movedTo(this|library) from(battlefield):all(parents) moveTo(myLibrary)
|
||||
auto=@movedTo(this|sideboard) from(battlefield):all(parents) moveTo(mySideboard)
|
||||
auto={9999}:equip
|
||||
other={2}{B}{R}{W}{W} name(Mutate)
|
||||
other={2}{BR}{W}{W} name(Mutate)
|
||||
auto=transforms((,newability[@mutated(this):life:4 controller],newability[@mutated(this):damage:4 target(*[creature;planeswalker]|opponentBattlefield)]))
|
||||
auto=if paid(alternative) then name(Mutate Over) this(mutations<1) name(Mutate Over) choice name(Mutate Over) mutateover target(other creature[-human]|mybattlefield)
|
||||
auto=if paid(alternative) then name(Mutate Over) this(mutations<1) name(Mutate Under) choice name(Mutate Under) mutateunder target(other creature[-human]|mybattlefield)
|
||||
text=Mutate {2}{B}{R}{W}{W} (If you cast this spell for its mutate cost, put it over or under target non-Human creature you own. They mutate into the creature on top plus all abilities from under it.) -- Double strike -- Whenever this creature mutates, it deals 4 damage to target creature or planeswalker an opponent controls and you gain 4 life.
|
||||
text=Mutate {2}{BR}{W}{W} (If you cast this spell for its mutate cost, put it over or under target non-Human creature you own. They mutate into the creature on top plus all abilities from under it.) -- Double strike -- Whenever this creature mutates, it deals 4 damage to target creature or planeswalker an opponent controls and you gain 4 life.
|
||||
mana={1}{R}{W}{B}
|
||||
type=Legendary Creature
|
||||
subtype=Dinosaur Cat Nightmare
|
||||
@@ -35816,9 +35896,9 @@ type=Legendary Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Vandalize
|
||||
auto=choice name(Destroy target artifact) destroy target(artifact)
|
||||
auto=choice name(Destroy target land) destroy target(land)
|
||||
auto=choice name(Destroy target artifact and land) destroy target(artifact) && destroy target(land)
|
||||
target=land,artifact
|
||||
auto=choice name(Destroy target artifact or land) destroy
|
||||
auto=choice name(Destroy target artifact and land) destroy && destroy target(artifact,land)
|
||||
text=Choose one or both — -- • Destroy target artifact. -- • Destroy target land.
|
||||
mana={4}{R}
|
||||
type=Sorcery
|
||||
|
||||
@@ -4700,31 +4700,6 @@ mana={G}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Foriysian Brigade
|
||||
text=Foriysian Brigade can block an additional creature.
|
||||
mana={3}{W}
|
||||
type=Creature
|
||||
subtype=Human Soldier
|
||||
power=2
|
||||
toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Foriysian Interceptor
|
||||
abilities=flash
|
||||
text=Flash (You may cast this spell any time you could cast an instant.) -- Defender -- Foriysian Interceptor can block an additional creature.
|
||||
mana={3}{W}
|
||||
type=Creature
|
||||
subtype=Human Soldier
|
||||
power=0
|
||||
toughness=5
|
||||
[/card]
|
||||
[card]
|
||||
name=Foriysian Totem
|
||||
text={T}: Add {R} to your mana pool. -- {4}{R}: Foriysian Totem becomes a 4/4 red Giant artifact creature with trample until end of turn. -- As long as Foriysian Totem is a creature, it can block an additional creature.
|
||||
mana={3}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Form of the Squirrel
|
||||
text=As Form of the Squirrel comes into play, put a 1/1 green Squirrel creature token into play. You lose the game when it leaves play. -- Creatures can't attack you. -- You can't be the target of spells or abilities. -- You can't play spells.
|
||||
mana={G}
|
||||
@@ -4743,12 +4718,6 @@ mana={1}{W}{W}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Fortuitous Find
|
||||
text=Choose one or both — -- • Return target artifact card from your graveyard to your hand. -- • Return target creature card from your graveyard to your hand.
|
||||
mana={2}{B}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Fortune's Favor
|
||||
text=Target opponent looks at the top four cards of your library and separates them into a face-down pile and a face-up pile. Put one pile into your hand and the other into your graveyard.
|
||||
mana={3}{U}
|
||||
@@ -4770,14 +4739,6 @@ mana={3}{B}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Fowl Play
|
||||
text=Enchanted creature loses all abilities and is a 1/1 creature that counts as a Chicken.
|
||||
mana={2}{U}
|
||||
type=Enchant Creature
|
||||
power=
|
||||
toughness=
|
||||
[/card]
|
||||
[card]
|
||||
name=Fraction Jackson
|
||||
text={G}, {T}: Return target card with a ½ on it from your graveyard to your hand.
|
||||
mana={2}{G}
|
||||
@@ -4818,7 +4779,7 @@ toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Fraternal Exaltation
|
||||
text=
|
||||
text=Sneak into your parents’ closet to get a deck. Your new brother is joining the game.
|
||||
mana={U}{U}{U}{U}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
@@ -4851,12 +4812,6 @@ mana={3}{R}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Frightful Delusion
|
||||
text=Counter target spell unless its controller pays {1}. That player discards a card.
|
||||
mana={2}{U}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=From the Ashes
|
||||
text=Destroy all nonbasic lands. For each land destroyed this way, its controller may search his or her library for a basic land card and put it onto the battlefield. Then each player who searched his or her library this way shuffles it.
|
||||
mana={3}{R}
|
||||
@@ -4869,15 +4824,6 @@ mana={3}{G}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Fruitcake Elemental
|
||||
text=Fruitcake Elemental is indestructible. -- At the end of your turn, Fruitcake Elemental deals 7 damage to you. -- {3}: Target player gains control of Fruitcake Elemental.
|
||||
mana={1}{G}{G}
|
||||
type=Creature
|
||||
subtype=Elemental
|
||||
power=7
|
||||
toughness=7
|
||||
[/card]
|
||||
[card]
|
||||
name=Fulgent Distraction
|
||||
text=Choose two target creatures. Tap those creatures, then unattach all Equipment from them.
|
||||
mana={2}{W}
|
||||
@@ -4956,15 +4902,6 @@ mana={R}{R}{R}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Gang of Devils
|
||||
text=When Gang of Devils dies, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players.
|
||||
mana={5}{R}
|
||||
type=Creature
|
||||
subtype=Devil
|
||||
power=3
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Garbage Elemental (a)
|
||||
text=Frenzy 2 (Whenever this creature attacks and isn't blocked, it gets +2/+0 until end of turn.) -- Garbage Elemental can't be blocked by wordy creatures. (A creature is wordy if it has four or more lines of rules text.)
|
||||
mana={4}{R}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "AllAbilities.h"
|
||||
#include "Translate.h"
|
||||
|
||||
#include "MTGRules.h"
|
||||
|
||||
//display a text animation, this is not a real ability.
|
||||
MTGEventText::MTGEventText(GameObserver* observer, int _id, MTGCardInstance * card, string textToShow) :
|
||||
@@ -1606,6 +1606,7 @@ int AACopier::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be copied, they will follow the fate of top-card
|
||||
bool tokencopied = false;
|
||||
if(_target->isToken || (_target->isACopier && _target->hasCopiedToken))
|
||||
tokencopied = true;
|
||||
@@ -1756,6 +1757,7 @@ int AAPhaseOut::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be phased out, they will follow the fate of top-card
|
||||
_target->isPhased = true;
|
||||
|
||||
_target->phasedTurn = game->turn;
|
||||
@@ -1792,6 +1794,7 @@ int AAImprint::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be imprinted, they will follow the fate of top-card
|
||||
Player * p = _target->controller();
|
||||
if(p)
|
||||
p->game->putInExile(_target);
|
||||
@@ -2893,6 +2896,7 @@ int AABuryCard::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be buried, they will follow the fate of top-card
|
||||
//Bury (Obsolete)
|
||||
//A term that meant “put [a permanent] into its owner’s graveyard.”
|
||||
//In general, cards that were printed with the term “bury” have received errata
|
||||
@@ -2955,6 +2959,7 @@ int AADestroyCard::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be destroyed, they will follow the fate of top-card
|
||||
_target->destroy();
|
||||
while(_target->next)
|
||||
_target = _target->next;
|
||||
@@ -3007,6 +3012,7 @@ int AASacrificeCard::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be sacrificed, they will follow the fate of top-card
|
||||
Player * p = _target->controller();
|
||||
MTGCardInstance * beforeCard = _target;
|
||||
p->game->putInGraveyard(_target);
|
||||
@@ -3184,6 +3190,7 @@ int AAFrozen::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be frozen, they will follow the fate of top-card
|
||||
while (_target->next)
|
||||
_target = _target->next; //This is for cards such as rampant growth
|
||||
if (freeze)
|
||||
@@ -3329,6 +3336,11 @@ int AANewTarget::resolve()
|
||||
source->types[0] = 7;
|
||||
source->types[1] = 1;
|
||||
}
|
||||
if(source->hasType(Subtypes::TYPE_LEGENDARY)){ // Check if the mutated card is a duplicated legendary card
|
||||
MTGNewLegend *testlegend = NEW MTGNewLegend(source->getObserver(),source->getObserver()->mLayers->actionLayer()->getMaxId());
|
||||
testlegend->CheckLegend(source);
|
||||
SAFE_DELETE(testlegend);
|
||||
}
|
||||
}
|
||||
for (unsigned int i = 0; i < (unsigned int)Constants::NB_BASIC_ABILITIES; i++){
|
||||
if(_target->basicAbilities[i] == 1){
|
||||
@@ -3388,6 +3400,7 @@ int AAMorph::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be morphed, they will follow the fate of top-card
|
||||
while (_target->next)
|
||||
_target = _target->next;
|
||||
|
||||
@@ -3505,6 +3518,7 @@ int AAMeld::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *)target;
|
||||
if (_target && _target->controller() == source->controller() && _target->owner == source->owner && !_target->isToken && !source->isToken)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be melded, they will follow the fate of top-card
|
||||
source->controller()->game->putInExile(source);
|
||||
_target->controller()->game->putInExile(_target);
|
||||
source->next->controller()->game->putInZone(source->next, source->next->currentZone, source->next->controller()->game->temp);
|
||||
@@ -3550,6 +3564,7 @@ int AAFlip::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be flipped, they will follow the fate of top-card
|
||||
if(((_target->isACopier||_target->isToken) && !isflipcard) || _target->has(Constants::CANTTRANSFORM))
|
||||
{
|
||||
game->removeObserver(this);
|
||||
@@ -4374,6 +4389,7 @@ int AACloner::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (!_target)
|
||||
return 0;
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be cloned, they will follow the fate of top-card
|
||||
|
||||
MTGCard * clone = NULL;
|
||||
|
||||
@@ -4649,6 +4665,7 @@ int AAMover::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be moved to any zone, they will follow the fate of top-card
|
||||
if(necro)
|
||||
_target->basicAbilities[Constants::NECROED] = 1;
|
||||
Player* p = _target->controller();
|
||||
@@ -4888,6 +4905,7 @@ int AARandomMover::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be randomly moved to any zone, they will follow the fate of top-card
|
||||
Player* p = _target->controller();
|
||||
if (p)
|
||||
{
|
||||
@@ -5201,6 +5219,7 @@ int AATapper::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be tapped, they will follow the fate of top-card
|
||||
while (_target->next)
|
||||
_target = _target->next; //This is for cards such as rampant growth
|
||||
_target->tap(_sendNoEvent);
|
||||
@@ -5231,6 +5250,7 @@ int AAUntapper::resolve()
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target)
|
||||
{
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be untapped, they will follow the fate of top-card
|
||||
while (_target->next)
|
||||
_target = _target->next; //This is for cards such as rampant growth
|
||||
_target->untap();
|
||||
@@ -8013,6 +8033,7 @@ InstantAbility(observer, id, card, target)
|
||||
int AABlock::resolve()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be blocked, they will follow the fate of top-card
|
||||
source = (MTGCardInstance*)source;
|
||||
if (_target && source->canBlock(_target))
|
||||
{
|
||||
@@ -8064,6 +8085,7 @@ InstantAbility(observer, id, card, target)
|
||||
int dredgeCard::resolve()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be dredged, they will follow the fate of top-card
|
||||
if(_target)
|
||||
{
|
||||
for(int j = 0; j < _target->data->dredge();j++)
|
||||
@@ -8092,6 +8114,7 @@ InstantAbility(observer, id, card, target)
|
||||
int AAConnect::resolve()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be connected, they will follow the fate of top-card
|
||||
if (_target)
|
||||
{
|
||||
while (_target->next)
|
||||
|
||||
@@ -1035,6 +1035,12 @@ void GameObserver::gameStateBasedEffects()
|
||||
MTGCardInstance * card = f->cards[k];
|
||||
card->fresh = 0;
|
||||
}
|
||||
MTGGameZone * fe = p->game->exile;
|
||||
for (int k = 0; k < fe->nb_cards; k++)
|
||||
{
|
||||
MTGCardInstance * card = fe->cards[k]; // Remove fresh attribute to previous exiled cards
|
||||
card->fresh = 0;
|
||||
}
|
||||
}
|
||||
if (z->nb_cards == 0)
|
||||
{
|
||||
|
||||
@@ -928,7 +928,7 @@ int MTGCardInstance::countDuplicateCardNames()
|
||||
int nb_cards = controller()->game->battlefield->nb_cards;
|
||||
for(int x = 0; x < nb_cards; x++)
|
||||
{
|
||||
if(controller()->game->battlefield->cards[x]->name == this->name)
|
||||
if(controller()->game->battlefield->cards[x]->name == this->name && !(controller()->game->battlefield->cards[x]->mutation && controller()->game->battlefield->cards[x]->parentCards.size() > 0)) // Don't count Mutated down card
|
||||
count+=1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3290,6 +3290,10 @@ int MTGUnearthRule::receiveEvent(WEvent * event)
|
||||
e->card->fresh = 1;
|
||||
e->card->entersBattlefield = 1;
|
||||
}
|
||||
if (e->to == e->card->controller()->game->exile) // Apply fresh attribute for new exiled cards
|
||||
{
|
||||
e->card->fresh = 1;
|
||||
}
|
||||
|
||||
if (card && card->basicAbilities[(int)Constants::UNEARTH])
|
||||
{
|
||||
@@ -3408,7 +3412,9 @@ int MTGNewLegend::receiveEvent(WEvent * e)
|
||||
MTGCardInstance * card = ev1->card;
|
||||
if(card && card->countDuplicateCardNames() > 1 && card->hasType(Subtypes::TYPE_LEGENDARY))
|
||||
{
|
||||
CheckLegend(card);
|
||||
if(card->basicAbilities[(int)Constants::MUTATE] && card->alternateCostPaid[(int)ManaCost::MANA_PAID_WITH_ALTERNATIVE])
|
||||
return 0; // The Leged rule for Mutating card will be checked later just if it's a Mutation Over choice
|
||||
CheckLegend(card);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -3481,7 +3487,7 @@ void MTGNewLegend::MoveLegend(MTGCardInstance * card)
|
||||
vector<MTGAbility*>selection;
|
||||
MTGCardInstance * myClone = NEW MTGCardInstance(card, card->controller()->game);
|
||||
TargetChooserFactory tfL(game);
|
||||
tcL = tfL.createTargetChooser("*[share!name!]|mybattlefield",myClone);
|
||||
tcL = tfL.createTargetChooser("*[-Mutated;share!name!]|mybattlefield",myClone); // The Mutated down cards cannot be considered as Legendary card anymore
|
||||
tcL->targetter = NULL;
|
||||
tcL->maxtargets = 1;
|
||||
Legendrule = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), myClone, NULL,"ownergraveyard","Put in Graveyard");
|
||||
|
||||
Reference in New Issue
Block a user