Skip to content

Commit

Permalink
Yautja cloak changes (#3757)
Browse files Browse the repository at this point in the history
# About the pull request
Makes Yautja cloak permanent and cost no power. Also adds various
multipliers for forced decloak source, resulting in differing durations
it is unusable.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
Following discussions with Yautja Council and MorrowWolf, as referenced
in #3261, Yautja overall are going to go through an overhaul to their
dynamic and how they interact with the round, moving them more towards
glass canons. The reason for permanent cloak however, is to
prevent/reduce instances of Yautja players standing around in the open
like football spectators as this detracts from their atmosphere.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
add: Made Yautja cloak cost no power to operate, and created multipliers
for disabled duration based upon what caused the Yautja to decloak.
/:cl:
  • Loading branch information
realforest2001 authored Jul 24, 2023
1 parent 894e15f commit 49855f1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
15 changes: 15 additions & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,18 @@
#define DEFAULT_MESSAGE_RANGE 7

#define BAYONET_DRAW_DELAY (1 SECONDS)

//Predator decloak multpliers based on the standard.
#define DECLOAK_STANDARD (10 SECONDS)
/// Forced for any unspecified reason.
#define DECLOAK_FORCED 1
/// Caused by being worn by non humans.
#define DECLOAK_SPECIES 0.75
/// Caused by fire extinguisher.
#define DECLOAK_EXTINGUISHER 1.5
/// Caused by predalien screech.
#define DECLOAK_PREDALIEN 2
/// Caused by being in a body of water.
#define DECLOAK_SUBMERGED 2
/// Caused by an EMP.
#define DECLOAK_EMP 3
2 changes: 1 addition & 1 deletion code/game/turfs/open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@
var/obj/item/clothing/gloves/yautja/hunter/Y = H.gloves
if(Y && istype(Y) && Y.cloaked)
to_chat(H, SPAN_WARNING(" Your bracers hiss and spark as they short out!"))
Y.decloak(H, TRUE)
Y.decloak(H, TRUE, DECLOAK_SUBMERGED)

else if(isxeno(C))
river_slowdown -= 0.7
Expand Down
41 changes: 14 additions & 27 deletions code/modules/cm_preds/yaut_bracers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@
var/perc = (charge / charge_max * 100)
human.update_power_display(perc)

//Non-Yautja have a chance to get stunned with each power drain
if(!HAS_TRAIT(human, TRAIT_YAUTJA_TECH) && !human.hunter_data.thralled)
if(prob(15))
if(cloaked)
decloak(human)
cloak_timer = world.time + 5 SECONDS
shock_user(human)
return FALSE

return TRUE

/obj/item/clothing/gloves/yautja/proc/shock_user(mob/living/carbon/human/M)
Expand Down Expand Up @@ -242,7 +233,7 @@
if(wearer.gloves == src)
wearer.visible_message(SPAN_DANGER("You hear a hiss and crackle!"), SPAN_DANGER("Your bracers hiss and spark!"), SPAN_DANGER("You hear a hiss and crackle!"))
if(cloaked)
decloak(wearer)
decloak(wearer, TRUE, DECLOAK_EMP)
else
var/turf/our_turf = get_turf(src)
our_turf.visible_message(SPAN_DANGER("You hear a hiss and crackle!"), SPAN_DANGER("You hear a hiss and crackle!"))
Expand Down Expand Up @@ -282,29 +273,25 @@

var/mob/living/carbon/human/human = loc

if(cloaked)
charge = max(charge - 10, 0)
if(charge <= 0)
decloak(loc)
//Non-Yautja have a chance to get stunned with each power drain
if(!isyautja(human))
if(prob(15))
decloak(human)
shock_user(human)
return
//Non-Yautja have a chance to get stunned with each power drain
if((!HAS_TRAIT(human, TRAIT_YAUTJA_TECH) && !human.hunter_data.thralled) && prob(15))
if(cloaked)
decloak(human, TRUE, DECLOAK_SPECIES)
shock_user(human)

return ..()

/obj/item/clothing/gloves/yautja/hunter/dropped(mob/user)
move_chip_to_bracer()
if(cloaked)
decloak(user)
decloak(user, TRUE)
..()

/obj/item/clothing/gloves/yautja/hunter/on_enter_storage(obj/item/storage/S)
if(ishuman(loc))
var/mob/living/carbon/human/human = loc
if(cloaked)
decloak(human)
decloak(human, TRUE)
. = ..()

//We use this to activate random verbs for non-Yautja
Expand Down Expand Up @@ -528,7 +515,6 @@
if(true_cloak)
M.invisibility = INVISIBILITY_LEVEL_ONE
M.see_invisible = SEE_INVISIBLE_LEVEL_ONE
new_alpha = 75

log_game("[key_name_admin(usr)] has enabled their cloaking device.")
M.visible_message(SPAN_WARNING("[M] vanishes into thin air!"), SPAN_NOTICE("You are now invisible to normal detection."))
Expand All @@ -553,17 +539,18 @@
sparks.set_up(5, 4, src)
sparks.start()

decloak(wearer, TRUE)
decloak(wearer, TRUE, DECLOAK_EXTINGUISHER)

/obj/item/clothing/gloves/yautja/hunter/decloak(mob/user, forced)
/obj/item/clothing/gloves/yautja/hunter/decloak(mob/user, forced, force_multipler = DECLOAK_FORCED)
if(!user)
return

UnregisterSignal(user, COMSIG_HUMAN_EXTINGUISH)
UnregisterSignal(user, COMSIG_HUMAN_PRE_BULLET_ACT)

var/decloak_timer = (DECLOAK_STANDARD * force_multipler)
if(forced)
cloak_malfunction = world.time + 10 SECONDS
cloak_malfunction = world.time + decloak_timer

cloaked = FALSE
log_game("[key_name_admin(usr)] has disabled their cloaking device.")
Expand All @@ -573,7 +560,7 @@
if(true_cloak)
user.invisibility = initial(user.invisibility)
user.see_invisible = initial(user.see_invisible)
cloak_timer = world.time + 5 SECONDS
cloak_timer = world.time + (DECLOAK_STANDARD / 2)

var/datum/mob_hud/security/advanced/SA = huds[MOB_HUD_SECURITY_ADVANCED]
SA.add_to_hud(user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
var/obj/item/clothing/gloves/yautja/hunter/YG = locate(/obj/item/clothing/gloves/yautja/hunter) in human
if(isyautja(human) && YG)
if(YG.cloaked)
YG.decloak(human)
YG.decloak(human, TRUE, DECLOAK_PREDALIEN)

YG.cloak_timer = xeno_cooldown * 0.1
else if(isxeno(carbon) && xeno.can_not_harm(carbon))
Expand Down

0 comments on commit 49855f1

Please sign in to comment.