Commit Graph

2811 Commits

Author SHA1 Message Date
solo81@web.de
015fdb7bfa Fixed Jackal Pup. 2011-01-30 21:17:48 +00:00
wrenczes@gmail.com
6675a7da31 Implemented a lazy load pattern for the deck stats - when the DeckMenu is displaying decks, it calls LoadStats() for only the ones visible in the list. This helps reduces the lag that occurs each time we attempt to load all the AI decks during match selection.
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.
2011-01-30 13:06:21 +00:00
wagic.jeck
ebc7f93682 Jeck - Fixed icon indirection in Doxyfile. 2011-01-30 11:24:26 +00:00
wagic.jeck
e0f7bf26d8 Jeck - First doxygen commit, basic information on WFilter classes. Also added filter price adjustment for some of the newer basic abilities (the CANTLOSE varieties now cost more to filter). 2011-01-30 11:14:36 +00:00
solo81@web.de
329b0cf929 Added 9 cards based on rev2979.
Cloak and Dagger
Dragon Breath
Dragon Fangs
Dragon Scales
Dragon Shadow
Dragon Wings
Obsidian Battle-Axe
Sword the Meek
Veteran's Armaments
2011-01-30 10:39:16 +00:00
guzhenjie1@gmail.com
f5cfe6a3a9 Fixed Psychosis Crawler:
mana={6}
 ==> 
mana={5}
2011-01-30 09:36:05 +00:00
guzhenjie1@gmail.com
ae40e31d04 Fixed the following cards:
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]
2011-01-30 08:07:01 +00:00
omegablast2002@yahoo.com
c4ffc214ab moved token creator under aequip so i can do the same fix to livingweapon as i did for new target...
also refactored it a bit to remove the livingweapon and battleready copy paste code.
2011-01-30 00:01:57 +00:00
omegablast2002@yahoo.com
50aa62675e adding life loss event sending to damage from creature sources in combat. 2011-01-29 22:32:34 +00:00
omegablast2002@yahoo.com
4103a8964f fixed an oversight and an error...in lifelostthisturn for a player, if the life gain was less then 0 then i want to ADD the abs pos to the amount, not remove it...and damage from creatures is considered lifelost... 2011-01-29 22:21:18 +00:00
omegablast2002@yahoo.com
853b8ea5c6 fixed gravetitan bug reported, added new keyword "retarget" as another support for newtarget...
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.
2011-01-29 21:58:29 +00:00
solo81@web.de
ed93646785 Reverted one unintended change from last revision. 2011-01-29 21:55:02 +00:00
solo81@web.de
938e31a258 Fixed old helm_of_kaldra.txt.
Now that Helm of Kaldra's code is complete i had to add a "choice 0" to this test.
2011-01-29 21:52:53 +00:00
solo81@web.de
ac3b65995b - Added MBS. 124 out of 155 could be added (that's over 80%).
- Added a test for livingweapon.

- Reverted one part of rev2975.
2011-01-29 20:46:37 +00:00
guzhenjie1@gmail.com
1c119f2ace Fixed Helm of Kaldra:
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.
2011-01-29 20:13:44 +00:00
solo81@web.de
5e4902c229 - Completed code for Helm of Kaldra.
- Added Kaldra token (keyword:"newtarget" --> rev2922).

- Added test for Kaldra.
2011-01-29 16:05:01 +00:00
guzhenjie1@gmail.com
11dc8ac671 Fixed Spiritual Asylum:
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.
2011-01-29 15:32:32 +00:00
guzhenjie1@gmail.com
73025806ad Fixed the following cards:
Rally the Troops
Remove
Scorching Winds
Treetop Defense
Warrior's Stand
restriction=opponentblockeronly
 ==> 
restriction=opponentblockersonly

Heavy Fog
auto=preventalldamage to(controller) from(creature[attacking] ueot
 ==> 
auto=preventalldamage to(controller) from(creature[attacking]) ueot
2011-01-29 15:25:54 +00:00
solo81@web.de
d78138fe25 Added Spiritual Asylum. 2011-01-29 14:51:13 +00:00
omegablast2002@yahoo.com
4aa852ab0d the vampire restriction checks 2 or more, i had it checking for 3 or more. 2011-01-29 12:37:45 +00:00
omegablast2002@yahoo.com
4e511d2f37 fixed bloodchief acession trigger was coded wrong. 2011-01-29 12:36:44 +00:00
solo81@web.de
74bf7fdab3 Added 8 cards based on rev2963.
Artifact Ward
Avatar of Fury
Bartel Runeaxe
Gaea's Revenge
Karplusan Strider
Spellbane Centaur
Suq'Ata Firewalker
Tetsuo Umezawa
2011-01-28 23:03:45 +00:00
techdragon.nguyen@gmail.com
e74c63bc0b fixed mem leak 2011-01-28 22:57:10 +00:00
techdragon.nguyen@gmail.com
4d17ab9962 fixed a null pointer for deck editor on creating a new deck. 2011-01-28 22:23:09 +00:00
solo81@web.de
610d55d0ba Fixed several cards with cost alteration.
They were missing the restcost-part for the opponent.
2011-01-28 22:06:31 +00:00
solo81@web.de
5b2a50fbec Added 33 cards based on rev2926 (keyword "share").
[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
2011-01-28 20:58:29 +00:00
omegablast2002@yahoo.com
7dfa655323 added support for cantbetargetof(something[optional])
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
2011-01-28 19:08:01 +00:00
omegablast2002@yahoo.com
6af545a797 fixed a bug that arose from giving the Ai the ability to actually interupt with something. found that ai was allowed to run "chooseBlockers()" and has been running this function EVERYTIME even before the update i made, when ever it was choosing actions during blockers. even when its blockers were already choosen and it no longer had proirity. 2011-01-28 18:26:34 +00:00
Xawotihs
cba0a59023 Removed useless attribute 2011-01-28 17:34:49 +00:00
techdragon.nguyen@gmail.com
5e651f03b2 moved mulligan code out of GameStateDuel and into Player base class. Taking a mulligan seems better
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 )
2011-01-28 13:30:29 +00:00
wrenczes@gmail.com
3187487987 Minor tweaks to Mike's map of maps cache work on stats. Mostly these changes are stylistic changes that favor more terse code, but there was one bug where a double-delete was happening - GameStateDeckViewer used to allocate its own StatsWrapper, and deleted it as part of teardown - now that the allocation is owned by the deck stats instance, it's not allowed to do the deletion anymore.
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.
2011-01-28 10:21:23 +00:00
wrenczes@gmail.com
f4f1fdcd3d Another LF property change. 2011-01-28 06:07:14 +00:00
wrenczes@gmail.com
32cabc15c2 Forcing LF as the line ending style through SVN properties. No actual code changes here. 2011-01-28 06:00:51 +00:00
techdragon.nguyen@gmail.com
8156619d49 added guard around TRACK_FILE_USAGE define to disable it on a PSP build. The related code does not compile for the PSP builds. 2011-01-27 16:15:12 +00:00
techdragon.nguyen@gmail.com
ce7745bfa6 First attempt to reduce load time of player deck selection screens.
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.
2011-01-27 16:13:40 +00:00
omegablast2002@yahoo.com
e87f5edaf5 Orim's Chant canattack ====>cantattack 2011-01-27 08:15:51 +00:00
omegablast2002@yahoo.com
f06f67addf fixed typo in war elemental 2011-01-26 15:00:52 +00:00
omegablast2002@yahoo.com
60c589ccaa fixed a bug reported for Ghost Council of Orzhova, involving MTG rulings on such effects...if the target of the effect is no longer in the targetted zone at the time the effect goes to resolve, it will still be put on the stack and resolve to do nothing at all. AKA if you sacrifice Ghost to herself, or use ghost to sacrifice that goblin which has {s}:damage:1 target player...and you interupt that ability to sac the goblin for the one damage...while the ability is on the stack..it should not blink the goblin afterwards...
i was originally not going to fix it but it bothered me enough thinking of possible exploits that i went ahead and corrected it.
2011-01-26 13:38:21 +00:00
wagic.the.homebrew@gmail.com
cc6668b632 Erwan
- 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
2011-01-26 12:43:43 +00:00
guzhenjie1@gmail.com
83a340d38e Fixed the following cards reported by kaioshin in forum:
1. Bant Sureblade
2. Crystallization
3. Esper Stormblade
4. Grixis Grimblade
5. Jund Hackblade
6. Naya Hushblade
2011-01-25 11:03:56 +00:00
wrenczes@gmail.com
d439be4f75 Fixed http://code.google.com/p/wagic/issues/detail?id=572, where a card sometimes might not show its tap status correctly. My fix for 550 was slightly off, in that if a card view's position was updated (ie from a zone change, etc), the pos pointer shouldn't be cleared. Only the pos related to the 'this' pointer is the one that can't be referenced anymore, fixed the destructor code. 2011-01-25 07:52:01 +00:00
techdragon.nguyen@gmail.com
6100641edd changed line endings to UNIX style line enidngs. last commit didn't take for some reason. 2011-01-24 20:19:17 +00:00
techdragon.nguyen@gmail.com
7848669702 changed line endings to UNIX style line enidngs 2011-01-24 19:56:45 +00:00
omegablast2002@yahoo.com
b0fe919cc3 fresh eboot 2011-01-24 18:47:59 +00:00
omegablast2002@yahoo.com
c6584a9e9d meant hasType...tho im not really sure its needed(?) 2011-01-24 18:26:04 +00:00
omegablast2002@yahoo.com
0b0da78e30 removed a change that wasnt supposed to be there. sorry! 2011-01-24 18:23:02 +00:00
omegablast2002@yahoo.com
5f2af4413a fixed the conflicted cards mike reported.
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.
2011-01-24 18:17:43 +00:00
omegablast2002@yahoo.com
beec00c254 2 changes, first fixed the bug where auras were causing the cards to slide to the right, auras always have targets, so i added a conditional to guiplay to ignore adding it to the horizontal shift as these auras should never be just laying in the battlefield with no target.
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...
2011-01-24 17:58:14 +00:00
guzhenjie1@gmail.com
556df85a31 1. Fixed the Skeleton token of Drudge Spell and Graypelt Refuge in mtg.txt.
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
2011-01-24 11:05:42 +00:00
omegablast2002@yahoo.com
46891d8de8 added a commit to "thatmuch" variable to explain what its for. 2011-01-23 18:23:44 +00:00