mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #7090 from ZomgPonies/superheroes2
Superheroes update
This commit is contained in:
@@ -15,13 +15,15 @@
|
||||
var/image/halo = null
|
||||
action_icon_state = "lightning"
|
||||
var/sound/Snd // so far only way i can think of to stop a sound, thank MSO for the idea.
|
||||
var/damaging = TRUE
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/lightnian
|
||||
clothes_req = 0
|
||||
invocation_type = "none"
|
||||
damaging = 0
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/Click()
|
||||
if(!ready && start_time==0)
|
||||
if(!ready && start_time == 0)
|
||||
if(cast_check())
|
||||
StartChargeup()
|
||||
else
|
||||
@@ -32,12 +34,12 @@
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/proc/StartChargeup(mob/user = usr)
|
||||
ready = 1
|
||||
to_chat(user, "<span class='notice'>You start gathering the power.</span>")
|
||||
Snd = new/sound('sound/magic/lightning_chargeup.ogg',channel = 7)
|
||||
Snd = new/sound('sound/magic/lightning_chargeup.ogg', channel = 7)
|
||||
halo = image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = EFFECTS_LAYER)
|
||||
user.overlays.Add(halo)
|
||||
playsound(get_turf(user), Snd, 50, 0)
|
||||
start_time = world.time
|
||||
if(do_mob(user,user,100,uninterruptible=1))
|
||||
if(do_mob(user, user, 100, uninterruptible=1))
|
||||
if(ready)
|
||||
Discharge()
|
||||
|
||||
@@ -61,9 +63,9 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/cast(list/targets, mob/user = usr)
|
||||
ready = 0
|
||||
var/mob/living/carbon/target = targets[1]
|
||||
Snd=sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
|
||||
playsound(get_turf(user),Snd,50,0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
|
||||
var/mob/living/target = targets[1]
|
||||
Snd = sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
|
||||
playsound(get_turf(user), Snd, 50, 0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
|
||||
if(get_dist(user,target)>range)
|
||||
to_chat(user, "<span class='notice'>They are too far away!</span>")
|
||||
Reset(user)
|
||||
@@ -73,17 +75,37 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
|
||||
user.Beam(target,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5)
|
||||
|
||||
var/energy = min(world.time - start_time,100)
|
||||
Bolt(user,target,max(15,energy/2),5,user) //5 bounces for energy/2 burn
|
||||
if(damaging)
|
||||
Bolt(user,target,max(15,energy/2),5,user) //5 bounces for energy/2 burn
|
||||
else
|
||||
var/bounces = round(energy/20)
|
||||
Bolt(user,target,0,bounces,user)
|
||||
Reset(user)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/proc/Bolt(mob/origin, mob/target, bolt_energy, bounces, mob/user = usr)
|
||||
origin.Beam(target,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5)
|
||||
var/mob/living/carbon/current = target
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/proc/Bolt(mob/origin, mob/living/target, bolt_energy, bounces, mob/user = usr)
|
||||
origin.Beam(target,icon_state="lightning[rand(1,12)]", icon='icons/effects/effects.dmi', time=5)
|
||||
var/mob/living/current = target
|
||||
if(bounces < 1)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
if(damaging)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
else
|
||||
current.AdjustJitter(1000) //High numbers for violent convulsions
|
||||
current.do_jitter_animation(current.jitteriness)
|
||||
current.AdjustStuttering(2)
|
||||
current.Slowed(3)
|
||||
spawn(20)
|
||||
current.AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less
|
||||
playsound(get_turf(current), 'sound/magic/LightningShock.ogg', 50, 1, -1)
|
||||
else
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
if(damaging)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
else
|
||||
current.AdjustJitter(1000) //High numbers for violent convulsions
|
||||
current.do_jitter_animation(current.jitteriness)
|
||||
current.AdjustStuttering(2)
|
||||
current.Slowed(3)
|
||||
spawn(20)
|
||||
current.AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less
|
||||
playsound(get_turf(current), 'sound/magic/LightningShock.ogg', 50, 1, -1)
|
||||
var/list/possible_targets = new
|
||||
for(var/mob/living/M in view_or_range(range,target,"view"))
|
||||
|
||||
@@ -12,34 +12,37 @@
|
||||
random_target = 1
|
||||
var/energy = 0
|
||||
var/ready = 0
|
||||
var/start_time = 0
|
||||
var/image/halo = null
|
||||
var/sound/Snd // so far only way i can think of to stop a sound, thank MSO for the idea.
|
||||
action_icon_state = "tech"
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/magnet/Click()
|
||||
if(!ready)
|
||||
if(!ready && start_time == 0)
|
||||
if(cast_check())
|
||||
StartChargeup()
|
||||
else
|
||||
if(cast_check(skipcharge=1))
|
||||
if(ready && cast_check(skipcharge=1))
|
||||
choose_targets()
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/magnet/proc/StartChargeup(mob/user = usr)
|
||||
ready = 1
|
||||
to_chat(user, "<span class='notice'>You start gathering the power.</span>")
|
||||
Snd = new/sound('sound/magic/lightning_chargeup.ogg', channel = 7)
|
||||
halo = image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = EFFECTS_LAYER)
|
||||
user.overlays.Add(halo)
|
||||
spawn(0)
|
||||
while(ready)
|
||||
sleep(1)
|
||||
energy++
|
||||
if(energy >= 100 && ready)
|
||||
Discharge()
|
||||
playsound(get_turf(user), Snd, 50, 0)
|
||||
start_time = world.time
|
||||
if(do_mob(user, user, 100, uninterruptible=1))
|
||||
if(ready)
|
||||
Discharge()
|
||||
|
||||
obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
|
||||
ready = 0
|
||||
energy = 0
|
||||
start_time = 0
|
||||
if(halo)
|
||||
user.overlays.Remove(halo)
|
||||
|
||||
@@ -50,16 +53,16 @@ obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/magnet/proc/Discharge(mob/user = usr)
|
||||
var/mob/living/M = user
|
||||
//M.electrocute_act(25,"magnet Bolt")
|
||||
to_chat(M, "<span class='danger'>You lose control over the power.</span>")
|
||||
Reset(user)
|
||||
start_recharge()
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/magnet/cast(list/targets, mob/user = usr)
|
||||
|
||||
var/mob/living/carbon/target = targets[1]
|
||||
|
||||
ready = 0
|
||||
var/mob/living/target = targets[1]
|
||||
Snd = sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
|
||||
playsound(get_turf(user), Snd, 50, 0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
|
||||
if(get_dist(user,target)>range)
|
||||
to_chat(user, "<span class='notice'>They are too far away!</span>")
|
||||
Reset(user)
|
||||
@@ -88,13 +91,13 @@ obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
|
||||
playsound(get_turf(target), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
if(75 to 100)
|
||||
//CHAIN magnet
|
||||
Bolt(user,target,energy,user)
|
||||
Bolt(user,target,energy,5,user)
|
||||
Reset(user)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/magnet/proc/Bolt(mob/origin,mob/target,bolt_energy,mob/user = usr)
|
||||
origin.Beam(target,icon_state="lightning",icon='icons/effects/effects.dmi',time=5)
|
||||
/obj/effect/proc_holder/spell/targeted/magnet/proc/Bolt(mob/origin,mob/target,bolt_energy,bounces, mob/user = usr)
|
||||
origin.Beam(target, icon_state="lightning", icon='icons/effects/effects.dmi', time=5)
|
||||
var/mob/living/carbon/current = target
|
||||
if(bolt_energy < 75)
|
||||
if(bounces < 1)
|
||||
for(var/obj/item/I in target.l_hand)
|
||||
if(I.flags & CONDUCT)
|
||||
I.throw_at(user, I.throw_range, 4, target)
|
||||
@@ -119,4 +122,4 @@ obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
|
||||
return
|
||||
var/mob/living/next = pick(possible_targets)
|
||||
if(next)
|
||||
Bolt(current,next,bolt_energy-6,user) // 5 max bounces
|
||||
Bolt(current,next,bolt_energy,bounces-1,user) // 5 max bounces
|
||||
@@ -379,9 +379,6 @@
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
actions_types = list(/datum/action/item_action/caw)
|
||||
|
||||
/obj/item/clothing/head/griffin/super_hero
|
||||
flags = BLOCKHAIR|NODROP
|
||||
|
||||
/obj/item/clothing/head/griffin/attack_self()
|
||||
caw()
|
||||
|
||||
|
||||
@@ -167,8 +167,6 @@
|
||||
icon_state = "griffinboots"
|
||||
item_state = "griffinboots"
|
||||
|
||||
/obj/item/clothing/shoes/griffin/super_hero
|
||||
flags = NODROP
|
||||
|
||||
/obj/item/clothing/shoes/fluff/noble_boot
|
||||
name = "noble boots"
|
||||
|
||||
@@ -817,8 +817,6 @@
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite)
|
||||
actions_types = list(/datum/action/item_action/toggle_wings)
|
||||
|
||||
/obj/item/clothing/suit/toggle/owlwings/super_hero
|
||||
flags = NODROP
|
||||
|
||||
/obj/item/clothing/suit/toggle/owlwings/griffinwings
|
||||
name = "griffon cloak"
|
||||
@@ -826,9 +824,6 @@
|
||||
icon_state = "griffin_wings"
|
||||
item_state = "griffin_wings"
|
||||
|
||||
/obj/item/clothing/suit/toggle/owlwings/griffinwings/super_hero
|
||||
flags = NODROP
|
||||
|
||||
/obj/item/clothing/suit/toggle/attack_self()
|
||||
if(icon_state == initial(icon_state))
|
||||
icon_state = icon_state + "_t"
|
||||
|
||||
@@ -729,18 +729,12 @@
|
||||
icon_state = "owl"
|
||||
item_color = "owl"
|
||||
|
||||
/obj/item/clothing/under/owl/super_hero
|
||||
flags = NODROP
|
||||
|
||||
/obj/item/clothing/under/griffin
|
||||
name = "griffon uniform"
|
||||
desc = "A soft brown jumpsuit with a white feather collar made of synthetic feathers and a lust for mayhem."
|
||||
icon_state = "griffin"
|
||||
item_color = "griffin"
|
||||
|
||||
/obj/item/clothing/under/griffin/super_hero
|
||||
flags = NODROP
|
||||
|
||||
/obj/item/clothing/under/noble_clothes
|
||||
name = "noble clothes"
|
||||
desc = "They fall just short of majestic."
|
||||
|
||||
@@ -14,15 +14,19 @@
|
||||
assign_genes(H)
|
||||
assign_spells(H)
|
||||
equip(H)
|
||||
fixflags(H)
|
||||
assign_id(H)
|
||||
|
||||
/datum/superheroes/proc/equip(var/mob/living/carbon/human/H)
|
||||
H.rename_character(H.real_name, name)
|
||||
for(var/obj/item/W in H)
|
||||
if(istype(W,/obj/item/organ)) continue
|
||||
for(var/obj/item/W in H.get_all_slots())
|
||||
H.unEquip(W)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_l_ear)
|
||||
|
||||
/datum/superheroes/proc/fixflags(var/mob/living/carbon/human/H)
|
||||
for(var/obj/item/W in H.get_all_slots())
|
||||
W.flags |= NODROP
|
||||
|
||||
/datum/superheroes/proc/assign_genes(var/mob/living/carbon/human/H)
|
||||
if(default_genes.len)
|
||||
for(var/gene in default_genes)
|
||||
@@ -42,14 +46,17 @@
|
||||
W.registered_name = H.real_name
|
||||
W.access = list(access_maint_tunnels)
|
||||
if(class == "Superhero")
|
||||
W.name = "[H.real_name]'s ID Card (Superhero)"
|
||||
W.assignment = "Superhero"
|
||||
W.rank = "Superhero"
|
||||
ticker.mode.superheroes += H.mind
|
||||
else if(class == "Supervillain")
|
||||
W.name = "[H.real_name]'s ID Card (Supervillain)"
|
||||
W.assignment = "Supervillain"
|
||||
W.rank = "Supervillain"
|
||||
ticker.mode.supervillains += H.mind
|
||||
|
||||
W.icon_state = "lifetimeid"
|
||||
W.SetOwnerInfo(H)
|
||||
W.UpdateName()
|
||||
W.flags |= NODROP
|
||||
H.equip_to_slot_or_del(W, slot_wear_id)
|
||||
H.regenerate_icons()
|
||||
|
||||
@@ -66,8 +73,8 @@
|
||||
..()
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black/greytide(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/owl/super_hero(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/super_hero(H), slot_wear_suit)
|
||||
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/super_hero(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)
|
||||
@@ -84,15 +91,13 @@
|
||||
/datum/superheroes/griffin/equip(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/griffin/super_hero(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/griffin/super_hero(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/griffinwings/super_hero(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/griffin/super_hero(H), slot_head)
|
||||
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/implant/freedom/L = new/obj/item/weapon/implant/freedom(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
return 1
|
||||
L.implant(H, H)
|
||||
|
||||
|
||||
/datum/superheroes/lightnian
|
||||
@@ -217,18 +222,20 @@
|
||||
target.s_tone = 35
|
||||
// No `update_dna=0` here because the character is being over-written
|
||||
target.change_eye_color(1,1,1)
|
||||
for(var/obj/item/W in target)
|
||||
if(istype(W,/obj/item/organ)) continue
|
||||
for(var/obj/item/W in target.get_all_slots())
|
||||
target.unEquip(W)
|
||||
target.rename_character(target.real_name, "Generic Henchman ([rand(1, 1000)])")
|
||||
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)
|
||||
var/obj/item/weapon/card/id/syndicate/W = new(target)
|
||||
W.registered_name = target.real_name
|
||||
W.access = list(access_maint_tunnels)
|
||||
W.name = "[target.real_name]'s ID Card (Greyshirt)"
|
||||
W.assignment = "Greyshirt"
|
||||
target.equip_to_slot_or_del(W, slot_wear_id)
|
||||
target.equip_to_slot_or_del(new /obj/item/device/radio/headset(target), slot_l_ear)
|
||||
var/obj/item/weapon/card/id/syndicate/W = new(target)
|
||||
W.icon_state = "lifetimeid"
|
||||
W.access = list(access_maint_tunnels)
|
||||
W.assignment = "Greyshirt"
|
||||
W.rank = "Greyshirt"
|
||||
W.flags |= NODROP
|
||||
W.SetOwnerInfo(target)
|
||||
W.UpdateName()
|
||||
target.equip_to_slot_or_del(W, slot_wear_id)
|
||||
target.regenerate_icons()
|
||||
|
||||
Reference in New Issue
Block a user