Fixed antipoison not working in some scenarios

Added new ::timers admin command
This commit is contained in:
Avi Weinstock
2023-09-01 12:29:12 +00:00
committed by Ryan
parent 3b0360eb01
commit 12eaa1e05a
5 changed files with 17 additions and 5 deletions
+3
View File
@@ -2831,6 +2831,9 @@ fun isStunned(entity: Entity) : Boolean {
* @see To those whe ask "why severity instead of plain damage?" to which the answer is: severity is how it works authentically, and allows for scenarios where, e.g. a poison should hit 6 once, and then drop to 5 immediately.
**/
fun applyPoison (entity: Entity, source: Entity, severity: Int) {
if(hasTimerActive<PoisonImmunity>(entity)) {
return
}
val existingTimer = getTimer<Poison>(entity)
if (existingTimer != null) {