An area skill has to work out who is inside the area. There are four ways, with different costs and different things that break them. Choose by what your map can guarantee.
| 체력으로 표시하기 | Set the target's hit points to a percentage, detect that exact value, restore it. The cheapest - one action and one condition per unit slot - and it breaks the moment anything else damages the unit. Defence maps only. |
|---|---|
| 유닛 종류 바꾸기 | CP-trick the unit's type field to an unused id, Bring on that id, restore. One loop pass, and this is the version that survives a versus map. |
| 로케이션 + 유닛 루프 | Move a location onto the caster and loop every unit checking whether it is inside. The slowest and the one that never breaks. |
| 좌표로 계산 | Read each unit's position and compare it with the cast point. The cheapest per unit, though you still need a loop to visit them, and it ignores collision and elevation. |
If you use the hit-point marker, make it a large one. Setting 10 and detecting 9 at 90% also catches any enemy whose health happens to be 9. Use 10,000 and detect 9,900 at 99% and far fewer things wander onto it by accident.
Cap how many targets an aura touches per tick. With no cap, units piling into one tile make the cost grow quadratically - the kind of failure that behaves perfectly until the moment everything bunches up.
Knockback and dash are the same structure, and it is not one big move: it is a small move repeated every cycle for a fixed number of cycles.
- 1Use a death counter as the push timer and take one off it every cycle.
- 2Work out the direction - the angle from the blast to the victim.
- 3Put a location on the victim, shift it a little in that direction, and MoveUnit the victim onto it.
| 한 사이클에 약 11픽셀 | Move further than that in one cycle and it reads as teleporting rather than sliding. |
|---|---|
| 각도의 0도는 3시 방향 | Zero degrees is three o'clock, not twelve. Depending on which helper produced the angle you may be a quarter-turn out, so check the direction in game rather than trusting the sign. |
| 1초 안에 끝내기 | While a unit is being pushed by MoveUnit it effectively cannot be hit, so a long knockback is an invulnerability window. Ten cycles - about 0.4 seconds at stock speed - is enough. |
