Drainer gene and missing crossreference to rjw_genes_likes_cumflation fixed

This commit is contained in:
Shabakur 2022-12-31 11:42:00 +01:00
parent 3c9e97beb6
commit 2a124bfbb9
8 changed files with 104 additions and 17 deletions

Binary file not shown.

View File

@ -91,7 +91,7 @@
<GeneDef>
<defName>rjw_genes_vaginal_absorber</defName>
<label>Vaginal Fertilin Absorber</label>
<description>Pawns with this gene are able to absorb ferilin through their vagina.</description>
<description>Carriers of this gene are able to absorb ferilin through their vagina.</description>
<iconPath>Things/Mote/Heart</iconPath>
<prerequisite>rjw_genes_lifeforce</prerequisite>
<displayOrderInCategory>2</displayOrderInCategory>
@ -102,11 +102,23 @@
<GeneDef>
<defName>rjw_genes_anal_absorber</defName>
<label>Anal Fertilin Absorber</label>
<description>Pawns with this gene are able to absorb ferilin through their anus.</description>
<description>Carriers of this gene are able to absorb ferilin through their anus.</description>
<iconPath>Things/Mote/Heart</iconPath>
<prerequisite>rjw_genes_lifeforce</prerequisite>
<displayOrderInCategory>3</displayOrderInCategory>
<displayCategory>rjw_genes_fertilin</displayCategory>
<biostatCpx>1</biostatCpx>
</GeneDef>
<GeneDef>
<defName>rjw_genes_drainer</defName>
<label>vitality drainer</label>
<description>Carriers of this gene are able to absorb a great amount of ferilin by draining the vitality of the partner.</description>
<iconPath>Things/Mote/Heart</iconPath>
<prerequisite>rjw_genes_lifeforce</prerequisite>
<displayOrderInCategory>4</displayOrderInCategory>
<displayCategory>rjw_genes_fertilin</displayCategory>
<biostatCpx>1</biostatCpx>
<biostatMet>-1</biostatMet>
</GeneDef>
</Defs>

View File

@ -8,7 +8,6 @@
<label>induced libido</label>
<description>Aphrodisiac pheromone effects.</description>
<defaultLabelColor>(1,0,0.5)</defaultLabelColor>
<scenarioCanAdd>true</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<comps>
<li Class="HediffCompProperties_SeverityPerDay">
@ -38,9 +37,55 @@
</li>
</comps>
<stages>
<li>
<becomeVisible>true</becomeVisible>
</li>
<li>
<becomeVisible>true</becomeVisible>
</li>
</stages>
</HediffDef>
<HediffDef>
<defName>Succubus_Drained</defName>
<hediffClass>HediffWithComps</hediffClass>
<label>Drained</label>
<description>The vitality of this pawn has been drained.</description>
<defaultLabelColor>(1,0,0.5)</defaultLabelColor>
<maxSeverity>1.0</maxSeverity>
<initialSeverity>1.0</initialSeverity>
<comps>
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>-1.0</severityPerDay>
</li>
</comps>
<stages>
<li>
<label>minor</label>
<capMods>
<li>
<capacity>Consciousness</capacity>
<offset>-0.1</offset>
</li>
</capMods>
</li>
<li>
<minSeverity>0.5</minSeverity>
<label>moderate</label>
<capMods>
<li>
<capacity>Consciousness</capacity>
<offset>-0.2</offset>
</li>
</capMods>
</li>
<li>
<minSeverity>0.8</minSeverity>
<label>severe</label>
<capMods>
<li>
<capacity>Consciousness</capacity>
<offset>-0.4</offset>
</li>
</capMods>
</li>
</stages>
</HediffDef>
</Defs>

View File

@ -74,8 +74,19 @@
<xpath>Defs/XenotypeDef[defName="Highmate"]/genes</xpath>
<value>
<li>rjw_genes_hypersexual</li>
</value>
</Operation>
<Operation Class="PatchOperationFindMod">
<mods>
<li>RimJobWorld - Licentia Labs</li>
</mods>
<match Class="PatchOperationAdd">
<xpath>Defs/XenotypeDef[defName="Highmate"]/genes</xpath>
<value>
<li>rjw_genes_likes_cumflation</li>
</value>
</match>
</Operation>
<Operation Class="PatchOperationAdd">

View File

@ -77,6 +77,7 @@ namespace RJW_Genes
public static readonly GeneDef rjw_genes_pussyhealer;
public static readonly GeneDef rjw_genes_vaginal_absorber;
public static readonly GeneDef rjw_genes_anal_absorber;
public static readonly GeneDef rjw_genes_drainer;
// Cosmetic
public static readonly GeneDef rjw_genes_succubus_tail;

View File

@ -54,7 +54,7 @@ namespace RJW_Genes
CompHediff = part.TryGetComp<rjw.CompHediffBodyPart>();
if (CompHediff != null)
{
total_cum += CompHediff.FluidAmmount * multiplier;
total_cum += CompHediff.FluidAmmount * CompHediff.FluidModifier * multiplier;
}
}
}

View File

@ -34,6 +34,7 @@ namespace RJW_Genes
if (GeneUtility.HasLifeForce(props.partner))
{
Pawn succubus = props.partner;
if (!props.isRevese)
{
if (props.isReceiver)
@ -66,28 +67,44 @@ namespace RJW_Genes
{
AbsorbFertilin(props, absorb_factor);
}
if (GeneUtility.HasGeneNullCheck(succubus, GeneDefOf.rjw_genes_drainer) && !props.pawn.health.hediffSet.HasHediff(HediffDefOf.Succubus_Drained))
{
props.pawn.health.AddHediff(HediffDefOf.Succubus_Drained);
GeneUtility.OffsetLifeForce(succubus, 0.25f);
}
}
}
public static void AbsorbFertilin(SexProps props, float absorb_factor = 1f)
{
Pawn_GeneTracker genes = props.partner.genes;
Gene_LifeForce gene = genes.GetFirstGeneOfType<Gene_LifeForce>();
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 fertilin_lost = props.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.Fertilin_Lost);
//Around quarter get ejected everytime pawn cums
float multiplier = Rand.Range(0.10f, 0.40f);
//Create a new ferilin_lost hediff or reduce multiplier
if (fertilin_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;
Hediff new_fertilin_lost = HediffMaker.MakeHediff(HediffDefOf.Fertilin_Lost, props.pawn);
props.pawn.health.AddHediff(new_fertilin_lost);
new_fertilin_lost.Severity = multiplier;
}
else
{
multiplier *= 1 - fertelin_lost.Severity;
fertelin_lost.Severity += multiplier;
multiplier *= 1 - fertilin_lost.Severity;
fertilin_lost.Severity += multiplier;
}
//More in the tank means more to give
if (props.pawn.Has(Quirk.Messy))
{
multiplier *= 2;
}
//Currently taking the sum of all penises, maybe I should just consider one at random
gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.pawn) / 100 * absorb_factor * multiplier;
float valuechange = CumUtility.GetTotalFluidAmount(props.pawn) / 100 * absorb_factor * multiplier;
GeneUtility.OffsetLifeForce(props.partner, valuechange);
//gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.pawn) / 100 * absorb_factor * multiplier;
}

View File

@ -13,5 +13,6 @@ namespace RJW_Genes
{
public static readonly HediffDef Aphrodisiac_Pheromone;
public static readonly HediffDef Fertilin_Lost;
public static readonly HediffDef Succubus_Drained;
}
}