调整卡牌攻击

- 场上存在卡牌时无法直接攻击敌方玩家
- 取消卡牌攻击敌方玩家高亮显示
- 一回合只能上场一张角色卡
This commit is contained in:
xianyi
2025-08-06 11:35:29 +08:00
parent 80549b8e49
commit f6262481dc
7 changed files with 45 additions and 18 deletions

View File

@@ -67,16 +67,17 @@ namespace TcgEngine.Client
target_alpha = 0f;
Card select_card = bcard_selected?.GetCard();
if (select_card != null)
{
bool can_do_attack = gdata.IsPlayerActionTurn(player) && select_card.CanAttack();
bool can_be_attacked = gdata.CanAttackTarget(select_card, oplayer);
// if (select_card != null)
// {
// bool can_do_attack = gdata.IsPlayerActionTurn(player) && select_card.CanAttack();
// bool can_be_attacked = gdata.CanAttackTarget(select_card, oplayer);
if (can_do_attack && can_be_attacked)
{
target_alpha = 1f;
}
}
// 敌方可被攻击时高亮
// if (can_do_attack && can_be_attacked)
// {
// target_alpha = 1f;
// }
//}
if (your_turn && drag_card != null && drag_card.CardData.IsRequireTargetSpell() && gdata.IsPlayTargetValid(drag_card.GetCard(), GetPlayer()))
{