コード例 #1
0
        public static void handleBroken(Pawn pawn, Pawn Talkee)
        {
            if (!Talkee.health.hediffSet.HasHediff(DarkIntentions.feelingBroken))
            {
                BodyPartRecord torso = Talkee.RaceProps.body.AllParts.Find((bpr) => String.Equals(bpr.def.defName, "Torso"));
                Talkee.health.AddHediff(DarkIntentions.feelingBroken, torso);
                Talkee.health.hediffSet.GetFirstHediffOfDef(DarkIntentions.feelingBroken).Severity = 0.01f;
            }

            float ouched = 0.05f;

            if (DarkIntentions.is_bloodlust(pawn) || DarkIntentions.is_psychopath(pawn))
            {
                ouched *= 1.7f;
            }


            if (DarkIntentions.is_masochist(Talkee))
            {
                ouched /= 1.3333f;
            }


            if (DarkIntentions.is_kind(pawn))
            {
                ouched /= 1.3333f;
            }

            Talkee.health.hediffSet.GetFirstHediffOfDef(DarkIntentions.feelingBroken).Severity += ouched;
            if (Talkee.guest.resistance > 1f)
            {
                ouched *= 100f;
            }

            if (Talkee.guest.resistance <=
                ouched)
            {
                Talkee.guest.resistance = 0f;
            }
            else
            {
                Talkee.guest.resistance -= ouched;
            }
        }
コード例 #2
0
        // Token: 0x06000604 RID: 1540 RVA: 0x00036D44 File Offset: 0x00035144
        public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            //todo decide if not wardedening
            if (!base.ShouldTakeCareOfPrisoner(pawn, t) || DarkIntentions.is_kind(pawn))
            {
                return(null);
            }
            Pawn pawn2 = (Pawn)t;

            if (pawn2.guest.interactionMode == PrisonerInteractionModeDefOf.ReduceResistance &&
                pawn2.guest.ScheduledForInteraction &&
                pawn.health.capacities.CapableOf(PawnCapacityDefOf.Talking) &&
                (!pawn2.Downed) &&
                pawn.CanReserve(t, 1, -1, null, false) &&
                pawn2.Awake())
            {
                return(new Job(DarkIntentions.AbuseJob, t));
            }
            return(null);
        }
コード例 #3
0
        public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            if (t == null || pawn == null)
            {
                return(null);
            }
            else if (!base.ShouldTakeCareOfPrisoner(pawn, t))
            {
                return(null);
            }

            Pawn pawn2 = (Pawn)t;

            if (pawn2.guest.interactionMode == PrisonerInteractionModeDefOf.ReduceResistance &&
                !DarkIntentions.is_kind(pawn))
            {
                return(null);
            }

            return(base.JobOnThing(pawn, t, forced));
        }
コード例 #4
0
        public static Toil MarkTortured(Pawn pawn, Pawn talkee)
        {
            return(new Toil
            {
                initAction = delegate
                {
                    if (!pawn.interactions.TryInteractWith(talkee, DarkIntentions.BuildTortureRapport))
                    {
                        pawn.jobs.curDriver.ReadyForNextToil();
                    }
                    else
                    {
                        handleBroken(pawn, talkee);
                        DarkIntentions.addTortureMoodlets(pawn, talkee);

                        pawn.records.Increment(RecordDefOf.PawnsDowned);
                    }
                },
                socialMode = RandomSocialMode.Off,
                defaultCompleteMode = ToilCompleteMode.Delay,
                defaultDuration = 350
            });
        }