From 40a4c7587563aa67b42ac007619ef0015fdf3afd Mon Sep 17 00:00:00 2001 From: jianjam Date: Tue, 17 Sep 2019 23:32:05 +0800 Subject: [PATCH] add ULD hero power. --- .../Chuck.SilverFish/ai/Hrtprozis.cs | 4 +- .../Chuck.SilverFish/ai/Playfield.cs | 2 +- .../cards/04Expansion/012ULD/Sim_ULD_140p.cs | 28 +++++++++++++ .../cards/04Expansion/012ULD/Sim_ULD_155p.cs | 28 +++++++++++++ .../cards/04Expansion/012ULD/Sim_ULD_326t.cs | 25 ++++++++++++ .../cards/04Expansion/012ULD/Sim_ULD_431p.cs | 32 +++++++++++++++ .../cards/04Expansion/012ULD/Sim_ULD_433p.cs | 26 ++++++++++++ .../cards/04Expansion/012ULD/Sim_ULD_724p.cs | 40 +++++++++++++++++++ 8 files changed, 182 insertions(+), 3 deletions(-) create mode 100644 DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_140p.cs create mode 100644 DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_155p.cs create mode 100644 DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_326t.cs create mode 100644 DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_431p.cs create mode 100644 DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_433p.cs create mode 100644 DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_724p.cs diff --git a/DefaultRoutine/Chuck.SilverFish/ai/Hrtprozis.cs b/DefaultRoutine/Chuck.SilverFish/ai/Hrtprozis.cs index 9e01287b..e3fe8bce 100644 --- a/DefaultRoutine/Chuck.SilverFish/ai/Hrtprozis.cs +++ b/DefaultRoutine/Chuck.SilverFish/ai/Hrtprozis.cs @@ -467,7 +467,7 @@ public void updateHero(Weapon w, string heron, CardDB.Card ability, bool abrdy, 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 == CardName.gladiatorslongbow) this.ownHero.immuneWhileAttacking = true; + if (this.ownWeapon.name == CardName.gladiatorslongbow || this.ownWeapon.name == CardName.mirageblade) this.ownHero.immuneWhileAttacking = true; this.heroAbility = ability; this.OwnHeroPowerCost = abCost; @@ -483,7 +483,7 @@ public void updateHero(Weapon w, string heron, CardDB.Card ability, bool abrdy, 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 == CardName.gladiatorslongbow) this.enemyHero.immuneWhileAttacking = true; + if (this.enemyWeapon.name == CardName.gladiatorslongbow || this.ownWeapon.name == CardName.mirageblade) this.enemyHero.immuneWhileAttacking = true; this.enemyAbility = ability; this.enemyHeroPowerCost = abCost; diff --git a/DefaultRoutine/Chuck.SilverFish/ai/Playfield.cs b/DefaultRoutine/Chuck.SilverFish/ai/Playfield.cs index fa0402fa..6735b34a 100644 --- a/DefaultRoutine/Chuck.SilverFish/ai/Playfield.cs +++ b/DefaultRoutine/Chuck.SilverFish/ai/Playfield.cs @@ -5912,7 +5912,7 @@ public void equipWeapon(CardDB.Card c, bool own) hero.Attack += c.Attack; hero.windfury = c.windfury; hero.UpdateReadiness(); - hero.immuneWhileAttacking = (c.name == CardName.gladiatorslongbow); + hero.immuneWhileAttacking = (c.name == CardName.gladiatorslongbow) || (c.name == CardName.mirageblade); List temp = (own) ? this.ownMinions : this.enemyMinions; foreach (Minion m in temp) diff --git a/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_140p.cs b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_140p.cs new file mode 100644 index 00000000..115996ca --- /dev/null +++ b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_140p.cs @@ -0,0 +1,28 @@ +using SilverFish.Enums; + +namespace Chuck.SilverFish.cards._04Expansion._012ULD +{ + /// + /// Tome of Origination + /// 源生魔典 + /// + public class Sim_ULD_140p : SimTemplate + { + /// + /// Hero Power Draw a card. It costs 0. + /// 英雄技能 抽一张牌。其法力值消耗为 0点。 + /// + /// + /// + /// + /// + public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) + { + p.drawACard(CardName.unknown, ownplay); + if (ownplay) + { + p.owncards[p.owncards.Count - 1].manacost = 0; + } + } + } +} \ No newline at end of file diff --git a/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_155p.cs b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_155p.cs new file mode 100644 index 00000000..52411348 --- /dev/null +++ b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_155p.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; + +namespace Chuck.SilverFish.cards._04Expansion._012ULD +{ + /// + /// Ramkahen Roar + /// 拉穆卡恒的咆哮 + /// + public class Sim_ULD_155p : SimTemplate + { + /// + /// Hero Power Give your minions +2 Attack. + /// 英雄技能 使你的所有随从获得+2攻击力。 + /// + /// + /// + /// + /// + public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) + { + List temp = (ownplay) ? p.ownMinions : p.enemyMinions; + foreach (Minion m in temp) + { + p.minionGetBuffed(m, 2, 0); + } + } + } +} \ No newline at end of file diff --git a/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_326t.cs b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_326t.cs new file mode 100644 index 00000000..14eb0dd7 --- /dev/null +++ b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_326t.cs @@ -0,0 +1,25 @@ +using SilverFish.Enums; + +namespace Chuck.SilverFish.cards._04Expansion._012ULD +{ + /// + /// Mirage Blade + /// 幻象之刃 + /// + public class Sim_ULD_326t : SimTemplate + { + /// + /// Your hero is Immune while attacking. + /// 你的英雄在攻击时具有免疫。 + /// + /// + /// + /// + /// + public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) + { + CardDB.Card weapon = CardDB.Instance.getCardDataFromID(CardIdEnum.ULD_326t); + p.equipWeapon(weapon, ownplay); + } + } +} \ No newline at end of file diff --git a/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_431p.cs b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_431p.cs new file mode 100644 index 00000000..5c7df1b3 --- /dev/null +++ b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_431p.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace Chuck.SilverFish.cards._04Expansion._012ULD +{ + /// + /// Emperor Wraps + /// 帝王裹布 + /// + public class Sim_ULD_431p : SimTemplate + { + /// + /// Hero Power Summon a 2/2 copy of a friendly minion. + /// 英雄技能 召唤一个友方随从的2/2的复制。 + /// + /// + /// + /// + /// + public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) + { + List temp = (ownplay) ? p.ownMinions : p.enemyMinions; + int pos = temp.Count; + if (pos < 7) + { + p.CallKid(target.handcard.card, pos, ownplay); + temp[pos].setMinionToMinion(target); + p.minionSetAngrToX(target, 2); + p.minionSetLifetoX(target, 2); + } + } + } +} \ No newline at end of file diff --git a/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_433p.cs b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_433p.cs new file mode 100644 index 00000000..e9169652 --- /dev/null +++ b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_433p.cs @@ -0,0 +1,26 @@ +using SilverFish.Enums; +using System; + +namespace Chuck.SilverFish.cards._04Expansion._012ULD +{ + /// + /// Ascendant Scroll + /// 升格卷轴 + /// + public class Sim_ULD_433p : SimTemplate + { + /// + /// Hero Power Add a random Mage spell to your hand. It costs 2 less. + /// 英雄技能 随机将一张法师法术牌置入你的手牌。该牌的法力值消耗减少2点。 + /// + /// + /// + /// + /// + public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) + { + p.drawACard(CardName.unknown, ownplay, true); + p.owncards[p.owncards.Count - 1].manacost = Math.Max(p.owncards[p.owncards.Count - 1].manacost -= 2, 0); + } + } +} \ No newline at end of file diff --git a/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_724p.cs b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_724p.cs new file mode 100644 index 00000000..3ab09285 --- /dev/null +++ b/DefaultRoutine/Chuck.SilverFish/cards/04Expansion/012ULD/Sim_ULD_724p.cs @@ -0,0 +1,40 @@ +using SilverFish.Enums; + +namespace Chuck.SilverFish.cards._04Expansion._012ULD +{ + /// + /// Obelisk's Eye + /// 方尖碑之眼 + /// + public class Sim_ULD_724p : SimTemplate + { + /// + /// Hero Power Restore 3 Health. If you target a minion, also give it +3/+3. + /// 英雄技能 恢复3点生命值。如果你的目标是一个随从,则同时使其获得+3/+3。 + /// + /// + /// + /// + /// + public override void onCardPlay(Playfield p, bool ownplay, Minion target, int choice) + { + int heal = 3; + if (ownplay) + { + if (p.anzOwnAuchenaiSoulpriest > 0 || p.embracetheshadow > 0) heal = -heal; + if (p.doublepriest >= 1) heal *= (3 * p.doublepriest); + } + else + { + if (p.anzEnemyAuchenaiSoulpriest >= 1) heal = -heal; + if (p.enemydoublepriest >= 1) heal *= (3 * p.enemydoublepriest); + } + p.minionGetDamageOrHeal(target, -heal); + + if (target.handcard.card.type == CardType.Minion) + { + p.minionGetBuffed(target, 3, 3); + } + } + } +} \ No newline at end of file