[MIRROR] Some more tweaks to Geis (#2487)

fixes clockcult conversion being :b:roken, as well as some geis tweaks that you won't care about
This commit is contained in:
CitadelStationBot
2017-08-27 01:36:17 -07:00
committed by kevinz000
parent 3557e0e9b1
commit 4c4bd22578
7 changed files with 107 additions and 67 deletions
@@ -2,8 +2,8 @@
/obj/structure/destructible/clockwork/geis_binding
name = "glowing ring"
desc = "A flickering, glowing purple ring around a target."
clockwork_desc = "A binding ring around a target, preventing them from taking action while they're being converted."
max_integrity = 25
clockwork_desc = "A binding ring around a target, preventing them from taking action."
max_integrity = 20
light_range = 2
light_power = 0.8
light_color = "#AF0AAF"
@@ -18,6 +18,8 @@
can_buckle = TRUE
buckle_lying = 0
var/mob_layer = MOB_LAYER
var/last_mob_health = 0
var/apply_time = 0
/obj/structure/destructible/clockwork/geis_binding/Initialize(mapload, obj/item/clockwork/slab/the_slab)
. = ..()
@@ -33,21 +35,39 @@
icon_state = "geisbinding"
/obj/structure/destructible/clockwork/geis_binding/process()
var/tick_damage = 1
if(locate(/obj/effect/clockwork/sigil/submission) in loc)
tick_damage *= 0.5
if(LAZYLEN(buckled_mobs))
for(var/V in buckled_mobs)
var/mob/living/L = V
if(is_servant_of_ratvar(L)) //servants are freed automatically
take_damage(obj_integrity)
return
var/tick_damage = 1
if(!is_servant_of_ratvar(pulledby))
tick_damage++
if(last_mob_health > L.health)
tick_damage += last_mob_health - L.health
last_mob_health = L.health
if(L.layer != mob_layer)
mob_layer = L.layer
layer = mob_layer - 0.01
cut_overlays()
add_overlay(mutable_appearance('icons/effects/clockwork_effects.dmi', "geisbinding_top", mob_layer + 0.01))
break
take_damage(tick_damage, sound_effect = FALSE)
playsound(src, 'sound/effects/empulse.ogg', tick_damage * 20, TRUE)
playsound(src, 'sound/effects/empulse.ogg', tick_damage * 40, TRUE, -4)
/obj/structure/destructible/clockwork/geis_binding/attack_hand(mob/living/user)
return
/obj/structure/destructible/clockwork/geis_binding/attackby(obj/item/I, mob/user, params)
if(is_servant_of_ratvar(user) && istype(I, /obj/item/clockwork/slab))
user.visible_message("<span class='warning'>[user] starts to dispel [src]...</span>", "<span class='danger'>You start to dispel [src]...</span>")
if(do_after(user, 30, target = src))
user.visible_message("<span class='warning'>[user] dispels [src]!</span>", "<span class='danger'>You dispel [src]!</span>")
take_damage(obj_integrity)
return 1
return ..()
/obj/structure/destructible/clockwork/geis_binding/emp_act(severity)
new /obj/effect/temp_visual/emp(loc)
qdel(src)
@@ -56,16 +76,22 @@
..()
if(M.buckled == src)
desc = "A flickering, glowing purple ring around [M]."
clockwork_desc = "A binding ring around [M], preventing [M.p_them()] from taking action while [M.p_theyre()] being converted."
clockwork_desc = "A binding ring around [M], preventing [M.p_them()] from taking action."
icon_state = "geisbinding"
mob_layer = M.layer
layer = M.layer - 0.01
add_overlay(mutable_appearance('icons/effects/clockwork_effects.dmi', "geisbinding_top", M.layer + 0.01))
layer = mob_layer - 0.01
add_overlay(mutable_appearance('icons/effects/clockwork_effects.dmi', "geisbinding_top", mob_layer + 0.01))
last_mob_health = M.health
apply_time = world.time
for(var/obj/item/I in M.held_items)
M.dropItemToGround(I)
for(var/i in M.get_empty_held_indexes())
var/obj/item/geis_binding/B = new(M)
M.put_in_hands(B, i)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.handcuffed)
C.handcuffed = new /obj/item/restraints/handcuffs/energy/clock(C)
M.regenerate_icons()
M.visible_message("<span class='warning'>A [name] appears around [M]!</span>", "<span class='warning'>A [name] appears around you!</span>")
repair_and_interrupt()
@@ -79,8 +105,17 @@
animate(G, transform = matrix()*2, alpha = 0, time = 8, easing = EASE_OUT)
animate(T, transform = matrix()*2, alpha = 0, time = 8, easing = EASE_OUT)
M.visible_message("<span class='warning'>[src] snaps into glowing pieces and dissipates!</span>")
M.AdjustStun(-130 + (apply_time - world.time), 1, 1) //remove exactly as much stun as was applied
if(iscarbon(M))
var/mob/living/carbon/C = M
C.silent = max(C.silent - 7, 0)
for(var/obj/item/geis_binding/GB in M.held_items)
M.dropItemToGround(GB, TRUE)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(istype(C.handcuffed, /obj/item/restraints/handcuffs/energy/clock))
QDEL_NULL(C.handcuffed)
C.update_handcuffed()
/obj/structure/destructible/clockwork/geis_binding/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
playsound(src, 'sound/effects/empulse.ogg', 50, 1)
@@ -130,3 +165,10 @@
/obj/item/geis_binding/pre_attackby(atom/target, mob/living/user, params)
return FALSE
/obj/item/restraints/handcuffs/energy/clock
name = "glowing rings"
desc = "Flickering rings preventing you from holding items."
icon = 'icons/effects/clockwork_effects.dmi'
icon_state = "geisbinding_full"
flags_1 = NODROP_1|ABSTRACT_1|DROPDEL_1