Commit graph

264 commits

Author SHA1 Message Date
Oleg Agafonov
de19bd56cb refactor: fixed copy constructor in some dynamic values 2025-01-25 01:11:35 +04:00
Grath
7bfb0d2dec [DRC] Implement Prophet of the Scarab
Also adds a DynamicValue that finds the largest of multiple DynamicValues.
2025-01-24 15:47:17 -05:00
theelk801
59c1a32697 [DFT] Implement Streaking Oilgorger 2025-01-23 23:07:34 -05:00
xenohedron
d6cf207a8b
Introduce new batch event for life lost for a specific player (#13071)
* Introduce new batch event for life lost for a specific player

closes #12202, fix #10805

* implement [DSC] Valgavoth, Harrower of Souls

* text fixes
2024-11-19 23:41:34 -05:00
xenohedron
fb71ce8c85
refactor: SourcePermanentPowerValue to enum (#13040)
* refactor: standard enum style for SourcePermanentToughnessValue

* refactor SourcePermanentPowerCount to enum SourcePermanentPowerValue

add comments on usage of NOT_NEGATIVE vs ALLOW_NEGATIVE
2024-10-27 00:19:38 -04:00
grimreap124
f42fc0f388
[ACR] Implement The Capitoline Triad (#12510)
* Implement-ACR-The-Capitoline-Triad

---------

Co-authored-by: Grath <1895280+Grath@users.noreply.github.com>
2024-09-07 00:57:36 -04:00
xenohedron
23a8434552 fix Twitching Doll counter type
small refactor to CountersSourceCount for counters of any type
2024-09-06 22:14:41 -04:00
xenohedron
a9250ff28a followup text fixes 2024-09-02 20:17:36 -04:00
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
Matthew Wilson
08eb000453
[MKM] Implement Proft's Eidetic Memory (#11779) 2024-02-10 14:52:28 -05: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
Evan Kranzler
bc4aa6931f
Ready for review: Implement Craft mechanic (#11352)
* [LCI] Implement Spring-Loaded Sawblades / Bladewheel Chariot

* [LCI] Implement Sunbird Standard / Sunbird Effigy

* card filter needs to have an owner predicate

* [LCI] Implement Throne of the Grim Captain / The Grim Captain

* make default constructor for craft with artifact

* dedupe some code

* refactor constructors for simplicity

* add currently failing test
2023-10-27 22:32:11 -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