public static void DoingUnitAttackData(TeamAttackingData data)
    {
        int c_inj = 0, c_death = 0;
        int t_inj = 0, t_death = 0;

        foreach (var item in data.UnitAttackingDatas)
        {
            if (item == null)
            {
                continue;
            }
            BattleTools.DoDameger(item);

            //BUFF Time_3
            BattleTools.DoUnitBuff(item, EffectTimeType.Time_3);

            c_inj   += item.data.Injury;
            c_death += item.data.Death;
            t_inj   += item.toData.Injury;
            t_death += item.toData.Death;
        }

        UiIndex.AddEventText(string.Format("对敌人造成{0}点伤害,击伤{1}人,击杀{2}人",
                                           data.DoDamger, t_inj, t_death));

        UiIndex.AddEventText(string.Format("己方受到{0}点伤害,受伤{1}人,死亡{2}人\n",
                                           data.ByDamger, c_inj, c_death));
    }
    private void SetTeamToTeamData(TeamAttackingData teamData)
    {
        TeamSummaryData          team_dic   = teamData.Team_dic;
        TeamSummaryData          toteam_dic = teamData.ToTeam_dic;
        List <UnitAttackingData> unitDatas  = teamData.UnitAttackingDatas;

        //buff1 例如调整特定单位对特定单位的伤害 调整伤害的BUFF                        Time_1
        foreach (var item in unitDatas)
        {
            BattleTools.DoUnitBuff(item, EffectTimeType.Time_1);
        }

        int all_damger   = BattleTools.GetDameger(unitDatas);       //造成总伤害
        int all_t_damger = BattleTools.GetByDameger(unitDatas);     //对方的造成总伤害

        // 此处调整受伤率

        // 根据各种因素调整伤害
        SetDamager(all_damger, all_t_damger, team_dic, toteam_dic, unitDatas);

        //buff3 例如调整特定单位对特定单位的保护效果 真实伤害 调整受到伤害的BUFF     Time_2
        foreach (var item in unitDatas)
        {
            BattleTools.DoUnitBuff(item, EffectTimeType.Time_2);
        }

        teamData.DoDamger = BattleTools.GetDameger(unitDatas);   //总实际伤害
        teamData.ByDamger = BattleTools.GetByDameger(unitDatas);
    }
    public override void DoEffect(string skillName, King king, King toking, BattleData battleData)
    {
        int damager = int.Parse(Values[0]);
        List <TeamAttackingData> team_attack_datas = new List <TeamAttackingData>();


        foreach (var team in toking.army.team)
        {
            if (team == null)
            {
                continue;
            }
            if (team.GetBattleCount() == 0)
            {
                continue;
            }
            TeamAttackingData        teamData = new TeamAttackingData();
            List <UnitAttackingData> list     = new List <UnitAttackingData>();

            TeamSummaryData data = team.GetSummary();
            list = BattleContorl.CreateSkillToUnitData(skillName, damager, team, data, battleData);

            //调整伤亡率
            BattleContorl.SetDamager(damager, 0, null, data, list);

            //buff3 例如调整特定单位对特定单位的保护效果 真实伤害 调整受到伤害的BUFF     Time_2
            foreach (var unitdata in list)
            {
                BattleTools.DoUnitBuff(unitdata, EffectTimeType.Time_2);
            }

            teamData.DoDamger = BattleTools.GetDameger(list);
            team_attack_datas.Add(teamData);
            teamData.UnitAttackingDatas = list;
        }

        foreach (var item in team_attack_datas)
        {
            BattleContorl.DoingUnitAttackData(item);
        }

        //BUFF 战后BUFF Time_4
        foreach (var item in team_attack_datas)
        {
            BattleTools.DoTeamBuff(king, toking, item, EffectTimeType.Time_4);
        }
    }