public static Composite CreateTotemsPvPBehavior()
{
//return new Decorator(ret => false, new Action( r => { return RunStatus.Failure; } ));
return new PrioritySelector(
Spell.BuffSelf("Tremor Totem",
ret => Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Polymorphed, WoWSpellMechanic.Horrified, WoWSpellMechanic.Fleeing, WoWSpellMechanic.Asleep) ||
Unit.GroupMembers.Any(f => Unit.HasAuraWithMechanic(f, WoWSpellMechanic.Polymorphed, WoWSpellMechanic.Horrified, WoWSpellMechanic.Fleeing, WoWSpellMechanic.Asleep) &&
f.Distance < Totems.GetTotemRange(WoWTotem.Tremor))),
Spell.BuffSelf("Grounding Totem", ret => Unit.NearbyUnfriendlyUnits.Any(u => u.Distance < 40 && u.IsTargetingMeOrPet && u.IsCasting)),
Spell.BuffSelf("Windwalk Totem", !Exist(WoWTotemType.Air) && Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Rooted, WoWSpellMechanic.Snared)),
Spell.BuffSelf("Healing Stream Totem", ret => !Exist(WoWTotemType.Water)),
Spell.BuffSelf("Searing Totem", ret => Me.GotTarget && Me.CurrentTarget.Distance < GetTotemRange(WoWTotem.Searing) - 2f && !Exist(WoWTotemType.Fire))
);
}