恢复总费用
This commit is contained in:
@@ -124,12 +124,6 @@ namespace TcgEngine.Gameplay
|
||||
player.mana_max = pdeck != null ? pdeck.start_mana : GameplayData.Get().mana_start;
|
||||
player.mana = player.mana_max;
|
||||
|
||||
//初始化三种阵营mana
|
||||
int start_mana = pdeck != null ? pdeck.start_mana : GameplayData.Get().mana_start;
|
||||
player.SetTeamMana("fire", start_mana, start_mana);
|
||||
player.SetTeamMana("forest", start_mana, start_mana);
|
||||
player.SetTeamMana("water", start_mana, start_mana);
|
||||
|
||||
//Draw starting cards 开始抽卡
|
||||
int dcards = pdeck != null ? pdeck.start_cards : GameplayData.Get().cards_start;
|
||||
DrawCard(player, dcards);
|
||||
@@ -178,19 +172,8 @@ namespace TcgEngine.Gameplay
|
||||
player.mana_max = Mathf.Min(player.mana_max, GameplayData.Get().mana_max);
|
||||
player.mana = player.mana_max;
|
||||
|
||||
//阵营Mana增长:基础每回合+1,场上有对应阵营角色额外+1
|
||||
UpdateTeamMana(player, "fire");
|
||||
UpdateTeamMana(player, "forest");
|
||||
UpdateTeamMana(player, "water");
|
||||
|
||||
// 回合开始时检查所有阵营mana,如果超过5则设置为5
|
||||
if (player.GetTeamMana("fire") > 5)
|
||||
player.SetTeamMana("fire", 5);
|
||||
if (player.GetTeamMana("forest") > 5)
|
||||
player.SetTeamMana("forest", 5);
|
||||
if (player.GetTeamMana("water") > 5)
|
||||
player.SetTeamMana("water", 5);
|
||||
if (player.mana > 5)
|
||||
// 回合开始时检查mana,如果超过5则设置为5
|
||||
if (player.mana > player.mana_max)
|
||||
player.mana = 5;
|
||||
|
||||
//Turn timer and history
|
||||
@@ -448,9 +431,9 @@ namespace TcgEngine.Gameplay
|
||||
{
|
||||
Player player = game_data.GetPlayer(card.player_id);
|
||||
|
||||
//Cost - 使用阵营mana支付
|
||||
//Cost - 使用mana支付
|
||||
if (!skip_cost)
|
||||
player.PayTeamMana(card);
|
||||
player.PayMana(card);
|
||||
|
||||
//Play card
|
||||
player.RemoveCardFromAllGroups(card);
|
||||
@@ -2022,22 +2005,6 @@ namespace TcgEngine.Gameplay
|
||||
return random;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新指定阵营的mana,基础每回合+1,场上有对应阵营角色额外+角色数量
|
||||
/// </summary>
|
||||
private void UpdateTeamMana(Player player, string team_id)
|
||||
{
|
||||
int base_increase = GameplayData.Get().mana_per_turn; // 基础增长
|
||||
int team_bonus = player.GetBoardTeamCount(team_id); // 场上同阵营角色数量
|
||||
int total_increase = base_increase + team_bonus;
|
||||
|
||||
// 增加最大mana
|
||||
player.AddTeamMana(team_id, 0, total_increase);
|
||||
|
||||
// 当前mana设置为最大值
|
||||
player.SetTeamMana(team_id, player.GetTeamManaMax(team_id));
|
||||
}
|
||||
|
||||
public Game GameData { get { return game_data; } }
|
||||
public ResolveQueue ResolveQueue { get { return resolve_queue; } }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user