Commit graph

99 commits

Author SHA1 Message Date
theelk801
d4b8c75619 [TLA] Implement Planetarium of Wan Shi Tong 2025-10-31 12:29:05 -04:00
xenohedron
9a6504c1fa fix some card text 2025-09-13 19:47:29 -04:00
xenohedron
c07837f743 a couple text fixes 2025-06-21 19:18:31 -04:00
xenohedron
519a9e0c49 small text generation improvement 2025-06-14 01:00:42 -04:00
xenohedron
1b8602bd15 improve text generation for intervening if triggers 2025-06-14 00:46:07 -04:00
theelk801
9ef2aac469 [FIN] various text fixes 2025-05-30 22:20:12 -04:00
Evan Kranzler
9e2a1a59e0
[FIC] Implement G'raha Tia, Scion Reborn, rework DoIfCostPaid and "do only once" effects (#13660)
* rework effects with DoIfCostPaid and "do this only once each turn"

* [FIC] Implement G'raha Tia, Scion Reborn

* [FIC] Implement Emet Selch of the Third Seat

* rework Emet-Selch

* add test

* add static methods to handle whether ability was used this turn
2025-05-30 21:28:11 -04:00
Evan Kranzler
8f83a807f5
Remove ConditionalTriggeredAbility and add trigger condition into triggered abilities (#13656)
* remove ConditionalTriggeredAbility

* a few small fixes

* merge fix

* simplify phrase handling

* add documentation

* a few text fixes

* update wording
2025-05-23 07:03:14 -04:00
Oleg Agafonov
0d0661cc92 refactor: added code example for rules auto-replacement in creature's ETB (related to #12791) 2025-02-09 13:51:22 +04:00
Marco Romano
b58fbbdd84
[DSK] Implement Acrobatic Cheerleader and per-game trigger limits (#13232) 2025-01-15 18:28:30 +04:00
Oleg Agafonov
ea0b0915a5 Triggered abilities - fixed that sacrice trigger doesn't work on itself (related to #13089, regression from #13088) 2024-12-14 16:59:20 +04:00
Oleg Agafonov
d49ff89a81 refactor: shared logic for diff implementation of isInUseableZone, improved docs and readability; 2024-11-30 04:23:45 +04:00
Oleg Agafonov
6d55e4b9e6 refactor: fixed dies events support in single cards (part 5); 2024-11-30 04:23:35 +04:00
Oleg Agafonov
740a9347ae refactor: removed some usages of short LKI, moved static ability's useable zone logic to basic ability implementation; 2024-11-30 04:23:23 +04:00
Oleg Agafonov
c3343110f3 refactor: fixed dies events support in single cards (part 2); 2024-11-30 04:23:21 +04:00
Oleg Agafonov
66b338c6fc dies triggers improves:
* tests: added additional tests and verify/runtime checks for wrong die trigger settings;
* refactor: removed some usage of short LKI ;
* fixed dies events support in "or trigger" and "conditional trigger" (use cases like sacrifice cost);
* fixed dies events support in shared triggered abilities (use cases like sacrifice cost);
2024-11-30 04:23:21 +04:00
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