/// <summary> /// 当所有信息齐后进行 /// </summary> void RealFunction() { //如果当前怪兽的状态是里侧表示,则进行反转召唤 if (calledMonster.GetCardGameState() == CardGameState.Back) { callMonsterType = CallMonsterType.Flip; calledMonster.SetCardGameState(cardGameState); calledMonster.SetChangeAttackOrDefenseNumber(0); calledMonster.GetDuelCardScript().SetOwner(ownerPlayer); CheckCardCanChainLaunch(); return; } int monsterLevel = calledMonster.GetLevel(); //先判断是否可以直接进行召唤 if (monsterLevel <= DuelRuleManager.GetCallMonsterWithoutSacrificeLevelUpperLimit()) { int index = CallMonster(); calledMonster.GetDuelCardScript().SetOwner(ownerPlayer); ownerPlayer.GetOpponentPlayer().CallMonsterNotify(calledMonster.GetID(), CallType.Normal, CardGameState.Hand, cardGameState, index); CheckCardCanChainLaunch(); } else//使用祭品召唤 { if (ownerPlayer.GetCanBeSacrificeMonsterNumber() >= calledMonster.NeedSacrificeMonsterNumer()) { callMonsterType = CallMonsterType.Sacrifice; TrySacrificeCall(); } } }
/// <summary> /// 召唤需要的祭品数量 /// </summary> /// <returns></returns> public int NeedSacrificeMonsterNumer() { if (GetLevel() > DuelRuleManager.GetCallMonsterWithoutSacrificeLevelUpperLimit()) { if (GetLevel() > DuelRuleManager.GetCallMonsterWithOneSacrificeLevelUpperLimit()) { return(2); } else { return(1); } } return(0); }
/// <summary> /// 判断是否可以通常召唤 /// </summary> /// <returns></returns> public bool CanNormalCall() { if (ownerPlayer.IsMyTurn() && card.GetCardGameState() == CardGameState.Hand && card.GetCardType() == CardType.Monster && (duelScene.GetCurrentPhaseType() == PhaseType.Main || duelScene.GetCurrentPhaseType() == PhaseType.Second) && ownerPlayer.GetCurrentEffectProcess() == null && ownerPlayer.GetCanCallNumber() > 0) { if (card.GetLevel() <= DuelRuleManager.GetCallMonsterWithoutSacrificeLevelUpperLimit()) { return(!ownerPlayer.MonsterAreaIsFull()); } } return(false); }