Beispiel #1
0
 public SkillEffectData(ESkillEffect typeAction, ETypeEffect typeEffect, int levelSkillEffect, float valueIncreasePerLv, float effectValue, float timeExist, float ratioSuccess, float timeDistance, float ratioOutbreak)
 {
     idAuto++;
     this.id                 = idAuto;
     this.typeAction         = typeAction;
     this.typeEffect         = typeEffect;
     this.levelSkillEffect   = levelSkillEffect;
     this.valueIncreasePerLv = valueIncreasePerLv;
     this.effectValue        = effectValue;
     this.timeExist          = timeExist;
     this.ratioSuccess       = ratioSuccess;
     this.timeDistance       = timeDistance;
     this.ratioOutbreak      = ratioOutbreak;
 }
Beispiel #2
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;
         }
     }
 }
        public void CreateNewSkillEffect(ESkillEffect typeAction, ETypeEffect typeEffect, int levelSkillEffect, float valueIncreasePerLv, float effectValue, float timeExist, float ratioSuccess, float timeDistance, float ratioOutbreak)
        {
            SkillEffectData newskilleffect = new SkillEffectData(typeAction, typeEffect, levelSkillEffect, valueIncreasePerLv, effectValue, timeExist, ratioSuccess, timeDistance, ratioOutbreak);

            AddSkillEffect(newskilleffect);
        }