Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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));
 }