Fertilin Tank hediff and Succubus tail

This commit is contained in:
Shabakur 2022-12-29 11:20:17 +01:00
parent e642942c1e
commit 22892db8e0
23 changed files with 109 additions and 21 deletions

Binary file not shown.

View file

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!-- Hair restrictions -->
<GeneDef Name="rjw_genes_wings" Abstract="True">
<displayCategory>Miscellaneous</displayCategory>
<randomChosen>true</randomChosen>
@ -24,11 +22,42 @@
<biostatCpx>1</biostatCpx>
<graphicData>
<graphicPath>Things/Pawn/Humanlike/BodyAttachments/rjw_genes_Succubus_Wings/Succubus_Wings</graphicPath>
<colorType>Hair</colorType>
<colorType>Skin</colorType>
<drawScale>2</drawScale>
<drawOffsetNorth>(0.0, 0.19, -0.1)</drawOffsetNorth>
<drawOffsetNorth>(0.0, 0.01, -0.1)</drawOffsetNorth>
<drawOffsetSouth>(0.0, 0.0, -0.1)</drawOffsetSouth>
<drawOffsetEast>(0.1, 0.0, 0.0)</drawOffsetEast>
</graphicData>
</GeneDef>
<GeneDef ParentName="GeneTailBase">
<defName>Succubus_Tail</defName>
<label>succubus tail</label>
<description>Carriers of this gene grow a slender tail ending with a heart that can act as a dexterous fifth limb.</description>
<iconPath>Genes/Icons/Succubus_Tail</iconPath>
<iconColor>(1, 0, 0)</iconColor>
<displayOrderInCategory>1000</displayOrderInCategory>
<capMods>
<li>
<capacity>Manipulation</capacity>
<offset>0.05</offset>
</li>
</capMods>
<biostatCpx>1</biostatCpx>
<biostatMet>-1</biostatMet>
<graphicData>
<graphicPaths>
<li>Things/Pawn/Humanlike/BodyAttachments/rjw_genes_Succubus_Tail/Succubus_Tail_L1</li>
<li>Things/Pawn/Humanlike/BodyAttachments/rjw_genes_Succubus_Tail/Succubus_Tail_R1</li>
<li>Things/Pawn/Humanlike/BodyAttachments/rjw_genes_Succubus_Tail/Succubus_Tail_L2</li>
<li>Things/Pawn/Humanlike/BodyAttachments/rjw_genes_Succubus_Tail/Succubus_Tail_R2</li>
</graphicPaths>
<colorType>Skin</colorType>
<drawScale>2</drawScale>
<drawOffsetNorth>(0, 0.2, -0.1)</drawOffsetNorth>
<drawOffsetSouth>(0, -0.1, 0.1)</drawOffsetSouth>
<drawOffsetEast>(0.2, 0.2, 0.1)</drawOffsetEast>
</graphicData>
<randomChosen>true</randomChosen>
</GeneDef>
</Defs>

View file

@ -24,4 +24,23 @@
</li>
</stages>
</HediffDef>
<HediffDef>
<defName>Fertilin_Lost</defName>
<hediffClass>RJW_Genes.HediffWithComps_tank</hediffClass>
<label>lost fertilin</label>
<description>Percentage of fertilin lost.</description>
<defaultLabelColor>(1,1,1)</defaultLabelColor>
<maxSeverity>1</maxSeverity>
<comps>
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>-0.5</severityPerDay>
</li>
</comps>
<stages>
<li>
<becomeVisible>true</becomeVisible>
</li>
</stages>
</HediffDef>
</Defs>

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1,015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
namespace RJW_Genes
{
internal class HediffWithComps_tank : HediffWithComps
{
public override string LabelInBrackets
{
get
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append(base.LabelInBrackets);
stringBuilder.Append(this.Severity.ToStringPercent());
return stringBuilder.ToString();
}
}
}
}

View file

@ -20,43 +20,58 @@ namespace RJW_Genes
if (props.pawn == null || !props.hasPartner())
return;
float factor = 1f;
if (GeneUtility.HasLifeForce(props.pawn))
float absorb_factor = 0f;
if (GeneUtility.HasLifeForce(props.partner))
{
if (props.sexType == xxx.rjwSextype.Oral || props.sexType == xxx.rjwSextype.Fellatio || props.sexType == xxx.rjwSextype.Sixtynine)
{
AbsorbFertilin(props, factor);
absorb_factor += 1f;
//Currently taking the sum of all penises, maybe I should just consider one at random
}
else if (props.sexType == xxx.rjwSextype.Vaginal && GeneUtility.HasGeneNullCheck(props.pawn, GeneDefOf.rjw_genes_vaginal_absorber))
else if (props.sexType == xxx.rjwSextype.Vaginal && GeneUtility.HasGeneNullCheck(props.partner, GeneDefOf.rjw_genes_vaginal_absorber))
{
AbsorbFertilin(props, factor);
absorb_factor += 1f;
}
else if (props.sexType == xxx.rjwSextype.Anal && GeneUtility.HasGeneNullCheck(props.pawn, GeneDefOf.rjw_genes_anal_absorber))
else if (props.sexType == xxx.rjwSextype.Anal && GeneUtility.HasGeneNullCheck(props.partner, GeneDefOf.rjw_genes_anal_absorber))
{
AbsorbFertilin(props, factor);
absorb_factor += 1f;
}
else if (props.sexType == xxx.rjwSextype.DoublePenetration)
{
if (GeneUtility.HasGeneNullCheck(props.pawn, GeneDefOf.rjw_genes_vaginal_absorber))
if (GeneUtility.HasGeneNullCheck(props.partner, GeneDefOf.rjw_genes_vaginal_absorber))
{
AbsorbFertilin(props, 0.5f);
absorb_factor += 0.5f;
}
if (GeneUtility.HasGeneNullCheck(props.pawn, GeneDefOf.rjw_genes_anal_absorber))
if (GeneUtility.HasGeneNullCheck(props.partner, GeneDefOf.rjw_genes_anal_absorber))
{
AbsorbFertilin(props, 0.5f);
absorb_factor += 0.5f;
}
}
if (absorb_factor != 0)
{
AbsorbFertilin(props, absorb_factor);
}
}
}
public static void AbsorbFertilin(SexProps props, float factor = 1f)
public static void AbsorbFertilin(SexProps props, float absorb_factor = 1f)
{
Pawn_GeneTracker genes = props.pawn.genes;
Pawn_GeneTracker genes = props.partner.genes;
Gene_LifeForce gene = genes.GetFirstGeneOfType<Gene_LifeForce>();
gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.partner) / 100 * factor;
float multiplier = Rand.Range(0.10f, 0.40f); //Around quarter get ejected everytime pawn cums
Hediff fertelin_lost = props.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.Fertilin_Lost);
if (fertelin_lost == null)
{
Hediff new_fertelin_lost = HediffMaker.MakeHediff(HediffDefOf.Fertilin_Lost, props.pawn);
props.pawn.health.AddHediff(new_fertelin_lost);
new_fertelin_lost.Severity = multiplier;
}
else
{
multiplier *= 1 - fertelin_lost.Severity;
fertelin_lost.Severity += multiplier;
}
gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.partner) / 100 * absorb_factor * multiplier;
}
}
}

View file

@ -12,5 +12,6 @@ namespace RJW_Genes
public static class HediffDefOf
{
public static readonly HediffDef Aphrodisiac_Pheromone;
public static readonly HediffDef Fertilin_Lost;
}
}

View file

@ -122,6 +122,7 @@
<Compile Include="Genes\Life_Force\CompProperties_SexInteractionRequirements.cs" />
<Compile Include="Genes\Life_Force\CompProperties_AbilityPussyHeal.cs" />
<Compile Include="Genes\Life_Force\GeneGizmo_ResourceLifeForce.cs" />
<Compile Include="Genes\Life_Force\HediffWithComps_tank.cs" />
<Compile Include="Genes\Life_Force\Interactionchances.cs" />
<Compile Include="Genes\Life_Force\JobDriver_CastAbilityAfterSex.cs" />
<Compile Include="Genes\Life_Force\LifeForceMentalState.cs" />