Implement Expunge enchant. Release Build 11183.
This commit is contained in:
parent
88dea6fa84
commit
a81dd94182
@ -1066,9 +1066,7 @@ namespace EnchantTests
|
|||||||
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
|
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
|
||||||
Game::Update(0.f);
|
Game::Update(0.f);
|
||||||
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
|
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
|
||||||
while(BULLET_LIST.size()>0){
|
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
|
||||||
Game::Update(1/30.f);
|
|
||||||
}
|
|
||||||
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
|
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
|
||||||
Game::Update(2.f);
|
Game::Update(2.f);
|
||||||
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should still have 925 health.");
|
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"])};
|
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
|
||||||
Game::Update(0.f);
|
Game::Update(0.f);
|
||||||
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
|
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
|
||||||
while(BULLET_LIST.size()>0){
|
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
|
||||||
Game::Update(1/30.f);
|
|
||||||
}
|
|
||||||
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
|
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
|
||||||
Game::Update(2.f);
|
Game::Update(2.f);
|
||||||
Assert::AreEqual(910,newMonster.GetHealth(),L"Monster should have lost an additional 15 health from lingering Pooling Poison.");
|
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"])};
|
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
|
||||||
Game::Update(0.f);
|
Game::Update(0.f);
|
||||||
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
|
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
|
||||||
while(BULLET_LIST.size()>0){
|
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
|
||||||
Game::Update(1/30.f);
|
|
||||||
}
|
|
||||||
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
|
Assert::AreEqual(925,newMonster.GetHealth(),L"Monster should have lost 75 health from Poison Pool.");
|
||||||
}
|
}
|
||||||
TEST_METHOD(PoisonBounceEnchantCheck){
|
TEST_METHOD(PoisonBounceEnchantCheck){
|
||||||
@ -1102,10 +1096,27 @@ namespace EnchantTests
|
|||||||
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
|
Monster&newMonster{game->SpawnMonster({30.f,0.f},MONSTER_DATA["TestName"])};
|
||||||
Game::Update(0.f);
|
Game::Update(0.f);
|
||||||
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
|
Game::CastAbilityAtLocation(player->GetAbility2(),player->GetPos()+vf2d{30.f,0.f});
|
||||||
while(BULLET_LIST.size()>0){
|
while(BULLET_LIST.size()>0)Game::Update(1/30.f);
|
||||||
Game::Update(1/30.f);
|
|
||||||
}
|
|
||||||
Assert::AreEqual(895,newMonster.GetHealth(),L"Monster should have lost 105 health from Poison Pool.");
|
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_MAJOR 1
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 5
|
#define VERSION_PATCH 5
|
||||||
#define VERSION_BUILD 11180
|
#define VERSION_BUILD 11183
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #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())};
|
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()){
|
if(curseTarget.has_value()&&!curseTarget.value().expired()){
|
||||||
const float curseDuration{"Witch.Ability 3.Curse Duration"_F};
|
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);
|
curseTarget.value().lock()->AddBuff(BuffType::DAMAGE_AMPLIFICATION,curseDuration,damageAmpMult);
|
||||||
const vf2d targetPos{curseTarget.value().lock()->GetPos()};
|
const vf2d targetPos{curseTarget.value().lock()->GetPos()};
|
||||||
for(int i:std::ranges::iota_view(0,int(util::distance(p->GetPos(),targetPos)/8))){
|
for(int i:std::ranges::iota_view(0,int(util::distance(p->GetPos(),targetPos)/8))){
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user