Commit graph

40994 commits

Author SHA1 Message Date
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
Oleg Agafonov
6529ead72f refactor: simplified extra turn code, fixed NPE error on usage (Alchemist's Gambit) 2023-06-30 06:39:01 +04:00
Tiago Gil
ad461498b0
[LTR] Implement Gandalf, White Rider (#10538)
* [LTR] Implement Gandalf, White Rider

* Took ideas from the God Eternals, Arwen Undomiel and Enigma Sphinx.

* Tested it with multiple interactions, including murdering a stolen Gandalf with Agent of Treachery.

* Forgot to add myself as author

* Implemented requested fixes

* Changed it to use `DiesSourceTriggeredAbility()`
* Changed to `getValue("permanentLeftBattlefield")`
* Stolen interactions are properly working now

* ZCC comparison

* Based on the God Eternals, hope its up to spec
2023-06-29 22:37:21 -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
Tiago Gil
9d8919a009
[LTR] Implement Strider, Ranger of the North (#10536)
* [LTR] Implement Strider, Ranger of the North

* Took ideas from a few cards with similiar effects.
* Creature power check based on Ent's Fury
* Did a few playtests to ensure effects work and tested with additional creatures with landfall in the battlefield

* Forgot to add myself as author

* Update StriderRangerOfTheNorth.java

* Removed unnecessary public access
* Removed redundant `return true;`
* Added a temporary fix to the power check

* Fixed condition

* Fixed it by giving the temporary buff outside of the custom effect
* Tried to implement a condition like Dormant Grove uses but had no success, `First Strike` was still not being applied.
* Also tested the card Ent's Fury, it works because it checks the creature power before giving it any counters

* Fixed static text
2023-06-29 22:04:25 -04:00
rullinoiz
b1a61a6ae8
[LTC] Implement Mirkwood Elk (#10533) 2023-06-29 22:03:45 -04:00
Susucre
a7444948be
[LTR] Breaking of the Fellowship (#10507)
Almost identical to the card Mutiny.
2023-06-29 22:03:15 -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
xenohedron
79d7bd978b fix #10535 (Tanazir Quandrix) 2023-06-29 09:23:50 -04: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
Correl Roush
1f261d722c
Implement [MAT] Nahiri, Forged In Fury (#10534) 2023-06-28 22:24:26 -04:00
rockydirtbag
6249f08def
Implemented [LTR] Gandalf the White (#10528) 2023-06-27 23:44:23 -04:00
Tiago Gil
90df06b928
[LTR] Implement Ent's Fury (#10532) 2023-06-28 01:23:28 +01: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
9cd42bc4a5 Fix #10517 (Herald's Horn) 2023-06-25 23:30:06 -04:00