Commit Graph

3851 Commits

Author SHA1 Message Date
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
37c6b06ee0 - removed broken support for non "stored" zip files for card images 2011-08-21 09:43:00 +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
30f8304918 Meego harmattan support, swipe down for cancel/interrupt, swipe up for next phase/combat assignment, tap&hold for menu, deactivate refresh when windows is not active. 2011-08-11 22:26:07 +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
88157d7c95 Fixed compilation problems in non-PSP, non-FMOD, non-Phonon cases 2011-08-10 20:56:51 +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
omegablast2002@yahoo.com
bcfc790cda fixed a typo in the rules, it works in current tho i imagine this could have been the cause of a couple wonky problems.
we created lord target chooser with "mountains" instead of "mountain"<--actual land name.
2011-08-05 09:38:28 +00:00
Xawotihs
eac5a35b43 Cleaned up my phasebar code and merged it into the overall item selection code 2011-08-04 05:57:10 +00:00
omegablast2002@yahoo.com
46dfe03099 fix psp build, guiphasebar int order error. 2011-08-03 16:27:28 +00:00
omegablast2002@yahoo.com
5cd779094d changed it to 1.4f 2011-08-03 14:56:12 +00:00
guzhenjie1@gmail.com
af18fb0172 Corrected mana cost of Personal Sanctuary. 2011-08-03 13:01:03 +00:00
omegablast2002@yahoo.com
07662b08f6 fixed a warning tried as error in MTGGamePhase... 2011-08-03 12:25:09 +00:00
Xawotihs
56c68e799c Fixed compilation problem on VC2010 2011-08-02 21:48:05 +00:00
Xawotihs
097c40149d Phase bar is now clickable/touchable and animated. 2011-08-01 21:26:12 +00:00
guzhenjie1@gmail.com
32a5b7bb92 Corrected rarity of Thran Golem and Throne of Empires. 2011-08-01 15:21:53 +00:00
wagic.the.homebrew
78efba08b1 - fix for counters slowness on psp 2011-07-30 14:29:12 +00:00
wagic.the.homebrew
fe4b0a11e3 - JP Translation update by Shilf
- put tutorials back in Rules/classic, to help debugging the bug with controls
2011-07-30 03:38:39 +00:00
wagic.the.homebrew
794be140ce - graphical representation of counters. see graphics/counters/quest.jpg for an example
- rewrote some code dealing with text formatting for a card when rendering in text mode. I could swear my code has been reverted. If somebody has good reason to believe we should re-process the string formatting on every frame, please let me now. I believe my change can help rendering speed of text mode a lot.
- counters change to vector instead of array
2011-07-29 17:43:45 +00:00
wagic.the.homebrew
9631171ad1 Cleanup of some Trigger code 2011-07-28 13:51:42 +00:00
omegablast2002@yahoo.com
2e5222bf5d fixed an issue with @discarded...the trigger would only fire once becuase i was not passing the constructors variable for once to the object.... 2011-07-28 11:30:37 +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
a26125ee4c readded arbor elfs ability. 2011-07-26 17:23:01 +00:00
omegablast2002@yahoo.com
8bb53ff12f added incrementing of "damageCount" the variable that tracks the damage dealt to a player, to "infect" damaging...this is a rules correction, a creature with "infect" still "deals damage"...it just does it differently.
this fixes an issue with infect creatures not triggering "bloodthirst" ...all other cases this was working correctly, bloodthirst however checks the damageCount.....
2011-07-26 16:56:01 +00:00
omegablast2002@yahoo.com
c1ac119af5 fixed dark depths with while tag. 2011-07-26 16:39:50 +00:00
omegablast2002@yahoo.com
11473e0fb5 added "while" tag to this's i added it to lords a while ago to fix a similar issue where the lords were taking on the "oneshot" variable of their abilities in cases where you really didn't want them too...
its basically an over ride....
2011-07-26 16:39:12 +00:00