diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index cc0804631b9..e4c6cac3238 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -1,4 +1,4 @@ -//Meteor groups, used for the Meteor gamemode. +//Meteor groups, used for the Meteor gamemode and Comet Expulsion event. /proc/spawn_meteors(var/number = 10, var/list/meteortypes, var/startSide, var/zlevel) for(var/i = 0; i < number; i++) @@ -62,27 +62,26 @@ pass_flags = PASSTABLE mouse_opacity = MOUSE_OPACITY_ICON - ///The resilience of our meteor + /// The resilience of our meteor var/hits = 4 - ///Level of ex_act to be called on hit + /// Level of ex_act to be called on hit var/hitpwr = 2 - //Should we shake people's screens on impact + /// Should we shake people's screens on impact var/heavy = FALSE - ///Our starting z level, prevents infinite meteors + /// Our starting z level, prevents infinite meteors var/z_original - //Potential items to spawn when you die + /// Potential items to spawn when you die var/meteordrop = list(/obj/item/ore/iron) - ///How much stuff to spawn when you die + /// How much stuff to spawn when you die var/dropamt = 3 - ///The thing we're moving towards, usually a turf + /// The thing we're moving towards, usually a turf var/atom/dest - ///If TRUE, this meteor will not be destroyed by shield collisions + /// If TRUE, this meteor will not be destroyed by shield collisions var/ignore_shield_destruction = FALSE - /obj/effect/meteor/Destroy() walk(src,0) //this cancels the walk_towards() proc return ..() @@ -154,8 +153,6 @@ /obj/effect/meteor/Process_Spacemove(movement_dir = 0, continuous_move = FALSE) return TRUE //Keeps us from drifting for no reason - - /*##################### METEOR SUBTYPES #####################*/ diff --git a/code/modules/events/comet_expulsion.dm b/code/modules/events/comet_expulsion.dm index 2d79e61aeab..435d438ed29 100644 --- a/code/modules/events/comet_expulsion.dm +++ b/code/modules/events/comet_expulsion.dm @@ -62,9 +62,12 @@ /obj/effect/meteor/comet_expulsion heavy = TRUE ignore_shield_destruction = TRUE - hitpwr = 2 + hitpwr = 3 /obj/effect/meteor/comet_expulsion/Collide(atom/A) + // Low chance that its a big boi + if(prob(3)) + hitpwr = 5 //If there's shields and it's strong enough, the power of the explosion is reduced, but it won't stop it if(istype(A, /obj/effect/energy_field)) var/obj/effect/energy_field/impacted_energy_field = A @@ -76,7 +79,6 @@ /obj/effect/meteor/comet_expulsion/meteor_effect() . = ..() - explosion(get_turf(src), ROUND_UP(hitpwr), ROUND_UP(hitpwr*1.2), ROUND_UP(hitpwr*1.4)) @@ -87,13 +89,16 @@ /datum/event/comet_expulsion severity = EVENT_LEVEL_MAJOR startWhen = 30 + /// Number of meteors aimed directly at Horizon (few) + var/meteors_aimed = 0 + /// Number of meteors traveling on random trajectories on the overmap (lots) + var/meteors_random = 0 /datum/event/comet_expulsion/setup() if(!SSatlas.current_map.use_overmap) qdel(src) return - /datum/event/comet_expulsion/start() . = ..() @@ -105,10 +110,35 @@ var/obj/effect/overmap/visitable/target = GLOB.map_sectors["[pick(possible_station_levels)]"] if(!istype(target)) + log_and_message_admins("Comet Expulsion failed to find a viable overmap target.") qdel(src) return + /** + * These numbers may seem high, but the overmap is a Big Place. Meteors aimed at the Horizon will impact along its outer hull, if they manage to strike. + * Huddling crew in the Central Ring is the easiest way to keep them safe. The overwhelming majority of unaimed meteors will almost never come close; they + * just need to ensure there's stuff to dodge in most directions. + */ + meteors_aimed = (rand(2,5)) + meteors_random = (rand(12,24)) + // Rocks aimed directly at us. + for(var/x in 1 to meteors_aimed) + fire_comet(target, TRUE) + // Rocks flying around nearby to dodge. + for(var/y in 1 to meteors_random) + fire_comet(target) + + log_and_message_admins("Comet Expulsion has spawned meteors: [meteors_aimed] aimed at Horizon, [meteors_random] traveling random directions") + +/** + * Generate a meteor and fire it from the overmap edge in the general direction of, but not directly at, the Horizon. + * + * Parameter: + * * aimed - aim DIRECTLY at the horizon: guaranteed collision if no action is taken. + */ +/datum/event/comet_expulsion/proc/fire_comet(var/obj/effect/overmap/visitable/target, var/aimed = FALSE) var/list/turf/unsimulated/map/edge/overmap_edges = list() + var/projectile_angle for(var/turf/unsimulated/map/edge/E in block(locate(1,1,SSatlas.current_map.overmap_z), locate(SSatlas.current_map.overmap_size,SSatlas.current_map.overmap_size,SSatlas.current_map.overmap_z))) overmap_edges += E @@ -121,12 +151,19 @@ var/obj/projectile/comet_expulsion/our_comet = new(source) our_comet.preparePixelProjectile(target, source) our_comet.original = target - our_comet.fire(get_angle(source, target)) + // Get the angle to hit our target directly. + projectile_angle = get_angle(source, target) + // If we're not aiming, introduce random deviation. + if(!aimed) + var/random_deviation = rand(-75, 75) + projectile_angle = abs((projectile_angle + random_deviation) % 360) + + our_comet.fire(projectile_angle) /datum/event/comet_expulsion/announce_start() . = ..() - command_announcement.Announce("Warning, long range field scanners have detected an unforseen comet mass expulsion in collision route with [location_name()].\n\ + command_announcement.Announce("Warning, long range field scanners have detected an unforeseen comet expulsion in collision route with [location_name()].\n\ All hands, assume defense condition, perform evasive maneuvers to avoid collision with the debris cloud. Damage control teams prepare to respond to breaches of the \ vessel perimeter.", "[location_name()] Long Range Field Objects Sensor Array", new_sound = 'sound/effects/Evacuation.ogg', zlevels = affecting_z) diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index 25c7b924ebb..841e2c2f844 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -378,8 +378,8 @@ GLOBAL_LIST_INIT(severity_to_string, list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT pop_needed = 4), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Comet Expulsion", /datum/event/comet_expulsion, - 1, list(ASSIGNMENT_BRIDGE_CREW = 15, ASSIGNMENT_ENGINEER = 12), is_one_shot = TRUE, - pop_needed = 8), + 5, list(ASSIGNMENT_BRIDGE_CREW = 20, ASSIGNMENT_ENGINEER = 12), is_one_shot = TRUE, + pop_needed = 12), new /datum/event_meta(EVENT_LEVEL_MAJOR, "APC Damage", /datum/event/apc_damage, 20, list(ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_JANITOR = 20)), diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 21c58c3b67c..310d72df82d 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -1,13 +1,32 @@ #define DEFAULT_SEED "glowshroom" #define VINE_GROWTH_STAGES 5 -/proc/spacevine_infestation(var/potency_min=70, var/potency_max=100, var/maturation_min=1, var/maturation_max=3) - var/turf/T = pick_subarea_turf(/area/horizon/hallway, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects)) +/proc/spacevine_infestation(var/potency_min=85, var/potency_max=100, var/maturation_min=1, var/maturation_max=3) + /// List of areas to affect. + var/list/area/areaList = list() + /// Area types to include. + var/list/areaType = list( + /area/horizon/hallway, + /area/horizon/security/hallway, + /area/horizon/engineering/hallway, + /area/horizon/medical/hallway, + /area/horizon/operations/lobby, + /area/horizon/rnd/hallway, + /area/horizon/security/hallway, + /area/horizon/security/investigations_hallway, + /area/horizon/service/cafeteria, + /area/horizon/hangar + ) + for(var/area/area in GLOB.the_station_areas) + if(is_type_in_list(area, areaType)) + areaList += area + + var/turf/T = pick_subarea_turf(pick(areaList), list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects)) if(T) var/datum/seed/seed = SSplants.create_random_seed(TRUE, SEED_NOUN_PITS) seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines. seed.growth_stages = VINE_GROWTH_STAGES - seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects. + seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 85-100 potency will help guarantee a wide spread and powerful effects. seed.set_trait(TRAIT_MATURATION,rand(maturation_min, maturation_max)) //make vine zero start off fully matured @@ -79,7 +98,6 @@ /obj/effect/plant/single spread_chance = 0 - /obj/effect/plant/Initialize(mapload, datum/seed/newseed, obj/effect/plant/newparent) . = ..() diff --git a/code/modules/overmap/_defines.dm b/code/modules/overmap/_defines.dm index 04814a908bf..2397936f9b7 100644 --- a/code/modules/overmap/_defines.dm +++ b/code/modules/overmap/_defines.dm @@ -1,6 +1,6 @@ //How far from the edge of overmap zlevel could randomly placed objects spawn -#define OVERMAP_EDGE 2 +#define OVERMAP_EDGE 4 /// All sector overmap objects. /// Assoc list of stringified zlevel integer value (like `"1"` or `"42"` etc) diff --git a/html/changelogs/Bat-eventbalancing.yml b/html/changelogs/Bat-eventbalancing.yml new file mode 100644 index 00000000000..87c9c3d0eec --- /dev/null +++ b/html/changelogs/Bat-eventbalancing.yml @@ -0,0 +1,64 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Batrachophrenoboocosmomachia + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - balance: "Spacevines event has more area types to potentially spawn in." + - balance: "Spacevines event potency_min increased from 70 -> 85." + - balance: "Comet Expulsion event chances slightly increased with greater weighting towards Bridge Crew availability." + - balance: "Comet Expulsion event now generates many overmap hazards, mostly in random directions, to make evasion less trivial." + - balance: "Comet Expulsion event meteors now have a small chance to do greater damage." + - balance: "Horizon and other overmap visitable sites minimum spawn distance from overmap edge increased from 2 to 4." + - qol: "Provided additional admin logging for Comet Expulsion event." diff --git a/tools/Event Probabilities/Event Probabilities.xlsx b/tools/Event Probabilities/Event Probabilities.xlsx index c4da815aeb4..3cf8d201294 100644 Binary files a/tools/Event Probabilities/Event Probabilities.xlsx and b/tools/Event Probabilities/Event Probabilities.xlsx differ