Ejemplo n.º 1
0
        // Token: 0x060002BC RID: 700 RVA: 0x00016370 File Offset: 0x00014570
        public override void Pickup(PlayerController player)
        {
            bool pickedUp = this.m_pickedUp;

            if (!pickedUp)
            {
                base.Pickup(player);
                player.PostProcessProjectile += this.PostProcessProjectile;
                player.PostProcessBeam       += this.PostProcessBeam;
                player.PostProcessBeamTick   += this.PostProcessBeamTick;

                this.AppliesCharm = true;
                GameActorCharmEffect charmModifierEffect = new GameActorCharmEffect
                {
                    AffectsEnemies = true,
                };
                this.chanceOfActivating      = 0.2f;
                this.chanceFromBeamPerSecond = 0.08f;
                this.TintColor             = new Color(0f, 0f, 0f);
                this.TintPriority          = 6;
                this.FreezeAmountPerDamage = 1f;
                this.TintBeams             = true;
                this.CharmModifierEffect   = charmModifierEffect;
            }
        }
Ejemplo n.º 2
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);
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
        // Token: 0x0600017D RID: 381 RVA: 0x00013C30 File Offset: 0x00011E30
        public static GameActorCharmEffect CopyCharmFrom(this GameActorCharmEffect self, GameActorCharmEffect other)
        {
            bool flag = self == null;

            if (flag)
            {
                self = new GameActorCharmEffect();
            }
            return((GameActorCharmEffect)self.CopyEffectFrom(other));
        }
Ejemplo n.º 4
0
 public static void AddPermanentCharm(this AIActor actor, GameActorCharmEffect charm = null)
 {
     if (charm == null)
     {
         actor.ApplyEffect(GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultPermanentCharmEffect, 1f, null);
     }
     else
     {
         actor.ApplyEffect(charm, 1f, null);
     }
     actor.gameObject.AddComponent <KillOnRoomClear>();
     actor.IsHarmlessEnemy    = true;
     actor.IgnoreForRoomClear = true;
     if (actor.gameObject.GetComponent <SpawnEnemyOnDeath>())
     {
         UnityEngine.Object.Destroy(actor.gameObject.GetComponent <SpawnEnemyOnDeath>());
     }
 }
Ejemplo n.º 5
0
 private void OnHitEnemy(Projectile arg1, SpeculativeRigidbody arg2, bool arg3)
 {
     if (bighead2 == 6)
     {
         base.StartCoroutine(this.HandleFear(gun.CurrentOwner as PlayerController, arg2));
     }
     if (bighead2 == 5)
     {
         GameActorHealthEffect irradiatedLeadEffect = PickupObjectDatabase.GetById(204).GetComponent <BulletStatusEffectItem>().HealthModifierEffect;
         arg2.aiActor.ApplyEffect(irradiatedLeadEffect, 2f, arg1);
     }
     if (bighead2 == 2)
     {
         GameActorFireEffect hotLeadEffect = PickupObjectDatabase.GetById(295).GetComponent <BulletStatusEffectItem>().FireModifierEffect;
         arg2.aiActor.ApplyEffect(hotLeadEffect, 2f, arg1);
     }
     if (bighead2 == 1)
     {
         arg2.aiActor.healthHaver.ApplyDamage(1f * (gun.CurrentOwner as PlayerController).stats.GetStatValue(PlayerStats.StatType.Damage), Vector2.zero, "Erasure", CoreDamageTypes.None, DamageCategory.Normal, true, null, false);
         GlobalSparksDoer.DoRadialParticleBurst(50, arg2.specRigidbody.HitboxPixelCollider.UnitCenter, arg2.specRigidbody.HitboxPixelCollider.UnitCenter, 90f, 2f, 0f, null, null, Color.red, GlobalSparksDoer.SparksType.BLOODY_BLOOD);
     }
     if (bighead2 == 3)
     {
         arg2.aiActor.ApplyEffect(this.cheeseEffect, 3f, null);
     }
     if (bighead2 == 7)
     {
         GameActorCharmEffect charmingRoundsEffect = PickupObjectDatabase.GetById(527).GetComponent <BulletStatusEffectItem>().CharmModifierEffect;
         arg2.aiActor.ApplyEffect(charmingRoundsEffect, 3f, null);
     }
     if (bighead2 == 4)
     {
         GameActorFreezeEffect frostBulletsEffect = PickupObjectDatabase.GetById(278).GetComponent <BulletStatusEffectItem>().FreezeModifierEffect;
         arg2.aiActor.ApplyEffect(frostBulletsEffect, 3f, null);
     }
     if (bighead2 == 8)
     {
         GameActorSpeedEffect tripleCrossbowSlowEffect = (PickupObjectDatabase.GetById(381) as Gun).DefaultModule.projectiles[0].speedEffect;
         arg2.aiActor.ApplyEffect(tripleCrossbowSlowEffect, 3f, null);
     }
 }
        public static GameActorCharmEffect GenerateCharmEffect(float duration)
        {
            GameActorCharmEffect charmEffect = new GameActorCharmEffect
            {
                duration           = duration,
                TintColor          = StaticStatusEffects.charmingRoundsEffect.TintColor,
                AppliesDeathTint   = StaticStatusEffects.charmingRoundsEffect.AppliesDeathTint,
                AppliesTint        = StaticStatusEffects.charmingRoundsEffect.AppliesTint,
                effectIdentifier   = StaticStatusEffects.charmingRoundsEffect.effectIdentifier,
                DeathTintColor     = StaticStatusEffects.charmingRoundsEffect.DeathTintColor,
                OverheadVFX        = StaticStatusEffects.charmingRoundsEffect.OverheadVFX,
                AffectsEnemies     = StaticStatusEffects.charmingRoundsEffect.AffectsEnemies,
                AppliesOutlineTint = StaticStatusEffects.charmingRoundsEffect.AppliesOutlineTint,
                AffectsPlayers     = StaticStatusEffects.charmingRoundsEffect.AffectsPlayers,
                maxStackedDuration = StaticStatusEffects.charmingRoundsEffect.maxStackedDuration,
                OutlineTintColor   = StaticStatusEffects.charmingRoundsEffect.OutlineTintColor,
                PlaysVFXOnActor    = StaticStatusEffects.charmingRoundsEffect.PlaysVFXOnActor,
                resistanceType     = StaticStatusEffects.charmingRoundsEffect.resistanceType,
                stackMode          = StaticStatusEffects.charmingRoundsEffect.stackMode,
            };

            return(charmEffect);
        }
        public void AIActorMods(AIActor target)
        {
            //ETGModConsole.Log("ran");

            if (target)
            {
                //ETGModConsole.Log("passed target check");

                if (target.IsBlackPhantom && target.healthHaver && !target.healthHaver.IsBoss)
                {
                    //ETGModConsole.Log("target was jammed");

                    float procChance = 1;
                    if (AllJammedState.AllJammedActive)
                    {
                        procChance = 0.5f;
                    }
                    if (UnityEngine.Random.value <= procChance)
                    {
                        // ETGModConsole.Log("procced");
                        GameActorCharmEffect charm = StatusEffectHelper.GenerateCharmEffect(13);
                        target.ApplyEffect(charm);
                        if (UnityEngine.Random.value <= 0.5f)
                        {
                            target.IgnoreForRoomClear = true;
                            KillOnRoomClear kill = target.gameObject.GetOrAddComponent <KillOnRoomClear>();
                            if (EasyEnemyTypeLists.MultiPhaseEnemies.Contains(target.EnemyGuid) || EasyEnemyTypeLists.EnemiesWithInvulnerablePhases.Contains(target.EnemyGuid))
                            {
                                EraseFromExistenceOnRoomClear destroyTrickyEnemy = target.gameObject.AddComponent <EraseFromExistenceOnRoomClear>();
                                destroyTrickyEnemy.Delay = 1f;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 8
0
        public override void PostProcessProjectile(Projectile projectile)
        {
            if (projectile.Owner is PlayerController)
            {
                PlayerController      player   = projectile.Owner as PlayerController;
                LorebookFantasyBullet loreness = projectile.gameObject.GetComponent <LorebookFantasyBullet>();
                if (loreness != null)
                {
                    if (loreness.Class == LorebookFantasyBullet.PartyMember.KNIGHT)
                    {
                        if (player.PlayerHasActiveSynergy("Level 20 Fighter"))
                        {
                            projectile.baseData.damage *= 1.25f;
                            projectile.baseData.speed  *= 1.15f;
                            projectile.UpdateSpeed();
                            PierceProjModifier knightPiercing = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();
                            knightPiercing.penetration += 5;
                            MakeLookLikeJammedBullet(projectile);
                        }
                    }
                    else if (loreness.Class == LorebookFantasyBullet.PartyMember.ROGUE)
                    {
                        if (player.PlayerHasActiveSynergy("Level 20 Rogue"))
                        {
                            projectile.baseData.damage *= 1.25f;
                            ExtremelySimpleStatusEffectBulletBehaviour roguePoisoning = projectile.gameObject.GetOrAddComponent <ExtremelySimpleStatusEffectBulletBehaviour>();
                            roguePoisoning.usesPoisonEffect = true;
                            roguePoisoning.poisonEffect     = StaticStatusEffects.irradiatedLeadEffect;
                            MakeLookLikeJammedBullet(projectile);
                        }
                    }
                    else if (loreness.Class == LorebookFantasyBullet.PartyMember.WIZARD)
                    {
                        if (player.PlayerHasActiveSynergy("Level 20 Wizard"))
                        {
                            projectile.baseData.damage *= 1.25f;
                            SpawnProjModifier WizardShooting = projectile.gameObject.GetComponent <SpawnProjModifier>();
                            if (WizardShooting != null)
                            {
                                WizardShooting.inFlightSpawnCooldown = 0.35f;
                            }
                            MakeLookLikeJammedBullet(projectile);
                        }
                    }
                    else if (loreness.Class == LorebookFantasyBullet.PartyMember.BARD)
                    {
                        if (player.PlayerHasActiveSynergy("Level 20 Bard"))
                        {
                            projectile.baseData.damage *= 1.25f;
                            GameActorCharmEffect UpgradedCharm = new GameActorCharmEffect
                            {
                                duration         = StaticStatusEffects.charmingRoundsEffect.duration * 3,
                                TintColor        = StaticStatusEffects.charmingRoundsEffect.TintColor,
                                DeathTintColor   = StaticStatusEffects.charmingRoundsEffect.DeathTintColor,
                                effectIdentifier = "Upgraded Bard Charm",
                                AppliesTint      = true,
                                AppliesDeathTint = true,
                                resistanceType   = EffectResistanceType.Charm,

                                //Eh
                                OverheadVFX        = StaticStatusEffects.charmingRoundsEffect.OverheadVFX,
                                AffectsEnemies     = true,
                                AffectsPlayers     = false,
                                AppliesOutlineTint = false,
                                OutlineTintColor   = StaticStatusEffects.charmingRoundsEffect.OutlineTintColor,
                                PlaysVFXOnActor    = false,
                            };
                            ExtremelySimpleStatusEffectBulletBehaviour BardCharming = projectile.gameObject.GetComponent <ExtremelySimpleStatusEffectBulletBehaviour>();
                            BardCharming.charmEffect     = UpgradedCharm;
                            BardCharming.usesCharmEffect = true;
                            MakeLookLikeJammedBullet(projectile);
                        }
                    }
                }
            }
            base.PostProcessProjectile(projectile);
        }