Skip to content

Commit

Permalink
Merge pull request Blackstone-SS13#66 from JTGSZ/skeleton-fix
Browse files Browse the repository at this point in the history
Fixes for missing skeleton sprites, fixes for ambush mobs not getting clothing, uncomments zombie stat change, makes zombie more streamlined
  • Loading branch information
emoats18 authored Apr 14, 2024
2 parents 05f81fa + d2771d6 commit 5e6a660
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 38 deletions.
22 changes: 13 additions & 9 deletions code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,19 @@

if(!nodmg)
playsound(src, "smallslash", 100, TRUE, -1)
if(user.mind && mind)
if(user.mind.has_antag_datum(/datum/antagonist/werewolf))
if(!src.mind.has_antag_datum(/datum/antagonist/werewolf))
if(prob(10))
addtimer(CALLBACK(src, .mob/living/carbon/human/proc/werewolf_infect), 3 MINUTES)
if(user.mind.has_antag_datum(/datum/antagonist/zombie))
if(!src.mind.has_antag_datum(/datum/antagonist/zombie))
if(prob(23))
addtimer(CALLBACK(src, .mob/living/carbon/human/proc/zombie_infect), 3 MINUTES)
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
if(user.mind && mind)
if(user.mind.has_antag_datum(/datum/antagonist/werewolf))
if(!src.mind.has_antag_datum(/datum/antagonist/werewolf))
if(prob(10))
H.werewolf_infect()
//addtimer(CALLBACK(src, .mob/living/carbon/human/proc/werewolf_infect), 3 MINUTES)
if(user.mind.has_antag_datum(/datum/antagonist/zombie))
if(!src.mind.has_antag_datum(/datum/antagonist/zombie))
if(prob(25)) // Delay is handled in zombie_infect anyways
H.zombie_infect()
//addtimer(CALLBACK(src, .mob/living/carbon/human/proc/zombie_infect), 3 MINUTES)

var/obj/item/grabbing/bite/B = new()
user.equip_to_slot_or_del(B, SLOT_MOUTH)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/rotting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
if(!(C.mob_biotypes & (MOB_ORGANIC|MOB_UNDEAD)))
qdel(src)
return
if(amount > 5 MINUTES)
if(amount > 2 MINUTES)
if(is_zombie)
var/datum/antagonist/zombie/Z = C.mind.has_antag_datum(/datum/antagonist/zombie)
if(Z)
Expand Down
31 changes: 20 additions & 11 deletions code/modules/antagonists/roguetown/villain/zombie.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
H.base_intents = list(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, /datum/intent/unarmed/claw)
H.update_a_intents()
H.setToxLoss(0, 0)
H.aggressive=1
H.aggressive = 1
H.mode = AI_IDLE
if(H.mind)
H.mind.RemoveAllSpells()
Expand Down Expand Up @@ -83,7 +83,7 @@
for(var/X in H.bodyparts)
var/obj/item/bodypart/BP = X
BP.update_disabled()
// H.STASTR = rand(12,18)
H.STASTR = rand(12,18)
H.STASPD = rand(5,7)
H.STAINT = 1

Expand All @@ -103,7 +103,9 @@
H.emote("idle")
next_idle_sound = world.time + rand(5 SECONDS, 10 SECONDS)

/datum/antagonist/zombie/proc/wake_zombie()
//Infected wake param is just a transition from living to zombie, via zombie_infect()
//Previously you just died without warning in 3 minutes, now you just become an antag
/datum/antagonist/zombie/proc/wake_zombie(infected_wake = FALSE)
testing("WAKEZOMBIE")
if(owner.current)
var/mob/living/carbon/human/H = owner.current
Expand All @@ -113,14 +115,16 @@
if(!B)
qdel(src)
return
if(H.stat != DEAD)
if(H.stat != DEAD && !infected_wake)
qdel(src)
return
if(istype(H.loc, /obj/structure/closet/dirthole))
qdel(src)
return
GLOB.dead_mob_list -= H
GLOB.alive_mob_list |= H
if(!infected_wake) // they going from living to zombie living
GLOB.dead_mob_list -= H
GLOB.alive_mob_list |= H

H.stat = null //the mob starts unconscious,
H.blood_volume = BLOOD_VOLUME_MAXIMUM
H.updatehealth() //then we check if the mob should wake up.
Expand Down Expand Up @@ -169,9 +173,10 @@
return
to_chat(src, "<span class='warning'>[closest_dist], [dir2text(the_dir)]</span>")


//This occurs when one zombie infects a living human, going into instadeath from here is kind of shit and confusing
//We instead just transform at the end
/mob/living/carbon/human/proc/zombie_infect()
if(prob(80))
return
if(!mind)
return
if(mind.has_antag_datum(/datum/antagonist/vampirelord))
Expand All @@ -183,10 +188,14 @@
var/datum/antagonist/zombie/new_antag = new /datum/antagonist/zombie()
mind.add_antag_datum(new_antag)
if(stat != DEAD)
to_chat(src, "<span class='danger'>I feel horrible...</span>")
to_chat(src, "<span class='danger'>I feel horrible... REALLY horrible after that...</span>")
if(getToxLoss() >= 75 && blood_volume)
mob_timers["puke"] = world.time
vomit(1, blood = TRUE)
sleep(3 MINUTES)
sleep(1 MINUTES) //you get a minute
flash_fullscreen("redflash3")
death()
to_chat(src, "<span class='danger'>It hurts... Is this really the end for me...</span>")
emote("scream") // heres your warning to others bro
Knockdown(1)
new_antag.wake_zombie(TRUE)
//death()
1 change: 0 additions & 1 deletion code/modules/mob/living/carbon/human/npc/_npc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
var/flee_in_pain = FALSE
var/stand_attempts = 0

var/static_npc = TRUE
var/returning_home = FALSE

/mob/living/carbon/human/proc/IsStandingStill()
Expand Down
10 changes: 6 additions & 4 deletions code/modules/mob/living/carbon/human/npc/bum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ GLOBAL_LIST_INIT(bum_aggro, world.file2list("strings/rt/bumaggrolines.txt"))
dodgetime = 30
flee_in_pain = TRUE
possible_rmb_intents = list()
static_npc = TRUE

wander = FALSE

/mob/living/carbon/human/species/human/northern/bum/ambush
aggressive=1
static_npc = FALSE

wander = TRUE

/mob/living/carbon/human/species/human/northern/bum/retaliate(mob/living/L)
Expand All @@ -35,7 +35,9 @@ GLOBAL_LIST_INIT(bum_aggro, world.file2list("strings/rt/bumaggrolines.txt"))
/mob/living/carbon/human/species/human/northern/bum/Initialize()
. = ..()
set_species(/datum/species/human/northern)
addtimer(CALLBACK(src, .proc/after_creation), 10)
spawn(10)
after_creation()
//addtimer(CALLBACK(src, .proc/after_creation), 10)

/mob/living/carbon/human/species/human/northern/bum/after_creation()
..()
Expand Down Expand Up @@ -63,4 +65,4 @@ GLOBAL_LIST_INIT(bum_aggro, world.file2list("strings/rt/bumaggrolines.txt"))
if(prob(3))
say(pick(GLOB.bum_quotes))
if(prob(3))
emote(pick("laugh","burp","yawn","grumble","mumble","blink_r","clap"))
emote(pick("laugh","burp","yawn","grumble","mumble","blink_r","clap"))
12 changes: 8 additions & 4 deletions code/modules/mob/living/carbon/human/npc/goblin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
mode = AI_IDLE
dodgetime = 30 //they can dodge easily, but have a cooldown on it
flee_in_pain = TRUE
static_npc = TRUE

wander = FALSE

/mob/living/carbon/human/species/goblin/npc/ambush
static_npc = FALSE

wander = TRUE

/mob/living/carbon/human/species/goblin/hell
Expand Down Expand Up @@ -182,7 +182,9 @@

/mob/living/carbon/human/species/goblin/Initialize()
. = ..()
addtimer(CALLBACK(src, .proc/after_creation), 10)
spawn(10)
after_creation()
//addtimer(CALLBACK(src, .proc/after_creation), 10)

/mob/living/carbon/human/species/goblin/handle_combat()
if(mode == AI_HUNT)
Expand Down Expand Up @@ -398,7 +400,9 @@
return
spawning = TRUE
update_icon()
addtimer(CALLBACK(src, .proc/creategob), 4 SECONDS)
spawn(2 SECONDS)
creategob()
//addtimer(CALLBACK(src, .proc/creategob), 4 SECONDS)

/obj/structure/gob_portal/Destroy()
soundloop.stop()
Expand Down
11 changes: 7 additions & 4 deletions code/modules/mob/living/carbon/human/npc/skeleton.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/mob/living/carbon/human/species/skeleton
name = "skeleton"

race = /datum/species/human/northern
gender = MALE
bodyparts = list(/obj/item/bodypart/chest, /obj/item/bodypart/head, /obj/item/bodypart/l_arm,
Expand All @@ -11,18 +12,20 @@
possible_rmb_intents = list()

/mob/living/carbon/human/species/skeleton/npc
aggressive=1
aggressive = 1
mode = AI_IDLE
static_npc = TRUE
wander = FALSE

/mob/living/carbon/human/species/skeleton/npc/ambush
static_npc = FALSE

wander = TRUE

/mob/living/carbon/human/species/skeleton/Initialize()
. = ..()
cut_overlays()
spawn(10)
after_creation()

addtimer(CALLBACK(src, .proc/after_creation), 10)

/mob/living/carbon/human/species/skeleton/after_creation()
Expand Down Expand Up @@ -102,4 +105,4 @@
if(prob(50))
r_hand = /obj/item/rogueweapon/sword
else
r_hand = /obj/item/rogueweapon/stoneaxe/woodcut
r_hand = /obj/item/rogueweapon/stoneaxe/woodcut
12 changes: 8 additions & 4 deletions code/modules/mob/living/grabbing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,15 @@
limb_grabbed.attacked_by(BCLASS_BITE, damage, user, sublimb_grabbed)
if(user.mind)
if(user.mind.has_antag_datum(/datum/antagonist/werewolf))
if(prob(10))
addtimer(CALLBACK(C, .mob/living/carbon/human/proc/werewolf_infect), 3 MINUTES)
var/mob/living/carbon/human/H = C
if(prob(25) && H)
H.werewolf_infect()
//addtimer(CALLBACK(C, .mob/living/carbon/human/proc/werewolf_infect), 3 MINUTES)
if(user.mind.has_antag_datum(/datum/antagonist/zombie))
if(prob(23))
addtimer(CALLBACK(C, .mob/living/carbon/human/proc/zombie_infect), 3 MINUTES)
var/mob/living/carbon/human/H = C
if(prob(25)) //Delay is handled in zombie infect anyways
H.zombie_infect()
//addtimer(CALLBACK(C, .mob/living/carbon/human/proc/zombie_infect), 3 MINUTES)
if(C.stat)
if(istype(limb_grabbed, /obj/item/bodypart/head))
var/obj/item/bodypart/head/HE = limb_grabbed
Expand Down

0 comments on commit 5e6a660

Please sign in to comment.