Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Overheal(mob/M) //A heal buffer on mobs - Barry (Elisha) 1/11-12/22
- var/oHealAmount = (M.FirstAidlvl + M.Meditatinglvl) * (M.Level / 15)
- var/oHealEffect = /obj/overlays/Overheal
- oHealAmount = round(oHealAmount)
- if(M.target==M || !M.target)
- if(M.oHealActive || (M.HP > M.HPMAX))
- M << "You still have the effects of an Overheal on you."
- return
- F_damage(M, oHealAmount, "#A266F9")
- new/obj/overlays/oHealPBlessed(M.loc)
- M.HP += oHealAmount
- 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>"
- 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")
- Update(M)
- if(M.HP > M.HPMAX)
- M.oHealActive = 1
- M.overlays += oHealEffect
- spawn()
- overhealEffect(M,oHealEffect)
- else
- for(var/mob/O in view(M))
- if(M.target==O)
- if(get_step(M,O))
- if(O.oHealActive || (O.HP > O.HPMAX))
- M << "[O.name] still has the effects of an Overheal on them."
- return
- if(O.mobtype=="Undead")
- new/obj/overlays/undeadOverheal(O.loc)
- new/obj/overlays/undeadOHealPBlessed(O.loc)
- F_damage(O, oHealAmount, "#B9BAC9")
- M<< output("<font color =#B9BAC9>You cast Overheal Bomb on the Undead [O.name] creature, dealing <b>[oHealAmount]</b> damage.</font>","DMG")
- O.HP -= oHealAmount
- Update(O)
- O.target = M
- Update(O)
- Death(M, O)
- spawn()
- O.Follow(O)
- return
- F_damage(O, oHealAmount, "#A266F9")
- new/obj/overlays/oHealPBlessed(O.loc)
- O.HP += oHealAmount
- 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>"
- 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")
- 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>"
- 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")
- Update(O)
- if(O.HP > O.HPMAX)
- O.oHealActive = 1
- O.overlays += oHealEffect
- spawn()
- overhealEffect(O,oHealEffect)
- overhealEffect(mob/M,obj/Overlay)
- while(M.oHealActive)
- sleep(20)
- if(M.HPMAX >= M.HP)
- M.overlays -= Overlay
- M.oHealActive = 0
- M << "<font color =#A266F9>Your Overheal has left you.</font>"
- M << output("<font color =#A266F9>Your Overheal has left you.</font>","DMG")
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement