Пример #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
        public CharacterCharacteristicsInformations GetCharacterCharacteristics(Character character)
        {
            ulong expFloor     = ExperienceRecord.GetExperienceForLevel(character.Level).Player;
            ulong expNextFloor = ExperienceRecord.GetExperienceForNextLevel(character.Level).Player;

            CharacterCharacteristicsInformations informations = new CharacterCharacteristicsInformations()
            {
                actionPoints            = ActionPoints.GetBaseCharacteristic(),
                actionPointsCurrent     = ActionPoints.TotalInContext(),
                additionnalPoints       = 0,
                agility                 = Agility.GetBaseCharacteristic(),
                airDamageBonus          = AirDamageBonus.GetBaseCharacteristic(),
                airElementReduction     = AirReduction.GetBaseCharacteristic(),
                airElementResistPercent = AirResistPercent.GetBaseCharacteristic(),
                alignmentInfos          = character.Record.Alignment.GetActorExtendedAlignement(),
                allDamagesBonus         = AllDamagesBonus.GetBaseCharacteristic(),
                chance = Chance.GetBaseCharacteristic(),
                criticalDamageBonus          = CriticalDamageBonus.GetBaseCharacteristic(),
                criticalDamageReduction      = CriticalDamageReduction.GetBaseCharacteristic(),
                criticalHit                  = CriticalHit.GetBaseCharacteristic(),
                criticalHitWeapon            = CriticalHitWeapon,
                criticalMiss                 = Characteristic.Zero().GetBaseCharacteristic(),
                damagesBonusPercent          = DamagesBonusPercent.GetBaseCharacteristic(),
                dodgePALostProbability       = DodgePAProbability.GetBaseCharacteristic(),
                dodgePMLostProbability       = DodgePMProbability.GetBaseCharacteristic(),
                earthDamageBonus             = EarthDamageBonus.GetBaseCharacteristic(),
                earthElementReduction        = EarthReduction.GetBaseCharacteristic(),
                earthElementResistPercent    = EarthResistPercent.GetBaseCharacteristic(),
                pvpEarthElementReduction     = PvPEarthReduction.GetBaseCharacteristic(),
                pvpEarthElementResistPercent = PvPEarthResistPercent.GetBaseCharacteristic(),
                fireDamageBonus              = FireDamageBonus.GetBaseCharacteristic(),
                fireElementReduction         = FireReduction.GetBaseCharacteristic(),
                fireElementResistPercent     = FireResistPercent.GetBaseCharacteristic(),
                pvpFireElementReduction      = PvPFireReduction.GetBaseCharacteristic(),
                pvpFireElementResistPercent  = PvPFireResistPercent.GetBaseCharacteristic(),
                glyphBonusPercent            = GlyphBonusPercent.GetBaseCharacteristic(),
                healBonus                      = HealBonus.GetBaseCharacteristic(),
                initiative                     = new CharacterBaseCharacteristic((short)FormulasProvider.Instance.BaseInitiative(this), 0, Initiative.Total(), 0, 0),
                intelligence                   = Intelligence.GetBaseCharacteristic(),
                kamas                          = character.Record.Kamas,
                lifePoints                     = (uint)LifePoints,
                maxEnergyPoints                = MaxEnergyPoints,
                maxLifePoints                  = (uint)MaxLifePoints,
                movementPoints                 = MovementPoints.GetBaseCharacteristic(),
                movementPointsCurrent          = MovementPoints.TotalInContext(),
                PMAttack                       = PMAttack.GetBaseCharacteristic(),
                PAAttack                       = PAAttack.GetBaseCharacteristic(),
                pvpAirElementReduction         = PvPAirReduction.GetBaseCharacteristic(),
                pvpAirElementResistPercent     = PvPAirResistPercent.GetBaseCharacteristic(),
                pvpNeutralElementReduction     = PvPNeutralReduction.GetBaseCharacteristic(),
                pvpNeutralElementResistPercent = PvPNeutralResistPercent.GetBaseCharacteristic(),
                pvpWaterElementReduction       = PvPWaterReduction.GetBaseCharacteristic(),
                pvpWaterElementResistPercent   = PvPWaterResistPercent.GetBaseCharacteristic(),
                energyPoints                   = Energy,
                experience                     = character.Experience,
                experienceLevelFloor           = expFloor,
                experienceNextLevelFloor       = expNextFloor,
                neutralDamageBonus             = NeutralDamageBonus.GetBaseCharacteristic(),
                neutralElementReduction        = NeutralReduction.GetBaseCharacteristic(),
                neutralElementResistPercent    = NeutralResistPercent.GetBaseCharacteristic(),
                tackleEvade                    = TackleEvade.GetBaseCharacteristic(),
                tackleBlock                    = TackleBlock.GetBaseCharacteristic(),
                range                          = Range.GetBaseCharacteristic(),
                waterElementReduction          = WaterReduction.GetBaseCharacteristic(),
                waterDamageBonus               = WaterDamageBonus.GetBaseCharacteristic(),
                waterElementResistPercent      = WaterResistPercent.GetBaseCharacteristic(),
                reflect                        = Reflect.GetBaseCharacteristic(),
                permanentDamagePercent         = PermanentDamagePercent.GetBaseCharacteristic(),
                prospecting                    = Prospecting.GetBaseCharacteristic(),
                pushDamageBonus                = PushDamageBonus.GetBaseCharacteristic(),
                pushDamageReduction            = PushDamageReduction.GetBaseCharacteristic(),
                runeBonusPercent               = RuneBonusPercent.GetBaseCharacteristic(),
                spellModifications             = new CharacterSpellModification[0],
                spellsPoints                   = character.Record.SpellPoints,
                statsPoints                    = character.Record.StatsPoints,
                vitality                       = Vitality.GetBaseCharacteristic(),
                strength                       = Strength.GetBaseCharacteristic(),
                summonableCreaturesBoost       = SummonableCreaturesBoost.GetBaseCharacteristic(),
                trapBonus                      = TrapBonus.GetBaseCharacteristic(),
                trapBonusPercent               = TrapBonusPercent.GetBaseCharacteristic(),
                weaponDamagesBonusPercent      = WeaponDamagesBonusPercent.GetBaseCharacteristic(),
                wisdom                         = Wisdom.GetBaseCharacteristic(),
                probationTime                  = 0,
            };

            return(informations);
        }
Пример #3
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;
        }