Exemplo n.º 1
0
    public bool mutilate(DBlock.DBLOCK_EFFECTS iBlockEffect)
    {
        bool rc = false;

        switch (iBlockEffect)
        {
        case DBlock.DBLOCK_EFFECTS.LOSE_ARM:
            n_arms--;
            State = processNewPlayerState();
            rc    = true;
            break;

        case DBlock.DBLOCK_EFFECTS.LOSE_LEG:
            n_legs--;
            State = processNewPlayerState();
            rc    = true;
            break;

        case DBlock.DBLOCK_EFFECTS.LOSE_BODY:
            State = State.CHAIR_BALL;
            rc    = true;
            break;

        default:
            rc = false;
            break;
        }
        return(rc);
    }
Exemplo n.º 2
0
    // DIALOG NT METHODS
    // =======================================================
    public void dialog()
    {
        //RESOLVE EFFECT OF THE NEW MESSAGE
        if (!!capturedPlayerControlled)
        {
            bool tryDialog = false;
            if (!dialogStarted)
            {
                if (dialogController != null)
                {
                    uiDialogController = dialogUI.GetComponentInChildren <UIDialogController>(true);
                    string newMessage = dialogController.getMessage();
                    if ((newMessage != null) && (uiDialogController != null))
                    {
                        uiDialogController.message = newMessage;
                        if (!!uiDialogController)
                        {
                            uiDialogController.show(true);
                        }
                        dialogStarted = true;
                        tryDialog     = true;
                    }
                }
            }
            else
            {
                if (dialogController != null)
                {
                    tryDialog = dialogController.tryPursueDialog();
                    if (!tryDialog)
                    {
                        exitDialog();
                    }
                    else // PURSUE DIALOG
                    {
                        string newMessage = dialogController.getMessage();
                        if ((newMessage != null) && (uiDialogController != null))
                        {
                            uiDialogController.message = newMessage;
                        }
                    }
                }
            }
            if (dialogController != null && uiDialogController != null)
            {
                uiDialogController.response = dialogController.getSelectedAnswer();
            }

            // MUTILATE PLAYER
            PlayerState ps = capturedPlayerControlled.GetComponent <PlayerState>();
            if (!!ps && tryDialog)
            {
                DBlock.DBLOCK_EFFECTS q_effect = dialogController.getQuestionBlockEffect();
                DBlock.DBLOCK_EFFECTS a_effect = dialogController.getResponseBlockEffect();

                bool playerMutilated = ps.mutilate(q_effect) || ps.mutilate(a_effect);

                if (!!playerMutilated)
                {
                    List <INPCType> doorguards = _attachedNPC.getINTRefs(NPCTypeNames.doorguard);
                    foreach (INPCType doorguard in doorguards)
                    {
                        doorguard.action2(); doorguard.action();
                    }
                }

                // CHECK FOR A NEXT CINEMATIC STEP
                if ((q_effect == DBlock.DBLOCK_EFFECTS.NEXT_CINEMATIC_STEP) || (a_effect == DBlock.DBLOCK_EFFECTS.NEXT_CINEMATIC_STEP))
                {
                    List <INPCType> cinematics = _attachedNPC.getINTRefs(NPCTypeNames.cinematic);
                    foreach (INPCType c in cinematics)
                    {
                        c.action();
                    }
                }
            } //ps && tryPlayer
        }     //! captured player
    }         //! dialog