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

Protosynthesis / Quark Drive Auto-Select & Override #546

Merged
merged 6 commits into from
Sep 22, 2023

Conversation

Ericzklm
Copy link
Contributor

@Ericzklm Ericzklm commented May 1, 2023

Fixed typo in Protosynthesis that prevented the dropdown from being shown

Fixed typo in Protosynthesis that prevented the dropdown from being shown
@Ericzklm
Copy link
Contributor Author

Ericzklm commented May 1, 2023

I noticed that overrides in Protosynthesis / Quark Drive are still only active if the weather / terrain is in play or if booster energy is held.

if ((attacker.hasAbility('Protosynthesis') &&
        (field.hasWeather('Sun') || attacker.hasItem('Booster Energy'))) ||
        (attacker.hasAbility('Quark Drive') &&
            (field.hasTerrain('Electric') || attacker.hasItem('Booster Energy')))) {
        if ((move.category === 'Physical' &&
            (0, util_2.getQPBoostedStat)(attacker) === 'atk') ||
            (move.category === 'Special' && (0, util_2.getQPBoostedStat)(attacker) === 'spa')) {
            atMods.push(5325);
            desc.attackerAbility = attacker.ability;
        }
    }

Should the override ignore the weather / terrain and booster energy if one of the options is selected? For example, if Flutter Mane enters a weatherless field with booster energy, the booster energy is consumed, and symbiosis passes over a different item.

@thejetou
Copy link
Collaborator

thejetou commented May 1, 2023

Oh, I'm so sorry, I fixed this just now without checking if there were any open PRs first (I should turn on notifications for this repo...).

Should the override ignore the weather / terrain and booster energy if one of the options is selected? For example, if Flutter Mane enters a weatherless field with booster energy, the booster energy is consumed, and symbiosis passes over a different item.

That is a good point. I think to tackle this issue, you would need to add something to the effect of "Inactive" on the dropdown menu and make it automatically "Inactive" if there's no Booster Energy / Electric Terrain / Sun and "Auto-Select" if in the presence of the aforementioned conditions. Because, if you currently make the override always activate the ability, then all Quark Drive / Protosynthesis Pokemon will have a boosted stat with no way to turn it off other than changing the ability.

Thank you for your interest in the calc and I hope this mishap doesn't discourage you!

Added functionality for Protosynthesis / Quark Drive to be inactive, auto-selected, or overriden
@Ericzklm
Copy link
Contributor Author

Ericzklm commented May 3, 2023

Made changes to describe the following behavior:

  • If Protosynthesis / Quark Drive is selected without the necessary conditions to activate, the status is inactive
    • If the item is changed to booster energy or the correct weather / terrain is set, the status becomes auto select
    • If the item / weather / terrain are removed, the status reverts to inactive
    • If a specific stat is selected as the override, that stat is increased by the appropriate multiplier
      • Overriden selections are not affected by changing item / weather / terrain

Added Protosynthesis / Quark Drive to other calculators
Magic Room / Booster Energy interaction is not implemented

Ericzklm and others added 3 commits May 2, 2023 23:58
@Ericzklm Ericzklm changed the title Fixed QP Override Typo Protosynthesis / Quark Drive Auto-Select & Override May 9, 2023
@thejetou thejetou merged commit 08cfee4 into smogon:master Sep 22, 2023
@thejetou
Copy link
Collaborator

Thank you!

thejetou added a commit that referenced this pull request Sep 22, 2023
Treat Booster Energy as consumed when P/Q is active
+ #546 nits because Git wouldn't let me push to the branch.
ForwardFeed pushed a commit to ForwardFeed/damage-calc that referenced this pull request Oct 28, 2023
- If Protosynthesis / Quark Drive is selected without the necessary conditions to activate, the status is inactive
- If the item is changed to booster energy or the correct weather / terrain is set, the status becomes auto select
- If the item / weather / terrain are removed, the status reverts to inactive
- If a specific stat is selected as the override, that stat is increased by the appropriate multiplier
- Overridden selections are not affected by changing item / weather / terrain
ForwardFeed pushed a commit to ForwardFeed/damage-calc that referenced this pull request Oct 28, 2023
Treat Booster Energy as consumed when P/Q is active
+ smogon#546 nits because Git wouldn't let me push to the branch.
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