恢复卡槽可选

This commit is contained in:
xianyi
2025-08-20 16:16:27 +08:00
parent f0c1643f30
commit b215788256
5 changed files with 17 additions and 21 deletions

View File

@@ -67,17 +67,16 @@ 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 (can_do_attack && can_be_attacked)
// {
// target_alpha = 1f;
// }
//}
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 (your_turn && drag_card != null && drag_card.CardData.IsRequireTargetSpell() && gdata.IsPlayTargetValid(drag_card.GetCard(), GetPlayer()))
{