bigger mobs have some special health bars (#49104)

* cool beans

* more, more!

* smol fix
This commit is contained in:
keronshb
2021-05-19 11:59:50 -04:00
parent e6952d43f5
commit 60965939d6
20 changed files with 60 additions and 1 deletions

View File

@@ -543,7 +543,46 @@
med_hud_set_health()
med_hud_set_status()
//proc used to ressuscitate a mob
/mob/living/update_health_hud()
var/severity = 0
var/healthpercent = (health/maxHealth) * 100
if(hud_used?.healthdoll) //to really put you in the boots of a simplemob
var/obj/screen/healthdoll/living/livingdoll = hud_used.healthdoll
switch(healthpercent)
if(100 to INFINITY)
livingdoll.icon_state = "living0"
if(80 to 100)
livingdoll.icon_state = "living1"
severity = 1
if(60 to 80)
livingdoll.icon_state = "living2"
severity = 2
if(40 to 60)
livingdoll.icon_state = "living3"
severity = 3
if(20 to 40)
livingdoll.icon_state = "living4"
severity = 4
if(1 to 20)
livingdoll.icon_state = "living5"
severity = 5
else
livingdoll.icon_state = "living6"
severity = 6
if(!livingdoll.filtered)
livingdoll.filtered = TRUE
var/icon/mob_mask = icon(icon, icon_state)
if(mob_mask.Height() > world.icon_size || mob_mask.Width() > world.icon_size)
var/health_doll_icon_state = health_doll_icon ? health_doll_icon : "megasprite"
mob_mask = icon('icons/mob/screen_gen.dmi', health_doll_icon_state) //swap to something generic if they have no special doll
UNLINT(livingdoll.filters += filter(type="alpha", icon = mob_mask))
livingdoll.filters += filter(type="drop_shadow", size = -1)
if(severity > 0)
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
else
clear_fullscreen("brute")
//Proc used to resuscitate a mob, for full_heal see fully_heal()
/mob/living/proc/revive(full_heal = FALSE, admin_revive = FALSE)
SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, full_heal, admin_revive)
if(full_heal)

View File

@@ -94,6 +94,7 @@
var/smoke_delay = 0 //used to prevent spam with smoke reagent reaction on mob.
var/bubble_icon = "default" //what icon the mob uses for speechbubbles
var/health_doll_icon //if this exists AND the normal sprite is bigger than 32x32, this is the replacement icon state (because health doll size limitations). the icon will always be screen_gen.dmi
var/last_bumped = 0
var/unique_name = 0 //if a mob's name should be appended with an id when created e.g. Mob (666)

View File

@@ -149,6 +149,7 @@
icon_state = "alienq"
icon_living = "alienq"
icon_dead = "alienq_dead"
health_doll_icon = "alienq"
bubble_icon = "alienroyal"
move_to_delay = 4
maxHealth = 400

View File

@@ -73,6 +73,7 @@
icon_living = "megacarp"
icon_dead = "megacarp_dead"
icon_gib = "megacarp_gib"
health_doll_icon = "megacarp"
regen_amount = 6
maxHealth = 30

View File

@@ -9,6 +9,7 @@
icon_state = "crawling"
icon_living = "crawling"
icon_dead = "dead"
health_doll_icon = "crawling"
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
speak_chance = 80
maxHealth = 220

View File

@@ -28,6 +28,7 @@ Difficulty: Medium
icon_state = "miner"
icon_living = "miner"
icon = 'icons/mob/broadMobs.dmi'
health_doll_icon = "miner"
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
light_color = "#E4C7C5"
movement_type = GROUND

View File

@@ -33,6 +33,7 @@ Difficulty: Hard
icon_state = "bubblegum"
icon_living = "bubblegum"
icon_dead = ""
health_doll_icon = "bubblegum"
friendly_verb_continuous = "stares down"
friendly_verb_simple = "stare down"
icon = 'icons/mob/lavaland/96x96megafauna.dmi'

View File

@@ -32,6 +32,7 @@ Difficulty: Very Hard
icon_state = "eva"
icon_living = "eva"
icon_dead = "dragon_dead"
health_doll_icon = "eva"
friendly_verb_continuous = "stares down"
friendly_verb_simple = "stare down"
icon = 'icons/mob/lavaland/96x96megafauna.dmi'

View File

@@ -48,6 +48,7 @@ Difficulty: Medium
icon_state = "dragon"
icon_living = "dragon"
icon_dead = "dragon_dead"
health_doll_icon = "dragon"
friendly_verb_continuous = "stares down"
friendly_verb_simple = "stare down"
speak_emote = list("roars")

View File

@@ -44,6 +44,7 @@ Difficulty: Normal
attack_sound = 'sound/weapons/sonic_jackhammer.ogg'
icon_state = "hierophant"
icon_living = "hierophant"
health_doll_icon = "hierophant"
friendly_verb_continuous = "stares down"
friendly_verb_simple = "stare down"
icon = 'icons/mob/lavaland/hierophant_new.dmi'

View File

@@ -26,6 +26,7 @@ SHITCODE AHEAD. BE ADVISED. Also comment extravaganza
spacewalk = TRUE
icon_state = "mega_legion"
icon_living = "mega_legion"
health_doll_icon = "mega_legion"
desc = "One of many."
icon = 'icons/mob/lavaland/96x96megafauna.dmi'
attack_verb_continuous = "chomps"

View File

@@ -75,6 +75,7 @@
icon_living = "watcher"
icon_aggro = "watcher"
icon_dead = "watcher_dead"
health_doll_icon = "watcher"
pixel_x = -10
throw_message = "bounces harmlessly off of"
melee_damage_lower = 15

View File

@@ -25,6 +25,7 @@
icon_aggro = "broodmother"
icon_dead = "egg_sac"
icon_gib = "syndicate_gib"
health_doll_icon = "broodmother"
maxHealth = 800
health = 800
melee_damage_lower = 30

View File

@@ -24,6 +24,7 @@
icon_aggro = "herald"
icon_dead = "herald_dying"
icon_gib = "syndicate_gib"
health_doll_icon = "herald"
maxHealth = 800
health = 800
melee_damage_lower = 20

View File

@@ -24,6 +24,7 @@
icon_aggro = "legionnaire"
icon_dead = "legionnaire_dead"
icon_gib = "syndicate_gib"
health_doll_icon = "legionnaire"
maxHealth = 800
health = 800
melee_damage_lower = 30

View File

@@ -24,6 +24,7 @@
icon_aggro = "pandora"
icon_dead = "pandora_dead"
icon_gib = "syndicate_gib"
health_doll_icon = "pandora"
maxHealth = 800
health = 800
melee_damage_lower = 15

View File

@@ -253,6 +253,7 @@
icon_state = "legion"
icon_living = "legion"
icon_dead = "legion"
health_doll_icon = "legion"
health = 450
maxHealth = 450
melee_damage_lower = 20

View File

@@ -6,6 +6,7 @@
icon_living = "clown"
icon_dead = "clown_dead"
icon_gib = "clown_gib"
health_doll_icon = "clown" //if >32x32, it will use this generic. for all the huge clown mobs that subtype from this
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
turns_per_move = 5
response_disarm_continuous = "gently pushes aside"

View File

@@ -6,6 +6,7 @@
icon_living = "pine_1"
icon_dead = "pine_1"
icon_gib = "pine_1"
health_doll_icon = "pine_1"
gender = NEUTER
speak_chance = 0
turns_per_move = 5
@@ -72,5 +73,6 @@
icon_living = "festivus_pole"
icon_dead = "festivus_pole"
icon_gib = "festivus_pole"
health_doll_icon = "festivus_pole"
loot = list(/obj/item/stack/rods)
speak_emote = list("polls")

View File

@@ -8,6 +8,7 @@
icon_aggro = "Fugu0"
icon_dead = "Fugu_dead"
icon_gib = "syndicate_gib"
health_doll_icon = "Fugu0"
mob_biotypes = MOB_ORGANIC|MOB_BEAST
mouse_opacity = MOUSE_OPACITY_ICON
move_to_delay = 5