Commit graph

83 commits

Author SHA1 Message Date
xenohedron
5b0eba7068
refactor: end step triggered abilities (#13047)
* simplify BeginningOfEndStepTriggeredAbility

* more simplifications

* move to common class

* find and replace to common class

* simplify again

* align parameter order

* package reorg

* simplify BeginningOfCombatTriggeredAbility constructors

* simplify BeginningOfFirstMainTriggeredAbility constructors

* text fixes

* update docs
2024-10-28 01:49:11 -04:00
xenohedron
8a8773971d
refactor: add new simpler technique for intervening if conditions on triggered abilities (#13037)
too many usages to fix all at once, plus condition text needs updating, but this will give a cleaner option for new implementations
2024-10-27 00:19:57 -04:00
paasar
06f630b00a
implement [DSK] Irreverent Gremlin (#13003)
* Add Irreverent Gremlin (DSK)

* Fix formatting

* Add Menace ability comment

* Fix Irreverent Gremlin's card draw trigger

* fix optional setting

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2024-10-18 23:04:46 -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
xenohedron
aeaeccb63b
Fix bugs with dies triggers due to short living LKI reset (#12438)
* replace applyEffects() with processAction() for card usages

* update Goblin Welder and test

* add test for Historian's Wisdom

* enable other related tests

* only reset short living LKI for process action, not all apply effects

* update docs

* remove applyEffects from condition in Historian's Wisdom

* add another test case
2024-06-09 18:56:19 -04:00
Susucre
50bf3b5d95
implement [MH3] Nadu, Winged Wisdom ; extend "triggers only once each turn" for any other limit (#12302) 2024-05-27 20:41:20 +02: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
xenohedron
f3fccfbd8a refactor: use setter method and private field 2024-04-12 20:11:04 -04:00
xenohedron
577a3708fc adjust some text, cleanup some variable access 2024-04-12 20:08:26 -04:00
Alexander Novotny
8271686cb4
[PIP] Implement Shaun, Father of Synths (#12109)
* Added method to set triggered abilities to optional

* TokenCopy effect now copies permanentModifier

* Implemented Shaun, Father of Synths

* remove TODO

* Made `setOptional` chainable
2024-04-12 19:41:58 -04:00
xenohedron
a768a4dd8a cleanup access to fields in AbilityImpl
where trivially possible, make private and use getters
2024-03-29 01:53:03 -04:00
Matthew Wilson
f8d15cd6ba
[MKM] Implement Cases (#11713)
* Implementing "case" mechanic

* [MKM] Implement Case of the Burning Masks

* [MKM] Implement Case of the Filched Falcon

* [MKM] Implement Case of the Crimson Pulse

* [MKM] Implement Case of the Locked Hothouse

* Address PR comments

* some minor adjustments

* adjustments to hints

---------

Co-authored-by: Matthew Wilson <matthew_w@vaadin.com>
Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2024-01-28 23:41:23 -05:00
xenohedron
4959ef4d49
another batch of text cleanup (#11694)
* minor refactor EntersBattlefieldEffect

* more minor refactoring

* text fix

* fix more text

* more text adjustments

* more text discrepancy fixes

* continue the text fixes

* followup fixes and more fixes
2024-01-20 23:13:03 -05:00
xenohedron
73394485cf remove unneeded case (related to #11326) 2023-12-04 19:33:26 -05:00
xenohedron
81f97c3b0e fix more text 2023-11-25 02:59:06 -05:00
xenohedron
109547a1ad lots of text fixes 2023-11-23 01:54:51 -05:00
xenohedron
1816c8ad73 many the text fixes 2023-11-19 21:37:37 -05:00
xenohedron
e122e9d512 various and sundry text fixes 2023-11-04 18:41:56 -04:00
xenohedron
daecbe2071 fix #11385 - triggers once per turn
even if another effect would cause additional triggers
2023-11-03 20:52:36 -04:00
xenohedron
ebf71941a9
cleanup EntersBattlefieldAllTriggeredAbility and subclasses (#11372)
* comment out rule override to use generated text instead

* new ETB Opponent trigger class

* text improvements

* update ETB cast trigger

* remove controlledtext parameter

* more text improvements

* more fixes

* lots of other fixes

* most of the remaining fixes

* fix halana text

* fix smoke shroud text

* improve text gen

* remove rule param from constructors

* minor adjustments

* whenever a player puts

* final fixes

* standardize when/whenever phrase generation
2023-10-31 21:00:45 -04:00
Susucre
5996cfbce2
[MIR] Implement Teferi's Imp (#11326) 2023-10-22 14:34:45 +02:00
xenohedron
b3bc6b94aa improve text generation 2023-10-15 23:43:10 -04:00
xenohedron
bd7ae640c5 fix some effects to use DoIfCostPaid 2023-10-09 23:52:57 -04:00
xenohedron
4e561b6254
text generation improvements (#11203)
* update ETB trigger effect text gen

* set replace for common abilities

* fix remaining

* rename method, cleanup

* more fixes, better logic
2023-09-25 21:51:51 -04:00
Oleg Agafonov
be4bff6097 game: fixed wrong usage of batch events (related to #10870) 2023-09-13 04:42:46 +04:00
PurpleCrowbar
692c55e3e1
Do this only once each turn - fixed wrong triggers after optional usage (example: Ondu Spiritdancer, see #11106) (#11107)
* Fix Ondu Spiritdancer. Closes #11106
* Add tests for "Do this only once each turn"
* Add test for Ondu Spiritdancer
2023-09-06 22:12:03 +04:00
xenohedron
1903f90b3a better text generation, a couple more individual fixes 2023-08-30 23:25:10 -04:00
xenohedron
fa72e243e9
Text generation improvements for triggered abilities (#10638) 2023-07-17 20:03:01 -04:00
xenohedron
a7f78e8190
Clean up triggered ability text generation (#10627)
* move "or battle" to its own class

* move "or planeswalker" to its own class

* remove strange way of setting custom text

* finally remove getTriggerPhrase

* copy constructor visibility

* fix Vraska
2023-07-15 16:49:40 -04:00
Susucre
2188c690c6
[LTR] Implement Eomer, Marshal of Rohan (#10617)
Also, small refactor adding EachTurn to the name of both `setTriggersOnce` and `setDoOnlyOnce`.
2023-07-14 21:32:00 -04:00
xenohedron
72ebe2b1f1 minor code cleanup triggered abilities 2023-07-14 20:30:09 -04:00
xenohedron
5c8b5f23bb
Fix text [CHK] [BOK] [SOK] (#10355)
* Fix text: duplicate ("you control") in Champion ability

* New static filter "artifacts and enchantments"

* Text fixes [CHK] [BOK] [SOK]

* Fix Genju text without breaking the effect this time
2023-06-02 12:33:48 +03:00
xenohedron
7b9243f640
Add string rule logic to TriggeredAbilityImpl (#10370)
* Add string rule logic to TriggeredAbilityImpl

* Fix string logic in TriggeredAbilityImpl

* Revert adjustment that fixes some problems but causes others
2023-06-02 11:31:15 +03:00
xenohedron
35bb7d513b
Another batch of text fixes (#10317)
* Fix text: Blind Hunter

* Fix text: cards with bloodrush ability

* Fix text: populate ability

* Fix Goblin Pyromancer to boost all

* Fix text: Wellwisher; Kamahl, Fist of Krosa; Snapping Thragg

* Fix text: "you may prevent"

* Fix text: Elvish Guidance, Elvish Pathcutter

* Fix text: [search library for cards named]
2023-05-07 13:30:55 -04:00
theelk801
ff115cad48 [ONE] various text fixes 2023-04-24 22:26:34 -04:00
Oleg Agafonov
409f4eb36c
Merge pull request #9814 from Merlingilb/add-set-expansion-star-wars-rise-of-skywalker
Added set expansion star wars "rise of skywalker"
2023-03-04 16:48:38 +04:00
PurpleCrowbar
2b77d53f81 Fix doOnlyOnce clause on triggered abilities 2023-03-01 10:06:43 +00:00
Daniel Eberhard
cfad8d5078 Added card "Allegiant General Pryde" and its abilities and effects 2022-12-14 05:29:43 +01:00
Alex W. Jackson
ff777c5687 [STX] Simplify Strict Proctor trigger check 2022-11-05 04:49:15 -04:00
Alex Vasile
ebdb6b53a4
Replace Overriden getTriggerPhrase() with setTriggerPhrase() usage (#9343) 2022-08-08 23:28:46 -04:00
Alex Vasile
015cdf3136
Revert "Added missing fields to many copy constructors. (#8957)" (#8999)
This reverts commit 82708e4273.

Some of these (AI related result in bloated memory usage, needs more investigation).
2022-05-25 12:57:24 -06:00
Alex Vasile
82708e4273
Added missing fields to many copy constructors. (#8957) 2022-05-25 09:51:18 -06:00
Evan Kranzler
0b50f15923 [SNC] Implemented Riveteers Ascendancy 2022-04-22 09:17:09 -04:00
Evan Kranzler
80e11b2052
(WIP) Replacing blocking/blocked by predicates (#8729)
* replaced blocking/blocked by predicates

* added test for knight of dusk (currently fails)

* added source parameter to filters and everything else that needs it

* some changes to various predicates

* test fix

* small changes to filter code

* merge fix

* fixed a test failure

* small change to Karn, Scion of Urza

* removed sourceId from filter methods and other similar places

* added new getobject method to fix some test failures

* a few more fixes

* fixed merge conflicts

* merge fix
2022-03-23 18:45:02 -04:00
Evan Kranzler
caa1b7a8d7 [ZEN] various text fixes 2022-03-08 20:59:01 -05:00
Evan Kranzler
c8cdc0a502 [CON] various text fixes 2022-03-06 18:07:25 -05:00
Oleg Agafonov
83017e3c51 Devs: added docs and todo about short living LKI, LKI and current problems; 2021-09-05 18:49:44 +04:00
Evan Kranzler
bbcccf4b58 [AFC] Implemented Galea, Kindler of Hope 2021-08-27 09:08:20 -04:00
Evan Kranzler
b1bbe96536 fixed an error 2021-08-21 17:13:03 -04:00