Exemple #1
0
 public void PrintListSkill()
 {
     Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("ID"), 10) + Ultils.FormatText(MyLocalization.GetText("Skill Name"), 25) + Ultils.FormatText(MyLocalization.GetText("Description"), 20) + Ultils.FormatText(MyLocalization.GetText("Magic Value")) + Ultils.FormatText(MyLocalization.GetText("Time Cool Down")) + Ultils.FormatText(MyLocalization.GetText("MP Used"), 10) + "\n");
     foreach (var item in skillManager.GetList())
     {
         PrintSkill(item.Value);
     }
 }
Exemple #2
0
 public void PrintListSkillEffect()
 {
     Console.WriteLine("\n" + Ultils.FormatText(MyLocalization.GetText("ID"), 10) + Ultils.FormatText(MyLocalization.GetText("Type Action"), 30) + Ultils.FormatText(MyLocalization.GetText("Type Effect"), 30) + Ultils.FormatText(MyLocalization.GetText("Level Skill Effect")) + Ultils.FormatText(MyLocalization.GetText("Effect Value")) + Ultils.FormatText(MyLocalization.GetText("Time Exist")) + Ultils.FormatText(MyLocalization.GetText("Ratio Success")) + Ultils.FormatText(MyLocalization.GetText("Time Distance")) + Ultils.FormatText(MyLocalization.GetText("Ratio Outbreak")) + "\n");
     foreach (var item in skillEffectManager.GetListSkillEffect())
     {
         PrintSkillEffect(item.Value);
     }
 }
Exemple #3
0
 public void PrintListCharacter()
 {
     Console.WriteLine("List of Characters");
     Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("ID"), 10) + Ultils.FormatText(MyLocalization.GetText("Character's name"), 50));
     foreach (var character in characterManager.GetList())
     {
         PrintCharacter(character.Value);
     }
 }
Exemple #4
0
 public void UpdateHPAndMP(CharacterBattleData player1, CharacterBattleData player2)
 {
     lock (syncLock)
     {
         Console.SetCursorPosition(7, 5);
         Console.Write(Ultils.FormatText(MyLocalization.GetText("HP:   "), 10) + player1.hp + "\t" + Ultils.FormatText(MyLocalization.GetText("MP:   "), 10) + player1.mp);
         Console.SetCursorPosition(left + 3, 5);
         Console.Write(Ultils.FormatText(MyLocalization.GetText("HP:   "), 10) + player2.hp + "\t" + Ultils.FormatText(MyLocalization.GetText("MP:   "), 10) + player2.mp);
     }
 }
Exemple #5
0
 public void CreatNewSkillEffectView()
 {
     while (true)
     {
         Console.Clear();
         Console.WriteLine(MyLocalization.GetText("Creation Skill Effect View") + "\n\n");
         for (int i = -3; i < 3; i++)
         {
             ESkillEffect type = (ESkillEffect)i;
             Console.WriteLine(type.ToString() + " : " + i);
         }
         Console.Write("\n" + Ultils.FormatText(MyLocalization.GetText("Choose Type Action (Enter Value):"), 45));
         ESkillEffect typeAction = (ESkillEffect)int.Parse(Console.ReadLine());
         for (int i = 0; i < 4; i++)
         {
             ETypeEffect type = (ETypeEffect)i;
             Console.WriteLine(type.ToString() + " : " + i);
         }
         Console.Write("\n" + Ultils.FormatText(MyLocalization.GetText("Choose Type Effect (Enter Value)"), 45));
         ETypeEffect typeEffect = (ETypeEffect)int.Parse(Console.ReadLine());
         Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Level Skill Effect:"), 45));
         int levelSkillEffect = int.Parse(Console.ReadLine());
         Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Effect Value:"), 45));
         float effectValue = float.Parse(Console.ReadLine());
         Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Time Exist:"), 45));
         float timeExist = float.Parse(Console.ReadLine());
         Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Ratio Success:"), 45));
         float ratioSuccess = float.Parse(Console.ReadLine());
         Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Time Distance:"), 45));
         float timeDistance = float.Parse(Console.ReadLine());
         Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Enter Ratio Out Break:"), 45));
         float ratioOutBreak = float.Parse(Console.ReadLine());
         skillEffectManager.CreateNewSkillEffect(typeAction, typeEffect, levelSkillEffect, effectValue, timeDistance, ratioSuccess, timeDistance, ratioOutBreak);
         Console.WriteLine(MyLocalization.GetText("Created and saved successfully!"));
         Console.WriteLine(MyLocalization.GetText("Press 'Enter' continue to enter, press any key to exit"));
         ConsoleKeyInfo key = Console.ReadKey();
         if (key.Key != ConsoleKey.Enter)
         {
             break;
         }
     }
 }
Exemple #6
0
        public void PrintInfoPlayer(CharacterProperties dataPlayer1, CharacterProperties dataPlayer2)
        {
            //Player 1 Info
            Ultils.Border(40, 6, left, top);
            Console.SetCursorPosition(left + 10, top + 2);
            Console.WriteLine(MyLocalization.GetText("Player 1"));
            Console.SetCursorPosition(left + 3, Console.CursorTop);
            Console.WriteLine(Ultils.FormatText((MyLocalization.GetText("Name")), 20) + "\t" + dataPlayer1.characterName);
            Console.SetCursorPosition(left + 3, Console.CursorTop);
            Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("HP:   "), 10) + dataPlayer1.hp + "\t" + Ultils.FormatText(MyLocalization.GetText("MP:   "), 10) + dataPlayer1.mp);

            //Player 2 Info
            left = width / 2 + 10;
            Ultils.Border(40, 6, left, top);
            Console.SetCursorPosition(left + 10, top + 2);
            Console.WriteLine(MyLocalization.GetText("Player 2"));
            Console.SetCursorPosition(left + 3, Console.CursorTop);
            Console.WriteLine(Ultils.FormatText((MyLocalization.GetText("Name")), 20) + "\t" + dataPlayer2.characterName);
            Console.SetCursorPosition(left + 3, Console.CursorTop);
            Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("HP:   "), 10) + dataPlayer2.hp + "\t" + Ultils.FormatText(MyLocalization.GetText("MP:   "), 10) + dataPlayer2.mp);
        }
Exemple #7
0
 public void CreatNewSkillView()
 {
     while (true)
     {
         Console.Clear();
         Console.WriteLine(MyLocalization.GetText("Creation Skill View") + "\n\n");
         Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Skill Name"), 45));
         string skillName = Console.ReadLine();
         Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Description"), 45));
         string description = Console.ReadLine();
         skillEffectView.PrintListSkillEffect();
         List <int> listIdSkillEffect = new List <int>();
         while (true)
         {
             Console.Write(MyLocalization.GetText("Choose Skill Effect (Enter Value):"));
             int idSkillEffect = int.Parse(Console.ReadLine());
             listIdSkillEffect.Add(idSkillEffect);
             Console.WriteLine(Ultils.FormatText(MyLocalization.GetText("Press 'Enter' continue to enter, press any key to exit"), 45));
             ConsoleKeyInfo keyconfirm = Console.ReadKey();
             if (keyconfirm.Key != ConsoleKey.Enter)
             {
                 break;
             }
         }
         Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Time Used:"), 45));
         float timeUsed = float.Parse(Console.ReadLine());
         Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Time Cool Down:"), 45));
         float timeCoolDown = float.Parse(Console.ReadLine());
         Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter MP Used:"), 45));
         int mpUsed = int.Parse(Console.ReadLine());
         adapter.CreateNewSkill(skillName, description, listIdSkillEffect.ToArray(), timeUsed, timeCoolDown, mpUsed, 1);
         Console.WriteLine(MyLocalization.GetText("Created and saved successfully!"));
         Console.WriteLine(MyLocalization.GetText("Press 'Enter' continue to enter, press any key to exit"));
         ConsoleKeyInfo key = Console.ReadKey();
         if (key.Key != ConsoleKey.Enter)
         {
             break;
         }
     }
 }
Exemple #8
0
        public void CharacterCreation()
        {
            Console.WriteLine(MyLocalization.GetText("Creation Character View"));
            Console.OutputEncoding = Encoding.UTF8;
            Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's name"), 50));
            string name = Console.ReadLine();

            Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's HP"), 50));
            float hp = float.Parse(Console.ReadLine());

            Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's MP"), 50));
            float mp = float.Parse(Console.ReadLine());

            Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's HP Regen"), 50));
            float hpRegen = float.Parse(Console.ReadLine());

            Console.Write(Ultils.FormatText(MyLocalization.GetText("Enter Character's MP Regen"), 50));
            float mpRegen = float.Parse(Console.ReadLine());

            characterManager.CreateCharacter(name, hp, mp, hpRegen, mpRegen);
            Console.WriteLine(MyLocalization.GetText("Created and saved successfully!"));
        }
Exemple #9
0
 public void PrintSkill(SkillData skill)
 {
     Console.WriteLine("\n" + Ultils.FormatText(skill.id.ToString(), 10) + Ultils.FormatText(skill.skillName, 25) + Ultils.FormatText(skill.description, 20) + Ultils.FormatText(skill.timeUsed.ToString()) + Ultils.FormatText(skill.timeCooldown.ToString()) + Ultils.FormatText(skill.mpUsed.ToString()));
     Console.WriteLine(MyLocalization.GetText("Skill Effect"));
     PrintEffectOfSKill(skill);
 }
Exemple #10
0
 public void PrintSkillEffect(SkillEffectData skillEffect)
 {
     Console.WriteLine(Ultils.FormatText(skillEffect.id.ToString(), 10) + Ultils.FormatText(skillEffect.typeAction.ToString(), 30) + Ultils.FormatText(skillEffect.typeEffect.ToString(), 30) + Ultils.FormatText(skillEffect.levelSkillEffect.ToString()) + Ultils.FormatText(skillEffect.effectValue.ToString()) + Ultils.FormatText(skillEffect.timeExist.ToString()) + Ultils.FormatText(skillEffect.ratioSuccess.ToString()) + Ultils.FormatText(skillEffect.timeDistance.ToString()) + Ultils.FormatText(skillEffect.ratioOutbreak.ToString()) + "\n");
 }
Exemple #11
0
 public void PrintCharacter(CharacterProperties character)
 {
     Console.WriteLine(Ultils.FormatText(character.id.ToString(), 10) + Ultils.FormatText(character.characterName, 25) + Ultils.FormatText(character.hp.ToString()) + Ultils.FormatText(character.mp.ToString()));
 }