Added last primitives from MAT set, updated missing cards by set list, improved trigger and filtering for mana production abilities.
This commit is contained in:
@@ -11,15 +11,6 @@ mana={2}{U}{B}{R}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Winding Constrictor
|
||||
text=If one or more counters would be placed on an artifact or creature you control, that many plus one of each of those kinds of counters are placed on that permanent instead. -- If you would get one or more counters, you get that many plus one of each of those kinds of counters instead.
|
||||
mana={B}{G}
|
||||
type=Creature
|
||||
subtype=Snake
|
||||
power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Crackdown Construct
|
||||
text=Whenever you activate an ability of an artifact or creature that isn't a mana ability, Crackdown Construct gets +1/+1 until end of turn.
|
||||
mana={4}
|
||||
|
||||
@@ -32,15 +32,6 @@ power=1
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Winding Constrictor
|
||||
text=If one or more counters would be placed on an artifact or creature you control, that many plus one of each of those kinds of counters are placed on that permanent instead. -- If you would get one or more counters, you get that many plus one of each of those kinds of counters instead.
|
||||
mana={B}{G}
|
||||
type=Creature
|
||||
subtype=Snake
|
||||
power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Combustible Gearhulk
|
||||
abilities=first strike
|
||||
text=First strike -- When Combustible Gearhulk enters the battlefield, target opponent may have you draw three cards. If the player doesn't, put the top three cards of your library into your graveyard, then Combustible Gearhulk deals damage to that player equal to the total converted mana cost of those cards.
|
||||
|
||||
@@ -4,3 +4,9 @@ text=Activated abilities of creatures you control cost up to {2} less to activat
|
||||
mana={U}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Deification
|
||||
text=As Deification enters the battlefield, choose a planeswalker type. -- Planeswalkers you control of the chosen type have hexproof. -- As long as you control a creature, if damage dealt to a planeswalker you control of the chosen type would result in all loyalty counters on it being removed, instead all but one of those counters are removed.
|
||||
mana={1}{W}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
|
||||
@@ -38,15 +38,6 @@ mana={2}{R}{R}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Winding Constrictor
|
||||
text=If one or more counters would be placed on an artifact or creature you control, that many plus one of each of those kinds of counters are placed on that permanent instead. -- If you would get one or more counters, you get that many plus one of each of those kinds of counters instead.
|
||||
mana={B}{G}
|
||||
type=Creature
|
||||
subtype=Snake
|
||||
power=2
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Goblin Charbelcher
|
||||
text={3}, {T}: Reveal cards from the top of your library until you reveal a land card. Goblin Charbelcher deals damage equal to the number of nonland cards revealed this way to target creature or player. If the revealed land card was a Mountain, Goblin Charbelcher deals double that damage instead. Put the revealed cards on the bottom of your library in any order.
|
||||
mana={4}
|
||||
|
||||
@@ -8,51 +8,30 @@ Imperial Recovery Unit
|
||||
Ossuary Rats
|
||||
Rodolf Duskbringer
|
||||
Skullslither Worm
|
||||
Suspicious Shambler
|
||||
Termination Facilitator
|
||||
Ardoz, Cobbler of War
|
||||
Auntie Blyte, Bad Influence
|
||||
Brazen Cannonade
|
||||
Coalborn Entity
|
||||
Daring Piracy
|
||||
Goblin Researcher
|
||||
Kenessos, Priest of Thassa
|
||||
Launch Mishap
|
||||
Merfolk Pupil
|
||||
Pirated Copy
|
||||
Soul Read
|
||||
Synchronized Eviction
|
||||
Ashcoat of the Shadow Swarm
|
||||
Conductor of Cacophony
|
||||
Creeping Bloodsucker
|
||||
Deadly Plot
|
||||
Disciple of Perdition
|
||||
Mizzix, Replica Rider
|
||||
Ogre Battlecaster
|
||||
Plundering Predator
|
||||
Benevolent Hydra
|
||||
Giant Ladybug
|
||||
Kibo, Uktabi Prince
|
||||
Mild-Mannered Librarian
|
||||
Primeval Herald
|
||||
Rampaging Growth
|
||||
Runadi, Behemoth Caller
|
||||
Spectral Hunt-Caller
|
||||
Towering Gibbon
|
||||
Zask, Skittering Swarmlord
|
||||
Dutiful Replicator
|
||||
Infernal Idol
|
||||
Instruments of War
|
||||
Planar Atlas
|
||||
Angelic Cub
|
||||
Chains of Custody
|
||||
Distinguished Conjurer
|
||||
Ingenious Leonin
|
||||
Lita, Mechanical Engineer
|
||||
Magnanimous Magistrate
|
||||
Preston, the Vanisher
|
||||
Alandra, Sky Dreamer
|
||||
Biblioplex Kraken
|
||||
Hold for Questioning
|
||||
Isu the Abominable
|
||||
Agrus Kos, Eternal Soldier
|
||||
@@ -407,55 +386,7 @@ Protection Racket
|
||||
Misfortune Teller
|
||||
Devastating Dreams
|
||||
Darksteel Garrison
|
||||
Spark Rupture
|
||||
Nissa, Resurgent Animist
|
||||
Undercity Upheaval
|
||||
Leyline Immersion
|
||||
Campus Renovation
|
||||
Open the Way
|
||||
Calix, Guided by Fate
|
||||
Danitha, New Benalia's Light
|
||||
Cosmic Rebirth
|
||||
Arni Metalbrow
|
||||
Urborg Scavengers
|
||||
Plargg and Nassari
|
||||
Kolaghan Warmonger
|
||||
Tranquil Frillback
|
||||
Reckless Handling
|
||||
Blot Out
|
||||
Ayara's Oathsworn
|
||||
Markov Baron
|
||||
Death-Rattle Oni
|
||||
Metropolis Reformer
|
||||
Harnessed Snubhorn
|
||||
Filter Out
|
||||
Tazri, Stalwart Survivor
|
||||
Tolarian Contempt
|
||||
Vesuvan Drifter
|
||||
Sarkhan, Soul Aflame
|
||||
Tyvar the Bellicose
|
||||
Karn, Legacy Reforged
|
||||
Sigarda, Font of Blessings
|
||||
Animist's Might
|
||||
Drannith Ruins
|
||||
Deification
|
||||
Coppercoat Vanguard
|
||||
Jolrael, Voice of Zhalfir
|
||||
Rebuild the City
|
||||
Pia Nalaar, Consul of Revival
|
||||
Samut, Vizier of Naktamun
|
||||
Rocco, Street Chef
|
||||
Nahiri's Resolve
|
||||
Nahiri, Forged in Fury
|
||||
Nashi, Moon's Legacy
|
||||
Narset, Enlightened Exile
|
||||
Ob Nixilis, Captive Kingpin
|
||||
Niv-Mizzet, Supreme
|
||||
Gold-Forged Thopteryx
|
||||
Feast of the Victorious Dead
|
||||
The Kenriths' Royal Funeral
|
||||
Jirina, Dauntless General
|
||||
Kiora, Sovereign of the Deep
|
||||
Gala Greeters
|
||||
Jinnie Fay, Jetmir's Second
|
||||
Hostile Takeover
|
||||
@@ -718,7 +649,6 @@ Reckoner Bankbuster
|
||||
Norika Yamazaki, the Poet
|
||||
The Reality Chip
|
||||
Flame Discharge
|
||||
Michiko's Reign of Truth
|
||||
Mirror Box
|
||||
Blade of the Oni
|
||||
Mechtitan Core
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -278,6 +278,34 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class TrCardManaproduced: public Trigger
|
||||
{
|
||||
public:
|
||||
bool limitOnceATurn;
|
||||
int triggeredTurn;
|
||||
TrCardManaproduced(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, bool once = false, bool limitOnceATurn = false) :
|
||||
Trigger(observer, id, source, once, tc), limitOnceATurn(limitOnceATurn)
|
||||
{
|
||||
triggeredTurn = -1;
|
||||
}
|
||||
|
||||
int triggerOnEventImpl(WEvent * event)
|
||||
{
|
||||
WEventCardManaProduced * e = dynamic_cast<WEventCardManaProduced *> (event);
|
||||
if (!e) return 0;
|
||||
if (limitOnceATurn && triggeredTurn == game->turn)
|
||||
return 0;
|
||||
if (!tc->canTarget(e->card)) return 0;
|
||||
triggeredTurn = game->turn;
|
||||
return 1;
|
||||
}
|
||||
|
||||
TrCardManaproduced * clone() const
|
||||
{
|
||||
return NEW TrCardManaproduced(*this);
|
||||
}
|
||||
};
|
||||
|
||||
class TrCardPhasesIn: public Trigger
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -150,8 +150,10 @@ public:
|
||||
int summoningSickness;
|
||||
ManaCost reducedCost;
|
||||
ManaCost increasedCost;
|
||||
ManaCost producedMana;
|
||||
ManaCost * getReducedManaCost();
|
||||
ManaCost * getIncreasedManaCost();
|
||||
ManaCost * getProducedMana();
|
||||
bool matchesCastFilter(int castMethod);
|
||||
bool hasTotemArmor();
|
||||
|
||||
|
||||
@@ -161,6 +161,10 @@ struct WEventCardTappedForMana : public WEventCardUpdate {
|
||||
virtual Targetable * getTarget(int target);
|
||||
};
|
||||
|
||||
struct WEventCardManaProduced : public WEventCardUpdate {
|
||||
WEventCardManaProduced(MTGCardInstance * card);
|
||||
virtual Targetable * getTarget(int target);
|
||||
};
|
||||
|
||||
//Event when a card's "attacker" status changes
|
||||
//before:Player/Planeswalker that card was attacking previously
|
||||
|
||||
@@ -1318,7 +1318,11 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell
|
||||
//Card Tapped for mana
|
||||
if (TargetChooser *tc = parseSimpleTC(s,"tappedformana", card))
|
||||
return NEW TrCardTappedformana(observer, id, card, tc, true, once);
|
||||
|
||||
|
||||
//Card Produced some mana
|
||||
if (TargetChooser *tc = parseSimpleTC(s,"producedmana", card))
|
||||
return NEW TrCardManaproduced(observer, id, card, tc, once, limitOnceATurn);
|
||||
|
||||
//Card Transforms
|
||||
if (TargetChooser *tc = parseSimpleTC(s,"transformed", card))
|
||||
return NEW TrCardTransformed(observer, id, card, tc, once);
|
||||
@@ -8051,6 +8055,10 @@ int AManaProducer::resolve()
|
||||
player->getManaPool()->add(output, source);
|
||||
if(DoesntEmpty)
|
||||
player->doesntEmpty->add(output);
|
||||
source->getProducedMana()->copy(output);
|
||||
WEventCardManaProduced * ev = NEW WEventCardManaProduced(source);
|
||||
if(ev)
|
||||
source->getObserver()->receiveEvent(ev);
|
||||
if(andAbility)
|
||||
{
|
||||
MTGAbility * andAbilityClone = andAbility->clone();
|
||||
|
||||
@@ -586,6 +586,10 @@ ManaCost* MTGCardInstance::getIncreasedManaCost()
|
||||
{
|
||||
return &increasedCost;
|
||||
}
|
||||
ManaCost* MTGCardInstance::getProducedMana()
|
||||
{
|
||||
return &producedMana;
|
||||
}
|
||||
|
||||
//sets card as attacked and sends events
|
||||
void MTGCardInstance::eventattacked()
|
||||
|
||||
@@ -75,6 +75,11 @@ WEventCardTappedForMana::WEventCardTappedForMana(MTGCardInstance * card, bool be
|
||||
{
|
||||
}
|
||||
|
||||
WEventCardManaProduced::WEventCardManaProduced(MTGCardInstance * card) :
|
||||
WEventCardUpdate(card)
|
||||
{
|
||||
}
|
||||
|
||||
WEventCardAttacked::WEventCardAttacked(MTGCardInstance * card) :
|
||||
WEventCardUpdate(card)
|
||||
{
|
||||
@@ -539,6 +544,12 @@ Targetable * WEventCardTappedForMana::getTarget(int target)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventCardManaProduced::getTarget(int target)
|
||||
{
|
||||
if (target) return card;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Targetable * WEventcardDraw::getTarget(Player * player)
|
||||
{
|
||||
if (player) return player;
|
||||
|
||||
@@ -1581,6 +1581,26 @@ void WParsedInt::extendedParse(string s, Spell * spell, MTGCardInstance * card)
|
||||
intValue = card->getManaCost()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_WHITE);
|
||||
else intValue = 0;
|
||||
}
|
||||
else if(s.find("prodmana") != string::npos){
|
||||
intValue = 0;
|
||||
string manatocheck = s.substr(8);
|
||||
if(card->getProducedMana()){
|
||||
if(manatocheck == "c")
|
||||
intValue = card->getProducedMana()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_ARTIFACT);
|
||||
else if(manatocheck == "g")
|
||||
intValue = card->getProducedMana()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_GREEN);
|
||||
else if(manatocheck == "u")
|
||||
intValue = card->getProducedMana()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_BLUE);
|
||||
else if(manatocheck == "r")
|
||||
intValue = card->getProducedMana()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_RED);
|
||||
else if(manatocheck == "b")
|
||||
intValue = card->getProducedMana()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_BLACK);
|
||||
else if(manatocheck == "w")
|
||||
intValue = card->getProducedMana()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_WHITE);
|
||||
else if(manatocheck == "tot")
|
||||
intValue = card->getProducedMana()->getConvertedCost();
|
||||
}
|
||||
}
|
||||
else if(!intValue)//found nothing, try parsing a atoi
|
||||
{
|
||||
intValue = atoi(s.c_str());
|
||||
|
||||
Reference in New Issue
Block a user