This still could be improved - DeckMetaData's constructor loads an MTGDeck object to parse out the name of a deck from its file. This means that we crack open 106 files on the first attempt to show the list of opponent decks. I started optimizing this, but reverted, as the list itself is sorted alphabetically. Currently, with these mods, it's still taking 4 1/2 seconds on my psp to load the opponent list on the first go around.
While at it, did some cleanup - removed the need for passing around a player pointer in some of the DeckStat functions, etc.
name=Contested Warzone
==>
name=Contested War Zone
text={T}: Add {1} to your mana pool. -- {1}: Inkmoth Nexus becomes a 1/1 Blinkmoth artifact creature with flying and infect until end of turn. It's still a land.
==>
text=Whenever a creature deals combat damage to you, that creature's controller gains control of Contested War Zone. -- {T}: Add {1} to your mana pool. -- {1}, {T}: Attacking creatures get +1/+0 until end of turn.
In MBS cards:
primitive=Contested Warzone
==>
primitive=Contested War Zone
[card]
primitive=Spine of Ish Sah
id=214069
rarity=R
[/card]
==>
[card]
primitive=Spine of Ish Sah
id=214076
rarity=R
[/card]
reworked the handling of new target...auras and equipments can not be treated the same...doing so allowed the player to then use the equip function of the card and gain a double bonus. now i call directly on the equip function to do the equiping so that it works with its own function to add the effects. keeping a person from gaining double bonus.
auto={1}:aslongas(Sword of Kaldra|mybattlefield) aslongas(Shield of Kaldra|mybattlefield):token(-47449)
==>
auto=aslongas(Sword of Kaldra|mybattlefield)aslongas(Shield of Kaldra|mybattlefield)aslongas(Helm of
Kaldra|mybattlefield) {1}:token(-47449)
Deleted id=-47449 of Kaldra token to make its card image show up.
text=@attacking(creature|myBattlefield):sacrifice
==>
auto=@attacking(creature|myBattlefield):sacrifice
text=Creatures and lands you control have shroud. (They can't be the targets of spells or abilities.) -- When a creature you control attacks, sacrifice Spiritual Asylum.
[card]
name=Maelstrom Pulse
target=*[-land]
auto=all(*[share!name!]) destroy
text=Destroy target nonland permanent and all other permanents with the same name as that permanent.
mana={1}{B}{G}
type=Sorcery
[/card]
Card list --> First comment
for "this card cant be the target of green spells or abilities" style cards.
added poisoned status trigger for attacking, so far its the only place this is checked. we will see what the next set does with this keyword
encapsulated as a player function rather than loose code inside the state transitions of GameStateDuel
Note: Inside of the mulligan code I assigned game to currentPlayerZones for clarification rather than
something functionally required. "game" seems ambiguous as "game" is also referenced throughout the code for the GameObserver
keeping this change localized to this method until more analysis can be done. The pattern that was here before was
game->currentPlayer->game
where the first "game" represented the GameObserver and the second the collection of zones (MTPPlayerCards) to the current player.
I would suggest changing the Player instance of game to something that represents its data, the game zones associated to the current player.
"game" seems too generic, as it can be interpreted to encompass many things rather than just dealing with the different zones (library, exile, discard, etc )
I'll also note that the mods I did to getDeckMetaDataById() are completely unnecessary - pragmatically speaking, it's doing the same thing. The only difference is that I'm using std::find_if instead of brute iterator manipulation, and I'm using a predicate function. For a simple check like this, it's kind of pointless, but if you need to do more complex comparisons, predicate operators can become quite powerful.
This change makes use of caching the DeckStats and DeckStatsWrappers into singleton caches that
get flushed when you quit the game. The initial load time will be significant as lazy loading has not
been coded yet for the ai decks.
TODO: lazy load the player and ai decks as they appear on the screen. Currently, each screen loads
all decks.
- removing the daily build folder. They take too much space in the repository. If you do daily builds, please use the "download" section of the google code page, or update the build to some server (megaupload or your own server), and post it on the forum. Thanks
saprolings conflict i have not fixed -1924 is saproling, tho i explictly remember replacing all these with token(Saproling,creature saproling,1/1,green) not sure who changed them back, the others are indeed due to incoding.
2nd, started laying some ground work for planeswalkers.
added the planeswalker rule, as per mtg rules, if you have a type=planeswalker subtype=jace already on the battlefield, both are sent to the graveyard. so you can not have a jace mind scuptor and a jace beleren out at the same time. i choose to use subtype= and type= rather then adding another variable to MTGCard...
also, added GuiPlay positioning for planeswalker,
i think theres been a HUGE misunderstanding about planeswalkers which has most going "battlefield is too crowded where would be put them...easy...slap them at the end of the lands ..done...theyre not creatures or artifacts/enchantments..so i moved them to the colum with the lands and have guiplay slap them at the end of that colum...btw this is in no means final...if someone can think of a better solution be my guest, but looking at the planeswalker (workaround) thread, its pretty obvious that no one will care where we slap the planeswalkers, as long as theyre supported. planeswalkers have alot more ground to cover...
Add Skeleton token for Drudge Spell in HML. _cards.dat:
[card]
primitive=Skeleton
id=-2915
rarity=T
[/card]
2. Fixed the Liege of the Pit according MTG rules.
3. Removed "丒" in following cards' text:
Eternity Vessel
Grizzly Fate
Ior Ruin Expedition
Sunspring Expedition
Ulasht, the Hate Seed
Umezawa's Jitte
4. Removed "?" in following cards' text:
Argent Sphinx
Kuldotha Phoenix