Commit graph

4415 commits

Author SHA1 Message Date
theelk801
119c432344 remove unnecessary args from RollDiceEffect 2024-08-31 19:00:54 -04:00
Grath
3c419a857f
[BLB] Implement Camellia, the Seedmiser. (#12751)
* [BLB] Implement Camellia, the Seedmiser.

Also implemented SacrificedPermanentBatchEvent, SacrificeOneOrMorePermanentsTriggeredAbility, and refactored existing Whenever you sacrifice one or more [filter] abilities to use the new SacrificeOneOrMorePermanentsTriggeredAbility (even though as they all only trigger once per turn and technically function correctly with the old SacrificePermanentTriggeredAbility.

* Fix accidental newline.
2024-08-29 10:35:13 -04:00
Grath
543f9f074e
Refactor CreateTokenEffect to allow multiple tokens at once. (#12704)
* Refactor CreateTokenEffect to allow multiple tokens at once.

Partial solution to #10811 - Token copy effects still need to be redone so that mass token copy effects (Ocelot Pride, Mirror Match, other similar effects) can be created in a single batch.
2024-08-25 10:34:42 -04:00
PurpleCrowbar
8d249aa691
Improve attachment to permanent logic; implement [PIP] Codsworth, Handy Helper (#12098)
* [PIP] Implement Codsworth, Handy Helper

* Fix Codsworth and Halvar

* Write tests for attachments

* Fix auras going to graveyard when attaching to illegal targets

* Fix Captured by the Consulate interaction

* Fix failing tests, add additional test

* Add source name to log message

* Implement requested changes

* Revert removed null check

* Remove filter check, clean up code

* Add additional test

* Fix failing roles test

* Account for all current attachment edge cases

* Implement rule 303.4g

* Apply requested changes
2024-08-24 01:03:33 -04:00
xenohedron
34ae226130
refactor: simpler method for mana that lasts until end of turn (#12667) 2024-08-24 01:02:25 -04:00
ssk97
00770646f8
Create generic "Gains your choice of ability" effect, add [ACR] Assassin Initiate (#12619)
Create generic GainsChoiceOfAbilitiesEffect, covers both Target and Source cases.

Adds Assassin Initiate
2024-08-22 13:34:40 -07:00
ssk97
b70638acc9
Unbound Flourishing's X doubling should be a triggered ability (and related refactors) (#12597)
Complete rework of Unbound Flourishing, removing the multiplier code for casting X spells.
Adds ActivateAbilityTriggeredAbility, NotManaAbilityPredicate, AbilitySourceAttachedPredicate
CopyStackObjectEffect now uses a MOR.
OrTriggeredAbility now works with target pointer setting abilities.
2024-08-22 13:33:39 -07:00
xenohedron
4c069754a6 fix #12657 with common class, add test 2024-08-16 23:12:15 -04:00
jimga150
d75068a426
fixed text generation for cards with pawprints symbols (closes #12662, #12664) 2024-08-15 09:28:15 +04:00
Oleg Agafonov
e7585e8d95 refactor: fixed miss copy effect (related to #12605) 2024-08-15 09:00:27 +04:00
jimga150
e976920e2d
[BLB] Implement Season of Gathering and Pawprints mechanic (#12617)
* Add skeleton

* Implement Pawprints modal functionality

* Implement Seasons of Gathering

* remove unused imports

* Add Pawprints test

* use withPawPRintValue() instead of setter

* use 0 for non-pawprint mode and modes classes and move mode validation to addMode

* Use GreatestPowerAmongControlledCreaturesValue

* Fix pawprints check

* calcualte sleected pawprint count based on selected modes

* move max pawprints check to getAvailableModes

* fix max pawprints checks
2024-08-14 21:13:09 -04:00
jimga150
d5c76489ac
Implement Splash Portal (#12605)
* Implement Splash Portal

* Add test

* Add an afterEffect to ExileThenReturnTargetEffect for use in Splash Portal

* Modify Essence Flux to use new ExileThenReturnTargetEffect and write test

* use withAfterEffect for ExileThenReturnTargetEffect

* use ConditionalOneShotEffect

* Restrict effects to one shot
2024-08-14 21:12:55 -04:00
karapuzz14
3321cd03bc
[YDMU] Implement Marwyn's Kindred & Wandering Treefolk (#12625) 2024-08-14 21:11:45 -04:00
theelk801
be84dbaa0f [YMID] Implement Toralf's Disciple 2024-08-13 11:45:27 -04:00
Grath
ebca45987a
[MKC] Implement Marvo, Deep Operative (plus refactor ClashEffect to allow for designated Clashes) 2024-08-08 21:37:35 -04:00
ssk97
570a2e9661
[BLB] Beza the Bounding Spring, Bandit's Talent, Persistent Marshstalker, fix some existing BLB cards (#12629)
* Beza, the Bounding Spring

* Bandit's Talent, minor change to DrawCardSourceControllerEffect text generation

* Persistent Marshstalker

* Patchwork Banner fix controller requirement

* Fix FeatherOfFlight, LupinflowerVillage, HivespineWolverine, HazardrootHerbalist

* Fix missing Zone on Persistent Marshstalker ability
2024-08-07 23:46:49 -07:00
theelk801
1cf91b0b2d [BLC] Implement Pyreswipe Hawk 2024-08-06 12:48:40 -04:00
PurpleCrowbar
23d0420c95 Remove some unused imports 2024-08-05 21:43:52 +01:00
Oleg Agafonov
0a6f0b7a9d code clean 2024-08-03 21:24:46 +04:00
xenohedron
b78956d286
text errata updates: various "enters the battlefield" -> "enters" (#12626)
* enters the battlefield, -> enters,

* {this} enters the battlefield -> {this} enters

* EntersBattlefieldAbility

* , it enters

* enters the battlefield under your control -> you control enters

* rework some trigger phrase logic

* fix tests
2024-08-02 18:43:59 -04:00
jimga150
f2d3850250
refactor: simplify DrawCardSourceControllerEffect text generation (#12621) 2024-07-31 22:46:22 -04:00
jimga150
ee3cab84ef
[BLC] Implement Fortune Teller's Talent (#12608)
* Implement Fortune Teller's Talent

* Remove outdated assert from PlayFromTopOfLibraryEffect and update comment
2024-07-31 22:45:59 -04:00
Susucre
a76ef60820 align to new enters wording changed upstream 2024-07-30 15:54:26 +02:00
Susucre
c0eab28626
implement [MH3] Primal Prayers ; use choice panel for cast mode choice ; allow some restricted "as thought as it had flash" to work only on matching alternative cast. (#12420) 2024-07-30 15:47:39 +02:00
ssk97
b6b7dd3ce6
Rework Extort (#12609) 2024-07-30 00:39:19 -04:00
jimga150
c73cfebcd9
Fix EntersBattlefieldOneOrMoreTriggeredAbility (#12592)
* Apply fix for ZONE_CHANGE_GROUP events making tokens controlled by different players

* Add test

* Remove unused import

* Fix implementation

* Rewrite to use ZONE_CHANGE_BATCH

* Fix OPPONENT case

* Add default case

* refactor to avoid using stream as local variable and use ZoneChangeEvents in filters

* Fix typo
2024-07-30 00:39:01 -04:00
jimga150
32042687fb
[BLB] Implement Eluge the Shoreless Sea; expand SpellsCostReductionControllerEffect (#12607)
* Implement Eluge, the Shoreless Sea (missing mana cost reduction clause)

* implement ability to convert colored to generic costs in SpellsCostReductionControllerEffect

* fix text generation on SpellsCostReductionControllerEffect

* remove unnecessary setText() calls on SpellsCostReductionControllerEffect

* make logfile from master run

* Fix plurality detection

* Eliminate unnecessary setText() calls in other cards

* Delete logfile

* remove redundant type cast

* Add parameter documentation
2024-07-30 00:38:21 -04:00
Oleg Agafonov
393dbc4047 Can't be activated effects - fixed that some restricted effects show abilities as playable (example: Sharkey, Tyrant of the Shire and Karakas, fixed #10642) 2024-07-27 15:38:13 +04:00
Oleg Agafonov
2bf6e3e3a2 GUI: added mana and other symbols support in choose spell dialog (closes #12155) 2024-07-27 10:17:22 +04:00
Oleg Agafonov
521a0f6e32 GUI: introduced default card hints:
* refactor: added helper emblems instead rad counter's inherent emblems (use initGameDefaultHelperEmblems to define new card hints or other fake objects);
* refactor: added card hints support for emblems, planes and other command objects;
* GUI: added storm counter as default card hint (use hints tool to see it, closes #12360);
2024-07-27 09:40:41 +04:00
xenohedron
5cc4901580 fix #12575
add test for AddManaInAnyCombinationEffect

cleanup Grand Warlord Radha, add test

simplify some abilities to common class

remove unused constructors
2024-07-25 01:35:51 -04:00
ssk97
be3065789d
[BLB] Consumed by Greed, Thought Shucker, Mabel's Mettle, Heaped Harvest (#12600)
* Consumed by Greed

* Fix Gift text

* Thought Shucker

* Mabel's Mettle

* Heaped Harvest
2024-07-24 20:25:44 -04:00
theelk801
12aa81cbf4 [BLB] Implement Mind Spiral 2024-07-23 15:21:23 -04:00
ssk97
3933364e6e
[ACR] Implement 4x Equipment-related cards (#12593)
* Assassin Gauntlet

* Fix many minor mistakes in ACR cards

* Battlefield Improvisation

* Phantom Blade

* Misthios's Fury

* Fix unset target tag, missing damage amount text

* Remove now-unneeded setText calls for DamageTargetControllerEffect
2024-07-23 02:20:18 -04:00
ssk97
e8808c3ae3
Remove duplicate code for X costs (#12551)
* Replace "([a-zA-Z]+).getManaCostsToPay().getX()" with CardUtil.getSourceCostsTag(game, $1, "X", 0)
Fix Disrupting Shoal

* Change final card .getX() calls

* Condense all ManacostVariableValue enum values into "instance"

* Further removal of getX, Display X symbol for non-mana X cards

* Fix test

* Fully remove ManaCosts.getX

* Replace all different X dynamic values with GetXValue

* Remove individual cards checking getAmount for X values (leaving cost reduction that does not use X)

* Add null check for game object inside getSourceCostsTagsMap

* fix build errors

* fix Vicious Betrayal

* text fix
2024-07-23 01:57:47 -04:00
ssk97
78649c1a62
Remove KickerAbility.getSpellKickedCount (#12553)
* Remove KickerAbility.getSpellKickedCount

* Check spell LKI instead of only current spell object

* Remove bad LKI storage under wrong ID
2024-07-22 23:13:48 -04:00
theelk801
0f33ac298c [BLB] Implement Wax-Wane Witness 2024-07-19 17:45:22 -04:00
theelk801
b92c22d602 [BLB] Implement Ruthless Negotiation 2024-07-19 16:15:02 -04:00
theelk801
57503550fe [BLB] Implement Jolly Gerbils 2024-07-18 20:47:12 -04:00
Oleg Agafonov
a974af3c61 GUI: improved choose creature type dialog - important creature types added to the start of the list and marked as my/opponent (closes #8478) 2024-07-19 03:17:53 +04:00
Oleg Agafonov
7b2e9b390c GUI: added card hints in choose replacement effect dialog 2024-07-19 00:06:18 +04:00
Evan Kranzler
7fe6ba9c57
Implement "Promise a gift" mechanic (#12578)
* [BLB] Implement Wear Down

* [BLB] Implement Valley Rally

* [BLB] Implement Dawn's Truce

* add initial test

* [BLB] Implement Kitnap

* [BLB] Implement Long River's Pull

* [BLB] Implement Peerless Recycling

* [BLB] Implement Into the Flood Maw

* add more tests

* add verify skip

* remove skip

* a few requested changes

* [BLB] Implement Nocturnal Hunger

* add test for gifting a food token

* [BLB] Implement Starforged Sword

* add comment to activation ket

* add test for adding extra cards
2024-07-18 09:15:45 -04:00
ssk97
96b08ee6bf
Fix effects where the source's controller sacrifices it (#12583)
* Fix effects where the source's controller sacrifices it. Added test. Fixes #12582

* Update Evoke rules text
2024-07-18 00:28:50 -04:00
xenohedron
680f14b49d add hint for YouGainedOrLostLifeCondition
update Starseer Mentor to use common condition
2024-07-17 23:57:02 -04:00
theelk801
f7eeb75545 [BLB] Implement Star Charter 2024-07-17 10:19:13 -04:00
xenohedron
bac604fa4c simplify Hired Claw, add hint 2024-07-15 21:49:38 -04:00
Evan Kranzler
204f67c5f0
Implement offspring mechanic (#12572)
* implement offspring mechanic

* create offspring test
2024-07-12 23:38:29 -04:00
theelk801
dc096e4b1b [BLB] Implement Darkstar Augur 2024-07-12 14:12:15 -04:00
Susucre
3fdeb8c2fc implement [BLB] Starseer Mentor 2024-07-12 18:18:02 +02:00
Susucre
233d714e00 simplify "you gained life this turn" condition constructor 2024-07-12 17:42:00 +02:00