Skip to content
This repository was archived by the owner on Sep 4, 2023. It is now read-only.

Commit e2a4c24

Browse files
committed
use original damage + clean
1 parent 073a635 commit e2a4c24

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

BetterDoggie/BetterDoggie.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System;
44
using System.Collections.Generic;
55
using Exiled.API.Features;
6-
using Exiled.API.Features.Items;
76
using Exiled.API.Enums;
87
using MEC;
98

BetterDoggie/BetterDoggie.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@
3131
</Reference>
3232
</ItemGroup>
3333

34+
<ItemGroup>
35+
<PackageReference Include="EXILED" Version="5.2.2" />
36+
</ItemGroup>
37+
3438
</Project>

BetterDoggie/EventHandlers.cs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
using UnityEngine;
1+
using System;
2+
using UnityEngine;
23
using System.Collections.Generic;
4+
using CustomPlayerEffects;
35
using Exiled.API.Features;
46
using Exiled.Events.EventArgs;
57
using Interactables.Interobjects;
68
using Interactables.Interobjects.DoorUtils;
7-
using CustomPlayerEffects;
89
using MEC;
910

1011
namespace BetterDoggie
@@ -28,7 +29,7 @@ public static void OnChangingRoles(ChangingRoleEventArgs ev)
2829
if (player == null || !Is939(player.Role)) return;
2930

3031
player.Broadcast(_config.SpawnBroadcast);
31-
player.Broadcast(new Exiled.API.Features.Broadcast("<color=red>Remember to set your ability keybind! (.doggiehelp for help)</color>", 10), false);
32+
player.Broadcast(new Exiled.API.Features.Broadcast("<color=red>Remember to set your ability keybind! (.doggiehelp for help)</color>"));
3233
player.ShowHint(_config.KeybindHint, _config.KeybindHintShowDuration);
3334

3435
player.Health = _config.DoggieHealth;
@@ -51,16 +52,10 @@ public static void OnHurtingPlayer(HurtingEventArgs ev)
5152
if (attacker == null || ev.Target == null || attacker == ev.Target || !Is939(attacker.Role))
5253
return;
5354

54-
ev.Amount = _config.BaseDamage;
55-
56-
if (attacker.ArtificialHealth <= 200)
57-
{
58-
ev.Amount += 10;
59-
}
60-
else if (attacker.ArtificialHealth <= 50)
61-
{
62-
ev.Amount += 35;
63-
}
55+
var maxHume = BetterDoggie.Singleton.Config.DoggieAhp;
56+
ev.Amount = BetterDoggie.Singleton.Config.BaseDamage +
57+
Math.Abs(ev.Attacker.ArtificialHealth - maxHume) /
58+
(maxHume * BetterDoggie.Singleton.Config.MaxDamageBoost);
6459

6560
attacker.EnableEffect<SinkHole>(_config.SlowdownDuration, _config.ShouldSlowdownStack);
6661
attacker.ChangeEffectIntensity<SinkHole>(2);
@@ -80,7 +75,7 @@ public static void OnInteractingDoor(InteractingDoorEventArgs ev)
8075

8176
if (_activeAbilities.ContainsKey(player) && _activeAbilities[player] == null)
8277
{
83-
_activeAbilities[player] = Timing.RunCoroutine(DoorBustingCooldown(player)); ;
78+
_activeAbilities[player] = Timing.RunCoroutine(DoorBustingCooldown(player));
8479

8580
BustDoor(ev.Door.Base, player, _config.EnableBustSpeedBoost);
8681
}

BetterDoggie/Translations.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using Exiled.API.Interfaces;
2+
3+
namespace BetterDoggie
4+
{
5+
public class Translations : ITranslation
6+
{
7+
// TODO - Do this
8+
}
9+
}

0 commit comments

Comments
 (0)