Commit Graph

3439 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
e9a2b2f495 added a guard against removing aloseabilities from a card which already has an active aloseabilities, we generally dont want these to remove each other...this also fixes a mem leak i created in the previous fix for an infinate loop this was creating, i left that fix in place just in case some crazy edge case would add it to a card again. 2011-05-10 14:40:54 +00:00
omegablast2002@yahoo.com
8c2c0ae8de made it an else transformer removetypes...reason, you are either
removing the types, removing all types, or adding a type...not ever doing them all in a single transforms.
2011-05-10 14:34:49 +00:00
techdragon.nguyen@gmail.com
ac6fd6bbf8 setting default orientation for iPhone and iPad.
restricted iPhone to landscape mode only.
2011-05-10 12:37:41 +00:00
wagic.the.homebrew
aed68a2cd9 Fix for issue 652 (Use Tidal warrior several times causes a crash) 2011-05-10 11:37:46 +00:00
omegablast2002@yahoo.com
da1ec8eed3 moved the readding of types below the removel of abilities incase a becomes would be used as a newability.
2nd, found a infinate loop is created when you cast a loseabilities on a card which has loseabilities, when the 2 effect ends it readds the first one, before it is removed, making the first one remove the 2nd one and repeat forever....

this is only a half fix, it created a memleak in the place of the loop :/ so wololo please review!!!
2011-05-09 19:42:30 +00:00
omegablast2002@yahoo.com
8737aec005 couple tweaks to transforms to it doesn't add subkeywords as types....
2nd, removed a peice of code which was originally added i imagine before list mentioner was created which added cards whos names ended in "s" to the subtypes list, this is completely unrelated to the "s" charector added to targetchooser. this was actually a really nasty hack....
previous subtypes list contained 1200 variables...the new one after this removel is about 237ish....

this does not impact foreach, or any targetchoosers ability to target a card by name, targetchooser is coded to add card names to the subtypes list as it needs them, so using foreach(arbor elf) will add this to subtypes list for targeting purposes, in the future we might want to have this kind of check done and handled outside of the subtypes list, adding card names to that list for the purpose of targeting is just dirty.

this fixes a ugly lag spike introduced with the change to subtypes...for now...we need to consider a better way to sort these in the future to avoid this returning as subtypeslist gets bigger.
2011-05-09 18:10:10 +00:00
omegablast2002@yahoo.com
6d4f0c024c updated "removesubtypes" with "removecreaturesubtypes" 2011-05-09 16:35:44 +00:00
omegablast2002@yahoo.com
01cfbf5a02 couple bug fixes, changed a subkeyword of transforms "removesubtypes" to "removealltypes" remove all the types of the card, added "removecreaturesubtypes" to maintain previous support it was used for. 2011-05-09 15:55:34 +00:00
wagic.the.homebrew
b1ea63cd79 changed Subtypes map into a vector, hoping for some speed improvements. 2011-05-09 13:56:22 +00:00
guzhenjie1@gmail.com
7447a451eb Corrected a typo in Urborg, Tomb of Yawgmoth. 2011-05-09 11:40:29 +00:00
solo81@web.de
465163cf3b Added a test for Celestial Sword, representing a small card group with complex "newability" structures. 2011-05-08 13:51:30 +00:00
omegablast2002@yahoo.com
f8406e9de2 fix for maxcast...the currentPlayer is not always the game->currentlyActionPlayer...in the cast of maxcast and play, we want to check restrictions vs the currentAction player.... 2011-05-08 13:38:12 +00:00
techdragon.nguyen@gmail.com
0f4656453f added mtg.txt to project for easy reference 2011-05-08 13:06:19 +00:00
omegablast2002@yahoo.com
96c636643a it was reported to me that the new phrexian mana should add to the cards converted mana cost...so a card which cost {b}{p(r)}{p(r)} should be 3 converted... 2011-05-08 12:49:39 +00:00
omegablast2002@yahoo.com
27df1e9172 removed a check that was causing gem hide sliver lorded manaproducer to not reacttoclick...i moved the check for extra cost to activatedability, so this became obsolete.... 2011-05-08 11:59:08 +00:00
techdragon.nguyen@gmail.com
82058e97c5 * fixed some formatting
* 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.
2011-05-08 11:56:25 +00:00
omegablast2002@yahoo.com
2c34aaf8a5 fixed a bug intruduced by a refactor to the parsing of transforms ability with caused "newability" to be split incorrectly...im sure it was a mistake, or maybe rushed? at the point this code is "parsing between" the abilities have already been split up...all we do here is erase the "newability[" and last of "]" from the string.... 2011-05-08 09:32:07 +00:00
Xawotihs@gmail.com
18a75cd7f8 Recommit xcode project, something was broken 2011-05-08 09:31:32 +00:00
wagic.the.homebrew
2c0b5baab7 Fix for issue 647 (Evil Presence cast on a swamp removes mana ability) 2011-05-08 09:06:56 +00:00
solo81@web.de
b2ba514d7a Fixed Decomposition. 2011-05-08 08:09:51 +00:00
solo81@web.de
9d39974fa6 Fixed Tumble Magnet's card text. 2011-05-08 07:52:28 +00:00
wagic.the.homebrew
47ed4e5e70 Fixing Rancor, which was broken (mistake?) in r3620 2011-05-08 06:50:42 +00:00
solo81@web.de
f4ffef6934 Fixed Midsummer Revel. 2011-05-07 23:36:08 +00:00
solo81@web.de
03f102693d Added 28 cards based on rev3595.
Blanket of Night
Blood Moon
Contaminated Ground
Conversion
Dream Thrush
Dreamwinder
Evil Presence
Floodchaser
Glaciers
Grixis Illusionist
Humble
Kavu Recluse
Kukemssa Serpent
Lingering Mirage
Magus of the Moon
Moonbow Illusionist
Mystic Compass
Reef Shaman
Sea Snidd
Sea's Claim
Spreading Seas
Stormtide Leviathan
Streambed Aquitects
Tainted Well
Thelonite Monk
Tideshaper Mystic
Unstable Frontier
Zombie Trailblazer
2011-05-07 21:08:15 +00:00
Xawotihs
883f92d8e2 Fixed IOS build 2011-05-07 17:10:01 +00:00
wagic.the.homebrew
e713122e7f fix PSP build 2011-05-07 12:43:00 +00:00
wagic.the.homebrew
ab33d29682 - Fixed a bug where the AI would block its own attacking creatures (I reintroduced that bug recently when I removed a safeguard Zethfox had added a while ago)
- 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.
2011-05-07 11:58:37 +00:00
wagic.the.homebrew
fe276ca330 Minor code cleanup in ActionStack 2011-05-07 10:12:45 +00:00
wagic.the.homebrew
d652f754d8 Moved "static" mana render a bit to the right for opponent, to avoid rendering it over the opponent's avatar 2011-05-07 08:44:07 +00:00
wagic.the.homebrew
3e4dc43c1c Adding License information for Wagic and its resources, please review (should the main LICENSE file made much more complete, and copy the contents of the subfolders' LICENSE files ?) 2011-05-07 08:37:12 +00:00
wagic.the.homebrew
472d593563 remove "cleanup" phase being automatically added to custom phase ring. People who want it should add it manually in their custom ring. 2011-05-07 04:48:56 +00:00
wagic.the.homebrew
f96635541d - Fix for issue 650 (tidal Warrior effect doesn't end at end of turn)
- Fix PSP compilation
2011-05-07 04:10:47 +00:00
wagic.the.homebrew
062d5f9485 Fix issue 650 (Deck Editor doesn't count basic land types as mana producers anymore, Filters can't find basic mana ability producers anymore) 2011-05-07 02:42:49 +00:00
wagic.the.homebrew
b26bfb09bd Fix Build error on psp 2011-05-06 13:46:20 +00:00
wagic.the.homebrew
2f498780a2 Fix: Mana Producers don't use the stack (there already was a partial fix I believe, this one fixes issues with triggered abilities) 2011-05-06 09:01:27 +00:00
wagic.the.homebrew
7beb958067 Adding a way to mark decks as "locked" based on options requirements (option on or off). Can be used for example to lock a deck until a specific set is not unlocked. Works for both player decks (could be used for premade?) and AI decks. 2011-05-06 06:40:00 +00:00
wagic.the.homebrew
efad3f652f Minor refactor of menu text for "move" abilities. Zeth, Dr.Solomat, please let me know if something goes wrong. 2011-05-06 04:43:27 +00:00
wagic.the.homebrew
12228b51a0 - Minor refactor of "transforms" ability
- 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
2011-05-06 03:52:35 +00:00
wagic.the.homebrew
1e2ed785eb Fix for issue 646 (Tidal Warrior) 2011-05-06 02:27:49 +00:00
wagic.the.homebrew
691a1e1b91 - Fixed a Bug where AI would not block any attacker in Demo mode (bug introduced in r2759)
- 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
2011-05-05 14:27:46 +00:00
guzhenjie1@gmail.com
f0820697f8 Corrected following cards:
Aspect of Mongoose
Brilliant Halo
Cessation
Despondency
Endless Cockroaches
Fallen Ideal
Fiery Mantle
Fool's Demise
Fortitude
Glistening Oil
Launch
Rancor
Shivan Phoenix
Sleeper's Guile
Sluggishness
Spine of Ish Sah
Spirit Loop
Spreading Algae
Undying Rage
Weatherseed Treefolk

autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(myhand)
 ==> 
autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerhand)

Twilight Shepherd
auto=moveTo(myhand) all(creature[fresh]|mygraveyard)
 ==> 
auto=moveTo(myhand) all(*[fresh]|mygraveyard)

Undying Beast
autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(myhand)
 ==> 
autograveyard=@movedTo(this|graveyard) from(battlefield):moveTo(ownerlibrary)
2011-05-05 12:01:10 +00:00
wagic.the.homebrew
748af5b461 - Adding a generic "ueot" effect. This will be initially confusing, but the ultimate goal is to get rid of all the particular cases we handled with "until end of turn" effects. this "ueot " works like "may " and "choice ", it has to be at the very beginning of the ability(ies) it targets. The reason is to avoid conflicts with the existing "ueot" we have all over the place. I have only tested it with transforms and loseabilities for now (see "ovinize") but hopefully this will become the new norm. This should also reduce the code inside the parser, long term.
- Adding "Ovinize" as an example of this new keyword.
- moved "parseBetween" in utils as I am using it in other files for wome work in Progress.
2011-05-05 06:18:50 +00:00
wagic.the.homebrew
4c572a1ffa Fixes for Boosters in the Shop. Fixes issue 644 and issue 621 2011-05-05 05:51:50 +00:00
guzhenjie1@gmail.com
9902b1c74b Corrected a typo in text of Palladium Myr. 2011-05-04 15:34:38 +00:00
wrenczes
5041916fdd Fixed the psp build breakage in r3595. Erwan, pls review - I think that the subtypesToType map probably should be unsigned ints instead of signed, but I wasn't about to sweep through the file right now. 2011-05-04 10:27:18 +00:00
wrenczes
bfffb169cf Fixed the psp side - darned implicit casts... 2011-05-04 10:15:38 +00:00
wrenczes
0cb8c50b39 Replaced ManaCost's int array with int8_t. Shrinks ManaCost by another 24 bytes, which in turn lowers CardPrimitive's footprint by the same amount. 2011-05-04 10:02:47 +00:00
wagic.the.homebrew
d922d4fe06 - Added "loseSubtypesOf(type)" ability. For example, loseSubtypesOf(land) means "target loses all its land subtypes"
- 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.
2011-05-04 04:04:03 +00:00
wagic.the.homebrew
494bcf3315 Adding a "loseAbilities" keyword per Dr.Solomat's request. The Goal was to code Evil Presence, but I think there is still some work to do to achieve this. The main concern is that (according to the Miki), neither transforms(( nor "becomes(" allow to lose some subtypes. A land enchanted with Evil Presence is supposed to lose its land subtypes. Since we don't support subtypes that good, I don't think this is possible. Additionally, Evil PResence would require to move "{T}:Add{X}" from the basic lands primitives into the rules (which sounds quite easy to do). I've nevertheless tested this on Gaea's Cradle, and it works. (Gaea's Cradle loses its abilities) 2011-05-04 01:33:34 +00:00
wagic.the.homebrew
810548d816 Minor GameObserver refactor, should have no impact on the game. 2011-05-03 13:46:50 +00:00