Cone of Cold isUseful check

This commit is contained in:
Bobblybook
2024-07-23 18:09:55 +10:00
parent 9fd5005030
commit 71bb45ec7c
2 changed files with 8 additions and 1 deletions

View File

@@ -15,3 +15,10 @@ bool CastFrostNovaAction::isUseful()
{
return sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", GetTargetName()), 10.f);
}
bool CastConeOfColdAction::isUseful()
{
bool facingTarget = AI_VALUE2(bool, "facing", "current target");
bool targetClose = sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", GetTargetName()), 10.f);
return facingTarget && targetClose;
}