本文整理汇总了C#中HREngine.Bots.Minion类的典型用法代码示例。如果您正苦于以下问题:C# Minion类的具体用法?C# Minion怎么用?C# Minion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Minion类属于HREngine.Bots命名空间,在下文中一共展示了Minion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getBattlecryEffect
// Battlecry: Deal 4 damage to a random enemy minion.
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
if (p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!own.own, false);
if (choosen != null) p.minionGetDamageOrHeal(choosen, 4);
return;
}
List<Minion> temp = (own.own) ? p.enemyMinions : p.ownMinions;
int times = 4;
if (temp.Count >= 1)
{
//search Minion with lowest hp
Minion enemy = temp[0];
int minhp = 10000;
foreach (Minion m in temp)
{
if (m.Hp >= times + 1 && minhp > m.Hp)
{
enemy = m;
minhp = m.Hp;
}
}
p.minionGetDamageOrHeal(enemy, times);
}
}
示例2: Minion
public Minion(Minion m)
{
this.id = m.id;
this.Posix = m.Posix;
this.Posiy = m.Posiy;
this.Hp = m.Hp;
this.maxHp = m.maxHp;
this.Angr = m.Angr;
this.Ready = m.Ready;
this.taunt = m.taunt;
this.wounded = m.wounded;
this.name = m.name;
this.handcard = m.handcard;
this.divineshild = m.divineshild;
this.windfury = m.windfury;
this.frozen = m.frozen;
this.zonepos = m.zonepos;
this.stealth = m.stealth;
this.immune = m.immune;
this.exhausted = m.exhausted;
this.numAttacksThisTurn = m.numAttacksThisTurn;
this.playedThisTurn = m.playedThisTurn;
this.charge = m.charge;
this.poisonous = m.poisonous;
this.silenced = m.silenced;
this.entitiyID = m.entitiyID;
this.enchantments= new List<Enchantment>(m.enchantments);
this.cantLowerHPbelowONE = m.cantLowerHPbelowONE;
}
示例3: onCardPlay
// verleiht euren dienern bis zu eurem nächsten zug verstohlenheit/.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if (ownplay)
{
foreach (Minion m in p.ownMinions)
{
if (!m.stealth)
{
m.stealth = true;
m.concedal = true;
}
}
}
else
{
foreach (Minion m in p.enemyMinions)
{
if (!m.stealth)
{
m.stealth = true;
m.concedal = true;
}
}
}
}
示例4: getBattlecryEffect
//Battlecry: Restore 4 Health to each hero
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
int heal2 = (own.own) ? p.getMinionHeal(4) : p.getEnemyMinionHeal(4);
p.minionGetDamageOrHeal(own.own ? p.ownHero : p.enemyHero, -heal2);
p.minionGetDamageOrHeal(own.own ? p.enemyHero : p.ownHero, -heal2);
}
示例5: onCardPlay
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if (ownplay)
{
if (p.ownHeroAblility.card.cardIDenum == CardDB.cardIDEnum.CS1h_001) // lesser heal becomes mind spike
{
p.ownHeroAblility.card = mindspike;
p.ownAbilityReady = true;
}
else
{
p.ownHeroAblility.card = shatter; // mindspike becomes mind shatter
p.ownAbilityReady = true;
}
}
else
{
if (p.enemyHeroAblility.card.cardIDenum == CardDB.cardIDEnum.CS1h_001) // lesser heal becomes mind spike
{
p.enemyHeroAblility.card = mindspike;
}
else
{
p.enemyHeroAblility.card = shatter; // mindspike becomes mind shatter
}
}
}
示例6: onTurnEndsTrigger
// zieht am ende eures zuges eine karte.
public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
{
if (turnEndOfOwner == triggerEffectMinion.own)
{
p.drawACard(CardDB.cardName.unknown, turnEndOfOwner);
}
}
示例7: onAuraStarts
// Your hero is Immune.
public override void onAuraStarts(Playfield p, Minion own)
{
if (own.own)
{
p.ownHero.immune = true;
if (p.ownWeaponCard.name == CardDB.cardName.runeblade && p.anzOwnHorsemen < 1)
{
int bonus = (p.ownWeaponCard.cardIDenum == CardDB.cardIDEnum.NAX9_05H) ? 6 : 3;
p.minionGetBuffed(p.ownHero, -1 * Math.Min(bonus, p.ownWeaponAttack - 1), 0);
p.ownWeaponAttack = Math.Min(1, p.ownWeaponAttack - bonus);
}
p.anzOwnHorsemen++;
}
else
{
p.enemyHero.immune = true;
if (p.enemyWeaponCard.name == CardDB.cardName.runeblade && p.anzEnemyHorsemen < 1)
{
int bonus = (p.enemyWeaponCard.cardIDenum == CardDB.cardIDEnum.NAX9_05H) ? 6 : 3;
p.minionGetBuffed(p.enemyHero, -1 * Math.Min(bonus, p.enemyWeaponAttack - 1), 0);
p.enemyWeaponAttack = Math.Min(1, p.enemyWeaponAttack - bonus);
}
p.anzEnemyHorsemen++;
}
}
示例8: onMinionIsSummoned
public override void onMinionIsSummoned(Playfield p, Minion triggerEffectMinion, Minion summonedMinion)
{
if ((TAG_RACE)summonedMinion.handcard.card.race == TAG_RACE.MECHANICAL)
{
List<Minion> temp = (triggerEffectMinion.own) ? p.ownMinions : p.enemyMinions;
foreach (Minion m in temp)
{
//if we have allready a mechanical, we are buffed
if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL) return;
}
//we had no mechanical, but now!
if (triggerEffectMinion.own)
{
p.ownWeaponAttack += 2;
p.minionGetBuffed(p.ownHero, 2, 0);
}
else
{
p.enemyWeaponAttack += 2;
p.minionGetBuffed(p.enemyHero, 2, 0);
}
}
}
示例9: onMinionDiedTrigger
public override void onMinionDiedTrigger(Playfield p, Minion m, Minion diedMinion)
{
int diedMinions = (m.own)? p.tempTrigger.ownMechanicDied : p.tempTrigger.enemyMechanicDied;
if (diedMinions >= 1)
{
List<Minion> temp = (m.own) ? p.ownMinions : p.enemyMinions;
bool hasmechanics = false;
foreach (Minion mTmp in temp) //check if we have more mechanics, or debuff him
{
if (mTmp.Hp >=1 && (TAG_RACE)mTmp.handcard.card.race == TAG_RACE.MECHANICAL) hasmechanics = true;
}
if (!hasmechanics)
{
if(m.own)
{
p.ownWeaponAttack -= 2;
p.minionGetBuffed(p.ownHero, -2, 0);
}
else
{
p.enemyWeaponAttack -= 2;
p.minionGetBuffed(p.enemyHero, -2, 0);
}
}
}
}
示例10: getPlayPenalty
// kampfschrei:/ fügt einem diener 1 schaden zu und verleiht ihm +2 angriff.
public override int getPlayPenalty(Playfield p, Minion m, Minion target, int choice, bool isLethal)
{
if (target.own)
{
if (m.Hp == 1) return 50;
if (!m.Ready)
{
return 50;
}
}
else
{
if (m.handcard.card.type == CardDB.cardtype.MOB && p.ownMinions.Count == 0) return 0;
//allow it if you have biggamehunter
foreach (Handmanager.Handcard hc in p.owncards)
{
if (hc.card.name == CardDB.cardName.biggamehunter || hc.card.name == CardDB.cardName.shadowworddeath) return 0;
}
if (m.Hp == 1)
{
return 0;
}
if (!m.wounded && (m.Angr >= 4 || m.Hp >= 5))
{
foreach (Handmanager.Handcard hc in p.owncards)
{
if (hc.card.name == CardDB.cardName.execute) return 0;
}
}
return base.getValueOfMinion(4,5);
}
return 0;
}
示例11: onCardPlay
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
p.equipWeapon(w, ownplay);
List<Minion> temp = (ownplay) ? p.ownMinions : p.enemyMinions;
bool hasmech = false;
foreach (Minion m in temp)
{
//if we have allready a mechanical, we are buffed
if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL) hasmech=true;
}
if (hasmech)
{
if (ownplay)
{
p.ownWeaponAttack += 2;
p.minionGetBuffed(p.ownHero, 2, 0);
}
else
{
p.enemyWeaponAttack += 2;
p.minionGetBuffed(p.enemyHero, 2, 0);
}
}
}
示例12: onCardPlay
CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_101t);//silverhandrecruit
// Summon two 1/1 Recruits.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int posi = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
p.callKid(kid, posi, ownplay);
p.callKid(kid, posi, ownplay);
}
示例13: onCardPlay
// Hero PowerDeal 8 damage to a random enemy.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = 8;
if (ownplay)
{
if (p.doublepriest >= 1) dmg *= (2 * p.doublepriest);
if (p.enemyMinions.Count > 0)
{
target = p.searchRandomMinion(p.enemyMinions, Playfield.searchmode.searchLowestHP); //damage the lowest (pessimistic variant)
}
else
{
target = p.enemyHero;
}
}
else
{
if (p.enemydoublepriest >= 1) dmg *= (2 * p.enemydoublepriest);
if (p.ownMinions.Count > 0)
{
target = p.searchRandomMinion(p.ownMinions, Playfield.searchmode.searchHighestAttack); //damage the Highest (pessimistic variant)
}
else
{
target = p.ownHero;
}
}
p.minionGetDamageOrHeal(target, dmg);
}
示例14: onCardIsGoingToBePlayed
// erhält jedes Mal +1/+1, wenn Ihr eine Karte mit uberladung< ausspielt.
public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice)
{
if (wasOwnCard == triggerEffectMinion.own && c.Recall)
{
p.minionGetBuffed(triggerEffectMinion, 1, 1);
}
}
示例15: 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;
}