            castToil.initAction = () =>
                                  {
                                      LocalTargetInfo target = castToil.actor.jobs.curJob.GetTarget(TargetIndex.A);
                                      comp.currentlyCasting.Cast(target);
                                  };
            castToil.defaultCompleteMode = ToilCompleteMode.Instant;
            castToil.atomicWithPrevious  = true;
            yield return castToil;
            AddFinishAction(delegate
            {