Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes items preventing other switch in effects #5732

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AlexOn1ine
Copy link
Collaborator

Fixes #5427

Despite the description of the issue, this was an issue with items. After a switch in when items are triggered they blocked all other effect from happening. The problem was the place they were invoked from. To fix this I Introduced ITEMEFFECT_ON_SWITCH_IN_FIRST_TURN which will only work for first turn effects and ITEMEFFECT_ON_SWITCH_IN will be used for the rest. By passing the caseID as the argument we can easily switch between the scripts we want to run.

Tests were provided by @PhallenTree

@AlexOn1ine AlexOn1ine added category: battle-mechanic Pertains to battle mechanics bugfix Bugfixes labels Nov 28, 2024
Pawkkie
Pawkkie previously approved these changes Dec 1, 2024
Copy link
Collaborator

@Pawkkie Pawkkie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a massive improvement to readability along with the bugfix. Approving but not merging in case you'd like another battle-script-centric reviewer to give it a once over first, though feel free to just merge when you wake up :)

@AlexOn1ine AlexOn1ine dismissed Pawkkie’s stale review December 1, 2024 08:43

small change incoming

@AlexOn1ine
Copy link
Collaborator Author

Sorry @Pawkkie, I found an other minor optimization to do so dismissed the review. Feel free to approve and merge again.

@Bassoonian
Copy link
Collaborator

Conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bugfixes category: battle-mechanic Pertains to battle mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch in ability bug when mulitply mons faint at the same time
3 participants