Devourer of Gods - laser pattern datapack
=========================================

Drop this folder (or the zip) into  <world>/datapacks/  and run /reload.
The four patterns in it join his laser phase alongside the built-in ones.

Try them straight away without waiting for a fight:

    /dog volley dogexample:cross
    /dog volley dogexample:helix
    /dog volley dogexample:cage
    /dog volley dogexample:lastwords

The command tab-completes every loaded pattern and tells you the beam count.
That is the loop: edit a file, /reload, fire it, look at it.


WHERE THE FILES GO
------------------
    data/<your_namespace>/dog_laser_patterns/<name>.json

Every pattern found in any namespace joins the rotation, so adding one is the
same move as replacing one. To replace a built-in, write a file at its path:

    data/dog/dog_laser_patterns/fan.json     (or grid, cage, chaos)

A file that fails to parse is skipped and named in the log; the rest still load.


A PATTERN
---------
    {
      "spawn": "target",        target | caster. Where the volley is placed.
                                Everything else is relative to it.
      "weight": 1,              how often it comes up. 0 = never, /dog volley only
      "phases": [1, 2],         which halves of the fight it may appear in
      "min_health": 0.0,        only when his health fraction is at least this
      "max_health": 1.0,        only when his health fraction is at most this
      "emitters": [ ... ]       the shapes, listed below
    }

Only "emitters" is required. The rest default to the values shown.


EMITTERS
--------
Every emitter accepts:
    "length"   how far the beams reach          (default 150)
    "radius"   0 = normal beam, >0 = mega-beam  (default 0)

dog:ring        beams evenly around a circle, all aimed the same way
    count           how many                        (12)
    radius_blocks   circle radius                   (20)
    height          height above the spawn point    (0)
    aim             "down", "up", an anchor, or [x,y,z]   (down)
    gaps            slots left empty as an escape   (0)
    random_phase    randomise where the circle starts     (false)

dog:cone        a pitch x yaw grid of directions from one point
    pitch_steps / yaw_steps     grid size           (7 / 13)
    pitch_span / yaw_span       degrees covered     (90 / 120)
    origin          where it is cast from           ([0,0,0])
    aim_at          what it points at               (target_eyes)

dog:lattice     two crossing sets of parallel beams in a flat layer
    lanes           beams per set                   (5)
    spacing         blocks between lanes            (9)
    distance        how far out the sources sit     (45)
    height          height above the spawn point    (0)
    sets            crossing sets                   (2)
    both_sides      mirror to the far side          (false)
    spread          fan from one point instead of parallel  (false)
    random_phase    randomise the rotation          (false)

dog:shell       beams from a sphere's surface, through random nearby points
    count           how many                        (100)
    shell_radius    where they start                (100)
    scatter         how far off centre they aim     (35)

dog:converge    beams from a sphere's surface, ALL through one point
    count           how many                        (16)
    shell_radius    where they start                (70)
    focus           the point they converge on      (target_eyes)

dog:custom      beams written one at a time
    beams           list of { origin, aim | aim_at, length, radius }
                    origin  where it starts
                    aim     a direction: "down", "up", an anchor, or [x,y,z]
                    aim_at  a point to shoot THROUGH: an anchor or [x,y,z]
                    use aim_at unless you specifically want a direction

dog:repeat      stamps another emitter out several times with a transform
    count           how many copies                 (2)
    rotate_y        degrees turned per copy         (0)
    translate       offset added per copy           ([0,0,0])
    of              the emitter to repeat - including another dog:repeat


ANCHORS
-------
Anywhere a point or direction is accepted you may name one of:

    "target_eyes"   the player's eyes at the moment of casting
    "target_feet"   their feet ("target" also works)
    "caster"        the Devourer's head

Anchors resolve when the volley is cast, so they aim at where someone actually
is. A literal [x, y, z] is relative to the spawn point instead.


THE EXAMPLES
------------
cross       four hand-written beams. Deliberately sparse so you can see the
            shape. Phase 1 only. Shows dog:custom, aim vs aim_at, and an anchor.

helix       one beam repeated 24 times, turning 30 degrees and rising 2 blocks
            each time, into a spiral cage. Phase 2 only, and weighted 6 so it
            comes up often. Shows dog:repeat doing the work.

cage        a ring of falling beams with two escape gaps, plus a converging
            burst on the player. Both phases. Shows two emitters combining.

lastwords   a dense sphere that only appears in phase 2 below 15% health.
            Shows min_health / max_health gating.


NOTES
-----
Beams are sent to every nearby client when a volley spawns, so a huge pattern
costs bandwidth as well as server time. maxBeamsPerVolley in the config caps it.

The built-in patterns are ordinary files inside the mod jar, at
data/dog/dog_laser_patterns/. They are worth reading as worked examples.
