Commit graph

235 commits

Author SHA1 Message Date
ssk97
32bf3eb9bf
Genericize Target Adjusters (#12107)
* Create generic X MV adjuster

* Update XTargetsAdjuster

* Create DynamicValueTargetsAdjuster to replace VerseCounterAdjuster

* Convert XTargetsAdjuster to use DynamicValueTargetsAdjuster

* Genericize MV target adjuster

* Converting custom classes for A and B cards, fix Back in Town to only target creature cards

* Add Power and Toughness target adjusters, C cards

* Set up and use Monstrosity X DynamicValue

* Move Scry amount dynamic value to common, add D and E cards

* Convert F to I cards

* Cards K-M

* N, O cards

* Cards O-R

* S cards (check Scrap Welder)

* Cards T - Z

* Rename target adjusters

* Add filter messages, don't add 0 count targets

* Clear blueprint targets (just in case), fix target names, Temporal Firestorm is not target

* Requested renames

* Aether Burst is "up to"

* Review fixes

* Add new cards, add source to dynamic value calculation
2024-05-03 01:12:52 -04:00
Susucre
6f5eb8788d implement [PIP] HELIOS One 2024-05-02 16:32:41 +02:00
xenohedron
f482eef06a text fixes 2024-05-02 01:24:22 -04:00
Susucre
74adbf222c refactor together experience counter DynamicValue 2024-05-01 21:54:19 +02:00
Susucre
7c3bbed8f3 make batchs for milling cards (per player, all)
Rework and test the couple of existing cards triggering on mill.
2024-05-01 20:55:50 +02:00
Susucre
e62d1c2124 [OTC] Implement Thunderclap Drake 2024-04-09 13:08:10 +02:00
Susucre
b5d0943b9d [OTC] Implement Cactus Preserve 2024-04-06 13:42:23 +02:00
Cameron Merkel
fc5ee90bf8
[MKC] Implement Experiment Twelve, changes to TargetPermanentPowerCount (#11901) 2024-03-04 14:42:04 +04:00
xenohedron
264b73355a
refactor: improved targets that find a [type1] card and/or a [type2] card (#11497) 2023-12-01 19:26:30 +04:00
xenohedron
c164d70135 remove PlayersAttackedThisTurnWatcher from default watchers 2023-11-30 00:56:32 -05:00
xenohedron
1ac4fe4e4a add doc comments for usage of default watchers 2023-11-29 20:57:12 -05:00
ssk97
2cc9957753
Costs Tag Tracking part 4: Convoke (#11446)
* Switch Convoke to using costs tag system

* Add Convoke copy/clone tests

* update author name on sufficiently changed files

* Remove now-unused CONVOKED event
2023-11-23 01:31:56 +04:00
xenohedron
4977fea307
Merge pull request #11417 from ssk97/TagTracking3_KeywordAbilities
Costs Tag Tracking part 3: Most keyword abilities
2023-11-20 21:28:40 -05:00
Steven Knipe
660288dfd7 Use generics to ensure the correct class types stored inside the costs tags. 2023-11-17 02:37:06 -08:00
ssk97
ca80849249
game: fixed "if mana was spent to cast" abilities after leaves (#11419)
* ManaWasSpentCondition should use MageObjectReferences
2023-11-17 12:02:47 +04:00
Steven Knipe
77dd1711b5 Convert Kicker to costs tag system 2023-11-16 15:07:58 -08:00
ssk97
bea33c7493
Costs Tag Tracking part 2: Tag system and X values, reworked deep copy code (#11406)
* Implement Costs Tag Map system

* Use Costs Tag Map system to store X value for spells, abilities, and resolving permanents

* Store Bestow without target's tags
Change functions for getting tags and storing the tags of a new permanent

* Create and use deep copy function in CardUtil, add Copyable<T> to many classes

* Fix Hall Of the Bandit Lord infinite loop

* Add additional comments

* Don't store null/empty costs tags maps (saves memory)

* Fix two more Watchers with Ability variable

* Add check for exact collection types during deep copy

* Use generics instead of pure type erasure during deep copy

* convert more code to using deep copy helper, everything use Object copier, add EnumMap

* fix documentation

* Don't need the separate null checks anymore (handled in deepCopyObject)

* Minor cleanup
2023-11-16 23:12:32 +04:00
xenohedron
33781ac614 text fixes 2023-11-01 23:28:07 -04:00
theelk801
688003c8e0 [LCI] Implement Gargantuan Leech 2023-10-30 21:40:20 -04:00
theelk801
fb0917c4e6 [LCI] Implement Enterprising Scallywag 2023-10-28 10:04:33 -04:00
theelk801
3ed232fe63 [WHO] Implement Impending Flux 2023-10-24 19:51:01 -04:00
xenohedron
1c19280693 rework Banewasp Affliction 2023-10-20 01:15:34 -04:00
Susucre
96a2c277b2
clean some of the most frequent copy constructor / copy method (#11053) 2023-08-30 19:48:03 -04:00
Susucre
2a5dd4103c
[WOE] Implement Ashiok, Wicked Manipulator (#10909)
* [WOE] Implement Ashiok, Wicket Manipulator

* Add Ashiok's abilities

* basic pay life replacement tests

* many tests later

* add warning on token expecting watcher

* apply review

* rework text generation
2023-08-30 19:15:56 -04:00
Susucre
5998f43f4d
[WOE] Implement Rowdy Research ; Implement Witchstalker Frenzy (#10985)
* add new DynamicValue

* [WOE] Implement Rowdy Research

* [WOE] Implement Witchstalker Frenzy
2023-08-24 08:33:10 -04:00
Susucre
54ec026369
[WOE] Implement Rowan, Scion of War (#10853)
Co-authored-by: Evan Kranzler <theelk801@gmail.com>
2023-08-18 15:16:50 -04:00
Susucre
eef8f508e4
[CMM] Implement Demon of Fate's Design (#10737)
* refactor SacrificeCostManaValue to be an enum.

* [CMM] Implement Demon of Fates Design

* Add Unit Tests, including one bug on alternative cost.

* fix alternativeCosts made from dynamicCost returning that they were not activated when paid.

* fix small issues, add hint

* cleanup tests and add a couple

* Capitalize enum instances

* Minor fixes

* simplify the ContinuousEffect

* use the ConditionPermanentHint made for the Demon

* fix text
2023-08-12 15:49:06 -04:00
Susucre
f75b1c9f0a
Code cleanup: protect all copy constructors (#10750)
* apply regex to change public copy constructors to protected
* cleanup code using now protected constructors
* fix manaBuilder weird casting of Mana into ConditionalMana
2023-08-04 19:34:58 -04:00
Susucre
9889baa0bc
Fix game freeze caused by TotalPermanentsManaValue hint copy (#10751) 2023-08-04 18:09:43 -04:00
Susucre
63d9061f6a
[LTC] Implement Assemble the Entmoot (#10711)
* [LTC] Implement Assemble the Entmoot

* rename ControllerGotLifeCount -> ControllerGainedLifeCount
2023-07-31 23:50:29 -04:00
xenohedron
ba8ed9fcac Fix LKI handling in AttachedPermanentPowerCount 2023-07-28 00:55:42 -04:00
xenohedron
367cf9169c Implement [LTC] Lothlorien Blade 2023-07-27 23:42:45 -04:00
Susucre
c4f13be87f
[CMM] Implement Nyxborn Behemoth (#10670)
* [CMM] Implement Nyxborn Behemoth

Regroup the different dynamic values for "total mana value of [FILTER]" under a shared class.

* refactor hints inside TotalPermanentsManaValue

* apply review on TotalPermanentsManaValue->copy
2023-07-27 12:50:47 -04:00
xenohedron
3f346d791c fix file location in source tree 2023-07-10 06:32:04 -04:00
Susucre
496faaf5cb
[LTR] Implement The Balrog, Durin's Bane (#10515)
* [LTR] Implement The Balrog, Durin's Bane

I could use someone more experienced for this card:
Should the watcher `PermanentsSacrificedWatcher` be initialized locally in the card's class, or is a global initializing in GameImpl.java alright? I went for the latter for now, as my base for implementing the static cost reduction was Blood for the Blood God!

* apply review

* no longer instantiate watcher on every game.
2023-07-01 12:53:31 -04:00
xenohedron
a6c19c4335 Fix #10237. Fix #10315. (MageObjectReference discrepancy) 2023-06-16 22:34:09 -04:00
theelk801
294ccedc45 [LTR] Implement Last March of the Ents 2023-06-03 10:06:39 -04:00
Oleg Agafonov
3c66dc8706 Additional fixes for 9d9916280a 2023-05-09 15:05:24 +04:00
Oleg Agafonov
79b8093047 * Jaheira's Respite - fixed that it allows to choose any cards amount (#10206), added card hint;
* Arachnogenesis, Blessed Reversal - added card hint;
2023-04-15 15:38:44 +04:00
theelk801
7a3841c45c [MOM] Implement Ancient Imperiosaur 2023-04-09 13:23:05 -04:00
PurpleCrowbar
725c29182b Allowed getOpponents to filter out players who have lost the game. Fixes Corrupt mechanic, Mycosynth Fiend, etc 2023-02-03 02:23:10 +00:00
Alex Vasile
6f0cdc6032 [NCC] Fixed Phabine, Boss's Confidant not working properly (and added hint to ParleyCount). Closes #9603. 2022-11-04 22:28:49 -04:00
Evan Kranzler
ee92809a10 [BRO] Implement Clay Champion 2022-11-02 21:39:11 -04:00
Evan Kranzler
beacccf558 [BRO] Implement Evangel of Synthesis 2022-11-02 09:56:17 -04:00
Alex Vasile
beec1f30c5 Delete leftover and unused class 2022-10-09 21:51:36 -03:00
Alex W. Jackson
fd281ca483 Improve text generation for some common draw, discard and mill effects 2022-10-08 20:48:59 -04:00
Evan Kranzler
0d4cf5a20a [40K] Implemented The Swarmlord 2022-09-13 18:55:19 -04:00
Evan Kranzler
c745bce734 [DMU] Implemented Shanna, Purifying Blade 2022-09-05 20:24:46 -04:00
Alex W. Jackson
e0ade383f2 Fix #9441 2022-08-30 11:40:30 -04:00
Evan Kranzler
6b09fc68ef [DMU] Implemented Molten Monstrosity 2022-08-22 15:31:01 -04:00