Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4318ab6
Adds flagelantes chains
Scrambledeggs00 Jan 8, 2024
8ca8ea0
Adds in equip delay
Scrambledeggs00 Jan 10, 2024
5f415a9
Adds most of the slowdown code
Scrambledeggs00 Jan 11, 2024
6fa4185
Adds wound checks and changed slowdown calculation
Scrambledeggs00 Jan 13, 2024
ae8046f
Added particles effect and grammar corrections
Scrambledeggs00 Jan 14, 2024
9df2294
Adds footstep noise and tweaked wound code
Scrambledeggs00 Jan 15, 2024
047b41e
Started on hood icon_state change
Scrambledeggs00 Jan 15, 2024
38fbc35
Still trying to get mob sprite working
Scrambledeggs00 Jan 16, 2024
39fc814
Sprite changes
Scrambledeggs00 Jan 17, 2024
4672ef5
Gave up with icon change and nerfed speed
Scrambledeggs00 Jan 17, 2024
783d8ed
Fixed wound and particle oversights
Scrambledeggs00 Jan 18, 2024
3f3dca9
Sprite and code tweaks
Scrambledeggs00 Jan 19, 2024
eb9e125
Chain PR
Scrambledeggs00 Jan 21, 2024
1268dc9
Merge Conflict Fix
Scrambledeggs00 Jan 21, 2024
8467f01
Merge branch 'yogstation13:master' into FlagelantesChains
Scrambledeggs00 Jan 21, 2024
84fbc84
Gets rid of possibly useless code? IDK :}
Scrambledeggs00 Jan 21, 2024
dae00ca
Merge branch 'FlagelantesChains' of https://github.com/Scrambledeggs0…
Scrambledeggs00 Jan 21, 2024
e1c208f
Damage check nerf and fixed code oversight
Scrambledeggs00 Jan 24, 2024
a069516
Changed digigrade sprites before I forgor :I
Scrambledeggs00 Jan 24, 2024
6b7e4ed
fixed wound check oversight, thanks molti&baimo :]
Scrambledeggs00 Jan 25, 2024
8fd9adc
Adds negative armor
Scrambledeggs00 Jan 26, 2024
dc1584f
Final touches for PR
Scrambledeggs00 Jan 26, 2024
d146405
Merge branch 'yogstation13:master' into FlagelantesChains
Scrambledeggs00 Jan 26, 2024
bc0c3c8
Oops! Was using the spanish wording :}
Scrambledeggs00 Jan 26, 2024
f2e1c65
Merge branch 'FlagelantesChains' of https://github.com/Scrambledeggs0…
Scrambledeggs00 Jan 26, 2024
a597036
Removes 2 files I accidently duplicated
Scrambledeggs00 Jan 28, 2024
ad9dc69
Merge branch 'yogstation13:master' into FlagelantesChains
Scrambledeggs00 Jan 29, 2024
852e7e0
Removes duplicated coat sprites in suit.dmi
Scrambledeggs00 Jan 29, 2024
fe1882d
Merge branch 'FlagelantesChains' of https://github.com/Scrambledeggs0…
Scrambledeggs00 Jan 29, 2024
553d0bc
Merge branch 'master' of https://github.com/Scrambledeggs00/Yogstatio…
Scrambledeggs00 Mar 1, 2024
dbb9644
Actual merge fix
Scrambledeggs00 Mar 1, 2024
80ae078
Update code/game/objects/items/holy_armours.dm
Scrambledeggs00 Mar 1, 2024
b1bc623
Removes last of old wound check code
Scrambledeggs00 Mar 1, 2024
e373708
do_after changed to 3 seconds
Scrambledeggs00 Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 205 additions & 0 deletions code/game/objects/items/holy_armours.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,208 @@
icon_state = "darktemplar-chaplain1"
item_state = "darktemplar-chaplain1"
armor = list(MELEE = 30, BULLET = 10, LASER = 15, ENERGY = 10, BOMB = 20, BIO = 60, RAD = 40, FIRE = 90, ACID = 80)

/obj/item/storage/box/holy/flagelanteschains
name = "Flagenantes Kit"

/obj/item/storage/box/holy/flagelanteschains/PopulateContents()
new /obj/item/clothing/suit/hooded/flagelantes_chains(src)

/obj/item/clothing/suit/hooded/flagelantes_chains
name = "flagellant's chains"
desc = "Chains worn by those who wish to purify themselves through pain. They slow the wearer down initialy, but give divine haste the more pain they endure."
icon_state = "flagelantes_chains"
item_state = "flagelantes_chains"
armor = list(MELEE = -15, BULLET = -15, LASER = -15, ENERGY = -15, BOMB = -15, BIO = -15, RAD = 0, FIRE = 0, ACID = 0)
body_parts_covered = CHEST|GROIN|LEGS|ARMS
mutantrace_variation = MUTANTRACE_VARIATION //No leg squishing
resistance_flags = FIRE_PROOF | ACID_PROOF //No turning to ash/mush in the quest for pain
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/tank/internals/ipc_coolant)
hoodtype = /obj/item/clothing/head/hooded/flagelantes_chains_hood
var/wrap = FALSE
var/obj/effect/abstract/particle_holder/flagelantes_effect
var/total_wounds
var/speed_message = FALSE
var/footstep = 1
var/footstep_max = 2

/obj/item/clothing/suit/hooded/flagelantes_chains/equipped(mob/M, slot)
. = ..()
if(slot == ITEM_SLOT_OCLOTHING && iscarbon(M)) //Signals for sensing damage, healing, wounds, and movement
RegisterSignal(M, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(handle_damage))
RegisterSignal(M, COMSIG_MOB_APPLY_HEALING, PROC_REF(on_heal))
RegisterSignal(M, COMSIG_CARBON_GAIN_WOUND, PROC_REF(handle_wound_add))
RegisterSignal(M, COMSIG_CARBON_LOSE_WOUND, PROC_REF(handle_wound_remove))
RegisterSignal(M, COMSIG_MOVABLE_MOVED, PROC_REF(on_mob_move))
else
UnregisterSignal(M, list(COMSIG_MOB_APPLY_DAMAGE, COMSIG_MOB_APPLY_HEALING, COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_MOVABLE_MOVED))

/obj/item/clothing/suit/hooded/flagelantes_chains/dropped(mob/M)
. = ..()
UnregisterSignal(M, list(COMSIG_MOB_APPLY_DAMAGE, COMSIG_MOB_APPLY_HEALING, COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_MOVABLE_MOVED))
REMOVE_TRAIT(M, TRAIT_IGNOREDAMAGESLOWDOWN, type)
total_wounds = 0
slowdown = 0
if(flagelantes_effect)
QDEL_NULL(flagelantes_effect)

/obj/item/clothing/suit/hooded/flagelantes_chains/ToggleHood() //So people can't just quickly wear it whenever they want to
var/mob/living/carbon/human/H = src.loc
if(wrap) //Make sure they're not already trying to wear it
to_chat(H, span_warning("You're already wrapping the chains around yourself!."))
return
else if(!suittoggled)
if(H.wear_suit != src)
to_chat(H, span_warning("You must be wearing [src] to put up the hood!"))
return
if(H.head)
to_chat(H, span_warning("You're already wearing something on your head!"))
return
to_chat(H, span_notice("You start wrapping the chains around yourself."))
H.visible_message(span_warning("[H] starts wrapping [src] around themselves!"))
playsound(get_turf(src), 'sound/spookoween/chain_rattling.ogg', 10, TRUE, -1)
wrap = TRUE
if(!do_after(H, 3 SECONDS, H))
wrap = FALSE
H.balloon_alert(H, "You were interupted!")
return //Stop it from completing if they move
if(ishuman(src.loc))
if(H.equip_to_slot_if_possible(hood,ITEM_SLOT_HEAD,0,0,1))
suittoggled = TRUE
src.icon_state = "[initial(icon_state)]_t"
H.update_inv_wear_suit()
for(var/X in actions)
var/datum/action/A = X
A.build_all_button_icons()
ADD_TRAIT(H, TRAIT_IGNOREDAMAGESLOWDOWN, type)// Ignore damage slowdown
change_slowdown(H, slowdown) //Change clothing slowdown based on damage
wrap = FALSE
else
RemoveHood()
REMOVE_TRAIT(H, TRAIT_IGNOREDAMAGESLOWDOWN, type)
total_wounds = 0
slowdown = 0
if(flagelantes_effect)
QDEL_NULL(flagelantes_effect)

/obj/item/clothing/suit/hooded/flagelantes_chains/proc/handle_damage(mob/living/carbon/human/H, damage, damagetype, def_zone)

SIGNAL_HANDLER

if(suittoggled) //Make sure it only checks when the hood is up
change_slowdown(H, slowdown) //Change speed when damaged

/obj/item/clothing/suit/hooded/flagelantes_chains/proc/on_heal(mob/living/carbon/human/H, amount, damtype)

SIGNAL_HANDLER

if(suittoggled) //Make sure it only checks when the hood is up
change_slowdown(H, slowdown) //Change speed when healed

/obj/item/clothing/suit/hooded/flagelantes_chains/proc/handle_wound_add(mob/living/carbon/human/H, datum/wound/W, obj/item/bodypart/L)

SIGNAL_HANDLER

if(suittoggled) //Make sure it only checks when the hood is up
change_slowdown(H, slowdown) //Change speed when gaining a wound


/obj/item/clothing/suit/hooded/flagelantes_chains/proc/handle_wound_remove(mob/living/carbon/human/H, datum/wound/W, obj/item/bodypart/L)

SIGNAL_HANDLER

if(suittoggled) //Make sure it only checks when the hood is up
change_slowdown(H, slowdown) //Change speed when losing a wound

/obj/item/clothing/suit/hooded/flagelantes_chains/proc/change_slowdown(mob/living/carbon/human/H, starting_slowdown)
var/health_percent = H.health / H.maxHealth
var/final_slowdown = 0

total_wounds = length(H.all_wounds) //Thanks Molti, Baimo, and Bibby

if(total_wounds < 0)
total_wounds = 0

switch(total_wounds) //Change slowdown based on wounds
if(1)
final_slowdown += -0.1
if(2)
final_slowdown += -0.2
if(3 to INFINITY) //Max of three wounds for slowdown calculation
final_slowdown += -0.4

switch(health_percent) //Change slowdown based on health
if(0.90 to INFINITY)
final_slowdown += 1
if(0.80 to 0.89)
final_slowdown += 0.5
if(0.50 to 0.79)
final_slowdown += 0
if(0.30 to 0.49)
final_slowdown += -0.2
if(0.10 to 0.29)
final_slowdown += -0.4
if(0 to 0.9)
final_slowdown += -0.6

slowdown = final_slowdown //set slowdown

if(slowdown == -1) //Alert the user and those around that they've achieved MAXIMUM OVERDRIVE
if(!speed_message)
to_chat(H, span_notice("You feel yourself grow closer to the divine as your sins seep out of the chains!."))
H.visible_message(span_warning("[H] starts sweating profusely!"))
speed_message = TRUE
else
speed_message = FALSE

appearance_change(H, slowdown) //Add particles depending on slowdown

change_footstep(slowdown) //Change occurance of chain noise

if(slowdown > starting_slowdown) //Show bubble alert based on starting and new slowdown
H.balloon_alert(H, "You slow down!")
else if(slowdown < starting_slowdown)
H.balloon_alert(H, "You speed up!")

/obj/item/clothing/suit/hooded/flagelantes_chains/proc/appearance_change(mob/living/carbon/human/H, slowdown)
switch(slowdown)
if(-0.9 to 1)
if(flagelantes_effect)
QDEL_NULL(flagelantes_effect) //Remove particle effect
if(-INFINITY to -1)
if(!flagelantes_effect)
flagelantes_effect = new(H, /particles/droplets)
flagelantes_effect.color = "#a41c1c"

/obj/item/clothing/suit/hooded/flagelantes_chains/proc/change_footstep(slowdown) //So the chain sounds are not spammed at higher speeds
switch(slowdown)
if(0 to 1)
footstep_max = 2
if(-0.3 to -0.1)
footstep_max = 3
if(-0.9 to -0.4)
footstep_max = 4
if(-INFINITY to -1)
footstep_max = 5

/obj/item/clothing/suit/hooded/flagelantes_chains/proc/on_mob_move()
var/mob/living/carbon/human/H = loc
if(!istype(H) || H.wear_suit != src)
return
if(footstep > footstep_max)
playsound(src, 'sound/weapons/chainhit.ogg', 3, 1)
footstep = 0
else
footstep++

/obj/item/clothing/head/hooded/flagelantes_chains_hood
name = "flagellant's hood"
desc = "A hood worn by flagellants to hide their face."
icon = 'icons/obj/clothing/hats/hats.dmi'
mob_overlay_icon = 'icons/mob/clothing/head/head.dmi'
icon_state = "flagelantes_chains_hood"
item_state = "flagelantes_chains_hood"
armor = list(MELEE = -15, BULLET = -15, LASER = -15, ENERGY = -15, BOMB = -15, BIO = -15, RAD = 0, FIRE = 0, ACID = 0)
body_parts_covered = HEAD
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDEHAIR|HIDEMASK
resistance_flags = FIRE_PROOF | ACID_PROOF
Binary file modified icons/mob/clothing/head/head.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/suit/suit.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/clothing_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/clothing_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/hats/hats.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/suits/suits.dmi
Binary file not shown.