diff --git a/Common/Assemblies/Rjw-Genes.dll b/Common/Assemblies/Rjw-Genes.dll index e0c2fea..f512931 100644 Binary files a/Common/Assemblies/Rjw-Genes.dll and b/Common/Assemblies/Rjw-Genes.dll differ diff --git a/Common/Defs/AbilityDefs/Ability_PussyHeal.xml b/Common/Defs/AbilityDefs/Ability_PussyHeal.xml index 1887160..8f97b60 100644 --- a/Common/Defs/AbilityDefs/Ability_PussyHeal.xml +++ b/Common/Defs/AbilityDefs/Ability_PussyHeal.xml @@ -30,7 +30,7 @@
  • 0.2
  • -
  • +
  • 0.4~0.8
  • diff --git a/Common/Defs/Genes/GeneDefs_LifeForce.xml b/Common/Defs/Genes/GeneDefs_LifeForce.xml index ed1ea9a..9a78bff 100644 --- a/Common/Defs/Genes/GeneDefs_LifeForce.xml +++ b/Common/Defs/Genes/GeneDefs_LifeForce.xml @@ -34,7 +34,7 @@ - LifeForceDrain + rjw_genes_lifeforcedrain draining Carriers lose an additional 15 fertilin per day from biological entropy. @@ -50,7 +50,7 @@ - rjw_genes_pussyhealer + rjw_genes_pussyhealing pussyhealer Carriers of this gene are able use vaginal sex to tend to other's wounds. diff --git a/Common/Defs/Genes/XenotypeDefs.xml b/Common/Defs/Genes/XenotypeDefs.xml new file mode 100644 index 0000000..752634f --- /dev/null +++ b/Common/Defs/Genes/XenotypeDefs.xml @@ -0,0 +1,30 @@ + + + + + Succubus + + A succubus, an ancient race created long ago to fullfill sexual fantasies of humankind. (better description required) \n\nSuccubi require fertilin to survive, which is commonly derived from cum. UI/Icons/Xenotypes/Baseliner + true + 1000 + 0 + +
  • rjw_genes_female_only
  • +
  • Beauty_Beautiful
  • +
  • rjw_genes_succubus_tail
  • +
  • rjw_genes_Succubus_Wings
  • +
  • rjw_genes_aphrodisiac_pheromones
  • +
  • rjw_genes_orgasm_rush
  • +
  • rjw_genes_hypersexual
  • +
  • rjw_genes_lifeforce
  • +
  • rjw_genes_lifeforcedrain
  • +
  • rjw_genes_pussyhealer
  • +
  • rjw_genes_cockeater
  • +
  • rjw_genes_paralysingkiss
  • +
  • rjw_genes_seduce
  • +
  • rjw_genes_vaginal_absorber
  • +
  • rjw_genes_anal_absorber
  • +
  • rjw_genes_drainer
  • + + + \ No newline at end of file diff --git a/Common/Defs/IncidentsDefs/Incidents_Succubus.xml b/Common/Defs/IncidentsDefs/Incidents_Succubus.xml new file mode 100644 index 0000000..297aca5 --- /dev/null +++ b/Common/Defs/IncidentsDefs/Incidents_Succubus.xml @@ -0,0 +1,16 @@ + + + + + SuccubusDreamVisit + + Misc + +
  • Map_PlayerHome
  • +
    + RJW_Genes.IncidentWorker_SuccubusDreamVisit + 1.0 + 10 + false +
    +
    \ No newline at end of file diff --git a/Common/Defs/PawnKindDefs/PawnKind_Succubus.xml b/Common/Defs/PawnKindDefs/PawnKind_Succubus.xml new file mode 100644 index 0000000..4cdda17 --- /dev/null +++ b/Common/Defs/PawnKindDefs/PawnKind_Succubus.xml @@ -0,0 +1,45 @@ + + + + + Succubus + + 50 + Human + + + 999 + + + 0.5 + false + 18 + 27 + Poor + 0.0 + false + + 0.3 + 0.9 + + true + +
  • Tribal
  • +
    + + 0 + 0 + + 0 + + 0 + 0 + + +
  • Poor
  • +
    + 0.0 + 2~4 + 28~44 +
    +
    \ No newline at end of file diff --git a/Source/GeneDefOf.cs b/Source/GeneDefOf.cs index 1550c5b..d25284d 100644 --- a/Source/GeneDefOf.cs +++ b/Source/GeneDefOf.cs @@ -75,7 +75,7 @@ namespace RJW_Genes // LifeForce public static readonly GeneDef rjw_genes_lifeforce; - public static readonly GeneDef rjw_genes_pussyhealer; + public static readonly GeneDef rjw_genes_pussyhealing; public static readonly GeneDef rjw_genes_vaginal_absorber; public static readonly GeneDef rjw_genes_anal_absorber; public static readonly GeneDef rjw_genes_drainer; @@ -87,5 +87,7 @@ namespace RJW_Genes public static readonly GeneDef rjw_genes_youth_fountain; public static readonly GeneDef rjw_genes_sex_age_drain; public static readonly HediffDef rjw_genes_orgasm_rush_hediff; + + public static readonly XenotypeDef Succubus; } } diff --git a/Source/Genes/GeneUtility.cs b/Source/Genes/GeneUtility.cs index f3493f9..f4baccd 100644 --- a/Source/Genes/GeneUtility.cs +++ b/Source/Genes/GeneUtility.cs @@ -162,7 +162,7 @@ namespace RJW_Genes { return false; } - return pawn.genes.HasGene(GeneDefOf.rjw_genes_pussyhealer); + return pawn.genes.HasGene(GeneDefOf.rjw_genes_pussyhealing); } public static bool IsUnbreakable(Pawn pawn) diff --git a/Source/Genes/Life_Force/IncidentWorker_SuccubusDreamVisit.cs b/Source/Genes/Life_Force/IncidentWorker_SuccubusDreamVisit.cs new file mode 100644 index 0000000..0be4637 --- /dev/null +++ b/Source/Genes/Life_Force/IncidentWorker_SuccubusDreamVisit.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; +using RimWorld; +using rjw; +namespace RJW_Genes +{ + public class IncidentWorker_SuccubusDreamVisit : IncidentWorker + { + //This incidint will only fire if there is a pawn asleep which while sexneed is lower than 0.25 + protected override bool CanFireNowSub(IncidentParms parms) + { + if (!base.CanFireNowSub(parms)) + { + return false; + } + Map map = (Map)parms.target; + if (!map.mapTemperature.SeasonAcceptableFor(ThingDefOf.Human)) + { + return false; + } + foreach (Pawn pawn in map.mapPawns.FreeColonistsAndPrisonersSpawned) + { + if (pawn.jobs.curDriver.asleep && xxx.need_some_sex(pawn) > 1f) + { + return true; + } + } + return false; + + } + + protected override bool TryExecuteWorker(IncidentParms parms) + { + Map map = (Map)parms.target; + Pawn victim = ValidVictims(map).RandomElement(); + if (victim == null) + { + return false; + } + IntVec3 loc = victim.Position; + Faction faction; + if (!this.TryFindFormerFaction(out faction)) + { + return false; + } + + //Spawn succubus at pawn and initiate sex + Pawn succubus = PawnGenerator.GeneratePawn(new PawnGenerationRequest(PawnKindDef.Named("Succubus"), faction, PawnGenerationContext.NonPlayer, -1, + false, false, false, true, false, 1f, false, true, false, true, true, false, false, false, false, 0f, 0f, null, 1f, null, null, + null, null, null, null, null, null, null, null, null, null, false, false, false, false, null, null, null, null, null, 0f, + DevelopmentalStage.Adult, null, null, null, false)); + succubus.SetFaction(null, null); + GenSpawn.Spawn(succubus, loc, map, WipeMode.Vanish); + + //Sends letter + //string value = succubus.DevelopmentalStage.Child() ? "FeralChild".Translate().ToString() : succubus.KindLabel; + //TaggedString value2 = succubus.DevelopmentalStage.Child() ? "Child".Translate() : "Person".Translate(); + //TaggedString baseLetterLabel = this.def.letterLabel.Formatted(value).CapitalizeFirst(); + //TaggedString baseLetterText = this.def.letterText.Formatted(succubus.NameShortColored, value2, succubus.Named("PAWN")).AdjustedFor(succubus, "PAWN", true).CapitalizeFirst(); + //PawnRelationUtility.TryAppendRelationsWithColonistsInfo(ref baseLetterText, ref baseLetterLabel, succubus); + //base.SendStandardLetter(baseLetterLabel, baseLetterText, this.def.letterDef, parms, succubus, Array.Empty()); + + return true; + } + + private IEnumerable ValidVictims(Map map) + { + foreach (Pawn pawn in map.mapPawns.FreeColonistsAndPrisonersSpawned) + { + if (pawn.jobs.curDriver.asleep && xxx.need_some_sex(pawn) > 1f) + { + yield return pawn; + } + } + yield break; + } + + private bool TryFindFormerFaction(out Faction formerFaction) + { + return Find.FactionManager.TryGetRandomNonColonyHumanlikeFaction(out formerFaction, false, true, TechLevel.Undefined, false); + } + } +} diff --git a/Source/Genes/Life_Force/Patch_LifeForce.cs b/Source/Genes/Life_Force/Patch_LifeForce.cs index f4eb817..955e46e 100644 --- a/Source/Genes/Life_Force/Patch_LifeForce.cs +++ b/Source/Genes/Life_Force/Patch_LifeForce.cs @@ -7,7 +7,6 @@ using System.Text; using System.Threading.Tasks; using RimWorld; using Verse; - namespace RJW_Genes { @@ -114,30 +113,6 @@ namespace RJW_Genes if (props.sexType == xxx.rjwSextype.Sixtynine) { absorb_factor += 1f; - - } - else if (props.sexType == xxx.rjwSextype.Vaginal) - { - //with insertion absorbtion or vaginal cum absorbtion - //absorb_factor += 1f; - } - else if (props.sexType == xxx.rjwSextype.DoublePenetration) - { - if (GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_vaginal_absorber)) - { - //with insertion absorbtion? - //absorb_factor += 0.5f; - } - if (GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_anal_absorber)) - { - //with insertion absorbtion? - //absorb_factor += 0.5f; - } - } - else if (props.sexType == xxx.rjwSextype.Scissoring) - { - //with vaginal cum absorption && vaginal absorbtion - //absorb_factor += 1f; } return absorb_factor; } @@ -148,7 +123,6 @@ namespace RJW_Genes if (props.sexType == xxx.rjwSextype.Oral || props.sexType == xxx.rjwSextype.Fellatio || props.sexType == xxx.rjwSextype.Sixtynine) { absorb_factor += 1f; - } else if (props.sexType == xxx.rjwSextype.Vaginal && GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_vaginal_absorber)) { diff --git a/Source/Interactions/GenesPartKindUsageRule.cs b/Source/Interactions/GenesPartKindUsageRule.cs index 6c0f53c..5f99d3a 100644 --- a/Source/Interactions/GenesPartKindUsageRule.cs +++ b/Source/Interactions/GenesPartKindUsageRule.cs @@ -10,42 +10,64 @@ using Verse; namespace RJW_Genes.Interactions { //Summary// - //Set custom preferences for pawn. Gets integrated to rjw by AddtoIPartPreferenceRule in First + //Set custom preferences for pawn. Gets integrated into rjw by AddtoIPartPreferenceRule in First //Depending on the level of lifeforce increase the chance for using the mouth. public class GenesPartKindUsageRule : IPartPreferenceRule { public IEnumerable> ModifiersForDominant(InteractionContext context) { Pawn pawn = context.Internals.Dominant.Pawn; - if (GeneUtility.HasCriticalLifeForce(pawn)) + Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType(); + if (gene != null) { - yield return new Weighted(50f, LewdablePartKind.Mouth); - } - else if (GeneUtility.HasLowLifeForce(pawn)) - { - yield return new Weighted(10f, LewdablePartKind.Mouth); - } - else if (GeneUtility.HasLifeForce(pawn)) - { - yield return new Weighted(2f, LewdablePartKind.Mouth); + float weight = 2f; + if (gene.Value < gene.MinLevelForAlert) + { + weight *= 10; + } + else if (gene.Value < gene.targetValue) + { + weight *= 2.5f; + } + yield return new Weighted(weight, LewdablePartKind.Mouth); + yield return new Weighted(weight, LewdablePartKind.Beak); + if (pawn.genes.HasGene(GeneDefOf.rjw_genes_vaginal_absorber)) + { + yield return new Weighted(weight, LewdablePartKind.Vagina); + } + if (pawn.genes.HasGene(GeneDefOf.rjw_genes_anal_absorber)) + { + yield return new Weighted(weight, LewdablePartKind.Anus); + } } yield break; } public IEnumerable> ModifiersForSubmissive(InteractionContext context) { - Pawn pawn = context.Internals.Submissive.Pawn; - if (GeneUtility.HasCriticalLifeForce(pawn)) + Pawn pawn = context.Internals.Dominant.Pawn; + Gene_LifeForce gene = pawn.genes.GetFirstGeneOfType(); + if (gene != null) { - yield return new Weighted(50f, LewdablePartKind.Mouth); - } - else if (GeneUtility.HasLowLifeForce(pawn)) - { - yield return new Weighted(10f, LewdablePartKind.Mouth); - } - else if (GeneUtility.HasLifeForce(pawn)) - { - yield return new Weighted(2f, LewdablePartKind.Mouth); + float weight = 2f; + if (gene.Value < gene.MinLevelForAlert) + { + weight *= 10; + } + else if (gene.Value < gene.targetValue) + { + weight *= 2.5f; + } + yield return new Weighted(weight, LewdablePartKind.Mouth); + yield return new Weighted(weight, LewdablePartKind.Beak); + if (pawn.genes.HasGene(GeneDefOf.rjw_genes_vaginal_absorber)) + { + yield return new Weighted(weight, LewdablePartKind.Vagina); + } + if (pawn.genes.HasGene(GeneDefOf.rjw_genes_anal_absorber)) + { + yield return new Weighted(weight, LewdablePartKind.Anus); + } } yield break; } diff --git a/Source/Interactions/SubSuccubusTailCustomRequirementHandler - Copy.cs b/Source/Interactions/SubSuccubusTailCustomRequirementHandler.cs similarity index 100% rename from Source/Interactions/SubSuccubusTailCustomRequirementHandler - Copy.cs rename to Source/Interactions/SubSuccubusTailCustomRequirementHandler.cs diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj index 54c7b22..6b61162 100644 --- a/Source/Rjw-Genes.csproj +++ b/Source/Rjw-Genes.csproj @@ -28,6 +28,7 @@ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + False ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\licentia-labs-master\Assemblies\LicentiaLabs.dll @@ -35,6 +36,7 @@ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\rjw-master\1.4\Assemblies\RJW.dll + False @@ -54,6 +56,7 @@ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll + False ..\..\..\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll @@ -122,6 +125,7 @@ + @@ -155,7 +159,7 @@ - +