Merge pull request #44 from WagicProject/master

getting master
This commit is contained in:
zethfoxster
2016-08-16 13:29:59 -04:00
committed by GitHub
11 changed files with 119 additions and 55 deletions

View File

@@ -11328,7 +11328,7 @@ type=Enchantment
[/card]
[card]
name=Bloodbond Vampire
auto=@lifed(controller):counter(1/1,1)
auto=@lifeof(player):counter(1/1,1)
text=Whenever you gain life, put a +1/+1 counter on Bloodbond Vampire.
mana={2}{B}{B}
type=Creature
@@ -20226,9 +20226,10 @@ type=Instant
[/card]
[card]
name=Conduit of Ruin
alias=401847
auto=may moveto(myhand) target(creature[colorless;manacost>=7]|mylibrary)
auto=aslongas(thisturn(creature|mystack)~equalto~0) lord(creature|myhand) altercost(colorless,-2)
text=when you cast Conduit of Ruin, you may search your library for a colorless creature with converted mana cost 7 or more and put it into your hand -- the first creature spell you cast each turn costs {2} less to cast
auto=lord(creature|mycastingzone) conduited dontremove
text=When you cast Conduit of Ruin, you may search your library for a colorless creature card with converted mana cost 7 or greater, reveal it, then shuffle your library and put that card on top of it. -- The first creature spell you cast each turn costs {2} less to cast.
mana={6}
type=Creature
subtype=Eldrazi
@@ -25827,7 +25828,7 @@ subtype=Aura
[card]
name=Defiant Bloodlord
abilities=flying
auto=@lifed(controller):life:-thatmuch target(opponent)
auto=@lifeof(player):life:-thatmuch target(opponent)
text=Flying -- Whenever you gain life, target opponent loses that much life.
mana={5}{B}{B}
type=Creature
@@ -56468,7 +56469,7 @@ toughness=2
[/card]
[card]
name=Kalastria Nightwatch
auto=@lifed(controller):flying ueot
auto=@lifeof(player):flying ueot
text=Whenever you gain life, Kalastria Nightwatch gains flying until end of turn.
mana={4}{B}
type=Creature
@@ -64867,7 +64868,7 @@ toughness=1
[card]
name=Malakir Familiar
abilities=flying,deathtouch
auto=@lifed(controller):1/1 ueot
auto=@lifeof(player):1/1 ueot
text=Flying, deathtouch -- Whenever you gain life, Malakir Familiar gets +1/+1 until end of turn.
mana={2}{B}
type=Creature
@@ -74085,7 +74086,7 @@ toughness=1
[/card]
[card]
name=Nirkana Assassin
auto=@lifed(controller):deathtouch ueot
auto=@lifeof(player):deathtouch ueot
text=Whenever you gain life, Nirkana Assassin gains deathtouch until end of turn. (Any amount of damage it deals to a creature is enough to destroy it.)
mana={2}{B}
type=Creature
@@ -81029,7 +81030,8 @@ toughness=11
[/card]
[card]
name=Polis Crusher
abilities=Trample, protection from(enchantment)
abilities=Trample
auto=protection from(enchantment)
auto=this(cantargetcard(*[-monstrous]) {4}{R}{G}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newAbility[@combatdamaged(player) source(this[monstrous]):destroy target(enchantment|opponentbattlefield)])) forever
text=Trample, protection from enchantments -- {4}{R}{G}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- Whenever Polis Crusher deals combat damage to a player, if Polis Crusher is monstrous, destroy target enchantment that player controls.
mana={2}{R}{G}
@@ -94834,7 +94836,7 @@ type=Sorcery
[/card]
[card]
name=Serene Steward
auto=@lifed(controller):pay({W}) counter(1/1) target(creature)
auto=@lifeof(player):pay({W}) counter(1/1) target(creature)
text=Whenever you gain life, you may pay {W}. If you do, put a +1/+1 counter on target creature.
mana={1}{W}
type=Creature
@@ -99100,7 +99102,7 @@ toughness=5
[card]
name=Sky Scourer
abilities=flying
auto=@movedTo(*[colorless]|mystack):+1/0 ueot
auto=@movedTo(*[colorless]|mystack):1/0 ueot
text=Devoid (This card has no color.) -- Flying -- Whenever you cast a colorless spell, Sky Scourer gets +1/+0 until end of turn.
mana={1}{B}
abilities=devoid
@@ -102206,7 +102208,7 @@ toughness=2
[/card]
[card]
name=Spatial Contortion
auto=+3/-3 ueot
auto=3/-3 ueot
target=creature|battlefield
text=({C} represents colorless mana.) -- Target creature gets +3/-3 until end of turn.
mana={1}{C}
@@ -102726,7 +102728,7 @@ toughness=6
[card]
name=Sphinx of the Final Word
abilities=nofizzle,flying,opponentshroud
auto=lord(*|mystack) nofizzle
auto=lord(*[instant;sorcery]|mystack) nofizzle
text=Sphinx of the Final Word can't be countered. -- Flying, hexproof -- Instant and sorcery spells you control can't be countered by spells or abilities.
mana={5}{U}{U}
type=Creature
@@ -104337,7 +104339,7 @@ toughness=4
[/card]
[card]
name=Stalking Drone
auto={c}:+1/+2 ueot limit:1
auto={c}:1/2 limit:1
text=Devoid (This card has no color.) -- {C}: Stalking Drone gets +1/+2 until end of turn. Activate this ability only once each turn. ({C} represents colorless mana.)
mana={1}{G}
abilities=devoid
@@ -105064,7 +105066,7 @@ type=Enchantment
[card]
name=Steppe Glider
abilities=flying,vigilance
auto={w}{1}:target(creature[counter{1/1.1}]) transforms((newability[flying ueot],newability[vigilance ueot])) ueot
auto={w}{1}:target(creature[counter{1/1.1}]) transforms((newability[flying],newability[vigilance])) ueot
text=Flying, vigilance -- {1}{W}: Target creature with a +1/+1 counter on it gains flying and vigilance until end of turn.
mana={4}{W}
type=Creature
@@ -105453,8 +105455,8 @@ toughness=3
[/card]
[card]
name=Stone Haven Outfitter
auto=lord(creature[gear >=1]) +1/+1
auto=@movedto(graveyard) from(creature[gear >=1|mybattlefield):draw:1 controller
auto=lord(creature[geared]|mybattlefield) 1/1
auto=@movedto(graveyard) from(creature[geared]|mybattlefield):draw:1 controller
text=Equipped creatures you control get +1/+1. -- Whenever an equipped creature you control dies, draw a card.
mana={1}{W}
type=Creature
@@ -105553,7 +105555,7 @@ toughness=2
[card]
name=Stoneforge Masterwork
auto={2}:equip
auto=teach(mytgt) type:creature[share!types!]:Battlefield/type:creature[share!types!]:Battlefield nonstatic
auto=teach(creature) transforms((,newability[foreach(other creature[share!types!]|mybattlefield) 1/1]))
text=Equipped creature gets +1/+1 for each other creature you control that shares a creature type with it. -- Equip {2}
mana={1}
type=Artifact
@@ -116934,21 +116936,21 @@ toughness=2
[/card]
[card]
name=Unity of Purpose
auto=ability$!choice untap all(creature[counter{1/1.1}]|mybattlefield)!$ controller
auto=target(<upto:2>other creature|battlefield) counter(1/1,1)
auto=all(creature[counter{1/1.1}]|mybattlefield) untap
text=Support 2. (Put a +1/+1 counter on each of up to two target creatures.) -- Untap each creature you control with a +1/+1 counter on it.
mana={3}{U}
type=Instant
[/card]
[card]
name=Unknown Shores
auto={T}:Add{1}
auto={T}:Add{c}
auto={1}{T}:Add{G}
auto={1}{T}:Add{R}
auto={1}{T}:Add{B}
auto={1}{T}:Add{U}
auto={1}{T}:Add{W}
text={T}: Add {1} to your mana pool. -- {1}, {T}: Add one mana of any color to your mana pool.
text={T}: Add {C} to your mana pool. ({C} represents colorless mana.) -- {1}, {T}: Add one mana of any color to your mana pool.
type=Land
[/card]
[card]
@@ -116987,7 +116989,7 @@ type=Sorcery
[card]
name=Unnatural Endurance
target=creature
auto=+2/+0 ueot
auto=2/0 ueot
auto=regenerate
text=Devoid (This card has no color.) -- Target creature gets +2/+0 until end of turn. Regenerate it.
mana={B}
@@ -117160,7 +117162,7 @@ type=Instant
name=Untamed Hunger
target=creature
auto=teach(creature) menace
auto=+2/+1
auto=2/1
text=Enchant creature -- Enchanted creature gets +2/+1 and has menace. (It can't be blocked except by two or more creatures.)
mana={2}{B}
type=Enchantment
@@ -119900,7 +119902,7 @@ name=Vines of the Recluse
target=creature
auto=untap
auto=reach ueot
auto=+1/+2 ueot
auto=1/2 ueot
text=Target creature gets +1/+2 and gains reach until end of turn. Untap it. (A creature with reach can block creatures with flying.)
mana={G}
type=Instant
@@ -121525,7 +121527,7 @@ toughness=7
[card]
name=Walker of the Wastes
abilities=trample
auto=foreach(waste|mybattlefield) 1/1
auto=foreach(Wastes|mybattlefield) 1/1
text=({C} represents colorless mana.) -- Trample -- Walker of the Wastes gets +1/+1 for each land you control named Wastes.
mana={4}{C}
type=Creature
@@ -121954,7 +121956,7 @@ toughness=3
[/card]
[card]
name=Wall of Resurgence
abilities=defender, haste
abilities=defender
auto=may target(land|mybattlefield) transforms((Elemental Creature,newability[counter(1/1,3)],newability[haste])) forever
text=Defender -- When Wall of Resurgence enters the battlefield, you may put three +1/+1 counters on target land you control. If you do, that land becomes a 0/0 Elemental creature with haste that's still a land.
mana={2}{W}
@@ -122837,6 +122839,12 @@ text={T}: Add {1} to your mana pool. -- {T}, Sacrifice Wasteland: Destroy target
type=Land
[/card]
[card]
name=Wastes
auto={t}:add{c}
text={T}: Add {C} to your mana pool.
type=Basic Land
[/card]
[card]
name=Watchdog
abilities=mustblock
auto=this(untapped) lord(creature[attacking]|opponentbattlefield) -1/0

View File

@@ -65,6 +65,7 @@ class CardDescriptor: public MTGCardInstance
int CDopponentDamaged;
int CDcontrollerDamaged;
int CDdamager;
int CDgeared;
};
#endif

View File

@@ -259,7 +259,8 @@ class Constants
NOLEGENDRULE =137,
CANTTRANSFORM =138,
ASFLASH =139,
NB_BASIC_ABILITIES = 140,
CONDUITED = 140,
NB_BASIC_ABILITIES = 141,
RARITY_S = 'S', //Special Rarity
RARITY_M = 'M', //Mythics

View File

@@ -103,6 +103,7 @@ class MTGGameZone {
void cleanupPhase();
void beforeBeginPhase();
unsigned int countByAlias(int number = 0);
unsigned int countByType(const string &value);
unsigned int countByCanTarget(TargetChooser * tc);
unsigned int countTotalManaSymbols(TargetChooser * tc, int color);

View File

@@ -24,6 +24,7 @@ CardDescriptor::CardDescriptor()
CDopponentDamaged = 0;
CDcontrollerDamaged = 0;
CDdamager = 0;
CDgeared = 0;
}
int CardDescriptor::init()
@@ -211,6 +212,11 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
match = NULL;
}
if ((CDgeared == -1 && card->equipment > 0) || (CDgeared == 1 && card->equipment < 1))
{
match = NULL;
}
if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored))
{
match = NULL;

View File

@@ -1361,6 +1361,17 @@ bool CardGui::FilterCard(MTGCard * _card,string filter)
cd.unsecuresetfresh(1);
}
}
else if (attribute.find("geared") != string::npos)
{
if (minus)
{
cd.CDgeared = -1;
}
else
{
cd.CDgeared = 1;
}
}
//creature is a level up creature
else if (attribute.find("leveler") != string::npos)
{

View File

@@ -1121,6 +1121,7 @@ void GameObserver::Affinity()
card->has(Constants::AFFINITYMOUNTAIN) ||
card->has(Constants::AFFINITYPLAINS) ||
card->has(Constants::AFFINITYSWAMP) ||
card->has(Constants::CONDUITED) ||
card->getIncreasedManaCost()->getConvertedCost() ||
card->getReducedManaCost()->getConvertedCost() ||
NewAffinityFound)

View File

@@ -1090,7 +1090,8 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
card->has(Constants::AFFINITYISLAND) ||
card->has(Constants::AFFINITYMOUNTAIN) ||
card->has(Constants::AFFINITYPLAINS) ||
card->has(Constants::AFFINITYSWAMP))
card->has(Constants::AFFINITYSWAMP) ||
card->has(Constants::CONDUITED))
{//start3
if (card->has(Constants::AFFINITYARTIFACTS))
{
@@ -1145,6 +1146,14 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
reduce = card->controller()->game->battlefield->countByCanTarget(tc);
SAFE_DELETE(tc);
}
else if (card->has(Constants::CONDUITED))
{//I had to hardcode this since it doesn't update with auto=this(creaturespells<1) lord(creature|mycastingzone) altercost(colorless,-2)
color = 0;
reduce = card->controller()->inPlay()->countByAlias(401847);
reduce *= 2;
if(card->controller()->game->stack->seenThisTurn("creature", Constants::CAST_ALL) > 0)
reduce = 0;
}
else
{
reduce = card->controller()->game->battlefield->countByType(type);

View File

@@ -170,7 +170,8 @@ const char* Constants::MTGBasicAbilities[] = {
"tempflashback",
"legendruleremove",
"canttransform",
"asflash"
"asflash",
"conduited"
};
map<string,int> Constants::MTGBasicAbilitiesMap;

View File

@@ -643,6 +643,20 @@ size_t MTGGameZone::getIndex(MTGCardInstance * card)
return -1;
}
unsigned int MTGGameZone::countByAlias(int number)
{
if(!number)
return 0;
int result = 0;
for (int i = 0; i < (nb_cards); i++)
{
if (cards[i]->alias == number)
{
result++;
}
}
return result;
}
unsigned int MTGGameZone::countByType(const string &value)
{

View File

@@ -444,6 +444,17 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
cd->unsecuresetfresh(1);
}
}
else if (attribute.find("geared") != string::npos)
{
if (minus)
{
cd->CDgeared = -1;
}
else
{
cd->CDgeared = 1;
}
}
//creature is a level up creature
else if (attribute.find("leveler") != string::npos)
{