Skip to content

fix: remove duplicate ValuePropExtensions; update TalkCmd.Play signature#5

Open
nafeger wants to merge 1 commit into
cpimhoff:mainfrom
nafeger:fix/remove-duplicate-extension-methods
Open

fix: remove duplicate ValuePropExtensions; update TalkCmd.Play signature#5
nafeger wants to merge 1 commit into
cpimhoff:mainfrom
nafeger:fix/remove-duplicate-extension-methods

Conversation

@nafeger
Copy link
Copy Markdown

@nafeger nafeger commented May 24, 2026

Closes #4

Summary

  • Sts2NativeExtensions.cs: Removed IsPoweredAttack, IsPoweredCardOrMonsterMoveBlock, and IsCardOrMonsterMove — all three are now part of the native sts2 API (MegaCrit.Sts2.Core.ValueProps.ValuePropExtensions). Having them defined in both assemblies under the same namespace causes CS0121 ambiguity errors in any mod that uses them.
  • CoinFlip.cs: TalkCmd.Play signature changed from (LocString, Creature, double) to (LocString, Creature, VfxColor, VfxDuration). Updated both call sites to pass VfxColor.Green/VfxColor.Red and VfxDuration.Standard.

Root cause

The Sts2NativeExtensions.cs file was added as a polyfill before these methods existed in the game. Now that the game exposes them natively at the same fully-qualified name and namespace, the C# compiler cannot resolve which assembly's definition to use — even with explicit static calls.

Test plan

  • dotnet build on a fresh mod generated from the template produces 0 errors
  • Coin flip plays the correct speech bubble color on heads (green) and tails (red)

🤖 Generated with Claude Code

…nature

IsPoweredAttack, IsPoweredCardOrMonsterMoveBlock, and IsCardOrMonsterMove
are now part of the native sts2 API. Keeping ModSmith's re-exports in the
same namespace causes CS0121 ambiguity errors for any mod that references
both assemblies.

TalkCmd.Play signature changed from (LocString, Creature, double) to
(LocString, Creature, VfxColor, VfxDuration) — updated CoinFlip template
to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IsPoweredAttack collision

1 participant