本文整理汇总了C#中HREngine.Bots.Playfield.triggerCardsChanged方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.triggerCardsChanged方法的具体用法?C# Playfield.triggerCardsChanged怎么用?C# Playfield.triggerCardsChanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HREngine.Bots.Playfield
的用法示例。
在下文中一共展示了Playfield.triggerCardsChanged方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onCardPlay
// verursacht $4 schaden. werft eine zufällige karte ab.
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
int dmg = (ownplay) ? p.getSpellDamageDamage(4) : p.getEnemySpellDamageDamage(4);
p.minionGetDamageOrHeal(target, dmg);
if (p.isServer)
{
p.discardRandomCard_SERVER(ownplay);
return;
}
if (ownplay)
{
p.owncarddraw -= Math.Min(1, p.owncards.Count);
p.owncards.RemoveRange(0, Math.Min(1, p.owncards.Count));
p.triggerCardsChanged(true);
}
else
{
if (p.enemyAnzCards >= 1)
{
p.enemycarddraw--;
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
}
}
示例2: getBattlecryEffect
// kampfschrei:/ werft eine zufällige karte ab.
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
if (p.isServer)
{
p.discardRandomCard_SERVER(own.own);
return;
}
if (own.own)
{
p.owncarddraw -= Math.Min(1, p.owncards.Count);
p.owncards.RemoveRange(0, Math.Min(1, p.owncards.Count));
p.triggerCardsChanged(true);
}
else
{
if (p.enemyAnzCards >= 1)
{
p.enemycarddraw--;
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
}
}
示例3: getBattlecryEffect
// ansturm/. kampfschrei:/ werft zwei zufällige karten ab.
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
if (own.own)
{
int anz = Math.Min(2, p.owncards.Count);
p.owncarddraw -= anz;
p.owncards.RemoveRange(0, anz);
if (anz >= 1)
{
p.triggerCardsChanged(true);
}
}
else
{
if (p.enemyAnzCards >= 1)
{
p.enemycarddraw--;
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
if (p.enemyAnzCards >= 1)
{
p.enemycarddraw--;
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
}
}
示例4: getBattlecryEffect
// kampfschrei:/ vernichtet alle anderen diener und werft eure hand ab.
public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice)
{
p.allMinionsGetDestroyed();
if (own.own)
{
p.owncards.Clear();
p.triggerCardsChanged(true);
}
else
{
p.enemycarddraw = 0;
p.enemyAnzCards = 0;
p.triggerCardsChanged(false);
}
}
示例5: doSomeBasicEnemyAi
private void doSomeBasicEnemyAi(Playfield p)
{
if (p.enemyHeroName == HeroEnum.mage)
{
if (Probabilitymaker.Instance.enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_561)) p.ownHero.Hp = Math.Max(5, p.ownHero.Hp - 7);
}
//play some cards (to not overdraw)
if (p.enemyAnzCards >= 8)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
if (p.enemyAnzCards >= 4)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
if (p.enemyAnzCards >= 2)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
//if warrior, equip a weapon
if (p.enemyHeroName == HeroEnum.warrior && p.enemyWeaponDurability == 0 && p.mana >= 4)
{
p.equipWeapon(this.warriorweapon, false);
if (p.ownHero.Hp>=1 && p.ownHero.Hp <= p.ownHero.maxHp - 3) p.ownHero.Hp += 3; //to not change lethal
}
if (p.enemyHeroName == HeroEnum.thief && p.enemyWeaponDurability != 0 && p.mana >= 4)
{
p.enemyWeaponAttack++;
if (p.ownHero.Hp >= 1 && p.ownHero.Hp <= p.ownHero.maxHp - 1) p.ownHero.Hp += 1;//to not change lethal
}
if (p.enemyHeroName == HeroEnum.pala && p.enemyWeaponDurability == 0 && p.mana >= 4)
{
p.equipWeapon(this.warriorweapon, false);//warrion weapon is ok for pala
if (p.ownHero.Hp >= 1 && p.ownHero.Hp <= p.ownHero.maxHp - 3) p.ownHero.Hp += 3;//to not change lethal
}
//int i = 0;
//int count = 0;
bool hasmech=false;
foreach (Minion m in p.enemyMinions)
{
if(m.handcard.card.race == TAG_RACE.MECHANICAL) hasmech=true;
}
foreach (Minion m in p.enemyMinions.ToArray())
{
if (m.silenced)
continue;
switch (m.name)
{
case CardDB.cardName.grimpatron:
if(p.enemyMinions.Count<=6 && p.enemyHeroName == HeroEnum.warrior)
{
bool hascharger = false;
foreach (Minion mini in p.enemyMinions)
{
if (!mini.silenced && mini.name == CardDB.cardName.warsongcommander) hascharger=true;
}
if (!hascharger)
{
p.callKid(warsong, p.enemyMinions.Count, false);
}
}
break;
case CardDB.cardName.fjolalightbane:
if (p.enemyAnzCards >= 2 && p.mana>=2)
{
m.divineshild = true;
p.mana -= 2;
}
break;
case CardDB.cardName.junkbot:
if (hasmech)
{
p.minionGetBuffed(m, 2, 2);
}
break;
case CardDB.cardName.siegeengine:
if (p.enemyHeroName == HeroEnum.warrior)
{
p.minionGetBuffed(m, 1, 0);
}
break;
case CardDB.cardName.gahzrilla:
if (m.Hp >= 2)
{
p.minionGetBuffed(m, m.Angr, 0);
}
break;
//.........这里部分代码省略.........
示例6: onCardPlay
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice)
{
if (p.isServer)
{
List<Handmanager.Handcard> temp = new List<Handmanager.Handcard>();
List<Handmanager.Handcard> cards = p.owncards;
foreach (Handmanager.Handcard hc in cards)
{
if ((TAG_RACE)hc.card.race == TAG_RACE.DEMON)
{
temp.Add(hc);
}
}
if (temp.Count >= 1)
{
int rand = p.getRandomNumber_SERVER(0, temp.Count - 1);
p.callKid(cards[rand].card, p.ownMinions.Count, true);
p.removeCard_SERVER(cards[rand], true);
}
temp.Clear();
cards = p.EnemyCards;
foreach (Handmanager.Handcard hc in cards)
{
if ((TAG_RACE)hc.card.race == TAG_RACE.DEMON)
{
temp.Add(hc);
}
}
if (temp.Count >= 1)
{
int rand = p.getRandomNumber_SERVER(0, temp.Count - 1);
p.callKid(cards[rand].card, p.ownMinions.Count, false);
p.removeCard_SERVER(cards[rand], false);
}
return;
}
Handmanager.Handcard c = null;
int sum = 10000;
foreach (Handmanager.Handcard hc in p.owncards)
{
if (hc.card.type == CardDB.cardtype.MOB)
{
int s = hc.card.Health + hc.card.Attack + ((hc.card.tank) ? 1 : 0) + ((hc.card.Shield) ? 1 : 0);
if (s < sum)
{
c = hc;
sum = s;
}
}
}
if (sum < 9999)
{
p.callKid(c.card, p.ownMinions.Count, true);
p.removeCard(c);
p.triggerCardsChanged(true);
}
if (p.enemyAnzCards >= 2)
{
p.callKid(enemymob, p.enemyMinions.Count, false);
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
}
示例7: doSomeBasicEnemyAi
private void doSomeBasicEnemyAi(Playfield p)
{
if (p.enemyHeroName == HeroEnum.mage)
{
if (sf.Probabilitymaker.enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_561)) p.ownHero.Hp = Math.Max(5, p.ownHero.Hp - 7);
}
//play some cards (to not overdraw)
if (p.enemyAnzCards >= 8)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
if (p.enemyAnzCards >= 4)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
if (p.enemyAnzCards >= 2)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
//int i = 0;
//int count = 0;
foreach (Minion m in p.enemyMinions.ToArray())
{
if (m.silenced) continue;
if (p.enemyAnzCards >= 2 && (m.name == CardDB.cardName.gadgetzanauctioneer || m.name == CardDB.cardName.starvingbuzzard))
{
if (p.enemyDeckSize >= 1)
{
p.drawACard(CardDB.cardName.unknown, false);
}
}
if (m.name == CardDB.cardName.northshirecleric)
{
int anz = 0;
foreach (Minion mnn in p.enemyMinions)
{
if (mnn.wounded) anz++;
}
anz = Math.Min(anz, 3);
for (int i = 0; i < anz; i++)
{
if (p.enemyDeckSize >= 1)
{
p.drawACard(CardDB.cardName.unknown, false);
}
}
}
if (m.name == CardDB.cardName.illidanstormrage && p.enemyAnzCards >= 1)
{
p.callKid(flame, p.enemyMinions.Count, false);
}
if (m.name == CardDB.cardName.questingadventurer && p.enemyAnzCards >= 1)
{
p.minionGetBuffed(m, 1, 1);
if (p.enemyAnzCards >= 3 && p.enemyMaxMana >= 5)
{
p.minionGetBuffed(m, 1, 1);
}
}
if (m.name == CardDB.cardName.manaaddict && p.enemyAnzCards >= 1)
{
p.minionGetTempBuff(m, 2, 0);
if (p.enemyAnzCards >= 3 && p.enemyMaxMana >= 5)
{
p.minionGetTempBuff(m, 2, 0);
}
}
if (m.name == CardDB.cardName.manawyrm && p.enemyAnzCards >= 1)
{
p.minionGetBuffed(m, 1, 0);
if (p.enemyAnzCards >= 3 && p.enemyMaxMana >= 5)
{
p.minionGetBuffed(m, 1, 0);
}
}
if (m.name == CardDB.cardName.secretkeeper && p.enemyAnzCards >= 3)
{
p.minionGetBuffed(m, 1, 1);
}
if (m.name == CardDB.cardName.unboundelemental && p.enemyAnzCards >= 2)
{
p.minionGetBuffed(m, 1, 1);
}
if (m.name == CardDB.cardName.murloctidecaller && p.enemyAnzCards >= 2)
{
p.minionGetBuffed(m, 1, 0);
//.........这里部分代码省略.........
示例8: doSomeBasicEnemyAi
private void doSomeBasicEnemyAi(Playfield p)
{
if (p.enemyHeroName == HeroEnum.mage)
{
if (Probabilitymaker.Instance.enemyCardsPlayed.ContainsKey(CardDB.cardIDEnum.EX1_561)) p.ownHero.Hp = Math.Max(5, p.ownHero.Hp - 7);
}
//play some cards (to not overdraw)
if (p.enemyAnzCards >= 8)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
if (p.enemyAnzCards >= 4)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
if (p.enemyAnzCards >= 2)
{
p.enemyAnzCards--;
p.triggerCardsChanged(false);
}
//if warrior, equip a weapon
if (p.enemyHeroName == HeroEnum.warrior && p.enemyWeaponDurability == 0 && p.mana >= 4)
{
p.equipWeapon(this.warriorweapon, false);
if (p.ownHero.Hp >= 1 && p.ownHero.Hp <= p.ownHero.maxHp - 3) p.ownHero.Hp += 3; //to not change lethal
}
if (p.enemyHeroName == HeroEnum.thief && p.enemyWeaponDurability != 0 && p.mana >= 4)
{
p.enemyWeaponAttack++;
if (p.ownHero.Hp >= 1 && p.ownHero.Hp <= p.ownHero.maxHp - 1) p.ownHero.Hp += 1;//to not change lethal
}
if (p.enemyHeroName == HeroEnum.pala && p.enemyWeaponDurability == 0 && p.mana >= 4)
{
p.equipWeapon(this.warriorweapon, false);//warrion weapon is ok for pala
if (p.ownHero.Hp >= 1 && p.ownHero.Hp <= p.ownHero.maxHp - 3) p.ownHero.Hp += 3;//to not change lethal
}
//int i = 0;
//int count = 0;
bool hasmech = false;
foreach (Minion m in p.enemyMinions)
{
if (m.handcard.card.race == TAG_RACE.MECHANICAL) hasmech = true;
}
foreach (Minion m in p.enemyMinions.ToArray())
{
if (m.silenced)
continue;
switch (m.name)
{
/*case CardDB.cardName.grimpatron:
if (p.enemyMinions.Count <= 6 && p.enemyHeroName == HeroEnum.warrior)
{
bool hascharger = false;
foreach (Minion mini in p.enemyMinions)
{
if (!mini.silenced && mini.name == CardDB.cardName.warsongcommander) hascharger = true;
}
if (!hascharger)
{
p.callKid(warsong, p.enemyMinions.Count, false);
}
}
break;
*/
case CardDB.cardName.fjolalightbane:
if (p.enemyAnzCards >= 2 && p.mana >= 2)
{
m.divineshild = true;
p.mana -= 2;
}
break;
case CardDB.cardName.junkbot:
if (hasmech)
{
p.minionGetBuffed(m, 2, 2);
}
break;
case CardDB.cardName.siegeengine:
if (p.enemyHeroName == HeroEnum.warrior)
{
p.minionGetBuffed(m, 1, 0);
}
break;
case CardDB.cardName.gahzrilla:
if (m.Hp >= 2)
{
p.minionGetBuffed(m, m.Angr, 0);
}
//.........这里部分代码省略.........