Libraryeater and Canplayfromexile

extend canplayfromgraveyard with canplayfromexile
libraryeater for undead alchemist
This commit is contained in:
Anthony Calosa
2015-11-05 07:16:49 +08:00
parent 525453d677
commit 4f54e30e0e
8 changed files with 67 additions and 36 deletions

View File

@@ -99087,11 +99087,10 @@ text=Syphon Soul deals 2 damage to each other player. You gain life equal to the
mana={2}{B}
type=Sorcery
[/card]
#workaround szadek.
[card]
name=Szadek, Lord of Secrets
alias=89092
abilities=flying
auto=@combatdamaged(player) from(this):deplete:thatmuch opponent && life:thatmuch opponent && counter(1/1,thatmuch)
text=Flying -- If Szadek, Lord of Secrets would deal combat damage to a player, instead put that many +1/+1 counters on Szadek and that player puts that many cards from the top of his or her library into his or her graveyard.
mana={3}{U}{U}{B}{B}
type=Legendary Creature
@@ -100972,6 +100971,18 @@ mana={3}{p(U)}
type=Sorcery
[/card]
[card]
name=Thada Adel, Acquisitor
abilities=islandwalk
auto=@combatdamagefoeof(player) from(this):name(exile artifact) notatarget(artifact|opponentlibrary) moveto(myexile) and!( transforms((,newability[canplayfromexile],newability[phaseactionmulti[endofturn once] moveto(ownerexile) all(this|exile)])) ueot)!
auto=@combatdamageof(player) from(this):name(exile artifact) notatarget(artifact|mylibrary) moveto(myexile) and!( transforms((,newability[canplayfromexile],newability[phaseactionmulti[endofturn once] moveto(ownerexile) all(this|exile)])) ueot)!
text=Islandwalk -- Whenever Thada Adel, Acquisitor deals combat damage to a player, search that player's library for an artifact card and exile it. Then that player shuffles his or her library. Until end of turn, you may play that card.
mana={1}{U}{U}
type=Legendary Creature
subtype=Merfolk Rogue
power=2
toughness=2
[/card]
[card]
name=Thalakos Deceiver
abilities=shadow
auto=@combat(notblocked) source(this):may moveTo(myBattlefield) target(creature|opponentBattlefield) && sacrifice all(this)
@@ -106105,6 +106116,17 @@ type=Enchantment
subtype=Aura
[/card]
[card]
name=Undead Alchemist
auto=lord(zombie|mybattlefield) libraryeater
auto=@movedTo(creature|opponentgraveyard) from(opponentlibrary):all(trigger[to]) moveto(exile) and!(token(Zombie,Creature Zombie,2/2,black) controller)!
text=If a Zombie you control would deal combat damage to a player, instead that player puts that many cards from the top of his or her library into his or her graveyard. -- Whenever a creature card is put into an opponent's graveyard from his or her library, exile that card and put a 2/2 black Zombie creature token onto the battlefield.
mana={3}{U}
type=Creature
subtype=Zombie
power=4
toughness=2
[/card]
[card]
name=Undead Executioner
auto=@movedto(this|graveyard) from(battlefield):may target(creature) -2/-2 ueot
text=When Undead Executioner dies, you may have target creature get -2/-2 until end of turn.

View File

@@ -13490,6 +13490,7 @@ subtype=Elemental
power=3
toughness=2
[/card]
#seems possible
[card]
name=Roiling Horror
text=Roiling Horror's power and toughness are each equal to your life total minus the life total of an opponent with the most life. -- Suspend X - {X}{B}{B}{B}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{B}{B}{B} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.) -- Whenever a time counter is removed from Roiling Horror while it's exiled, target player loses 1 life and you gain 1 life.
@@ -13939,6 +13940,7 @@ subtype=Giant Warrior
power=4
toughness=5
[/card]
#modded ingest
[card]
name=Scalpelexis
text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- Whenever Scalpelexis deals combat damage to a player, that player exiles the top four cards of his or her library. If two or more of those cards have the same name, repeat this process.
@@ -14093,6 +14095,7 @@ text=Look at the top X cards of target opponent's library. Exile one of those ca
mana={X}{U}{B}
type=Sorcery
[/card]
#moverandom?
[card]
name=Search for Survivors
text=Reorder your graveyard at random. An opponent chooses a card at random in your graveyard. If it's a creature card, put it onto the battlefield. Otherwise, exile it.
@@ -14480,6 +14483,7 @@ mana={3}{U}
type=Instant
subtype=Arcane
[/card]
#phaseactionmulti?
[card]
name=Shifty Doppelganger
text={3}{U}, Exile Shifty Doppelganger: You may put a creature card from your hand onto the battlefield. If you do, that creature gains haste until end of turn. At the beginning of the next end step, sacrifice that creature. If you do, return Shifty Doppelganger to the battlefield.
@@ -14944,6 +14948,7 @@ type=Enchantment
subtype=Aura
text=Enchant creature Enchanted creature gets +1/+1 and has "Whenever this creature deals damage to an opponent, you may draw a card." Totem armor (If enchanted creature would be destroyed, instead remove all damage from it and destroy this Aura.)
[/card]
#manaflashback rule
[card]
name=Snapcaster Mage
abilities=flash
@@ -16224,12 +16229,6 @@ type=Sorcery
text=Put a 1/1 colorless Expansion-Symbol creature token into play for each different expansion symbol among permanents you control.
[/card]
[card]
name=Syncopate
text=Counter target spell unless its controller pays {X}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
mana={X}{U}
type=Instant
[/card]
[card]
name=Synod Artificer
text={X}, {T}: Tap X target noncreature artifacts. -- {X}, {T}: Untap X target noncreature artifacts.
mana={2}{U}
@@ -16490,15 +16489,6 @@ type=Planeswalker
subtype=Tezzeret
[/card]
[card]
name=Thada Adel, Acquisitor
text=Islandwalk -- Whenever Thada Adel, Acquisitor deals combat damage to a player, search that player's library for an artifact card and exile it. Then that player shuffles his or her library. Until end of turn, you may play that card.
mana={1}{U}{U}
type=Legendary Creature
subtype=Merfolk Rogue
power=2
toughness=2
[/card]
[card]
name=Thalakos Dreamsower
text=Shadow (This creature can block or be blocked by only creatures with shadow.) -- You may choose not to untap Thalakos Dreamsower during your untap step. -- Whenever Thalakos Dreamsower deals damage to an opponent, tap target creature. That creature doesn't untap during its controller's untap step for as long as Thalakos Dreamsower remains tapped.
mana={2}{U}
@@ -17284,17 +17274,6 @@ mana={2}{U}
type=Sorcery
[/card]
[card]
name=Undead Alchemist
auto=@combatdamaged(player) from(zombie|mybattlefield):deplete:thatmuch opponent && life:thatmuch opponent
auto=@movedTo(creature|opponentgraveyard) from(opponentlibrary):token(Zombie,Creature Zombie,2/2,black)
text=If a Zombie you control would deal combat damage to a player, instead that player puts that many cards from the top of his or her library into his or her graveyard. -- Whenever a creature card is put into an opponent's graveyard from his or her library, exile that card and put a 2/2 black Zombie creature token onto the battlefield.
mana={3}{U}
type=Creature
subtype=Zombie
power=4
toughness=2
[/card]
[card]
name=Undercity Informer
text={1}, Sacrifice a creature: Target player reveals cards from the top of his or her library until he or she reveals a land card, then puts those cards into his or her graveyard.
mana={2}{B}

View File

@@ -213,7 +213,7 @@ public:
COUNTERS = 30,
PUT_INTO_PLAY_WITH_KICKER = 31,
STANDARD_FIZZLER = 32,
CASTINGRAVEYARD_COST = 33,
CASTINGRAVEEXILE_COST = 33,
};
};

View File

@@ -237,7 +237,8 @@ class Constants
PAYZERO = 119,
TRINISPHERE = 120,
CANPLAYFROMEXILE = 121,
NB_BASIC_ABILITIES = 122,
LIBRARYEATER = 122,
NB_BASIC_ABILITIES = 123,
RARITY_S = 'S', //Special Rarity

View File

@@ -184,7 +184,7 @@ public:
MTGPlayFromGraveyardRule(GameObserver* observer, int _id);
const string getMenuText()
{
return "Cast Card From Graveyard";
return "Cast Card From This Zone";
}
virtual MTGPlayFromGraveyardRule * clone() const;
};

View File

@@ -126,7 +126,35 @@ int Damage::resolve()
}
_target->doDamageTest = 1;
}
if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER)
{
if(source->has(Constants::LIBRARYEATER) && typeOfDamage == 1)
{
for (int j = damage; j > 0; j--)
{
if(((Player*)target)->game->library->nb_cards)
((Player*)target)->game->putInZone(((Player*)target)->game->library->cards[((Player*)target)->game->library->nb_cards - 1], ((Player*)target)->game->library, ((Player*)target)->game->graveyard);
}
damage = 0;
}
if(source->alias == 89092 && typeOfDamage == 1)//Szadek Lord of Secrets
{
for (int j = damage; j > 0; j--)
{
if(((Player*)target)->game->library->nb_cards)
((Player*)target)->game->putInZone(((Player*)target)->game->library->cards[((Player*)target)->game->library->nb_cards - 1], ((Player*)target)->game->library, ((Player*)target)->game->graveyard);
source->counters->addCounter(1, 1);
}
damage = 0;
}
if (!damage)
{
state = RESOLVED_NOK;
delete (e);
return 0;
}
}
int a = damage;
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE && (source->has(Constants::WITHER) || source->has(

View File

@@ -150,7 +150,8 @@ const char* Constants::MTGBasicAbilities[] = {
"oppgcreatureexiler",
"payzero",
"trinisphere",
"canplayfromexile"
"canplayfromexile",
"libraryeater"
};
map<string,int> Constants::MTGBasicAbilitiesMap;

View File

@@ -1132,7 +1132,7 @@ MTGMorphCostRule * MTGMorphCostRule::clone() const
MTGPlayFromGraveyardRule::MTGPlayFromGraveyardRule(GameObserver* observer, int _id) :
MTGAlternativeCostRule(observer, _id)
{
aType = MTGAbility::CASTINGRAVEYARD_COST;
aType = MTGAbility::CASTINGRAVEEXILE_COST;
}
int MTGPlayFromGraveyardRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana)
@@ -1140,9 +1140,9 @@ int MTGPlayFromGraveyardRule::isReactingToClick(MTGCardInstance * card, ManaCost
Player * player = game->currentlyActing();
ManaCost * cost = card->getManaCost();
if (!player->game->graveyard->hasCard(card))
if (!player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card))
return 0;
if (!card->has(Constants::CANPLAYFROMGRAVEYARD))
if ((!card->has(Constants::CANPLAYFROMGRAVEYARD) && player->game->graveyard->hasCard(card))||(!card->has(Constants::CANPLAYFROMEXILE) && player->game->exile->hasCard(card)))
return 0;
return MTGAlternativeCostRule::isReactingToClick(card, mana, cost);
@@ -1155,7 +1155,7 @@ int MTGPlayFromGraveyardRule::reactToClick(MTGCardInstance * card)
ManaCost * cost = card->getManaCost();
card->paymenttype = MTGAbility::CASTINGRAVEYARD_COST;
card->paymenttype = MTGAbility::CASTINGRAVEEXILE_COST;
return MTGAlternativeCostRule::reactToClick(card, cost, ManaCost::MANA_PAID_WITH_OTHERCOST);
}