A pure-Lua auto-battler on Unity: each unit is driven by a behavior tree, and abilities resolve through a spell/effect system. Deploy your team and let the AI fight.
TeamFight is an auto-battler where units act on their own using a behavior-tree AI. Combat, targeting, movement, and spellcasting are all implemented in Lua on top of a small hand-written game framework.
| System | Details |
|---|---|
| Behavior-Tree AI | Composable tree with selectors (Single / Sequence / Parallel), decorators (SeekTarget, AroundUnits), and actions (Attack, Move, Wait, Static). |
| Spell / effect system | SpellExecutor, SpellInstance, SpellVO, and an EffectManager for data-driven abilities. |
| Card execution | CardExecutor turns cards into battlefield effects. |
| Unit components | ArtiBrain (AI), Avatar, BuffManager, MoveController, ConditionController, Properties — a component-per-concern unit model. |
| Framework | Event manager, config manager, scheduler + timer system, and a LuaBehaviour update loop — all in Lua. |
LuaScripts/
├── GameCore/ Config · Event · Framework (LuaBehaviour) · Scheduler · Utils
└── GameLogics/
└── Battle/
├── AI/ BehaviourTree · Selectors · Decorators · Actions
└── Field/ BattleField · Card · Effect (Spell) · Unit (Components)
Runs on Unity with xLua as the Lua runtime. Original game code authored by me.