示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 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));
 }