final stuff, i think?

This commit is contained in:
SandPoot
2024-03-07 20:31:53 -03:00
parent a558377206
commit fcd036dab5
8 changed files with 45 additions and 45 deletions
@@ -192,32 +192,32 @@
else
var/healthpercent = (health/maxHealth) * 100
switch(healthpercent)
if(100 to 70) //Bonuses to speed and damage at high health
if(70 to 100) //Bonuses to speed and damage at high health
speed = 0
melee_damage_lower = 16
melee_damage_upper = 16
attack_verb_continuous = "viciously slashes"
if(70 to 40)
if(40 to 70)
speed = initial(speed)
melee_damage_lower = initial(melee_damage_lower)
melee_damage_upper = initial(melee_damage_upper)
attack_verb_continuous = initial(attack_verb_continuous)
if(40 to 30) //Damage decrease, but not speed
if(30 to 40) //Damage decrease, but not speed
speed = initial(speed)
melee_damage_lower = 10
melee_damage_upper = 10
attack_verb_continuous = "lightly slashes"
if(30 to 20) //Speed decrease
if(20 to 30) //Speed decrease
speed = 2
melee_damage_lower = 8
melee_damage_upper = 8
attack_verb_continuous = "lightly slashes"
if(20 to 10) //Massive speed decrease and weak melee attacks
if(10 to 20) //Massive speed decrease and weak melee attacks
speed = 3
melee_damage_lower = 6
melee_damage_upper = 6
attack_verb_continuous = "weakly slashes"
if(10 to 0) //We are super weak and going to die
if(0 to 10) //We are super weak and going to die
speed = 4
melee_damage_lower = 4
melee_damage_upper = 4
-1
View File
@@ -467,7 +467,6 @@
/datum/mafia_role/lawyer/proc/release(datum/mafia_controller/game)
SIGNAL_HANDLER
. = ..()
if(current_target)
current_target.role_flags &= ~ROLE_ROLEBLOCKED
current_target = null
@@ -2574,7 +2574,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
generate_data_info(data)
/datum/reagent/consumable/ethanol/fruit_wine/proc/generate_data_info(list/data)
var/minimum_percent = 0.15 //Percentages measured between 0 and 1.
// BYOND's compiler fails to catch non-consts in a ranged switch case, and it causes incorrect behavior. So this needs to explicitly be a constant.
var/const/minimum_percent = 0.15 //Percentages measured between 0 and 1.
var/list/primary_tastes = list()
var/list/secondary_tastes = list()
glass_name = "glass of [name]"
+25 -18
View File
@@ -87,28 +87,35 @@
/obj/item/organ/eyes/applyOrganDamage(d, maximum = maxHealth)
. = ..()
if(!.)
return
var/old_damaged = eye_damaged
switch(damage)
if(INFINITY to maxHealth)
eye_damaged = BLIND_VISION_THREE
if(maxHealth to high_threshold)
eye_damaged = BLURRY_VISION_TWO
if(high_threshold to low_threshold)
eye_damaged = BLURRY_VISION_ONE
else
if(!owner)
return FALSE
apply_damaged_eye_effects()
/// Applies effects to our owner based on how damaged our eyes are
/obj/item/organ/eyes/proc/apply_damaged_eye_effects()
// we're in healthy threshold, either try to heal (if damaged) or do nothing
if(damage <= low_threshold)
if(eye_damaged)
eye_damaged = FALSE
if(eye_damaged == old_damaged || !owner)
// clear nearsightedness from damage
owner.clear_fullscreen(EYE_DAMAGE)
// and cure blindness from damage
owner.cure_blind(EYE_DAMAGE)
return
if(old_damaged == BLIND_VISION_THREE)
owner.cure_blind(EYE_DAMAGE)
else if(eye_damaged == BLIND_VISION_THREE)
//various degrees of "oh fuck my eyes", from "point a laser at your eye" to "staring at the Sun" intensities
// 50 - blind
// 49-31 - nearsighted (2 severity)
// 30-20 - nearsighted (1 severity)
if(organ_flags & ORGAN_FAILING)
// become blind from damage
owner.become_blind(EYE_DAMAGE)
if(eye_damaged && eye_damaged != BLIND_VISION_THREE)
owner.overlay_fullscreen("eye_damage", /atom/movable/screen/fullscreen/scaled/impaired, eye_damaged)
else
owner.clear_fullscreen("eye_damage")
// become nearsighted from damage
owner.overlay_fullscreen(EYE_DAMAGE, /atom/movable/screen/fullscreen/scaled/impaired, damage > high_threshold ? 2 : 1)
eye_damaged = TRUE
/obj/item/organ/eyes/night_vision
name = "shadow eyes"