Implement Expunge enchant. Release Build 11183.

pull/65/head
sigonasr2 5 months ago
parent 88dea6fa84
commit a81dd94182
  1. 35
      Adventures in Lestoria Tests/EnchantTests.cpp
  2. 2
      Adventures in Lestoria/Version.h
  3. 3
      Adventures in Lestoria/Witch.cpp
  4. BIN
      x64/Release/Adventures in Lestoria.exe

@ -1066,9 +1066,7 @@ namespace EnchantTests
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
Game::Update(0.f);
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
while(BULLET_LIST.size()>0){
Game::Update(1/30.f);
}
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
Game::Update(2.f);
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should still have 925 health.");
@ -1079,9 +1077,7 @@ namespace EnchantTests
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
Game::Update(0.f);
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
while(BULLET_LIST.size()>0){
Game::Update(1/30.f);
}
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
Game::Update(2.f);
Assert::AreEqual(910,newMonster.GetHealth(),L"Monster should have lost an additional 15 health from lingering Pooling Poison.");
@ -1091,9 +1087,7 @@ namespace EnchantTests
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
Game::Update(0.f);
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
while(BULLET_LIST.size()>0){
Game::Update(1/30.f);
}
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
}
TEST_METHOD(PoisonBounceEnchantCheck){
@ -1102,10 +1096,27 @@ namespace EnchantTests
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
Game::Update(0.f);
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
while(BULLET_LIST.size()>0){
Game::Update(1/30.f);
}
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
Assert::AreEqual(895,newMonster.GetHealth(),L"Monster should have lost 105 health from Poison Pool.");
}
TEST_METHOD(ExpungeNoEnchantCheck){
Game::ChangeClass(player,WITCH);
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
Game::Update(0.f);
Game::CastAbilityAtLocation(player->GetAbility3(),player->GetPos()+vf2d{30.f,0.f});
player->AutoAttack();
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
Assert::AreEqual(970,newMonster.GetHealth(),L"Monster should have taken double damage from Curse of Death.");
}
TEST_METHOD(ExpungeEnchantCheck){
Game::ChangeClass(player,WITCH);
Game::GiveAndEquipEnchantedRing("Expunge");
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
Game::Update(0.f);
Game::CastAbilityAtLocation(player->GetAbility3(),player->GetPos()+vf2d{30.f,0.f});
player->AutoAttack();
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
Assert::AreEqual(962,newMonster.GetHealth(),L"Monster should have taken 150% more damage with Curse of Death.");
}
};
}

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 5
#define VERSION_BUILD 11180
#define VERSION_BUILD 11183
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -179,7 +179,8 @@ void Witch::InitializeClassAbilities(){
std::optional<std::weak_ptr<Monster>>curseTarget{Monster::GetNearestMonster(pos,"Witch.Ability 3.Casting Range"_F/100.f*24,p->OnUpperLevel(),p->GetZ())};
if(curseTarget.has_value()&&!curseTarget.value().expired()){
const float curseDuration{"Witch.Ability 3.Curse Duration"_F};
const float damageAmpMult{"Witch.Ability 3.Damage Amplification"_F/100.f};
float damageAmpMult{"Witch.Ability 3.Damage Amplification"_F/100.f};
if(p->HasEnchant("Expunge"))damageAmpMult+="Expunge"_ENC["BONUS DAMAGE"]/100.f;
curseTarget.value().lock()->AddBuff(BuffType::DAMAGE_AMPLIFICATION,curseDuration,damageAmpMult);
const vf2d targetPos{curseTarget.value().lock()->GetPos()};
for(int i:std::ranges::iota_view(0,int(util::distance(p->GetPos(),targetPos)/8))){

Loading…
Cancel
Save