@ECHO OFF
SET LOG=step0003.log
SET DG=..\GameDataFolder\level0_Final
ECHO LOG FILE FOR ANALYZING FLUCTUATIONS OF PARTICLE M3GM AND MOST TXMP > %LOG%
FOR %%L IN (1 2 3 4 6 8 9 10 11 12 13 14 18 19) DO (
    FOR %%D IN (..\GameDataFolder\level%%L_Final) DO (
        IF EXIST %%D (
            ECHO Level %%L: moving particle M3GM to level 0...
            ECHO Level %%L: moving particle M3GM to level 0... >> %LOG%
            OniSplit.exe -copy %DG% %%D\M3GMdebris*.oni %%D\M3GMtoxic_bubble.oni %%D\M3GMelec*.oni %%D\M3GMrat*.oni %%D\M3GMjet.oni %%D\M3GMbomb_*.oni %%D\M3GMbarab_swave.oni %%D\M3GMbloodyfoot.oni >> %LOG%
            OniSplit.exe -move ..\temp\level%%L_Final\M3GM %%D\M3GMdebris*.oni %%D\M3GMtoxic_bubble.oni %%D\M3GMelec*.oni %%D\M3GMrat*.oni %%D\M3GMjet.oni %%D\M3GMbomb_*.oni %%D\M3GMbarab_swave.oni %%D\M3GMbloodyfoot.oni
            ECHO Level %%L: moving almost all TXMP to level 0...
            ECHO Level %%L: moving almost all TXMP to level 0... >> %LOG%
            OniSplit.exe -copy %DG% %%D\ONSK*.oni >> %LOG%
            OniSplit.exe -move ..\temp\level%%L_Final\ONSK %%D\ONSK*.oni
            OniSplit.exe -copy %DG% %%D\TXMPfail*.oni >> %LOG%
            OniSplit.exe -move ..\temp\level%%L_Final\TXMB %%D\TXMPfail*.oni
            OniSplit.exe -move %%D\TXMB %%D\TXMB*.oni
            OniSplit.exe -move %%D\LSI %%D\M3GMpowerup_lsi.oni %%D\TXMPlsi_icon.oni
            OniSplit.exe -copy %DG% %%D\TXMP*.oni >> %LOG%
            OniSplit.exe -move ..\temp\level%%L_Final\TXMP %%D\TXMP*.oni
        )
    )
)
