Ejemplo n.º 1
0
        private void GuiltyNotGuilty_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton)
        {
            sender.CloseWindow();
            if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Guilty)
            {
                if (punishmentType != 0)
                {
                    if (punishmentType == 1)
                    {
                        state = 5;
                    }
                    else
                    {
                        fine         >>= 1;
                        daysInPrison >>= 1;
                        playerEntity.DeductGoldAmount(fine);

                        // Classic gives a legal reputation raise here, probably a bug since it means you get a separate raise
                        // for paying the fine and for serving prison time.
                        if (daysInPrison > 0)
                        {
                            state = 3;
                        }
                        else
                        {
                            // Give the reputation raise here if no prison time will be served.
                            playerEntity.RaiseReputationForDoingSentence();
                            repositionPlayer = true;
                            // Oversight in classic: Does not refill vital signs when releasing in this case, so player is left with 1 health.
                            playerEntity.FillVitalSigns();
                            ReleaseFromPrison();
                        }
                    }
                }
                else
                {
                    state = 4;
                }
            }
            else // Pleading not guilty
            {
                DaggerfallMessageBox messageBox = new DaggerfallMessageBox(uiManager, this, false, 127);
                messageBox.SetTextTokens(DaggerfallUnity.Instance.TextProvider.GetRSCTokens(courtTextHowConvince));
                messageBox.ScreenDimColor = new Color32(0, 0, 0, 0);
                messageBox.AddButton(DaggerfallMessageBox.MessageBoxButtons.Debate);
                messageBox.AddButton(DaggerfallMessageBox.MessageBoxButtons.Lie);
                messageBox.OnButtonClick += DebateLie_OnButtonClick;
                messageBox.ParentPanel.VerticalAlignment = VerticalAlignment.Bottom;
                messageBox.AllowCancel = false;
                uiManager.PushWindow(messageBox);
            }
            Update();
        }
Ejemplo n.º 2
0
        protected void ConfirmGettingScammed_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton)
        {
            int playerIntell = player.Stats.LiveIntelligence;

            if (LimitedGoldShops.LimitedGoldShops.ShopBuildingData.TryGetValue(currentBuildingID, out sd))
            {
                investedFlag = sd.InvestedIn;
                shopAttitude = sd.ShopAttitude;
            }

            CloseWindow();
            if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes)
            {
                Entity.PlayerEntity playerEntity = GameManager.Instance.PlayerEntity;
                if (playerEntity.GetGoldAmount() >= investOffer)
                {
                    playerEntity.DeductGoldAmount(investOffer);
                    DaggerfallUI.Instance.PlayOneShot(SoundClips.GoldPieces);
                    tokens = LGSTextTokenHolder.ShopTextTokensNeutral(3);
                    if (investedFlag)
                    {
                        tokens = LGSTextTokenHolder.ShopTextTokensNeutral(4);
                    }
                    DaggerfallUI.MessageBox(tokens);
                    investOffer = 0;
                    LimitedGoldShops.LimitedGoldShops.UpdateInvestAmount(investOffer);
                }
                else
                {
                    DaggerfallUI.MessageBox("Good joke there, you really got me there, ya jerk...");
                }
            }
            else if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.No)
            {
                DaggerfallUI.MessageBox("Yeah, I was just joking as well, haha...");
            }
        }
Ejemplo n.º 3
0
        protected void ConfirmInvestment_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton)
        {
            int playerIntell = player.Stats.LiveIntelligence;

            if (LimitedGoldShops.LimitedGoldShops.ShopBuildingData.TryGetValue(currentBuildingID, out sd))
            {
                investedFlag = sd.InvestedIn;
                shopAttitude = sd.ShopAttitude;
            }

            CloseWindow();
            if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.Yes)
            {
                Entity.PlayerEntity playerEntity = GameManager.Instance.PlayerEntity;
                if (playerEntity.GetGoldAmount() >= investOffer)
                {
                    playerEntity.DeductGoldAmount(investOffer);
                    DaggerfallUI.Instance.PlayOneShot(SoundClips.GoldPieces);
                    if (buildQual <= 3) // 01 - 03
                    {
                        if (shopAttitude == 0)
                        {
                            DaggerfallUI.MessageBox("I'll do my best, partner.");
                        }
                        else
                        {
                            DaggerfallUI.MessageBox("Thanks for the gold, ya nutter.");
                        }
                    }
                    else if (buildQual <= 7) // 04 - 07
                    {
                        if (shopAttitude == 0)
                        {
                            DaggerfallUI.MessageBox("Ya won't be disappointed, boss.");
                        }
                        else
                        {
                            DaggerfallUI.MessageBox("Really care for those fish, huh?");
                        }
                    }
                    else if (buildQual <= 17) // 08 - 17
                    {
                        if (shopAttitude == 0)
                        {
                            DaggerfallUI.MessageBox("Not a bad signature, do you practice?");
                        }
                        else
                        {
                            DaggerfallUI.MessageBox("Your signature is atrocious, by the way.");
                        }
                    }
                    else if (buildQual >= 18) // 18 - 20
                    {
                        if (shopAttitude == 0)
                        {
                            DaggerfallUI.MessageBox("I never disappoint when it comes to turning a profit.");
                        }
                        else
                        {
                            DaggerfallUI.MessageBox("Wipe your feet next time, you're tracking sludge in, lamprey.");
                        }
                    }
                    LimitedGoldShops.LimitedGoldShops.UpdateInvestAmount(investOffer);
                }
                else
                {
                    if (buildQual <= 3) // 01 - 03
                    {
                        if (shopAttitude == 0)
                        {
                            DaggerfallUI.MessageBox("I think you counted wrong, you don't have that much.");
                        }
                        else
                        {
                            DaggerfallUI.MessageBox("I know you don't have that much, stop lyin' ya idiot!");
                        }
                    }
                    else if (buildQual <= 7) // 04 - 07
                    {
                        if (shopAttitude == 0)
                        {
                            DaggerfallUI.MessageBox("Might want to recount, boss, cause I don't see that amount.");
                        }
                        else
                        {
                            DaggerfallUI.MessageBox("Who ya tryna impress, huh? I know you don't have that much.");
                        }
                    }
                    else if (buildQual <= 17) // 08 - 17
                    {
                        if (shopAttitude == 0)
                        {
                            DaggerfallUI.MessageBox("Sorry, but it appears your funds are less than you suggest.");
                        }
                        else
                        {
                            DaggerfallUI.MessageBox("Quit wasting my damn time, you dolt, you don't have that much!");
                        }
                    }
                    else if (buildQual >= 18) // 18 - 20
                    {
                        if (shopAttitude == 0)
                        {
                            DaggerfallUI.MessageBox("I think you need to hire a new accountant, because you don't have that.");
                        }
                        else
                        {
                            DaggerfallUI.MessageBox("I need to charge more for my time, so leeches like you won't waste it so often!");
                        }
                    }
                }
            }
            else if (messageBoxButton == DaggerfallMessageBox.MessageBoxButtons.No)
            {
                if (buildQual <= 3) // 01 - 03
                {
                    if (shopAttitude == 0)
                    {
                        DaggerfallUI.MessageBox("I understand your reluctance, just look around, haha!");
                    }
                    else
                    {
                        DaggerfallUI.MessageBox("Why you gettin' my hopes up, just to dash them down?");
                    }
                }
                else if (buildQual <= 7) // 04 - 07
                {
                    if (shopAttitude == 0)
                    {
                        DaggerfallUI.MessageBox("That's fine, I would not take such a gamble myself either.");
                    }
                    else
                    {
                        DaggerfallUI.MessageBox("Why you tryna bait me in just to pull away the line?");
                    }
                }
                else if (buildQual <= 17) // 08 - 17
                {
                    if (shopAttitude == 0)
                    {
                        DaggerfallUI.MessageBox("Very well, thankfully parchment is cheap around here.");
                    }
                    else
                    {
                        DaggerfallUI.MessageBox("What's with the indecisive always wasting my time in this town?");
                    }
                }
                else if (buildQual >= 18) // 18 - 20
                {
                    if (shopAttitude == 0)
                    {
                        DaggerfallUI.MessageBox("So be it, ask again when you are ready to commit.");
                    }
                    else
                    {
                        DaggerfallUI.MessageBox("The parasite sucks my precious time away once again, a pity.");
                    }
                }
            }
        }