//The base for slab-bound/based ranged abilities /obj/effect/proc_holder/slab var/obj/item/clockwork/slab/slab var/successful = FALSE var/finished = FALSE var/in_progress = FALSE /obj/effect/proc_holder/slab/Destroy() slab = null return ..() /obj/effect/proc_holder/slab/remove_ranged_ability(msg) ..() finished = TRUE QDEL_IN(src, 6) /obj/effect/proc_holder/slab/InterceptClickOn(mob/living/caller, params, atom/target) if(..() || in_progress) return TRUE if(ranged_ability_user.incapacitated() || !slab || !(slab in ranged_ability_user.held_items) || target == slab) remove_ranged_ability() return TRUE //For the Geis scripture; binds a target to convert. /obj/effect/proc_holder/slab/geis ranged_mousepointer = 'icons/effects/geis_target.dmi' /obj/effect/proc_holder/slab/geis/InterceptClickOn(mob/living/caller, params, atom/target) if(..()) return TRUE var/turf/T = ranged_ability_user.loc if(!isturf(T)) return TRUE var/target_is_binding = istype(target, /obj/structure/destructible/clockwork/geis_binding) if((target_is_binding || isliving(target)) && ranged_ability_user.Adjacent(target)) if(target_is_binding) var/obj/structure/destructible/clockwork/geis_binding/GB = target GB.repair_and_interrupt() for(var/m in GB.buckled_mobs) if(m) add_logs(ranged_ability_user, m, "rebound with Geis") successful = TRUE else var/mob/living/L = target if(L.null_rod_check()) to_chat(ranged_ability_user, "\"A void weapon? Really, you expect me to be able to do anything?\"") return TRUE if(is_servant_of_ratvar(L)) if(L != ranged_ability_user) to_chat(ranged_ability_user, "\"[L.p_they(TRUE)] already serve[L.p_s()] Ratvar. [text2ratvar("Perhaps [ranged_ability_user.p_theyre()] into bondage?")]\"") return TRUE if(L.stat == DEAD) to_chat(ranged_ability_user, "\"[L.p_theyre(TRUE)] dead, idiot.\"") return TRUE if(istype(L.buckled, /obj/structure/destructible/clockwork/geis_binding)) //if they're already bound, just stun them var/obj/structure/destructible/clockwork/geis_binding/GB = L.buckled GB.repair_and_interrupt() add_logs(ranged_ability_user, L, "rebound with Geis") successful = TRUE else clockwork_say(ranged_ability_user, text2ratvar("Be bound, heathen!")) add_logs(ranged_ability_user, L, "bound with Geis") playsound(target, 'sound/magic/blink.ogg', 50, TRUE, -4, frequency = 0.5) if(slab.speed_multiplier >= 0.5) //excuse my debug... ranged_ability_user.notransform = TRUE addtimer(CALLBACK(src, .proc/reset_user_notransform, ranged_ability_user), 4) //stop us moving for a little bit so we don't break the binding immediately if(L.buckled) L.buckled.unbuckle_mob(target, TRUE) var/obj/structure/destructible/clockwork/geis_binding/binding = new(get_turf(target)) binding.setDir(target.dir) binding.buckle_mob(target, TRUE) ranged_ability_user.start_pulling(binding) ranged_ability_user.apply_status_effect(STATUS_EFFECT_GEISTRACKER, binding) successful = TRUE remove_ranged_ability() else ..() return TRUE /obj/effect/proc_holder/slab/geis/proc/reset_user_notransform(mob/living/user) if(user) user.notransform = FALSE //For the Sentinel's Compromise scripture; heals a target servant. /obj/effect/proc_holder/slab/compromise ranged_mousepointer = 'icons/effects/compromise_target.dmi' /obj/effect/proc_holder/slab/compromise/InterceptClickOn(mob/living/caller, params, atom/target) if(..()) return TRUE var/turf/T = ranged_ability_user.loc if(!isturf(T)) return TRUE if(isliving(target) && (target in view(7, get_turf(ranged_ability_user)))) var/mob/living/L = target if(!is_servant_of_ratvar(L)) to_chat(ranged_ability_user, "\"[L] does not yet serve Ratvar.\"") return TRUE if(L.stat == DEAD) to_chat(ranged_ability_user, "\"[L.p_they(TRUE)] [L.p_are()] dead. [text2ratvar("Oh, child. To have your life cut short...")]\"") return TRUE var/brutedamage = L.getBruteLoss() var/burndamage = L.getFireLoss() var/oxydamage = L.getOxyLoss() var/totaldamage = brutedamage + burndamage + oxydamage if(!totaldamage && (!L.reagents || !L.reagents.has_reagent("holywater"))) to_chat(ranged_ability_user, "\"[L] is unhurt and untainted.\"") return TRUE successful = TRUE to_chat(ranged_ability_user, "You bathe [L == ranged_ability_user ? "yourself":"[L]"] in Inath-neq's power!") var/targetturf = get_turf(L) var/has_holy_water = (L.reagents && L.reagents.has_reagent("holywater")) var/healseverity = max(round(totaldamage*0.05, 1), 1) //shows the general severity of the damage you just healed, 1 glow per 20 for(var/i in 1 to healseverity) new /obj/effect/temp_visual/heal(targetturf, "#1E8CE1") if(totaldamage) L.adjustBruteLoss(-brutedamage) L.adjustFireLoss(-burndamage) L.adjustOxyLoss(-oxydamage) L.adjustToxLoss(totaldamage * 0.5, TRUE, TRUE) clockwork_say(ranged_ability_user, text2ratvar("[has_holy_water ? "Heal tainted" : "Mend wounded"] flesh!")) add_logs(ranged_ability_user, L, "healed with Sentinel's Compromise") L.visible_message("A blue light washes over [L], [has_holy_water ? "causing [L.p_them()] to briefly glow as it mends" : " mending"] [L.p_their()] bruises and burns!", \ "You feel Inath-neq's power healing your wounds[has_holy_water ? " and purging the darkness within you" : ""], but a deep nausea overcomes you!") else clockwork_say(ranged_ability_user, text2ratvar("Purge foul darkness!")) add_logs(ranged_ability_user, L, "purged of holy water with Sentinel's Compromise") L.visible_message("A blue light washes over [L], causing [L.p_them()] to briefly glow!", \ "You feel Inath-neq's power purging the darkness within you!") playsound(targetturf, 'sound/magic/staff_healing.ogg', 50, 1) if(has_holy_water) L.reagents.del_reagent("holywater") remove_ranged_ability() return TRUE //For the cyborg Linked Vanguard scripture, grants you and a nearby ally Vanguard /obj/effect/proc_holder/slab/vanguard ranged_mousepointer = 'icons/effects/vanguard_target.dmi' /obj/effect/proc_holder/slab/vanguard/InterceptClickOn(mob/living/caller, params, atom/target) if(..()) return TRUE var/turf/T = ranged_ability_user.loc if(!isturf(T)) return TRUE if(isliving(target) && (target in view(7, get_turf(ranged_ability_user)))) var/mob/living/L = target if(!is_servant_of_ratvar(L)) to_chat(ranged_ability_user, "\"[L] does not yet serve Ratvar.\"") return TRUE if(L.stat == DEAD) to_chat(ranged_ability_user, "\"[L.p_they(TRUE)] [L.p_are()] dead. [text2ratvar("Oh, child. To have your life cut short...")]\"") return TRUE if(islist(L.stun_absorption) && L.stun_absorption["vanguard"] && L.stun_absorption["vanguard"]["end_time"] > world.time) to_chat(ranged_ability_user, "\"[L.p_they(TRUE)] [L.p_are()] already shielded by a Vanguard.\"") return TRUE successful = TRUE if(L == ranged_ability_user) for(var/mob/living/LT in spiral_range(7, T)) if(LT.stat == DEAD || !is_servant_of_ratvar(LT) || LT == ranged_ability_user || !(LT in view(7, get_turf(ranged_ability_user))) || \ (islist(LT.stun_absorption) && LT.stun_absorption["vanguard"] && LT.stun_absorption["vanguard"]["end_time"] > world.time)) continue L = LT break L.apply_status_effect(STATUS_EFFECT_VANGUARD) ranged_ability_user.apply_status_effect(STATUS_EFFECT_VANGUARD) clockwork_say(ranged_ability_user, text2ratvar("Shield us from darkness!")) remove_ranged_ability() return TRUE //For the cyborg Judicial Marker scripture, places a judicial marker /obj/effect/proc_holder/slab/judicial ranged_mousepointer = 'icons/effects/visor_reticule.dmi' /obj/effect/proc_holder/slab/judicial/InterceptClickOn(mob/living/caller, params, atom/target) if(..()) return TRUE var/turf/T = ranged_ability_user.loc if(!isturf(T)) return TRUE if(target in view(7, get_turf(ranged_ability_user))) successful = TRUE clockwork_say(ranged_ability_user, text2ratvar("Kneel, heathens!")) ranged_ability_user.visible_message("[ranged_ability_user]'s eyes fire a stream of energy at [target], creating a strange mark!", \ "You direct the judicial force to [target].") var/turf/targetturf = get_turf(target) new/obj/effect/clockwork/judicial_marker(targetturf, ranged_ability_user) add_logs(ranged_ability_user, targetturf, "created a judicial marker") remove_ranged_ability() return TRUE