Commit Graph

2397 Commits

Author SHA1 Message Date
Anthony Calosa 606d18aa6e bypassTC on playertarget 2015-09-24 06:24:17 +08:00
Anthony Calosa 106bcec7cf bypass targetchooser 2015-09-24 06:02:46 +08:00
Anthony Calosa 2223cd4f30 modified castcard to support put into play
for reanimated aura
2015-09-23 21:36:05 +08:00
Anthony Calosa 7db5345f9a attempt to fix "notatarget"
notatarget must be allowed to target untargettable cards.
2015-09-23 12:14:47 +08:00
Anthony Calosa 4b9f94c9ae added auraward, added event for unattach, added statebased check for protection from quality
auraward -> an exception for protection from quality used for aura, like
flickering ward
added event for unattach
added state based check for protection from quality.
702.16c A permanent or player with protection can’t be enchanted by
Auras that have the stated
quality. Such Auras attached to the permanent or player with protection
will be put into their
owners’ graveyards as a state-based action.

702.16d A permanent with protection can’t be equipped by Equipment that
have the stated quality
or fortified by Fortifications that have the stated quality. Such
Equipment or Fortifications
become unattached from that permanent as a state-based action, but
remain on the battlefield.
2015-09-22 17:11:40 +08:00
Anthony Calosa 28f758e421 Removed Workarounds, Added support for Can't Gain life...
spellmastery - can play as though had flash used in conjunction for
alternative cost.
nolifegain, nolifegainopponent - cannot gain life.
2015-09-21 15:22:28 +08:00
Anthony Calosa 7b3da0e2c2 added M15 cards :)
added M15 cards and support for cards that use startinglife
keyword(Resolute Archangel)
2015-09-21 12:00:34 +08:00
Anthony Calosa 725a285e7f Reverted Random 2015-09-20 22:28:08 +08:00
Anthony Calosa 9bf329bd17 I just found this out....
Make the indicator for classic game type. Maybe there is another way to
produce cards by using the function from castcard...
2015-09-20 19:53:49 +08:00
Anthony Calosa 18f09ab2ef %c to %s 2015-09-20 14:26:40 +08:00
Anthony Calosa 5985c518f6 buff.c_str() 2015-09-20 14:17:43 +08:00
Anthony Calosa 0e90426cff Support for Silumgar Assassin, Minor PT color and Token, Clone Indicators
When a creature is damaged and has critical life, PT turns to
red(critical life is 2 and below), if a card has a powered down status
like from -1/-1 counter, the PT turns to thistle, if powered up above 4,
the PT turns into yellow, default is white. legendary eldrazi pt is
violet. Token Indicator is T, and C for cards with copy abilities(so we
can differentiate them from originals), TC for both token and copy cat
cards.
2015-09-20 13:19:03 +08:00
Anthony Calosa c372ffa111 Switching PT, Token Indicator
Added Switching PT like Layer 7e, Token Indicator for cloned Cards
2015-09-19 23:25:33 +08:00
Anthony Calosa 64c6d19ae7 lowest is 0, typo... 2015-09-19 13:28:14 +08:00
Anthony Calosa c9d9d3d4d3 Random
I have a profile with 100+ decks and it seems with the previous code,
the random deck seems not random.
2015-09-19 13:05:16 +08:00
Anthony Calosa e25b78953c other indicators must be somewhere else 2015-09-19 10:29:02 +08:00
Anthony Calosa 81f0c916f5 readjustment 2015-09-19 08:04:26 +08:00
Anthony Calosa ef690f6438 update pt colors 2015-09-19 07:50:04 +08:00
Anthony Calosa 11124205e5 basic color code on PT
if a creature was damaged or has a negative toughness bonus, the pt
changes to crimson red, if the creature was not damaged and has power
buff, the color changes to spring green, normal was default white.
2015-09-18 20:16:28 +08:00
Anthony Calosa 6cd0474eca Bug Fix on Cloning Tokens 2015-09-18 19:56:02 +08:00
Anthony Calosa 13bb6dbe93 Update Token.cpp
Fix typo
2015-09-18 06:03:53 +08:00
Anthony Calosa 478dea6af4 Tidy up a little... 2015-09-17 21:30:55 +08:00
Anthony Calosa 76c48a8c4e Merge pull request #1 from WagicProject/master
Merged from WagicProject:master
2015-09-17 05:52:33 +08:00
Anthony Calosa 425b51de08 Fix for token cloning
Some tokens when cloned produces miscalculated PT(Using foreach,
aslongas and others that needs CDA). This should fix the issue. TODO:
add tests and updated mtg.txt ...
2015-09-16 20:36:58 +08:00
Anthony Calosa db649ddc96 Added Update on CDA
This controls whether to update Power and Toughness if we are setting
base PT or not. If we are setting base PT update the CDA but it will not
be applied since we have an effect that sets PT to a default base. If
there are no effect that sets base PT, apply it on CDA using
current/updated PT. The buffs are not affected. Yeah...
2015-09-16 09:34:32 +08:00
Anthony Calosa 6aab17d0b3 CDA complete
This fixes the bug I introduced lst time. The damage was not taking into
account, but this time the damage reflects...
TODO/TOFOLLOW: update test and update all cards that uses CDA :)
2015-09-16 06:42:02 +08:00
Anthony Calosa 72aaa18a35 CDA
CDA works by using "cdaactive" keyword on PT changes. Instead of
granting bonus, we modify the orig power and toughness since they are
dynamic PT. cdaactive are for cards like maro, tarmogoyf, etc. To
Follow/To Do: Additional Tests and other bug fix
2015-09-15 06:35:07 +08:00
xawotihs acfd0bf104 Merge branch 'master' into iOS-Build 2015-09-13 18:42:31 +02:00
Anthony Calosa 11d68c0e27 Separated PT Modifiers, Fixed Changeling, Modified Counter as a cost
CDA Todo
2015-09-12 12:03:52 +08:00
Anthony Calosa b33a999458 Finally PT Calculation is fixed :)
I didn't take into account that the new bonus must be calculated on the
event the effect was destroyed... silly me... 🉑
2015-09-11 10:53:36 +08:00
Anthony Calosa d3a7ff7e11 reinitialize counters on destroy 2015-09-10 06:04:43 +08:00
Anthony Calosa c1e9fad271 added basepower and basetoughness
added these two so if we want to access original power and toughness, we
can point to origpower and origtoughness respectively.
2015-09-10 05:26:09 +08:00
Anthony Calosa 9d668342be PT should work fine now... 2015-09-10 00:26:20 +08:00
Anthony Calosa 62dd54c886 Base Power/Toughness Template as of M15
208.4. Effects that set a creature’s power and/or toughness to specific
values may refer to that creature’s
“base power,” “base toughness,” or “base power and toughness.” Other
continuous effects may
further modify the creature’s power and toughness. See rule 613,
“Interaction of Continuous
Effects.”
2015-09-09 22:18:13 +08:00
Anthony Calosa ef707e6d5d added basic offering support
usage tap lands to produce mana then sacrifice an offering... example
you have Guttersnipe in play, it has a mana cost of {2}{R}, and you have
Patron of the Akki in hand that costs {4}{R}{R}. You need to produce
{2}{R} mana first before casting Patron of the Akki, then choose
Guttersnipe as an offering.
2015-09-08 12:26:03 +08:00
Anthony Calosa a57e919e44 commented out unused variable... 2015-09-07 19:53:16 +08:00
Anthony Calosa 022a15a5e9 added epic cards, fixed maxcast bug
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.
2015-09-07 10:09:34 +08:00
Anthony Calosa 7878252692 support for Rest in Peace
tokens are not cards...
a little dirty...
2015-09-04 23:45:16 +08:00
Anthony Calosa 11a9766ba0 adds support for darksteel colossus, gravebane zombie 2015-09-04 16:47:11 +08:00
Anthony Calosa 5175f439a0 add support for yawgmoth's agenda and other similar cards 2015-09-04 12:05:19 +08:00
Anthony Calosa cbb603818a correction for untap cost
602.5a comprehensive rule as of  6/1/2014
2015-09-04 12:04:17 +08:00
xawotihs 7020121274 Merge branch 'master' into iOS-build 2015-09-04 00:04:59 +02:00
Anthony Calosa 42d0480f77 refactored lifestate check 2015-09-03 20:12:09 +08:00
Anthony Calosa 9fb460c176 life state check on trigger
life state check when players gain or lose life
bugs\exquisite_blood_i953.txt will stop looping
as long as the conditions are met on the check
2015-09-03 07:01:45 +08:00
Anthony Calosa b2b54b7c5b attribute -multicolor will return single colored cards
use iscolorless to find colorless... :)
2015-08-31 22:03:41 +08:00
Anthony Calosa 29ac95362d multicolor correction
not multicolored is single colored or monocolored not colorless...
colorless has no color...
2015-08-31 19:06:51 +08:00
Anthony Calosa 410f2d4e69 updated tests 2015-08-30 23:04:50 +08:00
Anthony Calosa 2998e95a3b tokenizer should work now for cloning ability
Populate(Put a token onto the battlefield that's a copy of a creature
token you control.)
2015-08-24 22:39:54 +08:00
xawotihs e28dd11b63 Merge branch 'master' into iOS-Build 2015-08-23 22:35:54 +02:00
xawotihs 907274f9bd Fixed cross-compiling with theos 2015-08-23 21:23:55 +02:00