Superhero Update

This commit is contained in:
ZomgPonies
2015-05-05 17:13:16 -04:00
parent bbc5432f3d
commit ee7e560919
5 changed files with 92 additions and 98 deletions
+6
View File
@@ -36,6 +36,7 @@ var/global/list/all_species[0]
var/global/list/all_languages[0]
var/global/list/language_keys[0] // Table of say codes for all languages
var/global/list/all_nations[0]
var/global/list/all_superheros[0]
var/global/list/whitelisted_species = list()
//global var of unsafe-to-spawn-on-reaction mobs
@@ -141,6 +142,11 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
var/datum/nations/N = new T
all_nations[N.name] = N
paths = typesof(/datum/superheros)-/datum/superheros
for(var/T in paths)
var/datum/superheros/S = new T
all_superheros[S.name] = S
//Languages and species.
paths = typesof(/datum/language)-/datum/language
for(var/T in paths)
+1 -1
View File
@@ -295,7 +295,7 @@
var/turf/T = get_turf(src)
var/turf/U = get_turf(A)
var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam(loc)
var/obj/item/projectile/beam/disabler/LE = new /obj/item/projectile/beam/disabler(loc)
LE.icon = 'icons/effects/genetics.dmi'
LE.icon_state = "eyelasers"
playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1)
+14 -97
View File
@@ -8,7 +8,13 @@
anchored = 1
density = 1
var/datum/mind/target
var/list/types = list("Owlman", "The Griffin")
var/list/types = list()
/obj/machinery/wish_granter/New()
for(var/supname in all_superheros)
types |= supname
..()
/obj/machinery/wish_granter/attack_hand(var/mob/user as mob)
usr.set_machine(src)
@@ -22,109 +28,20 @@
else
user << "The power of the Wish Granter have turned you into the superhero the station deserves. You are a masked vigilante, and answer to no man. Will you use your newfound strength to protect the innocent, or will you hunt the guilty?"
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/mob/living/carbon/human/M = user
switch(wish)
if("Owlman")
types -= "Owlman"
M.fully_replace_character_name(M.real_name, "Owlman")
for(var/obj/item/W in M)
M.unEquip(W)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/under/owl(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/owl_mask(M), slot_wear_mask)
var/obj/item/weapon/card/id/syndicate/W = new(M)
W.name = "[M.real_name]'s ID Card (Superhero)"
W.access = get_all_accesses()
W.assignment = "Superhero"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
M.regenerate_icons()
var/datum/objective/protect/protect = new
protect.owner = user.mind
if(target)
protect.target = target
else
protect.find_target()
target = protect.target
user.mind.objectives += protect
if("The Griffin")
types -= "The Griffin"
M.fully_replace_character_name(M.real_name, "The Griffin")
for(var/obj/item/W in M)
M.unEquip(W)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/griffin(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/under/griffin(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/griffinwings(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/griffin(M), slot_head)
var/obj/item/weapon/card/id/syndicate/W = new(M)
W.name = "[M.real_name]'s ID Card (Supervillain)"
W.access = get_all_accesses()
W.assignment = "Supervillain"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
M.regenerate_icons()
var/datum/objective/assassinate/assasinate = new
assasinate.owner = user.mind
if(target)
assasinate.target = target
else
assasinate.find_target()
target = assasinate.target
user.mind.objectives += assasinate
ticker.mode.traitors += user.mind
user.mind.special_role = wish
var/obj_count = 1
for(var/datum/objective/OBJ in user.mind.objectives)
user << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
//Time to hand out the powers, since they are currently generic
if (!(HULK in user.mutations))
user.dna.SetSEState(HULKBLOCK,1)
if (!(LASER in user.mutations))
user.mutations.Add(LASER)
if (!(XRAY in user.mutations))
user.mutations.Add(XRAY)
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
user.see_in_dark = 8
user.see_invisible = SEE_INVISIBLE_LEVEL_TWO
if (!(RESIST_COLD in user.mutations))
user.mutations.Add(RESIST_COLD)
if (!(RESIST_HEAT in user.mutations))
user.mutations.Add(RESIST_HEAT)
if (!(TK in user.mutations))
user.mutations.Add(TK)
if(!(REGEN in user.mutations))
user.mutations.Add(REGEN)
user.update_mutations()
var/datum/superheros/S = all_superheros[wish]
if(S)
S.assign_genes(M)
S.assign_spells(M)
S.equip(M)
//Remove the wishgranter or teleport it randomly on the station
if(!types.len)
@@ -0,0 +1,70 @@
/datum/superheros
var/name
var/list/default_genes = list()
var/list/default_spells = list()
/datum/superheros/proc/equip(var/mob/living/carbon/human/H)
H.fully_replace_character_name(H.real_name, name)
for(var/obj/item/W in H)
if(istype(W,/obj/item/organ)) continue
H.unEquip(W)
/datum/superheros/proc/assign_genes(var/mob/living/carbon/human/H)
if(default_genes.len)
for(var/gene in default_genes.len)
H.mutations |= gene
H.update_mutations()
return
/datum/superheros/proc/assign_spells(var/mob/living/carbon/human/H)
return
/datum/superheros/owlman
name = "Owlman"
default_genes = list(LASER, RESIST_COLD, RESIST_HEAT, REGEN, NO_BREATH)
/datum/superheros/owlman/equip(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/owl(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/owl_mask(H), slot_wear_mask)
var/obj/item/weapon/card/id/syndicate/W = new(H)
W.name = "[H.real_name]'s ID Card (Superhero)"
W.access = get_all_accesses()
W.assignment = "Superhero"
W.registered_name = H.real_name
H.equip_to_slot_or_del(W, slot_wear_id)
H.regenerate_icons()
/datum/superheros/griffin
name = "The Griffin"
default_genes = list(LASER, RESIST_COLD, RESIST_HEAT, REGEN, NO_BREATH)
/datum/superheros/griffin/equip(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/griffin(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/griffin(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/griffinwings(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/griffin(H), slot_head)
var/obj/item/weapon/card/id/syndicate/W = new(H)
W.name = "[H.real_name]'s ID Card (Supervillain)"
W.access = get_all_accesses()
W.assignment = "Supervillain"
W.registered_name = H.real_name
H.equip_to_slot_or_del(W, slot_wear_id)
H.regenerate_icons()
/* Dont fill out until ready (sprites + powers)
/datum/superheros/lightnian
name = "LightnIan"
*/
+1
View File
@@ -1183,6 +1183,7 @@
#include "code\modules\mob\living\carbon\life.dm"
#include "code\modules\mob\living\carbon\shock.dm"
#include "code\modules\mob\living\carbon\species.dm"
#include "code\modules\mob\living\carbon\superheros.dm"
#include "code\modules\mob\living\carbon\alien\alien.dm"
#include "code\modules\mob\living\carbon\alien\alien_defenses.dm"
#include "code\modules\mob\living\carbon\alien\death.dm"