mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
## About The Pull Request Refactors martial arts off the mind. Don't worry the martial arts you learn still transfer with mindswap Instead, they are just tracked on a list on the mob, and they also independently track the datum that created them This fixes a lot of jank with martial arts, like say, having your krav maga gloves transfer across slime clones or something... But it also opens an opportunity: As we track all martial arts available, I added a verb (ic tab) that lets you swap between the ones you know  (Some don't let you swap like that one brain trauma) ## Why It's Good For The Game Aforementioned fixes a lot of jank Recently martial arts have just been up and disappearing and this was entirely spurred on by that bug Probably fixes #84710 (haven't checked) Probably fixes #89247 Probably fixes #89948 Probably fixes #90067 ## Changelog 🆑 Melbert refactor: Refactored martial arts, if you notice any oddities like managing to know two martial arts at once or having your powers disappear, report it! add: If you know multiple martial arts, such as krav maga from gloves and cqc from a book, you can now swap between them at will via a button in the IC tab! /🆑 --------- Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
58 lines
2.5 KiB
Plaintext
58 lines
2.5 KiB
Plaintext
/datum/martial_art/mushpunch
|
|
name = "Mushroom Punch"
|
|
id = MARTIALART_MUSHPUNCH
|
|
|
|
/datum/martial_art/mushpunch/harm_act(mob/living/attacker, mob/living/defender)
|
|
INVOKE_ASYNC(src, PROC_REF(charge_up_attack), attacker, defender)
|
|
return MARTIAL_ATTACK_SUCCESS
|
|
|
|
/datum/martial_art/mushpunch/proc/charge_up_attack(mob/living/attacker, mob/living/defender)
|
|
|
|
to_chat(attacker, span_spiderbroodmother("You begin to wind up an attack..."))
|
|
if(!do_after(attacker, 2.5 SECONDS, defender))
|
|
to_chat(attacker, span_spiderbroodmother("<b>Your attack was interrupted!</b>"))
|
|
return
|
|
|
|
var/final_damage = rand(15, 30)
|
|
var/atk_verb = pick("punch", "smash", "crack")
|
|
if(defender.check_block(attacker, final_damage, "[attacker]'s [atk_verb]", UNARMED_ATTACK))
|
|
return
|
|
|
|
attacker.do_attack_animation(defender, ATTACK_EFFECT_PUNCH)
|
|
defender.visible_message(
|
|
span_danger("[attacker] [atk_verb]ed [defender] with such inhuman strength that it sends [defender.p_them()] flying backwards!"), \
|
|
span_userdanger("You're [atk_verb]ed by [attacker] with such inhuman strength that it sends you flying backwards!"),
|
|
span_hear("You hear a sickening sound of flesh hitting flesh!"),
|
|
null,
|
|
attacker,
|
|
)
|
|
to_chat(attacker, span_danger("You [atk_verb] [defender] with such inhuman strength that it sends [defender.p_them()] flying backwards!"))
|
|
defender.apply_damage(final_damage, attacker.get_attack_type())
|
|
playsound(defender, 'sound/effects/meteorimpact.ogg', 25, TRUE, -1)
|
|
var/throwtarget = get_edge_target_turf(attacker, get_dir(attacker, get_step_away(defender, attacker)))
|
|
defender.throw_at(throwtarget, 4, 2, attacker)//So stuff gets tossed around at the same time.
|
|
defender.Paralyze(2 SECONDS)
|
|
log_combat(attacker, defender, "[atk_verb] (Mushroom Punch)")
|
|
|
|
/obj/item/mushpunch
|
|
name = "odd mushroom"
|
|
desc = "<I>Sapienza Ophioglossoides</I>:An odd mushroom from the flesh of a mushroom person. \
|
|
It has apparently retained some innate power of its owner, as it quivers with barely-contained POWER!"
|
|
icon = 'icons/obj/service/hydroponics/seeds.dmi'
|
|
icon_state = "mycelium-angel"
|
|
|
|
/obj/item/mushpunch/attack_self(mob/living/user)
|
|
if(!istype(user))
|
|
return
|
|
to_chat(user, span_spiderbroodmother("You devour [src], \
|
|
and a confluence of skill and power from the mushroom enhances your punches! \
|
|
You do need a short moment to charge these powerful punches."))
|
|
var/datum/martial_art/mushpunch/mush = new(user)
|
|
mush.teach(user)
|
|
visible_message(
|
|
span_warning("[user] devours [src]."),
|
|
span_notice("You devour [src]."),
|
|
)
|
|
|
|
qdel(src)
|