Might be easier to use it like this:
Code:
public static Composite DoTGround(string spell, string debuff, float time = 0, Selection<bool> reqs = null)
{
return DoTGround(spell, ret => [COLOR=#0000BB][FONT=monospace][I]BuddyTor[/I][/FONT][/COLOR][COLOR=#007700][FONT=monospace][I].[/I][/FONT][/COLOR][COLOR=#0000BB][FONT=monospace][I]Me[/I][/FONT][/COLOR][COLOR=#007700][FONT=monospace][I].[/I][/FONT][/COLOR][COLOR=#0000BB][FONT=monospace][I]CurrentTarget[/I][/FONT][/COLOR], debuff, time, reqs);
}
public static Composite DoTGround(string spell, UnitSelectionDelegate onUnit, float time, Selection<bool> reqs = null)
{
return
new Decorator(
ret => ((reqs == null || reqs(ret))
&& onUnit != null
&& onUnit(ret) != null
&& AbilityManager.CanCast(spell, onUnit(ret))
&& !SpellBlackListed(spell, onUnit(ret).Guid)),
new PrioritySelector(
new Action(ctx =>
{
BlackListedSpells.Add(new ExpiringItem(spell, (GetCooldown(spell) + 25 + time), onUnit(ret).Guid));
Logger.Write(">> Casting on Ground << " + spell);
return RunStatus.Failure;
}),
new Action(ret => AbilityManager.Cast(spell, onUnit(ret).Position))));
}