Commit graph

13110 commits

Author SHA1 Message Date
Alex Vasile
6b5d4abb69
Add documentation to Cards and CardsImpl (#9019)
* Added minor documentation and TODO questions

* Fixed typo

* Address one set of comments

* merge fix

* remove commented code

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-07-02 18:20:28 -04:00
Susucre
496faaf5cb
[LTR] Implement The Balrog, Durin's Bane (#10515)
* [LTR] Implement The Balrog, Durin's Bane

I could use someone more experienced for this card:
Should the watcher `PermanentsSacrificedWatcher` be initialized locally in the card's class, or is a global initializing in GameImpl.java alright? I went for the latter for now, as my base for implementing the static cost reduction was Blood for the Blood God!

* apply review

* no longer instantiate watcher on every game.
2023-07-01 12:53:31 -04:00
xenohedron
f2378a5b3d
Fix Sky Swallower (#10542)
* Static filter for another controlled permanent

* Fix Sky Swallower
2023-06-29 23:38:59 -04:00
Oleg Agafonov
4c59551cf0 number of triggers event - fixed game error with state based triggers (NPE in cards like Veyran, Voice of Duality); 2023-06-30 07:15:21 +04:00
Oleg Agafonov
6529ead72f refactor: simplified extra turn code, fixed NPE error on usage (Alchemist's Gambit) 2023-06-30 06:39:01 +04:00
rullinoiz
6caa46f9d5
[LTC] Implement Moria Scavenger, Saruman The White Hand, Wake The Dragon (#10537)
* Implement Moria Scavenger, Saruman The White Hand, Wake The Dragon

* Remove Ward Hint

* Create Dragon Token Class

* StaticFilters.FILTER_SPELL_A_NON_CREATURE

* Rename TokenTriggeredAbility
2023-06-29 22:04:46 -04:00
Susucre
06cce0ce22
[LTR] Implement Mordor Trebuchet (#10496)
Along with its unique token Ballistic Boulder.
2023-06-29 22:02:55 -04:00
PurpleCrowbar
6e2b35e6a3 Fix shroud denying ninjutsu 2023-06-30 01:39:58 +01:00
Susucre
c92ad45e56
[LTR] Implement Stone of Erech (#10497)
* [LTR] Implement Stone of Erech

Grouped together two other recent cards for that exact same replacement effect.

* refactor some more

This does extend the ReplacementEffect "If ... would die, exile it instead", using a `PermanentFilter`. [[Void Maw]] and [[Lorcan, Warlock Collector]] have thus be refactored to use that instead of a custom replacement effect.

Added a static filter `StaticFilters.FILTER_ANOTHER_CREATURE` for Void Maw that is filtering "another creature".
Found and refactored cards that were declaring that exact filter locally
* [[Flame-Kin War Scout]]
* [[Herd Gnarr]]
* [[Mogg Bombers]]
* [[Timid Drake]]

* fix void maw

* reverse changes on VoidMaw

Void Maw was a linked ability, so not exactly the same replacement effect that was refactored.
2023-06-29 09:17:34 -04:00
Susucre
311bf2e22e
fix #10530 (Unsettled Mariner + Field of Ruin) (#10531)
* fix Unsettled Mariner + Field of Ruin

There was something weird with zcc on TargetOfOpponentsSpellOrAbilityTriggeredAbility
setting the target to the stack object for its triggered effect.

I do not entirely comprehend how FixedTarget works, in particular regarding zcc of stack objects.
However all configurations of the trigger seem to work with the uninitialized FixedTarget constructor,
instead of the one initialized with a game's zcc.

* slight refactor of TargetOfOpponentsSpellOrAbilityTriggeredAbility
2023-06-29 09:16:46 -04:00
ssk97
918a8931e6
Implement [40K] Squad ability (#10509)
* First try at Squad Mechanic

* Fully functional now, removed cards from unfinished list in 40k

* Improved implementation, removing the generic conditional
and replacing it with a separated ETB trigger and effect.

* Add tests from Susucre (using Strionic Resonator for now, two others currently failing)

* Update comments on tests

Closes #9774 

------
Co-authored by: Susucre <34709007+susucre@users.noreply.github.com>
2023-06-26 20:47:26 -04:00
xenohedron
231ab77bcd
New common class CopyTargetStackAbilityEffect (#10525)
- Fix superfluous null check in Lithoform Engine
- Remove hardcoding of controlled abilities in TargetTriggeredAbility (used only in Strionic Resonator)
- EnchantmentSourcePredicate analogous to ArtifactSourcePredicate
2023-06-25 22:20:41 -04:00
xenohedron
5722ae27f6 fix text: Silverskin Armor 2023-06-25 15:15:41 -04:00
xenohedron
ec4c2e2170
Cleanup: GainAbilityControlledSpellsEffect (#10446)
* Hide reminder text on Zhulodok

* Use logic from GainAbilitySpellsEffect, fix so that CastFromZonePredicate works

* Text adjustments

* Show cascade ability in hand for Abaddon the Despoiler

* Remove redundant class

* Simplify Cast Through Time

* Don't add additional instances of redundant abilities

* Remove redundant check

* Add option to ignore mana validation when checking playable objects

* Fix null errors

* Fix GainAbilityControlledSpellsEffect to apply ability to playable cards rather than owned cards

* Add unit test

* Revert bad workaround code

This reverts commit 17f5be6a79.
This reverts commit 7ebd2f1815.
This reverts commit 00969d1fe7.

* Remove ownership check on exiled cards

* Another test (currently failing)

* ignore test

* fix test: strict choose mode
2023-06-24 01:15:58 -04:00
who?!
3896c28572
[LTR] Implement Dawn of a New Age (#10492) 2023-06-23 20:13:50 -04:00
xenohedron
7e15ca92c5 simplify implementation and remove redundant class 2023-06-23 20:11:37 -04:00
xenohedron
23a6185f70 Remove unused effect class 2023-06-23 20:11:04 -04:00
xenohedron
380fea6720 fix some return from exile zone 2023-06-23 01:19:17 -04:00
PurpleCrowbar
63be7589ae Add MUL token images 2023-06-23 02:06:56 +01:00
Susucre
0255761d67
[LTR] Implement The Grey Havens (#10493) 2023-06-22 20:06:10 -04:00
Susucre
a75ec34a45
[LTR] Implement Orcish Bowmasters (#10450)
Refactored [[Xyris, the Writhing Storm]] since the trigger is partly the same.
2023-06-22 20:05:08 -04:00
Susucre
09e0cba992
[LTR] Fix Smaug Token producing food tokens instead of treasures (#10513) 2023-06-22 13:20:45 -04:00
PurpleCrowbar
f85dd656f2 Fix hint text for Tom Bombadil 2023-06-22 00:03:11 +01:00
PurpleCrowbar
e795726efe Revert capitalisation of counter name in CountersOnPermanentsHint 2023-06-21 23:45:54 +01:00
PurpleCrowbar
a3d20bd099 Remove unused imports from CountersOnPermanentsHint 2023-06-21 23:29:03 +01:00
PurpleCrowbar
a9c28c420f Fix Tom Bombadil text 2023-06-21 23:26:00 +01:00
theelk801
2e9eb7fb33 [LTC] Implement Trap the Trespassers 2023-06-19 19:15:48 -04:00
theelk801
3404a34b2d [LTC] Implement Cirdan, the Shipwright 2023-06-19 18:58:28 -04:00
theelk801
fd37be92fe [LTC] Implement Prize Pig 2023-06-19 16:37:33 -04:00
theelk801
1be43ef6ff [UGL] remove "Elves" subtype from Elvish Impersonators 2023-06-19 16:32:21 -04:00
theelk801
87fc0ec9e9 [LTC] Implement Erestor of the Council 2023-06-19 09:04:14 -04:00
theelk801
0bf70260b8 [LTC] Implement Bilbo, Birthday Celebrant 2023-06-19 08:17:29 -04:00
Susucre
720b2fe163
[LTC] Implement Oarth Of Eorl (#10469)
Added one constructor for SagaAbility, accepting multiple effects and a target.
2023-06-18 22:38:18 -04:00
xenohedron
2e018b2c14 Change messages from popup window to gamelog by default for continuous rule modifying effects 2023-06-18 14:51:06 -04:00
theelk801
f38251c809 [LTR] Implement Palantir of Orthanc 2023-06-18 12:34:38 -04:00
theelk801
62a92d6d1c small change to amass effect 2023-06-18 10:30:11 -04:00
Oleg Agafonov
38be371c25 tests: real fix of Auratouched Mage - miss draw card effect (#9462) 2023-06-18 16:50:51 +04:00
Oleg Agafonov
94dfbdfed4 gui: fixed miss playable mark for emblems and other objects from command zone (example: momir emblem) 2023-06-17 17:32:02 +04:00
Oleg Agafonov
afe89a1056 momir game: fixed game error on start, added momir emblem image 2023-06-17 09:29:47 +04:00
xenohedron
045bbbf04f
Fix ReturnToHandAttachedEffect with MDFCs (#10452)
* Add tests for ReturnToHandAttachedEffect

* Temporary fix for returning attached MDFC to hand
2023-06-16 22:43:34 -04:00
xenohedron
a6c19c4335 Fix #10237. Fix #10315. (MageObjectReference discrepancy) 2023-06-16 22:34:09 -04:00
xenohedron
0ce6df9ef7
Improvements to effects that use ADD_COUNTERS GameEvent (#10474)
* Fix Blightbeetle

* Another adjustment to Laezel

* Fix Vizier of Remedies

* Make extra counters overflow safe

* Inline variable instead of field (Doubling Season)
2023-06-16 02:24:32 -04:00
Oleg Agafonov
f0da749e0a refactor: improved some error messages/tests 2023-06-16 07:32:21 +04:00
theelk801
01e0780f85 [LTR] Implement Gimli, Mournful Avenger 2023-06-15 09:30:51 -04:00
theelk801
38b7f9e5f5 [LTR] Implement Denethor, Ruling Steward 2023-06-15 09:02:51 -04:00
theelk801
f7baa2a338 [LTR] Implement Gandalf's Sanction 2023-06-14 22:01:10 -04:00
theelk801
018a815eb1 [LTR] Implement Aragorn, Company Leader 2023-06-14 22:00:17 -04:00
PurpleCrowbar
04f1327816 Remove some invalid sets from tokens-database.txt 2023-06-15 02:37:21 +01:00
Oleg Agafonov
d91147f01a decks: improved deck import to support unicode card names from LTR, UGL and other sets, added verify tests for name converters (closes #10465) 2023-06-14 03:21:16 +04:00
Oleg Agafonov
c351a4e8e9 refactor: removed direct counter names usage (part 2) 2023-06-12 16:01:18 +04:00