diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index fa969be8a..8fe339d68 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -3154,7 +3154,7 @@ toughness=3 [/card] [card] name=Ancient of the Equinox -abilities=opponentshroud, trample +abilities=opponentshroud,trample text=Trample, hexproof type=Creature subtype=Treefolk @@ -9148,7 +9148,7 @@ toughness=2 [/card] [card] name=Bearer of Silence -abilities=flying, cantblock +abilities=flying,cantblock auto=pay({1}{c}) ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ opponent text=Devoid (This card has no color.) -- When you cast Bearer of Silence, you may pay {1}{C}. If you do, target opponent sacrifices a creature. ({C} represents colorless mana.) -- Flying -- Bearer of Silence can't block. mana={1}{B} @@ -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 @@ -23233,7 +23234,7 @@ type=Instant [/card] [card] name=Cyclone Sire -abilities=flying, haste +abilities=flying,haste auto=@movedTo(this|graveyard) from(battlefield):may target(land|mybattlefield) transforms((Elemental Creature,newability[counter(1/1,3)],newability[haste])) forever text=Flying -- When Cyclone Sire dies, 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={4}{U} @@ -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 @@ -42286,7 +42287,7 @@ type=Enchantment [/card] [card] name=Ghostly Sentinel -abilities=flying, vigilance +abilities=flying,vigilance text=Flying, vigilance mana={4}{W} 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 @@ -64055,7 +64056,7 @@ type=Sorcery [/card] [card] name=Macetail Hystrodon -abilities=haste, first strike +abilities=haste,first strike autohand=__CYCLING__({3}) text=First strike, haste -- Cycling {3} ({3}, Discard this card: Draw a card.) mana={6}{R} @@ -64866,8 +64867,8 @@ toughness=1 [/card] [card] name=Malakir Familiar -abilities=flying, deathtouch -auto=@lifed(controller):1/1 ueot +abilities=flying,deathtouch +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 @@ -66382,7 +66383,7 @@ toughness=4 [/card] [card] name=Master of Cruelties -abilities=first strike, deathtouch +abilities=first strike,deathtouch auto=@combat(attacking) source(mytgt) restriction{type(creature[attacking]|myBattlefield)~morethan~1}:all(this) removefromcombat && untap auto=@combat(notblocked) source(this):preventAllCombatDamage from(this) ueot && lifeset:1 opponent forever text=First Strike. -- Deathtouch. -- Master of Cruelties can only attack alone. -- Whenever Master of Cruelties attacks a player and isn't blocked, that player's life total becomes 1. -- Master of Cruelties assigns no combat damage this combat. @@ -68549,7 +68550,7 @@ toughness=2 [/card] [card] name=Mindwrack Demon -abilities=flying, trample +abilities=flying,trample auto=deplete:4 controller auto=@each my upkeep restriction{notdelirum}:life:-4 controller text=Flying, trample -- When Mindwrack Demon enters the battlefield, put the top four cards of your library into your graveyard. -- Delirium At the beginning of your upkeep, you lose 4 life unless there are four or more card types among cards in your graveyard. @@ -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 @@ -74212,7 +74213,7 @@ type=Instant [/card] [card] name=Nivix Barrier -abilities=flash, defender +abilities=flash,defender auto=target(creature[attacking]) -4/-0 ueot text=Flash (You may cast this spell any time you could cast an instant.) -- Defender (This creature can't attack.) -- When Nivix Barrier enters the battlefield, target attacking creature gets -4/-0 until end of turn. mana={3}{U} @@ -75850,7 +75851,7 @@ toughness=3 [/card] [card] name=Olivia's Bloodsworn -abilities=flying, cantblock +abilities=flying,cantblock auto={R}:target(vampire) haste ueot text=Flying -- Olivia's Bloodsworn can't block. -- {R}: Target Vampire gains haste until end of turn. mana={1}{B} @@ -76936,7 +76937,7 @@ toughness=3 [/card] [card] name=Ormendahl, Profane Prince -abilities=flying, haste, indestructible, lifelink +abilities=flying,haste,indestructible,lifelink auto=untap text=Flying, lifelink, indestructible, haste type=Legendary 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} @@ -81442,7 +81444,7 @@ type=Enchantment [/card] [card] name=Predator Dragon -abilities=flying, haste +abilities=flying,haste auto=may target(other creature|mybattlefield) sacrifice && counter(1/1,2) all(this) text=Flying, haste -- Devour 2 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with twice that many +1/+1 counters on it.) mana={3}{R}{R}{R} @@ -85170,7 +85172,7 @@ toughness=3 [/card] [card] name=Rattlechains -abilities=flash, flying +abilities=flash,flying auto=target(spirit) hexproof ueot auto=lord(spirit|myhand,mylibrary,mygraveyard,myexile) asflash text=Flash -- Flying -- When Rattlechains enters the battlefield, target Spirit gains hexproof until end of turn. -- You may cast Spirit spells as though they had flash. @@ -90169,7 +90171,7 @@ type=Sorcery [/card] [card] name=Ruric Thar, the Unbowed -abilities=vigilance, reach, mustattack +abilities=vigilance,reach,mustattack auto=@movedTo(*[-creature]|mystack):life:-6 controller auto=@movedTo(*[-creature]|opponentstack):life:-6 opponent text=Ruric Thar, the Unbowed attacks each turn if able. -- Whenever a player casts a noncreature spell, Ruric Thar deals 6 damage to that player @@ -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 @@ -97310,7 +97312,7 @@ type=Sorcery [/card] [card] name=Sigarda, Heron's Grace -abilities=flying, playershroud +abilities=flying,playershroud auto=lord(human|mybattlefield) hexproof auto={2}{E(*|mygraveyard)}:token(Human Soldier,Creature Human Soldier,1/1,white) text=Flying -- You and Humans you control have hexproof. -- {2}, Exile a card from your graveyard: Put a 1/1 white Human Soldier creature token onto the battlefield. @@ -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 @@ -99582,7 +99584,7 @@ toughness=* [/card] [card] name=Skysnare Spider -abilities=vigilance, reach +abilities=vigilance,reach text=Vigilance (Attacking doesn't cause this creature to tap.) -- Reach (This creature can block creatures with flying.) mana={4}{G}{G} type=Creature @@ -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} @@ -102725,8 +102727,8 @@ toughness=6 [/card] [card] name=Sphinx of the Final Word -abilities=nofizzle, flying, opponentshroud -auto=lord(*|mystack) nofizzle +abilities=nofizzle,flying,opponentshroud +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 @@ -105063,8 +105065,8 @@ type=Enchantment [/card] [card] name=Steppe Glider -abilities=flying, vigilance -auto={w}{1}:target(creature[counter{1/1.1}]) transforms((newability[flying ueot],newability[vigilance ueot])) ueot +abilities=flying,vigilance +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 @@ -105905,7 +105907,7 @@ toughness=3 [/card] [card] name=Stormchaser Mage -abilities=flying, haste +abilities=flying,haste auto=@movedTo(*[-creature]|mystack):1/1 ueot text=Flying, haste -- Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) mana={U}{R} @@ -105972,7 +105974,7 @@ subtype=Equipment [/card] [card] name=Stormrider Spirit -abilities=flash, flying +abilities=flash,flying text=Flash (You may cast this spell any time you could cast an instant.) -- Flying mana={4}{U} type=Creature @@ -108854,7 +108856,7 @@ toughness=5 [/card] [card] name=Tajuru Pathwarden -abilities=vigilance, trample +abilities=vigilance,trample text=Vigilance, trample mana={4}{G} type=Creature @@ -112320,7 +112322,7 @@ toughness=4 [/card] [card] name=Thunderclap Wyvern -abilities=flash, flying +abilities=flash,flying auto=lord(other creature[flying]|mybattlefield) 1/1 text=Flash (You may cast this spell any time you could cast an instant.) -- Flying -- Other creatures you control with flying get +1/+1. mana={2}{W}{U} @@ -112406,7 +112408,7 @@ toughness=5 [card] name=Thundermaw Hellkite auto=damage:1 all(creature[flying]|opponentbattlefield) && tap all(creature[flying]|opponentbattlefield) -abilities=flying, haste +abilities=flying,haste text=Flying -- Haste (This creature can attack and {T} as soon as it comes under your control.) -- When Thundermaw Hellkite enters the battlefield, it deals 1 damage to each creature with flying your opponents control. Tap those creatures. mana={3}{R}{R} type=Creature @@ -116934,21 +116936,21 @@ toughness=2 [/card] [card] name=Unity of Purpose -auto=target(other creature|battlefield) counter(1/1,1) -auto=all(creature[counter{1/1.1}]|mybattlefield) untap +auto=ability$!choice untap all(creature[counter{1/1.1}]|mybattlefield)!$ controller +auto=target(other creature|battlefield) counter(1/1,1) 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 @@ -123493,7 +123501,7 @@ toughness=1 [/card] [card] name=Werewolf of Ancient Hunger -abilities=vigilance, trample +abilities=vigilance,trample anyzone=type:*:hand/type:*:hand cdaactive auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Sage of Ancient Lore) text=Vigilance, trample -- Werewolf of Ancient Hunger's power and toughness are each equal to the total number of cards in all players' hands. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf of Ancient Hunger. diff --git a/projects/mtg/include/CardDescriptor.h b/projects/mtg/include/CardDescriptor.h index fbe58f4db..96db093cb 100644 --- a/projects/mtg/include/CardDescriptor.h +++ b/projects/mtg/include/CardDescriptor.h @@ -65,6 +65,7 @@ class CardDescriptor: public MTGCardInstance int CDopponentDamaged; int CDcontrollerDamaged; int CDdamager; + int CDgeared; }; #endif diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index f3d8c5451..2302e2345 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -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 diff --git a/projects/mtg/include/MTGGameZones.h b/projects/mtg/include/MTGGameZones.h index 96f3bfb29..5219cb5f7 100644 --- a/projects/mtg/include/MTGGameZones.h +++ b/projects/mtg/include/MTGGameZones.h @@ -102,7 +102,8 @@ class MTGGameZone { size_t getIndex(MTGCardInstance * card); 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); diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index 64951c818..4964d5ef5 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -24,6 +24,7 @@ CardDescriptor::CardDescriptor() CDopponentDamaged = 0; CDcontrollerDamaged = 0; CDdamager = 0; + CDgeared = 0; } int CardDescriptor::init() @@ -53,7 +54,7 @@ void CardDescriptor::setisMultiColored(int w) { isMultiColored = w; } - + void CardDescriptor::setNegativeSubtype(string value) { int id = MTGAllCards::findType(value); @@ -210,6 +211,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)) { diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 2ee2a1fa8..c4a740c6c 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -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) { diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index ee647ae37..d5769a4cd 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -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) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index ed002960d..14175e732 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -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); diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 7474192c1..abcfdedce 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -170,7 +170,8 @@ const char* Constants::MTGBasicAbilities[] = { "tempflashback", "legendruleremove", "canttransform", - "asflash" + "asflash", + "conduited" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 3accbde01..165516841 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -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) { diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index 9ad256d50..82f410eaf 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -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) {