mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
Improves *flip
Yessss. Yesssssssssss. Base 1% chance to break a leg or foot. +1% for taurs +2% for any missing part Can't flip if you don't have one full leg/foot or two legs w/o feet (aka you need at least 2 parts from lleg+rleg+lfoot+rfoot)
This commit is contained in:
@@ -8,10 +8,35 @@
|
||||
message = "awoos loudly. AwoooOOOOoooo!"
|
||||
m_type = 2
|
||||
if ("flip")
|
||||
message = "does a flip!"
|
||||
if(!src.sleeping || !src.resting || !src.buckled || !src.restrained())
|
||||
var/danger = 1 //Base 1% chance to break something.
|
||||
var/list/involved_parts = list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)
|
||||
for(var/organ_name in involved_parts)
|
||||
var/obj/item/organ/external/E = get_organ(organ_name)
|
||||
if(!E || E.is_stump() || E.splinted || (E.status & ORGAN_BROKEN))
|
||||
involved_parts -= organ_name
|
||||
danger += 2
|
||||
|
||||
//Taurs are harder to flip
|
||||
if(istype(tail_style, /datum/sprite_accessory/tail/taur))
|
||||
danger += 1
|
||||
|
||||
//Check if they are physically capable
|
||||
if(src.sleeping || src.resting || src.buckled || src.weakened || src.restrained() || involved_parts.len < 2)
|
||||
src << "<span class='warning'>You can't *flip in your current state!</span>"
|
||||
return 1
|
||||
else
|
||||
src.SpinAnimation(7,1)
|
||||
m_type = 1
|
||||
message = "does a flip!"
|
||||
m_type = 1
|
||||
|
||||
world.log << "[src] *flip with danger [danger]%"
|
||||
if(prob(danger))
|
||||
spawn(10) //Stick the landing.
|
||||
var/breaking = pick(involved_parts)
|
||||
var/obj/item/organ/external/E = get_organ(breaking)
|
||||
src.Weaken(5)
|
||||
E.fracture()
|
||||
log_and_message_admins("broke their [breaking] with *flip, ahahah.", src)
|
||||
|
||||
if (message)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
|
||||
Reference in New Issue
Block a user