Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

function onThunder()
{
    player.isinrain = player.level.name in this.rainlevels;
    // RegionId(0)
    // RegionId(1)
    if (client.disableeffects) 
    {
        lit#10 = "flash";
        // RegionId(1)
        // RegionId(2)
        if (player.platform == lit#10) 
        {
        }
    }
    // RegionId(4)
    if (phi<idx=0, regions=()>) 
    {
        lit#11 = 201;
        fn_call#13 = hideimg#12(lit#11);
        lit#14 = 0;
        return lit#14;
    }
    // RegionId(5)
    else
    {
        // RegionId(5)
        // RegionId(6)
        if (!this.thundermode) 
        {
            lit#16 = 0.1;
            lit#17 = 0.3;
            builtin_fn_call#18 = random(lit#16, lit#17);
            this.thunderintensity = builtin_fn_call#18;
            lit#19 = 1;
            this.thundermode = lit#19;
            lit#20 = 0;
            fn_call#22 = seteffect#21(this.thunderintensity, this.thunderintensity, this.thunderintensity, lit#20);
            lit#23 = "";
            lit#24 = "Thunder";
            lit#25 = 0.05;
            fn_call#27 = scheduleevent#26(lit#25, lit#24, lit#23);
        }
        // RegionId(7)
        else
        {
            lit#28 = 0.05;
            this.thunderintensity = this.thunderintensity - lit#28;
            lit#29 = 0;
            // RegionId(7)
            // RegionId(8)
            if (this.thunderintensity <= lit#29) 
            {
                lit#30 = 0;
                lit#31 = 0;
                lit#32 = 0;
                lit#33 = 0;
                fn_call#34 = seteffect#21(lit#33, lit#32, lit#31, lit#30);
                lit#35 = 0;
                this.thundermode = lit#35;
                lit#36 = "";
                lit#37 = "Thunder";
                lit#38 = 5;
                lit#39 = 12;
                builtin_fn_call#40 = random(lit#38, lit#39);
                fn_call#41 = scheduleevent#26(builtin_fn_call#40, lit#37, lit#36);
            }
            // RegionId(9)
            else
            {
                lit#42 = 0;
                fn_call#43 = seteffect#21(this.thunderintensity, this.thunderintensity, this.thunderintensity, lit#42);
                lit#44 = "";
                lit#45 = "Thunder";
                lit#46 = 0.05;
                fn_call#47 = scheduleevent#26(lit#46, lit#45, lit#44);
            }
        }
        lit#50 = 1;
        lit#51 = 100;
        builtin_fn_call#52 = random(lit#50, lit#51);
        temp.ran = builtin_fn_call#52;
        lit#53 = 80;
        // RegionId(10)
        // RegionId(11)
        if (temp.ran > lit#53) 
        {
            lit#54 = "Thunder";
            fn_call#56 = cancelevents#55(lit#54);
            lit#58 = 0.1;
            lit#59 = 0.3;
            builtin_fn_call#60 = random(lit#58, lit#59);
            this.intensity = this.intensity - builtin_fn_call#60;
            lit#61 = "";
            lit#62 = "Thunder";
            lit#63 = 0.05;
            fn_call#64 = scheduleevent#26(lit#63, lit#62, lit#61);
        }
        lit#65 = 0;
        return lit#65;
    }
}