| | |
| | | public int attack = 0; |
| | | // 防御力 |
| | | public int defense = 0; |
| | | // 速度 |
| | | public int speed = 0; |
| | | |
| | | |
| | | |
| | | //战斗属性 |
| | | //闪避概率 |
| | | public float dodge = 0f; |
| | | //暴击概率 |
| | | public float crit = 0f; |
| | | //连击概率 |
| | | public float comboRate = 0f; |
| | | //战斗属性 击晕、暴击、连击、格挡、反击、吸血 |
| | | //眩晕概率 |
| | | public float stunRate = 0f; |
| | | public int stunRate = 0; |
| | | //暴击概率 |
| | | public int critRate = 0; |
| | | //连击概率 |
| | | public int comboRate = 0; |
| | | //格挡概率 |
| | | public int blockRate = 0; |
| | | //反击概率 |
| | | public float counterAttack = 0f; |
| | | public int counterAttackRate = 0; |
| | | //攻击目标时,造成伤害转化成生命的百分比数值提升 |
| | | public float recoverRate = 0f; |
| | | public int recoverRate = 0; |
| | | |
| | | //战斗抵抗属性 |
| | | //闪避抵抗 |
| | | public float dodgeResist = 0f; |
| | | //暴击抵抗 |
| | | public float critResist = 0f; |
| | | //连击抵抗 |
| | | public float comboResist = 0f; |
| | | //眩晕抵抗 |
| | | public float stunResist = 0f; |
| | | public int stunResist = 0; |
| | | //暴击抵抗 |
| | | public int critResist = 0; |
| | | //连击抵抗 |
| | | public int comboResist = 0; |
| | | //格挡抵抗 |
| | | public int blockResist = 0; |
| | | //反击抵抗 |
| | | public float counterAttackResist = 0f; |
| | | public int counterAttackResist = 0; |
| | | //减少攻击时吸血转化成生命的百分比数值 |
| | | public float recoverResist = 0f; |
| | | public int recoverResist = 0; |
| | | |
| | | // 特殊属性(待补充) |
| | | // 最终伤害 |
| | | public int finalDamageIncrease = 0; |
| | | // 最终免伤 |
| | | public int finalDamageReduce; |
| | | // 爆伤 |
| | | public int critDamageIncrease; |
| | | // 减少爆伤 |
| | | public int critDamageReduce; |
| | | // 治疗增益 |
| | | public int healIncrease; |
| | | // 治疗减益 |
| | | public int healReduce; |
| | | // 物理增伤 |
| | | public int damageIncrease; |
| | | // 减少物伤 |
| | | public int damageReduce; |
| | | // 法术增伤 |
| | | public int magicIncrease; |
| | | // 减少法伤 |
| | | public int magicReduce; |
| | | // 普攻增伤 |
| | | public int normalAttackIncrease; |
| | | // 减少普攻伤害 |
| | | public int normalAttackReduce; |
| | | // 增加技能伤害 |
| | | public int rageSkillAttackIncrease; |
| | | // 减少技能伤害 |
| | | public int rageSkillAttackReduce; |
| | | // 增加持续伤害的百分比 |
| | | public int continousSkillIncrease; |
| | | // 减少持续伤害的百分比 |
| | | public int continousSkillReduce; |
| | | // 增加护盾百分比 |
| | | public int shieldSkillIncrease; |
| | | // 减少护盾百分比 |
| | | public int shieldSkillReduce; |
| | | |
| | | |
| | | //计算个人/职业/种族养成属性加成 |
| | | public void CalculateProperties() |
| | | { |
| | | //todo |
| | | // 武将单体属性,根据继承比例,从全体属性继承得到 |
| | | // 例如:武将攻击力= |
| | | // [(装备基础固定值+其它模块的固定值)* (1+初始加成%+武将升级加成%+武将突破加成%+武将吞噬星级加成%+图鉴加成%)] |
| | | // * |
| | | // [ 继承比例*(1+羁绊加成%+潜能加成%+天赋加成%+觉醒效果加成%)] |
| | | hp = GetProperties(HeroAttrType.hp); |
| | | attack = GetProperties(HeroAttrType.attack); |
| | | defense = GetProperties(HeroAttrType.defense); |
| | | stunRate = GetProperties(HeroAttrType.stunRate); |
| | | critRate = GetProperties(HeroAttrType.critRate); |
| | | comboRate = GetProperties(HeroAttrType.comboRate); |
| | | blockRate = GetProperties(HeroAttrType.blockRate); |
| | | counterAttackRate = GetProperties(HeroAttrType.counterAttackRate); |
| | | recoverRate = GetProperties(HeroAttrType.recoverRate); |
| | | stunResist = GetProperties(HeroAttrType.stunResist); |
| | | critResist = GetProperties(HeroAttrType.critResist); |
| | | comboResist = GetProperties(HeroAttrType.comboResist); |
| | | blockResist = GetProperties(HeroAttrType.blockResist); |
| | | counterAttackResist = GetProperties(HeroAttrType.counterAttackResist); |
| | | recoverResist = GetProperties(HeroAttrType.recoverResist); |
| | | } |
| | | |
| | | protected int GetProperties(HeroAttrType attrType) |
| | | { |
| | | return GetStableProperties(attrType) |
| | | * GetCultivationPercent(attrType) |
| | | * GetInheritRate(attrType) |
| | | * GetInfluenceByInheritPercent(attrType); |
| | | } |
| | | |
| | | |
| | | // 固定值属性 |
| | | public int GetStableProperties(HeroAttrType attrType) |
| | | { |
| | | int stableValue = 0; |
| | | stableValue += GetEquipStableProperties(attrType); |
| | | return stableValue; |
| | | } |
| | | |
| | | // 培养百分比 |
| | | public int GetCultivationPercent(HeroAttrType attrType) |
| | | { |
| | | int cultivationPercent = 100; |
| | | cultivationPercent += GetQualityCultivationPercent(attrType);//初始加成根据武将品质决定,不同品质武将初始加成不同 HeroInfo.Quality.cs |
| | | cultivationPercent += GetLevelCultivationPercent(attrType);// 等级给的百分比 HeroInfo.Level.cs |
| | | cultivationPercent += GetBreakCultivationPercent(attrType);// 突破给的百分比 HeroInfo.Break.cs |
| | | cultivationPercent += GetStarCultivationPercent(attrType);// 吞噬星级给的百分比 HeroInfo.Star.cs |
| | | return cultivationPercent; |
| | | } |
| | | |
| | | // 被继承比例影响的百分比属性 |
| | | public int GetInfluenceByInheritPercent(HeroAttrType attrType) |
| | | { |
| | | // (1+羁绊加成%+潜能加成%+天赋加成%+觉醒效果加成%) |
| | | |
| | | int IFByInheritPercent = 100; |
| | | IFByInheritPercent += GetIFByInheritFetterPercent(attrType); //羁绊加成 HeroInfo.Fetter |
| | | IFByInheritPercent += GetIFByInheritBreakPercent(attrType); //潜能加成 HeroInfo.Break |
| | | IFByInheritPercent += GetIFByInheritTalentPercent(attrType); //天赋加成 HeroInfo.Talent |
| | | IFByInheritPercent += GetIFByInheritAwakePercent(attrType); //觉醒加成 HeroInfo.Awake |
| | | return IFByInheritPercent; |
| | | } |
| | | |
| | | public int CalculatePower() |
| | | { |
| | | //todo |
| | | return 0; |
| | | // 暂行 |
| | | return hp + |
| | | attack + |
| | | defense + |
| | | stunRate + |
| | | critRate + |
| | | comboRate + |
| | | blockRate + |
| | | counterAttackRate + |
| | | recoverRate + |
| | | stunResist + |
| | | critResist + |
| | | comboResist + |
| | | blockResist + |
| | | counterAttackResist + |
| | | recoverResist; |
| | | } |
| | | |
| | | |
| | | //上阵属性:攻防血 |
| | | public int GetOnBattleAddPer() |
| | | { |
| | | return qualityConfig.InitAddPer + qualityConfig.LVAddPer * heroLevel + qualityConfig.BreakLVAddPer * breakLevel + qualityConfig.StarAddPer * heroStar; |
| | | } |
| | | } |