mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
New Hierophant sprites (#22404)
* New Hierophant sprites * actual boss sprites: MAYBE * byond does not actually catch this error * anomaly * I'm a sucker for stupid-ass puns
This commit is contained in:
@@ -758,33 +758,41 @@
|
||||
qdel(src)
|
||||
|
||||
//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'
|
||||
/obj/item/weapon/hierophant_club
|
||||
name = "hierophant club"
|
||||
desc = "The strange technology of this large club allows various nigh-magical feats. It used to beat you, but now you can set the beat."
|
||||
icon_state = "hierophant_club_ready_beacon"
|
||||
item_state = "hierophant_club_ready_beacon"
|
||||
icon = 'icons/obj/lavaland/artefacts.dmi'
|
||||
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 20
|
||||
hitsound = "swing_hit"
|
||||
//hitsound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
force = 15
|
||||
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_cooldown = 81 //how long the cooldown between firing chasers at mobs is
|
||||
var/chaser_timer = 0 //what our current chaser cooldown is
|
||||
var/chaser_speed = 0.8 //how fast our chasers are
|
||||
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/blast_range = 13 //how long the cardinal blast's walls are
|
||||
var/obj/effect/hierophant/beacon //the associated beacon 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)
|
||||
/obj/item/weapon/hierophant_club/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='hierophant_warning'>The[beacon ? " beacon is not currently":"re is a beacon"] attached.</span>"
|
||||
|
||||
/obj/item/weapon/hierophant_club/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
..()
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T || timer > world.time)
|
||||
return
|
||||
calculate_anger_mod(user)
|
||||
timer = world.time + CLICK_CD_MELEE //by default, melee attacks only cause melee blasts, and have an accordingly short cooldown
|
||||
if(proximity_flag)
|
||||
addtimer(src, "aoe_burst", 0, TIMER_NORMAL, T, user)
|
||||
@@ -797,77 +805,123 @@
|
||||
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))
|
||||
PoolOrNew(/obj/effect/overlay/temp/hierophant/chaser, list(get_turf(user), user, target, chaser_speed, friendly_fire_check))
|
||||
add_logs(user, target, "fired a chaser at", src)
|
||||
else
|
||||
addtimer(src, "cardinal_blasts", 0, TIMER_NORMAL, T, user) //otherwise, just do cardinal blast
|
||||
add_logs(user, target, "fired cardinal blast at", src)
|
||||
else
|
||||
user << "<span class='warning'>That target is out of range!</span>" //too far away
|
||||
timer = world.time
|
||||
addtimer(src, "prepare_icon_update", 0)
|
||||
|
||||
/obj/item/weapon/hierophant_staff/ui_action_click(mob/user, action)
|
||||
/obj/item/weapon/hierophant_club/proc/calculate_anger_mod(mob/user) //we get stronger as the user loses health
|
||||
chaser_cooldown = initial(chaser_cooldown)
|
||||
cooldown_time = initial(cooldown_time)
|
||||
chaser_speed = initial(chaser_speed)
|
||||
blast_range = initial(blast_range)
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
var/health_percent = L.health / L.maxHealth
|
||||
chaser_cooldown += round(health_percent * 20) //two tenths of a second for each missing 10% of health
|
||||
cooldown_time += round(health_percent * 10) //one tenth of a second for each missing 10% of health
|
||||
chaser_speed = max(chaser_speed + health_percent, 0.5) //one tenth of a second faster for each missing 10% of health
|
||||
blast_range -= round(health_percent * 10) //one additional range for each missing 10% of health
|
||||
|
||||
/obj/item/weapon/hierophant_club/update_icon()
|
||||
icon_state = "hierophant_club[timer <= world.time ? "_ready":""][beacon ? "":"_beacon"]"
|
||||
item_state = icon_state
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
M.update_inv_back()
|
||||
|
||||
/obj/item/weapon/hierophant_club/proc/prepare_icon_update()
|
||||
update_icon()
|
||||
sleep(timer - world.time)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/hierophant_club/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/toggle_unfriendly_fire)) //toggle friendly fire...
|
||||
friendly_fire_check = !friendly_fire_check
|
||||
user << "<span class='warning'>You toggle friendly fire [friendly_fire_check ? "off":"on"]!</span>"
|
||||
return
|
||||
if(!user.is_holding(src)) //you need to hold the staff to teleport
|
||||
user << "<span class='warning'>You need to hold the staff in your hands to [rune ? "teleport with it":"create a rune"]!</span>"
|
||||
if(timer > world.time)
|
||||
return
|
||||
if(!rune)
|
||||
if(!user.is_holding(src)) //you need to hold the staff to teleport
|
||||
user << "<span class='warning'>You need to hold the club in your hands to [beacon ? "teleport with it":"detach the beacon"]!</span>"
|
||||
return
|
||||
if(!beacon)
|
||||
if(isturf(user.loc))
|
||||
user.visible_message("<span class='hierophant_warning'>[user] holds [src] carefully in front of [user.p_them()], moving it in a strange pattern...</span>", \
|
||||
"<span class='notice'>You start creating a hierophant rune to teleport to...</span>")
|
||||
user.visible_message("<span class='hierophant_warning'>[user] starts fiddling with [src]'s pommel...</span>", \
|
||||
"<span class='notice'>You start detaching the hierophant beacon...</span>")
|
||||
timer = world.time + 51
|
||||
if(do_after(user, 50, target = user))
|
||||
addtimer(src, "prepare_icon_update", 0)
|
||||
if(do_after(user, 50, target = user) && !beacon)
|
||||
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
|
||||
beacon = new/obj/effect/hierophant(T)
|
||||
user.update_action_buttons_icon()
|
||||
user.visible_message("<span class='hierophant_warning'>[user] creates a strange rune beneath [user.p_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>")
|
||||
user.visible_message("<span class='hierophant_warning'>[user] places a strange machine beneath [user.p_their()] feet!</span>", \
|
||||
"<span class='hierophant'>You detach the hierophant beacon, allowing you to teleport yourself and any allies to it at any time!</span>\n\
|
||||
<span class='notice'>You can remove the beacon to place it again by striking it with the club.</span>")
|
||||
else
|
||||
timer = world.time
|
||||
addtimer(src, "prepare_icon_update", 0)
|
||||
else
|
||||
user << "<span class='warning'>You need to be on solid ground to produce a rune!</span>"
|
||||
user << "<span class='warning'>You need to be on solid ground to detach the beacon!</span>"
|
||||
return
|
||||
if(get_dist(user, rune) <= 2) //rune too close abort
|
||||
user << "<span class='warning'>You are too close to the rune to teleport to it!</span>"
|
||||
if(get_dist(user, beacon) <= 2) //beacon too close abort
|
||||
user << "<span class='warning'>You are too close to the beacon to teleport to it!</span>"
|
||||
return
|
||||
if(is_blocked_turf(get_turf(rune)))
|
||||
user << "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>"
|
||||
if(is_blocked_turf(get_turf(beacon), TRUE))
|
||||
user << "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>"
|
||||
return
|
||||
if(!isturf(user.loc))
|
||||
user << "<span class='warning'>You don't have enough space to teleport from here!</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)
|
||||
addtimer(src, "prepare_icon_update", 0)
|
||||
beacon.icon_state = "hierophant_tele_on"
|
||||
var/obj/effect/overlay/temp/hierophant/telegraph/edge/TE1 = PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/edge, user.loc)
|
||||
var/obj/effect/overlay/temp/hierophant/telegraph/edge/TE2 = PoolOrNew(/obj/effect/overlay/temp/hierophant/telegraph/edge, beacon.loc)
|
||||
if(do_after(user, 40, target = user) && user && beacon)
|
||||
var/turf/T = get_turf(beacon)
|
||||
var/turf/source = get_turf(user)
|
||||
if(is_blocked_turf(T))
|
||||
if(is_blocked_turf(T, TRUE))
|
||||
teleporting = FALSE
|
||||
user << "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>"
|
||||
user << "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>"
|
||||
user.update_action_buttons_icon()
|
||||
timer = world.time
|
||||
addtimer(src, "prepare_icon_update", 0)
|
||||
beacon.icon_state = "hierophant_tele_off"
|
||||
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
|
||||
playsound(T,'sound/magic/Wand_Teleport.ogg', 200, 1)
|
||||
playsound(source,'sound/machines/AirlockOpen.ogg', 200, 1)
|
||||
if(!do_after(user, 3, target = user) || !user || !beacon) //no walking away shitlord
|
||||
teleporting = FALSE
|
||||
if(user)
|
||||
user.update_action_buttons_icon()
|
||||
timer = world.time
|
||||
addtimer(src, "prepare_icon_update", 0)
|
||||
if(beacon)
|
||||
beacon.icon_state = "hierophant_tele_off"
|
||||
return
|
||||
if(is_blocked_turf(T))
|
||||
if(is_blocked_turf(T, TRUE))
|
||||
teleporting = FALSE
|
||||
user << "<span class='warning'>The rune is blocked by something, preventing teleportation!</span>"
|
||||
user << "<span class='warning'>The beacon is blocked by something, preventing teleportation!</span>"
|
||||
user.update_action_buttons_icon()
|
||||
timer = world.time
|
||||
addtimer(src, "prepare_icon_update", 0)
|
||||
beacon.icon_state = "hierophant_tele_off"
|
||||
return
|
||||
add_logs(user, rune, "teleported self from ([source.x],[source.y],[source.z]) to")
|
||||
add_logs(user, beacon, "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))
|
||||
@@ -879,15 +933,22 @@
|
||||
for(var/mob/living/L in range(1, source))
|
||||
addtimer(src, "teleport_mob", 0, TIMER_NORMAL, source, L, T, user) //regardless, take all mobs near us along
|
||||
sleep(6) //at this point the blasts detonate
|
||||
if(beacon)
|
||||
beacon.icon_state = "hierophant_tele_off"
|
||||
else
|
||||
qdel(TE1)
|
||||
qdel(TE2)
|
||||
timer = world.time
|
||||
addtimer(src, "prepare_icon_update", 0)
|
||||
if(beacon)
|
||||
beacon.icon_state = "hierophant_tele_off"
|
||||
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)
|
||||
/obj/item/weapon/hierophant_club/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))
|
||||
if(!turf_to_teleport_to || is_blocked_turf(turf_to_teleport_to, TRUE))
|
||||
return
|
||||
animate(M, alpha = 0, time = 2, easing = EASE_OUT) //fade out
|
||||
sleep(1)
|
||||
@@ -909,18 +970,17 @@
|
||||
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
|
||||
/obj/item/weapon/hierophant_club/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)
|
||||
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)
|
||||
addtimer(src, "blast_wall", 0, TIMER_NORMAL, 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
|
||||
/obj/item/weapon/hierophant_club/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
|
||||
@@ -933,12 +993,11 @@
|
||||
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
|
||||
/obj/item/weapon/hierophant_club/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)
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user