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

namespace HREngine.Bots
{
    class Sim_EX1_409 : SimTemplate //* Upgrade!
	{
        // If you have a weapon, give it +1/+1. Otherwise equip a 1/3 weapon.

        CardDB.Card wcard = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.EX1_409t);//Heavy Axe

		public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
		{
            if (ownplay)
            {
                if (p.ownWeaponDurability > 0)
                {
                    p.ownWeaponAttack++;
                    p.ownWeaponDurability++;
                    p.minionGetBuffed(p.ownHero, 1, 0);
                }
                else
                {
                    p.equipWeapon(wcard, true);
                }
            }
            else
            {
                if (p.enemyWeaponDurability > 0)
                {
                    p.enemyWeaponAttack++;
                    p.enemyWeaponDurability++;
                    p.minionGetBuffed(p.enemyHero, 1, 0);
                }
                else
                {
                    p.equipWeapon(wcard, false);
                }
            }
		}
	}
}