calculate_aoe
Calculate affected tiles and participants for Area of Effect spells like Fireball, Burning Hands, and Lightning Bolt in RPG combat encounters.
Instructions
Calculate which tiles and participants are affected by an Area of Effect spell or ability. Supports circle (Fireball), cone (Burning Hands), and line (Lightning Bolt) shapes.
Example - Fireball (20ft radius circle): { "encounterId": "encounter-1", "shape": "circle", "origin": { "x": 10, "y": 10 }, "radius": 4 }
Example - Burning Hands (15ft cone): { "encounterId": "encounter-1", "shape": "cone", "origin": { "x": 5, "y": 5 }, "direction": { "x": 1, "y": 0 }, "length": 3, "angle": 90 }
Example - Lightning Bolt (100ft line): { "encounterId": "encounter-1", "shape": "line", "origin": { "x": 0, "y": 5 }, "direction": { "x": 1, "y": 0 }, "length": 20 }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| encounterId | Yes | The ID of the encounter | |
| shape | Yes | Shape of the AoE | |
| origin | Yes | Origin point of the AoE | |
| radius | No | Radius for circle shape (in tiles) | |
| direction | No | Direction vector for cone/line (e.g., {x:1,y:0} = East) | |
| length | No | Length for cone/line shapes (in tiles) | |
| angle | No | Angle for cone shape (in degrees, e.g., 90 for quarter circle) | |
| sessionId | No |