Skip to content

Conversation

@sudo-owen
Copy link
Collaborator

No description provided.

@sudo-owen sudo-owen merged commit 2e69b4d into main Aug 24, 2024
@sudo-owen sudo-owen deleted the feat/refactor-teams-and-add-registry branch September 4, 2024 22:54
sudo-owen pushed a commit that referenced this pull request Jan 16, 2026
This commit fixes several critical issues in the doubles implementation:

Issue #1: Switch effects now pass explicit monIndex
- _handleSwitchCore passes currentActiveMonIndex to switch-out effects
- _completeSwitchIn passes monToSwitchIndex to switch-in effects

Issue #2: Move validation now receives slotIndex
- validateSpecificMoveSelection accepts slotIndex parameter
- Uses _getActiveMonIndexFromContext to get correct mon for validation

Issue #3: AfterDamage effects pass explicit monIndex
- dealDamage now passes monIndex to effect execution

Issue #4: OnUpdateMonState effects pass explicit monIndex
- updateMonState now passes monIndex to effect execution

Also adds:
- Overloaded _runEffects that accepts explicit monIndex
- EffectApplyingAttack mock for testing
- MonIndexTrackingEffect mock for testing
- Tests: test_afterDamageEffectsRunOnCorrectMon,
         test_moveValidationUsesCorrectSlotMon
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