Commit Graph

3654 Commits

Author SHA1 Message Date
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
Xawotihs
164ca240b3 Fixed broken meego resource deployement 2011-08-21 21:40:28 +00:00
Xawotihs
024c30d909 Added user and system path for QT_CONFIG, added meego policy file, updated meego rules file, removed now useless Meego Res.txt file 2011-08-21 18:55:16 +00:00
wagic.the.homebrew
cb0f2b373f - Fix a bug where JFileSystem would return duplicate results in function scanfolder (can lead to "card id collision" in the previous builds) 2011-08-21 12:53:57 +00:00
wagic.the.homebrew
87d60cd79e - Improper GetfileInstance calls were preventing from correctly initializing the JGEFileSystem (Todo: init earlier, prevent from calling GetfileInstance if not initialized ?)
- fixed a problem with the test suite
2011-08-21 10:04:38 +00:00
wagic.the.homebrew
e27cf56fa2 - Support for Zip Filesystem. It is now possible to zip the entire Res folder ("store" method preferred, zip so that the root of the zip has ai, player, etc...) in one single file for read only. Write access is done in another folder (hardcoded to be User/ for now, can be updated depending on platforms, etc...
-- zipFS has several limitations...
--- in a general way, seekg doesn't work... so getting a file's size needs to be done through JFileSystem.
--- getLine on files open with zipFS doesn't work so great. Not sure if it is a normal issue because files are open in binary or not... JFileSystem therefore offers a "readIntoString" function that needs to be used instead of the usual "getline" technique. However getLine can then be used on a stream connected to the string.

-- tested on Windows and PSP, I also made sure android still works, but haven't tested zip support on Android.
-- I tried to maintain backwards compatibility, but this might break on some platforms, if I broke some platforms and you can't find a way to fix them, please contact me and we'll figure something out
-- This removes wagic::ifstream. I didn't reimplement the securities that were involved in this, apologies for that. Might be useful to reimplement such securities in JFileSystem
-- I haven't tested options/profiles in a deep way, it is possible I broke that.
2011-08-21 09:04:59 +00:00
guzhenjie1@gmail.com
14bd7b7a24 Corrected Galepowder Mage. 2011-08-16 15:35:32 +00:00
Xawotihs
feec26fc8e Meego harmattan packaging files 2011-08-15 22:04:37 +00:00
Xawotihs
fc592a4ed7 Fixed difficulty settings bug introduced in r3247 2011-08-15 17:32:45 +00:00
Xawotihs
2c34a88ff0 Reuse swipe code of Android with Qt, associate "swipe left" to "other cards" in the shop. 2011-08-14 18:13:28 +00:00
Xawotihs
c188b4d104 Fixed "Werror" related compilation problems on Linux and Meego. 2011-08-14 18:09:02 +00:00
Xawotihs
8f1e97f8f9 Fixed compilation problem with VC2010 2011-08-14 14:42:37 +00:00
Xawotihs
f1b44d5330 Trophies icon usable by click/touch 2011-08-12 23:00:31 +00:00
Xawotihs
5414cd940e Defined usage of double buttons input for PSP only, it caused some annoying exit with touch inputs 2011-08-11 21:56:27 +00:00
guzhenjie1@gmail.com
b2f1252e50 Corrected Puresteel Paladin. 2011-08-11 15:44:17 +00:00
Xawotihs
6631452067 Fixed undefined NEW compilation problem 2011-08-07 20:42:35 +00:00
Xawotihs
4dd8eaadad Touch events are now handled before key events 2011-08-07 19:48:01 +00:00
wagic.the.homebrew
765b6b0412 - Moved Cast Restriction variables "out" of CardPrimitives (replaced with a pointer). This frees 64bytes off of CardPrimitives on Windows, I assume something similar on the PSP, which gives a result of more than 500kB freed
- fix for issue 716 (text not rendered in some cases) 
Test suite passes
2011-08-07 05:05:28 +00:00
wagic.the.homebrew
9f3a42d0c6 - removed "image_name" variable from MTGCard. this should free roughly 200kB with the current amount of MTGCard objects we have. (Which counterbalances the "roughly 150kB in Introduced in CardP Primitives recently :( ) 2011-08-07 04:01:56 +00:00
guzhenjie1@gmail.com
22305c2d27 Added missed subtype of Greatsword, Kite Shield and Swiftfoot Boots. 2011-08-05 16:47:23 +00:00