diff --git a/code/__DEFINES/gamemode.dm b/code/__DEFINES/gamemode.dm index 38e820b4768..4a45b3e6a65 100644 --- a/code/__DEFINES/gamemode.dm +++ b/code/__DEFINES/gamemode.dm @@ -35,6 +35,7 @@ #define SPECIAL_ROLE_SHADOWLING "Shadowling" #define SPECIAL_ROLE_SHADOWLING_THRALL "Shadowling Thrall" #define SPECIAL_ROLE_SLAUGHTER_DEMON "Slaughter Demon" +#define SPECIAL_ROLE_SUPER "Super" #define SPECIAL_ROLE_SYNDICATE_DEATHSQUAD "Syndicate Commando" #define SPECIAL_ROLE_TRAITOR "Traitor" #define SPECIAL_ROLE_VAMPIRE "Vampire" diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 248514179af..b2851129a29 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -39,4 +39,44 @@ user.mind.add_antag_datum(/datum/antagonist/wishgranter) - to_chat(user, "You have a very bad feeling about this.") \ No newline at end of file + to_chat(user, "You have a very bad feeling about this.") + +/obj/machinery/wish_granter/super + name = "super wish granter" + var/list/types = list() + +/obj/machinery/wish_granter/super/attack_hand(mob/living/carbon/user) + if(!ishuman(user)) + to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.") + return + else if(is_special_character(user) || jobban_isbanned(user, ROLE_TRAITOR) || jobban_isbanned(user, "Syndicate")) + to_chat(user, "Something instinctual makes you pull away.") + return + else + + to_chat(user, "Your touch makes the Wish Granter stir. Are you really sure you want to do this?") + + for(var/supname in GLOB.all_superheroes) + types += supname + + var/wish + if(types.len == 1) + wish = pick(types) + else + wish = input("You want to become...","Wish") as null|anything in types + + if(!src || !wish || user.stat == DEAD || (get_dist(src, user) > 4)) //another check after the input to check if someone already used it, closed it, or if they're dead, or if they ran off + return + + var/datum/superheroes/S = GLOB.all_superheroes[wish] + if(S.activated) + to_chat(user,"There can only be one! Pick something else!") + return + + S.create(user) + S.activated = TRUE //sets this superhero as taken so we don't have duplicates + playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1) + visible_message("The wishgranter fades into mist..") + add_attack_logs(null, user, "Became [GLOB.all_superheroes[wish]]") + notify_ghosts("[GLOB.all_superheroes[wish]] has appeared in [get_area(user)].", source = user) + qdel(src) diff --git a/code/modules/mob/living/carbon/superheroes.dm b/code/modules/mob/living/carbon/superheroes.dm index 50b22a2c8ed..4e04090b649 100644 --- a/code/modules/mob/living/carbon/superheroes.dm +++ b/code/modules/mob/living/carbon/superheroes.dm @@ -9,13 +9,15 @@ var/class var/list/default_genes = list(REGEN, BREATHLESS, COLDRES) var/list/default_spells = list() - + var/activated = FALSE //for wishgranters to not give an option if someone already has it. + /datum/superheroes/proc/create(var/mob/living/carbon/human/H) assign_genes(H) assign_spells(H) equip(H) fixflags(H) assign_id(H) + H.mind.special_role = SPECIAL_ROLE_SUPER /datum/superheroes/proc/equip(var/mob/living/carbon/human/H) H.rename_character(H.real_name, name)