mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Martial arts rework/refactor. And you can't prepare combos now. Arts tied to the mind (#13341)
* first commit. combos, CQC started * CQC working * All transfered to new system * The actual bug fix * add time in between combos * time between combos limit and minor explaination tweak * Krav maga fixes, time change. Minor text changes * Move martial_art to mind * Merge mistake fixed * Steels review changes
This commit is contained in:
@@ -29,8 +29,6 @@
|
||||
|
||||
create_reagents(330)
|
||||
|
||||
martial_art = GLOB.default_martial_art
|
||||
|
||||
handcrafting = new()
|
||||
|
||||
// Set up DNA.
|
||||
@@ -298,8 +296,8 @@
|
||||
apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
|
||||
/mob/living/carbon/human/bullet_act()
|
||||
if(martial_art && martial_art.deflection_chance) //Some martial arts users can deflect projectiles!
|
||||
if(!prob(martial_art.deflection_chance))
|
||||
if(mind && mind.martial_art && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles!
|
||||
if(!prob(mind.martial_art.deflection_chance))
|
||||
return ..()
|
||||
if(!src.lying && !(HULK in mutations)) //But only if they're not lying down, and hulks can't do it
|
||||
visible_message("<span class='danger'>[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
@@ -1731,16 +1729,14 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
if(G.trigger_guard == TRIGGER_GUARD_NORMAL)
|
||||
if(HULK in mutations)
|
||||
to_chat(src, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(NOGUNS in dna.species.species_traits)
|
||||
to_chat(src, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(martial_art && martial_art.no_guns) //great dishonor to famiry
|
||||
to_chat(src, "<span class='warning'>[martial_art.no_guns_message]</span>")
|
||||
return 0
|
||||
|
||||
return .
|
||||
if(mind && mind.martial_art && mind.martial_art.no_guns) //great dishonor to famiry
|
||||
to_chat(src, "<span class='warning'>[mind.martial_art.no_guns_message]</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/change_icobase(var/new_icobase, var/new_deform, var/owner_sensitive)
|
||||
for(var/obj/item/organ/external/O in bodyparts)
|
||||
|
||||
@@ -214,7 +214,7 @@ emp_act
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/check_block()
|
||||
if(martial_art && prob(martial_art.block_chance) && martial_art.can_use(src) && in_throw_mode && !incapacitated(FALSE, TRUE))
|
||||
if(mind && mind.martial_art && prob(mind.martial_art.block_chance) && mind.martial_art.can_use(src) && in_throw_mode && !incapacitated(FALSE, TRUE))
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit) //todo: update this to utilize check_obscured_slots() //and make sure it's check_obscured_slots(TRUE) to stop aciding through visors etc
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
GLOBAL_DATUM_INIT(default_martial_art, /datum/martial_art, new())
|
||||
/mob/living/carbon/human
|
||||
|
||||
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPMINDSHIELD_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,GLAND_HUD)
|
||||
@@ -42,8 +41,6 @@ GLOBAL_DATUM_INIT(default_martial_art, /datum/martial_art, new())
|
||||
|
||||
var/datum/personal_crafting/handcrafting
|
||||
|
||||
var/datum/martial_art/martial_art = null
|
||||
|
||||
var/special_voice = "" // For changing our voice. Used by a symptom.
|
||||
|
||||
var/hand_blood_color
|
||||
|
||||
@@ -696,13 +696,14 @@
|
||||
|
||||
if(alcohol_strength >= slur_start) //slurring
|
||||
Slur(drunk)
|
||||
if(alcohol_strength >= brawl_start) //the drunken martial art
|
||||
if(!istype(martial_art, /datum/martial_art/drunk_brawling))
|
||||
var/datum/martial_art/drunk_brawling/F = new
|
||||
F.teach(src, 1)
|
||||
if(alcohol_strength < brawl_start) //removing the art
|
||||
if(istype(martial_art, /datum/martial_art/drunk_brawling))
|
||||
martial_art.remove(src)
|
||||
if(mind)
|
||||
if(alcohol_strength >= brawl_start) //the drunken martial art
|
||||
if(!istype(mind.martial_art, /datum/martial_art/drunk_brawling))
|
||||
var/datum/martial_art/drunk_brawling/F = new
|
||||
F.teach(src, TRUE)
|
||||
else if(alcohol_strength < brawl_start) //removing the art
|
||||
if(istype(mind.martial_art, /datum/martial_art/drunk_brawling))
|
||||
mind.martial_art.remove(src)
|
||||
if(alcohol_strength >= confused_start && prob(33)) //confused walking
|
||||
if(!confused)
|
||||
Confused(1)
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
playsound(target.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] attempted to disarm [target]!</span>")
|
||||
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) //Handles any species-specific attackhand events.
|
||||
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style) //Handles any species-specific attackhand events.
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
@@ -528,6 +528,9 @@
|
||||
to_chat(M, "<span class='warning'>You can't use your hand.</span>")
|
||||
return
|
||||
|
||||
if(M.mind)
|
||||
attacker_style = M.mind.martial_art
|
||||
|
||||
if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
|
||||
add_attack_logs(M, H, "Melee attacked with fists (miss/block)")
|
||||
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
|
||||
|
||||
@@ -122,8 +122,8 @@ Difficulty: Very Hard
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/enrage(mob/living/L)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.martial_art && prob(H.martial_art.deflection_chance))
|
||||
. = TRUE
|
||||
if(H.mind && H.mind.martial_art && prob(H.mind.martial_art.deflection_chance))
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/proc/alternating_dir_shots()
|
||||
ranged_cooldown = world.time + 40
|
||||
|
||||
Reference in New Issue
Block a user