本文整理汇总了C#中HREngine.Bots.Handmanager类的典型用法代码示例。如果您正苦于以下问题:C# Handmanager类的具体用法?C# Handmanager怎么用?C# Handmanager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Handmanager类属于HREngine.Bots命名空间,在下文中一共展示了Handmanager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:ANAXRIDER,项目名称:custom,代码行数:28,代码来源:Pen_CS2_101.cs
示例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;
}
}
开发者ID:shuyi3,项目名称:AIPJ,代码行数:40,代码来源:Ai.cs
示例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;
}
开发者ID:cookiezeater,项目名称:silverfish,代码行数:8,代码来源:Pen_EX1_565.cs
示例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;
}
开发者ID:noHero123,项目名称:silverfish,代码行数:10,代码来源:Pen_GVG_074.cs
示例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;
}
开发者ID:ANAXRIDER,项目名称:custom,代码行数:10,代码来源:Pen_EX1_302.cs
示例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;
}
开发者ID:ANAXRIDER,项目名称:custom,代码行数:10,代码来源:Pen_EX1_154.cs
示例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;
}
开发者ID:Zendio,项目名称:silverfish,代码行数:10,代码来源:action.cs
示例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;
}
开发者ID:ANAXRIDER,项目名称:custom,代码行数:10,代码来源:Pen_GVG_045.cs
示例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;
}
开发者ID:ANAXRIDER,项目名称:custom,代码行数:11,代码来源:Pen_GVG_059.cs
示例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;
}
开发者ID:ANAXRIDER,项目名称:custom,代码行数:11,代码来源:Pen_FP1_007.cs
示例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;
}
开发者ID:cookiezeater,项目名称:silverfish,代码行数:15,代码来源:Pen_OG_202.cs
示例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;
}
开发者ID:ANAXRIDER,项目名称:custom,代码行数:15,代码来源:Pen_AT_037.cs
示例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;
}
开发者ID:noHero123,项目名称:silverfish,代码行数:15,代码来源:Pen_FP1_030.cs
示例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;
}
开发者ID:ANAXRIDER,项目名称:custom,代码行数:43,代码来源:Pen_GVG_069.cs
示例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;
}
开发者ID:noHero123,项目名称:silverfish,代码行数:23,代码来源:Pen_EX1_066.cs
示例16: getPlayPenalty
public override float getPlayPenalty(Playfield p, Handmanager.Handcard hc, Minion target, int choice, bool isLethal)
{
return 0;
}
开发者ID:noHero123,项目名称:silverfish,代码行数:4,代码来源:Pen_EX1_625t.cs
示例17: createNewMinion
private Minion createNewMinion(Handmanager.Handcard hc, int id)
{
Minion m = new Minion();
m.handcard = new Handmanager.Handcard(hc);
m.zonepos = id + 1;
m.entitiyID = hc.entity;
m.Angr = hc.card.Attack;
m.Hp = hc.card.Health;
m.maxHp = hc.card.Health;
m.name = hc.card.name;
m.playedThisTurn = true;
m.numAttacksThisTurn = 0;
if (hc.card.windfury) m.windfury = true;
if (hc.card.tank) m.taunt = true;
if (hc.card.Charge)
{
m.Ready = true;
m.charge = 1;
}
if (hc.card.Shield) m.divineshild = true;
if (hc.card.poisionous) m.poisonous = true;
if (hc.card.Stealth) m.stealth = true;
if (m.name == CardDB.cardName.lightspawn && !m.silenced)
{
m.Angr = m.Hp;
}
return m;
}
开发者ID:JayMansel,项目名称:silverfish,代码行数:34,代码来源:Hrtprozis.cs
示例18: triggerPlayedAMinion
private void triggerPlayedAMinion(Handmanager.Handcard hc, bool own)
{
if (own) // effects only for OWN minons
{
List<Minion> tempo = new List<Minion>(this.ownMinions);
foreach (Minion m in tempo)
{
if (m.silenced) continue;
if (m.handcard.card.specialMin == CardDB.specialMinions.knifejuggler && m.entitiyID != hc.entity)
{
if (this.enemyMinions.Count >= 1)
{
List<Minion> temp = new List<Minion>();
int damage = 1;
List<Minion> temp2 = new List<Minion>(this.enemyMinions);
temp2.Sort((a, b) => -a.Hp.CompareTo(b.Hp));
bool dmgdone = false;
foreach (Minion enemy in temp2)
{
if (enemy.Hp > 1)
{
minionGetDamagedOrHealed(enemy, damage, 0, false);
dmgdone = true;
break;
}
if (!dmgdone) this.attackOrHealHero(1, false);
}
}
else
{
this.attackOrHealHero(1, false);
}
}
if (own && m.handcard.card.specialMin == CardDB.specialMinions.starvingbuzzard && (TAG_RACE)hc.card.race == TAG_RACE.PET && m.entitiyID != hc.entity)
{
//this.owncarddraw++;
this.drawACard("", true);
}
if (own && m.handcard.card.specialMin == CardDB.specialMinions.undertaker && hc.card.deathrattle)
{
minionGetBuffed(m, 1, 1, own);
}
}
}
//effects for ALL minons
List<Minion> tempoo = new List<Minion>(this.ownMinions);
foreach (Minion m in tempoo)
{
if (m.silenced) continue;
if (m.handcard.card.specialMin== CardDB.specialMinions.murloctidecaller && hc.card.race == 14 && m.entitiyID != hc.entity)
{
minionGetBuffed(m, 1, 0, true);
}
if (m.handcard.card.specialMin == CardDB.specialMinions.oldmurkeye && hc.card.race == 14 && m.entitiyID != hc.entity)
{
minionGetBuffed(m, 1, 0, true);
}
}
tempoo.Clear();
tempoo.AddRange(this.enemyMinions);
foreach (Minion m in tempoo)
{
if (m.silenced) continue;
//truebaugederalte
if (m.handcard.card.specialMin == CardDB.specialMinions.murloctidecaller && hc.card.race == 14 && m.entitiyID != hc.entity)
{
minionGetBuffed(m, 1, 0, false);
}
if (m.handcard.card.specialMin == CardDB.specialMinions.oldmurkeye && hc.card.race == 14 && m.entitiyID != hc.entity)
{
minionGetBuffed(m, 1, 0, false);
}
}
}
开发者ID:RyukOP,项目名称:HRCustomClasses,代码行数:81,代码来源:action.cs
示例19: playCardWithTarget
private void playCardWithTarget(Handmanager.Handcard hc, int target, int choice)
{
CardDB.Card c = hc.card;
//play card with target
int attackbuff = 0;
int hpbuff = 0;
int heal = 0;
int damage = 0;
bool spott = false;
bool divineshild = false;
bool windfury = false;
bool silence = false;
bool destroy = false;
bool frozen = false;
bool stealth = false;
bool backtohand = false;
int backtoHandManaChange = 0;
bool charge = false;
bool setHPtoONE = false;
bool immune = false;
int adjacentDamage = 0;
bool sheep = false;
bool frogg = false;
//special
bool geistderahnen = false;
bool ueberwaeltigendemacht = false;
bool own = true;
if (target >= 10 && target < 20)
{
own = false;
}
Minion m = new Minion();
if (target < 10)
{
m = this.ownMinions[target];
}
if (target >= 10 && target < 20)
{
m = this.enemyMinions[target - 10];
}
//warrior###########################################################################
if (c.name == "execute")
{
destroy = true;
}
if (c.name == "innerrage")
{
damage = 1;
attackbuff = 2;
}
if (c.name == "slam")
{
damage = 2;
if (m.Hp >= 3)
{
//this.owncarddraw++;
drawACard("", true);
}
}
if (c.name == "mortalstrike")
{
damage = 4;
if (ownHeroHp <= 12) damage = 6;
}
if (c.name == "shieldslam")
{
damage = this.ownHeroDefence;
}
if (c.name == "charge")
{
charge = true;
attackbuff = 2;
}
if (c.name == "rampage")
{
attackbuff = 3;
hpbuff = 3;
}
//hunter#################################################################################
if (c.name == "huntersmark")
{
setHPtoONE = true;
}
if (c.name == "arcaneshot")
{
damage = 2;
}
if (c.name == "killcommand")
//.........这里部分代码省略.........
开发者ID:RyukOP,项目名称:HRCustomClasses,代码行数:101,代码来源:action.cs
示例20: playCardWithoutTarget
private void playCardWithoutTarget(Handmanager.Handcard hc, int choice)
{
CardDB.Card c = hc.card;
//todo faehrtenlesen!
//play card without target
if (c.name == "thecoin")
{
this.mana++;
}
//hunter#########################################################################
if (c.name == "multi-shot" && this.enemyMinions.Count >= 2)
{
List<Minion> temp = new List<Minion>();
int damage = getSpellDamageDamage(3);
List<Minion> temp2 = new List<Minion>(this.enemyMinions);
temp2.Sort((a, b) => -a.Hp.CompareTo(b.Hp));//damage the strongest
temp.AddRange(Helpfunctions.TakeList(temp2, 2));
foreach (Minion enemy in temp)
{
minionGetDamagedOrHealed(enemy, damage, 0, false);
}
}
if (c.name == "animalcompanion")
{
CardDB.Card c2 = CardDB.Instance.getCardData("misha");
int placeoffather = this.ownMinions.Count - 1;
callKid(c2, placeoffather, true);
}
if (c.name == "flare")
{
foreach (Minion m in this.ownMinions)
{
m.stealth = false;
}
foreach (Minion m in this.enemyMinions)
{
m.stealth = false;
}
//this.owncarddraw++;
drawACard("", true);
this.enemySecretCount = 0;
}
if (c.name == "unleashthehounds")
{
int anz = this.enemyMinions.Count;
int posi = this.ownMinions.Count - 1;
CardDB.Card kid = CardDB.Instance.getCardData("hound");
for (int i = 0; i < anz; i++)
{
callKid(kid, posi, true);
}
}
if (c.name == "deadlyshot" && this.enemyMinions.Count >= 1)
{
List<Minion> temp = new List<Minion>();
List<Minion> temp2 = new List<Minion>(this.enemyMinions);
temp2.Sort((a, b) => a.Angr.CompareTo(b.Angr));
temp.AddRange(Helpfunctions.TakeList(temp2, 1));
foreach (Minion enemy in temp)
{
minionGetDestroyed(enemy, false);
}
}
//warrior#########################################################################
if (c.name == "commandingshout")
{
List<Minion> temp = new List<Minion>(this.ownMinions);
Enchantment e1 = CardDB.getEnchantmentFromCardID("NEW1_036e");
e1.creator = hc.entity;
e1.controllerOfCreator = this.ownController;
Enchantment e2 = CardDB.getEnchantmentFromCardID("NEW1_036e2");
e2.creator = hc.entity;
e2.controllerOfCreator = this.ownController;
foreach (Minion mnn in temp)
{//cantLowerHPbelowONE
addEffectToMinionNoDoubles(mnn, e1, true);
addEffectToMinionNoDoubles(mnn, e2, true);
mnn.cantLowerHPbelowONE = true;
}
}
if (c.name == "battlerage")
{
foreach (Minion mnn in this.ownMinions)
{
if (mnn.wounded)
{
//this.owncarddraw++;
drawACard("", true);
}
}
//.........这里部分代码省略.........
开发者ID:RyukOP,项目名称:HRCustomClasses,代码行数:101,代码来源:action.cs
注:本文中的HREngine.Bots.Handmanager类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论