Fix for Devotion, added some "Chroma" cards
This commit is contained in:
@@ -40413,6 +40413,17 @@ power=2
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Heartlash Cinder
|
||||
abilities=haste
|
||||
auto=type:manar/0 ueot
|
||||
text=Haste -- Chroma - When Heartlash Cinder enters the battlefield, it gets +X/+0 until end of turn, where X is the number of red mana symbols in the mana costs of permanents you control.
|
||||
mana={1}{R}
|
||||
type=Creature
|
||||
subtype=Elemental Warrior
|
||||
power=1
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Heartless Hidetsugu
|
||||
text={T}: Heartless Hidetsugu deals damage to each player equal to half that player's life total, rounded down.
|
||||
auto={t}:damage:halfdownlifetotal controller && damage:halfdownopponentlifetotal opponent
|
||||
@@ -63547,6 +63558,16 @@ mana={3}{B}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Outrage Shaman
|
||||
auto=damage:type:manar target(creature)
|
||||
text=Chroma - When Outrage Shaman enters the battlefield, it deals damage to target creature equal to the number of red mana symbols in the mana costs of permanents you control.
|
||||
mana={3}{R}{R}
|
||||
type=Creature
|
||||
subtype=Goblin Shaman
|
||||
power=2
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Outrider of Jhess
|
||||
abilities=exalted
|
||||
text=Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)
|
||||
@@ -67553,6 +67574,17 @@ type=Enchantment
|
||||
subtype=Aura
|
||||
[/card]
|
||||
[card]
|
||||
name=Primalcrux
|
||||
abilities=trample
|
||||
auto=thisforeach(variable{type:manag:mybattlefield}>0) 1/1
|
||||
text=Trample -- Chroma - Primalcrux's power and toughness are each equal to the number of green mana symbols in the mana costs of permanents you control.
|
||||
mana={G}{G}{G}{G}{G}{G}
|
||||
type=Creature
|
||||
subtype=Elemental
|
||||
power=*
|
||||
toughness=*
|
||||
[/card]
|
||||
[card]
|
||||
name=Prime Speaker Zegana
|
||||
auto=counter(1/1,power:highest:creature:mybattlefield) && draw:power
|
||||
text=Prime Speaker Zegana enters the battlefield with X +1/+1 counters on it, where X is the greatest power among other creatures you control. -- When Prime Speaker Zegana enters the battlefield, draw cards equal to its power.
|
||||
@@ -85813,6 +85845,16 @@ power=3
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Springjack Shepherd
|
||||
auto=token(Goat,Creature Goat,0/1,white)*type:manaw
|
||||
text=Chroma - When Springjack Shepherd enters the battlefield, put a 0/1 white Goat creature token onto the battlefield for each white mana symbol in the mana costs of permanents you control.
|
||||
mana={3}{W}
|
||||
type=Creature
|
||||
subtype=Kithkin Wizard
|
||||
power=1
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Springleaf Drum
|
||||
auto={T}{T(other creature|myBattlefield)}:Add{W}
|
||||
auto={T}{T(other creature|myBattlefield)}:Add{U}
|
||||
@@ -95775,6 +95817,16 @@ mana={4}
|
||||
type=Artifact
|
||||
[/card]
|
||||
[card]
|
||||
name=Umbra Stalker
|
||||
auto=thisforeach(variable{type:manab:mygraveyard}>0) 1/1
|
||||
text=Chroma - Umbra Stalker's power and toughness are each equal to the number of black mana symbols in the mana costs of cards in your graveyard.
|
||||
mana={4}{B}{B}{B}
|
||||
type=Creature
|
||||
subtype=Elemental
|
||||
power=*
|
||||
toughness=*
|
||||
[/card]
|
||||
[card]
|
||||
name=Umbral Mantle
|
||||
auto=teach(creature) {3}{q}:+2/+2 ueot
|
||||
auto={0}:equip
|
||||
|
||||
@@ -7045,16 +7045,6 @@ mana={2}{G}
|
||||
type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Heartlash Cinder
|
||||
abilities=haste
|
||||
text=Haste -- Chroma - When Heartlash Cinder enters the battlefield, it gets +X/+0 until end of turn, where X is the number of red mana symbols in the mana costs of permanents you control.
|
||||
mana={1}{R}
|
||||
type=Creature
|
||||
subtype=Elemental Warrior
|
||||
power=1
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Heartstone
|
||||
text=Activated abilities of creatures cost {1} less to activate. This effect can't reduce the amount of mana an ability costs to activate to less than one mana.
|
||||
mana={3}
|
||||
@@ -11490,15 +11480,6 @@ mana={X}{R}
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Outrage Shaman
|
||||
text=Chroma - When Outrage Shaman enters the battlefield, it deals damage to target creature equal to the number of red mana symbols in the mana costs of permanents you control.
|
||||
mana={3}{R}{R}
|
||||
type=Creature
|
||||
subtype=Goblin Shaman
|
||||
power=2
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Outrider en-Kor
|
||||
text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- {0}: The next 1 damage that would be dealt to Outrider en-Kor this turn is dealt to target creature you control instead.
|
||||
mana={2}{W}
|
||||
@@ -12350,15 +12331,6 @@ power=2
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Primalcrux
|
||||
text=Trample -- Chroma - Primalcrux's power and toughness are each equal to the number of green mana symbols in the mana costs of permanents you control.
|
||||
mana={G}{G}{G}{G}{G}{G}
|
||||
type=Creature
|
||||
subtype=Elemental
|
||||
power=*
|
||||
toughness=*
|
||||
[/card]
|
||||
[card]
|
||||
name=Primitive Etchings
|
||||
text=Reveal the first card you draw each turn. Whenever you reveal a creature card this way, draw a card.
|
||||
mana={2}{G}{G}
|
||||
@@ -15830,15 +15802,6 @@ text={T}: Add {1} to your mana pool. -- {4}, {T}: Put a 0/1 white Goat creature
|
||||
type=Land
|
||||
[/card]
|
||||
[card]
|
||||
name=Springjack Shepherd
|
||||
text=Chroma - When Springjack Shepherd enters the battlefield, put a 0/1 white Goat creature token onto the battlefield for each white mana symbol in the mana costs of permanents you control.
|
||||
mana={3}{W}
|
||||
type=Creature
|
||||
subtype=Kithkin Wizard
|
||||
power=1
|
||||
toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Sprout Swarm
|
||||
text=Convoke (Each creature you tap while casting this spell reduces its total cost by {1} or by one mana of that creature's color.) -- Buyback {3} (You may pay an additional {3} as you cast this spell. If you do, put this card into your hand as it resolves.) -- Put a 1/1 green Saproling creature token onto the battlefield.
|
||||
mana={1}{G}
|
||||
@@ -17631,15 +17594,6 @@ toughness=2
|
||||
text=Auras attached to permanents you control have totem armor. (If an enchanted permanent you control would be destroyed, instead remove all damage from it and destroy an Aura attached to it.)
|
||||
[/card]
|
||||
[card]
|
||||
name=Umbra Stalker
|
||||
text=Chroma - Umbra Stalker's power and toughness are each equal to the number of black mana symbols in the mana costs of cards in your graveyard.
|
||||
mana={4}{B}{B}{B}
|
||||
type=Creature
|
||||
subtype=Elemental
|
||||
power=*
|
||||
toughness=*
|
||||
[/card]
|
||||
[card]
|
||||
name=Unblinking Bleb
|
||||
text=Morph {2}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- Whenever Unblinking Bleb or another permanent is turned face up, you may scry 2. (To scry 2, look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)
|
||||
mana={3}{U}
|
||||
|
||||
@@ -183,10 +183,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 2);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 5);
|
||||
intValue += zone->countDevotion(dtc, 2);
|
||||
intValue += zone->countDevotion(dtc, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -203,10 +203,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 3);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 5);
|
||||
intValue += zone->countDevotion(dtc, 3);
|
||||
intValue += zone->countDevotion(dtc, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,10 +223,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 2);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 4);
|
||||
intValue += zone->countDevotion(dtc, 2);
|
||||
intValue += zone->countDevotion(dtc, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -243,10 +243,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 1);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 4);
|
||||
intValue += zone->countDevotion(dtc, 1);
|
||||
intValue += zone->countDevotion(dtc, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -263,10 +263,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 1);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 3);
|
||||
intValue += zone->countDevotion(dtc, 1);
|
||||
intValue += zone->countDevotion(dtc, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -283,10 +283,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 2);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 3);
|
||||
intValue += zone->countDevotion(dtc, 2);
|
||||
intValue += zone->countDevotion(dtc, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -303,10 +303,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 4);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 5);
|
||||
intValue += zone->countDevotion(dtc, 4);
|
||||
intValue += zone->countDevotion(dtc, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,10 +323,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 3);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 4);
|
||||
intValue += zone->countDevotion(dtc, 3);
|
||||
intValue += zone->countDevotion(dtc, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,10 +343,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 1);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 5);
|
||||
intValue += zone->countDevotion(dtc, 1);
|
||||
intValue += zone->countDevotion(dtc, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -363,10 +363,10 @@ private:
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
MTGGameZone * zone = dzones[k];
|
||||
if (dtc->targetsZone(zone, card))
|
||||
if (dtc->targetsZone(zone, card)&&dp == card->controller())
|
||||
{
|
||||
intValue += zone->countTotalManaSymbols(dtc, 1);
|
||||
intValue += zone->countTotalManaSymbols(dtc, 2);
|
||||
intValue += zone->countDevotion(dtc, 1);
|
||||
intValue += zone->countDevotion(dtc, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ class MTGGameZone {
|
||||
unsigned int countByType(const string &value);
|
||||
unsigned int countByCanTarget(TargetChooser * tc);
|
||||
unsigned int countTotalManaSymbols(TargetChooser * tc, int color);
|
||||
unsigned int countDevotion(TargetChooser * tc, int color); //devotion for gods
|
||||
MTGCardInstance * findByName(string name);
|
||||
|
||||
//returns true if one of the cards in the zone has the ability
|
||||
|
||||
@@ -99,6 +99,7 @@ public:
|
||||
string toString();
|
||||
int getCost(int color);
|
||||
int getManaSymbols(int color);
|
||||
int getManaSymbolsHybridMerged(int color);
|
||||
|
||||
//Returns NULL if i is greater than nbhybrids
|
||||
ManaCostHybrid * getHybridCost(unsigned int i);
|
||||
|
||||
@@ -19,6 +19,7 @@ public:
|
||||
string toString();
|
||||
int getConvertedCost();
|
||||
int getManaSymbols(int color);
|
||||
int getManaSymbolsHybridMerged(int color);
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& out, ManaCostHybrid& m);
|
||||
friend std::ostream& operator<<(std::ostream& out, ManaCostHybrid* m);
|
||||
|
||||
@@ -580,6 +580,24 @@ unsigned int MTGGameZone::countTotalManaSymbols(TargetChooser * tc, int color)
|
||||
return result;
|
||||
}
|
||||
|
||||
unsigned int MTGGameZone::countDevotion(TargetChooser * tc, int color)
|
||||
{
|
||||
if (!tc) {
|
||||
return 0;
|
||||
}
|
||||
// we don't care if cards have protection.
|
||||
bool withoutProtections = true;
|
||||
int result = 0;
|
||||
for (int i = 0; i < nb_cards; i++)
|
||||
{
|
||||
if (tc->canTarget(cards[i], withoutProtections))
|
||||
{
|
||||
result += cards[i]->getManaCost()->getManaSymbolsHybridMerged(color);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
MTGCardInstance * MTGGameZone::findByName(string name)
|
||||
{
|
||||
for (int i = 0; i < (nb_cards); i++)
|
||||
|
||||
@@ -618,6 +618,27 @@ int ManaCost::getManaSymbols(int color)
|
||||
return result;
|
||||
}
|
||||
|
||||
int ManaCost::getManaSymbolsHybridMerged(int color)
|
||||
{
|
||||
int result = cost[color];
|
||||
for (size_t i = 0; i < hybrids.size(); ++i)
|
||||
{
|
||||
result = hybrids[i].getManaSymbolsHybridMerged(color);//removed +
|
||||
}
|
||||
if (extraCosts && extraCosts->costs.size())
|
||||
{
|
||||
for (size_t i = 0; i < extraCosts->costs.size(); ++i)
|
||||
{
|
||||
LifeorManaCost * phyrexianMana = dynamic_cast<LifeorManaCost*>(extraCosts->costs[i]);
|
||||
if (phyrexianMana)
|
||||
{
|
||||
result += phyrexianMana->getManaCost()->getManaSymbolsHybridMerged(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int ManaCost::parseManaSymbol(char symbol)
|
||||
{
|
||||
switch (symbol)
|
||||
|
||||
@@ -58,6 +58,14 @@ int ManaCostHybrid::getManaSymbols(int color)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManaCostHybrid::getManaSymbolsHybridMerged(int color)
|
||||
{
|
||||
// we assume that color1 and color2 are different
|
||||
if (color1 == color) return value1;
|
||||
if (color2 == color) return value2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ManaCostHybrid::hasColor(int color)
|
||||
{
|
||||
if (((color1 == color) && value1) || ((color2 == color) && value2))
|
||||
|
||||
Reference in New Issue
Block a user