Hanmac
a67da177ff
add new Replacement Effect its for manipulating the original request
...
Card#addCounter does show how it is done
2016-12-26 13:31:20 +00:00
Agetian
56b40c960c
- Temporarily reverted r32802 (breaks visualization of transform, flip and meld cards in their alternate state, possibly more). Please feel free to revert this commit and update the solution when possible.
2016-12-26 07:04:20 +00:00
Myrd
f97ccdef5d
Create the FaceDown card state lazily.
...
Profiling showed this was responsible for 3% of execution time when using Simulated AI and is also wasting memory.
2016-12-25 21:13:03 +00:00
Hanmac
1d7f3e7dd5
CardPredicates: add hasSVar to check for some values like DiscardMe
2016-12-24 10:53:35 +00:00
Hanmac
20ca270e03
add SpellAbilityPredicates similar to CardPredicates and others
2016-12-24 10:52:33 +00:00
Agetian
b671ea87ac
- Implement a method to reset WrappedAbility SA targets (fixes e.g. Chandra, Torch of Defiance emblem persistently targeting the same target).
2016-12-24 09:31:49 +00:00
Agetian
d2172519b4
- Clear the temporary EndOfTurnLeavePlay SVar from a Dashed creature to avoid making it linger permanently on the card for the rest of the duel.
2016-12-24 07:05:30 +00:00
Agetian
0334dbb87c
- Do not set an EndOfTurnLeavePlay SVar on Dash cards (seems to have no functional effect while preventing the AI from ever casting the card for its full mana cost after it was dashed once).
2016-12-24 05:13:51 +00:00
Myrd
a2aa3ccc06
Fix another problem with Thespian's Stage copying itself and add a test.
2016-12-22 22:30:34 +00:00
Myrd
4efc738813
Fix dev mode save/restore of legendary tokens.
2016-12-22 21:59:35 +00:00
Myrd
3e91a56ced
Fix NPE in CardUtil.getLKICopy() that would happen when Thespian's Stage would copy itself.
...
The problem would happen when executing:
newCopy.getCurrentState().copyFrom(in, in.getState(in.getCurrentStateName()));
Because the clone code was clearing the cloned state without updating currentStateName.
Also added a test for this in the context of simulated AI, although the actual bug was not in simulation code - it's just simulation code would run into it since it tries all possible targets to copy (while humans would likely not try it).
2016-12-22 20:31:41 +00:00
Myrd
4b14c9d943
Fix copying of emblems for simulated AI along with a test.
2016-12-22 19:45:16 +00:00
Myrd
2b0c76ad66
Fix cost reduction for Not of This World when targeting an Abzan Charm that's exiling a creature.
2016-12-22 18:58:02 +00:00
Hanmac
94681b6675
Splice: do a total rewrite to make it better for the player and more rules conform
2016-12-21 18:32:50 +00:00
Hanmac
77437bdb50
Card: hide staticAbilities which are Secondary (probably made by Keyword)
2016-12-21 18:00:12 +00:00
Agetian
930c804b93
- Add a static ability string to card when adding a keyword static ability (fixes Clone on a card with one of those keyword abilities, e.g. Cloning a card with Changeling).
...
- Simplified CardFactoryUtil::addStaticAbility code.
2016-12-21 15:45:34 +00:00
Agetian
33c5f4d158
- Correctly identify the paid X for the purpose of building stack descriptions (e.g. fixes Repeal stack desc).
2016-12-20 19:20:45 +00:00
Agetian
ae608246d1
- Reverting the lifelink change for now, better solution needed.
2016-12-20 10:18:06 +00:00
Agetian
3fc05d6940
- Resetting targets not required when changing ValidTgts for Detonate.
2016-12-20 08:40:14 +00:00
Agetian
4d491a6bdf
- A [hacky] fix for Detonate that only allows targeting CMC 0 artifacts if Detonate is cast without mana cost (e.g. on Cascade) with X=0.
...
- Ideally should be done via Annouce$ X by announcing X before starting to cast the spell and presetting it to 0 when cast without mana cost, but that causes massive issues with the AI.
2016-12-20 08:37:04 +00:00
Agetian
d23964106d
- Attempting to fix interaction between lifelink on combat damage and replacement effects like Gisela, Blade of Goldnight.
2016-12-20 08:35:06 +00:00
Agetian
c255cb5285
- Fixed copying a SA with no mana cost not setting the WithoutManaCost param which is needed by e.g. Play effect AI to properly determine that the spell should be played without paying its mana cost.
2016-12-20 05:22:37 +00:00
Agetian
7e4ab8d0bb
- Fixed Grip of Chaos NPEing when Maze of Ith is used in its presence (and other potential similar NPEs).
2016-12-19 16:47:45 +00:00
Agetian
9f17f2700d
- Chandra, Torch of Defiance should show the exiled card to the ability activator prior to asking whether the player wants to play it or not.
2016-12-19 06:06:30 +00:00
Hanmac
875198bed5
TriggerChangesZone: use ArrayUtils.contains to check for String in String[]
2016-12-18 21:15:05 +00:00
Agetian
d07a0913ad
- Allow multiple Destinations for TriggerChangesZone (fixes Reyhan, Last of the Abzan).
2016-12-18 18:46:09 +00:00
Agetian
e8f30ace1e
- Formatting imports.
2016-12-18 05:30:24 +00:00
Agetian
9352b7f3ce
- A more transparent fix for Kalitas, Traitor of Ghet which does not affect cards such as Aurification, Curse of Stalked Prey and others.
...
- Adds an extra parameter to Card which stores the last known zone information for the card when it is copied for the purpose of LKI. Thus, things such as the zone and the timestamp of the LKI copy are not affected.
- If the card is not a LKI copy, the last known zone info is assumed to be the current zone the card is in.
2016-12-18 05:29:23 +00:00
Agetian
281e5f12c0
- Hopefully a better solution for the LKI problem: add a special flag to show that the card is a temporary copy and should not be considered as being in play
2016-12-17 20:12:08 +00:00
Agetian
b50183e7c4
- Copy the timstamp over to the LKI copy of a card (may be necessary to "prove" that the card and its LKI copy are the same, e.g. for the purpose of some triggers).
2016-12-17 19:47:07 +00:00
Hanmac
d8c97d9c4e
CardFactoryUtil: moved "At the beginning of your upkeep, sacrifice" as "UpkeepCost" in CardFactoryUtil
...
delete Upkeep class because its not needed anymore
2016-12-17 18:03:43 +00:00
Agetian
4b10704390
- When setting cloned SA targets in CharmEffect::ChainAbilities, call setTargets last in order not to forget if there were several targets selected (fixes Abzan Charm AI failing to correctly divide and allocate counters to two targets).
2016-12-17 17:31:57 +00:00
Hanmac
2b055b84fb
CardFactoryUtil: fixed Manifest
2016-12-17 11:04:05 +00:00
Agetian
eaf4e94851
- Reverting the RememberLKI change for now, breaks many other cards.
2016-12-17 08:08:03 +00:00
Agetian
3f2b5425b9
- AB Destroy should remember LKI if instructed to via RememberLKI parameter even if the creature is not destroyed (for the sake of subabilities that may reference that LKI). Fixes Phthisis + regenerating a creature.
2016-12-17 06:23:37 +00:00
Agetian
99b730ebc7
- NPE prevention in Charm effect (note: if the AI is trying a Charm effect while it hasn't chosen anything, then there's also an issue elsewhere in the logic, may need further examination/correction).
2016-12-16 18:59:14 +00:00
Agetian
f439fe52c4
- Fixed Everflowing Chalice NPEing after being cast via Delay.
2016-12-16 18:49:34 +00:00
Agetian
c2907aa915
- [Experimental] attempt to fix Kalitas, Traitor of Ghet interaction with mass removal by reading LKI about the card's last known zone on a Moved replacement effect event.
2016-12-16 07:07:11 +00:00
Hanmac
b8f7ea55f4
CardFactoryUtil: move Cumulative upkeep as part of SacrificeEffect and add it to Trigger
...
remove multiplyCost because its not needed anymore
2016-12-14 21:08:44 +00:00
Hanmac
ddb7bcd974
Cost: make Cost better copyable
...
When adding CostParts, make CostAddMana join together
2016-12-14 20:55:32 +00:00
Agetian
8d427fd2fe
- Removed debug messages.
2016-12-14 16:28:54 +00:00
Agetian
3407e84965
- Temporary fix [attention required]: fill Execute parameter for SAs that are parented to Charm API. Fixes Sapphire Charm first ability crashing. Most likely requires a different fix, please correct.
2016-12-14 16:17:12 +00:00
Agetian
8c7f967d50
- Fixed Jhoira of the Ghitu Avatar crashing.
2016-12-14 16:08:29 +00:00
Agetian
24f993eaef
- Somewhat neater implementation of Storm description.
2016-12-14 14:35:22 +00:00
Agetian
03f100686a
- Added a missing parenthesis.
2016-12-14 04:40:30 +00:00
Agetian
8e8bc627ef
- Fixed generation of Storm description (fixes e.g. Astral Steel and friends crashing).
2016-12-14 04:37:49 +00:00
Agetian
f32fe2d130
- A cleaner import cleanup
2016-12-13 19:16:19 +00:00
Agetian
e210a9d744
- Removed an unused import.
2016-12-13 19:15:11 +00:00
Agetian
3be3a5424e
- Reverted the Delve change in CardFactoryUtil for now, looks not necessary.
2016-12-13 19:10:56 +00:00
Hanmac
7bd7a0fcea
CardFactory: reorder SpellAbilities, the First should be SpellPermanent
2016-12-13 18:49:51 +00:00