44 assert (
m_AI !=
nullptr);
101 if (
sConfig.debug.UseProfiling)
236 DamageDetails dmgState;
242 OnDamageStateChange dmgChange;
243 dmgChange.entityID =
GetID();
244 dmgChange.state = dmgState.Encode();
245 PyTuple *up = dmgChange.Encode();
269 m_mainAttackTimer(1000),
270 m_processTimer(5000),
271 m_shieldBoosterTimer(10000),
272 m_armorRepairTimer(8000),
273 m_beginFindTarget(5000),
274 m_warpScramblerTimer(5000),
275 m_webifierTimer(5000),
483 double dist = usToThem.
length();
485 _log(CONCORD__AI_TRACE,
"%s(%u): CheckDistance: %s(%u) is too far away (%u). Return to Idle.", \
545 _log(CONCORD__AI_TRACE,
"%s(%u): Targeted by %s(%u) in Idle. Begin Approaching and start Targeting sequence.", \
557 _log(CONCORD__AI_TRACE,
"%s(%u): Targeted by %s(%u) while chasing.",
561 _log(CONCORD__AI_TRACE,
"%s(%u): Targeted by %s(%u) while following.",
565 _log(CONCORD__AI_TRACE,
"%s(%u): Targeted by %s(%u) while engaged.",
569 _log(CONCORD__AI_TRACE,
"%s(%u): Targeted by %s(%u) while fleeing.",
573 _log(CONCORD__AI_TRACE,
"%s(%u): Targeted by %s(%u) while signaling.",
587 _log(CONCORD__AI_TRACE,
"%s(%u): Target %s(%u) lost. No targets remain. Return to Idle.",
591 _log(CONCORD__AI_TRACE,
"%s(%u): Target %s(%u) lost, but more targets remain.",
608 _log(CONCORD__AI_TRACE,
"%s(%u): Target %s(%u) no longer in bubble. Clear target and move on",
617 _log(CONCORD__AI_TRACE,
"%s(%u): Target %s(%u) has no destiny manager. Clear target and move on",
626 _log(CONCORD__AI_TRACE,
"%s(%u): Target %s(%u) is cloaked. Clear target and move on",
642 std::string guid =
"effects.Laser";
670 else if (radius < 60)
672 else if (radius < 150)
674 else if (radius < 280)
676 else if (radius < 550)
void Append(const T &value)
Appends a single value to buffer.
#define sConfig
A macro for easier access to the singleton.
double GetFollowDistance()
GaExpInl GaFloat length() const
#define _log(type, fmt,...)
DestinyManager * m_destiny
double m_entityOrbitRange
void ClearTarget(SystemEntity *tSE)
void SetChasing(SystemEntity *pTarget)
bool HasAttribute(const uint16 attrID) const
void EncodeDestiny(Buffer &into) const
SystemBubble * SysBubble()
uint16 m_shieldBoosterDuration
bool InBubble(const GPoint &pt, bool inWarp=false) const
void CheckDistance(SystemEntity *pTarget)
void SetEngaged(SystemEntity *pTarget)
double MakeRandomFloat(double low, double high)
Generates random real from interval [low; high].
void SetSignaling(SystemEntity *pTarget)
const GVector & GetVelocity() const
void SetMaxVelocity(float maxVelocity)
void ClearTargets(bool notify=true)
TargetManager * TargetMgr()
const GPoint & GetPosition() const
double m_armorRepairChance
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
void AttackTarget(SystemEntity *pTarget)
const ItemType & type() const
void SendSpecialEffect(uint32 entityID, uint32 moduleID, uint32 moduleTypeID, uint32 targetID, uint32 chargeTypeID, std::string guid, bool isOffensive, bool start, bool isActive, int32 duration, uint32 repeat, int32 graphicInfo=0) const
void TargetedAdd(SystemEntity *who)
SystemEntity * GetFirstTarget(bool need_locked=false)
Timer m_shieldBoosterTimer
DestinyManager * DestinyMgr()
Generic class for buffers.
void Targeted(SystemEntity *by_who)
InventoryItemRef GetSelf()
PyTuple * MakeDamageState()
double m_entityChaseRange
void Orbit(SystemEntity *who)
uint16 m_armorRepairDuration
void SetAttribute(uint16 attrID, int num, bool notify=true)
bool Check(bool reset=true)
double m_shieldBoosterChance
void Target(SystemEntity *by_who)
const char * GetName() const
double m_entityAttackRange
void TargetLost(SystemEntity *who)
void Follow(SystemEntity *pSE, uint32 distance)
void UpdateShipVariables()
int main(int argc, char *argv[])
void TargetLost(SystemEntity *by_who)
bool HasNoTargets() const
void Orbit(SystemEntity *pSE, uint32 distance=0)
EvilNumber GetAttribute(const uint16 attrID) const
void Attack(SystemEntity *pTarget)
Timer m_warpScramblerTimer
Concord(SystemManager *system, PyServiceMgr &services, InventoryItemRef self, const GPoint &position, ConcordSpawnMgr *spawnMgr)
#define IsAlliance(itemID)
void SetFollowing(SystemEntity *pTarget)
bool ApplyDamage(Damage &d)
void SetFleeing(SystemEntity *pTarget)
bool StartTargeting(SystemEntity *tSE, ShipItemRef sRef)
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)