mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
Unarmed Attack+Martial Arts Update+Golem Refactor
This commit is contained in:
+93
-45
@@ -5,6 +5,8 @@
|
||||
var/current_target = null
|
||||
var/temporary = 0
|
||||
var/datum/martial_art/base = null // The permanent style
|
||||
var/deflection_chance = 0 //Chance to deflect projectiles
|
||||
var/help_verb = null
|
||||
|
||||
/datum/martial_art/proc/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
return 0
|
||||
@@ -25,29 +27,32 @@
|
||||
return
|
||||
|
||||
/datum/martial_art/proc/basic_hit(var/mob/living/carbon/human/A,var/mob/living/carbon/human/D)
|
||||
add_logs(D, A, "punched")
|
||||
A.do_attack_animation(D)
|
||||
var/damage = rand(0,9)
|
||||
|
||||
var/atk_verb = "punch"
|
||||
A.do_attack_animation(D)
|
||||
var/damage = rand(A.species.punchdamagelow, A.species.punchdamagehigh)
|
||||
var/datum/unarmed_attack/attack = A.species.unarmed
|
||||
|
||||
var/atk_verb = "[pick(attack.attack_verb)]"
|
||||
if(D.lying)
|
||||
atk_verb = "kick"
|
||||
|
||||
if(!damage)
|
||||
playsound(D.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
playsound(D.loc, attack.miss_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>")
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
|
||||
playsound(D.loc, 'sound/weapons/punch1.ogg', 25, 1, -1)
|
||||
|
||||
playsound(D.loc, attack.attack_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='danger'>[A] has [atk_verb]ed [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>")
|
||||
|
||||
D.apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
if((D.stat != DEAD) && damage >= 9)
|
||||
|
||||
add_logs(D, A, "punched")
|
||||
|
||||
if((D.stat != DEAD) && damage >= A.species.punchstunthreshold)
|
||||
D.visible_message("<span class='danger'>[A] has weakened [D]!!</span>", \
|
||||
"<span class='userdanger'>[A] has weakened [D]!</span>")
|
||||
D.apply_effect(4, WEAKEN, armor_block)
|
||||
@@ -57,6 +62,8 @@
|
||||
return 1
|
||||
|
||||
/datum/martial_art/proc/teach(var/mob/living/carbon/human/H,var/make_temporary=0)
|
||||
if(help_verb)
|
||||
H.verbs += help_verb
|
||||
if(make_temporary)
|
||||
temporary = 1
|
||||
if(H.martial_art && H.martial_art.temporary)
|
||||
@@ -71,30 +78,31 @@
|
||||
if(H.martial_art != src)
|
||||
return
|
||||
H.martial_art = base
|
||||
|
||||
if(help_verb)
|
||||
H.verbs -= help_verb
|
||||
|
||||
/datum/martial_art/boxing
|
||||
name = "Boxing"
|
||||
|
||||
/datum/martial_art/boxing/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
A << "<span class='warning'> Can't disarm while boxing!</span>"
|
||||
A << "<span class='warning'>Can't disarm while boxing!</span>"
|
||||
return 1
|
||||
|
||||
/datum/martial_art/boxing/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
A << "<span class='warning'> Can't grab while boxing!</span>"
|
||||
A << "<span class='warning'>Can't grab while boxing!</span>"
|
||||
return 1
|
||||
|
||||
/datum/martial_art/boxing/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_logs(D, A, "punched")
|
||||
|
||||
A.do_attack_animation(D)
|
||||
|
||||
var/atk_verb = pick("left hook","right hook","straight punch")
|
||||
|
||||
var/damage = rand(5,8)
|
||||
|
||||
var/damage = rand(5, 8) + A.species.punchdamagelow
|
||||
if(!damage)
|
||||
playsound(D.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
D.visible_message("<span class='warning'>[A] has attempted to hit [D] with a [atk_verb]!</span>")
|
||||
add_logs(D, A, "attempted to hit", atk_verb)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -103,11 +111,11 @@
|
||||
|
||||
playsound(D.loc, 'sound/weapons/punch1.ogg', 25, 1, -1)
|
||||
|
||||
|
||||
D.visible_message("<span class='danger'>[A] has hit [D] with a [atk_verb]!</span>", \
|
||||
"<span class='userdanger'>[A] has hit [D] with a [atk_verb]!</span>")
|
||||
|
||||
D.apply_damage(damage, STAMINA, affecting, armor_block)
|
||||
add_logs(D, A, "punched")
|
||||
if(D.getStaminaLoss() > 50)
|
||||
var/knockout_prob = D.getStaminaLoss() + rand(-15,15)
|
||||
if((D.stat != DEAD) && prob(knockout_prob))
|
||||
@@ -182,6 +190,12 @@
|
||||
|
||||
/datum/martial_art/wrestling
|
||||
name = "Wrestling"
|
||||
help_verb = /mob/living/carbon/human/proc/wrestling_help
|
||||
|
||||
// combo refence since wrestling uses a different format to sleeping carp and plasma fist.
|
||||
// Clinch "G"
|
||||
// Suplex "GD"
|
||||
// Advanced grab "G"
|
||||
|
||||
/datum/martial_art/wrestling/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
D.grabbedby(A,1)
|
||||
@@ -197,13 +211,15 @@
|
||||
|
||||
|
||||
/datum/martial_art/wrestling/proc/Suplex(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_logs(D, A, "suplexed")
|
||||
|
||||
D.visible_message("<span class='danger'>[A] suplexes [D]!</span>", \
|
||||
"<span class='userdanger'>[A] suplexes [D]!</span>")
|
||||
D.forceMove(A.loc)
|
||||
var/armor_block = D.run_armor_check(null, "melee")
|
||||
D.apply_damage(30, BRUTE, null, armor_block)
|
||||
D.apply_effect(6, WEAKEN, armor_block)
|
||||
add_logs(D, A, "suplexed")
|
||||
|
||||
A.SpinAnimation(10,1)
|
||||
|
||||
D.SpinAnimation(10,1)
|
||||
@@ -230,12 +246,24 @@
|
||||
D.apply_damage(10, STAMINA, affecting, armor_block)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/wrestling_help()
|
||||
set name = "Recall Teachings"
|
||||
set desc = "Remember how to wrestle."
|
||||
set category = "Wrestling"
|
||||
|
||||
usr << "<b><i>You flex your muscles and have a revelation...</i></b>"
|
||||
usr << "<span class='notice'>Clinch</span>: Grab. Passively gives you a chance to immediately aggressively grab someone. Not always successful."
|
||||
usr << "<span class='notice'>Suplex</span>: Disarm someone you are grabbing. Suplexes your target to the floor. Greatly injures them and leaves both you and your target on the floor."
|
||||
usr << "<span class='notice'>Advanced grab</span>: Grab. Passively causes stamina damage when grabbing someone."
|
||||
|
||||
#define TORNADO_COMBO "HHD"
|
||||
#define THROWBACK_COMBO "DHD"
|
||||
#define PLASMA_COMBO "HDDDH"
|
||||
|
||||
/datum/martial_art/plasma_fist
|
||||
name = "Plasma Fist"
|
||||
help_verb = /mob/living/carbon/human/proc/plasma_fist_help
|
||||
|
||||
|
||||
/datum/martial_art/plasma_fist/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(findtext(streak,TORNADO_COMBO))
|
||||
@@ -271,7 +299,7 @@
|
||||
"<span class='userdanger'>[A] has hit [D] with Plasma Punch!</span>")
|
||||
playsound(D.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
var/atom/throw_target = get_edge_target_turf(D, get_dir(D, get_step_away(D, A)))
|
||||
D.throw_at(throw_target, 200, 4)
|
||||
D.throw_at(throw_target, 200, 4,A)
|
||||
A.say("HYAH!")
|
||||
return
|
||||
|
||||
@@ -285,26 +313,37 @@
|
||||
return
|
||||
|
||||
/datum/martial_art/plasma_fist/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_to_streak("H")
|
||||
add_to_streak("H",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
basic_hit(A,D)
|
||||
return 1
|
||||
|
||||
/datum/martial_art/plasma_fist/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_to_streak("D")
|
||||
add_to_streak("D",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
basic_hit(A,D)
|
||||
return 1
|
||||
|
||||
/datum/martial_art/plasma_fist/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_to_streak("G")
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
basic_hit(A,D)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/plasma_fist_help()
|
||||
set name = "Recall Teachings"
|
||||
set desc = "Remember the martial techniques of the Plasma Fist."
|
||||
set category = "Plasma Fist"
|
||||
|
||||
usr << "<b><i>You clench your fists and have a flashback of knowledge...</i></b>"
|
||||
usr << "<span class='notice'>Tornado Sweep</span>: Harm Harm Disarm. Repulses target and everyone back."
|
||||
usr << "<span class='notice'>Throwback</span>: Disarm Harm Disarm. Throws the target and an item at them."
|
||||
usr << "<span class='notice'>The Plasma Fist</span>: Harm Disarm Disarm Disarm Harm. Knocks the brain out of the opponent and gibs their body."
|
||||
|
||||
//Used by the gang of the same name. Uses combos. Basic attacks bypass armor and never miss
|
||||
#define WRIST_WRENCH_COMBO "DD"
|
||||
#define BACK_KICK_COMBO "HG"
|
||||
#define STOMACH_KNEE_COMBO "GH"
|
||||
@@ -312,6 +351,8 @@
|
||||
#define ELBOW_DROP_COMBO "HDHDH"
|
||||
/datum/martial_art/the_sleeping_carp
|
||||
name = "The Sleeping Carp"
|
||||
deflection_chance = 100
|
||||
help_verb = /mob/living/carbon/human/proc/sleeping_carp_help
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(findtext(streak,WRIST_WRENCH_COMBO))
|
||||
@@ -344,7 +385,7 @@
|
||||
D.emote("scream")
|
||||
D.drop_item()
|
||||
D.apply_damage(5, BRUTE, pick("l_arm", "r_arm"))
|
||||
D.Stun(1)
|
||||
D.Stun(3)
|
||||
return 1
|
||||
return basic_hit(A,D)
|
||||
|
||||
@@ -375,7 +416,8 @@
|
||||
"<span class='userdanger'>[A] kicks you in the jaw!</span>")
|
||||
D.apply_damage(20, BRUTE, "head")
|
||||
D.drop_item()
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
D.Stun(4)
|
||||
return 1
|
||||
return basic_hit(A,D)
|
||||
|
||||
@@ -386,12 +428,12 @@
|
||||
if(D.stat)
|
||||
D.death() //FINISH HIM!
|
||||
D.apply_damage(50, BRUTE, "chest")
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 100, 1, -1)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1)
|
||||
return 1
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_to_streak("G")
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
..()
|
||||
@@ -399,19 +441,23 @@
|
||||
if(G)
|
||||
G.state = GRAB_AGGRESSIVE //Instant aggressive grab
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_to_streak("H")
|
||||
/datum/martial_art/the_sleeping_carp/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
add_to_streak("H",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
D.visible_message("<span class='danger'>[A] [pick("punches", "kicks", "chops", "hits", "slams")] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] hits you!</span>")
|
||||
D.apply_damage(10, BRUTE)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
var/atk_verb = pick("punches", "kicks", "chops", "hits", "slams")
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb] you!</span>")
|
||||
D.apply_damage(rand(10,15), BRUTE)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1)
|
||||
if(prob(D.getBruteLoss()) && !D.lying)
|
||||
D.visible_message("<span class='warning'>[D] stumbles and falls!</span>", "<span class='userdanger'>The blow sends you to the ground!</span>")
|
||||
D.Weaken(4)
|
||||
return 1
|
||||
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
add_to_streak("D")
|
||||
add_to_streak("D",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return ..()
|
||||
@@ -422,6 +468,7 @@
|
||||
set category = "Sleeping Carp"
|
||||
|
||||
usr << "<b><i>You retreat inward and recall the teachings of the Sleeping Carp...</i></b>"
|
||||
|
||||
usr << "<span class='notice'>Wrist Wrench</span>: Disarm Disarm. Forces opponent to drop item in hand."
|
||||
usr << "<span class='notice'>Back Kick</span>: Harm Grab. Opponent must be facing away. Knocks down."
|
||||
usr << "<span class='notice'>Stomach Knee</span>: Grab Harm. Knocks the wind out of opponent and stuns."
|
||||
@@ -459,6 +506,7 @@
|
||||
if(slot == slot_belt)
|
||||
var/mob/living/carbon/human/H = user
|
||||
style.teach(H,1)
|
||||
user << "<span class='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 Recall teaching verb in the wrestling tab.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/belt/champion/wrestling/dropped(mob/user)
|
||||
@@ -467,11 +515,12 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(slot_belt) == src)
|
||||
style.remove(H)
|
||||
user << "<span class='sciradio'>You no longer have an urge to flex your muscles.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/plasma_fist_scroll
|
||||
name = "Plasma Fist Scroll"
|
||||
desc = "Teaches the traditional wizard martial art."
|
||||
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 = 0
|
||||
@@ -483,9 +532,11 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/datum/martial_art/plasma_fist/F = new/datum/martial_art/plasma_fist(null)
|
||||
F.teach(H)
|
||||
H << "<span class='notice'>You learn the PLASMA FIST style.</span>"
|
||||
H << "<span class='boldannounce'>You have learned the ancient martial art of Plasma Fist.</span>"
|
||||
used = 1
|
||||
desc += "It looks like it's magic was used up."
|
||||
desc = "It's completely blank."
|
||||
name = "empty scroll"
|
||||
icon_state = "blankscroll"
|
||||
|
||||
/obj/item/weapon/sleeping_carp_scroll
|
||||
name = "mysterious scroll"
|
||||
@@ -496,11 +547,8 @@
|
||||
/obj/item/weapon/sleeping_carp_scroll/attack_self(mob/living/carbon/human/user as mob)
|
||||
if(!istype(user) || !user)
|
||||
return
|
||||
user << "<span class='notice'>You begin to read the scroll...</span>"
|
||||
user << "<span class='sciradio'><i>And all at once the secrets of the Sleeping Carp fill your mind. The ancient clan's martial teachings have been imbued into this scroll. As you read through it, \
|
||||
these secrets flood into your mind and body. You now know the martial techniques of the Sleeping Carp. Your hand-to-hand combat has become much more effective, and you may now perform powerful \
|
||||
combination attacks. To learn more about these combos, use the Recall Teachings ability in the Sleeping Carp tab.</i></span>"
|
||||
user.verbs += /mob/living/carbon/human/proc/sleeping_carp_help
|
||||
user << "<span class='sciradio'>You have learned the ancient martial art of the Sleeping Carp! Your hand-to-hand combat has become much more effective, and you are now able to deflect any projectiles \
|
||||
directed toward you. However, you are also unable to use any ranged weaponry. You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab.</span>"
|
||||
var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null)
|
||||
theSleepingCarp.teach(user)
|
||||
user.drop_item()
|
||||
@@ -508,16 +556,16 @@
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/twohanded/bostaff
|
||||
name = "bo staff"
|
||||
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts. Can be wielded to both kill and incapacitate."
|
||||
force = 8
|
||||
force = 10
|
||||
w_class = 4
|
||||
slot_flags = SLOT_BACK
|
||||
force_unwielded = 8
|
||||
force_wielded = 18
|
||||
force_unwielded = 10
|
||||
force_wielded = 24
|
||||
throwforce = 20
|
||||
throw_speed = 2
|
||||
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "bostaff0"
|
||||
@@ -572,7 +620,7 @@
|
||||
if(total_health <= config.health_threshold_crit && !H.stat)
|
||||
H.visible_message("<span class='warning'>[user] delivers a heavy hit to [H]'s head, knocking them out cold!</span>", \
|
||||
"<span class='userdanger'>[user] knocks you unconscious!</span>")
|
||||
H.sleeping += 30
|
||||
H.SetSleeping(30)
|
||||
H.adjustBrainLoss(25)
|
||||
return
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user