mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-21 07:32:35 +00:00
TG: Simple mobs can now attack humans (and you are able to set the attack messages
and min/max damage of the attack with vars) Simple mobs who attempt to attack and have a max damage of 0 (which is the default) will emote a friendly gesture towards the target, the default being "nuzzles" though also editable via vars. Added the Shade simple mob (and some temporary sprites) which is the first simple mob capable of attacking. It was mostly for test purposes, but will probably end up becoming a feature of soul stones later on. Note: Simple animals still cannot interact with other simple animals, critters, mechs, cyborgs, aliens, monkeys etc etc, only humans at this point. r2808
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
response_disarm = "gently pushes aside the"
|
response_disarm = "gently pushes aside the"
|
||||||
response_harm = "stomps the"
|
response_harm = "stomps the"
|
||||||
stop_automated_movement = 1
|
stop_automated_movement = 1
|
||||||
|
friendly = "pinches"
|
||||||
|
|
||||||
/mob/living/simple_animal/crab/Life()
|
/mob/living/simple_animal/crab/Life()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
var/max_co2 = 5
|
var/max_co2 = 5
|
||||||
var/min_n2 = 0
|
var/min_n2 = 0
|
||||||
var/max_n2 = 0
|
var/max_n2 = 0
|
||||||
var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above.
|
var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above
|
||||||
|
|
||||||
|
|
||||||
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
|
//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_lower = 0
|
||||||
@@ -46,7 +47,6 @@
|
|||||||
var/attacktext = "attacks"
|
var/attacktext = "attacks"
|
||||||
var/attack_sound = null
|
var/attack_sound = null
|
||||||
var/friendly = "nuzzles" //If the mob does no damage with it's attack
|
var/friendly = "nuzzles" //If the mob does no damage with it's attack
|
||||||
var/wall_smash = 0 //if they can smash walls
|
|
||||||
|
|
||||||
/mob/living/simple_animal/New()
|
/mob/living/simple_animal/New()
|
||||||
..()
|
..()
|
||||||
@@ -197,14 +197,26 @@
|
|||||||
return "[emote], \"[text]\""
|
return "[emote], \"[text]\""
|
||||||
return "says, \"[text]\"";
|
return "says, \"[text]\"";
|
||||||
|
|
||||||
/mob/living/simple_animal/emote(var/act,var/m_type=1,var/message = null)
|
/mob/living/simple_animal/emote(var/act)
|
||||||
if(act == "me")
|
if(act)
|
||||||
for (var/mob/O in viewers(src, null))
|
|
||||||
O.show_message("<B>[src]</B> [message]")
|
|
||||||
else if(act)
|
|
||||||
for (var/mob/O in viewers(src, null))
|
for (var/mob/O in viewers(src, null))
|
||||||
O.show_message("<B>[src]</B> [act].")
|
O.show_message("<B>[src]</B> [act].")
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
|
||||||
|
if(M.melee_damage_upper == 0)
|
||||||
|
M.emote("[M.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||||
|
health -= damage
|
||||||
|
|
||||||
|
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(!Proj) return
|
||||||
|
src.health -= Proj.damage
|
||||||
|
return 0
|
||||||
|
|
||||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
|
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,6 @@
|
|||||||
/atom/proc/attack_metroid(mob/user as mob)
|
/atom/proc/attack_metroid(mob/user as mob)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/atom/proc/hand_h(mob/user as mob) //human (hand) - restrained
|
/atom/proc/hand_h(mob/user as mob) //human (hand) - restrained
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
46
code/modules/mob/simple_animal/shade.dm
Normal file
46
code/modules/mob/simple_animal/shade.dm
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/mob/living/simple_animal/shade
|
||||||
|
name = "Shade"
|
||||||
|
desc = "A bound spirit"
|
||||||
|
icon = 'mob.dmi'
|
||||||
|
icon_state = "shade"
|
||||||
|
icon_living = "shade"
|
||||||
|
icon_dead = "shade_dead"
|
||||||
|
max_health = 50
|
||||||
|
health = 50
|
||||||
|
speak_emote = list("hisses")
|
||||||
|
emote_hear = list("wails","screeches")
|
||||||
|
response_help = "puts their hand through"
|
||||||
|
response_disarm = "flails at"
|
||||||
|
response_harm = "punches the"
|
||||||
|
melee_damage_lower = 5
|
||||||
|
melee_damage_upper = 15
|
||||||
|
attacktext = "drains the life from"
|
||||||
|
minbodytemp = 0
|
||||||
|
maxbodytemp = 4000
|
||||||
|
min_oxy = 0
|
||||||
|
max_co2 = 0
|
||||||
|
max_tox = 0
|
||||||
|
|
||||||
|
/mob/living/simple_animal/shade/Life()
|
||||||
|
..()
|
||||||
|
if (stat == 2)
|
||||||
|
new /obj/item/weapon/ectoplasm (src.loc)
|
||||||
|
for(var/mob/M in viewers(src, null))
|
||||||
|
if ((M.client && !( M.blinded )))
|
||||||
|
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
|
||||||
|
del src
|
||||||
|
|
||||||
|
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||||
|
if(istype(O, /obj/item/device/soulstone))
|
||||||
|
O.transfer_soul("SHADE", src, user)
|
||||||
|
else
|
||||||
|
if(O.force)
|
||||||
|
health -= O.force
|
||||||
|
for(var/mob/M in viewers(src, null))
|
||||||
|
if ((M.client && !( M.blinded )))
|
||||||
|
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||||
|
else
|
||||||
|
usr << "\red This weapon is ineffective, it does no damage."
|
||||||
|
for(var/mob/M in viewers(src, null))
|
||||||
|
if ((M.client && !( M.blinded )))
|
||||||
|
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||||
Reference in New Issue
Block a user