Commit graph

3318 commits

Author SHA1 Message Date
Vivian Greenslade
bee62063df
[WOE] Implement Faerie Fencing (#10899) 2023-08-20 18:35:54 -04:00
Susucre
343549c4d7
Fix PermanentMeld missing copy constructor ; add more Meld tests. (#10908)
* Add some unit tests on Meld mana value.

* Fix PermanentMeld missing copy constructor. add more Meld tests.

* clean text
2023-08-20 13:30:10 -04:00
Susucre
3d9b0e422c
Fix Mungha Wurm (#10883)
* Fix Mungha Wurm's effect being symmetrical

* add tests.

* fix potential random failure
2023-08-20 13:29:43 -04:00
jbureau88
77d0d3c07e
Implement [BOT] Optimus Prime; adjust Bolster effect (#10129)
* Added implementation for Optimus Prime

* Added setCardName text and switch case for activateAlternateOrAdditionalCosts as disturb instead of default

* Fixed doubling effect bug

* Add only regular card number

* Added back alternate card for Optimus Prime and fixed Autobot Leader colors

* Convert before return from graveyard

* Convert before return from graveyard

* Fix images

* Resolve conflict with master

* don't manually set trigger phrase

* add additional effect capability to BolsterEffect, adjust text, flatten logic

* adjust Optimus Prime, Hero

* reimplement Optimus Prime, Autobot Leader

* add test

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-08-20 13:28:17 -04:00
Susucre
43de68afe3
[WOE] Implement Stroke of midnight (refactor together similar effects) (#10834)
* [WOE] Implement Stroke of Midnight

* refactor similar effects together.

* add tests (and fix a bug)

---------

Co-authored-by: Evan Kranzler <theelk801@gmail.com>
2023-08-18 18:27:36 -04:00
Evan Kranzler
b892562b95
Fixing aura token creation (#10858)
* rework aura token creation

* add missing copy constructor

* add message for token if unable to be created

* add a few extra role tests
2023-08-18 13:25:48 -04:00
Vivian Greenslade
95de216f8e
Implement Chiss-Goria, Forge Tyrant (#10804)
* implements Chiss-Goria, Forge Tyrant

* updated test wording

* changed implementation to ContinuousEffect instead of CostModificationEffect

* fix code granting Affinity for Artifacts ability

* added more test cases to confirm effect working as intended

* add null check

* added artifact check to effect applying

* fix duration

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-08-17 23:50:14 -04:00
Evan Kranzler
b20bdcede7
WIP: Implement Role mechanic (#10816)
* [WOE] Implement Embereth Veteran

* add SBA for role tokens

* [WOE] Implement Cursed Courtier

* [WOE] Implement Conceited Witch

* [WOE] Implement Besotted Knight

* [WOE] Implement Syr Armont, the Redeemer

* [WOE] Implement Living Lectern

* add role test

* [WOE] Implement Lord Skitter's Blessing

* [WOE] Implement Faunsbane Troll

* [WOE] Implement Twisted Fealty

* [WOC] Implement Ellivere of the Wild Court

* [WOE] Implement Monstrous Rage

* [WOE] Implement Spellbook Vendor

* add verify skips

* extra fix
2023-08-17 10:18:21 -04:00
Susucre
8169799213
[WOE] implement Troublemaker Ouphe, Torch the Tower (add Bargain ability) (#10812)
* add start of Bargain

Current version probably has a bunch of bugs related to zcc and copy.

* add Torch the Tower

* add Torch the Tower tests

* add better than nothing activationKey before tag cost tracking gets cleaned up

---------

Co-authored-by: Evan Kranzler <theelk801@gmail.com>
2023-08-16 08:53:02 -04:00
Susucre
cbec9ead63
[WOE] Implement Ash, Party Crasher (add Celebration Condition) (#10818)
* implement Ash, Party Crasher (add Celebration Condition)

* test Celebration with Ash
2023-08-16 08:31:02 -04:00
Susucre
92f0f84b23
[LGN] Rework Whipgrass Entangler (#10802)
* Rework Whipgrass Entangler

Made a class for "Ability linked with an Effect", that also takes responsability of manually calling its effect's newId method.

* apply review & cleanup
2023-08-15 22:40:25 -04:00
Susucre
95deeafa86
fix [CLB] Baba Lysaga counting of card types dynamically (#10796) 2023-08-13 20:43:58 -04:00
xenohedron
6fafbf0d93 new NextSpellCastHasAbilityEffect
cleanup Wand of the Worldsoul, Flockchaser Phantom to use it

text adjustments for gain abilities
2023-08-13 01:17:51 -04:00
Susucre
07ee4661e7
[CMM] Implement Teyo, Geometric Tactician (#10736)
* [CMM] Implement Teyo, Geometric Tactician

* rework as a RestrictionEffect (common class with Mystic Barrier; Pramikon, Sky Rampart)

* add checkMayAttackDefender test

* more Pramikon tests
2023-08-12 19:02:23 -04:00
Matt M
e49020e490
[CLB] Implemented Jade Orb of Dragonkind (#10286)
* Working with oneshot

* Swap to dual effects

* adjust tests

* adjust custom class names, fix text order

* comparison fix, null check, access modifiers

---------

Co-authored-by: Zelane <zelane@hollow.tech>
Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-08-12 18:25:46 -04:00
Susucre
2d53668c96
[LTC] Implement Gilraen, Dunedain Protector (#10728)
* [LTC] Implement Gilraen, Dunedain Protector

* add tests on Gilraen

* apply review
2023-08-12 16:16:02 -04:00
Susucre
eef8f508e4
[CMM] Implement Demon of Fate's Design (#10737)
* refactor SacrificeCostManaValue to be an enum.

* [CMM] Implement Demon of Fates Design

* Add Unit Tests, including one bug on alternative cost.

* fix alternativeCosts made from dynamicCost returning that they were not activated when paid.

* fix small issues, add hint

* cleanup tests and add a couple

* Capitalize enum instances

* Minor fixes

* simplify the ContinuousEffect

* use the ConditionPermanentHint made for the Demon

* fix text
2023-08-12 15:49:06 -04:00
xenohedron
7839c6cbff
Implement [CMM] Hatchery Sliver; fix Replicate ability (#10694)
* Implement [CMM] Hatchery Sliver

* limit ReplicateAbility to only its linked instance

* Add test for multiple instances of replicate

* add another test
2023-08-11 20:41:45 -04:00
Vivian Greenslade
040a9779b5
[LTR] Implement Forge Anew (#10777)
* implements Forge Anew with unit tests

* fixes equip effect and adjusts test

* fixes effect to only apply on controller's turns

* changed test location to set

* fixes comparison, fixes wording of text to match oracle text
2023-08-11 00:00:09 -04:00
Vivian Greenslade
bfb3998fab
Fix Misstep; Pollen Lullaby; Icebreaker Kraken (#10776)
* fixes issues with noted cards and standardizes code formatting, adds tests to confirm bug is fixed

* updates tests to use StrictChooseMode

* cleans up effect implementation for listed cards

* adds comments for choices, fixes mistake in Misstep test

* updates filters, removes unnecessary text being set
2023-08-09 20:45:06 -04:00
xenohedron
35a5cc48a7
Improve DealsCombatDamageEquippedTriggeredAbility (#10767)
* improve variable name

* add test for Jitte trample damage

* fix duplicated triggers when trampling over to player

* bring corresponding ability into alignment

* adjust authorship, comment
2023-08-06 23:04:53 -04:00
Artemis Kearney
9ba0da00ff
Basic groundwork for extra decks (contraptions, attractions) (#10378)
* extra deck cards not counted in deck size

* extra deck handling in deckbuilder

* move responsibility for extraDeckCard boolean to CardImpl

* remove redundant field copy
2023-08-06 21:06:32 -04:00
xenohedron
127b7be9b0
more unrelated text fixes (#10761)
* some text fixes [LTR] [LTC] [CMM]

* another batch of text fixes

* followup fixes

* unrelated cleanup

* fix corresponding ability text in test
2023-08-05 20:53:43 -04:00
Susucre
0e5069ccc2
[LTC] Implement Gandalf, Westward Voyager (#10727)
* refactor and cleanup SpellCastControllerTriggeredAbility

* [LTC] Implement Gandalf, Westward Voyager

* throw on unexpected setTargetPointer
2023-08-04 22:26:25 -04:00
Susucre
0c1918e3f5
Fix Keeper of the Mind (#10744)
and add tests
2023-08-03 22:34:11 -04:00
ssk97
b144cb6f03
Minor Backup fixes, add tests (#10732)
* Backup is not optional and its effect should be BoostCreature, not Detriment

* Add tests for Backup ability

* Add Mirror-Shield Hoplite source test

* Use Strict mode for the hoplite source test
2023-08-03 00:26:33 -04:00
Susucre
40e508ac19
Refactor Devour ability; [LTC] Implement Feasting Hobbit (#10708)
* [LTC] Implement Feasting Hobbit

Refactor DevourEffect and its text generation, to be more permissive in the future.

* change DevourAbility to have the constructor parameters of DevourEffect

* only pluralize when there is more than 1 devoured permanent.

* added more unit tests than there are cards with devour

* public -> private filter of Caprichrome.
2023-08-01 09:49:32 -04:00
Oleg Agafonov
3d3358cd05 game: turn modification improves:
- fixed miss phase changed events and logs in some use cases;
 - added source info in turn modification logs;
 - added game logs for take and lost control of the spell (example: Word of Command)
 - added game logs for skip step;
 - added game logs for extra step;
 - added game logs for skip phase;
2023-08-01 16:52:53 +04:00
Susucre
4856c65443
[BOT] Implement Megatron, Tyrant // Megatron, Destructive Force (#10666)
* [BOT] Implement Megatron, Tyrant // Megatron, Destructive Force

* fix verify test.

* cleanup AbilityCastMode for Disturb & MoreThanMeetsTheEye

* cleanup unecessary checks.

* fix duration of silence static effect

* fix Disturb tests
2023-07-29 13:45:09 -04:00
xenohedron
9a877f5b33 java 8 compatibility fix 2023-07-28 23:00:11 -04:00
Alexander Novotny
519b3988be
game timer: Add chess-style buffer time option (#10598)
* UI Changes

* Add new buffer time options

* Main functionality

* Final implementation

Also added player UI for when they are using their buffer time (timer turns green)
2023-07-28 22:05:21 -04:00
Alexander Novotny
a36a7d9b7f
[LTR] Add Goldberry, River-Daughter (#10524)
* Added Goldberry

* Slight optimizaztion

* Happy Path Test

* More unhappy tests

* Sanity check for Goldberry's counter choices

* Updated player.getMultiAmount to support individual constraints

* Some cleanup

Also modified ResourcefulDefense to use new multi amount api

* Updated logging

* Added hint for number of counters

* Fixed issue with Resourceful Defense

* Improvements to defaults

Default list will properly make sure to stay within individual maximums
If a player is asked for a choice that isn't actually a choice because each choice's min and max are equal, instead the default response is immediately returned. This helps with situations like moving a counter off of Goldberry when she only has one counter on her.

* -1/-1 Counter test

* Fixed issue with -1/-1 counters

* Adjusted dialog to properly enforce constraints
2023-07-28 21:29:40 -04:00
Susucre
10b586f4b3
[M21] Fix See the Truth (#10664)
Some copies are actually cast from a zone, and See the Truth was not handling those cases properly.
2023-07-27 00:23:43 -04:00
xenohedron
9e81362ea4
Add logic to PlayerImpl for protection effects when damage can't be prevented (#10652)
* add failing test

* Check against prevent damage event when damaging player

* Add back game log message
2023-07-27 00:23:27 -04:00
Susucre
0c7965a725
Fix Pyrrhic Revival not adding -1/-1 counters on returned creatures. (#10626)
* Add (failing) unit test on Pyrrhic Revival

* fix PyrrhicRevival

reworked ReturnFromGraveyardToBattlefieldWithCounterTargetEffect to support having multiple cards in its targetPointer.

added test for Persist (the card from mh2).

* refactor & cleanup

* add myself as author, the effect was remade.
2023-07-17 20:02:49 -04:00
xenohedron
6c6376d878
Fix #9273 (#10637)
(process game state for two-part effects with zone change in first part)
2023-07-17 00:27:16 -04:00
Susucre
d658bf2265
refactor: expose Player->incrementLandsPlayed for some custom effects. (#10632)
* Expose Player->incrementLandsPlayed for some custom effects.
* also expose resetLandsPlayed
2023-07-17 03:53:22 +04:00
xenohedron
e2cff095b3
Rework Infectious Rage (#10625)
* put custom predicate back with Aura Graft

* Rework Infectious Rage and add unit test

* cleanup Aura Graft
2023-07-15 16:49:26 -04:00
Oleg Agafonov
d11269cb56 tests: improved logs on miss target/choice (it shows all permanents list from all players now) 2023-07-15 18:20:35 +04:00
Oleg Agafonov
eaee358a81 tests: added few use cases for AlternativeCostSourceAbility usage 2023-07-15 17:05:39 +04:00
xenohedron
ee29c38413
Clash adjustments (#10616)
* adjust clash effect

* Make clash not a singleton

* Add unit test for Clash effect

* fix test (skip init shuffling)

* Fix CLASHED event flag logic and add to unit test

* Additional test and comments

* comments in GameEvent

* param name typo
2023-07-14 23:15:01 -04:00
Susucre
2c505bbcac
[LTR] Implement King of the Oathbreakers (#10619)
* make a new BecomesTargetTriggeredAbility to filter on target permanents.
2023-07-14 21:32:23 -04:00
Susucre
6a9340f1aa
Introduce Duration.UntilYourNextUpkeepStep (#10600)
* add new Duration

* refactor cards with new Duration.

* fix both Durations and add unit tests.

* fix text
2023-07-12 19:40:27 -04:00
Susucre
14235b6320
Rework Ring-bearer implementation. Add GUI + gamelogs. (#10596)
* Fix Ring-bearer choosing & add some GUI + logs

* use a ring svg in a separate gold panel

* use a fontawesome svg

* add a couple null checks, group icon with commander

* rework rinbearer logic according to review

* fix typo in game log

* small fixes
2023-07-12 19:40:09 -04:00
Bobby McCann
4065e2e935
[LTR] Implement Bill Ferny, Bree Swindler (#10575) 2023-07-12 19:39:52 -04:00
Bobby McCann
09530f1cdb
[LTR] Implement Glamdring (#10574) 2023-07-12 19:39:31 -04:00
xenohedron
1e1423a101 add test; closes #9646 2023-07-10 07:17:03 -04:00
Bobby McCann
73104f6705
[LTR] Implement Radagast the Brown; also resolves #9419 (#10568)
* Fix #9419 bug with EntersBattlefieldThisOrAnotherTriggeredAbility
* Add test for Radagast as well as Risen Reef and Caldaia Guardian
* Minor associated cleanup for EntersBattlefieldAllTriggeredAbility
* New PermanentEnteringBattlefieldManaValue
2023-07-09 22:04:45 -04:00
Susucre
f8b1ada369
Fix RevealTargetFromHandCost when no target in hand (#10593)
* [CSP] Fix the RevealTargetFromHandCost not allowing payment when no valid card to reveal

* cleanup text of cost

* fix martyr of bones text

* fix test using a Martyr of Sands
2023-07-09 16:42:16 -04:00
Susucre
2b2d3b979e
add unit tests for Shelob, Child of Ungoliant (#10586) 2023-07-08 13:08:41 -04:00