What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

matter

Member
Joined
Dec 9, 2012
Messages
185
Reaction score
0
How do i fix so the bot only plays 'Goblin Blastmage' when there is mech on board and never else?


This code is what i have so far but it didnt work.
Code:
using System;
using System.Collections.Generic;
using System.Text;

namespace HREngine.Bots
{
    class Sim_GVG_004 : SimTemplate //* Goblin Blastmage
    {

        //Battlecry: If you have a Mech, deal 4 damage randomly.  

        public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
        {
            List<Minion> temp = (own.own) ? p.ownMinions : p.enemyMinions;

            foreach (Minion m in temp)
            {
                if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL)
                {
                    p.minionGetDamageOrHeal(p.ownHero, p.ownHero.Hp - 1);
					p.minionGetDamageOrHeal(p.ownHero, p.ownHero.Hp - 1);
					p.minionGetDamageOrHeal(p.ownHero, p.ownHero.Hp - 1);
					p.minionGetDamageOrHeal(p.ownHero, p.ownHero.Hp - 1);
                    return;
                }				
            }
            foreach (Minion m in temp)
            {
                if ((TAG_RACE)m.handcard.card.race == TAG_RACE.!MECHANICAL)
                {
                    p.minionGetDamageOrHeal(own.own ? p.ownHero : p.enemyHero, 300);
                    return;
                }				
            }			
        }

    }

}
 
If it's default, then I recommend you don't change any SF files.
Should first try to change the settings in the DefaultRoutine.cs:
int twotsamount = 0; // Number of boards where the next turn is simulated
Instead 0 you can set any number from 10 to 500 (e.g. 100)
 
what does that do? "Number of boards where the next turn is simulated" i really dont get it :) should i have 500 or 10 ?

i have an i7-4790k , 16gig ram
 
Back
Top