mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 17:13:46 +01:00
Part three: The Hierophant. Also minor fixes for the other bosses.
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
msg = harvest_message_low
|
||||
else if(rand_harvested == harvest_amount_high)
|
||||
msg = harvest_message_high
|
||||
user << "<span class='notice'>[msg]</span>"
|
||||
to_chat(user, "<span class='notice'>[msg]</span>")
|
||||
for(var/i in 1 to rand_harvested)
|
||||
new harvest(get_turf(src))
|
||||
icon_state = "[base_icon]p"
|
||||
|
||||
@@ -288,4 +288,252 @@
|
||||
|
||||
/obj/effect/overlay/temp/lavastaff
|
||||
icon_state = "lavastaff_warn"
|
||||
duration = 50
|
||||
duration = 50
|
||||
|
||||
// Legion
|
||||
|
||||
/obj/item/weapon/staff/storm
|
||||
name = "staff of storms"
|
||||
desc = "An ancient staff retrieved from the remains of Legion. The wind stirs as you move it."
|
||||
icon_state = "staffofstorms"
|
||||
item_state = "staffofstorms"
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
slot_flags = SLOT_BACK
|
||||
item_state = "staffofstorms"
|
||||
w_class = 4
|
||||
force = 25
|
||||
damtype = BURN
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
var/storm_type = /datum/weather/ash_storm
|
||||
var/storm_cooldown = 0
|
||||
|
||||
/obj/item/weapon/staff/storm/attack_self(mob/user)
|
||||
if(storm_cooldown > world.time)
|
||||
to_chat(user, "<span class='warning'>The staff is still recharging!</span>")
|
||||
return
|
||||
|
||||
var/area/user_area = get_area(user)
|
||||
var/datum/weather/A
|
||||
var/z_level_name = space_manager.levels_by_name[user.z]
|
||||
for(var/V in weather_master.existing_weather)
|
||||
var/datum/weather/W = V
|
||||
if(W.target_z == z_level_name && W.area_type == user_area.type)
|
||||
A = W
|
||||
break
|
||||
if(A)
|
||||
|
||||
if(A.stage != END_STAGE)
|
||||
if(A.stage == WIND_DOWN_STAGE)
|
||||
to_chat(user, "<span class='warning'>The storm is already ending! It would be a waste to use the staff now.</span>")
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] holds [src] skywards as an orange beam travels into the sky!</span>", \
|
||||
"<span class='notice'>You hold [src] skyward, dispelling the storm!</span>")
|
||||
playsound(user, 'sound/magic/Staff_Change.ogg', 200, 0)
|
||||
A.wind_down()
|
||||
return
|
||||
else
|
||||
A = new storm_type
|
||||
A.name = "staff storm"
|
||||
A.area_type = user_area.type
|
||||
A.target_z = z_level_name
|
||||
A.telegraph_duration = 100
|
||||
A.end_duration = 100
|
||||
|
||||
user.visible_message("<span class='warning'>[user] holds [src] skywards as red lightning crackles into the sky!</span>", \
|
||||
"<span class='notice'>You hold [src] skyward, calling down a terrible storm!</span>")
|
||||
playsound(user, 'sound/magic/Staff_Change.ogg', 200, 0)
|
||||
A.telegraph()
|
||||
storm_cooldown = world.time + 200
|
||||
|
||||
// Hierophant
|
||||
|
||||
//Hierophant
|
||||
|
||||
/obj/item/weapon/hierophant_staff
|
||||
name = "Hierophant's staff"
|
||||
desc = "A large club with intense magic power infused into it."
|
||||
icon_state = "hierophant_staff"
|
||||
item_state = "hierophant_staff"
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 4
|
||||
force = 20
|
||||
hitsound = "swing_hit"
|
||||
//hitsound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
actions_types = list(/datum/action/item_action/vortex_recall, /datum/action/item_action/toggle_unfriendly_fire)
|
||||
var/cooldown_time = 20 //how long the cooldown between non-melee ranged attacks is
|
||||
var/chaser_cooldown = 101 //how long the cooldown between firing chasers at mobs is
|
||||
var/chaser_timer = 0 //what our current chaser cooldown is
|
||||
var/timer = 0 //what our current cooldown is
|
||||
var/blast_range = 3 //how long the cardinal blast's walls are
|
||||
var/obj/effect/hierophant/rune //the associated rune we teleport to
|
||||
var/teleporting = FALSE //if we ARE teleporting
|
||||
var/friendly_fire_check = FALSE //if the blasts we make will consider our faction against the faction of hit targets
|
||||
|
||||
/obj/item/weapon/hierophant_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
..()
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T || timer > world.time)
|
||||
return
|
||||
timer = world.time + CLICK_CD_MELEE //by default, melee attacks only cause melee blasts, and have an accordingly short cooldown
|
||||
if(proximity_flag)
|
||||
spawn(0)
|
||||
aoe_burst(T, user)
|
||||
add_logs(user, target, "fired 3x3 blast at", src)
|
||||
else
|
||||
if(ismineralturf(target) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it)
|
||||
spawn(0)
|
||||
cardinal_blasts(T, user)
|
||||
timer = world.time + cooldown_time
|
||||
else if(target in view(5, get_turf(user))) //if the target is in view, hit it
|
||||
timer = world.time + cooldown_time
|
||||
if(isliving(target) && chaser_timer <= world.time) //living and chasers off cooldown? fire one!
|
||||
chaser_timer = world.time + chaser_cooldown
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/chaser, list(get_turf(user), user, target, 1.5, friendly_fire_check))
|
||||
add_logs(user, target, "fired a chaser at", src)
|
||||
else
|
||||
spawn(0)
|
||||
cardinal_blasts(T, user) //otherwise, just do cardinal blast
|
||||
add_logs(user, target, "fired cardinal blast at", src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>That target is out of range!</span>") //too far away
|
||||
|
||||
/obj/item/weapon/hierophant_staff/ui_action_click(mob/user, actiontype)
|
||||
if(actiontype == /datum/action/item_action/toggle_unfriendly_fire) //toggle friendly fire...
|
||||
friendly_fire_check = !friendly_fire_check
|
||||
to_chat(user, "<span class='warning'>You toggle friendly fire [friendly_fire_check ? "off":"on"]!</span>")
|
||||
return
|
||||
if(user.get_active_hand() != src && user.get_inactive_hand() != src) //you need to hold the staff to teleport
|
||||
to_chat(user, "<span class='warning'>You need to hold the staff in your hands to [rune ? "teleport with it" : "create a rune"]!</span>")
|
||||
return
|
||||
if(!rune)
|
||||
if(isturf(user.loc))
|
||||
user.visible_message("<span class='hierophant_warning'>[user] holds [src] carefully in front of them, moving it in a strange pattern...</span>", \
|
||||
"<span class='notice'>You start creating a hierophant rune to teleport to...</span>")
|
||||
timer = world.time + 51
|
||||
if(do_after(user, 50, target = user))
|
||||
var/turf/T = get_turf(user)
|
||||
playsound(T,'sound/magic/Blind.ogg', 200, 1, -4)
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/teleport, list(T, user))
|
||||
var/obj/effect/hierophant/H = new/obj/effect/hierophant(T)
|
||||
rune = H
|
||||
user.update_action_buttons_icon()
|
||||
user.visible_message("<span class='hierophant_warning'>[user] creates a strange rune beneath them!</span>", \
|
||||
"<span class='hierophant'>You create a hierophant rune, which you can teleport yourself and any allies to at any time!</span>\n\
|
||||
<span class='notice'>You can remove the rune to place a new one by striking it with the staff.</span>")
|
||||
else
|
||||
timer = world.time
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to be on solid ground to produce a rune!</span>")
|
||||
return
|
||||
if(get_dist(user, rune) <= 2) //rune too close abort
|
||||
to_chat(user, "<span class='warning'>You are too close to the rune to teleport to it!</span>")
|
||||
return
|
||||
if(is_blocked_turf(get_turf(rune)))
|
||||
to_chat(user, "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>")
|
||||
return
|
||||
teleporting = TRUE //start channel
|
||||
user.update_action_buttons_icon()
|
||||
user.visible_message("<span class='hierophant_warning'>[user] starts to glow faintly...</span>")
|
||||
timer = world.time + 50
|
||||
if(do_after(user, 40, target = user) && rune)
|
||||
var/turf/T = get_turf(rune)
|
||||
var/turf/source = get_turf(user)
|
||||
if(is_blocked_turf(T))
|
||||
teleporting = FALSE
|
||||
to_chat(user, "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>")
|
||||
user.update_action_buttons_icon()
|
||||
return
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph, list(T, user))
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph, list(source, user))
|
||||
playsound(T,'sound/magic/blink.ogg', 200, 1)
|
||||
//playsound(T,'sound/magic/Wand_Teleport.ogg', 200, 1)
|
||||
playsound(source,'sound/magic/blink.ogg', 200, 1)
|
||||
//playsound(source,'sound/machines/AirlockOpen.ogg', 200, 1)
|
||||
if(!do_after(user, 3, target = user) || !rune) //no walking away shitlord
|
||||
teleporting = FALSE
|
||||
if(user)
|
||||
user.update_action_buttons_icon()
|
||||
return
|
||||
if(is_blocked_turf(T))
|
||||
teleporting = FALSE
|
||||
to_chat(user, "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>")
|
||||
user.update_action_buttons_icon()
|
||||
return
|
||||
add_logs(user, rune, "teleported self from ([source.x],[source.y],[source.z]) to")
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/teleport, list(T, user))
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/teleport, list(source, user))
|
||||
for(var/t in RANGE_TURFS(1, T))
|
||||
var/obj/effect/overlay/temp/hierophant/blast/B = PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(t, user, TRUE)) //blasts produced will not hurt allies
|
||||
B.damage = 30
|
||||
for(var/t in RANGE_TURFS(1, source))
|
||||
var/obj/effect/overlay/temp/hierophant/blast/B = PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(t, user, TRUE)) //but absolutely will hurt enemies
|
||||
B.damage = 30
|
||||
for(var/mob/living/L in range(1, source))
|
||||
spawn(0)
|
||||
teleport_mob(source, L, T, user) //regardless, take all mobs near us along
|
||||
sleep(6) //at this point the blasts detonate
|
||||
else
|
||||
timer = world.time
|
||||
teleporting = FALSE
|
||||
if(user)
|
||||
user.update_action_buttons_icon()
|
||||
|
||||
/obj/item/weapon/hierophant_staff/proc/teleport_mob(turf/source, mob/M, turf/target, mob/user)
|
||||
var/turf/turf_to_teleport_to = get_step(target, get_dir(source, M)) //get position relative to caster
|
||||
if(!turf_to_teleport_to || is_blocked_turf(turf_to_teleport_to))
|
||||
return
|
||||
animate(M, alpha = 0, time = 2, easing = EASE_OUT) //fade out
|
||||
sleep(1)
|
||||
if(!M)
|
||||
return
|
||||
M.visible_message("<span class='hierophant_warning'>[M] fades out!</span>")
|
||||
sleep(2)
|
||||
if(!M)
|
||||
return
|
||||
M.forceMove(turf_to_teleport_to)
|
||||
sleep(1)
|
||||
if(!M)
|
||||
return
|
||||
animate(M, alpha = 255, time = 2, easing = EASE_IN) //fade IN
|
||||
sleep(1)
|
||||
if(!M)
|
||||
return
|
||||
M.visible_message("<span class='hierophant_warning'>[M] fades in!</span>")
|
||||
if(user != M)
|
||||
add_logs(user, M, "teleported", null, "from ([source.x],[source.y],[source.z])")
|
||||
|
||||
/obj/item/weapon/hierophant_staff/proc/cardinal_blasts(turf/T, mob/living/user) //fire cardinal cross blasts with a delay
|
||||
if(!T)
|
||||
return
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/cardinal, list(T, user))
|
||||
playsound(T,'sound/magic/blink.ogg', 200, 1)
|
||||
//playsound(T,'sound/effects/bin_close.ogg', 200, 1)
|
||||
sleep(2)
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(T, user, friendly_fire_check))
|
||||
for(var/d in cardinal)
|
||||
spawn(0)
|
||||
blast_wall(T, d, user)
|
||||
|
||||
/obj/item/weapon/hierophant_staff/proc/blast_wall(turf/T, dir, mob/living/user) //make a wall of blasts blast_range tiles long
|
||||
if(!T)
|
||||
return
|
||||
var/range = blast_range
|
||||
var/turf/previousturf = T
|
||||
var/turf/J = get_step(previousturf, dir)
|
||||
for(var/i in 1 to range)
|
||||
if(!J)
|
||||
return
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(J, user, friendly_fire_check))
|
||||
previousturf = J
|
||||
J = get_step(previousturf, dir)
|
||||
|
||||
/obj/item/weapon/hierophant_staff/proc/aoe_burst(turf/T, mob/living/user) //make a 3x3 blast around a target
|
||||
if(!T)
|
||||
return
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph, list(T, user))
|
||||
playsound(T,'sound/magic/blink.ogg', 200, 1)
|
||||
//playsound(T,'sound/effects/bin_close.ogg', 200, 1)
|
||||
sleep(2)
|
||||
for(var/t in RANGE_TURFS(1, T))
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/blast, list(t, user, friendly_fire_check))
|
||||
@@ -2,10 +2,16 @@
|
||||
|
||||
//this item is intended to give the effect of entering the mine, so that light gradually fades
|
||||
/obj/effect/light_emitter
|
||||
name = "Light-emtter"
|
||||
name = "Light emtter"
|
||||
anchored = 1
|
||||
invisibility = 101
|
||||
unacidable = 1
|
||||
light_range = 8
|
||||
var/set_light = 8
|
||||
var/set_cap = 0
|
||||
|
||||
/obj/effect/light_emitter/New()
|
||||
..()
|
||||
set_light(set_light, set_cap)
|
||||
|
||||
/**********************Miner Lockers**************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user