public override void OnRoundStart()
 {
     if (this.phase != ApocalypsePhase.Small || this._owner.allyCardDetail.GetAllDeck().Count <= 0)
     {
         return;
     }
     foreach (BattleDiceCardModel card in this._owner.allyCardDetail.GetAllDeck())
     {
         card.CopySelf();
         DiceCardXmlInfo xmlInfo = card.XmlData.Copy(true);
         DiceCardSpec    Spec    = xmlInfo.Spec.Copy();
         Spec.Ranged    = CardRange.FarArea;
         Spec.affection = CardAffection.Team;
         xmlInfo.Spec   = Spec;
         DiceBehaviour dice = new DiceBehaviour()
         {
             Min    = 0,
             Dice   = 0,
             Type   = BehaviourType.Atk,
             Detail = RandomUtil.SelectOne <BehaviourDetail>(new List <BehaviourDetail>()
             {
                 BehaviourDetail.Slash, BehaviourDetail.Hit, BehaviourDetail.Penetrate
             }),
             MotionDetail = MotionDetail.J,
             EffectRes    = "",
             Script       = "",
             ActionScript = "Final_ApcBird_PutDownArea",
             Desc         = ""
         };
         foreach (DiceBehaviour behaviour in xmlInfo.DiceBehaviourList)
         {
             dice.Min  += behaviour.Min;
             dice.Dice += behaviour.Dice;
         }
         xmlInfo.DiceBehaviourList = new List <DiceBehaviour>()
         {
             dice
         };
         typeof(BattleDiceCardModel).GetField("_xmlData", AccessTools.all).SetValue(card, xmlInfo);
         EmotionCardAbility_bossbird4.Summation.Add(card);
     }
 }
Пример #2
0
        public override void OnSelectEmotion()
        {
            base.OnSelectEmotion();
            BattleEmotionCardModel Long  = SearchEmotion(this._owner, "ApocalypseBird_LongArm_Enemy");
            BattleEmotionCardModel Big   = SearchEmotion(this._owner, "ApocalypseBird_BigEye_Enemy");
            BattleEmotionCardModel Small = SearchEmotion(this._owner, "ApocalypseBird_SmallPeak_Enemy");

            if (Long != null)
            {
                foreach (EmotionCardAbilityBase ability in Long.GetAbilityList())
                {
                    MethodInfo destroy = ability.GetType().GetMethod("Destroy");
                    if (destroy != null)
                    {
                        try
                        {
                            destroy.Invoke(ability, new object[] { });
                        }
                        catch (Exception ex)
                        {
                            Debug.Error(ability.GetType().Name + "Destroy", ex);
                        }
                    }
                }
                this._owner.emotionDetail.PassiveList.Remove(Long);
                string             name    = RandomUtil.SelectOne <EmotionCardXmlInfo>(Harmony_Patch.emotion1).Name + "_Enemy";
                EmotionCardXmlInfo emotion = Harmony_Patch.enermy.Find((Predicate <EmotionCardXmlInfo>)(x => x.Name == name));
                this._owner.emotionDetail.ApplyEmotionCard(emotion);
            }
            if (Big != null)
            {
                foreach (EmotionCardAbilityBase ability in Big.GetAbilityList())
                {
                    MethodInfo destroy = ability.GetType().GetMethod("Destroy");
                    if (destroy != null)
                    {
                        try
                        {
                            destroy.Invoke(ability, new object[] { });
                        }
                        catch (Exception ex)
                        {
                            Debug.Error(ability.GetType().Name + "Destroy", ex);
                        }
                    }
                }
                this._owner.emotionDetail.PassiveList.Remove(Big);
                string             name    = RandomUtil.SelectOne <EmotionCardXmlInfo>(Harmony_Patch.emotion2).Name + "_Enemy";
                EmotionCardXmlInfo emotion = Harmony_Patch.enermy.Find((Predicate <EmotionCardXmlInfo>)(x => x.Name == name));
                this._owner.emotionDetail.ApplyEmotionCard(emotion);
            }
            if (Small != null)
            {
                foreach (EmotionCardAbilityBase ability in Small.GetAbilityList())
                {
                    MethodInfo destroy = ability.GetType().GetMethod("Destroy");
                    if (destroy != null)
                    {
                        try
                        {
                            destroy.Invoke(ability, new object[] { });
                        }
                        catch (Exception ex)
                        {
                            Debug.Error(ability.GetType().Name + "Destroy", ex);
                        }
                    }
                }
                this._owner.emotionDetail.PassiveList.Remove(Small);
                string             name    = RandomUtil.SelectOne <EmotionCardXmlInfo>(Harmony_Patch.emotion2).Name + "_Enemy";
                EmotionCardXmlInfo emotion = Harmony_Patch.enermy.Find((Predicate <EmotionCardXmlInfo>)(x => x.Name == name));
                this._owner.emotionDetail.ApplyEmotionCard(emotion);
            }
            SingletonBehavior <SoundEffectManager> .Instance.PlayClip("Creature/BossBird_Birth", false, 4f);

            this._aura = SingletonBehavior <DiceEffectManager> .Instance.CreateNewFXCreatureEffect("8_B/FX_IllusionCard_8_B_MonsterAura", 1f, _owner.view, _owner.view);

            this._owner.bufListDetail.AddBuf(new EmotionCardAbility_bossbird1.Longbird_Enemy());
            this._owner.bufListDetail.AddBuf(new EmotionCardAbility_bossbird2.Bigbird_Enemy());
            this._owner.bufListDetail.AddBuf(new EmotionCardAbility_bossbird3.Smallbird_Enemy());
            DiceCardXmlInfo bigbirdxml = ItemXmlDataList.instance.GetCardItem(910041).Copy(true);

            bigbirdxml.optionList.Clear();
            DiceCardSpec bigbirdspec = bigbirdxml.Spec.Copy();

            bigbirdspec.Cost    = 0;
            bigbirdxml.Spec     = bigbirdspec;
            bigbirdxml.Priority = 100;
            bigbirdxml.Keywords.Clear();
            BattleDiceCardModel BigBirdEgo = BattleDiceCardModel.CreatePlayingCard(bigbirdxml);

            Ego.Add(BigBirdEgo);
            DiceCardXmlInfo smallbirdxml = ItemXmlDataList.instance.GetCardItem(910043).Copy(true);

            smallbirdxml.optionList.Clear();
            DiceCardSpec smallbirdspec = smallbirdxml.Spec.Copy();

            smallbirdspec.Cost    = 0;
            smallbirdxml.Spec     = smallbirdspec;
            smallbirdxml.Priority = 100;
            smallbirdxml.Keywords.Clear();
            BattleDiceCardModel SmallBirdEgo = BattleDiceCardModel.CreatePlayingCard(smallbirdxml);

            Ego.Add(SmallBirdEgo);
            DiceCardXmlInfo longbirdxml = ItemXmlDataList.instance.GetCardItem(910042).Copy(true);

            longbirdxml.optionList.Clear();
            DiceCardSpec longbirdspec = longbirdxml.Spec.Copy();

            longbirdspec.Cost    = 0;
            longbirdxml.Spec     = longbirdspec;
            longbirdxml.Priority = 100;
            longbirdxml.Keywords.Clear();
            BattleDiceCardModel LongBirdEgo = BattleDiceCardModel.CreatePlayingCard(bigbirdxml);

            Ego.Add(LongBirdEgo);
            this._owner.allyCardDetail.AddCardToDeck(Ego);
            this._owner.allyCardDetail.Shuffle();
        }