Exemplo n.º 1
0
    public void ApplySideEffect(GameObject npc, GameObject pc, int lineNumber, out string originalScript)
    {
        switch (lineNumber)
        {
        case 1031:
        case 1036:
        case 1041:
            originalScript = "grate_away(npc)";
            grate_away(npc);
            break;

        case 1505:
            originalScript = "npc_set(npc, 1)";
            ScriptDaemon.npc_set(npc, 1);
            break;

        case 1507:
        case 1700:
        case 1720:
        case 2101:
            originalScript = "barrier_away(npc,1)";
            barrier_away(npc, 1);
            break;

        case 1536:
        case 1550:
            originalScript = "unequip(3, pc, 1); unequip(4, pc, 1)";
            Co8.unequip(EquipSlot.WeaponPrimary, pc, true);
            Co8.unequip(EquipSlot.WeaponSecondary, pc, true);
            break;

        case 1551:
            originalScript = "earth_temple_haul_inside(pc, npc, 1555)";
            earth_temple_haul_inside(pc, npc, 1555);
            break;

        case 1555:
        case 2020:
            originalScript = "game.sound( 4057, 1 )";
            Sound(4057, 1);
            break;

        case 1556:
            originalScript = "game.global_vars[454] |= 2**8";
            SetGlobalVar(454, GetGlobalVar(454) | 0x100);
            break;

        case 1561:
        case 1572:
        case 1802:
            originalScript = "switch_to_npc(pc, npc, 'romag',  failsafe_line = 2000)";
            switch_to_npc(pc, npc, "romag", failsafe_line: 2000);
            break;

        case 1562:
        case 1563:
        case 1564:
        case 1575:
        case 1576:
        case 1577:
        case 1805:
        case 1806:
        case 1807:
        case 1905:
        case 1906:
        case 1907:
            originalScript = "earth_attack_party(pc, npc)";
            earth_attack_party(pc, npc);
            break;

        case 1571:
        case 1801:
        case 1901:
        case 1903:
        case 1921:
        case 2001:
            originalScript = "move_party_inside(pc, npc, 2020, 454, 372)";
            move_party_inside(pc, npc, 2020, 454, 372);
            break;

        case 1573:
        case 1803:
            originalScript = "switch_to_npc(pc, npc, 'hartsch',  failsafe_line = 2000)";
            switch_to_npc(pc, npc, "hartsch", failsafe_line: 2000);
            break;

        case 1574:
        case 1804:
            originalScript = "switch_to_npc(pc, npc, 'earth troop commander',  failsafe_line = 2000)";
            switch_to_npc(pc, npc, "earth troop commander", failsafe_line: 2000);
            break;

        case 1701:
        case 1705:
            originalScript = "barrier_away(npc,2)";
            barrier_away(npc, 2);
            break;

        case 1706:
            originalScript = "barrier_away(npc,3)";
            barrier_away(npc, 3);
            break;

        case 1721:
        case 1725:
            originalScript = "barrier_away(npc,4)";
            barrier_away(npc, 4);
            break;

        default:
            originalScript = null;
            return;
        }
    }