Example #1
0
        public Monster(string name, string code, int group, int genre, FiveElement element, ushort strb,
            ushort agl, ClLevel level, string[][] eaoccurs, int[][] eaprops,
            bool[][] ealocks, bool[][] eaonces, bool[][] eaterminis, bool[][] eahinds, string spis)
        {
            this.Name = name; this.Code = code;
            this.Group = Math.Abs(group); this.Genre = genre;
            this.IsEx = (group < 0);
            this.Element = element; this.Level = level;
            this.STRb = strb; this.STR = this.STRb;
            this.AGLb = agl; this.AGL = this.AGLb;
            this.EAOccurs = eaoccurs;
            this.EAProperties = eaprops;
            this.EALocks = ealocks;
            this.EAOnces = eaonces;
            this.EAIsTermini = eaterminis;
            this.EAHinds = eahinds;
            this.Padrone = 0;
            ParseSpi(spis);

            ROM = new Utils.Diva();
            RFM = new Utils.Diva();
            RAM = new Utils.Diva();
            TeamBursted = false;
        }
Example #2
0
 protected new void Harm(Player src, IEnumerable<Player> invs,
     IEnumerable<int> ns, FiveElement five = FiveElement.A, long mask = 0)
 {
     base.Harm(src, invs, ns, five, HPEvoMask.FROM_SK.Set(mask));
 }
Example #3
0
 protected new void Harm(Player src, Player py, int n, FiveElement five = FiveElement.A, long mask = 0)
 {
     base.Harm(src, py, n, five, HPEvoMask.FROM_SK.Set(mask));
 }
Example #4
0
 protected new void Cure(Player src, IEnumerable<Player> invs, int n, FiveElement five = FiveElement.A, long mask = 0)
 {
     base.Cure(src, invs, n, five, HPEvoMask.FROM_SK.Set(mask));
 }
Example #5
0
 public HpIssueSemaphore(ushort who, bool isLove, FiveElement? element, int delta, int hp)
 {
     Who = who; IsLove = isLove;
     Element = element ?? FiveElement.A;
     Delta = delta; HP = hp;
 }
Example #6
0
 public Harm(ushort who, int source, FiveElement elem, int n, long mask)
 {
     Who = who; Element = elem;
     N = n; Source = source;
     if (elem == FiveElement.YINN)
         mask |= ((long)HPEvoMask.TUX_INAVO | (long)HPEvoMask.DECR_INVAO | (long)HPEvoMask.CHAIN_INVAO);
     else if (elem == FiveElement.SOLARIS)
         mask |= ((long)HPEvoMask.TUX_INAVO | (long)HPEvoMask.DECR_INVAO | (long)HPEvoMask.IMMUNE_INVAO);
     Mask = mask;
 }
Example #7
0
 public Cure(ushort who, int source, FiveElement elem, int n, long mask)
 {
     Who = who; Element = elem;
     N = n; Source = source; Mask = mask;
 }
Example #8
0
 private void Cure(IEnumerable<Player> pys, int n, FiveElement element = FiveElement.A, long mask = 0)
 {
     Cure(null, pys, n, element, HPEvoMask.FROM_NMB.Set(mask));
 }
Example #9
0
 private void Harm(Player py, int n, FiveElement element = FiveElement.A, long mask = 0)
 {
     Harm(null, py, n, element, HPEvoMask.FROM_NMB.Set(mask));
 }
Example #10
0
 private bool JNH16SeriesValid(Player player, int type, string fuse,
     string skillName, FiveElement elem, FiveElement adv, FiveElement disadv)
 {
     if (type == 0)
     {
         return Artiad.JoinPetEffects.Parse(fuse).List.Any(p => p.Pets.Any(q =>
             XI.LibTuple.ML.Decode(q) != null && XI.LibTuple.ML.Decode(q).Element == elem));
     }
     else if (type == 1)
     {
         return Artiad.CollapsePetEffects.Parse(fuse).List.Any(p => p.Pets.Any(q =>
             XI.LibTuple.ML.Decode(q) != null && XI.LibTuple.ML.Decode(q).Element == elem));
     }
     else if (type == 2 || type == 3)
     {
         int thisEle = elem.Elem2Index();
         int advEle = adv.Elem2Index();
         return IsMathISOS(skillName, player, fuse) && XI.Board.Garden.Values.
             Any(p => p.IsAlive && (p.Pets[thisEle] != 0 || p.Pets[advEle] != 0));
     }
     else if (type == 4 || (type == 5 && XI.Board.IsMonsterDebut))
     {
         Monster fieldMon = XI.LibTuple.ML.Decode(XI.Board.Monster1);
         return fieldMon != null && fieldMon.Element == disadv;
     }
     else if (type == 6)
     {
         Artiad.ObtainPet opt = Artiad.ObtainPet.Parse(fuse);
         return opt.Pets.Any(p => XI.LibTuple.ML.Decode(p).Element == adv);
     }
     else if (type == 7)
     {
         Artiad.LosePet lpt = Artiad.LosePet.Parse(fuse);
         return lpt.Pets.Any(p => XI.LibTuple.ML.Decode(p).Element == adv);
     }
     else
         return false;
 }
Example #11
0
 private void JNH16SeriesAction(Player player, int type, string fuse,
     string skillName, FiveElement elem, FiveElement adv, FiveElement disadv)
 {
     if (type == 0)
     {
         Artiad.JoinPetEffects.Parse(fuse).List.ForEach(p =>
         {
             int cnt = p.Pets.Count(q => XI.LibTuple.ML.Decode(q) != null &&
                 XI.LibTuple.ML.Decode(q).Element == elem);
             if (cnt > 0)
             {
                 XI.RaiseGMessage("G0IA," + p.Owner + ",0," + cnt);
                 XI.RaiseGMessage("G0IX," + p.Owner + ",0," + cnt);
             }
         });
     }
     else if (type == 1)
     {
         Artiad.CollapsePetEffects.Parse(fuse).List.ForEach(p =>
         {
             int cnt = p.Pets.Count(q => XI.LibTuple.ML.Decode(q) != null &&
                 XI.LibTuple.ML.Decode(q).Element == elem);
             if (cnt > 0)
             {
                 XI.RaiseGMessage("G0OA," + p.Owner + ",0," + cnt);
                 XI.RaiseGMessage("G0OX," + p.Owner + ",0," + cnt);
             }
         });
     }
     else if (type == 2)
     {
         int thisEle = elem.Elem2Index();
         int advEle = adv.Elem2Index();
         List<ushort> actionPets = new List<ushort>();
         foreach (Player py in XI.Board.Garden.Values.Where(p => p.IsAlive && !p.PetDisabled))
         {
             if (py.Pets[thisEle] != 0 && !XI.Board.NotActionPets.Contains(py.Pets[thisEle]))
             {
                 XI.RaiseGMessage("G0IA," + py.Uid + ",0,1");
                 XI.RaiseGMessage("G0IX," + py.Uid + ",0,1");
             }
             if (py.Pets[advEle] != 0)
                 actionPets.Add(py.Pets[advEle]);
         }
         if (actionPets.Count > 0)
             XI.RaiseGMessage(new Artiad.DisableItPetEffect() { Its = actionPets.ToArray() }.ToMessage());
     }
     else if (type == 3)
     {
         int thisEle = elem.Elem2Index();
         int advEle = adv.Elem2Index();
         List<ushort> actionPets = new List<ushort>();
         foreach (Player py in XI.Board.Garden.Values.Where(p => p.IsAlive && !p.PetDisabled))
         {
             if (py.Pets[thisEle] != 0 && !XI.Board.NotActionPets.Contains(py.Pets[thisEle]))
             {
                 XI.RaiseGMessage("G0OA," + py.Uid + ",0,1");
                 XI.RaiseGMessage("G0OX," + py.Uid + ",0,1");
             }
             if (py.Pets[advEle] != 0)
                 actionPets.Add(py.Pets[advEle]);
         }
         if (actionPets.Count > 0)
             XI.RaiseGMessage(new Artiad.EnableItPetEffect() { Its = actionPets.ToArray() }.ToMessage());
     }
     else if (type == 4)
         XI.Board.IsMonsterDebut = true;
     else if (type == 5)
         XI.RaiseGMessage("G0IW," + XI.Board.Monster1 + ",1");
     else if (type == 6)
     {
         Artiad.ObtainPet opt = Artiad.ObtainPet.Parse(fuse);
         opt.Pets.Where(p => XI.LibTuple.ML.Decode(p).Element == adv)
             .ToList().ForEach(p => XI.Board.NotActionPets.Add(p));
     }
     else if (type == 7)
     {
         Artiad.LosePet lpt = Artiad.LosePet.Parse(fuse);
         lpt.Pets.Where(p => XI.LibTuple.ML.Decode(p).Element == adv)
             .ToList().ForEach(p => XI.Board.NotActionPets.Add(p));
     }
 }
Example #12
0
 protected void Harm(Player src, IEnumerable<Player> invs,
     IEnumerable<int> ns, FiveElement five = FiveElement.A, long mask = 0)
 {
     if (invs.Any())
     {
         if (src != null)
             TargetPlayer(src.Uid, invs.Select(p => p.Uid));
         List<Player> linvs = invs.ToList();
         List<int> lns = ns.ToList();
         int sz = linvs.Count;
         XI.RaiseGMessage(Artiad.Harm.ToMessage(Enumerable.Range(0, sz).Select(p =>
             new Artiad.Harm(linvs[p].Uid, src == null ? 0 : src.Uid, five, lns[p], mask))));
     }
 }
Example #13
0
 protected void Harm(Player src, IEnumerable<Player> invs, int n, FiveElement five = FiveElement.A, long mask = 0)
 {
     if (invs.Any())
     {
         if (src != null)
             TargetPlayer(src.Uid, invs.Select(p => p.Uid));
         XI.RaiseGMessage(Artiad.Harm.ToMessage(invs.Select(p =>
             new Artiad.Harm(p.Uid, src == null ? 0 : src.Uid, five, n, mask))));
     }
 }
Example #14
0
 protected void Harm(Player src, Player py, int n, FiveElement five = FiveElement.A, long mask = 0)
 {
     if (src != null)
         TargetPlayer(src.Uid, py.Uid);
     XI.RaiseGMessage(Artiad.Harm.ToMessage(
         new Artiad.Harm(py.Uid, src == null ? 0 : src.Uid, five, n, mask)));
 }