Skip to content

Commit

Permalink
Fixes #6
Browse files Browse the repository at this point in the history
v1.18.1.11 - Blood Salvos Fixed

- Using the latest JecsTools update (v1.0.8.9), Vampires now properly cast Blood Salvo (Issue came from friendly fire code in JT)
- Blood Salvo now refunds blood points if it fails to cast when targets at not present.
  • Loading branch information
jecrell committed Feb 5, 2018
1 parent 51de3b7 commit 38cd9ff
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<name>Rim of Madness - Vampires</name>
<author>Jecrell</author>
<targetVersion>0.18.1722</targetVersion>
<description>V1.18.1.10
<description>V1.18.1.11
Adds vampires to RimWorld.

Heavily inspired by Vampire the Masquerade, this mod introduces a disease known as vampirism.
Expand Down
Binary file modified Assemblies/Vampire.dll
Binary file not shown.
1 change: 1 addition & 0 deletions Defs/AbilityDefs/ROMV_Thaumaturgy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<muzzleFlashScale>20</muzzleFlashScale>
<isPrimary>false</isPrimary>
<AbilityTargetCategory>TargetAoE</AbilityTargetCategory>
<mustHaveTarget>true</mustHaveTarget>
<TargetAoEProperties>
<targetClass>Pawn</targetClass>
<showRangeOnSelect>true</showRangeOnSelect>
Expand Down
12 changes: 12 additions & 0 deletions Source/Vampires/VampAbility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ public override bool ShouldShowGizmo()
return false;
}

public override void Notify_AbilityFailed(bool refund)
{
base.Notify_AbilityFailed(refund);
if (refund)
{
if (Pawn.IsGhoul())
Pawn.BloodNeed().CurGhoulVitaePoints += AbilityDef.bloodCost;
else
Pawn.BloodNeed().AdjustBlood(AbilityDef.bloodCost);
}
}

public bool PassesAbilitySpecialCases()
{
if (this.AbilityDef == null)
Expand Down

0 comments on commit 38cd9ff

Please sign in to comment.