Commit Graph

3673 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
3c7a6abbeb changed avatar of discord to a better version. 2011-09-12 18:40:33 +00:00
omegablast2002@yahoo.com
8ebc7dc6ed made cumulativeupcost a little more user friendly, it also now follows the rules more correctly(MTG rules:partial payments can not be made on cumulative cost, it's all or nothing)..
it will only need to be clicked once for payment now, instead of once per counter.
2011-09-12 17:00:13 +00:00
omegablast2002@yahoo.com
a42abc3017 multitargeted effects that require a minimum amount of targets should always be directed to the target_ok_full check. they can not be ended early by clicking the source. 2011-09-12 16:08:11 +00:00
omegablast2002@yahoo.com
0e52a20b8b heres a shocker, first time ever...zeth removes a card from wagic supported....
puresteel paladin...removed from supported...added to unsupported. 
I have no idea why, but this card has cause a surge of completely different bug reports, crashes, strange interactions between cards, you name it...im surprised we didn't receive a report that it caused someone dog to die of heartworms....

anyways if i find some time, i will debug this pandora's box of a code and see why exactly it causes such strange difficult to reproduce bugs.
2011-09-12 15:41:44 +00:00
guzhenjie1@gmail.com
e453cfadd7 Corrected Tezzeret's Gambit. 2011-09-12 08:07:23 +00:00
solo81@web.de
70208685f1 Optimized the card code of Merfolk Looter and 15 similar cards.
Now they no longer need a token workaround, but work as cards on their own.
2011-09-11 22:25:29 +00:00
solo81@web.de
e9f16d371b Card text update. -- The phrase "is put into a graveyard from battlefield" has been officially changed to "dies" a relatively long time ago.
This change does only affect creatures. Non-creature permanents keep the old wording.
2011-09-11 21:44:32 +00:00
solo81@web.de
fc52b31326 Added 15 tests to secure the latest card code package for future changes. 2011-09-11 16:07:33 +00:00
omegablast2002@yahoo.com
2a0e6ac2d7 just init order fix. sorry about that! 2011-09-11 14:36:52 +00:00
omegablast2002@yahoo.com
a36b69cdb1 fixed a error in parent push back for equips, and using card which was casted, instead of target....minor tweak 2011-09-11 09:39:57 +00:00
omegablast2002@yahoo.com
89d6936eb0 Shimian Specter....aparently everyone on the forums uses this card. 2011-09-11 08:03:57 +00:00
omegablast2002@yahoo.com
1e0268eb07 added parents and children TargetChooser
ok this target chooser is set apart from the others becuase it focuses on relationship between cards instead of other forms of checking, also i made sure to add a method for deeper Targeting.
it is the same as any other target chooser when it comes to writeing the syntax and can be used in almost every way a normal one can.
here is what i mean by deeper targeting
this targetchooser allows you to denote a nested targetchooser.

target(children[targerchooser])
all(parents[targetchooser])

it is plural becuase i do allow maxtargeting to be denoted here. lets say you want to have a domain that lets you do the following
"2 of my target inhabitants get +1/+1 until end of turn"
you can do this...
auto={0}:target(<2>children) +1/+1 ueot
how about even more complex?
auto={0}:target(<2>children[elf[power=1]]) +1/+1

2 of my children that are elves with power equal to 1.
the same goes for parents, you can also lord( with this targetchooser.

if you want to say 
"the inhabitants of this domain gain flying"
auto=lord(children) flying

here are some example coding that you can play around with.

[card]
name=Forest
text=G
auto=lord(children[elf]) +3/+3
auto={0}:target(<2>children) +12/+12
type=Basic Land
subtype=Forest
[/card]

[card]
name=Tidal Kraken
abilities=unblockable
target=land|mybattlefield
auto=connect
auto={0}:target(parents) destroy
text=Tidal Kraken is unblockable.
mana={0}
type=Creature
subtype=Kraken
power=6
toughness=6
[/card]

[card]
name=Arbor Elf
target=<upto:3>land|mybattlefield
auto=connect
auto=foreach(parents[forest]) 1/1
mana={0}
type=creature
subtype=elf
power=1
toughness=1
[/card]
*above, arbor elf can target upto 3 domains...for each one you choose to connect him to that is a forest, arbor elf would gain 1/1..

so as you can see it is pretty indepth.

note: all test pass.
2011-09-10 23:23:40 +00:00
omegablast2002@yahoo.com
6a8f7374cb added weapon handling for connect, please be sure to code these weapons as follows
target=*|mybattlefield
auto={0}:equip
auto=connect
notice i declare the equip before the connect, this is becuase connect will use the equip ability of the card to handle it. 
target= can be used for connecting them now as the first time equip. please remember to use teach( or autoskill= to avoid giving abilities forever to a target...this makes equipments hybrid auras.

also, moved parentchildrule init from original init to rules.txt...
in yourrules.txt
should look like this:

include mtg.txt
name=Classic
[INIT]
mode=mtg
auto=connectrule
[PLAYERS]
auto=shuffle
auto=draw:7

i did this becuase i want to reuse the parentchild associations for mtgabilities...and if parents will always kill thier children, i won't be able to use it :P

changed connect into an instant ability, i don't want this ability to be done by menu choice.
2011-09-10 21:28:20 +00:00
omegablast2002@yahoo.com
c0e8dcb1c9 this is the first basic rules of kais mod.
added parentchildrule which currently only handles the removel of children if a parent dies, but will be extended to handle other actions based on event receiving that deal with child and parent association.

add keyword targetable ability "connect"
connect means "the source adds the target to it's parent vector, the target adds the source to it's children vector"
this can be multitargeted, so it is possible that 
"Big Bad Dragon" can live it 2 different domains. 
not sure if this was even asked for, but i thought it would be cool to be able to say
"to play big bad creature you need to give it 2 homes"
or
"big bad creature can live in upto 4 homes"
this adds a level of stratigy, becuase now big bad creature can have "all creatures which share a domain with big bad creature gain +2/+2"...or "all domains that city planner live in gain 1 capacity"
but also add the possibility of faster removel from a card like
"destroy all creatures on target domain".
i thought it would be a nice add to kai rules.

connect clears a target= on a card after connecting...this is to avoid abilities transfering to the target, unless you want it to effect the target like
"tap target domain as this becomes a inhabatant"
target=domain
auto=tap
auto=connect
auto=<==this line on will not be targeting the domain
2011-09-10 19:37:44 +00:00
techdragon.nguyen@gmail.com
5d09bb8a13 removed unused variables
moved debug framerate message to be 10px higher.  current position covers the credit count on the game shop screens.
changed hard coded numeric values for menu ids to Labels.  ( this was done only to GameStateAward )
2011-09-09 17:38:39 +00:00
omegablast2002@yahoo.com
cabd82e736 there was a set of bad chars infront of the grade in unsupported.txt that was causing it to load the cards. 2011-09-09 17:28:39 +00:00
omegablast2002@yahoo.com
1fefc33777 removed a compile error, variables that were unreferenced.
small add with big impact:
added the useage of castrestriction on triggers and activated abilities. 
this can be used to create such cards as library of alexandria. 
{t}:draw:1 restriction{type(*|myhand)~equalto~7}
and replace instances were we were putting false triggers on the stack from abilities which contained nested aslongas...
meaning cards like epic struggle, won't need to be triggered every turn even if you have no creatures...
for epic struggle here is an example of how to replace it
@each myupkeep restriction{type(creature|mybattlefield)~morethan~19}:wingame controller
any of the current cast and other restrictions can be used. this includes turn:1 <===and various others such as phase based checking.
syntax is 
restriction{ whatever casting/other restriction you want }
a nice quality of life fix for false triggers (which don't mean theyre incorrect, just annoying when they trigger when they will do nothing)
another example would be the triggers on cards like 
skullcage.
auto=@each opponent upkeep:aslongas(*|opponenthand) damage:2 opponent >4
auto=@each opponent upkeep:aslongas(*|opponenthand) damage:2 opponent <3
becomes
auto=@each opponent upkeep restriction{type(*|opponenthand)~morethan~4}:damage:2 opponent
auto=@each opponent upkeep restriction{type(*|opponenthand)~lessthan~3}:damage:2 opponent

now instead of triggering every opponent upkeep even without a resolve...it will only triggers when the restriction requirement is met.

enjoy :)
note:all test pass.
2011-09-09 10:34:05 +00:00
Xawotihs
4e3a1ff862 Fixed compilation problem 2011-09-08 20:19:01 +00:00
solo81@web.de
3b073f863f Added 3 that should have been part of my last commit. 2011-09-06 23:13:55 +00:00
Xawotihs
c3d2b60a67 Fixed trophy card selection and scrolling with mouse and touch. 2011-09-06 21:08:25 +00:00
guzhenjie1@gmail.com
95d6fa297a Corrected Mycoloth and Nantuko Cultivator. 2011-09-06 13:47:14 +00:00
omegablast2002@yahoo.com
361373d579 try number 2 on reinstate, i only dynamic cast Mayability once now, and use it to check against all targets, this avoids calling dynamic cast 2 times per target. 2011-09-06 02:19:57 +00:00
Xawotihs
b2c5df2cd3 Modified the touch/mouse management in the editor to simply select the touched card. I also added a binding to switch between deck and collection with an horizontal swipe. 2011-09-05 22:04:10 +00:00
omegablast2002@yahoo.com
fdfcaf854d changed a piece of logic back to it's original logic, the refactor in last commit broke some functionality in multitarget effects which have no test added yet. 2011-09-05 17:40:25 +00:00
wagic.the.homebrew
5498187200 - Fix a bug making some mana abilities interruptible, introduced in r3869
- Cleaned up some code in MTGAbility.cpp
The test suite passes.
2011-09-05 13:25:01 +00:00
Xawotihs
03e41e7c9f Shifted the touch reference to refer the middle of the key instead of
the top left, now selects the touched key before using it.
2011-09-05 10:18:40 +00:00
Xawotihs
0b904a9af3 Simple pad is now touchable/clickable. 2011-09-04 23:13:22 +00:00
Xawotihs
9bdb8e7e66 Added my tablet as test device 2011-09-04 14:18:08 +00:00
Xawotihs
507552133d Android sound support using openSL ES. Now depends on SDK version 9. 2011-09-04 13:52:39 +00:00
wagic.the.homebrew
2d82e22303 Fixed a bug that prevented the mod "knights and dragons" from starting. 2011-09-04 13:21:10 +00:00
wagic.the.homebrew
9378e9fc9a - Fix some code that (un)luckily was compiling without error, as per my comment in issue 720 2011-09-04 09:14:35 +00:00
techdragon.nguyen@gmail.com
ad72c0ddc3 adjusted controls for Touch interface on iOS.
* Single Tap now implemented
* Touch and Hold (2 secs) to pop up menu
* added a pan gesture to simulate flicking up/down and left/right
* removed dependency on binding keys to game for iOS devices. (perhaps extend this to all touch devices.)
* flicking motion needs to be expanded to allow for smooth scrolling. Right now every flick is equivalent to going one slot up/down/left/right.
2011-09-04 08:31:36 +00:00
omegablast2002@yahoo.com
df4aa9f6c2 changed gemhide sliver to a better version. thanks kevlahnota 2011-09-04 05:42:05 +00:00
omegablast2002@yahoo.com
42e10cd233 fixed typo in harrow. 2011-09-04 05:31:01 +00:00
wagic.the.homebrew
33691d1f13 - Added ads support for Android
- basic "message" system between JGE and java through jni 
- Fixed pause/resume on android/sdl
2011-09-04 02:45:18 +00:00
omegablast2002@yahoo.com
269934fe1e checking the last char directly instead of using .find() 2011-09-04 01:55:49 +00:00
omegablast2002@yahoo.com
2183dedb04 fix for issue with profiles not loading into options from user folder. the issue was that we we're "removing a trailing "/"" even if there was no trailing slash. added a check for "/" before we chop the last letter of the directory :) 2011-09-03 19:20:24 +00:00
omegablast2002@yahoo.com
ac01adc6b8 added a check for "if(game" to painting of currentactioncard, menuobjects can exist when no game instance is present, this fixes a crash i introduced in buying shop boosters. 2011-09-03 16:21:41 +00:00
omegablast2002@yahoo.com
7fac24945d added a missing "return" on offerinteruptonphase: parsing. 2011-09-03 16:16:38 +00:00
Xawotihs
354f9788cc This stops the music when the game goes into pause, it restarts it when the game resumes. This works fine on desktop but not so good on mobile with Phonon... 2011-09-03 15:13:12 +00:00
wagic.the.homebrew
bc3250fadc - Added 493 missing cards in unsupported.txt, removed some duplicates from unsupported that have since then been coded
-- Most of the added cards are from recent sets and unhinged.
- removed Cinder Seer from Borderline as it seems a more accurate version is in crappy


*** Removed from unsupported.txt because they also exist in other files:
Ancient Ooze was in supported files but also in unsupported ones
Blood Moon was in supported files but also in unsupported ones
Custody Battle was in supported files but also in unsupported ones
Deglamer was in supported files but also in unsupported ones
Flourishing Defenses was in supported files but also in unsupported ones
Fylgja was in supported files but also in unsupported ones
Glowering Rogon was in supported files but also in unsupported ones
Magus of the Unseen was in supported files but also in unsupported ones
Mana Chains was in supported files but also in unsupported ones
Mana Echoes was in supported files but also in unsupported ones
Melira's Keepers was in supported files but also in unsupported ones
Nullmage Advocate was in supported files but also in unsupported ones
Orim's Thunder was in supported files but also in unsupported ones
Overwhelming Instinct was in supported files but also in unsupported ones
Preeminent Captain was in supported files but also in unsupported ones
Protean Hydra was in supported files but also in unsupported ones
Renewing Touch was in supported files but also in unsupported ones
Renounce was in supported files but also in unsupported ones
Riptide Survivor was in supported files but also in unsupported ones
Rise from the Grave was in supported files but also in unsupported ones
Sky Hussar was in supported files but also in unsupported ones
Tatterkite was in supported files but also in unsupported ones
Tidal Warrior was in supported files but also in unsupported ones
Twigwalker was in supported files but also in unsupported ones
Wu Scout was in supported files but also in unsupported ones
2011-09-03 09:23:41 +00:00
guzhenjie1@gmail.com
79546bb00a Corrected Reality Spasm and Slithery Stalker.
Corrected name of Oros the Avenger and Teneb the Harvester in CMD card.dat
2011-09-02 13:18:11 +00:00
solo81@web.de
e296e0c381 Added 222 cards based on rev3869 (thanks to Zeth!) and months of play-testing.
Examples:

# COUNTER-MOVING CARDS #

[card]
name=Ghave, Guru of Spores
auto=counter(1/1,5)
auto={1}{C(1/1,-1),creature|mybattlefield}:token(Saproling,Creature Saproling,1/1,green)
auto={1}{S(creature|mybattlefield}:counter(1/1,1) target(creature)
text=Ghave, Guru of Spores enters the battlefield with five +1/+1 counters on it. -- {1}, Remove a +1/+1 counter from a creature you control: Put a 1/1 green Saproling creature token onto the battlefield. -- {1}, Sacrifice a creature: Put a +1/+1 counter on target creature.
mana={2}{B}{G}{W}
type=Legendary Creature
subtype=Fungus Shaman
power=0
toughness=0
[/card]

# IF...THEN #

[card]
name=Goblin Goon
auto=@each my attackers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantattack)) ueot
auto=@each my blockers:if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then transforms((,cantblock)) ueot
text=Goblin Goon can't attack unless you control more creatures than defending player. -- Goblin Goon can't block unless you control more creatures than attacking player.
mana={3}{R}
type=Creature
subtype=Goblin Mutant
power=6
toughness=6
[/card]

[card]
name=Pulse of the Tangle
auto=token(Beast,Creature Beast,3/3,green)
auto=if type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield) then moveto(myhand)
text=Put a 3/3 green Beast creature token onto the battlefield. Then if an opponent controls more creatures than you, return Pulse of the Tangle to its owner's hand.
mana={1}{G}{G}
type=Sorcery
[/card]

# MULTIKICKER #

[card]
name=Joraga Warcaller
auto=kicker counter(1/1,kicked)
kicker=multi{1}{G}
auto=thisforeach(counter{1/1.1}) lord(other elf|myBattlefield) 1/1
text=Multikicker {1}{G} (You may pay an additional {1}{G} any number of times as you cast this spell.) -- Joraga Warcaller enters the battlefield with a +1/+1 counter on it for each time it was kicked. -- Other Elf creatures you control get +1/+1 for each +1/+1 counter on Joraga Warcaller.
mana={G}
type=Creature
subtype=Elf Warrior
power=1
toughness=1
[/card]

# PROLIFERATE #

[card]
name=Contagion Clasp
auto=counter(-1/-1,1) target(creature)
auto={4}{T}:target(proliferation) proliferate
text=When Contagion Clasp enters the battlefield, put a -1/-1 counter on target creature. -- {4}, Tap: Proliferate. (You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.)
mana={2}
type=Artifact
[/card]

# MULTI-TARGET #

[card]
name=Argothian Elder
auto={T}:target(<2>land) untap
text={T}: Untap two target lands.
mana={3}{G}
type=Creature
subtype=Elf Druid
power=2
toughness=2
[/card]

[card]
name=Aven Augur
abilities=flying
auto={S}:target(<upto:2>other creature) moveTo(ownerhand) myUpkeepOnly
text=Flying -- Sacrifice Aven Augur: Return up to two target creatures to their owners' hands. Activate this ability only during your upkeep.
mana={3}{U}
type=Creature
subtype=Bird Wizard
power=2
toughness=2
[/card]

[card]
name=Bone Harvest
target=<anyamount>creature|mygraveyard
auto=moveTo(mylibrary)
auto=@next upkeep:draw:1 controller
text=Put any number of target creature cards from your graveyard on top of your library. -- Draw a card at the beginning of the next turn's upkeep.
mana={2}{B}
type=Instant
[/card]

Test suite tests will follow on weekend.

Have fun!
2011-09-01 21:06:45 +00:00
omegablast2002@yahoo.com
b8aa265523 "!= 1000" needed to be changed to enum. 2011-09-01 20:33:17 +00:00
omegablast2002@yahoo.com
6399917d25 changes:
added abilities:
proliferate
ProliferateChooser:new targetchooser for cards with counter and poison counters "proliferation".

MenuAbility:new internal ability to create custom menus of abilities which can be activated in sequence one after another.

multikicker, syntax kicker=multi{b}
works with variable word "kicked", the amount of times it was kicked.

target=<number>tc,target=<upto:>tc,target=<anyamount>tc,target(<number>tc),target(<upto:>tc),target(<anynumber>tc);
multitarget is now supported with the exception of "devided any way you choose" which can not be supported becuase we allow detoggling of targeted cards with a "second" click....so you can not click the same card 2 times to add it to the targets list twice for example.
this is minor, as the bulk of multitarget is not "devided"
removed 's' parsing for multitarget, added a limit of 1000 to "unlimited" for easier handling; we currently can't handle activation of an ability on a 1000 cards very well on any platform(infact i don't suggest it)

Countershroud(counterstring), this MTGAbility allows you to denote that a card can not have counters of the type "counterstring" put on it.
"any" is for no counters allowed at all. this is a replacement effect. cards state that they can still be the targets of counter effects, however on resolve nothing is placed on them instead.

@counteradded(counterstring) from(target):,@counterremoved(counterstring) from(target):: these are triggers for cards which state "whenever you add a counter of "counterstring" to "target"; added counterEvents struct; 

other changes:
added support for ai handling of multitargeted spells.

changed a few of delete( into SAFE_DELETE(, safed up a couple areas where they did not seem safe to me;

added better handling of menus presented to ai, it will try to select the best based on eff returns.

added varible lastactioncontroller for ai use, it keeps it truely from ever tripping over itself and brings ai more inline with MTG rules.

converted TC into a protected member.
added "abilitybelongsto" string to tc, and set "owner" of the tc. a tc should never belong to "no one" it should always have a owner.
abilitybelongs to string is solely for easier debugging, i found it was a pain to never know what ability created a tc while i coded multitarget. the owner of the tc is the only one that should be using it, if an ability needs to declare the opponent as the owner (choose discard which is currently unsupported for example) this will allow us to better handle that situation by setting the tc owner in the ability which called it.

rewrote the logic of "checkonly" in ai choose targets, the only time it is "checkonly" is when it is trying to see if it had a target for a spell before it cast it, i now set this in the actual function call instead, the old method was far to error prone.

wrote logic for ai checking of menu objects presented to it,
ai will now make better choices when a menu is presented to it based on what it already knows. this changes it from it's old method of "just click the first option".

taught ai how to use multi-mana producers such as birds and duel lands by adding a method for it to find it's mana for a payment. it can effectively use cards like birds of paradise and sol ring(without locking up). It's primary method of pMana searching was maintain for performance(no need to deep search if we have it in pMana).

added a vector to actionlayer to store mana abilities for pMana. this provides us with a dramatic improvement when mana lords are present by reducing the amount of objects that need checking when ai checks pMana.
with 80 mana objects and a ton of lords one instance i checked went from 8000ish checks down to 80<===big difference.

added "tapped" green coloring(sorry i missed that!)...added red coloring to current actionLayers current action card (usually the source).

changed "type(" restrictions second amount from atoi into wparsedint for more flexiable coding.

add "&" parsing to CD targetchooser, removed "iscolorandcolor" variables and functions becuase they were a hack the real fix was this.
cretaure[dragon&black&blue] a creature that is a dragon, and black and also blue.

changed some of the ai computeactions and
removed unneeded gaurds in ai chooseblockers, they did more harm then good.
2011-09-01 20:03:26 +00:00
guzhenjie1@gmail.com
67bbaa8f06 Corrected Hystrodon. 2011-08-25 12:14:30 +00:00
techdragon.nguyen@gmail.com
6c9558a58d updating project for iOS compatibility. 2011-08-25 00:51:18 +00:00
techdragon.nguyen@gmail.com
5c86fb1c92 remove unused file. Seems like it should have been removed a long time ago. like it was a misnamed file but left around and ignored 2011-08-25 00:35:08 +00:00
Xawotihs
d51cbfe58b Cleanup meego package description 2011-08-22 19:56:35 +00:00
wagic.the.homebrew
0bc6352d62 - Fix a bug with story mode not able to find (unzipped) campaigns 2011-08-22 12:33:39 +00:00