Merge and aphrodisiac pheromones fixes

This commit is contained in:
Shabakur 2023-01-16 13:14:13 +01:00
parent 982339a84e
commit 84c4587a18
7 changed files with 14 additions and 48 deletions

Binary file not shown.

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<XenotypeDef>
<defName>Succubus</defName>
<label>succubus</label>
<description>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.</description> <iconPath>UI/Icons/Xenotypes/Baseliner</iconPath>
<inheritable>true</inheritable>
<displayPriority>1000</displayPriority>
<factionlessGenerationWeight>0</factionlessGenerationWeight>
<genes>
<li>rjw_genes_female_only</li>
<li>Beauty_Beautiful</li>
<li>rjw_genes_succubus_tail</li>
<li>rjw_genes_Succubus_Wings</li>
<li>rjw_genes_aphrodisiac_pheromones</li>
<li>rjw_genes_orgasm_rush</li>
<li>rjw_genes_hypersexual</li>
<li>rjw_genes_lifeforce</li>
<li>rjw_genes_lifeforcedrain</li>
<li>rjw_genes_pussyhealer</li>
<li>rjw_genes_cockeater</li>
<li>rjw_genes_paralysingkiss</li>
<li>rjw_genes_seduce</li>
<li>rjw_genes_vaginal_absorber</li>
<li>rjw_genes_anal_absorber</li>
<li>rjw_genes_drainer</li>
</genes>
</XenotypeDef>
</Defs>

View File

@ -2,13 +2,13 @@
<Defs>
<PawnKindDef>
<defName>Succubus</defName>
<defName>rjw_genes_succubus</defName>
<label>succubus</label>
<combatPower>50</combatPower>
<race>Human</race>
<xenotypeSet>
<xenotypeChances>
<Succubus>999</Succubus>
<rjw_genes_succubus>999</rjw_genes_succubus>
</xenotypeChances>
</xenotypeSet>
<acceptArrestChanceFactor>0.5</acceptArrestChanceFactor>

View File

@ -4,7 +4,7 @@
<XenotypeDef>
<defName>rjw_genes_succubus</defName>
<label>Succubus</label>
<description>Succubi are strongly enhanced xenohumans. Powered by archites, their abilities go far beyond normal genetic enhancements. These overnaturally beautiful creatures strive parasitically on the Fertilin found in semen. </description>
<description>Succubi are strongly enhanced xenohumans. Powered by archites, their abilities go far beyond normal genetic enhancements. These overnaturally beautiful creatures strive parasitically on the Fertilin found in semen.</description>
<descriptionShort>Succubi are beautiful and extremely hungry Xenohumans. They strive on having sex and extracting their victims life-force through this. </descriptionShort>
<iconPath>UI/Icons/Xenotypes/Sanguophage</iconPath>
<soundDefOnImplant>PawnBecameSanguophage</soundDefOnImplant>
@ -13,6 +13,7 @@
<combatPowerFactor>1</combatPowerFactor>
<displayPriority>-1000</displayPriority>
<factionlessGenerationWeight>0.005</factionlessGenerationWeight>
<inheritable>true</inheritable>
<doubleXenotypeChances>
<Pigskin>0.02</Pigskin>
<Impid>0.02</Impid>
@ -32,10 +33,11 @@
<li>rjw_genes_drainer</li>
<li>rjw_genes_pussyhealer</li>
<li>rjw_genes_pussyhealing</li>
<li>rjw_genes_paralysingkiss</li>
<li>rjw_genes_seduce</li>
<li>rjw_genes_elasticity</li>
<li>rjw_genes_succubus_wings</li>
<li>rjw_genes_succubus_tail</li>
<li>rjw_genes_aphrodisiac_pheromones</li>

View File

@ -89,12 +89,8 @@ namespace RJW_Genes
public static readonly GeneDef rjw_genes_succubus_tail;
public static readonly GeneDef rjw_genes_succubus_wings;
// Others & Non-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;
public static readonly XenotypeDef rjw_genes_succubus;
}

View File

@ -49,13 +49,14 @@ namespace RJW_Genes
}
//Spawn succubus at pawn and initiate sex
Pawn succubus = PawnGenerator.GeneratePawn(new PawnGenerationRequest(PawnKindDef.Named("Succubus"), faction, PawnGenerationContext.NonPlayer, -1,
Pawn succubus = PawnGenerator.GeneratePawn(new PawnGenerationRequest(PawnKindDef.Named("rjw_genes_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);
//Broken for now
//Sends letter
//string value = succubus.DevelopmentalStage.Child() ? "FeralChild".Translate().ToString() : succubus.KindLabel;
//TaggedString value2 = succubus.DevelopmentalStage.Child() ? "Child".Translate() : "Person".Translate();

View File

@ -13,11 +13,11 @@ namespace RJW_Genes
public class Gene_Aphrodisiac_Pheromones : Gene
{
//Summary one every one check for all pawns nearby and in line of sight and add/renew a hediff which increases sexdrive for six hours.
//Summary once every one hour check for all pawns nearby and in line of sight (same room) and add/renew a hediff which lasts for 1 hour.
public override void Tick()
{
base.Tick();
if (this.pawn.IsHashIntervalTick(2500))
if (this.pawn.IsHashIntervalTick(2500) && this.pawn.Map != null)
{
//Only spread pheromones if sexdrive above 1
float sexfrequency = this.pawn.GetStatValue(StatDef.Named("SexFrequency"));
@ -31,12 +31,12 @@ namespace RJW_Genes
}
}
//Creatus an IEnumerable of all pawns which are closeby and in lineofsight, self and other pawns with aphrodisiac pheromones gene are skipped.
//Creatus an IEnumerable of all pawns which are closeby and in lineofsight, self and other pawns with aphrodisiac pheromones gene are skipped (to prevent loops).
private IEnumerable<Pawn> AffectedPawns(IntVec3 pos, Map map)
{
foreach (Pawn pawn in map.mapPawns.AllPawns)
{
if (this.pawn != null && pawn != this.pawn && pos.DistanceTo(pawn.Position) < 5 && GenSight.LineOfSight(pos, pawn.Position, pawn.Map) && !GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_aphrodisiac_pheromones))
if (pawn != null && this.pawn != null && pawn != this.pawn && pos.DistanceTo(pawn.Position) < 5 && GenSight.LineOfSight(pos, pawn.Position, pawn.Map) && !GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_aphrodisiac_pheromones))
{
yield return pawn;
}
@ -45,7 +45,7 @@ namespace RJW_Genes
yield break;
}
//Applies er renews a hediff which increases sexdrive for 6 hours
//Applies or renews a hediff which increases sexdrive for 1 hours
private void InduceAphrodisiac(Pawn pawn, float sexfrequency)
{
Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.Aphrodisiac_Pheromone);
@ -59,9 +59,6 @@ namespace RJW_Genes
Hediff aphrodisiac = HediffMaker.MakeHediff(HediffDefOf.Aphrodisiac_Pheromone, pawn);
foreach (StatModifier stat in aphrodisiac.CurStage.statFactors)
{
//Log.Message(pawn.Name.ToString());
//Log.Message(stat.stat.defName);
//Log.Message(stat.value.ToString());
if (stat.stat.defName == "SexFrequency")
{
stat.value = ModifySexfrequency(pawn, sexfrequency);