1
This commit is contained in:
parent
a3090b629b
commit
ac398bf60f
@ -893,3 +893,17 @@ void Creature::ResetAction()
|
||||
action_target_id = 0;
|
||||
need_sync_active_player = true;
|
||||
}
|
||||
|
||||
bool Creature::IsProperTarget(Creature* target)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Creature::IsEnemy(Creature* target)
|
||||
{
|
||||
if (room->GetRoomMode() == kZombieMode) {
|
||||
return target->GetRace() != GetRace();
|
||||
} else {
|
||||
return team_id != target->team_id;
|
||||
}
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ class Creature : public MoveableEntity
|
||||
void AddPassiveSkill(int skill_id);
|
||||
void ClearPassiveSkill();
|
||||
|
||||
bool IsProperTarget(Creature* target);
|
||||
bool IsEnemy(Creature* target);
|
||||
virtual void SelectSkillTargets(Skill* skill,
|
||||
const a8::Vec2& target_pos,
|
||||
std::set<Entity*>& target_list);
|
||||
|
@ -2032,15 +2032,6 @@ void Human::WinExp(Human* sender, int exp)
|
||||
}
|
||||
}
|
||||
|
||||
bool Human::IsEnemy(Human* hum)
|
||||
{
|
||||
if (room->GetRoomMode() == kZombieMode) {
|
||||
return hum->GetRace() != GetRace();
|
||||
} else {
|
||||
return team_id != hum->team_id;
|
||||
}
|
||||
}
|
||||
|
||||
RoomObstacle* Human::SummonObstacle(int id, const a8::Vec2& pos)
|
||||
{
|
||||
RoomObstacle* obstacle = room->CreateObstacle(id, pos.x, pos.y);
|
||||
|
@ -247,7 +247,6 @@ class Human : public Creature
|
||||
int GetSeat() { return seat_; }
|
||||
void SetSeat(int seat) { seat_ = seat; }
|
||||
void DeadDrop();
|
||||
bool IsEnemy(Human* hum);
|
||||
RoomObstacle* SummonObstacle(int id, const a8::Vec2& pos);
|
||||
virtual std::string GetName() override { return name;};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user