mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-25 17:12:12 +00:00
* Basic Mob Raw Prophet (#78733) ## About The Pull Request Might as well start on these now, should be easy enough. The Raw Prophet actually comes with a couple of new components. The `wheel` element is sort of like the `waddling` element in that you give it to any movable atom to have it move like a raw prophet.  Whee! The focused attacker component can be attached to any mob or item and causes it to escalate its damage every time you attack the same target. I'll be honest I consistently forget that the Raw Prophet does this. The ones in the Ruin have the blinding gaze attack inherited from Watchers instead of the point-target Blind spell in order to ensure that you can actually "dodge" it. I tried to make it jaunt if it got stuck but ran into too many problems. Another time. ## Why It's Good For The Game I do this to relax now. ## Changelog 🆑 refactor: Raw Prophets now use the basic mob framework. Please report any unusual behaviour. /🆑 * Basic Mob Raw Prophet --------- Co-authored-by: Jacquerel <hnevard@gmail.com>
29 lines
938 B
Plaintext
29 lines
938 B
Plaintext
/// Element which spins you as you move
|
|
/datum/element/wheel
|
|
|
|
/datum/element/wheel/Attach(datum/target)
|
|
. = ..()
|
|
if(!ismovable(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
|
|
|
|
/datum/element/wheel/Detach(datum/source)
|
|
. = ..()
|
|
UnregisterSignal(source, COMSIG_MOVABLE_MOVED)
|
|
|
|
/datum/element/wheel/proc/on_moved(atom/movable/moved, atom/oldloc, direction, forced)
|
|
SIGNAL_HANDLER
|
|
if(forced || CHECK_MOVE_LOOP_FLAGS(moved, MOVEMENT_LOOP_OUTSIDE_CONTROL))
|
|
return
|
|
if(isliving(moved))
|
|
var/mob/living/living_moved = moved
|
|
if (living_moved.incapacitated() || living_moved.body_position == LYING_DOWN)
|
|
return
|
|
var/rotation_degree = (360 / 3)
|
|
if(direction & SOUTHWEST)
|
|
rotation_degree *= -1
|
|
|
|
var/matrix/to_turn = matrix(moved.transform)
|
|
to_turn = turn(moved.transform, rotation_degree)
|
|
animate(moved, transform = to_turn, time = 0.1 SECONDS, flags = ANIMATION_PARALLEL)
|