Commit graph

12221 commits

Author SHA1 Message Date
jimga150
82069ef2e8
[MAT] Implement Deification, fix access to counter removal damage checkers (#12215)
* Make ChoosePlaneswalkerTypeEffect

* Make REMOVE_COUNTER and REMOVE_COUNTERS events so they can be replaced/modified

* Deification initial attempt, need to filter for damage

* add optional damage flag to removeCounters

* wrap logs in sim check

* check that planeswalker is chosen subtype

* cast to RemoveCountersEvent and reduce indents

* use counterRemovedDueToDamage

* add tests

* make other counterRemovedDueToDamage headers public

* remove logs

* remove isSimulation check from informPlayers

* remove logger

* make chosen planeswalker type predicate

* move event modification to replaceEvent
2024-05-03 22:15:00 -04:00
Susucre
85cad4ff1e
cleanup AbilityType for easier check that an ability is an activated ability (#12153)
* cleanup AbilityType

* further cleanup

* cleanup instanceof

* tweak formatting

* rework Rex

* fix mistake in PlayerImpl

* cleanup 'instanceof' for 'ActivatedManaAbilityImpl'
2024-05-03 22:13:34 -04:00
Susucre
534d1be175 add PayVariableEnergyCost, fixing [PIP] HELIOS One & [MH3] Chtonian Nightmare
fix #12217
2024-05-03 16:44:19 +02:00
xenohedron
ab99cfe1fd address other comments 2024-05-03 01:18:35 -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
xenohedron
b7e3964f2e text fixes 2024-05-03 01:07:23 -04:00
Susucre
44b591e15f implement [PIP] Moira Brown, Guide Author 2024-05-02 17:41:34 +02:00
Susucre
172a2e53b3 implement [PIP] Duchess, Wayward Tavernkeep 2024-05-02 17:41:30 +02:00
Susucre
6f5eb8788d implement [PIP] HELIOS One 2024-05-02 16:32:41 +02:00
Susucre
21443a5bfe implement [PIP] Rex, Cyber-Hound 2024-05-02 16:32:40 +02:00
jimga150
52ddcac59d
refactor: added counter removal events (#11989) 2024-05-02 17:32:55 +04:00
Susucre
860a767cca implement [PIP] Vault 112: Sadistic Simulation 2024-05-02 13:00:41 +02:00
Susucre
bada7d054a implement [PIP] Recon Craft Theta 2024-05-02 11:05:40 +02:00
Susucre
ab69e05115 clean DamagedBatchCouldHaveFiredEvent isCombat
no longer flag to be more in line with other damage events
2024-05-02 10:39:42 +02:00
Susucre
f24b3d988d clean MILLED_EVENT to not store Card directly. 2024-05-02 10:18:36 +02:00
xenohedron
30d498b80f consolidate batch event constructor (related to 7c3bbed8) 2024-05-02 01:28:06 -04: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
53898eeb8b implement [PIP] Screeching Scorchbeast 2024-05-01 20:56:07 +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
ebe232cadb implement [PIP] Tato Farmer 2024-05-01 18:51:40 +02:00
Susucre
a60f01a99f implement [PIP] Thrill-Kill Disciple 2024-05-01 18:34:30 +02:00
Susucre
ec34bb53d0 implement [PIP] Young Deathclaws 2024-05-01 15:40:41 +02:00
Susucre
0884d7d4f6 implement [PIP] Raul, Trouble Shooter 2024-05-01 15:27:51 +02:00
Susucre
9d3b86eb2e change text generation in new GainControlAllControlledTargetEffect 2024-05-01 13:10:53 +02:00
theelk801
31c37a4dd3 [M3C] Implement March from Velis Vel 2024-04-30 21:02:05 -04:00
theelk801
32ea5e9cd0 [MH3] Implement Null Elemental Blast 2024-04-30 16:03:45 -04:00
Susucre
95adcf0e9a revert the GameEvent::setSourceId removal
xenodron mentionned that one of the use of setSourceId is to more easily find the Event that use non-standard
sourceId.

So reverting the change made in a previous commit.

It was a non-functional change meant to ease new
BatchEvent sharing sourceId, but I'll use setSourceId
instead there.
2024-04-30 11:51:11 +02:00
Susucre
00556c4cf6 implement [MH3] Emrakul, the World Anew 2024-04-30 11:34:52 +02:00
Susucre
8a07ff30b9 consolidate "Sacrifice all [filter] you control" 2024-04-30 10:59:42 +02:00
Susucre
1b9335c788 consolidate "gain control of all [filter] [target player] controls" 2024-04-30 10:59:38 +02:00
PurpleCrowbar
66f09decfc Add OTP token images 2024-04-28 21:37:40 +01:00
PurpleCrowbar
fd6f2f48df Add BIG token images 2024-04-28 21:29:48 +01:00
PurpleCrowbar
7cbdef627c Add OTJ token images 2024-04-28 21:22:13 +01:00
PurpleCrowbar
371391b2e3 Add OTC token images 2024-04-28 21:09:06 +01:00
Susucre
868cd4d8fd clean all usage of GameEvent::setSourceId 2024-04-28 14:21:43 +02:00
Susucre
d645facdc0
rework PhantomReplacementEffect used by 7 Phantom cards (#12189) 2024-04-27 17:34:59 +02:00
Susucre
36d6547bf8
Modal double-faced cards - fixed game error on usage with some replacement effects (example: Diluvian Primordial, closes #12176) (#12184) 2024-04-25 23:40:57 +04:00
Susucre
1ae48593a8 have separate turn events for extra beginning.
I did check the BEGINNING_PHASE_PRE usage, and found none that wanted to watch the extra beginning phases.

Of note, we may want to have separate 'beginning of turn'/'beginning of game' events, if there is ever a way to skip beginning phases.
2024-04-25 18:58:32 +02:00
Susucre
ff4bd9b430 fix Obeka, Splitter of Seconds' extra phase calling beginning of turn method 2024-04-25 12:16:37 +02:00
xenohedron
9566e23d0b
Rework Mystery Booster and adjust some set classifications (#12138)
Mystery Booster rework:
* added images download support from scryfall (closes #11806);
* added virtual sets support (remix);
* fixed Commander set name (closes #12110);
2024-04-23 09:28:40 +04:00
jimga150
40143c648f
[REX] Implement Ian Malcolm, Chaotician (#12117)
* Start on Ian Malcolm, Chaotician, missing key effects

* fox ANY clause in DrawNthCardTriggeredAbility

* Get exile effect working

* Start using Evelyn, the Covetous code

* align exile effect

* align player clause

* align card type clause

* align counter check clause

* align mana clause

* add ownership clause

* remove redundant comments

* fix redundant mana clause description

* fix counter clause in mana cost effect

* fix active clause in mana effect

* use MageObjectReference to associate exiled cards with an Ian Malcolm instance

* optimize imports

* Start tests, failing currently

* fix test and add blink test

* fix signature of constructor

* fix order of super() call in checkTrigger

* clarify hash maps in watcher

* use correct AsThoughEffect

* document header of checkExile

* generalize modal and double faced cards for LKI fetch

* remove land played event for watcher

* Use custom MageIdentifier to filter usedMap
2024-04-22 23:58:05 -04:00
jimga150
28a1442899
Krark's Thumb - fixed that it can generates too many flip triggers (#12152)
---------

Co-authored-by: Susucre <34709007+Susucre@users.noreply.github.com>
2024-04-22 11:22:42 +04:00
Susucre
c0c05579ba fix client NPE if Radiation trigger in trigger order panel
The frameStyle was unexpectedly null when displaying the trigger in the view to choose trigger panels.
It was good on the stack so I missed that in initial implementation.

Bug showed up once there was another trigger on Beginning of Main Phase, for instance Coalition Relic.
The lack of frameStyle lead to a rendering NPE.
2024-04-21 18:52:46 +02:00
Susucre
dee0637496
fix and test Zirda's Companion legality (#12142) 2024-04-20 11:14:29 +02:00
Susucre
9a21f24f2c [PIP] Implement Glowing One & Ingesting Radroach 2024-04-18 19:28:15 +02:00
xenohedron
fc3551fc0a text improvements 2024-04-17 20:54:05 -04:00
jimga150
b0d7daa85e
[REX] Implement Grim Giganotosaurus (#12103)
* Implement Grim Giganotosaurus

* Refactor MonstrosityAbility to take cost adjuster

* Update Nemesis of Mortals' monstrous ability and add test for cost reduction
2024-04-17 20:24:37 -04:00
Susucre
9d7bf27d38
[PIP] Implement Rad Counters mechanic (#12087) 2024-04-17 20:04:17 +02:00
Susucre
11373fd75d fix Xanathar, Guild Kingpin (#12133)
fix #12133
2024-04-17 19:59:31 +02:00