From f1a529576e5c2f5635e68a1e39a2ab349239f2d5 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 25 Apr 2019 18:03:41 -0500 Subject: [PATCH] Preparing for a release, bug fixes and adjustments to game modes Updating macros and new cards marked as borderline --- .../mtg/bin/Res/sets/primitives/_macros.txt | 7 +- .../bin/Res/sets/primitives/borderline.txt | 67 +++++++++++++++++++ projects/mtg/bin/Res/sets/primitives/mtg.txt | 42 ++++++------ projects/mtg/src/GameOptions.cpp | 2 +- projects/mtg/src/Rules.cpp | 14 ++-- 5 files changed, 100 insertions(+), 32 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/_macros.txt b/projects/mtg/bin/Res/sets/primitives/_macros.txt index 6a5621572..b0a693af7 100644 --- a/projects/mtg/bin/Res/sets/primitives/_macros.txt +++ b/projects/mtg/bin/Res/sets/primitives/_macros.txt @@ -33,5 +33,8 @@ # Treasure token, Set XLN #AUTO_DEFINE _TREASURE_ create(Treasure:Artifact Treasure:0/0:"{T}, Sacrifice this artifact: Add one mana of any color.") and!( transforms((,newability[{T}{S}:Add{W}],newability[{T}{S}:Add{U}],newability[{T}{S}:Add{R}],newability[{T}{S}:Add{B}],newability[{T}{S}:Add{G}])) forever )! -# Proliferate -#AUTO_DEFINE _PROLIFERATE_ notatarget(*) proliferate \ No newline at end of file +# Proliferate, still need to target players since the old code doesn't work (*[artifact;creature;...;players]) just let you target creature and player +#AUTO_DEFINE _PROLIFERATE_ notatarget(*) proliferate + +# Mentor, still not working with enhancements, pump effects +#AUTO_DEFINE _MENTOR_ @combat(attacking) source(this):counter(1/1,1) target(other creature[attacking;power<=pminus1minusend]|myBattlefield) \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 8526c2171..c57c2b810 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -1,5 +1,72 @@ grade=borderline [card] +name=Bogardan Hellkite +abilities=flash,flying +auto=ability$!damage:1 target(creature,player)!$ controller && ability$!damage:1 target(creature,player)!$ controller && ability$!damage:1 target(creature,player)!$ controller && ability$!damage:1 target(creature,player)!$ controller && ability$!damage:1 target(creature,player)!$ controller +text=Flash -- Flying -- When Bogardan Hellkite enters the battlefield, it deals 5 damage divided as you choose among any number of targets. +mana={6}{R}{R} +type=Creature +subtype=Dragon +power=5 +toughness=5 +[/card] +[card] +name=Frost Titan +#Not working for abilities on the field +auto=@targeted(this|mybattlefield) from(*|opponentbattlefield,opponenthand,opponentstack,opponentgraveyard,opponentexile,opponentlibrary):transforms((,newability[pay[[{2}]] name(pay 2 mana) donothing?fizzle])) forever target(*|stack) +auto=freeze target(*) +auto=@combat(attacking) source(this):freeze target(*) +text=Whenever Frost Titan becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {2}. -- Whenever Frost Titan enters the battlefield or attacks, tap target permanent. It doesn't untap during its controller's next untap step. +mana={4}{U}{U} +type=Creature +subtype=Giant +power=6 +toughness=6 +[/card] +[card] +name=Gaea's Touch +auto={0}:moveTo(myBattlefield) target(forest[basic]|myhand) asSorcery limit:1 +auto={S}:Add{G}{G} +auto={0}:name(don't sacrifice) donothing limit:9 +text={0}: You may put a basic Forest card from your hand onto the battlefield. Activate this ability only any time you could cast a sorcery and only once each turn. -- Sacrifice Gaea’s Touch: Add {G}{G}. +mana={G}{G} +type=Enchantment +[/card] +[card] +name=Inferno Titan +auto={R}:1/0 ueot +auto=ability$!damage:1 target(creature,player)!$ controller && ability$!damage:1 target(creature,player)!$ controller && ability$!damage:1 target(creature,player)!$ controller +auto=@combat(attacking) source(this):ability$!damage:1 target(creature,player)!$ controller && ability$!damage:1 target(creature,player)!$ controller && ability$!damage:1 target(creature,player)!$ controller +text={R}: Inferno Titan gets +1/+0 until end of turn. -- Whenever Inferno Titan enters the battlefield or attacks, it deals 3 damage divided as you choose among one, two, or three targets. +mana={4}{R}{R} +type=Creature +subtype=Giant +power=6 +toughness=6 +[/card] +[card] +name=Jace, the Living Guildpact +auto=counter(0/0,5,loyalty) +auto={C(0/0,1,Loyalty)}:reveal:2 optionone name(put in graveyard) target(<1>*|reveal) moveto(ownergraveyard) optiononeend optiontwo name(put in library) target(<1>*|reveal) moveto(ownerlibrary) optiontwoend revealend +auto={C(0/0,-3,Loyalty)}:target(other *[-land]) moveTo(ownerhand) +auto={C(0/0,-8,Loyalty)}:moveto(opponentlibrary) all(*|opponenthand) && moveto(opponentlibrary) all(*|opponentgraveyard) && shuffle && moveto(mylibrary) all(*|myhand) && moveto(mylibrary) all(*|mygraveyard) && shuffle && draw:7 +text=+1: Look at the top two cards of your library. Put one of them into your graveyard. -- -3: Return another target nonland permanent to its owner's hand. -- -8: Each player shuffles their hand and graveyard into their library. You draw seven cards. +mana={2}{U}{U} +type=Legendary Planeswalker +subtype=Jace +[/card] +[card] +name=Karn Liberated +auto=counter(0/0,6,loyalty) +auto={C(0/0,4,Loyalty)}:target(player) ability$!moveto(exile) and!( becomes(tobecast) forever )! target(*|myhand)!$ targetedplayer +auto={C(0/0,-3,Loyalty)}:moveto(exile) and!( becomes(tobecast) forever )! target(*) +auto={C(0/0,-14,Loyalty)}:moveto(ownerlibrary) all(*|opponenthand) && moveto(ownerlibrary) all(*|opponentgraveyard) && moveto(ownerlibrary) all(*|opponentbattlefield) && moveto(ownerlibrary) all(-tobecast,aura,instant,sorcery|opponentexile) && shuffle && draw:7 opponent && lifeset:startinglife opponent && moveto(ownerlibrary) all(*|myhand) && moveto(ownerlibrary) all(*|mygraveyard) && moveto(ownerlibrary) all(*|mybattlefield) && moveto(ownerlibrary) all(-tobecast,aura,instant,sorcery|myexile) && shuffle && draw:7 && lifeset:startinglife && moveto(myBattlefield) all(tobecast|exile) && all(creature|myBattlefield) haste && removemana(*) +text=+4: Target player exiles a card from their hand. -- -3: Exile target permanent. -- -14: Restart the game, leaving in exile all non-Aura permanent cards exiled with Karn Liberated. Then put those cards onto the battlefield under your control. +mana={7} +type=Legendary Planeswalker +subtype=Karn +[/card] +[card] name=Akiri, Line-Slinger abilities=first strike,vigilance auto=type:artifact:mybattlefield/0 nonstatic diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 838911a40..443a3c265 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2825,11 +2825,11 @@ type=Sorcery [card] name=Allied Strategies target=player -auto=if type(plains[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer -auto=if type(island[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer -auto=if type(mountain[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer -auto=if type(swamp[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer -auto=if type(forest[basic]|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer +auto=if type(plains|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer +auto=if type(island|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer +auto=if type(mountain|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer +auto=if type(swamp|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer +auto=if type(forest|targetedpersonsbattlefield)~morethan~0 then draw:1 targetedplayer text=Domain - Target player draws a card for each basic land type among lands he or she controls. mana={4}{U} type=Sorcery @@ -25899,6 +25899,7 @@ type=Enchantment [/card] [card] name=Dark Revenant +abilities=flying autograveyard=moveTo(ownerlibrary) text=Flying -- When Dark Revenant dies, put it on top of its owner's library. mana={3}{B} @@ -26117,11 +26118,11 @@ subtype=Fortification [card] name=Darksteel Ingot abilities=indestructible -auto={T}:add{G} auto={T}:add{W} auto={T}:add{U} -auto={T}:add{R} auto={T}:add{B} +auto={T}:add{R} +auto={T}:add{G} text=Darksteel Ingot is indestructible. ("Destroy" effects and lethal damage don't destroy it.) -- {T}: Add one mana of any color to your mana pool. mana={3} type=Artifact @@ -26989,8 +26990,8 @@ type=Instant [/card] [card] name=Death by Dragons -auto=choice (you get a Dragon) token(Dragon,Creature Dragon,5/5,red,flying) -auto=choice (opponent gets a Dragon) token(Dragon,Creature Dragon,5/5,red,flying) +auto=choice name(you get a Dragon) token(Dragon,Creature Dragon,5/5,red,flying) +auto=choice name(opponent gets a Dragon) token(Dragon,Creature Dragon,5/5,red,flying) opponent text=Each player other than target player puts a 5/5 red Dragon creature token with flying onto the battlefield. mana={4}{R}{R} type=Sorcery @@ -62703,7 +62704,7 @@ toughness=2 [card] name=Kemuri-Onna auto=target(player) ability$!name(discard) target(*|myhand) reject!$ targetedplayer -auto=@movedto(mystack) from(myhand):may moveto(myhand) all(this) +auto=@movedto(arcane,spirit|mystack) from(myhand):may moveto(myhand) all(this) text=When Kemuri-Onna enters the battlefield, target player discards a card. -- Whenever you cast a Spirit or Arcane spell, you may return Kemuri-Onna to its owner's hand. mana={4}{B} type=Creature @@ -64755,7 +64756,7 @@ toughness=1 [/card] [card] name=Krond the Dawn-Clad -auto=this(auras >= 1) transforms((,newability[@combat(attacking) source(this):moveTo(exile) target(*|battlefield)])) +auto=this(auras>=1) transforms((,newability[@combat(attacking) source(this):moveTo(exile) target(*|battlefield)])) abilities=flying,vigilance text=Flying, vigilance -- Whenever Krond the Dawn-Clad attacks, if it's enchanted, exile target permanent. mana={G}{G}{G}{W}{W}{W} @@ -68560,7 +68561,7 @@ toughness=7 name=Lord of Tresserhorn auto=life:-2 controller auto=draw:2 opponent -auto=target(<2>creature) sacrifice +auto=target(<2>creature|myBattlefield) sacrifice text=When Lord of Tresserhorn enters the battlefield, you lose 2 life, you sacrifice two creatures, and target opponent draws two cards. -- {B}: Regenerate Lord of Tresserhorn. mana={1}{U}{B}{R} type=Legendary Creature @@ -73781,7 +73782,6 @@ name=Might Beyond Reason target=creature auto=ifnot delirium then counter(1/1,2) auto=if delirium then counter(1/1,3) -auto=counter(1/1,2) text=Put two +1/+1 counters on target creature. -- Delirium Put three +1/+1 counters on that creature instead if there are four or more card types among cards in your graveyard. mana={3}{G} type=Instant @@ -74020,7 +74020,7 @@ toughness=3 [/card] [card] name=Minamo Sightbender -auto={X}{T}:target(creature[power <=X]) unblockable +auto={X}{T}:target(creature[power<=X]) unblockable text={X}, {T}: Target creature with power X or less is unblockable this turn. mana={1}{U} type=Creature @@ -81810,8 +81810,8 @@ type=Artifact [/card] [card] name=Oblivion Strike -auto=exile target=creature +auto=exile text=Devoid (This card has no color.) -- Exile target creature. mana={3}{B} abilities=devoid @@ -83572,7 +83572,7 @@ toughness=7 name=Ornamental Courage target=creature auto=untap -auto=3/3 +auto=1/3 text=Untap target creature. It gets +1/+3 until end of turn. mana={G} type=Instant @@ -84057,9 +84057,6 @@ type=Instant [card] name=Overwhelming Stampede auto=notatarget(creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature|mybattlefield) dynamicability,newability[all(creature|mybattlefield) trample])) -#auto=choice notatarget((creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature)|mybattlefield] power)) -#auto=all(creature|mybattlefield) /power:highest:creature:mybattlefield -#auto=all(creature|mybattlefield) trample ueot text=Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. (If a creature you control would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.) mana={3}{G}{G} type=Sorcery @@ -88273,6 +88270,7 @@ subtype=Aura [/card] [card] name=Power Taint +target=enchantment auto=teach(creature) upcost[{2}] life:-2 controller autohand=__CYCLING__({2}) text=Enchant enchantment -- At the beginning of the upkeep of enchanted enchantment's controller, that player loses 2 life unless he or she pays {2}. -- Cycling {2} ({2}, Discard this card: Draw a card.) @@ -109336,8 +109334,8 @@ toughness=2 [/card] [card] name=Solemn Simulacrum -aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) -auto=name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend +auto=moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +#auto=name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend auto=@movedTo(this|graveyard) from(Battlefield):may draw:1 controller text=When Solemn Simulacrum enters the battlefield, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. -- When Solemn Simulacrum dies, you may draw a card. mana={4} @@ -123033,7 +123031,7 @@ type=Artifact [/card] [card] name=Tornado Elemental -auto=damage:6 all(creature[flying]) +auto=all(creature[flying]) damage:6 auto=@combat(blocked,turnlimited) source(this):may name(assign combat damage to defending player) thisforeach(power>=1) damage:1 opponent && fog from(this) text=When Tornado Elemental enters the battlefield, it deals 6 damage to each creature with flying. -- You may have Tornado Elemental assign its combat damage as though it weren't blocked. mana={5}{G}{G} diff --git a/projects/mtg/src/GameOptions.cpp b/projects/mtg/src/GameOptions.cpp index 2b68cb5c3..18044e5b7 100644 --- a/projects/mtg/src/GameOptions.cpp +++ b/projects/mtg/src/GameOptions.cpp @@ -367,7 +367,7 @@ int GameOptions::load() (*this)[Options::MAX_GRADE].number = Constants::GRADE_BORDERLINE; if (!(*this)[Options::AIDECKS_UNLOCKED].number) - (*this)[Options::AIDECKS_UNLOCKED].number = 10; + (*this)[Options::AIDECKS_UNLOCKED].number = 20; return 1; } diff --git a/projects/mtg/src/Rules.cpp b/projects/mtg/src/Rules.cpp index b4180524a..9803c3c18 100644 --- a/projects/mtg/src/Rules.cpp +++ b/projects/mtg/src/Rules.cpp @@ -426,13 +426,13 @@ Player * Rules::loadPlayerHorde(GameObserver* observer, int isAI) string lands[] = { "land", "forest", "island", "mountain", "swamp", "plains" }; - const char* const multicolorTribes[] = { "Ally", "Atog", "Eldrazi", "Elemental", "Golem", "Hound", "Human", "Knight", - "Myr", "Samurai", "Shaman", "Shapeshifter", "Sliver", "Soldier", "Spellshaper", "Spirit", "Warrior" }; - const char* const whiteTribes[] = { "Angel", "Bird", "Cat", "cleric", "Griffin", "Kithkin", "Knight", "Soldier", "Spirit" }; - const char* const blueTribes[] = { "Artificer", "Bird", "Drake", "Faerie", "Illusion", "Merfolk", "Spirit", "Vedalken", "Zombie" }; - const char* const blackTribes[] = { "Cleric", "Demon", "Faerie", "Horror", "Pirate", "Rat", "Rogue", "Shade", "Skeleton", "Vampire", "Zombie" }; - const char* const redTribes[] = { "Barbarian", "Berserker"," Cat", "Devil", "Goblin", "Minotaur", "Ogre", "Werewolf" }; - const char* const greenTribes[] = { "Beast", "Cat", "Centaur", "Dinosaur", "Druid", "Elf", "Fungus", "Snake", "Spider", "Treefolk", "Werewolf" }; + const char* const multicolorTribes[] = { "Ally", "Eldrazi", "Elemental", "Golem", "Hound", "Human", "Knight", + "Myr", "Samurai", "Shaman", "Shapeshifter", "Sliver", "Soldier", "Spellshaper", "Spirit", "Warrior", "Wizard" }; + const char* const whiteTribes[] = { "Angel", "Bird", "Cat", "cleric", "Griffin", "Kithkin", "Knight", "Soldier", "Spirit", "Wizard" }; + const char* const blueTribes[] = { "Artificer", "Bird", "Drake", "Faerie", "Illusion", "Merfolk", "Spirit", "Vedalken", "Wizard", "Zombie" }; + const char* const blackTribes[] = { "Cleric", "Demon", "Faerie", "Horror", "Pirate", "Rat", "Rogue", "Shade", "Skeleton", "Vampire", "Wizard", "Zombie" }; + const char* const redTribes[] = { "Barbarian", "Berserker"," Cat", "Devil", "Dragon", "Goblin", "Minotaur", "Ogre", "Werewolf", "Wizard" }; + const char* const greenTribes[] = { "Beast", "Cat", "Centaur", "Dinosaur", "Druid", "Elf", "Fungus", "Snake", "Spider", "Treefolk", "Werewolf", "Wizard" }; int multicolorTribesSize = sizeof(multicolorTribes)/sizeof(multicolorTribes[0]); int whiteTribesSize = sizeof(whiteTribes)/sizeof(whiteTribes[0]);