private DicePanelParam GetDicePanelParamByLand(Land land, bool isAttack) { Camp camp = CampDic[land.CampID]; int basicDiceRolls = land.GetBasicDiceRolls(); //地块上的卡牌获得的额外投掷次数 BattleCardTriggerTime diceRoll = isAttack ? BattleCardTriggerTime.ATTACK_DICE_ROLL : BattleCardTriggerTime.DEFENCE_DICE_ROLL; int cardExtraDiceRolls = land.GetExtraIncreaseByCard(diceRoll); Debug.Log(camp.name + "阵营地块卡牌额外投掷次数是" + cardExtraDiceRolls); //阵营获得的额外投掷次数(坦克,飞机等+1) int campExtraDiceRolls = camp.GetExtraDiceRollsAttackByLand(land, isAttack); int finalDiceRolls = basicDiceRolls + cardExtraDiceRolls + campExtraDiceRolls; //根据最终投掷次数模拟的结果 int basicDiceRandomPoint = GetDiceRandomResult(finalDiceRolls); Debug.Log(camp.name + "阵营摇色子点数是" + basicDiceRandomPoint); //地块上的卡牌的额外点数加成 BattleCardTriggerTime endPoint = isAttack ? BattleCardTriggerTime.ATTACK_END_POINT : BattleCardTriggerTime.DEFENCE_END_POINT; int cardExtraEndPoint = land.GetExtraIncreaseByCard(endPoint); Debug.Log(camp.name + "阵营地块卡牌点数是" + cardExtraEndPoint); //阵营卡牌当回合持续buff点数加成 int campCardExtraEndPoint = camp.hasCardBuff ? camp.CampBuffCardEffect.attackExtraEndPoint : 0; Debug.Log(camp.name + "阵营阵营buff点数是" + campCardExtraEndPoint); int finalDicePoint = basicDiceRandomPoint + cardExtraEndPoint + campCardExtraEndPoint; if (isAttack) { _attackPoint = finalDicePoint; } else { _defencePoint = finalDicePoint; } return(new DicePanelParam(camp.name, null, finalDiceRolls, finalDicePoint)); }