Commit graph

11000 commits

Author SHA1 Message Date
Oleg Agafonov
ce3cf742c9 Blast-Furnace Hellkite - fixed game error on offering an artifact lands and treasures (#9940, #10218) 2023-06-11 11:05:06 +04:00
theelk801
d0cc29cac4 [LTR] Implement Pippin, Guardian of the Citadel 2023-06-10 19:05:52 -04:00
theelk801
bcaaf4101e [LTR] Implement Sauron, the Dark Lord 2023-06-10 18:47:15 -04:00
theelk801
ce46b0c0fc [LTR] Implement Isolation at Orthanc 2023-06-10 12:54:55 -04:00
theelk801
a754fb672a [LTC] Implement Fealty to the Realm 2023-06-10 12:28:29 -04:00
xenohedron
e626d8be5d minor cleanup adjustment 2023-06-09 16:58:54 -04:00
theelk801
d408719b8d [LTR] Implement Mirkwood Spider 2023-06-09 09:20:38 -04:00
theelk801
d688bcb54a [LTR] Implement Flame of Anor 2023-06-09 08:28:44 -04:00
xenohedron
4321f0363e Propagate values through ConditionalOneShotEffect 2023-06-09 00:39:41 -04:00
Oleg Agafonov
05826fa8d8 RevealAndSeparatePilesEffect - fixed NPE 2023-06-09 07:03:32 +04:00
Oleg Agafonov
49ce794c45 Merge fix 2023-06-09 07:03:32 +04:00
Oleg Agafonov
3b0de691c8 Remove a counter from - fixed game error 2023-06-09 07:03:32 +04:00
Oleg Agafonov
35b00c3da1 Fixed game errors for non started games (some cards uses dynamic hints with non-protected code) 2023-06-09 07:03:31 +04:00
Oleg Agafonov
ae5bc90915 Fixed game error on attack order disconnects 2023-06-09 07:03:31 +04:00
Alexander Novotny
a0f8a42699
Fixing copy and cast from exile effects (#10436)
* Added unit test for magefree/mage#10435

* Added test for potential breakage of prosper functionality

* Copies of cards are now created in the right zone

* Added PlayCardTriggeredAbility

This triggered ability checks to make sure a card was actually played (as opposed to a copy of a card).
Common abilities have been refactored to use this new ability

* Added mizzix's mastery overload test

* Fixed Mizzix's mastery overload

* Added new ability to Juju Bubble

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-06-09 05:32:59 +04:00
theelk801
972d8fb324 [LTR] Implement Dunedain Rangers 2023-06-08 20:46:20 -04:00
theelk801
1aea1ebe92 [LTR] Implement Flowering of the White Tree 2023-06-08 20:36:00 -04:00
theelk801
8a742ca1d5 [LTR] Implement Galadriel of Lothorien 2023-06-08 20:25:14 -04:00
Alexander Novotny
80cb439862
Added Saruman of Many Colors (#10434)
* Added Saruman of Many Colors

Borrowed functionality in CastSecondSpellTriggeredAbility from magefree/mage#10433
Added new helper class ExileTargetCardCopyAndCastEffect for common effect

* Updated FlawlessForgery to use new ExileTargetCardCopyAndCastEffect

* Fixed overriden Effect copy functions

* Expanded ExileTargetCardCopyAndCastEffect

Added ability for non-free spells

* Removed filter lock

* De-duplicated exile and cast effects

* Fixed demilich
2023-06-08 17:00:28 -04:00
Alexander Novotny
0b2f582d84
Added Storm of Saruman card (#10433)
* Added Storm of Saruman card

Some classes have been added/adjusted for code reusability:
- CastSecondSpellTriggeredAbility has been modified to set a target pointer to either the caster or the spell (used here to set a target pointer to the spell for the copy effect)
- CopyTargetSpellEffect has been modified to allow specifying a copy applier (used here to apply the legenedary-stripping effect)
- RemoveTypeCopyApplier has been added as a generic copy applier for any cards which read "except it isn't <type>"

* Fixed verify failure - Remove ward hint on Storm of Saruman

* Fixed a typo - ammount -> amount

* Modified Double Major to use new CopyTargetSpellEffect

* Re-added ability text for Double Major
2023-06-08 16:58:28 -04:00
Alexander Novotny
079424f8f1
Added hint for restrictions which must attack a player (#10438)
Fixes #10140
2023-06-07 20:00:27 -04:00
Alexander Novotny
b0809c4a7a
Beamtown Bullies now properly targets opponent (#10439)
* Beamtown Bullies now properly targets opponent

Fixes magefree/mage#9975

* Fixed filter initialization
2023-06-07 14:27:59 -04:00
theelk801
a998017ddd [LTR] Implement Elrond, Lord of Rivendell 2023-06-05 23:18:12 -04:00
Alexander Novotny
9a5fa9c8b0
Added Norn's Decree (#10281)
* Added Norn's Decree

Also added a couple of helper classes:
- A triggered ability for when players attack
- A triggered ability for the controller taking combat damage from one or more creatures (will be used in Starscream, Power Hungry)
- A condition for when an attacked player is poisoned

* Fixed rules comment issue

* Fixed issue with incorrect logic in CombatDamageDealtToYouTriggeredAbility
2023-06-05 22:14:54 -04:00
xenohedron
807a6c95f1
Merge pull request #10369 from xenohedron/refactor-search
Refactor search library effect classes to clean up text generation
2023-06-04 22:18:18 +03:00
xenohedron
4a3ce686bb
Cleanup: ReturnFromExileForSourceEffect (#10371)
* Cleanup ReturnFromExileForSourceEffect

* Fix text
2023-06-04 15:07:49 -04:00
theelk801
27e3010139 [LTR] Implement Fangorn, Tree Shepherd 2023-06-03 21:44:39 -04:00
theelk801
b8189a0bd7 [LTR] Implement Eowyn, Fearless Knight 2023-06-03 20:32:57 -04:00
theelk801
294ccedc45 [LTR] Implement Last March of the Ents 2023-06-03 10:06:39 -04:00
theelk801
a4a995f615 [LTR] Implement There and Back Again 2023-06-02 09:02:51 -04:00
xenohedron
7531263fb9
Fix text [RAV] [GPT] [DIS] (#10359)
* Fix text: capitalization of regenerate

* Fix text: Circle of Protection Artifacts

* Fix text [RAV] [GPT] [DIS]
2023-06-02 12:36:22 +03: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
a7c3cb9797
Merge pull request #10399 from xenohedron/cleanup-becomescreaturesource
Cleanup: BecomesCreatureSourceEffect
2023-06-02 11:57:19 +03:00
xenohedron
c7994cb3ac Text fixes 2023-06-02 11:34:05 +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
913d5dfee8
Cleanup: PreventDamageAndRemoveCountersEffect (#10321)
* Add tests (two passing, one failing due to incorrect implementation)

* Cleanup PreventDamageAndRemoveCountersEffect; fix Protean Hydra
2023-06-02 11:29:51 +03:00
theelk801
970bd300c0 [LTR] Implement Display of Power 2023-06-01 21:09:50 -04:00
sprangg
4ce9f59e35
Improved mtga import
Added ★ and /// to be replaced in CardNameUtil.java (#9855)
Co-authored-by: sprangg <a@b.c>
2023-06-01 19:19:14 +04:00
theelk801
579f953e8b [LTR] Implement Long List of the Ents 2023-05-31 22:56:52 -04:00
theelk801
b9f31eb937 [LTR] Implement Dunland Crebain 2023-05-30 18:27:34 -04:00
theelk801
82073bba73 [LTR] Implement Nazgul 2023-05-30 18:24:54 -04:00
xenohedron
255c7a9ce7
Remove unused marker interface (#10404) 2023-05-29 19:16:04 -04:00
xenohedron
8a071bd1ad
Fix Fighter Class (#10402) 2023-05-29 19:13:50 -04:00
xenohedron
50105c0372
new common class: SourceEnteredThisTurnCondition (#10415)
* Create new common condition class

* Use common condition on nine cards where appropriate
2023-05-29 19:13:21 -04:00
xenohedron
749f2e3991
Fix Cephalid Facetaker (#10416)
* Fix Cephalid Facetaker with new static filter

* Use FILTER_ANOTHER_TARGET_CREATURE on other cards
2023-05-29 19:12:53 -04:00
theelk801
fa03c6404f fix and rework commander validation (fixes #10345) 2023-05-23 19:25:00 -04:00
theelk801
85aaaec468 rework and simplify evolve ability 2023-05-23 17:07:24 -04:00
xenohedron
9c20dd3bfc Change the abilities to layer 7b where they belong 2023-05-22 23:49:12 -04:00
xenohedron
d7fc52daea Fix Haunted Plate Mail 2023-05-22 23:49:12 -04:00
xenohedron
091b6e7c0c Add/revise comments for clarity 2023-05-22 01:07:29 -04:00
xenohedron
aecdde421b Refactor to single constructor with CardType enum 2023-05-21 23:47:43 -04:00
xenohedron
00ca915581 Move loseAbilities out of constructor 2023-05-21 23:47:11 -04:00
xenohedron
9b73c8367f Check CDAs from token, remove explicit parameter 2023-05-21 23:46:46 -04:00
xenohedron
ce5423bbf6 Add CR reference comment 2023-05-21 21:51:01 -04:00
xenohedron
7ffd805f87 Fix text for cards with duration at start 2023-05-21 01:31:00 -04:00
xenohedron
26a95eed51 More sensible parameter ordering 2023-05-21 01:21:42 -04:00
xenohedron
0bc473f4b2 Clean up constructors and add comments 2023-05-21 01:21:42 -04:00
xenohedron
9aaf1ccef7 Update constructors 2023-05-21 01:21:42 -04:00
xenohedron
3a6e84043c prepare to move power/toughness out of constructor 2023-05-21 01:21:42 -04:00
xenohedron
70248cdd2b Fix text generation for default duration rule at end 2023-05-21 01:21:42 -04:00
Evan Kranzler
60e488cf05
rename classes (#10383) 2023-05-17 18:49:30 -04:00
xenohedron
549b3eb6c8 rename parameter 2023-05-14 01:41:52 -04:00
xenohedron
9bdd2dd204 Fix missing space 2023-05-14 01:11:53 -04:00
xenohedron
bb8c59aafd add textThatCard to SearchLibraryPutInPlayEffect, fix string builder 2023-05-14 00:01:15 -04:00
xenohedron
b05e6d5cb1 SearchLibraryPutInPlayEffect: remove forceshuffle parameter, part 3 2023-05-13 23:45:36 -04:00
xenohedron
698fe34014 SearchLibraryPutInPlayEffect: remove forceshuffle parameter, part 2 2023-05-13 23:45:36 -04:00
xenohedron
4c787423bc SearchLibraryPutInPlayEffect: remove forceshuffle parameter 2023-05-13 23:45:36 -04:00
xenohedron
1aba94c8a8 SearchLibraryPutInPlayEffect: remove outcome, part 3 2023-05-13 23:45:36 -04:00
xenohedron
511ae76aee SearchLibraryPutInPlayEffect: remove outcome, part 2 2023-05-13 23:45:36 -04:00
xenohedron
3b02a42ddf SearchLibraryPutInPlayEffect: automatic outcome 2023-05-13 23:45:36 -04:00
xenohedron
6de43dc06e Cleanup SearchLibraryPutOnLibraryEffect, part 2 2023-05-13 23:45:36 -04:00
xenohedron
a4616bc7ee Cleanup SearchLibraryPutOnLibraryEffect 2023-05-13 23:45:36 -04:00
xenohedron
f5cbb2e224 SearchLibraryPutInHandEffect: add parameter for "that card" text 2023-05-13 23:45:35 -04:00
xenohedron
ae7266efba SearchLibraryPutInHandEffect: simplify constructors 2023-05-13 23:45:35 -04:00
xenohedron
5ee6bed33a Cleanup SearchLibraryPutInHandOrOnBattlefieldEffect 2023-05-13 23:45:35 -04:00
xenohedron
8eb8a163af Cleanup SearchLibraryPutInPlayTargetPlayerEffect 2023-05-13 23:45:35 -04:00
Evan Kranzler
024c3081df
[BRC] Implement Rootpath Purifier (ready for review) (#10363)
* refactor check supertype methods

* change supertype to list to match card type

* refactor various subtype methods

* implement mageobjectattribute for supertype

* a few fixes

* [BRC] Implement Rootpath Purifier

* a few extra fixes

* more fixes

* add test for purifier
2023-05-13 10:48:07 -04:00
Evan Kranzler
a850e3660b
Change supertype method in constructors (#10361)
* replace addSuperType with supertype.add in card constructors

* more supertype replacements

* update MDFC supertype implementation

* remove unnecessary class

* update test
2023-05-12 20:45:07 -04:00
xenohedron
4cc9329b15
New feature: "Chaos Remixed" booster draft (#10328)
* Fix error in draft pick logger that was failing on chaos drafts with fewer than 3 sets

* Implement Remixed Booster Draft

* Add debug test

* minor cleanup

* Cleanup unnecessary checks

* Fix elimination tournament type

* Add note for future improvement
2023-05-12 18:12:23 +04:00
Oleg Agafonov
6d4e353867 Designation - fixed not working abilities like Monarch and Initiative (#10334, #10338); 2023-05-12 18:00:52 +04:00
xenohedron
4c13b42dee
Cleanup: replace custom code with common classes, text fixes to abilities (#10304)
* Use common FirstCombatPhaseCondition on Raiyuu, Storm's Edge

* Use common ReturnFromExileForSourceEffect on Parallax Wave

* Use common exile effects on Prowling Geistcatcher (attempt to fix #9981)

* Fix text: Fading ability

* Fix text: Endangered Armodon

* Fix text: Nemata, Primeval Warden

* Fix text: Capitalization on alternative/additional costs other than mana
2023-05-09 18:01:48 +04:00
Oleg Agafonov
550d719498 Fixed NPE error in drafting and timeout 2023-05-09 16:54:22 +04:00
Oleg Agafonov
30389e426f Fixed NPE error in drafting and disconnected player 2023-05-09 16:54:22 +04:00
Oleg Agafonov
a18dcd9911 Drana and Linvala - fixed game error on usage with same abilities from permanents (NPE error) 2023-05-09 16:54:22 +04:00
Oleg Agafonov
a315171ca4 Connive ability - fixed game error on usage (NPE), fixed game freeze on disconnect, fixed miss LKI related code; 2023-05-09 15:36:33 +04:00
Oleg Agafonov
3c66dc8706 Additional fixes for 9d9916280a 2023-05-09 15:05:24 +04:00
Oleg Agafonov
9d9916280a Attacking you abilities and filters - fixed that planeswalker removes from a combat can cause a game error (NPE error, example: Curse of Hospitality) 2023-05-09 14:59:44 +04:00
Oleg Agafonov
7d9d037416 db: fixed not working sets update on server's start 2023-05-09 08:58:32 +04:00
theelk801
386e10b251 [MAT] Implement Danitha, New Benalia's Light 2023-05-08 18:22:36 -04:00
theelk801
4271ec8aec [LTR] Implement Gandalf, Friend of the Shire 2023-05-08 17:28:38 -04:00
Oleg Agafonov
bc79b5f5d1 dev: enabled debug main menu by default in developer builds (example: test render dialog) 2023-05-09 00:49:46 +04:00
Oleg Agafonov
5c705a92a3 Cheats: added error dialog on wrong cheat command, added chat message about cheat try; 2023-05-09 00:22:00 +04:00
Oleg Agafonov
6882a9a49e Code clean 2023-05-08 22:59:30 +04:00
Oleg Agafonov
1dea98cf1f Game: fixed that search by card name was able to return a wrong card (example: cheat command) 2023-05-08 22:58:30 +04:00
theelk801
907d07d175 [MAT] Implement Animist's Might 2023-05-08 09:00:14 -04:00
theelk801
6f9358c095 [MAT] Implement Tolarian Contempt 2023-05-08 08:37:48 -04:00
Oleg Agafonov
f2d93f224f Tokens and command objects reworked (part 2 of 2, tokens/emblems) 2023-05-08 02:18:42 +04:00
Oleg Agafonov
5f55c7c667 Tokens and command objects reworked (part 1 of 2):
- fixed that copy effect doesn't restore original image after effect's end;
 - removed outdated availableImageSetCodes (all images auto-selected from tokens database now, related to #10139);
 - refactor command objects to use CommandObjectImpl;
 - refactor planes/emblems/etc objects to use MageObjectImpl, added copyable support;
 - refactor another game objects to remove some duplicated fields;
2023-05-08 02:15:07 +04:00
theelk801
46f6593da8 [SLD] fixe Holga, Relentless Rager not requiring blocks (fixes #10325) 2023-05-07 14:45:18 -04:00
Evan Kranzler
3503513c4e
Implement The Ring Tempts You mechanic (#10320)
* remove skip

* initial implementation of the ring mechanic

* some changes

* rework ring-bearer choosing

* [LTR] Implement Call of the Ring

* update ring-bearer condition
2023-05-07 14:32:28 -04:00