Commit Graph

3687 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
c0ab80a1bc fixed a bug in targetchoosing where a player would get stuck in a targetchooser under certain situations as follows:
opponent play an ability, player interupts and clicks a card with TargetChooser which has no valid targets; player then tries to cancel targetchooser, instead the stack is displayed again, player is then locked in a TargetChooser unable to click other cards.

originally i was going to do it in the reactToClick however, after thinking about it, it made no sense to me that a targetchooser would be set and a cardwaitingfortargets would be set if you know ahead of time that no valid targets existed.

now when clicking cards which have TargetChoosers and no valid targets, no tc is set, and no cardiswaitingfortargets; instead return 0.
2011-09-18 10:34:40 +00:00
omegablast2002@yahoo.com
2b8d174bfa Reveillark updated 2011-09-18 06:58:29 +00:00
omegablast2002@yahoo.com
4ab6dfd3da extended countertrack and teach( to creatures for use with countertracking...isolated equipment rule that states it can't equip a card it can't target in testDestroy(we want the equipments to stay on a creature even after it's hands are full :)
I'll take a stab at coding the current cards for the mod this evening.
2011-09-17 23:27:00 +00:00
Xawotihs
c5203a9caf Touch/mouse support for storyflow. 2011-09-17 21:27:36 +00:00
wagic.the.homebrew
c96d2fea55 Fix for issue 734 (creating profile on a fresh install is completely broken.) 2011-09-17 08:42:13 +00:00
omegablast2002@yahoo.com
a6c458d0cb ifthen ability sometimes wasn't grabbing the right target, i now pass it through MTGAbility creations target.
also, i see now why targeted counter cost were left broken for so long. i think this way fixes it in all cases. what a pain.
2011-09-15 11:50:04 +00:00
omegablast2002@yahoo.com
d04b4eca38 ai bug fixes, minor refactor of phaseaction/phaseactionmulti/upcost/upcostmulti, counter cost was safed wrong, sorry!, and fixed parsing of upcost..it was chopping the last bracket of the cost when used for things like echo, it required us to add {0} to those cost...that is no longer required. 2011-09-14 20:35:04 +00:00
omegablast2002@yahoo.com
9c9ce69259 safing up countercost related items, some possible crashes were found now that counter cost can be targeted. they should have really been there from the start. 2011-09-14 12:20:46 +00:00
omegablast2002@yahoo.com
5ece26d49a psp comp fix... 2011-09-14 12:07:33 +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
omegablast2002@yahoo.com
713cb2aa45 <anyamount> does not have a targetMin. 2011-09-13 13:01:20 +00:00
guzhenjie1@gmail.com
0fd6b8caae Corrected Guardians' Pledge, Osai Vultures, Quietus Spike and Squall Drifter. 2011-09-13 12:56:10 +00:00
omegablast2002@yahoo.com
c39c94c71a commented out puresteels ability. 2011-09-13 05:06:10 +00:00
omegablast2002@yahoo.com
23f056f39c added restriction keyword "morbid" it has very specific rules that can not be done with current support...it can be used anywhere existing restrictions can be used....
example card..
[card]
name=Morkrut Banshee
auto=if morbid then choice target(creature) -4/-4 ueot
power=4
toughness=4
mana={3}{b}{b}
[/card]
2011-09-12 20:15:51 +00:00
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