applies the previous fixes for cult on a closed PR
This commit is contained in:
@@ -24,12 +24,19 @@
|
||||
var/my_message
|
||||
if(!message)
|
||||
return
|
||||
user.whisper("O bidai nabora se[pick("'","`")]sma!")
|
||||
user.whisper("O bidai nabora se[pick("'","`")]sma!", language = /datum/language/common)
|
||||
user.whisper(html_decode(message))
|
||||
if (user.mind.special_role == "Cult Master")
|
||||
my_message = "<span class='cultlarge'><b>[(ishuman(user) ? "Master" : "Lord")] [findtextEx(user.name, user.real_name) ? user.name : "[user.real_name] (as [user.name])"]:</b> [message]</span>"
|
||||
else
|
||||
my_message = "<span class='cultitalic'><b>[(ishuman(user) ? "Acolyte" : "Construct")] [findtextEx(user.name, user.real_name) ? user.name : "[user.real_name] (as [user.name])"]:</b> [message]</span>"
|
||||
var/title = "Acolyte"
|
||||
var/span = "cultitalic"
|
||||
if(user.mind && user.mind.has_antag_datum(ANTAG_DATUM_CULT_MASTER))
|
||||
span = "cultlarge"
|
||||
if(ishuman(user))
|
||||
title = "Master"
|
||||
else
|
||||
title = "Lord"
|
||||
else if(!ishuman(user))
|
||||
title = "Construct"
|
||||
my_message = "<span class='[span]'><b>[title] [findtextEx(user.name, user.real_name) ? user.name : "[user.real_name] (as [user.name])"]:</b> [message]</span>"
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(iscultist(M))
|
||||
to_chat(M, my_message)
|
||||
@@ -83,83 +90,88 @@
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_CONSCIOUS
|
||||
|
||||
/datum/action/innate/cultmast/IsAvailable()
|
||||
if(owner.mind.special_role != "Cult Master")
|
||||
if(!owner.mind || !owner.mind.has_antag_datum(ANTAG_DATUM_CULT_MASTER))
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/action/innate/cultmast/finalreck
|
||||
name = "Final Reckoning"
|
||||
desc = "A single-use spell that brings the entire cult to the master's location"
|
||||
desc = "A single-use spell that brings the entire cult to the master's location."
|
||||
button_icon_state = "sintouch"
|
||||
|
||||
/datum/action/innate/cultmast/finalreck/Activate()
|
||||
var/list/destinations = list()
|
||||
for(var/turf/T in orange(1,owner))
|
||||
if(istype(T, /turf/open))
|
||||
destinations += T
|
||||
for(var/i in 1 to 4)
|
||||
owner.chant(i)
|
||||
chant(i)
|
||||
var/list/destinations = list()
|
||||
for(var/turf/T in orange(1, owner))
|
||||
if(!is_blocked_turf(T, TRUE))
|
||||
destinations += T
|
||||
if(!LAZYLEN(destinations))
|
||||
to_chat(owner, "<span class='warning'>You need more space to summon the cult!</span>")
|
||||
return
|
||||
if(do_after(owner, 30, target = owner))
|
||||
for(var/datum/mind/B in SSticker.mode.cult)
|
||||
var/mob/living/M = B.current
|
||||
if(isliving(M) && M.stat != DEAD)
|
||||
var/turf/mobloc = get_turf(M)
|
||||
if(B.current && B.current.stat != DEAD)
|
||||
var/turf/mobloc = get_turf(B.current)
|
||||
switch(i)
|
||||
if (1)
|
||||
new /obj/effect/overlay/temp/cult/sparks(mobloc, M.dir)
|
||||
if(1)
|
||||
new /obj/effect/overlay/temp/cult/sparks(mobloc, B.current.dir)
|
||||
playsound(mobloc, "sparks", 50, 1)
|
||||
if (2)
|
||||
new /obj/effect/overlay/temp/dir_setting/cult/phase/out(mobloc, M.dir)
|
||||
if(2)
|
||||
new /obj/effect/overlay/temp/dir_setting/cult/phase/out(mobloc, B.current.dir)
|
||||
playsound(mobloc, "sparks", 75, 1)
|
||||
if (3)
|
||||
new /obj/effect/overlay/temp/dir_setting/cult/phase(mobloc, M.dir)
|
||||
if(3)
|
||||
new /obj/effect/overlay/temp/dir_setting/cult/phase(mobloc, B.current.dir)
|
||||
playsound(mobloc, "sparks", 100, 1)
|
||||
if (4)
|
||||
if(4)
|
||||
playsound(mobloc, 'sound/magic/exit_blood.ogg', 100, 1)
|
||||
if(M != owner)
|
||||
if(B.current != owner)
|
||||
B.current.setDir(SOUTH)
|
||||
var/turf/final = pick(destinations)
|
||||
new /obj/effect/overlay/temp/cult/blood(final)
|
||||
addtimer(CALLBACK(M, /mob/.proc/reckon, final), 10)
|
||||
else
|
||||
for(var/datum/action/innate/cultmast/finalreck/H in owner.actions)
|
||||
qdel(H)
|
||||
addtimer(CALLBACK(B.current, /mob/.proc/reckon, final), 10)
|
||||
else
|
||||
return
|
||||
GLOB.reckoning_complete = TRUE
|
||||
Remove(owner)
|
||||
|
||||
/mob/proc/reckon(var/turf/final)
|
||||
/mob/proc/reckon(turf/final)
|
||||
new /obj/effect/overlay/temp/cult/blood/out(get_turf(src))
|
||||
forceMove(final)
|
||||
|
||||
/mob/proc/chant(var/i)
|
||||
switch(i)
|
||||
if (1)
|
||||
say("C'arta Forbici!")
|
||||
if (2)
|
||||
say("Pleggh E'ntrath!")
|
||||
playsound(get_turf(src),'sound/magic/clockwork/narsie_attack.ogg', 50, 1)
|
||||
if (3)
|
||||
say("Barhah hra Zar'garis!")
|
||||
playsound(get_turf(src),'sound/magic/clockwork/narsie_attack.ogg', 75, 1)
|
||||
if (4)
|
||||
say("N'ath reth Sh'yro eth D'rekkathnor!!!")
|
||||
playsound(get_turf(src),'sound/magic/clockwork/narsie_attack.ogg', 100, 1)
|
||||
/datum/action/innate/cultmast/finalreck/proc/chant(chant_number)
|
||||
switch(chant_number)
|
||||
if(1)
|
||||
owner.say("C'arta forbici!", language = /datum/language/common)
|
||||
if(2)
|
||||
owner.say("Pleggh e'ntrath!", language = /datum/language/common)
|
||||
playsound(get_turf(owner),'sound/magic/clockwork/narsie_attack.ogg', 50, 1)
|
||||
if(3)
|
||||
owner.say("Barhah hra zar'garis!", language = /datum/language/common)
|
||||
playsound(get_turf(owner),'sound/magic/clockwork/narsie_attack.ogg', 75, 1)
|
||||
if(4)
|
||||
owner.say("N'ath reth sh'yro eth d'rekkathnor!!!", language = /datum/language/common)
|
||||
playsound(get_turf(owner),'sound/magic/clockwork/narsie_attack.ogg', 100, 1)
|
||||
|
||||
/datum/action/innate/cultmast/cultmark
|
||||
name = "Mark Target"
|
||||
desc = "Marks a target for the cult"
|
||||
desc = "Marks a target for the cult."
|
||||
button_icon_state = "cult_mark"
|
||||
var/obj/effect/proc_holder/cultmark/CM
|
||||
var/time = 0
|
||||
var/cooldown = 0
|
||||
var/base_cooldown = 1200
|
||||
|
||||
/datum/action/innate/cultmast/cultmark/New()
|
||||
CM = new()
|
||||
..()
|
||||
CM = new()
|
||||
CM.attached_action = src
|
||||
..()
|
||||
|
||||
/datum/action/innate/cultmast/cultmark/IsAvailable()
|
||||
if(owner.mind.special_role != "Cult Master")
|
||||
if(!owner.mind || !owner.mind.has_antag_datum(ANTAG_DATUM_CULT_MASTER))
|
||||
return 0
|
||||
if((world.time - time)<1200 && !CM.active)
|
||||
owner << "<span class='cultlarge'><b>You need to wait [round((1200-(world.time-time))/10)] seconds before you can mark another target!</b></span>"
|
||||
if(cooldown > world.time)
|
||||
if(!CM.active)
|
||||
owner << "<span class='cultlarge'><b>You need to wait [round((cooldown - world.time) * 0.1)] seconds before you can mark another target!</b></span>"
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
@@ -169,22 +181,22 @@
|
||||
|
||||
/datum/action/innate/cultmast/cultmark/Activate()
|
||||
CM.toggle(owner) //the important bit
|
||||
if(!active)
|
||||
time = world.time
|
||||
else
|
||||
time = 0
|
||||
return TRUE
|
||||
|
||||
/obj/effect/proc_holder/cultmark
|
||||
active = FALSE
|
||||
ranged_mousepointer = 'icons/effects/cult_target.dmi'
|
||||
active = FALSE
|
||||
ranged_mousepointer = 'icons/effects/cult_target.dmi'
|
||||
var/datum/action/innate/cultmast/cultmark/attached_action
|
||||
|
||||
/obj/effect/proc_holder/cultmark/Destroy()
|
||||
attached_action = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/proc_holder/cultmark/proc/toggle(mob/user)
|
||||
if(active)
|
||||
remove_ranged_ability("You cease the marking ritual...")
|
||||
else
|
||||
add_ranged_ability(user, "You prepare to mark a target for your cult...")
|
||||
if(active)
|
||||
remove_ranged_ability("<span class='cult'>You cease the marking ritual.</span>")
|
||||
else
|
||||
add_ranged_ability(user, "<span class='cult'>You prepare to mark a target for your cult...</span>")
|
||||
|
||||
/obj/effect/proc_holder/cultmark/InterceptClickOn(mob/living/caller, params, atom/target)
|
||||
if(..())
|
||||
@@ -196,24 +208,29 @@
|
||||
if(!isturf(T))
|
||||
return FALSE
|
||||
if(target in view(7, get_turf(ranged_ability_user)))
|
||||
remove_ranged_ability(caller, "The marking rite is complete! It will last for 90 seconds.")
|
||||
GLOB.blood_target = target
|
||||
var/area/A = get_area(target)
|
||||
attached_action.cooldown = world.time + attached_action.base_cooldown
|
||||
addtimer(CALLBACK(attached_action.owner, /mob.proc/update_action_buttons_icon), attached_action.base_cooldown)
|
||||
GLOB.blood_target_image = image('icons/effects/cult_target.dmi', target, "glow", ABOVE_MOB_LAYER)
|
||||
GLOB.blood_target_image.appearance_flags = RESET_COLOR
|
||||
GLOB.blood_target_image.pixel_x = -target.pixel_x
|
||||
GLOB.blood_target_image.pixel_y = -target.pixel_y
|
||||
for(var/datum/mind/B in SSticker.mode.cult)
|
||||
var/mob/living/M = B.current
|
||||
if(M.stat != DEAD)
|
||||
to_chat(M, "<span class='cultlarge'><b>Master [ranged_ability_user] has marked [GLOB.blood_target] in the [A.name] as the cult's top priority, get there immediately!</b></span>")
|
||||
M << pick(sound('sound/hallucinations/over_here2.ogg',0,1,75), sound('sound/hallucinations/over_here3.ogg',0,1,75))
|
||||
var/image/cult_marker = image('icons/effects/cult_target.dmi', target, "glow", ABOVE_MOB_LAYER)
|
||||
M.client.images |= cult_marker
|
||||
addtimer(CALLBACK(M, /mob/living/proc/reset_blood_image, cult_marker), 900, TIMER_OVERRIDE)
|
||||
if(B.current && B.current.stat != DEAD && B.current.client)
|
||||
to_chat(B.current, "<span class='cultlarge'><b>Master [ranged_ability_user] has marked [GLOB.blood_target] in the [A.name] as the cult's top priority, get there immediately!</b></span>")
|
||||
B.current << pick(sound('sound/hallucinations/over_here2.ogg',0,1,75), sound('sound/hallucinations/over_here3.ogg',0,1,75))
|
||||
B.current.client.images += GLOB.blood_target_image
|
||||
attached_action.owner.update_action_buttons_icon()
|
||||
remove_ranged_ability("<span class='cult'>The marking rite is complete! It will last for 90 seconds.</span>")
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/reset_blood_target), 900, TIMER_OVERRIDE)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/reset_blood_image(var/image/cult_marker)
|
||||
if(GLOB.blood_target && src.stat!=DEAD)
|
||||
to_chat(src,"<span class='cultlarge'><b>The blood mark has expired!</b></span>")
|
||||
if(client)
|
||||
client.images.Remove(cult_marker)
|
||||
QDEL_NULL(cult_marker)
|
||||
GLOB.blood_target = null
|
||||
/proc/reset_blood_target()
|
||||
for(var/datum/mind/B in SSticker.mode.cult)
|
||||
if(B.current && B.current.stat != DEAD && B.current.client)
|
||||
if(GLOB.blood_target)
|
||||
to_chat(B.current,"<span class='cultlarge'><b>The blood mark has expired!</b></span>")
|
||||
B.current.client.images -= GLOB.blood_target_image
|
||||
QDEL_NULL(GLOB.blood_target)
|
||||
@@ -200,7 +200,7 @@ This file contains the arcane tome files.
|
||||
if(!("eldergod" in SSticker.mode.cult_objectives))
|
||||
to_chat(user, "<span class='warning'>Nar-Sie does not wish to be summoned!</span>")
|
||||
return
|
||||
if(GLOB.sac_complete)
|
||||
if(!GLOB.sac_complete)
|
||||
to_chat(user, "<span class='warning'>The sacrifice is not complete. The portal would lack the power to open if you tried!</span>")
|
||||
return
|
||||
if(!SSticker.mode.eldergod)
|
||||
@@ -209,7 +209,7 @@ This file contains the arcane tome files.
|
||||
if((loc.z && loc.z != ZLEVEL_STATION) || !A.blob_allowed)
|
||||
to_chat(user, "<span class='warning'>The Geometer is not interested in lesser locations; the station is the prize!</span>")
|
||||
return
|
||||
var/confirm_final = alert(user, "This is the FINAL step to summon Nar-Sie, it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for Nar-Sie!", "No")
|
||||
var/confirm_final = alert(user, "This is the FINAL step to summon Nar-Sie; it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for Nar-Sie!", "No")
|
||||
if(confirm_final == "No")
|
||||
to_chat(user, "<span class='cult'>You decide to prepare further before scribing the rune.</span>")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user