using System;
using System.Collections.Generic;
using System.Text;

namespace HREngine.Bots
{
	class Sim_LOE_053 : SimTemplate //* Djinni of Zephyrs
	{
		//Whenever you cast a spell on another friendly minion, cast a copy of it on this one.

        public override void onCardIsGoingToBePlayed(Playfield p, Handmanager.Handcard hc, bool wasOwnCard, Minion triggerEffectMinion)
        {
            if (triggerEffectMinion.own == wasOwnCard && hc.card.type == CardDB.cardtype.SPELL)
            {
                if (hc.extraParam > 0 && wasOwnCard)
                {
                    hc.card.sim_card.onCardPlay(p, true, triggerEffectMinion, hc.extraParam2);
                }
                else if (hc.extraParam < 0 && !wasOwnCard)
                {
                    hc.card.sim_card.onCardPlay(p, false, triggerEffectMinion, hc.extraParam2);
                }
            }
        }
    }
}