Exemplo n.º 1
0
 public JobDriverHolder(AbilityEffect_Cast owner, JobDriver_AbilityEffect jobDriver, Saveable_Caster caster, IEnumerable <Thing> targets, IExposable effectState)
 {
     this.owner       = owner;
     this.jobDriver   = jobDriver;
     this.effectState = effectState;
     this.caster      = caster;
     this.targets     = targets;
 }
Exemplo n.º 2
0
        public override IEnumerable <Toil> MakeNewToils(JobDriver_AbilityEffect jobDriver, Saveable_Caster caster, IEnumerable <Thing> targets, IExposable effectState)
        {
            JobDriverHolder holder = new JobDriverHolder(this, jobDriver, caster, targets, effectState);

            Toil toil = new Toil();

            if (this.canBeInterrupted)
            {
                Log.Warning("//toil.damageTakenAction = holder.OnDamageTaken;");
                //toil.damageTakenAction = holder.OnDamageTaken;
            }
            toil.initAction          = holder.OnStartCast;
            toil.defaultCompleteMode = ToilCompleteMode.Delay;
            toil.defaultDuration     = this.castTime;
            toil.AddFinishAction(holder.OnInterruptDamageTaken);
            yield return(toil);

            toil                     = new Toil();
            toil.initAction          = holder.OnFinishCast;
            toil.defaultCompleteMode = ToilCompleteMode.Instant;
            yield return(toil);
        }
Exemplo n.º 3
0
 public override IEnumerable<Toil> MakeNewToils(JobDriver_AbilityEffect jobDriver, Saveable_Caster caster, IEnumerable<Thing> targets, IExposable effectState)
 {
     AbilityEffect_RandomState typedState = (AbilityEffect_RandomState)effectState;
     return this.items[typedState.item].MakeNewToils(jobDriver, caster, targets, typedState.effectState);
 }
Exemplo n.º 4
0
 public abstract IEnumerable<Toil> MakeNewToils(JobDriver_AbilityEffect jobDriver, Saveable_Caster caster, IEnumerable<Thing> targets, IExposable effectState);
Exemplo n.º 5
0
 public abstract IEnumerable <Toil> MakeNewToils(JobDriver_AbilityEffect jobDriver, Saveable_Caster caster, IEnumerable <Thing> targets, IExposable effectState);
Exemplo n.º 6
0
        public override IEnumerable <Toil> MakeNewToils(JobDriver_AbilityEffect jobDriver, Saveable_Caster caster, IEnumerable <Thing> targets, IExposable effectState)
        {
            AbilityEffect_RandomState typedState = (AbilityEffect_RandomState)effectState;

            return(this.items[typedState.item].MakeNewToils(jobDriver, caster, targets, typedState.effectState));
        }