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.
- added some cache for function getCardByName. On my machine, this divides the running time of the test suite by almost 2 (now runs in 12 minutes instead of 21)
* added additional meta data for decks when saving them back to file.
- decks saved this way now are split into three regions: creatures, spells and lands. It's more for a visual sorting if a
player wanted to look at the deck outside of the game. It does not impact the deck loading negatively at all. It may
increase performance in cases where the deck was previously defined using the canonical names of the cards as the numeric ids
reduce the work done when looking up the cards by name.
* modified ManaCost toString method.
* added toString method for ManaCostHybrid ( possibly make ManaCostHybrid a subclass of ManaCost)
* added additional operator overloading for ManaCost for printing to cover ManaCost when it's a pointer as well as a copy
( TODO: might want to check if making usage of ManaCost as a copy as opposed to a ptr is really necessary in most cases. )
* added alternate version of "trim" to handle trimming temporary strings as returned by things like ostringstream.str().
- This was necessary since the PSP compiler doesn't do the necessary adjustments for those types of calls.
2 fix for token creator livingweapons...this was actually a preexisting bug, but not noticed becuase these are the first equipments that use token gen...when equipping it would readd the oneshot tok gen as an activated ability with no cost...generally we dont want to pass oneshot token generation to another card by equipping...
and 3rd...
got rid of the disgusting vanishing workaround.
it was riddled with bugs, got exsample if the creatures would gain indestructible the -99/-99 they were reciving did nothing to rid the battlefield of the creature...
new vanishing is
auto=vanishing:number
thats it, no crazy 2 trigger lines with lords ect...
Word of Seizing
Wipe Away
Take Possession
Sulfur Elemental
Sudden Shock
Sudden Death
Stonewood Invocation
Krosan Grip
Extirpate
Celestial Crusader
Kaijin of the Vanishing Touch
Crushing Pain
Fatal Blow
Final-Sting Faerie
Opportunist
Witch's Mist
Reciprocate
Retaliation
Giltspire Avenger
doc might find more uses for it then i, just thought i would code some cards to go in with it.
note:pregamebooster failing again...whoever keeps adding new tokens to the card.dat please refrain from doing so as it is breaking a test in test suite...
this(damaged)
added
targetchooser [damaged] status
added
targetchooser [controllerdamager]
targetchooser [opponentdamager]
basically checks for whos doing damage to who in a match per turn.
text=First strike. -- Deathtouch. -- Whenever a creature an opponent controls is put into a graveyard from the battlefield, you may return target artifact card from your graveyard to your hand.
==>
text=Flying, haste -- {1}{R}: Hellkite Igniter gets +X/+0 until end of turn, where X is the number of
artifacts you control.
2nd change is a bug fix, i noticed that cards which were mana producers which contained a cost but did not contain a {t}: would still tap at first i thought this was graphical, however after further reveiw i noticed that the card was indeed truely tapping...this was happening becuase amaproducer had a defualt of 1 for doTap/tap...and since genericactived ability does not go through the motions of setting the true manaproducers "doTap" which can be witnessed by stepping through the processes...it was defualting to a tap, even tho the cost might have just be {1}:add{ ....
This btw points out another circular dependancy between the texture and the JQuad - a texture owns a bunch of JQuads, yet the renderer uses JQuads and always assumes that the texture is valid. We're going to need to add more defensiveness to JGE to protect against this.
Other changes in this check-in: WResourceManager doesn't derive from JResourceManager anymore. It actually didn't require anything from the base, so I killed the dependency. Also cleaned up the notion of a WTrackedQuad in the WCachedResource - it didn't need a separate class, just a better container.
I've build this & tested against PSP, win, linux, QT (linux). I haven't tried against iOS and QT Win, or Maemo. If these other platforms are broken, I apologize in advance! - I'm hoping it should be fairly simple to put them back into play.
* since I rescaled the images down to 50%, I moved the display to the upper right
info box on the last line to the right of the "# of games played" information.
Things look like it will fit as long as the number of games is under 1000