Exemple #1
0
    public void AttackFailed(PlayerAction action, float achieved, float goal)
    {
        if (turnPhase == TurnPhase.PlayerAttack)
        {
            switch (action)
            {
            case PlayerAction.Flirt:
                lastActionStatus = PlayerActionStatus.FlirtFailure;
                currentDialog    = flirtFailureResponses[Random.Range(0, flirtFailureResponses.Length)];
                break;

            case PlayerAction.Joke:
                lastActionStatus = PlayerActionStatus.JokeFailure;
                currentDialog    = jokeFailureResponses[Random.Range(0, jokeFailureResponses.Length)];
                break;

            case PlayerAction.Story:
                lastActionStatus = PlayerActionStatus.StoryFailure;
                currentDialog    = storyFailureResponses[Random.Range(0, storyFailureResponses.Length)];
                break;
            }

            float penaltyPercent = (goal - achieved) / goal;
            float penalty        = (dateSuccess * 0.05f) * penaltyPercent;
            dateProgress -= penalty;
            PlaySound(4);
            NextPhase();
        }
        ;
    }
Exemple #2
0
    public void AttackSuccess(PlayerAction action)
    {
        if (turnPhase == TurnPhase.PlayerAttack)
        {
            switch (action)
            {
            case PlayerAction.Flirt:
                lastActionStatus = PlayerActionStatus.FlirtSuccess;
                currentDialog    = flirtSuccessResponses[Random.Range(0, flirtSuccessResponses.Length)];
                break;

            case PlayerAction.Joke:
                lastActionStatus = PlayerActionStatus.JokeSuccess;
                currentDialog    = jokeSuccessResponses[Random.Range(0, jokeSuccessResponses.Length)];
                break;

            case PlayerAction.Story:
                lastActionStatus = PlayerActionStatus.StorySuccess;
                currentDialog    = storySuccessResponses[Random.Range(0, storySuccessResponses.Length)];
                break;
            }

            float progress = 50;
            dateProgress += progress;
            PlaySound(3);
            NextPhase();
        }
    }