/// <summary> /// 召唤怪兽 /// </summary> int CallMonster() { int index = 0; for (; index < DuelRuleManager.GetMonsterAreaNumber(); index++) { if (ownerPlayer.GetMonsterCardArea()[index] == null) { ownerPlayer.GetMonsterCardArea()[index] = calledMonster; break; } } callMonsterType = CallMonsterType.Normal; calledMonster.AddContent("monsterCardAreaIndex", index); if (calledMonster.GetCardGameState() == CardGameState.Tomb) { calledMonster.GetDuelCardScript().GetOwner().GetTombCards().Remove(calledMonster); } else if (calledMonster.GetCardGameState() == CardGameState.Hand) { calledMonster.GetDuelCardScript().GetOwner().GetHandCards().Remove(calledMonster); } calledMonster.SetCardGameState(cardGameState, index); ownerPlayer.SetNormalCallNumber(ownerPlayer.GetNormalCallNumber() - 1); return(index); }
protected override void BeforeProcessFunction() { int index = 0; for (; index < DuelRuleManager.GetMagicTrapAreaNumber(); index++) { if (ownerPlayer.GetMagicTrapCardArea()[index] == null) { ownerPlayer.GetMagicTrapCardArea()[index] = backPlaceCard; break; } } backPlaceCard.AddContent("magicTrapCardAreaIndex", index); backPlaceCard.SetCardGameState(CardGameState.Back, index); ownerPlayer.GetHandCards().Remove(backPlaceCard); AfterFinishProcessFunction(); }