Every cell inside a circular sector: an arc of degrees centred on the aim, rays cast
across it every 0.5 degrees, each ray clamped to range and stopped by a wall. The union
of those rays is the sector, so a wall in the arc shadows everything behind it while the
rest of the cone still reaches.
This is a different shape from coneCells, not a better one. A sector is aimed at an angle
and keeps it: a breath weapon, a searchlight, a blast of gas. coneCells snaps the aim to
one of the eight directions and widens a linear spray from it, which is what a wand fired
down a corridor wants. coneSector needs the level (that is what stops its rays), so it is
a plain function rather than one of AreaShape's kinds, whose resolver must work without
one; a game calls it wherever it would call resolveAreaOnLevel. The aim's own cell is not
in the result, so a caster is never inside its own cone.
Every cell inside a circular sector: an arc of
degreescentred on the aim, rays cast across it every 0.5 degrees, each ray clamped torangeand stopped by a wall. The union of those rays is the sector, so a wall in the arc shadows everything behind it while the rest of the cone still reaches.This is a different shape from
coneCells, not a better one. A sector is aimed at an angle and keeps it: a breath weapon, a searchlight, a blast of gas.coneCellssnaps the aim to one of the eight directions and widens a linear spray from it, which is what a wand fired down a corridor wants.coneSectorneeds the level (that is what stops its rays), so it is a plain function rather than one ofAreaShape's kinds, whose resolver must work without one; a game calls it wherever it would callresolveAreaOnLevel. The aim's own cell is not in the result, so a caster is never inside its own cone.