- minor cleanup of MTGRules.cpp based on my comments in r3084. I visually verified that I didn't break the fix in r3084. Also ran the test suite.
-- in case somebody wonders about some of the tests I deleted, most of these tests are useless because all callers make sure alternateCost is not null (in isReactingToClick) and that the manapool can afford the cost, before doing the call to reacttoclick. Proving it by adding an assert, and also making the function protected, to be sure it is only called by the authorized children.
New code for Paralyze uses "teach(...)":
[card]
name=Paralyze
target=creature
auto=tap
auto=doesnotuntap
auto=teach(creature) {4}:untap myUpkeepOnly
text=Enchant creature -- When Paralyze enters the battlefield, tap enchanted creature. -- Enchanted creature doesn't untap during its controller's untap step. -- At the beginning of the upkeep of enchanted creature's controller, that player may pay {4}. If he or she does, untap the creature.
mana={B}
type=Enchantment
subtype=Aura
[/card]
it strings exactly like normal counters did, except now after the name you can add yet another "," and a number or word varible...if you will not have a name it is still required that you add the extra comma, as it is a seperator for the parser. so clock works swarm would be counter(1/0,1,,4)...no matter what, this ability will do nothing if the amount of the target counter is already higher then the max allowed, in this case 4...other effects can give the creature more counters...however..this ability will resolve to nothing if youve exceeded the limit. until you are under the amount again.
as it removed ais ability to momir...protip in MTG youre not allowed to interrupt your own abilities...the way momir is working now, it select an action that doesnt pass priority instead it instantly searchs for a momir ability...which is wrong...
the difference between vainshing and fading is...
fading sac triggers the NEXT time you try to remove a fade counter but cant, vanishing sac triggers WHEN you remove the last counter.
- Added method to build a card collection independently of the GUI to ease my unitary test application
- Added part of some network GUI I'm working on, it's #ifdef out, I'm only committing this part to ease later merges
- Added the beginning of a serialization code of the Player and related classes used for network support
- various other minor cleanup
general tip on getting ai to use an ability on a card.
titan forge for exsample
[card]
name=Titan Forge
auto={3}{T}:counter(0/0,1,Charge)
auto={T}{C(0/0,-3,Charge)}:token(Golem,Artifact Creature Golem,9/9)
text={3},{T}: Put a charge counter on Titan Forge. -- {T}, Remove three charge counters from Titan Forge: Put a 9/9 colorless Golem artifact creature token onto the
battlefield.
mana={3}
type=Artifact
[/card]
with the counter ability above the counter cost ability, ai will rarely ever use the titan forge to make a token.
however if you change the order around, ai will see the token ability first...then if it can afford it then it will make a token.
reason for this change is that it becames WAY to hard to player decks which contained mostly artifacts to share the feild, give 9 cards half the screen to display just didnt seem like a good choice compared to the creatures horizontal stack which can display almost 200 cards in the same screen width.