Commit graph

2030 commits

Author SHA1 Message Date
xenohedron
d9ca387fad
another batch of text gen improvements (#11247)
* describe targets: UntapTargetEffect

* describe targets: SetBasePowerToughnessTargetEffect

* cleanup text

* describe targets: RegenerateTargetEffect

* describe targets: PhaseOutTargetEffect

* adjust text

* remove superfluous param

* describe targets: TapAllTargetPlayerControlsEffect

* describe targets: TurnFaceUpTargetEffect

* describe targets: TransformTargetEffect

* describe targets: RemoveFromCombatTargetEffect

* describe targets: DetainTargetEffect

* cleanup DiscardHandTargetEffect

* describe targets: DrawCardTargetEffect

* describe targets: GainLifeTargetEffect

* describe targets: LoseLifeTargetEffect

* describe targets: ExchangeLifeTargetEffect

* describe targets: DamageTargetControllerEffect
2023-10-01 22:51:02 -04:00
xenohedron
4273d3b5ba
refactor: remove unnecessary "lockedIn" parameter (#11244)
* remove lockedIn from logic: BoostControlledEffect

* remove lockedIn field: BoostControlledEffect

* remove constructor parameter: BoostControlledEffect

* simplify BoostEnchantedEffect

* apply fix to BoostSourceEffect

* remove unused param

* refactor SetBasePowerToughnessAllEffect

* additional cleanup
2023-10-01 22:50:44 -04:00
xenohedron
bfbdf6b103
reimplement "don't cause abilities to trigger" effects (#11242) 2023-10-01 22:50:14 -04:00
xenohedron
78b5b8bdef simplify LKI check using common method 2023-09-30 16:19:18 -04:00
xenohedron
e66c9900f7 fix #11210 and similar (LKI in TapEnchantedEffect) 2023-09-26 22:46:01 -04:00
xenohedron
1a13dcd091
Merge pull request #11185 from xenohedron/becomestarget
Rework "whenever ... becomes the target of ..., " abilities
2023-09-24 22:09:14 -04:00
Oleg Agafonov
b80f440e15 game: fixed some NPE errors 2023-09-23 07:41:18 +04:00
xenohedron
cd5ee1c31d text fixes 2023-09-22 23:38:16 -04:00
Oleg Agafonov
a9152e886f refactor: improved ContinuousRuleModifying effects:
* removed unused apply methods;
* added miss overrides of checksEventType (related to wrong event usage, see 5f2edde20c).
2023-09-22 21:32:55 +04:00
xenohedron
fa8e93a29d
rework CombatDamageByToughnessAllEffect (#11180)
new CombatDamageByToughnessControlledEffect
add tests
fix #11179
2023-09-19 01:41:55 -04:00
xenohedron
0ad678ff56
enable multiple added subtypes in CreateTokenCopyTargetEffect (#11181)
fix #11176
2023-09-19 01:41:40 -04:00
Oleg Agafonov
4e77ccb381 refactor: removed unused data from special action, improved code (related to #11137) 2023-09-17 14:37:49 +04:00
Susucre
58fdbc9345
[CMB1] Implement Frogkin Kidnapper (#11137) 2023-09-15 17:55:24 -04:00
Vivian Greenslade
8c1a4d1fa6
[WOC] Implement Misleading Signpost (#11084)
* [WOC] Implement Misleading Signpost

* moved effect to common file

* added unit test

* added battle to test

* updated effect name, fixed list of defenders

* fix test text

* added text for effect

* fixed target

* made changes as per PR comments

* added unit test for 508.7c
2023-09-09 15:32:04 -04:00
Susucre
8b79053deb
[WOC] Implement Court of Garenbrig (#10970)
* add DoubleCounterOnEachPermanentEffect

* Clean text generation of ConditionalOneShotEffect to prevent "if if"

* [WOC] Implement Court of Garenbrig

* better rule generation

* fix target, add tests
2023-09-09 15:31:49 -04:00
Susucre
249e7bf31b
[WOC] Implement Court of Embereth (#10971)
* Clean text generation of ConditionalOneShotEffect to prevent "if if"

* [WOC] Implement Court of Embereth
2023-09-08 23:57:36 -04:00
xenohedron
144b261fc2 another batch of text fixes 2023-09-07 02:22:16 -04:00
xenohedron
34b671bc83 cleanup add color/subtype attached effects 2023-09-07 02:22:16 -04:00
xenohedron
72be1856f7 describe targets: look at hand; can't be blocked 2023-09-07 02:22:16 -04:00
Oleg Agafonov
4b3a19b4d5 refactor: improved target usage, replaced setNotTarget by withNotTarget 2023-09-07 05:35:54 +04:00
Susucre
7b5139742f
[JUD] Fix Wormfang Turtle & Wormfang Newt (#11100)
text generation & wrongly targetting
2023-09-05 22:27:19 -04:00
Oleg Agafonov
8a65b0f149 refactor: removed netbeans's auto-generated comments 2023-09-02 16:05:29 +04:00
Susucre
344ff81a37
[WOE][WOC] Fixed card texts, fixed Free the Fae (#11098)
* fix name compare when both full and small name are used
* fix Free the Fae, it is mandatory
2023-09-02 15:40:40 +04:00
xenohedron
d6c690601d
Merge pull request #11031 from xenohedron/cleanup-7a-7b
More SetBasePowerToughnessSourceEffect cleanup
2023-08-31 00:29:59 -04:00
Oleg Agafonov
060b8f9dc9 backup ability: fixed wrong duration and discard in Streetwise Negotiator, added related tests and runtime/verify checks (related to #11068) 2023-08-31 07:29:05 +04:00
Oleg Agafonov
6768184e18 typo fixed (related to #11068), added backup ability docs 2023-08-31 06:06:47 +04:00
xenohedron
22961162ad text fixes related to recent updates 2023-08-30 20:54:27 -04:00
Vivian Greenslade
a65c2204ce
Rework CombatDamageByToughness effects (#11068)
* split effect into three classes for convenience

* added static filter

* refactored cards using effect

* fixed issues as per PR comments

* changed predicate and fixed text

* added unit test, fixed text issues with Baldin

* set static text

* changed outcome

* added stop to test

* fixs issues as per PR comments
2023-08-30 20:16:14 -04:00
Susucre
96a2c277b2
clean some of the most frequent copy constructor / copy method (#11053) 2023-08-30 19:48:03 -04:00
Susucre
9abe115c68
more cleanup of copy method/constructor (#11056) 2023-08-30 19:17:05 -04:00
Susucre
fab00d2f27
[WOE] Implement Curse of the Werefox (#11009)
* [WOE] Implement Curse of the Werefox

* apply review

* Fix aura (and equipment?) tokens not checking for protection on target

* fix targetting of reflexive trigger, by creating a custom fight effect.

* fix reflexive ability target.
2023-08-30 19:16:22 -04:00
Susucre
2a5dd4103c
[WOE] Implement Ashiok, Wicked Manipulator (#10909)
* [WOE] Implement Ashiok, Wicket Manipulator

* Add Ashiok's abilities

* basic pay life replacement tests

* many tests later

* add warning on token expecting watcher

* apply review

* rework text generation
2023-08-30 19:15:56 -04:00
xenohedron
a427406d5f fix Sutured Ghoul 2023-08-29 23:33:59 -04:00
Susucre
fa778d352d
[WOE] Implement Elusive Otter (#11061) 2023-08-29 09:35:34 -04:00
Alex Vasile
a2162ec3e7
Refactor: private fields and performance tweaks (#9625)
1a. Make `costs`, `manaCosts`, and `manaCostsToPay` private in `AbilityImpl` with access through getters/setters 
1b. fix cost adjuster for imprinted cards affected by the above

2a. Lazy instantiation for rarely used `data` field in `TargetPointerImpl`

3a. Pre-allocate certain array sizes in `Modes` and `CostsImpl`

4a. Make `manaTemplate` private in `BasicManaEffect`, copy when passing outside the class 
4b. Don't copy `manaTemplate` in copy constructor since it doesn't change 
4c. Add comments explaining copy usage for `manaTemplate` 
4d. Remove redundant variable assignment and make fields final 

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-08-27 17:58:19 -04:00
xenohedron
476136b766 add logic to check zcc 2023-08-27 00:28:37 -04:00
xenohedron
2eab7836f6 cleanup SetBasePowerToughnessSourceEffect usages 2023-08-26 23:51:49 -04:00
xenohedron
ab0abcfd22 simplify SetBaseToughnessSourceEffect
fix Duration.WhileOnBattlefield -> Duration.Custom in some effects
2023-08-26 23:51:33 -04:00
xenohedron
33a859cb68 simplify SetBasePowerSourceEffect 2023-08-26 23:51:33 -04:00
xenohedron
c84fbfd00e new SetBasePowerToughnessPlusOneSourceEffect 2023-08-26 23:51:33 -04:00
xenohedron
5d0c1c96c8 remove sublayer parameter in SetBasePowerToughnessSourceEffect 2023-08-26 23:14:30 -04:00
xenohedron
dcca63b963 more text fixes! 2023-08-26 23:04:13 -04:00
xenohedron
70bf68a5a4 simplify constructors in GainAbilityAllEffect 2023-08-26 21:53:08 -04:00
xenohedron
869de1eac6
fix getText() overrides ignoring staticText (#11044)
* fix text: SkipNextPlayerUntapStepEffect

* remove old copyright info

* individual card text fixes

* fix overrides ignoring staticText
2023-08-26 20:47:02 -04:00
Susucre
52eaa600ba
text fixes [ALA] [CON] [ARB] (#11036)
* Tweak verify for double cycling
* small fixes
* do not verify some GUI-related rules.
2023-08-26 20:46:49 -04:00
Susucre
a9870b6ff8
text fixes [WOE] etc. (#11035)
* Fix Callous Sell Sword text

* simple text fixes

* fix some target texts
2023-08-26 19:34:49 -04:00
Susucre
c4e48a6f95
[WOE] Implement The End (without breaking morph tests this time) (#11041)
* [WOE] Implement The End

* add cost reduction

* apply review

* fix tests looking for morphs
2023-08-26 19:34:21 -04:00
Susucre
aa71f0ba8a
Refactor DoIfCostPaid; Inform player on cost not paid. (#10942) 2023-08-26 17:29:30 -04:00
xenohedron
4d03deda12
Revert "[WOE] Implement The End (#10921)" (#11040)
This reverts commit fe93d68b1c.
2023-08-26 17:28:09 -04:00
xenohedron
66cc15ed4b
Cleanup copy methods (#11038)
* remove System.out.println
* Card copy() covariant return
* Effect copy() covariant return
* Cost copy() covariant return
* Ability copy() covariant return
* ContinuousEffect copy() covariant return
2023-08-26 16:47:54 -04:00