diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 5b2a3b447..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} @@ -20228,7 +20228,7 @@ type=Instant name=Conduit of Ruin alias=401847 auto=may moveto(myhand) target(creature[colorless;manacost>=7]|mylibrary) -auto=lord(creature|mycastingzone) conduited +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 @@ -23234,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} @@ -42287,7 +42287,7 @@ type=Enchantment [/card] [card] name=Ghostly Sentinel -abilities=flying, vigilance +abilities=flying,vigilance text=Flying, vigilance mana={4}{W} type=Creature @@ -64056,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} @@ -64867,7 +64867,7 @@ toughness=1 [/card] [card] name=Malakir Familiar -abilities=flying, deathtouch +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} @@ -66383,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. @@ -68550,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. @@ -74213,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} @@ -75851,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} @@ -76937,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 @@ -81030,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} @@ -81443,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} @@ -85171,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. @@ -90170,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 @@ -97311,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. @@ -99101,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 @@ -99583,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 @@ -102207,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,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 @@ -104338,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,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 @@ -105454,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 @@ -105554,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 @@ -105906,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} @@ -105973,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 @@ -108855,7 +108856,7 @@ toughness=5 [/card] [card] name=Tajuru Pathwarden -abilities=vigilance, trample +abilities=vigilance,trample text=Vigilance, trample mana={4}{G} type=Creature @@ -112321,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} @@ -112407,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 @@ -123500,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/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/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) {