恢复卡槽可选
This commit is contained in:
@@ -57,14 +57,14 @@ namespace TcgEngine.Client
|
|||||||
|
|
||||||
//Find target opacity value
|
//Find target opacity value
|
||||||
target_alpha = 0f;
|
target_alpha = 0f;
|
||||||
if (your_turn && dcard != null && dcard.CardData.IsBoardCard() && gdata.CanPlayCard(dcard, slot, true))
|
if (your_turn && dcard != null && dcard.CardData.IsBoardCard() && gdata.CanPlayCard(dcard, slot))
|
||||||
{
|
{
|
||||||
target_alpha = 1f; //hightlight when dragging a character or artifact (skip mana cost)
|
target_alpha = 1f; //hightlight when dragging a character or artifact
|
||||||
}
|
}
|
||||||
|
|
||||||
if (your_turn && dcard != null && dcard.CardData.IsRequireTarget() && gdata.CanPlayCard(dcard, slot, true))
|
if (your_turn && dcard != null && dcard.CardData.IsRequireTarget() && gdata.CanPlayCard(dcard, slot))
|
||||||
{
|
{
|
||||||
target_alpha = 1f; //Highlight when dragin a spell with target (skip mana cost)
|
target_alpha = 1f; //Highlight when dragin a spell with target
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gdata.selector == SelectorType.SelectTarget && player.player_id == gdata.selector_player_id)
|
if (gdata.selector == SelectorType.SelectTarget && player.player_id == gdata.selector_player_id)
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ namespace TcgEngine.Client
|
|||||||
{
|
{
|
||||||
foreach (GroupSlot slot in group_slots)
|
foreach (GroupSlot slot in group_slots)
|
||||||
{
|
{
|
||||||
if(gdata.CanPlayCard(dcard, slot.slot, true))
|
if(gdata.CanPlayCard(dcard, slot.slot))
|
||||||
target_alpha = 1f; //hightlight when dragging a character or artifact (skip mana cost)
|
target_alpha = 1f; //hightlight when dragging a character or artifact
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,17 +67,16 @@ namespace TcgEngine.Client
|
|||||||
|
|
||||||
target_alpha = 0f;
|
target_alpha = 0f;
|
||||||
Card select_card = bcard_selected?.GetCard();
|
Card select_card = bcard_selected?.GetCard();
|
||||||
// if (select_card != null)
|
if (select_card != null)
|
||||||
// {
|
{
|
||||||
// bool can_do_attack = gdata.IsPlayerActionTurn(player) && select_card.CanAttack();
|
bool can_do_attack = gdata.IsPlayerActionTurn(player) && select_card.CanAttack();
|
||||||
// bool can_be_attacked = gdata.CanAttackTarget(select_card, oplayer);
|
bool can_be_attacked = gdata.CanAttackTarget(select_card, oplayer);
|
||||||
|
|
||||||
// 敌方可被攻击时高亮
|
if (can_do_attack && can_be_attacked)
|
||||||
// if (can_do_attack && can_be_attacked)
|
{
|
||||||
// {
|
target_alpha = 1f;
|
||||||
// target_alpha = 1f;
|
}
|
||||||
// }
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
if (your_turn && drag_card != null && drag_card.CardData.IsRequireTargetSpell() && gdata.IsPlayTargetValid(drag_card.GetCard(), GetPlayer()))
|
if (your_turn && drag_card != null && drag_card.CardData.IsRequireTargetSpell() && gdata.IsPlayTargetValid(drag_card.GetCard(), GetPlayer()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -234,6 +234,7 @@ namespace TcgEngine.Client
|
|||||||
// 检查本回合是否已经上场过场上卡牌(只有怪物牌等场上卡牌受限制)
|
// 检查本回合是否已经上场过场上卡牌(只有怪物牌等场上卡牌受限制)
|
||||||
if (card.CardData.IsBoardCard() && player.cards_played_this_turn >= 1)
|
if (card.CardData.IsBoardCard() && player.cards_played_this_turn >= 1)
|
||||||
{
|
{
|
||||||
|
// TODO 通知
|
||||||
Debug.Log("本回合只能上场一张场上卡牌");
|
Debug.Log("本回合只能上场一张场上卡牌");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,10 +187,6 @@ namespace TcgEngine
|
|||||||
if (target.HasStatus(StatusType.Protected) && !attacker.HasStatus(StatusType.Flying))
|
if (target.HasStatus(StatusType.Protected) && !attacker.HasStatus(StatusType.Flying))
|
||||||
return false; //Protected by taunt
|
return false; //Protected by taunt
|
||||||
|
|
||||||
// 检查目标玩家场上是否有卡牌,如有则无法直接攻击玩家
|
|
||||||
if (target.cards_board.Count > 0)
|
|
||||||
return false; //Cannot attack player when they have cards on board
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user