Sprinting, Stamina and Temporary Modifiers (#1030)

Introduces:
- Temporary modifiers process and datums for that
- A new stamina and sprinting mechanic. That is in need of further development! Weee!
This commit is contained in:
NanakoAC
2016-10-26 18:22:39 +03:00
committed by skull132
parent a3f051693d
commit c4b36a5490
32 changed files with 1097 additions and 80 deletions
@@ -1176,6 +1176,12 @@
if (src.is_diona())
setup_gestalt(1)
max_stamina = species.stamina
stamina = max_stamina
sprint_speed_factor = species.sprint_speed_factor
sprint_cost_factor = species.sprint_cost_factor
stamina_recovery = species.stamina_recovery
exhaust_threshold = species.exhaust_threshold
if(species)
return 1
else
@@ -16,7 +16,7 @@
var/clone_l = getCloneLoss()
health = maxHealth - oxy_l - tox_l - clone_l - total_burn - total_brute
update_health_display()
//TODO: fix husking
if( ((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD)
ChangeToHusk()
@@ -1,7 +1,6 @@
/mob/living/carbon/human/movement_delay()
var/tally = 0
if(species.slowdown)
tally = species.slowdown
@@ -10,8 +9,7 @@
if(embedded_flag)
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
if(CE_SPEEDBOOST in chem_effects)
return -1
var/health_deficiency = (100 - health)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
@@ -49,18 +47,27 @@
if(shock_stage >= 10) tally += 3
if (drowsyness) tally += 6
if(FAT in src.mutations)
tally += 1.5
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
tally += max(2 * stance_damage, 0) //damaged/missing feet or legs is slow
if(mRun in mutations)
tally = 0
tally += move_delay_mod
if(tally > 0 && (CE_SPEEDBOOST in chem_effects))
tally = max(0, tally-3)
return (tally+config.human_delay)
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)
//Can we act?
if(restrained()) return 0
@@ -1,7 +1,9 @@
#define AE_DIZZY 5
#define AE_BUZZED_MIN 6
#define AE_SLURRING 15
#define AE_CONFUSION 18
#define AE_CLUMSY 22
#define AE_BUZZED_MAX 24
#define AE_BLURRING 25
#define AE_VOMIT 40
#define AE_DROWSY 55
@@ -70,3 +72,48 @@ var/mob/living/carbon/human/alcohol_clumsy = 0
if(intoxication > AE_BLACKOUT*SR) // Pass out
paralysis = max(paralysis, 20)
sleeping = max(sleeping, 30)
if( intoxication >= AE_BUZZED_MIN && intoxication <= AE_BUZZED_MAX && !(locate(/datum/modifier/buzzed) in modifiers))
add_modifier(/datum/modifier/buzzed, MODIFIER_CUSTOM)
//Pleasant feeling from being slightly drunk
//Makes you faster and reduces sprint cost
//Wears off if you get too drunk or too sober, a balance must be maintained
/datum/modifier/buzzed
/datum/modifier/buzzed/activate()
..()
if (ishuman(target))
var/mob/living/carbon/human/H = target
H.move_delay_mod += -0.75
H.sprint_cost_factor += -0.1
/datum/modifier/buzzed/deactivate()
..()
if (ishuman(target))
var/mob/living/carbon/human/H = target
H.move_delay_mod -= -0.75
H.sprint_cost_factor -= -0.1
/datum/modifier/buzzed/custom_validity()
if (ishuman(target))
var/mob/living/carbon/human/H = target
if (H.intoxication >= AE_BUZZED_MIN && H.intoxication <= AE_BUZZED_MAX)
return 1
return 0
#undef AE_DIZZY
#undef AE_BUZZED_MIN
#undef AE_SLURRING
#undef AE_CONFUSION
#undef AE_CLUMSY
#undef AE_BUZZED_MAX
#undef AE_BLURRING
#undef AE_VOMIT
#undef AE_DROWSY
#undef AE_OVERDOSE
#undef AE_BLACKOUT
+68 -37
View File
@@ -102,6 +102,9 @@
handle_heartbeat()
//Handles regenerating stamina if we have sufficient air and no oxyloss
handle_stamina()
if (is_diona())
diona_handle_light(DS)
@@ -559,7 +562,9 @@
failed_last_breath = 1
else
failed_last_breath = 0
adjustOxyLoss(-5)
adjustOxyLoss(-3)
// Hot air hurts :(
@@ -964,7 +969,7 @@
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if((getOxyLoss() > 50) || (health <= config.health_threshold_crit))
if((getOxyLoss() > exhaust_threshold) || (health <= config.health_threshold_crit))
Paralyse(3)
if(hallucination)
@@ -1179,24 +1184,7 @@
damageoverlay.overlays += I
else
//Oxygen damage overlay
if(oxyloss)
var/image/I
switch(oxyloss)
if(10 to 20)
I = overlays_cache[11]
if(20 to 25)
I = overlays_cache[12]
if(25 to 30)
I = overlays_cache[13]
if(30 to 35)
I = overlays_cache[14]
if(35 to 40)
I = overlays_cache[15]
if(40 to 45)
I = overlays_cache[16]
if(45 to INFINITY)
I = overlays_cache[17]
damageoverlay.overlays += I
update_oxy_overlay()
// Vampire frenzy overlay.
if (mind.vampire)
@@ -1277,23 +1265,9 @@
if(equipped_glasses)
process_glasses(equipped_glasses)
if(healths)
if (analgesic > 100)
healths.icon_state = "health_numb"
else
switch(hal_screwyhud)
if(1) healths.icon_state = "health6"
if(2) healths.icon_state = "health7"
else
//switch(health - halloss)
switch(health - traumatic_shock)
if(100 to INFINITY) healths.icon_state = "health0"
if(80 to 100) healths.icon_state = "health1"
if(60 to 80) healths.icon_state = "health2"
if(40 to 60) healths.icon_state = "health3"
if(20 to 40) healths.icon_state = "health4"
if(0 to 20) healths.icon_state = "health5"
else healths.icon_state = "health6"
update_health_display()
if(nutrition_icon)
switch(nutrition)
@@ -1748,5 +1722,62 @@
restore_blood()
..()
/mob/living/carbon/human/proc/handle_stamina()
if (species.stamina == -1)//If species stamina is -1, it has special mechanics which will be handled elsewhere
return//so quit this function
if (failed_last_breath || oxyloss > exhaust_threshold)//Can't catch our breath if we're suffocating
return
if (stamina != max_stamina)
//Any suffocation damage slows stamina regen.
//This includes oxyloss from low blood levels
var/regen = stamina_recovery * (1 - min(((oxyloss*2) / exhaust_threshold), 1))
if (regen > 0)
stamina = min(max_stamina, stamina+regen)
nutrition -= stamina_recovery*0.4
hud_used.move_intent.update_move_icon(src)
/mob/living/carbon/human/proc/update_health_display()
if(!healths)
return
if (analgesic > 100)
healths.icon_state = "health_numb"
else
switch(hal_screwyhud)
if(1) healths.icon_state = "health6"
if(2) healths.icon_state = "health7"
else
//switch(health - halloss)
switch(health - traumatic_shock)
if(100 to INFINITY) healths.icon_state = "health0"
if(80 to 100) healths.icon_state = "health1"
if(60 to 80) healths.icon_state = "health2"
if(40 to 60) healths.icon_state = "health3"
if(20 to 40) healths.icon_state = "health4"
if(0 to 20) healths.icon_state = "health5"
else healths.icon_state = "health6"
/mob/living/carbon/human/proc/update_oxy_overlay()
if(oxyloss)
var/image/I
switch(oxyloss)
if(10 to 20)
I = overlays_cache[11]
if(20 to 25)
I = overlays_cache[12]
if(25 to 30)
I = overlays_cache[13]
if(30 to 35)
I = overlays_cache[14]
if(35 to 40)
I = overlays_cache[15]
if(40 to 45)
I = overlays_cache[16]
if(45 to INFINITY)
I = overlays_cache[17]
damageoverlay.overlays += I
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS
@@ -54,3 +54,8 @@
"l_foot" = list("path" = /obj/item/organ/external/foot/skeleton),
"r_foot" = list("path" = /obj/item/organ/external/foot/right/skeleton)
)
stamina = 500 //Tireless automatons
stamina_recovery = 1
sprint_speed_factor = 0.3
exhaust_threshold = 0 //No oxyloss, so zero threshold
@@ -15,6 +15,12 @@
smell.<br/><br/>Most humans will never meet a Vox raider, instead learning of this insular species through \
dealing with their traders and merchants; those that do rarely enjoy the experience."
stamina = 120 // Vox are even faster than unathi and can go longer, but recover slowly
sprint_speed_factor = 3
stamina_recovery = 1
sprint_cost_factor = 1.7
speech_sounds = list('sound/voice/shriek1.ogg')
speech_chance = 20
@@ -99,18 +99,24 @@
var/hud_type
// Body/form vars.
var/list/inherent_verbs // Species-specific verbs.
var/has_fine_manipulation = 1 // Can use small items.
var/siemens_coefficient = 1 // The lower, the thicker the skin and better the insulation.
var/darksight = 2 // Native darksight distance.
var/flags = 0 // Various specific features.
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/primitive_form // Lesser form, if any (ie. monkey for humans)
var/greater_form // Greater form, if any, ie. human for monkeys.
var/list/inherent_verbs // Species-specific verbs.
var/has_fine_manipulation = 1 // Can use small items.
var/siemens_coefficient = 1 // The lower, the thicker the skin and better the insulation.
var/darksight = 2 // Native darksight distance.
var/flags = 0 // Various specific features.
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/primitive_form // Lesser form, if any (ie. monkey for humans)
var/greater_form // Greater form, if any, ie. human for monkeys.
var/holder_type
var/gluttonous // Can eat some mobs. 1 for mice, 2 for monkeys, 3 for people.
var/rarity_value = 1 // Relative rarity/collector value for this species.
var/ethanol_resistance = 1 // How well the mob resists alcohol, lower values get drunk faster, higher values need to drink more
var/gluttonous // Can eat some mobs. 1 for mice, 2 for monkeys, 3 for people.
var/rarity_value = 1 // Relative rarity/collector value for this species.
var/ethanol_resistance = 1 // How well the mob resists alcohol, lower values get drunk faster, higher values need to drink more
var/stamina = 100 // The maximum stamina this species has. Determines how long it can sprint
var/stamina_recovery = 3 // Flat amount of stamina species recovers per proc
var/sprint_speed_factor = 0.65 // The percentage of bonus speed you get when sprinting. 0.4 = 40%
var/sprint_cost_factor = 1.0 // Multiplier on stamina cost for sprinting
var/exhaust_threshold = 50 // When stamina runs out, the mob takes oxyloss up til this value. Then collapses and drops to walk
// Determines the organs that the species spawns with and
var/list/has_organ = list( // which required-organ checks are conducted.
@@ -310,3 +316,35 @@
// Called in life() when the mob has no client.
/datum/species/proc/handle_npc(var/mob/living/carbon/human/H)
return
/datum/species/proc/handle_sprint_cost(var/mob/living/carbon/human/H, var/cost)
cost *= H.sprint_cost_factor
if (H.stamina == -1)
log_debug("Error: Species with special sprint mechanics has not overridden cost function.")
return 0
var/remainder = 0
if (H.stamina > cost)
H.stamina -= cost
H.hud_used.move_intent.update_move_icon(H)
return 1
else if (H.stamina > 0)
remainder = cost - H.stamina
H.stamina = 0
else
remainder = cost
H.adjustOxyLoss(remainder*0.4)
H.adjustHalLoss(remainder*0.3)
H.updatehealth()
H.update_oxy_overlay()
if (H.oxyloss >= exhaust_threshold)
H.Weaken(10)
H.m_intent = "walk"
H.hud_used.move_intent.update_move_icon(H)
H << span("danger", "You're too exhausted to run anymore! You collapse in a heap on the floor.")
return 0
H.hud_used.move_intent.update_move_icon(H)
return 1
@@ -33,6 +33,11 @@
death_message = "becomes completely motionless..."
stamina = 500 //Tireless automatons
stamina_recovery = 1
sprint_speed_factor = 0.3
exhaust_threshold = 0 //No oxyloss, so zero threshold
/datum/species/golem/handle_post_spawn(var/mob/living/carbon/human/H)
if(H.mind)
H.mind.assigned_role = "Golem"
@@ -13,6 +13,11 @@
flags = CAN_JOIN | HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR
stamina = 130 // Humans can sprint for longer than any other species
stamina_recovery = 5
sprint_speed_factor = 0.8
sprint_cost_factor = 0.8
/datum/species/unathi
name = "Unathi"
short_name = "una"
@@ -27,6 +32,10 @@
darksight = 3
gluttonous = 1
ethanol_resistance = 0.4
stamina = 120 // Unathi have the shortest but fastest sprint of all
sprint_speed_factor = 3
stamina_recovery = 5
sprint_cost_factor = 2
rarity_value = 3
blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \
@@ -90,6 +99,12 @@
ethanol_resistance = 0.8//Gets drunk a little faster
rarity_value = 2
stamina = 90 // Tajarans evolved to maintain a steady pace in the snow, sprinting wastes energy
stamina_recovery = 4
sprint_speed_factor = 0.55
sprint_cost_factor = 1.1
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \
influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \
@@ -150,6 +165,10 @@
reagent_tag = IS_SKRELL
ethanol_resistance = 0.5//gets drunk faster
stamina = 90
sprint_speed_factor = 1.2 //Evolved for rapid escapes from predators
/datum/species/diona
name = "Diona"
short_name = "dio"
@@ -222,6 +241,41 @@
reagent_tag = IS_DIONA
stamina = -1 // Diona sprinting uses energy instead of stamina
sprint_speed_factor = 0.4 //Speed gained is minor
/datum/species/diona/handle_sprint_cost(var/mob/living/carbon/human/H, var/cost)
var/datum/dionastats/DS = H.get_dionastats()
if (!DS)
return 0 //Something is very wrong
var/remainder = cost
if (H.radiation)
if (H.radiation > (cost*0.5))//Radiation counts as double energy
H.radiation -= cost*0.5
return 1
else
remainder = cost - (H.radiation*2)
H.radiation = 0
if (DS.stored_energy > remainder)
DS.stored_energy -= remainder
return 1
else
remainder -= DS.stored_energy
DS.stored_energy = 0
H.adjustHalLoss(remainder*5, 1)
H.updatehealth()
H.m_intent = "walk"
H.hud_used.move_intent.update_move_icon(H)
H << span("danger", "We have expended our energy reserves, and cannot continue to move at such a pace. We must find light!")
return 0
/datum/species/diona/can_understand(var/mob/other)
var/mob/living/carbon/alien/diona/D = other
if(istype(D))
@@ -283,6 +337,26 @@
has_organ = list() //TODO: Positronic brain.
stamina = -1 // Machines use power and generate heat, stamina is not a thing
sprint_speed_factor = 0.8 // About as capable of speed as a human
/datum/species/machine/handle_sprint_cost(var/mob/living/carbon/human/H, var/cost)
if (H.stat == CONSCIOUS)
H.bodytemperature += cost*1.5
H.nutrition -= cost
if (H.nutrition > 0)
return 1
else
H.Weaken(30)
H.m_intent = "walk"
H.hud_used.move_intent.update_move_icon(H)
H << span("danger", "ERROR: Power reserves depleted, emergency shutdown engaged. Backup power will come online in 60 seconds, initiate charging as primary directive.")
playsound(H.loc, 'sound/machines/buzz-two.ogg', 100, 0)
return 0
/datum/species/machine/equip_survival_gear(var/mob/living/carbon/human/H)
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
@@ -332,6 +406,12 @@
flesh_color = "#E6E600"
base_color = "#575757"
stamina = 100 // Long period of sprinting, but relatively low speed gain
sprint_speed_factor = 0.5
sprint_cost_factor = 0.3
stamina_recovery = 1//slow recovery
inherent_verbs = list(
/mob/living/carbon/human/proc/bugbite, //weaker version of gut.
)
+13 -1
View File
@@ -47,4 +47,16 @@
var/eat_types = 0//This is a bitfield which must be initialised in New(). The valid values for it are in devour.dm
var/datum/reagents/metabolism/ingested = null
var/underdoor //Used for mobs that can walk through maintenance hatches - drones, pais, and spiderbots
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
//These values are duplicated from the species datum so we can handle things on a per-mob basis, allows for chemicals to affect them
var/stamina = 0
var/max_stamina = 100//Maximum stamina. We start taking oxyloss when this runs out while sprinting
var/sprint_speed_factor = 0.4
var/sprint_cost_factor = 1
var/stamina_recovery = 1
var/min_walk_delay = 0//When move intent is walk, movedelay is clamped to this value as a lower bound
var/exhaust_threshold = 50
var/move_delay_mod = 0//Added to move delay, used for calculating movement speeds. Provides a centralised value for modifiers to alter
+34 -7
View File
@@ -32,10 +32,37 @@
attempt_devour(L, eat_types, mouth_size)
/*
/mob/living/verb/devourverb(var/mob/living/victim)//For situations where species inherent verbs isnt suitable
set category = "Abilities"
set name = "Devour Creature"
set desc = "Attempt to eat a nearby creature, swallowing it whole if small enough, or eating it piece by piece otherwise"
attempt_devour(victim, eat_types, mouth_size)
*/
/mob/living/verb/set_walk_speed()
set category = "IC"
set name = "Adjust walk speed"
set desc = "Allows you to adjust your walking speed to a slower value than normal, or reset it. Does not make you faster."
//First a quick block of code to calculate our normal/best movedelay
var/delay = config.walk_speed + movement_delay()
var/speed = 1 / (delay/10)
var/newspeed
var/list/options = list("No limit",speed*0.95,speed*0.9,speed*0.85,speed*0.8,speed*0.7,speed*0.6,speed*0.5, "Custom")
var/response = input(src, "Your current walking speed is [speed] tiles per second. This menu allows you to limit it to a lower value, by applying a multiplier to that. Please choose a value, select custom to enter your own, or No limit to set your walk speed to the maximum. This menu will not make you move any faster than usual, it is only for allowing you to move at a slower pace than normal, for roleplay purposes. Values set here will not affect your sprinting speed", "Limit Walking speed") as null|anything in options
if (isnull(response))
return
else if (response == "No limit")
src << "Movement speed has now been set to normal, limits removed."
src.min_walk_delay = 0
return
else if (response == "Custom")
response = input(src, "Please enter the exact speed you want to walk at, in tiles per second. This value must be less than [speed] and greater than zero", "Limit Walking speed") as num
newspeed = response
else
newspeed = text2num(response)
if (!newspeed || newspeed >= speed || newspeed <= 0)
src << "Error, invalid value entered. Walk speed has not been changed"
return
src << "Walking speed has now been limited to [newspeed] tiles per second, which is [(newspeed/speed)*100]% of your normal walking speed."
src.min_walk_delay = (10 / newspeed)
+1 -1
View File
@@ -119,7 +119,7 @@
var/shakecamera = 0
var/a_intent = I_HELP//Living
var/m_int = null//Living
var/m_intent = "run"//Living
var/m_intent = "walk"//Living
var/lastKnownIP = null
var/obj/buckled = null//Living
var/obj/item/l_hand = null//Living
+20 -11
View File
@@ -179,7 +179,7 @@
Process_Incorpmove(direct)
return
if(moving) return 0
if(moving) return 0
if(world.time < move_delay) return
@@ -209,6 +209,8 @@
if(item.zoom)
item.zoom()
break
//TODO: REMOVE This stupid zooming stuff
/*
if(locate(/obj/item/weapon/gun/energy/sniperrifle, mob.contents)) // If mob moves while zoomed in with sniper rifle, unzoom them.
var/obj/item/weapon/gun/energy/sniperrifle/s = locate() in mob
@@ -257,14 +259,21 @@
move_delay = world.time//set move delay
mob.last_move_intent = world.time + 10
switch(mob.m_intent)
if("run")
if(mob.drowsyness > 0)
move_delay += 6
move_delay += 1+config.run_speed
if("walk")
move_delay += 7+config.walk_speed
move_delay += mob.movement_delay()
if (ishuman(mob))
var/mob/living/carbon/human/H = mob
var/tally = mob.movement_delay()+config.walk_speed
//If we're sprinting and able to continue sprinting, then apply the sprint bonus ontop of this
if (H.m_intent == "run" && H.species.handle_sprint_cost(H, tally))//This will return false if we collapse from exhaustion
tally = tally/(1+H.sprint_speed_factor)
else
tally = max(tally, H.min_walk_delay)//clamp walking speed if its limited
move_delay += tally
else
move_delay += config.walk_speed
move_delay += mob.movement_delay()
var/tickcomp = 0 //moved this out here so we can use it for vehicles
if(config.Tickcomp)
@@ -272,10 +281,11 @@
tickcomp = ((1/(world.tick_lag))*1.3) - 1.3
move_delay = move_delay + tickcomp
if(istype(mob.buckled, /obj/vehicle))
//manually set move_delay for vehicles so we don't inherit any mob movement penalties
//specific vehicle move delays are set in code\modules\vehicles\vehicle.dm
move_delay = world.time + tickcomp
move_delay = world.time
//drunk driving
if(mob.confused && prob(20))
direct = pick(cardinal)
@@ -351,7 +361,6 @@
G.adjust_position()
moving = 0
return .
return
@@ -39,6 +39,10 @@
return
if(!affects_dead && M.stat == DEAD)
return
if(!dose && volume)//If dose is currently zero, we do the first effect
initial_effect(M, alien)
if(overdose && (dose > overdose) && (location != CHEM_TOUCH))
overdose(M, alien)
var/removed = metabolism
@@ -61,6 +65,11 @@
remove_self(removed)
return
//Initial effect is called once when the reagent first starts affecting a mob.
/datum/reagent/proc/initial_effect(var/mob/living/carbon/M, var/alien)
return
/datum/reagent/proc/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
return
@@ -65,6 +65,8 @@
var/adj_temp = 0
var/targ_temp = 310
var/halluci = 0
var/datum/modifier/caffeine_mod
var/caffeine = 0
glass_icon_state = "glass_clear"
glass_name = "glass of ethanol"
@@ -103,6 +105,10 @@
if(halluci)
M.hallucination = max(M.hallucination, halluci)
if (caffeine && !caffeine_mod)
caffeine_mod = M.add_modifier(/datum/modifier/stimulant, MODIFIER_REAGENT, src, _strength = caffeine, override = MODIFIER_OVERRIDE_STRENGTHEN)
/datum/reagent/ethanol/touch_obj(var/obj/O)
if(istype(O, /obj/item/weapon/paper))
@@ -354,12 +354,17 @@
var/adj_drowsy = 0
var/adj_sleepy = 0
var/adj_temp = 0
var/caffeine = 0 // strength of stimulant effect, since so many drinks use it
var/datum/modifier/modifier = null
/datum/reagent/drink/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(removed) // Probably not a good idea; not very deadly though
return
/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if (caffeine && !modifier)
modifier = M.add_modifier(/datum/modifier/stimulant, MODIFIER_REAGENT, src, _strength = caffeine, override = MODIFIER_OVERRIDE_STRENGTHEN)
M.nutrition += nutrition * removed
M.dizziness = max(0, M.dizziness + adj_dizzy)
M.drowsyness = max(0, M.drowsyness + adj_drowsy)
@@ -586,6 +591,7 @@
adj_sleepy = -2
adj_temp = 25
overdose = 45
caffeine = 0.3
glass_icon_state = "hot_coffee"
glass_name = "cup of coffee"
@@ -606,6 +612,7 @@
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
/datum/reagent/drink/coffee/overdose(var/mob/living/carbon/M, var/alien)
if(alien == IS_DIONA)
return
@@ -757,6 +764,7 @@
id = "rewriter"
color = "#485000"
adj_temp = -5
caffeine = 0.4
glass_icon_state = "rewriter"
glass_name = "glass of Rewriter"
@@ -767,6 +775,7 @@
..()
M.make_jittery(5)
/datum/reagent/drink/nuka_cola
name = "Nuka Cola"
id = "nuka_cola"
@@ -774,6 +783,7 @@
color = "#100800"
adj_temp = -5
adj_sleepy = -2
caffeine = 1
glass_icon_state = "nuka_colaglass"
glass_name = "glass of Nuka-Cola"
@@ -1043,6 +1053,7 @@
description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!"
color = "#664300"
strength = 20
caffeine = 0.25
glass_icon_state = "kahluaglass"
glass_name = "glass of RR coffee liquor"
@@ -1115,6 +1126,7 @@
color = "#102000"
strength = 10
nutriment_factor = 1
caffeine = 0.5
glass_icon_state = "thirteen_loko_glass"
glass_name = "glass of Thirteen Loko"
@@ -1390,6 +1402,7 @@
description = "It's just as effective as Dutch-Courage!"
color = "#664300"
strength = 30
caffeine = 0.2
glass_icon_state = "bravebullglass"
glass_name = "glass of Brave Bull"
@@ -1598,6 +1611,7 @@
description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning."
color = "#664300"
strength = 15
caffeine = 0.3
glass_icon_state = "irishcoffeeglass"
glass_name = "glass of Irish coffee"
@@ -1979,6 +1993,7 @@
adj_sleepy = -3
adj_temp = 30
overdose = 40
caffeine = 0.4
glass_icon_state = "blackcoffee"
glass_name = "A mug of rich Black Coffee"
@@ -1994,6 +2009,7 @@
adj_sleepy = -3
adj_temp = 30
overdose = 40
caffeine = 0.3
glass_icon_state = "whitecoffee"
glass_name = "A mug of Café Au Lait"
@@ -2013,6 +2029,7 @@
adj_sleepy = -3
adj_temp = 30
overdose = 40
caffeine = 0.3
glass_icon_state = "whitecoffee"
glass_name = "A mug of Café Mélange"
@@ -9,11 +9,15 @@
overdose = REAGENTS_OVERDOSE * 2
metabolism = REM * 0.5
scannable = 1
var/datum/modifier/modifier
/datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien != IS_DIONA)
M.add_chemical_effect(CE_STABLE)
M.add_chemical_effect(CE_PAINKILLER, 25)
if (!modifier)
modifier = M.add_modifier(/datum/modifier/adrenaline, MODIFIER_REAGENT, src, _strength = 0.6, override = MODIFIER_OVERRIDE_STRENGTHEN)
/datum/reagent/bicaridine
name = "Bicaridine"
@@ -212,6 +216,7 @@
metabolism = REM * 0.05
overdose = REAGENTS_OVERDOSE
scannable = 1
var/datum/modifier/modifier
/datum/reagent/synaptizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
@@ -224,6 +229,10 @@
M.hallucination = max(0, M.hallucination - 10)
M.adjustToxLoss(5 * removed) // It used to be incredibly deadly due to an oversight. Not anymore!
M.add_chemical_effect(CE_PAINKILLER, 40)
if (!modifier)
modifier = M.add_modifier(/datum/modifier/adrenaline, MODIFIER_REAGENT, src, _strength = 1, override = MODIFIER_OVERRIDE_STRENGTHEN)
/datum/reagent/alkysine
name = "Alkysine"
@@ -305,6 +314,7 @@
color = "#FF3300"
metabolism = REM * 0.15
overdose = REAGENTS_OVERDOSE * 0.5
var/datum/modifier = null
/datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
@@ -312,7 +322,8 @@
if(prob(5))
M.emote(pick("twitch", "blink_r", "shiver"))
M.add_chemical_effect(CE_SPEEDBOOST, 1)
if (!modifier)
modifier = M.add_modifier(/datum/modifier/stimulant, MODIFIER_REAGENT, src, _strength = 1, override = MODIFIER_OVERRIDE_STRENGTHEN)
#define ETHYL_INTOX_COST 3 //The cost of power to remove one unit of intoxication from the patient