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

Test battlers always have their forced abilities #4707

Merged
merged 4 commits into from
Jul 21, 2024

Conversation

Sneed69
Copy link

@Sneed69 Sneed69 commented Jun 3, 2024

Discord contact info

duke5614

@AlexOn1ine
Copy link
Collaborator

AlexOn1ine commented Jun 3, 2024

I understand the idea and this makes sense for a personal project but I'm not sure if we should encourage the usage of illegal abilities in expansion. This is something we've tried to avoid. Input from others is welcome.

@Sneed69
Copy link
Author

Sneed69 commented Jun 3, 2024

image

@mrgriffin
Copy link
Collaborator

I wouldn't say we avoid it because it doesn't work. We avoid it because the core concept of the tests is to automate the kind of testing that a human would do in-game; so everything that gets added which isn't possible in-game erodes that core concept, and thus must meet a very high bar to be included.

Illegal abilities were only introduced because people implemented the gen 9 abilities before the species were available. At this point it might not actually be used and could be removed if there was an alternative approach to handling that situation—perhaps placeholder species which are off by default but on when TESTING is defined is an acceptable alternative which preserves the "battles are legal".

@AlexOn1ine
Copy link
Collaborator

I understand there is an issue with tests when users change their data but this is just a band-aid and doesn't solve the core problem.

@Sneed69
Copy link
Author

Sneed69 commented Jun 3, 2024

I am not adding any features, I'm just making an existing one fully operational. If the feature itself is a band-aid then remove it entirely instead of leaving it half working.

@AlexOn1ine
Copy link
Collaborator

AlexOn1ine commented Jun 3, 2024

If the feature itself is a band-aid then remove it entirely instead of leaving it half working.

Good point!

If nobody has anything against it I'll remove it later.

@AlexOn1ine
Copy link
Collaborator

Could you remove the test and allign the if blocks?
e.g.:

        #if TESTING
        if (gTestRunnerEnabled)
        {
            u32 side = GetBattlerSide(battler);
            u32 partyIndex = gBattlerPartyIndexes[battler];
            if (TestRunner_Battle_GetForcedAbility(side, partyIndex))
                gBattleMons[battler].ability = gBattleStruct->overwrittenAbilities[battler] = TestRunner_Battle_GetForcedAbility(side, partyIndex);
        }
        #endif

@Sneed69 Sneed69 force-pushed the forced-switch-in-abilities branch from 722090b to 0b871f0 Compare July 21, 2024 18:53
@AlexOn1ine AlexOn1ine merged commit 3fa6bf4 into rh-hideout:upcoming Jul 21, 2024
1 check passed
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.

3 participants