Пример #1
0
    // Start the closure of the cave
    public void StartClosing()
    {
        // Lock the cave
        itemController.SetItemState("3Grate", 0);

        // Remove the bridge across the fissure
        itemController.SetItemState("12Fissure", 0);

        // Kill off the active dwarves
        dwarfController.KillAllDwarves();

        // Retire the troll
        itemController.DestroyItem("33Troll");
        itemController.DropItemAt("34PhonyTroll", "117ChasmSW", "122ChasmNE");

        // If the bear isn't dead, remove it from play
        if (itemController.GetItemState("35Bear") != 3)
        {
            itemController.DestroyItem("35Bear");
        }

        // Ensure chain and axe are retrievable now that the bear is no longer around
        itemController.SetItemState("64Chain", 0);
        itemController.MakeItemMovable("64Chain");
        itemController.MakeItemMovable("28Axe");

        // indicate we're closing
        Clock1            = -1;
        CurrentCaveStatus = CaveStatus.CLOSING;

        // Finally, let the player know what's happening
        textDisplayController.AddTextToLog(playerMessageController.GetMessage("129ClosingAnnounce"));
    }