#include #include #include #include "../../../../extern/catch.hpp" #include "../../Macros/MoveMacros.hpp" TEST_CASE("Absorb - Heals on use", "[moves]") { 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", "[moves]") { 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 }