Advertisement
Guest User

Untitled

a guest
Sep 13th, 2022
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.02 KB | None | 0 0
  1.     Overheal(mob/M) //A heal buffer on mobs - Barry (Elisha) 1/11-12/22
  2.         var/oHealAmount = (M.FirstAidlvl + M.Meditatinglvl) * (M.Level / 15)
  3.         var/oHealEffect = /obj/overlays/Overheal
  4.         oHealAmount = round(oHealAmount)
  5.         if(M.target==M || !M.target)
  6.             if(M.oHealActive || (M.HP > M.HPMAX))
  7.                 M << "You still have the effects of an Overheal on you."
  8.                 return
  9.             F_damage(M, oHealAmount, "#A266F9")
  10.             new/obj/overlays/oHealPBlessed(M.loc)
  11.             M.HP += oHealAmount
  12.             M<<"<font color =#A266F9>You cast Overheal on yourself, increasing your current HP to [M.HP > M.HPMAX ? ("<b>[M.HP - M.HPMAX]</b> more than your Max HP.") : "<b>[M.HP]</b>."]</font>"
  13.             M<< output("<font color =#A266F9>You cast Overheal on yourself, increasing your current HP to [M.HP > M.HPMAX ? ("<b>[M.HP - M.HPMAX]</b> more than your Max HP.") : "<b>[M.HP]</b>."]</font>","DMG")
  14.             Update(M)
  15.             if(M.HP > M.HPMAX)
  16.                 M.oHealActive = 1
  17.                 M.overlays += oHealEffect
  18.                 spawn()
  19.                     overhealEffect(M,oHealEffect)
  20.  
  21.         else
  22.             for(var/mob/O in view(M))
  23.                 if(M.target==O)
  24.                     if(get_step(M,O))
  25.                         if(O.oHealActive || (O.HP > O.HPMAX))
  26.                             M << "[O.name] still has the effects of an Overheal on them."
  27.                             return
  28.                         if(O.mobtype=="Undead")
  29.                             new/obj/overlays/undeadOverheal(O.loc)
  30.                             new/obj/overlays/undeadOHealPBlessed(O.loc)
  31.                             F_damage(O, oHealAmount, "#B9BAC9")
  32.                             M<< output("<font color =#B9BAC9>You cast Overheal Bomb on the Undead [O.name] creature, dealing <b>[oHealAmount]</b> damage.</font>","DMG")
  33.                             O.HP -= oHealAmount
  34.                             Update(O)
  35.                             O.target = M
  36.                             Update(O)
  37.                             Death(M, O)
  38.                             spawn()
  39.                                 O.Follow(O)
  40.                             return
  41.                         F_damage(O, oHealAmount, "#A266F9")
  42.                         new/obj/overlays/oHealPBlessed(O.loc)
  43.                         O.HP += oHealAmount
  44.                         M<<"<font color =#A266F9>You cast Overheal on [O.name], increasing their current HP to [(O.HP > O.HPMAX) ? ("<b>[O.HP - O.HPMAX]</b> more than their Max HP.") : ("<b>[O.HP]</b>.")]</font>"
  45.                         M<< output("<font color =#A266F9>You cast Overheal on [O.name], increasing their current HP to [(O.HP > O.HPMAX) ? ("<b>[O.HP - O.HPMAX]</b> more than their Max HP.") : ("<b>[O.HP]</b>.")]</font>","DMG")
  46.                         O<<"<font color =#A266F9>[M.name] casts Overheal on you, increasing your current HP to [(O.HP > O.HPMAX) ? ("<b>[O.HP - O.HPMAX]</b> more than their Max HP.") : ("<b>[O.HP]</b>.")]</font>"
  47.                         O<< output("<font color =#A266F9>[M.name] casts Overheal on you, increasing your current HP to [(O.HP > O.HPMAX) ? ("<b>[O.HP - O.HPMAX]</b> more than their Max HP.") : ("<b>[O.HP]</b>.")]</font>","DMG")
  48.                         Update(O)
  49.                         if(O.HP > O.HPMAX)
  50.                             O.oHealActive = 1
  51.                             O.overlays += oHealEffect
  52.                             spawn()
  53.                                 overhealEffect(O,oHealEffect)
  54.  
  55.     overhealEffect(mob/M,obj/Overlay)
  56.         while(M.oHealActive)
  57.             sleep(20)
  58.             if(M.HPMAX >= M.HP)
  59.                 M.overlays -= Overlay
  60.                 M.oHealActive = 0
  61.                 M << "<font color =#A266F9>Your Overheal has left you.</font>"
  62.                 M << output("<font color =#A266F9>Your Overheal has left you.</font>","DMG")
  63.                 break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement