예제 #1
0
        public override bool TryStart(AbilityDef ability, Saveable_Caster caster, ref List<Thing> targets, ref IExposable effectState)
        {
            AbilityEffect_RandomState state = new AbilityEffect_RandomState();
            state.item = Rand.Range(0, this.items.Count);
            effectState = state;

            return this.items[state.item].TryStart(ability, caster, ref targets, ref state.effectState);
        }
예제 #2
0
        public override bool TryStart(AbilityDef ability, Saveable_Caster caster, ref List <Thing> targets, ref IExposable effectState)
        {
            AbilityEffect_RandomState state = new AbilityEffect_RandomState();

            state.item  = Rand.Range(0, this.items.Count);
            effectState = state;

            return(this.items[state.item].TryStart(ability, caster, ref targets, ref state.effectState));
        }
예제 #3
0
        public override void ExecuteWhileIncapacitated(Saveable_Caster caster, IEnumerable <Thing> targets, IExposable effectState)
        {
            AbilityEffect_RandomState typedState = (AbilityEffect_RandomState)effectState;

            this.items[typedState.item].ExecuteWhileIncapacitated(caster, targets, typedState.effectState);
        }
예제 #4
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));
        }
예제 #5
0
        public override JobDef StartJob(IExposable effectState)
        {
            AbilityEffect_RandomState typedState = (AbilityEffect_RandomState)effectState;

            return(this.items[typedState.item].StartJob(typedState.effectState));
        }