本文整理汇总了C#中HREngine.Bots.Playfield.minionGetDamageOrHeal方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.minionGetDamageOrHeal方法的具体用法?C# Playfield.minionGetDamageOrHeal怎么用?C# Playfield.minionGetDamageOrHeal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HREngine.Bots.Playfield
的用法示例。
在下文中一共展示了Playfield.minionGetDamageOrHeal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onCardPlay
// Deal $4 damage to a random enemy minion.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if (p.isServer)
{
int dmg = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
Minion poortarget = p.getRandomMinionFromSide_SERVER(!ownplay, false);
if (poortarget != null) p.minionGetDamageOrHeal(poortarget, dmg);
return;
}
// optimistic
List<Minion> temp = (ownplay) ? p.enemyMinions : p.ownMinions;
int times = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(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: onCardPlay
// Deal $4-$5 damage to all minions. Overload: (5)
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if (ownplay) { p.owedRecall += 5; } else { p.enemyRecall += 5; };
if (p.isServer)
{
foreach (Minion m in p.ownMinions)
{
int dmgr = p.getRandomNumber_SERVER(4, 5);
dmgr = (ownplay) ? p.getSpellDamageDamage(dmgr) : p.getEnemySpellDamageDamage(dmgr);
p.minionGetDamageOrHeal(m, dmgr);
}
foreach (Minion m in p.enemyMinions)
{
int dmgr = p.getRandomNumber_SERVER(4, 5);
dmgr = (ownplay) ? p.getSpellDamageDamage(dmgr) : p.getEnemySpellDamageDamage(dmgr);
p.minionGetDamageOrHeal(m, dmgr);
}
return;
}
int dmg = (ownplay) ? p.getSpellDamageDamage(5) : p.getEnemySpellDamageDamage(5);
p.allMinionsGetDamage(dmg);
}
示例3: 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);
}
示例4: onCardPlay
// Hero Power: Deal 8 damage to a random enemy. TWICE.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = 8;
if (ownplay)
{
dmg += p.anzOwnFallenHeros;
if (p.doublepriest >= 1) dmg *= (2 * p.doublepriest);
}
else
{
dmg += p.anzEnemyFallenHeros;
if (p.enemydoublepriest >= 1) dmg *= (2 * p.enemydoublepriest);
}
if (p.isServer)
{
Minion poortarget = p.getRandomMinionFromSide_SERVER(!ownplay, true);
if (poortarget != null) p.minionGetDamageOrHeal(poortarget, dmg);
return;
}
int count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, dmg);
break;
}
}
else
{
p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, dmg);
}
p.doDmgTriggers();
count = (ownplay) ? p.enemyMinions.Count : p.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, dmg);
break;
}
}
else
{
p.minionGetDamageOrHeal(ownplay ? p.enemyHero : p.ownHero, dmg);
}
}
示例5: 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);
}
}
示例6: onTurnStartTrigger
// <deDE>Stellt zu Beginn Eures Zuges bei einem verletzten befreundeten Charakter 3 Leben wieder her.</deDE>
public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
{
if (turnStartOfOwner == triggerEffectMinion.own)
{
int heal = (turnStartOfOwner) ? p.getMinionHeal(3) : p.getEnemyMinionHeal(3);
List<Minion> temp = (turnStartOfOwner) ? p.ownMinions : p.enemyMinions;
if (temp.Count >= 1)
{
bool healed = false;
foreach (Minion mins in temp)
{
if (mins.wounded)
{
p.minionGetDamageOrHeal(mins, -heal);
healed = true;
break;
}
}
if (!healed)
{
if (turnStartOfOwner) p.minionGetDamageOrHeal(p.ownHero, -heal);
else p.minionGetDamageOrHeal(p.enemyHero, -heal);
}
}
else
{
if (turnStartOfOwner) p.minionGetDamageOrHeal(p.ownHero, -heal);
else p.minionGetDamageOrHeal(p.enemyHero, -heal);
}
}
}
示例7: onCardPlay
// heldenfähigkeit/\nzieht eine karte und erleidet 2 schaden.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
bool reduceToZero = false;
if(ownplay && p.anzOwnFizzlebang >=1)
{
reduceToZero=true;
}
if(!ownplay && p.anzEnemyFizzlebang>=1)
{
reduceToZero=true;
}
p.drawACard(CardDB.cardIDEnum.None, ownplay, false, reduceToZero);
int dmg = 2;
if (ownplay)
{
dmg += p.anzOwnFallenHeros;
if (p.doublepriest >= 1) dmg *= (2 * p.doublepriest);
p.minionGetDamageOrHeal(p.ownHero, dmg);
}
else
{
dmg += p.anzEnemyFallenHeros;
if (p.enemydoublepriest >= 1) dmg *= (2 * p.enemydoublepriest);
p.minionGetDamageOrHeal(p.enemyHero, dmg);
}
}
示例8: onTurnEndsTrigger
// kann nicht angreifen. fügt am ende eures zuges einem zufälligen feind 8 schaden zu.
public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
{
if (p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!triggerEffectMinion.own, true);
if (choosen != null) p.minionGetDamageOrHeal(choosen, 8);
return;
}
if (triggerEffectMinion.own == turnEndOfOwner)
{
int count = (turnEndOfOwner) ? p.enemyMinions.Count : p.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (turnEndOfOwner) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//damage the lowest
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, 8);
break;
}
}
else
{
p.minionGetDamageOrHeal(turnEndOfOwner ? p.enemyHero : p.ownHero, 8);
}
triggerEffectMinion.stealth = false;
}
}
示例9: getBattlecryEffect
//todo make it better
// kampfschrei:/ verursacht 3 schaden, der zufällig auf alle anderen charaktere aufgeteilt wird.
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
int anz = 3;
for (int i = 0; i < anz; i++)
{
if (p.ownHero.Hp <= anz)
{
p.minionGetDamageOrHeal(p.ownHero, 1);
continue;
}
List<Minion> temp = new List<Minion>(p.enemyMinions);
if (temp.Count == 0)
{
temp.AddRange(p.ownMinions);
}
temp.Sort((a, b) => a.Hp.CompareTo(b.Hp));//destroys the weakest
foreach (Minion m in temp)
{
p.minionGetDamageOrHeal(m, 1);
break;
}
p.minionGetDamageOrHeal(p.enemyHero, 1);
}
}
示例10: onTurnEndsTrigger
// kann nicht angreifen. fügt am ende eures zuges einem zufälligen feind 8 schaden zu.
public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
{
if (triggerEffectMinion.own == turnEndOfOwner)
{
int count = (turnEndOfOwner) ? p.enemyMinions.Count : p.ownMinions.Count;
if (count >= 1)
{
List<Minion> temp2 = (turnEndOfOwner) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => -a.Hp.CompareTo(b.Hp));//damage the stronges
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, 8);
break;
}
}
else
{
if (turnEndOfOwner)
{
p.minionGetDamageOrHeal(p.enemyHero, 8);
}
else
{
p.minionGetDamageOrHeal(p.ownHero, 8);
}
}
triggerEffectMinion.stealth = false;
}
}
示例11: onCardPlay
// fügt zwei zufälligen feindlichen dienern $2 schaden zu.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if (p.isServer)
{
int damageS = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);
List<Minion> temp22 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
if (temp22.Count < 2) return;
int random1 = p.getRandomNumber_SERVER(0, temp22.Count - 1);
int random2 = p.getRandomNumber_SERVER(0, temp22.Count - 2);
if (random2 >= random1) random2++;
p.minionGetDamageOrHeal(temp22[random1], damageS);
p.minionGetDamageOrHeal(temp22[random2], damageS);
return;
}
//TODO delete new list
int damage = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2);
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions) ;
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));
int i = 0;
foreach (Minion enemy in temp2)
{
p.minionGetDamageOrHeal(enemy, damage);
i++;
if (i == 2) break;
}
}
示例12: onCardPlay
// fügt einem feind $4 schaden und allen anderen feinden $1 schaden zu.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay)? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
int dmg1 = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
List<Minion> temp = (ownplay) ? p.enemyMinions : p.ownMinions;
p.minionGetDamageOrHeal(target, dmg1);
foreach (Minion m in temp)
{
if (m.entitiyID != target.entitiyID)
{
p.minionGetDamageOrHeal(m, dmg);
}
}
if (ownplay)
{
if (p.enemyHero.entitiyID != target.entitiyID)
{
p.minionGetDamageOrHeal(p.enemyHero, dmg);
}
}
else
{
if (p.ownHero.entitiyID != target.entitiyID)
{
p.minionGetDamageOrHeal(p.ownHero, dmg);
}
}
}
示例13: onTurnStartTrigger
// fügt zu beginn eures zuges einem zufälligen feind 2 schaden zu.
public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
{
if (triggerEffectMinion.own == turnStartOfOwner)
{
if (p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!triggerEffectMinion.own, true);
if (choosen != null) p.minionGetDamageOrHeal( choosen, 2);
return;
}
List<Minion> temp2 = (turnStartOfOwner) ? p.enemyMinions : p.ownMinions;
bool dmgdone = false;
foreach (Minion mins in temp2)
{
p.minionGetDamageOrHeal(mins, 2);
dmgdone = true;
break;
}
if (!dmgdone)
{
p.minionGetDamageOrHeal(turnStartOfOwner ? p.enemyHero : p.ownHero, 2);
};
}
}
示例14: onTurnEndsTrigger
// stellt am ende eures zuges bei einem verletzten charakter 6 leben wieder her.
public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
{
if (turnEndOfOwner == triggerEffectMinion.own)
{
Minion tm = null;
int hl = (triggerEffectMinion.own) ? p.getMinionHeal(6) : p.getEnemyMinionHeal(6);
int heal = 0;
foreach (Minion m in p.ownMinions)
{
if (m.maxHp - m.Hp > heal)
{
tm = m;
heal = m.maxHp - m.Hp;
}
}
foreach (Minion m in p.enemyMinions)
{
if (m.maxHp - m.Hp > heal)
{
tm = m;
heal = m.maxHp - m.Hp;
}
}
if (heal >= 1)
{
p.minionGetDamageOrHeal(tm, -hl);
}
else
{
p.minionGetDamageOrHeal(p.ownHero.Hp < 30 ? p.ownHero : p.enemyHero, -hl);
}
}
}
示例15: getBattlecryEffect
// Battlecry:</b> Shuffle a Mine into your opponent's deck. When drawn, it explodes for 10 damage.
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
if (own.own)
{
p.enemyDeckSize++;
if (p.enemyDeckSize <= 6)
{
p.minionGetDamageOrHeal(p.enemyHero, Math.Min(10, p.enemyHero.Hp-1), true);
p.evaluatePenality -= 6;
}
else
{
if (p.enemyDeckSize <= 16)
{
p.minionGetDamageOrHeal(p.enemyHero, Math.Min(5, p.enemyHero.Hp - 1), true);
p.evaluatePenality -= 8;
}
else
{
if (p.enemyDeckSize <= 26)
{
p.minionGetDamageOrHeal(p.enemyHero, Math.Min(2, p.enemyHero.Hp - 1), true);
p.evaluatePenality -= 10;
}
}
}
}
else
{
p.ownDeckSize++;
}
}