Improves illusions, nerfs stealth armor (#21299)

* Improves illusions, nerfs stealth armor

* proper checking / lewcs requests

* outdated comment be gone
This commit is contained in:
Qwertytoforty
2023-06-21 18:08:47 -04:00
committed by GitHub
parent e2f1931887
commit 4aac4eb543
2 changed files with 68 additions and 2 deletions
+2 -1
View File
@@ -518,12 +518,13 @@
if(!active)
return FALSE
if(reaction_check(hitby) && use_power())
var/mob/living/simple_animal/hostile/illusion/escape/E = new(owner.loc)
var/mob/living/simple_animal/hostile/illusion/escape/stealth/E = new(owner.loc)
E.Copy_Parent(owner, 50)
E.GiveTarget(owner) //so it starts running right away
E.Goto(owner, E.move_to_delay, E.minimum_distance)
owner.visible_message("<span class='danger'>[owner] is hit by [attack_text] in the chest!</span>") //We pretend to be hit, since blocking it would stop the message otherwise
owner.make_invisible()
disable(rand(4, 5)) //No blocking while invisible
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob/living, reset_visibility)), 4 SECONDS)
return TRUE
@@ -19,7 +19,10 @@
var/multiply_chance = 0 //if we multiply on hit
deathmessage = "vanishes into thin air! It was a fake!"
del_on_death = TRUE
hud_possible = list(
HEALTH_HUD, STATUS_HUD, SPECIALROLE_HUD, // from /mob/living
ID_HUD, WANTED_HUD, IMPMINDSHIELD_HUD, IMPCHEM_HUD, IMPTRACK_HUD
)
/mob/living/simple_animal/hostile/illusion/Life()
..()
@@ -38,6 +41,8 @@
transform = initial(transform)
pixel_y = initial(pixel_y)
pixel_x = initial(pixel_x)
fake_huds()
add_to_all_human_data_huds()
/mob/living/simple_animal/hostile/illusion/examine(mob/user)
if(parent_mob)
@@ -45,6 +50,62 @@
else
. = ..()
/mob/living/simple_animal/hostile/illusion/proc/fake_huds()
if(SSticker.current_state != GAME_STATE_PLAYING)
return
if(!ishuman(parent_mob))
return
var/mob/living/carbon/human/H = parent_mob
var/image/holder = hud_list[ID_HUD]
holder.icon_state = "hudunknown"
if(H.wear_id)
holder.icon_state = "hud[ckey(H.wear_id.get_job_name())]"
var/image/holder2
for(var/i in list(IMPTRACK_HUD, IMPMINDSHIELD_HUD, IMPCHEM_HUD))
holder2 = hud_list[i]
holder2.icon_state = null
for(var/obj/item/implant/I in H)
if(I.implanted)
if(istype(I, /obj/item/implant/tracking))
holder2 = hud_list[IMPTRACK_HUD]
holder2.icon_state = "hud_imp_tracking"
else if(istype(I, /obj/item/implant/mindshield))
holder2 = hud_list[IMPMINDSHIELD_HUD]
holder2.icon_state = "hud_imp_loyal"
else if(istype(I, /obj/item/implant/chem))
holder2 = hud_list[IMPCHEM_HUD]
holder2.icon_state = "hud_imp_chem"
var/image/holder3 = hud_list[WANTED_HUD]
var/perpname = H.get_visible_name(TRUE) //gets the name of the perp, works if they have an id or if their face is uncovered
if(perpname)
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.security)
if(R)
switch(R.fields["criminal"])
if(SEC_RECORD_STATUS_EXECUTE)
holder3.icon_state = "hudexecute"
return
if(SEC_RECORD_STATUS_ARREST)
holder3.icon_state = "hudwanted"
return
if(SEC_RECORD_STATUS_SEARCH)
holder3.icon_state = "hudsearch"
return
if(SEC_RECORD_STATUS_MONITOR)
holder3.icon_state = "hudmonitor"
return
if(SEC_RECORD_STATUS_DEMOTE)
holder3.icon_state = "huddemote"
return
if(SEC_RECORD_STATUS_INCARCERATED)
holder3.icon_state = "hudincarcerated"
return
if(SEC_RECORD_STATUS_PAROLLED)
holder3.icon_state = "hudparolled"
return
if(SEC_RECORD_STATUS_RELEASED)
holder3.icon_state = "hudreleased"
return
holder3.icon_state = null
/mob/living/simple_animal/hostile/illusion/AttackingTarget()
. = ..()
@@ -79,3 +140,7 @@
/mob/living/simple_animal/hostile/illusion/escape/cult
loot = list(/obj/effect/temp_visual/cult/sparks)
/mob/living/simple_animal/hostile/illusion/escape/stealth
maxHealth = 20
health = 20