Commit Graph

3242 Commits

Author SHA1 Message Date
guzhenjie1@gmail.com
cf9f29879d Corrected Akoum Battlesinger, Akroma, Angel of Fury, Haunted Angel and Spiteful Visions.
Fixed typo in Gossamer Phantasm and Nova Chaser.
2011-04-17 11:54:52 +00:00
wrenczes@gmail.com
00a8622ca2 Eliminated a spurious float to long conversion. 2011-04-17 06:26:52 +00:00
solo81@web.de
a6b15a41af Added Xantid Swarm and Llawan, Cephalid Empress. 2011-04-16 22:00:36 +00:00
omegablast2002@yahoo.com
6f070f8cd4 couple things here,
first enum'ed the variables of ADynamic class to make them easier to understand at a glance.
2nd
added stack resolves for the abilities in ADynamic, sword to Plowshare bug fixed
3rd
removing foreach mana producers from the stack, didn't realize they used the top portion of activated ability resolves, also added event sending for @tappedformana for foreach manaproducers.
4th,
in getcoreability if we're getting the core of a foreach, send the foreach->ability itself otherwise we go one layer too deep and end up throwing off the core completely.
2011-04-16 21:16:07 +00:00
Xawotihs
16bac823fe Fixed issue 630 2011-04-16 17:43:33 +00:00
Xawotihs
8bff724ac1 Fixed issue 631 2011-04-16 17:34:30 +00:00
omegablast2002@yahoo.com
6b0088eac8 changed aspect of the wolf...
added the following
Rushing River
Quietus Spike
Primal Growth
Phyrexian Scuta
Magma Burst
Infernal Contract
Heartless Hidetsugu
Floodgate
Eternal Flame
Ebonblade Reaper
Dwarven Landslide
Cruel Bargain
Catacomb Dragon
Blood Tribute
Banshee
Arctic Merfolk

these cards use the new naming system for other cost, and use the halfup/down subkeywords.
2011-04-16 17:02:43 +00:00
omegablast2002@yahoo.com
1b6991107b few changes here, mostly small bug fixes,
recoded altercost, its finally not using a dirty clean up.
this fixes the bug with it not effecting ai also and the bug where it was ineffective when combined with affinity creatures...

removed a aspect of the wolf class...
soft coded support for aspect of the wolf...using word variable subkeyword "halfup" and "halfdown"
it can go anywhere a parsable word vairable is stringing...i preffer the front of it...
these are Wparsedint subkeywords, not keywords you can use with standard abilities...
its meant to return half the varible rounds up, or down...

fixed player not losing with cantlifelose when they have 10 or more poison...the player should die.

reworked taplandformana, i send the main card as a target now, check against the cost if its affordable...anyways, i discussed this bool function a while back with devs and wololo saw the same issues i saw in it...he then removed it from being used as an if statement...i changed it back to an if statement with the new checks...we are either going to go back to a void, or go all the way bool, but not inbetween.
2011-04-16 17:00:51 +00:00
guzhenjie1@gmail.com
278e2f968c Corrected Avenging Angel. 2011-04-16 15:10:24 +00:00
solo81@web.de
6d4b0a507f Added Premium Deck Series: Frie & Lightning (PDF).
Added Duel Decks: Knights vs. Dragons.
2011-04-15 19:47:45 +00:00
omegablast2002@yahoo.com
2004414634 Welkin Guide correction...auto=2/2 && flying target(creature) ueot is incorrect coding...
it will welkin 2/2 and flying to a target creature...
2011-04-15 00:41:15 +00:00
omegablast2002@yahoo.com
cafeecb925 fixed a memleak introduced when the alternative effects were changed to activated the way they do in current, the issue was that it was returning null if it wasnt paid, however if the alternative lines contained a TC those are built WAY before we get to this point, there was no delete done if the ability returns as NULL. so the tc remains and becomes a memleak. 2011-04-14 19:39:50 +00:00
omegablast2002@yahoo.com
0a54d4cf09 fixed mogg flunkies. 2011-04-14 17:46:48 +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
guzhenjie1@gmail.com
115ad75c2f Reverted Honden of Life's Web. 2011-04-14 16:47:37 +00:00
omegablast2002@yahoo.com
38dc0b23a3 mogg flunkies had cantattack and cantblock even tho his code was already updated. 2011-04-14 16:38:58 +00:00
guzhenjie1@gmail.com
3a7e71151c Added "turnlimited" for following cards with ability "Whenever [this creature] becomes blocked, ...":
Bestial Fury
Chambered Nautilus
Corrupt Official
Deathcoil Wurm
Deepwood Tantiv
Deepwood Wolverine
Drelnoch
Duskworker
Dwarven Berserker
Escaped Null
Ferocity
Flint Golem
Gift of the Woods
Goblin Cadets
Goblin Swine-Rider
Groffskithur
Gustcloak Cavalier
Gustcloak Harrier
Gustcloak Runner
Gustcloak Savior
Gustcloak Sentinel
Gustcloak Skirmisher
Ignoble Soldier
Karplusan Wolverine
Laccolith Grunt
Laccolith Titan
Laccolith Warrior
Laccolith Whelp
Leery Fogbeast
Lim-Dul's Paladin
Lone Wolf
Norwood Warrior
Port Inspector
Pretender's Claim
Pride of Lions
Razorclaw Bear
Rhox
Sacred Prey
Saprazzan Heir
Saprazzan Raider
Silkenfist Fighter
Silkenfist Order
Slashing Tiger
Slith Strider
Snorting Gahr
Thorn Elemental
Tornado Elemental
Trained Cheetah
Unstoppable Ash
Vedalken Ghoul
Wolf Pack

Corrected Hidden Ancients, Nature's Will and a typo in text of True Conviction.
Changed Honden of Life's Web:
auto=@each my upkeep:token(Spirit,Creature Spirit,1/1)*type:shrine
 ==> 
auto=@each my upkeep:foreach(shrine|mybattlefield) token(Spirit,Creature Spirit,1/1)*1
Because the )*type:shrine will make token's toughness become number of shrine in my battlefield.
For example: If I have two shrines on my battlefield, it will produce two 1/2 tokens instead of two 1/1 tokens.

All tests passed, also manually tested over twelve "@combat(blocked,turnlimited)" cards which have different trigger effects, all of them works fine.
2011-04-14 16:19:46 +00:00
omegablast2002@yahoo.com
324f554b1f removed the added cards from todo. 2011-04-14 15:38:23 +00:00
omegablast2002@yahoo.com
fe3d09175c removed some copy paste coding i did from previous commit :/ i was lazy, tho it surprises me that i always take the route of copy paste when doing it the right way is far less to change or debugg is something goes wrong, guess im a creature of habit. 2011-04-14 15:26:19 +00:00
omegablast2002@yahoo.com
8c5499eaf3 angry mob code changed,
dragon whelp is now soft coded.
added
Ashling the Pilgrim
Farrelite Priest
Initiates of the Ebon Hand
Inner-Flame Igniter
Soulbright Flamekin
2011-04-14 15:04:19 +00:00
omegablast2002@yahoo.com
0fe7a46676 few things here,
first, tweaked some ai checks a bit.
small changes.

2nd, i removed the following classes,
APowerToughnessModifierUntilEndOfTurn
APowerToughnessModifierUntilEOT
ADragonWhelp
i replaced these with soft coded support for dragon whelps "sideffects" of using a ability more then a certain number of times...
syntax limit^the effect you want^the use it triggers on.
replaced both powertoughnessueot classes with a class which falls more along the lines of how we handle ueot abilitys...PTInstant, creates the wrapper with the ability and adds it to the game, rather then that jumbled mess that was previous version.

added support for "phaseaction[" phase words "my" and "opponent" so you can denote which players phases it will happen on. by default it automatically happens on both players turns when the phase matches.

modified a few things in phaseaction class...which correct a memory leak which could be created if the source of the phaseaction is destroyed before the phase action resolved. rather then storing an ability which is left floating in memory if phaseaction is destroy...i took a much safer route of passing the string of the ability directly to the phaseaction class...and i build the ability right when it is being used instead. makes much more sense.

angry mob is now fully supported. yay to removing nasty ugly workarounds!!!! and i mean UGLY.

dragon whelp is now fully soft coded. added the 5 or six other cards which do similar effects.
2011-04-14 15:02:17 +00:00
omegablast2002@yahoo.com
502bd280d8 "turn:" was off by one 2011-04-13 14:17:39 +00:00
guzhenjie1@gmail.com
c57795560f Corrected following cards:
Amphibious Kavu
Blood Frenzy
Brood of Cockroaches
Celestial Sword
Disintegrate
Engulfing Flames
Goatnapper
Hidden Spider
Lingering Death
Mogg Cannon
Nihilith
Puffer Extract
Sokenzan Spellblade
Somber Hoverguard
Tel-Jilad Wolf
Tolaria West
2011-04-13 13:42:40 +00:00
guzhenjie1@gmail.com
5b5a46d6b0 Corrected following cards with ability "At the beginning of the end step, ...":
Blitz Hellion
Glimmervoid
Glitterfang
Goblin Pyromancer
Mark of Fury
Pestilence
Pyrohemia
Stenchskipper
Thran Quarry
Viashino Cutthroat
Viashino Sandscout
Viashino Sandstalker
Withering Wisps

Fixed typo in following cards:
Bitterblossom
Mist Dragon
Teferi's Curse

Updated following cards:
Altar of Dementia
Cockatrice
Ersatz Gnomes
Hell's Thunder
Hellspark Elemental
Infernal Medusa
Spark Elemental
Starlit Sanctum
Thicket Basilisk
2011-04-13 13:22:04 +00:00
wrenczes@gmail.com
f143f6492d Added a method for determining during runtime whether the app is running threaded or not. 2011-04-13 06:31:54 +00:00
wrenczes@gmail.com
0c6400b24c A quick doc I cobbled together on how to set up on Windows to debug wagic via tethering to a psp. 2011-04-13 05:22:22 +00:00
wrenczes@gmail.com
43e105cce0 Updated VS2010 file inclusions. 2011-04-13 04:57:52 +00:00
solo81@web.de
30a7e7f811 Fixed typo in Lurker. 2011-04-12 23:24:25 +00:00
omegablast2002@yahoo.com
579b1cbfa1 centuar omen correction 2011-04-12 22:11:03 +00:00
omegablast2002@yahoo.com
f5d16fa132 lure of the prey 2011-04-12 22:08:09 +00:00
omegablast2002@yahoo.com
bec7428f18 added casting restriction "casted(TC)" required zone marking either opponentstack or mystack..this is to fix lure of the prey, tho i warn you this card is VERY hard to use cause ai will not just sit there and give you a chance to cast it. it usable tho if you turn on interrupt phases. 2011-04-12 22:07:37 +00:00
omegablast2002@yahoo.com
562a485b67 pspsdk int before int warning treated as error, sorry! 2011-04-12 21:16:31 +00:00
omegablast2002@yahoo.com
f2de42e10e updated primitives for the changes. 2011-04-12 20:55:22 +00:00
omegablast2002@yahoo.com
93d9347566 added "colors" to word variables
========================================
added a function to return the action element id by mtgcardinstance.
=======================================
refactored all 5 combat triggers to be handled in a single class, this change helps reduce the "bits and pieces" of trigger restrictions which some did support while others didnt, it also allows for easier editing and debugging if future code needs to be added to it.
refactored the parsing for the combat triggers also, so that a combat trigger can be built from a single object if it only contains "or"...amongst other reasons.
the new syntax is auto=@combat(blocking,attacking,turnlimited,once) source(TC) from(TC):effect...all the same words are still used, except they are now all included inside the combat(-----) this includes restrictions for the triggers. if a card still needs multiple triggers from some reason...it is still 100% allowed to have as many as you want, with whatever you want inside them...check updated primitive for examples.
the required sections are auto=@combat(atleast one trigger) source(TC):effect.

=========================================

moved the limitsperturn "limit:" from genericactivatedability up to its parent class activatedability, did this for the following reason
first rules correction, the previous method tracked uses on resolve, which is incorrect, it should count as the ability is fired and placed on the stack.
second, it keeps all the actiavted ability restrictions in the same place, this is the location we are checking summoning sickness, actived restrictions such as "myturnonly" ect. makes sense to handle it in the parent.
third, it allow any and all future activated abilities easy access to "limit:" if needed, it would only require adding a limit string to pass on construction to the child classes instead of recoding the same exact checks as genericactivated.
=======================================================
reworked "name(" so that it no longer is required to be used inside a "&&" ability, also it no longer will create a MTGAbility object with a false return. that was just dirty of me :/
enabled "name(" to replace the menutext of alternative cost. 
"other={cost} name(holy cow)"
will display "holy cow" instead of "pay alternative cost", this change is nice because we ended up using "other" cost for WAY more then originally planned...now we can label it exactly what it should say when you click it.
======================================================
added a subtype keyword for powertoughnessmodifier so that you can basically switch on non-static variables for it...lifetotal/lifetotal nonstatic...PT can now except all word variables as i added reparsing of the ints, had to maintain old methods as ai needs them to decide what to do with them.
======================================================
removed the following extremely redundant classes
both ABecomes classes---atransformer has become far superior to it, i kept the "becomes(" parsing tho, and it will act exactly as it use to, except now it has access to most of the subkeywords of transforms...it also now allows word variables. and excepts "forever" as a tag. added "newcolor" subkeyword to transforms to create the "becomes(" adding a color without removing colors effect. "becomes(" now returns a constructor for ATransformer that emulates becomes( exactly as it worked before.

both forevertransformer classes, the only difference between the 2 was one subkeyword, and "forever" did not return a "destroy()"...i recreated this in less then 4 lines and a bool. that was sloppy of me :( i guess we learn and improve.
============================================================================
i removed the parsing of card casting restriction from the first pass when cards load, instead of making it a cardprimitive object, i now simply pass the string through the card and build the restrictions when theyre actually needed and checked.
this change allowed for alot of clean up, removing enum and dependancy on cardprimitive, and combining both allowedAltCast and allowedtocast functions checks through a new function "parseCastRestrictions"...this change keeps all the cast resrictions in a single place, which makes it easier to debug or add if needed, and while i was at it, i enabled it so cards can now contain as many restrictions as you want *of the available ones* 
added "turn:" as a restriction to make it so "fourth turn" could actually be ANY turn you list, this allowed me to remove a dirty line of code which was checking if a card was o converted cost but had a suspend...lotus bloom...which can not be cast normally..for cards like this now you can use restriction=turn:200 or otherrestriction=turn:200....
=========================================================================
added Phyrexian Mana...svntax {p(r)} ....this will always be payable with 2 life, but if you have a red mana for this example, it will charge you the red mana instead...you can have any combination of P mana you want in any of the games manacost.
===================================================
reworked a bit of the ai logic i added, it now has true interrupting and can now correctly target for fizzles, Ai will go into full out counterspell wars with you now...
===================================================
added a ingame reward system with fancy flying text animations, they reward the player with actual credits, but are extremely hard to trigger off, theyre not meant to be something you see every 5 secs, but something that when you see them trigger you go "damn that was cool"
the triggers and effects are as follows
first the combo system:
you have to chain cast 5 or more card, without tapping or being interupted, tiny bonus for this..chain is broken as soon as you or your opponent tap something.
next combo level is
Abundant Resources - chain 10 or more spells same condition 
then
killer - chain 15 or more same condition
this will include a flying text render once a chain is successfully started (5+ cast)
this bonus can be triggered multiple times in a match

the next bonus is
+ //creatures entering play consecutively will allow you a chance 
+ //to gain a bonus for maintaining force sizes, it will trigger every 10th
+ //creature which enters play consecutively.
this is restarted every time a noncreature enters play.
the levels are as follows, 
Deadly Force Bonus! -10 creatures enter play consecutively
Extreme Infantry Bonus! - 10 creatures enter play consecutively and you maintain a force size of 20+
Malignant Conqueror Bonus! -10 creatures enter play consecutively and you maintain a force size of 40+
this can only be triggered once per level per match.

next bonus is given for having alot of a specific type come into play under your control during a match, this bonus only triggers once per match.
the levels are:
Toy Collector!
Beast Tamer!
Vampire King!
Lord of Swarms!
Master of Elements!
Zombie Apocalypse!
Sword And Shield!
Medic!
The Promenade!
Heavenly Host!
Teeth And Scales!
its pretty easy to figure out what each requires to trigger, teeth and scales for example is dragons, wurms, drakes, and snakes.
the final bonus is deal 100 damage from a single source in a single damage event, this one triggers only once per match.
============================================================
fixed the following bugs::::
regenerate was not working for non-creature regeneration ie:welding jar

ai would sometime get stuck in a infinate loop tho extremely rarely while deciding what to do, the cause 
if (clickstream.empty())
computeActions();
is NOT enough...ai should NEVER be computing actions (finding a card or ability to play) when it is NOT the active player..meaning, it does not have priority. 
g->currentlyActing() is the player that has priority. 
if (clickstream.empty() && g->currentlyActing() == this)...loop fixed :)

dynamicability had a couple weird results, from sources which dont have an amount to return, i now check this and if non, the amount is 0.

transformer will no longer add the same types a card already has..

removed an unneeded 
if (!activated) ....oris bug seems to be corrected with this change.

wrapped limitsperturn checks in a conditional to skip it if there is no limit string. 

added safer method to get the target of the combat trigger. the previous could potentially cause a crash if you interrupted the ability while the combat trigger was on the stack, it would do a call to "getnextopponent" and return a null pointer. i now send the opponent with the event. 

fixed a crash that would happen when a card did not have a type= line. having a type or subtype line is now optional. and highly recommended to avoid using "type=nothing"

moved a function call in buyback isreactingtoclick so that it checks if its in the hand before parsing the restrictions for it.

removed allowedtocast function calls from the alternative payment types, they are only supposed to check allowedtocast if it is something like "buyback" and kicker...not "you may pay this instead"....

corrected an issue with type: variable where it would add the amount depending on the activeplayer. to correct i added a method to call TargetZoneChooser::targetsZone( with a mSource...so that you can set the source card for the scan.

note: all test pass.
2011-04-12 20:54:34 +00:00
Xawotihs
30bd5bd8ae Changelog for 0.15.1 on Maemo 2011-04-11 17:44:38 +00:00
omegablast2002@yahoo.com
15b8672693 sword of feast and famine again.... 2011-04-11 13:06:46 +00:00
wagic.the.homebrew@gmail.com
111e0232f8 - Serbian translation by TheAleksaRadovic
- Spanish translation update by blender2005
2011-04-11 11:30:37 +00:00
wagic.the.homebrew@gmail.com
70b93482b3 - fix incorrect test generic/trigger_blocking.txt
- Updated version number to 0.15.1
2011-04-11 11:12:56 +00:00
wrenczes@gmail.com
5f193e9b01 Deleting a obsolete version of Threading.h - this was already migrated to JGE. 2011-04-11 04:03:19 +00:00
omegablast2002@yahoo.com
81f22b31f5 boarderline card sword of Feast and Famine was missing the equip 2011-04-10 21:33:13 +00:00
jean.chalard
57c9c8a3b1 Fix a number of NULL/0 errors. 2011-04-10 15:31:38 +00:00
wrenczes@gmail.com
630c7eb1ee Per the conversation in r3388, adding an extra seatbelt to ensure that if an object is removed from ActionLayer, it doesn't leave a dangling pointer in mReactions. This should normally be a no-op, as the expectation is that mReactions is usually empty at this point. 2011-04-10 15:29:00 +00:00
guzhenjie1@gmail.com
35f251688a Reverted the change I did to code “@blocked”. 2011-04-10 03:48:51 +00:00
wrenczes@gmail.com
eee23f4344 Performance optimization: when processing for reactions to a card click, instead of looping through all the stored objects a second time, only call reactToClick() on objects that already indicated true to isReactingToClick(). 2011-04-10 00:11:03 +00:00
wrenczes@gmail.com
99ed83c5e8 Performance improvements/cleanup: card->hasType("foo") performs a string lookup for an integer id. Now that our primitives have over 1000 types (1018, I believe is the number I saw while debugging), this is not the cheapest lookup. Over the course of time, a lot of new rules have crept in the code - support for 'aura', 'equipment', and recently 'planeswalker'. While profiling, I saw an inordinate amount of time being used doing map lookups for these strings. Since they're used so frequently, I've added them to the SubTypes enumeration, and swapped out doing the string lookup in favour of using the int ID directly. I also found a few places where we were using hasType("Creature") or hasType("land") when we already had helper functions to do the int lookup, so I swapped these in as appropriate, as well as a couple of places where we had hasType("instant") instead of hasType(Subtypes::TYPE_INSTANT), etc. 2011-04-10 00:07:34 +00:00
wrenczes@gmail.com
62da8e7ad8 Minor optimization: wrapped a string fetch routine with #ifdef DEBUG, as the string's not actually used in this context for anything. Tripped across this as the HUDDisplay constantly queries for whether the OSD option is on, which in turn calls this string constructor/destructor on every draw. 2011-04-09 21:08:46 +00:00
guzhenjie1@gmail.com
357f86459a Corrected following cards:
Abomination
Aisling Leprechaun
Basalt Golem
Beastmaster's Magemark
Boggart Mob
Brushwagg
Deathgazer
Dread Specter
Dread Wight
Dream Fighter
Elven Warhounds
Engulfing Slagwurm
Evil Eye of Urborg
Greater Werewolf
Ib Halfheart, Goblin Tactician
Inferno Elemental
Joven's Ferrets
Lim-Dul's Cohort
Ogre Leadfoot
Phyrexian Reaper
Phyrexian Slayer
Quagmire Lamprey
Sawtooth Ogre
Sylvan Basilisk
Talruum Champion
Tangle Asp
Tel-Jilad Wolf
Tolarian Entrancer
Venom
Weirding Shaman
Witherscale Wurm

Moved Dueling Grounds back into the mtg_todo.dat and removed it from the primitives.txt.
2011-04-09 17:03:39 +00:00
wagic.the.homebrew@gmail.com
1343852bc1 - Update French translation
- Added call to translation function for some parts where it was missing
2011-04-09 10:41:36 +00:00
wagic.the.homebrew@gmail.com
693f7e156c Fix a bug reported in the beta, where pressing triangle in the Story mode would crash the game 2011-04-09 08:26:43 +00:00
wagic.the.homebrew@gmail.com
70e3af8579 Spanish translation update by blender2005 2011-04-07 13:14:51 +00:00