public override void OnRoundStart()
 {
     base.OnRoundStart();
     if (_effect)
     {
         _effect = false;
         new GameObject().AddComponent <SpriteFilter_Gaho>().Init("EmotionCardFilter/ThePriceOfSilence_Filter", false, 2f);
         SoundEffectPlayer.PlaySound("Creature/Clock_StopCard");
         Battle.CreatureEffect.CreatureEffect original = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/New_IllusionCardFX/9_H/FX_IllusionCard_9_H_Silence");
         if ((UnityEngine.Object)original != (UnityEngine.Object)null)
         {
             Battle.CreatureEffect.CreatureEffect creatureEffect = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original);
             creatureEffect.gameObject.transform.SetParent(SingletonBehavior <BattleManagerUI> .Instance.EffectLayer);
             creatureEffect.gameObject.transform.localPosition = new Vector3(0.0f, 0.0f, 0.0f);
             creatureEffect.gameObject.transform.localScale    = new Vector3(1f, 1f, 1f);
         }
     }
 }
 public override void OnRoundStart()
 {
     if (this._roundCount >= 3)
     {
         return;
     }
     ++this._roundCount;
     foreach (BattleUnitModel unit in BattleObjectManager.instance.GetAliveList(this._owner.faction == Faction.Player? Faction.Player : Faction.Enemy))
     {
         if (this._owner.faction == Faction.Player)
         {
             int num = (int)((double)unit.MaxHp * 0.15);
             if (num >= 18)
             {
                 num = 18;
             }
             unit.bufListDetail.AddBuf(new BattleUnitBuf_galaxyChild_Friend());
             unit.RecoverHP(num);
             unit.ShowTypoTemporary(this._emotionCard, 0, ResultOption.Default, num);
             Battle.CreatureEffect.CreatureEffect creatureEffect = this.MakeEffect("4/GalaxyBoy_Recover", target: unit);
             this._recoverEffects.Add(creatureEffect);
             (creatureEffect as CreatureEffect_Hit).SetPerm();
         }
         if (this._owner.faction == Faction.Enemy)
         {
             int num = (int)((double)unit.MaxHp * 0.1);
             if (num >= 12)
             {
                 num = 12;
             }
             unit.bufListDetail.AddBuf(new BattleUnitBuf_galaxyChild_Friend());
             unit.RecoverHP(num);
             unit.ShowTypoTemporary(this._emotionCard, 0, ResultOption.Default, num);
             Battle.CreatureEffect.CreatureEffect creatureEffect = this.MakeEffect("4/GalaxyBoy_Recover", target: unit);
             this._recoverEffects.Add(creatureEffect);
             (creatureEffect as CreatureEffect_Hit).SetPerm();
         }
     }
 }
Пример #3
0
        public void KillEffect()
        {
            CameraFilterUtil.EarthQuake(0.18f, 0.16f, 90f, 0.45f);
            Battle.CreatureEffect.CreatureEffect original1 = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/6/Dango_Emotion_Effect");
            if ((UnityEngine.Object)original1 != (UnityEngine.Object)null)
            {
                Battle.CreatureEffect.CreatureEffect creatureEffect = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original1, SingletonBehavior <BattleSceneRoot> .Instance.transform);
                if ((UnityEngine.Object)creatureEffect?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null)
                {
                    AutoDestruct autoDestruct = creatureEffect?.gameObject.AddComponent <AutoDestruct>();
                    if ((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null)
                    {
                        autoDestruct.time = 3f;
                        autoDestruct.DestroyWhenDisable();
                    }
                }
            }
            Battle.CreatureEffect.CreatureEffect original2 = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/7/Lumberjack_final_blood_1st");
            if (!((UnityEngine.Object)original2 != (UnityEngine.Object)null))
            {
                return;
            }
            Battle.CreatureEffect.CreatureEffect creatureEffect1 = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original2, SingletonBehavior <BattleSceneRoot> .Instance.transform);
            if (!((UnityEngine.Object)creatureEffect1?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null))
            {
                return;
            }
            AutoDestruct autoDestruct1 = creatureEffect1?.gameObject.AddComponent <AutoDestruct>();

            if (!((UnityEngine.Object)autoDestruct1 != (UnityEngine.Object)null))
            {
                return;
            }
            autoDestruct1.time = 3f;
            autoDestruct1.DestroyWhenDisable();
        }
        public override void OnRoundStart()
        {
            this._owner.bufListDetail.AddBuf(new Indicator(absorption));
            MoutainCorpse moutain = new MoutainCorpse(count);

            this._owner.bufListDetail.AddBuf(moutain);
            this._owner.view.ChangeHeight((int)((double)height * (1 + (double)moutain.stack * 0.25)));
            if (count > 5)
            {
                PlatformManager.Instance.UnlockAchievement(AchievementEnum.ONCE_FLOOR6);
            }
            if (!this._effect)
            {
                this._effect = true;
                CameraFilterUtil.EarthQuake(0.18f, 0.16f, 90f, 0.45f);
                Battle.CreatureEffect.CreatureEffect original1 = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/6/Dango_Emotion_Effect");
                if ((UnityEngine.Object)original1 != (UnityEngine.Object)null)
                {
                    Battle.CreatureEffect.CreatureEffect creatureEffect1 = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original1, SingletonBehavior <BattleSceneRoot> .Instance.transform);
                    Battle.CreatureEffect.CreatureEffect creatureEffect2 = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original1, SingletonBehavior <BattleSceneRoot> .Instance.transform);
                    Battle.CreatureEffect.CreatureEffect creatureEffect3 = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original1, SingletonBehavior <BattleSceneRoot> .Instance.transform);
                    if ((UnityEngine.Object)creatureEffect1?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null)
                    {
                        AutoDestruct autoDestruct = creatureEffect1?.gameObject.AddComponent <AutoDestruct>();
                        if ((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null)
                        {
                            autoDestruct.time = 3f;
                            autoDestruct.DestroyWhenDisable();
                        }
                    }
                    if ((UnityEngine.Object)creatureEffect2?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null)
                    {
                        AutoDestruct autoDestruct = creatureEffect2?.gameObject.AddComponent <AutoDestruct>();
                        if ((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null)
                        {
                            autoDestruct.time = 3f;
                            autoDestruct.DestroyWhenDisable();
                        }
                    }
                    if ((UnityEngine.Object)creatureEffect3?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null)
                    {
                        AutoDestruct autoDestruct = creatureEffect3?.gameObject.AddComponent <AutoDestruct>();
                        if ((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null)
                        {
                            autoDestruct.time = 3f;
                            autoDestruct.DestroyWhenDisable();
                        }
                    }
                }
                Battle.CreatureEffect.CreatureEffect original2 = Resources.Load <Battle.CreatureEffect.CreatureEffect>("Prefabs/Battle/CreatureEffect/7/Lumberjack_final_blood_1st");
                if ((UnityEngine.Object)original2 != (UnityEngine.Object)null)
                {
                    Battle.CreatureEffect.CreatureEffect creatureEffect1 = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original2, SingletonBehavior <BattleSceneRoot> .Instance.transform);
                    Battle.CreatureEffect.CreatureEffect creatureEffect2 = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original2, SingletonBehavior <BattleSceneRoot> .Instance.transform);
                    Battle.CreatureEffect.CreatureEffect creatureEffect3 = UnityEngine.Object.Instantiate <Battle.CreatureEffect.CreatureEffect>(original2, SingletonBehavior <BattleSceneRoot> .Instance.transform);
                    if ((UnityEngine.Object)creatureEffect1?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null)
                    {
                        AutoDestruct autoDestruct = creatureEffect1?.gameObject.AddComponent <AutoDestruct>();
                        if ((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null)
                        {
                            autoDestruct.time = 3f;
                            autoDestruct.DestroyWhenDisable();
                        }
                    }
                    if ((UnityEngine.Object)creatureEffect2?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null)
                    {
                        AutoDestruct autoDestruct = creatureEffect2?.gameObject.AddComponent <AutoDestruct>();
                        if ((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null)
                        {
                            autoDestruct.time = 3f;
                            autoDestruct.DestroyWhenDisable();
                        }
                    }
                    if ((UnityEngine.Object)creatureEffect3?.gameObject.GetComponent <AutoDestruct>() == (UnityEngine.Object)null)
                    {
                        AutoDestruct autoDestruct = creatureEffect3?.gameObject.AddComponent <AutoDestruct>();
                        if ((UnityEngine.Object)autoDestruct != (UnityEngine.Object)null)
                        {
                            autoDestruct.time = 3f;
                            autoDestruct.DestroyWhenDisable();
                        }
                    }
                }
                this.MakeEffect("6/Dango_Emotion_Spread", target: this._owner);
                SoundEffectPlayer.PlaySound("Creature/Danggo_LvUp");
                SoundEffectPlayer.PlaySound("Creature/Danggo_Birth");
            }
        }