diff --git a/JGE/src/hge/hgeparticle.cpp b/JGE/src/hge/hgeparticle.cpp index 403b91fd7..99fc2b8d8 100644 --- a/JGE/src/hge/hgeparticle.cpp +++ b/JGE/src/hge/hgeparticle.cpp @@ -96,7 +96,8 @@ hgeParticleSystem::hgeParticleSystem(hgeParticleSystemInfo *psi) { //hge=hgeCreate(HGE_VERSION); - memcpy(&info, psi, sizeof(hgeParticleSystemInfo)); + if (psi) + memcpy(&info, psi, sizeof(hgeParticleSystemInfo)); vecLocation.x=vecPrevLocation.x=0.0f; vecLocation.y=vecPrevLocation.y=0.0f; diff --git a/projects/mtg/bin/Res/sets/MED/_cards.dat b/projects/mtg/bin/Res/sets/MED/_cards.dat index d9433e698..b5fe284b3 100644 --- a/projects/mtg/bin/Res/sets/MED/_cards.dat +++ b/projects/mtg/bin/Res/sets/MED/_cards.dat @@ -1,982 +1,86 @@ [meta] author=Wagic Team -name=Masters Edition -block=MTGO -year=2007 -total=195 +name=Mythic Edition +year=2018-10-05 +total=16 [/meta] [card] -primitive=Adun Oakenshield -id=159294 -rarity=R +primitive=Elspeth, Knight-Errant +id=456589 +rarity=M [/card] [card] -primitive=Amnesia -id=159828 -rarity=R +primitive=Karn, Scion of Urza +id=460122 +rarity=M [/card] [card] -primitive=Angry Mob -id=159321 -rarity=U +primitive=Liliana, the Last Hope +id=456590 +rarity=M [/card] [card] -primitive=Animate Dead -id=159249 -rarity=U +primitive=Tamiyo, the Moon Sage +id=460123 +rarity=M [/card] [card] -primitive=Animate Wall -id=159250 -rarity=U +primitive=Daretti, Ingenious Iconoclast +id=456591 +rarity=M [/card] [card] -primitive=Ankh of Mishra -id=159251 -rarity=R +primitive=Sorin Markov +id=460124 +rarity=M [/card] [card] -primitive=Apprentice Wizard -id=159087 -rarity=C +primitive=Nicol Bolas, Planeswalker +id=456592 +rarity=M [/card] [card] -primitive=Arcane Denial -id=159084 -rarity=C +primitive=Jaya Ballard +id=460125 +rarity=M [/card] [card] -primitive=Argivian Archaeologist -id=159743 -rarity=R +primitive=Ral, Izzet Viceroy +id=456593 +rarity=M [/card] [card] -primitive=Armageddon -id=159252 -rarity=R +primitive=Ajani, Mentor of Heroes +id=460126 +rarity=M [/card] [card] -primitive=Artifact Blast -id=159744 -rarity=C +primitive=Teferi, Hero of Dominaria +id=456594 +rarity=M [/card] [card] -primitive=Ashnod's Transmogrant -id=159110 -rarity=C +primitive=Dack Fayden +id=460127 +rarity=M [/card] [card] -primitive=Autumn Willow -id=159205 -rarity=R +primitive=Tezzeret, Agent of Bolas +id=456595 +rarity=M [/card] [card] -primitive=Balduvian Horde -id=159086 -rarity=R +primitive=Domri, Chaos Bringer +id=460128 +rarity=M [/card] [card] -primitive=Ball Lightning -id=159139 -rarity=R +primitive=Vraska, Golgari Queen +id=456596 +rarity=M [/card] [card] -primitive=Baron Sengir -id=159208 -rarity=R -[/card] -[card] -primitive=Basal Thrull -id=159728 -rarity=C -[/card] -[card] -primitive=Benalish Hero -id=159253 -rarity=C -[/card] -[card] -primitive=Berserk -id=159254 -rarity=R -[/card] -[card] -primitive=Bestial Fury -id=159736 -rarity=C -[/card] -[card] -primitive=Black Knight -id=159817 -rarity=U -[/card] -[card] -primitive=Blight -id=159769 -rarity=U -[/card] -[card] -primitive=Breeding Pit -id=159166 -rarity=U -[/card] -[card] -primitive=Brothers of Fire -id=159141 -rarity=C -[/card] -[card] -primitive=Carnivorous Plant -id=159142 -rarity=U -[/card] -[card] -primitive=Centaur Archer -id=159834 -rarity=U -[/card] -[card] -primitive=Chains of Mephistopheles -id=159823 -rarity=R -[/card] -[card] -primitive=Chub Toad -id=159226 -rarity=C -[/card] -[card] -primitive=Clockwork Beast -id=159256 -rarity=U -[/card] -[card] -primitive=Contagion -id=159089 -rarity=R -[/card] -[card] -primitive=Copper Tablet -id=159257 -rarity=U -[/card] -[card] -primitive=Crookshank Kobolds -id=159770 -rarity=C -[/card] -[card] -primitive=Crusade -id=159818 -rarity=R -[/card] -[card] -primitive=Cuombajj Witches -id=159123 -rarity=C -[/card] -[card] -primitive=Cursed Rack -id=159840 -rarity=U -[/card] -[card] -primitive=Dakkon Blackblade -id=159298 -rarity=R -[/card] -[card] -primitive=Death Speakers -id=159816 -rarity=C -[/card] -[card] -primitive=Death Ward -id=159754 -rarity=C -[/card] -[card] -primitive=Derelor -id=159171 -rarity=U -[/card] -[card] -primitive=Diamond Valley -id=159124 -rarity=R -[/card] -[card] -primitive=Diminishing Returns -id=159090 -rarity=R -[/card] -[card] -primitive=Divine Transformation -id=159299 -rarity=U -[/card] -[card] -primitive=Dragon Engine -id=159841 -rarity=C -[/card] -[card] -primitive=Dust to Dust -id=159144 -rarity=C -[/card] -[card] -primitive=Dwarven Catapult -id=159729 -rarity=U -[/card] -[card] -primitive=Dwarven Soldier -id=159173 -rarity=C -[/card] -[card] -primitive=Eater of the Dead -id=159145 -rarity=U -[/card] -[card] -primitive=Elder Land Wurm -id=159824 -rarity=U -[/card] -[card] -primitive=Energy Arc -id=159830 -rarity=U -[/card] -[card] -primitive=Erg Raiders -id=159126 -rarity=C -[/card] -[card] -primitive=Eureka -id=159300 -rarity=R -[/card] -[card] -primitive=Exile -id=159091 -rarity=C -[/card] -[card] -primitive=Feast or Famine -id=159739 -rarity=C -[/card] -[card] -primitive=Fire Covenant -id=159836 -rarity=U -[/card] -[card] -primitive=Fissure -id=159147 -rarity=C -[/card] -[card] -primitive=Force of Will -id=159092 -rarity=R -[/card] -[card] -primitive=Forcefield -id=159755 -rarity=R -[/card] -[card] -primitive=Forest -id=159278 -rarity=L -[/card] -[card] -primitive=Forest -id=159279 -rarity=L -[/card] -[card] -primitive=Forest -id=159280 -rarity=L -[/card] -[card] -primitive=Fyndhorn Elves -id=159228 -rarity=C -[/card] -[card] -primitive=Gargantuan Gorilla -id=159093 -rarity=R -[/card] -[card] -primitive=Ghazban Ogre -id=159127 -rarity=C -[/card] -[card] -primitive=Giant Tortoise -id=159129 -rarity=C -[/card] -[card] -primitive=Goblin Chirurgeon -id=159730 -rarity=C -[/card] -[card] -primitive=Goblin Grenade -id=159731 -rarity=U -[/card] -[card] -primitive=Goblin Mutant -id=159229 -rarity=U -[/card] -[card] -primitive=Goblin Wizard -id=159758 -rarity=R -[/card] -[card] -primitive=Goblins of the Flarg -id=159759 -rarity=C -[/card] -[card] -primitive=Granite Gargoyle -id=159259 -rarity=U -[/card] -[card] -primitive=Greater Realm of Preservation -id=159825 -rarity=U -[/card] -[card] -primitive=Hallowed Ground -id=159230 -rarity=U -[/card] -[card] -primitive=Hand of Justice -id=159175 -rarity=R -[/card] -[card] -primitive=Hecatomb -id=159748 -rarity=R -[/card] -[card] -primitive=High Tide -id=159177 -rarity=U -[/card] -[card] -primitive=Holy Light -id=159148 -rarity=C -[/card] -[card] -primitive=Homarid Spawning Bed -id=159179 -rarity=U -[/card] -[card] -primitive=Hungry Mist -id=159212 -rarity=C -[/card] -[card] -primitive=Hyalopterous Lemure -id=159837 -rarity=C -[/card] -[card] -primitive=Hydroblast -id=159231 -rarity=C -[/card] -[card] -primitive=Hymn of Rebirth -id=159838 -rarity=U -[/card] -[card] -primitive=Hymn to Tourach -id=159180 -rarity=U -[/card] -[card] -primitive=Icatian Lieutenant -id=159846 -rarity=C -[/card] -[card] -primitive=Icatian Town -id=159843 -rarity=U -[/card] -[card] -primitive=Ice Storm -id=159260 -rarity=U -[/card] -[card] -primitive=Ifh-Biff Efreet -id=159130 -rarity=R -[/card] -[card] -primitive=Illusionary Forces -id=159232 -rarity=U -[/card] -[card] -primitive=Illusionary Wall -id=159233 -rarity=C -[/card] -[card] -primitive=Illusions of Grandeur -id=159749 -rarity=R -[/card] -[card] -primitive=Island of Wak-Wak -id=159763 -rarity=R -[/card] -[card] -primitive=Island -id=159281 -rarity=L -[/card] -[card] -primitive=Island -id=159282 -rarity=L -[/card] -[card] -primitive=Island -id=159283 -rarity=L -[/card] -[card] -primitive=Ivory Tower -id=159111 -rarity=R -[/card] -[card] -primitive=Jacques le Vert -id=159301 -rarity=R -[/card] -[card] -primitive=Jokulhaups -id=159235 -rarity=R -[/card] -[card] -primitive=Juxtapose -id=159772 -rarity=U -[/card] -[card] -primitive=Juzam Djinn -id=159132 -rarity=R -[/card] -[card] -primitive=Keldon Warlord -id=159262 -rarity=U -[/card] -[card] -primitive=Khabal Ghoul -id=159764 -rarity=R -[/card] -[card] -primitive=Knights of Thorn -id=159149 -rarity=C -[/card] -[card] -primitive=Lake of the Dead -id=159095 -rarity=R -[/card] -[card] -primitive=Lightning Bolt -id=159263 -rarity=C -[/card] -[card] -primitive=Lim-Dul's Vault -id=159832 -rarity=U -[/card] -[card] -primitive=Lord of Tresserhorn -id=159096 -rarity=R -[/card] -[card] -primitive=Marton Stromgald -id=159237 -rarity=R -[/card] -[card] -primitive=Mana Flare -id=159264 -rarity=R -[/card] -[card] -primitive=Mesa Pegasus -id=159819 -rarity=C -[/card] -[card] -primitive=Mindstab Thrull -id=159821 -rarity=C -[/card] -[card] -primitive=Mirror Universe -id=159307 -rarity=R -[/card] -[card] -primitive=Mishra's Factory -id=159114 -rarity=U -[/card] -[card] -primitive=Moat -id=159308 -rarity=R -[/card] -[card] -primitive=Mountain Yeti -id=159773 -rarity=C -[/card] -[card] -primitive=Mountain -id=159284 -rarity=L -[/card] -[card] -primitive=Mountain -id=159285 -rarity=L -[/card] -[card] -primitive=Mountain -id=159286 -rarity=L -[/card] -[card] -primitive=Mystic Remora -id=159831 -rarity=U -[/card] -[card] -primitive=Nature's Lore -id=159238 -rarity=C -[/card] -[card] -primitive=Nether Shadow -id=159265 -rarity=U -[/card] -[card] -primitive=Nevinyrral's Disk -id=159266 -rarity=R -[/card] -[card] -primitive=Onulet -id=159116 -rarity=C -[/card] -[card] -primitive=Orcish Mechanics -id=159117 -rarity=U -[/card] -[card] -primitive=Order of Leitbur -id=159188 -rarity=C -[/card] -[card] -primitive=Order of the Ebon Hand -id=159193 -rarity=C -[/card] -[card] -primitive=Oubliette -id=159135 -rarity=C -[/card] -[card] -primitive=Paralyze -id=159267 -rarity=C -[/card] -[card] -primitive=Petra Sphinx -id=159309 -rarity=R -[/card] -[card] -primitive=Phantom Monster -id=159268 -rarity=C -[/card] -[card] -primitive=Phelddagrif -id=159097 -rarity=R -[/card] -[card] -primitive=Phyrexian Boon -id=159741 -rarity=C -[/card] -[card] -primitive=Phyrexian War Beast -id=159098 -rarity=U -[/card] -[card] -primitive=Plains -id=159287 -rarity=L -[/card] -[card] -primitive=Plains -id=159288 -rarity=L -[/card] -[card] -primitive=Plains -id=159289 -rarity=L -[/card] -[card] -primitive=Polar Kraken -id=159241 -rarity=R -[/card] -[card] -primitive=Pox -id=159242 -rarity=R -[/card] -[card] -primitive=Preacher -id=159153 -rarity=R -[/card] -[card] -primitive=Primal Order -id=159215 -rarity=R -[/card] -[card] -primitive=Psychic Purge -id=159311 -rarity=U -[/card] -[card] -primitive=Psychic Venom -id=159269 -rarity=C -[/card] -[card] -primitive=Pyroblast -id=159243 -rarity=C -[/card] -[card] -primitive=Rabid Wombat -id=159312 -rarity=U -[/card] -[card] -primitive=Rainbow Vale -id=159734 -rarity=R -[/card] -[card] -primitive=Righteous Avengers -id=159314 -rarity=C -[/card] -[card] -primitive=Ring of Ma'ruf -id=159136 -rarity=R -[/card] -[card] -primitive=River Merfolk -id=159822 -rarity=C -[/card] -[card] -primitive=Roots -id=159218 -rarity=C -[/card] -[card] -primitive=Scryb Sprites -id=159270 -rarity=C -[/card] -[card] -primitive=Sea Sprite -id=159219 -rarity=C -[/card] -[card] -primitive=Seasinger -id=159845 -rarity=U -[/card] -[card] -primitive=Seraph -id=159245 -rarity=R -[/card] -[card] -primitive=Serendib Efreet -id=159137 -rarity=R -[/card] -[card] -primitive=Serpent Generator -id=159826 -rarity=R -[/card] -[card] -primitive=Shambling Strider -id=159246 -rarity=C -[/card] -[card] -primitive=Shield Sphere -id=159103 -rarity=C -[/card] -[card] -primitive=Shield of the Ages -id=159839 -rarity=U -[/card] -[card] -primitive=Singing Tree -id=159765 -rarity=U -[/card] -[card] -primitive=Spectral Bears -id=159224 -rarity=U -[/card] -[card] -primitive=Spinal Villain -id=159315 -rarity=U -[/card] -[card] -primitive=Stone Calendar -id=159154 -rarity=U -[/card] -[card] -primitive=Stone Giant -id=159274 -rarity=U -[/card] -[card] -primitive=Storm Seeker -id=159316 -rarity=U -[/card] -[card] -primitive=Su-Chi -id=159119 -rarity=R -[/card] -[card] -primitive=Sunken City -id=159155 -rarity=U -[/card] -[card] -primitive=Swamp -id=159290 -rarity=L -[/card] -[card] -primitive=Swamp -id=159291 -rarity=L -[/card] -[card] -primitive=Swamp -id=159292 -rarity=L -[/card] -[card] -primitive=Sylvan Library -id=159317 -rarity=R -[/card] -[card] -primitive=Tawnos's Coffin -id=159120 -rarity=R -[/card] -[card] -primitive=Telekinesis -id=159774 -rarity=C -[/card] -[card] -primitive=Thawing Glaciers -id=159106 -rarity=R -[/card] -[card] -primitive=The Fallen -id=159156 -rarity=U -[/card] -[card] -primitive=Thicket Basilisk -id=159275 -rarity=U -[/card] -[card] -primitive=Thorn Thallid -id=159196 -rarity=C -[/card] -[card] -primitive=Thrull Champion -id=159200 -rarity=R -[/card] -[card] -primitive=Thrull Retainer -id=159201 -rarity=C -[/card] -[card] -primitive=Thunder Spirit -id=159318 -rarity=U -[/card] -[card] -primitive=Time Elemental -id=159775 -rarity=R -[/card] -[card] -primitive=Tivadar's Crusade -id=159829 -rarity=U -[/card] -[card] -primitive=Tornado -id=159833 -rarity=R -[/card] -[card] -primitive=Urza's Bauble -id=159247 -rarity=U -[/card] -[card] -primitive=Urza's Chalice -id=159842 -rarity=C -[/card] -[card] -primitive=Varchild's War-Riders -id=159742 -rarity=R -[/card] -[card] -primitive=Vesuvan Doppelganger -id=159820 -rarity=R -[/card] -[card] -primitive=Vodalian Knights -id=159202 -rarity=U -[/card] -[card] -primitive=Walking Wall -id=159248 -rarity=U -[/card] -[card] -primitive=Wanderlust -id=159757 -rarity=C -[/card] -[card] -primitive=Winds of Change -id=159320 -rarity=U -[/card] -[card] -primitive=Winter Blast -id=159827 -rarity=U -[/card] -[card] -primitive=Winter Orb -id=159277 -rarity=R -[/card] -[card] -primitive=Word of Undoing -id=159751 -rarity=C -[/card] -[card] -primitive=Wyluli Wolf -id=159766 -rarity=C -[/card] -[card] -primitive=Yavimaya Ants -id=159109 -rarity=U -[/card] -[card] -primitive=Ydwen Efreet -id=159844 -rarity=R -[/card] -[card] -primitive=Zuran Orb -id=159752 -rarity=U -[/card] +primitive=Kaya, Orzhov Usurper +id=460129 +rarity=M +[/card] \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/RIX/_cards.dat b/projects/mtg/bin/Res/sets/RIX/_cards.dat index 78c1d4ac4..db8e19049 100644 --- a/projects/mtg/bin/Res/sets/RIX/_cards.dat +++ b/projects/mtg/bin/Res/sets/RIX/_cards.dat @@ -792,7 +792,7 @@ rarity=M [card] primitive=Winged Temple of Orazca id=439816 -rarity=R +rarity=T [/card] [card] primitive=Hadana's Climb @@ -807,7 +807,7 @@ rarity=M [card] primitive=Atzal, Cave of Eternity id=439819 -rarity=R +rarity=T [/card] [card] primitive=Journey to Eternity @@ -837,7 +837,7 @@ rarity=U [card] primitive=Metzali, Tower of Triumph id=439825 -rarity=R +rarity=T [/card] [card] primitive=Path of Mettle @@ -847,7 +847,7 @@ rarity=R [card] primitive=Tomb of the Dusk Rose id=439827 -rarity=R +rarity=T [/card] [card] primitive=Profane Procession @@ -887,7 +887,7 @@ rarity=U [card] primitive=Vault of Catlacan id=439835 -rarity=R +rarity=T [/card] [card] primitive=Storm the Vault @@ -907,7 +907,7 @@ rarity=R [card] primitive=Sanctum of the Sun id=439839 -rarity=M +rarity=T [/card] [card] primitive=Azor's Gateway @@ -927,7 +927,7 @@ rarity=C [card] primitive=Gold-Forge Garrison id=439843 -rarity=R +rarity=T [/card] [card] primitive=Golden Guardian diff --git a/projects/mtg/bin/Res/sets/XLN/_cards.dat b/projects/mtg/bin/Res/sets/XLN/_cards.dat index cfd5560bc..650405a8f 100644 --- a/projects/mtg/bin/Res/sets/XLN/_cards.dat +++ b/projects/mtg/bin/Res/sets/XLN/_cards.dat @@ -4,7 +4,6 @@ name=Ixalan year=2017 block=Ixalan [/meta] - [card] primitive=Adanto Vanguard id=435152 @@ -118,7 +117,7 @@ rarity=R [card] primitive=Adanto, the First Fort id=435174 -rarity=R +rarity=T [/card] [card] primitive=Looming Altisaur @@ -383,7 +382,7 @@ rarity=R [card] primitive=Azcanta, the Sunken Ruin id=435227 -rarity=R +rarity=T [/card] [card] primitive=Shaper Apprentice @@ -468,7 +467,7 @@ rarity=R [card] primitive=Temple of Aclazotz id=435244 -rarity=R +rarity=T [/card] [card] primitive=Bishop of the Bloodstained @@ -888,7 +887,7 @@ rarity=R [card] primitive=Spitfire Bastion id=435328 -rarity=R +rarity=T [/card] [card] primitive=Wily Goblin @@ -983,7 +982,7 @@ rarity=R [card] primitive=Itlimoc, Cradle of the Sun id=435347 -rarity=R +rarity=T [/card] [card] primitive=Ixalli's Diviner @@ -1203,7 +1202,7 @@ rarity=R [card] primitive=Conqueror's Foothold id=435391 -rarity=R +rarity=T [/card] [card] primitive=Dowsing Dagger @@ -1213,7 +1212,7 @@ rarity=R [card] primitive=Lost Vale id=435393 -rarity=R +rarity=T [/card] [card] primitive=Dusk Legion Dreadnought @@ -1258,7 +1257,7 @@ rarity=R [card] primitive=Primal Wellspring id=435402 -rarity=R +rarity=T [/card] [card] primitive=Prying Blade @@ -1293,7 +1292,7 @@ rarity=R [card] primitive=Spires of Orazca id=435409 -rarity=R +rarity=T [/card] [card] primitive=Treasure Map @@ -1303,7 +1302,7 @@ rarity=R [card] primitive=Treasure Cove id=435411 -rarity=R +rarity=T [/card] [card] primitive=Vanquisher's Banner diff --git a/projects/mtg/bin/Res/sets/primitives/_macros.txt b/projects/mtg/bin/Res/sets/primitives/_macros.txt index d4590343e..6a5621572 100644 --- a/projects/mtg/bin/Res/sets/primitives/_macros.txt +++ b/projects/mtg/bin/Res/sets/primitives/_macros.txt @@ -15,11 +15,23 @@ # Fabricate #AUTO_DEFINE _FABRICATE_($c) transforms((,newability[choice counter(1/1.$c)],newability[choice create(Servo:Artifact Creature Servo:1/1)*$c])) ueot +# Dies, Evergreen +#AUTO_DEFINE _DIES_ @movedTo(this|mygraveyard) from(battlefield): + # Scry, Evergreen #AUTO_DEFINE _SCRY_($c) scry:$c scrycore delayed dontshow donothing scrycoreend scryend # Amass, Set WAR #AUTO_DEFINE _AMASS_($c) if type(army|mybattlefield)~morethan~0 then counter(1/1,$c) notATarget(army|myBattlefield) else create(Zombie Army:creature Zombie Army:0/0:black) and!(counter(1/1,$c) notATarget(army|myBattlefield))! +# Ascend, Set XLN +#AUTO_DEFINE _ASCEND_ if type(*[city's_blessing]|mybattlefield)~lessthan~1 then transforms((,newability[if type(*|mybattlefield)~morethan~9 then create(city's_blessing:city's_blessing:0/0:shroud:indestructible)])) + +# Effect with the City's blessing, Set XLN +#AUTO_DEFINE _CITY'S_BLESSING_ aslongas(*[city's_blessing]|mybattlefield)>0 + # 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 )! \ No newline at end of file +#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 diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 33b451a1d..8526c2171 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -552,7 +552,7 @@ type=Sorcery [/card] [card] name=Scent of Cinder -target=creature +target=creature,player auto=damage:type:*[red]:myhand text=Reveal any number of red cards in your hand. Scent of Cinder deals X damage to target creature or player, where X is the number of cards revealed this way. mana={1}{R} diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 6a8e21425..838911a40 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2485,7 +2485,7 @@ toughness=1 name=Alabaster Potion auto=choice life:X target(player) auto=choice prevent:X target(creature,player) -text=Choose one Target player gains X life. Prevent the next X damage that would be dealt to any target this turn. +text=Choose one — • Target player gains X life. • Prevent the next X damage that would be dealt to any target this turn. mana={X}{W}{W} type=Instant [/card] @@ -2767,12 +2767,12 @@ subtype=Eldrazi [/card] [card] name=All Suns' Dawn +auto=moveto(exile) auto=ability$!Choice name(Green) target(*[green]|mygraveyard) moveto(myhand)!$ controller auto=ability$!Choice name(Red) target(*[red]|mygraveyard) moveto(myhand)!$ controller auto=ability$!Choice name(White) target(*[white]|mygraveyard) moveto(myhand)!$ controller auto=ability$!Choice name(Black) target(*[black]|mygraveyard) moveto(myhand)!$ controller auto=ability$!Choice name(Blue) target(*[blue]|mygraveyard) moveto(myhand)!$ controller -auto=moveto(exile) all(this) text=For each color, return up to one target card of that color from your graveyard to your hand. Exile All Suns' Dawn. mana={4}{G} type=Sorcery @@ -3671,8 +3671,8 @@ type=Land name=Ancient Stirrings mana={G} type=Sorcery -aicode=activate target(*[colorless;zpos<=5]|mylibrary) moveto(myhand) -auto=name(look) reveal:5 optionone name(Get Colorless Card) target(<1>*[colorless]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend +aicode=activate target(*[-white;-blue;-black;-red;-green;zpos<=5]|mylibrary) moveto(myhand) +auto=name(look) reveal:5 optionone name(Get Colorless Card) target(*[-white;-blue;-black;-red;-green]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend text=Look at the top five cards of your library. You may reveal a colorless card from among them and put it into your hand. Then put the rest on the bottom of your library in any order. (Cards with no colored mana in their mana costs are colorless. Lands are also colorless.) [/card] [card] @@ -32739,7 +32739,7 @@ type=Enchantment [/card] [card] name=Drumhunter -auto=@each my end restriction{type(creature[power>=5]|myBattlefield)~morethan~0:may draw:1 controller +auto=@each my end restriction{type(creature[power>=5]|myBattlefield)~morethan~0}:may draw:1 controller auto={T}:Add{1} text=At the beginning of your end step, if you control a creature with power 5 or greater, you may draw a card. -- {T}: Add {1} to your mana pool. mana={3}{G} @@ -35648,7 +35648,7 @@ power=2 toughness=4 [/card] [card] -name=Emmara Tandris +name=Emmara Tandris auto=preventalldamage to(creature[token]|myBattlefield) text=Prevent all damage that would be dealt to creature tokens you control. mana={5}{G}{W} @@ -36546,7 +36546,7 @@ name=Ephara's Enlightenment target=creature auto=counter(1/1,1) auto=teach(creature) flying -auto=@movedto(creature|mybattlefield):may name(return Ephara's Enlightenment) moveto(ownerhand) all(this) +auto=@movedto(creature|mybattlefield):may choice moveto(ownerhand) all(this) text=Enchant creature -- When Ephara's Enlightenment enters the battlefield, put a +1/+1 counter on enchanted creature. -- Enchanted creature has flying. -- Whenever a creature enters the battlefield under your control, you may return Ephara's Enlightenment to its owner's hand. mana={1}{W}{U} type=Enchantment @@ -37972,16 +37972,16 @@ text=You may play an additional land this turn. -- Draw a card. mana={1}{G} type=Sorcery [/card] -[card] -name=Explorer's Scope -auto={1}:equip -aicode=activate transforms((,newability[moveto(mybattlefield) and!(tap(noevent))! all(land[zpos=1]|mylibrary)])) ueot -auto=@combat(attacking) source(mytgt):reveal:1 optionone target(land|reveal) moveto(mybattlefield) and!(tap(noevent))! optiononeend optiontwo name(Put Back) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend -text=Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) -mana={1} -type=Artifact -subtype=Equipment -[/card] +#[card] +#name=Explorer's Scope +#auto={1}:equip +#aicode=activate transforms((,newability[moveto(mybattlefield) and!(tap(noevent))! all(land[zpos=1]|mylibrary)])) ueot +#auto=@combat(attacking) source(mytgt):reveal:1 optionone target(land|reveal) moveto(mybattlefield) and!(tap(noevent))! optiononeend optiontwo name(Put Back) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend +#text=Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) +#mana={1} +#type=Artifact +#subtype=Equipment +#[/card] [card] name=Explosive Apparatus auto={3}{T}{s}:damage:2 target(other *[creature;player]) @@ -40015,7 +40015,7 @@ toughness=2 [card] name=Fertile Ground target=land -auto=all(this) transforms((,newability[produceextra:selectmana] controller)) forever +auto=all(this) transforms((,newability[produceextra:selectmana])) forever text=Enchant land -- Whenever enchanted land is tapped for mana, its controller adds one mana of any color to his or her mana pool (in addition to the mana the land produces). mana={1}{G} type=Enchantment @@ -55466,7 +55466,7 @@ mana={X}{G}{G} type=Creature subtype=Snake Hydra power=0 -toughness=1 +toughness=0 [/card] [card] name=Hooded Kavu @@ -61275,7 +61275,7 @@ toughness=0 [card] name=Kaalia of the Vast abilities=flying -auto=@combat(attacking) source(this):target(creature[angel;demon;dragon]|myhand) ninjutsu +auto=@combat(attacking) source(this):target(*[angel;demon;dragon]|myhand) ninjutsu text=Flying, Whenever Kaalia of the Vast attacks an opponent, you may put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking that opponent. mana={1}{B}{R}{W} type=Legendary Creature @@ -64893,9 +64893,10 @@ toughness=5 [/card] [card] name=Krosan Verge -auto=tap(noevent) +#auto=tap(noevent) auto={T}:Add{1} -auto={2}{T}{S}:name(sacrifice to search) transforms((,newability[ability$! name(search forest) notatarget(forest|mylibrary) moveto(ownerbattlefield) and!(tap(noevent))! !$ controller],newability[ability$! name(search plains) notatarget(plains|mylibrary) moveto(ownerbattlefield) and!(tap(noevent))! !$ controller])) oneshot +auto={2}{T}:name(sacrifice to search) transforms((,newability[ability$! notatarget(forest|mylibrary) moveto(ownerbattlefield) and!(tap(noevent))! !$ controller],newability[ability$! notatarget(plains|mylibrary) moveto(ownerbattlefield) and!(tap(noevent))! !$ controller])) oneshot +#auto={2}{T}{S}:name(sacrifice to search) transforms((,newability[ability$! name(search forest) notatarget(forest|mylibrary) moveto(ownerbattlefield) and!(tap(noevent))! !$ controller],newability[ability$! name(search plains) notatarget(plains|mylibrary) moveto(ownerbattlefield) and!(tap(noevent))! !$ controller])) oneshot text=Krosan Verge enters the battlefield tapped. -- {T}: Add {1} to your mana pool. -- {2}, {T}, Sacrifice Krosan Verge: Search your library for a Forest card and a Plains card and put them onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -67041,7 +67042,7 @@ type=Instant [/card] [card] name=Lifeforce -auto={G}{G}:fizzle target(sorcery|stack) +auto={G}{G}:fizzle target(*[black]|stack) text={G}{G}: Counter target black spell. mana={G}{G} type=Enchantment @@ -74914,8 +74915,8 @@ toughness=1 name=Mirrorpool auto={t}:add{c} auto=tap(noevent) -auto=@movedto(*[instant;sorcery]|mystack) restriction{type(Mirrorpool[-tapped]|myBattlefield)~morethan~0}:all(trigger[to]<1>) transforms(( ,newability[pay[[{2}{C}]] name(copy spell) activate name(copy spell) castcard(copied noevent) and!(bury notatarget(mirrorpool|myBattlefield)])! )) forever)! -auto={4}{c}{t}{s}:name(Clone) clone notatarget(other creature|mybattlefield) +auto={2}{c}{t}{s}:name(copy spell) target(instant,sorcery|mystack) castcard(copied noevent) +auto={4}{c}{t}{s}:name(Clone) clone notatarget(creature|mybattlefield) text=Mirrorpool enters the battlefield tapped. -- {T}: Add {C} to your mana pool. -- {2}{C}, {T}, Sacrifice Mirrorpool: Copy target instant or sorcery spell you control. You may choose new targets for the copy. -- {4}{C}, {T}, Sacrifice Mirrorpool: Put a token onto the battlefield that's a copy of target creature you control. type=Land [/card] @@ -75889,7 +75890,7 @@ toughness=* name=Molten Firebird abilities=flying auto={4}{R}:moveTo(exile) -autograveyard=@movedTo(this|graveyard) from(battlefield):phaseaction[my endofturn] moveTo(mybattlefield) +autograveyard=@movedTo(this|graveyard) from(battlefield):phaseaction[endofturn] moveTo(mybattlefield) autograveyard=@movedTo(this|graveyard) from(battlefield):nextphasealter(remove,draw,controller) text=Flying -- When Molten Firebird is put into a graveyard from the battlefield, return it to the battlefield under its owner's control at the beginning of the next end step and you skip your next draw step. -- {4}{R}: Exile Molten Firebird. mana={4}{R} @@ -79861,26 +79862,26 @@ toughness=7 name=Night Dealings auto=@damagefoeof(player) from(*|mybattlefield,mystack,mygraveyard,mylibrary,myexile):counter(0/0,thatmuch,Theft) auto={2}{B}{B}:name(X = 0) && moveto(myhand) target(*[-land;manacost=0]|mylibrary) -auto=this(counter{0/0.1.Theft}=>) {2}{B}{B}{C(0/0,-1,Theft)}:name(X = 1) && moveTo(myhand) target(*[-land;manacost=1]|mylibrary) -auto=this(counter{0/0.2.Theft}=>) {2}{B}{B}{C(0/0,-2,Theft)}:name(X = 2) && moveTo(myhand) target(*[-land;manacost=2]|mylibrary) -auto=this(counter{0/0.3.Theft}=>) {2}{B}{B}{C(0/0,-3,Theft)}:name(X = 3) && moveTo(myhand) target(*[-land;manacost=3]|mylibrary) -auto=this(counter{0/0.4.Theft}=>) {2}{B}{B}{C(0/0,-4,Theft)}:name(X = 4) && moveTo(myhand) target(*[-land;manacost=4]|mylibrary) -auto=this(counter{0/0.5.Theft}=>) {2}{B}{B}{C(0/0,-5,Theft)}:name(X = 5) && moveTo(myhand) target(*[-land;manacost=5]|mylibrary) -auto=this(counter{0/0.6.Theft}=>) {2}{B}{B}{C(0/0,-6,Theft)}:name(X = 6) && moveTo(myhand) target(*[-land;manacost=6]|mylibrary) -auto=this(counter{0/0.7.Theft}=>) {2}{B}{B}{C(0/0,-7,Theft)}:name(X = 7) && moveTo(myhand) target(*[-land;manacost=7]|mylibrary) -auto=this(counter{0/0.8.Theft}=>) {2}{B}{B}{C(0/0,-8,Theft)}:name(X = 8) && moveTo(myhand) target(*[-land;manacost=8]|mylibrary) -auto=this(counter{0/0.9.Theft}=>) {2}{B}{B}{C(0/0,-9,Theft)}:name(X = 9) && moveTo(myhand) target(*[-land;manacost=9]|mylibrary) -auto=this(counter{0/0.10.Theft}=>) {2}{B}{B}{C(0/0,-10,Theft)}:name(X = 10) && moveTo(myhand) target(*[-land;manacost=10]|mylibrary) -auto=this(counter{0/0.11.Theft}=>) {2}{B}{B}{C(0/0,-11,Theft)}:name(X = 11) && moveTo(myhand) target(*[-land;manacost=11]|mylibrary) -auto=this(counter{0/0.12.Theft}=>) {2}{B}{B}{C(0/0,-12,Theft)}:name(X = 12) && moveTo(myhand) target(*[-land;manacost=12]|mylibrary) -auto=this(counter{0/0.13.Theft}=>) {2}{B}{B}{C(0/0,-13,Theft)}:name(X = 13) && moveTo(myhand) target(*[-land;manacost=13]|mylibrary) -auto=this(counter{0/0.14.Theft}=>) {2}{B}{B}{C(0/0,-14,Theft)}:name(X = 14) && moveTo(myhand) target(*[-land;manacost=14]|mylibrary) -auto=this(counter{0/0.15.Theft}=>) {2}{B}{B}{C(0/0,-15,Theft)}:name(X = 15) && moveTo(myhand) target(*[-land;manacost=15]|mylibrary) -auto=this(counter{0/0.16.Theft}=>) {2}{B}{B}{C(0/0,-16,Theft)}:name(X = 16) && moveTo(myhand) target(*[-land;manacost=16]|mylibrary) -auto=this(counter{0/0.17.Theft}=>) {2}{B}{B}{C(0/0,-17,Theft)}:name(X = 17) && moveTo(myhand) target(*[-land;manacost=17]|mylibrary) -auto=this(counter{0/0.18.Theft}=>) {2}{B}{B}{C(0/0,-18,Theft)}:name(X = 18) && moveTo(myhand) target(*[-land;manacost=18]|mylibrary) -auto=this(counter{0/0.19.Theft}=>) {2}{B}{B}{C(0/0,-19,Theft)}:name(X = 19) && moveTo(myhand) target(*[-land;manacost=19]|mylibrary) -auto=this(counter{0/0.20.Theft}=>) {2}{B}{B}{C(0/0,-20,Theft)}:name(X = 20) && moveTo(myhand) target(*[-land;manacost=20]|mylibrary) +auto=this(counter{0/0.1.Theft}>=) {2}{B}{B}{C(0/0,-1,Theft)}:name(X = 1) && moveTo(myhand) target(*[-land;manacost=1]|mylibrary) +auto=this(counter{0/0.2.Theft}>=) {2}{B}{B}{C(0/0,-2,Theft)}:name(X = 2) && moveTo(myhand) target(*[-land;manacost=2]|mylibrary) +auto=this(counter{0/0.3.Theft}>=) {2}{B}{B}{C(0/0,-3,Theft)}:name(X = 3) && moveTo(myhand) target(*[-land;manacost=3]|mylibrary) +auto=this(counter{0/0.4.Theft}>=) {2}{B}{B}{C(0/0,-4,Theft)}:name(X = 4) && moveTo(myhand) target(*[-land;manacost=4]|mylibrary) +auto=this(counter{0/0.5.Theft}>=) {2}{B}{B}{C(0/0,-5,Theft)}:name(X = 5) && moveTo(myhand) target(*[-land;manacost=5]|mylibrary) +auto=this(counter{0/0.6.Theft}>=) {2}{B}{B}{C(0/0,-6,Theft)}:name(X = 6) && moveTo(myhand) target(*[-land;manacost=6]|mylibrary) +auto=this(counter{0/0.7.Theft}>=) {2}{B}{B}{C(0/0,-7,Theft)}:name(X = 7) && moveTo(myhand) target(*[-land;manacost=7]|mylibrary) +auto=this(counter{0/0.8.Theft}>=) {2}{B}{B}{C(0/0,-8,Theft)}:name(X = 8) && moveTo(myhand) target(*[-land;manacost=8]|mylibrary) +auto=this(counter{0/0.9.Theft}>=) {2}{B}{B}{C(0/0,-9,Theft)}:name(X = 9) && moveTo(myhand) target(*[-land;manacost=9]|mylibrary) +auto=this(counter{0/0.10.Theft}>=) {2}{B}{B}{C(0/0,-10,Theft)}:name(X = 10) && moveTo(myhand) target(*[-land;manacost=10]|mylibrary) +auto=this(counter{0/0.11.Theft}>=) {2}{B}{B}{C(0/0,-11,Theft)}:name(X = 11) && moveTo(myhand) target(*[-land;manacost=11]|mylibrary) +auto=this(counter{0/0.12.Theft}>=) {2}{B}{B}{C(0/0,-12,Theft)}:name(X = 12) && moveTo(myhand) target(*[-land;manacost=12]|mylibrary) +auto=this(counter{0/0.13.Theft}>=) {2}{B}{B}{C(0/0,-13,Theft)}:name(X = 13) && moveTo(myhand) target(*[-land;manacost=13]|mylibrary) +auto=this(counter{0/0.14.Theft}>=) {2}{B}{B}{C(0/0,-14,Theft)}:name(X = 14) && moveTo(myhand) target(*[-land;manacost=14]|mylibrary) +auto=this(counter{0/0.15.Theft}>=) {2}{B}{B}{C(0/0,-15,Theft)}:name(X = 15) && moveTo(myhand) target(*[-land;manacost=15]|mylibrary) +auto=this(counter{0/0.16.Theft}>=) {2}{B}{B}{C(0/0,-16,Theft)}:name(X = 16) && moveTo(myhand) target(*[-land;manacost=16]|mylibrary) +auto=this(counter{0/0.17.Theft}>=) {2}{B}{B}{C(0/0,-17,Theft)}:name(X = 17) && moveTo(myhand) target(*[-land;manacost=17]|mylibrary) +auto=this(counter{0/0.18.Theft}>=) {2}{B}{B}{C(0/0,-18,Theft)}:name(X = 18) && moveTo(myhand) target(*[-land;manacost=18]|mylibrary) +auto=this(counter{0/0.19.Theft}>=) {2}{B}{B}{C(0/0,-19,Theft)}:name(X = 19) && moveTo(myhand) target(*[-land;manacost=19]|mylibrary) +auto=this(counter{0/0.20.Theft}>=) {2}{B}{B}{C(0/0,-20,Theft)}:name(X = 20) && moveTo(myhand) target(*[-land;manacost=20]|mylibrary) text=Whenever a source you control deals damage to another player, put that many theft counters on Night Dealings. -- {2}{B}{B}, Remove X theft counters from Night Dealings: Search your library for a nonland card with converted mana cost X, reveal it, and put it into your hand. Then shuffle your library. mana={2}{B}{B} type=Enchantment @@ -88007,7 +88008,7 @@ name=Ponyback Brigade auto=token(Goblin,Creature Goblin,1/1,red) *3 facedown={3} autofacedown={2}{R}{W}{B}:morph -autofaceup=token(Goblin,Creature Goblin,1/1, haste, red) *3 +autofaceup=token(Goblin,Creature Goblin,1/1,red) *3 text=When Ponyback Brigade enters the battlefield or is turned face up, put three 1/1 red Goblin creature tokens onto the battlefield. -- Morph {2}{R}{W}{B}: (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={3}{R}{W}{B} type=Creature @@ -93612,8 +93613,9 @@ subtype=Aura [/card] [card] name=Red Sun's Zenith -auto=choice name(Target creature) exiledeath && damage:X target(creature) -auto=choice name(Target player) damage:X target(player) +target=creature,player +auto=exiledeath +auto=damage:X alias=135262 text=Red Sun's Zenith deals X damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead. Shuffle Red Sun's Zenith into its owner's library. mana={X}{R} @@ -102200,7 +102202,6 @@ text=When Seismic Elemental enters the battlefield, creatures without flying can mana={3}{R}{R} type=Creature subtype=Elemental -subtype=Elemental power=4 toughness=4 [/card] @@ -119766,8 +119767,8 @@ toughness=1 name=Tetravus abilities=flying auto=counter(1/1,3) -auto={c(1/1,-1)}:token(Tetravite) myupkeeponly -auto={e(Tetravite|myBattlefield)}:counter(1/1,1) myupkeeponly +auto={c(1/1,-1)}:token(Tetravite) myupkeeponly limit:9 +auto={e(Tetravite|myBattlefield)}:counter(1/1,1) myupkeeponly limit:9 text=Flying -- Tetravus enters the battlefield with three +1/+1 counters on it. -- At the beginning of your upkeep, you may remove any number of +1/+1 counters from Tetravus. If you do, put that many 1/1 colorless Tetravite artifact creature tokens onto the battlefield. They each have flying and "This creature can't be enchanted." -- At the beginning of your upkeep, you may exile any number of tokens put onto the battlefield with Tetravus. If you do, put that many +1/+1 counters on Tetravus. mana={6} type=Artifact Creature @@ -119847,8 +119848,8 @@ name=Tezzeret, Agent of Bolas auto=counter(0/0,3,loyalty) aicode=activate target(artifact[zpos<=5]|mylibrary) moveto(myhand) auto={C(0/0,1,Loyalty)}:reveal:5 optionone name(Get artifact) target(artifact|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend -auto={C(0/0,-1,Loyalty)}:name(Create Construct) target(artifact) transforms((Construct Artifact Creature,setpower=5,settoughness=5)) - auto={C(0/0,-4,Loyalty)}:target(player) life:-twicetype:artifact:mybattlefield && life:twicetype:artifact:mybattlefield controller +auto={C(0/0,-1,Loyalty)}:name(Create Construct) target(artifact) transforms((Construct Artifact Creature,setpower=5,settoughness=5)) forever +auto={C(0/0,-4,Loyalty)}:target(player) life:-twicetype:artifact:mybattlefield && life:twicetype:artifact:mybattlefield controller text=+1: Look at the top five cards of your library. You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- -1: Target artifact becomes a 5/5 artifact creature. -- -4: Target player loses X life and you gain X life, where X is twice the number of artifacts you control. mana={2}{U}{B} type=Legendary Planeswalker @@ -120131,7 +120132,7 @@ name=Thassa's Emissary auto=bestow bstw auto=bestow teach(creature) +3/+3 auto=bestow transforms((,newability[@combatdamagefoeof(player) from(this):draw:1])) forever -auto=@combatdamagefoeof(player) from(this):target(creature|opponentbattlefield) draw:1 +auto=@combatdamagefoeof(player) from(this):draw:1 bestow={5}{u} text=Bestow {5}{U} (If you cast this card for its bestow cost, it's an Aura spell with enchant creature. It becomes a creature again if it's not attached to a creature.) -- Whenever Thassa's Emissary or enchanted creature deals combat damage to a player, draw a card. -- Enchanted creature gets +3/+3. mana={3}{U} @@ -121431,7 +121432,7 @@ type=Artifact [/card] [card] name=Throne of Geth -auto={S(artifact|mybattlefield)}{T}:notatarget(*[artifact;creature;enchantment;land;planeswalker;player]) proliferate +auto={S(artifact|mybattlefield)}{T}:_PROLIFERATE_ text={T},Sacrifice an artifact: Proliferate. mana={2} type=Artifact diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 33a7178f1..649cebdc6 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -18,6 +18,7 @@ typedef enum GAME_TYPE_RANDOM3, GAME_TYPE_RANDOM5, GAME_TYPE_HORDE, + GAME_TYPE_SET_LIMITED, GAME_TYPE_STORY, GAME_TYPE_DEMO, GAME_TYPE_STONEHEWER, diff --git a/projects/mtg/include/Rules.h b/projects/mtg/include/Rules.h index 63adf3638..4959a432e 100644 --- a/projects/mtg/include/Rules.h +++ b/projects/mtg/include/Rules.h @@ -45,6 +45,7 @@ protected: Player * loadPlayerRandomThree(GameObserver* observer, int isAI); Player * loadPlayerRandomFive(GameObserver* observer, int isAI); Player * loadPlayerHorde(GameObserver* observer, int isAI); + Player * loadRandomSetLimited(GameObserver* observer, int isAI); Player * initPlayer(GameObserver *observer, int playerId); MTGDeck * buildDeck(int playerId); GameType strToGameMode(string s); diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index fd9fb3738..d38e88737 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -50,11 +50,12 @@ int OrderedAIAction::getEfficiency(AADamager * aad) if(p == target->controller()) return 0; - if (dTarget && aad && (aad->getDamage() >= dTarget->toughness)) + if (dTarget && aad && (aad->getDamage() == dTarget->toughness)) return 100; - - if (dTarget && dTarget->toughness) - return (10 * aad->getDamage()) / dTarget->toughness; // Don't waste damage spells + else if (dTarget && aad && (aad->getDamage() > dTarget->toughness)) + return 10 * (10 - (aad->getDamage() - dTarget->toughness)); //less eff the more dmg above toughness + else + return 10; return 0; } @@ -130,11 +131,7 @@ int OrderedAIAction::getEfficiency() { efficiency = 95; } - //TODO If the card is the target of a damage spell - if (!coreAbilityCardTarget->regenerateTokens && (MTGCardInstance*)target == a->source) - { - efficiency = 95; - } + //TODO If the card is the target of a damage spell break; } case MTGAbility::STANDARD_PREVENT: @@ -285,6 +282,10 @@ int OrderedAIAction::getEfficiency() coreAbilityCardTarget = a->source->target; //TODO use intermediate value? target = a->source; } + else //if(how to know cards like Basking Rootwalla that pump themselves) + { + target = a->source; + } if (!target && !dynamic_cast (a)) break; if(dynamic_cast (a) && !target) @@ -296,9 +297,9 @@ int OrderedAIAction::getEfficiency() int suggestion = af.abilityEfficiency(a, p, MODE_ABILITY); //i do not set a starting eff. on this ability, this allows Ai to sometimes randomly do it as it normally does. int currentPhase = g->getCurrentGamePhase(); - if (suggestion == BAKA_EFFECT_GOOD && target->controller() == p) + if ((currentPhase == MTG_PHASE_COMBATBLOCKERS) || (currentPhase == MTG_PHASE_COMBATATTACKERS)) { - if ((currentPhase == MTG_PHASE_COMBATBLOCKERS) || (currentPhase == MTG_PHASE_COMBATATTACKERS)) + if (suggestion == BAKA_EFFECT_GOOD && target->controller() == p) { if(coreAbilityCardTarget->defenser || coreAbilityCardTarget->blockers.size()) { @@ -316,14 +317,10 @@ int OrderedAIAction::getEfficiency() { //this means im heading directly for the player, pump this creature as much as possible. efficiency = 100; - if(coreAbilityCardTarget->power > 50) + if(coreAbilityCardTarget->power > 20) // to be realistic efficiency -= coreAbilityCardTarget->power;//we don't need to go overboard. better to not put all your eggs in a single basket. } } - if (currentPhase == MTG_PHASE_FIRSTMAIN) - { - efficiency = 10; - } } if (suggestion == BAKA_EFFECT_BAD && target->controller() != p && target->toughness > 0) { @@ -672,7 +669,7 @@ int OrderedAIAction::getEfficiency() { AIPlayer * chk = (AIPlayer*)p; if(may->ability && may->ability->getActionTc() && chk->chooseTarget(may->ability->getActionTc(),NULL,NULL,true)) - efficiency = 80 + (owner->getRandomGenerator()->random() % 50); + efficiency = 50 + (owner->getRandomGenerator()->random() % 50); } if (p->game->hand->nb_cards == 0) efficiency = (int) ((float) efficiency * 1.3); //increase chance of using ability if hand is empty @@ -685,8 +682,11 @@ int OrderedAIAction::getEfficiency() for(unsigned int i = 0; i < ec->costs.size();i++) { ExtraCost * tapper = dynamic_cast(ec->costs[i]); + ExtraCost * sacrifice = dynamic_cast(ec->costs[i]); if(tapper) - continue; + continue; + else if(sacrifice) + efficiency = efficiency / 3; else efficiency = efficiency / 2; } @@ -699,7 +699,7 @@ int OrderedAIAction::getEfficiency() } else if (dynamic_cast(a)) { - efficiency += 65; + efficiency += 55; } else if (dynamic_cast(a)) { @@ -707,15 +707,10 @@ int OrderedAIAction::getEfficiency() } if (ability->source) + { if(ability->source->hasType(Subtypes::TYPE_PLANESWALKER)) efficiency += 40; - else if(ability->source->hasType(Subtypes::TYPE_LAND)) - { // probably a shockland, don't pay life if hand is empty - if (p->game->hand->nb_cards == 0 || p->life<=2) - // check that's not a manland(like Celestial Colonnade) - if(efficiency < 50) - efficiency = 0; - } + } SAFE_DELETE(transAbility); return efficiency; diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index 816b1ef65..94547dac4 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -772,7 +772,7 @@ void GameStateDuel::Update(float dt) = "ai_baka_music_random.mp3"; else if (mParent->gameType == GAME_TYPE_RANDOM3 || mParent->gameType == GAME_TYPE_RANDOM5) musictrack = "ai_baka_music_random.mp3"; - else if (mParent->gameType == GAME_TYPE_HORDE) musictrack + else if (mParent->gameType == GAME_TYPE_HORDE || mParent->gameType == GAME_TYPE_SET_LIMITED) musictrack = "ai_baka_music_momir.mp3"; if (!MusicExist(musictrack)) musictrack = "ai_baka_music.mp3"; diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 9d379e7f9..8b009a6d7 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -4572,12 +4572,12 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ if (AAMover * aam = dynamic_cast(a)) { MTGGameZone * z = aam->destinationZone(target); - if (tc && tc->targetsZone(p->game->library)||tc && tc->targetsZone(p->game->graveyard)) + if (tc && tc->targetsZone(p->game->library) || tc && tc->targetsZone(p->game->graveyard) || tc && tc->targetsZone(p->game->hand)) { if (z == p->game->hand || z == p->game->inPlay) return BAKA_EFFECT_GOOD; } - return BAKA_EFFECT_DONTKNOW; //TODO + return BAKA_EFFECT_BAD; //TODO } if (dynamic_cast (a)) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 10e2370bd..a679365e8 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -1355,16 +1355,16 @@ int MTGCardInstance::DangerRanking() } // Even at 60(danger=3) the AI is hasty to play removal on a simple creature // a vanilla 2 mana, 2/2 used to be eff = 60 + if (result > 2) + danger += 1; if (result > 4) danger += 1; if (result > 6) danger += 1; + if (result > 8) + danger += 1; if (result > 10) danger += 1; - if (result > 12) - danger += 1; - if (result > 14) - danger += 1; return danger; } diff --git a/projects/mtg/src/Rules.cpp b/projects/mtg/src/Rules.cpp index 405cc0c98..b4180524a 100644 --- a/projects/mtg/src/Rules.cpp +++ b/projects/mtg/src/Rules.cpp @@ -170,7 +170,7 @@ void Rules::addExtraRules(GameObserver* g) difficultyRating = 0; else if(g->mRules->gamemode == GAME_TYPE_RANDOM3 || g->mRules->gamemode == GAME_TYPE_RANDOM5) difficultyRating = 0; - else if(g->mRules->gamemode == GAME_TYPE_HORDE) + else if(g->mRules->gamemode == GAME_TYPE_HORDE || g->mRules->gamemode == GAME_TYPE_SET_LIMITED) difficultyRating = 0; else if (g->mRules->gamemode == GAME_TYPE_STORY) difficultyRating = 0; @@ -311,6 +311,50 @@ Player * Rules::loadPlayerRandom(GameObserver* observer, int isAI, int mode) return player; } +Player * Rules::loadRandomSetLimited(GameObserver* observer, int isAI) +{ + //Random sets + int setId[] = { observer->getRandomGenerator()->random() % setlist.size(), observer->getRandomGenerator()->random() % setlist.size() }; + int nbSet = sizeof(setId)/sizeof(setId[0]); + + int color1 = 1 + observer->getRandomGenerator()->random() % 5; + int color2 = 1 + observer->getRandomGenerator()->random() % 5; + int colors[] = { color1, color2 }; + int nbcolors = 2; + string lands[] = { "", "forest", "island", "mountain", "swamp", "plains" }; + + MTGDeck * tempDeck = NEW MTGDeck(MTGCollection()); + // Try to add basic lands from that set + tempDeck->addRandomCards(8, setId, nbSet, -1, lands[color1].c_str()); + tempDeck->addRandomCards(8, setId, nbSet, -1, lands[color2].c_str()); + tempDeck->addRandomCards(2, setId, nbSet, -1, "land"); + // If lands < 18 add from any set + int missingLands = 18 - tempDeck->totalCards(); + if (missingLands > 0) + { + tempDeck->addRandomCards(missingLands/2, 0, 0, -1, lands[color1].c_str()); + tempDeck->addRandomCards(missingLands/2, 0, 0, -1, lands[color2].c_str()); + } + // Lone artifact and creatures. + tempDeck->addRandomCards(1, setId, nbSet, -1, "artifact"); + tempDeck->addRandomCards(12, setId, nbSet, -1, "creature", colors, nbcolors); + // Want the deck to be 40 cards, take any card from the set in the colors + int missingCards = 40 - tempDeck->totalCards(); + if (missingCards > 0) + tempDeck->addRandomCards(missingCards, setId, nbSet, -1, "", colors, nbcolors); + + string deckFile = "random"; + string deckFileSmall = "random"; + + Player *player = NULL; + if (!isAI) // Human Player + player = NEW HumanPlayer(observer, deckFile, deckFileSmall, false, tempDeck); + else + player = NEW AIPlayerBaka(observer, deckFile, deckFileSmall, "", tempDeck); + + return player; +} + Player * Rules::loadPlayerRandomThree(GameObserver* observer, int isAI) { int color1 = 1 + observer->getRandomGenerator()->random() % 5; @@ -357,27 +401,10 @@ Player * Rules::loadPlayerRandomThree(GameObserver* observer, int isAI) Player * Rules::loadPlayerRandomFive(GameObserver* observer, int isAI) { MTGDeck * tempDeck = NEW MTGDeck(MTGCollection()); - tempDeck->addRandomCards(1, 0, 0, -1, "plains"); - tempDeck->addRandomCards(1, 0, 0, -1, "island"); - tempDeck->addRandomCards(1, 0, 0, -1, "swamp"); - tempDeck->addRandomCards(1, 0, 0, -1, "mountain"); - tempDeck->addRandomCards(1, 0, 0, -1, "forest"); - tempDeck->addRandomCards(3, 0, 0, 'R', "plains"); - tempDeck->addRandomCards(3, 0, 0, 'R', "island"); - tempDeck->addRandomCards(3, 0, 0, 'R', "swamp"); - tempDeck->addRandomCards(3, 0, 0, 'R', "mountain"); - tempDeck->addRandomCards(3, 0, 0, 'R', "forest"); - tempDeck->addRandomCards(4, 0, 0, -1, "land"); - tempDeck->addRandomCards(1, 0, 0, 'U', "land"); - tempDeck->addRandomCards(1, 0, 0, 'R', "land"); - tempDeck->addRandomCards(18, 0, 0, -1, "creature"); - tempDeck->addRandomCards(1, 0, 0, 'R', "creature"); - tempDeck->addRandomCards(1, 0, 0, 'M', "creature"); - tempDeck->addRandomCards(3, 0, 0, -1, "sorcery"); - tempDeck->addRandomCards(3, 0, 0, -1, "enchantment"); - tempDeck->addRandomCards(3, 0, 0, -1, "instant"); - tempDeck->addRandomCards(4, 0, 0, -1, "artifact"); - tempDeck->addRandomCards(1, 0, 0, -1, "planeswalker"); + + tempDeck->addRandomCards(20, 0, 0, -1, "land"); + tempDeck->addRandomCards(20, 0, 0, -1, "creature"); + tempDeck->addRandomCards(20, 0, 0, -1, ""); string deckFile = "random"; string deckFileSmall = "random"; @@ -399,14 +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", "Human", "Knight", - "Myr", "Samurai", "Shaman", "Shapeshifter", "Sliver", "Soldier", "Spellshaper" }; - const char* const whiteTribes[] = { "Angel","Cat", "Griffin", "Kithkin", "Knight", "Pegasus", "Soldier" }; - const char* const blueTribes[] = { "Artificer", "Merfolk", "Drake", "Faerie", "Illusion", "Vedalken" }; - const char* const blackTribes[] = { "Demon", "Faerie", "Horror", "Pirate", "Rat", "Shade", "Skeleton", "Vampire", "Zombie" }; - const char* const redTribes[] = { "Barbarian", "Berserker","Cat", "Devil", "Goblin", "Minotaur", "Werewolf" }; - const char* const greenTribes[] = { "Beast", "Cat", "Centaur", "Dinosaur", "Druid", "Elf", "Fungus", - "Saproling", "Spider", "Treefolk", "Werewolf" }; + 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" }; int multicolorTribesSize = sizeof(multicolorTribes)/sizeof(multicolorTribes[0]); int whiteTribesSize = sizeof(whiteTribes)/sizeof(whiteTribes[0]); @@ -482,6 +508,8 @@ Player * Rules::initPlayer(GameObserver *g, int playerId) return loadPlayerRandomFive(g, isAI); case GAME_TYPE_HORDE: return loadPlayerHorde(g, isAI); + case GAME_TYPE_SET_LIMITED: + return loadRandomSetLimited(g, isAI); default: return NULL; } @@ -790,6 +818,7 @@ GameType Rules::strToGameMode(string s) if (s.compare("random3") == 0) return GAME_TYPE_RANDOM3; if (s.compare("random5") == 0) return GAME_TYPE_RANDOM5; if (s.compare("horde") == 0) return GAME_TYPE_HORDE; + if (s.compare("set_limited") == 0) return GAME_TYPE_SET_LIMITED; if (s.compare("story") == 0) return GAME_TYPE_STORY; if (s.compare("stonehewer") == 0) return GAME_TYPE_STONEHEWER; if (s.compare("hermit") == 0) return GAME_TYPE_HERMIT;