forked from leftspace89/pPlat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObj_Minion.h
42 lines (34 loc) · 1 KB
/
Obj_Minion.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#ifndef OBJMINION
#define OBJMINION
class Obj_Minion : public Obj_AI_Base
{
public:
float AD_Multiplier()
{
if (this == nullptr)
return 0;
float armor = *GetCharData()->GetArmor();
if (armor > 0)
return 100 / (100 + *GetCharData()->GetArmor());
else
return 2 - (100 / (100 - armor));
}
float GetAttackDamageOnThis()
{
float ad = *ObjectManager::GetPlayer()->GetCharData()->GetBaseAttackDamage() + *ObjectManager::GetPlayer()->GetCharData()->GetBonusAttackDamage();
return ad * AD_Multiplier();
}
bool IsLastHitable()
{
float ad = *ObjectManager::GetPlayer()->GetCharData()->GetBaseAttackDamage() + *ObjectManager::GetPlayer()->GetCharData()->GetBonusAttackDamage();
return (*GetHealth() <= ad * AD_Multiplier());
}
bool IsLastHitable(float health)
{
float ad = *ObjectManager::GetPlayer()->GetCharData()->GetBaseAttackDamage() + *ObjectManager::GetPlayer()->GetCharData()->GetBonusAttackDamage();
return (health <= ad * AD_Multiplier());
}
private:
};
#endif