示例#1
0
        public void BuildAzirTurret()
        {
            Inibin inibin;

            if (!_rafManager.readInibin("DATA/Characters/" + Model + "/" + Model + ".inibin", out inibin))
            {
                _logger.LogCoreError("couldn't find turret stats for " + Model);
                return;
            }

            stats.HealthPoints.BaseValue       = inibin.getFloatValue("Data", "BaseHP");
            stats.CurrentHealth                = stats.HealthPoints.Total;
            stats.ManaPoints.BaseValue         = inibin.getFloatValue("Data", "BaseMP");
            stats.CurrentMana                  = stats.ManaPoints.Total;
            stats.AttackDamage.BaseValue       = inibin.getFloatValue("DATA", "BaseDamage");
            stats.Range.BaseValue              = TURRET_RANGE;
            stats.MoveSpeed.BaseValue          = inibin.getFloatValue("DATA", "MoveSpeed");
            stats.Armor.BaseValue              = inibin.getFloatValue("DATA", "Armor");
            stats.MagicResist.BaseValue        = inibin.getFloatValue("DATA", "SpellBlock");
            stats.HealthRegeneration.BaseValue = inibin.getFloatValue("DATA", "BaseStaticHPRegen");
            stats.ManaRegeneration.BaseValue   = inibin.getFloatValue("DATA", "BaseStaticMPRegen");
            stats.AttackSpeedFlat              = 0.625f / (1 + inibin.getFloatValue("DATA", "AttackDelayOffsetPercent"));

            stats.HealthPerLevel             = inibin.getFloatValue("DATA", "HPPerLevel");
            stats.ManaPerLevel               = inibin.getFloatValue("DATA", "MPPerLevel");
            stats.AdPerLevel                 = inibin.getFloatValue("DATA", "DamagePerLevel");
            stats.ArmorPerLevel              = inibin.getFloatValue("DATA", "ArmorPerLevel");
            stats.MagicResistPerLevel        = inibin.getFloatValue("DATA", "SpellBlockPerLevel");
            stats.HealthRegenerationPerLevel = inibin.getFloatValue("DATA", "HPRegenPerLevel");
            stats.ManaRegenerationPerLevel   = inibin.getFloatValue("DATA", "MPRegenPerLevel");
            stats.GrowthAttackSpeed          = inibin.getFloatValue("DATA", "AttackSpeedPerLevel");

            IsMelee         = inibin.getBoolValue("DATA", "IsMelee");
            CollisionRadius = inibin.getIntValue("DATA", "PathfindingCollisionRadius");

            Inibin autoAttack = _rafManager.GetAutoAttackData(Model);

            if (autoAttack != null)
            {
                AutoAttackDelay           = autoAttack.getFloatValue("SpellData", "castFrame") / 30.0f;
                AutoAttackProjectileSpeed = autoAttack.getFloatValue("SpellData", "MissileSpeed");
            }
        }
示例#2
0
        public Monster(
            float x,
            float y,
            float facingX,
            float facingY,
            string model,
            string name,
            string spawnAnimation    = "",
            byte campId              = 0x01,
            byte campUnk             = 0x2A,
            float spawnAnimationTime = 0.0f,
            uint netId = 0
            ) : base(model, new Stats(), 40, x, y, 0, netId)
        {
            SetTeam(TeamId.TEAM_NEUTRAL);

            var teams = Enum.GetValues(typeof(TeamId)).Cast <TeamId>();

            foreach (var team in teams)
            {
                SetVisibleByTeam(team, true);
            }

            MoveOrder               = MoveOrder.MOVE_ORDER_MOVE;
            this.Facing             = new Vector2(facingX, facingY);
            this.Name               = name;
            this.SpawnAnimation     = spawnAnimation;
            this.CampId             = campId;
            this.CampUnk            = campUnk;
            this.SpawnAnimationTime = spawnAnimationTime;

            Inibin inibin;

            if (!_rafManager.readInibin("DATA/Characters/" + model + "/" + model + ".inibin", out inibin))
            {
                _logger.LogCoreError("couldn't find monster stats for " + model);
                return;
            }

            stats.HealthPoints.BaseValue       = inibin.getFloatValue("Data", "BaseHP");
            stats.CurrentHealth                = stats.HealthPoints.Total;
            stats.ManaPoints.BaseValue         = inibin.getFloatValue("Data", "BaseMP");
            stats.CurrentMana                  = stats.ManaPoints.Total;
            stats.AttackDamage.BaseValue       = inibin.getFloatValue("DATA", "BaseDamage");
            stats.Range.BaseValue              = inibin.getFloatValue("DATA", "AttackRange");
            stats.MoveSpeed.BaseValue          = inibin.getFloatValue("DATA", "MoveSpeed");
            stats.Armor.BaseValue              = inibin.getFloatValue("DATA", "Armor");
            stats.MagicResist.BaseValue        = inibin.getFloatValue("DATA", "SpellBlock");
            stats.HealthRegeneration.BaseValue = inibin.getFloatValue("DATA", "BaseStaticHPRegen");
            stats.ManaRegeneration.BaseValue   = inibin.getFloatValue("DATA", "BaseStaticMPRegen");
            stats.AttackSpeedFlat              = 0.625f / (1 + inibin.getFloatValue("DATA", "AttackDelayOffsetPercent"));

            stats.HealthPerLevel             = inibin.getFloatValue("DATA", "HPPerLevel");
            stats.ManaPerLevel               = inibin.getFloatValue("DATA", "MPPerLevel");
            stats.AdPerLevel                 = inibin.getFloatValue("DATA", "DamagePerLevel");
            stats.ArmorPerLevel              = inibin.getFloatValue("DATA", "ArmorPerLevel");
            stats.MagicResistPerLevel        = inibin.getFloatValue("DATA", "SpellBlockPerLevel");
            stats.HealthRegenerationPerLevel = inibin.getFloatValue("DATA", "HPRegenPerLevel");
            stats.ManaRegenerationPerLevel   = inibin.getFloatValue("DATA", "MPRegenPerLevel");
            stats.GrowthAttackSpeed          = inibin.getFloatValue("DATA", "AttackSpeedPerLevel");

            IsMelee         = inibin.getBoolValue("DATA", "IsMelee");
            CollisionRadius = inibin.getIntValue("DATA", "PathfindingCollisionRadius");

            var autoAttack = _rafManager.GetAutoAttackData(model);

            if (autoAttack == null)
            {
                _logger.LogCoreError("Couldn't find monster auto-attack data for {0}", model);
                return;
            }

            AutoAttackDelay           = autoAttack.getFloatValue("SpellData", "castFrame") / 30.0f;
            AutoAttackProjectileSpeed = autoAttack.getFloatValue("SpellData", "MissileSpeed");
        }
示例#3
0
        public Champion(string model, uint playerId, RuneCollection runeList, uint netId = 0)
            : base(model, new Stats(), 30, 0, 0, 1200, netId)
        {
            this._playerId = playerId;
            this.RuneList  = runeList;

            Inventory = InventoryManager.CreateInventory(this);
            Shop      = Shop.CreateShop(this);

            stats.Gold = 475.0f;
            stats.GoldPerSecond.BaseValue = _game.Map.GetGoldPerSecond();
            stats.SetGeneratingGold(false);

            Inibin inibin;

            if (!_rafManager.readInibin("DATA/Characters/" + Model + "/" + Model + ".inibin", out inibin))
            {
                _logger.LogCoreError("couldn't find champion stats for " + Model);
                return;
            }

            stats.HealthPoints.BaseValue          = inibin.getFloatValue("Data", "BaseHP");
            stats.CurrentHealth                   = stats.HealthPoints.Total;
            stats.ManaPoints.BaseValue            = inibin.getFloatValue("Data", "BaseMP");
            stats.CurrentMana                     = stats.ManaPoints.Total;
            stats.AttackDamage.BaseValue          = inibin.getFloatValue("DATA", "BaseDamage");
            stats.Range.BaseValue                 = inibin.getFloatValue("DATA", "AttackRange");
            stats.MoveSpeed.BaseValue             = inibin.getFloatValue("DATA", "MoveSpeed");
            stats.Armor.BaseValue                 = inibin.getFloatValue("DATA", "Armor");
            stats.MagicResist.BaseValue           = inibin.getFloatValue("DATA", "SpellBlock");
            stats.HealthRegeneration.BaseValue    = inibin.getFloatValue("DATA", "BaseStaticHPRegen");
            stats.ManaRegeneration.BaseValue      = inibin.getFloatValue("DATA", "BaseStaticMPRegen");
            stats.AttackSpeedFlat                 = 0.625f / (1 + inibin.getFloatValue("DATA", "AttackDelayOffsetPercent"));
            stats.AttackSpeedMultiplier.BaseValue = 1.0f;

            stats.HealthPerLevel             = inibin.getFloatValue("DATA", "HPPerLevel");
            stats.ManaPerLevel               = inibin.getFloatValue("DATA", "MPPerLevel");
            stats.AdPerLevel                 = inibin.getFloatValue("DATA", "DamagePerLevel");
            stats.ArmorPerLevel              = inibin.getFloatValue("DATA", "ArmorPerLevel");
            stats.MagicResistPerLevel        = inibin.getFloatValue("DATA", "SpellBlockPerLevel");
            stats.HealthRegenerationPerLevel = inibin.getFloatValue("DATA", "HPRegenPerLevel");
            stats.ManaRegenerationPerLevel   = inibin.getFloatValue("DATA", "MPRegenPerLevel");
            stats.GrowthAttackSpeed          = inibin.getFloatValue("DATA", "AttackSpeedPerLevel");

            Spells = new List <Spell>();
            Spells.Add(new Spell(this, inibin.getStringValue("Data", "Spell1"), 0));
            Spells.Add(new Spell(this, inibin.getStringValue("Data", "Spell2"), 1));
            Spells.Add(new Spell(this, inibin.getStringValue("Data", "Spell3"), 2));
            Spells.Add(new Spell(this, inibin.getStringValue("Data", "Spell4"), 3));
            Spells.Add(new Spell(this, "SummonerHeal", 4));
            Spells.Add(new Spell(this, "SummonerFlash", 5));
            Spells.Add(new Spell(this, "Recall", 13));

            IsMelee         = inibin.getBoolValue("DATA", "IsMelee");
            CollisionRadius = inibin.getIntValue("DATA", "PathfindingCollisionRadius");

            var autoAttack = _rafManager.GetAutoAttackData(Model);

            if (autoAttack != null)
            {
                AutoAttackDelay           = autoAttack.getFloatValue("SpellData", "castFrame") / 30.0f;
                AutoAttackProjectileSpeed = autoAttack.getFloatValue("SpellData", "MissileSpeed");
            }

            LoadLua();
        }