예제 #1
0
        static void InitO_Events()
        {
            OptionsLoad.Add(MsgType.Event, ui =>
            {
                ui.options = new System.Collections.Generic.List <string>();

                if (OngoingEvent.Ongoing.eventinfo.shop != null)
                {
                    ui.options.Add(EUI.trade);
                }
            });

            OptionsLoad.Add(MsgType.EventShop, ui =>
            {
                ui.options = new System.Collections.Generic.List <string>()
                {
                    EUI.uturn
                };

                if (ui.data == null)
                {
                    for (int i = 0; i < OngoingEvent.Ongoing.eventinfo.shop.stock.Length; i++)
                    {
                        ui.options.Add(EUI.GetNum(i + 1));
                    }
                }
                else
                {
                    ui.options.AddRange(new[] { EUI.GetLetter(8), EUI.GetLetter(21), EUI.GetLetter(23), EUI.GetLetter(12) });
                }
            });
        }
예제 #2
0
        static void InitO_Area()
        {
            OptionsLoad.Add(MsgType.ArenaService, ui =>
                            ui.options = new List <string>()
            {
                EUI.sideQuest, EUI.bounties
            }
                            );

            OptionsLoad.Add(MsgType.ArenaFights, ui =>
            {
                if (int.TryParse(ui.data, out int l))
                {
                    ui.options = new List <string>()
                    {
                        EUI.ok, EUI.uturn
                    };
                }
                else if (int.TryParse(ui.data.TrimStart('#'), out l))
                {
                    ui.options = new List <string>();
                    for (int i = 1; i <= l; i++)
                    {
                        ui.options.Add(EUI.GetNum(i));
                    }
                }
            });
        }
예제 #3
0
 static void InitO_Encounter()
 {
     OptionsLoad.Add(MsgType.Adventure, ui => {
         if (ui.player.IsInAdventure)
         {
             ui.options = new List <string>(new[] { EUI.cycle, EUI.cancel });
         }
         else if (ui.data == null)
         {
             ui.options = new List <string>(new[] { EUI.ok, EUI.sideQuest });
         }
         else if (ui.data[0] == 'Q')
         {
             ui.options = new List <string>();
             for (int i = 0; i < 6; i++)
             {
                 ui.options.Add(EUI.GetNum(i + 1));
             }
         }
         else
         {
             ui.options = new List <string>();
             for (int i = 0; i < 4; i++)
             {
                 ui.options.Add(EUI.GetNum(i + 1));
             }
         }
     });
 }
예제 #4
0
 static void InitO_Inventory()
 {
     OptionsLoad.Add(MsgType.Inventory, ui =>
                     ui.options = new List <string>()
     {
         EUI.prev, EUI.cycle, EUI.next, EUI.loot
     }
                     );
 }
예제 #5
0
        private static void InitO_Gambling()
        {
            OptionsLoad.Add(MsgType.GamblingGames, ui =>
            {
                ui.options = new List <string>();
                switch (ui.data)
                {
                case "Tavern":
                    ui.options.Add(EUI.Dice(1));
                    ui.options.Add(EUI.GetNum(0));
                    break;
                }
            });

            OptionsLoad.Add(MsgType.DiceGame, ui =>
                            ui.options = new List <string>()
            {
                EUI.prev,
                EUI.Dice(1),
                EUI.Dice(2),
                EUI.next,
                EUI.two, EUI.five, EUI.zero,
                EUI.cancel
            });

            OptionsLoad.Add(MsgType.GameBet, ui =>
                            ui.options = new List <string>()
            {
                EUI.prev,
                EUI.next,
                EUI.two, EUI.five, EUI.zero,
                EUI.ok,
            });

            OptionsLoad.Add(MsgType.CardGame, ui =>
            {
                Type type = GamblingGame.GetGameType(ui.data);
                Dictionary <string, string> actions = Utils.GetVar
                                                      <Dictionary <string, string> >(type, "Actions", true);
                ui.options = new List <string>(actions.Keys);
            });
        }
예제 #6
0
        static void InitO_Dynasty()
        {
            OptionsLoad.Add(MsgType.DynastyMembership, ui =>
                            ui.options = new List <string>()
            {
                EUI.greaterthan, EUI.lowerthan, EUI.cancel
            }
                            );

            OptionsLoad.Add(MsgType.DynastyMember, ui => {
                if (ui.data != null)
                {
                    string[] nums = ui.data?.Split(';');
                    if (nums.Length > 0)
                    {
                        ui.options = new List <string>();
                        for (int i = 0; i < nums.Length; i++)
                        {
                            ui.options.Add(EUI.GetNum(i + 1));
                        }
                    }
                }
            });
        }
예제 #7
0
        static void InitO_Sandbox()
        {
            OptionsLoad.Add(MsgType.Sandbox, ui =>
            {
                string[] ds = ui.data.Split(';');
                if (ds[1] == "confirm")
                {
                    ui.options = new List <string>()
                    {
                        EUI.ok, EUI.cancel
                    }
                }
                ;
                else
                {
                    ui.options = new List <string>()
                    {
                        EUI.storage, EUI.building
                    };
                    if (ds[1] == "upgrade")
                    {
                        ui.options.Add(EUI.greaterthan);
                    }
                    switch (ds[0])
                    {
                    case "house":

                        break;

                    case "stronghold":

                        break;
                    }
                }
            });

            OptionsLoad.Add(MsgType.SandboxStorage, ui =>
            {
                ui.options = new List <string>()
                {
                    EUI.prev, EUI.cycle, EUI.next
                };
            });

            OptionsLoad.Add(MsgType.TileControls, ui =>
            {
                string[] ds = ui.data.Split(';');
                if (ds.Length > 2)
                {
                    ui.options = new List <string>()
                    {
                        EUI.greaterthan,
                        EUI.explosive
                    };

                    if (int.TryParse(ds[2], out int readyAmount))
                    {
                        ui.options.Insert(0, EUI.cancel);
                        if (readyAmount > 0)
                        {
                            ui.options.Insert(0, EUI.collect);
                        }
                    }
                    else
                    {
                        ui.options.Insert(0, EUI.produce);
                    }
                }
                else
                {
                    ui.options = new List <string>();
                    int.TryParse(ds[1], out int tileCount);
                    for (int i = 0; i < tileCount; i++)
                    {
                        ui.options.Add(EUI.GetNum(i + 1));
                    }
                }
            });

            OptionsLoad.Add(MsgType.TileProductions, ui =>
            {
                string[] ds = ui.data.Split(';');
                ui.options  = new List <string>()
                {
                    EUI.prev, EUI.next
                };
                int.TryParse(ds[2], out int count);
                for (int i = 0; i < count; i++)
                {
                    ui.options.Add(EUI.GetNum(i + 1));
                }
            });

            OptionsLoad.Add(MsgType.TileProduce, ui
                            => ui.options = new List <string>()
            {
                EUI.prev,
                EUI.lowerthan,
                EUI.greaterthan,
                EUI.next,
                EUI.ok
            });
        }