Commit Graph

3599 Commits

Author SHA1 Message Date
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
wagic.the.homebrew
0b9ff076e6 Please update your rules folder
- "Manapool empties at the end of each step" becomes an ability, and was moved into the external rules file. "removemana(*) to remove all, removemana(*{G}) to remove all green, removemana(*{G}{B}{R}) to remove all green black red, removemana({G}{G}{B}{U}) (no "*") to remove a specific value.
- Added a possibility to make abilities non interruptible. With little work, this could be added to the parser if needed. Please use with care, let's discuss what is an acceptable usage of this now functionality, if needed.
2011-05-03 11:59:27 +00:00
solo81@web.de
d8147a0156 Fixed Glistening Oil. 2011-05-02 21:16:44 +00:00
solo81@web.de
4a06f1c9a8 Added Deglamer. 2011-05-02 21:06:08 +00:00
solo81@web.de
3fdd87df66 Fixed Jor Kadeen, the Prevailer. was missing the "Legendary" in its type-line. 2011-05-02 21:00:46 +00:00
solo81@web.de
ecdd781f51 Fixed names of Mortis Dogs and Hovermyr. 2011-05-02 20:36:14 +00:00
solo81@web.de
317cea1f76 Fixed Lavaborn Muse. 2011-05-02 20:30:41 +00:00
solo81@web.de
f754efd2ee Fixed Lymph Sliver and Crib Swap.
Added Orzhov Basilica. I guess it was deleted unintentionally in the past.
2011-05-02 20:29:21 +00:00
wagic.the.homebrew
b7cc42ed67 Moved "reset damage on creatures at cleanup phase" outside of the engine and made it an ability. This is mostly because I need this for the mod I'm working on, but I hope it can be used by others 2011-05-02 14:02:12 +00:00
wagic.the.homebrew
53f45a8b8e cleanup: Remove "computeXX" functions and XX variables, these were always returning X/2 in all cases.
Test suite passes
2011-05-02 11:28:04 +00:00
wagic.the.homebrew
13dd07973e Removing "oldSchoolDeathtouch", as it seems Cockatrice and Thicket Basislisk are now softcoded. Zeth, Dr.Solomat, please review :) 2011-05-02 08:44:02 +00:00
solo81@web.de
2c4efb9cd5 Fixed Urabrask the Hidden in mtg.txt. 2011-05-01 16:36:51 +00:00
wagic.the.homebrew
e100bd826c Refactor of the parser. The goal is to reduce maintenance cost, by refactoring some of the most frequent "copy/paste" we have in there. This removes roughly 500 lines, going from 4850 to 4350 lines. I'm getting closer to my goal of getting this file back to 4000 lines :)
Crossing fingers I didn't break anything major. The test suite passes, though I expect some edge case bugs to appear. Apologies in advance, I think this change is worth it.
2011-05-01 15:53:13 +00:00
guzhenjie1@gmail.com
14c56f0510 Corrected following cards:
Gitaxian Probe
Glasses of Urza
Ingenious Thief
Lay Bare
Peek
Persecute
Sorcerous Sight
Talas Explorer
Telepathic Spies
Walker of Secret Ways
Wanderguard Sentry

name(look at opponents hand) target(*|opponenthand)
 ==> 
name(look at opponents hand) target(*|opponenthand) 0/0 ueot
2011-05-01 15:39:42 +00:00
guzhenjie1@gmail.com
de12a114e7 Corrected Pith Driller. 2011-05-01 14:17:29 +00:00
guzhenjie1@gmail.com
e31dd9dbf5 Corrected some typo in NPH cards.dat 2011-05-01 12:22:17 +00:00
solo81@web.de
ed420d4f97 1. Added ",sourceinplay" to:
Arrogant Bloodlord
Ceremonial Guard
Cinder Wall
Fog Elemental
Gemini Engine
Goblin Sappers
Rainbow Vale
Stoic Ephemera
Teferi's Veil
Thawing Glaciers
Time Elemental (only to "sacrifice", not to "damage:5 controller"! --> rules on Gatherer)
Undiscovered Paradise
Vebulid
Wall of Nets



2. Removed ", sourceinplay" from:

Wall of Tears

Following the rules, a creature blocked by Wall of Tears is indeed returned to owner's hand even if Wall of Tears has left the battlefield before the end of combat.

This is the same reason why several cards did not get ", sourceinplay":

Example case for not adding ", sourceinplay":


Tolarian Entrancer

"The control change has no duration; you’ll retain control of that creature until the game ends or until some other effect causes it to change control. It doesn’t matter if Tolarian Entrancer leaves the battlefield, 
or if Tolarian Entrancer has already left the battlefield by the time the “at end of combat” ability triggers".

This is also true for all cards which have a certain effect on other creatures blocking or having been blocked by it. 


3. Added "once" to:

Basalt Golem
Frostweb Spider
Joven's Ferrets
Wicker Warcrawler
2011-05-01 11:08:56 +00:00
solo81@web.de
d58e3fe30b Updated Astrolabe and Barbed Sextant by adding the "once" tag to their [phaseaction] code. 2011-05-01 10:23:25 +00:00
solo81@web.de
d28847d929 Updated all Clockwork creatures by adding the "once"-tag to their phaseaction code.
Without this change, the Clockwork family was losing a +1/+0 counter at the end of each end of combat after having attacked for the first time.
2011-05-01 10:11:38 +00:00
solo81@web.de
a9ca76e77e Added New Phyrexia (NPH). 2011-05-01 09:44:30 +00:00
wagic.the.homebrew
8b6400e12d Cleanup of some trigger parsing 2011-04-30 15:52:48 +00:00
wagic.the.homebrew
0933294ca4 Fix an issue where pressing "triangle" on the PSP in the play menu would crash the game 2011-04-30 13:43:12 +00:00
wagic.the.homebrew
847a11f6ec fix an issue where the PSP would not find the rule files 2011-04-30 11:28:25 +00:00
wagic.the.homebrew
cde63ed4be Fix for issue 640 (Keldon Marauders crash on PSP) 2011-04-30 06:44:17 +00:00
wrenczes@gmail.com
3a4eef68ae Fixed an uninitialized var. 2011-04-30 00:42:17 +00:00
wagic.the.homebrew
cd07248df5 UPDATE YOUR rules FOLDER!!!
- This is some Work in progress to make Wagic less "game" dependent.
This change especially is an attempt at moving away from some dangerous patents owned by some company.
It introduces "modrules.xml", a global configuration file describing dynamic settings for any given Wagic mod. It is very basic for now, but allows to customize a bit. In particular, it allows to remove the concept of shop and deck editor from the game, dynamically generate the main menu, and represent card activation with a mask rather than a rotation.
I have a sample in progress which I hope to submit in the days to come, a proof of concept (nothing fancy yet) for another type of game using these ideas, as well as a few other things I introduced recently.
In the future, I am hoping to extend modrules.xml so that it entirely describes the rules of a given card game. the other files in rules.txt will describe "extensions" to the core rules, just like they do right now, so this new file does not make them obsolete.


- Also fixed minor bugs I stumbled upon while developing
2011-04-29 17:30:57 +00:00
omegablast2002@yahoo.com
654f4d34bb don't want to include players in this rule. 2011-04-29 14:59:12 +00:00
omegablast2002@yahoo.com
0fba6994a6 fixed a reported bug with @vampired, it was tricky, but ultimately i had to move the building of vampevent outside of TRVampired...the reason being that all instances of TRVamp were able to send and react to other instances of it sending out "vampevents", so move it into rules so only one object handles that, also changed the method it was handled, it now maps the cards with a 2nd vector of the vampires...basically "this card was dealt damage by X, Y, Z this turn"...
let me know if i missed some strange edge case somewhere. as far as i tested, it seems to work just fine.
2011-04-29 13:24:02 +00:00
solo81@web.de
95987c6d87 Removed NPH folder. Was unintended, sorry! 2011-04-28 22:19:59 +00:00
solo81@web.de
72e1d8079e Fixed Nullmage Shepherd + Sword of Feast and Famine. 2011-04-28 22:17:49 +00:00
omegablast2002@yahoo.com
669f8744b6 changed a previous fix a bit, also, altho this is not the "layers system" and we don't really support it, i thought i could atleast support the reapply of p/t bonuses from counters for atransformer...
and while messing around i found out that i forgot an important check in the new kicker with menu, to check if the card was still in the hand :P
2011-04-28 15:17:49 +00:00
omegablast2002@yahoo.com
59a8afb745 reinstating a piece of counters code i commented out which was originally explained to me as a "bug" when infact i found a ruling on it which was added during timespiral block...putting a +1/+1 counter on a creature which has a -1/-1 counter on it does indeed cancel out BOTH counters. good thing i didn't delete it. 2011-04-28 12:35:14 +00:00
omegablast2002@yahoo.com
7840e3cde8 fixed a issue where token workaround revealed that 2 "may" abilities back to back screws up "isInterrupting" player variable..this was only when the may ability contained manaproducers, which truely no longer use the stack in any format. 2011-04-28 10:20:42 +00:00
wrenczes@gmail.com
531c7f20ae Turned back on the shadow drawing. This wasn't meant to be checked in, only temporarily disabled while debugging. 2011-04-28 08:49:53 +00:00