Exemplo n.º 1
0
 public Status(short hMap, DigimonStats stats)
 {
     packet.Type(1023);
     packet.WriteShort(hMap);
     packet.WriteShort(stats.HP);
     packet.WriteShort(stats.DS);
     packet.WriteInt(0);
 }
Exemplo n.º 2
0
        public DigimonStats Default(Character Tamer, int Sync, int Size)
        {
            DigimonStats Stats = new DigimonStats();

            Stats.MaxHP = (short)(Math.Min(Math.Floor((decimal)HP * ((ushort)Size / 10000)) + Math.Floor((decimal)Tamer.HP * (Sync / 100)), short.MaxValue));
            Stats.HP = (short)(Math.Min(Math.Floor((decimal)HP * ((ushort)Size / 10000)) + Math.Floor((decimal)Tamer.HP * (Sync / 100)), short.MaxValue));
            Stats.MaxDS = (short)(Math.Min(Math.Floor((decimal)DS * ((ushort)Size / 10000)) + Math.Floor((decimal)Tamer.DS * (Sync / 100)), short.MaxValue));
            Stats.DS = (short)(Math.Max(Math.Floor((decimal)DS * ((ushort)Size / 10000)) + Math.Floor((decimal)Tamer.DS * (Sync / 100)), short.MaxValue));

            Stats.DE = (short)(Math.Min(Math.Floor((decimal)DE * ((ushort)Size / 10000)) + Math.Floor((decimal)Tamer.DE * (Sync / 100)), short.MaxValue));
            Stats.MS = (short)(Math.Min(Math.Floor((decimal)MS * ((ushort)Size / 10000)) + Math.Floor((decimal)Tamer.MS * (Sync / 100)), short.MaxValue));
            Stats.CR = (short)(Math.Min(Math.Floor((decimal)CR * ((ushort)Size / 10000)), short.MaxValue));
            Stats.AT = (short)(Math.Min(Math.Floor((decimal)AT * ((ushort)Size / 10000)) + Math.Floor((decimal)Tamer.AT * (Sync / 100)), short.MaxValue));
            Stats.EV = EV;
            Stats.uStat = uStat;
            Stats.HT = HT;

            Stats.Intimacy = (short)Sync;
            return Stats;
        }