Fixed up weird sound-playing by simple animals, changed all simple animal attack strings to past tense so they gel with other harm intent actions. Readded simple_animal eating food, tested everything.

This commit is contained in:
Zuhayr
2014-11-13 21:41:02 +10:30
parent 82090d2de2
commit 31b6cc19ad
42 changed files with 100 additions and 78 deletions

View File

@@ -68,7 +68,7 @@
harm_intent_damage = 8
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "slashes"
attacktext = "slashed"
attack_sound = 'sound/weapons/bite.ogg'
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
@@ -126,7 +126,7 @@
harm_intent_damage = 2
melee_damage_lower = 3
melee_damage_upper = 10
attacktext = "bites"
attacktext = "bitten"
attack_sound = 'sound/weapons/bite.ogg'
layer = 3.1 //so they can stay hidde under the /obj/structure/bush

View File

@@ -1,6 +1,6 @@
// Generic damage proc (slimes and monkeys).
/atom/proc/attack_generic(mob/user as mob)
return
return 0
/*
Humans:
@@ -175,11 +175,9 @@
return
if(melee_damage_upper == 0 && istype(A,/mob/living))
emote("[friendly] [src]")
custom_emote(1,"[friendly] [src]!")
return
if(loc && attack_sound)
playsound(loc, attack_sound, 50, 1, 1)
var/damage = rand(melee_damage_lower, melee_damage_upper)
A.attack_generic(src,damage,attacktext,wall_smash)
if(A.attack_generic(src,damage,attacktext,wall_smash) && loc && attack_sound)
playsound(loc, attack_sound, 50, 1, 1)

View File

@@ -34,7 +34,7 @@
maxHealth = 20
melee_damage_lower = 4
melee_damage_upper = 8
attacktext = "hits"
attacktext = "hit"
attack_sound = 'sound/weapons/genhit1.ogg'
var/obj/effect/blob/factory/factory = null
faction = "blob"

View File

@@ -340,15 +340,16 @@
/obj/machinery/turret/attack_generic(var/mob/user, var/damage, var/attack_message)
if(!damage)
return
return 0
if(stat & BROKEN)
user << "That object is useless to you."
return
return 0
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
src.health -= damage
if (src.health <= 0)
src.die()
return 1
/obj/structure/turret/gun_turret
name = "Gun Turret"

View File

@@ -1706,7 +1706,7 @@
/obj/mecha/attack_generic(var/mob/user, var/damage, var/attack_message)
if(!damage)
return
return 0
src.log_message("Attack by an animal. Attacker - [user].",1)
@@ -1721,7 +1721,7 @@
src.occupant_message("\blue The [user]'s attack is stopped by the armor.")
visible_message("\blue The [user] rebounds off [src.name]'s armor!")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
return
return 1
//////////////////////////////////////////

View File

@@ -170,6 +170,7 @@
/obj/structure/attack_generic(var/mob/user, var/damage, var/attack_verb, var/wallbreaker)
if(!breakable || !damage || !wallbreaker)
return
return 0
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
destroy()
spawn(1) destroy()
return 1

View File

@@ -304,4 +304,5 @@
return
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
dump_contents()
del(src)
spawn(1) del(src)
return 1

View File

@@ -8,9 +8,10 @@
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
if(!damage || !wallbreaker)
return
return 0
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
dismantle()
spawn(1) dismantle()
return 1
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
if(istype(Proj, /obj/item/projectile/beam))

View File

@@ -192,4 +192,5 @@
/obj/structure/grille/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
health -= damage
healthcheck()
spawn(1) healthcheck()
return 1

View File

@@ -120,9 +120,10 @@
health -= damage
if(health <= 0)
user.visible_message("<span class='danger'>[user] [attack_verb] open the [src]!</span>")
deflate(1)
spawn(1) deflate(1)
else
user.visible_message("<span class='danger'>[user] [attack_verb] at [src]!</span>")
return 1
/obj/item/inflatable/door/
name = "inflatable door"

View File

@@ -93,10 +93,11 @@
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
return 0
if(damage)
user.visible_message("<span class='danger'>[user] smashes [src]!")
shatter()
else
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
return 1

View File

@@ -155,6 +155,7 @@
return
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
take_damage(damage)
return 1
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(W)) return//I really wish I did not need this

View File

@@ -259,11 +259,11 @@
if(rotting || prob(40))
user << "You smash through the wall!"
dismantle_wall(1)
spawn(1) dismantle_wall(1)
else
user << "You smash against the wall."
take_damage(rand(25,75))
return
return 1
/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)

View File

@@ -218,3 +218,4 @@
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
updatehealth()
return 1

View File

@@ -82,8 +82,8 @@
spawn(45)
Atkcool = 0
//if(Target.Adjacent(src))
//Target.attack_slime(src)
if(Target.Adjacent(src))
UnarmedAttack(Target)
return
if(!Target.lying && prob(80))
@@ -93,8 +93,8 @@
spawn(45)
Atkcool = 0
//if(Target.Adjacent(src))
//Target.attack_slime(src)
if(Target.Adjacent(src))
UnarmedAttack(Target)
else
if(!Atkcool && Target.Adjacent(src))

View File

@@ -119,7 +119,7 @@
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
if(nutrition <= get_hunger_nutrition() && !Atkcool)
if (is_adult || prob(5))
//AM.attack_slime(src)
UnarmedAttack(AM)
spawn()
Atkcool = 1
sleep(45)

View File

@@ -189,4 +189,5 @@
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
updatehealth()
spawn(1) updatehealth()
return 1

View File

@@ -16,7 +16,7 @@
a_intent = "harm"
stop_automated_movement = 1
status_flags = CANPUSH
attacktext = "nips"
attacktext = "nipped"
friendly = "prods"
wander = 0
pass_flags = PASSTABLE

View File

@@ -120,7 +120,7 @@
harm_intent_damage = 0
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "smashes their armoured gauntlet into"
attacktext = "smashed their armoured gauntlet into"
speed = 3
wall_smash = 1
attack_sound = 'sound/weapons/punch3.ogg'
@@ -195,7 +195,7 @@
health = 75
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "slashes"
attacktext = "slashed"
speed = -1
see_in_dark = 7
attack_sound = 'sound/weapons/bladeslice.ogg'
@@ -220,7 +220,7 @@
harm_intent_damage = 5
melee_damage_lower = 5
melee_damage_upper = 5
attacktext = "rams"
attacktext = "rammed"
speed = 0
wall_smash = 1
attack_sound = 'sound/weapons/punch2.ogg'
@@ -247,7 +247,7 @@
harm_intent_damage = 0
melee_damage_lower = 50
melee_damage_upper = 50
attacktext = "brutally crushes"
attacktext = "brutally crushed"
speed = 5
wall_smash = 1
attack_sound = 'sound/weapons/punch4.ogg'

View File

@@ -307,11 +307,10 @@
else
dir = SOUTH
//if(isturf(movement_target.loc) )
//movement_target.attack_animal(src)
//else if(ishuman(movement_target.loc) )
//if(prob(20))
//emote("stares at the [movement_target] that [movement_target.loc] has with a sad puppy-face")
if(isturf(movement_target.loc) )
UnarmedAttack(movement_target)
else if(ishuman(movement_target.loc) && prob(20))
custom_emote(1,"stares at the [movement_target] that [movement_target.loc] has with sad puppy eyes.")
if(prob(1))
emote(pick("dances around","chases its tail"))

View File

@@ -18,7 +18,7 @@
response_disarm = "gently pushes aside the"
response_harm = "kicks the"
faction = "goat"
attacktext = "kicks"
attacktext = "kicked"
health = 40
melee_damage_lower = 1
melee_damage_upper = 5
@@ -102,7 +102,7 @@
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "kicks the"
attacktext = "kicks"
attacktext = "kicked"
health = 50
var/datum/reagents/udder = null
@@ -163,7 +163,7 @@
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "kicks the"
attacktext = "kicks"
attacktext = "kicked"
health = 1
var/amount_grown = 0
pass_flags = PASSTABLE | PASSGRILLE
@@ -204,7 +204,7 @@ var/global/chicken_count = 0
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "kicks the"
attacktext = "kicks"
attacktext = "kicked"
health = 10
var/eggsleft = 0
var/body_color

View File

@@ -9,8 +9,7 @@
speak_emote = list("hisses")
health = 5
maxHealth = 5
attacktext = "bites"
attacktext = "bites"
attacktext = "bitten"
melee_damage_lower = 1
melee_damage_upper = 2
response_help = "pets"

View File

@@ -26,8 +26,7 @@
health = 10
maxHealth = 10
attacktext = "shocks"
attacktext = "shocks"
attacktext = "shocked"
melee_damage_lower = 1
melee_damage_upper = 3

View File

@@ -16,7 +16,7 @@
harm_intent_damage = 5
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "slashes"
attacktext = "slashed"
a_intent = "harm"
attack_sound = 'sound/weapons/bladeslice.ogg'
min_oxy = 0

View File

@@ -20,7 +20,7 @@
harm_intent_damage = 8
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "bites"
attacktext = "bitten"
attack_sound = 'sound/weapons/bite.ogg'
//Space carp aren't affected by atmos.

View File

@@ -10,7 +10,7 @@
maxHealth = 80
melee_damage_lower = 25
melee_damage_upper = 50
attacktext = "chomps"
attacktext = "chomped"
attack_sound = 'sound/weapons/bite.ogg'
faction = "creature"
speed = 4

View File

@@ -16,7 +16,7 @@
harm_intent_damage = 10
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "grips"
attacktext = "gripped"
attack_sound = 'sound/hallucinations/growl1.ogg'
min_oxy = 0

View File

@@ -13,7 +13,7 @@
maxHealth = 15
melee_damage_lower = 2
melee_damage_upper = 3
attacktext = "claws"
attacktext = "clawed"
projectilesound = 'sound/weapons/Gunshot.ogg'
projectiletype = /obj/item/projectile/hivebotbullet
faction = "hivebot"

View File

@@ -20,7 +20,7 @@
harm_intent_damage = 5
melee_damage_lower = 8
melee_damage_upper = 12
attacktext = "attacks"
attacktext = "attacked"
attack_sound = 'sound/weapons/bite.ogg'
min_oxy = 0
@@ -56,7 +56,7 @@
// Aggro when you try to open them. Will also pickup loot when spawns and drop it when dies.
/mob/living/simple_animal/hostile/mimic/crate
attacktext = "bites"
attacktext = "bitten"
stop_automated_movement = 1
wander = 0

View File

@@ -17,7 +17,7 @@
harm_intent_damage = 5
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "slashes"
attacktext = "slashed"
attack_sound = 'sound/weapons/bladeslice.ogg'
min_oxy = 5

View File

@@ -21,7 +21,7 @@
harm_intent_damage = 8
melee_damage_lower = 10
melee_damage_upper = 10
attacktext = "attacks"
attacktext = "attacked"
attack_sound = 'sound/items/bikehorn.ogg'
min_oxy = 5

View File

@@ -17,7 +17,7 @@
harm_intent_damage = 5
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "punches"
attacktext = "punched"
a_intent = "harm"
var/corpse = /obj/effect/landmark/mobcorpse/russian
var/weapon1 = /obj/item/weapon/kitchenknife

View File

@@ -17,7 +17,7 @@
harm_intent_damage = 5
melee_damage_lower = 10
melee_damage_upper = 10
attacktext = "punches"
attacktext = "punched"
a_intent = "harm"
var/corpse = /obj/effect/landmark/mobcorpse/syndicatesoldier
var/weapon1
@@ -55,7 +55,7 @@
icon_living = "syndicatemelee"
weapon1 = /obj/item/weapon/melee/energy/sword/red
weapon2 = /obj/item/weapon/shield/energy
attacktext = "slashes"
attacktext = "slashed"
status_flags = 0
/mob/living/simple_animal/hostile/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -144,7 +144,7 @@
maxHealth = 15
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "cuts"
attacktext = "cut"
attack_sound = 'sound/weapons/bladeslice.ogg'
faction = "syndicate"
min_oxy = 0

View File

@@ -21,7 +21,7 @@
harm_intent_damage = 5
melee_damage_lower = 8
melee_damage_upper = 12
attacktext = "bites"
attacktext = "bitten"
attack_sound = 'sound/weapons/bite.ogg'
//Space carp aren't affected by atmos.

View File

@@ -739,12 +739,19 @@
speech_buffer.Add(message)
/mob/living/simple_animal/parrot/attack_generic(var/mob/user, var/damage, var/attack_message)
..()
if(client) return
var/success = ..()
if(client)
return success
if(parrot_state == PARROT_PERCH)
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
if(!damage)
return
if(!success)
return 0
parrot_interest = user
parrot_state = PARROT_SWOOP | PARROT_ATTACK //Attack other animals regardless
icon_state = "parrot_fly"
return success

View File

@@ -16,7 +16,7 @@
response_harm = "punches the"
melee_damage_lower = 5
melee_damage_upper = 15
attacktext = "drains the life from"
attacktext = "drained the life from"
minbodytemp = 0
maxbodytemp = 4000
min_oxy = 0

View File

@@ -49,7 +49,7 @@
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
var/melee_damage_lower = 0
var/melee_damage_upper = 0
var/attacktext = "attacks"
var/attacktext = "attacked"
var/attack_sound = null
var/friendly = "nuzzles"
var/wall_smash = 0

View File

@@ -57,7 +57,7 @@
melee_damage_lower = 10
melee_damage_upper = 15
attacktext = "bites"
attacktext = "bitten"
animate_movement = SLIDE_STEPS

View File

@@ -317,6 +317,7 @@
return
visible_message("<span class='danger'>[user] smashes the light!</span>")
broken()
return 1
// attempt to set the light's on/off status
// will not switch on if broken/burned/empty

View File

@@ -207,15 +207,23 @@
/// FOOD END
////////////////////////////////////////////////////////////////////////////////
/obj/item/weapon/reagent_containers/food/snacks/attack_generic(var/mob/living/user)
if(isanimal(user) || isalien(user))
if(bitecount == 0 || prob(50))
user.custom_emote(1,"nibbles away at the [src]")
bitecount++
if(reagents && user.reagents)
reagents.trans_to_ingest(user, bitesize)
spawn(5)
if(!src && !user.client)
user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]")
del(src)
On_Consume(user)
//////////////////////////////////////////////////
////////////////////////////////////////////Snacks

View File

@@ -12,7 +12,7 @@
speed = 2
melee_damage_lower = 5
melee_damage_upper = 15
attacktext = "mauls"
attacktext = "mauled"
cold_damage_per_tick = 0
speak_chance = 5
speak = list("Hruuugh!","Hrunnph")
@@ -33,7 +33,7 @@
speed = 1
melee_damage_lower = 1
melee_damage_upper = 8
attacktext = "gouges"
attacktext = "gouged"
cold_damage_per_tick = 0
speak_chance = 5
speak = list("Awrr?","Aowrl!","Worrl")
@@ -54,7 +54,7 @@
speed = 1
melee_damage_lower = 3
melee_damage_upper = 12
attacktext = "gouges"
attacktext = "gouged"
cold_damage_per_tick = 0
speak_chance = 5
speak = list("Shuhn","Shrunnph?","Shunpf")

View File

@@ -356,4 +356,5 @@
src.health -= damage
if(prob(10))
new /obj/effect/decal/cleanable/blood/oil(src.loc)
healthcheck()
spawn(1) healthcheck()
return 1