- 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.
32 lines
994 B
Plaintext
32 lines
994 B
Plaintext
#make sure this file always looks like mtg.txt, minus the initial shuffle and draw
|
|
hidden
|
|
[INIT]
|
|
mode=mtg
|
|
[PLAYERS]
|
|
life:20
|
|
auto=@each my draw:draw:1
|
|
auto=maxPlay(land)1
|
|
|
|
#Lands Mana Rules
|
|
auto=lord(Swamp|MyBattlefield) {T}:Add{B}
|
|
auto=lord(Forest|MyBattlefield) {T}:Add{G}
|
|
auto=lord(Island|MyBattlefield) {T}:Add{U}
|
|
auto=lord(Mountains|MyBattlefield) {T}:Add{R}
|
|
auto=lord(Plains|MyBattlefield) {T}:Add{W}
|
|
|
|
#Mana Empties from manapool at the end of each phase
|
|
auto=@each untap:removeMana(*)
|
|
auto=@each upkeep:removeMana(*)
|
|
auto=@each draw:removeMana(*)
|
|
auto=@each firstmain:removeMana(*)
|
|
auto=@each combatbegins:removeMana(*)
|
|
auto=@each attackers:removeMana(*)
|
|
auto=@each blockers:removeMana(*)
|
|
auto=@each combatdamage:removeMana(*)
|
|
auto=@each combatEnds:removeMana(*)
|
|
auto=@each secondmain:removeMana(*)
|
|
auto=@each end:removeMana(*)
|
|
auto=@each cleanup:removeMana(*)
|
|
|
|
#reset Creature damage at the cleanup phase
|
|
auto=@each cleanup:all(*|myBattlefield) resetDamage |