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

Captured damage on non array's is 0 #5977

Open
AlexOn1ine opened this issue Jan 8, 2025 · 1 comment
Open

Captured damage on non array's is 0 #5977

AlexOn1ine opened this issue Jan 8, 2025 · 1 comment
Labels
bug Bug category: battle-tests Related to the automated test environment status: unconfirmed This bug has not been reproduced yet

Comments

@AlexOn1ine
Copy link
Collaborator

AlexOn1ine commented Jan 8, 2025

Description

The following test passes (all charge tests) with both EXPECT_MUL_EQ and EXPECT_EQ. The resulting printed value of both is 0

SINGLE_BATTLE_TEST("Charge doubles the damage of the next Electric move of the user")
{
    s16 normalDamage = 0;
    s16 chargedUpDamage = 0;

    GIVEN {
        PLAYER(SPECIES_WOBBUFFET);
        OPPONENT(SPECIES_WOBBUFFET);
    } WHEN {
        TURN { MOVE(player, MOVE_THUNDERBOLT); }
        TURN { MOVE(player, MOVE_CHARGE); }
        TURN { MOVE(player, MOVE_THUNDERBOLT); }
    } SCENE {
        ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDERBOLT, player);
        HP_BAR(opponent, captureDamage: &normalDamage);
        ANIMATION(ANIM_TYPE_MOVE, MOVE_CHARGE, player);
        ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDERBOLT, player);
        HP_BAR(opponent, captureDamage: &chargedUpDamage);
    } THEN {
        EXPECT_MUL_EQ(normalDamage, Q_4_12(2.0), chargedUpDamage);
    }
}

Version

1.10.1 (Latest release)

Upcoming/master Version

No response

Discord contact info

No response

@AlexOn1ine AlexOn1ine added bug Bug status: unconfirmed This bug has not been reproduced yet category: battle-tests Related to the automated test environment labels Jan 8, 2025
@DizzyEggg
Copy link
Collaborator

We could add EXPECT_NE(normalDamage, 0) to make sure damage is not zero, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug category: battle-tests Related to the automated test environment status: unconfirmed This bug has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants