diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 154b37d35..c012e5554 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -12446,7 +12446,7 @@ toughness=0 [card] name=Body of Jukai abilities=trample -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=8]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=8]|mygraveyard) text=Trample -- Soulshift 8 (When this dies, you may return target Spirit card with converted mana cost 8 or less from your graveyard to your hand.) mana={7}{G}{G} type=Creature @@ -15205,7 +15205,7 @@ type=Instant [/card] [card] name=Burr Grafter -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=3]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=3]|mygraveyard) auto={S}:2/2 target(creature) text=Sacrifice Burr Grafter: Target creature gets +2/+2 until end of turn. -- Soulshift 3 (When this dies, you may return target Spirit card with converted mana cost 3 or less from your graveyard to your hand.) mana={3}{G} @@ -22451,7 +22451,7 @@ toughness=4 [card] name=Crawling Filth abilities=fear -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=5]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=5]|mygraveyard) text=Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) -- Soulshift 5 (When this dies, you may return target Spirit card with converted mana cost 5 or less from your graveyard to your hand.) mana={5}{B} type=Creature @@ -26036,7 +26036,7 @@ toughness=2 name=Deathknell Kami abilities=flying auto={2}:1/1 && treason -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=1]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=1]|mygraveyard) text=Flying -- {2}: Deathknell Kami gets +1/+1 until end of turn. Sacrifice it at the beginning of the next end step. -- Soulshift 1 (When this dies, you may return target Spirit card with converted mana cost 1 or less from your graveyard to your hand.) mana={1}{B} type=Creature @@ -27327,6 +27327,17 @@ mana={4}{W}{W} type=Sorcery [/card] [card] +name=Descendant of Kiyomaro +auto=while(restriction{morecardsthanopponent}) 1/2 +auto=while(restriction{morecardsthanopponent}) transforms((,newability[@combatdamaged(*[creature;player]) from(this):life:3 controller])) +text=As long as you have more cards in hand than each opponent, Descendant of Kiyomaro gets +1/+2 and has "Whenever this creature deals combat damage, you gain 3 life." +mana={1}{W}{W} +type=Creature +subtype=Human Soldier +power=2 +toughness=3 +[/card] +[card] name=Descendant of Masumaro auto=@each my upkeep:foreach(*|myHand) counter(1/1,1) && foreach(*|opponentHand) counter(1/1,-1) text=At the beginning of your upkeep, put a +1/+1 counter on Descendant of Masumaro for each card in your hand, then remove a +1/+1 counter from Descendant of Masumaro for each card in target opponent's hand. @@ -32660,7 +32671,7 @@ toughness=3 [card] name=Elder Pine of Jukai auto=@movedTo(arcane,spirit|mystack):reveal:4 optionone name(Get Lands) target(<4>land|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=2]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=2]|mygraveyard) text=Whenever you cast a Spirit or Arcane spell, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest on the bottom of your library in any order. -- Soulshift 2 (When this is put into a graveyard from the battlefield, you may return target Spirit card with converted mana cost 2 or less from your graveyard to your hand.) mana={2}{G} type=Creature @@ -44121,7 +44132,7 @@ toughness=2 [card] name=Gibbering Kami abilities=flying -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=3]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=3]|mygraveyard) text=Flying -- Soulshift 3 (When this dies, you may return target Spirit card with converted mana cost 3 or less from your graveyard to your hand.) mana={3}{B} type=Creature @@ -49816,7 +49827,7 @@ toughness=3 [card] name=Harbinger of Spring auto=protection from(creature[-spirit]) -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=4]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=4]|mygraveyard) text=Protection from non-Spirit creatures -- Soulshift 4 (When this dies, you may return target Spirit card with converted mana cost 4 or less from your graveyard to your hand.) mana={4}{G} type=Creature @@ -50401,7 +50412,7 @@ toughness=1 name=He Who Hungers abilities=flying auto={1}{S(creature[spirit]|mybattlefield)}:target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend asSorcery -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=4]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=4]|mygraveyard) text=Flying -- {1}, Sacrifice a Spirit: Target opponent reveals his or her hand. You choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery. -- Soulshift 4 (When this dies, you may return target Spirit card with converted mana cost 4 or less from your graveyard to your hand.) mana={4}{B} type=Legendary Creature @@ -53389,7 +53400,7 @@ toughness=4 [card] name=Hundred-Talon Kami abilities=flying -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=4]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=4]|mygraveyard) text=Flying -- Soulshift 4 (When this dies, you may return target Spirit card with converted mana cost 4 or less from your graveyard to your hand.) mana={4}{W} type=Creature @@ -58377,7 +58388,7 @@ toughness=2 [/card] [card] name=Kami of Empty Graves -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=3]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=3]|mygraveyard) text=Soulshift 3 (When this dies, you may return target Spirit card with converted mana cost 3 or less from your graveyard to your hand.) mana={3}{B} type=Creature @@ -58408,7 +58419,7 @@ toughness=3 [card] name=Kami of Lunacy abilities=flying -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=5]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=5]|mygraveyard) text=Flying -- Soulshift 5 (When this dies, you may return target Spirit card with converted mana cost 5 or less from your graveyard to your hand.) mana={4}{B}{B} type=Creature @@ -58449,7 +58460,7 @@ toughness=3 name=Kami of the Honored Dead abilities=flying auto=@damaged(this):life:thatmuch controller -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=6]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=6]|mygraveyard) text=Flying -- Whenever Kami of the Honored Dead is dealt damage, you gain that much life. -- Soulshift 6 (When this dies, you may return target Spirit card with converted mana cost 6 or less from your graveyard to your hand.) mana={5}{W}{W} type=Creature @@ -58484,7 +58495,7 @@ toughness=3 [card] name=Kami of the Palace Fields abilities=flying,first strike -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=5]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=5]|mygraveyard) text=Flying, first strike -- Soulshift 5 (When this dies, you may return target Spirit card with converted mana cost 5 or less from your graveyard to your hand.) mana={5}{W} type=Creature @@ -58495,7 +58506,7 @@ toughness=2 [card] name=Kami of the Tended Garden auto=upcost[{G}] sacrifice) -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=3]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=3]|mygraveyard) text=At the beginning of your upkeep, sacrifice Kami of the Tended Garden unless you pay {G}. -- Soulshift 3 (When this dies, you may return target Spirit card with converted mana cost 3 or less from your graveyard to your hand.) mana={3}{G} type=Creature @@ -65415,7 +65426,7 @@ toughness=2 [card] name=Loyal Gyrfalcon abilities=defender,flying -auto=@movedTo(*[white]|mystack):name(loses defender) -defender ueot +auto=@movedTo(*[white]|mystack):name(loses defender) -defender all(this) text=Defender, flying -- Whenever you cast a white spell, Loyal Gyrfalcon loses defender until end of turn. mana={3}{W} type=Creature @@ -68130,6 +68141,17 @@ mana={2}{W}{B} type=Enchantment [/card] [card] +name=Masako the Humorless +abilities=flash +auto=lord(creature[tapped]|mybattlefield) canblocktapped +text=Flash -- Tapped creatures you control can block as though they were untapped. +mana={2}{W} +type=Legendary Creature +subtype=Human Advisor +power=2 +toughness=1 +[/card] +[card] name=Mask of Avacyn auto={3}:equip auto=opponentshroud @@ -72346,7 +72368,7 @@ auto={S}:name(Blue) protection from blue target(creature|myBattlefield) auto={S}:name(Black) protection from black target(creature|myBattlefield) auto={S}:name(Red) protection from red target(creature|myBattlefield) auto={S}:name(Green) protection from green target(creature|myBattlefield) -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=3]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=3]|mygraveyard) text=Sacrifice Moonlit Strider: Target creature you control gains protection from the color of your choice until end of turn. -- Soulshift 3 (When this dies, you may return target Spirit card with converted mana cost 3 or less from your graveyard to your hand.) mana={3}{W} type=Creature @@ -75886,7 +75908,7 @@ type=Sorcery [/card] [card] name=Nightsoil Kami -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=5]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=5]|mygraveyard) text=Soulshift 5 (When this dies, you may return target Spirit card with converted mana cost 5 or less from your graveyard to your hand.) mana={4}{G}{G} type=Creature @@ -77890,6 +77912,16 @@ power=3 toughness=2 [/card] [card] +name=Okina Nightwatch +auto=while(restriction{morecardsthanopponent}) 3/3 +text=As long as you have more cards in hand than each opponent, Okina Nightwatch gets +3/+3. +mana={4}{G} +type=Creature +subtype=Human Monk +power=4 +toughness=3 +[/card] +[card] name=Okina, Temple to the Grandfathers auto={T}:Add{G} auto={G}{T}:1/1 target(creature[legendary]) @@ -84503,7 +84535,7 @@ type=Sorcery [/card] [card] name=Promised Kannushi -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=7]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=7]|mygraveyard) text=Soulshift 7 (When this dies, you may return target Spirit card with converted mana cost 7 or less from your graveyard to your hand.) mana={G} type=Creature @@ -85274,7 +85306,7 @@ type=Enchantment [card] name=Pus Kami auto={B}{S}:destroy target(creature[-black]) -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=6]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=6]|mygraveyard) text={B}, Sacrifice Pus Kami: Destroy target nonblack creature. -- Soulshift 6 (When this dies, you may return target Spirit card with converted mana cost 6 or less from your graveyard to your hand.) mana={5}{B}{B} type=Creature @@ -91594,7 +91626,7 @@ toughness=3 [card] name=Rootrunner auto={G}{G}{S}:moveTo(ownerlibrary) target(land) -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=3]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=3]|mygraveyard) text={G}{G}, Sacrifice Rootrunner: Put target land on top of its owner's library. -- Soulshift 3 (When this dies, you may return target Spirit card with converted mana cost 3 or less from your graveyard to your hand.) mana={2}{G}{G} type=Creature @@ -95617,7 +95649,7 @@ toughness=2 [card] name=Scuttling Death auto={S}:-1/-1 target(creature) -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=4]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=4]|mygraveyard) text=Sacrifice Scuttling Death: Target creature gets -1/-1 until end of turn. -- Soulshift 4 (When this dies, you may return target Spirit card with converted mana cost 4 or less from your graveyard to your hand.) mana={4}{B} type=Creature @@ -96183,6 +96215,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Secretkeeper +auto=while(restriction{morecardsthanopponent}) 2/2 +auto=while(restriction{morecardsthanopponent}) flying +text=As long as you have more cards in hand than each opponent, Secretkeeper gets +2/+2 and has flying. +mana={3}{U} +type=Creature +subtype=Spirit +power=2 +toughness=2 +[/card] +[card] name=Secrets of the Dead auto=@movedTo(*|stack) from(mygraveyard):draw:1 controller text=Whenever you cast a spell from your graveyard, draw a card. @@ -98880,7 +98923,7 @@ toughness=3 [card] name=Shoal Serpent abilities=defender -auto=@movedTo(land|myBattlefield):name(loses defender) -defender ueot +auto=@movedTo(land|myBattlefield):name(loses defender) -defender all(this) text=Defender -- Landfall - Whenever a land enters the battlefield under your control, Shoal Serpent loses defender until end of turn. mana={5}{U} type=Creature @@ -113893,7 +113936,7 @@ toughness=4 [card] name=Thief of Hope auto=@movedTo(arcane,spirit|mystack):ability$!choice life:-1 target(opponent) && life:1 controller!$ controller -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=2]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=2]|mygraveyard) text=Whenever you cast a Spirit or Arcane spell, target opponent loses 1 life and you gain 1 life. -- Soulshift 2 (When this dies, you may return target Spirit card with converted mana cost 2 or less from your graveyard to your hand.) mana={2}{B} type=Creature @@ -114475,7 +114518,7 @@ toughness=6 [/card] [card] name=Thousand-legged Kami -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=7]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=7]|mygraveyard) text=Soulshift 7 (When this dies, you may return target Spirit card with converted mana cost 7 or less from your graveyard to your hand.) mana={6}{G}{G} type=Creature @@ -116262,7 +116305,7 @@ type=Enchantment [card] name=Torii Watchward abilities=vigilance -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=4]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=4]|mygraveyard) text=Vigilance (Attacking doesn't cause this creature to tap.) -- Soulshift 4 (When this dies, you may return target Spirit card with converted mana cost 4 or less from your graveyard to your hand.) mana={4}{W} type=Creature @@ -119527,6 +119570,14 @@ mana={B} type=Instant [/card] [card] +name=Undying Flames +auto=Reveal:1 revealzone(mylibrary) revealuntil(*[-land]|mylibrary) optionone donothing optiononeend optiontwo choice name(exile cards) all(*|reveal) moveto(ownerexile) optiontwoend afterrevealed choice name(Deal Damage) target(creature,player) damage:revealedmana afterrevealedend revealend +auto=if compare(epicactivated)~lessthan~1 then emblem transforms((,newability[epic controller],newability[@each my upkeep:castcard(copied named!:Undying Flames:!)])) forever dontremove +text=Exile cards from the top of your library until you exile a nonland card. Undying Flames deals damage to target creature or player equal to that card's converted mana cost. -- Epic (For the rest of the game, you can't cast spells. At the beginning of each of your upkeeps, copy this spell except for its epic ability. You may choose a new target for the copy.) +mana={4}{R}{R} +type=Sorcery +[/card] +[card] name=Undying Rage target=creature autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand) @@ -121413,7 +121464,7 @@ toughness=1 [card] name=Venerable Kumo abilities=reach -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=4]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=4]|mygraveyard) text=Reach (This creature can block creatures with flying.) -- Soulshift 4 (When this dies, you may return target Spirit card with converted mana cost 4 or less from your graveyard to your hand.) mana={4}{G} type=Creature @@ -122654,7 +122705,7 @@ toughness=3 [card] name=Vine Kami abilities=menace -auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(other spirit[manacost<=6]|mygraveyard) +auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=6]|mygraveyard) text=Vine Kami can't be blocked except by two or more creatures. -- Soulshift 6 (When this is put into a graveyard from the battlefield, you may return target Spirit card with converted mana cost 6 or less from your graveyard to your hand.) mana={6}{G} type=Creature diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 2302e2345..db25862ab 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -260,7 +260,8 @@ class Constants CANTTRANSFORM =138, ASFLASH =139, CONDUITED = 140, - NB_BASIC_ABILITIES = 141, + CANBLOCKTAPPED = 141, + NB_BASIC_ABILITIES = 142, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index eccdc4fe6..9cc146c83 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -352,6 +352,15 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe if(!isMorbid) return 0; } + + + check = restriction[i].find("morecardsthanopponent"); + if (check != string::npos) + { + Player * checkCurrent = card->controller(); + if(checkCurrent->game->hand->nb_cards <= checkCurrent->opponent()->game->hand->nb_cards) + return 0; + } check = restriction[i].find("delirium"); if (check != string::npos) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 0134ea33c..77aa6ee9b 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -890,7 +890,7 @@ bool MTGCardInstance::isTargetter() int MTGCardInstance::canBlock() { - if (tapped) + if (tapped && !has(Constants::CANBLOCKTAPPED)) return 0; if (basicAbilities[(int)Constants::CANTBLOCK]) return 0; diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index abcfdedce..f84bde09e 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -171,7 +171,8 @@ const char* Constants::MTGBasicAbilities[] = { "legendruleremove", "canttransform", "asflash", - "conduited" + "conduited", + "canblocktapped" }; map Constants::MTGBasicAbilitiesMap;