mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Migrate martial arts to the new attack chain and same files. (#32402)
* Migrate martial arts to the new attack chain and same files. * Apply suggestions from CRUNCH review. Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Signed-off-by: Alan <alfalfascout@users.noreply.github.com> * Apply suggestions from code review. Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Signed-off-by: Alan <alfalfascout@users.noreply.github.com> --------- Signed-off-by: Alan <alfalfascout@users.noreply.github.com> Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden>
This commit is contained in:
co-authored by
CRUNCH
warriorstar-orion
parent
5811fd04cf
commit
adffd8ed5b
@@ -42,17 +42,17 @@
|
||||
desc = "An aged and frayed scrap of paper written in shifting runes. There are hand-drawn illustrations of pugilism."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state ="scroll2"
|
||||
var/used = FALSE
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/adminfu_scroll/attack_self__legacy__attackchain(mob/user as mob)
|
||||
/obj/item/adminfu_scroll/activate_self(mob/living/carbon/human/user)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(!used)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/datum/martial_art/adminfu/F = new/datum/martial_art/adminfu(null)
|
||||
F.teach(H)
|
||||
to_chat(H, SPAN_BOLDANNOUNCEIC("You have learned the ancient martial art of the Admins."))
|
||||
used = TRUE
|
||||
desc = "It's completely blank."
|
||||
name = "empty scroll"
|
||||
icon_state = "blankscroll"
|
||||
return ..()
|
||||
|
||||
var/datum/martial_art/adminfu/F = new/datum/martial_art/adminfu(null)
|
||||
F.teach(user)
|
||||
to_chat(user, SPAN_BOLDANNOUNCEIC("You have learned the ancient martial art of the Admins."))
|
||||
user.drop_item_to_ground(src, TRUE)
|
||||
visible_message(SPAN_WARNING("You eat [src] to ensure that no-one else can access its power!"))
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 0)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -144,3 +144,64 @@
|
||||
|
||||
/datum/martial_art/cqc/explaination_footer(user)
|
||||
to_chat(user, "<b>Your slaps hit considerably harder, and allow you to parry incoming melee attacks.</b>")
|
||||
|
||||
/obj/item/cqc_manual
|
||||
name = "old manual"
|
||||
desc = "A small, black manual. There are drawn instructions of tactical hand-to-hand combat."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "cqcmanual"
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/cqc_manual/activate_self(mob/living/carbon/human/user)
|
||||
if(!istype(user))
|
||||
return ..()
|
||||
|
||||
if(!user.mind)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(IS_CHANGELING(user) || IS_MINDFLAYER(user))
|
||||
to_chat(user, SPAN_WARNING("We try multiple times, but we simply cannot grasp the basics of CQC!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(user.mind.has_antag_datum(/datum/antagonist/vampire))
|
||||
to_chat(user, SPAN_WARNING("Your blood lust distracts you from the basics of CQC!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(IS_HERETIC(user))
|
||||
to_chat(user, SPAN_HIEROPHANT_WARNING("The mansus remembers the basics of CQC. You do not need to."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, SPAN_WARNING("The mere thought of combat, let alone CQC, makes your head spin!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
to_chat(user, SPAN_BOLDANNOUNCEIC("You remember the basics of CQC."))
|
||||
var/datum/martial_art/cqc/CQC = new(null)
|
||||
CQC.teach(user)
|
||||
user.drop_item_to_ground(src, TRUE)
|
||||
visible_message(SPAN_WARNING("[src] beeps ominously, and a moment later it bursts up in flames."))
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/datum/action/defensive_stance
|
||||
name = "Defensive Stance - Ready yourself to be attacked, allowing you to parry incoming melee hits."
|
||||
button_icon_state = "block"
|
||||
|
||||
/datum/action/defensive_stance/Trigger(left_click)
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/datum/martial_art/MA = H.mind.martial_art // This should never be available to non-martial-arts users anyway.
|
||||
if(!MA.can_parry)
|
||||
to_chat(H, SPAN_WARNING("You can't parry right now!"))
|
||||
return
|
||||
if(H.incapacitated())
|
||||
to_chat(H, SPAN_WARNING("You can't defend yourself while you're incapacitated!"))
|
||||
return
|
||||
var/obj/item/slapper/parry/slap = new(H)
|
||||
if(H.put_in_hands(slap))
|
||||
H.visible_message(
|
||||
SPAN_DANGER("[H] assumes a defensive stance!"),
|
||||
SPAN_NOTICE("You drop back into a defensive stance.")
|
||||
)
|
||||
else
|
||||
to_chat(H, SPAN_WARNING("Your hands are full!"))
|
||||
|
||||
@@ -242,134 +242,6 @@
|
||||
if(MARTIAL_COMBO_STEP_HELP)
|
||||
return "H"
|
||||
|
||||
/datum/action/defensive_stance
|
||||
name = "Defensive Stance - Ready yourself to be attacked, allowing you to parry incoming melee hits."
|
||||
button_icon_state = "block"
|
||||
|
||||
/datum/action/defensive_stance/Trigger(left_click)
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/datum/martial_art/MA = H.mind.martial_art //This should never be available to non-martial-arts users anyway
|
||||
if(!MA.can_parry)
|
||||
to_chat(H, SPAN_WARNING("You can't parry right now."))
|
||||
return
|
||||
if(H.incapacitated())
|
||||
to_chat(H, SPAN_WARNING("You can't defend yourself while you're incapacitated."))
|
||||
return
|
||||
var/obj/item/slapper/parry/slap = new(H)
|
||||
if(H.put_in_hands(slap))
|
||||
H.visible_message(SPAN_DANGER("[H] assumes a defensive stance!"), "<b><i>You drop back into a defensive stance.</i></b>")
|
||||
else
|
||||
to_chat(H, SPAN_WARNING("Your hands are full."))
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling
|
||||
name = "Wrestling Belt"
|
||||
layer_over_suit = TRUE
|
||||
var/datum/martial_art/wrestling/style
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling/Initialize(mapload)
|
||||
. = ..()
|
||||
style = new()
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling/equipped(mob/user, slot)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(slot == ITEM_SLOT_BELT)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, SPAN_WARNING("In spite of the grandiosity of the belt, you don't feel like getting into any fights."))
|
||||
return
|
||||
style.teach(H, TRUE)
|
||||
to_chat(user, SPAN_SCIRADIO("You have an urge to flex your muscles and get into a fight. You have the knowledge of a thousand wrestlers before you. You can remember more by using the verb in the martial arts tab."))
|
||||
return
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling/dropped(mob/user)
|
||||
..()
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(ITEM_SLOT_BELT) == src)
|
||||
style.remove(H)
|
||||
to_chat(user, SPAN_SCIRADIO("You no longer have an urge to flex your muscles."))
|
||||
|
||||
/obj/item/plasma_fist_scroll
|
||||
name = "frayed scroll"
|
||||
desc = "An aged and frayed scrap of paper written in shifting runes. There are hand-drawn illustrations of pugilism."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state ="scroll2"
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/plasma_fist_scroll/attack_self__legacy__attackchain(mob/user as mob)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
|
||||
if(!used)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/datum/martial_art/plasma_fist/F = new/datum/martial_art/plasma_fist(null)
|
||||
F.teach(H)
|
||||
to_chat(H, SPAN_BOLDANNOUNCEIC("You have learned the ancient martial art of Plasma Fist."))
|
||||
used = TRUE
|
||||
desc = "It's completely blank."
|
||||
name = "empty scroll"
|
||||
icon_state = "blankscroll"
|
||||
|
||||
/obj/item/sleeping_carp_scroll
|
||||
name = "mysterious scroll"
|
||||
desc = "A scroll filled with strange markings. It seems to be drawings of some sort of martial art."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll2"
|
||||
|
||||
/obj/item/sleeping_carp_scroll/attack_self__legacy__attackchain(mob/living/carbon/human/user as mob)
|
||||
if(!istype(user) || !user)
|
||||
return
|
||||
if(user.mind) //Prevents changelings and vampires from being able to learn it
|
||||
if(IS_CHANGELING(user) || IS_MINDFLAYER(user))
|
||||
to_chat(user, "<span class ='warning'>We try multiple times, but we are not able to comprehend the contents of the scroll!</span>")
|
||||
return
|
||||
else if(user.mind.has_antag_datum(/datum/antagonist/vampire)) //Vampires
|
||||
to_chat(user, "<span class ='warning'>Your blood lust distracts you too much to be able to concentrate on the contents of the scroll!</span>")
|
||||
return
|
||||
else if(IS_HERETIC(user))
|
||||
to_chat(user, SPAN_HIEROPHANT_WARNING("You and everyone else are already dreaming. You need to wake up, not sleep more..."))
|
||||
return
|
||||
|
||||
var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null)
|
||||
theSleepingCarp.teach(user)
|
||||
user.drop_item()
|
||||
visible_message(SPAN_WARNING("[src] lights up in fire and quickly burns to ash."))
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/cqc_manual
|
||||
name = "old manual"
|
||||
desc = "A small, black manual. There are drawn instructions of tactical hand-to-hand combat."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "cqcmanual"
|
||||
|
||||
/obj/item/cqc_manual/attack_self__legacy__attackchain(mob/living/carbon/human/user)
|
||||
if(!istype(user) || !user)
|
||||
return
|
||||
if(user.mind) //Prevents changelings and vampires from being able to learn it
|
||||
if(IS_CHANGELING(user) || IS_MINDFLAYER(user))
|
||||
to_chat(user, SPAN_WARNING("We try multiple times, but we simply cannot grasp the basics of CQC!"))
|
||||
return
|
||||
else if(user.mind.has_antag_datum(/datum/antagonist/vampire)) //Vampires
|
||||
to_chat(user, SPAN_WARNING("Your blood lust distracts you from the basics of CQC!"))
|
||||
return
|
||||
else if(IS_HERETIC(user))
|
||||
to_chat(user, SPAN_HIEROPHANT_WARNING("The mansus remembers the basics of CQC. You do not need to."))
|
||||
return
|
||||
else if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, SPAN_WARNING("The mere thought of combat, let alone CQC, makes your head spin!"))
|
||||
return
|
||||
|
||||
to_chat(user, SPAN_BOLDANNOUNCEIC("You remember the basics of CQC."))
|
||||
var/datum/martial_art/cqc/CQC = new(null)
|
||||
CQC.teach(user)
|
||||
user.drop_item()
|
||||
visible_message(SPAN_WARNING("[src] beeps ominously, and a moment later it bursts up in flames."))
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/atom/movable/screen/combo
|
||||
icon_state = ""
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
@@ -18,20 +18,19 @@
|
||||
desc = "Its a beret with a note stapled to it..."
|
||||
icon = 'icons/obj/clothing/head/beret.dmi'
|
||||
icon_state = "beret"
|
||||
var/used = FALSE
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/mimejutsu_scroll/attack_self__legacy__attackchain(mob/user as mob)
|
||||
/obj/item/mimejutsu_scroll/activate_self(mob/living/carbon/human/user)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(!used)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/datum/martial_art/mimejutsu/F = new/datum/martial_art/mimejutsu(null)
|
||||
F.teach(H)
|
||||
to_chat(H, SPAN_BOLDANNOUNCEIC("You have learned the ancient martial art of mimes."))
|
||||
used = TRUE
|
||||
desc = "It used to have something stapled to it..the staple is still there."
|
||||
name = "beret with staple"
|
||||
icon_state = "beret"
|
||||
return ..()
|
||||
|
||||
var/datum/martial_art/mimejutsu/F = new/datum/martial_art/mimejutsu(null)
|
||||
F.teach(user)
|
||||
to_chat(user, SPAN_BOLDANNOUNCEIC("You have learned the ancient martial art of mimes."))
|
||||
user.drop_item_to_ground(src, TRUE)
|
||||
visible_message(SPAN_WARNING("[src] suddenly bursts into a silent inferno before turning into a pile of invisible ash!"))
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/datum/martial_art/mimejutsu/explaination_header(user)
|
||||
to_chat(user, "<b><i>You make a invisible box around yourself and recall the teachings of Mimejutsu...</i></b>")
|
||||
|
||||
@@ -21,3 +21,23 @@
|
||||
|
||||
/datum/martial_art/plasma_fist/explaination_header(user)
|
||||
to_chat(user, "<b><i>You clench your fists and have a flashback of knowledge...</i></b>")
|
||||
|
||||
/obj/item/plasma_fist_scroll
|
||||
name = "frayed scroll"
|
||||
desc = "An aged and frayed scrap of paper written in shifting runes. There are hand-drawn illustrations of pugilism."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state ="scroll2"
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/plasma_fist_scroll/activate_self(mob/living/carbon/human/user)
|
||||
if(!ishuman(user))
|
||||
return ..()
|
||||
|
||||
var/datum/martial_art/plasma_fist/F = new/datum/martial_art/plasma_fist(null)
|
||||
F.teach(user)
|
||||
to_chat(user, SPAN_BOLDANNOUNCEIC("You have learned the ancient martial art of Plasma Fist."))
|
||||
user.drop_item_to_ground(src, TRUE)
|
||||
visible_message(SPAN_WARNING("[src] crumbles to dust!"))
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -45,3 +45,37 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/try_deflect(mob/user)
|
||||
return user.in_throw_mode && ..() // in case an admin wants to var edit carp to have less deflection chance
|
||||
|
||||
/obj/item/sleeping_carp_scroll
|
||||
name = "mysterious scroll"
|
||||
desc = "A scroll filled with strange markings. It seems to be drawings of some sort of martial art."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll2"
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/sleeping_carp_scroll/activate_self(mob/living/carbon/human/user)
|
||||
if(!istype(user))
|
||||
return ..()
|
||||
|
||||
if(!user.mind)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(IS_CHANGELING(user) || IS_MINDFLAYER(user))
|
||||
to_chat(user, SPAN_WARNING("We try multiple times, but we are not able to comprehend the contents of the scroll!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(user.mind.has_antag_datum(/datum/antagonist/vampire))
|
||||
to_chat(user, SPAN_WARNING("Your blood lust distracts you too much to be able to concentrate on the contents of the scroll!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(IS_HERETIC(user))
|
||||
to_chat(user, SPAN_HIEROPHANT_WARNING("You and everyone else are already dreaming. You need to wake up, not sleep more..."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null)
|
||||
theSleepingCarp.teach(user)
|
||||
user.drop_item_to_ground(src, TRUE)
|
||||
visible_message(SPAN_WARNING("[src] lights up in fire and quickly burns to ash."))
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -66,3 +66,33 @@
|
||||
to_chat(user, "[SPAN_NOTICE("Clinch")]: Grab. Passively gives you a chance to immediately aggressively grab someone. Not always successful.")
|
||||
to_chat(user, "[SPAN_NOTICE("Suplex")]: Disarm someone you are grabbing. Suplexes your target to the floor. Greatly injures them and leaves both you and your target on the floor.")
|
||||
to_chat(user, "[SPAN_NOTICE("Advanced grab")]: Grab. Passively causes stamina damage when grabbing someone.")
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling
|
||||
name = "Wrestling Belt"
|
||||
layer_over_suit = TRUE
|
||||
var/datum/martial_art/wrestling/style
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling/Initialize(mapload)
|
||||
. = ..()
|
||||
style = new()
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling/equipped(mob/user, slot)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(slot == ITEM_SLOT_BELT)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, SPAN_WARNING("In spite of the grandiosity of the belt, you don't feel like getting into any fights."))
|
||||
return
|
||||
style.teach(H, TRUE)
|
||||
to_chat(user, SPAN_SCIRADIO("You have an urge to flex your muscles and get into a fight. You have the knowledge of a thousand wrestlers before you. You can remember more by using the verb in the martial arts tab."))
|
||||
return
|
||||
|
||||
/obj/item/storage/belt/champion/wrestling/dropped(mob/user)
|
||||
..()
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(ITEM_SLOT_BELT) == src)
|
||||
style.remove(H)
|
||||
to_chat(user, SPAN_SCIRADIO("You no longer have an urge to flex your muscles."))
|
||||
|
||||
Reference in New Issue
Block a user