Agetian
4ad1cc90d5
- For some reason CharmEffect could not match SAs in ChoiceRestriction mode (Demonic Pact). For now, checking by equality of description, please update if necessary.
2017-01-08 17:30:51 +00:00
Hanmac
d5e138f922
CardLists: add new getValidCards with allows SpellAbility and does split by ","
2017-01-08 15:30:28 +00:00
swordshine
0c43466a56
- AER: Add 2 cards
2017-01-08 04:36:08 +00:00
pfps
beaffe830b
Make yield string methods robust to effects that don't have a host card
2017-01-07 20:17:17 +00:00
pfps
87296cd6a4
Description for wrapped abilities includes stack information; Fixes problem with autoordering
2017-01-07 19:08:39 +00:00
Hanmac
7dc6a43d8e
Tracker: use HashBasedTable to store the Trackable Values
2017-01-07 18:13:29 +00:00
pfps
5da185263e
Autoyield on effect on a card not overall; Add new method to generate the autoyield key to prepare for fix of effect ordering
2017-01-07 15:52:24 +00:00
swordshine
5aae86e31a
- Set the intrinsic parameter for keyword "Equip"
2017-01-07 14:19:30 +00:00
Hanmac
048dce234c
CounterType: add Unity for Call for Unity
2017-01-07 11:47:04 +00:00
Hanmac
9531e16d02
Player: add hasRevolt similar to other Conditions, now way to calculate it, does set it in GameAction
2017-01-07 11:29:06 +00:00
Hanmac
593f4f64b1
GameEntity: move preventDamage from Card and Player to base Class,
...
add TriggerDamagePrevented if some damage was prevented
2017-01-07 10:26:40 +00:00
Agetian
7599e41a63
- Adding ways to determine the number of lands played and spells cast by a particular player last turn (will be necessary for some upcoming AI additions).
2017-01-07 04:59:11 +00:00
Hanmac
c46683e92d
AbilityUtils: add RegisteredOpponents for PlayerCount
...
PlayerPredicates: add isOpponentOf Predicator
Player: make getBloodthirstAmount use of new function
2017-01-07 04:19:33 +00:00
Hanmac
bd6c729317
Player: add wasDealtCombatDamageThisTurn Property
2017-01-07 03:55:59 +00:00
Agetian
15c631be72
- Temporarily reverting a change to the way ordering SAs is handled (breaks auto-yield) and improved my original change a bit to fix its logic, feel free to revert this to continue work on this project.
2017-01-06 18:53:05 +00:00
Agetian
bd26d9f4aa
- Fixed casting face-down instant spells from exile (e.g. via Gonti, Lord of Luxury), it was looking at the FaceDown state before and thought it was a creature.
2017-01-06 06:18:21 +00:00
Agetian
505b8c1c74
- Committed a change to allow the simulatenous SAs coming from different cards to be detected as different (by pfps), reverted a previous change with faulty logic.
2017-01-06 04:59:46 +00:00
Hanmac
a7dd00ed57
PlayerPredicates: create more Player Predicates to use them for AI
2017-01-05 19:47:21 +00:00
Hanmac
3f15270d75
ReplaceSplitEffect: update prevent variable on card, not on SpellAbility
2017-01-05 06:39:07 +00:00
Hanmac
126b1c3e7b
ReplaceDamage: add DamageTarget param, use it for DamageRedirection and SplitDamage to check if Damage can be redirected
2017-01-05 06:18:47 +00:00
Hanmac
71180403a0
Player: add ReplacementEffect for addCounter (using existing one)
2017-01-03 20:04:57 +00:00
Hanmac
d96a79177b
API: add ReplaceSplitDamageEffect its used for Damage splitting like en-Kor
2017-01-03 19:06:48 +00:00
Agetian
7feaa42299
- Code formatting.
2017-01-02 20:33:32 +00:00
Sol
9eeb7cdb11
Add Ludevic Necro-Alchemist (C16)
2017-01-02 02:52:55 +00:00
Hanmac
163cb460ab
GameEntity moved addCombatDamage from the other classes there. Also add a more generic AddDamage version
2017-01-01 13:47:22 +00:00
Agetian
beadf13c30
- Added a TODO entry for now.
2017-01-01 09:01:58 +00:00
Agetian
3a285fcd92
- Reverting r32912 for now, more investigation needed.
2017-01-01 08:29:35 +00:00
Agetian
7797224826
- Simpler solution for Boonweaver Giant + Animate Dead
2017-01-01 08:13:38 +00:00
Agetian
451db2a5db
- Removed unused import.
2017-01-01 07:18:22 +00:00
Agetian
8d2cf088a0
- Attempting to fix interaction of Boonweaver Giant with cards that can't legally target it (e.g. Animate Dead) such that those auras trying to enchant the creature do not move (per 303.4i/303.4j) and other similar interactions.
2017-01-01 07:17:48 +00:00
Agetian
4d5fae1c6f
- Only add avatars to decks if the Vanguard or Momir Basic variant is applied.
2016-12-31 10:58:29 +00:00
Agetian
f105b3f1c1
- Allow the player to draw cards before the game starts (drawing the initial hand, drawing a new hand after a mulligan), fixes Maralen of the Mornsong Avatar.
2016-12-31 10:55:13 +00:00
Agetian
787c8decb7
- Reverting the StaticAbility change for now (PlayerTurn can be used as a type of Defined parameter to define whose turn it should be when the static ability is applied again).
2016-12-31 06:37:05 +00:00
Agetian
fd883c8190
- getDefinedPlayers should use the "Defined" parameter to look for the definition of whose turn it should be, True == You (fixes Gisa and Geralf).
2016-12-31 06:19:02 +00:00
Myrd
5046c00566
One more fix for the TrackableTypes changes.
2016-12-30 19:57:31 +00:00
Myrd
a14a370107
Fix NPE from my previous change to TrackableTypes.
2016-12-30 19:43:40 +00:00
Myrd
18ba55ae27
Attempt to fix memory leak with TrackableTypes.
...
The problem was that TrackableTypes were all global (held in static variables), but kept around state (objLookup maps) that shouldn't be global - e.g. that could contain per game data. Additionally, it seems this state wasn't always getting cleared correctly and thus would cause leaking of memory over multiple games - which would especially be a problem for Simulated AI code which created temporary games for simulation.
This change attempts to fix the issue by moving the storage of objLookup maps to the Tracker object, which corresponds to a single Game. This way, there is no cross-contamination between different games and the state is properly cleaned up when a Game goes away.
2016-12-30 19:34:07 +00:00
Hanmac
1738f49798
Big Damage Rewrite Part 2: now use CombatDamageMap everywhere
2016-12-30 14:50:45 +00:00
Hanmac
4aa68c3fa6
CardDamageMap: add extra Table class for storeing the damage dealt by Card to GameEntity, might extended with extra functions
2016-12-30 08:08:18 +00:00
Hanmac
71871686a4
ReplaceEffect: make it ready for getting other types like Card or Player
2016-12-30 08:03:31 +00:00
Agetian
03f5f1f42a
- Somewhat better explanation for presenceCondition.
2016-12-30 05:47:35 +00:00
Agetian
8a9d80c10c
- Check SpellAbility for Presence condition (fixes Dragon Presence cards like Draconic Roar, Dragonlord's Prerogative, Foul-Tongue Invocation and others).
2016-12-30 05:25:56 +00:00
Myrd
0e9b327fd9
[Simulated AI] Fix memory leak caused by SAs making it into the wrong game's spabCache.
...
The problem was that during copying of SAs, the spabCache was not updated correctly due to the code being in the wrong order. A further problem was that activatingPlayer was not being correctly set on the new abilities, so you would end up referencing a Player from a different Game object from an SA that was in a spabCache, resulting in many previously-simulated Game objects being leaked through this reference chain.
This change fixes both of those problems and also adds a validation function that checks the contents of the spabCache at every game copy.
2016-12-29 22:31:18 +00:00
Myrd
f2204c594a
Remove dealtDamageToThisCombat field from Combat class.
...
Its contents were never used and it was actually causing a problem for simulated AI when the current Combat was copied into a simulated game - as it would contain references to tokens that were killed that were no longer in the game and thus caused a mapping exception.
2016-12-29 18:54:18 +00:00
Hanmac
0b087fc884
AbilityFactory: removed unneeded special cases
2016-12-29 16:15:26 +00:00
Agetian
256f539cb0
- Fixing additional abilities not working for Mana Clash, Fiery Gambit et al. (not created for Repeat/RepeatEach APIs)
2016-12-29 15:51:33 +00:00
Hanmac
c32fbaa94d
DamageAllEffect: fixed sourceLKI for Lifelink
2016-12-29 13:16:20 +00:00
Hanmac
21a34b8f3c
commit GameEntity i forgot
2016-12-29 12:47:28 +00:00
Hanmac
f891446b8b
Combat: fixed assigin damage more than once if damage got replaced
2016-12-29 12:43:36 +00:00
Hanmac
0426896c01
Refactor Damage/CombatDamage/Lifelink, now it works as it should with DamageRedirection/Prevention/Multiplication
2016-12-29 11:33:25 +00:00