mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-17 21:02:15 +00:00
Refactored the projectile code, mostly in line with TG's now. Refactored various procs that are used or depends on it. Projectiles can now ricochet if enabled to. Damage falloffs with distance. Homing projectiles can now have accuracy falloff with distance. Projectiles have a maximum range. Muzzle flash is configurable per projectile. Impact effect of the projectile is configurable per projectile. Accuracy decreases with distance. Projectiles work with signals and emits them, for easy hooking up from other parts of the code. Meatshielding is now less effective . Impact sound is now configurable per projectile. High risk.
58 lines
1.9 KiB
Plaintext
58 lines
1.9 KiB
Plaintext
/singleton/psionic_power/lightning
|
|
name = "Lightning"
|
|
desc = "Fire a concentrated lightning bolt. Activate this spell in hand to switch to a second mode that hits living beings in a 4x3 area in front of you."
|
|
icon_state = "tech_instabilitytapold"
|
|
point_cost = 0
|
|
ability_flags = PSI_FLAG_APEX
|
|
minimum_rank = PSI_RANK_APEX
|
|
spell_path = /obj/item/spell/projectile/psi_lightning
|
|
|
|
/obj/item/spell/projectile/psi_lightning
|
|
name = "lightning"
|
|
icon_state = "chain_lightning"
|
|
cast_methods = CAST_RANGED|CAST_USE
|
|
aspect = ASPECT_PSIONIC
|
|
spell_projectile = /obj/projectile/beam/psi_lightning
|
|
fire_sound = 'sound/magic/LightningShock.ogg'
|
|
cooldown = 10
|
|
psi_cost = 15
|
|
var/mode = 0
|
|
|
|
/obj/item/spell/projectile/psi_lightning/on_use_cast(mob/user, bypass_psi_check)
|
|
. = ..(user, TRUE)
|
|
mode = !mode
|
|
if(mode)
|
|
to_chat(user, SPAN_NOTICE("You will now fire area-of-effect lightning in a 4x3 area in front of you."))
|
|
spell_projectile = /obj/projectile/beam/psi_lightning/wide
|
|
|
|
else
|
|
to_chat(user, SPAN_NOTICE("You will now fire a normal lightning bolt."))
|
|
spell_projectile = /obj/projectile/beam/psi_lightning
|
|
|
|
/obj/projectile/beam/psi_lightning
|
|
name = "psionic lightning"
|
|
damage = 30
|
|
armor_penetration = 30
|
|
damage_type = DAMAGE_BURN
|
|
pass_flags = PASSTABLE | PASSGRILLE | PASSRAILING
|
|
range = 40
|
|
accuracy = 100
|
|
|
|
muzzle_type = /obj/effect/projectile/muzzle/tesla
|
|
tracer_type = /obj/effect/projectile/tracer/tesla
|
|
impact_type = /obj/effect/projectile/impact/tesla
|
|
|
|
|
|
/obj/projectile/beam/psi_lightning/pellet
|
|
damage = 20
|
|
armor_penetration = 20
|
|
|
|
/obj/projectile/beam/psi_lightning/wide
|
|
damage = 20
|
|
armor_penetration = 20
|
|
|
|
/obj/projectile/beam/psi_lightning/wide/Initialize()
|
|
. = ..()
|
|
for(var/i = 1 to 4)
|
|
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom, fire_projectile), /obj/projectile/beam/psi_lightning/pellet, get_random_turf_in_range(get_turf(firer), i + rand(0, i), 0, TRUE, FALSE), firer = firer)
|