Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

function onPlayerHurt(power#2, htype#1, hitter#0)
{
    lit#6 = "UpdateHearts";
    fn_call#8 = cancelEvents#7(lit#6);
    fn_call#10 = onUpdateHearts#9();
    lit#11 = "npc";
    // RegionId(0)
    // RegionId(1)
    if (htype#1 == lit#11) 
    {
        lit#13 = 0;
        // RegionId(1)
        // RegionId(2)
        if (player.hearts <= lit#13) 
        {
            lit#14 = 0;
            // RegionId(2)
            // RegionId(3)
            if (power#2 > lit#14) 
            {
                lit#17 = null;
                // RegionId(4)
                if (client.suicideCheck != lit#17) 
                {
                    lit#18 = "suicidebynpc";
                    lit#19 = "gui";
                    lit#20 = "-Games";
                    fn_call#22 = lit.sendToServer2(lit#19, this.name, lit#18);
                    goto RegionId(12);
                }
            }
        }
    }
    lit#23 = "script";
    // RegionId(5)
    // RegionId(6)
    if (htype#1 == lit#23) 
    {
        lit#24 = 0;
        // RegionId(6)
        // RegionId(7)
        if (player.hearts <= lit#24) 
        {
            lit#25 = 0;
            // RegionId(7)
            // RegionId(8)
            if (power#2 > lit#25) 
            {
                lit#26 = null;
                // RegionId(9)
                if (client.suicideCheck != lit#26) 
                {
                    lit#29 = 1;
                    // RegionId(9)
                    // RegionId(10)
                    if (timevar2#27 < (player.lastShotByNPC + lit#29)) 
                    {
                        lit#30 = "suicidebynpc";
                        lit#31 = "gui";
                        lit#32 = "-Games";
                        fn_call#33 = lit.sendToServer2(lit#31, this.name, lit#30);
                    }
                    goto RegionId(12);
                }
            }
        }
    }
    fn_call#36 = onRegisterPlayerHurt#35(temp.hitter);
    fn_call#38 = findplayer#37(hitter#0);
    lit#40 = 100;
    // RegionId(12)
    // RegionId(13)
    if (fn_call.ap == lit#40) 
    {
        lit#41 = "sainthit";
        lit#42 = "gui";
        lit#43 = "-Games";
        fn_call#44 = lit.sendToServer2(lit#42, this.name, lit#41, hitter#0);
    }
    // RegionId(14)
    // RegionId(15)
    if (player.hearts == player.fullhearts) 
    {
        lit#46 = "nodmg";
        lit#47 = "gui";
        lit#48 = "-Games";
        fn_call#49 = lit.sendToServer2(lit#47, this.name, lit#46);
    }
    // RegionId(16)
    // RegionId(17)
    if (player.level.spar) 
    {
        lit#52 = "sparhit";
        lit#53 = "gui";
        lit#54 = "-Games";
        fn_call#55 = lit.sendToServer2(lit#53, this.name, lit#52, hitter#0);
    }
    // RegionId(18)
    // RegionId(19)
    if (player.frozen) 
    {
        lit#59 = false;
        player.isinvincible2 = lit#59;
        player.isinvincible = player.isinvincible2;
        lit#60 = false;
        player.frozen = lit#60;
        lit#61 = 100;
        fn_call#63 = hideimg#62(lit#61);
        lit#64 = 20001;
        fn_call#66 = findimg#65(lit#64);
        // RegionId(19)
        // RegionId(20)
        with (fn_call#66) 
        {
            // RegionId(20)
            // RegionId(21)
            with (emitter#67) 
            {
                lit#69 = 0;
                temp.i = lit#69;
                lit#70 = 10;
                while (temp.i < lit#70) 
                {
                    fn_call#72 = emit#71();
                    temp.i++;
                }
            }
        }
        lit#73 = 20001;
        lit#74 = "HideAni";
        lit#75 = 1;
        lit#76 = "-System";
        fn_call#78 = lit.scheduleEvent(lit#75, lit#74, lit#73);
    }
    lit#79 = 0;
    return lit#79;
}