mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
Merge pull request #10446 from Ty-Omaha/superheroes
Re-adds superheroes
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -39,4 +39,44 @@
|
||||
|
||||
user.mind.add_antag_datum(/datum/antagonist/wishgranter)
|
||||
|
||||
to_chat(user, "You have a very bad feeling about this.")
|
||||
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,"<span class='warning'>There can only be one! Pick something else!</span>")
|
||||
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("<span class='notice'>The wishgranter fades into mist..</span>")
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user