示例#1
0
    void GetEnemyProperty(Monster m)
    {
//		Debug.Log("thisEnemyId = " + m.id);
        enemy           = new Unit();
        enemy.monsterId = m.id;
        enemy.name      = m.name;
        //怪物实力随等级增强
        enemy.level = m.level + GameData._playerData.dayNow / GameConfigs.MonsterUpgradeTime;

        //鬼的实力随地图增加而增加
        if (m.id == 1 || m.id == 2 || m.id == 3)
        {
            enemy.level += GameData._playerData.placeNowId * 2;
        }
//		Debug.Log (enemy.level);

        MonsterModel md = LoadTxt.GetMonsterModel(m.model);

        enemy.hp     = md.hp + md.hp_inc * (enemy.level - 1);
        enemyMaxHp   = enemy.hp;
        enemy.spirit = m.spirit;
        enemy.atk    = md.atk + md.atk_inc * (enemy.level - 1);
//		Debug.Log("ThisEnemyInitAtk = " + enemy.atk);
        enemy.def   = md.def + md.def_inc * (enemy.level - 1);
        enemy.hit   = md.hit;
        enemy.dodge = md.dodge;
        enemy.speed = m.speed;
        enemy.range = m.range;
//        print(m.range);
        enemy.castSpeedBonus   = 0;
        enemy.skillList        = m.skillList;
        enemy.drop             = m.drop;
        enemy.vitalSensibility = m.vitalSensibility;
        enemy.hit_Body         = m.bodyPart[0];
        enemy.hit_Vital        = m.bodyPart[1];
        enemy.hit_Move         = m.bodyPart [2];
        enemy.canCapture       = m.canCapture;
        enemy.mapOpen          = m.mapOpen;
        enemy.renown           = m.renown;
    }