From bb316e231ca96f56668a06ab71c93938b66d0fba Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Wed, 12 Dec 2018 00:22:32 -0500 Subject: [PATCH 1/3] superheroes --- code/__DEFINES/gamemode.dm | 1 + code/game/machinery/wishgranter.dm | 52 ++++++++++++++++++- code/modules/mob/living/carbon/superheroes.dm | 4 +- 3 files changed, 55 insertions(+), 2 deletions(-) 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..edde8309faf 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -39,4 +39,54 @@ 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(!wish) + return + + var/datum/superheroes/S = GLOB.all_superheroes[wish] + if(S.activated) + to_chat(user,"There can only be one! Pick something else!") + return + + if(!src || user.stat == DEAD || (get_dist(src, user) > 4)) //another check after the input to check if someone already used it, or if they're dead, or if they ran off + 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) + + + + + \ No newline at end of file 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) From e71f0b06a26262cd649b48bdf26e574ee93bde87 Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Wed, 12 Dec 2018 00:28:11 -0500 Subject: [PATCH 2/3] super spacing --- code/game/machinery/wishgranter.dm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index edde8309faf..3ccc50193c9 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -41,13 +41,10 @@ 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.") @@ -85,8 +82,3 @@ 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) - - - - - \ No newline at end of file From 4501fd316b8cc3fa6bdf67ce57e33398ed4505cc Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Wed, 12 Dec 2018 00:31:19 -0500 Subject: [PATCH 3/3] super move --- code/game/machinery/wishgranter.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 3ccc50193c9..b2851129a29 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -65,7 +65,7 @@ else wish = input("You want to become...","Wish") as null|anything in types - if(!wish) + 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] @@ -73,8 +73,6 @@ to_chat(user,"There can only be one! Pick something else!") return - if(!src || user.stat == DEAD || (get_dist(src, user) > 4)) //another check after the input to check if someone already used it, or if they're dead, or if they ran off - 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)