﻿// Decompiled with JetBrains decompiler
// Type: Wb.Lpw.Game.Common.AI.FriendlyLegoMiniFigureDescription
// Assembly: Wb.Lpw.Game.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 3C4BDCBA-73F8-4BAA-AC19-A98EC2D71189
// Assembly location: C:\Users\CGA Computer\Desktop\LEGO Universe Stuff\LOCO Server\Unity Web Player Extractor\Saved Files\LOCO Server.unity3d_unpacked\Wb.Lpw.Game.Common.dll

using System;
using System.Collections.Generic;
using System.Linq;
using Wb.Lpw.AssetPipeline.Common.DataDefinition;
using Wb.Lpw.Game.Common.GameRoomObject.LegoMiniFigure;
using Wb.Lpw.Shared.Common;

namespace Wb.Lpw.Game.Common.AI
{
  [Category("Friendly Lego Mini-Figure Description", 1, 0, false)]
  public class FriendlyLegoMiniFigureDescription : LegoMiniFigureDescription
  {
    public float MoveSpeed = 5f;
    public float AttackDelay = 1f;
    public float DetectionRange = 3f;
    public float ConeDetectionRange = 10f;
    public float ConeDetectionAngle = 90f;
    public float GuardRange = 7.5f;
    public float AttackRangeMax = 2.5f;
    public float AlertRange = 5f;
    public float AlertBroadCastDelay = 3f;
    public float TauntTime = 3f;
    public List<PerLevelEnemyVisualSets> Visuals = new List<PerLevelEnemyVisualSets>();
    public float AttackRangeMin;
    public bool OverrideHealingThreshold;
    public float HealingThreshold;

    public PerLevelEnemyVisualSets GetVisualSet(int level)
    {
      if (this.Visuals == null || this.Visuals.Count == 0)
        return (PerLevelEnemyVisualSets) null;
      if (Enumerable.First<PerLevelEnemyVisualSets>((IEnumerable<PerLevelEnemyVisualSets>) this.Visuals).MinLevel <= level)
        return this.Visuals.FindLast((Predicate<PerLevelEnemyVisualSets>) (evs => evs.MinLevel <= level));
      CommonLog.Engine.WarnFormat("FriendlyLegoMiniFigureDescription.GetVisualSet called for a level ({0}) that is less than the minimum available level {1}", (object) level, (object) Enumerable.First<PerLevelEnemyVisualSets>((IEnumerable<PerLevelEnemyVisualSets>) this.Visuals).MinLevel);
      return Enumerable.First<PerLevelEnemyVisualSets>((IEnumerable<PerLevelEnemyVisualSets>) this.Visuals);
    }
  }
}
