protected override IEnumerable <Toil> MakeNewToils()
        {
            //this.FailOnDespawnedNullOrForbidden(TargetIndex.A);
            this.FailOn(delegate
            {
                return(this.pawn == this.Victim);
            });
            this.FailOnAggroMentalState(TargetIndex.A);
            foreach (Toil t in JobDriver_Feed.MakeFeedToils(this, this.GetActor(), this.TargetA, workLeft, DoEffect, ShouldContinueFeeding))
            {
                yield return(t);
            }
            yield return(Toils_Misc.ThrowColonistAttackingMote(TargetIndex.A));

            yield return(Toils_General.WaitWith(TargetIndex.A, 600, true));

            yield return(Toils_Goto.GotoThing(TargetIndex.B, Master.PositionHeld).FailOn(() => (Master == null) || (!Master.Spawned || Master.Dead)));
        }
Example #2
0
        protected override IEnumerable <Toil> MakeNewToils()
        {
            //this.FailOnDespawnedNullOrForbidden(TargetIndex.A);
            this.FailOn(delegate
            {
                return(pawn == Victim);
            });
            this.FailOnAggroMentalState(TargetIndex.A);
            foreach (Toil t in JobDriver_Feed.MakeFeedToils(job.def, this, GetActor(), TargetA, null, null, workLeft, DoEffect, ShouldContinueFeeding, true, false))
            {
                yield return(t);
            }
            yield return(new Toil()
            {
                initAction = delegate()
                {
                    Pawn p = (Pawn)TargetA;
                    if (!p.Dead)
                    {
                        p.Kill(null);
                    }
                    ;
                    job.SetTarget(TargetIndex.A, p.Corpse);
                    pawn.Reserve(TargetA, job);
                }
            });

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

            yield return(Toils_General.WaitWith(TargetIndex.A, 600, true));

            yield return(new Toil()
            {
                initAction = delegate()
                {
                    VampireCorpse vampCorpse = (VampireCorpse)TargetA.Thing;
                    vampCorpse.Diableried = true;
                    Pawn p = vampCorpse.InnerPawn;
                    pawn.VampComp().Notify_Diablerie(p.VampComp());
                }
            });
        }
Example #3
0
        protected override IEnumerable <Toil> MakeNewToils()
        {
            //this.FailOnDespawnedNullOrForbidden(TargetIndex.A);
            this.FailOn(delegate
            {
                return(this.pawn == this.Victim);
            });
            this.FailOnAggroMentalState(TargetIndex.A);
            foreach (Toil t in JobDriver_Feed.MakeFeedToils(this, this.GetActor(), this.TargetA, workLeft, DoEffect, ShouldContinueFeeding))
            {
                yield return(t);
            }
            yield return(new Toil()
            {
                initAction = delegate()
                {
                    Pawn p = (Pawn)TargetA;
                    if (!p.Dead)
                    {
                        p.Kill(null);
                    }
                    this.CurJob.SetTarget(TargetIndex.A, p.Corpse);
                    this.pawn.Reserve(TargetA);
                }
            });

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

            yield return(Toils_General.WaitWith(TargetIndex.A, 600, true));

            yield return(new Toil()
            {
                initAction = delegate()
                {
                    this.pawn.VampComp().Bloodline.EmbraceWorker.TryEmbrace(this.pawn, Victim);
                }
            });
        }
Example #4
0
 protected override IEnumerable <Toil> MakeNewToils()
 {
     //this.FailOnDespawnedNullOrForbidden(TargetIndex.A);
     this.FailOn(delegate
     {
         return(this.pawn == this.Victim);
     });
     this.FailOn(delegate
     {
         return(BloodMaster.CurBloodPoints == 0);
     });
     this.FailOnAggroMentalState(TargetIndex.A);
     foreach (Toil t in JobDriver_Feed.MakeFeedToils(this, (Pawn)TargetA, this.GetActor(), workLeft, DoEffect, ShouldContinueFeeding))
     {
         yield return(t);
     }
     yield return(new Toil()
     {
         initAction = delegate()
         {
         }
     });
 }