mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
* fixes * fuck my stupid chungus life * Minion limit, heal fix, dead sac fix * cooldown, no sacrificing star gazer or ascended alive heretics * blade debuff * oopsy * Update tgui.bundle.js * map diff bot what ya doing * fuck that chat spam * lets heretic armour hold a haunted longsword * why not it makes sense * do_after * god I hate this bullshit * other lewc stuff * push * heretic id card fix * she tg on my ui till I css * yes * spent * fix / ipc buff (real)™️ * moderate again * revert * no reserve * bringing up to master * update map files to master * didnt replace centcomm * beginning some rebalancing * aggressive spread tweaks * lots of tweaks and fixes * trying to un-key the maps * maybe this time * this time???? * oops * sql fix * basicmob conversion * paintings! and a critical influence fix * rust + tweaks * monster tweak * small change * removing this * more tweaks. no more dusting * added some examine_more * flower seeds * various tweaks. more to come * no more conduit spacing * fixed some dumb stuff * silly stuff * its always prettier * bugfixes and linters * linters, wow * oops * bah * linter * fuck you * temp check * hidden influence drain * influence visible message * tweak fix * void cloak bugfix * small fixes * fixes * do_after_once broken * fixes and tweaks * heretic blade potential fix + sacrifice changes * batch of fixes * tiny tweak * rebuilt TGUI * no greentext + rerolls * logging + bugfix * unused var * small fix * various fixes * comment * projectile change * tgui rebuild * tgui bundle redo * rune issue solved * influence visible now * fix ui reloading * new moon ascension + fixes + icons * tweaks, species sprites * tgui rebuild * small tweak + linter * harvester icon tweak * spans * fixes and tweaks * caretaker nerf + tweaks * potential fix for knowledge * roller fix * mad mask * Update tgui.bundle.js * void phase tweak * Update tgui.bundle.js * misc tweaks * fix heretic not retargeting correctly with cryo * simplify logic * this is better * lots of fixes and tweaks * Update tgui.bundle.js * linter * linter * fireshark and greyscale insanity * fish * Update tgui.bundle.js * linter * linter * tgui * no window shopping * fish fix * tgui rebundle * moon smile runtime fix * various fixes * sacrifice fixes * insanity is easier now, madness mask changes. * bugfixing + teleport change * linters + tweaks * Update code/modules/antagonists/heretic/status_effects/mark_effects.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> * Update code/modules/antagonists/heretic/status_effects/mark_effects.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> --------- Signed-off-by: Kyani <65205627+EmeraldCandy@users.noreply.github.com> Co-authored-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Paul <pmerkamp@gmail.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
92 lines
2.9 KiB
Plaintext
92 lines
2.9 KiB
Plaintext
/**
|
|
* A spell template that adds bounces to the charge_up spell template. The spell will bounce between targets once released.
|
|
* Don't override cast and instead override apply_bounce_effect and the other procs
|
|
*/
|
|
/datum/spell/charge_up/bounce
|
|
/// Sound we make when we hit a mob
|
|
var/bounce_hit_sound
|
|
/// How much time should be between each bounce?
|
|
var/bounce_time = 0 SECONDS
|
|
|
|
/datum/spell/charge_up/bounce/create_new_targeting()
|
|
var/datum/spell_targeting/click/T = new
|
|
T.allowed_type = /mob/living
|
|
T.try_auto_target = FALSE
|
|
T.use_obstacle_check = TRUE
|
|
return T
|
|
|
|
/datum/spell/charge_up/bounce/cast(list/targets, mob/user = usr)
|
|
var/mob/living/target = targets[1]
|
|
|
|
bounce(user, target, get_bounce_energy(), get_bounce_amount(), user)
|
|
|
|
/**
|
|
* How much energy should each bounce have?
|
|
*/
|
|
/datum/spell/charge_up/bounce/proc/get_bounce_energy()
|
|
return
|
|
|
|
/**
|
|
* How much bounces should there be in total?
|
|
*/
|
|
/datum/spell/charge_up/bounce/proc/get_bounce_amount()
|
|
return
|
|
|
|
/**
|
|
* Called when a bounce travels from one mob to another
|
|
*
|
|
* Arguments:
|
|
* * origin - Where the bounce came from
|
|
* * target - The mob that got hit
|
|
*/
|
|
/datum/spell/charge_up/bounce/proc/create_beam(mob/origin, mob/target)
|
|
return
|
|
|
|
/**
|
|
* The proc called when a bounce hits a target. Override this to add an effect
|
|
* The user itself is never hit
|
|
*
|
|
* Arguments:
|
|
* * origin - Where the bounce came from
|
|
* * target - The mob that got hit
|
|
* * energy - How much energy the bounce has
|
|
* * user - The caster of the spell
|
|
*/
|
|
/datum/spell/charge_up/bounce/proc/apply_bounce_effect(mob/origin, mob/target, energy, mob/user)
|
|
return
|
|
|
|
/datum/spell/charge_up/bounce/proc/bounce(mob/origin, mob/target, energy, bounces, mob/user)
|
|
create_beam(origin, target)
|
|
apply_bounce_effect(origin, target, energy, user)
|
|
add_attack_logs(user, target, "Bounce spell '[src]' bounced on")
|
|
playsound(get_turf(target), bounce_hit_sound, 50, TRUE, -1)
|
|
|
|
if(bounces >= 1)
|
|
if(bounce_time)
|
|
addtimer(CALLBACK(src, PROC_REF(continue_bounce), target, get_target(target, user), energy, bounces - 1, user), bounce_time, TIMER_DELETE_ME)
|
|
else
|
|
bounce(target, get_target(target, user), energy, bounces - 1, user)
|
|
|
|
/datum/spell/charge_up/bounce/proc/continue_bounce(mob/origin, mob/target, energy, bounces, mob/user)
|
|
// We will only continue the chain if we exist
|
|
if(QDELETED(target))
|
|
return
|
|
// We fulfilled the conditions, get the next target
|
|
var/mob/living/carbon/to_beam_next = get_target(target, user)
|
|
if(isnull(to_beam_next)) // No target = no chain
|
|
return
|
|
|
|
// Chain again! Recursively
|
|
bounce(target, to_beam_next, energy, bounces - 1, user)
|
|
|
|
/datum/spell/charge_up/bounce/proc/get_target(mob/origin, mob/user)
|
|
var/list/possible_targets = list()
|
|
for(var/mob/living/M in view(targeting.range, origin))
|
|
if(user == M || origin == M && targeting.obstacle_check(origin, M))
|
|
continue
|
|
possible_targets += M
|
|
if(!length(possible_targets))
|
|
return
|
|
|
|
return pick(possible_targets)
|