public override IEnumerator Play(Player caster, Card card, EffectState state) { yield return(caster.StartCoroutine(base.Play(caster, card, state))); List <GameObject> targets = state.GetTargets(caster); CardDestBlock block = state.trigger as CardDestBlock; if (block == null) { block = Constants.BATTLE.ResolvedBlock as CardDestBlock; } int value = 0; if (block != null) { foreach (Card c in block.GetCards()) { value += c.State.Cost; } } else { Debug.Log("カード破壊情報を読み取れませんでした"); } foreach (GameObject obj in targets) { Play(obj, value); yield return(caster.StartCoroutine(AnimationStart(state.animation, obj))); Debug.Log(obj.name); } }
public override IEnumerator Play(Player caster, Card card, EffectState state) { yield return(caster.StartCoroutine(base.Play(caster, card, state))); List <GameObject> targets = state.GetTargets(caster); foreach (GameObject obj in targets) { yield return(caster.StartCoroutine(AddAttackCount(obj, state))); } }
public override IEnumerator Play(Player caster, Card card, EffectState state) { yield return(caster.StartCoroutine(base.Play(caster, card, state))); List <GameObject> targets = state.GetTargets(caster); foreach (GameObject obj in targets) { Play(obj, state.value); yield return(caster.StartCoroutine(AnimationStart(state.animation, obj))); //Debug.Log(obj.name); } }
public override IEnumerator Play(Player caster, Card card, EffectState state) { yield return(caster.StartCoroutine(base.Play(caster, card, state))); List <GameObject> targets = state.GetTargets(caster); foreach (GameObject t in targets) { if (t.GetComponent <Player>()) { t.GetComponent <Player>().Buff.SetState(state); yield return(caster.StartCoroutine(AnimationStart(state.animation, t))); } /* else if (t.GetComponent<Card>()) { }*/ } }
public override IEnumerator Play(Player caster, Card card, EffectState state) { yield return(caster.StartCoroutine(base.Play(caster, card, state))); List <GameObject> targets = state.GetTargets(caster); int mob = 0; if (card != null && card.State.cardType == ObjectType.Skill) { mob = caster.SkillDamage; } foreach (GameObject obj in targets) { yield return(caster.StartCoroutine(_Damage(obj, state.value + mob))); } }
public override IEnumerator Play(Player caster, Card card, EffectState state) { yield return(caster.StartCoroutine(base.Play(caster, card, state))); List <GameObject> targets = state.GetTargets(caster); List <Card> cards = new List <Card>(); Card c = null; foreach (GameObject obj in targets) { Debug.Log(obj); if ((c = obj.GetComponent <Card>()) != null) { cards.Add(c); } } Draft(caster, cards); }
public override IEnumerator Play(Player caster, Card card, EffectState state) { yield return(caster.StartCoroutine(base.Play(caster, card, state))); List <GameObject> targets = state.GetTargets(caster); List <Card> cards = new List <Card>(); Card c = null; foreach (GameObject obj in targets) { Debug.Log(obj); if ((c = obj.GetComponent <Card>()) != null) { cards.Add(c); } } cards.Sort((a, b) => { return(a.State.ID - b.State.ID); }); //重複するカードを削除 for (int i = 0; i + 1 < cards.Count; i++) { if (cards[i].State == cards[i + 1].State) { cards.Remove(cards[i--]); } } for (int i = 0; i < cards.Count; i++) { if (!caster.AligmentCheck(cards[i].State.cardAligment)) { cards.Remove(cards[i--]); } } if (c) { yield return(caster.StartCoroutine(AnimationStart(state.animation, c.gameObject))); } Draft(caster, cards); }