Merge pull request #952 from ZomgPonies/superhero

Massive Superhero Update
This commit is contained in:
Fox-McCloud
2015-05-06 23:40:08 -04:00
28 changed files with 578 additions and 106 deletions
+1
View File
@@ -116,6 +116,7 @@ var/global/nologevent = 0
<A href='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> |
<A href='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> |
<A href='?src=\ref[src];makeslime=\ref[M]'>Make slime</A>
<A href='?src=\ref[src];makesuper=\ref[M]'>Make Superhero</A>
"}
//Simple Animals
+9
View File
@@ -516,6 +516,15 @@
if(ticker.mode.xenos.len)
dat += check_role_table("Xenos", ticker.mode.xenos, src)
if(ticker.mode.superheroes.len)
dat += check_role_table("Superheroes", ticker.mode.superheroes, src)
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)
+10
View File
@@ -1397,6 +1397,16 @@
usr.client.cmd_admin_slimeize(H)
else if(href_list["makeslime"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makesuper"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
usr.client.cmd_admin_super(H)
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN)) return
+17
View File
@@ -281,6 +281,23 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else
alert("Invalid mob")
/client/proc/cmd_admin_super(var/mob/M in mob_list)
set category = "Event"
set name = "Make Superhero"
if(!ticker)
alert("Wait until the game starts")
return
if(ishuman(M))
var/type = input("Pick the Superhero","Superhero") as null|anything in all_superheroes
var/datum/superheroes/S = all_superheroes[type]
if(S)
S.create(M)
log_admin("[key_name(src)] has turned [M.key] into a Superhero.")
message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into a Superhero.", 1)
else
alert("Invalid mob")
/*
/client/proc/cmd_admin_monkeyize(var/mob/M in world)
set category = "Event"
+1 -1
View File
@@ -237,7 +237,7 @@
desc = "Woof!"
icon_state = "corgihead"
item_state = "chickensuit"
flags = BLOCKHAIR
flags = BLOCKHAIR | NODROP
siemens_coefficient = 2.0
/obj/item/clothing/head/bearpelt
+3
View File
@@ -13,6 +13,9 @@
redcoat
_color = "redcoat" //Exists for washing machines. Is not different from black shoes in any way.
/obj/item/clothing/shoes/black/greytide
flags = NODROP
/obj/item/clothing/shoes/brown
name = "brown shoes"
desc = "A pair of brown shoes."
@@ -156,6 +156,7 @@
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET
flags_inv = HIDESHOES|HIDEJUMPSUIT
siemens_coefficient = 2.0
flags = NODROP
/obj/item/clothing/suit/monkeysuit
name = "Monkey Suit"
+3
View File
@@ -50,6 +50,9 @@
flags = ONESIZEFITSALL
species_fit = list("Vox")
/obj/item/clothing/under/color/grey/greytide
flags = ONESIZEFITSALL | NODROP
/obj/item/clothing/under/color/orange
name = "orange jumpsuit"
desc = "Don't wear this near paranoid security officers"
@@ -310,6 +310,20 @@ This function restores all organs.
damage = damage*species.brute_mod
if(organ.take_damage(damage, 0, sharp, edge, used_weapon))
UpdateDamageIcon()
if(LAssailant && ishuman(LAssailant))
var/mob/living/carbon/human/H = LAssailant
if(H.mind && H.mind in (ticker.mode.superheroes || ticker.mode.supervillains || ticker.mode.greyshirts))
var/list/attack_bubble_recipients = list()
var/mob/living/user
for(var/mob/O in viewers(user, src))
if (O.client && !( O.blinded ))
attack_bubble_recipients.Add(O.client)
spawn(0)
var/image/dmgIcon = image('icons/effects/hit_blips.dmi', src, "dmg[rand(1,2)]",MOB_LAYER+1)
dmgIcon.pixel_x = (!lying) ? rand(-3,3) : rand(-11,12)
dmgIcon.pixel_y = (!lying) ? rand(-11,9) : rand(-10,1)
//world << "x: [dmgIcon.pixel_x] AND y: [dmgIcon.pixel_y]"
flick_overlay(dmgIcon, attack_bubble_recipients, 9)
receive_damage()
if(BURN)
damageoverlaytemp = 20
@@ -0,0 +1,188 @@
/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
var/class
var/list/default_genes = list(REGEN, NO_BREATH, RESIST_COLD)
var/list/default_spells = list()
/datum/superheroes/proc/create(var/mob/living/carbon/human/H)
assign_genes(H)
assign_spells(H)
equip(H)
assign_id(H)
/datum/superheroes/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/superheroes/proc/assign_genes(var/mob/living/carbon/human/H)
if(default_genes.len)
for(var/gene in default_genes)
H.mutations |= gene
H.update_mutations()
/datum/superheroes/proc/assign_spells(var/mob/living/carbon/human/H)
if(default_spells.len)
for(var/spell in default_spells)
var/obj/effect/proc_holder/spell/wizard/S = spell
if(!S) return
H.spell_list += new S
H.update_power_buttons()
/datum/superheroes/proc/assign_id(var/mob/living/carbon/human/H)
var/obj/item/weapon/card/id/syndicate/W = new(H)
W.registered_name = H.real_name
W.access = get_all_accesses()
if(class == "Superhero")
W.name = "[H.real_name]'s ID Card (Superhero)"
W.assignment = "Superhero"
ticker.mode.superheroes += H.mind
else if(class == "Supervillain")
W.name = "[H.real_name]'s ID Card (Supervillain)"
W.assignment = "Supervillain"
ticker.mode.supervillains += H.mind
H.equip_to_slot_or_del(W, slot_wear_id)
H.regenerate_icons()
/datum/superheroes/owlman
name = "Owlman"
class = "Superhero"
/datum/superheroes/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)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/bluespace/owlman(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(H), slot_glasses)
/datum/superheroes/griffin
name = "The Griffin"
default_spells = list(/obj/effect/proc_holder/spell/wizard/targeted/recruit)
class = "Supervillain"
/datum/superheroes/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)
/datum/superheroes/lightnian
name = "LightnIan"
default_spells = list(/obj/effect/proc_holder/spell/wizard/targeted/lightning/lightnian)
class = "Superhero"
/datum/superheroes/lightnian/equip(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/brown(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/corgisuit(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/corgi(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/bedsheet/orange(H), slot_back)
///////////////////////////////POWERS/ABILITIES CODE/////////////////////////////////////////
//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 << "<span class='warning'>You have already recruited the maximum number of henchmen.</span>"
if(!in_range(usr, target))
usr << "<span class='warning'>You need to be closer to enthrall [target].</span>"
charge_counter = charge_max
return
if(!target.ckey)
usr << "<span class='warning'>The target has no mind.</span>"
charge_counter = charge_max
return
if(target.stat)
usr << "<span class='warning'>The target must be conscious.</span>"
charge_counter = charge_max
return
if(!ishuman(target))
usr << "<span class='warning'>You can only recruit humans.</span>"
charge_counter = charge_max
return
if(target.mind.assigned_role != "Civilian")
usr << "<span class='warning'>You can only recruit Civilians.</span>"
if(recruiting)
usr << "<span class='danger'>You are already recruiting!</span>"
charge_counter = charge_max
return
recruiting = 1
usr << "<span class='danger'>This target is valid. You begin the recruiting process.</span>"
target << "<span class='userdanger'>[usr] focuses in concentration. Your head begins to ache.</span>"
for(var/progress = 0, progress <= 3, progress++)
switch(progress)
if(1)
usr << "<span class='notice'>You begin by introducing yourself and explaining what you're about.</span>"
usr.visible_message("<span class='danger'>[usr]'s introduces himself and explains his plans.</span>")
if(2)
usr << "<span class='notice'>You begin the recruitment of [target].</span>"
usr.visible_message("<span class='danger'>[usr] leans over towards [target], whispering excitedly as he gives a speech.</span>")
target << "<span class='danger'>You feel yourself agreeing with [usr], and a surge of loyalty begins building.</span>"
target.Weaken(12)
sleep(20)
if(isloyal(target))
usr << "<span class='notice'>They are enslaved by Nanotrasen. You feel their interest in your cause wane and disappear.</span>"
usr.visible_message("<span class='danger'>[usr] stops talking for a moment, then moves back away from [target].</span>")
target << "<span class='danger'>Your loyalty implant activates and a sharp pain reminds you of your loyalties to Nanotrasen.</span>"
return
if(3)
usr << "<span class='notice'>You begin filling out the application form with [target].</span>"
usr.visible_message("<span class='danger'>[usr] pulls out a pen and paper and begins filling an application form with [target].</span>")
target << "<span class='danger'>You are being convinced by [usr] to fill out an application form to become a henchman.</span>" //Ow the edge
if(!do_mob(usr, target, 100)) //around 30 seconds total for enthralling, 45 for someone with a loyalty implant
usr << "<span class='danger'>The enrollment process has been interrupted - you have lost the attention of [target].</span>"
target << "<span class='warning'>You move away and are no longer under the charm of [usr]. The application form is null and void.</span>"
recruiting = 0
return
recruiting = 0
usr << "<span class='notice'>You have recruited <b>[target]</b> as your henchman!</span>"
target << "<span class='deadsay'><b>You have decided to enroll as a henchman for [usr]. You are now part of the feared 'Greyshirts'.</b></span>"
target << "<span class='deadsay'><b>You must follow the orders of [usr], and help him succeed in his dastardly schemes.</span>"
target << "<span class='deadsay'>You may not harm other Greyshirt or [usr]. However, you do not need to obey other Greyshirts.</span>"
ticker.mode.greyshirts += target.mind
target.set_species("Human")
target.h_style = "Bald"
target.fully_replace_character_name(target.real_name, "Generic Henchman ([rand(1, 1000)])")
for(var/obj/item/W in target)
if(istype(W,/obj/item/organ)) continue
target.unEquip(W)
target.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey/greytide(target), slot_w_uniform)
target.equip_to_slot_or_del(new /obj/item/clothing/shoes/black/greytide(target), slot_shoes)
target.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical/greytide(target), slot_l_hand)
target.regenerate_icons()
@@ -741,6 +741,17 @@
construction_time = 100
category = list("Exosuit Equipment")
/datum/design/mech_bolas
name = "Exosuit Weapon Design (PCMK-6 Bolas Launcher)"
desc = "Allows for the construction of PCMK-6 Bolas Launcher."
id = "mech_bolas"
build_type = MECHFAB
req_tech = list("combat" = 3)
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas
materials = list("$metal"=10000)
construction_time = 100
category = list("Exosuit Equipment")
/datum/design/mech_teleporter
name = "Exosuit Module (Teleporter Module)"
desc = "An exosuit module that allows exosuits to teleport to any position in view."