本文整理汇总了C#中HREngine.Bots.Playfield.allMinionsGetDamage方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.allMinionsGetDamage方法的具体用法?C# Playfield.allMinionsGetDamage怎么用?C# Playfield.allMinionsGetDamage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HREngine.Bots.Playfield
的用法示例。
在下文中一共展示了Playfield.allMinionsGetDamage方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: onDeathrattle
//Taunt , Deathrattle: If you're holding a Dragon, deal 3 damage to all minions.
public override void onDeathrattle(Playfield p, Minion m)
{
if (p.isServer)
{
//TODO (others too..)
}
bool hasdragon = false;
if (m.own)
{
foreach (Handmanager.Handcard hc in p.owncards)
{
if (hc.card.race == TAG_RACE.DRAGON) hasdragon = true;
}
}
else
{
hasdragon = true;
}
if (hasdragon)
{
p.allMinionsGetDamage(3);
}
}
示例3: onCardPlay
// Deal $1 damage to all minions. If you have 12 or less Health, deal $3 damage instead.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay) ? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
if (ownplay && p.ownHero.Hp <= 12) dmg = p.getSpellDamageDamage(3);
if (!ownplay && p.enemyHero.Hp <= 12) dmg = p.getSpellDamageDamage(3);
p.allMinionsGetDamage(dmg);
}
示例4: onCardPlay
// Deal 1 damage to all minions. If you have 12 or less Health, deal 3 damage instead.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = 1;
int heroHealth = (ownplay) ? p.ownHero.Hp : p.enemyHero.Hp;
if(heroHealth <= 12) dmg = 3;
dmg = (ownplay) ? p.getSpellDamageDamage(dmg) : p.getEnemySpellDamageDamage(dmg);
p.allMinionsGetDamage(dmg);
}
示例5: onCardPlay
// Deal $1 damage to a random minion. Repeat until a minion dies.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay) ? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
if (p.isServer)
{
bool dodmg = true;
while(dodmg)
{
Minion poortarget = p.getRandomCharExcept_SERVER(null, false);
if (poortarget != null)
{
int hp = poortarget.Hp;
p.minionGetDamageOrHeal(poortarget, dmg);
int hp2 = poortarget.Hp;
if (hp2 <= 0 && hp >= 1)
{
dodmg = false;
}
}
else
{
dodmg = false;
}
}
return;
}
int minHp = 100000;
foreach (Minion m in p.ownMinions)
{
int div = 0;
if (m.divineshild) div = 1;
if (m.Hp + div < minHp) minHp = m.Hp;
}
foreach (Minion m in p.enemyMinions)
{
int div = 0;
if (m.divineshild) div = 1;
if (m.Hp + div < minHp) minHp = m.Hp;
}
int dmgdone = (int)Math.Ceiling((double)minHp / (double)dmg) * dmg;
for (int i = 0; i < dmgdone; i++)
{
p.allMinionsGetDamage(1);
}
}
示例6: onCardPlay
CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.NAX11_03);//Fallout Slime
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay) ? p.getHeroPowerDamage(1) : p.getEnemyHeroPowerDamage(1);
p.allMinionsGetDamage(dmg);
int place = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count;
foreach (Minion m in p.ownMinions)
{
if (m.Hp <= 0) p.callKid(kid, place, ownplay);
}
foreach (Minion m in p.enemyMinions)
{
if (m.Hp <= 0) p.callKid(kid, place, ownplay);
}
}
示例7: onCardPlay
// Deal $1 damage to a random minion. Repeat until a minion dies.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay) ? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
int minHp = 100000;
foreach (Minion m in p.ownMinions)
{
if (m.Hp < minHp) minHp = m.Hp;
}
foreach (Minion m in p.enemyMinions)
{
if (m.Hp < minHp) minHp = m.Hp;
}
int dmgdone = (int)Math.Ceiling((double)minHp / (double)dmg) * dmg;
p.allMinionsGetDamage(dmgdone);
}
示例8: onCardPlay
//Deal $3 damage to all minions.Shuffle this card into your opponent's deck.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay) ? p.getSpellDamageDamage(3) : p.getEnemySpellDamageDamage(3);
p.allMinionsGetDamage(dmg);
if (p.isServer)
{
//TODO
return;
}
if (ownplay)
{
p.enemyDeckSize++;
}
else
{
p.ownDeckSize++;
}
}
示例9: onCardPlay
// fügt allen dienern $1 schaden zu.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay) ? p.getSpellDamageDamage(1) : p.getEnemySpellDamageDamage(1);
p.allMinionsGetDamage(dmg);
}
示例10: onDeathrattle
public override void onDeathrattle(Playfield p, Minion m)
{
p.allMinionsGetDamage(1);
}
示例11: onCardPlay
// stellt bei allen dienern #4 leben wieder her.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int heal = (ownplay) ? p.getSpellHeal(4) : p.getEnemySpellHeal(4);
p.allMinionsGetDamage(-heal);
}
示例12: onCardIsGoingToBePlayed
// After you cast a spell, deal 1 damage to ALL minions.
public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool ownplay, Minion m)
{
if (m.own == ownplay && c.type == CardDB.cardtype.SPELL) p.allMinionsGetDamage(1);
}