ie:
Card Name:
Quick Sliver
Mana Cost:
Converted Mana Cost:2
Types:Creature — Sliver
Card Text:Flash
Any player may cast Sliver cards as though they had flash.
without an over-ride testdestroy removes the observer before it can be any use to us.
i only enabled this for the lords/this'es....
(One could argue that this ID is completely meaningless and could be entirely ripped out, as the IDs obviously never made it to their intended target...)
this update requires you to update your rules folder files!!!
2nd
added 2 new vanguard game modes.
Stone Hewer Basic - when ever a creature enters play, a random equipment with a converted mana cost less than or equal to that creature is put into play and attached to it.
this mode is unlockable, requirement = win a match where 10 or more equipment were in the battlefeild at the moment you won.
Hermit Druid basic- in this game mode, during each of the players upkeeps, a random land card from their deck is placed into the battlefield, these do not count against your 1 land per turn limit.
to unlock this, win any match with less then 10 lands.
-- I removed the string comparison, which was expensive (the test is not necessary anymore, since it was "shielding" us from fake types (names), which are not creature subtypes, and therefore do not go through). I also moved one function call outside of the loop, just in case that wasn't optimized by the compiler.
- Removed unused Subtypes.cpp function (I don't really want people to use it, it can be quite expensive if used incorrectly)
- moved a test for issue 501 that has been fixed a while ago (we forgot to add the test to the test suite)
i also changed the logic behind wololo "ueot " instant ability creator...instead of sending it directly to genericinstantability i created a new class called AGenericInstantWrapper...which handles the adding, cloning, removel ect, exactly how we have always handled "instant abilities"...this should correct any further "odd edge case" issues with the new "ueot " code...
later i will varify if it works with every single ability we current build with a wrapper class...and see if i cant remove them all and convert "ueot " into the NEW until end of turn handling method....lets cross our fingers as it would remove ALOT of extra code if successful....
added
"offerinterruptonphase=blah"
to the parsing of the rules.txt files...the reason i want to handle it inside the rules.txt....
originally i was going to use the options variable for this, then i realized that if i use that variable, it would apply it to every game mode and peoples custom games...so instead i added the parsing in the actual rules.txt files, this way, if we want to offer interrupt on phase blah to MTG, but NOT have this interrupt offered in a mod or different mode, or if the different mod or mode should offer you a chance to interrupt ai in a different phase ...you can set each rule to interrupt in the phase you want...
now for the reason i added it in the first place...previously we were allowed an interrupt when the opponent drew a card in the draw step, this gave us a chance to do stuff on opponents turn....
recently wololo i beleave made draw actions not use the stack anymore(which was a good change, since as per MTG rules the actions of drawing is not a stack action)...but as a side-effect, we lose our chance to interrupt ai and do stuff on ais turn....
also, changed the ingame bonus thing, to start recording stuff towards bonuses on turn 2+...this solves reported issues with story mode "setting up" causing massive bonuses to be gained for doing nothing.....
* pruned out unused local variables.
---- There's no need to define something if it isn't going to be referenced. It consumes extra memory temporarily and more than anything is a potential cause for confusion down the road.
- 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.
- This is some Work in progress to make Wagic less "game" dependent.
This change especially is an attempt at moving away from some dangerous patents owned by some company.
It introduces "modrules.xml", a global configuration file describing dynamic settings for any given Wagic mod. It is very basic for now, but allows to customize a bit. In particular, it allows to remove the concept of shop and deck editor from the game, dynamically generate the main menu, and represent card activation with a mask rather than a rotation.
I have a sample in progress which I hope to submit in the days to come, a proof of concept (nothing fancy yet) for another type of game using these ideas, as well as a few other things I introduced recently.
In the future, I am hoping to extend modrules.xml so that it entirely describes the rules of a given card game. the other files in rules.txt will describe "extensions" to the core rules, just like they do right now, so this new file does not make them obsolete.
- Also fixed minor bugs I stumbled upon while developing