mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-31 07:56:25 +01:00
Metroids and Events
+Full SR388 Metroid bestiary added. +Event weights rebalanced +Separated spiderlings from the infestation event. +Added metroid infestation as a major random station event. +Added boss fight as a major random station event. +Added a new alarm sound for the metroid and boss events. +Added ranged cooldown time and 'move and shoot' for the AI controlled xenomorphs.
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
#define LOC_ATMOS 0
|
||||
#define LOC_CHAPEL 1
|
||||
#define LOC_LIBRARY 2
|
||||
#define LOC_GARDEN 3
|
||||
#define LOC_MAINTENANCE 4
|
||||
#define LOC_CONSTR 5
|
||||
|
||||
#define BOSS_METROID 0
|
||||
#define BOSS_XENOMORPH 1
|
||||
#define BOSS_CARP 2
|
||||
#define BOSS_SPIDER 3
|
||||
#define BOSS_CRAB 4
|
||||
#define BOSS_DRAGON 5
|
||||
#define BOSS_PANTHER 6
|
||||
#define BOSS_MOTHER 7
|
||||
#define BOSS_CHUNGUS 8
|
||||
|
||||
/datum/event/boss
|
||||
announceWhen = 10
|
||||
endWhen = 11
|
||||
var/location
|
||||
var/locstring
|
||||
var/boss
|
||||
var/bossstring
|
||||
|
||||
/datum/event/boss/start()
|
||||
|
||||
location = rand(0,5)
|
||||
var/list/turf/simulated/floor/turfs = list()
|
||||
var/spawn_area_type
|
||||
switch(location)
|
||||
if(LOC_ATMOS)
|
||||
spawn_area_type = /area/engineering/atmos
|
||||
locstring = "atmospherics"
|
||||
if(LOC_CHAPEL)
|
||||
spawn_area_type = /area/chapel/main
|
||||
locstring = "the chapel"
|
||||
if(LOC_LIBRARY)
|
||||
spawn_area_type = /area/library
|
||||
locstring = "the library"
|
||||
if(LOC_GARDEN)
|
||||
spawn_area_type = /area/hydroponics/garden
|
||||
locstring = "the public garden"
|
||||
if(LOC_MAINTENANCE)
|
||||
spawn_area_type = /area/maintenance/locker
|
||||
locstring = "far northern maintenance tunnels"
|
||||
if(LOC_CONSTR)
|
||||
spawn_area_type = /area/construction
|
||||
locstring = "the construction area"
|
||||
|
||||
for(var/areapath in typesof(spawn_area_type))
|
||||
var/area/A = locate(areapath)
|
||||
for(var/turf/simulated/floor/F in A.contents)
|
||||
if(turf_clear(F))
|
||||
turfs += F
|
||||
|
||||
var/list/spawn_types = list()
|
||||
boss = rand(0,8)
|
||||
switch(boss)
|
||||
if(BOSS_METROID)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/metroid/combat/queen)
|
||||
bossstring = "metroid"
|
||||
if(BOSS_XENOMORPH)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/alien/queen/empress)
|
||||
bossstring = "xenomorph"
|
||||
if(BOSS_CARP)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/carp/large/huge)
|
||||
bossstring = "carp"
|
||||
if(BOSS_SPIDER)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/giant_spider/nurse/queen)
|
||||
bossstring = "spider"
|
||||
if(BOSS_CRAB)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/giant_crab)
|
||||
bossstring = "crab"
|
||||
if(BOSS_DRAGON)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/dragon)
|
||||
bossstring = "dragon"
|
||||
if(BOSS_PANTHER)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/panther)
|
||||
bossstring = "panther"
|
||||
if(BOSS_MOTHER)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/alien/queen/empress/mother)
|
||||
bossstring = "xenomorph mother"
|
||||
if(BOSS_CHUNGUS)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/chungus)
|
||||
bossstring = "chungus"
|
||||
|
||||
spawn(0)
|
||||
var/num = 1
|
||||
while(turfs.len > 0 && num > 0)
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
turfs.Remove(T)
|
||||
num--
|
||||
var/spawn_type = pick(spawn_types)
|
||||
new spawn_type(T)
|
||||
|
||||
|
||||
/datum/event/boss/announce()
|
||||
command_announcement.Announce("Bioscans indicate a giant enemy [bossstring] in [locstring]. Handle with extreme caution.", "Boss Fight", new_sound = 'sound/misc/alarm1.ogg')
|
||||
|
||||
#undef LOC_ATMOS
|
||||
#undef LOC_CHAPEL
|
||||
#undef LOC_LIBRARY
|
||||
#undef LOC_GARDEN
|
||||
#undef LOC_MAINTENANCE
|
||||
#undef LOC_CONSTR
|
||||
|
||||
#undef BOSS_METROID
|
||||
#undef BOSS_XENOMORPH
|
||||
#undef BOSS_CARP
|
||||
#undef BOSS_SPIDER
|
||||
#undef BOSS_CRAB
|
||||
#undef BOSS_DRAGON
|
||||
#undef BOSS_PANTHER
|
||||
#undef BOSS_MOTHER
|
||||
#undef BOSS_CHUNGUS
|
||||
@@ -44,8 +44,10 @@
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Shipping Error", /datum/event/shipping_error , 30, list(ASSIGNMENT_ANY = 2), 0),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Supply Demand", /datum/event/supply_demand, -15, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_ENGINEER = 5, ASSIGNMENT_MEDICAL = 5), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
|
||||
// Spawns mice, lizards, or dud spiderlings //Dud spiderlings HAHAHAHAHAHAH no. No they are not duds. Have fun without security. The Janitor will mop them to death.
|
||||
// Spawns mice, or lizards.
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100), 1),
|
||||
//Split spiderlings off from the vermin infestation event into its own thing, triggered only by security.
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Spiderling Infestation",/datum/event/spiderling_infestation, 0, list(ASSIGNMENT_SECURITY = 50), 1),
|
||||
// Rot only weakens walls, not destroy them
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 30, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Window Damage", /datum/event/window_break, 10, list(ASSIGNMENT_ENGINEER = 20)),
|
||||
@@ -79,9 +81,9 @@
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grub Infestation", /datum/event/grub_infestation, -20, list(ASSIGNMENT_SECURITY = 40, ASSIGNMENT_ENGINEER = 40), 1),
|
||||
// Pure RP fun, no mechanical effects.
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, -50, list(ASSIGNMENT_AI = 200, ASSIGNMENT_CYBORG = 100, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5), 0),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, -40, list(ASSIGNMENT_ENGINEER = 40), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, -20, list(ASSIGNMENT_ENGINEER = 40), 1),
|
||||
//New CHOMPStation event. Mice grow into rats.
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mutants", /datum/event/mutants, 20, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 50), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mutants", /datum/event/mutants, 20, list(ASSIGNMENT_ANY = 15, ASSIGNMENT_SECURITY = 50), 1),
|
||||
// Opens doors in brig. So just RP fun
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, -10, list(ASSIGNMENT_SECURITY = 30, ASSIGNMENT_ENGINEER = 20), 1),
|
||||
// Not bad (dorms are shielded) but inconvenient
|
||||
@@ -109,16 +111,18 @@
|
||||
available_events = list(
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 900),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Atmos Leak", /datum/event/atmos_leak, 5, list(ASSIGNMENT_ENGINEER = 35), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, -75, list(ASSIGNMENT_SECURITY = 40, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10, ASSIGNMENT_ENGINEER = 5), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, -100, list(ASSIGNMENT_SECURITY = 40, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10, ASSIGNMENT_ENGINEER = 5), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Boss", /datum/event/boss, -110, list(ASSIGNMENT_SECURITY = 50, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, -110, list(ASSIGNMENT_SECURITY = 50, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Containment Breach", /datum/event/prison_break/station,0, list(ASSIGNMENT_ANY = 5), 0),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Escaped Slimes", /datum/event/escaped_slimes, -40, list(ASSIGNMENT_SCIENTIST = 30, ASSIGNMENT_SECURITY = 30), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Escaped Slimes", /datum/event/escaped_slimes, -50, list(ASSIGNMENT_SCIENTIST = 30, ASSIGNMENT_SECURITY = 30), 1),
|
||||
// TFF: Virgo event commented out. Technically meant for Tether maps, not Polaris.
|
||||
// new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Strike", /datum/event/meteor_strike, 10, list(ASSIGNMENT_ENGINEER = 15), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 10, list(ASSIGNMENT_ENGINEER = 15), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 15), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Metroid Infestation", /datum/event/metroid_infestation, -75, list(ASSIGNMENT_SECURITY = 35, ASSIGNMENT_SCIENCE = 20, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10), 0),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 20, list(ASSIGNMENT_ENGINEER = 15), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Spider Infestation", /datum/event/spider_infestation, -35, list(ASSIGNMENT_SECURITY = 30, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10), 0),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, -25, list(ASSIGNMENT_MEDICAL = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, -50, list(ASSIGNMENT_MEDICAL = 25), 1),
|
||||
)
|
||||
add_disabled_events(list(
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob_NoRequirements", /datum/event/blob, 10, list(ASSIGNMENT_SECURITY = 10, ASSIGNMENT_ENGINEER = 30), 1),
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
#define VERM_MICE 0
|
||||
#define VERM_LIZARDS 1
|
||||
#define VERM_SPIDERS 2
|
||||
|
||||
/datum/event/infestation
|
||||
announceWhen = 10
|
||||
@@ -62,7 +61,7 @@
|
||||
|
||||
var/list/spawn_types = list()
|
||||
var/max_number
|
||||
vermin = rand(0,2)
|
||||
vermin = rand(0,1)
|
||||
switch(vermin)
|
||||
if(VERM_MICE)
|
||||
spawn_types = list(/mob/living/simple_animal/mouse)
|
||||
@@ -72,11 +71,6 @@
|
||||
spawn_types = list(/mob/living/simple_animal/lizard)
|
||||
max_number = 6
|
||||
vermstring = "lizards"
|
||||
if(VERM_SPIDERS)
|
||||
spawn_types = list(/obj/effect/spider/spiderling)
|
||||
// rand(2,8) //Not sure if this would work instead
|
||||
max_number = 8
|
||||
vermstring = "spiders"
|
||||
|
||||
spawn(0)
|
||||
var/num = rand(2,max_number)
|
||||
@@ -84,13 +78,8 @@
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
turfs.Remove(T)
|
||||
num--
|
||||
|
||||
if(vermin == VERM_SPIDERS)
|
||||
var/obj/effect/spider/spiderling/S = new(T)
|
||||
S.amount_grown = 0
|
||||
else
|
||||
var/spawn_type = pick(spawn_types)
|
||||
new spawn_type(T)
|
||||
var/spawn_type = pick(spawn_types)
|
||||
new spawn_type(T)
|
||||
|
||||
|
||||
/datum/event/infestation/announce()
|
||||
@@ -106,5 +95,4 @@
|
||||
#undef LOC_GARDEN
|
||||
|
||||
#undef VERM_MICE
|
||||
#undef VERM_LIZARDS
|
||||
#undef VERM_SPIDERS
|
||||
#undef VERM_LIZARDS
|
||||
@@ -0,0 +1,28 @@
|
||||
/var/global/sent_metroids_to_station = 0
|
||||
|
||||
/datum/event/metroid_infestation
|
||||
announceWhen = 30
|
||||
var/spawncount = 1
|
||||
|
||||
|
||||
/datum/event/metroid_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 30)
|
||||
spawncount = rand(2 * severity, 4 * severity)
|
||||
sent_metroids_to_station = 0
|
||||
|
||||
/datum/event/metroid_infestation/announce()
|
||||
command_announcement.Announce("Unidentified high-energy lifesigns detected coming aboard [station_name()]. Repel and exterminate.", "Lifesign Alert", new_sound = 'sound/misc/alarm1.ogg')
|
||||
|
||||
|
||||
/datum/event/metroid_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in using_map.station_levels)
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
while((spawncount >= 1) && vents.len)
|
||||
var/obj/vent = pick(vents)
|
||||
new /mob/living/simple_animal/hostile/metroid/evolution/baby(vent.loc)
|
||||
vents -= vent
|
||||
spawncount--
|
||||
@@ -0,0 +1,87 @@
|
||||
//CHOMP: Lifted and butchered from the infestation event as we have moved spiderlings out and instead put in its own event.
|
||||
|
||||
#define LOC_KITCHEN 0
|
||||
#define LOC_ATMOS 1
|
||||
#define LOC_CHAPEL 2
|
||||
#define LOC_LIBRARY 3
|
||||
#define LOC_HYDRO 4
|
||||
#define LOC_VAULT 5
|
||||
#define LOC_CONSTR 6
|
||||
#define LOC_TECH 7
|
||||
#define LOC_GARDEN 8
|
||||
|
||||
|
||||
/datum/event/spiderling_infestation
|
||||
announceWhen = 10
|
||||
endWhen = 11
|
||||
var/location
|
||||
var/locstring
|
||||
var/vermstring
|
||||
|
||||
/datum/event/spiderling_infestation/start()
|
||||
|
||||
location = rand(0,8)
|
||||
var/list/turf/simulated/floor/turfs = list()
|
||||
var/spawn_area_type
|
||||
switch(location)
|
||||
if(LOC_KITCHEN)
|
||||
spawn_area_type = /area/crew_quarters/kitchen
|
||||
locstring = "the kitchen"
|
||||
if(LOC_ATMOS)
|
||||
spawn_area_type = /area/engineering/atmos
|
||||
locstring = "atmospherics"
|
||||
if(LOC_CHAPEL)
|
||||
spawn_area_type = /area/chapel/main
|
||||
locstring = "the chapel"
|
||||
if(LOC_LIBRARY)
|
||||
spawn_area_type = /area/library
|
||||
locstring = "the library"
|
||||
if(LOC_HYDRO)
|
||||
spawn_area_type = /area/hydroponics
|
||||
locstring = "hydroponics"
|
||||
if(LOC_VAULT)
|
||||
spawn_area_type = /area/security/nuke_storage
|
||||
locstring = "the vault"
|
||||
if(LOC_CONSTR)
|
||||
spawn_area_type = /area/construction
|
||||
locstring = "the construction area"
|
||||
if(LOC_TECH)
|
||||
spawn_area_type = /area/storage/tech
|
||||
locstring = "technical storage"
|
||||
if(LOC_GARDEN)
|
||||
spawn_area_type = /area/hydroponics/garden
|
||||
locstring = "the public garden"
|
||||
|
||||
for(var/areapath in typesof(spawn_area_type))
|
||||
var/area/A = locate(areapath)
|
||||
for(var/turf/simulated/floor/F in A.contents)
|
||||
if(turf_clear(F))
|
||||
turfs += F
|
||||
|
||||
var/list/spawn_types = list()
|
||||
var/max_number
|
||||
spawn_types = list(/obj/effect/spider/spiderling)
|
||||
max_number = 8
|
||||
vermstring = "spiders"
|
||||
|
||||
spawn(0)
|
||||
var/num = rand(2,max_number)
|
||||
while(turfs.len > 0 && num > 0)
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
turfs.Remove(T)
|
||||
num--
|
||||
var/spawn_type = pick(spawn_types)
|
||||
new spawn_type(T)
|
||||
|
||||
/datum/event/spiderling_infestation/announce()
|
||||
command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Spiderling infestation")
|
||||
|
||||
#undef LOC_KITCHEN
|
||||
#undef LOC_ATMOS
|
||||
#undef LOC_CHAPEL
|
||||
#undef LOC_LIBRARY
|
||||
#undef LOC_HYDRO
|
||||
#undef LOC_VAULT
|
||||
#undef LOC_TECH
|
||||
#undef LOC_GARDEN
|
||||
|
||||
Reference in New Issue
Block a user