29 lines
1022 B
C++
29 lines
1022 B
C++
#include <CreatureLib/Battling/Models/ExecutingAttack.hpp>
|
|
#include <PkmnLib/Battling/Battle/Battle.hpp>
|
|
#include <PkmnLib/Battling/Pokemon/CreatePokemon.hpp>
|
|
#include "../../../../extern/doctest.hpp"
|
|
#include "../../Macros/MoveMacros.hpp"
|
|
|
|
TEST_CASE("Absorb - Heals on use") {
|
|
SETUP_MOVE_TEST(Absorb)
|
|
|
|
userMon->Damage(50, CreatureLib::Battling::DamageSource::AttackDamage);
|
|
executingMove->GetHitData(targetMon, 0).SetDamage(50);
|
|
script->OnSecondaryEffect(executingMove, targetMon, 0);
|
|
CHECK(userMon->GetCurrentHealth() == userMon->GetMaxHealth() - 25);
|
|
|
|
CLEANUP_MOVE_TEST
|
|
}
|
|
|
|
TEST_CASE("Absorb - Heals more with big root") {
|
|
SETUP_MOVE_TEST(Absorb)
|
|
|
|
userMon->Damage(50, CreatureLib::Battling::DamageSource::AttackDamage);
|
|
executingMove->GetHitData(targetMon, 0).SetDamage(50);
|
|
userMon->SetHeldItem("big_root"_cnc.GetHash());
|
|
script->OnSecondaryEffect(executingMove, targetMon, 0);
|
|
CHECK(userMon->GetCurrentHealth() == userMon->GetMaxHealth() - 18);
|
|
|
|
CLEANUP_MOVE_TEST
|
|
}
|