Files
vgstation13/code/modules/spells/targeted/projectile/pie_throw.dm
boy2mantwicethefam 40c840911a Spell specialization clean-up (#25521)
* stuff

* clean-up for the PR
2019-12-30 08:48:27 -03:00

41 lines
1.2 KiB
Plaintext

/spell/targeted/projectile/pie
name = "Projectile Pastry"
abbreviation = "PP"
desc = "This spell summons a random pie, and throws it at the location of your choosing. More power means more pies."
user_type = USER_TYPE_WIZARD
specialization = SSOFFENSIVE
school = "evocation"
charge_max = 100
spell_flags = 0
invocation = "FLA'K PA'STRY"
invocation_type = SpI_SHOUT
range = 20
spell_aspect_flags = SPELL_FIRE
spell_flags = WAIT_FOR_CLICK | IS_HARMFUL
duration = 20
projectile_speed = 1
level_max = list(Sp_TOTAL = 5, Sp_POWER = 5)
hud_state = "pie"
/spell/targeted/projectile/pie/empower_spell()
spell_levels[Sp_POWER]++
return "Your spell now throws [spell_levels[Sp_POWER]+1] pies at once!"
/spell/targeted/projectile/pie/cast(list/targets, mob/user = usr)
for(var/atom/target in targets)
if (user.is_pacified(VIOLENCE_DEFAULT,target))
return
spawn()
var/turf/T = get_turf(user)
for(var/i = 0 to spell_levels[Sp_POWER])
var/atom/target = pick(targets)
var/pie_to_spawn = pick(existing_typesof(/obj/item/weapon/reagent_containers/food/snacks/pie))
var/obj/pie = new pie_to_spawn(T)
to_chat(user, "You summon and throw \a [pie].")
pie.throw_at(target, range, (spell_levels[Sp_POWER]+1)*20)
sleep(5)