Skip to content

Commit 03b7120

Browse files
committed
updated readme, exiled package, added roledamagereceived multiplier
1 parent 61ec80a commit 03b7120

File tree

5 files changed

+264
-225
lines changed

5 files changed

+264
-225
lines changed

Common Utilities/Common Utilities.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="EXILEDOFFICIAL" Version="8.11.0" />
26+
<PackageReference Include="EXILED-OFFICIAL" Version="8.12.2" />
2727
<PackageReference Include="StyleCop.Analyzers" Version="$(StyleCopVersion)" IncludeAssets="All" PrivateAssets="All" />
2828
</ItemGroup>
2929

Common Utilities/Config.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public class Config : IConfig
137137
},
138138
};
139139

140-
[Description("The list of custom 914 recipies. OriginalItem is the item being upgraded, NewItem is the item to upgrade to, and Chance is the percent chance of the upgrade happening. You can specify multiple upgrade choices for the same item.")]
140+
[Description("The list of custom 914 recipies. OriginalItem is the item being upgraded, NewItem is the item to upgrade to, and Chance is the percent chance of the upgrade happening. You can specify multiple upgrade choices for the same item. For custom items use the item's name.")]
141141
public Dictionary<Scp914KnobSetting, List<ItemUpgradeChance>> Scp914ItemChances { get; set; } = new()
142142
{
143143
{
@@ -153,7 +153,7 @@ public class Config : IConfig
153153
},
154154
};
155155

156-
[Description("The list of custom 914 recipies for roles. Original is the role to be changed, New is the new role to assign, Chance is the % chance of the upgrade occuring.")]
156+
[Description("The list of custom 914 recipies for roles. Original is the role to be changed, New is the new role to assign, Chance is the % chance of the upgrade occuring. For custom roles use the role's name.")]
157157
public Dictionary<Scp914KnobSetting, List<PlayerUpgradeChance>> Scp914ClassChanges { get; set; } = new()
158158
{
159159
{
@@ -228,8 +228,16 @@ public class Config : IConfig
228228
[Description("If item cleanup should only happen in the Pocket Dimension or not.")]
229229
public bool ItemCleanupOnlyPocket { get; set; } = false;
230230

231-
[Description("A list of all roles and their damage modifiers. The number here is a multiplier, not a raw damage amount. Thus, setting it to 1 = normal damage, 1.5 = 50% more damage, and 0.5 = 50% less damage.")]
232-
public Dictionary<RoleTypeId, float> RoleDamageMultipliers { get; set; } = new()
231+
[Description("A list of all roles and their damage dealt modifiers. The number here is a multiplier, not a raw damage amount. Thus, setting it to 1 = normal damage, 1.5 = 50% more damage, and 0.5 = 50% less damage.")]
232+
public Dictionary<RoleTypeId, float> RoleDamageDealtMultipliers { get; set; } = new()
233+
{
234+
{
235+
RoleTypeId.Scp173, 1.0f
236+
},
237+
};
238+
239+
[Description("List of roles and their damage received multipliers. 1 = normal damage, 1.5 = 50% more damage, 0.5 = 50% less damage.")]
240+
public Dictionary<RoleTypeId, float> RoleDamageReceivedMultipliers { get; set; } = new()
233241
{
234242
{
235243
RoleTypeId.Scp173, 1.0f

Common Utilities/EventHandlers/PlayerHandlers.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,12 @@ public void OnPlayerDied(DiedEventArgs ev)
101101

102102
public void OnPlayerHurting(HurtingEventArgs ev)
103103
{
104-
if (config.RoleDamageMultipliers != null && ev.Attacker != null && config.RoleDamageMultipliers.TryGetValue(ev.Attacker.Role, out var damageMultiplier))
104+
if (config.RoleDamageDealtMultipliers != null && ev.Attacker != null && config.RoleDamageDealtMultipliers.TryGetValue(ev.Attacker.Role, out var damageMultiplier))
105105
ev.Amount *= damageMultiplier;
106106

107+
if (config.RoleDamageReceivedMultipliers != null && config.RoleDamageReceivedMultipliers.TryGetValue(ev.Player.Role, out damageMultiplier))
108+
ev.Amount *= damageMultiplier;
109+
107110
if (config.DamageMultipliers != null && config.DamageMultipliers.TryGetValue(ev.DamageHandler.Type, out damageMultiplier))
108111
ev.Amount *= damageMultiplier;
109112

0 commit comments

Comments
 (0)