本文整理汇总了C#中HREngine.Bots.Playfield.minionGetDestroyed方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.minionGetDestroyed方法的具体用法?C# Playfield.minionGetDestroyed怎么用?C# Playfield.minionGetDestroyed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HREngine.Bots.Playfield
的用法示例。
在下文中一共展示了Playfield.minionGetDestroyed方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getBattlecryEffect
//todo list
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
if (p.isServer)
{
List<Minion> temp22 = (own.own) ? p.enemyMinions : p.ownMinions;
List<Minion> temp23 = new List<Minion>();
foreach (Minion enemy in temp22)
{
if (enemy.Angr <= 2)
{
temp23.Add(enemy);
}
}
Minion choosen = p.getRandomMinionOfThatList(temp23);
if (choosen != null) p.minionGetDestroyed(choosen);
return;
}
List<Minion> temp2 = (own.own) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Hp.CompareTo(b.Hp));//destroys the weakest
foreach (Minion enemy in temp2)
{
if (enemy.Angr <= 2)
{
p.minionGetDestroyed(enemy);
break;
}
}
}
示例2: onCardPlay
//Destroy 2 random enemy minions. Discard 2 random cards.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if (p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
if (choosen != null) p.minionGetDestroyed(choosen);
choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
if (choosen != null) p.minionGetDestroyed(choosen);
p.discardRandomCard_SERVER(ownplay);
p.discardRandomCard_SERVER(ownplay);
return;
}
Minion choosen2 = p.searchRandomMinion(p.enemyMinions, Playfield.searchmode.searchLowestAttack);
if (choosen2 != null) p.minionGetDestroyed(choosen2);
choosen2 = p.searchRandomMinion(p.enemyMinions, Playfield.searchmode.searchLowestAttack);
if (choosen2 != null) p.minionGetDestroyed(choosen2);
p.disCardACard(ownplay);
p.disCardACard(ownplay);
}
示例3: onCardPlay
// Destroy all non-Skeleton minions.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
foreach (Minion m in p.ownMinions)
{
if (m.name != CardDB.cardName.skeleton) p.minionGetDestroyed(m);
}
foreach (Minion m in p.enemyMinions)
{
if (m.name != CardDB.cardName.skeleton) p.minionGetDestroyed(m);
}
}
示例4: onCardPlay
//Destroy all minions with 2 or less Attack.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
foreach (Minion m in p.enemyMinions)
{
if (m.Angr < 3) p.minionGetDestroyed(m);
}
foreach (Minion m in p.ownMinions)
{
if (m.Angr < 3) p.minionGetDestroyed(m);
}
}
示例5: onTurnStartTrigger
public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
{
if(turnStartOfOwner != triggerEffectMinion.own) return;
List<Minion> temp = (turnStartOfOwner) ? p.ownMinions : p.enemyMinions;
int anz =0;
foreach (Minion m in temp)
{
if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL && m.Hp >=1 )
{
anz++;
}
}
if (anz >= 3)
{
foreach (Minion m in temp)
{
if ((TAG_RACE)m.handcard.card.race == TAG_RACE.MECHANICAL)
{
p.minionGetDestroyed(m);
}
}
int pos = (triggerEffectMinion.own) ? p.ownMinions.Count : p.enemyMinions.Count;
p.callKid(kid, pos, triggerEffectMinion.own,false, true); // we allow to summon one minion more (because 3 are destroyed)
}
}
示例6: onCardPlay
//Vernichtet einen Diener. Stellt bei Eurem Helden #3 Leben wieder her.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
p.minionGetDestroyed(target);
int heal = (ownplay) ? p.getSpellHeal(3) : p.getEnemySpellHeal(3);
p.minionGetDamageOrHeal(ownplay ? p.ownHero : p.enemyHero, -heal);
}
示例7: getBattlecryEffect
// If you're holding a Dragon, destroy a Legendary minion.
//todo: if holding a dragon has to be done in carddb!
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
if (target != null && target.handcard.card.rarity >= 5) //requires legendary target
{
p.minionGetDestroyed(target);
}
}
示例8: onTurnEndsTrigger
// ansturm/. vernichtet diesen diener am ende des zuges.
public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
{
if (turnEndOfOwner == triggerEffectMinion.own)
{
p.minionGetDestroyed(triggerEffectMinion);
}
}
示例9: onCardPlay
// vernichtet einen zufälligen feindlichen diener.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if (p.isServer)
{
Minion tempS = p.getRandomMinionFromSide_SERVER(!ownplay, false);
if (tempS != null) p.minionGetDestroyed(tempS);
return;
}
List<Minion> temp2 = (ownplay) ? new List<Minion>(p.enemyMinions) : new List<Minion>(p.ownMinions);
temp2.Sort((a, b) => a.Angr.CompareTo(b.Angr));
foreach (Minion enemy in temp2)
{
p.minionGetDestroyed(enemy);
break;
}
}
示例10: onTurnEndsTrigger
// At the end of each turn, destroy this minion if it's your only one.
public override void onTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner)
{
if (triggerEffectMinion.own)
{
if (p.ownMinions.Count == 1)
{
p.minionGetDestroyed(triggerEffectMinion);
}
}
else
{
if (p.enemyMinions.Count == 1)
{
p.minionGetDestroyed(triggerEffectMinion);
}
}
}
示例11: getBattlecryEffect
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
if (target != null)
{
p.minionGetDestroyed(target);
p.minionGetBuffed(own, 2, 2);
}
}
示例12: onCardPlay
// vernichtet einen diener und bringt ihn dann mit vollem leben wieder auf das schlachtfeld zurück.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
bool own = target.own;
int place = target.zonepos;
CardDB.Card d = target.handcard.card;
p.minionGetDestroyed(target);
p.callKid(d, place, own);
}
示例13: onCardPlay
// Destroy a random enemy minion. Combo: And your opponent's weapon.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if(p.isServer)
{
Minion choosen = p.getRandomMinionFromSide_SERVER(!ownplay, false);
if (choosen != null) p.minionGetDestroyed(choosen);
if (p.cardsPlayedThisTurn >= 1) p.lowerWeaponDurability(1000, !ownplay);
return;
}
List<Minion> temp = (ownplay)? p.enemyMinions : p.ownMinions;
if (temp.Count >= 1)
{
p.minionGetDestroyed(p.searchRandomMinion(temp, Playfield.searchmode.searchLowestHP));
}
if (p.cardsPlayedThisTurn >= 1) p.lowerWeaponDurability(1000, !ownplay);
}
示例14: onCardPlay
// vernichtet einen befreundeten diener und fügt allen feindlichen dienern schaden zu, der seinem angriff entspricht.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int damage1 = (ownplay) ? p.getSpellDamageDamage(target.Angr) : p.getEnemySpellDamageDamage(target.Angr);
p.minionGetDestroyed(target);
p.allMinionOfASideGetDamage(!ownplay, damage1);
}
示例15: onTurnStartTrigger
// vernichtet zu beginn eures zuges diesen diener und zieht 3 karten.
public override void onTurnStartTrigger(Playfield p, Minion triggerEffectMinion, bool turnStartOfOwner)
{
if (turnStartOfOwner == triggerEffectMinion.own)
{
p.minionGetDestroyed(triggerEffectMinion);
p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
p.drawACard(CardDB.cardIDEnum.None, turnStartOfOwner);
}
}