manifest support
also fix guiplay
This commit is contained in:
@@ -37165,6 +37165,13 @@ power=1
|
|||||||
toughness=3
|
toughness=3
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Ethereal Ambush
|
||||||
|
auto=manifest all(*[zpos<=2]|mylibrary)
|
||||||
|
text=Manifest the top two cards of your library. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
||||||
|
mana={3}{G}{U}
|
||||||
|
type=Instant
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Ethereal Armor
|
name=Ethereal Armor
|
||||||
target=creature
|
target=creature
|
||||||
auto=first strike
|
auto=first strike
|
||||||
@@ -40255,6 +40262,13 @@ mana={R}
|
|||||||
type=Instant
|
type=Instant
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Fierce Invocation
|
||||||
|
auto=manifest and!( counter(1/1,2) )! all(*[zpos=1]|mylibrary)
|
||||||
|
text=Manifest the top card of your library, then put two +1/+1 counters on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
||||||
|
mana={4}{R}
|
||||||
|
type=Sorcery
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Fiery Mantle
|
name=Fiery Mantle
|
||||||
target=creature
|
target=creature
|
||||||
autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand)
|
autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand)
|
||||||
@@ -42887,6 +42901,13 @@ mana={4}{R}{R}{R}
|
|||||||
type=Enchantment
|
type=Enchantment
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Formless Nurturing
|
||||||
|
auto=manifest and!( counter(1/1,1) )! all(*[zpos=1]|mylibrary)
|
||||||
|
text=Manifest the top card of your library, then put a +1/+1 counter on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
||||||
|
mana={3}{G}
|
||||||
|
type=Sorcery
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Forsaken City
|
name=Forsaken City
|
||||||
abilities=doesnotuntap
|
abilities=doesnotuntap
|
||||||
auto={0}:untap all(this) && moveto(exile) target(*|myHand) limit:1 myUpkeepOnly
|
auto={0}:untap all(this) && moveto(exile) target(*|myHand) limit:1 myUpkeepOnly
|
||||||
@@ -71802,6 +71823,14 @@ power=3
|
|||||||
toughness=2
|
toughness=2
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Mastery of the Unseen
|
||||||
|
auto=@facedup(*|mybattlefield):life:type:creature:battlefield controller
|
||||||
|
auto={3}{W}:manifest all(*[zpos=1]|mylibrary)
|
||||||
|
text=Whenever a permanent you control is turned face up, you gain 1 life for each creature you control. -- {3}{W}: Manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
||||||
|
mana={1}{W}
|
||||||
|
type=Enchantment
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Master's Call
|
name=Master's Call
|
||||||
auto=token(Myr,Artifact Creature Myr,1/1)*2
|
auto=token(Myr,Artifact Creature Myr,1/1)*2
|
||||||
text=Put two 1/1 colorless Myr artifact creature tokens onto the battlefield.
|
text=Put two 1/1 colorless Myr artifact creature tokens onto the battlefield.
|
||||||
@@ -90154,6 +90183,16 @@ power=5
|
|||||||
toughness=5
|
toughness=5
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Qarsi High Priest
|
||||||
|
auto={1}{B}{T}{S(other creature|mybattlefield)}:manifest all(*[zpos=1]|mylibrary)
|
||||||
|
text={1}{B}, {T}, Sacrifice another creature: Manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
||||||
|
mana={B}
|
||||||
|
type=Creature
|
||||||
|
subtype=Human Cleric
|
||||||
|
power=0
|
||||||
|
toughness=2
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Qarsi Sadist
|
name=Qarsi Sadist
|
||||||
auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && transforms((,newability[target(opponent) life:-2],newability[life:2 controller])) forever
|
auto=may name(Exploit) sacrifice notatarget(creature|mybattlefield) && transforms((,newability[target(opponent) life:-2],newability[life:2 controller])) forever
|
||||||
text=Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Qarsi Sadist exploits a creature, target opponent loses 2 life and you gain 2 life.
|
text=Exploit (When this creature enters the battlefield, you may sacrifice a creature.) -- When Qarsi Sadist exploits a creature, target opponent loses 2 life and you gain 2 life.
|
||||||
@@ -109695,6 +109734,13 @@ mana={B}
|
|||||||
type=Enchantment
|
type=Enchantment
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Soul Summons
|
||||||
|
auto=manifest all(*[zpos=1]|mylibrary)
|
||||||
|
text=Manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
||||||
|
mana={1}{W}
|
||||||
|
type=Sorcery
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Soul Swallower
|
name=Soul Swallower
|
||||||
abilities=trample
|
abilities=trample
|
||||||
auto=@each my upkeep restriction{delirium}:counter(1/1,3)
|
auto=@each my upkeep restriction{delirium}:counter(1/1,3)
|
||||||
@@ -115190,6 +115236,16 @@ mana={B}{G}{U}
|
|||||||
type=Instant
|
type=Instant
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Sultai Emissary
|
||||||
|
auto=@movedTo(this|graveyard) from(battlefield):manifest all(*[zpos=1]|mylibrary)
|
||||||
|
text=When Sultai Emissary dies, manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
||||||
|
mana={1}{B}
|
||||||
|
type=Creature
|
||||||
|
subtype=Zombie Warrior
|
||||||
|
power=1
|
||||||
|
toughness=1
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Sultai Flayer
|
name=Sultai Flayer
|
||||||
auto=@movedTo(creature[toughness>=4]|graveyard) from(myBattlefield):life:4 controller
|
auto=@movedTo(creature[toughness>=4]|graveyard) from(myBattlefield):life:4 controller
|
||||||
text=Whenever a creature you control with toughness 4 or greater dies, you gain 4 life.
|
text=Whenever a creature you control with toughness 4 or greater dies, you gain 4 life.
|
||||||
@@ -118782,6 +118838,17 @@ power=4
|
|||||||
toughness=3
|
toughness=3
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Temur War Shaman
|
||||||
|
auto=manifest all(*[zpos=1]|mylibrary)
|
||||||
|
auto=@facedup(creature|mybattlefield):may name(fight) all(trigger[to]) transforms((,newability[target(creature|opponentbattlefield) dynamicability<!powerstrike eachother!>])) ueot
|
||||||
|
text=When Temur War Shaman enters the battlefield, manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.) -- Whenever a permanent you control is turned face up, if it's a creature, you may have it fight target creature you don't control.
|
||||||
|
mana={4}{G}{G}
|
||||||
|
type=Creature
|
||||||
|
subtype=Human Shaman
|
||||||
|
power=4
|
||||||
|
toughness=5
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Tenacious Dead
|
name=Tenacious Dead
|
||||||
autograveyard=@movedto(this|mygraveyard) from(mybattlefield):all(trigger) transforms((,newability[name(Pay 1B) pay[[{1}{B}]] name(pay 1B mana) moveto(ownerbattlefield} && tap?name(cancel) donothing])) oneshot
|
autograveyard=@movedto(this|mygraveyard) from(mybattlefield):all(trigger) transforms((,newability[name(Pay 1B) pay[[{1}{B}]] name(pay 1B mana) moveto(ownerbattlefield} && tap?name(cancel) donothing])) oneshot
|
||||||
text=When Tenacious Dead dies, you may pay {1}{B}. If you do, return it to the battlefield tapped under its owner's control.
|
text=When Tenacious Dead dies, you may pay {1}{B}. If you do, return it to the battlefield tapped under its owner's control.
|
||||||
@@ -133775,6 +133842,13 @@ power=5
|
|||||||
toughness=5
|
toughness=5
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Wildcall
|
||||||
|
auto=manifest and!( counter(1/1,x) )! all(*[zpos=1]|mylibrary)
|
||||||
|
text=Manifest the top card of your library, then put X +1/+1 counters on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
||||||
|
mana={X}{G}{G}
|
||||||
|
type=Sorcery
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Wilderness Elemental
|
name=Wilderness Elemental
|
||||||
abilities=trample
|
abilities=trample
|
||||||
anyzone=type:land[-basic]:opponentbattlefield/3 cdaactive
|
anyzone=type:land[-basic]:opponentbattlefield/3 cdaactive
|
||||||
|
|||||||
@@ -4553,12 +4553,6 @@ power=6
|
|||||||
toughness=6
|
toughness=6
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Ethereal Ambush
|
|
||||||
text=Manifest the top two cards of your library. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
|
||||||
mana={3}{G}{U}
|
|
||||||
type=Instant
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Eureka
|
name=Eureka
|
||||||
text=Starting with you, each player may put a permanent card from his or her hand onto the battlefield. Repeat this process until no one puts a card onto the battlefield.
|
text=Starting with you, each player may put a permanent card from his or her hand onto the battlefield. Repeat this process until no one puts a card onto the battlefield.
|
||||||
mana={2}{G}{G}
|
mana={2}{G}{G}
|
||||||
@@ -4933,12 +4927,6 @@ power=3
|
|||||||
toughness=3
|
toughness=3
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Fierce Invocation
|
|
||||||
text=Manifest the top card of your library, then put two +1/+1 counters on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
|
||||||
mana={4}{R}
|
|
||||||
type=Sorcery
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Fiery Bombardment
|
name=Fiery Bombardment
|
||||||
text=Chroma — {2}, Sacrifice a creature: Fiery Bombardment deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost.
|
text=Chroma — {2}, Sacrifice a creature: Fiery Bombardment deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost.
|
||||||
mana={1}{R}
|
mana={1}{R}
|
||||||
@@ -5285,12 +5273,6 @@ mana={3}{R}
|
|||||||
type=Sorcery
|
type=Sorcery
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Formless Nurturing
|
|
||||||
text=Manifest the top card of your library, then put a +1/+1 counter on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
|
||||||
mana={3}{G}
|
|
||||||
type=Sorcery
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Fortified Area
|
name=Fortified Area
|
||||||
text=Wall creatures you control get +1/+0 and have banding. (Any creatures with banding, and up to one without, can attack in a band. Bands are blocked as a group. If any creatures with banding you control are blocking or being blocked by a creature, you divide that creature's combat damage, not its controller, among any of the creatures it's being blocked by or is blocking.)
|
text=Wall creatures you control get +1/+0 and have banding. (Any creatures with banding, and up to one without, can attack in a band. Bands are blocked as a group. If any creatures with banding you control are blocking or being blocked by a creature, you divide that creature's combat damage, not its controller, among any of the creatures it's being blocked by or is blocking.)
|
||||||
mana={1}{W}{W}
|
mana={1}{W}{W}
|
||||||
@@ -9347,12 +9329,6 @@ type=Artifact
|
|||||||
subtype=Equipment
|
subtype=Equipment
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Mastery of the Unseen
|
|
||||||
text=Whenever a permanent you control is turned face up, you gain 1 life for each creature you control. -- {3}{W}: Manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
|
||||||
mana={1}{W}
|
|
||||||
type=Enchantment
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Matsu-Tribe Decoy
|
name=Matsu-Tribe Decoy
|
||||||
text={2}{G}: Target creature blocks Matsu-Tribe Decoy this turn if able. -- Whenever Matsu-Tribe Decoy deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
|
text={2}{G}: Target creature blocks Matsu-Tribe Decoy this turn if able. -- Whenever Matsu-Tribe Decoy deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
|
||||||
mana={2}{G}
|
mana={2}{G}
|
||||||
@@ -12093,15 +12069,6 @@ power=0
|
|||||||
toughness=4
|
toughness=4
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Qarsi High Priest
|
|
||||||
text={1}{B}, {T}, Sacrifice another creature: Manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
|
||||||
mana={B}
|
|
||||||
type=Creature
|
|
||||||
subtype=Human Cleric
|
|
||||||
power=0
|
|
||||||
toughness=2
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Qasali Ambusher
|
name=Qasali Ambusher
|
||||||
text=Reach -- If a creature is attacking you and you control a Forest and a Plains, you may cast Qasali Ambusher without paying its mana cost and as though it had flash.
|
text=Reach -- If a creature is attacking you and you control a Forest and a Plains, you may cast Qasali Ambusher without paying its mana cost and as though it had flash.
|
||||||
mana={1}{G}{W}
|
mana={1}{G}{W}
|
||||||
@@ -14734,12 +14701,6 @@ mana={X}{B}
|
|||||||
type=Sorcery
|
type=Sorcery
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Soul Summons
|
|
||||||
text=Manifest the top card of your library. (Put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
|
||||||
mana={1}{W}
|
|
||||||
type=Sorcery
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Soulfire Grand Master
|
name=Soulfire Grand Master
|
||||||
text=Lifelink -- Instant and sorcery spells you control have lifelink. -- {2}{UR}{UR}: The next time you cast an instant or sorcery spell from your hand this turn, put that card into your hand instead of into your graveyard as it resolves.
|
text=Lifelink -- Instant and sorcery spells you control have lifelink. -- {2}{UR}{UR}: The next time you cast an instant or sorcery spell from your hand this turn, put that card into your hand instead of into your graveyard as it resolves.
|
||||||
mana={1}{W}
|
mana={1}{W}
|
||||||
@@ -15557,15 +15518,6 @@ mana={3}{R}
|
|||||||
type=Enchantment
|
type=Enchantment
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Sultai Emissary
|
|
||||||
text=When Sultai Emissary dies, manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
|
||||||
mana={1}{B}
|
|
||||||
type=Creature
|
|
||||||
subtype=Zombie Warrior
|
|
||||||
power=1
|
|
||||||
toughness=1
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Summary Dismissal
|
name=Summary Dismissal
|
||||||
text=Exile all other spells and counter all abilities.
|
text=Exile all other spells and counter all abilities.
|
||||||
mana={2}{U}{U}
|
mana={2}{U}{U}
|
||||||
@@ -16017,15 +15969,6 @@ power=3
|
|||||||
toughness=1
|
toughness=1
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Temur War Shaman
|
|
||||||
text=When Temur War Shaman enters the battlefield, manifest the top card of your library. (Put that card onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.) -- Whenever a permanent you control is turned face up, if it's a creature, you may have it fight target creature you don't control.
|
|
||||||
mana={4}{G}{G}
|
|
||||||
type=Creature
|
|
||||||
subtype=Human Shaman
|
|
||||||
power=4
|
|
||||||
toughness=5
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Teremko Griffin
|
name=Teremko Griffin
|
||||||
text=Flying; banding (Any creatures with banding, and up to one without, can attack in a band. Bands are blocked as a group. If any creatures with banding you control are blocking or being blocked by a creature, you divide that creature's combat damage, not its controller, among any of the creatures it's being blocked by or is blocking.)
|
text=Flying; banding (Any creatures with banding, and up to one without, can attack in a band. Bands are blocked as a group. If any creatures with banding you control are blocking or being blocked by a creature, you divide that creature's combat damage, not its controller, among any of the creatures it's being blocked by or is blocking.)
|
||||||
mana={3}{W}
|
mana={3}{W}
|
||||||
@@ -17822,12 +17765,6 @@ mana={3}{R}
|
|||||||
type=Sorcery
|
type=Sorcery
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Wildcall
|
|
||||||
text=Manifest the top card of your library, then put X +1/+1 counters on it. (To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)
|
|
||||||
mana={X}{G}{G}
|
|
||||||
type=Sorcery
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Willbender
|
name=Willbender
|
||||||
text=Morph {1}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Willbender is turned face up, change the target of target spell or ability with a single target.
|
text=Morph {1}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Willbender is turned face up, change the target of target spell or ability with a single target.
|
||||||
mana={1}{U}
|
mana={1}{U}
|
||||||
|
|||||||
@@ -4748,6 +4748,7 @@ class AAMorph: public ActivatedAbility
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vector<MTGAbility *> currentAbilities;
|
vector<MTGAbility *> currentAbilities;
|
||||||
|
bool face;
|
||||||
AAMorph(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost = NULL);
|
AAMorph(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost = NULL);
|
||||||
int resolve();
|
int resolve();
|
||||||
int testDestroy();
|
int testDestroy();
|
||||||
@@ -7067,6 +7068,104 @@ public:
|
|||||||
~GenericPaidAbility();
|
~GenericPaidAbility();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
//--------manifest
|
||||||
|
class AManifest: public InstantAbility
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MTGAbility * andAbility;
|
||||||
|
AManifest(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target) :
|
||||||
|
InstantAbility(observer, _id, _source)
|
||||||
|
{
|
||||||
|
target = _target;
|
||||||
|
andAbility = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int resolve()
|
||||||
|
{
|
||||||
|
MTGCardInstance * card = (MTGCardInstance *) target;
|
||||||
|
if (card)
|
||||||
|
{
|
||||||
|
bool isCreature = card->isCreature();
|
||||||
|
string mt = card->magicTexts["facedown"];
|
||||||
|
card->morphed = true;
|
||||||
|
card->isMorphed = true;
|
||||||
|
MTGCardInstance * copy = card->controller()->game->putInZone(card, card->currentZone, card->controller()->game->battlefield);
|
||||||
|
copy->getManaCost()->resetCosts();
|
||||||
|
copy->setColor(0,1);
|
||||||
|
copy->types.clear();
|
||||||
|
string cre = "Creature";
|
||||||
|
copy->setType(cre.c_str());
|
||||||
|
copy->basicAbilities.reset();
|
||||||
|
copy->name = "Morph";
|
||||||
|
copy->morphed = true;
|
||||||
|
copy->isMorphed = true;
|
||||||
|
copy->setPower(2);
|
||||||
|
copy->setToughness(2);
|
||||||
|
copy->isFacedown = true;
|
||||||
|
AbilityFactory af(game);
|
||||||
|
MTGAbility * aam = af.parseMagicLine("{mycost}:manafaceup", GetId(), NULL, copy);
|
||||||
|
if(aam && isCreature)
|
||||||
|
{
|
||||||
|
aam->target = copy;
|
||||||
|
if(aam->oneShot)
|
||||||
|
{
|
||||||
|
aam->resolve();
|
||||||
|
SAFE_DELETE(aam);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
aam->addToGame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mt.size())
|
||||||
|
{
|
||||||
|
MTGAbility * fd = af.parseMagicLine(mt, GetId(), NULL, copy);
|
||||||
|
if(fd && isCreature)
|
||||||
|
{
|
||||||
|
fd->target = copy;
|
||||||
|
if(fd->oneShot)
|
||||||
|
{
|
||||||
|
fd->resolve();
|
||||||
|
SAFE_DELETE(fd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fd->addToGame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(andAbility)
|
||||||
|
{
|
||||||
|
MTGAbility * andAbilityClone = andAbility->clone();
|
||||||
|
andAbilityClone->target = copy;
|
||||||
|
if(andAbility->oneShot)
|
||||||
|
{
|
||||||
|
andAbilityClone->resolve();
|
||||||
|
SAFE_DELETE(andAbilityClone);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
andAbilityClone->addToGame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
const string getMenuText()
|
||||||
|
{
|
||||||
|
return "Manifest";
|
||||||
|
}
|
||||||
|
virtual ostream& toString(ostream& out) const
|
||||||
|
{
|
||||||
|
out << "AAManifest ::: (";
|
||||||
|
return InstantAbility::toString(out) << ")";
|
||||||
|
}
|
||||||
|
AManifest * clone() const
|
||||||
|
{
|
||||||
|
return NEW AManifest(*this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//------------------
|
||||||
// utility functions
|
// utility functions
|
||||||
|
|
||||||
void PopulateColorIndexVector(list<int>& colors, const string& colorsString, char delimiter = ',');
|
void PopulateColorIndexVector(list<int>& colors, const string& colorsString, char delimiter = ',');
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ public:
|
|||||||
bool miracle;
|
bool miracle;
|
||||||
bool hasCopiedToken;
|
bool hasCopiedToken;
|
||||||
bool isBestowed;
|
bool isBestowed;
|
||||||
|
bool isFacedown;
|
||||||
int chooseacolor;
|
int chooseacolor;
|
||||||
string chooseasubtype;
|
string chooseasubtype;
|
||||||
int coinSide;//1 = tails
|
int coinSide;//1 = tails
|
||||||
|
|||||||
@@ -3243,6 +3243,7 @@ AAMorph::AAMorph(GameObserver* observer, int id, MTGCardInstance * card, MTGCard
|
|||||||
ActivatedAbility(observer, id, card, _cost, restrictions)
|
ActivatedAbility(observer, id, card, _cost, restrictions)
|
||||||
{
|
{
|
||||||
target = _target;
|
target = _target;
|
||||||
|
face = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AAMorph::resolve()
|
int AAMorph::resolve()
|
||||||
@@ -3288,6 +3289,7 @@ int AAMorph::resolve()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_target->isFacedown = false;
|
||||||
WEvent * e = NEW WEventCardFaceUp(_target);
|
WEvent * e = NEW WEventCardFaceUp(_target);
|
||||||
game->receiveEvent(e);
|
game->receiveEvent(e);
|
||||||
currentAbilities.clear();
|
currentAbilities.clear();
|
||||||
@@ -3312,6 +3314,16 @@ int AAMorph::testDestroy()
|
|||||||
|
|
||||||
const string AAMorph::getMenuText()
|
const string AAMorph::getMenuText()
|
||||||
{
|
{
|
||||||
|
if(face && target)
|
||||||
|
{
|
||||||
|
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||||
|
if(_target && _target->model)
|
||||||
|
{
|
||||||
|
std::ostringstream abname;
|
||||||
|
abname << "Face Up " << _target->model->data->getManaCost()->toString();
|
||||||
|
return abname.str();
|
||||||
|
}
|
||||||
|
}
|
||||||
return "Morph";
|
return "Morph";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3544,6 +3556,11 @@ int AAFlip::resolve()
|
|||||||
_target->mPropertiesChangedSinceLastUpdate = true;
|
_target->mPropertiesChangedSinceLastUpdate = true;
|
||||||
if(!isflipcard)
|
if(!isflipcard)
|
||||||
{
|
{
|
||||||
|
if(_target->isFacedown)
|
||||||
|
_target->isFacedown = false;
|
||||||
|
else
|
||||||
|
_target->isFacedown = true;
|
||||||
|
|
||||||
WEvent * e = NEW WEventCardTransforms(_target);
|
WEvent * e = NEW WEventCardTransforms(_target);
|
||||||
game->receiveEvent(e);
|
game->receiveEvent(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -447,12 +447,12 @@ int GuiPlay::receiveEventPlus(WEvent * e)
|
|||||||
Replace();
|
Replace();
|
||||||
else if (dynamic_cast<WEventCardControllerChange*> (e))
|
else if (dynamic_cast<WEventCardControllerChange*> (e))
|
||||||
Replace();
|
Replace();
|
||||||
else if (dynamic_cast<WEventCardTransforms*> (e))
|
/*else if (dynamic_cast<WEventCardTransforms*> (e))
|
||||||
Replace();
|
Replace();
|
||||||
else if (dynamic_cast<WEventCardCopiedACard*> (e))
|
else if (dynamic_cast<WEventCardCopiedACard*> (e))
|
||||||
Replace();
|
Replace();
|
||||||
else if (dynamic_cast<WEventCardFaceUp*> (e))
|
else if (dynamic_cast<WEventCardFaceUp*> (e))
|
||||||
Replace();
|
Replace();*/
|
||||||
Replace();
|
Replace();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2895,6 +2895,21 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//manifest
|
||||||
|
found = s.find("manifest");
|
||||||
|
if (found != string::npos)
|
||||||
|
{
|
||||||
|
MTGAbility * a = NEW AManifest(observer, id, card, target);
|
||||||
|
a->oneShot = 1;
|
||||||
|
if(storedAndAbility.size())
|
||||||
|
{
|
||||||
|
string stored = storedAndAbility;
|
||||||
|
storedAndAbility.clear();
|
||||||
|
((AManifest*)a)->andAbility = parseMagicLine(stored, id, spell, card);
|
||||||
|
}
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
//clone
|
//clone
|
||||||
found = s.find("clone");
|
found = s.find("clone");
|
||||||
if (found != string::npos)
|
if (found != string::npos)
|
||||||
@@ -4019,6 +4034,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
a->oneShot = 1;
|
a->oneShot = 1;
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
//morph
|
||||||
|
found = s.find("manafaceup");
|
||||||
|
if (found != string::npos)
|
||||||
|
{
|
||||||
|
MTGAbility * a = NEW AAMorph(observer, id, card, target);
|
||||||
|
a->oneShot = 1;
|
||||||
|
((AAMorph*)a)->face = true;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
//identify what a leveler creature will max out at.
|
//identify what a leveler creature will max out at.
|
||||||
vector<string> splitMaxlevel = parseBetween(s, "maxlevel:", " ", false);
|
vector<string> splitMaxlevel = parseBetween(s, "maxlevel:", " ", false);
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ void MTGCardInstance::initMTGCI()
|
|||||||
isDualWielding = false;
|
isDualWielding = false;
|
||||||
suspended = false;
|
suspended = false;
|
||||||
isBestowed = false;
|
isBestowed = false;
|
||||||
|
isFacedown = false;
|
||||||
castMethod = Constants::NOT_CAST;
|
castMethod = Constants::NOT_CAST;
|
||||||
mPropertiesChangedSinceLastUpdate = false;
|
mPropertiesChangedSinceLastUpdate = false;
|
||||||
stillNeeded = true;
|
stillNeeded = true;
|
||||||
|
|||||||
@@ -217,7 +217,17 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'm': //Mill yourself as a cost
|
case 'm': //Mill yourself as a cost
|
||||||
|
{
|
||||||
|
if (value == "mycost")
|
||||||
|
{
|
||||||
|
if(c && c->model)
|
||||||
|
manaCost->add(c->model->data->getManaCost());
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
manaCost->addExtraCost(NEW MillCost(tc));
|
manaCost->addExtraCost(NEW MillCost(tc));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'n': //return unblocked attacker cost
|
case 'n': //return unblocked attacker cost
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user