From f558f9b8408e71285b35341786b68f54b2fe1baf Mon Sep 17 00:00:00 2001 From: Furbeh Date: Mon, 17 Jul 2017 00:01:56 -0700 Subject: [PATCH 1/4] Update Furbeh.yml --- html/changelogs/Furbeh.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/changelogs/Furbeh.yml b/html/changelogs/Furbeh.yml index d886ae7f91e..959cd1b405e 100644 --- a/html/changelogs/Furbeh.yml +++ b/html/changelogs/Furbeh.yml @@ -1,3 +1,4 @@ author: Furbeh -changes: [] delete-after: false +changes: +- tweak: Multiple wizards can spawn at roundstart during a Wizard round, proportional to number of players From 123ea5976abcad3a33fdc5869c6696345e64ca47 Mon Sep 17 00:00:00 2001 From: Furbeh Date: Mon, 17 Jul 2017 00:08:37 -0700 Subject: [PATCH 2/4] Multiple wizards can now spawn at roundstart during a Wizard round --- code/game/gamemodes/wizard/wizard.dm | 44 +++++++++++++++------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index c18373d41ba..c536e1f583c 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -19,14 +19,16 @@ var/finished = 0 + var/const/players_per_wizard = 10 var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) + var/wizard_amount= 1 can_be_mixed = TRUE /datum/game_mode/wizard/announce() to_chat(world, "The current game mode is - Wizard!") - to_chat(world, "There is a SPACE WIZARD on the station. You can't let him achieve his objective!") + to_chat(world, "There are a number of SPACE WIZARDS on the station. You can't let them achieve their objective!") /datum/game_mode/wizard/pre_setup() var/list/datum/mind/possible_wizards = get_players_for_role(ROLE_WIZARD) @@ -34,29 +36,29 @@ log_admin("Failed to set-up a round of wizard. Couldn't find any volunteers to be wizards.") message_admins("Failed to set-up a round of wizard. Couldn't find any volunteers to be wizards.") return 0 - var/datum/mind/wizard - while(possible_wizards.len) - wizard = pick(possible_wizards) - if(wizard.special_role || (mixed && (wizard in ticker.mode.modePlayer))) - possible_wizards -= wizard - wizard = null - continue - else + + wizard_amount= max(round(num_players()/players_per_wizard, 1), 1) + + for(var/j = 0, j < wizard_amount, j++) + if(!possible_wizards.len) break - if(isnull(wizard)) - log_admin("COULD NOT MAKE A WIZARD, Mixed mode is [mixed ? "enabled" : "disabled"]") - message_admins("COULD NOT MAKE A WIZARD, Mixed mode is [mixed ? "enabled" : "disabled"]") - return 0 - wizards += wizard - modePlayer += wizard + var/datum/mind/wizard = pick(possible_wizards) + possible_wizards -= wizard + if(wizard.special_role || (mixed && (wizard in ticker.mode.modePlayer))) + continue + wizards += wizard + modePlayer += wizard + wizard.assigned_role = "MODE" //So they aren't chosen for other jobs. + wizard.special_role = "Wizard" + wizard.original = wizard.current + if(mixed) ticker.mode.modePlayer += wizards //merge into master antag list ticker.mode.wizards += wizards - wizard.assigned_role = "MODE" //So they aren't chosen for other jobs. - wizard.special_role = "Wizard" - wizard.original = wizard.current + if(wizardstart.len == 0) - to_chat(wizard.current, "A starting location for you could not be found, please report this bug!") + for(var/datum/mind/wwwizard in wizards) + to_chat(wwwizard.current, "A starting location for you could not be found, please report this bug!") log_admin("Failed to set-up a round of wizard. Couldn't find any wizard spawn points.") message_admins("Failed to set-up a round of wizard. Couldn't find any wizard spawn points.") return 0 @@ -142,7 +144,7 @@ var/wizard_name_second = pick(wizard_second) var/randomname = "[wizard_name_first] [wizard_name_second]" spawn(0) - var/newname = copytext(sanitize(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN) + var/newname = copytext(sanitize(input(wizard_mob, "You are a Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text),1,MAX_NAME_LEN) if (!newname) newname = randomname @@ -154,7 +156,7 @@ /datum/game_mode/proc/greet_wizard(var/datum/mind/wizard, var/you_are=1) if (you_are) var/wikiroute = role_wiki[ROLE_WIZARD] - to_chat(wizard.current, "You are the Space Wizard! (Wiki Guide)") + to_chat(wizard.current, "You are a Space Wizard! (Wiki Guide)") to_chat(wizard.current, "The Space Wizards Federation has given you the following tasks:") var/obj_count = 1 From dd90e4c335909c70186690251b012da042a623ac Mon Sep 17 00:00:00 2001 From: Furbeh Date: Mon, 17 Jul 2017 00:41:50 -0700 Subject: [PATCH 3/4] Update Furbeh.yml --- html/changelogs/Furbeh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/changelogs/Furbeh.yml b/html/changelogs/Furbeh.yml index 959cd1b405e..5e493753c07 100644 --- a/html/changelogs/Furbeh.yml +++ b/html/changelogs/Furbeh.yml @@ -1,4 +1,4 @@ author: Furbeh delete-after: false changes: -- tweak: Multiple wizards can spawn at roundstart during a Wizard round, proportional to number of players +- rscadd: Multiple wizards can spawn at roundstart during a Wizard round, proportional to number of players From e6b3f91fcbb6847001a0d93626ca24c10a28313d Mon Sep 17 00:00:00 2001 From: Furbeh Date: Mon, 17 Jul 2017 05:09:01 -0700 Subject: [PATCH 4/4] Grammar, remove changelog, keep right number of wizards --- code/game/gamemodes/wizard/wizard.dm | 3 ++- html/changelogs/Furbeh.yml | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index c536e1f583c..daf1c4956e6 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -28,7 +28,7 @@ /datum/game_mode/wizard/announce() to_chat(world, "The current game mode is - Wizard!") - to_chat(world, "There are a number of SPACE WIZARDS on the station. You can't let them achieve their objective!") + to_chat(world, "There are several SPACE WIZARDS on the station. You can't let them achieve their objectives!") /datum/game_mode/wizard/pre_setup() var/list/datum/mind/possible_wizards = get_players_for_role(ROLE_WIZARD) @@ -45,6 +45,7 @@ var/datum/mind/wizard = pick(possible_wizards) possible_wizards -= wizard if(wizard.special_role || (mixed && (wizard in ticker.mode.modePlayer))) + j-- continue wizards += wizard modePlayer += wizard diff --git a/html/changelogs/Furbeh.yml b/html/changelogs/Furbeh.yml index 5e493753c07..d886ae7f91e 100644 --- a/html/changelogs/Furbeh.yml +++ b/html/changelogs/Furbeh.yml @@ -1,4 +1,3 @@ author: Furbeh +changes: [] delete-after: false -changes: -- rscadd: Multiple wizards can spawn at roundstart during a Wizard round, proportional to number of players