示例#1
0
        public static Stats New(ushort level, sbyte breedId)
        {
            BreedRecord breed = BreedRecord.GetBreed(breedId);

            var stats = new Stats()
            {
                ActionPoints        = ApCharacteristic.New(StartActionPoints),
                MovementPoints      = MpCharacteristic.New((short)StartMovementPoints),
                Agility             = Characteristic.Zero(),
                AirDamageBonus      = Characteristic.Zero(),
                AirReduction        = Characteristic.Zero(),
                AirResistPercent    = ResistanceCharacteristic.Zero(),
                AllDamagesBonus     = Characteristic.Zero(),
                DamagesBonusPercent = Characteristic.Zero(),
                Chance = Characteristic.Zero(),
                CriticalDamageBonus     = Characteristic.Zero(),
                CriticalDamageReduction = Characteristic.Zero(),
                CriticalHit             = Characteristic.Zero(),
                Initiative             = Characteristic.Zero(),
                CriticalHitWeapon      = 0,
                DodgePAProbability     = Characteristic.Zero(),
                DodgePMProbability     = Characteristic.Zero(),
                EarthDamageBonus       = Characteristic.Zero(),
                EarthReduction         = Characteristic.Zero(),
                EarthResistPercent     = ResistanceCharacteristic.Zero(),
                FireDamageBonus        = Characteristic.Zero(),
                FireReduction          = Characteristic.Zero(),
                FireResistPercent      = ResistanceCharacteristic.Zero(),
                GlobalDamageReduction  = 0,
                GlyphBonusPercent      = Characteristic.Zero(),
                RuneBonusPercent       = Characteristic.Zero(),
                PermanentDamagePercent = Characteristic.Zero(),
                HealBonus               = Characteristic.Zero(),
                Intelligence            = Characteristic.Zero(),
                LifePoints              = breed.StartLifePoints,
                MaxEnergyPoints         = (ushort)(level * 100),
                NeutralDamageBonus      = Characteristic.Zero(),
                NeutralReduction        = Characteristic.Zero(),
                NeutralResistPercent    = ResistanceCharacteristic.Zero(),
                Prospecting             = Characteristic.New(breed.StartProspecting),
                PushDamageBonus         = Characteristic.Zero(),
                PushDamageReduction     = Characteristic.Zero(),
                PvPAirReduction         = Characteristic.Zero(),
                PvPAirResistPercent     = ResistanceCharacteristic.Zero(),
                PvPEarthReduction       = Characteristic.Zero(),
                PvPEarthResistPercent   = ResistanceCharacteristic.Zero(),
                PvPFireReduction        = Characteristic.Zero(),
                PvPFireResistPercent    = ResistanceCharacteristic.Zero(),
                PvPNeutralReduction     = Characteristic.Zero(),
                PvPNeutralResistPercent = ResistanceCharacteristic.Zero(),
                PvPWaterReduction       = Characteristic.Zero(),
                PvPWaterResistPercent   = ResistanceCharacteristic.Zero(),
                Range    = RangeCharacteristic.Zero(),
                Reflect  = Characteristic.Zero(),
                Strength = Characteristic.Zero(),
                SummonableCreaturesBoost = Characteristic.New(1),
                TrapBonus                 = Characteristic.Zero(),
                TrapBonusPercent          = Characteristic.Zero(),
                Vitality                  = Characteristic.Zero(),
                WaterDamageBonus          = Characteristic.Zero(),
                WaterReduction            = Characteristic.Zero(),
                WaterResistPercent        = ResistanceCharacteristic.Zero(),
                WeaponDamagesBonusPercent = Characteristic.Zero(),
                Wisdom        = Characteristic.Zero(),
                TackleBlock   = Characteristic.Zero(),
                TackleEvade   = Characteristic.Zero(),
                PAAttack      = Characteristic.Zero(),
                PMAttack      = Characteristic.Zero(),
                Energy        = (ushort)(level * 100),
                MaxLifePoints = breed.StartLifePoints,
                WeightBonus   = 0,
            };

            return(stats);
        }
示例#2
0
        /// <summary>
        /// 0 dans les stats de mobs, a voir. + Initiative Mobs :)
        /// </summary>
        /// <param name="grade"></param>
        public FighterStats(MonsterGrade grade, int power)
        {
            this.CurrentLifePoints    = (int)grade.LifePoints;
            this.CurrentMaxLifePoints = (int)grade.LifePoints;
            this.InvisibilityState    = GameActionFightInvisibilityStateEnum.VISIBLE;
            this.ShieldPoints         = 0;
            this.Summoned             = false;
            this.SummonerId           = 0;

            this.ActionPoints            = ApCharacteristic.New(grade.ActionPoints);
            this.MovementPoints          = MpCharacteristic.New(grade.MovementPoints);
            this.Agility                 = Characteristic.New((short)(power));
            this.AirDamageBonus          = Characteristic.Zero();
            this.AirReduction            = Characteristic.Zero();
            this.AirResistPercent        = ResistanceCharacteristic.New(grade.AirResistance);
            this.AllDamagesBonus         = Characteristic.Zero();
            this.Chance                  = Characteristic.New((short)(power));
            this.CriticalDamageBonus     = Characteristic.Zero();
            this.CriticalDamageReduction = Characteristic.Zero();
            this.CriticalHit             = Characteristic.Zero();
            this.CriticalHitWeapon       = 0;
            this.DamagesBonusPercent     = Characteristic.Zero();
            this.DodgePAProbability      = Characteristic.New(grade.PADodge);
            this.DodgePMProbability      = Characteristic.New(grade.PmDodge);
            this.EarthDamageBonus        = Characteristic.Zero();
            this.EarthReduction          = Characteristic.Zero();
            this.EarthResistPercent      = ResistanceCharacteristic.New(grade.EarthResistance);
            this.Energy                  = 0;
            this.FireDamageBonus         = Characteristic.Zero();
            this.FireReduction           = Characteristic.Zero();
            this.FireResistPercent       = ResistanceCharacteristic.New(grade.FireResistance);
            this.GlobalDamageReduction   = 0;
            this.GlyphBonusPercent       = Characteristic.Zero();
            this.HealBonus               = Characteristic.Zero();
            this.Initiative              = Characteristic.Zero();
            this.Intelligence            = Characteristic.New((short)(power));
            this.LifePoints              = (int)grade.LifePoints;
            this.MaxEnergyPoints         = 0;
            this.MaxLifePoints           = (int)grade.LifePoints;
            this.NeutralDamageBonus      = Characteristic.Zero();
            this.NeutralReduction        = Characteristic.Zero();
            this.NeutralResistPercent    = ResistanceCharacteristic.New(grade.NeutralResistance);
            this.PAAttack                = Characteristic.Zero();
            this.PermanentDamagePercent  = Characteristic.Zero();
            this.PvPAirResistPercent     = ResistanceCharacteristic.Zero();
            this.PvPAirReduction         = Characteristic.Zero();
            this.PvPEarthReduction       = Characteristic.Zero();
            this.PvPEarthResistPercent   = ResistanceCharacteristic.Zero();
            this.PvPFireReduction        = Characteristic.Zero();
            this.PvPFireResistPercent    = ResistanceCharacteristic.Zero();
            this.PvPNeutralReduction     = Characteristic.Zero();
            this.PvPNeutralResistPercent = ResistanceCharacteristic.Zero();
            this.PvPWaterReduction       = ResistanceCharacteristic.Zero();
            this.PvPWaterResistPercent   = ResistanceCharacteristic.Zero();
            this.PushDamageReduction     = Characteristic.Zero();
            this.PushDamageBonus         = Characteristic.Zero();
            this.Prospecting             = Characteristic.Zero();
            this.PMAttack                = Characteristic.Zero();
            this.Range                     = RangeCharacteristic.Zero();
            this.Reflect                   = Characteristic.New((short)grade.DamageReflect);
            this.RuneBonusPercent          = Characteristic.Zero();
            this.Strength                  = Characteristic.New((short)(power));
            this.SummonableCreaturesBoost  = Characteristic.New(1);
            this.TackleBlock               = Characteristic.Zero();
            this.TackleEvade               = Characteristic.Zero();
            this.TrapBonus                 = Characteristic.Zero();;
            this.TrapBonusPercent          = Characteristic.Zero();
            this.Vitality                  = Characteristic.Zero();
            this.WaterDamageBonus          = Characteristic.Zero();
            this.WaterReduction            = Characteristic.Zero();
            this.WaterResistPercent        = ResistanceCharacteristic.New(grade.WaterResistance);
            this.WeaponDamagesBonusPercent = Characteristic.Zero();
            this.WeightBonus               = 0;
            this.Wisdom                    = Characteristic.New((short)(grade.Wisdom));//+ ((double)power / (double)2)));
            this.FinalDamageCoefficient    = 1;
        }