本文整理汇总了C#中HREngine.Bots.Handmanager类的典型用法代码示例。如果您正苦于以下问题:C# Handmanager类的具体用法?C# Handmanager怎么用?C# Handmanager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Handmanager类属于HREngine.Bots命名空间,在下文中一共展示了Handmanager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
int pen = 0;
foreach(Handmanager.Handcard hcc in p.owncards)
{
if (hcc.getManaCost(p) == 2 && hcc.card.type == CardDB.cardtype.MOB && hcc.card.type != CardDB.cardtype.HEROPWR && hcc.card.name != CardDB.cardName.ironbeakowl) pen += 2;
//if (p.manaTurnEnd >= hcc.getManaCost(p)) pen -= 2;
}
bool ablilityready = false;
foreach(Minion mnn in p.ownMinions)
{
if (mnn.name == CardDB.cardName.knifejuggler && p.ownHeroAblility.card.getManaCost(p, 2) <= p.manaTurnEnd) ablilityready = true;
}
bool targetready = false;
foreach (Minion mnn in p.ownMinions)
{
if (mnn.name != CardDB.cardName.grimpatron && mnn.Hp == 1) targetready = true;
}
if (ablilityready && targetready) pen = 0;
foreach (Minion mnn in p.enemyMinions)
{
if (mnn.Angr >= 2 && mnn.Hp == 1 && p.ownMaxMana <= 2 && p.enemyHeroName != HeroEnum.druid && p.enemyHeroName != HeroEnum.thief && p.enemyHeroName != HeroEnum.mage) return -5;
}
return pen;
}
示例2: Ai
//private static Ai instance;
//public static Ai Instance
//{
// get
// {
// return instance ?? (instance = new Ai());
// }
//}
public Ai(Silverfish sf)
{
this.sf = sf;
this.nextMoveGuess = new Playfield(sf);
PenalityManager penman = sf.PenalityManager;
hp = sf.Hrtprozis;
hm = sf.Handmanager;
help = sf.Helpfunctions;
this.nextMoveGuess = new Playfield (sf) { mana = -100 };
this.mainTurnSimulator = new MiniSimulator(sf, maxdeep, maxwide, 0); // 0 for unlimited
this.mainTurnSimulator.setPrintingstuff(true);
/*this.nextTurnSimulator = new MiniSimulatorNextTurn();
this.enemyTurnSim = new EnemyTurnSimulator();
this.enemySecondTurnSim = new EnemyTurnSimulator();*/
for (int i = 0; i < sf.Settings.numberOfThreads; i++)
{
this.nextTurnSimulator.Add(new MiniSimulatorNextTurn(sf));
this.enemyTurnSim.Add(new EnemyTurnSimulator(sf));
this.enemySecondTurnSim.Add(new EnemyTurnSimulator(sf));
this.nextTurnSimulator[i].thread = i;
this.enemyTurnSim[i].thread = i;
this.enemySecondTurnSim[i].thread = i;
}
}
示例3: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
if (p.enemyMinions.Count == 0)
return 20;
return 0;
}
示例4: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
if (p.enemyHeroName == HeroEnum.hunter || p.enemyHeroName == HeroEnum.mage || p.enemyHeroName == HeroEnum.pala)
{
return 50;
}
return 0;
}
示例5: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
int pen = 25;
if ((target.Hp <= 1 + p.spellpower || target.divineshild) && !target.isHero)
{
if (target.own) pen -= 20;
if (!target.own) pen -= 25;
}
return pen;
}
示例6: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
int pen = 0;
foreach (Handmanager.Handcard hcc in p.owncards)
{
if (hcc.getManaCost(p) <= p.mana && hcc.card.name != CardDB.cardName.biggamehunter && !target.taunt) pen += 1;
if (!p.ownHero.allreadyAttacked) pen += 1;
}
return pen;
}
示例7: Action
public Action(actionEnum type, Handmanager.Handcard hc, Minion ownCardEntity, int place, Minion target, int pen, int choice)
{
this.actionType = type;
this.card = hc;
this.own = ownCardEntity;
this.place = place;
this.target = target;
this.penalty = pen;
this.druidchoice = choice;
}
示例8: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
bool juggleron = false;
foreach (Minion mnn in p.ownMinions)
{
if (mnn.name == CardDB.cardName.knifejuggler) juggleron = true;
}
if (juggleron) return -10;
return 0;
}
示例9: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
int pen = 0;
bool hasdivineshild = false;
foreach(Minion mnn in p.ownMinions)
{
if (mnn.divineshild && p.enemyMinions.Count >= 1) hasdivineshild = true;
}
if (hasdivineshild) pen += 4;
return pen;
}
示例10: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
int pen = 0;
foreach (Handmanager.Handcard hcc in p.owncards)
{
//find another 2mana minion
if (hcc.card.cost == 2 && hcc.card.type == CardDB.cardtype.MOB && hcc.card.name != CardDB.cardName.ironbeakowl) pen += 2;
}
if (p.ownMinions.Count - p.enemyMinions.Count >= 2) pen -= 10;
return pen;
}
示例11: getPlayPenalty
//Choose One - Summon a 2/2 Slime; or Gain an empty Mana Crystal.
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
if (choice == 1)
{
if (p.ownMinions.Count > 5) return 18;
}
if (choice == 2)
{
if (p.ownMaxMana == 10) return 500;
else if (p.ownMaxMana > 5) return p.ownMaxMana;
}
return 0;
}
示例12: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
if (choice == 1) //deal 2 dmg
{
if (p.enemyMinions.Count == 0) return 25;
}
if (choice == 2) // summon 2 1/1 sampling
{
if (p.manaTurnEnd <= hc.getManaCost(p))
{
if (hc.getManaCost(p) == 1) return -2;
}
}
return 0;
}
示例13: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
// penalty for playing Loatheb as a vanilla 5/5, i.e. on an empty board (should hold for offensive finishing or preventing AoE/removal)
int penalty = 0;
if (p.ownHero.Hp + p.ownHero.armor > 15)
{
if (p.ownMinions.Count >= 3) return 0;
else penalty += 5;
if (p.enemyMinions.Count == 0) penalty += 5;
}
return penalty;
}
示例14: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
int PENALTY = 0;
if (Ai.Instance.botBase is BehaviorHandlock)
{
foreach (Handmanager.Handcard hcc in p.owncards)//check moltengiant
{
if (hcc.card.name == CardDB.cardName.moltengiant && p.ownHeroName == HeroEnum.warlock)//use giant first
{
if (hcc.card.getManaCost(p, hcc.manacost) == 0)
{
return 500;
}
else
{
return 2 * (hcc.card.getManaCost(p, hcc.manacost));
}
}
}
if (p.ownHero.Hp >= 15)
{
int ENEMYMINIONATTACK = 0; //if we candie, use heal
foreach (Minion mnn in p.enemyMinions)
{
ENEMYMINIONATTACK += mnn.Angr;
}
if (p.ownHero.Hp - ENEMYMINIONATTACK <= 8)
{
PENALTY = 0;
}
else PENALTY = 2 * (p.ownHero.Hp - 14); //15hp: 2 16hp : 4...
if (p.ownHero.Hp - ENEMYMINIONATTACK >= 20) PENALTY -= 20;
}
if (p.ownHero.Hp <= 14) // 0~14 pen = 0;
{
PENALTY = 0;
}
}
return PENALTY;
}
示例15: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
if (p.enemyHeroName == HeroEnum.warrior || p.enemyHeroName == HeroEnum.thief || p.enemyHeroName == HeroEnum.pala)
{
bool canPlayAnotherMob = false;
foreach (Handmanager.Handcard hcc in p.owncards)
{
if (hcc.card.type == CardDB.cardtype.MOB && hcc.canplayCard(p))
{
canPlayAnotherMob = true;
break;
}
}
bool hasGoodWeapon = (p.enemyWeaponDurability > 0 && p.enemyWeaponAttack > 1);
if (!hasGoodWeapon)
{
return (canPlayAnotherMob ? 20 : 5);
}
}
return 0;
}