Commit Graph

92 Commits

Author SHA1 Message Date
techdragon.nguyen@gmail.com
79f0fef835 fixed missing brace 2010-11-16 01:18:11 +00:00
techdragon.nguyen@gmail.com
acd7bb1aa4 reformatting code according to guidelines defined at
http://wololo.net/forum/viewtopic.php?f=35&t=2235&start=10
2010-11-16 00:55:16 +00:00
wrenczes@gmail.com
471cbd6ba4 More type conversion warning cleanup. 2010-11-07 12:09:04 +00:00
omegablast2002@yahoo.com
f5d7f03086 final fix for affinity, thanks mike for pointing it out. 2010-11-06 09:19:07 +00:00
omegablast2002@yahoo.com
ce1a079646 fixed another boo boo with affinity. *facepalm* 2010-11-06 09:04:44 +00:00
omegablast2002@yahoo.com
ed03d2f3ef added optimizing of opponents hand if the opponent deck is listed as "easy". slight optimize if listed as "normal" none if listed as "hard" this provides slightly more challange from even poorly constructed Ai decks. taught Ai to pump creatures during combat, and more so if its heading directly at player, taught Ai that its better to use "becomes" and "transforms" during first main. this allow its to actually attack with the manlands ect.
new ability lord...teach(whatever[whatever]) ability.
teach is a targeted lord, it takes the cards current target and lords it the ability. im aware of a tiny memleak it contains, but the leak is happening on parser lvl, so i need more eyes to look at it. teach is ideally used for equipment, and was designed to fix issue 244 taught abilities are not given to the source cards.

forced Ai to pay for sunburst correctly. it was choosing to pay with all of one type of mana. now it pays either max or 1 from max sunburst.

added a tiny double check for Ai to try and find something to use if it suddenly has mana in its pool. it is only a single check in a turn, but i notice it actually does slightly improve the usages of dark ritual and foreach mana producers. ideally i wanted it to check EVERYTIME. but i could not achieve it without putting the game in danger of looping. so once is better then none :/

fixed a bug with affinity where it was not counting duel lands, this is becuase of not setting it up correctly for lands with multiple types SORRY!
2010-11-06 06:59:43 +00:00
omegablast2002@yahoo.com
2640fc8280 fixed a bug where affinity was not counting when cards were being bounced back to your hand. 2010-10-31 17:24:49 +00:00
wrenczes@gmail.com
5a1e8e6ffe More reorganization work around CardSelector and the singleton pattern. Broke the source for the singleton into its own separate source file, to keep things clean. Also broke apart a circular header dependency: CardSelector defines and uses a SelectorZone, which is a member inside of CardView. CardView in turn is used heavily by CardSelector. Instead SelectorZone is now defined within CardView (where it's set & controlled anyway).
I've also added my current work on the zone navigation system (class Navigator) - it's currently turned off for now (the override for this is inside of CardSelectorSingleton's Instance() call, simply comment out the NEW CardSelector and uncomment out the NEW Navigator line.)  It's functional, but I want to do more testing before considering wiring it into the game options or something similar.  (Also, note that it currently doesn't support the mouse functionality added by DJardin.)

Lastly, there's a bug crash fix in ActionStack that I tripped across while testing - basically, an illegal index value would have us walk off the bounds of a vector.
2010-10-31 07:50:53 +00:00
linshier
0ce36747a7 Fixed a compiling error for GCC-4.4.5 2010-10-24 07:34:12 +00:00
wrenczes
d5f3e4cfea Enabled precompiled headers for the build. This cuts the win compile time in debug by at least half on my laptop; on the psp compile, it shaves it down by ~ 45 seconds. I only did a cursory inspection of what to add to PrecompiledHeader.h, there's probably more that we can throw in there for more incremental speed improvements.
Also fixed the project includes so that we don't need to always use the indirect include path, ie:
#include "../include/foo.h" -> #include "foo.h"

I'm don't know much about make files - if I busted the linux build, mea culpa, but I think we're okay on that front too.  For future reference, here's the most straightforward link on the topic of adding pch support to make files:

http://www.mercs-eng.com/~hulud/index.php?2008/06/13/6-writing-a-good-makefile-for-a-c-project
2010-10-24 05:55:24 +00:00
wrenczes@gmail.com
e2de03d987 Some organisational prep work before I start working on a new navigation method (ie replacement for CardSelector). The current design was to allocate a CardSelector and pass in its pointer to a variety of classes via their constructors. To simplify things, now we use a singleton style pattern with an Instance() function - this means that when I implement a new class to replace CardSelector, I only need to modify what's returned by the singleton callback - as long as the new pointer class supports the same function calls, it'll be a straight drop-in. 2010-10-22 08:41:44 +00:00
wrenczes@gmail.com
5aa3dc6fd3 Refactoring of some of the font management in WResourceManager. This change looks bigger than it actually is - most of the touched files are simply renaming of some font enums that I moved out of MTGDefinitions into the resource manager header files. The main points of this change: collapsing the font containers into a single map, eliminating duplicated functions, and migrating the font building logic into the resource manager class. GameApp doesn't need to know anything about the fonts it uses, and likewise, font users don't need to know what the name of their chosen font is, just the FONT_TYPE enum.
(I did a cursory check to make sure chinese still displays correctly - at a glance, I'm seeing what looks correct to someone who doesn't read the language :) )
2010-10-19 07:51:32 +00:00
omegablast2002@yahoo.com
98e34c4eca changed some of the ability names as requested, autoformatted ability.cpp as it was getting pretty messy. added @attackedalone( trigger. added "removefromcombat" mtgability. im going on vacation, whoosh :P 2010-10-18 15:56:32 +00:00
omegablast2002@yahoo.com
d13e8904b5 massive update, additions and changelog in first comment. 2010-10-18 10:46:36 +00:00
omegablast2002@yahoo.com
93fe22d282 added a small fix to further reduce attacker phase exploiting. explaination in comments. 2010-10-10 15:11:30 +00:00
wrenczes@gmail.com
33e45c9635 More incremental work of converting code to use DebugTrace(). 2010-10-10 07:30:18 +00:00
omegablast2002@yahoo.com
cf63c83754 Fixed a bug/exploit with declaring attackers and @tapped triggers. 2010-10-03 14:19:52 +00:00
omegablast2002@yahoo.com
08b762276b fix a bug where affinity wasnt triggering on card entering hand 2010-10-02 01:19:33 +00:00
wagic.the.homebrew@gmail.com
a6e4fba26b Erwan
- fix issue 304 (Momir + persist)
- some minor cleanup
2010-09-25 09:13:30 +00:00
omegablast2002@yahoo.com
e94d39e115 autoformatted the spaces in MTGRules.cpp since i pretty much made it look like a mess..very pretty now :D 2010-09-24 20:04:19 +00:00
omegablast2002@yahoo.com
75c0733a38 Condensed castrestrictions/handsize rule massively. handled by 1 rule now and checked in one pass. 2010-09-24 19:26:32 +00:00
omegablast2002@yahoo.com
9b5a3b15aa tiny boo boo, forgot getManaCost() for the colored removel 2010-09-24 17:40:41 +00:00
omegablast2002@yahoo.com
4ae00372a4 resubmitting my affinity refactor, improved since the original issue was not even related to this code 7 hours later :/ 2010-09-24 16:05:22 +00:00
techdragon.nguyen
f7d2b774e3 reverting changes made by request of Zethfox. code needs more testing. 2010-09-24 11:26:35 +00:00
omegablast2002@yahoo.com
d3b96a8723 refactored and cleaned up affinityrule..630ish line DOWN to 120ish 2010-09-24 08:53:01 +00:00
wagic.the.homebrew@gmail.com
1c0218326e Erwan
- {z} cost becomes l2e (Library To Exile)
- {q} cost becomes s2l (Send to Library) <- from any place to Library
- subtypes leyline, controllsershroud, playershroud become ability keywords
2010-09-21 12:18:37 +00:00
wagic.the.homebrew@gmail.com
bdc43052d3 Erwan
- support for tinyCrops see http://wololo.net/forum/viewtopic.php?f=15&t=2197
- card images can now be named after the card's name (ex: sets/10E/Ancestor's Chosen.jpg , or sets/10E/10E.zip:Ancestor's Chosen.jpg)
- yet another attempt at fixing tokens in the shop
2010-09-20 07:10:21 +00:00
omegablast2002@yahoo.com
65673ca0b2 added support for no max hand size, added nonstatic lifetotal checks, added a check for how many equips a card has, added a fix for a typo in affinityswamp. 2010-09-17 17:37:18 +00:00
wagic.the.homebrew@gmail.com
341c48eb61 Erwan
- swapped StyleManager.h and .StyleManager.cpp files in VC++ project
- attempt at fixing issue 451 (tokens in momir), please verify. Also attempt at fixing tokens in shop.
2010-09-17 11:25:33 +00:00
omegablast2002@yahoo.com
b507053a1d fixed storm spellcount, affinity/manaredux invis mana, added true "retrace" added 3 new extra cost types. 2010-09-14 17:15:33 +00:00
omegablast2002@yahoo.com
c408e5d588 added support for {X}{X} in cost, added support for token(creature, X/X or XX/XX)*XX or X or #. added discard card at random as cost type {d} 2010-09-12 16:15:24 +00:00
omegablast2002@yahoo.com
99da45f400 Added support for "buyback" and "flashback" with optional auto=buyback/flashback line support. 2010-09-10 18:00:37 +00:00
omegablast2002@yahoo.com
44ae17122e added affinity.... 2010-09-06 14:22:00 +00:00
omegablast2002@yahoo.com
99b058c221 complete revamp of alternative cost, changes in comment 2010-09-06 05:38:04 +00:00
omegablast2002@yahoo.com
9a1a7b3a11 tweaked cant cast. 2010-09-05 01:11:59 +00:00
omegablast2002@yahoo.com
e65b3f223f Complete Overhaul of the cantcast abilities, changes in first comment. 2010-09-04 15:16:57 +00:00
omegablast2002@yahoo.com
c83950a5d4 storm,cantwin/lose,additionallands,cast restricting 2010-09-04 00:16:20 +00:00
omegablast2002@yahoo.com
45f37b7545 fix windswept_heath.txt missing choice 1, added unearth support without workaround, tweaked alternative cost, added treason/sneak attack ability, added frozen. 2010-09-01 21:31:27 +00:00
omegablast2002@yahoo.com
0b4dde558b added support for alternative casting cost, evoke, added support for phantom cycle,hydras, added support for exile/bounce as casting cost 2010-08-30 18:45:38 +00:00
omegablast2002@yahoo.com
140200246e tweaked leylines 2010-08-22 18:23:46 +00:00
omegablast2002@yahoo.com
aa1521b613 added support for cards like leyline using subtype=leyline 2010-08-22 17:09:37 +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
wagic.the.homebrew@gmail.com
f40af0b1cb Erwan
- Chinese patch by linshier
2010-07-31 14:41:04 +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
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
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
jean.chalard
56ce4a14ae J :
* Create the subsystem for keybindings.
2010-02-14 13:21:12 +00:00
wagic.the.homebrew@gmail.com
23fe54ae6f Erwan
- fix issue 153 (Tokens should go to graveyard)
- "token" keyword can now be used in the parser with things such as Creature[-token] for "noncreature token"
- Let's stop using "token" as a type
2010-01-03 10:08:36 +00:00
wagic.the.homebrew@gmail.com
69c5dee979 Erwan
- IMPORTANT: Legendary is not an ability anymore, creating cards with super types should be much more natural. You can now say "type=Snow Land", and stuff like that. No backward compatibility!!!
2010-01-03 03:11:30 +00:00
wagic.the.homebrew@gmail.com
05a72de5bc Erwan
- Card Primitives system. Check Royal Assassin in RV, 10E, M10
- Please review, is sets/primitives a good directory? Should we rename MTGCard into "CardPrint"? 
- Unfortunately for now it is not possible to "override" a Primitive. A card that links to a primitive but also defines new "values" will create its own data and ignore the data in the "linked" primitive for the time being. I hope to solve that at some point...
2009-12-27 12:14:36 +00:00