//Whenever your spells deal damage, restore that much Health to your hero. public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice) { if (triggerEffectMinion.own == wasOwnCard && c.type == CardDB.cardtype.SPELL) { //Minion target2 = (wasOwnCard) ? p.ownHero : p.enemyHero; //int spellpower = (wasOwnCard) ? p.spellpower : p.enemyspellpower; //p.minionGetDamageOrHeal(target2, spellpower); Minion target2 = (wasOwnCard) ? p.ownHero : p.enemyHero; p.minionGetDamageOrHeal(target2, -p.penman.guessTotalSpellDamage(p, c.name, wasOwnCard)); } }
// ruft am ende jedes zuges alle befreundeten diener herbei, die in diesem zug gestorben sind. public override void OnTurnEndsTrigger(Playfield p, Minion triggerEffectMinion, bool turnEndOfOwner) { foreach (GraveYardItem m in p.diedMinions.ToArray()) // toArray() because a knifejuggler could kill a minion due to the summon :D { if (triggerEffectMinion.own == m.own) { CardDB.Card card = CardDB.Instance.getCardDataFromID(m.cardid); p.callKid(card, p.ownMinions.Count, m.own); } } }
// 复活四个不同的友方随从. public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) { if (p.ownMaxMana >= 3) { int posi = ownplay ? p.ownMinions.Count : p.enemyMinions.Count; CardDB.Card kid = CardDB.Instance.getCardDataFromID((p.OwnLastDiedMinion == CardDB.cardIDEnum.None) ? CardDB.cardIDEnum.EX1_345t : p.OwnLastDiedMinion); // Shadow of Nothing 0:1 or ownMinion p.callKid(kid, posi, ownplay, false); p.callKid(kid, posi, ownplay, false); p.callKid(kid, posi, ownplay, false); p.callKid(kid, posi, ownplay, false); } }
/// <summary> /// Summon a 1/1 Wisp for each card in your hand. /// 你每有一张手牌,便召唤一个1/1的小精灵。 /// </summary> /// <param name="p"></param> /// <param name="own"></param> /// <param name="target"></param> /// <param name="choice"></param> public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) { CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.CS2_231); //小精灵 int posi = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count; int wispNum = Math.Min(7 - posi, (ownplay) ? p.owncards.Count : p.enemyAnzCards); for (int i = 0; i < wispNum; i++) { p.CallKid(kid, posi, ownplay); posi++; } }
public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) { foreach (GraveYardItem gyi in p.diedMinions.ToArray()) // toArray() because a knifejuggler could kill a minion due to the summon :D { if (gyi.own == ownplay) { CardDB.Card card = CardDB.Instance.getCardDataFromID(gyi.cardid); int pos = ownplay ? p.ownMinions.Count : p.enemyMinions.Count; p.CallKid(card, p.ownMinions.Count, gyi.own); } } }
/// <summary> /// Summon seven 1/1 Locusts with Rush. /// 召唤七只1/1并具有突袭的蝗虫。 /// </summary> /// <param name="p"></param> /// <param name="ownplay"></param> /// <param name="target"></param> /// <param name="choice"></param> public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) { CardDB.Card locust = CardDB.Instance.getCardDataFromID(CardIdEnum.ULD_430t); if (ownplay) { for (int i = 0; i < 7; i++) { int pos = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count; p.CallKid(locust, pos, ownplay); } } }
public Handcard(Handcard hc) { this.position = hc.position; this.entity = hc.entity; this.manacost = hc.manacost; this.card = hc.card; this.addattack = hc.addattack; this.addHp = hc.addHp; this.isChoiceTemp = hc.isChoiceTemp; this.elemPoweredUp = hc.elemPoweredUp; this.powerup = hc.powerup; }
public void updateHero(Weapon w, string heron, CardDB.Card ability, bool abrdy, int abCost, Minion hero, int enMaxMana = 10) { if (w.name == CardDB.cardName.foolsbane) { w.cantAttackHeroes = true; } if (hero.own) { this.ownWeapon = new Weapon(w); this.ownHero = new Minion(hero); this.heroname = this.heroNametoEnum(heron); this.heronameingame = heron; if (this.ownHeroStartClass == TAG_CLASS.INVALID) { this.ownHeroStartClass = hero.cardClass; } this.ownHero.poisonous = this.ownWeapon.poisonous; this.ownHero.lifesteal = this.ownWeapon.lifesteal; if (this.ownWeapon.name == CardDB.cardName.gladiatorslongbow) { this.ownHero.immuneWhileAttacking = true; } this.heroAbility = ability; this.ownHeroPowerCost = abCost; this.ownAbilityisReady = abrdy; } else { this.enemyWeapon = new Weapon(w); this.enemyHero = new Minion(hero);; this.enemyHeroname = this.heroNametoEnum(heron); this.enemyHeronameingame = heron; if (this.enemyHeroStartClass == TAG_CLASS.INVALID) { this.enemyHeroStartClass = enemyHero.cardClass; } this.enemyHero.poisonous = this.enemyWeapon.poisonous; this.enemyHero.lifesteal = this.enemyWeapon.lifesteal; if (this.enemyWeapon.name == CardDB.cardName.gladiatorslongbow) { this.enemyHero.immuneWhileAttacking = true; } this.enemyAbility = ability; this.enemyHeroPowerCost = abCost; this.enemyMaxMana = enMaxMana; } }
/// <summary> /// Battlecry: Summon a random friendly minion that died this game. Give it Reborn. /// 战吼:随机召唤一个在本局对战中死亡的友方随从。使其获得复生。 /// </summary> /// <param name="p"></param> /// <param name="own"></param> /// <param name="target"></param> /// <param name="choice"></param> public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice) { if (own.own) { if (p.OwnLastDiedMinion != CardDB.cardIDEnum.None) { CardDB.Card kid = CardDB.Instance.getCardDataFromID(p.OwnLastDiedMinion); kid.Reborn = true; p.CallKid(kid, own.zonepos, own.own); } } }
public override void onCardWasPlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion) { if (wasOwnCard == triggerEffectMinion.own) { int murlocEnumValue = (int)TAG_RACE.MURLOC; if (triggerEffectMinion.handcard.card.race == murlocEnumValue) { //Bluegill Warrior 蓝腮战士 p.drawACard(CardIdEnum.CS2_173, wasOwnCard, true); } } }
//Deal $2 damage. Summon a 0/2 Goblin Bomb. //造成$2点伤害。召唤一个0/2的地精炸弹。 public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) { CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.BOT_031); int dmg = (ownplay) ? p.getSpellDamageDamage(2) : p.getEnemySpellDamageDamage(2); p.minionGetDamageOrHeal(target, dmg); int pos = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count; p.callKid(kid, pos, ownplay); }
//[x]<b>Battlecry:</b> If you controla <b>Secret</b>, summon two2/2 Hyenas. //<b>战吼:</b>如果你控制一个<b>奥秘</b>,便召唤两只2/2的土狼。 public override void getBattlecryEffect(Playfield p, Minion own, Minion target, int choice) { CardDB.Card hyena = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.ULD_154t); int secretNum = (own.own) ? p.ownSecretsIDList.Count : p.enemySecretCount; if (secretNum > 0) { p.callKid(hyena, own.zonepos - 1, own.own); p.callKid(hyena, own.zonepos, own.own); } }
public Handcard(Handcard hc) { this.position = hc.position; this.entity = hc.entity; this.manacost = hc.manacost; this.card = hc.card; this.addattack = hc.addattack; this.addHp = hc.addHp; this.elemPoweredUp = hc.elemPoweredUp; this.discardOnOwnTurnEnd = hc.discardOnOwnTurnEnd; this.valanyr = hc.valanyr; }
// Deathrattle:</b> Shuffle this minion into your deck. public override void onDeathrattle(Playfield p, Minion m) { if (m.own) { CardDB.Card card = CardDB.Instance.getDeckCardData(CardDB.cardName.malorne); p.homeDeck.Add(card); } else { CardDB.Card card = CardDB.Instance.getDeckCardData(CardDB.cardName.malorne); p.awayDeck.Add(card); } }
//<b>Deathrattle:</b> Shuffle two 1/1 Albatross into your opponent's deck. //<b>亡语:</b>将两张1/1的信天翁洗入你对手的牌库。 public override void onDeathrattle(Playfield p, Minion m) { CardDB.Card scarab = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.DRG_071t);//信天翁sim if (m.own) { p.enemyDeckSize = p.enemyDeckSize + 2; } else { p.ownDeckSize = p.ownDeckSize + 2; } }
public void updateEnemyHero(string weapon, int weaponAttack, int weaponDurability, string heron, int enemMaxMana, CardDB.Card eab, Minion enemyHero) { this.enemyHeroWeapon = CardDB.Instance.cardNamestringToEnum(weapon); this.enemyWeaponAttack = weaponAttack; this.enemyWeaponDurability = weaponDurability; this.enemyMaxMana = enemMaxMana; this.enemyHeroname = this.heroNametoEnum(heron); this.enemyAbility = eab; this.enemyHero = new Minion(enemyHero); }
//Battlecry: Your Hero Power becomes 'Summon a 1/1 Murloc.' public override void GetBattlecryEffect(Playfield p, Minion own, Minion target, int choice) { CardDB.Card hewHeroPower = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.OG_006b); //The Tidal Hand if (own.own) { p.ownHeroAblility.card = hewHeroPower; p.ownAbilityReady = true; } else { p.enemyHeroAblility.card = hewHeroPower; p.enemyAbilityReady = true; } }
CardDB.Card kid = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.UNG_999t2t1); //Plant public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target, int choice) { if (target != null && target.own == wasOwnCard && triggerEffectMinion.own == wasOwnCard && target.entityID == triggerEffectMinion.entityID && c.type == CardDB.cardtype.SPELL) { int zonepos = triggerEffectMinion.zonepos; p.callKid(kid, zonepos, true); if (p.ownMinions[zonepos].name == CardDB.cardName.plant) { c.sim_card.onCardPlay(p, wasOwnCard, p.ownMinions[zonepos], choice); p.doDmgTriggers(); } } }
public void updateEnemyHero(string weapon, int watt, int wdur, int heroatt, int herohp, int herodef, string heron, bool frozen, CardDB.Card eab, bool ehisim, int enemMM) { this.enemyHeroWeapon = CardDB.Instance.cardNamestringToEnum(weapon); this.enemyWeaponAttack = watt; this.enemyWeaponDurability = wdur; this.enemyAtk = heroatt; this.enemyHp = herohp; this.enemyHeroname = this.heroNametoEnum(heron); this.enemyDefence = herodef; this.enemyfrozen = frozen; this.enemyAbility = eab; this.enemyHeroImmune = ehisim; this.enemyMaxMana = enemMM; }
public override void onDeathrattle(Playfield p, Minion m) { CardDB.Card hewHeroPower = CardDB.Instance.getCardDataFromID(CardDB.cardIDEnum.BRM_027p); //DIE, INSECT! if (m.own) { p.ownHeroAblility.card = hewHeroPower; p.ownAbilityReady = true; } else { p.enemyHeroAblility.card = hewHeroPower; p.enemyAbilityReady = true; } }
//Whenever you target this minion with a spell, deal 3 damage to a random enemy. public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target) { if (triggerEffectMinion.own == wasOwnCard && c.type == CardDB.cardtype.SPELL && target!=null && target.entitiyID == triggerEffectMinion.entitiyID) { if (p.isServer) { Minion choosen = p.getRandomMinionFromSide_SERVER(!triggerEffectMinion.own, true); if (choosen != null) p.minionGetDamageOrHeal(choosen, 3); return; } p.doDmgToRandomEnemyCLIENT(3, true, !triggerEffectMinion.own); } }
public void updateOwnHero(string weapon, int watt, int wdur, string heron, CardDB.Card hab, bool habrdy, Minion Hero) { this.ownHeroWeapon = CardDB.Instance.cardNamestringToEnum(weapon); this.heroWeaponAttack = watt; this.heroWeaponDurability = wdur; this.heroname = this.heroNametoEnum(heron); this.heroAbility = hab; this.ownAbilityisReady = habrdy; this.ownHero = new Minion(Hero); this.ownHero.updateReadyness(); }
private Minion createNewMinion(CardDB.Card c, int id) { Minion m = new Minion(); m.card = c; m.id = id; m.zonepos = id + 1; m.entitiyID = c.entityID; m.Posix = 0; m.Posiy = 0; m.Angr = c.Attack; m.Hp = c.Health; m.maxHp = c.Health; m.name = c.name; m.playedThisTurn = true; m.numAttacksThisTurn = 0; if (c.windfury) { m.windfury = true; } if (c.tank) { m.taunt = true; } if (c.Charge) { m.Ready = true; m.charge = true; } if (c.poisionous) { m.poisonous = true; } if (c.Stealth) { m.stealth = true; } if (m.name == "lichtbrut" && !m.silenced) { m.Angr = m.Hp; } return(m); }
/// <summary> /// Choose One - Summon a 6/6 Ancient with Taunt; or Restore 12 Health. /// 抉择:召唤一棵6/6并具有嘲讽的古树;或恢复12点生命值。 /// </summary> /// <param name="p"></param> /// <param name="ownplay"></param> /// <param name="target"></param> /// <param name="choice"></param> public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) { CardDB.Card ancient = CardDB.Instance.getCardDataFromID(CardIdEnum.ULD_135at); if (choice == 1 || (p.ownFandralStaghelm > 0 && ownplay)) { int pos = (ownplay) ? p.ownMinions.Count : p.enemyMinions.Count; p.CallKid(ancient, pos, ownplay, false); } if (choice == 2 || (target != null && p.ownFandralStaghelm > 0 && ownplay)) { int heal = (ownplay) ? p.getSpellHeal(12) : p.getEnemySpellHeal(12); p.minionGetDamageOrHeal(target, -heal); } }
public ChooseSetDialog(CardDB.Card card, SetSelected onSelect) { this.card = card; this.onSetSelected = onSelect; this.InitializeComponent(); this.CardSets = this.card.CardSets; this.CardName = this.card.Name; this.SelectedSet = this.card.CardSets[0]; this.DataContext = this; this.PrimaryButtonText = "OK"; this.SecondaryButtonText = "Cancel"; }
// Whenever your opponent plays a card, discard the top 3 cards of your deck. public override void onCardIsGoingToBePlayed(Playfield p, CardDB.Card c, bool wasOwnCard, Minion triggerEffectMinion, Minion target) { if (wasOwnCard == triggerEffectMinion.own) { return; //owner of card = owner of minion -> no effect } if (triggerEffectMinion.own) { p.ownDeckSize = Math.Max(0, p.ownDeckSize - 3); } else { p.enemyDeckSize = Math.Max(0, p.enemyDeckSize - 3); } }
private void getHandcards() { handCards.Clear(); anzcards = 0; enemyAnzCards = 0; List <HSCard> list = TritonHs.GetCards(CardZone.Hand); List <HSCard> list2 = TritonHs.GetCards(CardZone.Graveyard); //List<HRCard> list = HRCard.GetCards(HRPlayer.GetLocalPlayer(), HRCardZone.HAND); foreach (HSCard entitiy in list) { if (entitiy.ZonePosition >= 1) // own handcard { CardDB.Card c = CardDB.Instance.getCardDataFromID(CardDB.Instance.cardIdstringToEnum(entitiy.Id)); //c.cost = entitiy.GetCost(); //c.entityID = entitiy.GetEntityId(); var hc = new Handmanager.Handcard(); hc.card = c; hc.position = entitiy.ZonePosition; hc.entity = entitiy.EntityId; hc.manacost = entitiy.Cost; hc.addattack = 0; if (c.name == CardDB.cardName.bolvarfordragon) { hc.addattack = entitiy.GetTag(GAME_TAG.ATK) - 1; // -1 because it starts with 1, we count only the additional attackvalue } handCards.Add(hc); anzcards++; } } List <HSCard> allcards = TritonHs.GetAllCards(); enemyAnzCards = 0; foreach (HSCard hs in allcards) { if (hs.GetTag(GAME_TAG.ZONE) == 3 && hs.ControllerId != ownPlayerController && hs.GetTag(GAME_TAG.ZONE_POSITION) >= 1) { enemyAnzCards++; } } // dont know if you can count the enemys-handcars in this way :D }
public void equip(CardDB.Card c) { this.name = c.name; this.card = c; this.numAttacksThisTurn = 0; this.immuneWhileAttacking = c.immuneWhileAttacking; this.Attack = c.Attack; this.Durability = c.Durability; this.windfury = c.windfury; this.immune = false; this.lifesteal = c.lifesteal; this.poisonous = c.poisonous; this.cantAttackHeroes = (c.name == CardDB.cardName.foolsbane) ? true : false; }
public Weapon(Weapon w) { this.name = w.name; this.card = w.card; this.numAttacksThisTurn = w.numAttacksThisTurn; this.immuneWhileAttacking = w.immuneWhileAttacking; this.Attack = w.Attack; this.Durability = w.Durability; this.windfury = w.windfury; this.immune = w.immune; this.lifesteal = w.lifesteal; this.poisonous = w.poisonous; this.cantAttackHeroes = w.cantAttackHeroes; }
public void updateOwnHero(string weapon, int watt, int wdur, bool heroimune, int heroatt, int herohp, int herodef, string heron, bool heroready, bool alreadyatt, bool frozen, CardDB.Card hab, bool habrdy) { this.ownHeroWeapon = weapon; this.heroWeaponAttack = watt; this.heroWeaponDurability = wdur; this.heroImmuneToDamageWhileAttacking = heroimune; this.heroAtk = heroatt; this.heroHp = herohp; this.heroDefence = herodef; this.heroname = heron; this.ownheroisread = heroready; this.ownheroAlreadyAttacked = alreadyatt; this.herofrozen = frozen; this.heroAbility = hab; this.ownAbilityisReady = habrdy; }