Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Closes #86
Browse files Browse the repository at this point in the history
  • Loading branch information
Pluviolithic committed Nov 24, 2023
1 parent 8ee0c08 commit 80e8c9a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/server/Combat/Enemies/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ local function handleEnemy(enemy)
store:dispatch(actions.incrementPlayerStat(player.Name, "Fear", damage, enemy.Name))
store:dispatch(actions.incrementPlayerStat(player.Name, "Kills"))
store:dispatch(actions.logKilledEnemyType(player.Name, enemy.Name))

if damage >= info.MaxHealth * 0.3 then
store:dispatch(
actions.incrementPlayerStat(player.Name, "Gems", enemy.Configuration.Gems.Value, enemy.Name)
store:dispatch(
actions.incrementPlayerStat(
player.Name,
"Gems",
enemy.Configuration.Gems.Value * damage / info.MaxHealth,
enemy.Name
)
end
)
end
enemyJanitor:Destroy()
task.wait(respawnRate)
Expand Down

0 comments on commit 80e8c9a

Please sign in to comment.