Multi Target AoE System


Area attacks, multi-target selection and follow-up strikes for tactical RPGs. Seven ScriptableObject shapes, friendly-fire and line-of-sight control, swappable damage math. Grid-agnostic.


by GMSKIII


Price History +

ENGLISH

Every tactical RPG eventually needs area attacks — and hand-coding them tends to go the same way. One more branch for every new shape. Friendly-fire rules copy-pasted into each attack. Simultaneous strikes where whoever was processed first quietly wins. Three hits on one enemy stacking three unreadable damage numbers on top of each other. And a follow-up system you can never find the right place to insert.


This package takes that entire problem off your hands. You implement one interface on your own unit class, and everything else — shapes, targeting rules, hit resolution, follow-ups and pacing — is handled for you.


FULLY AUTHORABLE SHAPES

Attack areas are ScriptableObjects, so designers build and tune them entirely in the Inspector. Seven types ship with the package: single cell, radius (switch one metric for a diamond, a square, a true circle or a donut ring), cross, piercing line, cone, hand-drawn cell patterns for map weapons, and a composite shape that combines the others with union, intersection and difference. When you need a shape nobody thought of, subclass one base class and write one method — the asset's own code is never touched.


CONTROL OVER WHO GETS CAUGHT

Friendly fire is four checkboxes: hostiles, allies, neutrals, self. Line of sight removes anyone standing behind cover, with both a cell-walking and a physics-raycast implementation included. Cap the number of victims and order them by proximity or remaining health for multi-lock-on bombing. Filter by tags so anti-air weapons only reach flying units. Shape the damage falloff from ground zero with an AnimationCurve.


RESOLUTION THAT BEHAVES CORRECTLY

Hits are resolved in two stages: every roll is settled first, then all of them are applied at once. Simultaneous attacks therefore trade properly instead of favouring whoever ran first, repeated hits on one victim collapse into a single readable number, and you can inspect the whole outcome before committing it — which is what lets you time your camera work around it.


MULTI-TARGET, COMBOS AND FOLLOW-UPS

Build skills where the player names N victims by hand, repeats allowed, so concentrating fire on one enemy versus spreading it across three becomes a real decision. Gate a combo on companions standing nearby, defined entirely as data. Queue follow-up attacks from the initial strike's outcome using five bundled conditions — speed advantage, health threshold, tags, chance, and what the first blow actually did.


GENRE AND GRID AGNOSTIC

Nothing here references a specific game, unit type or setting. Coordinates flow through one lightweight value type that converts implicitly from Vector3Int, so 2D Tilemaps, 3D grids and node graphs all work. If you dislike the built-in accuracy and damage formula, implement one interface and replace it outright — the area resolution, batching and follow-up pipeline keep working unchanged. That makes this a good fit for projects that already have a combat system and only want the area side solved.


A DEMO YOU CAN ACTUALLY RUN

One menu click generates a complete showcase scene, and pressing Play walks through all sixteen features with captions. It uses no external assets whatsoever — every shape is generated in code — and it doubles as a worked example of the integration you will write yourself.



JAPANESE

SRPGを作っていれば、いずれ範囲攻撃が必要になります。そして自作すると、だいたい同じ道をたどります。形状を1つ足すたびに増える分岐。攻撃ごとにコピペされる味方巻き込みの判定。同時攻撃のはずが、先に処理された側だけが得をする。同じ敵に3発当たれば、読めない数字が3つ重なる。そして追撃を入れたくても、既存の処理のどこに挟めばいいか分からない。


本パッケージは、この問題を丸ごと引き受けます。あなたのユニットクラスにインターフェースを1つ実装するだけで、形状・対象選定・命中判定・追撃・演出のテンポまでを任せられます。


■ 自由に作れる範囲形状

攻撃範囲はScriptableObjectなので、デザイナーがインスペクタだけで作成・調整できます。同梱は7種類。単体、半径(測り方を1つ変えるだけで菱形・正方形・真円・ドーナツ状に)、十字、貫通する直線、扇形、マップ兵器のための手描きマス指定、そしてそれらをUnion・Intersection・Differenceで合成する形状。誰も思いつかなかった形が必要になっても、基底クラスを継承してメソッドを1つ書くだけで済み、本体コードには一切触れません。


■ 誰を巻き込むかの制御

フレンドリーファイアは、敵・味方・中立・自分自身の4つのチェックボックスです。遮蔽は障害物の陰にいる対象を除外し、マス走査方式とRaycast方式の両方を同梱しています。対象数に上限を設け、距離や残りHPで並べれば、マルチロックオン爆撃になります。タグで絞れば、対空兵装は飛行ユニットにしか届きません。爆心地からの減衰はAnimationCurveで設計できます。


■ 正しく振る舞う判定

命中判定は2段階です。まず全ての判定を確定させ、その後に一斉に適用します。だから同時攻撃は先に処理された側を優遇せずきちんと相打ちになり、同一対象への複数ヒットは読める1つの数値にまとまり、適用前に結果全体を覗けます。これが、カメラワークの尺を先に組める理由です。


■ マルチターゲット・連携・追撃

プレイヤーが対象をN回自由に指名する技を作れます。同じ相手を複数回選べるため、1体に集中させるか3体へ散らすかが本物の判断になります。近くの仲間を条件にした連携技も、すべてデータとして定義できます。追撃は初撃の結果からキューに積まれ、速力差・HP閾値・タグ・確率・初撃の結果という5つの条件を同梱しています。


■ ジャンルにもグリッドにも依存しません

特定のゲーム・ユニット種別・世界観を一切参照していません。座標はVector3Intから暗黙変換される軽量な値型に集約されているため、2D Tilemap・3Dグリッド・ノードグラフのいずれでも動作します。同梱の命中・ダメージ計算式が気に入らなければ、インターフェースを1つ実装して丸ごと置き換えてください。範囲判定・バッチ処理・追撃パイプラインはそのまま動き続けます。すでに戦闘システムをお持ちで、範囲まわりだけを解決したいプロジェクトに向いています。


■ 実際に動かせるデモ

メニューを1回押せば完全な実演シーンが生成され、再生すると16の機能が字幕付きで流れます。外部アセットは一切使わず、図形はすべてコードで生成しています。同時に、あなたが書くことになる導入コードの見本にもなっています。