From 68c17a1e06b6c76a66163c32ef226a127a70241a Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Wed, 6 May 2015 17:41:11 -0400 Subject: [PATCH] Added Griffin recruit ability --- code/modules/admin/player_panel.dm | 3 + code/modules/mob/living/carbon/superheroes.dm | 85 ++++++++++++++++++- 2 files changed, 85 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 1b75507ac3b..f7f64f0f2b1 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -519,6 +519,9 @@ if(ticker.mode.supervillains.len) dat += check_role_table("Supervillains", ticker.mode.supervillains, src) + if(ticker.mode.greyshirts.len) + dat += check_role_table("Greyshirts", ticker.mode.greyshirts, src) + var/datum/game_mode/mutiny/mutiny = get_mutiny_mode() if(mutiny) dat += mutiny.check_antagonists_ui(src) diff --git a/code/modules/mob/living/carbon/superheroes.dm b/code/modules/mob/living/carbon/superheroes.dm index 7e74525833c..effc2258eca 100644 --- a/code/modules/mob/living/carbon/superheroes.dm +++ b/code/modules/mob/living/carbon/superheroes.dm @@ -1,6 +1,7 @@ /datum/game_mode var/list/datum/mind/superheroes = list() var/list/datum/mind/supervillains = list() + var/list/datum/mind/greyshirts = list() /datum/superheroes var/name @@ -54,11 +55,13 @@ H.regenerate_icons() - ticker.mode.superheroes += H + ticker.mode.superheroes += H.mind + /datum/superheroes/griffin name = "The Griffin" default_genes = list(LASER, RESIST_COLD, RESIST_HEAT, REGEN, NO_BREATH) + default_spells = list(/obj/effect/proc_holder/spell/wizard/targeted/recruit) /datum/superheroes/griffin/equip(var/mob/living/carbon/human/H) ..() @@ -77,7 +80,8 @@ H.regenerate_icons() - ticker.mode.supervillains += H + ticker.mode.supervillains += H.mind + /datum/superheroes/lightnian name = "LightnIan" @@ -102,4 +106,79 @@ H.regenerate_icons() - ticker.mode.superheroes += H \ No newline at end of file + ticker.mode.superheroes += H.mind + + +//The Griffin's special recruit abilitiy +/obj/effect/proc_holder/spell/wizard/targeted/recruit + name = "Recruit Greyshirt" + desc = "Allows you to recruit a conscious, non-braindead, non-catatonic human to be part of the Greyshirts, your personal henchmen. This works on Civilians only and you can recruit a maximum of 3!." + panel = "Shadowling Abilities" + charge_max = 450 + clothes_req = 0 + range = 1 //Adjacent to user + var/recruiting = 0 + +/obj/effect/proc_holder/spell/wizard/targeted/recruit/cast(list/targets) + for(var/mob/living/carbon/human/target in targets) + if(ticker.mode.greyshirts.len >= 3) + usr << "You have already recruited the maximum number of henchmen." + if(!in_range(usr, target)) + usr << "You need to be closer to enthrall [target]." + charge_counter = charge_max + return + if(!target.ckey) + usr << "The target has no mind." + charge_counter = charge_max + return + if(target.stat) + usr << "The target must be conscious." + charge_counter = charge_max + return + if(!ishuman(target)) + usr << "You can only recruit humans." + charge_counter = charge_max + return + if(target.mind.assigned_role != "Civilian") + usr << "You can only recruit Civilians." + if(recruiting) + usr << "You are already recruiting!" + charge_counter = charge_max + return + recruiting = 1 + usr << "This target is valid. You begin the recruiting process." + target << "[usr] focuses in concentration. Your head begins to ache." + + for(var/progress = 0, progress <= 3, progress++) + switch(progress) + if(1) + usr << "You begin by introducing yourself and explaining what you're about." + usr.visible_message("[usr]'s introduces himself and explains his plans.") + if(2) + usr << "You begin the recruitment of [target]." + usr.visible_message("[usr] leans over towards [target], whispering excitedly as he gives a speech.") + target << "You feel yourself agreeing with [usr], and a surge of loyalty begins building." + target.Weaken(12) + sleep(20) + if(isloyal(target)) + usr << "They are enslaved by Nanotrasen. You feel their interest in your cause wane and disappear." + usr.visible_message("[usr] stops talking for a moment, then moves back away from [target].") + target << "Your loyalty implant activates and a sharp pain reminds you of your loyalties to Nanotrasen." + return + if(3) + usr << "You begin filling out the application form with [target]." + usr.visible_message("[usr] pulls out a pen and paper and begins filling an application form with [target].") + target << "You are being convinced by [usr] to fill out an application form to become a henchman." //Ow the edge + if(!do_mob(usr, target, 100)) //around 30 seconds total for enthralling, 45 for someone with a loyalty implant + usr << "The enrollment process has been interrupted - you have lost the attention of [target]." + target << "You move away and are no longer under the charm of [usr]. The application form is null and void." + recruiting = 0 + return + + recruiting = 0 + usr << "You have recruited [target] as your henchman!" + target << "You have decided to enroll as a henchman for [usr]. You are now part of the feared 'Greyshirts'." + target << "You must follow the orders of [usr], and help him succeed in his dastardly schemes." + target << "You may not harm other Greyshirt or [usr]. However, you do not need to obey other Greyshirts." + target.adjustOxyLoss(-200) //In case the shadowling was choking them out + ticker.mode.greyshirts += target.mind