Skip to content

Commit

Permalink
Slowdown for helmets
Browse files Browse the repository at this point in the history
Luck has been made more impactful during 'skill rolls'
  • Loading branch information
Zero-Percent-Angel committed Sep 15, 2023
1 parent 762d487 commit 3598b15
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 13 deletions.
12 changes: 8 additions & 4 deletions code/__DEFINES/armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -930,30 +930,34 @@ GLOBAL_LIST_INIT(armor_token_operation_legend, list(
* Medium Armor
* Substantial armor
*/
#define ARMOR_SLOWDOWN_MEDIUM 0.25
#define ARMOR_SLOWDOWN_MEDIUM 0.2
//Originally this was 0.5 on Coyete

/*
* Heavy Armor
* Bulky suits of heavy armor
*/
#define ARMOR_SLOWDOWN_HEAVY 0.6
#define ARMOR_SLOWDOWN_HEAVY 0.5
//Originally this was 1.0 on Coyete

/*
* Salvaged Power Armor
* Basically wearing a car
*/
#define ARMOR_SLOWDOWN_SALVAGE 1.25
#define ARMOR_SLOWDOWN_SALVAGE 1.15
//Originally this was 2 on Coyete

/*
* Power Armor
* Basically driving a car
*/
#define ARMOR_SLOWDOWN_PA 0.65
#define ARMOR_SLOWDOWN_PA 0.55
//Originally this was 1 on Coyete

#define HELMET_SLOWDOWN_LIGHT 0
#define HELMET_SLOWDOWN_MEDIUM 0.05
#define HELMET_SLOWDOWN_HEAVY 0.1

/* Armor slowdown modifiers
* Multipliers to armor slowdown
* * * * * * * * * * * */
Expand Down
15 changes: 12 additions & 3 deletions code/modules/clothing/head/f13_helmets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
icon = 'icons/fallout/clothing/hats.dmi' // Someone should repath all helmets to here at some point. I cannot be fucked to rn though, holy shit. -Rebel0
mob_overlay_icon = 'icons/fallout/onmob/clothes/head.dmi'
armor = ARMOR_VALUE_LIGHT
slowdown = HELMET_SLOWDOWN_LIGHT * ARMOR_SLOWDOWN_GLOBAL_MULT

/obj/item/clothing/head/helmet/f13/raider
name = "yankee raider helmet"
Expand Down Expand Up @@ -122,6 +123,7 @@
icon_state = "combat_helmet"
item_state = "combat_helmet"
armor = ARMOR_VALUE_MEDIUM
slowdown = HELMET_SLOWDOWN_MEDIUM * ARMOR_SLOWDOWN_GLOBAL_MULT
strip_delay = 50
flags_inv = HIDEEARS|HIDEHAIR
resistance_flags = LAVA_PROOF | FIRE_PROOF
Expand Down Expand Up @@ -451,6 +453,7 @@
item_state = "legion-centurion"
resistance_flags = LAVA_PROOF | FIRE_PROOF
armor = ARMOR_VALUE_HEAVY
slowdown = HELMET_SLOWDOWN_HEAVY * ARMOR_SLOWDOWN_GLOBAL_MULT

/obj/item/clothing/head/helmet/f13/heavy/salvaged_pa/t45d/palacent
name = "legion centurion paladin-slayer helmet"
Expand All @@ -461,6 +464,7 @@
item_state = "legcentpal"
resistance_flags = LAVA_PROOF | FIRE_PROOF
armor = ARMOR_VALUE_SALVAGE
slowdown = HELMET_SLOWDOWN_HEAVY * ARMOR_SLOWDOWN_GLOBAL_MULT

/obj/item/clothing/head/helmet/f13/legion/rangercent
name = "legion centurion ranger-hunter helmet"
Expand All @@ -471,6 +475,7 @@
item_state = "legcentrang"
resistance_flags = LAVA_PROOF | FIRE_PROOF
armor = ARMOR_VALUE_MEDIUM
slowdown = HELMET_SLOWDOWN_MEDIUM * ARMOR_SLOWDOWN_GLOBAL_MULT

//Don't give this to anything outside of event crap
/obj/item/clothing/head/helmet/f13/legion/legate
Expand Down Expand Up @@ -595,6 +600,7 @@
icon_state = "ncr_ranger_patrol"
item_state = "ncr_ranger_patrol"
armor = ARMOR_VALUE_MEDIUM
slowdown = HELMET_SLOWDOWN_MEDIUM * ARMOR_SLOWDOWN_GLOBAL_MULT

/obj/item/clothing/head/f13/ncr/patrol/mutie
name = "NCR Mutant Ranger Hat"
Expand Down Expand Up @@ -636,13 +642,15 @@
icon_state = "brotherhood_helmet_knight"
item_state = "brotherhood_helmet_knight"
armor = ARMOR_VALUE_MEDIUM
slowdown = HELMET_SLOWDOWN_MEDIUM * ARMOR_SLOWDOWN_GLOBAL_MULT

/obj/item/clothing/head/helmet/f13/combat/brotherhood/senior
name = "brotherhood senior knight helmet"
desc = "An improved combat helmet, bearing the symbol of a Senior Knight."
icon_state = "brotherhood_helmet_senior"
item_state = "brotherhood_helmet_senior"
armor = ARMOR_VALUE_HEAVY
slowdown = HELMET_SLOWDOWN_HEAVY * ARMOR_SLOWDOWN_GLOBAL_MULT

/obj/item/clothing/head/helmet/f13/combat/brotherhood/initiate
name = "initiate helmet"
Expand Down Expand Up @@ -703,6 +711,7 @@
icon_state = "town_marshal_riot"
item_state = "town_marshal_riot"
armor = ARMOR_VALUE_HEAVY
slowdown = HELMET_SLOWDOWN_HEAVY * ARMOR_SLOWDOWN_GLOBAL_MULT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
resistance_flags = LAVA_PROOF | FIRE_PROOF
Expand Down Expand Up @@ -740,6 +749,7 @@
icon_state = "khanhelmet"
item_state = "khanhelmet"
armor = ARMOR_VALUE_MEDIUM
slowdown = HELMET_SLOWDOWN_MEDIUM * ARMOR_SLOWDOWN_GLOBAL_MULT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 20
Expand Down Expand Up @@ -793,7 +803,6 @@
/obj/item/clothing/head/helmet/riot/vaultsec
name = "security helmet"
desc = "A standard issue vault security helmet, pretty robust."
slowdown = 0.01


/obj/item/clothing/head/helmet/riot/vaultsec/vc
Expand All @@ -809,7 +818,7 @@
/obj/item/clothing/head/helmet/f13/heavy/salvaged_pa
name = "salvaged power helmet"
desc = "It's a salvaged power armor helmet of what..? YOU CAN'T SEE ME! STOP! REPORT TO CODERS!!"
slowdown = ARMOR_SLOWDOWN_NONE * ARMOR_SLOWDOWN_GLOBAL_MULT
slowdown = HELMET_SLOWDOWN_HEAVY * ARMOR_SLOWDOWN_GLOBAL_MULT
armor = ARMOR_VALUE_SALVAGE
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDEMASK
flags_cover = HEADCOVERSEYES
Expand Down Expand Up @@ -906,7 +915,7 @@
ispowerarmor = 1 //TRUE
strip_delay = 200
equip_delay_self = 20
slowdown = 0.05
slowdown = HELMET_SLOWDOWN_HEAVY * ARMOR_SLOWDOWN_GLOBAL_MULT
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDEMASK|HIDEJUMPSUIT
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
clothing_flags = THICKMATERIAL
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "Standard Security gear. Protects the head from impacts."
icon_state = "helmet"
item_state = "helmet"
slowdown = ARMOR_SLOWDOWN_NONE * ARMOR_SLOWDOWN_GLOBAL_MULT
slowdown = HELMET_SLOWDOWN_MEDIUM * ARMOR_SLOWDOWN_GLOBAL_MULT
armor = ARMOR_VALUE_MEDIUM
armor_tokens = list()
flags_inv = HIDEEARS | HIDEHAIR
Expand Down
11 changes: 7 additions & 4 deletions code/modules/mob/living/living_skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// 0 for a challenging roll
// +20 for an expert roll
/mob/proc/skill_roll(check, difficulty = DIFFICULTY_NORMAL, do_message = 1)
if ((skill_value(check) + special_l) >= (rand(1,100) + difficulty))
if ((skill_value(check) + getLuckModifier()) >= (rand(1,100) + difficulty))
if (do_message)
to_chat(src, span_green("You succeed the skill check using: [check]"))
return TRUE
Expand All @@ -36,7 +36,7 @@
// rolling with advantage, should use this when we kind of want the check to pass
/mob/proc/skill_roll_kind(check, difficulty = DIFFICULTY_NORMAL, do_message = 1)
var/lowest_random = min(rand(1,100), rand(1,100)) + difficulty
if ((skill_value(check) + special_l) >= lowest_random)
if ((skill_value(check) + getLuckModifier()) >= lowest_random)
if (do_message)
to_chat(src, span_green("You succeed the skill check using: [check]"))
return TRUE
Expand All @@ -46,13 +46,13 @@
return FALSE

//Maybe we'll use the flat formula later.
//var/the_val = (skill_value(check) + special_l)
//var/the_val = (skill_value(check) + getLuckModifier())
//prob((the_val-difficulty)*(the_val-difficulty)/100+((100+difficulty-the_val)*the_val)/100*2)

// You have sinned, now you must pay
/mob/proc/skill_roll_evil(check, difficulty = DIFFICULTY_NORMAL, do_message = 1)
var/highest_random = max(rand(1,100), rand(1,100)) + difficulty
if ((skill_value(check) + special_l) >= highest_random && prob(special_l*9))
if ((skill_value(check) + getLuckModifier()) >= highest_random && prob(special_l*9))
if (do_message)
to_chat(src, span_green("You succeed the skill check using: [check]"))
return TRUE
Expand All @@ -61,6 +61,9 @@
to_chat(src, span_red("You fail the skill check using: [check]"))
return FALSE

mob/proc/getLuckModifier()
return (special_l - 5)*2

/mob/proc/skill_roll_under(check, difficulty = DIFFICULTY_NORMAL)
return ((rand(1,100) + difficulty) - (skill_value(check)))

Expand Down
2 changes: 1 addition & 1 deletion modular_coyote/eris/code/living_recoil.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
G.check_safety_cursor(src)

/mob/living/proc/update_cursor(var/obj/item/gun/G)
if(!(istype(get_active_held_item(), /obj/item/gun) || recoil > 0))
if(!istype(get_active_held_item(), /obj/item/gun))
remove_cursor()
return
if(client)
Expand Down

0 comments on commit 3598b15

Please sign in to comment.