Commit Graph

573 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
e644aaae3a added poison support, guicounter, "infect" ability, poisonous ability. 2010-08-25 18:56:34 +00:00
omegablast2002@yahoo.com
3f1bc8a90e myhopes to condense the transforms code was not successful, altho test suite passed all test. 2010-08-19 11:02:36 +00:00
omegablast2002@yahoo.com
e0c523d07f rewrote transformsFOREVER to be better handled and condense previous code. 2010-08-19 01:00:03 +00:00
omegablast2002@yahoo.com
19e07a649f added support for transfroming after being moved. ie:card"raise from the grave" 2010-08-18 23:13:43 +00:00
omegablast2002@yahoo.com
5ef6091ca6 corrected an issue with types when not assigning colors using transforms 2010-08-18 13:57:56 +00:00
omegablast2002@yahoo.com
af048ca230 slight tweaks to transforms( 2010-08-18 01:47:10 +00:00
omegablast2002@yahoo.com
8a11d818cb modified transforms( ability. mods in first comment. 2010-08-17 19:41:23 +00:00
solo81@web.de
5d42bfa88f 1) Added a support for MANACOST CHANGING cards. (by Zethfox)
Two example codes:

[card]
name=Alabaster Leech
auto=lord(*[white]|myhand) white:+1
autoexile=all(*|myhand) resetcost
autograveyard=all(*|myhand) resetcost
autohand=all(*|myhand) resetcost
autolibrary=all(*|myhand) resetcost
text=White spells you cast cost {W} more to cast.
mana={W}
type=Creature
subtype=Leech
power=1
toughness=3
[/card]

[card]
name=Helm of Awakening
auto=lord(*|myhand) colorless:-1
auto=lord(*|opponenthand) colorless:-1
autoexile=all(*|myhand) resetcost
autograveyard=all(*|myhand) resetcost
autohand=all(*|myhand) resetcost
autolibrary=all(*|myhand) resetcost
text=Spells cost {1} less to cast.
mana={2}
type=Artifact
[/card]

autoexile=all(*|myhand) resetcost
autograveyard=all(*|myhand) resetcost
autohand=all(*|myhand) resetcost
autolibrary=all(*|myhand) resetcost

----> This code section is necessary, because manacost altering cards will keep their effect even when they have left the battlefield. RESETCOST erases all alterations which have no existing source on the battlefield anymore.


2) Added the new keyword TRANSFORM, which is similar to BECOMES. The main difference is that you can change single parameters of a permanent (color,type,...).

Example codes:

[card]
name=Memnarch
auto={1}{U}{U}:target(*) transforms(artifact)
auto={3}{U}:moveTo(myBattlefield) target(arifact)
text={1}{U}{U}: Target permanent becomes an artifact in addition to its other types. (This effect lasts indefinitely.) -- {3}{U}: Gain control of target artifact. (This effect lasts indefinitely.)
mana={7}
type=Legendary Artifact Creature
subtype=Wizard
power=4
toughness=5
[/card]

[card]
name=Dralnu's Crusade
auto=lord(goblin) 1/1
auto=lord(goblin) transforms(zombie,black)
text=Goblin creatures get +1/+1. -- All Goblins are black and are Zombies in addition to their other creature types.
mana={1}{B}{R}
type=Enchantment
[/card]

Important notes concerning TRANSFORM:
- IF YOU TARGET A CREATURE THE EFFECT IS PERMINENT.
- IF YOU TARGET THE SOURCE THE EFFECT IS UNTIL END OF TURN. 
- IF YOU USE LORD THE EFFECT LAST TIL PERMINENT SOURCE LEAVES PLAY.

These restrictions will probably be changed in the near future!


3) Added 57 successfully tested cards.
Card list ---> first comment


4) Changed the name of several tokens: "()" used to cuase crashes when used in the name-line.


5) Added the new keyword NONBATTLEZONE for leaves play trigger optimizing. It can be used to replace the phrase "EXILE,GRAVEYARD,HAND,LIBRARY".

I will add tests for test suite in one of the next revisions!!



####### TEST SUITE PROVEN ########
2010-08-17 00:23:48 +00:00
omegablast2002@yahoo.com
667df139ed increase menutext char array from 25 -> 50. 2010-08-15 13:37:34 +00:00
solo81@web.de
897114af70 Added the new zone "OPPONENTHAND" (by Zethfox).
Zethfox: "Opponenthand gui access, cards that target(*|opponenthand) can now be coded as such, target chooser will activate allowing you to click the new icon under the avatar of the opponent and open the opponents hand Gui so you may select the target card."

Cards in opponents hand are only viewable when target choosing would allow you to enter that zone! ;)


- Added the new keyword "NAME". (by Zethfox). 
When used in an autoline it replaces an autoline's "ability" text with a custom ability name. 
The basic phrase is: "auto=name(whatever you want) &&".

Example card:
[card]
name=Order of the Stars
abilities=defender
auto=choice name(white) && counter(0/0,1,White) all(this)
auto=choice name(blue) && counter(0/0,1,Blue) all(this)
auto=choice name(black) && counter(0/0,1,Black) all(this)
auto=choice name(red) && counter(0/0,1,Red) all(this)
auto=choice name(green) && counter(0/0,1,Green) all(this)
auto=this(counter{0/0.1.White}) protection from white
auto=this(counter{0/0.1.Blue}) protection from blue
auto=this(counter{0/0.1.Black}) protection from black
auto=this(counter{0/0.1.Red}) protection from red
auto=this(counter{0/0.1.Green}) protection from green
text=Defender (This creature can't attack.) -- As Order of the Stars enters the battlefield, choose a color. -- Order of the Stars has protection from the chosen color.
mana={W}
type=Creature
subtype=Human Cleric
power=0
toughness=1
[/card]

The popup window for this card will now contain a list with 

"white,"blue","black","red" and "green" 
instead of 
"ability","ability","ability","ability","ability".

This will make a lot of cards much easier to handle!


- Added 42 successfully test using one (or both) new keywords.
Card list --> First comment


Note that we did not add tests for both new keywords:
It is simply not possible to write them yet! They will follow as soon as they are possible. We guarantee that everything we submitted in this revision has been tested excessively!
2010-08-13 00:38:56 +00:00
solo81@web.de
477439773b - Fixed the "CANTREGENERATE" keyword (by Zethfox).
The engine always handled it as "REGENERATE" and thus had to be renamed. Its new name is "CANTREGEN". It has been tested excessively by me and Zethfox. Now all cards with the former "cantregenerate" work as they should.

- I also added a test for "CANTREGEN" (Incinerate).


- Added the new keyword "FOG" (by Zethfox). 
This is an equivalent for "PREVENTALLCOMBATDAMAGE", which only worked for instants and sorceries. "Fog" works only for permanents and is used in combination with the newly introduced parameter "ONESHOT"!

- I also added 2 tests for "FOG" (Maze of Ith, Spore Frog).

Both additions lead to several issue fixes:
Fixed issue286.
Fixed issue328.
Fixed issue332.
Fixed issue416.

- Removed Demonic Torment, Gaseous Form, General's Kabuto, Sandskin. Those cards never worked and could even not be fixed with "FOG".


- Optimized the code of the dragon-lair land-cycle from PLS and added 2 tests for them.

- Added 8 successfully tested cards. Card list -> first comment.
2010-08-09 23:49:31 +00:00
wagic.the.homebrew@gmail.com
47c9ad1b65 Erwan
- new features by Zethfox:
-- "oneshot" optional parameters for lords (helps fixing issues with bouncelands)
-- Life as a cost (avoids using a dirty trick of paying life as an effect)
-- set life total abilitiy (lifeset
-- new auto lines: autostack, autoexile

The test suite passes with these changes, also no test using these abilities has been added yet
2010-08-08 14:04:37 +00:00
wagic.the.homebrew@gmail.com
3d3b4112cb Erwan
- minor font fixes by linshier
2010-08-08 11:45:53 +00:00
wagic.the.homebrew@gmail.com
ce69e23357 Erwan
- minor fix in Zethfox cards addon (Bad lines error from parser)
- Zethfox's patch for {t(target)} as an extra Cost. Works the same way as sacrifice, check Azami, Lady of Scrolls for an example
- fixed compilation on the PSP (sorry!)
2010-08-01 03:21:59 +00:00
wagic.the.homebrew@gmail.com
f40af0b1cb Erwan
- Chinese patch by linshier
2010-07-31 14:41:04 +00:00
wagic.the.homebrew@gmail.com
b0d81dc8c1 Erwan
- almosthumane's code for Mulligan
- added better wording for menu of "move" abilities (with help from Zthfox)
- updated Zethfox's card addon
2010-07-30 12:14:10 +00:00
wagic.the.homebrew@gmail.com
c1073c83e6 Erwan
- Removed some none working cards from mtg.txt
- Added the "unofficial" grade 
- Added a system to give a grade to an entire file, avoids reading the file any further if not necessary
- Added Zeth's addons to the primitives folder, with a grade of "Unofficial"
2010-07-25 06:29:33 +00:00
wagic.the.homebrew@gmail.com
35e5b64dfd Erwan
-fix issue 387 (can't save "dangerous" grade from the options)
2010-07-25 04:39:22 +00:00
wagic.the.homebrew@gmail.com
1332842025 Erwan
- bug fix in JGE++ audio (improve HBL compatibility)
- Added new rewards in story mode: random card, card (either by "name" or id), specific set
- Story mode: added possibility to choose music, and bg for duel.
-- See "01. Where it all begins" for examples of new features
2010-07-19 13:44:26 +00:00
wagic.the.homebrew@gmail.com
fd8645d1a4 Erwan
- JGE updates : main accepts argv/argc. Compilation variables for MP3 and Network support
- Minor fix in Wagic (potentially fixes crashes when using activated abilities several times in onr turn. Couldn't reproduce the issue)
2010-07-11 10:56:12 +00:00
jean.chalard
7b2c4f84a0 J :
* Fix a bug where a cast life spell would randomly not work.
2010-06-13 14:22:47 +00:00
jean.chalard
32352161cc J :
* Fix a segfault case.
* Improve the trash system to handle several types more gracefully.
2010-06-13 14:03:02 +00:00
d32.wagic
1b9147b084 Daddy32 - Single new task type:
"Pacifism" - requiring player to win a game without (much) damage dealing and milling, taking advantage of newly added instant-win cards.
2010-06-09 08:10:36 +00:00
jean.chalard
fc9fccd93b J :
* Improve loading performance by about 25%.
  - This is certainly not the kind of change I was aiming at, but it
    just happened to get done, so why not commit it.
  - Little point for users in this change actually, since the loading
    times get down from 15 to 11 secs or so, it's not even that
    obvious.
  - I get about 25% on my PSP. Valgrind reports 36% improvement on PC.
    I wish it was the opposite ;_;
  - Feedback welcome
2010-06-08 17:42:35 +00:00
wagic.the.homebrew@gmail.com
b1079942af Erwan
- Reward system in Story mode (currently, either credits or random set)
- Rules now accept for player 2 to start (see story mode "block" stage)
- Story mode now has an autosave/autoload mechanism. This is for convenience but also to prevent people from abusing the reward mechanism too easily.
- possibility to choose an avatar for both players through the rules (see example in story mode)
2010-05-09 08:14:01 +00:00
wagic.the.homebrew@gmail.com
0149512412 Erwan
- fixed bugs introduced in revision 2034 (Giant Growth)
- Extended Story mode xml: much easier to write basic thing, font selection, possibility to position answers, answers now in correct order
- moved story in the menu because it is not major for now
2010-05-06 13:47:56 +00:00
jean.chalard
db96cb5142 J :
* Partial fix for issue 380.
* This remove a bug where a variable was not initialized in profiles.
* The impact on this could have ranged all the way to a full trashing
  of the user configuration files (though it requires some bad luck)
2010-05-05 06:27:52 +00:00
wagic.the.homebrew@gmail.com
755bb04475 Erwan
- updated pt translation (thanks to almosthumane)
- Added/updated some Themes by Ilya B
- Added a random wallpaper loading at loading screen (see wallpapers.txt in Res/graphics)
- Saving decks and collection should now be a bit more secure (attempt at minimizing issue 393)
2010-05-02 12:49:36 +00:00
wagic.the.homebrew@gmail.com
a3cbbedd3c Erwan
- fix issue 392 (broken tests)
- Fix a bunch of memory leaks (guys please be careful!)
- Added Logging facility in JGE
- HBL Compatibility (cleaned up some code with MP3 in JGE)
- Added "winGame" ability. Currently used mostly by the story mode, but some cards could probably need it too
- Improved story mode and uncommented it from the source.
-- The current campaign is of course very basic, anybody who wants to improve it or create other ones feel free to do so
-- TODO (short term): save progress, rewards system, improve tutorial campaign
-- I'll talk a bit more about this on the forums/email after a night of sleep
2010-04-26 14:27:34 +00:00
salmelo16
aa5f091568 Fix bug with the interaction between thisforeach and upcost that made the cost essentially unpayable. 2010-04-24 14:29:24 +00:00
salmelo16
3339b6b6a8 Add Upkeep costs to parser.
upcost[cost[,phase]] effect

cost is any cost that you might use for an auto line, including sacrifice and counters, phase is optional and defaults to upkeep, phase can have an optional prefix next which will make it so you only need to pay the cost once.

Effect is any effect that can go in an auto line and only goes off if cost is not paid during phase. For example, force of nature would be: auto=upcost[{G}{G}{G}{G}] damage:4 controller.
goblin patrol would have: auto=upcost[{R},next upkeep] moveto(mygraveyard)
2010-04-21 01:56:44 +00:00
salmelo16
be1a52f660 Update this(X) so that it works with spells as well as activated abilities. Also fixed a bug were this(X) did not work with targeting.
Adds Martial Coup
2010-04-17 19:45:57 +00:00
salmelo16
c8b573d029 fix changes from r2003 so that they will work with multiple effects through &&. 2010-04-15 00:00:11 +00:00
salmelo16
74d2bbf324 Added X to the filters for this() and thisforeach(), for use with {X} costed activated abilities, although it should theoretically work with spells as well if necessary. 2010-04-14 23:42:47 +00:00
salmelo16
73b494c32d Fix bug where new this() ability continuous effects would not deactivate if the condition became false after having already turned true. 2010-04-12 16:27:10 +00:00
wagic.the.homebrew@gmail.com
16101f2bef Erwan
- Fix PSP Compilation
2010-04-05 13:31:08 +00:00
salmelo16
9cf4c7587b added ability to have triggered abilities target based on the event that triggered, bramblewood paragon, graft, etc.
use "trigger" inside target code of triggered ability.
does not work with @each and @next.
@damaged can use trigger[to] and trigger[from] to specify the target or source of the damage, respectively.

Adds cards:
Aether Flash
Bramblewood Paragon
In the Web of War
Juniper Order Ranger
Mortuary
Primal Forcemage
Fungus Sliver
Simic Initiate

as well as a test file for feral hydra, missing from my last commit.
and daily build.
2010-04-03 23:50:39 +00:00
salmelo16
3a61eba007 allow to use X as the number of counters. daily build.
Added feral hydra.
2010-03-30 22:34:25 +00:00
salmelo16
a06980a197 added new auto keys, this and thisforeach, functionallity similair to aslongas and foreach, but for properties of the card as opposed to cards on the field. More details in first comment. 2010-03-28 02:21:25 +00:00
solo81@web.de
a2987f7b0e This is another patch by salmelo.
It fixes several problems with the newly introduced improvements concerning Counters.

Added 8 successfully tested cards, 1 of them is DARK DEPTHS!

Daily_Build update

Complete list in the first comment.
2010-03-25 23:28:55 +00:00
solo81@web.de
07361b19f5 This is another patch by the great newcomer salmelo.
Salmelo:"Here is another patch, this time adding counters to target specifications, so now you should be able to target things with counters on them as well as use counters for criterion for Lord, aslongas, foreach, etc.
I had to muddle the syntax a little bit though, so heres an example, taken from gwafa hazid, whom I added to the primitives to test with.

lord(creature[counter{0/0.1.Bribe}]|opponentbattlefield) cantattack

obviously the part we are worried about is the counter part, note that those are curly braces { } and periods . instead of parentheses ( ) and commas , this is so that it does not conflict with how targets are normally parsed, which it did before I changed those. Counters still work the same way everywhere else though, you only need to use { } and periods in target code.

Also, you can use counter{any} to specify that it should look for things with any kind of counter on them, not just specific ones, this is used by Kulrath Knight, for example.

I also consolidated most of the code used to parse counter specifications, as it seemed unnecessary duplicating it three times.

Anyway, aside from this major addition, I also added Gwafa Hazid, Profiteer; and Kulrath Knight to the primitives, as well as a test file for each to make sure it worked.

Hopefully y'all will find this patch useful.

Oh, and I should point out that it only works with one Counter in the target specification, i imagine if you put two in the same one then it would either overwrite the first with the second or merge them into some sort of hybrid counter monstrosity, either way, I wouldn't suggest it. "

Cards with vanishing are also codable now. Have a look at the comments for explanation.

daily_build.
2010-03-24 21:15:34 +00:00
wagic.the.homebrew@gmail.com
f2c405566f Erwan
- fix psp compilation, thanks to the people who reported the issue
2010-03-23 12:32:25 +00:00
wagic.the.homebrew@gmail.com
22a35d2265 Erwan
- Added remove/add counters as a cost, patch by Salmelo, thanks man!. See primitives/mtg.txt -> Thallid to see how it works
- added test for i286 by salmelo
- added basic display for counters (this needs improvement) by salmelo
2010-03-22 04:26:42 +00:00
wagic.the.homebrew@gmail.com
99db31fe9d Erwan
-Kjeldoran_frostbeast fix i167 by salmelo
2010-03-22 03:13:40 +00:00
wagic.the.homebrew@gmail.com
e7bb2caf29 Erwan
- Fix issue 291 (cantbeblockedby segfault)
- Fix some issues with pricing
2010-03-13 09:34:20 +00:00
wagic.the.homebrew@gmail.com
8a4797a06a Erwan
- quick patch for i379
2010-03-13 07:25:07 +00:00
jean.chalard
ec0354f630 J :
* Fix issue 357, where the hand loses focus when the opponent declares
  attackers while the hand is open.
* Harmonize the code for CardSelector.cpp to the coding style.
2010-03-05 17:01:00 +00:00
wagic.the.homebrew@gmail.com
882724ab4b Erwan
- Yet Another Attempt at fixing i319,i365, i372
2010-03-03 14:56:12 +00:00
wagic.the.homebrew@gmail.com
c09dabfdbf Erwan
- attempt to fix issue 319. Jeck please review :)
2010-03-01 13:43:46 +00:00
wagic.the.homebrew@gmail.com
f627f92557 Erwxan
-fix compilation issue on windows
2010-02-28 13:24:31 +00:00