Commit graph

41910 commits

Author SHA1 Message Date
xenohedron
86acc55243 fix Bloodfeather Phoenix 2023-07-07 23:10:11 -04:00
xenohedron
08c32682ac fix Nahiri's Resolve 2023-07-07 22:48:40 -04:00
xenohedron
03c45500b7 more static filter cleanup 2023-07-07 22:45:07 -04:00
xenohedron
7e2f16120f fix Undercity Upheaval 2023-07-07 22:30:45 -04:00
xenohedron
3a20385d1d fix Feast of the Victorious Dead 2023-07-07 22:27:49 -04:00
ssk97
a3ee34d796
Enable ignored tests that work (#10579)
* Enable ignored tests that work

* Remove Ignore import, fix tests without @Test attribute
2023-07-07 01:26:41 -04:00
ssk97
e1edec542c
Lazotep Convert fix (#10578)
* Fix Lazotep Convert card (add color, need to actually apply the applier)

* Don't copy Transformed status, add test
2023-07-07 01:26:27 -04:00
xenohedron
063429b70a
New StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL (#10577) 2023-07-07 01:26:11 -04:00
xenohedron
e50f8b05c1
[LTR] [LTC] Text fixes (#10569) 2023-07-06 00:24:12 -04:00
xenohedron
1ccaf06366
Refactor flicker effects to single common class (#10564)
* New common class for flicker target effects

* Update cards to ExileThenReturnTargetEffect

* process game state before returning exiled card
2023-07-05 19:23:08 -04:00
rullinoiz
55f877c71e
Implement Relic of Sauron (#10567) 2023-07-05 19:22:39 -04:00
Bobby McCann
c8564efbb7
[LTR] Implement Witch-king of Angmar (#10563)
* Add card

* Add TapSourceEffect

* De-duplicate watcher logic

* Abstract and fix(?) logic

* Fix sacrifice targets

* Controller instead of Owner

* Add tests, fix, and refactor

* Throw if controller not supported

* Fix test (not supposed to start tapped)
2023-07-05 19:22:21 -04:00
Susucre
008662be5e
[LTR] Implement Shelob, Child of Ungoliant (#10558)
* [LTR] Implement Shelob, Child of Ungoliant

This is almost working.

I could not figure out why, but tokens made with the trigger still have subtypes, even though it has only artifact as its type.

* fix subtype of the token copy not being cleaned.

fixed Myrkul, Lord of Bones that had the same issue.
removed game argument from CreateTokenCopyTargetEffect's PermanentModifier. It was only used by Myrkul, and with no effect.
2023-07-05 19:21:52 -04:00
Oleg Agafonov
476fd27f65 fixed miss chosen targets clear in cost implementations (#10566) 2023-07-05 23:11:24 +04:00
PurpleCrowbar
9cd6c6f269 Fix Wilhelt, the Rotcleaver triggering off of its own death 2023-07-05 20:04:53 +01:00
Oleg Agafonov
f26b1470fa game: fixed miss state triggers check in multi-steps abilities/effects (#10564) 2023-07-05 09:52:38 +04:00
Kyle W. Cartmell
b66189d3da
GUI: resized avatar scroll pane so all avatars are visible (#10300) 2023-07-05 08:31:04 +04:00
xenohedron
71a6ee232b minor cleanup 2023-07-05 00:14:36 -04:00
xenohedron
22ce9489a8 cleanup Fleeting Spirit 2023-07-04 22:37:32 -04:00
Susucre
b8eb58edbe
[LTR] Implement Shadow of the Enemy (#10556)
There is room to refactor some of the cards that allow casting from an exile zone (for instance Gonti, Lord of Luxury, Dead Man's Chest or Thief of Sanity), but that felt complex enough I did not want to risk it.
Each one bring some additional complexity to the effect.

Tested that Dryad Arbor can not be cast from the exiled zone, did not attempt morphed Zoetic Cavern.
2023-07-04 20:39:20 -04:00
xenohedron
4d6644d095
Cleanup: ExileUntilSourceLeavesEffect (#10527)
* Refactor OnLeaveReturnExiledAbility
to accommodate hand zone as well as battlefield
* Cleanup Brain Maggot and Kitesail Freebooter
* Refactor to include delayed trigger with main effect
* minor cleanup
* merge fix
* further adjustments
* Cleanup Valki, God of Lies
* fix test choices
2023-07-04 20:38:59 -04:00
xenohedron
d629776b54 don't card fetch on PRs since it fails 2023-07-04 18:15:10 -04:00
xenohedron
6f7bcca734 Fix Mishra's Domination 2023-07-04 18:07:56 -04:00
xenohedron
a287582026 fix Vanish Into Eternity 2023-07-04 17:52:42 -04:00
xenohedron
b8f8e86b8d new StaticFilters.FILTER_SPELL_AN_ARTIFACT 2023-07-04 17:40:24 -04:00
xenohedron
bfd22322eb "Flag" instead of "Country" in tooltip 2023-07-04 17:26:11 -04:00
Susucre
652358a481
Fix #10561 Misery's Shadow (and 3 other cards) replacement effects (#10562)
Did not test the final code for Stone of Erech, when a filter was added to the ReplacementEffect :(

Added an unit test, just to be safer this time around.
2023-07-04 11:47:22 -04:00
Alexander Novotny
47456bf9c4
Fixed issue with UntapTargetCost (#10559)
* Fixed issue with UntapTargetCost

The target was allowed to actually target, so things like Halo Fountain wouldn't work on creatures with shroud.

UntapTargetCost also keeps track of the permanents which were untapped, in case those are needed.

Changed Benthic Explorers to use new UntapTargetCost

* Fixed potential bug with Benthic Explorers
2023-07-03 23:42:19 -04:00
Alexander Novotny
f5b4c7b251
Fix [LTC] Aragorn, King of Gondor (#10560) 2023-07-03 23:42:03 -04:00
Susucre
ca8dc7e23b
[LTR] Implement Ugluk of the White Hand (#10555) 2023-07-03 23:41:28 -04:00
Susucre
87b20b53b9
[LTR] Implement Voracious Fell Beast (#10554) 2023-07-03 23:41:14 -04:00
Alexander Novotny
fb8424556e
Player auto-choose respects required targets (#10557)
* Player auto-choose respects required targets
2023-07-04 07:02:46 +04:00
Alexander Novotny
fae63d9d4b
Add additional ability icons (#10549)
* Slightly revamped basic card icons

All icon classes which were just static text have been removed, and instead replaced with a static instance.

A new icon for reach has been added

Some icons have been reused for new abilities (hexproof for shroud and ward, infect for toxic)

When a card would have two icons of the same type, the icons are instead combines into one with a combined hover tooltip.

* Fixed missing capitalization on ward, hexproof
2023-07-04 01:22:07 +04:00
xenohedron
9e63858db6 update flag for Libya 2023-07-02 23:16:01 -04:00
xenohedron
41f1104313 Fix flags for Angola; Antarctica
(fix #10511)
2023-07-02 21:51:37 -04:00
xenohedron
19adf52236 List pride flags together below country flags 2023-07-02 21:32:09 -04:00
xenohedron
7d0c78b7a0 fix flag images (courtesy of T-a-n-d-E-m) 2023-07-02 21:32:09 -04:00
Tiago Gil
6a20840f4e
[LTR] Implement Barrow-Blade (#10539)
* [LTR] Implement Barrow-Blade

* Took ideas from Wooden Stake, Humble and Shadowspear
* Play tested effects

* Simpler constructor for equip

* Revamped BlocksOrBlockedAttachedTriggeredAbility

* New logic in `BlocksOrBlockedAttachedTriggeredAbility`
* Changed `Ferocity` and `Gift Of The Woods`
* Removed custom class from `Barrow Blade`

* New class, revert changes in cards

* Added the new class `BlocksOrBlockedByCreatureAttachedTriggeredAbility()`
* Reverted changes to `BlocksOrBlockedAttachedTriggeredAbility()` but including `AttachmentType` in constructor
* Reverted changes to `Ferocity` and `GiftOfTheWoods`
* Changed `Barrow-Blade` to use `BlocksOrBlockedByCreatureAttachedTriggeredAbility()`
* Added a few comments
* Tried optimizing the IF statements in the new class but whenever I tried some condition would stop working, accepting suggestions

* Null check added

* Added a null check for game.getPermanent(sourceId)
* Changed checks to the top to avoid unnecessary processing when encountering any null variable
* Removed unnecessary import
2023-07-02 18:21:17 -04:00
Susucre
1f0189a098
fix [LTR] Orcish Bowmasters (#10547)
The "except the first one they draw in each of their draw steps" part of the trigger was not properly checked, and cards drawn on your end step was never triggering an opposing Orcish Bowmasters.

`OpponentDrawCardExceptFirstCardDrawStepTriggeredAbility` is a triggered ability that initializes a watcher `CardsDrawnDuringDrawStepWatcher`.
However `OrTriggeredAbility` was not exposing its sub triggers' watchers to the game engine.
I am not sure the global fix to `OrTriggeredAbility` is better than a `triggeredAbility.addWatcher(...)` in OrcishBowmaster.java.

Also, the trigger text was not set at the proper level.
2023-07-02 18:21:00 -04:00
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
af2d336045
[LTC] Implement The Balrog of Moria (#10545) 2023-07-01 12:54:43 -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
Susucre
44928e65f7
[LTC] Implement Eowyn, Shieldmaiden (#10470)
* [LTC] Implement Eowyn, Shieldmaiden

The watcher is a little tricky, as we want to watch for all humans entering for each player.
Then, the condition check will actually check if another human actually entered under the controller's control.

* use MOR and not UUID to identify Eowyn.

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-07-01 12:53:10 -04:00
Susucre
9f02ca9f5b
[LTR] Implement Shire Shirriff (#10544) 2023-07-01 12:52:43 -04:00
Grath
ddd6333d70
Fix Bombadil's Song to only allow your creatures to be targeted. 2023-06-29 23:49:41 -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
xenohedron
83c1e4395a Adjust Nacatl War-Pride 2023-06-29 23:37:54 -04:00
xenohedron
b800551052 Fix Chronosavant text 2023-06-29 23:37:54 -04:00
xenohedron
1bb37812fb Simplify Seeds of Strength; Bounty of Might 2023-06-29 23:37:54 -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