Skip to content

Conversation

@sudo-owen
Copy link
Collaborator

@sudo-owen sudo-owen commented Feb 8, 2026

.

Key Changes

New Contracts

  • DualFlow.sol: A special attack that hits twice with independent RNG rolls, dealing cumulative damage
  • NineNineNine.sol: A setup move that boosts critical hit rate to 90% for the next turn
  • SneakAttack.sol: A special attack that can target non-active opponent and can only be used once per switch-in
  • SaviorComplex.sol: An ability that grants a special attack boost (15-30% depending on KO count) when switching in, triggered only once per game

Test Suite (EkinekiTest.sol)

Comprehensive test coverage including:

  • DualFlow dealing more damage than equivalent single-hit attacks
  • SneakAttack successfully targeting non-active Pokémon
  • SneakAttack one-use-per-switch-in restriction
  • SneakAttack reset on switch-in via SaviorComplex
  • NineNineNine crit rate boost mechanics
  • SaviorComplex boost application based on KO count (1 KO = 15%, 2 KOs = 25%, 3+ KOs = 30%)
  • SaviorComplex one-trigger-per-game restriction
  • SaviorComplex correctly skipping boost when no KOs exist

Implementation Details

  • State Persistence: Uses ENGINE.getGlobalKV() and ENGINE.setGlobalKV() to track move usage and ability triggers across turns
  • Flexible Targeting: SneakAttack bypasses standard active-mon-only targeting by manually constructing damage calculation context
  • RNG Handling: DualFlow generates independent RNG for each hit using keccak256 hashing
  • Ability Integration: SaviorComplex hooks into activateOnSwitch() to reset SneakAttack usage and apply conditional stat boosts

https://claude.ai/code/session_011WmJgts8AesNNrDaccz2fn

- SaviorComplex ability: on switch-in, boosts sp atk by 15/25/30%
  based on KO'd teammates (1/2/3+), triggers once per game
- DualFlow: hits twice at 50bp each, 3 stamina, Liquid/Special
- SneakAttack: targets any opponent mon (including bench), 60bp,
  2 stamina, Liquid/Special, once per switch-in
- NineNineNine (999): sets crit rate to 90% for next turn, Math/Self,
  2 stamina. Other moves check this via shared EkinekiLib global KV
- EkinekiLib: shared library for global KV key management across
  ekineki contracts (999 crit boost, sneak attack tracking, savior
  complex once-per-game flag)
- 8 tests covering all moves and ability edge cases

https://claude.ai/code/session_011WmJgts8AesNNrDaccz2fn
- Rename EkinekiLib → NineNineNineLib (only 999 crit rate logic)
- Inline sneak attack KV tracking in SneakAttack and SaviorComplex
- Inline savior complex once-per-game KV tracking in SaviorComplex
- Change SaviorComplex sp atk boost from Perm to Temp (cleared on
  switch out)
- Update test assertion for temp boost behavior

https://claude.ai/code/session_011WmJgts8AesNNrDaccz2fn
…obal effect

SneakAttack now implements BasicEffect and registers itself as a global effect
on first use. Its onMonSwitchIn hook resets the once-per-switch-in flag,
removing the parasitic dependency on SaviorComplex's activateOnSwitch.

https://claude.ai/code/session_011WmJgts8AesNNrDaccz2fn
… 999 files

SneakAttack now adds itself as a local effect on the attacker's mon.
Effect presence = already used, removed on switch-out via onMonSwitchOut.
No global KV needed — cleaner than global effect and scoped to ekineki only.

Also rename NineNineNine.sol -> 999.sol and NineNineNineLib.sol -> 999Lib.sol.

https://claude.ai/code/session_011WmJgts8AesNNrDaccz2fn
@sudo-owen sudo-owen changed the title Add Ekineki Pokémon with dual-hit move and ability mechanics Add Ekineki Feb 8, 2026
- Expose getKOBitmap in IEngine/Engine; SaviorComplex uses bitmap popcount
  instead of iterating all mons
- Rename DualFlow -> BubbleBop (file and contract)
- Add Overflow move (Math type, 90bp, 3 stamina, 999 crit rate dependency)
- Add all ekineki moves and ability to drool/ CSV files

https://claude.ai/code/session_011WmJgts8AesNNrDaccz2fn
SneakAttack now declares ExtraDataType.OpponentTeamIndex so the CPU
knows to provide a random opponent mon index. Added the new enum variant
and handling in CPU.sol.

https://claude.ai/code/session_011WmJgts8AesNNrDaccz2fn
CPU now uses getKOBitmap to only pick non-KO'd opponent mons when
selecting a target for OpponentNonKOTeamIndex moves like SneakAttack.

https://claude.ai/code/session_011WmJgts8AesNNrDaccz2fn
@sudo-owen sudo-owen merged commit 038eb09 into main Feb 8, 2026
1 check passed
@sudo-owen sudo-owen deleted the claude/add-ekineki-folder-SVN65 branch February 8, 2026 06:39
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.

2 participants