diff --git a/code/modules/library/skill_learning/generic_skillchips/acrobatics.dm b/code/modules/library/skill_learning/generic_skillchips/acrobatics.dm index 5c86d246dff..eb365c914f4 100644 --- a/code/modules/library/skill_learning/generic_skillchips/acrobatics.dm +++ b/code/modules/library/skill_learning/generic_skillchips/acrobatics.dm @@ -11,7 +11,7 @@ /// set integrity to 1 when mapping for !!FUN!! max_integrity = 100 /// list of emotes whose cd is overridden by this skillchip. can be edited in mapping or ingame - var/list/affected_emotes = list("spin", "flip") + var/list/affected_emotes = list("spin", "flip", "backflip") var/datum/effect_system/spark_spread/sparks /// you can use this without lowering integrity! let's be honest. nobody's doing that var/allowed_usage = 5 diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 0781881011c..45bfca477bb 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -80,10 +80,14 @@ hands_use_check = TRUE mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer, /mob/eye/imaginary_friend) mob_type_ignore_stat_typecache = list(/mob/dead/observer, /mob/living/silicon/ai, /mob/eye/imaginary_friend) + /// The probability we fall our our arse + var/fall_over_prob = 60 + /// The direction we spin in. TRUE means clockwise, FALSE means counter-clockwise. + var/clockwise_spin = TRUE /datum/emote/flip/run_emote(mob/user, params , type_override, intentional) . = ..() - user.SpinAnimation(FLIP_EMOTE_DURATION, 1) + user.SpinAnimation(FLIP_EMOTE_DURATION, 1, clockwise = clockwise_spin) /datum/emote/flip/check_cooldown(mob/user, intentional) . = ..() @@ -93,13 +97,13 @@ return if(isliving(user)) var/mob/living/flippy_mcgee = user - if(prob(20)) + if(prob(fall_over_prob)) flippy_mcgee.Knockdown(1 SECONDS) flippy_mcgee.visible_message( span_notice("[flippy_mcgee] attempts to do a flip and falls over, what a doofus!"), span_notice("You attempt to do a flip while still off balance from the last flip and fall down!") ) - if(prob(50)) + if(prob(fall_over_prob/2)) flippy_mcgee.adjustBruteLoss(1) else flippy_mcgee.visible_message( @@ -107,6 +111,12 @@ span_notice("You stumble a bit from still being off balance from your last flip.") ) +/datum/emote/flip/backflip + key = "backflip" + key_third_person = "backflips" + fall_over_prob = 20 + clockwise_spin = FALSE + /datum/emote/spin key = "spin" key_third_person = "spins"