port allies-02 to new Lua API