diff --git a/code/__DEFINES/{yogs_defines}/status_effects.dm b/code/__DEFINES/{yogs_defines}/status_effects.dm index be062a00a610..2c28115d2e1b 100644 --- a/code/__DEFINES/{yogs_defines}/status_effects.dm +++ b/code/__DEFINES/{yogs_defines}/status_effects.dm @@ -1 +1,3 @@ #define STATUS_EFFECT_VOIDED /datum/status_effect/voided //originally the void spell where you disappear and leave an invincible shadow guy but now it's a status effect + +#define STATUS_EFFECT_DODGING /datum/status_effect/dodging //granted by using the dodge roll, grants 1.5 seconds of godmode to replicate invincibility frames diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 78ab39afe075..a028326a5442 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -231,14 +231,16 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/katana/cursed/basalt name = "basalt katana" - desc = "a katana made out of hardened basalt. Deals more damage to lavaland mobs." + desc = "a katana made out of hardened basalt. Particularly damaging to lavaland fauna. (Activate this item in hand to dodge roll in the direction you're facing)" icon_state = "basalt_katana" item_state = "basalt_katana" - force = 25 + force = 18 block_chance = 20 - var/fauna_damage_bonus = 35 - var/fauna_damage_type = BURN + var/fauna_damage_bonus = 52 + var/fauna_damage_type = BRUTE + var/next_roll + var/roll_dist = 3 /obj/item/katana/cursed/basalt/afterattack(atom/target, mob/user, proximity) . = ..() @@ -250,6 +252,33 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 L.apply_damage(fauna_damage_bonus,fauna_damage_type) playsound(L, 'sound/weapons/sear.ogg', 100, 1) +/obj/item/katana/cursed/basalt/attack_self(mob/living/user) + if(world.time > next_roll) + var/stam_cost = 15 + var/turf/T = get_turf(user) + if(is_mining_level(T.z)) + stam_cost = 5 + var/turf/landing_turf = get_ranged_target_turf(user, user.dir, roll_dist) + var/spin_direction = FALSE + user.adjustStaminaLoss(stam_cost) + if (user.getStaminaLoss() >= 100) + user.throw_at(landing_turf, 2, 2) + user.Paralyze(4 SECONDS) + user.visible_message(span_warning("You're too tired tired to finish the roll!")) + else + playsound(user, 'yogstation/sound/items/dodgeroll.ogg', 50, TRUE) + user.apply_status_effect(STATUS_EFFECT_DODGING) + if(user.dir == EAST || user.dir == NORTH) + spin_direction = TRUE + passtable_on(user, src) + user.setMovetype(user.movement_type | FLYING) + user.safe_throw_at(landing_turf, 4, 1, spin = FALSE) + user.SpinAnimation(speed = 3, loops = 1, clockwise = spin_direction, segments = 3, parallel = TRUE) + passtable_off(user, src) + user.setMovetype(user.movement_type & ~FLYING) + next_roll = world.time + 1 SECONDS + else + to_chat(user, span_notice("You need to catch your breath before you can roll again!")) /obj/item/katana/suicide_act(mob/user) diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi index ca7fcbf7782d..1f80e7fc0f27 100644 Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ diff --git a/yogstation.dme b/yogstation.dme index 461103b1d248..af800f603d48 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -3337,6 +3337,7 @@ #include "yogstation\code\datums\mutations\extendoarm.dm" #include "yogstation\code\datums\ruins\free_miners.dm" #include "yogstation\code\datums\ruins\station.dm" +#include "yogstation\code\datums\status_effects\buffs.dm" #include "yogstation\code\datums\status_effects\neutral.dm" #include "yogstation\code\datums\traits\negative.dm" #include "yogstation\code\datums\wires\disposals.dm" diff --git a/yogstation/code/datums/status_effects/buffs.dm b/yogstation/code/datums/status_effects/buffs.dm new file mode 100644 index 000000000000..5e0fad82ea0b --- /dev/null +++ b/yogstation/code/datums/status_effects/buffs.dm @@ -0,0 +1,19 @@ +/datum/status_effect/dodging + id = "dodging" + duration = 0.5 SECONDS + examine_text = span_notice("They're deftly dodging all incoming attacks!") + alert_type = /obj/screen/alert/status_effect/dodging + +/datum/status_effect/dodging/on_apply() + owner.visible_message(span_notice("[owner] dodges!")) + owner.status_flags |= GODMODE + return ..() + +/datum/status_effect/dodging/on_remove() + owner.status_flags &= ~GODMODE + owner.visible_message(span_warning("[owner] returns to a neutral stance.")) + +/obj/screen/alert/status_effect/dodging + name = "Dodging" + desc = "You're sure to win because your speed is superior!" + icon_state = "evading" diff --git a/yogstation/sound/items/dodgeroll.ogg b/yogstation/sound/items/dodgeroll.ogg new file mode 100644 index 000000000000..7a450778c6fb Binary files /dev/null and b/yogstation/sound/items/dodgeroll.ogg differ