mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes a few bugs associated with the Dead Ringer
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#define TRANSITIONEDGE 7 // Distance from edge to move to another z-level.
|
||||
|
||||
// Invisibility constants.
|
||||
// Invisibility constants. These should only be used for TRUE invisibility, AKA nothing living players touch
|
||||
#define INVISIBILITY_LIGHTING 20
|
||||
#define INVISIBILITY_LEVEL_ONE 35
|
||||
#define INVISIBILITY_LEVEL_TWO 45
|
||||
@@ -21,6 +21,9 @@
|
||||
#define SEE_INVISIBLE_MINIMUM 5
|
||||
#define INVISIBILITY_MAXIMUM 100
|
||||
|
||||
// Pseudo-Invis, like Ninja, Ling, Etc.
|
||||
#define EFFECTIVE_INVIS 50 // Below this, can't be examined, may as well be invisible to the game
|
||||
|
||||
// For the client FPS pref and anywhere else
|
||||
#define MAX_CLIENT_FPS 200
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/deadringer/dropped()
|
||||
if(timer > 20)
|
||||
uncloak()
|
||||
@@ -50,7 +49,6 @@
|
||||
activated = 0
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/deadringer/process()
|
||||
if(activated)
|
||||
if (ismob(src.loc))
|
||||
@@ -77,13 +75,11 @@
|
||||
icon_state = "deadringer"
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/deadringer/proc/deathprevent()
|
||||
for(var/mob/living/simple_animal/D in oviewers(7, src))
|
||||
D.LoseTarget()
|
||||
watchowner.emote("deathgasp")
|
||||
watchowner.invisibility = 85
|
||||
watchowner.alpha = 127
|
||||
watchowner.alpha = 15
|
||||
makeacorpse(watchowner)
|
||||
for(var/mob/living/simple_animal/D in oviewers(7, src))
|
||||
D.LoseTarget()
|
||||
@@ -91,7 +87,6 @@
|
||||
|
||||
/obj/item/weapon/deadringer/proc/uncloak()
|
||||
if(watchowner)
|
||||
watchowner.invisibility = 0
|
||||
watchowner.alpha = 255
|
||||
playsound(get_turf(src), 'sound/effects/uncloak.ogg', 35, 1, -1)
|
||||
return
|
||||
@@ -180,5 +175,3 @@
|
||||
var/obj/item/organ/internal/G = I
|
||||
G.Destroy()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var/skip_gear = 0
|
||||
var/skip_body = 0
|
||||
|
||||
if(alpha <= 50)
|
||||
if(alpha <= EFFECTIVE_INVIS)
|
||||
src.loc.examine(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -769,8 +769,6 @@
|
||||
var/mob/living/L = target_mob
|
||||
if(L.stat != DEAD)
|
||||
return 1
|
||||
if(L.invisibility < INVISIBILITY_LEVEL_ONE)
|
||||
return 1
|
||||
if (istype(target_mob,/obj/mecha))
|
||||
var/obj/mecha/M = target_mob
|
||||
if (M.occupant)
|
||||
@@ -890,7 +888,7 @@
|
||||
continue
|
||||
else if(L in friends)
|
||||
continue
|
||||
else if(L.invisibility >= INVISIBILITY_LEVEL_ONE)
|
||||
else if(L.alpha <= EFFECTIVE_INVIS)
|
||||
continue
|
||||
else if(!SA_attackable(L))
|
||||
continue
|
||||
@@ -1219,7 +1217,7 @@
|
||||
ai_log("AttackTarget() Bailing because we're disabled",2)
|
||||
LoseTarget()
|
||||
return 0
|
||||
if(!target_mob || !SA_attackable(target_mob) || (target_mob.invisibility >= INVISIBILITY_LEVEL_ONE)) //if the target went invisible, you can't follow it
|
||||
if(!target_mob || !SA_attackable(target_mob) || (target_mob.alpha <= EFFECTIVE_INVIS)) //if the target went invisible, you can't follow it
|
||||
LoseTarget()
|
||||
return 0
|
||||
if(!(target_mob in ListTargets(view_range)))
|
||||
|
||||
Reference in New Issue
Block a user