diff --git a/code/__DEFINES/roguetown/rebel.dm b/code/__DEFINES/roguetown/rebel.dm new file mode 100644 index 000000000..42b67dc72 --- /dev/null +++ b/code/__DEFINES/roguetown/rebel.dm @@ -0,0 +1,6 @@ +/// Time the rebels get after victory to rule before it round ends +#define REBEL_RULE_TIME 15 MINUTES +/// Time the rebel leader needs to sit on the throne to be capable +#define REBEL_THRONE_TIME 5 MINUTES +/// Every other rebel nearby the ruler on the throne makes it this much faster to announce victory, in percents +#define REBEL_THRONE_SPEEDUP_PER_PERSON 0.3 diff --git a/code/game/gamemodes/roguetown/roguetown.dm b/code/game/gamemodes/roguetown/roguetown.dm index 431cd9dfb..bba9bd91f 100644 --- a/code/game/gamemodes/roguetown/roguetown.dm +++ b/code/game/gamemodes/roguetown/roguetown.dm @@ -34,6 +34,7 @@ var/global/list/roguegamemodes = list("Rebellion", "Vampires and Werewolves", "E var/skeletons = FALSE var/headrebdecree = FALSE + var/reb_end_time = 0 var/check_for_lord = TRUE var/next_check_lord = 0 @@ -75,7 +76,16 @@ var/global/list/roguegamemodes = list("Rebellion", "Vampires and Werewolves", "E SSvote.initiate_vote("endround", pick("Zlod", "Sun King", "Gaia", "Moon Queen", "Aeon", "Gemini", "Aries")) if(headrebdecree) - return TRUE + if(reb_end_time == 0) + to_chat(world, span_boldannounce("The peasant rebels took control of the throne, hail the new community!")) + if(ttime >= INITIAL_ROUND_TIMER) + reb_end_time = ttime + REBEL_RULE_TIME + to_chat(world, span_boldwarning("The round will end in 15 minutes.")) + else + reb_end_time = INITIAL_ROUND_TIMER + to_chat(world, span_boldwarning("The round will end at the 2:30 hour mark.")) + if(ttime >= reb_end_time) + return TRUE check_for_lord() /* @@ -124,11 +134,7 @@ var/global/list/roguegamemodes = list("Rebellion", "Vampires and Werewolves", "E return TRUE if(SSticker.manualmodes) forcedmodes |= SSticker.manualmodes - var/list/major_modes = list(1, 2, 3) - var/list/minor_modes = list(1,2,3) - if(prob(25)) - minor_modes += 4 //maniac - var/majorpicked = pick(major_modes) + if(forcedmodes.len) message_admins("Manual gamemodes selected.") for(var/G in forcedmodes) @@ -152,34 +158,31 @@ var/global/list/roguegamemodes = list("Rebellion", "Vampires and Werewolves", "E if("Extended") log_game("Major Antagonist: Extended") return TRUE - switch(majorpicked) - if(1) + + var/major_roll = rand(1,100) + switch(major_roll) + if(1 to 35) pick_rebels() log_game("Major Antagonist: Rebellion") - if(2) - log_game("Major Antagonist: Extended") //gotta put something here. - if(3) //WWs and Vamps now normally roll together + if(36 to 80) + //WWs and Vamps now normally roll together pick_vampires() pick_werewolves() log_game("Major Antagonist: Vampires and Werewolves") - minor_modes = shuffle(minor_modes) - for(var/m in minor_modes) - switch(m) - if(1) - pick_bandits() - log_game("Minor Antagonist: Bandit") - if(2) - pick_aspirants() - log_game("Minor Antagonist: Aspirant") - if(3) - log_game("Minor Antagonist: Extended") // placeholder. - if(4) - pick_maniac() - log_game("Minor Antagonist: Maniac") - if(prob(30)) - continue - return TRUE + if(81 to 100) + log_game("Major Antagonist: Extended") //gotta put something here. + if(prob(80)) + pick_bandits() + log_game("Minor Antagonist: Bandit") + if(prob(45)) + pick_aspirants() + log_game("Minor Antagonist: Aspirant") + // if(prob(10)) + // pick_maniac() + // log_game("Minor Antagonist: Maniac") + + return TRUE /datum/game_mode/chaosmode/proc/pick_bandits() //BANDITS banditgoal = rand(200,400) diff --git a/code/modules/roguetown/roguemachine/throne.dm b/code/modules/roguetown/roguemachine/throne.dm index c6aed6360..0a34ec145 100644 --- a/code/modules/roguetown/roguemachine/throne.dm +++ b/code/modules/roguetown/roguemachine/throne.dm @@ -1,3 +1,5 @@ +GLOBAL_VAR(king_throne) + /obj/structure/roguethrone name = "throne of rockhill" desc = "A big throne, to hold the Lord's giant personality. Say 'help' with the crown on your head if you are confused." @@ -9,6 +11,8 @@ max_integrity = 999999 buckle_lying = FALSE obj_flags = NONE + var/rebel_leader_sit_time = 0 + var/notified_rebel_able = FALSE /obj/structure/roguethrone/post_buckle_mob(mob/living/M) ..() @@ -31,6 +35,38 @@ GLOB.lordcolor -= src return ..() +/obj/structure/roguethrone/process() + var/dt = 1 SECONDS + process_rebel_leader_sit(dt) + . = ..() + +/obj/structure/roguethrone/proc/process_rebel_leader_sit(dt) + if(!length(buckled_mobs)) + return + var/mob/living/user = buckled_mobs[1] + if(user.stat != CONSCIOUS) + return + var/datum/antagonist/prebel/P = user.mind?.has_antag_datum(/datum/antagonist/prebel) + if(!P) + return + if(rebel_leader_sit_time == 0) + to_chat(user, span_notice("Finally, I'm sitting on the throne - when I get more comfortable here I'll be able to announce victory. Other rebels here will help me get comfortable faster.")) + var/time_modifier = 1.0 + /// Increase modifier for every other conscious rebel in view + for(var/mob/living/living_mob in view(7, loc)) + if(living_mob == user) + continue + if(living_mob.stat != CONSCIOUS) + continue + var/datum/antagonist/prebel/rebel_antag = living_mob.mind?.has_antag_datum(/datum/antagonist/prebel) + if(!rebel_antag) + continue + time_modifier += REBEL_THRONE_SPEEDUP_PER_PERSON + rebel_leader_sit_time += (dt * time_modifier) + if(rebel_leader_sit_time >= REBEL_THRONE_TIME && !notified_rebel_able) + notified_rebel_able = TRUE + to_chat(user, span_notice("That's it - time to announce our victory!")) + /obj/structure/roguethrone/lordcolor(primary,secondary) if(!primary || !secondary) return diff --git a/config/game_options.txt b/config/game_options.txt index c7e775091..509424413 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -88,7 +88,7 @@ NO_INTERCEPT_REPORT ## Default probablity is 1, increase to make that mode more likely to be picked. ## Set to 0 to disable that mode. -PROBABILITY ROGUEMODE 99 +PROBABILITY CHAOSMODE 99 PROBABILITY TRAITOR 0 PROBABILITY TRAITORBRO 0 PROBABILITY TRAITORCHAN 0 diff --git a/roguetown.dme b/roguetown.dme index dd7463a42..6948c28ae 100644 --- a/roguetown.dme +++ b/roguetown.dme @@ -125,6 +125,7 @@ #include "code\__DEFINES\dcs\helpers.dm" #include "code\__DEFINES\dcs\signals.dm" #include "code\__DEFINES\dcs\signals_atom_lighting.dm" +#include "code\__DEFINES\roguetown\rebel.dm" #include "code\__DEFINES\roguetown\werewolf.dm" #include "code\__HELPERS\_lists.dm" #include "code\__HELPERS\_logging.dm"