Exemplo n.º 1
0
        private void ChangeStat(object sender, EventArgs e)
        {
            editing = true;
            int index = CB_Stats.SelectedIndex;

            NUD_Stat.Maximum = SAV7.GetRecordMax(index);
            NUD_Stat.Value   = SAV.GetRecord(index);

            int offset = SAV.GetRecordOffset(index);

            L_Offset.Text = $"Offset: 0x{offset:X3}";
            UpdateTip(index, true);
            editing = false;
        }
Exemplo n.º 2
0
        private string UpdateTip(int index)
        {
            switch (index)
            {
            case 2:     // Storyline Completed Time
                var seconds = Util.GetSecondsFrom2000(CAL_AdventureStartDate.Value, CAL_AdventureStartTime.Value);
                return(Util.ConvertDateValueToString(SAV.GetRecord(index), seconds));

            default:
                return(null);
            }
        }
Exemplo n.º 3
0
        private string UpdateTip(int index)
        {
            switch (index)
            {
            case 2:     // Storyline Completed Time
                int seconds = (int)(CAL_AdventureStartDate.Value - new DateTime(2000, 1, 1)).TotalSeconds;
                seconds -= seconds % 86400;
                seconds += (int)(CAL_AdventureStartTime.Value - new DateTime(2000, 1, 1)).TotalSeconds;
                return(ConvertDateValueToString(SAV.GetRecord(index), seconds));

            default:
                return(null);
            }
        }
Exemplo n.º 4
0
        public SAV_FestivalPlaza(SaveFile sav)
        {
            InitializeComponent();
            SAV               = (SAV7)(Origin = sav).Clone();
            editing           = true;
            typeMAX           = SAV is SAV7USUM ? 0x7F : 0x7C;
            TB_PlazaName.Text = SAV.Festa.FestivalPlazaName;

            if (SAV is SAV7USUM)
            {
                PBs          = new[] { ppkx1, ppkx2, ppkx3 };
                NUD_Trainers = new[] { NUD_Trainer1, NUD_Trainer2, NUD_Trainer3 };
                LoadBattleAgency();
            }
            else
            {
                TC_Editor.TabPages.Remove(Tab_BattleAgency);
            }

            if (Main.Unicode)
            {
                TB_OTName.Font = FontUtil.GetPKXFont();
            }

            var cc = SAV.Festa.FestaCoins;
            var cu = SAV.GetRecord(038);

            NUD_FC_Current.Value = Math.Min(cc, NUD_FC_Current.Maximum);
            NUD_FC_Used.Value    = Math.Min(cu, NUD_FC_Used.Maximum);
            L_FC_CollectedV.Text = (cc + cu).ToString();
            string[] res;
            switch (Main.CurrentLanguage)
            {
            case "ja":
                res = new[] {
                    "おじさんの きんのたま だからね!", "かがくの ちからって すげー", "1 2の …… ポカン!", "おーす! みらいの チャンピオン!", "おお! あんたか!", "みんな げんきに なりましたよ!", "とっても 幸せそう!", "なんでも ないです", "いあいぎりで きりますか?", "レポートを かきこんでいます",
                    "…… ぼくも もう いかなきゃ!", "ボンジュール!", "バイビー!", "ばか はずれです……", "やけどなおしの よういは いいか!", "ウー! ハーッ!", "ポケモンは たたかわせるものさ", "ヤドランは そっぽを むいた!", "マサラは まっしろ はじまりのいろ", "10000こうねん はやいんだよ!", "おーい! まてー! まつんじゃあ!", "こんちわ! ぼく ポケモン……!", "っだと こらあ!", "ぐ ぐーッ! そんな ばかなーッ!", "みゅう!", "タチサレ…… タチサレ……",
                    "カイリュー はかいこうせん", "どっちか 遊んでくれないか?", "ぬいぐるみ かっておいたわよ", "ひとのこと じろじろ みてんなよ", "なんのことだか わかんない", "みんな ポケモン やってるやん", "きょうから 24時間 とっくんだ!", "あたいが ホンモノ!", "でんげきで いちころ……", "スイクンを おいかけて 10ねん", "かんどうが よみがえるよ!", "われわれ ついに やりましたよー!", "ヤドンのシッポを うるなんて……", "ショオーッ!!", "ギャーアアス!!", "だいいっぽを ふみだした!",
                    "いちばん つよくて すごいんだよね", "にくらしいほど エレガント!", "そうぞうりょくが たりないよ", "キミは ビッグウェーブ!", "おまえさんには しびれた わい", "なに いってんだろ…… てへへ……", "ぬいぐるみ なんか かってないよ", "ここで ゆっくり して おいき!", "はじけろ! ポケモン トレーナー!", "はいが はいに はいった……", "…できる!", "ぶつかった かいすう 5かい!", "たすけて おくれーっ!!", "マボロシじま みえんのう……", "ひゅああーん!", "しゅわーん!",
                    "あつい きもち つたわってくる!", "こいつが! おれの きりふだ!", "ひとりじめとか そういうの ダメよ!", "ワーオ! ぶんせきどーり!", "ぱるぱるぅ!!!", "グギュグバァッ!!!", "ばっきん 100まんえん な!", "オレ つよくなる……", "ながれる 時間は とめられない!", "ぜったいに お願いだからね", "きみたちから はどうを かんじる!", "あたしのポケモンに なにすんのさ!", "リングは おれの うみ~♪", "オレの おおごえの ひとりごとを", "そう コードネームは ハンサム!", "……わたしが まけるかも だと!?",
                    "やめたげてよぉ!", "ブラボー! スーパー ブラボー!", "ボクは チャンピオンを こえる", "オレは いまから いかるぜッ!", "ライモンで ポケモン つよいもん", "キミ むしポケモン つかいなよ", "ストップ!", "ひとよんで メダルおやじ!", "トレーナーさんも がんばれよ!", "おもうぞんぶん きそおーぜ!", "プラズマズイ!", "ワタクシを とめることは できない!", "けいさんずみ ですとも!", "ババリバリッシュ!", "ンバーニンガガッ!", "ヒュラララ!",
                    "お友達に なっちゃお♪", "じゃあ みんな またねえ!", "このひとたち ムチャクチャです……", "トレーナーとは なにか しりたい", "スマートに くずれおちるぜ", "いのち ばくはつッ!!", "いいんじゃない いいんじゃないの!", "あれだよ あれ おみごとだよ!", "ぜんりょくでいけー! ってことよ!", "おまちなさいな!", "つまり グッド ポイント なわけ!", "ざんねん ですが さようなら", "にくすぎて むしろ 好きよ", "この しれもの が!", "イクシャア!!", "イガレッカ!!",
                    "フェスサークル ランク 100!",
                };
                break;

            default:
                const string musical8note = "♪";
                const string linedP       = "₽"; //currency Ruble
                res = new[] {                    //source:UltraMoon
                    /* (SM)Pokémon House */ "There's nothing funny about Nuggets.", "The Power of science is awesome.", "1, 2, and... Ta-da!", "How's the future Champ today?", "Why, you!", "There! All happy and healthy!", "Your Pokémon seems to be very happy!", "No thanks!", "Would you like to use Cut?", "Saving...",
                    /* (SM)Kanto Tent */ "Well, I better get going!", "Bonjour!", "Smell ya later!", "Sorry! Bad call!", "You better have Burn Heal!", "Hoo hah!", "Pokémon are for battling!", "Slowbro took a snooze...", "Shades of your journey await!", "You're 10,000 light-years from facing Brock!", "Hey! Wait! Don't go out!", "Hiya! I'm a Pokémon...", "What do you want?", "WHAT! This can't be!", "Mew!", "Be gone... Intruders...",
                    /* (SM)Joht Tent */ "Dragonite, Hymer Beam.", "Spread the fun around.", "I bought an adorable doll with your money.", "What are you staring at?", "I just don't understand.", "Everyone is into Pokémon.", "I'm going to train 24 hours a day!", "I'm the real deal!", "With a jolt of electricity...", "For 10 years I chased Suicune.", "I am just so deeply moved!", "We have finally made it!", "...But selling Slowpoke Tails?", "Shaoooh!", "Gyaaas!", "you've taken your first step!",
                    /* (SM)Hoenn Tent */ "I'm just the strongest there is right now.", "And confoundedly elegant!", "You guys need some imagination.", "You made a much bigger splash!", "You ended up giving me a thrill!", "So what am I talking about...", "I'm not buying any Dolls.", "Take your time and rest up!", "Have a blast, Pokémon Trainers!", "I got ashes in my eyelashes!", "You're sharp!", "Number of collisions: 5 times!", "Please! Help me out!", "I can't see Mirage Island today...", "Hyahhn!", "Shwahhn!",
                    /* (SM)Sinnoh Tent */ "Your will is overwhelming me!", "This is it! My trump card!", "Trying to monopolize Pokémon just isn't...", "See? Just as analyzed.", "Gagyagyaah!", "Gugyugubah!", "It's a " + linedP + "10 million fine if you're late!", "I'm going to get tougher...", "You'll never be able to stem the flow of time!", "Please come!", "Your team! I sense your strong aura!", "What do you think you're doing?!", "The ring is my rolling sea. " + musical8note, "I was just thinking out loud.", "My code name, it is Looker.", "It's not possible that I lose!",
                    /* (SM)Unova Tent */ "Knock it off!", "Bravo! Excellent!!", "I'll defeat the Champion.", "You're about to feel my rage!", "Nimbasa's Pokémon can dance a nimble bossa!", "Use Bug-type Pokémon!", "Stop!", "People call me Mr. Medal!", "Trainer, do your best, too!", "See who's stronger!", "Plasbad, for short!", "I won't allow anyone to stop me!", "I was expecting exactly that kind of move!", "Bazzazzazzash!", "Preeeeaah!", "Haaahraaan!",
                    /* (SM)Kalos Tent */ "We'll become friends. " + musical8note, "I'll see you all later!", "These people have a few screws loose...", "I want to know what a \"Trainer\" is.", "When I lose, I go out in style!", "Let's give it all we've got!", "Fantastic! Just fantastic!", "Outstanding!", "Try as hard as possible!", "Stop right there!", "That really hit me right here...", "But this is adieu to you all.", "You're just too much, you know?", "Fool! You silly, unseeing child!", "Xsaaaaaah!", "Yvaaaaaar!",
                    "I reached Festival Plaza Rank 100!",
                };
                break;
            }
            CLB_Phrases.Items.Clear();
            CLB_Phrases.Items.Add(res.Last(), SAV.Festa.GetFestaPhraseUnlocked(106)); //add Lv100 before TentPhrases
            for (int i = 0; i < res.Length - 1; i++)
            {
                CLB_Phrases.Items.Add(res[i], SAV.Festa.GetFestaPhraseUnlocked(i));
            }

            DateTime dt = SAV.Festa.FestaDate ?? new DateTime(2000, 1, 1);

            CAL_FestaStartDate.Value = CAL_FestaStartTime.Value = dt;

            string[] res2 = { "Rank 4: missions", "Rank 8: facility", "Rank 10: fashion", "Rank 20: rename", "Rank 30: special menu", "Rank 40: BGM", "Rank 50: theme Glitz", "Rank 60: theme Fairy", "Rank 70: theme Tone", "Rank 100: phrase", "Current Rank", };
            CLB_Reward.Items.Clear();
            CLB_Reward.Items.Add(res2.Last(), (CheckState)RewardState[SAV.Festa.GetFestPrizeReceived(10)]); //add CurrentRank before const-rewards
            for (int i = 0; i < res2.Length - 1; i++)
            {
                CLB_Reward.Items.Add(res2[i], (CheckState)RewardState[SAV.Festa.GetFestPrizeReceived(i)]);
            }

            for (int i = 0; i < 7; i++)
            {
                f[i] = new FestaFacility(SAV, i);
            }

            string[] res3 = { "Meet", "Part", "Moved", "Disappointed" };
            CB_FacilityMessage.Items.Clear();
            CB_FacilityMessage.Items.AddRange(res3);
            string[] res5 =
            {
                "Ace Trainer" + gendersymbols[1],
                "Ace Trainer" + gendersymbols[0],
                "Veteran" + gendersymbols[1],
                "Veteran" + gendersymbols[0],
                "Office Worker" + gendersymbols[0],
                "Office Worker" + gendersymbols[1],
                "Punk Guy",
                "Punk Girl",
                "Breeder" + gendersymbols[0],
                "Breeder" + gendersymbols[1],
                "Youngster",
                "Lass"
            };
            CB_FacilityNPC.Items.Clear();
            CB_FacilityNPC.Items.AddRange(res5);
            string[]   res6 = { "Lottery", "Haunted", "Goody", "Food", "Bouncy", "Fortune", "Dye", "Exchange" };
            string[][] res7 =
            {
                new[] { "BigDream",  "GoldRush",  "TreasureHunt"     },
                new[] { "GhostsDen", "TrickRoom", "ConfuseRay"       },
                new[] { "Ball",      "General",   "Battle", "SoftDrink", "Pharmacy"},
                new[] { "Rare",      "Battle",    "FriendshipCafé", "FriendshipParlor"},
                new[] { "Thump",     "Clink",     "Stomp"            },
                new[] { "Kanto",     "Johto",     "Hoenn", "Sinnoh", "Unova", "Kalos", "Pokémon"},
                new[] { "Red",       "Yellow",    "Green", "Blue", "Orange", "NavyBlue", "Purple", "Pink"},
                new[] { "Switcheroo" }
            };

            CB_FacilityType.Items.Clear();
            for (int k = 0; k < RES_FacilityLevelType.Length - (SAV is SAV7USUM ? 0 : 1); k++) //Exchange is USUM only
            {
                for (int j = 0; j < RES_FacilityLevelType[k].Length; j++)
                {
                    if (RES_FacilityLevelType[k][j] != 4)
                    {
                        for (int i = 0; i < RES_FacilityLevelType[k][j]; i++)
                        {
                            CB_FacilityType.Items.Add($"{res6[k]} {res7[k][j]} {i + 1}");
                        }
                    }
                    else
                    {
                        CB_FacilityType.Items.Add($"{res6[k]} {res7[k][j]} 1");
                        CB_FacilityType.Items.Add($"{res6[k]} {res7[k][j]} 3");
                        CB_FacilityType.Items.Add($"{res6[k]} {res7[k][j]} 5");
                    }
                }
            }

            string[] types = { "GTS", "Wonder Trade", "Battle Spot", "Festival Plaza", "mission", "lottery shop", "haunted house" };
            string[] lvl   = { "+", "++", "+++" };
            CB_LuckyResult.Items.Clear();
            CB_LuckyResult.Items.Add("none");
            foreach (string type in types)
            {
                foreach (string lv in lvl)
                {
                    CB_LuckyResult.Items.Add($"{lv} {type}");
                }
            }

            NUD_Rank.Value = SAV.Festa.FestaRank;
            LoadRankLabel(SAV.Festa.FestaRank);
            NUD_Messages = new[] { NUD_MyMessageMeet, NUD_MyMessagePart, NUD_MyMessageMoved, NUD_MyMessageDissapointed };
            for (int i = 0; i < NUD_Messages.Length; i++)
            {
                NUD_Messages[i].Value = SAV.Festa.GetFestaMessage(i);
            }

            LB_FacilityIndex.SelectedIndex   = 0;
            CB_FacilityMessage.SelectedIndex = 0;
            editing = false;

            entry = 0;
            LoadFacility();
        }
Exemplo n.º 5
0
        public SAV_FestivalPlaza(SaveFile sav)
        {
            InitializeComponent();
            SAV               = (SAV7)(Origin = sav).Clone();
            editing           = true;
            entry             = -1;
            typeMAX           = SAV is SAV7USUM ? 0x7F : 0x7C;
            TB_PlazaName.Text = SAV.Festa.FestivalPlazaName;

            if (SAV is SAV7USUM)
            {
                PBs          = new[] { ppkx1, ppkx2, ppkx3 };
                NUD_Trainers = new[] { NUD_Trainer1, NUD_Trainer2, NUD_Trainer3 };
                LoadBattleAgency();
            }
            else
            {
                TC_Editor.TabPages.Remove(Tab_BattleAgency);
            }

            if (Main.Unicode)
            {
                TB_OTName.Font = FontUtil.GetPKXFont();
            }

            var cc = SAV.Festa.FestaCoins;
            var cu = SAV.GetRecord(038);

            NUD_FC_Current.Value = Math.Min(cc, NUD_FC_Current.Maximum);
            NUD_FC_Used.Value    = Math.Min(cu, NUD_FC_Used.Maximum);
            L_FC_CollectedV.Text = (cc + cu).ToString();
            string[] res;
            switch (Main.CurrentLanguage)
            {
            case "ja":
                res = new[] {
                    "おじさんの きんのたま だからね!", "かがくの ちからって すげー", "1 2の …… ポカン!", "おーす! みらいの チャンピオン!", "おお! あんたか!", "みんな げんきに なりましたよ!", "とっても 幸せそう!", "なんでも ないです", "いあいぎりで きりますか?", "レポートを かきこんでいます",
                    "…… ぼくも もう いかなきゃ!", "ボンジュール!", "バイビー!", "ばか はずれです……", "やけどなおしの よういは いいか!", "ウー! ハーッ!", "ポケモンは たたかわせるものさ", "ヤドランは そっぽを むいた!", "マサラは まっしろ はじまりのいろ", "10000こうねん はやいんだよ!", "おーい! まてー! まつんじゃあ!", "こんちわ! ぼく ポケモン……!", "っだと こらあ!", "ぐ ぐーッ! そんな ばかなーッ!", "みゅう!", "タチサレ…… タチサレ……",
                    "カイリュー はかいこうせん", "どっちか 遊んでくれないか?", "ぬいぐるみ かっておいたわよ", "ひとのこと じろじろ みてんなよ", "なんのことだか わかんない", "みんな ポケモン やってるやん", "きょうから 24時間 とっくんだ!", "あたいが ホンモノ!", "でんげきで いちころ……", "スイクンを おいかけて 10ねん", "かんどうが よみがえるよ!", "われわれ ついに やりましたよー!", "ヤドンのシッポを うるなんて……", "ショオーッ!!", "ギャーアアス!!", "だいいっぽを ふみだした!",
                    "いちばん つよくて すごいんだよね", "にくらしいほど エレガント!", "そうぞうりょくが たりないよ", "キミは ビッグウェーブ!", "おまえさんには しびれた わい", "なに いってんだろ…… てへへ……", "ぬいぐるみ なんか かってないよ", "ここで ゆっくり して おいき!", "はじけろ! ポケモン トレーナー!", "はいが はいに はいった……", "…できる!", "ぶつかった かいすう 5かい!", "たすけて おくれーっ!!", "マボロシじま みえんのう……", "ひゅああーん!", "しゅわーん!",
                    "あつい きもち つたわってくる!", "こいつが! おれの きりふだ!", "ひとりじめとか そういうの ダメよ!", "ワーオ! ぶんせきどーり!", "ぱるぱるぅ!!!", "グギュグバァッ!!!", "ばっきん 100まんえん な!", "オレ つよくなる……", "ながれる 時間は とめられない!", "ぜったいに お願いだからね", "きみたちから はどうを かんじる!", "あたしのポケモンに なにすんのさ!", "リングは おれの うみ~♪", "オレの おおごえの ひとりごとを", "そう コードネームは ハンサム!", "……わたしが まけるかも だと!?",
                    "やめたげてよぉ!", "ブラボー! スーパー ブラボー!", "ボクは チャンピオンを こえる", "オレは いまから いかるぜッ!", "ライモンで ポケモン つよいもん", "キミ むしポケモン つかいなよ", "ストップ!", "ひとよんで メダルおやじ!", "トレーナーさんも がんばれよ!", "おもうぞんぶん きそおーぜ!", "プラズマズイ!", "ワタクシを とめることは できない!", "けいさんずみ ですとも!", "ババリバリッシュ!", "ンバーニンガガッ!", "ヒュラララ!",
                    "お友達に なっちゃお♪", "じゃあ みんな またねえ!", "このひとたち ムチャクチャです……", "トレーナーとは なにか しりたい", "スマートに くずれおちるぜ", "いのち ばくはつッ!!", "いいんじゃない いいんじゃないの!", "あれだよ あれ おみごとだよ!", "ぜんりょくでいけー! ってことよ!", "おまちなさいな!", "つまり グッド ポイント なわけ!", "ざんねん ですが さようなら", "にくすぎて むしろ 好きよ", "この しれもの が!", "イクシャア!!", "イガレッカ!!",
                    "フェスサークル ランク 100!",
                };
                break;

            default:
                const string musical8note = "♪";
                const string linedP       = "₽"; //currency Ruble
                res = new[] {                    //source:UltraMoon
                    /* (SM)Pokémon House */ "There's nothing funny about Nuggets.", "The Power of science is awesome.", "1, 2, and... Ta-da!", "How's the future Champ today?", "Why, you!", "There! All happy and healthy!", "Your Pokémon seems to be very happy!", "No thanks!", "Would you like to use Cut?", "Saving...",
                    /* (SM)Kanto Tent */ "Well, I better get going!", "Bonjour!", "Smell ya later!", "Sorry! Bad call!", "You better have Burn Heal!", "Hoo hah!", "Pokémon are for battling!", "Slowbro took a snooze...", "Shades of your journey await!", "You're 10,000 light-years from facing Brock!", "Hey! Wait! Don't go out!", "Hiya! I'm a Pokémon...", "What do you want?", "WHAT! This can't be!", "Mew!", "Be gone... Intruders...",
                    /* (SM)Joht Tent */ "Dragonite, Hymer Beam.", "Spread the fun around.", "I bought an adorable doll with your money.", "What are you staring at?", "I just don't understand.", "Everyone is into Pokémon.", "I'm going to train 24 hours a day!", "I'm the real deal!", "With a jolt of electricity...", "For 10 years I chased Suicune.", "I am just so deeply moved!", "We have finally made it!", "...But selling Slowpoke Tails?", "Shaoooh!", "Gyaaas!", "you've taken your first step!",
                    /* (SM)Hoenn Tent */ "I'm just the strongest there is right now.", "And confoundedly elegant!", "You guys need some imagination.", "You made a much bigger splash!", "You ended up giving me a thrill!", "So what am I talking about...", "I'm not buying any Dolls.", "Take your time and rest up!", "Have a blast, Pokémon Trainers!", "I got ashes in my eyelashes!", "You're sharp!", "Number of collisions: 5 times!", "Please! Help me out!", "I can't see Mirage Island today...", "Hyahhn!", "Shwahhn!",
                    /* (SM)Sinnoh Tent */ "Your will is overwhelming me!", "This is it! My trump card!", "Trying to monopolize Pokémon just isn't...", "See? Just as analyzed.", "Gagyagyaah!", "Gugyugubah!", "It's a " + linedP + "10 million fine if you're late!", "I'm going to get tougher...", "You'll never be able to stem the flow of time!", "Please come!", "Your team! I sense your strong aura!", "What do you think you're doing?!", "The ring is my rolling sea. " + musical8note, "I was just thinking out loud.", "My code name, it is Looker.", "It's not possible that I lose!",
                    /* (SM)Unova Tent */ "Knock it off!", "Bravo! Excellent!!", "I'll defeat the Champion.", "You're about to feel my rage!", "Nimbasa's Pokémon can dance a nimble bossa!", "Use Bug-type Pokémon!", "Stop!", "People call me Mr. Medal!", "Trainer, do your best, too!", "See who's stronger!", "Plasbad, for short!", "I won't allow anyone to stop me!", "I was expecting exactly that kind of move!", "Bazzazzazzash!", "Preeeeaah!", "Haaahraaan!",
                    /* (SM)Kalos Tent */ "We'll become friends. " + musical8note, "I'll see you all later!", "These people have a few screws loose...", "I want to know what a \"Trainer\" is.", "When I lose, I go out in style!", "Let's give it all we've got!", "Fantastic! Just fantastic!", "Outstanding!", "Try as hard as possible!", "Stop right there!", "That really hit me right here...", "But this is adieu to you all.", "You're just too much, you know?", "Fool! You silly, unseeing child!", "Xsaaaaaah!", "Yvaaaaaar!",
                    "I reached Festival Plaza Rank 100!",
                };
                break;
            }
            CLB_Phrases.Items.Clear();
            CLB_Phrases.Items.Add(res[^ 1], SAV.Festa.GetFestaPhraseUnlocked(106)); //add Lv100 before TentPhrases