添加法术迸发(Spellburst)

2020-09-05  本文已影响0人  慕海生

1.silverfish_HB.cs

getMinions()方法下:

            //法术迸发
            m.Spellburst = entitiy.GetTag(GAME_TAG.SPELLBURST) != 0;

在if (TritonHs.DoWeHaveWeapon)下添加

            ownWeapon.Spellburst = (weapon.GetTag(GAME_TAG.SPELLBURST) == 1) ? true : false;

在if (TritonHs.DoesEnemyHasWeapon)下添加

            enemyWeapon.Spellburst = (weapon.GetTag(GAME_TAG.SPELLBURST) == 1) ? true : false;

2.Minion.cs

在Minion类下添加属性:

            /// <summary>
            /// 法术迸发
            /// </summary>
            public bool Spellburst
            {
                get { return _spellburst; }
                set { _spellburst = value; }
            }
            private bool _spellburst = false;

Minion(Minion m)方法下:

            this.Spellburst = m.Spellburst;//法术迸发

setMinionToMinion(Minion m)方法下:

            this.Spellburst = m.Spellburst;//法术迸发

3.CardDB.cs

在Card类下添加属性:

            /// <summary>
            /// 法术迸发
            /// </summary>
            public bool Spellburst
            {
                get { return _spellburst; }
                set { _spellburst = value; }
            }
            private bool _spellburst = false;

搜索case 685
在下方添加

        case 1427: c.Spellburst = value == 1;break;//法术迸发

4.Playfield.cs

在playACard(Handmanager.Handcard hc, Minion target, int position, int choice, int penalty)方法下
搜索c.sim_card.OnCardPlay(this, true, target, choice);
在下方添加

                   #region 法术迸发效果的实现
                    foreach (Minion m in this.ownMinions)
                    {
                        if (m.Spellburst && !m.silenced)
                        {
                            m.handcard.card.sim_card.OnSpellburst(this, m, hc);
                            m.Spellburst = false;
                        }
                    }
                    if (this.ownWeapon.Spellburst)
                    {
                        this.ownWeapon.card.sim_card.OnSpellburst(this, this.ownWeapon, hc);
              this.ownWeapon.Spellburst = false;
                    }
                    #endregion

在createNewMinion(Handmanager.Handcard hc, int zonepos, bool own)方法下添加

        m.Spellburst = hc.card.Spellburst;//法术迸发

5.Weapon.cs

在Weapon类下添加属性:

            /// <summary>
            /// 法术迸发
            /// </summary>
            public bool Spellburst
            {
                get { return _spellburst; }
                set { _spellburst = value; }
            }
            private bool _spellburst = false;

在Weapon(Weapon w)方法下添加

        this.Spellburst = w.Spellburst;//法术迸发

在isEqual(Weapon w)方法下添加

        if (this.Spellburst != w.Spellburst) return false;//法术迸发

在equip(CardDB.Card c)方法下添加

        this.Spellburst = c.Spellburst;//法术迸发

6.SimTemplate.cs

在SimTemplate类下添加
OnSpellburst方法的两个重载

        /// <summary>
        /// 法术迸发效果
        /// </summary>
        /// <param name="p">场面</param>
        /// <param name="m">具有法术迸发的随从</param>
        /// <param name="hc">触发法术迸发的法术牌</param>
        public virtual void OnSpellburst(Playfield p, Minion m, Handmanager.Handcard hc)
        {
            return;
        }

        /// <summary>
        /// 法术迸发(武器)
        /// </summary>
        /// <param name="p">场面</param>
        /// <param name="w">武器</param>
        /// <param name="hc">触发法术迸发的法术牌</param>
        public virtual void OnSpellburst(Playfield p, Weapon w, Handmanager.Handcard hc)
        {
            return;
        }

转载来源https://www.cnblogs.com/dch0319/p/13461930.html
仅供个人研究学习之用

上一篇 下一篇

猜你喜欢

热点阅读