Commit graph

2136 commits

Author SHA1 Message Date
Oleg Agafonov
e4157fefb8 AI: improved combat support:
* added support to attack battle permanents (#10246);
* fixed that AI was able to attack multiple targets by single creature (#7434);
* added docs;
* added todos with another bugs or possible problems with AI combat;
2024-01-20 00:17:14 +04:00
theelk801
fe97d3d77b [MKM] Implement No Witnesses 2024-01-17 16:29:17 -05:00
theelk801
1a8dce83d0 rename face-up/face-down events 2024-01-17 15:56:11 -05:00
xenohedron
a090a2a9d0
refactor/cleanup DoIfCostPaid (#11656) 2024-01-14 19:57:24 -05:00
xenohedron
341d8b9add fix #11643 (choice for add mana of any type produced) 2024-01-13 16:26:54 -05:00
Jeff Wadsworth
58739cf2d6 Fixed #11623 2024-01-10 17:24:42 -06:00
xenohedron
906145bad6 fix error in FightTargetsEffect 2024-01-06 15:13:00 -05:00
xenohedron
aa4d1654c7 fix unwanted null check in FightTargetsEffect 2024-01-06 15:05:14 -05:00
xenohedron
784a0f564b fix #11606 (PreventDamageToSourceEffect zcc check) 2024-01-06 14:57:56 -05:00
xenohedron
e6bd35eb77
refactor selecting cards from multiple zones (#11584)
* refactor selecting cards from multiple zones

fix MV <= controlled lands predicate

fix filter checks without source parameter

* fix test choice
2023-12-31 14:25:25 -05:00
xenohedron
9b3ff32a33
Rework sacrifice effects to support "can't be sacrificed" (#11587)
* add TargetSacrifice and canBeSacrificed

* SacrificeTargetCost refactor, now uses TargetSacrifice, constructors simplified, subclasses aligned

* fix text errors introduced by refactor

* refactor SacrificeEffect, SacrificeAllEffect, SacrificeOpponentsEffect

* cleanup keyword abilities involving sacrifice

* fix a bunch of custom effect classes involving sacrifice

* fix test choices

* update Assault Suit implementation

* fix filter check arguments

* add documentation to refactored common classes

* [CLB] Implement Jon Irenicus, Shattered One

* implement "{this} can't be sacrificed"

* add tests for Assault Suit and Jon Irenicus

* refactor out PlayerToRightGainsControlOfSourceEffect

* implement [LTC] Hithlain Rope

* add choose hint to all TargetSacrifice

---------

Co-authored-by: Evan Kranzler <theelk801@gmail.com>
Co-authored-by: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com>
2023-12-31 14:10:37 -05:00
xenohedron
062a9514fb
refactor: ReturnFromGraveyardAtRandomEffect (#11582) 2023-12-26 16:15:37 -05:00
xenohedron
5a6c5b01b9 Revert "text fix"
This reverts commit 3bc28d63c3.
2023-12-10 21:53:00 -05:00
xenohedron
3bc28d63c3 text fix 2023-12-10 21:28:46 -05:00
xenohedron
3b603595a2 fix #11532 (Animist's Might) 2023-12-09 16:14:32 -05:00
xenohedron
6c5d5b8a90 fix The Everflowing Well, related cleanup 2023-12-06 22:28:00 -05:00
xenohedron
8deb441f6f merge cleanup 2023-12-05 20:37:15 -05:00
ssk97
898952515e
[LCI] Implement Intrepid Paleontologist (#11508)
* Improve some "mana spent -> give effect to permanent spell" cards
make effect source be the SpellAbility itself

* Implement Intrepid Paleontologist and tests

* Use a common class for the "specific MOR ETBs with counter" effect

* Prevent casting non-owned dinosuars

* Rename AddCounterEnteringMOR to AddCounterEnteringCreature

* fixes from review
2023-12-05 20:27:49 -05:00
Jeff Wadsworth
fe09873631 Added The Everflowing Well // The Myriad Pools. Perhaps someone knows why the ability keyword won't show up on the card. Works fine, though. 2023-12-04 18:53:12 -06:00
Grath
5c83818cba
[LCC] Implement Topography Tracker (#11504)
* Refactor replacement effects on ExploreEvent by using a queue of events
2023-12-04 00:46:21 -05:00
ssk97
d806a6a3be
Counter text improvements (plus a Magus Lucea Kane gameplay fix) (#11503)
* Improve text generation for some counter abilities

* Magus Lucea Kane must apply to permanent spells (bugfix, related to #11440)

* Further improve text generation of counter text

* Text improvements to a couple cards

* Graft text improvements

* Further remove unused variable

* Be consistent on Backup ability setup, revert Thalia's Lieutenant (filter reuse means it doesn't work)

* Thalia's Lieutenant original text was slightly wrong, fixed
2023-12-03 21:42:16 -05:00
xenohedron
9fbdede64b text cleanup: additional combat phase 2023-11-28 22:20:49 -05:00
xenohedron
05e2cf11e7
refactor: replacement effects don't use apply method now (#11484) 2023-11-28 11:17:28 +04:00
xenohedron
02eafaf062 simplify text gen for DamageCantBePreventedEffect 2023-11-27 23:47:10 -05:00
Oleg Agafonov
3a92d67d10 tests: added verify test to check miss of controlled filter in equip abilities (related to #11473); 2023-11-27 23:08:23 +04:00
xenohedron
867a8f54b0 fix #11456 (Become Brutes)
CreateRoleAttachedTargetEffect changed to use all targets, not just first
2023-11-25 02:20:11 -05:00
xenohedron
dd459c484f followup text fixes 2023-11-23 01:54:51 -05:00
xenohedron
a7de73723f BecomesCreatureAllEffect text adjust / simplify 2023-11-23 01:54:51 -05:00
xenohedron
1c6c68e1a4 some text fixes 2023-11-23 01:54:51 -05:00
xenohedron
4977fea307
Merge pull request #11417 from ssk97/TagTracking3_KeywordAbilities
Costs Tag Tracking part 3: Most keyword abilities
2023-11-20 21:28:40 -05:00
xenohedron
1816c8ad73 many the text fixes 2023-11-19 21:37:37 -05:00
xenohedron
f4920b60ed text fixes 2023-11-19 00:09:35 -05:00
xenohedron
f46ac4c5ee fix LoseLifeControllerAttachedEffect
resolves #11421
2023-11-19 00:03:09 -05:00
xenohedron
73daf67cc2 remove unused class 2023-11-19 00:03:09 -05:00
Steven Knipe
660288dfd7 Use generics to ensure the correct class types stored inside the costs tags. 2023-11-17 02:37:06 -08:00
ssk97
bea33c7493
Costs Tag Tracking part 2: Tag system and X values, reworked deep copy code (#11406)
* Implement Costs Tag Map system

* Use Costs Tag Map system to store X value for spells, abilities, and resolving permanents

* Store Bestow without target's tags
Change functions for getting tags and storing the tags of a new permanent

* Create and use deep copy function in CardUtil, add Copyable<T> to many classes

* Fix Hall Of the Bandit Lord infinite loop

* Add additional comments

* Don't store null/empty costs tags maps (saves memory)

* Fix two more Watchers with Ability variable

* Add check for exact collection types during deep copy

* Use generics instead of pure type erasure during deep copy

* convert more code to using deep copy helper, everything use Object copier, add EnumMap

* fix documentation

* Don't need the separate null checks anymore (handled in deepCopyObject)

* Minor cleanup
2023-11-16 23:12:32 +04:00
Susucre
b538d4714c [LCI] Implement Sunken Citadel 2023-11-16 11:51:10 +01:00
ssk97
ec4c79e0e0
Fix copying subabilities to no longer duplicate them (#11399)
* Fix Subability copy bug (fix #10526 )

* Cards which copy abilities of other cards should not copy subabilities.

* Enable previously-failing tests

* Find more addAbility that should be done without subabilities

* Add documentation to addAbility function

* Add warning about not using basic addAbility when copying from a source

* Invert withSubabilities to fromExistingObject
2023-11-12 19:57:39 -05:00
xenohedron
ded7eeeaa8 align DISCOVERED event to naming convention
no need for custom event class
2023-11-09 20:44:52 -05:00
xenohedron
9eeaf9cae1 fix text
fix Jade Seedstones craft cost
2023-11-09 00:39:40 -05:00
xenohedron
4a250c48a5 implement [LCI] Kutzil, Malamet Exemplar 2023-11-08 23:09:39 -05:00
Jeff Wadsworth
3b90880fa3 Fixed #11381
The rest of these types of cards need to be fixed as well.
2023-11-07 17:09:56 -06:00
Susucre
2f3161e83d [LCI] Implement Abuelo's Awakening 2023-11-05 17:11:21 +01:00
xenohedron
e27ceec5e8 fix reminder text 2023-11-04 18:41:56 -04:00
xenohedron
35ec41d8e0 more text adjustments 2023-11-04 18:41:56 -04:00
Susucre
357ebec523 fix Fungal Fortitude text 2023-11-04 18:41:30 +01:00
Susucre
674661b605 [LCI] Implement Fungal Fortitude 2023-11-04 17:10:35 +01:00
ssk97
52bb2c5d71
[WHO] added Ace's Baseball Bat, consolidate related code (#11387)
* TalruumPiper use MustBeBlockedByAllSourceEffect

* Both of Bident Of Thassa's abilities can be made generic

* Goblin Diplomats use generic class (with custom text)

* create MustBeBlockedByAtLeastOneAttachedEffect common effect

* Add Ace's Baseball Bat
2023-11-04 14:19:21 +04:00
xenohedron
987d49520a implement [LCI] Sage of Days 2023-11-04 00:14:53 -04:00
xenohedron
d3cc3aa96d implement [LCI] Zoetic Glyph 2023-11-01 23:28:07 -04:00