Tweaks the kinetic javelin (#22302)

* Update kinetic_javelin.dm

* Update kinetic_javelin.dm

* Update kinetic_javelin.dm

* holy fire

* done

* done

* Update holy_fire.dm
This commit is contained in:
Molti
2024-07-07 02:56:04 -05:00
committed by GitHub
parent dc2abf246c
commit 22051e6b27
8 changed files with 62 additions and 35 deletions

View File

@@ -163,6 +163,8 @@
#define STATUS_EFFECT_TAUNT /datum/status_effect/taunt //forced movement towards the person applying #define STATUS_EFFECT_TAUNT /datum/status_effect/taunt //forced movement towards the person applying
#define STATUS_EFFECT_HOLY_FIRE /datum/status_effect/holy_fire //not actually fire, more of a short duration damage over time
///////////// /////////////
// NEUTRAL // // NEUTRAL //
///////////// /////////////

View File

@@ -44,7 +44,7 @@
/datum/status_effect/vanguard_shield /datum/status_effect/vanguard_shield
id = "vanguard" id = "vanguard"
duration = 200 duration = 200
tick_interval = 0 //tick as fast as possible tick_interval = 1 //tick as fast as possible
status_type = STATUS_EFFECT_REPLACE status_type = STATUS_EFFECT_REPLACE
alert_type = /atom/movable/screen/alert/status_effect/vanguard alert_type = /atom/movable/screen/alert/status_effect/vanguard
var/datum/progressbar/progbar var/datum/progressbar/progbar
@@ -268,7 +268,6 @@
/datum/status_effect/blooddrunk /datum/status_effect/blooddrunk
id = "blooddrunk" id = "blooddrunk"
duration = 10 duration = 10
tick_interval = 0
alert_type = /atom/movable/screen/alert/status_effect/blooddrunk alert_type = /atom/movable/screen/alert/status_effect/blooddrunk
/atom/movable/screen/alert/status_effect/blooddrunk /atom/movable/screen/alert/status_effect/blooddrunk
@@ -553,7 +552,6 @@
/datum/status_effect/doubledown /datum/status_effect/doubledown
id = "doubledown" id = "doubledown"
duration = 20 duration = 20
tick_interval = 0
status_type = STATUS_EFFECT_REFRESH status_type = STATUS_EFFECT_REFRESH
alert_type = /atom/movable/screen/alert/status_effect/doubledown alert_type = /atom/movable/screen/alert/status_effect/doubledown
var/obj/effect/temp_visual/decoy/tensecond/s_such_strength //surely a combo wont go on for more than 10 seconds var/obj/effect/temp_visual/decoy/tensecond/s_such_strength //surely a combo wont go on for more than 10 seconds
@@ -625,7 +623,6 @@
/datum/status_effect/diamondskin /datum/status_effect/diamondskin
id = "diamondskin" id = "diamondskin"
duration = 20 SECONDS duration = 20 SECONDS
tick_interval = 0
status_type = STATUS_EFFECT_REFRESH status_type = STATUS_EFFECT_REFRESH
alert_type = /atom/movable/screen/alert/status_effect/diamondskin alert_type = /atom/movable/screen/alert/status_effect/diamondskin

View File

@@ -1,7 +1,7 @@
//Largely negative status effects go here, even if they have small benificial effects //Largely negative status effects go here, even if they have small benificial effects
//STUN EFFECTS //STUN EFFECTS
/datum/status_effect/incapacitating /datum/status_effect/incapacitating
tick_interval = 0 tick_interval = 1
status_type = STATUS_EFFECT_REPLACE status_type = STATUS_EFFECT_REPLACE
alert_type = null alert_type = null
remove_on_fullheal = TRUE remove_on_fullheal = TRUE
@@ -355,7 +355,7 @@
/datum/status_effect/belligerent /datum/status_effect/belligerent
id = "belligerent" id = "belligerent"
duration = 70 duration = 70
tick_interval = 0 //tick as fast as possible tick_interval = 1 //tick as fast as possible
status_type = STATUS_EFFECT_REPLACE status_type = STATUS_EFFECT_REPLACE
alert_type = /atom/movable/screen/alert/status_effect/belligerent alert_type = /atom/movable/screen/alert/status_effect/belligerent
var/leg_damage_on_toggle = 2 //damage on initial application and when the owner tries to toggle to run var/leg_damage_on_toggle = 2 //damage on initial application and when the owner tries to toggle to run

View File

@@ -0,0 +1,23 @@
/datum/status_effect/holy_fire
id = "doubledown"
duration = 6 SECONDS
tick_interval = 1 //10 times per second
status_type = STATUS_EFFECT_REFRESH
var/total_damage = 180
var/damage_per_tick = 1
/datum/status_effect/holy_fire/on_apply()
. = ..()
if(.)
damage_per_tick = total_damage / (duration / tick_interval) //we do it this way for easier balancing
owner.add_emitter(/obj/emitter/fire/holy, "holy_fire")
owner.add_emitter(/obj/emitter/sparks/fire, "holy_sparks")
owner.apply_damage(damage_per_tick, BURN) //apply damage here too so it actually does the full total expected damage rather than 1 less tick of damage
/datum/status_effect/holy_fire/tick(delta_time, times_fired)
. = ..()
owner.apply_damage(damage_per_tick, BURN)
/datum/status_effect/holy_fire/on_remove()
owner.remove_emitter("holy_fire")
owner.remove_emitter("holy_sparks")

View File

@@ -93,7 +93,7 @@
if(QDELETED(owner)) if(QDELETED(owner))
qdel(src) qdel(src)
return return
if(tick_interval < world.time) if(tick_interval <= world.time)
tick(delta_time, times_fired) tick(delta_time, times_fired)
tick_interval = world.time + initial(tick_interval) tick_interval = world.time + initial(tick_interval)
if(duration != -1 && duration < world.time) if(duration != -1 && duration < world.time)

View File

@@ -1,9 +1,13 @@
/obj/emitter/fire /obj/emitter/fire
alpha = 225 alpha = 225
particles = new/particles/fire particles = new/particles/fire
var/fire_colour = "#FF3300"
//I hate this, i loath everything about having to create an Init because the byond level filters doesn't allow multiple filters to be set at once if this ever gets fixed please ping me -Borbop //I hate this, i loath everything about having to create an Init because the byond level filters doesn't allow multiple filters to be set at once if this ever gets fixed please ping me -Borbop
/obj/emitter/fire/Initialize(mapload) /obj/emitter/fire/Initialize(mapload)
. = ..() . = ..()
add_filter(name ="outline", priority = 1, params = list(type = "outline", size = 3, color = "#FF3300")) add_filter(name ="outline", priority = 1, params = list(type = "outline", size = 3, color = fire_colour))
add_filter(name = "bloom", priority = 2 , params = list(type = "bloom", threshold = rgb(255,128,255), size = 6, offset = 4, alpha = 255)) add_filter(name = "bloom", priority = 2 , params = list(type = "bloom", threshold = rgb(255,128,255), size = 6, offset = 4, alpha = 255))
/obj/emitter/fire/holy
fire_colour = "#fff700"

View File

@@ -893,6 +893,7 @@
#include "code\datums\status_effects\debuffs\drunk.dm" #include "code\datums\status_effects\debuffs\drunk.dm"
#include "code\datums\status_effects\debuffs\fire_stacks.dm" #include "code\datums\status_effects\debuffs\fire_stacks.dm"
#include "code\datums\status_effects\debuffs\hallucination.dm" #include "code\datums\status_effects\debuffs\hallucination.dm"
#include "code\datums\status_effects\debuffs\holy_fire.dm"
#include "code\datums\status_effects\debuffs\jitteriness.dm" #include "code\datums\status_effects\debuffs\jitteriness.dm"
#include "code\datums\status_effects\debuffs\knuckleroot.dm" #include "code\datums\status_effects\debuffs\knuckleroot.dm"
#include "code\datums\status_effects\debuffs\red_eye.dm" #include "code\datums\status_effects\debuffs\red_eye.dm"

View File

@@ -33,11 +33,13 @@
throw_range = 7 throw_range = 7
throw_speed = 1 throw_speed = 1
w_class = WEIGHT_CLASS_NORMAL w_class = WEIGHT_CLASS_NORMAL
/// Base damage before any multipliers
var/unmodified_throwforce = 15 var/unmodified_throwforce = 15
var/exotic_damage_multiplier = 3 // yes you heard me, it deals 8 times more damage in exotic environments. /// Extra damage in exotic environments
var/exotic_damage_multiplier = 2
var/obj/item/kinetic_javelin_core/core var/obj/item/kinetic_javelin_core/core
var/charges = 0 var/charges = 0
var/max_charges = 3 var/max_charges = 2
var/charged = FALSE var/charged = FALSE
var/always_recall = FALSE var/always_recall = FALSE
///The mob to return the spear to if thrown ///The mob to return the spear to if thrown
@@ -99,10 +101,10 @@
. += "You can insert a core by using it on the javelin." . += "You can insert a core by using it on the javelin."
/obj/item/kinetic_javelin/throw_at(atom/target, range, speed, mob/thrower, spin, diagonals_first, datum/callback/callback, force, quickstart) /obj/item/kinetic_javelin/throw_at(atom/target, range, speed, mob/thrower, spin, diagonals_first, datum/callback/callback, force, quickstart)
. = ..()
if(always_recall && thrower) if(always_recall && thrower)
RegisterSignal(src, COMSIG_MOVABLE_THROW_LANDED, PROC_REF(loyalty)) RegisterSignal(src, COMSIG_MOVABLE_THROW_LANDED, PROC_REF(loyalty))
returner = thrower returner = thrower
return ..()
/obj/item/kinetic_javelin/proc/loyalty() /obj/item/kinetic_javelin/proc/loyalty()
UnregisterSignal(src, COMSIG_MOVABLE_THROW_LANDED) UnregisterSignal(src, COMSIG_MOVABLE_THROW_LANDED)
@@ -138,9 +140,10 @@
if(isliving(hit_atom)) if(isliving(hit_atom))
if(!always_recall) if(!always_recall)
user.put_in_active_hand(src) user.put_in_active_hand(src)
charge_up()
if(charged) if(charged)
core.charged_effect(hit_atom,src,user) core.charged_effect(hit_atom,src,user)
else
charge_up()
else else
remove_charge() remove_charge()
else else
@@ -153,7 +156,7 @@
if(!core) if(!core)
return return
charges += 1 charges += 1
if(charges == 3) if(charges >= max_charges)
if(!charged) if(!charged)
add_filter("charge_glow", 2, list("type" = "outline", "color" = core.charged_glow_color, "size" = 2)) add_filter("charge_glow", 2, list("type" = "outline", "color" = core.charged_glow_color, "size" = 2))
core.on_charged(src) core.on_charged(src)
@@ -177,8 +180,8 @@
return "When charged, the next successful hit against an enemy unleashes a surge of electricity that targets all nearby exotic lifeforms." return "When charged, the next successful hit against an enemy unleashes a surge of electricity that targets all nearby exotic lifeforms."
/obj/item/kinetic_javelin_core/blue/charged_effect(mob/living/simple_animal/hostile/victim, obj/item/kinetic_javelin/javelin,mob/user) /obj/item/kinetic_javelin_core/blue/charged_effect(mob/living/simple_animal/hostile/victim, obj/item/kinetic_javelin/javelin,mob/user)
for(var/mob/living/simple_animal/hostile/H in range(4,victim) - victim) for(var/mob/living/simple_animal/hostile/H in range(4, victim) - victim)
victim.Beam(H,"lightning[rand(1,12)]",time = 15) victim.Beam(H,"lightning[rand(1,12)]", beam_color = charged_glow_color, time = 15)
H.adjustFireLoss(15) H.adjustFireLoss(15)
/obj/item/kinetic_javelin_core/red /obj/item/kinetic_javelin_core/red
@@ -189,10 +192,10 @@
javelin_item_state = "kinetic_javelin_red" javelin_item_state = "kinetic_javelin_red"
/obj/item/kinetic_javelin_core/red/get_effect_description() /obj/item/kinetic_javelin_core/red/get_effect_description()
return "Upon charging it increases the damage of kinetic spear by 25%" return "Upon charging it increases the damage of kinetic spear by 50%"
/obj/item/kinetic_javelin_core/red/charged_effect(mob/living/simple_animal/hostile/victim, obj/item/kinetic_javelin/javelin,mob/user) /obj/item/kinetic_javelin_core/red/charged_effect(mob/living/simple_animal/hostile/victim, obj/item/kinetic_javelin/javelin,mob/user)
javelin.throwforce += javelin.throwforce * 0.25 javelin.throwforce *= 1.5
/obj/item/kinetic_javelin_core/green /obj/item/kinetic_javelin_core/green
name = "Merciful Kinetic Javelin Core" name = "Merciful Kinetic Javelin Core"
@@ -200,15 +203,13 @@
charged_glow_color = "#00b61b" charged_glow_color = "#00b61b"
javelin_icon_state = "green" javelin_icon_state = "green"
javelin_item_state = "kinetic_javelin_green" javelin_item_state = "kinetic_javelin_green"
var/heal_amount = 20
/obj/item/kinetic_javelin_core/green/get_effect_description() /obj/item/kinetic_javelin_core/green/get_effect_description()
return "Striking an enemy while charged heals 5 of each damage type." return "Striking an enemy while charged heals [heal_amount] damage distributed across all types."
/obj/item/kinetic_javelin_core/green/charged_effect(mob/living/simple_animal/hostile/victim, obj/item/kinetic_javelin/javelin,mob/living/user) /obj/item/kinetic_javelin_core/green/charged_effect(mob/living/simple_animal/hostile/victim, obj/item/kinetic_javelin/javelin,mob/living/user)
user.adjustFireLoss(-5,FALSE) user.heal_ordered_damage(heal_amount, list(BURN, BRUTE, TOX, OXY))
user.adjustBruteLoss(-5,FALSE)
user.adjustToxLoss(-5,FALSE)
user.adjustOxyLoss(-5)
/obj/item/kinetic_javelin_core/yellow /obj/item/kinetic_javelin_core/yellow
name = "Radiant Kinetic Javelin Core" name = "Radiant Kinetic Javelin Core"
@@ -217,17 +218,20 @@
javelin_icon_state = "yellow" javelin_icon_state = "yellow"
javelin_item_state = "kinetic_javelin_yellow" javelin_item_state = "kinetic_javelin_yellow"
/obj/item/kinetic_javelin_core/yellow/on_insert(obj/item/kinetic_javelin/javelin)
javelin.max_charges = 1
javelin.exotic_damage_multiplier = 0
/obj/item/kinetic_javelin_core/yellow/on_remove(obj/item/kinetic_javelin/javelin)
javelin.max_charges = initial(javelin.max_charges)
javelin.exotic_damage_multiplier = initial(javelin.exotic_damage_multiplier)
/obj/item/kinetic_javelin_core/yellow/get_effect_description() /obj/item/kinetic_javelin_core/yellow/get_effect_description()
return "Striking an enemy while charged slows that enemy to near standstill for 3 seconds." return "Striking an enemy while charged discharges the javelin into the enemy, igniting them with brilliant fire. Does no damage with the spear itself."
/obj/item/kinetic_javelin_core/yellow/charged_effect(mob/living/simple_animal/hostile/victim, obj/item/kinetic_javelin/javelin,mob/user) /obj/item/kinetic_javelin_core/yellow/charged_effect(mob/living/simple_animal/hostile/victim, obj/item/kinetic_javelin/javelin,mob/user)
walk(victim,0) victim.apply_status_effect(STATUS_EFFECT_HOLY_FIRE)
victim.move_to_delay = 600 javelin.remove_charge()
addtimer(CALLBACK(src,PROC_REF(remove_debuff),victim),3 SECONDS)
/obj/item/kinetic_javelin_core/yellow/proc/remove_debuff(mob/living/simple_animal/hostile/victim)
if(victim)
victim.move_to_delay = initial(victim.move_to_delay)
/obj/item/kinetic_javelin_core/purple /obj/item/kinetic_javelin_core/purple
name = "Loyal Kinetic Javelin Core" name = "Loyal Kinetic Javelin Core"
@@ -237,17 +241,13 @@
javelin_item_state = "kinetic_javelin_purple" javelin_item_state = "kinetic_javelin_purple"
/obj/item/kinetic_javelin_core/purple/get_effect_description() /obj/item/kinetic_javelin_core/purple/get_effect_description()
return "Kinetic spear will always be able to be recalled, even when you miss an enemy, but drastically reduces it's flying speed and damage." return "Kinetic spear will always be able to be recalled, even when you miss an enemy."
/obj/item/kinetic_javelin_core/purple/on_insert(obj/item/kinetic_javelin/javelin) /obj/item/kinetic_javelin_core/purple/on_insert(obj/item/kinetic_javelin/javelin)
javelin.always_recall = TRUE javelin.always_recall = TRUE
javelin.throw_speed = 0.5
javelin.exotic_damage_multiplier = 2
/obj/item/kinetic_javelin_core/purple/on_remove(obj/item/kinetic_javelin/javelin) /obj/item/kinetic_javelin_core/purple/on_remove(obj/item/kinetic_javelin/javelin)
javelin.always_recall = FALSE javelin.always_recall = FALSE
javelin.throw_speed = 1
javelin.exotic_damage_multiplier = 3
/obj/item/kinetic_javelin/blue /obj/item/kinetic_javelin/blue
core = /obj/item/kinetic_javelin_core/blue core = /obj/item/kinetic_javelin_core/blue