Files
Kyani 203105788c [IDB Ignore] Heretic: The Mansus Re-Opened (#30738)
* 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>
2026-01-27 20:36:52 +00:00

82 lines
2.7 KiB
Plaintext

/datum/spell_targeting/cone
max_targets = INFINITY
use_intercept_click = TRUE
/// This controls how many levels the cone has. Increase this value to make a bigger cone.
var/cone_levels = 3
/// This value determines if the cone penetrates walls.
var/respect_density = FALSE
/datum/spell_targeting/cone/choose_targets(mob/user, datum/spell/spell, params, atom/clicked_atom)
var/list/turfs_to_return = list()
var/turf/turf_to_use = get_turf(user)
var/turf/left_turf
var/turf/right_turf
var/dir_to_use = user.dir
var/right_dir
var/left_dir
switch(dir_to_use)
if(NORTH)
left_dir = WEST
right_dir = EAST
if(SOUTH)
left_dir = EAST
right_dir = WEST
if(EAST)
left_dir = NORTH
right_dir = SOUTH
if(WEST)
left_dir = SOUTH
right_dir = NORTH
// Go though every level of the cone levels and generate the cone.
for(var/level in 1 to cone_levels)
var/list/level_turfs = list()
// Our center turf always exists, it's straight ahead of the caster.
turf_to_use = get_step(turf_to_use, dir_to_use)
level_turfs += turf_to_use
// Level 1 only ever has 1 turf, it's a cone.
if(level != 1)
var/level_width_in_each_direction = round((calculate_cone_shape(level) - 1) / 2)
left_turf = turf_to_use
right_turf = turf_to_use
// Check turfs to the left...
for(var/left_of_center in 1 to level_width_in_each_direction)
if(respect_density && left_turf.density)
break
left_turf = get_step(left_turf, left_dir)
level_turfs += left_turf
// And turfs to the right.
for(var/right_of_enter in 1 to level_width_in_each_direction)
if(respect_density && right_turf.density)
break
right_turf = get_step(right_turf, right_dir)
level_turfs += right_turf
// Add the list of all turfs on this level to the turfs to return
turfs_to_return += list(level_turfs)
// If we're at the last level, we're done
if(level == cone_levels)
break
// But if we're not at the last level, we should check that we can keep going
if(respect_density && turf_to_use.density)
break
return turfs_to_return
/**
* Adjusts the width of the cone at the passed level.
* This is never called on the first level of the cone (level 1 is always 1 width)
*
* Return a number - the TOTAL width of the cone at the passed level.
*/
/datum/spell_targeting/cone/proc/calculate_cone_shape(current_level)
// Default formula: (1 (innate) -> 3 -> 5 -> 5 -> 7 -> 7 -> 9 -> 9 -> ...)
return current_level + (current_level % 2) + 1
/datum/spell_targeting/cone/InterceptClickOn(mob/user, params, atom/A, datum/spell/spell)
var/list/targets = choose_targets(user, spell, params, A)
if(!length(targets))
return FALSE // no targets
spell.try_perform(targets, user)
return TRUE