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.
-- 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.
- 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
the ability checks against any of the current cast restriction checks and is written in the following syntax
example phaige the untouchable is
auto=ifnot casted(this) then wingame opponent
if|ifnot condiation then ability
this can also be used in && abilities such as this card
pulse of the grid
auto=draw:2 && target(*|myhand) reject && if type(*|opponenthand)~morethan~type(*|myhand) then moveto(myhand) all(this)
this adds a few cards in its current state, though the aim for this ability was removing the use of "kicker" workaround for cards like the divinity creatures.
i plan to extend this to support such effects as "if spentmana({b}{u}) then effect....and other conditional checks currently not possible even with workarounds.
I'm committing these now since im working on abilities for kiaos mod and don't want to have a 20 page changelog.
also added missing text to binding grasp, it was thought that it was bugged becuase it simply "ended" its effect....however this is a confusion since the effect was ending due to upcost not being paid, however the card text did not reflect that it had a upcost....
so i converted it from string comparisons and counting the battlefield..into targetchoosers with declarable operator.
simplified the code from the mess it was before into something alot easier to card code with.
example before:
mytypemin:less type(land),opponenttypemin:* type(land)
becomes
type(land|mybattlefield)~lessthan~type(land|opponentbattlefield)
the new syntax is:
type(targetchooser)~operator~number
type(targetchooser)~operator~type(targetchooser)
the operator are:
morethan
lessthan
equalto
1) prevent the textureQuad map from containing references to cards when we're returning a temp (card backdrop) image in the threaded version.
2) we had two copies of the pspicon image in the cache (ie the regular & managed). Changed the reference in the DeckMenu code to use the managed instance.
3) Fixed a problem with a default constructor param that would set RESOURCE_LOCKED on certain images. I noticed that the 'NEW' image was locking itself in the cache because no resource modes was being passed in, so the default constructor param was setting it to locked. This seems like a bad idea - if you're not explicitly locking a resource in the call, that shouldn't be the default behaviour.
Also added an assert safeguard to catch the possibility of 'overlocking' an image resource, as this probably means the image fetching routine is being abused somehow.
this is basically one activation for the existence of the trigger, meaning if it is used on a card, and the trigger exist for inplay, it will only activate one time while that card is inplay, it will activate again if the card leaves play and is put back in play again by another effect,
this was originally added for cards such as the hidden enchantment cycle.
-- Tutorial Messages are an ability like any other, except it can only be displayed once. Subsequent calls are ignored, the ability is removed from the game as soon as it is added
-- This allows to add event triggered messages ingame. Messages are either text, or images (I don't have an image sample, but rules/classic.txt has a few examples that might help)
-- only tested on Windows, although I made sure the PSP version compiles. Hopefully I also made the necessary for it to work in the touch version (touching the screen should be enough to close the tuto message)
-- Room for improvement: possibility to choose a title in text mode, possibility to have some messages depending on others (e.g.: don't show message X until message Y has been shown), improve some of the abilities and triggers to give more flexibility, add events outside of game, to allow tuto messages in deck creator, etc...
ie:
Card Name:
Quick Sliver
Mana Cost:
Converted Mana Cost:2
Types:Creature — Sliver
Card Text:Flash
Any player may cast Sliver cards as though they had flash.
without an over-ride testdestroy removes the observer before it can be any use to us.
i only enabled this for the lords/this'es....
(One could argue that this ID is completely meaningless and could be entirely ripped out, as the IDs obviously never made it to their intended target...)
this update requires you to update your rules folder files!!!
2nd
added 2 new vanguard game modes.
Stone Hewer Basic - when ever a creature enters play, a random equipment with a converted mana cost less than or equal to that creature is put into play and attached to it.
this mode is unlockable, requirement = win a match where 10 or more equipment were in the battlefeild at the moment you won.
Hermit Druid basic- in this game mode, during each of the players upkeeps, a random land card from their deck is placed into the battlefield, these do not count against your 1 land per turn limit.
to unlock this, win any match with less then 10 lands.