Skip to content

Commit

Permalink
Shield Update Fix (#1501)
Browse files Browse the repository at this point in the history
* Update shield.dm

* Update shield.dm
  • Loading branch information
LanceSmites328 authored Oct 5, 2023
1 parent 4b7f172 commit 34f16a1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions code/game/objects/items/ego_weapons/subtype/shield.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@
block = TRUE
block_success = FALSE
shield_user.physiology.armor = shield_user.physiology.armor.modifyRating(bomb = 1) //bomb defense must be over 0
shield_user.physiology.red_mod *= (1 - ((reductions[1]) / 100))
shield_user.physiology.white_mod *= (1 - ((reductions[2]) / 100))
shield_user.physiology.black_mod *= (1 - ((reductions[3]) / 100))
shield_user.physiology.pale_mod *= (1 - ((reductions[4]) / 100))
shield_user.physiology.red_mod *= max(0.001, (1 - ((reductions[1]) / 100)))
shield_user.physiology.white_mod *= max(0.001, (1 - ((reductions[2]) / 100)))
shield_user.physiology.black_mod *= max(0.001, (1 - ((reductions[3]) / 100)))
shield_user.physiology.pale_mod *= max(0.001, (1 - ((reductions[4]) / 100)))
RegisterSignal(user, COMSIG_MOB_APPLY_DAMGE, .proc/AnnounceBlock)
if(cleaning)
DisableBlock(shield_user)
Expand All @@ -105,10 +105,10 @@
//Ends the block, causes you to take more damage for as long as debuff_duration if you did not block any damage
/obj/item/ego_weapon/shield/proc/DisableBlock(mob/living/carbon/human/user)
user.physiology.armor = user.physiology.armor.modifyRating(bomb = -1)
user.physiology.red_mod /= (1 - ((reductions[1]) / 100))
user.physiology.white_mod /= (1 - ((reductions[2]) / 100))
user.physiology.black_mod /= (1 - ((reductions[3]) / 100))
user.physiology.pale_mod /= (1 - ((reductions[4]) / 100))
user.physiology.red_mod /= max(0.001, (1 - ((reductions[1]) / 100)))
user.physiology.white_mod /= max(0.001, (1 - ((reductions[2]) / 100)))
user.physiology.black_mod /= max(0.001, (1 - ((reductions[3]) / 100)))
user.physiology.pale_mod /= max(0.001, (1 - ((reductions[4]) / 100)))

UnregisterSignal(user, COMSIG_MOB_APPLY_DAMGE)
deltimer(parry_timer)
Expand Down

0 comments on commit 34f16a1

Please sign in to comment.