fixes and code improvements

This commit is contained in:
Seris02
2020-03-03 19:27:09 +08:00
parent de6e8012f3
commit 8c4c2842d0
3 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -70,11 +70,11 @@
button_icon_state = "deftswitch"
movestreak = "deft"
/datum/martial_art/the_rising_bass/proc/checkfordensity(turf/T)
/datum/martial_art/the_rising_bass/proc/checkfordensity(turf/T,mob/M)
if (T.density)
return FALSE
for(var/obj/i in T)
if(!istype(i,/mob) && i.density)
for(var/obj/O in T)
if(!O.CanPass(M,T))
return FALSE
return TRUE
@@ -90,7 +90,7 @@
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
D.apply_damage(5, BRUTE, BODY_ZONE_CHEST)
D.Knockdown(60)
var/L = !checkfordensity(H) ? (!checkfordensity(K) ? D.loc : K) : H
var/L = !checkfordensity(H,D) ? (!checkfordensity(K,D) ? D.loc : K) : H
D.forceMove(L)
log_combat(A, D, "side kicked (Rising Bass)")
return TRUE
@@ -99,7 +99,7 @@
/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 = checkfordensity(H) ? H : A.loc
var/L = checkfordensity(H,D) ? 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>")
@@ -52,7 +52,7 @@
. = ..()
if(!HAS_TRAIT(src, TRAIT_AUTO_CATCH_ITEM) && !skip_throw_mode_check && !in_throw_mode)
return
if(restrained())
if(incapacitated())
return
if (get_active_held_item())
if (HAS_TRAIT_FROM(src, TRAIT_AUTO_CATCH_ITEM,RISING_BASS_TRAIT))
@@ -49,7 +49,7 @@
if (mind.martial_art && mind.martial_art.dodge_chance)
if(!lying && dna && !dna.check_mutation(HULK))
if(prob(mind.martial_art.dodge_chance))
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/static/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