Commit graph

248 commits

Author SHA1 Message Date
grimreap124
9f1031f286
Implement [M3C] Blaster Hulk/Create EnergySpentOrLostThisTurnCount and update Izzet Generatorium (#12426)
* Implement-M3C-Blaster-Hulk

* Update BlasterHulk.java

* Update BlasterHulk to fix number of targets

---------

Co-authored-by: Grath <1895280+Grath@users.noreply.github.com>
2024-09-01 13:40:54 -04:00
ssk97
e8808c3ae3
Remove duplicate code for X costs (#12551)
* Replace "([a-zA-Z]+).getManaCostsToPay().getX()" with CardUtil.getSourceCostsTag(game, $1, "X", 0)
Fix Disrupting Shoal

* Change final card .getX() calls

* Condense all ManacostVariableValue enum values into "instance"

* Further removal of getX, Display X symbol for non-mana X cards

* Fix test

* Fully remove ManaCosts.getX

* Replace all different X dynamic values with GetXValue

* Remove individual cards checking getAmount for X values (leaving cost reduction that does not use X)

* Add null check for game object inside getSourceCostsTagsMap

* fix build errors

* fix Vicious Betrayal

* text fix
2024-07-23 01:57:47 -04:00
ssk97
2daa2b8820
[PIP] and [WHO] card implementations (#12482)
* Last Night Together

* Nanogene Conversion

* Return the Past

* Rose, Cutthroat Raider

* Diamond City

* Fix Apostrophe

* Various fixes

* Replace Diamond City and Celebration Watchers

* LastNightTogether improvements, add hint to ReturnThePast

* Add AttackedThisTurnOpponentsCount hint, ignore new failing Celebration test

* Review fixes, also create ValueConditionHint for value hints with a conditional threshold

* Comments improvements

* Requested changes to make ValueConditionHint extend ConditionHint

* single super call in ValueConditionHint constructor
2024-06-25 23:22:45 -04:00
theelk801
bac4e7b507 (refactor) break out assignment into its own package 2024-06-18 13:44:11 -04:00
grimreap124
1d8be572b5
Implement [M3C] Razorfield Ripper (#12389) 2024-06-06 23:11:38 -04:00
Susucre
24b184c28f refactor SavedGainedLifeValue instead of getValue("gainedLife") 2024-06-04 11:19:14 +02:00
xenohedron
4025b312ad cleanup calls to respect range of influence 2024-06-02 21:28:14 -04:00
grimreap124
48579814f9
implement [MH3] Spymaster's Vault (#12325) 2024-05-31 12:13:20 +02:00
Susucre
20b7a115da
prevent direct access of Player->counters ; some cleanup on counter removal effects ; implement [MH3] Izzet Generatorium (#12314) 2024-05-29 22:34:54 +02:00
Susucre
bcff245a31
rework more Prevention Effects involving counters. Implement [PIP] Bloatfly Swarm (#12205) 2024-05-23 19:48:44 +02:00
Susucre
79165f269c implement [MH3] Sorin of House Markov // Sorin, Ravenous Neonate 2024-05-22 22:18:52 +02:00
Susucre
8002cdf88f implement [MH3] Tamiyo Inquisitive Student // Tamiyo, Seasoned Scholar 2024-05-22 21:43:07 +02:00
xenohedron
398744dfbe add comments to CountersSourceCount for null param usage 2024-05-21 00:57:32 -04:00
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