Exemple #1
0
        protected override void SetCreatureStats()
        {
            if (Owner.Info.CareerLine == (int)CareerLine.CAREERLINE_MAGUS)
            {
                StsInterface.Load(CharMgr.GetCharacterInfoStats((byte)CareerLine.CAREERLINE_MAGUS, Math.Min(Level, (byte)40)));
            }
            float armorMod = 1.0f, resistMod = 1.0f, woundsMod = 1f, itemWoundsMod = 0f;

            switch (Spawn.Proto.Model1)
            {
            // White Lion
            // War Lions
            case 132:
            case 133:
            case 134:
            case 135:
                StsInterface.Load(CharMgr.GetCharacterInfoStats((byte)CareerLine.CAREERLINE_WAR_LION, Math.Min(Level, (byte)40)));
                woundsMod                 = 1f;
                itemWoundsMod             = 1f;
                _weaponDamageContribution = WeaponDamageContribution.MainHand;
                break;

            // Beastmaster
            case 1156:     // War Manticore
            case 1086:     // Harpy
            case 1142:     // Giant Scorpion
            case 1272:     // Hydra
                StsInterface.Load(CharMgr.GetCharacterInfoStats((byte)CareerLine.CAREERLINE_WAR_MANTICORE, Math.Min(Level, (byte)40)));
                woundsMod                 = 1f;
                itemWoundsMod             = 1f;
                _weaponDamageContribution = WeaponDamageContribution.MainHand;
                break;

            // Squig
            case 136:
                StsInterface.Load(CharMgr.GetCharacterInfoStats((byte)CareerLine.CAREERLINE_SQUIG, Math.Min(Level, (byte)40)));
                armorMod                  = 2.0f;
                woundsMod                 = 1f;
                itemWoundsMod             = 0.5f;
                _weaponDamageContribution = WeaponDamageContribution.MainHand;
                break;

            // Horned Squig
            case 137:
                StsInterface.Load(CharMgr.GetCharacterInfoStats((byte)CareerLine.CAREERLINE_HORNED_SQUIG, Math.Min(Level, (byte)40)));
                armorMod                  = 2.0f;
                resistMod                 = 0.5f;
                woundsMod                 = 1f;
                itemWoundsMod             = 1f;
                _weaponDamageContribution = WeaponDamageContribution.MainAndRanged;
                break;

            // Spiked Squig
            case 138:
                StsInterface.Load(CharMgr.GetCharacterInfoStats((byte)CareerLine.CAREERLINE_SPIKED_SQUIG, Math.Min(Level, (byte)40)));
                woundsMod                 = 0.85f;
                itemWoundsMod             = 0.85f;
                _weaponDamageContribution = WeaponDamageContribution.Ranged;
                _ignoreZ = true;
                break;

            // Gas Squig
            case 139:
                StsInterface.Load(CharMgr.GetCharacterInfoStats((byte)CareerLine.CAREERLINE_GAS_SQUIG, Math.Min(Level, (byte)40)));
                woundsMod                 = 0.65f;
                itemWoundsMod             = 0.65f;
                _weaponDamageContribution = WeaponDamageContribution.Ranged;
                _ignoreZ = true;
                break;

            // Magus
            // Pink Horror
            case 141:
                woundsMod = 0.5f;
                _weaponDamageContribution = WeaponDamageContribution.MainHand;
                _weaponDamageFactor       = 0.7f;
                break;

            // Blue Horror
            case 142:
                armorMod  = 2f;
                woundsMod = 1f;
                _weaponDamageContribution = WeaponDamageContribution.MainHand;
                _weaponDamageFactor       = 0.85f;
                break;

            // Flamer
            case 143:
                armorMod  = 1.5f;
                woundsMod = 0.75f;
                _weaponDamageContribution = WeaponDamageContribution.MainHand;
                break;

            // Engineer
            // Gun Turret
            case 145:
                woundsMod = 0.5f;
                _weaponDamageContribution = WeaponDamageContribution.MainAndRanged;
                _weaponDamageFactor       = 0.7f;
                break;

            // Bombardment Turret
            case 146:
                armorMod  = 1.5f;
                woundsMod = 0.75f;
                _weaponDamageContribution = WeaponDamageContribution.MainAndRanged;
                _weaponDamageFactor       = 0.85f;
                break;

            // Flame Turret
            case 147:
                armorMod  = 2f;
                woundsMod = 1f;
                _weaponDamageContribution = WeaponDamageContribution.MainAndRanged;
                break;

            // This is to handle .setpet command, it sets the stats of Lion / Manticore
            default:
                StsInterface.Load(CharMgr.GetCharacterInfoStats((byte)CareerLine.CAREERLINE_WAR_MANTICORE, Math.Min(Level, (byte)40)));
                woundsMod                 = 1f;
                itemWoundsMod             = 1f;
                _weaponDamageContribution = WeaponDamageContribution.MainHand;
                break;
            }

            StsInterface.SetBaseStat(Stats.Wounds, (ushort)(Owner.StsInterface.GetCoreStat(Stats.Wounds) * woundsMod));

            StsInterface.AddItemBonusStat(Stats.Willpower, Owner.StsInterface.GetItemStat(Stats.Willpower));

            if (itemWoundsMod > 0f)
            {
                StsInterface.AddItemBonusStat(Stats.Wounds, (ushort)(Owner.StsInterface.GetItemStat(Stats.Wounds) * itemWoundsMod));
            }

            StsInterface.AddItemBonusStat(Stats.Initiative, Owner.StsInterface.GetItemStat(Stats.Initiative));

            StsInterface.AddItemBonusStat(Stats.Armor, (ushort)(Owner.StsInterface.GetItemStat(Stats.Armor) * armorMod));
            StsInterface.AddItemBonusStat(Stats.SpiritResistance, (ushort)(Owner.StsInterface.GetItemStat(Stats.SpiritResistance) * resistMod));
            StsInterface.AddItemBonusStat(Stats.ElementalResistance, (ushort)(Owner.StsInterface.GetItemStat(Stats.ElementalResistance) * resistMod));
            StsInterface.AddItemBonusStat(Stats.CorporealResistance, (ushort)(Owner.StsInterface.GetItemStat(Stats.CorporealResistance) * resistMod));

            StsInterface.ApplyStats();
        }