/// <summary> /// 卡牌进入牌堆 /// </summary> public void CardToCemetery(CardFighter card, CardArea area) { RemoveCard(card, area); deadCard.Add(card); Actions.Add(CardDeadAction.GetAction(ID, card.ID, area)); }
/// <summary> /// 卡牌死亡 /// </summary> public override void DoDead() { if (isDead) { return; } isDead = true; Actions.Add(CardDeadAction.GetAction(owner.ID, this.ID)); owner.CardToCemetery(this); }
/// <summary> /// 卡牌进入墓地 /// </summary> public float CardDead(BaseAction action) { CardDeadAction cardDeadAction = action as CardDeadAction; CardFighter card = GetCardByID(cardDeadAction.sourceID); // 等待中的卡牌进入墓地 if (cardWaitArea.ContainsCard(card)) { return(cardWaitArea.RemoveCard(card, cardDeadArea.GetPos())); } // 战斗中的卡牌进入墓地 if (cardFightArea.ContainsCard(card)) { return(cardFightArea.RemoveCard(card, cardDeadArea.GetPos())); } cardDeadArea.AddCard(card); return(0f); }