mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
Now working And without promoting myself as Game Master :P Signed-off-by: comma <krauchinsky@gmail.com>
This commit is contained in:
1155
baystation12.dme
1155
baystation12.dme
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,12 @@
|
|||||||
/obj/item/ashtray
|
/obj/item/ashtray
|
||||||
name = "ashtray"
|
|
||||||
desc = "Cheap plastic ashtray."
|
|
||||||
icon = 'ashtray.dmi'
|
icon = 'ashtray.dmi'
|
||||||
icon_state = "ashtray_bl"
|
var/
|
||||||
health = 15.0
|
max_butts = 0
|
||||||
g_amt = 20
|
empty_desc = ""
|
||||||
var/max_butts = 10
|
icon_empty = ""
|
||||||
var/empty_desc = "Cheap plastic ashtray."
|
icon_half = ""
|
||||||
var/icon_empty = "ashtray_bl"
|
icon_full = ""
|
||||||
var/icon_half = "ashtray_half_bl"
|
icon_broken = ""
|
||||||
var/icon_full = "ashtray_full_bl"
|
|
||||||
var/icon_broken = "ashtray_bork_bl"
|
|
||||||
|
|
||||||
/obj/item/ashtray/New()
|
/obj/item/ashtray/New()
|
||||||
..()
|
..()
|
||||||
@@ -85,6 +81,7 @@
|
|||||||
max_butts = 14
|
max_butts = 14
|
||||||
health = 24.0
|
health = 24.0
|
||||||
g_amt = 30
|
g_amt = 30
|
||||||
|
m_amt = 30
|
||||||
empty_desc = "Cheap plastic ashtray."
|
empty_desc = "Cheap plastic ashtray."
|
||||||
throwforce = 3.0
|
throwforce = 3.0
|
||||||
die()
|
die()
|
||||||
@@ -104,7 +101,7 @@
|
|||||||
icon_broken = "ashtray_bork_br"
|
icon_broken = "ashtray_bork_br"
|
||||||
max_butts = 10
|
max_butts = 10
|
||||||
health = 72.0
|
health = 72.0
|
||||||
m_amt = 50
|
m_amt = 80
|
||||||
empty_desc = "Massive bronze ashtray."
|
empty_desc = "Massive bronze ashtray."
|
||||||
throwforce = 10.0
|
throwforce = 10.0
|
||||||
|
|
||||||
|
|||||||
@@ -369,6 +369,7 @@ mob/proc/flash_weak_pain()
|
|||||||
M << "Aargh it burns!"
|
M << "Aargh it burns!"
|
||||||
M.updatehealth()
|
M.updatehealth()
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
|
M.react_to_attack(user)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1018,6 +1018,9 @@
|
|||||||
for(var/mob/O in viewers(4, user))
|
for(var/mob/O in viewers(4, user))
|
||||||
O.show_message("\red [user] takes a blood sample from [target].", 1)
|
O.show_message("\red [user] takes a blood sample from [target].", 1)
|
||||||
|
|
||||||
|
if(prob(2) && istype(T,/mob/living/carbon/monkey))
|
||||||
|
T:react_to_attack(user)
|
||||||
|
|
||||||
else //if not mob
|
else //if not mob
|
||||||
if(!target.reagents.total_volume)
|
if(!target.reagents.total_volume)
|
||||||
user << "\red [target] is empty."
|
user << "\red [target] is empty."
|
||||||
@@ -1059,6 +1062,9 @@
|
|||||||
for(var/mob/O in viewers(world.view, user))
|
for(var/mob/O in viewers(world.view, user))
|
||||||
O.show_message(text("\red [] injects [] with the syringe!", user, target), 1)
|
O.show_message(text("\red [] injects [] with the syringe!", user, target), 1)
|
||||||
src.reagents.reaction(target, INGEST)
|
src.reagents.reaction(target, INGEST)
|
||||||
|
if(prob(2) && istype(target,/mob/living/carbon/monkey))
|
||||||
|
var/mob/living/carbon/monkey/M = target
|
||||||
|
M.react_to_attack(user)
|
||||||
if(ismob(target) && target == user)
|
if(ismob(target) && target == user)
|
||||||
src.reagents.reaction(target, INGEST)
|
src.reagents.reaction(target, INGEST)
|
||||||
spawn(5)
|
spawn(5)
|
||||||
|
|||||||
@@ -88,11 +88,7 @@
|
|||||||
for(var/obj/item/weapon/grab/G in src)
|
for(var/obj/item/weapon/grab/G in src)
|
||||||
G.process()
|
G.process()
|
||||||
|
|
||||||
if(!client && !stat)
|
npc_act()
|
||||||
if(prob(33) && canmove && isturf(loc))
|
|
||||||
step(src, pick(cardinal))
|
|
||||||
if(prob(1))
|
|
||||||
emote(pick("scratch","jump","roll","tail"))
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey
|
/mob/living/carbon/monkey
|
||||||
proc
|
proc
|
||||||
|
|||||||
@@ -177,6 +177,7 @@
|
|||||||
for(var/datum/disease/D in M.viruses)
|
for(var/datum/disease/D in M.viruses)
|
||||||
if(istype(D, /datum/disease/jungle_fever))
|
if(istype(D, /datum/disease/jungle_fever))
|
||||||
contract_disease(D,1,0)
|
contract_disease(D,1,0)
|
||||||
|
react_to_attack(M)
|
||||||
else
|
else
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
|
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
|
||||||
@@ -239,11 +240,13 @@
|
|||||||
return
|
return
|
||||||
bruteloss += damage
|
bruteloss += damage
|
||||||
updatehealth()
|
updatehealth()
|
||||||
|
react_to_attack(M)
|
||||||
else
|
else
|
||||||
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
if ((O.client && !( O.blinded )))
|
if ((O.client && !( O.blinded )))
|
||||||
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
|
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
|
||||||
|
react_to_attack(M)
|
||||||
else
|
else
|
||||||
if (M.a_intent == "grab")
|
if (M.a_intent == "grab")
|
||||||
if (M == src)
|
if (M == src)
|
||||||
@@ -265,6 +268,8 @@
|
|||||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
|
||||||
|
|
||||||
|
if(prob(1)) react_to_attack(M)
|
||||||
else
|
else
|
||||||
if (!( paralysis ))
|
if (!( paralysis ))
|
||||||
if (prob(25))
|
if (prob(25))
|
||||||
@@ -273,12 +278,14 @@
|
|||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
if ((O.client && !( O.blinded )))
|
if ((O.client && !( O.blinded )))
|
||||||
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
|
O.show_message(text("\red <B>[] has pushed down [name]!</B>", M), 1)
|
||||||
|
react_to_attack(M)
|
||||||
else
|
else
|
||||||
drop_item()
|
drop_item()
|
||||||
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
if ((O.client && !( O.blinded )))
|
if ((O.client && !( O.blinded )))
|
||||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||||
|
react_to_attack(M)
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||||
@@ -313,6 +320,7 @@
|
|||||||
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
|
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
|
||||||
bruteloss += damage
|
bruteloss += damage
|
||||||
updatehealth()
|
updatehealth()
|
||||||
|
react_to_attack(M)
|
||||||
else
|
else
|
||||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
@@ -353,6 +361,7 @@
|
|||||||
if ((O.client && !( O.blinded )))
|
if ((O.client && !( O.blinded )))
|
||||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||||
bruteloss += damage
|
bruteloss += damage
|
||||||
|
react_to_attack(M)
|
||||||
updatehealth()
|
updatehealth()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -415,6 +424,7 @@
|
|||||||
|
|
||||||
|
|
||||||
updatehealth()
|
updatehealth()
|
||||||
|
react_to_attack(M)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -568,6 +578,15 @@
|
|||||||
M.UpdateFeed(src)
|
M.UpdateFeed(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/monkey/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
var/chealth = health
|
||||||
|
var/rval = ..()
|
||||||
|
if(chealth > health)
|
||||||
|
// we were damaged!
|
||||||
|
react_to_attack(user)
|
||||||
|
|
||||||
|
return rval
|
||||||
|
|
||||||
/mob/living/carbon/monkey/verb/removeinternal()
|
/mob/living/carbon/monkey/verb/removeinternal()
|
||||||
set name = "Remove Internals"
|
set name = "Remove Internals"
|
||||||
set category = "IC"
|
set category = "IC"
|
||||||
|
|||||||
99
code/modules/mob/living/carbon/monkey/npc.dm
Normal file
99
code/modules/mob/living/carbon/monkey/npc.dm
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
mob/living/carbon/monkey/var
|
||||||
|
mob/npc_target = null // the NPC this monkey is attacking
|
||||||
|
mob/npc_fleeing = null // the monkey is scared of this mob
|
||||||
|
mob/hiding_behind = null
|
||||||
|
hid_behind = 0
|
||||||
|
|
||||||
|
var/list/hostiles = list()
|
||||||
|
|
||||||
|
fleeing_duration = 0
|
||||||
|
|
||||||
|
mob/living/carbon/monkey/proc/npc_act()
|
||||||
|
if(!client && !stat)
|
||||||
|
if(npc_fleeing && canmove)
|
||||||
|
var/prevloc = loc
|
||||||
|
if(!hiding_behind)
|
||||||
|
for(var/mob/living/carbon/human/H in view(7, src))
|
||||||
|
if(!hostiles.Find(H))
|
||||||
|
hiding_behind = H
|
||||||
|
|
||||||
|
if(hiding_behind)
|
||||||
|
if(get_dist(src, hiding_behind) == 1)
|
||||||
|
if(!hid_behind)
|
||||||
|
emote("me", 1, "hides behind [hiding_behind]!")
|
||||||
|
hid_behind = 1
|
||||||
|
step_to(src, get_step(hiding_behind, get_dir(npc_fleeing, hiding_behind)))
|
||||||
|
else
|
||||||
|
if(!step_to(src, hiding_behind, 1))
|
||||||
|
hiding_behind = null
|
||||||
|
else
|
||||||
|
step_away(src, npc_fleeing, 7)
|
||||||
|
|
||||||
|
if(prob(7))
|
||||||
|
if(prob(50) && (npc_fleeing in view(8,src)))
|
||||||
|
switch(rand(1,3))
|
||||||
|
if(1)
|
||||||
|
emote("me", 1, "shows [npc_fleeing] its fangs!")
|
||||||
|
if(2)
|
||||||
|
emote("me", 2, "gnarls at [npc_fleeing].")
|
||||||
|
if(3)
|
||||||
|
emote("me", 2, "eyes [npc_fleeing] fearfully.")
|
||||||
|
else
|
||||||
|
switch(rand(1,3))
|
||||||
|
if(1)
|
||||||
|
emote("whimper")
|
||||||
|
if(2)
|
||||||
|
emote("me", 1, "trembles heavily.")
|
||||||
|
if(3)
|
||||||
|
emote("me", 2, "chimpers nervously.")
|
||||||
|
|
||||||
|
fleeing_duration--
|
||||||
|
if(fleeing_duration <= 0)
|
||||||
|
npc_fleeing = null
|
||||||
|
hiding_behind = null
|
||||||
|
hid_behind = 0
|
||||||
|
|
||||||
|
if(loc == prevloc) dir = get_dir(src, npc_fleeing)
|
||||||
|
else
|
||||||
|
if(prob(33) && canmove && isturf(loc))
|
||||||
|
step(src, pick(cardinal))
|
||||||
|
if(prob(1))
|
||||||
|
if(health < 70)
|
||||||
|
switch(rand(1,3))
|
||||||
|
if(1)
|
||||||
|
emote("me", 1, "cowers on the floor, writhing in pain.")
|
||||||
|
if(2)
|
||||||
|
emote("me", 1, "trembles visibly, it seems to be in pain.")
|
||||||
|
if(3)
|
||||||
|
emote("me", 1, "wraps its arms around its knees, breathing heavily.")
|
||||||
|
else
|
||||||
|
emote(pick("scratch","jump","roll","tail"))
|
||||||
|
|
||||||
|
mob/living/carbon/monkey/react_to_attack(mob/M)
|
||||||
|
if(npc_fleeing == M)
|
||||||
|
fleeing_duration += 30
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!hostiles.Find(M)) hostiles += M
|
||||||
|
|
||||||
|
spawn(5)
|
||||||
|
switch(rand(1,3))
|
||||||
|
if(1)
|
||||||
|
emote("me", 1, "flails about wildly!")
|
||||||
|
if(2)
|
||||||
|
emote("me", 2, "screams loudly at [M]!")
|
||||||
|
if(3)
|
||||||
|
emote("me", 2, "whimpers fearfully!")
|
||||||
|
|
||||||
|
npc_fleeing = M
|
||||||
|
fleeing_duration = 30
|
||||||
|
|
||||||
|
|
||||||
|
/*/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/slash = 0, var/used_weapon = null)
|
||||||
|
if(!client && !stat)
|
||||||
|
if(damage > 10)
|
||||||
|
if(prob(40) || health == 100)
|
||||||
|
emote("me", 2, pick("screams loudly!", "whimpers in pain!"))
|
||||||
|
else if(health == 100 || (damage > 0 && prob(10)))
|
||||||
|
emote("me", 1, pick("flails about wildly!", "cringes visibly!", "chimpers nervously."))
|
||||||
|
return ..()*/
|
||||||
@@ -73,3 +73,7 @@
|
|||||||
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
|
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
|
||||||
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
|
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/proc/react_to_attack(mob/M)
|
||||||
|
return
|
||||||
|
|||||||
@@ -19,4 +19,3 @@ spaceman96 - Game Admin
|
|||||||
strumpetplaya - Retired Admin
|
strumpetplaya - Retired Admin
|
||||||
tastyfish - Game Master
|
tastyfish - Game Master
|
||||||
uristqwerty - Game Master
|
uristqwerty - Game Master
|
||||||
chinsky - Game Master
|
|
||||||
Reference in New Issue
Block a user