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:
Razgriz1032
2019-07-10 21:07:48 -07:00
parent a514e8fd10
commit d05ac946d8
21 changed files with 745 additions and 274 deletions
+116
View File
@@ -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
+11 -7
View File
@@ -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),
+4 -16
View File
@@ -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
@@ -67,6 +67,9 @@
health = 120
melee_damage_lower = 15
melee_damage_upper = 15
move_shoot = 1 //Move and shoot at the same time.
ranged_cooldown = 0 //What the starting cooldown is on ranged attacks
ranged_cooldown_time = 120 //How long, in deciseconds, the cooldown of ranged attacks is
ranged = 1
projectiletype = /obj/item/projectile/energy/neurotoxin/toxic
projectilesound = 'sound/weapons/pierce.ogg'
@@ -101,6 +104,9 @@
projectiletype = /obj/item/projectile/energy/neurotoxin/toxic
projectilesound = 'sound/weapons/pierce.ogg'
rapid = 1
move_shoot = 1 //Move and shoot at the same time.
ranged_cooldown = 0 //What the starting cooldown is on ranged attacks
ranged_cooldown_time = 120 //How long, in deciseconds, the cooldown of ranged attacks is
status_flags = 0
/mob/living/simple_animal/hostile/alien/queen/empress
@@ -85,3 +85,60 @@
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
//Enemy version.
/mob/living/simple_animal/hostile/giant_crab
name = "giant crab"
desc = "A giant enemy crab."
tt_desc = "S Cancer holligus"
icon = 'icons/mob/vore.dmi'
icon_state = "sif_crab"
icon_living = "sif_crab"
icon_dead = "sif_crab_dead"
faction = "crabs"
intelligence_level = SA_ANIMAL
maxHealth = 300
health = 300
mob_size = MOB_LARGE
cooperative = 1
retaliate = 1
turns_per_move = 3
minbodytemp = 175
melee_damage_lower = 22
melee_damage_upper = 35
attack_armor_pen = 35
attack_sharp = 1
attack_edge = 1
armor = list(
"melee" = 40,
"bullet" = 10,
"laser" = 25,
"energy" = 25,
"bomb" = 10,
"bio" = 100,
"rad" = 100)
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "stomps"
friendly = "pinches"
speak_chance = 1
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
//Vore stuff
vore_active = 1
vore_ignores_undigestable = 0
vore_icons = SA_ICON_LIVING
vore_pounce_chance = 20
@@ -1,6 +1,12 @@
var/global/list/queen_amount = 0
var/global/list/queen_amount = 0 //We only gonna want 1 queen in the world.
/*
//The metroids' base variables!
*/
/mob/living/simple_animal/hostile/metroid
name = "minetroid"
name = "metroid"
desc = "Some sort of person eaty thing!"
tt_desc = "Headamus Suckumus"
icon = 'icons/mob/metroid/small.dmi'
@@ -13,12 +19,13 @@ var/global/list/queen_amount = 0
maxHealth = 25
health = 25
speed = 4
turns_per_move = 4
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "hits the"
harm_intent_damage = 5
isEdible = 0 //They cannot be eaten while alive.
var/canEvolve = 1 //A variable for admins to turn off and on for when they like assign a player as a mob. I want to add a verb so that they can do it on command when the conditions are right in the future.
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent //Graciously stolen from spider code
//Metroids aren't affected by atmospheres.
min_oxy = 0
@@ -44,26 +51,36 @@ var/global/list/queen_amount = 0
meat_type = /obj/item/toy/figure/samus
var/mob/living/victim = null // the person the metroid is currently feeding on
var/optimal_combat = FALSE // Used to dumb down the combat AI somewhat. If true, the slime tends to be really dangerous to fight alone due to stunlocking.
var/optimal_combat = FALSE // Used to dumb down the combat AI somewhat. If true, the metroid tends to be really dangerous to fight alone due to stunlocking.
var/power_charge = 0
var/evo_point = 0
var/evo_limit = 0
var/next = null
//Stuff for if a person is playing as a metroid.
show_stat_health = 1 // Does the percentage health show in the stat panel for the mob
ai_inactive = 0 // Set to 1 to turn off most AI actions
has_hands = 1 // Set to 1 to enable the use of hands and the hands hud
humanoid_hands = 1 // Can a player in this mob use things like guns or AI cards?
//hand_form = "hands" // Used in IsHumanoidToolUser. 'Your X are not fit-'.
//hud_gears // Slots to show on the hud (typically none)
//ui_icons // Icon file path to use for the HUD, otherwise generic icons are used
//r_hand_sprite = "piranha_r" // If they have hands, //TODO make a leaf sprite for this
//l_hand_sprite = "piranha_l" // they could use some icons.
player_msg = "SUCC." // Message to print to players about 'how' to play this mob on login.
/mob/living/simple_animal/hostile/metroid //activate noms
vore_active = 1
vore_pounce_chance = 50
vore_pounce_chance = 25
vore_icons = SA_ICON_LIVING
isEdible = 0
/mob/living/simple_animal/hostile/metroid/death()
playsound(src, 'sound/effects/metroiddeath.ogg', 50, 1)
..()
if(prob(20))
visible_message("<span class='notice'>\The [src] dropped some toy!</span>")
var/location = get_turf(src)
new /obj/item/toy/figure/samus(location)
@@ -76,7 +93,6 @@ var/global/list/queen_amount = 0
icon_living = "mochtroid"
icon_state = "mochtroid"
/mob/living/simple_animal/hostile/metroid/mine
vore_active = 1
vore_pounce_chance = 50
vore_icons = SA_ICON_LIVING
@@ -104,17 +120,26 @@ var/global/list/queen_amount = 0
icon_state = "baby"
intelligence_level = SA_ANIMAL
speak_emote = list("churrs")
health = 150
maxHealth = 150
health = 200
maxHealth = 200
melee_damage_lower = 1
melee_damage_upper = 5
melee_miss_chance = 0
armor = list(
"melee" = 50,
"bullet" = 30,
"laser" = 80,
"energy" = 90,
"bomb" = 70,
"bio" = 100,
"rad" = 100)
gender = NEUTER
faction = "metroids"
move_to_delay = 3
//Metroids aren't affected by most atmospheres except cold.
minbodytemp = T0C-30
cold_damage_per_tick = 4
cold_damage_per_tick = 100
min_oxy = 0
max_oxy = 0
min_tox = 0
@@ -140,7 +165,11 @@ var/global/list/queen_amount = 0
evo_point = 800
evo_limit = 1000
next = "/mob/living/simple_animal/hostile/metroid/evolution/super"
vore_active = 0
/mob/living/simple_animal/hostile/metroid/evolution/baby/New()
playsound(src, 'sound/metroid/metroidsee.ogg', 100, 1)
..()
@@ -159,17 +188,26 @@ var/global/list/queen_amount = 0
icon_state = "metroid"
intelligence_level = SA_ANIMAL
speak_emote = list("churrs")
health = 200
maxHealth = 200
health = 250
maxHealth = 250
melee_damage_lower = 2
melee_damage_upper = 5
melee_miss_chance = 0
armor = list(
"melee" = 50,
"bullet" = 30,
"laser" = 90,
"energy" = 90,
"bomb" = 70,
"bio" = 100,
"rad" = 100)
gender = NEUTER
faction = "metroids"
move_to_delay = 3
//Metroids aren't affected by most atmospheres except cold.
minbodytemp = T0C-30
cold_damage_per_tick = 4
cold_damage_per_tick = 100
min_oxy = 0
max_oxy = 0
min_tox = 0
@@ -195,7 +233,6 @@ var/global/list/queen_amount = 0
evo_limit = 1400
next = "/mob/living/simple_animal/hostile/metroid/combat/alpha"
/mob/living/simple_animal/hostile/metroid/evolution/super //active noms
vore_active = 1
vore_bump_chance = 0
vore_capacity = 1
@@ -204,6 +241,10 @@ var/global/list/queen_amount = 0
vore_default_mode = DM_DIGEST
swallowTime = 1 SECONDS //Hungry little bastards.
vore_escape_chance = 25
/mob/living/simple_animal/hostile/metroid/evolution/super/New()
playsound(src, 'sound/metroid/metroidsee.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/evolution/super/death()
playsound(src, 'sound/metroid/metroiddeath.ogg', 100, 1)
@@ -225,13 +266,23 @@ var/global/list/queen_amount = 0
icon_living = "alpha"
icon_state = "alpha"
intelligence_level = SA_ANIMAL
health = 225
maxHealth = 225
health = 300
maxHealth = 300
melee_damage_lower = 10
melee_damage_upper = 15
melee_miss_chance = 5
attacktext = list("rammed")
armor = list(
"melee" = 60,
"bullet" = 45,
"laser" = 50,
"energy" = 70,
"bomb" = 10,
"bio" = 100,
"rad" = 100)
gender = NEUTER
faction = "metroids"
move_to_delay = 3
//Alphas lose their vulnerability to cold.
minbodytemp = 0
@@ -261,6 +312,10 @@ var/global/list/queen_amount = 0
evo_limit = 1600
next = "/mob/living/simple_animal/hostile/metroid/combat/gamma"
/mob/living/simple_animal/hostile/metroid/combat/alpha/New()
playsound(src, 'sound/metroid/metroidsee.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/combat/alpha/death()
playsound(src, 'sound/metroid/metroiddeath.ogg', 100, 1)
..()
@@ -270,7 +325,7 @@ var/global/list/queen_amount = 0
vore_bump_chance = 0
vore_capacity = 1
vore_icons = SA_ICON_LIVING
vore_pounce_chance = 10 //Alphas will try knocking targets over since they lost their stun ability from the initial phases.
vore_pounce_chance = 15 //Alphas will try knocking targets over since they lost their stun ability from the initial phases.
vore_default_mode = DM_DIGEST
swallowTime = 3 SECONDS
vore_escape_chance = 25
@@ -283,6 +338,7 @@ var/global/list/queen_amount = 0
//------------------------------------------------------------------------------------------------------------
/mob/living/simple_animal/hostile/metroid/combat/gamma
name = "gamma metroid"
desc = "Some kind of head rammy thing! This one shoots electricity!"
@@ -292,13 +348,23 @@ var/global/list/queen_amount = 0
icon_living = "gamma"
icon_state = "gamma"
intelligence_level = SA_ANIMAL
health = 275
maxHealth = 275
health = 400
maxHealth = 400
melee_damage_lower = 10
melee_damage_upper = 20
melee_miss_chance = 5
attacktext = list("rammed")
armor = list(
"melee" = 60,
"bullet" = 50,
"laser" = 50,
"energy" = 90,
"bomb" = 10,
"bio" = 100,
"rad" = 100)
gender = NEUTER
faction = "metroids"
move_to_delay = 4
move_shoot = 1 //Move and shoot at the same time.
ranged_cooldown = 0 //What the starting cooldown is on ranged attacks
@@ -338,12 +404,14 @@ var/global/list/queen_amount = 0
evo_limit = 1600
next = "/mob/living/simple_animal/hostile/metroid/combat/zeta"
/mob/living/simple_animal/hostile/metroid/combat/gamma/New()
playsound(src, 'sound/metroid/metroidgamma.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/combat/gamma/death()
playsound(src, 'sound/metroid/metroiddeath.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/combat/gamma //active noms
vore_active = 1
vore_bump_chance = 0
@@ -364,19 +432,29 @@ var/global/list/queen_amount = 0
name = "zeta metroid"
desc = "Some kind of feet stompy thing!"
tt_desc = "Minimus Feetamus Walkamus"
icon = 'icons/mob/metroid/small.dmi'
icon = 'icons/mob/metroid/large.dmi'
icon_dead = "zeta_dead"
icon_living = "zeta"
icon_state = "zeta"
intelligence_level = SA_ANIMAL
health = 350
maxHealth = 350
health = 500
maxHealth = 500
melee_damage_lower = 15
melee_damage_upper = 25
melee_miss_chance = 5
attack_armor_pen = 10
attacktext = list("slashed")
armor = list(
"melee" = 70,
"bullet" = 60,
"laser" = 50,
"energy" = 70,
"bomb" = 10,
"bio" = 100,
"rad" = 100)
gender = NEUTER
faction = "metroids"
move_to_delay = 4
move_shoot = 1 //Move and shoot at the same time.
ranged_cooldown = 0 //What the starting cooldown is on ranged attacks
@@ -396,16 +474,21 @@ var/global/list/queen_amount = 0
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 0
pixel_x = -16
pixel_y = -16
old_x = -16
old_y = -16
response_help = "pets"
speak = list(
"Skree...",
"Ereeeer..."
"Ereeeer...",
"Rerrr..."
)
emote_hear = list()
emote_see = list(
"SKREE!"
"RAWR!"
)
cooperative = 1
@@ -413,12 +496,14 @@ var/global/list/queen_amount = 0
evo_limit = 1800
next = "/mob/living/simple_animal/hostile/metroid/combat/omega"
/mob/living/simple_animal/hostile/metroid/combat/zeta/New()
playsound(src, 'sound/metroid/metroidzeta.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/combat/zeta/death()
playsound(src, 'sound/metroid/metroiddeath.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/combat/zeta //active noms
vore_active = 1
vore_bump_chance = 0
@@ -440,24 +525,34 @@ var/global/list/queen_amount = 0
name = "omega metroid"
desc = "Those are some big claws!"
tt_desc = "Maximus Feetamus Walkamus"
icon = 'icons/mob/metroid/small.dmi'
icon = 'icons/mob/metroid/large.dmi'
icon_dead = "omega_dead"
icon_living = "omega"
icon_state = "omega"
intelligence_level = SA_ANIMAL
health = 500
maxHealth = 500
health = 600
maxHealth = 600
melee_damage_lower = 25
melee_damage_upper = 40
melee_miss_chance = 5
attack_armor_pen = 20
attacktext = list("slashed")
armor = list(
"melee" = 75,
"bullet" = 60,
"laser" = 55,
"energy" = 90,
"bomb" = 10,
"bio" = 100,
"rad" = 100)
gender = NEUTER
faction = "metroids"
speed = 4
move_to_delay = 5
move_shoot = 1 //Move and shoot at the same time.
ranged_cooldown = 0 //What the starting cooldown is on ranged attacks
ranged_cooldown_time = 15 //How long, in deciseconds, the cooldown of ranged attacks is
ranged_cooldown_time = 150 //How long, in deciseconds, the cooldown of ranged attacks is
rapid = 1 // Three-round-burst fire mode
projectiletype = /obj/item/projectile/energy/metroidacid // The projectiles I shoot
projectilesound = 'sound/weapons/slashmiss.ogg' // The sound I make when I do it
@@ -473,16 +568,21 @@ var/global/list/queen_amount = 0
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 0
old_x = -16
old_y = 0
default_pixel_x = -16
pixel_x = -16
pixel_y = 0
response_help = "pets"
speak = list(
"Skree...",
"Ereeeer..."
"Rurrr...",
)
emote_hear = list()
emote_see = list(
"SKREE!"
"ROAR!"
)
cooperative = 1
@@ -490,11 +590,13 @@ var/global/list/queen_amount = 0
evo_limit = 3000
next = "/mob/living/simple_animal/hostile/metroid/combat/queen"
/mob/living/simple_animal/hostile/metroid/combat/omega/death()
playsound(src, 'sound/metroid/metroiddeath.ogg', 100, 1)
/mob/living/simple_animal/hostile/metroid/combat/omega/New()
playsound(src, 'sound/metroid/metroidomega.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/combat/omega/death()
playsound(src, 'sound/metroid/metroidomegadeath.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/combat/omega //active noms
vore_active = 1
@@ -517,24 +619,33 @@ var/global/list/queen_amount = 0
name = "queen metroid"
desc = "The mother of all Metroids, allowed to have grown too far!"
tt_desc = "Maximus Queenamus Deathamus"
icon = 'icons/mob/metroid/small.dmi'
icon = 'icons/mob/metroid/queen.dmi'
icon_dead = "queen_dead"
icon_living = "queen"
icon_state = "queen"
intelligence_level = SA_ANIMAL
health = 575
maxHealth = 575
health = 1000
maxHealth = 1000
melee_damage_lower = 30
melee_damage_upper = 60
melee_miss_chance = 5
attack_armor_pen = 20
attacktext = list("gnashed")
armor = list(
"melee" = 75,
"bullet" = 60,
"laser" = 60,
"energy" = 90,
"bomb" = 10,
"bio" = 100,
"rad" = 100)
gender = NEUTER
faction = "metroids"
speed = 3
move_to_delay = 6
move_shoot = 1 //Move and shoot at the same time.
ranged_cooldown = 0 //What the starting cooldown is on ranged attacks
ranged_cooldown_time = 12 //How long, in deciseconds, the cooldown of ranged attacks is
ranged_cooldown_time = 120 //How long, in deciseconds, the cooldown of ranged attacks is
rapid = 1 // Three-round-burst fire mode
projectiletype = /obj/item/projectile/energy/metroidacid // The projectiles I shoot
projectilesound = 'sound/weapons/slashmiss.ogg' // The sound I make when I do it
@@ -550,26 +661,30 @@ var/global/list/queen_amount = 0
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 0
pixel_x = -16
pixel_y = -16
old_x = -16
old_y = -16
response_help = "pets"
speak = list(
"Skree...",
"Ereeeer..."
)
emote_hear = list()
emote_see = list(
"SKREE!"
"ROAR!"
)
cooperative = 1
evo_point = 1800
evo_point = 1100
evo_limit = INFINITY
next = "/mob/living/simple_animal/hostile/metroid/evolution/super"
/mob/living/simple_animal/hostile/metroid/combat/queen/New()
playsound(src, 'sound/metroid/metroidqueen.ogg', 100, 1)
..()
/mob/living/simple_animal/hostile/metroid/combat/queen/death()
playsound(src, 'sound/metroid/metroiddeath.ogg', 100, 1)
playsound(src, 'sound/metroid/metroidqueendeath.ogg', 100, 1)
queen_amount--
..()
@@ -587,9 +702,16 @@ var/global/list/queen_amount = 0
//------------------------------------------------------------------------------------------------------------
/*
//Objects related to the Metroids.
//Projectile for the Metroids.
*/
/obj/item/projectile/energy/metroidacid
name = "metroid acid"
icon_state = "neurotoxin"
damage = 10
@@ -639,9 +761,13 @@ var/global/list/queen_amount = 0
/*
//LIFE STUFF, AND MECHANICS!
//FOR THE BABY AND SUPER FORMS!
*/
/mob/living/simple_animal/hostile/metroid/evolution/Life()
. = ..()
@@ -650,21 +776,26 @@ var/global/list/queen_amount = 0
prey_excludes.Cut()
stop_consumption()
if(canEvolve == 1 && nutrition >= evo_point && !buckled && vore_fullness == 0)
if(canEvolve == 1 && nutrition >= evo_point && !buckled && vore_fullness == 0 && !victim)
playsound(src, 'sound/metroid/metroidgrow.ogg', 50, 1)
paralysis = 7998
sleep(50)
paralysis = 0
expand_troid()
return
if(stance == 7) //Necessary to fix a bug where if their vore prey or latching victim is laying down when they evolve, they get stuck in stance 7 and do nothing.
stance = 4
return
else
handle_idle()
/mob/living/simple_animal/hostile/metroid/proc/expand_troid()
visible_message("<span class='warning'>\The [src] suddenly evolves!</span>")
new next(get_turf(src))
visible_message("<span class='warning'>\The [src] suddenly evolves!</span>")
qdel(src)
/mob/living/simple_animal/hostile/metroid/evolution/handle_regular_status_updates() //This does something.
/mob/living/simple_animal/hostile/metroid/evolution/handle_regular_status_updates()
if(stat != DEAD)
if(victim)
@@ -676,6 +807,40 @@ var/global/list/queen_amount = 0
..()
/mob/living/simple_animal/hostile/metroid/evolution/proc/handle_idle()
//Do we have a vent ? Good, let's take a look
for(entry_vent in view(1, src))
if(!victim && !buckled && vore_fullness == 0 && prob(90)) //10 % chance to consider a vent, to try and avoid constant vent switching
return
visible_message("<span class='danger'>\The [src] starts trying to slide itself into the vent!</span>")
sleep(50) //Let's stop the metroid for five seconds to do its parking job
..()
if(entry_vent.network && entry_vent.network.normal_members.len)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in entry_vent.network.normal_members)
vents.Add(temp_vent)
if(!vents.len)
entry_vent = null
return
var/obj/machinery/atmospherics/unary/vent_pump/exit_vent = pick(vents)
spawn()
visible_message("<span class='danger'>\The [src] suddenly disappears into the vent!</span>")
loc = exit_vent
var/travel_time = round(get_dist(loc, exit_vent.loc)/2)
spawn(travel_time)
if(!exit_vent || exit_vent.welded)
forceMove(get_turf(entry_vent))
entry_vent = null
visible_message("<span class='danger'>\The [src] suddenly appears from the vent!</span>")
return
forceMove(get_turf(exit_vent))
entry_vent = null
visible_message("<span class='danger'>\The [src] suddenly appears from the vent!</span>")
else
entry_vent = null
/mob/living/simple_animal/hostile/metroid/evolution/proc/adjust_nutrition(input)
nutrition = between(0, nutrition + input, evo_limit) //Just is a thing to handle the stun from the metroid.
@@ -738,6 +903,7 @@ var/global/list/queen_amount = 0
playsound(src, 'sound/metroid/metroidattach.ogg', 100, 1)
victim.visible_message("<span class='danger'>\The [src] latches onto [victim]!</span>",
"<span class='danger'>\The [src] latches onto you!</span>")
// stop_automated_movement = 1
/mob/living/simple_animal/hostile/metroid/evolution/proc/stop_consumption()
if(!victim)
@@ -748,6 +914,8 @@ var/global/list/queen_amount = 0
"<span class='notice'>\The [src] slides off of you!</span>")
victim = null
update_icon()
sleep(50)
// stop_automated_movement = 0
/mob/living/simple_animal/hostile/metroid/evolution/proc/handle_consumption()
@@ -782,7 +950,10 @@ var/global/list/queen_amount = 0
else
stop_consumption()
/mob/living/simple_animal/hostile/metroid/evolution/DoPunch(var/mob/living/L) //Metroid actions vs the player.
/mob/living/simple_animal/hostile/metroid/evolution/DoPunch(var/mob/living/L) //Metroid melee.
var/damage_to_do = rand(melee_damage_lower, melee_damage_upper)
var/armor_modifier = abs((L.getarmor(null, "bio") / 100) - 1)
if(!Adjacent(L)) // Might've moved away in the meantime.
return
@@ -790,82 +961,81 @@ var/global/list/queen_amount = 0
if(ishuman(L))
var/mob/living/carbon/human/H = L
// Slime attacks can be blocked with shields.
// Metroid attacks can be blocked with shields.
if(H.check_shields(damage = 0, damage_source = null, attacker = src, def_zone = null, attack_text = "the attack"))
return
switch(a_intent)
if(I_HELP)
ai_log("DoPunch() against [L], helping.",2)
L.visible_message("<span class='notice'>[src] gently pokes [L]!</span>",
"<span class='notice'>[src] gently pokes you!</span>")
do_attack_animation(L)
if(I_DISARM) //The metroid does all this too try to knock the player down.
ai_log("DoPunch() against [L], disarming.",2)
var/stun_power = between(0, power_charge + rand(0, 3), 10)
if(ishuman(L))
var/mob/living/carbon/human/H = L
stun_power *= max(H.species.siemens_coefficient,0)
if(prob(stun_power * 10))
power_charge = max(0, power_charge - 3)
L.visible_message("<span class='danger'>[src] has shocked [L]!</span>", "<span class='danger'>[src] has shocked you!</span>")
playsound(src, 'sound/weapons/Egloves.ogg', 75, 1)
L.Weaken(4)
L.Stun(4)
switch(a_intent)
if(I_HELP)
ai_log("DoPunch() against [L], helping.",2)
L.visible_message("<span class='notice'>[src] gently pokes [L]!</span>",
"<span class='notice'>[src] gently pokes you!</span>")
do_attack_animation(L)
if(L.buckled)
L.buckled.unbuckle_mob() // To prevent an exploit where being buckled prevents metroids from jumping on you.
L.stuttering = max(L.stuttering, stun_power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, L)
s.start()
if(I_DISARM) //The metroid does all this too try to knock the player down.
ai_log("DoPunch() against [L], disarming.",2)
var/stun_power = between(0, power_charge + rand(0, 3), 10)
if(prob(stun_power * 10) && stun_power >= 8)
L.adjustFireLoss(power_charge * rand(1, 2))
else if(prob(40))
L.visible_message("<span class='danger'>[src] has pounced at [L]!</span>", "<span class='danger'>[src] has pounced at you!</span>")
playsound(src, 'sound/metroid/metroidswoosh.ogg', 75, 1)
L.Weaken(2)
do_attack_animation(L)
if(L.buckled)
L.buckled.unbuckle_mob() // To prevent an exploit where being buckled prevents metroids from jumping on you.
else
L.visible_message("<span class='danger'>[src] has tried to pounce at [L]!</span>", "<span class='danger'>[src] has tried to pounce at you!</span>")
playsound(src, 'sound/weapons/punchmiss.ogg', 75, 1)
do_attack_animation(L)
L.updatehealth()
return L
if(I_GRAB) //The metroid does this to start sucking their head off.
ai_log("DoPunch() against [L], grabbing.",2)
start_consuming(L)
if(I_HURT) //The metroid does this if it can't latch onto the target or it decides not to try knocking them down.
ai_log("DoPunch() against [L], hurting.",2)
var/damage_to_do = rand(melee_damage_lower, melee_damage_upper)
var/armor_modifier = abs((L.getarmor(null, "bio") / 100) - 1)
L.attack_generic(src, damage_to_do, pick(attacktext))
playsound(src, 'sound/weapons/bite.ogg', 75, 1)
// Give the Metroid some nutrition, if applicable, even if not attached.
if(!L.isSynthetic())
if(ishuman(L))
if(L.getCloneLoss() < L.getMaxHealth() * 1.5)
adjust_nutrition(damage_to_do * armor_modifier)
stun_power *= max(H.species.siemens_coefficient,0)
if(prob(stun_power * 10))
power_charge = max(0, power_charge - 3)
L.visible_message("<span class='danger'>[src] has shocked [L]!</span>", "<span class='danger'>[src] has shocked you!</span>")
playsound(src, 'sound/weapons/Egloves.ogg', 75, 1)
L.Weaken(4)
L.Stun(4)
do_attack_animation(L)
if(L.buckled)
L.buckled.unbuckle_mob() // To prevent an exploit where being buckled prevents metroids from jumping on you.
L.stuttering = max(L.stuttering, stun_power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, L)
s.start()
if(prob(stun_power * 10) && stun_power >= 8)
L.adjustFireLoss(power_charge * rand(1, 2))
else if(prob(40))
L.visible_message("<span class='danger'>[src] has pounced at [L]!</span>", "<span class='danger'>[src] has pounced at you!</span>")
playsound(src, 'sound/metroid/metroidswoosh.ogg', 75, 1)
L.Weaken(2)
do_attack_animation(L)
if(L.buckled)
L.buckled.unbuckle_mob() // To prevent an exploit where being buckled prevents metroids from jumping on you.
else
L.visible_message("<span class='danger'>[src] has tried to pounce at [L]!</span>", "<span class='danger'>[src] has tried to pounce at you!</span>")
playsound(src, 'sound/weapons/punchmiss.ogg', 75, 1)
do_attack_animation(L)
L.updatehealth()
return L
if(I_GRAB) //The metroid does this to start sucking their head off.
ai_log("DoPunch() against [L], grabbing.",2)
start_consuming(L)
if(I_HURT) //The metroid does this if it can't latch onto the target or it decides not to try knocking them down.
ai_log("DoPunch() against [L], hurting.",2)
L.attack_generic(src, damage_to_do, pick(attacktext))
playsound(src, 'sound/weapons/bite.ogg', 75, 1)
// Give the Metroid some nutrition, if applicable, even if not attached.
if(!L.isSynthetic())
if(ishuman(L))
if(L.getCloneLoss() < L.getMaxHealth() * 1.5)
adjust_nutrition(damage_to_do * armor_modifier)
else if(istype(L, /mob/living/simple_animal))
if(!ismetroid(L))
var/mob/living/simple_animal/SA = L
if(!SA.stat)
L.attack_generic(src, damage_to_do, pick(attacktext))
adjust_nutrition(damage_to_do * 5)
else if(istype(L, /mob/living/simple_animal))
if(!ismetroid(L))
var/mob/living/simple_animal/SA = L
if(!SA.stat)
adjust_nutrition(damage_to_do)
if(istype(L,/obj/mecha))
@@ -873,6 +1043,7 @@ var/global/list/queen_amount = 0
M.attack_generic(src, rand(melee_damage_lower, melee_damage_upper), pick(attacktext))
/mob/living/simple_animal/hostile/metroid/evolution/attack_hand(mob/living/carbon/human/M as mob)
if(victim) // Are we eating someone?
var/fail_odds = 30
@@ -893,7 +1064,7 @@ var/global/list/queen_amount = 0
/mob/living/simple_animal/hostile/metroid/evolution/FindTarget() //This makes it so it doesn't go after another target while succing.
if(victim) // Don't worry about finding another target if we're eatting someone. //What does doooo??
if(victim) // Don't worry about finding another target if we're sucking on someone's head.
return
..()
@@ -929,8 +1100,18 @@ var/global/list/queen_amount = 0
return H // Monkeys are always food.
return
/*
//LIFE PROCS!
//FOR THE COMBAT FORMS
*/
/mob/living/simple_animal/hostile/metroid/combat/Life()
. = ..()
@@ -945,6 +1126,9 @@ var/global/list/queen_amount = 0
paralysis = 0
expand_troid()
return
if(stance == 7) //Necessary to fix a bug where if their prey or latching victim is laying down when they evolve, they get stuck in stance 7 and do nothing.
stance = 4
return
/mob/living/simple_animal/hostile/metroid/combat/omega/Life()
@@ -964,25 +1148,18 @@ var/global/list/queen_amount = 0
src.visible_message("<span class='notice'>\The [src] begins to lay an egg.</span>")
stop_automated_movement = 1
spawn(50)
new /obj/effect/spider/eggcluster(loc, src)
new /obj/effect/metroid/egg(loc, src)
stop_automated_movement = 0
birth_troid()
nutrition = 400
return
/mob/living/simple_animal/hostile/metroid/proc/birth_troid()
visible_message("<span class='warning'>\A nesting Metroid suddenly bursts out of of the [src]!</span>")
new next(get_turf(src))
/mob/living/simple_animal/hostile/metroid/combat/proc/adjust_nutrition(input)
nutrition = (nutrition + input) //It handles the metroid's nutrition gain from melee.
/mob/living/simple_animal/hostile/metroid/combat/PunchTarget() //this segment determines what the mob does depending on its intent.
if(!client) // AI controlled.
a_intent = I_HURT // Otherwise robust them.
@@ -992,37 +1169,42 @@ var/global/list/queen_amount = 0
/mob/living/simple_animal/hostile/metroid/combat/DoPunch(var/mob/living/L) //Metroid actions vs the player.
var/damage_to_do = rand(melee_damage_lower, melee_damage_upper)
var/armor_modifier = abs((L.getarmor(null, "bio") / 100) - 1)
if(!Adjacent(L)) // Might've moved away in the meantime.
return
if(istype(L))
switch(a_intent)
if(I_HELP)
ai_log("DoPunch() against [L], helping.",2)
L.visible_message("<span class='notice'>[src] gently pokes [L]!</span>",
"<span class='notice'>[src] gently pokes you!</span>")
do_attack_animation(L)
if(ishuman(L))
switch(a_intent)
if(I_HELP)
ai_log("DoPunch() against [L], helping.",2)
L.visible_message("<span class='notice'>[src] gently pokes [L]!</span>",
"<span class='notice'>[src] gently pokes you!</span>")
do_attack_animation(L)
if(I_HURT) //The metroid does this if it can't latch onto the target or it decides not to try knocking them down.
ai_log("DoPunch() against [L], hurting.",2)
var/damage_to_do = rand(melee_damage_lower, melee_damage_upper)
var/armor_modifier = abs((L.getarmor(null, "bio") / 100) - 1)
if(I_HURT) //The metroid does this if it can't latch onto the target or it decides not to try knocking them down.
ai_log("DoPunch() against [L], hurting.",2)
L.attack_generic(src, damage_to_do, pick(attacktext))
playsound(src, 'sound/weapons/bite.ogg', 75, 1)
L.attack_generic(src, damage_to_do, pick(attacktext))
playsound(src, 'sound/weapons/bite.ogg', 75, 1)
// Give the Metroid some nutrition, if applicable, even if not attached.
if(!L.isSynthetic())
if(ishuman(L))
if(L.getCloneLoss() < L.getMaxHealth() * 1.5)
adjust_nutrition(25 + damage_to_do * armor_modifier)
// Give the Metroid some nutrition, if applicable, even if not attached.
if(!L.isSynthetic())
if(ishuman(L))
if(L.getCloneLoss() < L.getMaxHealth() * 1.5)
adjust_nutrition(50 + damage_to_do * armor_modifier)
else if(istype(L, /mob/living/simple_animal))
if(!ismetroid(L))
var/mob/living/simple_animal/SA = L
if(!SA.stat)
adjust_nutrition(20 + damage_to_do)
else if(istype(L, /mob/living/simple_animal))
if(!ismetroid(L))
var/mob/living/simple_animal/SA = L
if(!SA.stat)
L.attack_generic(src, damage_to_do, pick(attacktext))
adjust_nutrition(damage_to_do * 4)
if(istype(L,/obj/mecha))
@@ -1033,5 +1215,5 @@ var/global/list/queen_amount = 0
/mob/living/simple_animal/hostile/metroid/combat/ClosestDistance()
if(target_mob.stat == DEAD)
return 1 // Melee (eat) the target if dead, don't shoot it. //I don't think it actually eats the target. Maybe it does?
return 1 // Melee (eat) the target if dead, don't shoot it.
return ..()