public void InitMonster(MonsterBaseRecord monster, int level) { _MonsterRecord = monster; _Attack = (GameDataValue.GetLevelHP(level)) * monster.Attack / 10; _Attack = Mathf.Max(_Attack, 1); float hprate = GameDataValue.GetMonsterHPRate(monster.HP); _HP = (int)(GameDataValue.GetLevelAtk(level) * BattleField.GetBallNumRate(12) * hprate * GameDataValue.GetMonsterHPGemFix(level)); _MaxHP = _HP; _ElementType = monster.ElementType; //_Diff = LogicManager.Instance.EnterStageInfo.Level; _Diff = 100; _Skills = new List <SkillBase>(); foreach (var skillrecord in monster.Skills) { if (skillrecord == null) { continue; } var skillBase = SkillBase.GetSkillInstance(skillrecord); if (skillBase != null) { skillBase.InitSkill(this, skillrecord); _Skills.Add(skillBase); } } }
public Vector2 GetNextLevelAttrs() { int tarLevel = Level + 1; if (IsLevelMaxLevel(Level)) { tarLevel = Level; } if (tarLevel == 1) { tarLevel = 2; } int attrLevel = GetUpGrageLevelToAttrLevel(tarLevel); return(new Vector2(GameDataValue.GetLevelAtk(attrLevel), GameDataValue.GetLevelHP(attrLevel))); }
private void InitRole() { _RoleMotion = new MotionBase(); var attr = WeaponDataPack.Instance.SelectedWeaponItem.GetCurLevelAttrs(); //_RoleMotion._Attack = (int)attr[0]; //_RoleMotion._MaxHP = (int)attr[1]; int stageLevel = int.Parse(_StageRecord.Id); int testLevel = stageLevel; int attrValue = Mathf.Max(testLevel, 1); _RoleMotion._Attack = GameDataValue.GetLevelAtk(attrValue); _RoleMotion._MaxHP = GameDataValue.GetLevelHP(attrValue); _RoleMotion._HP = _RoleMotion._MaxHP; _RoleMotion._ElementType = ELEMENT_TYPE.NONE; }
public Vector2 GetCurLevelAttrs() { int attrLevel = GetUpGrageLevelToAttrLevel(Level); return(new Vector2(GameDataValue.GetLevelAtk(attrLevel), GameDataValue.GetLevelHP(attrLevel))); }