예제 #1
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);
            }
예제 #2
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));
        }
예제 #3
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));
        }