- Added a way to specify "no interrupt" in modrules.xml (I need to write a doc about this file) for a given game. This does not mean the stack does not show up (the stack is interesting to see what the opponent does), but that it only offers to continue.
- Updated changeling and transforms to only get creature types (as initially intended by the code), removed hardcoded list of "types to avoid"
The test suite passes
- Fixed a Bug where AI would not correctly assign blockers if the first attacker is super strong.
- Added a hack to prevent AI from an infinite loop while choosing a target. There are edge cases where the AI gets to choose the targets for a TargetChooser that doesn't belong to it. I couldn't dig too long for the root cause, so I added a "return 0" when the case happens. Should probably open a ticket
- Added a "Hint" System in AI decks, to help the AI with its strategy. This is not really usable yet, it only works with abilities (not cards to play), and I only added some basic code for counters and tokens. This can probably be extended, but let's wait until we see it working on that other game I'm working on, before rushing into adding hints to all AI decks...
- minor cleanup of AI Code
- Added Evil Presence, as an example of the new keywords loseabilities and losesubtypes. It's quite experimental but I added 3 tests that cover the basics. Please report if you find bugs.
- moved the "lands produce mana" rules outside of the primitives, and into the external rules. This was a necessary step to create cards such as Evil Presence.
- real support for subtypes. Needs some more testing, but there are now functions in Subtypes.cpp to know if a given subtype is a creature subtype, or a land subtype, etc...
- minor refactor of MTGDeck.cpp
Notes:
- I checked that the AI can still use lands
- This change has a bad impact on primitives loading performance (thanks Wil for the loading time output). This is probably due to suboptimal algorithms and data structures for subtypes. If the impact is strong on lowend devices, I can probably optimize a bit (the map subtypesOf could be changed into a vector with some work)
- The test suite passes, added 3 tests for evil presence.
- "Manapool empties at the end of each step" becomes an ability, and was moved into the external rules file. "removemana(*) to remove all, removemana(*{G}) to remove all green, removemana(*{G}{B}{R}) to remove all green black red, removemana({G}{G}{B}{U}) (no "*") to remove a specific value.
- Added a possibility to make abilities non interruptible. With little work, this could be added to the parser if needed. Please use with care, let's discuss what is an acceptable usage of this now functionality, if needed.
Crossing fingers I didn't break anything major. The test suite passes, though I expect some edge case bugs to appear. Apologies in advance, I think this change is worth it.
Arrogant Bloodlord
Ceremonial Guard
Cinder Wall
Fog Elemental
Gemini Engine
Goblin Sappers
Rainbow Vale
Stoic Ephemera
Teferi's Veil
Thawing Glaciers
Time Elemental (only to "sacrifice", not to "damage:5 controller"! --> rules on Gatherer)
Undiscovered Paradise
Vebulid
Wall of Nets
2. Removed ", sourceinplay" from:
Wall of Tears
Following the rules, a creature blocked by Wall of Tears is indeed returned to owner's hand even if Wall of Tears has left the battlefield before the end of combat.
This is the same reason why several cards did not get ", sourceinplay":
Example case for not adding ", sourceinplay":
Tolarian Entrancer
"The control change has no duration; you’ll retain control of that creature until the game ends or until some other effect causes it to change control. It doesn’t matter if Tolarian Entrancer leaves the battlefield,
or if Tolarian Entrancer has already left the battlefield by the time the “at end of combat” ability triggers".
This is also true for all cards which have a certain effect on other creatures blocking or having been blocked by it.
3. Added "once" to:
Basalt Golem
Frostweb Spider
Joven's Ferrets
Wicker Warcrawler