mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Succubus Hookup added to dutydef
This commit is contained in:
parent
262bef48c6
commit
0b6bfa1ce6
5 changed files with 122 additions and 5 deletions
Binary file not shown.
|
@ -4,7 +4,7 @@
|
|||
<defName>rjw_genes_flirt</defName>
|
||||
<thinkNode Class="ThinkNode_Priority">
|
||||
<subNodes>
|
||||
<!-- first fulfill needs and joy -->
|
||||
<!-- first fulfill needs -->
|
||||
<li Class="ThinkNode_Tagger">
|
||||
<tagToGive>SatisfyingNeeds</tagToGive>
|
||||
<subNodes>
|
||||
|
@ -36,12 +36,29 @@
|
|||
<!--Go to target pawn-->
|
||||
<li Class="JobGiver_AIFollowEscortee" />
|
||||
|
||||
<!--If fertilin or sex_need is really low, try become more forceful (attempt rape)-->
|
||||
|
||||
<li Class="rjw.ThinkNode_ConditionalSexChecks">
|
||||
<subNodes>
|
||||
<!--If sexneed is low do rape or masturbate (like a nymph)-->
|
||||
<li Class="rjw.ThinkNode_ConditionalFrustrated">
|
||||
<subNodes>
|
||||
<li Class="rjw.JobGiver_ViolateCorpse" />
|
||||
<li Class="rjw.JobGiver_RandomRape" />
|
||||
<li Class="rjw.JobGiver_Masturbate"/>
|
||||
</subNodes>
|
||||
</li>
|
||||
<!--Will sometimes try and hookup with target pawn-->
|
||||
<li Class="ThinkNode_ConditionalRandom">
|
||||
<chance>0.1</chance>
|
||||
<subNodes>
|
||||
<li Class="RJW_Genes.JobGiver_TryQuickieWith" />
|
||||
</subNodes>
|
||||
</li>
|
||||
</subNodes>
|
||||
</li>
|
||||
|
||||
<!--Flirt with target pawn and try hookup with them, increases sexneed in target pawn, maybe flirt has custom text-->
|
||||
<li Class="RJW_Genes.JobGiver_Flirt" />
|
||||
|
||||
|
||||
<li Class="JobGiver_WanderNearDutyLocation">
|
||||
<wanderRadius>5</wanderRadius>
|
||||
</li>
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace RJW_Genes
|
|||
{
|
||||
this.FailOnDespawnedOrNull(TargetIndex.A);
|
||||
yield return Toils_Interpersonal.GotoInteractablePosition(TargetIndex.A);
|
||||
yield return Toils_General.Wait(600, TargetIndex.A);
|
||||
yield return Toils_General.Wait(300, TargetIndex.A);
|
||||
yield return Toils_Interpersonal.WaitToBeAbleToInteract(this.pawn);
|
||||
Toil toil = Toils_Interpersonal.GotoInteractablePosition(TargetIndex.A);
|
||||
toil.socialMode = RandomSocialMode.Off;
|
||||
|
|
99
Source/Genes/Life_Force/JobGiver_TryQuickieWith.cs
Normal file
99
Source/Genes/Life_Force/JobGiver_TryQuickieWith.cs
Normal file
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using rjw;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class JobGiver_TryQuickieWith : ThinkNode_JobGiver
|
||||
{
|
||||
protected override Job TryGiveJob(Pawn pawn)
|
||||
{
|
||||
Pawn target = pawn.mindState.duty.focus.Pawn;
|
||||
Pawn_JobTracker jobs = target.jobs;
|
||||
string pawn_name = xxx.get_pawnname(pawn);
|
||||
string target_name = xxx.get_pawnname(target);
|
||||
//can reserve eachother
|
||||
if (pawn.CanReserveAndReach(target, PathEndMode.InteractionCell, Danger.Some) && target.CanReserve(pawn, 1, 0, null, false))
|
||||
{
|
||||
//target is not busy
|
||||
if (!(((jobs != null) ? jobs.curJob : null) != null && (jobs.curJob.playerForced || !CasualSex_Helper.quickieAllowedJobs.Contains(jobs.curJob.def))))
|
||||
{
|
||||
float willingness = TargetWillingness(pawn, target);
|
||||
if (Rand.Chance(willingness))
|
||||
{
|
||||
return JobMaker.MakeJob(xxx.quick_sex, target);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RJWSettings.DebugLogJoinInBed) //change this when we have our own settigns
|
||||
{
|
||||
ModLog.Message(string.Format("{0} was not interested in having sex with {1}: ({2} chance)", pawn_name, target_name, willingness));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RJWSettings.DebugLogJoinInBed) //change this when we have our own settigns
|
||||
{
|
||||
ModLog.Message(string.Format(" find_pawn_to_fuck({0}): lover has important job ({1}), skipping", pawn_name, target.jobs.curJob.def));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RJWSettings.DebugLogJoinInBed) //change this when we have our own settigns
|
||||
{
|
||||
ModLog.Message(" (" + pawn_name + "): cannot reach or reserve " + target_name);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static float TargetWillingness(Pawn pawn, Pawn target)
|
||||
{
|
||||
string pawn_name = xxx.get_pawnname(pawn);
|
||||
float willingness = SexAppraiser.would_fuck(target,pawn);
|
||||
bool nymph = xxx.is_nympho(target);
|
||||
bool loverelation = LovePartnerRelationUtility.LovePartnerRelationExists(pawn, target);
|
||||
if (nymph || loverelation)
|
||||
{
|
||||
willingness *= 2;
|
||||
}
|
||||
if (xxx.HasNonPolyPartner(pawn, false) && !loverelation)
|
||||
{
|
||||
if (RJWHookupSettings.NymphosCanCheat && nymph && xxx.is_frustrated(pawn))
|
||||
{
|
||||
if (RJWSettings.DebugLogJoinInBed)
|
||||
{
|
||||
ModLog.Message(" find_partner(" + pawn_name + "): I'm a nympho and I'm so frustrated that I'm going to cheat");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!pawn.health.hediffSet.HasHediff(HediffDef.Named("AlcoholHigh"), false))
|
||||
{
|
||||
if (RJWSettings.DebugLogJoinInBed)
|
||||
{
|
||||
ModLog.Message(" find_partner(" + pawn_name + "): I interested in banging but that's cheating");
|
||||
}
|
||||
//Succubus has a small chance to seduce even if target is in relationship, maybe setting
|
||||
willingness *= 0.1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RJWSettings.DebugLogJoinInBed)
|
||||
{
|
||||
ModLog.Message(" find_partner(" + pawn_name + "): I want to bang and im too drunk to care if its cheating");
|
||||
}
|
||||
//No change
|
||||
}
|
||||
}
|
||||
}
|
||||
return willingness;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -130,6 +130,7 @@
|
|||
<Compile Include="Genes\Life_Force\Gene_LifeForceDrain.cs" />
|
||||
<Compile Include="Genes\Life_Force\IncidentWorker_SuccubusDreamVisit.cs" />
|
||||
<Compile Include="Genes\Life_Force\IngestionOutcomeDoer_LifeForceOffset.cs" />
|
||||
<Compile Include="Genes\Life_Force\JobGiver_DoQuickieWith.cs" />
|
||||
<Compile Include="Genes\Life_Force\JobDrivers\JobDriver_Flirt.cs" />
|
||||
<Compile Include="Genes\Life_Force\JobDrivers\JobDriver_SexOnSpotReceiver.cs" />
|
||||
<Compile Include="Genes\Life_Force\JobDrivers\JobDriver_SexOnSpot.cs" />
|
||||
|
|
Loading…
Reference in a new issue