Commit graph

850 commits

Author SHA1 Message Date
xenohedron
b78956d286
text errata updates: various "enters the battlefield" -> "enters" (#12626)
* enters the battlefield, -> enters,

* {this} enters the battlefield -> {this} enters

* EntersBattlefieldAbility

* , it enters

* enters the battlefield under your control -> you control enters

* rework some trigger phrase logic

* fix tests
2024-08-02 18:43:59 -04:00
Susucre
a76ef60820 align to new enters wording changed upstream 2024-07-30 15:54:26 +02:00
Susucre
c0eab28626
implement [MH3] Primal Prayers ; use choice panel for cast mode choice ; allow some restricted "as thought as it had flash" to work only on matching alternative cast. (#12420) 2024-07-30 15:47:39 +02:00
jimga150
c73cfebcd9
Fix EntersBattlefieldOneOrMoreTriggeredAbility (#12592)
* Apply fix for ZONE_CHANGE_GROUP events making tokens controlled by different players

* Add test

* Remove unused import

* Fix implementation

* Rewrite to use ZONE_CHANGE_BATCH

* Fix OPPONENT case

* Add default case

* refactor to avoid using stream as local variable and use ZoneChangeEvents in filters

* Fix typo
2024-07-30 00:39:01 -04:00
Oleg Agafonov
2bf6e3e3a2 GUI: added mana and other symbols support in choose spell dialog (closes #12155) 2024-07-27 10:17:22 +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
theelk801
0f33ac298c [BLB] Implement Wax-Wane Witness 2024-07-19 17:45:22 -04:00
ssk97
96b08ee6bf
Fix effects where the source's controller sacrifices it (#12583)
* Fix effects where the source's controller sacrifices it. Added test. Fixes #12582

* Update Evoke rules text
2024-07-18 00:28:50 -04:00
Susucre
c36b3959a8 implement and test ExpendTriggeredAbility 2024-07-11 17:57:16 +02:00
theelk801
7c54362e9d [BLB] Implement Wandertale Mentor 2024-07-11 10:04:23 -04:00
Evan Kranzler
43e95fd0cf
[BLB] Implement forage mechanic (#12569)
* [BLB] Implement Corpseberry Cultivator

* [BLB] Implement Thornvault Forager

* fix verify failure
2024-07-10 22:57:22 -04:00
xenohedron
219eac2087 text fixes 2024-07-09 23:40:48 -04:00
xenohedron
03e90f9f5b adjust ValiantTriggeredAbility 2024-07-09 22:44:47 -04:00
theelk801
6a323a467c [BLB] Implement Seedglaive Mentor 2024-07-09 16:36:01 -04:00
theelk801
1d9cc2a87f [DSK] Implement Chainsaw 2024-07-06 14:56:15 -04:00
Susucre
9bc1289341 implement [ACR] Senu, Keen-Eyed Protector ; small refactor on AttacksAndIsNotBlockedTriggeredAbility's setTargetPointer 2024-07-06 18:29:53 +02:00
ssk97
7cb669603f
[WHO] Time Reaper, Add target adjuster for "that player controls/owns" damage trigger targets (#12528)
* Implement Time Reaper, start rework

* Create DamagedPlayerControlsTargetAdjuster, convert Aberrant to use it

* Always add targets for EachOpponentPermanentTargetsAdjuster

* Improve target name, finish Time Reaper

* Convert some cards

* Improve documentation, more cards

* More cards, fix cards that needed to use owner instead of controller

* Fix unfinished AlelaCunningConqueror changes

* more cards

* All remaining cards

* Fix target type

* Remove outdated attempt at TargetController.SOURCE_EFFECT_TARGET_POINTER

* Finish removal of SOURCE_EFFECT_TARGET_POINTER

* Change targetAdjuster blueprint target to be set inside setTargetAdjuster, add error checking

* Always add Target Adjuster after Target

* Add comment

* Fix TolarianContemptTest to skip opponent with no valid targets

* Forgot to git add the new abstract GenericTargetAdjuster

* Test now possible after merge, fix missed ChangeOfPlans adjuster order

* Text and optional-ness fixes

* Always set target pointer
2024-07-02 08:46:14 +04:00
Susucre
b59f8e889d implement [BLB] Carrot Cake 2024-06-29 17:03:33 +02:00
ssk97
0e84fd02a0
[MKM] implement remaining 4 Cloak cards (#12509)
* EtrataDeadlyFugitive

* refactor: remove need for Zone.BATTLEFIELD for DealsDamageToAPlayerAllTriggeredAbility with opponent restriction

* ExposeTheCulprit

* HideInPlainSight

* VannifarEvolvedEnigma

* Fix for not turning manifested non-permanents face-up, per 701.34g

* Add comment on Etrata's unusual behavior
2024-06-25 22:55:58 -04:00
xenohedron
f08d5acb30 implement [VIS] Pygmy Hippo 2024-06-15 13:57:55 -04:00
xenohedron
d61de05eb8
refactor: simpler processAction syntax (#12458)
* game.processAction() instead of game.getState().processAction(game)

* add simpler method name and docs

* find/replace to new method

* remove old method

* deprecate applyEffects
2024-06-11 22:55:43 -04:00
xenohedron
a5488228b8
fix usable zone logic for abilities that function from other zones (#12446)
* remove superfluous constructor params

* fix Syrix, Carrier of the Flame

* standardize Zone = Battlefield

* rename class

* remove redundant class

* add docs

* adjustment
2024-06-09 22:15:04 -04:00
xenohedron
0d4acf26e5 refactor: improve method name - checkShortLivingLKI 2024-06-09 22:13:33 -04:00
Susucre
40a1fc6c23 cleanup and add tests on '{this} enters the battlefield tapped unless [Condition]'
Almost a refactor. The only change is that all those cards were missing the notTarget argument in TapSourceEffect.

closes  #12411
2024-06-08 19:35:35 +02:00
Susucre
3e18b58cac
implement [MH3] Arena of Glory and usage of ManaSpentDelayedTriggeredAbility (#12404) 2024-06-07 18:34:45 +02:00
Susucre
24e73df510 implement [MH3] Thief of Existence 2024-06-07 00:19:37 +02:00
Susucre
98f910a892 implement [MH3] Shadow of the Second Sun 2024-06-06 00:14:06 +02:00
Susucre
24b184c28f refactor SavedGainedLifeValue instead of getValue("gainedLife") 2024-06-04 11:19:14 +02:00
xenohedron
d5f2c1849d update other cards to use common class
resolves ##11809
2024-06-02 23:02:58 -04:00
xenohedron
21f1aa559b common class for "whenever ... deals damage to you, " 2024-06-02 21:28:14 -04:00
xenohedron
af89fd80ee even more text fixes/updates 2024-06-01 16:32:11 -04:00
xenohedron
d067110632 text update "when you next cast..." 2024-06-01 15:26:40 -04:00
grimreap124
f36a40716d
implement [MH3] Vexing Bauble (#12344) 2024-06-01 16:17:50 +02:00
Susucre
6f4fbeffe3
fix short living lki bug for Chromatic Star (#12331) 2024-05-30 21:07:48 +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
xenohedron
69e9f3de8a fix casting from opponent's graveyard 2024-05-27 17:23:35 -04:00
xenohedron
88b6f4036f text fixes 2024-05-21 01:12:57 -04:00
Susucre
6cc3c5384a fix UntilYourNextTurnDelayedTriggeredAbility
was wrongly limited to triggering once.
2024-05-17 12:22:19 +02:00
Oleg Agafonov
6e4e52373b refactor: use same naming as original classes (related #12233) 2024-05-17 09:26:38 +04:00
Susucre
3abce2f5c8
support until your next turn delayed triggers (#12233) 2024-05-16 13:37:53 +02:00
Susucre
d8959f1588
fix [OTJ] Fortune, Loyal Steed — DelayedAbility's zcc was wrong when started from another trigger (#12154) 2024-05-04 19:26:11 +02:00
xenohedron
fa728eafb1
refactor: Cleanup CopyTargetStackObjectEffect (#12220)
* simplify constructors

* rename class

* adjust to accommodate any stack object

* adjust all usages to main common class
2024-05-04 00:47:16 -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
172a2e53b3 implement [PIP] Duchess, Wayward Tavernkeep 2024-05-02 17:41:30 +02:00
Susucre
f24b3d988d clean MILLED_EVENT to not store Card directly. 2024-05-02 10:18:36 +02:00
xenohedron
f482eef06a text fixes 2024-05-02 01:24:22 -04: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
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
Susucre
9a21f24f2c [PIP] Implement Glowing One & Ingesting Radroach 2024-04-18 19:28:15 +02:00
Susucre
c77634c843
separate 'you may play'|'you may cast' AsThoughtEffect approuvers
Also, reworked Gonti, Lord of Luxury and checks it now works properly with Zoetic Cavern.
2024-04-13 12:10:53 +02:00