Simple Animal Improvements (#9135)

Tweaked various simple animal messages to make it look better in the chat log.
    Aggressive grabs no longer refer to 'by the hands'.
    Getting a neck grab or higher on an aggressive animal restrains them from attacking.
    Strangling an animal now properly does damage to them.
This commit is contained in:
Geeves
2020-07-25 22:25:25 +02:00
committed by GitHub
parent 574211c700
commit bce64cd998
14 changed files with 62 additions and 31 deletions
@@ -20,6 +20,7 @@
harm_intent_damage = 8
melee_damage_lower = 10
melee_damage_upper = 10
resist_mod = 10 // can't grab a cloud of bats easily
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
@@ -25,6 +25,7 @@
maxHealth = 80
melee_damage_lower = 10
melee_damage_upper = 18
resist_mod = 4
break_stuff_probability = 80
mob_size = 17
butchering_products = list(/obj/item/clothing/head/bearpelt = 1)
@@ -23,6 +23,7 @@
harm_intent_damage = 0
melee_damage_lower = 30
melee_damage_upper = 30
resist_mod = 3
mob_size = 25
environment_smash = 2
attacktext = "mangled"
@@ -15,6 +15,7 @@
attacktext = "swatted"
melee_damage_lower = 25
melee_damage_upper = 25
resist_mod = 5
min_oxy = 5
max_co2 = 5
@@ -29,6 +29,7 @@
harm_intent_damage = 5
melee_damage_lower = 15
melee_damage_upper = 15
resist_mod = 2
mob_size = 5
@@ -25,6 +25,7 @@
health = 200
melee_damage_lower = 15
melee_damage_upper = 20
resist_mod = 1.5
heat_damage_per_tick = 20
cold_damage_per_tick = 20
var/poison_per_bite = 5
@@ -67,8 +67,8 @@
if(!isnull(T))
stance = HOSTILE_STANCE_ATTACK
if(isliving(T))
custom_emote(1, "[attack_emote] [T]")
if(istype(T, /mob/living/simple_animal/hostile/))
visible_message(SPAN_WARNING("\The [src] [attack_emote] [T]."))
if(istype(T, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = T
H.being_targeted(src)
return T
@@ -80,7 +80,7 @@
target_mob = H
FoundTarget()
stance = HOSTILE_STANCE_ATTACKING
custom_emote(1, "gets taunted by [H] and begins to retaliate!")
visible_message(SPAN_WARNING("\The [src] gets taunted by \the [H] and begins to retaliate!"))
/mob/living/simple_animal/hostile/bullet_act(var/obj/item/projectile/P, var/def_zone)
..()
@@ -165,6 +165,12 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
return
if(!see_target())
LoseTarget()
for(var/grab in grabbed_by)
var/obj/item/grab/G = grab
if(G.state >= GRAB_NECK)
visible_message(SPAN_WARNING("\The [G.assailant] restrains \the [src] from attacking!"))
resist_grab()
return
if(isliving(target_mob))
var/mob/living/L = target_mob
L.attack_generic(src, rand(melee_damage_lower, melee_damage_upper), attacktext)
@@ -177,7 +183,7 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
var/obj/machinery/porta_turret/T = target_mob
src.do_attack_animation(T)
T.take_damage(max(melee_damage_lower, melee_damage_upper) / 2)
visible_message("<span class='danger'>\The [src] [attacktext] \the [T]!</span>")
visible_message(SPAN_DANGER("\The [src] [attacktext] \the [T]!"))
return T
/mob/living/simple_animal/hostile/proc/LoseTarget()
@@ -227,7 +233,7 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
// This code checks if we are not going to hit our target
if(smart && !check_fire(target_mob))
return
visible_message("<span class='warning'> <b>[src]</b> fires at [target]!</span>")
visible_message(SPAN_DANGER("[capitalize_first_letters(src.name)] fires at \the [target]!"))
if(rapid)
var/datum/callback/shoot_cb = CALLBACK(src, .proc/shoot_wrapper, target, loc, src)
@@ -283,13 +289,13 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
if(prob(break_stuff_probability) || bypass_prob) //bypass_prob is used to make mob destroy things in the way to our target
for(var/dir in cardinal) // North, South, East, West
var/obj/effect/energy_field/e = locate(/obj/effect/energy_field, get_step(src, dir))
if(e)
e.Stress(rand(1,2))
visible_message("<span class='danger'>\The [src] [attacktext] \the [e]!</span>")
if(e && !e.invisibility && e.density)
e.Stress(rand(0.5, 1.5))
visible_message(SPAN_DANGER("[capitalize_first_letters(src.name)] [attacktext] \the [e]!"))
src.do_attack_animation(e)
target_mob = e
stance = HOSTILE_STANCE_ATTACKING
return 1
return TRUE
for(var/obj/structure/window/obstacle in get_step(src, dir))
if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
obstacle.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
@@ -23,6 +23,7 @@
harm_intent_damage = 0
melee_damage_lower = 30
melee_damage_upper = 30
resist_mod = 15
mob_size = 25
environment_smash = 2
attacktext = "punished"
@@ -20,6 +20,7 @@
harm_intent_damage = 0
melee_damage_lower = 30
melee_damage_upper = 30
resist_mod = 10
mob_size = 30
environment_smash = 2
attacktext = "chomped"
@@ -20,6 +20,7 @@
health = 700
melee_damage_lower = 25
melee_damage_upper = 30
resist_mod = 15 // LOL good luck pal
heat_damage_per_tick = 20
cold_damage_per_tick = 20
faction = "spiders"
@@ -66,6 +66,7 @@
var/friendly = "nuzzles"
var/environment_smash = 0
var/resistance = 0 // Damage reduction
var/resist_mod = 1 // a multiplier for the chance the animal has to break out
var/wizard_master
@@ -378,11 +379,11 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
if(I_HELP)
if (health > 0)
M.visible_message("<span class='notice'>[M] [response_help] \the [src].</span>")
M.visible_message("<b>\The [M]</b> [response_help] \the [src].")
poke()
if(I_DISARM)
M.visible_message("<span class='notice'>[M] [response_disarm] \the [src].</span>")
M.visible_message("<b>\The [M]</b> [response_disarm] \the [src]")
M.do_attack_animation(src)
poke(1)
//TODO: Push the mob away or something
@@ -404,7 +405,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
G.affecting = src
LAssailant = WEAKREF(M)
M.visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
M.visible_message(SPAN_WARNING("\The [M] has grabbed \the [src] passively!"))
M.do_attack_animation(src)
poke(1)
@@ -415,7 +416,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
/mob/living/simple_animal/proc/unarmed_harm_attack(var/mob/living/carbon/human/user)
apply_damage(harm_intent_damage, BRUTE, used_weapon = "Attack by [user.name]")
user.visible_message(SPAN_WARNING("[user] [response_harm] \the [src]!"))
user.visible_message(SPAN_WARNING("<b>\The [user]</b> [response_harm] \the [src]!"), SPAN_WARNING("You [response_harm] \the [src]!"))
user.do_attack_animation(src)
poke(TRUE)
@@ -427,13 +428,13 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
var/obj/item/reagent_containers/glass/G = O
if(stat == CONSCIOUS && istype(G) && G.is_open_container())
if(udder.total_volume <= 0)
to_chat(user, "<span class='warning'>The udder is dry.</span>")
to_chat(user, SPAN_WARNING("The udder is dry."))
return
if(G.reagents.total_volume >= G.volume)
to_chat(user, "<span class='warning'>The [O] is full.</span>")
to_chat(user, SPAN_WARNING("The [O] is full."))
return
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
udder.trans_type_to(G, milk_type , rand(5,10))
user.visible_message("<b>\The [user]</b> milks \the [src] using \the [O].")
udder.trans_type_to(G, milk_type, rand(5, 10))
return
if(istype(O, /obj/item/reagent_containers) || istype(O, /obj/item/stack/medical) || istype(O,/obj/item/gripper/))
@@ -453,14 +454,14 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(istype(O, brush) && canbrush) //Brushing animals
visible_message(SPAN_NOTICE("[user] gently brushes [src] with \the [O]."))
visible_message("<b>\The [user]</b> gently brushes \the [src] with \the [O].")
if(prob(15) && !istype(src, /mob/living/simple_animal/hostile)) //Aggressive animals don't purr before biting your face off.
visible_message(SPAN_NOTICE("[src] [speak_emote.len ? pick(speak_emote) : "rumbles"].")) //purring
visible_message("<b>[capitalize_first_letters(src.name)]</b> [speak_emote.len ? pick(speak_emote) : "rumbles"].") //purring
return
if(!O.force)
visible_message("<span class='notice'>[user] gently taps [src] with \the [O].</span>")
visible_message("<b>\The [user]</b> gently taps \the [src] with \the [O].")
poke()
return 0
return FALSE
if(O.force > resistance)
var/damage = O.force
@@ -473,10 +474,10 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
apply_damage(damage, O.damtype, used_weapon = "[O.name]")
poke(1)
else
to_chat(usr, "<span class='danger'>This weapon is ineffective, it does no damage.</span>")
to_chat(user, SPAN_WARNING("This weapon is ineffective, it does no damage."))
poke()
visible_message("<span class='danger'>\The [src] has been attacked with the [O] by [user].</span>")
visible_message(SPAN_DANGER("\The [src] has been attacked with \the [O] by \the [user]."))
user.do_attack_animation(src)
@@ -622,11 +623,11 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
new path(get_turf(src))
if(issmall(src))
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
user.visible_message("<b>\The [user]</b> chops up \the [src]!")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
qdel(src)
else
user.visible_message("<span class='danger'>[user] butchers \the [src] messily!</span>")
user.visible_message("<b>\The [user]</b> butchers \the [src] messily!")
gib()
//For picking up small animals
@@ -695,7 +696,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
apply_damage(shock_damage, BURN)
playsound(loc, "sparks", 50, 1, -1)
spark(loc, 5, alldirs)
visible_message("<span class='warning'>[src] was shocked by [source]!</span>", "<span class='danger'>You are shocked by [source]!</span>", "<span class='notice'>You hear an electrical crack.</span>")
visible_message(SPAN_WARNING("\The [src] was shocked by \the [source]!"), SPAN_WARNING("You are shocked by \the [source]!"), SPAN_WARNING("You hear an electrical crack!"))
/mob/living/simple_animal/can_fall()
@@ -754,4 +755,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
SSghostroles.remove_spawn_atom("wizard_familiar", src)
if(wizard_master)
add_spell(new /spell/contract/return_master(wizard_master), "const_spell_ready")
to_chat(src, "<B>You are [src], a familiar to [wizard_master]. He is your master and your friend. Aid him in his wizarding duties to the best of your ability.</B>")
to_chat(src, "<B>You are [src], a familiar to [wizard_master]. He is your master and your friend. Aid him in his wizarding duties to the best of your ability.</B>")
/mob/living/simple_animal/get_resist_power()
return resist_mod
+3
View File
@@ -169,6 +169,9 @@
if(do_mob(assailant, affecting, 150))
A.visible_message(SPAN_WARNING("[A] falls unconscious..."), FONT_LARGE(SPAN_DANGER("The world goes dark as you fall unconscious...")))
A.Paralyse(20)
else if(istype(affecting, /mob/living/simple_animal))
if(affecting.stat != DEAD)
affecting.health -= 1
adjust_position()
+4 -4
View File
@@ -376,10 +376,10 @@
!lying && thrust.allow_thrust(0.01, src))
return FALSE
for(var/mob/living/carbon/human/H in range(1, src)) // can't fall if someone's holding you
for(var/obj/item/grab/G in list(H.l_hand, H.r_hand))
if(G.state >= GRAB_AGGRESSIVE && G.affecting == src)
return FALSE
for(var/grab in grabbed_by)
var/obj/item/grab/G = grab
if(G.state >= GRAB_AGGRESSIVE)
return FALSE
return ..()
/mob/living/carbon/human/bst/can_fall()