protected override IEnumerable <Toil> MakeNewToils()
        {
            this.EndOnDespawnedOrNull(TargetIndex.A, JobCondition.Succeeded);
            yield return(Toils_Combat.TrySetJobToUseAttackVerb());

            /*Error: Unable to find new state assignment for yield return*/;
        }
예제 #2
0
            public bool MoveNext()
            {
                uint num = (uint)this.$PC;

                this.$PC = -1;
                switch (num)
                {
                case 0u:
                    this.EndOnDespawnedOrNull(TargetIndex.A, JobCondition.Succeeded);
                    this.$current = Toils_Combat.TrySetJobToUseAttackVerb(TargetIndex.A);
                    if (!this.$disposing)
                    {
                        this.$PC = 1;
                    }
                    return(true);

                case 1u:
                    gotoCastPos   = Toils_Combat.GotoCastPosition(TargetIndex.A, false, 0.95f);
                    this.$current = gotoCastPos;
                    if (!this.$disposing)
                    {
                        this.$PC = 2;
                    }
                    return(true);

                case 2u:
                    jumpIfCannotHit = Toils_Jump.JumpIfTargetNotHittable(TargetIndex.A, gotoCastPos);
                    this.$current   = jumpIfCannotHit;
                    if (!this.$disposing)
                    {
                        this.$PC = 3;
                    }
                    return(true);

                case 3u:
                    this.$current = Toils_Combat.CastVerb(TargetIndex.A, true);
                    if (!this.$disposing)
                    {
                        this.$PC = 4;
                    }
                    return(true);

                case 4u:
                    this.$current = Toils_Jump.Jump(jumpIfCannotHit);
                    if (!this.$disposing)
                    {
                        this.$PC = 5;
                    }
                    return(true);

                case 5u:
                    this.$PC = -1;
                    break;
                }
                return(false);
            }
예제 #3
0
        protected override IEnumerable <Toil> MakeNewToils()
        {
            this.EndOnDespawnedOrNull(TargetIndex.A, JobCondition.Succeeded);
            yield return(Toils_Combat.TrySetJobToUseAttackVerb());

            Toil gotoCastPos = Toils_Combat.GotoCastPosition(TargetIndex.A, false);

            yield return(gotoCastPos);

            Toil jumpIfCannotHit = Toils_Jump.JumpIfTargetNotHittable(TargetIndex.A, gotoCastPos);

            yield return(jumpIfCannotHit);

            yield return(Toils_Combat.CastVerb(TargetIndex.A, true));

            yield return(Toils_Jump.Jump(jumpIfCannotHit));
        }
예제 #4
0
        protected override IEnumerable <Toil> MakeNewToils()
        {
            this.EndOnDespawnedOrNull(VictimInd, JobCondition.Succeeded);

            yield return(Toils_Combat.TrySetJobToUseAttackVerb(VictimInd));

            Toil gotoCastPos = Toils_Combat.GotoCastPosition(VictimInd, maxRangeFactor: 0.95f);       // maxRangeFactor to prevent dithering

            yield return(gotoCastPos);

            Toil jumpIfCannotHit = Toils_Jump.JumpIfTargetNotHittable(VictimInd, gotoCastPos);

            yield return(jumpIfCannotHit);

            yield return(Toils_Combat.CastVerb(VictimInd));

            yield return(Toils_Jump.Jump(jumpIfCannotHit));
        }
        // Token: 0x06000054 RID: 84 RVA: 0x0000427A File Offset: 0x0000247A
        protected override IEnumerable <Toil> MakeNewToils()
        {
            yield return(Toils_General.DoAtomic(delegate
            {
                Pawn pawn = this.job.targetA.Thing as Pawn;
                bool flag = pawn != null && pawn.Downed && this.pawn.mindState.duty != null && this.pawn.mindState.duty.attackDownedIfStarving && this.pawn.Starving();
                if (flag)
                {
                    this.job.killIncappedTarget = true;
                }
            }));

            yield return(Toils_Combat.TrySetJobToUseAttackVerb(TargetIndex.A));

            yield return(Toils_Misc.ThrowColonistAttackingMote(TargetIndex.A));

            yield return(Toils_Combat.GotoCastPosition(TargetIndex.A, false, 1f));

            yield return(Toils_Combat.CastVerb(TargetIndex.A, true));

            yield break;
        }