Commit Graph

8503 Commits

Author SHA1 Message Date
Christian 'ketura' McCarty
63659541fd Fixed cards with abilities that activate while stacked crashing the game if using certain filters. Added unit tests for Uruk Veteran and Uruk Trooper. 2024-09-11 20:49:50 -05:00
Christian 'ketura' McCarty
e2110fa746 Play from discard with variable discount fixes
- Added MaxDiscount field to PlayFromDiscard, which is used while calculating candidates
- Fixed Black Sails of Umbar crashing in several places
- Added unit tests for Black Sails
2024-09-07 16:28:03 -05:00
MarcinSc
db96a53033 Refactored "preventable" to separate class, so that other EffectAppenderProducers can easily use it 2024-06-06 21:42:46 +07:00
Christian 'ketura' McCarty
4ee23c86a0 Site Control trigger reworks
- Added SiteLiberated trigger with associated helper classes
- Renamed trigger TakenControlOfSite -> SiteControlled
- Renamed result TakeControlOfSiteResult -> SiteControlledResult
- Renamed trigger enum TAKE_CONTROL_OF_SITE -> CONTROL_SITE
- Implemented V2_1 Driven Into The Hills, which uses a liberate trigger, with associated tests
- Fixed Rapt Hillman liberation not being optional
2024-06-02 15:32:22 -05:00
Christian 'ketura' McCarty
e4493e227a Cleaning up V2 cards to match the new card definitions 2024-06-02 13:51:23 -05:00
Christian 'ketura' McCarty
17ce92011f Somehow the V2 hand/ranged weapon test got mangled 2024-06-02 13:36:40 -05:00
Christian 'ketura' McCarty
c24cda8bd0 V2 hjson fixes 2024-06-02 13:36:22 -05:00
Christian 'ketura' McCarty
76f7b7a378 Mass fix of capitalization for hasKeyword 2024-06-02 13:20:23 -05:00
Christian 'ketura' McCarty
a6f7de9884 V2 timeword test fixes 2024-06-02 13:18:46 -05:00
Christian 'ketura' McCarty
cedc6f629c V2 Test upgrades 2024-06-02 13:07:39 -05:00
Christian 'ketura' McCarty
d5dd25435a V2 test upgrades 2024-06-02 12:56:52 -05:00
Christian 'ketura' McCarty
54aa812f08 Merge remote-tracking branch 'mock/v2_gondor_cards' into grand-card-rework
# Conflicts:
#	gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/AllyHomeFieldProcessor.java
2024-06-02 11:45:45 -05:00
Christian 'ketura' McCarty
aa1baf84f2 Changing Ford of Bruinen and Dimrill Dale to use PerTurn/PerPhase limits instead of in-zone data, so now they shouldn't flash at the end of turn/end of shadow phase. 2024-06-02 02:40:09 -05:00
Christian 'ketura' McCarty
8c13cc3945 Refactoring some comma-delimited fields to arrays
- Updated ChooseAKeyword to accept an array of keyword strings instead of a comma-delimited list.
- Updated TurnIntoMinions to accept an array of keyword strings instead of a comma-delimited list.
- Added keyword checking for both above effects to ensure the keywords requested don't crash at runtime
- Overhauled ally home site definition.  Blueprint now stores an array of HomeSite objects, which are records storing a SiteBlock/SiteNumber pair apiece.
- Ally home sites can now be defined in one of two ways: a short string like "2F" indicating "Fellowship block site 2", or in a more explicit JSON object defining both Block and Site as separate fields.  Both of these can be present in an array (even mixed) for multiple home sites.
2024-06-02 00:33:58 -05:00
Christian 'ketura' McCarty
6a05210198 Rename StackCards -> StackCardsFromPlay 2024-06-01 18:50:27 -05:00
Christian 'ketura' McCarty
543ffdc453 Fleshed out Spot's parameter checking a bit more. 2024-06-01 17:15:12 -05:00
Christian 'ketura' McCarty
077c068951 Consolidated ShuffleCardsFromPlayAndStackedOnThemIntoDrawDeck into ShuffleCardsFromPlayIntoDrawDeck 2024-06-01 16:21:46 -05:00
Christian 'ketura' McCarty
84536eed09 Effect tweaks
- Renamed RemoveTokens -> RemoveCultureTokens to match the corresponding Add effect
- in DoWhile, renamed parameter condition -> check
- Rearranged order of effects to put meta/control-flow effects at the top.
2024-06-01 15:31:06 -05:00
Christian 'ketura' McCarty
3d73e415ea Fixing broken block definitions 2024-06-01 13:22:40 -05:00
Christian 'ketura' McCarty
48f7157b62 Effect tweaks
- Converted PreventExert to a generic PreventCardEffectAppender
- Deleted ReduceArcheryTotal and converted the relevant cards to use a choosenumber/modifyarchery effect combo
- Altered PlaySite to use SiteBlock's existing parsing instead of the generic enum parse
- Deleted unused parameter on RemoveAllTokens
2024-05-31 23:36:28 -05:00
Christian 'ketura' McCarty
291fcd43fa PlayCardFromX effect tweaks
- Renamed play -> playCardFromHand to match the other playCardFromX effects.
- Renamed cost -> discount for all PlayCardFromX effects
- Pared down PlayCardFromDeadPile to not have so many unusable parameters
2024-05-31 20:42:14 -05:00
Christian 'ketura' McCarty
0ff050cd9e Fixing some malformed If conversions in the hobbit cards 2024-05-31 19:08:48 -05:00
Christian 'ketura' McCarty
43184e3967 Renamed MemorizeValue -> MemorizeInfo. Minor parameter tweaks in other effects. 2024-05-31 13:42:48 -05:00
Christian 'ketura' McCarty
26d875e353 Merge remote-tracking branch 'marcin/grand-card-rework' into grand-card-rework 2024-05-31 12:37:52 -05:00
MarcinSc
c545adf752 Extracted Timeword (Response, Fellowship, Shadow, etc) from Keywords 2024-05-31 18:22:33 +07:00
MarcinSc
45922abb34 Fixed "Into the Caves" 2024-05-31 15:14:01 +07:00
MarcinSc
2df77941d8 Improved the performance of filtering in places that don't need entire matching collection 2024-05-31 14:36:50 +07:00
Christian McCarty
fa41822a29 Merge pull request #73 from MarcinSc/grand-card-rework
Continued cleanup and fixes
2024-05-31 02:22:33 -05:00
MarcinSc
562597677b Removed the "can_star_with_ring" keyword - replaced with proper flag 2024-05-31 14:19:05 +07:00
MarcinSc
7389323689 Removed the "can_star_with_ring" keyword - replaced with proper flag 2024-05-31 14:05:23 +07:00
MarcinSc
89fbe97eb7 Removed the "can_star_with_ring" keyword - replaced with proper flag 2024-05-31 14:02:23 +07:00
MarcinSc
dc6f931f9c Merge remote-tracking branch 'upstream/grand-card-rework' into grand-card-rework
# Conflicts:
#	gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set03/set3-shire.hjson
#	gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/EffectAppenderFactory.java
#	gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/DiscardFromHandBy.java
2024-05-31 13:35:02 +07:00
Christian 'ketura' McCarty
d05d21e62c Consolidated Conditional/If -> If. Altered if's logic to treat no effects as not playable in full 2024-05-31 00:45:23 -05:00
Christian 'ketura' McCarty
a7577d1105 Effect tweaks
- If: renamed parameter condition -> check
- ExchangeSite: renamed parameters selector1/selector2 -> site1/site2
- Fixed the stacked cards exchanger malformed value definition
- Various parameter checks
2024-05-30 23:41:06 -05:00
Christian 'ketura' McCarty
2c940c079b Rename AddTokens -> AddCultureTokens. Adding parameter checks to AddCultureTokens and AddKeyword. 2024-05-30 20:26:51 -05:00
Christian 'ketura' McCarty
9b75e62a1c Consolidated PlayedFromStacked/Played -> Played 2024-05-30 18:49:16 -05:00
Christian 'ketura' McCarty
c310817cf3 Consolidated KilledInSkirmish -> Killed. Fixed bad condition in combined killed trigger code. 2024-05-30 17:11:19 -05:00
Christian 'ketura' McCarty
a88e9a6c2d Consolidating KilledBy/Killed -> Killed 2024-05-30 16:37:24 -05:00
Christian 'ketura' McCarty
9c2fa0479f Consolidating Exerts / ExertedBy -> Exerted 2024-05-30 16:30:15 -05:00
Christian 'ketura' McCarty
5ae6a7def7 Trigger cleanup
- BeforeThreatWounds: killedFilter -> filter
- Consolidated all DiscardedFromX into Discarded
- Rearranged order of some triggers
2024-05-30 15:45:50 -05:00
MarcinSc
4508d89ff3 Continued cleanup and fixes 2024-05-30 15:17:41 +07:00
Christian 'ketura' McCarty
b7d21879af Fixed defaults on some requirements for consistency across similar requirements. Rearranged order of some requirements. 2024-05-30 00:18:51 -05:00
Christian 'ketura' McCarty
e81128f787 Fixing CanPlayFromDiscard bad definition. Rearranging requirements to put operations at the top 2024-05-29 22:58:53 -05:00
Christian 'ketura' McCarty
9f42fbd555 Consolidating RemoveText -> DisableGameText. Refactoring away the three XUsesYInsteadOfZ stat altering modifiers. Making phase required in SkipPhase. 2024-05-29 22:07:56 -05:00
Christian 'ketura' McCarty
0e61865213 Altering keyword parameter to be required for RemoveKeyword. 2024-05-29 21:36:27 -05:00
Christian 'ketura' McCarty
1bb4e4dd19 Altering ModifyRoamingPenalty to accept an evaluated value rather than an integer. 2024-05-29 21:16:06 -05:00
Christian 'ketura' McCarty
be82005de9 Deleting the ArcheryTotal modifier, as it is a duplicate of the superior ModifyArcheryTotal 2024-05-29 20:53:59 -05:00
Christian 'ketura' McCarty
78cd84e775 Removed FPCantAssignToSkirmish. Expanded CantBeAssignedToSkirmish and associated modifier to accept a player value. 2024-05-29 20:42:55 -05:00
Christian 'ketura' McCarty
136bb0170c Consolidating both CantUseSpecialAbilities and PlayerCantUseSpecialAbilities (formerly called CantPlaySpecialAbilities) under CantUseSpecialAbilities (but using the superior implementation of CantPlaySpecialAbilities). 2024-05-29 19:59:36 -05:00
Christian 'ketura' McCarty
2e04760c6f Renamed cantPlaySpecialAbilities -> PlayerCantUseSpecialAbilities 2024-05-29 19:19:29 -05:00