diff --git a/hyperstation/code/mobs/crystal.dm b/hyperstation/code/mobs/crystal.dm new file mode 100644 index 000000000..89387b21f --- /dev/null +++ b/hyperstation/code/mobs/crystal.dm @@ -0,0 +1,60 @@ +#define REGENERATION_DELAY 60 // After taking damage, how long it takes for automatic regeneration to begin for megacarps (ty robustin!) + +/mob/living/simple_animal/hostile/crystal + name = "Pellucyte" + desc = "A floating crystal with orbiting smaller crystals." + icon = 'hyperstation/icons/mob/crystal.dmi' + icon_state = "crystal" + icon_living = "crystal" + icon_dead = "crystal" + mob_biotypes = MOB_BEAST + speak_chance = 0 + turns_per_move = 10 + response_help = "touches" + response_disarm = "gently pushes aside" + response_harm = "hits" + emote_taunt = list("sings") + taunt_chance = 20 + speed = 0 + maxHealth = 50 + health = 50 + spacewalk = TRUE + harm_intent_damage = 8 + obj_damage = 50 + melee_damage_lower = 15 + melee_damage_upper = 15 + attacktext = "slams" + attack_sound = 'sound/creatures/crystal_hit.ogg' + speak_emote = list("sings") + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + minbodytemp = 0 + maxbodytemp = 3500 + faction = list("carp") + movement_type = FLYING + pressure_resistance = 500 + gold_core_spawnable = HOSTILE_SPAWN + var/regen_cooldown = 0 //Used for how long it takes before a healing will take place default in 60 seconds + var/regen_amount = 1 //How much is healed pre regen cooldown + del_on_death = TRUE + pixel_x = -8 + +/mob/living/simple_animal/hostile/crystal/Life() + . = ..() + if(regen_amount && regen_cooldown < world.time) + heal_overall_damage(regen_amount) + if(stat) + return + if(prob(15)) + playsound(src, 'sound/creatures/crystal_idle.ogg', 100) + +/mob/living/simple_animal/hostile/crystal/adjustHealth(amount, updating_health = TRUE, forced = FALSE) + . = ..() + if(regen_amount) + regen_cooldown = world.time + REGENERATION_DELAY + + +/mob/living/simple_animal/hostile/crystal/AttackingTarget() + . = ..() + if(. && ishuman(target)) + var/mob/living/carbon/human/H = target + H.adjustStaminaLoss(8) diff --git a/hyperstation/code/modules/events/crystalloid_entities .dm b/hyperstation/code/modules/events/crystalloid_entities .dm new file mode 100644 index 000000000..b65936a1c --- /dev/null +++ b/hyperstation/code/modules/events/crystalloid_entities .dm @@ -0,0 +1,34 @@ +/datum/round_event_control/crystalloid_entities + name = "Crystal Invasion" + typepath = /datum/round_event/crystalloid_entities + weight = 10 //decreased weight from 15 to 10 + min_players = 2 //increased min players from 2 to 5 to reduce chances of half the crew dying in a carp breach + earliest_start = 10 MINUTES + max_occurrences = 2 + + +/datum/round_event/crystalloid_entities + announceWhen = 3 + startWhen = 50 + +/datum/round_event/crystalloid_entities/setup() + startWhen = rand(40, 60) + +/datum/round_event/crystalloid_entities/announce(fake) + if(prob(70)) + priority_announce("Unknown inorganic entities have been detected near [station_name()], please stand-by.", "Lifesign Alert", 'sound/ai/crystal.ogg') + else + priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/ai/commandreport.ogg') // CITADEL EDIT metabreak + for(var/obj/machinery/computer/communications/C in GLOB.machines) + if(!(C.stat & (BROKEN|NOPOWER)) && is_station_level(C.z)) + var/obj/item/paper/P = new(C.loc) + P.name = "Crystalloid entities" + P.info = "Unknown inorganic entities have been detected near [station_name()], you may wish to break out arms." + P.update_icon() + + +/datum/round_event/crystalloid_entities/start() + for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list) + if(prob(70)) //dont spawn them EVERYWHERE, they are tougher than carps. + new /mob/living/simple_animal/hostile/crystal(C.loc) + diff --git a/hyperstation/icons/mob/crystal.dmi b/hyperstation/icons/mob/crystal.dmi new file mode 100644 index 000000000..cd4d755a8 Binary files /dev/null and b/hyperstation/icons/mob/crystal.dmi differ diff --git a/sound/AI/crystal.ogg b/sound/AI/crystal.ogg new file mode 100644 index 000000000..b6e7bbe9a Binary files /dev/null and b/sound/AI/crystal.ogg differ diff --git a/sound/creatures/crystal_death.ogg b/sound/creatures/crystal_death.ogg new file mode 100644 index 000000000..1dfbd314d Binary files /dev/null and b/sound/creatures/crystal_death.ogg differ diff --git a/sound/creatures/crystal_hit.ogg b/sound/creatures/crystal_hit.ogg new file mode 100644 index 000000000..5f58ecaab Binary files /dev/null and b/sound/creatures/crystal_hit.ogg differ diff --git a/sound/creatures/crystal_idle.ogg b/sound/creatures/crystal_idle.ogg new file mode 100644 index 000000000..b6bf15699 Binary files /dev/null and b/sound/creatures/crystal_idle.ogg differ diff --git a/tgstation.dme b/tgstation.dme index f45b84457..493ea15b5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3112,6 +3112,7 @@ #include "hyperstation\code\gamemode\werewolf\werewolf.dm" #include "hyperstation\code\hyperbot\hyperbot.dm" #include "hyperstation\code\mobs\carrion.dm" +#include "hyperstation\code\mobs\crystal.dm" #include "hyperstation\code\mobs\dancer.dm" #include "hyperstation\code\mobs\emote.dm" #include "hyperstation\code\mobs\hugbot.dm" @@ -3154,6 +3155,7 @@ #include "hyperstation\code\modules\clothing\under\under.dm" #include "hyperstation\code\modules\economy\account.dm" #include "hyperstation\code\modules\events\crystalline_reentry.dm" +#include "hyperstation\code\modules\events\crystalloid_entities .dm" #include "hyperstation\code\modules\food_and_drinks\recipes\drinks_recipes.dm" #include "hyperstation\code\modules\integrated_electronics\input.dm" #include "hyperstation\code\modules\jobs\job_types\roleplay.dm"