Xeno Disarm Rework

This commit is contained in:
Fox McCloud
2020-07-11 20:48:11 -04:00
parent 9cb0adcda5
commit b972f33fe4
5 changed files with 36 additions and 43 deletions
@@ -583,41 +583,35 @@ emp_act
if(M.a_intent == INTENT_HARM)
if(w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
var/damage = prob(90) ? 20 : 0
if(!damage)
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, TRUE, -1)
visible_message("<span class='danger'>[M] has lunged at [src]!</span>")
return 0
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_selected))
var/armor_block = run_armor_check(affecting, "melee")
var/armor_block = run_armor_check(affecting, "melee", armour_penetration = 10)
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
playsound(loc, 'sound/weapons/slice.ogg', 25, TRUE, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
"<span class='userdanger'>[M] has slashed at [src]!</span>")
apply_damage(damage, BRUTE, affecting, armor_block)
if(damage >= 25)
visible_message("<span class='danger'>[M] has wounded [src]!</span>", \
"<span class='userdanger'>[M] has wounded [src]!</span>")
apply_effect(4, WEAKEN, armor_block)
add_attack_logs(M, src, "Alien attacked")
add_attack_logs(M, src, "Alien attacked")
updatehealth("alien attack")
if(M.a_intent == INTENT_DISARM)
if(prob(80))
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
var/obj/item/I = get_active_hand()
if(I && unEquip(I))
playsound(loc, 'sound/weapons/slash.ogg', 25, TRUE, -1)
visible_message("<span class='danger'>[M] disarms [src]!</span>", \
"<span class='userdanger'>[M] disarms you!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", null, M)
to_chat(M, "<span class='danger'>You disarm [src]!</span>")
else
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_selected))
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
apply_effect(5, WEAKEN, run_armor_check(affecting, "melee"))
add_attack_logs(M, src, "Alien tackled")
visible_message("<span class='danger'>[M] has tackled down [src]!</span>")
else
if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)'
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
drop_item()
visible_message("<span class='danger'>[M] disarmed [src]!</span>")
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has tried to disarm [src]!</span>")
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M)
. = ..()
@@ -59,7 +59,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/ear_protection = 0
var/damage_protection = 0
var/emp_protection = FALSE
var/xeno_disarm_chance = 85
var/list/force_modules = list()
var/allow_rename = TRUE
@@ -1341,7 +1340,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
eye_protection = 2 // Immunity to flashes and the visual part of flashbangs
ear_protection = 1 // Immunity to the audio part of flashbangs
damage_protection = 10 // Reduce all incoming damage by this number
xeno_disarm_chance = 20
allow_rename = FALSE
modtype = "Commando"
faction = list("nanotrasen")
@@ -1411,7 +1409,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
damage_protection = 5 // Reduce all incoming damage by this number
eprefix = "Gamma"
magpulse = 1
xeno_disarm_chance = 40
/mob/living/silicon/robot/destroyer
@@ -1431,7 +1428,6 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
ear_protection = 1 // Immunity to the audio part of flashbangs
emp_protection = TRUE // Immunity to EMP, due to heavy shielding
damage_protection = 20 // Reduce all incoming damage by this number. Very high in the case of /destroyer borgs, since it is an admin-only borg.
xeno_disarm_chance = 10
default_cell_type = /obj/item/stock_parts/cell/bluespace
/mob/living/silicon/robot/destroyer/init()
@@ -2,19 +2,17 @@
if(M.a_intent == INTENT_DISARM)
if(!lying)
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
if(prob(xeno_disarm_chance))
Stun(7)
step(src, get_dir(M,src))
spawn(5)
step(src, get_dir(M,src))
add_attack_logs(M, src, "Alien pushed over")
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has forced back [src]!</span>",\
"<span class='userdanger'>[M] has forced back [src]!</span>")
var/obj/item/I = get_active_hand()
if(I)
uneq_active()
visible_message("<span class='danger'>[M] disarmed [src]!</span>", "<span class='userdanger'>[M] has disabled [src]'s active module!</span>")
add_attack_logs(M, src, "alien disarmed")
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>",\
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
Stun(2)
step(src, get_dir(M,src))
add_attack_logs(M, src, "Alien pushed over")
visible_message("<span class='danger'>[M] forces back [src]!</span>", "<span class='userdanger'>[M] forces back [src]!</span>")
playsound(loc, 'sound/weapons/pierce.ogg', 50, TRUE, -1)
else
..()
return
@@ -3,7 +3,7 @@
/mob/living/silicon/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent
var/damage = rand(10, 20)
var/damage = 20
if(prob(90))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
@@ -42,13 +42,18 @@
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent.
var/damage = rand(15, 30)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
"<span class='userdanger'>[M] has slashed at [src]!</span>")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
add_attack_logs(M, src, "Alien attacked")
attack_threshold_check(damage)
return
if(M.a_intent == INTENT_DISARM)
playsound(loc, 'sound/weapons/pierce.ogg', 25, TRUE, -1)
visible_message("<span class='danger'>[M] [response_disarm] [name]!</span>", "<span class='userdanger'>[M] [response_disarm] you!</span>")
add_attack_logs(M, src, "Alien disarmed")
else
var/damage = rand(15, 30)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
"<span class='userdanger'>[M] has slashed at [src]!</span>")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
add_attack_logs(M, src, "Alien attacked")
attack_threshold_check(damage)
return TRUE
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L)
if(..()) //successful larva bite