hch
2026-03-21 8c46bc3e9de02cd5aa8d399bbc3e852fe0bfaefc
Main/System/Main/FightPowerFormula.cs
@@ -2,6 +2,8 @@
public class FightPowerFormula
{
    // !!!该文件已废弃,公式在 FightPowerManager 中直接处理,字典大量被调用会产生性能及GC问题
    // 此文件现在的用途为提醒程序公式发生了变化,需手动修改FightPowerManager代码
    // 变量名常量定义
    private const string LVVALUE_VALUE = "lvValue";
    private const string EQUIPVALUE_VALUE = "equipValue";
@@ -11,7 +13,9 @@
    private const string HORSEVALUE_VALUE = "horseValue";
    private const string BEAUTYVALUE_VALUE = "beautyValue";
    private const string FATESVALUE_VALUE = "fatesValue";
    private const string SKINVALUE_VALUE = "skinValue";
    private const string DINGJUNGEVALUE_VALUE = "dingjungeValue";
    private const string MINGGEVALUE_VALUE = "minggeValue";
    private const string LINEUPHALOPER_VALUE = "lineupHaloPer";
    private const string REALMPER_VALUE = "realmPer";
    private const string GUBAOPER_VALUE = "gubaoPer";
@@ -19,7 +23,9 @@
    private const string HORSEPER_VALUE = "horsePer";
    private const string BEAUTYPER_VALUE = "beautyPer";
    private const string FATESPER_VALUE = "fatesPer";
    private const string SKINPER_VALUE = "skinPer";
    private const string CARDPER_VALUE = "cardPer";
    private const string MINGGEPER_VALUE = "minggePer";
    private const string INHERITPER_VALUE = "inheritPer";
    private const string FETTERPER_VALUE = "fetterPer";
    private const string STARTALENTPER_VALUE = "starTalentPer";
@@ -28,6 +34,7 @@
    private const string DINGJUNGEPER_VALUE = "dingjungePer";
    private const string HEROSELFVALUE_VALUE = "heroSelfValue";
    private const string HEROLVVALUE_VALUE = "heroLVValue";
    private const string HEROSKINVALUE_VALUE = "heroSkinValue";
    private const string LINEUPHALOVALUE_VALUE = "lineupHaloValue";
    private const string STARTALENTVALUE_VALUE = "starTalentValue";
    private const string BREAKLVVALUE_VALUE = "breakLVValue";
@@ -39,6 +46,8 @@
    private const string MAXHPRATIO_VALUE = "MaxHPRatio";
    private const string DEF_VALUE = "Def";
    private const string DEFRATIO_VALUE = "DefRatio";
    private const string ATKSPEED_VALUE = "AtkSpeed";
    private const string ATKSPEEDRATIO_VALUE = "AtkSpeedRatio";
    private const string STUNRATE_VALUE = "StunRate";
    private const string STUNRATERATIO_VALUE = "StunRateRatio";
    private const string SUPERHITRATE_VALUE = "SuperHitRate";
@@ -131,11 +140,11 @@
    private const string OFFICIALLV_VALUE = "OfficialLV";
    // 基础属性公式
    // (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+cardPer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue
    // (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+skinValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+skinPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue+heroSkinValue
    // 战斗属性公式
    // (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue)+(heroSelfValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue
    // (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+heroSkinValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue
    // 战斗力公式
    // long(Atk*AtkRatio+MaxHP*MaxHPRatio+Def*DefRatio+(StunRate*StunRateRatio+SuperHitRate*SuperHitRateRatio+ComboRate*ComboRateRatio+MissRate*MissRateRatio+ParryRate*ParryRateRatio+SuckHPPer*SuckHPPerRatio+StunRateDef*StunRateDefRatio+SuperHitRateDef*SuperHitRateDefRatio+ComboRateDef*ComboRateDefRatio+MissRateDef*MissRateDefRatio+ParryRateDef*ParryRateDefRatio+SuckHPPerDef*SuckHPPerDefRatio+FinalDamPer*FinalDamPerRatio+FinalDamPerDef*FinalDamPerDefRatio+PhyDamPer*PhyDamPerRatio+PhyDamPerDef*PhyDamPerDefRatio+MagDamPer*MagDamPerRatio+MagDamPerDef*MagDamPerDefRatio+NormalSkillPer*NormalSkillPerRatio+NormalSkillPerDef*NormalSkillPerDefRatio+AngerSkillPer*AngerSkillPerRatio+AngerSkillPerDef*AngerSkillPerDefRatio+SuperDamPer*SuperDamPerRatio+SuperDamPerDef*SuperDamPerDefRatio+CurePer*CurePerRatio+CurePerDef*CurePerDefRatio+ShieldPer*ShieldPerRatio+ShieldPerDef*ShieldPerDefRatio+DOTPer*DOTPerRatio+DOTPerDef*DOTPerDefRatio+WeiFinalDamPer*WeiFinalDamPerRatio+WeiFinalDamPerDef*WeiFinalDamPerDefRatio+ShuFinalDamPer*ShuFinalDamPerRatio+ShuFinalDamPerDef*ShuFinalDamPerDefRatio+WuFinalDamPer*WuFinalDamPerRatio+WuFinalDamPerDef*WuFinalDamPerDefRatio+QunFinalDamPer*QunFinalDamPerRatio+QunFinalDamPerDef*QunFinalDamPerDefRatio+PVPDamPer*PVPDamPerRatio+PVPDamPerDef*PVPDamPerDefRatio+Guanchuan*GuanchuanRatio+GuanchuanDef*GuanchuanDefRatio+Zhaojia*ZhaojiaRatio+ZhaojiaDef*ZhaojiaDefRatio)/100.0-55000)
    // long(Atk*AtkRatio+MaxHP*MaxHPRatio+Def*DefRatio+AtkSpeed*AtkSpeedRatio+(StunRate*StunRateRatio+SuperHitRate*SuperHitRateRatio+ComboRate*ComboRateRatio+MissRate*MissRateRatio+ParryRate*ParryRateRatio+SuckHPPer*SuckHPPerRatio+StunRateDef*StunRateDefRatio+SuperHitRateDef*SuperHitRateDefRatio+ComboRateDef*ComboRateDefRatio+MissRateDef*MissRateDefRatio+ParryRateDef*ParryRateDefRatio+SuckHPPerDef*SuckHPPerDefRatio+FinalDamPer*FinalDamPerRatio+FinalDamPerDef*FinalDamPerDefRatio+PhyDamPer*PhyDamPerRatio+PhyDamPerDef*PhyDamPerDefRatio+MagDamPer*MagDamPerRatio+MagDamPerDef*MagDamPerDefRatio+NormalSkillPer*NormalSkillPerRatio+NormalSkillPerDef*NormalSkillPerDefRatio+AngerSkillPer*AngerSkillPerRatio+AngerSkillPerDef*AngerSkillPerDefRatio+SuperDamPer*SuperDamPerRatio+SuperDamPerDef*SuperDamPerDefRatio+CurePer*CurePerRatio+CurePerDef*CurePerDefRatio+ShieldPer*ShieldPerRatio+ShieldPerDef*ShieldPerDefRatio+DOTPer*DOTPerRatio+DOTPerDef*DOTPerDefRatio+WeiFinalDamPer*WeiFinalDamPerRatio+WeiFinalDamPerDef*WeiFinalDamPerDefRatio+ShuFinalDamPer*ShuFinalDamPerRatio+ShuFinalDamPerDef*ShuFinalDamPerDefRatio+WuFinalDamPer*WuFinalDamPerRatio+WuFinalDamPerDef*WuFinalDamPerDefRatio+QunFinalDamPer*QunFinalDamPerRatio+QunFinalDamPerDef*QunFinalDamPerDefRatio+PVPDamPer*PVPDamPerRatio+PVPDamPerDef*PVPDamPerDefRatio+Guanchuan*GuanchuanRatio+GuanchuanDef*GuanchuanDefRatio+Zhaojia*ZhaojiaRatio+ZhaojiaDef*ZhaojiaDefRatio)/100.0-55000)
    // 技能战斗力公式
    // SkillPower*OfficialLV
@@ -149,7 +158,9 @@
        double horseValue = variables[HORSEVALUE_VALUE];
        double beautyValue = variables[BEAUTYVALUE_VALUE];
        double fatesValue = variables[FATESVALUE_VALUE];
        double skinValue = variables[SKINVALUE_VALUE];
        double dingjungeValue = variables[DINGJUNGEVALUE_VALUE];
        double minggeValue = variables[MINGGEVALUE_VALUE];
        double lineupHaloPer = variables[LINEUPHALOPER_VALUE];
        double realmPer = variables[REALMPER_VALUE];
        double gubaoPer = variables[GUBAOPER_VALUE];
@@ -157,7 +168,9 @@
        double horsePer = variables[HORSEPER_VALUE];
        double beautyPer = variables[BEAUTYPER_VALUE];
        double fatesPer = variables[FATESPER_VALUE];
        double skinPer = variables[SKINPER_VALUE];
        double cardPer = variables[CARDPER_VALUE];
        double minggePer = variables[MINGGEPER_VALUE];
        double inheritPer = variables[INHERITPER_VALUE];
        double fetterPer = variables[FETTERPER_VALUE];
        double starTalentPer = variables[STARTALENTPER_VALUE];
@@ -166,8 +179,9 @@
        double dingjungePer = variables[DINGJUNGEPER_VALUE];
        double heroSelfValue = variables[HEROSELFVALUE_VALUE];
        double heroLVValue = variables[HEROLVVALUE_VALUE];
        double heroSkinValue = variables[HEROSKINVALUE_VALUE];
        return (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+cardPer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue;
        return (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+skinValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+skinPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue+heroSkinValue;
    }
    public static double GetFightAttr(Dictionary<string, double> variables)
@@ -181,14 +195,16 @@
        double beautyValue = variables[BEAUTYVALUE_VALUE];
        double fatesValue = variables[FATESVALUE_VALUE];
        double dingjungeValue = variables[DINGJUNGEVALUE_VALUE];
        double minggeValue = variables[MINGGEVALUE_VALUE];
        double heroSelfValue = variables[HEROSELFVALUE_VALUE];
        double heroSkinValue = variables[HEROSKINVALUE_VALUE];
        double lineupHaloValue = variables[LINEUPHALOVALUE_VALUE];
        double starTalentValue = variables[STARTALENTVALUE_VALUE];
        double breakLVValue = variables[BREAKLVVALUE_VALUE];
        double awakeTalentValue = variables[AWAKETALENTVALUE_VALUE];
        double fetterValue = variables[FETTERVALUE_VALUE];
        return (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue)+(heroSelfValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue;
        return (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+heroSkinValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue;
    }
    public static double GetFightPower(Dictionary<string, double> variables)
@@ -199,6 +215,8 @@
        double MaxHPRatio = variables[MAXHPRATIO_VALUE];
        double Def = variables[DEF_VALUE];
        double DefRatio = variables[DEFRATIO_VALUE];
        double AtkSpeed = variables[ATKSPEED_VALUE];
        double AtkSpeedRatio = variables[ATKSPEEDRATIO_VALUE];
        double StunRate = variables[STUNRATE_VALUE];
        double StunRateRatio = variables[STUNRATERATIO_VALUE];
        double SuperHitRate = variables[SUPERHITRATE_VALUE];
@@ -288,7 +306,7 @@
        double ZhaojiaDef = variables[ZHAOJIADEF_VALUE];
        double ZhaojiaDefRatio = variables[ZHAOJIADEFRATIO_VALUE];
        return (long)(Atk*AtkRatio+MaxHP*MaxHPRatio+Def*DefRatio+(StunRate*StunRateRatio+SuperHitRate*SuperHitRateRatio+ComboRate*ComboRateRatio+MissRate*MissRateRatio+ParryRate*ParryRateRatio+SuckHPPer*SuckHPPerRatio+StunRateDef*StunRateDefRatio+SuperHitRateDef*SuperHitRateDefRatio+ComboRateDef*ComboRateDefRatio+MissRateDef*MissRateDefRatio+ParryRateDef*ParryRateDefRatio+SuckHPPerDef*SuckHPPerDefRatio+FinalDamPer*FinalDamPerRatio+FinalDamPerDef*FinalDamPerDefRatio+PhyDamPer*PhyDamPerRatio+PhyDamPerDef*PhyDamPerDefRatio+MagDamPer*MagDamPerRatio+MagDamPerDef*MagDamPerDefRatio+NormalSkillPer*NormalSkillPerRatio+NormalSkillPerDef*NormalSkillPerDefRatio+AngerSkillPer*AngerSkillPerRatio+AngerSkillPerDef*AngerSkillPerDefRatio+SuperDamPer*SuperDamPerRatio+SuperDamPerDef*SuperDamPerDefRatio+CurePer*CurePerRatio+CurePerDef*CurePerDefRatio+ShieldPer*ShieldPerRatio+ShieldPerDef*ShieldPerDefRatio+DOTPer*DOTPerRatio+DOTPerDef*DOTPerDefRatio+WeiFinalDamPer*WeiFinalDamPerRatio+WeiFinalDamPerDef*WeiFinalDamPerDefRatio+ShuFinalDamPer*ShuFinalDamPerRatio+ShuFinalDamPerDef*ShuFinalDamPerDefRatio+WuFinalDamPer*WuFinalDamPerRatio+WuFinalDamPerDef*WuFinalDamPerDefRatio+QunFinalDamPer*QunFinalDamPerRatio+QunFinalDamPerDef*QunFinalDamPerDefRatio+PVPDamPer*PVPDamPerRatio+PVPDamPerDef*PVPDamPerDefRatio+Guanchuan*GuanchuanRatio+GuanchuanDef*GuanchuanDefRatio+Zhaojia*ZhaojiaRatio+ZhaojiaDef*ZhaojiaDefRatio)/100.0-55000);
        return (long)(Atk*AtkRatio+MaxHP*MaxHPRatio+Def*DefRatio+AtkSpeed*AtkSpeedRatio+(StunRate*StunRateRatio+SuperHitRate*SuperHitRateRatio+ComboRate*ComboRateRatio+MissRate*MissRateRatio+ParryRate*ParryRateRatio+SuckHPPer*SuckHPPerRatio+StunRateDef*StunRateDefRatio+SuperHitRateDef*SuperHitRateDefRatio+ComboRateDef*ComboRateDefRatio+MissRateDef*MissRateDefRatio+ParryRateDef*ParryRateDefRatio+SuckHPPerDef*SuckHPPerDefRatio+FinalDamPer*FinalDamPerRatio+FinalDamPerDef*FinalDamPerDefRatio+PhyDamPer*PhyDamPerRatio+PhyDamPerDef*PhyDamPerDefRatio+MagDamPer*MagDamPerRatio+MagDamPerDef*MagDamPerDefRatio+NormalSkillPer*NormalSkillPerRatio+NormalSkillPerDef*NormalSkillPerDefRatio+AngerSkillPer*AngerSkillPerRatio+AngerSkillPerDef*AngerSkillPerDefRatio+SuperDamPer*SuperDamPerRatio+SuperDamPerDef*SuperDamPerDefRatio+CurePer*CurePerRatio+CurePerDef*CurePerDefRatio+ShieldPer*ShieldPerRatio+ShieldPerDef*ShieldPerDefRatio+DOTPer*DOTPerRatio+DOTPerDef*DOTPerDefRatio+WeiFinalDamPer*WeiFinalDamPerRatio+WeiFinalDamPerDef*WeiFinalDamPerDefRatio+ShuFinalDamPer*ShuFinalDamPerRatio+ShuFinalDamPerDef*ShuFinalDamPerDefRatio+WuFinalDamPer*WuFinalDamPerRatio+WuFinalDamPerDef*WuFinalDamPerDefRatio+QunFinalDamPer*QunFinalDamPerRatio+QunFinalDamPerDef*QunFinalDamPerDefRatio+PVPDamPer*PVPDamPerRatio+PVPDamPerDef*PVPDamPerDefRatio+Guanchuan*GuanchuanRatio+GuanchuanDef*GuanchuanDefRatio+Zhaojia*ZhaojiaRatio+ZhaojiaDef*ZhaojiaDefRatio)/100.0-55000);
    }
    public static double GetSkillsFightPower(Dictionary<string, double> variables)