MONKEY MODE: "IT ACTUALLY WORKS" EDITION

Probability support for monkey mode.
Player config support for monkey mode.
Check Antags support for monkey mode.
This commit is contained in:
Cheridan
2014-07-08 22:55:47 -05:00
parent d189887d5f
commit 3612a9a8a0
10 changed files with 63 additions and 31 deletions
+1
View File
@@ -26,3 +26,4 @@
#define BE_CULTIST 256
#define BE_BLOB 512
#define BE_NINJA 1024
#define BE_MONKEY 2048
+2 -1
View File
@@ -44,5 +44,6 @@ var/list/be_special_flags = list(
"pAI" = BE_PAI,
"Cultist" = BE_CULTIST,
"Blob" = BE_BLOB,
"Ninja" = BE_NINJA
"Ninja" = BE_NINJA,
"Monkey" = BE_MONKEY
)
-2
View File
@@ -176,8 +176,6 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
if(affected_mob)
if(resistance && !(type in affected_mob.resistances))
affected_mob.resistances += type
/*if(istype(src, /datum/disease/alien_embryo)) //Get rid of the infection flag if it's a xeno embryo.
affected_mob.status_flags &= ~(XENO_HOST)*/
affected_mob.viruses -= src //remove the datum from the list
del(src) //delete the datum to stop it processing
return
+18 -12
View File
@@ -71,7 +71,7 @@
name = "Jungle Fever"
cure = "Bananas"
cure_id = "banana"
spread = "Bites"
spread = "Monkey Bites"
spread_type = SPECIAL
affected_species = list("Monkey", "Human")
permeability_mod = 1
@@ -85,32 +85,38 @@
agent = "Kongey Vibrion M-909"
new_form = /mob/living/carbon/monkey
stage1 = list("")
stage2 = list("")
stage3 = list("")
stage1 = null
stage2 = null
stage3 = null
stage4 = list("<span class='warning'>Your back hurts.</span>", "<span class='warning'>You breathe through your mouth.</span>",
"<span class='warning'>You have a craving for bananas.</span>", "<span class='warning'>Your mind feels clouded.</span>")
stage5 = list("<span class='warning'>You feel like monkeying around.</span>")
/datum/disease/transformation/jungle_fever/do_disease_transformation(var/mob/living/carbon/affected_mob)
if(!ismonkey(affected_mob))
if(ticker && istype(ticker.mode, /datum/game_mode/monkey))
ticker.mode:ape_infectees |= affected_mob.mind
affected_mob.monkeyize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE)
/datum/disease/transformation/jungle_fever/stage_act()
..()
switch(stage)
if(2)
affected_mob << "<span class='notice'>Your [pick("back", "arm", "leg", "elbow", "head")] itches.</span>"
if(prob(2))
affected_mob << "<span class='notice'>Your [pick("back", "arm", "leg", "elbow", "head")] itches.</span>"
if(3)
if (prob(8))
affected_mob.say(pick("Eek?", "Ook ook."))
if (prob(4))
if(prob(4))
affected_mob << "<span class='danger'>You feel a stabbing pain in your head.</span>"
affected_mob.Paralyse(2)
affected_mob.confused += 10
if(4)
if (prob(20))
if(prob(3))
affected_mob.say(pick("Eeek, ook ook!", "Eee-eeek!", "Eeee!", "Ungh, ungh."))
/datum/disease/transformation/jungle_fever/cure()
if(ticker && istype(ticker.mode, /datum/game_mode/monkey))
ticker.mode:ape_infectees.Remove(affected_mob.mind)
..()
/datum/disease/transformation/robot
@@ -121,7 +127,7 @@
agent = "R2D2 Nanomachines"
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
hidden = list(0, 0)
stage1 = list("")
stage1 = null
stage2 = list("Your joints feel stiff.", "\red Beep...boop..")
stage3 = list("\red Your joints feel very stiff.", "Your skin feels loose.", "\red You can feel something move...inside.")
stage4 = list("\red Your skin feels very loose.", "\red You can feel... something...inside you.")
@@ -150,7 +156,7 @@
cure_chance = 5
agent = "Rip-LEY Alien Microbes"
hidden = list(0, 0)
stage1 = list("")
stage1 = null
stage2 = list("Your throat feels scratchy.", "\red Kill...")
stage3 = list("\red Your throat feels very scratchy.", "Your skin feels tight.", "\red You can feel something move...inside.")
stage4 = list("\red Your skin feels very tight.", "\red Your blood boils!", "\red You can feel... something...inside you.")
+1
View File
@@ -221,6 +221,7 @@
if(BE_WIZARD) roletext="wizard"
if(BE_REV) roletext="revolutionary"
if(BE_CULTIST) roletext="cultist"
if(BE_MONKEY) roletext="monkey"
// Ultimate randomizing code right here
+24 -15
View File
@@ -1,9 +1,9 @@
/datum/game_mode/monkey
name = "monkey"
config_tag = "monkey"
antag_flag = BE_REV
antag_flag = BE_MONKEY
required_players = 20
required_players = 2 //20
required_enemies = 1
recommended_enemies = 1
@@ -15,19 +15,23 @@
var/carriers_to_make = 1
var/list/carriers = list()
var/list/ape_infectees = list()
var/monkeys_to_win = 0
var/escaped_monkies = 0
var/escaped_monkeys = 0
var/players_per_carrier = 30
/datum/game_mode/monkey/pre_setup()
carriers_to_make = max(round(num_players()/players_per_carrier, 1), 1)
for(var/datum/mind/player in antag_candidates)
for(var/job in restricted_jobs)//Removing robots from the list
if(player.assigned_role == job)
antag_candidates -= player
for(var/j = 0, j < carriers, j++)
for(var/j = 0, j < carriers_to_make, j++)
if (!antag_candidates.len)
break
var/datum/mind/carrier = pick(antag_candidates)
@@ -35,6 +39,7 @@
carrier.special_role = "monkey"
log_game("[carrier.key] (ckey) has been selected as a Jungle Fever carrier")
antag_candidates -= carrier
if(!carriers.len)
return 0
return 1
@@ -47,19 +52,23 @@
/datum/game_mode/monkey/proc/greet_carrier(var/datum/mind/carrier)
carrier.current << "<B><span class = 'notice'>You are infected by the Jungle Fever patient zero!!</B>"
carrier.current << "<B><span class = 'notice'>You are the Jungle Fever patient zero!!</B>"
carrier.current << "<b>You have been planted onto this station by the Animal Rights Consortium.</b>"
carrier.current << "<b>Soon the disease will transform you into an ape. Afterwards, you will be able spread the infection to others with a bite.</b>"
carrier.current << "<b>While your infection is undetectable, any other infectees will show up on medical equipment.</b>"
carrier.current << "<b>While your infection strain is undetectable by scanners, any other infectees will show up on medical equipment.</b>"
carrier.current << "<b>Your mission will be deemed a success if any of the live infected monkeys reach Centcom.</b>"
return
/datum/game_mode/monkey/post_setup()
for(var/datum/mind/carriermind in carriers)
greet_carrier(carriermind)
var/datum/disease/transformation/jungle_fever/J = new /datum/disease/transformation/jungle_fever
J.hidden = list(1, 1)//Starting disease is hidden from medical equipment
carriermind.current.contract_disease(J, 1, 0)
ape_infectees += carriermind
var/datum/disease/D = new /datum/disease/transformation/jungle_fever
D.hidden = list(1,1)
D.holder = carriermind.current
D.affected_mob = carriermind.current
carriermind.current.viruses += D
..()
/datum/game_mode/monkey/proc/check_monkey_victory()
@@ -67,8 +76,8 @@
if (M.has_disease(/datum/disease/transformation/jungle_fever))
var/area/A = get_area(M)
if(is_type_in_list(A, centcom_areas))
escaped_monkies++
if(escaped_monkies >= monkeys_to_win)
escaped_monkeys++
if(escaped_monkeys >= monkeys_to_win)
return 0
else
return 1
@@ -77,9 +86,9 @@
/datum/game_mode/monkey/declare_completion()
if(!check_monkey_victory())
feedback_set_details("round_end_result","win - monkey win")
feedback_set("round_end_result",escaped_monkies)
world << "\red <FONT size = 3><B> The monkies have overthrown their captors! Eeek eeeek!!</B></FONT>"
feedback_set("round_end_result",escaped_monkeys)
world << "\red <FONT size = 3><B> The monkeys have overthrown their captors! Eeek eeeek!!</B></FONT>"
else
feedback_set_details("round_end_result","loss - staff stopped the monkies")
feedback_set("round_end_result",escaped_monkies)
feedback_set_details("round_end_result","loss - staff stopped the monkeys")
feedback_set("round_end_result",escaped_monkeys)
world << "\red <FONT size = 3><B> The staff managed to contain the monkey infestation!</B></FONT>"
+1 -1
View File
@@ -176,7 +176,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
@param vmessage:
If specified, will display this as the message; such as "chimpering"
for monkies if the mob is not understood. Stored in signal.data["vmessage"].
for monkeys if the mob is not understood. Stored in signal.data["vmessage"].
@param radio:
Reference to the radio broadcasting the message, stored in signal.data["radio"]
+14
View File
@@ -489,6 +489,20 @@
dat += "<tr><td><i>Blob not found!</i></td></tr>"
dat += "</table>"
if(istype(ticker.mode, /datum/game_mode/monkey))
var/datum/game_mode/monkey/mode = ticker.mode
dat += "<br><table cellspacing=5><tr><td><B>Monkey</B></td><td></td><td></td></tr>"
for(var/datum/mind/eek in mode.ape_infectees)
var/mob/M = eek.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(logged out)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
else
dat += "<tr><td><i>Monkey not found!</i></td></tr>"
dat += "</table>"
dat += "</body></html>"
usr << browse(dat, "window=roundstatus;size=400x500")
else
+1
View File
@@ -16,6 +16,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"pAI candidate" = 1, // 7
"cultist" = IS_MODE_COMPILED("cult"), // 8
"blob" = IS_MODE_COMPILED("blob"), // 9
"monkey" = IS_MODE_COMPILED("monkey") // 10
)
+1
View File
@@ -92,6 +92,7 @@ PROBABILITY CHANGELING 2
PROBABILITY WIZARD 4
PROBABILITY MALFUNCTION 1
PROBABILITY BLOB 2
PROBABILITY MONKEY 1
PROBABILITY METEOR 0
PROBABILITY EXTENDED 0