mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Shadowling, changeling, and vision fixes/changes
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/datum/vision_override
|
||||
var/name = "vision override"
|
||||
var/see_in_dark = 0
|
||||
var/see_invisible = 0
|
||||
var/light_sensetive = 0
|
||||
var/sight_flags = 0
|
||||
|
||||
/datum/vision_override/nightvision
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
/datum/vision_override/nightvision/thermals
|
||||
sight_flags = SEE_MOBS
|
||||
|
||||
/datum/vision_override/nightvision/thermals/ling_augmented_eyesight
|
||||
light_sensetive = 1
|
||||
@@ -19,6 +19,9 @@
|
||||
/obj/effect/proc_holder/changeling/proc/on_purchase(var/mob/user)
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/changeling/proc/on_refund(mob/user)
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/changeling/Click()
|
||||
var/mob/user = usr
|
||||
if(!user || !user.mind || !user.mind.changeling)
|
||||
|
||||
@@ -406,8 +406,10 @@ var/list/sting_paths
|
||||
mind.changeling.changeling_speak = 0
|
||||
mind.changeling.reset()
|
||||
for(var/obj/effect/proc_holder/changeling/p in mind.changeling.purchasedpowers)
|
||||
if(!(p.dna_cost == 0 && keep_free_powers))
|
||||
mind.changeling.purchasedpowers -= p
|
||||
if(p.dna_cost == 0 && keep_free_powers)
|
||||
continue
|
||||
mind.changeling.purchasedpowers -= p
|
||||
p.on_refund(src)
|
||||
|
||||
/datum/changeling/proc/has_sting(obj/effect/proc_holder/changeling/power)
|
||||
for(var/obj/effect/proc_holder/changeling/P in purchasedpowers)
|
||||
|
||||
@@ -7,18 +7,15 @@
|
||||
helptext = "Grants us night vision and thermal vision. It may be toggled on or off."
|
||||
chemical_cost = 0
|
||||
dna_cost = 2 //Would be 1 without thermal vision
|
||||
var/active = 0 //Whether or not vision is enhanced
|
||||
|
||||
/obj/effect/proc_holder/changeling/augmented_eyesight/sting_action(var/mob/user)
|
||||
active = !active
|
||||
if(active)
|
||||
if(!user.vision_type)
|
||||
user << "<span class='notice'>We feel a minute twitch in our eyes, and darkness creeps away.</span>"
|
||||
user.vision_type = new /datum/vision_override/nightvision/thermals/ling_augmented_eyesight
|
||||
else
|
||||
user << "<span class='notice'>Our vision dulls. Shadows gather.</span>"
|
||||
user.sight &= ~SEE_MOBS
|
||||
while(active)
|
||||
user.see_in_dark = 8
|
||||
user.see_invisible = 2
|
||||
user.sight |= SEE_MOBS
|
||||
sleep(1) //BAD THINGS HAPPEN WITHOUT THIS.
|
||||
user.vision_type = null
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/changeling/augmented_eyesight/on_refund(mob/user)
|
||||
user.vision_type = null
|
||||
@@ -135,6 +135,7 @@ Made by Xhuis
|
||||
var/mob/living/carbon/human/S = shadow_mind.current
|
||||
shadow_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_hatch)
|
||||
shadow_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/enthrall)
|
||||
shadow_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision)
|
||||
spawn(0)
|
||||
shadow_mind.current.add_language("Shadowling Hivemind")
|
||||
update_shadow_icons_added(shadow_mind)
|
||||
@@ -154,7 +155,7 @@ Made by Xhuis
|
||||
new_thrall_mind.current.add_language("Shadowling Hivemind")
|
||||
new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_glare)
|
||||
new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_shadow_walk)
|
||||
//new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/thrall_vision) //Uncomment when vision code is unfucked.
|
||||
new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision/thrall)
|
||||
new_thrall_mind.current << "<span class='shadowling'><b>You see the truth. Reality has been torn away and you realize what a fool you've been.</b></span>"
|
||||
new_thrall_mind.current << "<span class='shadowling'><b>The shadowlings are your masters.</b> Serve them above all else and ensure they complete their goals.</span>"
|
||||
new_thrall_mind.current << "<span class='shadowling'>You may not harm other thralls or the shadowlings. However, you do not need to obey other thralls.</span>"
|
||||
@@ -210,7 +211,7 @@ Made by Xhuis
|
||||
else
|
||||
shadowling_dead = 1 //but shadowling was kill :(
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/proc/remove_shadowling(datum/mind/ling_mind)
|
||||
if(!istype(ling_mind) || !(ling_mind in shadows)) return 0
|
||||
update_shadow_icons_removed(ling_mind)
|
||||
@@ -304,7 +305,7 @@ Made by Xhuis
|
||||
flesh_color = "#222222"
|
||||
|
||||
flags = NO_BLOOD | NO_BREATHE | NO_SCAN | NO_INTORGANS
|
||||
burn_mod = 2 //2x burn damage
|
||||
burn_mod = 1.5 //1.5x burn damage, 2x is excessive
|
||||
|
||||
/datum/game_mode/proc/update_shadow_icons_added(datum/mind/shadow_mind)
|
||||
spawn(0)
|
||||
|
||||
@@ -170,8 +170,8 @@
|
||||
user.visible_message("<span class='warning'>[user] appears from nowhere!</span>", "<span class='shadowling'>Your shadowy guise slips away.</span>")
|
||||
user.alpha = initial(user.alpha)
|
||||
|
||||
/*
|
||||
/obj/effect/proc_holder/spell/targeted/thrall_vision //Uncomment this if we ever update our vision code to not be absolute garbage.
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shadow_vision
|
||||
name = "Darksight"
|
||||
desc = "Gives you night vision."
|
||||
panel = "Thrall Abilities"
|
||||
@@ -179,23 +179,22 @@
|
||||
range = -1
|
||||
include_user = 1
|
||||
clothes_req = 0
|
||||
var/active = 0
|
||||
var/datum/vision_override/vision_path = /datum/vision_override/nightvision/thermals
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/thrall_vision/cast(list/targets)
|
||||
/obj/effect/proc_holder/spell/targeted/shadow_vision/cast(list/targets)
|
||||
for(var/mob/living/user in targets)
|
||||
if(!istype(user) || !ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
active = !active
|
||||
if(active)
|
||||
user << "<span class='notice'>You shift the nerves in your eyes, allowing you to see in the dark.</span>"
|
||||
H.see_in_dark = 8
|
||||
H.dna.species.invis_sight = SEE_INVISIBLE_MINIMUM
|
||||
if(!H.vision_type)
|
||||
H << "<span class='notice'>You shift the nerves in your eyes, allowing you to see in the dark.</span>"
|
||||
H.vision_type = new vision_path
|
||||
else
|
||||
user << "<span class='notice'>You return your vision to normal.</span>"
|
||||
H.see_in_dark = 0
|
||||
H.dna.species.invis_sight = initial(H.dna.species.invis_sight)
|
||||
*/
|
||||
H << "<span class='notice'>You return your vision to normal.</span>"
|
||||
H.vision_type = null
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shadow_vision/thrall
|
||||
vision_path = /datum/vision_override/nightvision
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/flashfreeze
|
||||
name = "Icy Veins"
|
||||
|
||||
@@ -66,17 +66,13 @@
|
||||
flags = ABSTRACT | NODROP
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/night/shadowling
|
||||
/obj/item/clothing/glasses/shadowling
|
||||
name = "crimson eyes"
|
||||
desc = "A shadowling's eyes. Very light-sensitive and can detect body heat through walls."
|
||||
icon = null
|
||||
icon_state = null
|
||||
item_state = null
|
||||
origin_tech = null
|
||||
vision_flags = SEE_MOBS
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
invisa_view = 2
|
||||
unacidable = 1
|
||||
flash_protect = -1
|
||||
flags = ABSTRACT | NODROP
|
||||
|
||||
@@ -79,6 +79,8 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
|
||||
H.undershirt = "None"
|
||||
H.socks = "None"
|
||||
H.faction |= "faithless"
|
||||
if(!H.weakeyes)
|
||||
H.weakeyes = 1
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/shadowling(usr), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/shadowling(usr), slot_shoes)
|
||||
@@ -86,7 +88,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/shadowling(usr), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/shadowling(usr), slot_gloves)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/shadowling(usr), slot_wear_mask)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/night/shadowling(usr), slot_glasses)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/shadowling(usr), slot_glasses)
|
||||
H.set_species("Shadowling")
|
||||
|
||||
sleep(10)
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
continue
|
||||
|
||||
O.Weaken(strength)
|
||||
if(O.weakeyes)
|
||||
O.Weaken(strength * 1.5)
|
||||
O.visible_message("<span class='disarm'><b>[O]</b> gasps and shields their eyes!</span>")
|
||||
if (istype(O, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
|
||||
@@ -77,6 +77,8 @@
|
||||
|
||||
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, convert = 1)
|
||||
add_logs(M, user, "flashed", object="[src.name]")
|
||||
if(M.weakeyes)
|
||||
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
|
||||
var/safety = M:eyecheck()
|
||||
if(safety <= 0)
|
||||
M.confused += power
|
||||
@@ -85,6 +87,9 @@
|
||||
terrible_conversion_proc(M, user)
|
||||
M.Stun(1)
|
||||
user.visible_message("<span class='disarm'>[user] blinds [M] with the [src.name]!</span>")
|
||||
if(M.weakeyes)
|
||||
M.Stun(2)
|
||||
M.visible_message("<span class='disarm'><b>[M]</b> gasps and shields their eyes!</span>")
|
||||
return 1
|
||||
else
|
||||
if(user)
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
|
||||
//eye target check
|
||||
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
|
||||
if(C.weakeyes)
|
||||
C.Stun(1)
|
||||
var/eye_prot = C.eyecheck()
|
||||
if(C.blinded || eye_prot >= 2)
|
||||
eye_prot = 4
|
||||
|
||||
@@ -36,9 +36,17 @@
|
||||
ear_safety++
|
||||
|
||||
//Flash
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
if(M.weakeyes)
|
||||
M.visible_message("<span class='disarm'><b>[M]</b> screams and collapses!</span>")
|
||||
M << "<span class='userdanger'>AAAAGH! IT BURNS!</span>"
|
||||
M.Weaken(15) //hella stunned
|
||||
M.Stun(15)
|
||||
if(E)
|
||||
E.damage += 8
|
||||
|
||||
if(!eye_safety && ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
flick("e_flash", M.flash)
|
||||
if (E) E.damage += rand(1, 3)
|
||||
M.Stun(max(10/distance, 3))
|
||||
|
||||
@@ -84,4 +84,4 @@
|
||||
var/fire_dmi = 'icons/mob/OnFire.dmi'
|
||||
var/fire_sprite = "Standing"
|
||||
|
||||
var/datum/body_accessory/body_accessory = null
|
||||
var/datum/body_accessory/body_accessory = null
|
||||
@@ -768,7 +768,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
light_amount = T.get_lumcount()*10
|
||||
if(light_amount > species.light_dam && !incorporeal_move) //if there's enough light, start dying
|
||||
if(species.light_effect_amp)
|
||||
adjustFireLoss(5) //This gets doubled by Shadowling's innate fire weakness, so it ends up being 10.
|
||||
adjustFireLoss(4.7) //This gets multiplied by 1.5 due to Shadowling's innate fire weakness, so it ends up being about 7.
|
||||
else
|
||||
adjustFireLoss(1)
|
||||
adjustBruteLoss(1)
|
||||
@@ -968,7 +968,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
var/obj/item/organ/vision
|
||||
if(species.vision_organ)
|
||||
vision = internal_organs_by_name[species.vision_organ]
|
||||
|
||||
|
||||
if(!species.vision_organ) // Presumably if a species has no vision organs, they see via some other means.
|
||||
eye_blind = 0
|
||||
blinded = 0
|
||||
@@ -977,7 +977,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
eye_blind = 1
|
||||
blinded = 1
|
||||
eye_blurry = 1
|
||||
else
|
||||
else
|
||||
//blindness
|
||||
if(sdisabilities & BLIND) // Disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
@@ -987,7 +987,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster
|
||||
eye_blurry = max(eye_blurry-3, 0)
|
||||
blinded = 1
|
||||
|
||||
|
||||
//blurry sight
|
||||
if(vision.is_bruised()) // Vision organs impaired? Permablurry.
|
||||
eye_blurry = 1
|
||||
@@ -1220,13 +1220,17 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(ANTAGHUD)
|
||||
process_antag_hud(src)
|
||||
|
||||
|
||||
|
||||
|
||||
else if(!seer)
|
||||
see_in_dark = species.darksight
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
|
||||
if(vision_type)
|
||||
see_in_dark = max(see_in_dark, vision_type.see_in_dark, species.darksight)
|
||||
see_invisible = vision_type.see_invisible
|
||||
if(vision_type.light_sensetive)
|
||||
weakeyes = 1
|
||||
sight |= vision_type.sight_flags
|
||||
|
||||
if(see_override) //Override all
|
||||
see_invisible = see_override
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@
|
||||
var/area/lastarea = null
|
||||
|
||||
var/digitalcamo = 0 // Can they be tracked by the AI?
|
||||
var/weakeyes //Are they vulnerable to flashes?
|
||||
|
||||
var/list/radar_blips = list() // list of screen objects, radar blips
|
||||
var/radar_open = 0 // nonzero is radar is open
|
||||
@@ -234,4 +235,6 @@
|
||||
|
||||
var/last_movement = -100 // Last world.time the mob actually moved of its own accord.
|
||||
|
||||
var/resize = 1 //Badminnery resize
|
||||
var/resize = 1 //Badminnery resize
|
||||
|
||||
var/datum/vision_override/vision_type = null //Vision override datum.
|
||||
@@ -186,6 +186,7 @@
|
||||
#include "code\datums\spell.dm"
|
||||
#include "code\datums\supplypacks.dm"
|
||||
#include "code\datums\uplink_item.dm"
|
||||
#include "code\datums\vision_override.dm"
|
||||
#include "code\datums\cache\air_alarm.dm"
|
||||
#include "code\datums\cache\apc.dm"
|
||||
#include "code\datums\cache\cache.dm"
|
||||
|
||||
Reference in New Issue
Block a user