private void ConfirmButton_Click(object sender, EventArgs e)
        {
            if (i_path.Equals(string.Empty))
            {
                MessageBox.Show("Pick a proflie pic to continue.");
            }
            else
            {
                if (MessageBox.Show("Are you sure you want this image as your profile picture? There's no going back once it's chosen.", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    _state.Player.Picture = i_path;
                    _state.Player.Set     = new ArmorSet();
                    _state.Player.Weapon  = new Weapon()
                    {
                        Level    = 1,
                        XP       = 0,
                        XPtoNext = 500,
                        Damage   = 20,
                        Style    = WeaponStyle.ATTACK
                    };
                    _state.Player.VendorCap = 250;

                    for (int i = 0; i < ArmorPiece.TOTAL; i++)
                    {
                        _state.Player.Set.AddArmor(_state.AManager.GetRandomArmorPiece(_state, _state.Player.Tiers[0], i));
                    }

                    _state.Player.Loot = new AscendedRPG.LootHolder();

                    for (int i = 0; i < 9; i++)
                    {
                        _state.Player.ElementalAttack.Add(0);
                    }

                    _state.Save.SaveGame(_state.Player);

                    Visible = false;
                    // i'm too lazy to make a bunch of save files with dialog so it's gonna be hardcoded in here
                    string[] d =
                    {
                        "You are a villager from a far off island.",
                        "It was a few weeks ago that you received your calling.",
                        "Since then, you've journed across the globe to find what is known as \"The Endless Dungeon.\"",
                        "When every young villager grows up, it becomes their duty to journey to this far off place.",
                        "Rumor has it that if you reach the bottom, you can attain enlightenment beyond normal human comprehension.",
                        "However, no one has been able to confirm it.",
                        "All who try to fully traverse The Endless Dungeon disappear.",
                        "But, you will be different.",
                        "You are a gamer, and gamers rise up and conquer all challenges.",
                        "So, go, my fellow gamer... rise up...",
                        "...AND ASCEND!!!!",
                        "~ this post was made by the \"totally not a scam\" gang"
                    };

                    DialogBox db = new DialogBox(d);
                    db.StartPosition = FormStartPosition.Manual;
                    db.Location      = Location;
                    db.ShowDialog();

                    _state.Location = Location;
                    _state.Type     = FTypes.INVENTORY;
                    Close();
                }
            }
        }
Beispiel #2
0
        private void ProcessDamage(Enemy target, int t)
        {
            _dungeon.UpdateEnemyHealth();
            if (target.HP == 0)
            {
                if (!_dungeon.IsTroopDead())
                {
                    // disable current checked button and check a new button
                    SetTargetButtonEnabled(t, false);
                    ChangeTargetButtonChecked();
                    CheckTurnEnd();
                }
                else
                {
                    // distribute loot
                    _dungeon.DistributeLoot();

                    // increment fight counters
                    _dh.IncrementFightCounter();
                    if (_dh.GetFightCounter() >= 0)
                    {
                        UpdateFightCounter();                                                                                                                                    // update fight counter
                        _state.Player.Wallet.AddDellenCoin(_state.Random.Next(100, 201) * _dh.GetFightCounter() * (_state.DungeonType + 1) * (_state.Player.Minions.Count + 1)); // get paid for last fight
                        _dungeon.SetUpEnemyGUI();                                                                                                                                // load another set of fighters if we still have more fights left
                        InitializeHPAndTurns();                                                                                                                                  // reset the HP to maxg
                    }
                    else
                    {
                        // end the dungeon
                        _state.Music.Stop();
                        if (_state.DungeonType == Enemies.DungeonType.FINAL)
                        {
                            string[] d =
                            {
                                "The time has come.",
                                "You have slain the Ascended God, Rickeus Martineus.",
                                "You truly are a gamer.",
                                $"Now, the world will fear the wrath of {_state.Player.Name}",
                                "If you take a screencap of this dialog box, you may even end up in the RPGMaker game!!!!",
                                "Anyway, that's all the content I have for you.",
                                "You will not get anything new beyond this point so that's about it.",
                                "This is the end.",
                                "Goodbye."
                            };

                            DialogBox db = new DialogBox(d);
                            db.StartPosition = FormStartPosition.Manual;
                            db.Location      = _state.Location;
                            db.ShowDialog();
                        }
                        else
                        {
                            MessageBox.Show("Dungeon Complete.");
                            _state.ProcessCompletedTier(battleMembers.Count);
                            if (_state.dungeonTiers[_state.DungeonType] == _state.GetCap(_state.DungeonType))
                            {
                                _state.Player.CompletionTracker.Add(true);
                            }
                        }

                        _dungeon.CloseGUI();
                    }
                }
            }
            else
            {
                // the target is not dead, we need to check the turns
                _dgc.SetTurnText(_dh.GetTurnString());
                // if we're out of turns, start timer
                CheckTurnEnd();
            }
        }