public virtual bool use(Actor wearer) { List <Actor> list = new List <Actor>(); Container c = wearer.getContainer(); if (selector != null) { selector.selectTargets(wearer, out list); } else { list.Add(wearer); } bool succeed = false; for (int i = 0; i < list.Count; i++) { if (i < list.Count) { for (int j = 0; j < activeEffects.Count; j++) { if (j < activeEffects.Count) { if (activeEffects[j].applyTo(list[i])) { succeed = true; } } } } } if (succeed) { if (c != null) { c.remove(owner); owner.destroy(); } } return(succeed); }