mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Start of Cocoon Gene, minor fixes to cockeater
This commit is contained in:
parent
88f588631c
commit
fead22f28c
12 changed files with 253 additions and 6 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,4 +1,14 @@
|
|||
<<<<<<< HEAD
|
||||
# 1.2
|
||||
|
||||
Changes:
|
||||
|
||||
- Cocoon Weaver Gene
|
||||
|
||||
Fixes:
|
||||
|
||||
- Cockeater Ability has now Icon of Cockeater Gene
|
||||
- Cockeater now leaves a bite wound!
|
||||
|
||||
# 1.1.4
|
||||
|
||||
Fixes:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<defName>rjw_genes_cockeater</defName>
|
||||
<label>Eat Cock</label>
|
||||
<description>Eat the cock of another pawn, restoring fertilin based on the size of the cock.</description>
|
||||
<iconPath>Things/Mote/Heart</iconPath>
|
||||
<iconPath>Genes/Icons/cockeater</iconPath>
|
||||
<stunTargetWhileCasting>true</stunTargetWhileCasting>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||
|
@ -27,8 +27,7 @@
|
|||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="RJW_Genes.CompProperties_AbilityCockEater"> <!-- namespace needs to be changed when copied to another mod-->
|
||||
</li>
|
||||
<li Class="RJW_Genes.CompProperties_AbilityCockEater"/> <!-- namespace needs to be changed when copied to another mod-->
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
</Defs>
|
32
Common/Defs/AbilityDefs/Ability_CocoonWeaver.xml
Normal file
32
Common/Defs/AbilityDefs/Ability_CocoonWeaver.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
<AbilityDef ParentName="AbilityTouchBase">
|
||||
<defName>rjw_genes_cocoonweaver</defName>
|
||||
<label>Cocoon</label>
|
||||
<description>Weaves the victim into a (self-sustaining) cocoon. The victim cannot move, but can be bred.</description>
|
||||
<iconPath>Things/Mote/Heart</iconPath>
|
||||
<stunTargetWhileCasting>true</stunTargetWhileCasting>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||
<warmupMote>Mote_CocoonStencil</warmupMote>
|
||||
<warmupEffecter>CocoonWeave</warmupEffecter>
|
||||
<jobDef>CastAbilityOnThingMelee</jobDef>
|
||||
<displayOrder>403</displayOrder>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbilityTouch</verbClass>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<range>-1</range>
|
||||
<warmupTime>15</warmupTime>
|
||||
<targetParams>
|
||||
<canTargetAnimals>true</canTargetAnimals>
|
||||
<canTargetSelf>false</canTargetSelf>
|
||||
<canTargetBuildings>false</canTargetBuildings>
|
||||
<canTargetMechs>false</canTargetMechs>
|
||||
<canTargetBloodfeeders>true</canTargetBloodfeeders>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="RJW_Genes.CompProperties_AbilityCocoonWeaver"/>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
</Defs>
|
78
Common/Defs/Effects/cocoonweave.xml
Normal file
78
Common/Defs/Effects/cocoonweave.xml
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<EffecterDef>
|
||||
<defName>CocoonWeave</defName>
|
||||
<children>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
|
||||
<moteDef>Mote_WeaveA</moteDef>
|
||||
<burstCount>1</burstCount>
|
||||
<chancePerTick>0.05</chancePerTick>
|
||||
<scale>0.25~0.5</scale>
|
||||
<spawnLocType>RandomDrawPosOnTarget</spawnLocType>
|
||||
<attachToSpawnThing>true</attachToSpawnThing>
|
||||
</li>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
|
||||
<moteDef>Mote_WeaveB</moteDef>
|
||||
<burstCount>1</burstCount>
|
||||
<chancePerTick>0.05</chancePerTick>
|
||||
<scale>0.25~0.5</scale>
|
||||
<spawnLocType>RandomDrawPosOnTarget</spawnLocType>
|
||||
<attachToSpawnThing>true</attachToSpawnThing>
|
||||
</li>
|
||||
</children>
|
||||
</EffecterDef>
|
||||
|
||||
<ThingDef ParentName="MoteBase" Name="MoteCocoonBase" Abstract="True">
|
||||
<thingClass>MoteAttached</thingClass>
|
||||
<altitudeLayer>MoteOverhead</altitudeLayer>
|
||||
<mote>
|
||||
<solidTime>0.45</solidTime>
|
||||
<fadeInTime>0.1</fadeInTime>
|
||||
<fadeOutTime>0.2</fadeOutTime>
|
||||
</mote>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_MoteWithAgeSecs</graphicClass>
|
||||
<shaderType>PawnSilhouetteStencilColorAnimated</shaderType>
|
||||
<drawSize>(0.65, 0.65)</drawSize>
|
||||
<shaderParameters>
|
||||
<_NumFrames>5</_NumFrames>
|
||||
<_FramesPerSec>7.5</_FramesPerSec>
|
||||
</shaderParameters>
|
||||
</graphicData>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="MoteBase">
|
||||
<defName>Mote_CocoonStencil</defName>
|
||||
<thingClass>MoteAttached</thingClass>
|
||||
<altitudeLayer>Terrain</altitudeLayer>
|
||||
<mote>
|
||||
<fadeInTime>0.1</fadeInTime>
|
||||
<fadeOutTime>0.1</fadeOutTime>
|
||||
<solidTime>999999</solidTime>
|
||||
<needsMaintenance>True</needsMaintenance>
|
||||
</mote>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_PawnBodySilhouette</graphicClass>
|
||||
<shaderType>PawnSilhouetteStencil</shaderType>
|
||||
<texPath>Things/Mote/Transparent</texPath>
|
||||
</graphicData>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="MoteCocoonBase">
|
||||
<defName>Mote_WeaveA</defName>
|
||||
<graphicData>
|
||||
<texPath>Things/Mote/Cocoon/WeaveA</texPath>
|
||||
</graphicData>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="MoteCocoonBase">
|
||||
<defName>Mote_WeaveB</defName>
|
||||
<graphicData>
|
||||
<texPath>Things/Mote/Cocoon/WeaveB</texPath>
|
||||
</graphicData>
|
||||
</ThingDef>
|
||||
|
||||
</Defs>
|
|
@ -67,6 +67,11 @@
|
|||
<displayPriorityInXenotype>8</displayPriorityInXenotype>
|
||||
</GeneCategoryDef>
|
||||
|
||||
<GeneCategoryDef>
|
||||
<defName>rjw_genes_hive</defName>
|
||||
<label>Hive</label>
|
||||
<displayPriorityInXenotype>7</displayPriorityInXenotype>
|
||||
</GeneCategoryDef>
|
||||
|
||||
|
||||
</Defs>
|
22
Common/Defs/GeneDefs/GeneDefs_Hive.xml
Normal file
22
Common/Defs/GeneDefs/GeneDefs_Hive.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<GeneDef>
|
||||
<defName>rjw_genes_cocoonweaver</defName>
|
||||
<label>Cocoon Weaver</label>
|
||||
<labelShortAdj>cocooner</labelShortAdj>
|
||||
<description>Carriers of this gene can produce a cocoon to prepare helpless victims for breeding.</description>
|
||||
<iconPath>Things/Mote/Heart</iconPath>
|
||||
<displayOrderInCategory>11</displayOrderInCategory>
|
||||
<displayCategory>rjw_genes_hive</displayCategory>
|
||||
<abilities>
|
||||
<li>rjw_genes_cocoonweaver</li>
|
||||
</abilities>
|
||||
<descriptionHyperlinks>
|
||||
<AbilityDef>rjw_genes_cocoonweaver</AbilityDef>
|
||||
</descriptionHyperlinks>
|
||||
<biostatCpx>1</biostatCpx>
|
||||
<biostatMet>-1</biostatMet>
|
||||
</GeneDef>
|
||||
|
||||
</Defs>
|
BIN
Common/Textures/Things/Mote/Cocoon/WeaveA.psd
Normal file
BIN
Common/Textures/Things/Mote/Cocoon/WeaveA.psd
Normal file
Binary file not shown.
BIN
Common/Textures/Things/Mote/Cocoon/WeaveB.psd
Normal file
BIN
Common/Textures/Things/Mote/Cocoon/WeaveB.psd
Normal file
Binary file not shown.
|
@ -0,0 +1,81 @@
|
|||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
/// <summary>
|
||||
/// The CocoonWeaver Ability applies the RJW-Cocoon to a pawn.
|
||||
/// Friendly Pawns can always be cocooned, neutral and hostile pawns must be downed.
|
||||
/// </summary>
|
||||
public class CompAbilityEffect_CocoonWeaver : CompAbilityEffect
|
||||
{
|
||||
private new CompProperties_AbilityCocoonWeaver Props
|
||||
{
|
||||
get
|
||||
{
|
||||
return (CompProperties_AbilityCocoonWeaver)this.props;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||
{
|
||||
base.Apply(target, dest);
|
||||
|
||||
Pawn CocooningPawn = this.parent.pawn;
|
||||
Pawn PawnToCocoon = target.Pawn;
|
||||
|
||||
// Error Case - Null Pawn
|
||||
if (PawnToCocoon == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PawnToCocoon.health.AddHediff(HediffDef.Named("RJW_Cocoon"));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For validity, there are a few checks:
|
||||
/// 0. Target is not already cocooned
|
||||
/// 1. Target is either Colonist / Prisoner
|
||||
/// 2. If the Target is an enemy or neutral, it must be downed.
|
||||
/// </summary>
|
||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||
{
|
||||
Pawn cocoonTarget = target.Pawn;
|
||||
if (cocoonTarget != null)
|
||||
{
|
||||
bool CocoonTargetIsColonistOrPrisoner = cocoonTarget.Faction == this.parent.pawn.Faction || cocoonTarget.IsPrisonerOfColony;
|
||||
bool CocoonTargetIsHostile = cocoonTarget.HostileTo(this.parent.pawn);
|
||||
bool CocoonTargetIsDowned = cocoonTarget.Downed;
|
||||
|
||||
if (cocoonTarget.health.hediffSet.hediffs.Any(t => t.def.defName == "RJW_Cocoon"))
|
||||
{
|
||||
if (throwMessages)
|
||||
Messages.Message(cocoonTarget.Name + " is already cocooned.", cocoonTarget, MessageTypeDefOf.RejectInput, false);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!CocoonTargetIsColonistOrPrisoner && !(CocoonTargetIsHostile && CocoonTargetIsDowned))
|
||||
{
|
||||
if (throwMessages)
|
||||
{
|
||||
if(CocoonTargetIsHostile && !CocoonTargetIsDowned)
|
||||
{
|
||||
Messages.Message(cocoonTarget.Name + " is hostile, but not downed.", cocoonTarget, MessageTypeDefOf.RejectInput, false);
|
||||
}
|
||||
else if (!CocoonTargetIsColonistOrPrisoner)
|
||||
{
|
||||
Messages.Message(cocoonTarget.Name + " is not a part of the colony or hostile.", cocoonTarget, MessageTypeDefOf.RejectInput, false);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return base.Valid(target, throwMessages);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class CompProperties_AbilityCocoonWeaver : CompProperties_AbilityEffect
|
||||
{
|
||||
public CompProperties_AbilityCocoonWeaver()
|
||||
{
|
||||
this.compClass = typeof(CompAbilityEffect_CocoonWeaver);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -51,9 +51,9 @@ namespace RJW_Genes
|
|||
}
|
||||
// Increase LifeForce for Biter
|
||||
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(CockBiter), gained_lifeforce);
|
||||
|
||||
// Handle Damage for Bitten
|
||||
CockBittenPawn.health.RemoveHediff(part);
|
||||
CockBittenPawn.TakeDamage(new DamageInfo(DamageDefOf.Bite, 99999f, 999f, hitPart: Genital_Helper.get_genitalsBPR(CockBittenPawn)));
|
||||
//CockBittenPawn.health.RemoveHediff(part);
|
||||
CockBittenPawn.needs.mood.thoughts.memories.TryGainMemory(ThoughtDefOf.rjw_genes_cock_eaten, CockBittenPawn, null);
|
||||
|
||||
//Only one penis at the time
|
||||
|
|
|
@ -87,6 +87,8 @@
|
|||
<Compile Include="Genes\Genitalia\Gene_DemonicGenitalia.cs" />
|
||||
<Compile Include="Genes\Genitalia\Gene_EquineGenitalia.cs" />
|
||||
<Compile Include="Genes\Genitalia\GenitaliaChanger.cs" />
|
||||
<Compile Include="Genes\Hive\Abilities\CompAbilityEffect_CocoonWeaver.cs" />
|
||||
<Compile Include="Genes\Hive\Abilities\CompProperties_AbilityCocoonWeaver.cs" />
|
||||
<Compile Include="Genes\Life_Force\Abilities\AbilityUtility.cs" />
|
||||
<Compile Include="Genes\Life_Force\UI\Alert_LowFertilin.cs" />
|
||||
<Compile Include="Genes\Life_Force\Abilities\CompAbilityEffect_CasterIsNaked.cs" />
|
||||
|
|
Loading…
Reference in a new issue