19 Commits

Author SHA1 Message Date
valfieri
8645cb9e1e Fix date in Dat files, Added IKO and HA3 sets, updated the manifest and build files, Added SD card support for Android, Fix the Android app crash when resuming from background, Improved Android downloader, added finger sliding popup menu for Android devices without sidebar menu, fixed several crashes during game, added the mutating card ability, fixed the adventure card ability, added new borderline primitives. 2020-06-10 00:10:59 +02:00
Anthony Calosa
8530292fef Revert my Graphic changes
I think it's the one who cause those crashes
2016-08-13 16:45:46 +08:00
Anthony Calosa
cd1b629191 Fix Segmentation Fault & Formatting 2015-11-10 11:58:36 +08:00
omegablast2002@yahoo.com
81c90f0440 added this( keyword variable{ word variable } ) support
auto=this(variable{lifetotal} <10) 1/1
auto=this(variable{opponentpoisoncount} >1) infect

basically allows you to compare against a word variable.
2012-01-31 19:17:51 +00:00
omegablast2002@yahoo.com
be33659081 fix for cumulative upcost, extra cost were not being multiplied
[card]
name=Phyrexian Soulgorger
auto=cumulativeupcost[{S(creature|myBattlefield)}] sacrifice
text=Cumulative upkeep - Sacrifice a creature. (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.)
mana={3}
type=Snow Artifact Creature
subtype=Construct
power=8
toughness=8
[/card]
was only charging you 1 sacrifice per upkeep.

added thisTargetComparison, this(cantargetcard(targetchooser))...its a thisdescriptor that compares if the card can be targeted by a target chooser...
2011-12-29 19:55:45 +00:00
Xawotihs
9adb9d625d - reworked the testsuite and the rules (storyflow) to use the same game deserialization code, moved that code to the players and zone classes
- removed every references to the gameobserver singleton. This object can now be instantiated several times as it's needed for minmax. To be able to do that, I mostly added a reference to a gameobserver from any targetable object (cards, players, spells) and abilities.
2011-10-01 13:30:30 +00:00
omegablast2002@yahoo.com
6ea7e00803 added countertrack(counterstring) MTGAbility
what this does currently is remove a counter of the type counterstring and when the ability is destroyed it puts the counter back for us.
meant for weapons used as follows.
auto=teach(creature) countertrack(0/0,1,hand)

when the creature is equipped with this weapon it will remove a hand counter from the creature, when you remove the weapon, or the weapon is destroyed or whatever...it will put a hand counter back on the creature.

added dualwielding thisdescriptor...
auto=this(dualwielding) 2/2
auto=this(dualwielding) firststrike

enabled "restriction{" on phasebased triggers @next and @each...

i will work more on countertrack to extend it to domains if it currently isnt possible to use it in this case(haven't tested it on domains)....
2011-09-13 14:33:13 +00:00
wagic.the.homebrew
ef5e011e23 - Removed "isClone" flag. This flag was error prone. The "core" classes now have decent copy constructors, and ideally long term we should create copy constructors for the abilities that have additional pointers in them.
-- The test suite passes but this is a big change. I might have introduced some memory leaks or bugs. I might have fixed some bugs, too
2011-07-27 14:31:27 +00:00
omegablast2002@yahoo.com
9d52e4547e fixed a parsing error with tokengen, no actually my fault :P there was never a check if the end was the real end or not.
2nd, added this(blocking) in hopes to fix mogg flunkies and similar creatures.
2011-04-14 17:06:44 +00:00
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
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
e53c16f700 No code change just reformatting of header files.
finishing up my reformatting of the source from November/December following the guidelines that were posted.
some extra things I added:
   * Any empty virtual declarations were kept to one line.  
   * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
2011-01-21 18:01:14 +00:00
Ittobaal@gmail.com
07ef902d85 Added newline to end-of-file 2011-01-08 12:24:39 +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
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
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
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
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
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