Skip to content

Commit

Permalink
Rebalances tool abnormalities
Browse files Browse the repository at this point in the history
fixes a typo

More tool changes

hopefully fixes linters
  • Loading branch information
Coxswain-Navigator committed May 17, 2024
1 parent 88cd1c7 commit 37eb312
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 33 deletions.
Binary file modified ModularTegustation/Teguicons/toolabnormalities.dmi
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,21 @@
/datum/status_effect/display/researcher
id = "notes"
status_type = STATUS_EFFECT_UNIQUE
duration = 3 MINUTES
duration = -1
alert_type = null
display_name = "notes"
var/damage_counter
var/damage_max
var/worked = FALSE
var/stat_bonus = 0

/datum/status_effect/display/researcher/on_apply()
. = ..()
if(!ishuman(owner))
return
var/mob/living/carbon/human/status_holder = owner
status_holder.adjust_attribute_buff(TEMPERANCE_ATTRIBUTE, 20)
stat_bonus = (0.1 * get_attribute_level(owner, TEMPERANCE_ATTRIBUTE)) //20 + 10% of the user's temperance is added as a bonus
status_holder.adjust_attribute_buff(TEMPERANCE_ATTRIBUTE, 20 + stat_bonus)
RegisterSignal(status_holder, COMSIG_MOB_APPLY_DAMGE, PROC_REF(TakeDamage))
RegisterSignal(status_holder, COMSIG_WORK_COMPLETED, PROC_REF(OnWorkComplete))
damage_max = (status_holder.maxHealth + status_holder.maxSanity)
Expand All @@ -46,25 +48,29 @@
if(!ishuman(owner))
return
var/mob/living/carbon/human/status_holder = owner
status_holder.adjust_attribute_buff(TEMPERANCE_ATTRIBUTE, -20)
status_holder.adjust_attribute_buff(TEMPERANCE_ATTRIBUTE, (-20 - stat_bonus))
UnregisterSignal(status_holder, COMSIG_MOB_APPLY_DAMGE)
UnregisterSignal(status_holder, COMSIG_WORK_COMPLETED)
to_chat(status_holder, span_nicegreen("The research notes vanish."))

/datum/status_effect/display/researcher/proc/OnWorkComplete(mob/living/carbon/human/user)
SIGNAL_HANDLER
to_chat(user, span_nicegreen("The research notes have been filled out, the yearn for knowledge has been satisfied."))
to_chat(user, span_nicegreen("The research notes have been filled out, it should be safe to return them now."))
worked = TRUE

/datum/status_effect/display/researcher/proc/TakeDamage(mob/living/carbon/human/user, damage, damagetype, def_zone)
SIGNAL_HANDLER
if(damage < 0)
return
damage_counter += damage //we store the raw damage taken by the player
if(damage_counter >= (damage_max * 0.6))
to_chat(owner, span_userdanger("You feel like you should avoid taking any more damage!"))
if(damage_counter >= damage_max) //if the stored damage exceeds the players maxhealth + maxsanity they explode
addtimer(CALLBACK(src, PROC_REF(Explode), owner), 1) //Gives damage procs time to process
return
if(damage_counter >= (damage_max * 0.8))
to_chat(owner, span_userdanger("You need to return the research notes immediately!"))
return
if(damage_counter >= (damage_max * 0.6))
to_chat(owner, span_userdanger("You feel like you should avoid taking any more damage!"))

/datum/status_effect/display/researcher/proc/Explode(mob/living/carbon/human/owner)
playsound(get_turf(owner), 'sound/abnormalities/scorchedgirl/explosion.ogg', 125, 0, 8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

/obj/structure/toolabnormality/shelter/proc/travel_check(mob/living/carbon/human/user)
icon_state = "shelter_in_opening"
if(!do_after(user, 30 SECONDS, user))
if(!do_after(user, 15 SECONDS, user))
to_chat(user, span_notice("You decide not to enter [src]."))
icon_state = "shelter_in"
return
Expand Down Expand Up @@ -79,8 +79,7 @@
if(!linked_structure)
linked_structure = locate(/obj/structure/toolabnormality/shelter/entrance) in world.contents
..()
user.Stun(15 SECONDS)
to_chat(user, span_userdanger("You are suddenly overcome with fear and hesitation! What horrors could be lurking out here?"))
user.Stun(3 SECONDS)

// Shelter contents
// Crate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,30 +62,18 @@
var/mob/living/carbon/human/H = owner
if(!istype(H))
return
if(H.is_working)
return
if(H.health < 0)
PunishDeath(H)
return
punishment_size = round(stacks / 3)
punishment_cooldown = world.time + punishment_cooldown_time
playsound(H, 'sound/effects/ordeals/white/pale_teleport_out.ogg', 35, TRUE, 3)
var/turf/R = get_turf(H)
for(var/turf/T in view(punishment_size, R))
new /obj/effect/temp_visual/pale_eye_attack(T)
addtimer(CALLBACK(src, PROC_REF(PunishHit), R, damage, damagetype), clamp(punishment_size, 1, 2) SECONDS)

/datum/status_effect/stacking/slab/proc/PunishHit(turf/R, damage, damagetype)
for(var/turf/T in view(punishment_size, R))
new /obj/effect/temp_visual/smash_effect(T)
for(var/mob/living/M in T)
if(ishuman(M)) //deals damage to non-humans, and humans - but only humans with the status effect.
var/mob/living/carbon/human/H = M
var/datum/status_effect/stacking/slab/S = H.has_status_effect(/datum/status_effect/stacking/slab)
if(!S)
continue
M.apply_damage(damage, PALE_DAMAGE, null, M.run_armor_check(null, PALE_DAMAGE), spread_damage = TRUE)
if(M.health < 0)
PunishDeath(M)
playsound(R, 'sound/weapons/fixer/generic/blade3.ogg', 55, TRUE, 3)
var/flipped_dir = turn(H.dir, 180)
var/turf/T = get_step(H, flipped_dir)
var/obj/effect/temp_visual/theonite_clone/attack = new(T, damage, H, punishment_size)
attack.dir = H.dir

/datum/status_effect/stacking/slab/proc/PunishDeath(mob/living/M)
if(!ishuman(M))
Expand All @@ -95,4 +83,72 @@
playsound(H, 'sound/effects/ordeals/violet/midnight_black_attack2.ogg', 35, TRUE, 3)
H.gib()

//Clone object
/obj/effect/temp_visual/theonite_clone
name = "???"
desc = "A shadowy figure"
icon = 'ModularTegustation/Teguicons/32x32.dmi'
icon_state = "alriune_unused"
duration = 40
layer = RIPPLE_LAYER //We want this HIGH. SUPER HIGH. We want it so that you can absolutely, guaranteed, see exactly what is about to hit you.
var/damage = 10 //Pale Damage - decided later
var/new_damage = 0
var/target = null
var/wide_slash_range = 1
var/new_range
var/wide_slash_angle = 240

/obj/effect/temp_visual/theonite_clone/Initialize(mapload, new_damage, target, new_range)
. = ..()
var/icon/I = icon(icon, icon_state, dir)
I = getStaticIcon(I)
icon = I
color = COLOR_VERY_SOFT_YELLOW
if(target)
damage = new_damage
wide_slash_range = new_range
addtimer(CALLBACK(src, PROC_REF(WideSlash), target), 1)

/obj/effect/temp_visual/theonite_clone/proc/WideSlash(atom/target)
if(!istype(target) || QDELETED(target))
return
var/turf/TT = get_turf(target)
sleep(clamp(wide_slash_range, 1, 2) SECONDS)
playsound(src, 'sound/weapons/fixer/generic/blade3.ogg', 55, TRUE, 3)
var/turf/T = get_turf(src)
var/rotate_dir = pick(1, -1)
var/angle_to_target = Get_Angle(T, TT)
var/angle = angle_to_target + (wide_slash_angle * rotate_dir) * 0.5
if(angle > 360)
angle -= 360
else if(angle < 0)
angle += 360
var/turf/T2 = get_turf_in_angle(angle, T, wide_slash_range)
var/list/line = getline(T, T2)
INVOKE_ASYNC(src, PROC_REF(DoLineAttack), line)
for(var/i = 1 to 20)
angle += ((wide_slash_angle / 20) * rotate_dir)
if(angle > 360)
angle -= 360
else if(angle < 0)
angle += 360
T2 = get_turf_in_angle(angle, T, wide_slash_range)
line = getline(T, T2)
addtimer(CALLBACK(src, PROC_REF(DoLineAttack), line), i * 0.04)

/obj/effect/temp_visual/theonite_clone/proc/DoLineAttack(list/line)
for(var/turf/T in line)
if(locate(/obj/effect/temp_visual/smash_effect) in T)
continue
new /obj/effect/temp_visual/smash_effect(T)
for(var/mob/living/M in T)
if(ishuman(M)) //deals damage to non-humans, and humans - but only humans with the status effect.
var/mob/living/carbon/human/H = M
var/datum/status_effect/stacking/slab/S = H.has_status_effect(/datum/status_effect/stacking/slab)
if(!S)
continue
M.apply_damage(damage, PALE_DAMAGE, null, M.run_armor_check(null, PALE_DAMAGE), spread_damage = TRUE)
if(M.health < 0)
S.PunishDeath(M)

#undef STATUS_EFFECT_SLAB
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
if(prob(50))
playsound(user, 'sound/abnormalities/vivavoce/doorknock.ogg', 100, FALSE, -5)
else
user.physiology.black_mod *= 1.15
user.physiology.black_mod *= 1.10
if(R)
R.add_stacks(1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if(!(user in readers))
readers += user
else
user.physiology.white_mod *= 1.15
user.physiology.white_mod *= 1.10

user.apply_status_effect(STATUS_EFFECT_SKIN)
to_chat(user, span_userdanger("You read the book, and take the time to burn these passages into your brain."))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
if(!(user in users))
users += user
else
user.physiology.red_mod *= 1.15
user.physiology.red_mod *= 1.10

user.apply_status_effect(STATUS_EFFECT_SNAKE_OIL)
to_chat(user, span_userdanger("You take a sip, ugh, it tastes nasty!"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@
/obj/structure/toolabnormality/wishwell/proc/Dispense(atom/dispenseobject)
playsound(src, 'sound/abnormalities/bloodbath/Bloodbath_EyeOn.ogg', 80, FALSE, -3)
var/turf/dispense_turf = get_step(src, pick(1,2,4,5,6,8,9,10))
if(!isopenturf(dispense_turf))
dispense_turf = get_turf(src)
new dispenseobject(dispense_turf)
var/list/water_area = range(1, dispense_turf)
for(var/turf/open/O in water_area)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/paperwork/records/info/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@
info = {"<h1><center>T-09-78</center></h1> <br>
Name : Notes from a Crazed Researcher<br>
Risk Class : HE <br>
- One’s observational skill will improve just by holding this item. <br>
- One’s observational skill will improve just by holding this item, improving their ability to work with abnormalities. <br>
- However, if it is returned without fulfilling the yearning for knowledge, the incompetent shall explode. <br>
- When the yearning for knowledge is sated, the abnormality appears to return to containment. <br>
- In addition, if the damage recieved while holding these notes exceeds the users maximum combined HP and SP, the user will explode. "}
- When the yearning for knowledge is sated, the abnormality is safe to return. <br>
- If the damage recieved while holding these notes exceeds the users maximum combined HP and SP, the user will explode. "}

//You Must Be Happy
/obj/item/paper/fluff/info/tool/you_happy
Expand Down

0 comments on commit 37eb312

Please sign in to comment.