maxcast(*)0 - checks for the current action player of that turn, but
when you passes the turn to the opponent, you can cast instant or cards
with flash instead because you are not the current player, it mustcheck
the controller of the card with play restriction if he can play it or
not whether it your turn or the opponents turn.
serum powder second ability...
Any time you could mulligan and Serum Powder is in your hand, you may
exile all the cards from your hand, then draw that many cards.
opponentpoolsave(
mypoolsave(
ex:Upwelling
added a tag for mana, doesntempty
add{g}{g}{g} doesntempty
what this does is make THAT mana remain in the pool until end of turn.
ex:
Sakura-Tribe Springcaller
Fixes in GameObserver serialization/deserialization code
Fixes in JNetwork and JSocket on windows
Various code cleanup (currentGamePhase access in particular)
Updated GUI code to re-enable a basic network GUI
Activated threaded tests on Windows. It uses 4 threads by default.
- removed ACTION_LOGGING_TESTING code
- Fixed AIvsAI games multithreaded games
- Activated undo when testsuite is enable
- Defined an initial player comparison operator
- Fixed multi-threaded modification to subtypes
- Fixed gameTurn cleanup for gameObserver reuse
Curse of Oblivion moved back to unsupported.
added support for targeting a zone by targeting a player...
any time you have targeted a player, you can access items in thier zones by using
targetedpersonsZONE
targetedpersonsbattlefield for example...
added "targetedplayer" as a targetchooser and who.
added "mycurses" targetchooser.
added "targetedcurses" word variable.
- Added a call to input reset after each update in the Qt frontends to avoid strange auto-keypress
- Removed tutorial display in AI vs AI (test AI mode)
- Commit Qt project with latest buttons files
- Added a small isHuman method to the Player class
- Added an "ACTION_LOGGING_TESTING" mode in the gameObserver. When this is defined, the game reloads itself in every update. I want to use that to track undo problems. Be aware that it kills performances and crashes with the testsuite if you want to activate it.
- Various cleanup/refactor of the game observer.
- Added a gameObserver == operator to compare two games
- Added player mode to the player serialization
- Added a multi-threaded mode to AI_CHANGE_TESTING. For the moment it's only useable with Qt. If you want to use it without, just defined a thread_count higher than 1.
- Refactored random generator class to use list intead of queue
- Defined a specific type for interrupt decision instead of int
- Decorelated the testsuite AI timer from the game timer to be able to have reproduceable results with AI tests.
- Created a random generator wrapper class
- Used two seperate instances of this random generator for AI and for the game
- Added methods to load randoms into AI from a testcase
- Fixed a probleme with undo and premade decks introduced in r4035
- Added basic test to test AI proliferate code
- Cleaned up goblin_artillery test
- Added AI tests into the testsuite test list
- Fixed looping bug into the multi target AI code
- Modified undo to stop at "next phase" action
- Added "muligan" and "force library shuffling" to the list of logged action
- Fixed random logging
- Fixed double logging of actions
- Merged all the "next game" functions into a single one
- Created a PlayerType type instead of using int
- Moved the player loading code into the GameObserver and out of GameStateDuel to avoid having player references in both and simplify the initialization and termination. Tweeked a bit the humanplayer class to be able to do that.
- Added a "load" menu available in testsuite mode, I use that to load problematique game. To use it, just copy-paste a game from the traces into Res/test/game/timetwister.txt. Game in traces starts by "rvalues:..." and ends by "[end]"
- Added some untested and commented out code in GuiCombat to use the mouse/touch to setup the damage on the blockers
- Broke the network game ... hoh well, I'll repair it when everything else works !!
- various code cleanup and compilation fixes on Linux
- Added an undo menu using this code (beware, it's still very very alpha).
- Removed various warning
- Cleaned up avatar loading
- Added full random lists load/save including the deck shuffling (not sure if I could not replace that with seed load/save)
- Moved momir and Co rules configuration out of GameStateDuel
- Create a GameType type to avoid mixing int everywhere
- removed every references to the gameobserver singleton. This object can now be instantiated several times as it's needed for minmax. To be able to do that, I mostly added a reference to a gameobserver from any targetable object (cards, players, spells) and abilities.
added
"offerinterruptonphase=blah"
to the parsing of the rules.txt files...the reason i want to handle it inside the rules.txt....
originally i was going to use the options variable for this, then i realized that if i use that variable, it would apply it to every game mode and peoples custom games...so instead i added the parsing in the actual rules.txt files, this way, if we want to offer interrupt on phase blah to MTG, but NOT have this interrupt offered in a mod or different mode, or if the different mod or mode should offer you a chance to interrupt ai in a different phase ...you can set each rule to interrupt in the phase you want...
now for the reason i added it in the first place...previously we were allowed an interrupt when the opponent drew a card in the draw step, this gave us a chance to do stuff on opponents turn....
recently wololo i beleave made draw actions not use the stack anymore(which was a good change, since as per MTG rules the actions of drawing is not a stack action)...but as a side-effect, we lose our chance to interrupt ai and do stuff on ais turn....
also, changed the ingame bonus thing, to start recording stuff towards bonuses on turn 2+...this solves reported issues with story mode "setting up" causing massive bonuses to be gained for doing nothing.....
- Fixed a Bug where AI would not correctly assign blockers if the first attacker is super strong.
- Added a hack to prevent AI from an infinite loop while choosing a target. There are edge cases where the AI gets to choose the targets for a TargetChooser that doesn't belong to it. I couldn't dig too long for the root cause, so I added a "return 0" when the case happens. Should probably open a ticket
- Added a "Hint" System in AI decks, to help the AI with its strategy. This is not really usable yet, it only works with abilities (not cards to play), and I only added some basic code for counters and tokens. This can probably be extended, but let's wait until we see it working on that other game I'm working on, before rushing into adding hints to all AI decks...
- minor cleanup of AI Code
========================================
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.
- added 2 menus to wait for connection and wait for deck selection
- tested compilation on Qt Linux, Qt Windows and PSP
- deactivated everywhere (NETWORK_SUPPORT to activate).
exsample
[INIT]
mode=mtg
[PLAYERS]
life:2000
poisoncount:4
customphasering:untap,firstmain,firstmain,draw,firstmain,upkeep,draw
auto=shuffle
auto=draw:7
auto=@each my draw:draw:1
auto=maxPlay(land)1
by default every turn will have normal order we've always been use to
however
before begins --required added automatically
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
cleanup---required added automatically
after end of turn---required added automatically
svntax
customphasering:blah,blah,blah
listed in the order you want it to go. you can repeat a phase as often as you want, you can omit phases.
please note, this was not designed with MTG in mind..some of the rules require certain phases to work...this is for CUSTOM game building...i repeat NOT DESIGNED FOR MTG...tho it can be used with most(almost all, with the exception of those which require certain phases to work, exsample, ninjitsu will only work in a phasering which contains blockers and attackers)
enjoy.....
- deprecated the following keywords (see list below for new usage)
-- cantcreaturecast => auto=maxCast(creature)0
-- cantspellcast => auto=maxCast(*)0
-- onlyonecast => auto=maxCast(*)1
-- bothcantcast => auto=maxCast(*)0 auto=maxCast(*)0 opponent
-- bothnocreature => auto=maxCast(creature)0 auto=maxCast(creature)0 opponent
-- oneboth => auto=maxCast(*)1 auto=maxCast(*)1 opponent
Strangely enough, I couldn't find most of these keywords in mtg.txt?
I also removed variables such as "spellCastedThisTurn" and stuff like that... now if you want to know how many spells were cast in one turn by a given player, use player->game->stack->seenThisTurn("*").
seenThisTurn can take a string representing a TargetChooser, or better, a TargetChooser.
I can't guarantee I didn't break anything, but the test suite passes and the AI seems to run ok
- added maxCast and maxPlay abilities, this deprecates the following abilities: nospells,nocreatures,onlyonespell,land
I usually don't like to deprecate abilities, but the existing ones, despite having easy to remember names, were really not flexible enough.
If you want to use these old keywords, instead use:
-- nospells => maxCast(*)0
-- onlyOneSpell => maxCast(*)1
--nocreatures => maxCast(creature)0
--land:1 => maxplay(land)+1
note maxPlay and maxCast. They follow similar rules, but maxPlay monitors the number of cards that are going on the Battlefield, while maxCast monitors the stack. In most cases, maxCast should be the one to use, but lands are a special case because they go directly to play.
I unfortunately cannot guarantee I didn't break anything, especially in the AI, but the test suite passes ,and I added a few additional tests yesterday and today, to feel more confident about the change.
next step is removing the creatures keywords that do the same kind of thing (cantcast, etc...) and replace them with maxCast
- replaced variables canPutLandsIntoPlay and landsPlayerCanStillPlay with a PlayRestrictions class.
- Added seenThisTurn(TargetChooser * tc) in MTGGameZones, which allows to count how many cards matching a targetChooser have been in a given zone in the current turn. With minor work, this can probably be reused by the ability parser for some cards that need to count how many **** where played or put on the stack during a turn.
-- for example player->game->stack->seenThisTurn([put a TypeTargetChooser("creature") here]) would give you the number of creature spells cast by the player this turn.
- This is the first step of a refactor that aims at removing all the adhoc variables for "cant cast". I plan to get rid of the following variables in Player.h (and the associated code, which hopefully will become smaller):
int castedspellsthisturn;
bool onlyonecast;
int castcount;
bool nocreatureinstant;
bool nospellinstant;
bool onlyoneinstant;
bool castrestrictedcreature;
bool castrestrictedspell;
bool onlyoneboth;
bool bothrestrictedspell;
bool bothrestrictedcreature;
They will be replaced by the PlayRestrictions system, and hopefully I'll have time to update the parser to make this more generic as well.
My initial goal with this change was to move the limit of 1 land per turn outside of the code, and make it an external rule in Rules/mtg.txt. I have yet to do it.
- Added method to build a card collection independently of the GUI to ease my unitary test application
- Added part of some network GUI I'm working on, it's #ifdef out, I'm only committing this part to ease later merges
- Added the beginning of a serialization code of the Player and related classes used for network support
- various other minor cleanup
This btw points out another circular dependancy between the texture and the JQuad - a texture owns a bunch of JQuads, yet the renderer uses JQuads and always assumes that the texture is valid. We're going to need to add more defensiveness to JGE to protect against this.
Other changes in this check-in: WResourceManager doesn't derive from JResourceManager anymore. It actually didn't require anything from the base, so I killed the dependency. Also cleaned up the notion of a WTrackedQuad in the WCachedResource - it didn't need a separate class, just a better container.
I've build this & tested against PSP, win, linux, QT (linux). I haven't tried against iOS and QT Win, or Maemo. If these other platforms are broken, I apologize in advance! - I'm hoping it should be fairly simple to put them back into play.
This still could be improved - DeckMetaData's constructor loads an MTGDeck object to parse out the name of a deck from its file. This means that we crack open 106 files on the first attempt to show the list of opponent decks. I started optimizing this, but reverted, as the list itself is sorted alphabetically. Currently, with these mods, it's still taking 4 1/2 seconds on my psp to load the opponent list on the first go around.
While at it, did some cleanup - removed the need for passing around a player pointer in some of the DeckStat functions, etc.
encapsulated as a player function rather than loose code inside the state transitions of GameStateDuel
Note: Inside of the mulligan code I assigned game to currentPlayerZones for clarification rather than
something functionally required. "game" seems ambiguous as "game" is also referenced throughout the code for the GameObserver
keeping this change localized to this method until more analysis can be done. The pattern that was here before was
game->currentPlayer->game
where the first "game" represented the GameObserver and the second the collection of zones (MTPPlayerCards) to the current player.
I would suggest changing the Player instance of game to something that represents its data, the game zones associated to the current player.
"game" seems too generic, as it can be interpreted to encompass many things rather than just dealing with the different zones (library, exile, discard, etc )
ok i WAS going to write a full change log with code exsamples ect, but since im rushed you will get the short version of this log.
first bug fixes, and there were many,
indestructible creature bug fixed
halimar execavator *embearessing youtube video" bug is fixed
token text now displays source name and tokens abilities
fixed a card view null pointer in an iterator when code used combinations of foreach and aslongas with CD.
epic struggle bug fixed, aslongas was only parsing one space to the right of the operator.
extra cost containing targetting fixed, cards can now have multiple extra cost in all mana...this includes giving a card 2 targeted sacrifices as its main cost.
angelic chorus bug fixed, the card will be soft coded now.
and many other minor bugs fixed, hard to remember all which were fixed.
now, new abilities = words
"legendarylandwalk",
"desertlandwalk",
"snowforestlandwalk",
"snowplainslandwalk",
"snowmountainlandwalk",
"snowislandlandwalk",
"snowswamplandwalk",
"snowlandwalk",
"nonbasiclandwalk",
"strong",//cant be blocked by creature with less power
"weak",//cant block creatures with more power
"phasing",
all true landwalks will now be supported.
new cost types:
morph which is coded as follows
[card]
name=Bloodstoke Howler
facedown={3}
autofacedown={6}{R}:morph
autofaceup=3/0 all(beast|mybattlefield))
text=Morph {6}{R} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Bloodstoke Howler is turned
face up, Beast creatures you control get +3/+0 until end of turn.
mana={5}{R}
type=Creature
subtype=Beast
power=3
toughness=4
[/card]
you will notice new auto lines autofaceup and autofacedown
these are abilities the cards will have when theyre in that state.
the cost is coded as
facedown={cost}
when a card is faced up it gains auto= lines also.
tho is played normally it will NOT gain autofaceup=lines
card restrictions:
cards can now have restrictions placed on them the restrictions are.
all previous restrictions usable in activated abilities
with the follow additions
control two or more vampires
control less creatures
control snow land
casted a spell
one of a kind
fourth turn
before battle damage
after battle
during battle
[card]
name=Blood Frenzy
target=creature[attacking;blocking]
restriction=before battle damage
auto=4/0
auto=treason
text=Cast Blood Frenzy only before the combat damage step. -- Target attacking or blocking creature gets +4/+0 until end of turn. Destroy that creature
at the beginning of the next end step.
mana={1}{R}
type=Instant
[/card]
other cost now can have specail restrictions also:
otherrestriction=mytypemin:1 type(swamp),opponenttypemin:1 opponenttype(plains)
these are minimums required inplay of a type
it can be just you, or you and opponent or just opponent
you can also use the words "more" and "less" and * to compare the 2 players fields.
[card]
name=Cho-Arrim Legate
abilities=protection from black
other={0}
otherrestriction=mytypemin:1 type(swamp) , opponenttypemin:1 opponenttype(plains)
text=Protection from black -- If an opponent controls a Swamp and you control a Plains, you may cast Cho-Arrim Legate without paying its mana cost.
mana={2}{W}
type=Creature
subtype=Human Soldier
power=1
toughness=2
[/card]
activated ability gained a new restriction "opponentturnonly"
variables will now be recalculated during the resolve of the major abilities to produce the most current number.
{x}:draw:x <----
new number variables words:
using draw as an exsample
draw:auras <--auras on a creature
draw:type:ally <---counts the allys in your field. self explanitory
draw:thatmuch <--mostly a triggered effects number.
when you take damage draw that much
draw:lifelost
draw:oplifelost
these return the value of the life lost that turn.
new TRIGGER restricitions
sourcenottap
sourceTap
foelostthree<--card cycle uses opponent lost life
foelosttwo<--same as above
once<--this trigger will only ever trigger one time and never again.
new card discriptor words
[multicolor]
[leveler]
[enchanted]
[blackandgreen]
[blackandwhite]
[redandblue]
[blueandgreen]
[redandwhite]
CD will now recalculate the number again on resolve
meaning {x}:target(CreatureTargetChooser[manacost <=x]) will work, with an added bonus {x}:target(CreatureTargetChooser[manacost <=any word variable])
new this(:
this(tapped)<--for strange case cards.
this(untapped)
this(auras)
new MTGAbility keywords
(blink)
(blink)forsrc <--stay blinked while source inplay
hand(blink <---adding hand to the front makes it target hand.
livingweapon
this is an extension of token, simple attach the words "livingweapon" to the front of token( and it will autoamtically token that and attach the card to it.
token( gained:
"targetcontroller" targetting.
"battleready" if put in the tokens abilities it will be a attacker and tapped as it is entering play.
phaseout <--self explanitory
spiritlink <--stacking lifelink style effect that benifits the OWNER of the card.
combatspiritlink same as above.
stacking flanking, requires 2 abilities unfortunately
[card]
name=Agility
target=creature
auto=teach(creature) flanker
auto=teach(creature) flanking
text=Enchant creature -- Enchanted creature gets +1/+1 and has flanking. (Whenever a creature without flanking blocks this creature, the blocking
creature gets -1/-1 until end of turn.)
mana={1}{R}
type=Enchantment
subtype=Aura
[/card]
removeallcounters(number/number,name)
removes all counters of the type from a card, can all be
"all"
vampire hexmage effect.
added new tools for transforms
,setpower=number
,settoughness=number
removetypes
morph
autofacedown={0}:morph
eradicate <---same as the card name.
cumulativeupcost[ <--self explanitory
upcostmulti[ <--an upcost that will resolve with a && ability
phaseaction[ phase name ] ability
an ability that will trigger on the stated phase name.
also support for phaseactionmulti[
new triggers added:
@vampired( <--sengir vampire effect
@targeted(
@lifeloss(
@lifed(
add a special ability builder called dynamicability
it acts alot like a choose your own adventure book
dynamicability<! variable 1, variable 2, variable 3,variable 4!> optional ability targetting the original target.
variable list 1:
this is the primary amount source
source
mytgt
myself
myfoe
variable list 2:
this is the variable we're after, or the amount
power
toughness
manacost
colors
age
charge
oneonecounters
thatmuch
variable list 3:
this is the main effect
strike
draw
lifeloss
lifegain
pumppow
pumptough
pumpboth
deplete
countersoneone
variable list 4:
how it will do this effect to.
itself
eachother
targetcontroller
targetopponent
tosrc
srccontroller
srcopponent
the best way to explain its usage is to look at cards coded with this ability. or experiment with combinations.
new gameoption
First turn player:player, opponent, random
who takes the first turn
added poisoned status, tho not complete since MBS hasnt spoiled enough cards to see where this variable will be used.
taught ai how to counter spell
improved ai, it will now cast instants during interupts and during your turn.
previously ai treated instant cards the same as it treated sorceries, which was not fair to the ai.
im sure there is some messed items, but the rev directly before this one had formatting in the code that created hundreds of conflicts with this one, so i had to dig this info out of red and green sections.
cards and test are coming soon, i ask PLEASE do not alter these new additions until the test are commited.
im commiting without the test because instead of allowing me to proceed with my beta test period, there are some that wish to rush me into a commit. if you do not like this commit revert it, i absolutely on no grounds give permission to recommit afterwards. and i will not recommit if a revert is called.
finishing up my reformatting of the source from November/December following the guidelines that were posted.
some extra things I added:
* Any empty virtual declarations were kept to one line.
* Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
ok here goes, first, fixed a crash that would happen when ever a player would gain more then 2000 life or take more then 2000 damage...the buffer was becoming corrupted i imagine because it was too small, increasing it to 10 slots allowed players to successfully take massive amounts of damage, highest i bothered checking was about 35k gained/lost, no crash...
2nd, removed the and refactored cantcaster rule, moved it to stateEffects() and renamed stateeffects to better reflect what it will be handling,
removed sneak attack rule and moved it into stateeffects
the following ints have been converted into bool,
all the cantcasters, canputlandsintoplay is becoming a bool, the amount of lands you can play is now handled by a new varible int landsPlayerCanStillPlay (this is for my ability additional lands increase in support on perminents coming after the release)
the changes to bools were for an obvious reason, they were all ints pretending to be bools, my varibles were confusing as you would often see code like this if(cantblahblah > 0)
which to another coder might not make any sense.
these varible ints were returning 0 as false and 1 as true...changed them all to bools, same goes for putlandsinplay int, in half the places it was being used as a bool, AND it was tracking the amount, when i was coding additional land ability, this made it impossible to maintain correct amounts without damaging the rest of the code.
as a bool, controlled by stateeffects, it can now be used correctly as a bool in all cases, and the stateEffects manages the switch on it to false if you no longer have any landsPlayerCanStillPlay left.
the refactor on cantcaster was also a bug fix, it was reported to me that cantcasters were not correctly working, sometimes ai or player would still be allowed to play a card with one in play, because of the old way i had it setup somecases of bothcantcaster were reseting the cantcast to 0, basically making the check do nothing.
it is now handled in stateeffects if you have one in play, then its true, if not then false...this returns very accurate tracking of the cards instantly instead of checking as cards enter or left play.
the "both" versions now have their own bools to avoid future conflicts with the single player cantcast...
added a case for the fancy moving text, some move to library effects were incorrectly returing fetch.
modified player status to recognize that test suite has been activated. This is to allow deactivation of "phase skip automation" game setting during test suite.
TODO: fix "Phase Skip Automation" such that if turned on the test suite does not break. This fix should be considered temporary