Commit Graph

30 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
e7fc20bd4c added
this(damaged)
added
targetchooser [damaged] status
added
targetchooser [controllerdamager]
targetchooser [opponentdamager]

basically checks for whos doing damage to who in a match per turn.
2011-02-02 18:22:08 +00:00
omegablast2002@yahoo.com
946df16af5 removed eradicate ability and replaced it with a far more flexable solution which is
added new card discriptor [share!variable!]
the variables for this so far are
name <---eradicate effect targetting
color <--radiance effect targetting
types <--the plague cycles

it is important to note that a target IS REQUIRED before this, meaning it has to be used below a target= or after the targetting of an && ability...otherwise it will simply default to the source cards variables.
this solution provides a much more generic version without sacrificing the effectiveness of the eradicate set which was limited only to eradicate style cards(which ALSO required a target)

coding exsample 
[card]
name=Eradicate
target=creature[-black]
auto=all(*[share!name!]|targetcontrollerhand) moveto(exile)
auto=all(*[share!name!]|targetcontrollerlibrary) moveto(exile)
auto=all(*[share!name!]|targetcontrollergraveyard)moveto(exile)
auto=all(*[share!name!]|targetcontrollerbattlefield) moveto(exile)
mana={2}{b}{b}
type=sorcery
[/card]

you will notice something strange above, for this change to work i had to fix the bug with "targetcontrollerBLAH" zone targetting...tho my fix was a patchwork fix, it does indeed provide the targets controller...we need to find the root cause of why initToZone is not returning the correct "target" variable to this function.
if the source does not have a target it defaults to source.
before it there was no target, which there never is a correct target returned as noted by the fact that 0 cards exist with targetcontroller zone targetting in WAGIC however theres a considerably large card pool for this.

enjoy :)
docs going to kill me for this lol.
2011-01-22 12:30:42 +00:00
omegablast2002@yahoo.com
473abd9814 im forced to do this commit in whole instead of parts as originally planned, and before my beta test period of the changes is complete BECAUSE there are people doing "clean up" and the MASSIVE amount of conflicts i have to resolve from it is WAY too much for me to take on after nearly 200 hours of coding this patch. i cant seem to get enough respect to have people hold off on "clean up" so this brings me to being forced to do a full commit before playtest period is done, so they can go ahead with there *super important* clean up.
ok i WAS going to write a full change log with code exsamples ect, but since im rushed you will get the short version of this log.

first bug fixes, and there were many, 
indestructible creature bug fixed
halimar execavator *embearessing youtube video" bug is fixed

token text now displays source name and tokens abilities

fixed a card view null pointer in an iterator when code used combinations of foreach and aslongas with CD.

epic struggle bug fixed, aslongas was only parsing one space to the right of the operator.

extra cost containing targetting fixed, cards can now have multiple extra cost in all mana...this includes giving a card 2 targeted sacrifices as its main cost.

angelic chorus bug fixed, the card will be soft coded now.

and many other minor bugs fixed, hard to remember all which were fixed.

now, new abilities = words
"legendarylandwalk",
"desertlandwalk",
"snowforestlandwalk",
"snowplainslandwalk",
"snowmountainlandwalk",
"snowislandlandwalk",
"snowswamplandwalk",
"snowlandwalk",
"nonbasiclandwalk",
"strong",//cant be blocked by creature with less power
"weak",//cant block creatures with more power
"phasing",

all true landwalks will now be supported.

new cost types:
morph which is coded as follows
[card]
name=Bloodstoke Howler
facedown={3}
autofacedown={6}{R}:morph
autofaceup=3/0 all(beast|mybattlefield))
text=Morph {6}{R} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Bloodstoke Howler is turned 
face up, Beast creatures you control get +3/+0 until end of turn.
mana={5}{R}
type=Creature
subtype=Beast
power=3
toughness=4
[/card]

you will notice new auto lines autofaceup and autofacedown
these are abilities the cards will have when theyre in that state.
the cost is coded as
facedown={cost}
when a card is faced up it gains auto= lines also.
tho is played normally it will NOT gain autofaceup=lines

card restrictions:
cards can now have restrictions placed on them the restrictions are.
all previous restrictions usable in activated abilities
with the follow additions
control two or more vampires
control less creatures
control snow land
casted a spell
one of a kind
fourth turn
before battle damage
after battle
during battle

[card]
name=Blood Frenzy
target=creature[attacking;blocking]
restriction=before battle damage
auto=4/0
auto=treason
text=Cast Blood Frenzy only before the combat damage step. -- Target attacking or blocking creature gets +4/+0 until end of turn. Destroy that creature 
at the beginning of the next end step.
mana={1}{R}
type=Instant
[/card]

other cost now can have specail restrictions also:
otherrestriction=mytypemin:1 type(swamp),opponenttypemin:1 opponenttype(plains)
these are minimums required inplay of a type
it can be just you, or you and opponent or just opponent
you can also use the words "more" and "less" and * to compare the 2 players fields.

[card]
name=Cho-Arrim Legate
abilities=protection from black
other={0}
otherrestriction=mytypemin:1 type(swamp) , opponenttypemin:1 opponenttype(plains)
text=Protection from black -- If an opponent controls a Swamp and you control a Plains, you may cast Cho-Arrim Legate without paying its mana cost.
mana={2}{W}
type=Creature
subtype=Human Soldier
power=1
toughness=2
[/card]

activated ability gained a new restriction "opponentturnonly"

variables will now be recalculated during the resolve of the major abilities to produce the most current number.
{x}:draw:x <----
new number variables words:
using draw as an exsample
draw:auras <--auras on a creature

draw:type:ally <---counts the allys in your field. self explanitory

draw:thatmuch <--mostly a triggered effects number.
when you take damage draw that much

draw:lifelost
draw:oplifelost
these return the value of the life lost that turn.

new TRIGGER restricitions
sourcenottap
sourceTap
foelostthree<--card cycle uses opponent lost life
foelosttwo<--same as above
once<--this trigger will only ever trigger one time and never again.

new card discriptor words
[multicolor]
[leveler]
[enchanted]
[blackandgreen]
[blackandwhite]
[redandblue]
[blueandgreen]
[redandwhite]
CD will now recalculate the number again on resolve
meaning {x}:target(CreatureTargetChooser[manacost <=x]) will work, with an added bonus {x}:target(CreatureTargetChooser[manacost <=any word variable])

new this(:
this(tapped)<--for strange case cards.
this(untapped)
this(auras)

new MTGAbility keywords
(blink)
(blink)forsrc <--stay blinked while source inplay
hand(blink <---adding hand to the front makes it target hand.

livingweapon
this is an extension of token, simple attach the words "livingweapon" to the front of token( and it will autoamtically token that and attach the card to it.

token( gained:
"targetcontroller" targetting.
"battleready" if put in the tokens abilities it will be a attacker and tapped as it is entering play.


phaseout <--self explanitory

spiritlink <--stacking lifelink style effect that benifits the OWNER of the card.
combatspiritlink same as above.

stacking flanking, requires 2 abilities unfortunately

[card]
name=Agility
target=creature
auto=teach(creature) flanker
auto=teach(creature) flanking
text=Enchant creature -- Enchanted creature gets +1/+1 and has flanking. (Whenever a creature without flanking blocks this creature, the blocking 
creature gets -1/-1 until end of turn.)
mana={1}{R}
type=Enchantment
subtype=Aura
[/card]

removeallcounters(number/number,name)
removes all counters of the type from a card, can all be
"all"
vampire hexmage effect.

added new tools for transforms
,setpower=number
,settoughness=number
removetypes

morph
autofacedown={0}:morph

eradicate <---same as the card name.

cumulativeupcost[ <--self explanitory

upcostmulti[ <--an upcost that will resolve with a && ability

phaseaction[ phase name ] ability

an ability that will trigger on the stated phase name.
also support for phaseactionmulti[

new triggers added:
@vampired( <--sengir vampire effect
@targeted( 
@lifeloss(
@lifed(

add a special ability builder called dynamicability
it acts alot like a choose your own adventure book

dynamicability<! variable 1, variable 2, variable 3,variable 4!> optional ability targetting the original target.

variable list 1:
this is the primary amount source
source
mytgt
myself
myfoe
variable list 2:
this is the variable we're after, or the amount
power
toughness
manacost
colors
age
charge
oneonecounters
thatmuch
variable list 3:
this is the main effect
strike
draw
lifeloss
lifegain
pumppow
pumptough
pumpboth
deplete
countersoneone
variable list 4:
how it will do this effect to.
itself
eachother
targetcontroller
targetopponent
tosrc
srccontroller
srcopponent

the best way to explain its usage is to look at cards coded with this ability. or experiment with combinations.

new gameoption
First turn player:player, opponent, random
who takes the first turn

added poisoned status, tho not complete since MBS hasnt spoiled enough cards to see where this variable will be used.

taught ai how to counter spell
improved ai, it will now cast instants during interupts and during your turn.
previously ai treated instant cards the same as it treated sorceries, which was not fair to the ai.

im sure there is some messed items, but the rev directly before this one had formatting in the code that created hundreds of conflicts with this one, so i had to dig this info out of red and green sections.

cards and test are coming soon, i ask PLEASE do not alter these new additions until the test are commited.
im commiting without the test because instead of allowing me to proceed with my beta test period, there are some that wish to rush me into a commit. if you do not like this commit revert it, i absolutely on no grounds give permission to recommit afterwards. and i will not recommit if a revert is called.
2011-01-21 20:18:56 +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
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
omegablast2002@yahoo.com
d13e8904b5 massive update, additions and changelog in first comment. 2010-10-18 10:46:36 +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
ffbcd3f2d0 ERwan
-fix issue 297
- also removed the "untapBlockers" system. The idea was nice but incorrectly implemented, and only 2 cards were using it so far.
2010-01-17 12:05:40 +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
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
Psyyringe
5c3b3f1d03 Psyringe - added quantifiable target restrictions. Whenever you use square brackets [] to specify attributes of a target, you can use the operators <=, >= and = to specify quantities for power, toughness, and/or converted manacost. See added cards for examples.
Limitations:
- Operators for "greater than", "less than", "unequal" have not been implemented, but if a card actually needs them, you can use a preceding minus sign to negate a comparison. Example: -power=3 means "power not equal to 3", -toughness<=3 means "toughness>3".
- You can't use spaces when specifying such restrictions. Write "power<=3" instead of "power <= 3"
- You now need to use a space before the "<" and ">" commands that count the matches for lord(), foreach(), all() and aslongas(). So far we always did use spaces in front of them without actually needing to, now we need to.
- manacost restrictions don't take "X" costs into account. Example: Mistmeadow Skulkin (FUT) has protection from manacost>=3. Blaze has a converted manacost of 1, but when you cast it with an X of 2, then it actually has a converted manacost of 3 while on the stack, and Mistmeadow Skulkin would be protected from it, but currently it isn't.

Please review the code, I'll add a few remarks/questions of my own.
2009-12-26 01:50:33 +00:00
wagic.the.homebrew@gmail.com
d80e72e8c7 Erwan
- fix psp compilation
2009-12-22 15:24:30 +00:00
wagic.the.homebrew@gmail.com
2984bb7405 Erwan
- fix issue 265
2009-12-22 15:04:56 +00:00
wagic.the.homebrew@gmail.com
273b0672e4 Erwan
- various optimization fixes
2009-10-19 11:37:47 +00:00
wagic.the.homebrew@gmail.com
1534397f2b Erwan
-fix issue 33
2009-09-25 14:06:31 +00:00
wagic.the.homebrew@gmail.com
ab445c9758 Erwan
- Added a few cards
- Creature attacks, blocks, is re-ordered in blocking list events
2009-07-12 12:27:55 +00:00
wagic.the.homebrew@gmail.com
630a239f31 Erwan
- tap/untap of a card now sends an event
2009-06-25 14:23:21 +00:00
wagic.the.homebrew@gmail.com
71cc79b949 Erwan
- Replaced the BasicAbilities Array with a map. This reduces the size of MTGCard from >500 bytes to 392. Should be cool for people who have memory issues
2009-06-25 11:09:51 +00:00
wagic.the.homebrew@gmail.com
f09e9d6b7c Erwan
- fix bug with Akron Legionnaire (Legends). See test
2009-06-02 12:44:31 +00:00
wagic.the.homebrew
658ef1fb12 Erwan
- fixed a few bugs with the parser for subtypes
- fixed a bug for plague rats
- fixed a bug for P/T parser
- First release for the following sets: Mirrodin, Mirage, Lorwyn
2009-03-14 11:00:31 +00:00
wagic.the.homebrew
555eb5ee02 Erwan
- the AI can now use activated abilities (stupidly though...)
- a few card bugfixes
2009-03-01 10:20:31 +00:00
wagic.the.homebrew
6412c453d1 Erwan
- bug fix with lords and -color
- added tests
2009-02-17 13:29:27 +00:00
jean.chalard
3bb2c431c9 J :
* Split constants file to have them in a single place.
2009-01-06 13:07:28 +00:00
jean.chalard
3e9ff2b580 J :
* Change the name of debug.h into config.h and use the new RESPATH define.
2008-12-25 16:28:03 +00:00
wagic.the.homebrew
acceb55f92 Erwan
- Minor tweaks in the hope to fix some Valgrind error logs
2008-12-02 14:00:28 +00:00
wagic.the.homebrew
1ca143abd7 Erwan
- Fixed a bug with royal Assassin
2008-11-28 15:38:05 +00:00
wagic.the.homebrew
b9e2980952 Erwan
- fixed sfx issues on the psp
- removed a few debug strings
2008-11-26 14:29:43 +00:00
jean.chalard
c97dd1f260 J :
* Remove ^M's.
* Re-indent automatically.
* Remove whitespace at the end of lines.
2008-11-12 13:45:42 +00:00
wagic.the.homebrew
01d2110e8d Erwan
- Added the possibility to narrow a spell/ability target according to color,tapped status, attacker/blocker, abilities...
- Changed the games phase system to become a phaseRing. This allows to add cards that have an impact on the phases, such as stasis
- Added a few cards
- Fixed a (windows) bug in gatherer tool
- Adding stdint.h for VC++ (see wikipedia->stdint.h)
- deleting the compiled PSP lib to avoid confusion. People who work from the sourcehave to compile the lib by themselves.
2008-11-09 04:28:03 +00:00
wagic.the.homebrew
d45e3b101b 2008-11-02 09:50:16 +00:00