void DoCardTrick() { currentCardOwner.Animator.SetTrigger("Casting"); for (int i = 0; i < currentSelectedCard.card.abilityStepsWithTargetingData.Length; i++) { if (currentSelectedCard.card.abilityStepsWithTargetingData[i].abilityStep is AbilityStep_Drain) { AbilityStep_Drain card = currentSelectedCard.card.abilityStepsWithTargetingData[i].abilityStep as AbilityStep_Drain; if (i != 0) { card.OnPlay(targetsPerAbilityStep[i], currentSelectedCard.card.onPlayResults[i - i]); } } else { AbilityStep_Base card = currentSelectedCard.card.abilityStepsWithTargetingData[i].abilityStep; currentSelectedCard.card.onPlayResults[i] = card.OnPlay(targetsPerAbilityStep[i], currentCardOwner); } } FindObjectOfType <AudioManager>().PlayRandomClip(currentSelectedCard.card.soundForPlay); currentCardOwner.ModifyMana(-currentSelectedCard.card.manaCost); currentCardOwner.DropCard(currentSelectedCard, stayUp); infoText.text = ""; }
void DoCardTrick() { for (int i = 0; i < currentSelectedCard.card.abilityStepsWithTargetingData.Length; i++) { if (currentSelectedCard.card.abilityStepsWithTargetingData[i].abilityStep is AbilityStep_Drain) { AbilityStep_Drain card = currentSelectedCard.card.abilityStepsWithTargetingData[i].abilityStep as AbilityStep_Drain; if (i != 0) { card.OnPlay(targetsPerAbilityStep[i], currentSelectedCard.card.onPlayResults[i - i]); } } else { AbilityStep_Base card = currentSelectedCard.card.abilityStepsWithTargetingData[i].abilityStep; currentSelectedCard.card.onPlayResults[i] = card.OnPlay(targetsPerAbilityStep[i]); } } FindObjectOfType <AudioManager>().PlayAudioDeath(currentSelectedCard.card.soundForPlay); currentCardOwner.ModifyMana(-currentSelectedCard.card.manaCost); currentCardOwner.DropCard(currentSelectedCard, stayUp); infoText.text = ""; if (!currentSelectedCard.ethereal) { foreach (var ally in GetAllRelativeAllies(currentCardOwner, false)) { Player a = (Player)ally; a.DrawRandomCard(1, false); } } HideTargettingButtons(); }