Ejemplo n.º 1
0
    public void setDataToCharacter(Monster cha, TranscendData td, int[] transcendLevel)
    {
        cha.stat.speed.Set(speed);
        cha.maxHp = (hp);
        cha.maxSp.Set(sp);

        cha.stat.atkRange.Set(atkRange);
        cha.stat.atkSpeed.Set(atkSpeed);
        cha.stat.atkPhysic.Set(atkPhysic);
        cha.stat.atkMagic.Set(atkMagic);
        cha.stat.defPhysic.Set(defPhysic);
        cha.stat.defMagic.Set(defMagic);
        cha.bulletPatternId = resource;

        cha.atkEffectType = effectType;

        cha.stat.reinforceLevel.Set(reinforceLevel);

        cha.stat.baseLevel.Set(baseLevel);

        //* 유저 아군 (or 적) 유닛 & 몬스터 유닛 : 해당 유닛의, 베이스레벨 + 강화레벨
        cha.stat.skillTargetLevel.Set(baseLevel + reinforceLevel);

//		ATK_ATTR1,ATK_ATTR2,ATK_ATTR3,ATK_ATTR4,ATK_ATTR5,ATK_ATTR6,ATK_ATTR7,

        if (td != null)
        {
            cha.stat.originalMoveSpeedRate = cha.stat.speed;
            cha.stat.originalAtkSpeedRate  = cha.stat.atkSpeed;

            cha.stat.speed.Set(td.getValueByATTR(transcendLevel, cha.stat.speed.Get(), WSATTR.MOVE_SPEED_I));
            cha.stat.atkRange.Set(td.getValueByATTR(transcendLevel, cha.stat.atkRange.Get(), WSATTR.ATK_RANGE_I));
            cha.stat.atkSpeed.Set(td.getValueByATTR(transcendLevel, cha.stat.atkSpeed.Get(), WSATTR.ATK_SPEED_I));
            cha.stat.atkPhysic.Set(td.getValueByATTR(transcendLevel, cha.stat.atkPhysic.Get(), WSATTR.ATK_PHYSIC_I));
            cha.stat.atkMagic.Set(td.getValueByATTR(transcendLevel, cha.stat.atkMagic.Get(), WSATTR.ATK_MAGIC_I));
            cha.stat.defPhysic.Set(td.getValueByATTR(transcendLevel, cha.stat.defPhysic.Get(), WSATTR.DEF_PHYSIC_I));
            cha.stat.defMagic.Set(td.getValueByATTR(transcendLevel, cha.stat.defMagic.Get(), WSATTR.DEF_MAGIC_I));

            cha.stat.maxHp.Set(td.getValueByATTR(transcendLevel, cha.stat.maxHp.Get(), WSATTR.HP_I));

            cha.stat.originalMoveSpeedRate = cha.stat.speed / cha.stat.originalMoveSpeedRate;
            cha.stat.originalAtkSpeedRate  = cha.stat.atkSpeed / cha.stat.originalAtkSpeedRate;
        }
        else
        {
            cha.stat.originalMoveSpeedRate = 1;
            cha.stat.originalAtkSpeedRate  = 1;
        }

        cha.hp = (cha.maxHp);
        cha.sp = (cha.sp);
    }
Ejemplo n.º 2
0
    public IFloat getTranscendValueByATTR(IFloat inputValue, int inputAttr)
    {
        TranscendData td = transcendData;

        if (td == null)
        {
            return(inputValue);
        }

        return(td.getValueByATTR(transcendLevel, inputValue, inputAttr));
    }
Ejemplo n.º 3
0
    public void init(AttackerType attackerType, AttackType aType, BaseSkillData hsd = null, TranscendData td = null, int[] transcendLevel = null, bool isFromHeroSkill = false)
    {
        //Log.log("init attackdata!!!");
        if (td != null)
        {
            for (int i = attrOriginal.Length - 1; i >= 0; --i)
            {
                if (isFromHeroSkill)
                {
                    attr[i] = td.getValueByATTR(transcendLevel, attrOriginal[i].Get(), E_ATTR_STR[i]);
                }
                else
                {
                    attr[i] = td.getValueByATTR(transcendLevel, attrOriginal[i].Get(), ATTR_STR[i]);
                }
            }
        }

        cm = GameManager.me.characterManager;

        _skillData = hsd;

        switch (type)
        {
        case NONE_0:
            chracterMove = moveStay;

            monsterShoot  = shootMonster0;
            playerShoot   = shootPlayer0;
            playSkill     = playSkillRightNow;
            preDamageCalc = damageCalc0;


            if (_skillData.skillDataType == BaseSkillData.SkillDataType.Hero && _skillData.targeting == 1)
            {
                targetRange = _skillData.targetAttr[1];
            }

            break;

        case SHORT_1:         //1
            //len = 1;
            chracterMove = moveShortAttackType;

            if (aType == AttackType.Attack)
            {
                monsterShoot  = shootMonster1;
                playerShoot   = shootPlayer1;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;

            break;

        case SHORT_RANGE_2:          //2
            //len = 3; //데미지범위	최소데미지비율	최대타겟유닛수

            chracterMove = moveShortAttackType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonster2;
                playerShoot   = shootPlayer2;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;

            break;

        case LINE_3:         //3

            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet3;
                playerShoot   = shootPlayerBullet3;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillLinear;

            break;

        case LINE_RANGE_4:         //4

            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet4;
                playerShoot   = shootPlayerBullet4;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillLinear;

            break;


        case LINE_PASS_5:         //5

            if (attackerType == AttackerType.Hero)
            {
                skillMove   = moveSkillHeroMonsterLineType;
                targetRange = attr[4];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet5;
                playerShoot   = shootPlayerBullet5;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillLinear;

            break;

        case CURVE_RANGE_6:         //6
            //len = 4; //타임리밋	데미지범위	최소데미지비율	최대타겟유닛수

            if (attackerType == AttackerType.Hero)
            {
                skillMove   = moveSkillHeroMonsterLineType;
                targetRange = attr[1];
                maxHit      = attr[3];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet6;
                playerShoot   = shootPlayerBullet6;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;

            break;

        case DROP_RANGE_7:         //7
            //len = 4; //타임리밋	데미지범위	최소데미지비율	최대타겟유닛수

            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;

                targetRange = attr[1];
                maxHit      = attr[3];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet7;
                playerShoot   = shootPlayerBullet7;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;

            break;

        case CIRCLE_RANGE_8:

            if (attackerType == AttackerType.Hero)
            {
                skillMove   = moveSkillHeroMonsterLineType;
                targetRange = attr[0];
                maxHit      = attr[2];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet8;
                playerShoot   = shootPlayerBullet8;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;

            //len = 3; //데미지범위	최소데미지비율	최대타겟유닛수
            break;

        case FIXED_EFFECT_9:
            //len = 4; //최대타겟유닛수	이펙트타입	이펙트Z/R	이펙트X
            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;

                // 11~12 사각기둥. 21~22. 원기둥.
                if (attr[1] > 12)
                {
                    targetRange = attr[2];
                }
                else
                {
                    targetRange = attr[3];
                }

                maxHit = attr[0];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet9;
                playerShoot   = shootPlayerBullet9;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;


            break;

        case CONTINUE_FIXED_EFFECT_10:         //최대타겟유닛수	지속시간	이펙트타입	이펙트Z/R	이펙트X
            //len = 5;
            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;

                // 11~12 사각기둥. 21~22. 원기둥.
                if (attr[2] > 12)
                {
                    targetRange = attr[3];
                }
                else
                {
                    targetRange = attr[4];
                }


                maxHit = attr[0];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet10;
                playerShoot   = shootPlayerBullet10;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;



            break;

        case CURVE_AFTER_CONTINUE_FIXED_EFFECT_11:         //타임리밋	최대타겟유닛수	지속시간	이펙트타입	이펙트Z/R	이펙트X
            //len = 6;
            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;

                // 11~12 사각기둥. 21~22. 원기둥.
                if (attr[3] > 12)
                {
                    targetRange = attr[4];
                }
                else
                {
                    targetRange = attr[5];
                }

                maxHit = attr[1];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet11;
                playerShoot   = shootPlayerBullet11;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;



            break;

        case ATTACH_BULLET_12:
            //len = 5; // 최대타겟유닛수	지속시간	이펙트타입	이펙트Z/R	이펙트X
            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet12;
                playerShoot   = shootPlayerBullet12;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillLoop;

            break;

        case TIME_BOMB_13:         //13

#if UNITY_EDITOR
            Debug.Log("==== 안쓰는 것!!!! ====!!!!");
#endif

            //len = 4; //폭발대기시간	  데미지범위	최소데미지비율	최대타겟유닛수
            if (attackerType == AttackerType.Hero)
            {
                chracterMove = moveLineType;
                skillMove    = moveSkillHeroMonsterLineType;
            }
            else if (attackerType == AttackerType.Unit)
            {
                chracterMove = moveLineType;
            }

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot = shootMonsterBullet12;
                playerShoot  = shootPlayerBullet12;
            }

            playSkill = playSkillNormal;

            break;

        case LAND_MINE_14:         //14

            //len = 4; //데미지범위	최소데미지비율	최대타겟유닛수  자연폭발시간
            if (attackerType == AttackerType.Hero)
            {
                chracterMove = moveLandMineType;             //moveLandMineAttackType;
                skillMove    = moveLandMineType;             //moveLandMineAttackType;
            }
            else if (attackerType == AttackerType.Unit)
            {
                chracterMove = moveLandMineType;                //moveLandMineAttackType;
            }

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet14;
                playerShoot   = shootPlayerBullet14;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;

            break;

        case CHAIN_LIGHTING_15:           //15

//			Debug.Log("==== 수정해야함 ====!!!!");

            //len = 3; //최대전체거리	최대연결거리A	최대연결거리B	최대연결유닛수	연결딜레이
            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet15;
                playerShoot   = shootPlayerBullet15;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillLoop;

            break;


        case SCREEN_ATTACK_16:

            // 이동은 수정해야함. 그런데 굳이 할 필요는 없을듯???
            if (attackerType == AttackerType.Hero)
            {
                skillMove   = moveSkillHeroMonsterLineType;
                targetRange = attr[0];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet16;
                playerShoot   = shootPlayerBullet16;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;



            break;

        case METHEO_17:         //17

            if (attackerType == AttackerType.Hero)
            {
                skillMove   = moveSkillHeroMonsterLineType;
                targetRange = attr[5];
                maxHit      = attr[3];
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet17;
                playerShoot   = shootPlayerBullet17;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillNormal;

            break;


        case CHASER_18:         //18

            if (attackerType == AttackerType.Hero)
            {
                skillMove = moveSkillHeroMonsterLineType;
            }

            chracterMove = moveLineType;

            if (aType == AttackType.Attack || aType == AttackType.Skill)
            {
                monsterShoot  = shootMonsterBullet18;
                playerShoot   = shootPlayerBullet18;
                preDamageCalc = damageCalc0;
            }

            playSkill = playSkillLinear;

            break;
        }
    }