Skip to content

Commit

Permalink
Various updates
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxWithAShotgun committed Jan 2, 2021
1 parent 66e45e6 commit 43b1931
Show file tree
Hide file tree
Showing 22 changed files with 90 additions and 28 deletions.
Binary file modified 1.1/Assemblies/ReviaRace.dll
Binary file not shown.
Binary file modified 1.2/Assemblies/ReviaRace.dll
Binary file not shown.
Binary file modified 1.2/Assemblies/ReviaRace.pdb
Binary file not shown.
34 changes: 22 additions & 12 deletions Defs/FactionDefs/ReviaMarauders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,33 +44,43 @@
</maxPawnCostPerTotalPointsCurve>
<pawnGroupMakers>
<li>
<!--Type 1 - high quantity, low quality-->
<!--Type 1 - Smaller scouting raid-->
<kindDef>Combat</kindDef>
<commonality>30</commonality>
<commonality>60</commonality>
<options>
<ReviaRaceRaider>20</ReviaRaceRaider>
<ReviaRaceMarauder>5</ReviaRaceMarauder>
<ReviaRaceRaider>5</ReviaRaceRaider>
<ReviaRaceMarauder>1</ReviaRaceMarauder>
</options>
</li>
<li>
<!--Type 2 - high quality, low quantity-->
<!--Type 2 - Moderate sized raid-->
<kindDef>Combat</kindDef>
<commonality>30</commonality>
<options>
<ReviaRaceMarauder>5</ReviaRaceMarauder>
<ReviaRaceBerserker>5</ReviaRaceBerserker>
<ReviaRaceSkullshatterer>5</ReviaRaceSkullshatterer>
<ReviaRaceBerserker>2</ReviaRaceBerserker>
</options>
</li>
<li>
<!--Type 3 - balanced-->
<!--Type 3 - Heavy assault raid-->
<kindDef>Combat</kindDef>
<commonality>30</commonality>
<commonality>15</commonality>
<options>
<ReviaRaceRaider>10</ReviaRaceRaider>
<ReviaRaceMarauder>5</ReviaRaceMarauder>
<ReviaRaceBerserker>3</ReviaRaceBerserker>
<ReviaRaceSkullshatterer>3</ReviaRaceSkullshatterer>
<ReviaRaceBerserker>2</ReviaRaceBerserker>
<ReviaRaceSkullshatterer>1</ReviaRaceSkullshatterer>
</options>
</li>
<li>
<!--Type 4 - Base siege -->
<kindDef>Combat</kindDef>
<commonality>5</commonality>
<options>
<ReviaRaceRaider>15</ReviaRaceRaider>
<ReviaRaceMarauder>10</ReviaRaceMarauder>
<ReviaRaceBerserker>5</ReviaRaceBerserker>
<ReviaRaceSkullshatterer>1</ReviaRaceSkullshatterer>
</options>
</li>
<li>
Expand All @@ -80,7 +90,7 @@
<ReviaRaceMarauder>15</ReviaRaceMarauder>
<ReviaRaceRaider>15</ReviaRaceRaider>
<ReviaRaceBerserker>5</ReviaRaceBerserker>
<ReviaRaceSkullshatterer>5</ReviaRaceSkullshatterer>
<ReviaRaceSkullshatterer>1</ReviaRaceSkullshatterer>
</options>
</li>
</pawnGroupMakers>
Expand Down
20 changes: 15 additions & 5 deletions Defs/FactionDefs/ReviaTemplars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,19 @@
<li>
<!--You done goofed-->
<kindDef>Combat</kindDef>
<commonality>15</commonality>
<options>
<ReviaRaceTemplar>25</ReviaRaceTemplar>
<ReviaRaceHighTemplar>3</ReviaRaceHighTemplar>
<ReviaRaceTemplar>7</ReviaRaceTemplar>
<ReviaRaceHighTemplar>1</ReviaRaceHighTemplar>
</options>
</li>
<li>
<!--Scouting party-->
<kindDef>Combat</kindDef>
<commonality>60</commonality>
<options>
<ReviaRaceInitiate>5</ReviaRaceInitiate>
<ReviaRaceTemplar>2</ReviaRaceTemplar>
</options>
</li>
<li>
Expand Down Expand Up @@ -93,9 +103,9 @@
<li>
<kindDef>Settlement</kindDef>
<options>
<ReviaRaceInitiate>50</ReviaRaceInitiate>
<ReviaRaceTemplar>30</ReviaRaceTemplar>
<ReviaRaceHighTemplar>5</ReviaRaceHighTemplar>
<ReviaRaceInitiate>20</ReviaRaceInitiate>
<ReviaRaceTemplar>20</ReviaRaceTemplar>
<ReviaRaceHighTemplar>3</ReviaRaceHighTemplar>
</options>
</li>
</pawnGroupMakers>
Expand Down
2 changes: 1 addition & 1 deletion Defs/NeedDefs/RedHazeNeed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<label>Red Haze</label>
<description>A strange, almost rabid bloodthirst grips this person. \n\nBloodstone powder appears to keep this almost uncontrollable fury away. Without it, however, this person degenerates into a berserk fury, attacking anyone and everyone around.</description>
<listPriority>44</listPriority>
<fallPerDay>0.195</fallPerDay>
<fallPerDay>0.240</fallPerDay>
</NeedDef>
</Defs>
3 changes: 2 additions & 1 deletion Defs/PawnKindDefs/ReviaMarauder/ReviaBerserker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
<label>revia berserker</label>
<race>ReviaRaceAlien</race>
<defaultFactionType>ReviaMarauderFaction</defaultFactionType>
<combatPower>75</combatPower>
<combatPower>95</combatPower>
<baseRecruitDifficulty>1.00</baseRecruitDifficulty>
<itemQuality>Excellent</itemQuality>
<gearHealthRange>0.6~1.5</gearHealthRange>
<apparelTags>
<li>Neolithic</li>
<li>Medieval</li>
Expand Down
3 changes: 2 additions & 1 deletion Defs/PawnKindDefs/ReviaMarauder/ReviaMarauder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
<label>revia marauder</label>
<race>ReviaRaceAlien</race>
<defaultFactionType>ReviaMarauderFaction</defaultFactionType>
<combatPower>55</combatPower>
<combatPower>75</combatPower>
<canBeSapper>true</canBeSapper>
<baseRecruitDifficulty>0.95</baseRecruitDifficulty>
<itemQuality>Good</itemQuality>
<gearHealthRange>0.4~1.1</gearHealthRange>
<apparelTags>
<li>Neolithic</li>
<li>Medieval</li>
Expand Down
2 changes: 1 addition & 1 deletion Defs/PawnKindDefs/ReviaMarauder/ReviaRaider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label>revia raider</label>
<race>ReviaRaceAlien</race>
<defaultFactionType>ReviaMarauderFaction</defaultFactionType>
<combatPower>35</combatPower>
<combatPower>55</combatPower>
<baseRecruitDifficulty>0.65</baseRecruitDifficulty>
<itemQuality>Poor</itemQuality>
<apparelTags>
Expand Down
2 changes: 1 addition & 1 deletion Defs/PawnKindDefs/ReviaMarauder/ReviaSkullshatterer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label>revia skullshatterer</label>
<race>ReviaRaceAlien</race>
<defaultFactionType>ReviaMarauderFaction</defaultFactionType>
<combatPower>100</combatPower>
<combatPower>350</combatPower>
<isFighter>true</isFighter>
<factionLeader>true</factionLeader>
<baseRecruitDifficulty>1.00</baseRecruitDifficulty>
Expand Down
2 changes: 1 addition & 1 deletion Defs/PawnKindDefs/ReviaTemplar/ReviaHighTemplar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label>Revia High Templar</label>
<defaultFactionType>ReviaTemplarFaction</defaultFactionType>
<race>ReviaRaceAlien</race>
<combatPower>100</combatPower>
<combatPower>350</combatPower>
<factionLeader>true</factionLeader>
<minGenerationAge>30</minGenerationAge>
<baseRecruitDifficulty>1.0</baseRecruitDifficulty>
Expand Down
2 changes: 1 addition & 1 deletion Defs/PawnKindDefs/ReviaTemplar/ReviaInitiate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label>Revia Initiate</label>
<defaultFactionType>ReviaTemplarFaction</defaultFactionType>
<race>ReviaRaceAlien</race>
<combatPower>50</combatPower>
<combatPower>55</combatPower>
<baseRecruitDifficulty>1.0</baseRecruitDifficulty>
<itemQuality>Excellent</itemQuality>
<apparelTags>
Expand Down
2 changes: 1 addition & 1 deletion Defs/PawnKindDefs/ReviaTemplar/ReviaQuartermaster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label>Revia quartermaster</label>
<defaultFactionType>ReviaTemplarFaction</defaultFactionType>
<race>ReviaRaceAlien</race>
<combatPower>55</combatPower>
<combatPower>80</combatPower>
<baseRecruitDifficulty>1.0</baseRecruitDifficulty>
<itemQuality>Excellent</itemQuality>
<apparelTags>
Expand Down
2 changes: 1 addition & 1 deletion Defs/PawnKindDefs/ReviaTemplar/ReviaTemplar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<label>Revia Templar</label>
<defaultFactionType>ReviaTemplarFaction</defaultFactionType>
<race>ReviaRaceAlien</race>
<combatPower>75</combatPower>
<combatPower>125</combatPower>
<baseRecruitDifficulty>1.0</baseRecruitDifficulty>
<itemQuality>Excellent</itemQuality>
<apparelTags>
Expand Down
1 change: 1 addition & 0 deletions Defs/RecipeDefs/HumanlikeSacrifice.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<RecipeDef>
<workerClass>ReviaRace.Workers.SacrificeWorker</workerClass>
<defName>ReviaRaceSacrificeCorpse</defName>
<label>sacrifice humanlike</label>
<description>Sacrifice a humanlike corpse to honour the bloody gods of the Revian pantheon.</description>
Expand Down
1 change: 1 addition & 0 deletions Languages/English/Keyed/Comps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<ReviaRaceSettingsSacrificeCostGrowthStartTier>Cost growth start tier</ReviaRaceSettingsSacrificeCostGrowthStartTier>
<ReviaRaceSettingsSacrificeCostGrowthMode>Cost growth mode</ReviaRaceSettingsSacrificeCostGrowthMode>
<ReviaRaceSettingsEnableRandomSoulReapTier>Assign random Soul Reap tier on spawn</ReviaRaceSettingsEnableRandomSoulReapTier>
<ReviaRaceSettingsEnableStripOnSacrifice>Strip corpses on sacrifice</ReviaRaceSettingsEnableStripOnSacrifice>
<ReviaRaceSettingsSacrificeCostGreater>Bloodstone costs with current settings: {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}</ReviaRaceSettingsSacrificeCostGreater>
<ReviaRaceSettingsSacrificeCostLesser>Palestone costs with current settings: {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}</ReviaRaceSettingsSacrificeCostLesser>
<Linear>Linear</Linear>
Expand Down
1 change: 1 addition & 0 deletions Source/Helpers/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ internal static class Strings
internal static string SettingsSacrificeCostGrowthStartTier => "ReviaRaceSettingsSacrificeCostGrowthStartTier";
internal static string SettingsSacrificeCostGrowthMode => "ReviaRaceSettingsSacrificeCostGrowthMode";
internal static string SettingsSacrificeEnableRandomSoulReapTier => "ReviaRaceSettingsEnableRandomSoulReapTier";
internal static string SettingsSacrificeEnableStripOnSacrifice => "ReviaRaceSettingsEnableStripOnSacrifice";
internal static string SettingsSacrificeCostGreater => "ReviaRaceSettingsSacrificeCostGreater";
internal static string SettingsSacrificeCostLesser => "ReviaRaceSettingsSacrificeCostLesser";
internal static string SettingsSacrificeCostHeader => "ReviaRaceSettingsSacrificeCostHeader";
Expand Down
2 changes: 1 addition & 1 deletion Source/JobDrivers/SacrificePrisonerJobDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected override IEnumerable<Toil> MakeNewToils()
mapPawn.needs.mood.thoughts.memories.TryGainMemory(Defs.SacrificedPositive);
}
else if (mapPawn.IsColonist &&
mapPawn.IsCannibal() || mapPawn.IsPsychopath() || mapPawn.IsBloodlust())
!(mapPawn.IsCannibal() || mapPawn.IsPsychopath() || mapPawn.IsBloodlust()))
{
mapPawn.needs.mood.thoughts.memories.TryGainMemory(Defs.SacrificedNegative);
}
Expand Down
10 changes: 10 additions & 0 deletions Source/PersistentData/ReviaSettings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ReviaRace.Comps;
using ReviaRace.Workers;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -27,6 +28,7 @@ public void ApplySettings()
InvokeBlessing.CostGrowthMode = CostGrowthMode;
InvokeBlessing.CostGrowthStartTier = CostGrowthStartTier;
SoulReaper.EnableRandomSoulReapTier = EnableRandomSoulReapTier;
SacrificeWorker.EnableCorpseStripOnSacrifice = EnableCorpseStripOnSacrifice;
}

public float CostBase
Expand Down Expand Up @@ -62,13 +64,21 @@ public bool EnableRandomSoulReapTier
}
internal bool _enableRandomSoulReapTier;

public bool EnableCorpseStripOnSacrifice
{
get => _enableCorpseStripOnSacrifice;
set => _enableCorpseStripOnSacrifice = value;
}
internal bool _enableCorpseStripOnSacrifice;

public override void ExposeData()
{
Scribe_Values.Look(ref _costBase, GetLabel(nameof(CostBase)), 1);
Scribe_Values.Look(ref _costGrowthFactor, GetLabel(nameof(CostGrowthFactor)), 2);
Scribe_Values.Look(ref _costGrowthStartTier, GetLabel(nameof(CostGrowthStartTier)), 1);
Scribe_Values.Look(ref _costGrowthMode, GetLabel(nameof(CostGrowthMode)), SacrificeCostGrowth.Exponential);
Scribe_Values.Look(ref _enableRandomSoulReapTier, GetLabel(nameof(EnableRandomSoulReapTier)), false);
Scribe_Values.Look(ref _enableCorpseStripOnSacrifice, GetLabel(nameof(EnableCorpseStripOnSacrifice)), true);

ApplySettings();
}
Expand Down
1 change: 1 addition & 0 deletions Source/ReviaRace.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReviaRaceMod.cs" />
<Compile Include="RoomRoleWorkers\SkarneChapel.cs" />
<Compile Include="Workers\SacrificeWorker.cs" />
<Compile Include="WorkGivers\SacrificePrisonerWorkGiver.cs" />
</ItemGroup>
<ItemGroup />
Expand Down
3 changes: 2 additions & 1 deletion Source/ReviaRaceMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public override void DoSettingsWindowContents(Rect inRect)
var sacrificeList = new Listing_Standard();
var height
= 3 * 10
+ (bodyStyle.lineHeight + 8) * 6
+ (bodyStyle.lineHeight + 8) * 10
+ (headerStyle.lineHeight);

var sacrificeGroupRect = new Rect(inRect.x + 10, inRect.y + 10, inRect.width - 20, height);
Expand All @@ -69,6 +69,7 @@ var height
DrawTextFieldWithLabel(sacrificeList.GetRect(lineHeight), Strings.SettingsSacrificeCostGrowthFactor, ref Settings._costGrowthFactor, ref _growthFactorBuf, 0, 10);
DrawTextFieldWithLabel(sacrificeList.GetRect(lineHeight), Strings.SettingsSacrificeCostGrowthStartTier, ref Settings._costGrowthStartTier, ref _growthStartTierBuf, 1, 8);
DrawCheckBoxWithLabel(sacrificeList.GetRect(lineHeight), Strings.SettingsSacrificeEnableRandomSoulReapTier, ref Settings._enableRandomSoulReapTier);
DrawCheckBoxWithLabel(sacrificeList.GetRect(lineHeight), Strings.SettingsSacrificeEnableStripOnSacrifice, ref Settings._enableCorpseStripOnSacrifice);

sacrificeList.Gap(10);
DrawCostCalculationLabel(sacrificeList.GetRect(lineHeight), typeof(InvokeGreaterBlessing));
Expand Down
25 changes: 25 additions & 0 deletions Source/Workers/SacrificeWorker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace ReviaRace.Workers
{
public class SacrificeWorker : RecipeWorker
{
public static bool EnableCorpseStripOnSacrifice { get; set; }

public override void ConsumeIngredient(Thing ingredient, RecipeDef recipe, Map map)
{
if (EnableCorpseStripOnSacrifice)
{
var corpse = ingredient as Corpse;
corpse.Strip();
}

base.ConsumeIngredient(ingredient, recipe, map);
}
}
}

0 comments on commit 43b1931

Please sign in to comment.