Example #1
0
 protected override void DoEffect(PlayerController user)
 {
     base.DoEffect(user);
     if (user.CurrentRoom != null && user)
     {
         List <AIActor> activeEnemies = user.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All);
         if (activeEnemies.Count != 0 && activeEnemies != null)
         {
             for (int counter = 0; counter < activeEnemies.Count; counter++)
             {
                 AIActor actor = activeEnemies[counter];
                 if (actor && actor.healthHaver && !actor.healthHaver.IsBoss && actor.gameObject.GetComponent <GhostAllyComponent>() == null && actor.healthHaver.IsVulnerable && actor.IsNormalEnemy && !actor.IsMimicEnemy && actor.GetResistanceForEffectType(EffectResistanceType.Charm) != 1)
                 {
                     List <int> Colors = new List <int>
                     {
                         7,
                         141,
                         222
                     };
                     GameActorCharmEffect ghostCharm = GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultPermanentCharmEffect;
                     ghostCharm.OverheadVFX  = null;
                     ghostCharm.TintColor    = new Color(Colors[0], Colors[1], Colors[2]);
                     ghostCharm.TintColor.a /= 100;
                     string  guid    = actor.EnemyGuid;
                     AIActor aiactor = BoxOTools.SummonAtRandomPosition(guid, user);
                     aiactor.AddPermanentCharm(ghostCharm);
                     aiactor.gameObject.AddComponent <GhostAllyComponent>();
                     aiactor.HandleReinforcementFallIntoRoom(counter / 10);
                 }
             }
         }
     }
 }
Example #2
0
 public void MineSynergy()
 {
     if (Owner.PlayerHasActiveSynergy("Into the Depths"))
     {
         if (Owner.CurrentRoom != null)
         {
             AIActor actor = BoxOTools.SummonAtRandomPosition("3cadf10c489b461f9fb8814abc1a09c1", Owner);
             actor.AddPermanentCharm();
         }
     }
 }