@galaxyops/character-sheet-contracts
Version:
121 lines (112 loc) • 2.76 kB
text/typescript
// TODO some shapes do not translate well to 45 degree angles
export namespace AreaOfEffect {
/**
* [z axis][y axis][x axis]
* 7 = hit, caster facing left
* 0 = miss
* 1 = hit
*
* each array entry represents a 5 square feet
* no two players can occupy the same space
*/
export type Type = number[][][];
export const CONE_REAR_15FT: Type = [
[
[], // 10ft - 15ft
[], // 0ft - 5ft
[], // 10ft - 15ft
],
];
export const CONE_15FT: Type = [
[
[], // 10ft - 15ft
[], // 0ft - 5ft
[], // 10ft - 15ft
],
[
[], // 10ft - 15ft
[], // 0ft - 5ft
[], // 10ft - 15ft
],
[
[], // 10ft - 15ft
[], // 0ft - 5ft
[], // 10ft - 15ft
],
];
export const CONE_20FT: Type = [
[
[], // 10ft - 15ft
[], // 0ft - 5ft
[], // 10ft - 15ft
],
[
[], // 15ft - 20ft
[], // 10ft - 15ft
[], // 0ft - 5ft
[], // 10ft - 15ft
[], // 15ft - 20ft
],
[
[], // 10ft - 15ft
[], // 0ft - 5ft
[], // 10ft - 15ft
],
];
// Radius (Circle) with a 15 ft range
export const RADIUS_15FT: Type = [
[
[], // 15ft
[], // 10ft - 15ft
[], // 5ft - 10ft
[], // 10ft - 15ft
[], // 15ft
],
];
// Burst with a 15 ft range
export const BURST_15FT: Type = [
[
[], // 10ft - 15ft
[], // 5ft - 10ft
[], // 0ft - 5ft
[], // 5ft - 10ft
[], // 10ft - 15ft
],
];
// Line with a 15 ft range
export const LINE_10FT: Type = [
[
[], // 0ft - 5ft
],
];
// Line with a 15 ft range
export const LINE_15FT: Type = [
[
[], // 0ft - 5ft
],
];
// Cube (3D area) with a 15 ft range
export const CUBE_15FT: Type = [
[
[], // 10ft - 15ft
[], // 5ft - 10ft
[], // 0ft - 5ft
[], // 5ft - 10ft
[], // 10ft - 15ft
],
[
[], // 10ft - 15ft
[], // 5ft - 10ft
[], // 0ft - 5ft
[], // 5ft - 10ft
[], // 10ft - 15ft
],
[
[], // 10ft - 15ft
[], // 5ft - 10ft
[], // 0ft - 5ft
[], // 5ft - 10ft
[], // 10ft - 15ft
],
];
}