public bool IsAbleToAttack(FDCreature target) { if (target == null) { return(false); } return(this.Data.CanAttack() && this.Data.CalculatedAp > target.Data.CalculatedDp && target.Data.AIType != CreatureData.AITypes.AIType_UnNoticable); }
public FDCreature Clone() { FDCreature another = new FDCreature(this.CreatureId); another.Definition = this.Definition; another.Faction = this.Faction; another.Position = this.Position; another.PreMovePosition = this.PreMovePosition; another.HasActioned = this.HasActioned; another.Data = this.Data.Clone(); return(another); }
public bool IsOppositeFaction(FDCreature other) { return(((this.Faction == CreatureFaction.Friend || this.Faction == CreatureFaction.Npc) && other.Faction == CreatureFaction.Enemy) || ((other.Faction == CreatureFaction.Friend || other.Faction == CreatureFaction.Npc) && this.Faction == CreatureFaction.Enemy)); }