static string ArmorSpell(MageArmor s) { return s.ToString() + " Armor"; }
/// <summary> /// behavior to cast appropriate Armor /// </summary> /// <returns></returns> public static Composite CreateMageArmorBehavior() { return new Throttle(TimeSpan.FromMilliseconds(500), new Sequence( new Action(ret => _Armor = GetBestArmor()), new Decorator( ret => _Armor != MageArmor.None && !Me.HasMyAura(ArmorSpell(_Armor)) && Spell.CanCastHack(ArmorSpell(_Armor), Me), Spell.BuffSelf(s => ArmorSpell(_Armor), ret => !Me.HasAura(ArmorSpell(_Armor))) ) ) ); }