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

Issue: Enemies That Counterattack and Deal No Damage Do Not Consume Ammo #1818

Open
FruityGumGuiltyFruit opened this issue Oct 18, 2024 · 0 comments
Labels
bug Something isn't working Confirmed fixed/done bug has been resolved

Comments

@FruityGumGuiltyFruit
Copy link
Contributor

FruityGumGuiltyFruit commented Oct 18, 2024

Describe the bug
When Sophie attacks an enemy unit during her COP, the enemy's counterattack does not consume any ammo. I have traced this bug to her getDamageReduction attribute. The battle animation shows the enemy's counterattack, but no ammo is lost.

During the enemy's turn, the units do consume ammo when attacking Sophie during her COP, which is correct.

UPDATE:
This issue affects any unit that counterattacks and deals no damage; it is not exclusive to getDamageReduction.

To Reproduce
Steps to reproduce the behavior:

  1. Play a map as Sophie
  2. Activate COP and attack an enemy that can counterattack
  3. See error

Expected behavior
The enemy unit should consume the ammo of the weapon it used to counterattack.

Screenshots
image
Video showing the issue:
https://github.com/user-attachments/assets/de320042-87cc-42ea-8262-c8d62601f6e7

Desktop (please complete the following information):
OS: [Windows 10 Home]
Version [22h2]
Active Mods (Issue was discovered while coding a custom CO, but bug happens even in vanilla)
Game Version [v0.37,2-main]

Additional context
I tried adding a "+ 1" to Sophie's code, and it made the units consume ammo, possibly because the attack did damage.

                if (isDefender === true)
                {
                    return damage + 1;
                }
                ```
@FruityGumGuiltyFruit FruityGumGuiltyFruit changed the title Issue: Enemies That Counterattack Sophie During Her CO Power Do Not Consume Ammo Issue: Enemies That Counterattack and Deal No Damage Do Not Consume Ammo Oct 19, 2024
Robosturm added a commit that referenced this issue Oct 22, 2024
@Robosturm Robosturm added bug Something isn't working fixed/done bug has been resolved Confirmed labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Confirmed fixed/done bug has been resolved
Projects
None yet
Development

No branches or pull requests

2 participants