balances yee

This commit is contained in:
Seris02
2020-02-26 17:49:37 +08:00
parent 270c5f26b5
commit de6e8012f3
4 changed files with 50 additions and 34 deletions

View File

@@ -1,6 +1,8 @@
#define SIDE_KICK_COMBO "DH"
#define REPULSE_PUNCH_COMBO "HDHD"
#define SHOULDER_FLIP_COMBO "GHDGHH"
#define FOOT_SMASH_COMBO "HH"
#define SIDE_KICK_COMBO "skick"
#define DEFT_SWITCH_COMBO "deft"
/datum/martial_art/the_rising_bass
name = "The Rising Bass"
@@ -8,7 +10,7 @@
dodge_chance = 100
allow_temp_override = FALSE
help_verb = /mob/living/carbon/human/proc/rising_bass_help
var/datum/action/risingbassmove/repulsepunch = new/datum/action/risingbassmove/repulsepunch()
var/datum/action/risingbassmove/sidekick = new/datum/action/risingbassmove/sidekick()
var/datum/action/risingbassmove/deftswitch = new/datum/action/risingbassmove/deftswitch()
var/repulsecool = 0
@@ -21,7 +23,7 @@
streak = ""
shoulderFlip(A,D)
return 1
if(findtext(streak,"rplse"))
if(findtext(streak,REPULSE_PUNCH_COMBO))
streak = ""
repulsePunch(A,D)
return 1
@@ -29,7 +31,7 @@
streak = ""
footSmash(A,D)
return 1
if(findtext(streak,"deft"))
if(findtext(streak,DEFT_SWITCH_COMBO))
streak = ""
deftSwitch(A,D)
return 1
@@ -58,42 +60,46 @@
to_chat(H,"<span class='danger'>You get ready to use the [name] maneuver!</span>")
H.mind.martial_art.streak = "[movestreak]"
/datum/action/risingbassmove/repulsepunch
name = "Repulse Punch"
button_icon_state = "repulsepunch"
movestreak = "rplse"
/datum/action/risingbassmove/sidekick
name = "Side Kick"
button_icon_state = "sidekick"
movestreak = "skick"
/datum/action/risingbassmove/deftswitch
name = "Deft Switch"
button_icon_state = "deftswitch"
movestreak = "deft"
/datum/martial_art/the_rising_bass/proc/checkfordensity(turf/T)
if (T.density)
return FALSE
for(var/obj/i in T)
if(!istype(i,/mob) && i.density)
return FALSE
return TRUE
/datum/martial_art/the_rising_bass/proc/sideKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!D.IsKnockdown() || D.lying == 0)
var/turf/H = get_step(D, A.dir & (NORTH | SOUTH) ? pick(EAST, WEST) : pick(NORTH, SOUTH))
var/dir = A.dir & (NORTH | SOUTH) ? pick(EAST, WEST) : pick(NORTH, SOUTH)
var/oppdir = dir == NORTH ? SOUTH : dir == SOUTH ? NORTH : dir == EAST ? WEST : EAST
var/turf/H = get_step(D, dir)
var/turf/K = get_step(D, oppdir)
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
D.visible_message("<span class='warning'>[A] kicks [D] in the side, sliding them over!</span>", \
"<span class='userdanger'>[A] kicks you in the side, forcing you to step away!</span>")
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
D.apply_damage(5, BRUTE, BODY_ZONE_CHEST)
D.Knockdown(60)
var/L = H
for(var/obj/i in H.contents)
if(!istype(i,/mob) && i.density == 1)
L = D.loc
var/L = !checkfordensity(H) ? (!checkfordensity(K) ? D.loc : K) : H
D.forceMove(L)
log_combat(A, D, "side kicked (Rising Bass)")
return 1
return TRUE
return basic_hit(A,D)
/datum/martial_art/the_rising_bass/proc/shoulderFlip(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!D.IsKnockdown() || !D.lying)
var/turf/H = get_step(A, get_dir(D,A))
var/L = H
for(var/obj/i in H.contents)
if(!istype(i,/mob) && i.density == 1)//(i.anchored == 1 && i.density == 1) || istype(i,/obj/structure) || istype(i,/turf/closed)
L = A.loc
var/L = checkfordensity(H) ? H : A.loc
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("<span class='warning'>[A] flips [D] over their shoulder, slamming them into the ground!</span>", \
"<span class='userdanger'>[A] flips you over their shoulder, slamming you into the ground!</span>")
@@ -105,11 +111,11 @@
D.Knockdown(300)
D.forceMove(L)
log_combat(A, D, "shoulder flipped (Rising Bass)")
return 1
return TRUE
return basic_hit(A,D)
/datum/martial_art/the_rising_bass/proc/repulsePunch(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!D.IsKnockdown() || !D.lying || repulsecool > world.time)
if((!D.IsKnockdown() || !D.lying) && repulsecool > world.time)
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
D.visible_message("<span class='warning'>[A] smashes [D] in the chest, throwing them away!</span>", \
"<span class='userdanger'>[A] smashes you in the chest, repelling you away!</span>")
@@ -120,7 +126,7 @@
D.Knockdown(90)
log_combat(A, D, "repulse punched (Rising Bass)")
repulsecool = world.time + 3 SECONDS
return 1
return TRUE
return basic_hit(A,D)
/datum/martial_art/the_rising_bass/proc/footSmash(mob/living/carbon/human/A, mob/living/carbon/human/D)
@@ -132,7 +138,7 @@
D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
D.dropItemToGround(D.get_active_held_item())
log_combat(A, D, "foot smashed (Rising Bass)")
return 1
return TRUE
return basic_hit(A,D)
/datum/martial_art/the_rising_bass/proc/deftSwitch(mob/living/carbon/human/A, mob/living/carbon/human/D)
@@ -144,10 +150,10 @@
D.visible_message("<span class='warning'>[A] slaps [D]'s hands, taking [G] from them!</span>", \
"<span class='userdanger'>[A] slaps you, taking [G] from you!</span>")
log_combat(A, D, "deft switched (Rising Bass)")
return 1
return TRUE
else
to_chat(A, "<i>[G] can't be taken out of [D]'s hands!</i>")
return 0
return FALSE
/datum/martial_art/the_rising_bass/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
add_to_streak("D",D)
@@ -168,7 +174,7 @@
return ..()
/datum/martial_art/the_rising_bass/add_to_streak(element,mob/living/carbon/human/D)
if (streak == "deft" || streak == "rplse")
if (streak == DEFT_SWITCH_COMBO || streak == SIDE_KICK_COMBO)
return
. = ..()
@@ -179,24 +185,24 @@
to_chat(usr, "<b><i>You retreat inward and recall the teachings of the Rising Bass...</i></b>")
to_chat(usr, "<span class='notice'>Side Kick</span>: Disarm Harm. Forces opponent to step to the side.")
to_chat(usr, "<span class='notice'>Side Kick</span>: Forces opponent to step to the side.")
to_chat(usr, "<span class='notice'>Shoulder Flip</span>: Grab Harm Disarm Grab Harm Harm. Flips opponent over your shoulder and stuns.")
to_chat(usr, "<span class='notice'>Repulse Punch</span>: Grab Harm Grab Harm. Slams the opponent far away from you.")
to_chat(usr, "<span class='notice'>Repulse Punch</span>: Harm Disarm Harm Disarm. Slams the opponent far away from you.")
to_chat(usr, "<span class='notice'>Foot Smash</span>: Harm Harm. Stuns opponent, minor damage.")
to_chat(usr, "<span class='notice'>Deft Switch</span>: Grab Disarm Disarm. Switches the opponent's held item for your own. Most useful with nothing in your hand.")
to_chat(usr, "<span class='notice'>Deft Switch</span>: Switches the opponent's held item for your own. Most useful with nothing in your hand.")
/datum/martial_art/the_rising_bass/teach(mob/living/carbon/human/H, make_temporary = FALSE)
. = ..()
if(!.)
return
deftswitch.Grant(H)
repulsepunch.Grant(H)
sidekick.Grant(H)
ADD_TRAIT(H, TRAIT_NOGUNS, RISING_BASS_TRAIT)
ADD_TRAIT(H, TRAIT_AUTO_CATCH_ITEM, RISING_BASS_TRAIT)
/datum/martial_art/the_rising_bass/on_remove(mob/living/carbon/human/H)
. = ..()
deftswitch.Remove(H)
repulsepunch.Remove(H)
sidekick.Remove(H)
REMOVE_TRAIT(H, TRAIT_NOGUNS, RISING_BASS_TRAIT)
REMOVE_TRAIT(H, TRAIT_AUTO_CATCH_ITEM, RISING_BASS_TRAIT)

View File

@@ -52,7 +52,12 @@
. = ..()
if(!HAS_TRAIT(src, TRAIT_AUTO_CATCH_ITEM) && !skip_throw_mode_check && !in_throw_mode)
return
if(get_active_held_item() || restrained())
if(restrained())
return
if (get_active_held_item())
if (HAS_TRAIT_FROM(src, TRAIT_AUTO_CATCH_ITEM,RISING_BASS_TRAIT))
visible_message("<span class='warning'>[src] chops [I] out of the air!</span>")
return TRUE
return
I.attack_hand(src)
if(get_active_held_item() == I) //if our attack_hand() picks up the item...

View File

@@ -49,9 +49,14 @@
if (mind.martial_art && mind.martial_art.dodge_chance)
if(!lying && dna && !dna.check_mutation(HULK))
if(prob(mind.martial_art.dodge_chance))
var/dodgemessage = pick("dodges under the projectile!","dodges to the right of the projectile!","jumps over the projectile!")
visible_message("<span class='danger'>[src] [dodgemessage]</span>", "<span class='userdanger'>You dodge the projectile!</span>")
return BULLET_ACT_BLOCK
var/dodgemessages = list("dodges under",0,-4,"dodges to the right of",-4,0,"dodges to the left of",4,0,"jumps over",0,4)
var/pick = pick(1,4,7,10)
var/oldx = pixel_x
var/oldy = pixel_y
animate(src,pixel_x = pixel_x + dodgemessages[pick+1],pixel_y = pixel_y + dodgemessages[pick+2],time=3)
animate(src,pixel_x = oldx,pixel_y = oldy,time=2)
visible_message("<span class='danger'>[src] [dodgemessages[pick]] the projectile!</span>", "<span class='userdanger'>You dodge the projectile!</span>")
return BULLET_ACT_FORCE_PIERCE
if(mind.martial_art && !incapacitated(FALSE, TRUE) && mind.martial_art.can_use(src) && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles!
if(prob(mind.martial_art.deflection_chance))
if(!lying && dna && !dna.check_mutation(HULK)) //But only if they're not lying down, and hulks can't do it