-
-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a new, extremely rare event. #9166
Adds a new, extremely rare event. #9166
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flutes.ogg.ogg
Fixed I believe |
code/modules/events/flutes.dm
Outdated
//--------- | ||
//UTILITIES | ||
//--------- | ||
/proc/list_intersection(var/list/A, var/list/B) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to go in code/__HELPERS/_lists.dm
code/modules/events/flutes.dm
Outdated
//-------------------- | ||
//OBJECT DEF | ||
/datum/round_event/flutes | ||
var/chosen_players[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var/chosen_players[0] | |
var/list/chosen_players = list() |
Consistent syntax
code/modules/events/flutes.dm
Outdated
var/chosen_players[0] | ||
|
||
//ROUND START PROC | ||
//This gets executed at the start of the round |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is simply not true, it gets executed when the event starts
code/modules/events/flutes.dm
Outdated
var/list/remaining_players = list_intersection(GLOB.player_list, GLOB.alive_mob_list) | ||
var/number_of_players_to_select = round((remaining_players.len / 10), 1) | ||
for(var/i; i<=(number_of_players_to_select == 0 ? 1 : number_of_players_to_select); i++) | ||
var/player = remaining_players[rand(1, remaining_players.len)] | ||
sound_intro(player) | ||
pick_flute_scene(player) | ||
remaining_players.Remove(player) | ||
chosen_players.Add(player) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole proc is a bit weird..
This optimized version does a few things:
- No need to loop through the lists several times to see where it intersects
- C style loops (i=start;i>=end;i++) are much less optimized than "in to" loops (i in start to end)
- We can stop looping through lists once we have our target amount of players
- Variables names should fit within a couple of characters.... number_of_players_to_select is wayyy too long and verbose
Also remove list_intersection() since you dont need it no more
var/list/remaining_players = list_intersection(GLOB.player_list, GLOB.alive_mob_list) | |
var/number_of_players_to_select = round((remaining_players.len / 10), 1) | |
for(var/i; i<=(number_of_players_to_select == 0 ? 1 : number_of_players_to_select); i++) | |
var/player = remaining_players[rand(1, remaining_players.len)] | |
sound_intro(player) | |
pick_flute_scene(player) | |
remaining_players.Remove(player) | |
chosen_players.Add(player) | |
var/target_amount = round((remaining_players.len / 10), 1) | |
var/list/mob/living/carbon/selected = list() | |
for(var/mob/living/carbon/C in GLOB.player_list) | |
if(C.stat) | |
continue //ignore unconcious/dead players | |
sound_intro(C) | |
pick_flute_scene(C) | |
selected.Add(C) | |
if(selected.len >= target_amount) | |
break //were done here |
code/modules/events/flutes.dm
Outdated
M.blur_eyes(40) | ||
M.adjustStaminaLoss(99) | ||
to_chat(M, "<span class='Narsie'><b>Y'HAH HT'HU THRZHZU. UA'KLL GHRT AWN ZUU!</b></span>") | ||
M.adjustBruteLoss(99) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close to the crit point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
purposeful, I want an event that effects a small number of people, and can potentially really fuck them up. If you have a better idea, please tell.
code/modules/events/flutes.dm
Outdated
REMOVE_TRAIT(M, TRAIT_UNSTABLE, M) | ||
M.blur_eyes(5) | ||
M.adjustStaminaLoss(90) | ||
M.adjustBruteLoss(90) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close to the crit point
code/modules/events/flutes.dm
Outdated
M.blur_eyes(5) | ||
M.adjustStaminaLoss(90) | ||
M.adjustBruteLoss(90) | ||
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 90) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close to killing someone
code/modules/events/flutes.dm
Outdated
M.adjustStaminaLoss(99) | ||
to_chat(M, "<span class='Narsie'><b>Y'HAH HT'HU THRZHZU. UA'KLL GHRT AWN ZUU!</b></span>") | ||
M.adjustBruteLoss(99) | ||
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 99.9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close to killing someone
I'll work on these changes shortly. |
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
Still currently a WIP. |
…station into Demon-Flutes-Wailing
Pulled both changes from my work and Xoxeyos's.
Pretty much finished |
I'll take a look at them now. |
Co-authored-by: alexkar598 <25136265+alexkar598@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty sure he dealt with most of em
This adds a new type of event, it randomly picks 1 person per ten people, so for example if you had 30 people, three would be picked, and given one of the nightmarish punishments randomly chosen from the event script.
A few punishments include, brief periods of blurred vision, faint voices, intense headaches, and nigh terminal brain damage in rare instances.
Big help from arcturus-prime.
🆑 Xoxeyos
rscadd: Adds Flutes, an event that can lead to catastrophe.
soundadd: Adds Flutes.ogg for Flute event.
/:cl: