コード例 #1
0
 private void PostProcessBem(BeamController bem)
 {
     if (bem && bem.GetComponent <Projectile>())
     {
         PostProcess(bem.GetComponent <Projectile>(), 0);
     }
 }
コード例 #2
0
        protected override void Update()
        {
            if (this.m_extantOrbital != null & Owner)
            {
                if (Owner.IsInCombat && extantBeam == null)
                {
                    extantBeam = BeamToolbox.FreeFireBeamFromAnywhere(InfraredBeam, Owner, this.m_extantOrbital, Vector2.zero, false, 0, float.MaxValue);
                    extantBeam.projectile.gameObject.AddComponent <AlwaysPointAwayFromPlayerBeam>();
                    if (Owner.PlayerHasActiveSynergy("Infraredder Guon Stone"))
                    {
                        extantBeam.projectile.baseData.damage *= 2;
                    }
                    if (Owner.PlayerHasActiveSynergy("Xenochrome"))
                    {
                        extantBeam.GetComponent <BasicBeamController>().penetration++;
                        extantBeam.GetComponent <BasicBeamController>().reflections++;
                    }
                }

                else if (!Owner.IsInCombat && extantBeam != null)
                {
                    extantBeam.CeaseAttack();
                    extantBeam = null;
                }
            }
            else if (((m_extantOrbital == null) || (Owner == null)) && extantBeam != null)
            {
                extantBeam.CeaseAttack();
                extantBeam = null;
            }
            base.Update();
        }
コード例 #3
0
 private void PostProcessBeam(BeamController beam)
 {
     if (beam.GetComponent <Projectile>())
     {
         PostProcessProjectile(beam.GetComponent <Projectile>(), 1);
     }
 }
コード例 #4
0
 protected override void PostProcessBeam(BeamController beam)
 {
     if (beam && beam.projectile && beam.projectile.ProjectilePlayerOwner())
     {
         if (beam.projectile.ProjectilePlayerOwner().PlayerHasActiveSynergy("It won't actually show up on screen, but there's no hard limit on how long you can make synergy names."))
         {
             beam.AdjustPlayerBeamTint(Color.green, 1);
             beam.projectile.fireEffect = StaticStatusEffects.greenFireEffect;
         }
         if (beam.projectile.ProjectilePlayerOwner().PlayerHasActiveSynergy("Re-Heat"))
         {
             beam.GetComponent <BasicBeamController>().TimeToStatus       = 0.1f;
             beam.GetComponent <BasicBeamController>().statusEffectChance = 1f;
         }
         if (beam.projectile.ProjectilePlayerOwner().PlayerHasActiveSynergy("Don't Trust The Toaster"))
         {
             beam.projectile.baseData.speed *= 5;
             beam.projectile.UpdateSpeed();
             beam.projectile.RuntimeUpdateScale(1.3f);
             beam.projectile.baseData.damage *= 2;
             EmmisiveBeams emission = beam.projectile.gameObject.GetOrAddComponent <EmmisiveBeams>();
         }
     }
     base.PostProcessBeam(beam);
 }
コード例 #5
0
 private void PostProcessBeam(BeamController beam)
 {
     if (beam.GetComponent <BeamSplittingModifier>())
     {
         ETGModConsole.Log("Split found");
         beam.GetComponent <BeamSplittingModifier>().amtToSplitTo++;
     }
 }
コード例 #6
0
 protected override void PostProcessBeam(BeamController beam)
 {
     beam.projectile.OnHitEnemy += this.OnHitEnemy;
     if (beam.GetComponent <CarrionMainTendrilController>())
     {
         beam.GetComponent <CarrionMainTendrilController>().forme = currentForme;
         ExtantBeams.Add(beam);
     }
     base.PostProcessBeam(beam);
 }
コード例 #7
0
 protected override void PostProcessBeam(BeamController beam)
 {
     if (beam.projectile && beam.projectile.ProjectilePlayerOwner())
     {
         if (beam.projectile.ProjectilePlayerOwner().PlayerHasActiveSynergy("Centerfold"))
         {
             beam.projectile.baseData.damage *= 0.6f;
             if (beam.GetComponent <BeamSplittingModifier>())
             {
                 beam.GetComponent <BeamSplittingModifier>().amtToSplitTo++;
             }
         }
     }
     base.PostProcessBeam(beam);
 }
コード例 #8
0
            private IEnumerator DoLaserAttack()
            {
                isAttacking = true;
                this.aiAnimator.PlayUntilFinished("attack", false, null, -1f, false);
                yield return(new WaitForSeconds(0.5f));

                //Start Firing Lasers
                this.aiActor.MovementSpeed *= 0.0001f;
                this.aiAnimator.PlayForDuration("contattack", 1);
                Projectile beamToFire = LaserBullets.SimpleRedBeam.projectile;

                if (UnityEngine.Random.value <= 0.5f)
                {
                    int angle = 135;
                    for (int i = 0; i < 4; i++)
                    {
                        BeamController beam = BeamToolbox.FreeFireBeamFromAnywhere(beamToFire, this.m_owner, this.gameObject, Vector2.zero, false, angle, 1, true);
                        Projectile     beamprojcomponent = beam.GetComponent <Projectile>();
                        beamprojcomponent.baseData.damage *= 3f;
                        if (PassiveItem.IsFlagSetForCharacter(this.Owner, typeof(BattleStandardItem)))
                        {
                            beamprojcomponent.baseData.damage *= BattleStandardItem.BattleStandardCompanionDamageMultiplier;
                        }
                        if (this.Owner.CurrentGun && this.Owner.CurrentGun.LuteCompanionBuffActive)
                        {
                            beamprojcomponent.baseData.damage *= 2;
                        }
                        angle -= 90;
                    }
                }
                else
                {
                    int angle = 180;
                    for (int i = 0; i < 4; i++)
                    {
                        BeamController beam = BeamToolbox.FreeFireBeamFromAnywhere(beamToFire, this.m_owner, this.gameObject, Vector2.zero, false, angle, 1, true);
                        Projectile     beamprojcomponent = beam.GetComponent <Projectile>();
                        beamprojcomponent.baseData.damage *= 3f;
                        if (PassiveItem.IsFlagSetForCharacter(this.Owner, typeof(BattleStandardItem)))
                        {
                            beamprojcomponent.baseData.damage *= BattleStandardItem.BattleStandardCompanionDamageMultiplier;
                        }
                        if (this.Owner.CurrentGun && this.Owner.CurrentGun.LuteCompanionBuffActive)
                        {
                            beamprojcomponent.baseData.damage *= 2;
                        }
                        angle -= 90;
                    }
                }
                yield return(new WaitForSeconds(1f));

                //Stop shit
                isAttacking = false;
                timer       = 1.5f;
                this.aiActor.MovementSpeed /= 0.0001f;
                yield break;
            }
コード例 #9
0
        private void PostProcessBeam(BeamController sourceBeam)
        {
            Projectile proj = sourceBeam.GetComponent <Projectile>();

            if (proj)
            {
                InstaKillEnemyTypeBehaviour instakill = proj.gameObject.GetOrAddComponent <InstaKillEnemyTypeBehaviour>();
                instakill.EnemyTypeToKill.AddRange(EasyEnemyTypeLists.ModInclusiveSkeletonEnemies);
                instakill.BossesToBonusDMG.AddRange(Skellebosses);
                instakill.bossBonusDMG = 1;
            }
        }
コード例 #10
0
 public void OnBeamTick(BeamController bem, SpeculativeRigidbody enemy, float what)
 {
     if (Owner && Owner.CurrentGoop != null)
     {
         if (Owner.CurrentGoop.HealthModifierEffect != null && Owner.CurrentGoop.AppliesDamageOverTime && !(Owner.CurrentGoop.HealthModifierEffect is GameActorPlagueEffect))
         {
             if (bem.GetComponent <Projectile>())
             {
                 if (enemy.GetComponent <GameActor>())
                 {
                     enemy.GetComponent <GameActor>().ApplyEffect(Owner.CurrentGoop.HealthModifierEffect);
                 }
             }
         }
     }
 }
コード例 #11
0
        public void BlankModHook(Action <SilencerInstance, BlankModificationItem, Vector2, PlayerController> orig, SilencerInstance silencer, BlankModificationItem bmi, Vector2 centerPoint, PlayerController user)
        {
            orig(silencer, bmi, centerPoint, user);

            if (user.HasPickupID(ShatterblankID))
            {
                float degrees = 0;
                for (int i = 0; i < 15; i++)
                {
                    GameObject proj             = shatterProj.gameObject;
                    bool       needsToAddBounce = false;
                    bool       isBeamInstead    = false;
                    if (user.PlayerHasActiveSynergy("Frag Mental"))
                    {
                        if (user.CurrentGun && UnityEngine.Random.value <= 0.2f)
                        {
                            if (user.CurrentGun.DefaultModule.shootStyle == ProjectileModule.ShootStyle.Charged)
                            {
                                for (int j = 0; j < user.CurrentGun.DefaultModule.chargeProjectiles.Count; j++)
                                {
                                    if (user.CurrentGun.DefaultModule.chargeProjectiles[j] != null && user.CurrentGun.DefaultModule.chargeProjectiles[j].Projectile != null)
                                    {
                                        proj = user.CurrentGun.DefaultModule.chargeProjectiles[j].Projectile.gameObject;
                                        break;
                                    }
                                }
                            }
                            else if (user.CurrentGun.DefaultModule.shootStyle == ProjectileModule.ShootStyle.Beam)
                            {
                                proj          = user.CurrentGun.DefaultModule.projectiles[0].gameObject;
                                isBeamInstead = true;
                            }
                            else
                            {
                                proj = user.CurrentGun.DefaultModule.projectiles[0].gameObject;
                            }
                            needsToAddBounce = true;
                        }
                    }
                    if (isBeamInstead)
                    {
                        BeamController beam = BeamController.FreeFireBeam(proj.GetComponent <Projectile>(), user, degrees, 3, true);
                        if (beam && beam.GetComponent <Projectile>())
                        {
                            Projectile component = beam.GetComponent <Projectile>();
                            if (user.stats.GetStatValue(PlayerStats.StatType.Damage) >= 1)
                            {
                                component.baseData.damage *= user.stats.GetStatValue(PlayerStats.StatType.Damage);
                            }
                            component.baseData.range *= user.stats.GetStatValue(PlayerStats.StatType.RangeMultiplier);
                            component.baseData.speed *= user.stats.GetStatValue(PlayerStats.StatType.ProjectileSpeed);
                            component.UpdateSpeed();
                            component.baseData.range *= 4f;
                            BounceProjModifier bounce = component.gameObject.AddComponent <BounceProjModifier>();
                            bounce.numberOfBounces += 3;
                        }
                    }
                    else
                    {
                        GameObject gameObject = SpawnManager.SpawnProjectile(proj, centerPoint, Quaternion.Euler(0, 0, degrees), true);
                        Projectile component  = gameObject.GetComponent <Projectile>();
                        if (component != null)
                        {
                            component.TreatedAsNonProjectileForChallenge = true;
                            component.Owner   = user;
                            component.Shooter = user.specRigidbody;
                            user.DoPostProcessProjectile(component);
                            if (user.stats.GetStatValue(PlayerStats.StatType.Damage) >= 1)
                            {
                                component.baseData.damage *= user.stats.GetStatValue(PlayerStats.StatType.Damage);
                            }
                            component.baseData.range *= user.stats.GetStatValue(PlayerStats.StatType.RangeMultiplier);
                            component.baseData.speed *= user.stats.GetStatValue(PlayerStats.StatType.ProjectileSpeed);
                            component.UpdateSpeed();
                            if (needsToAddBounce)
                            {
                                component.baseData.range *= 4f;
                                BounceProjModifier bounce = component.gameObject.AddComponent <BounceProjModifier>();
                                bounce.numberOfBounces += 3;
                            }
                        }
                    }
                    degrees += 24;
                }
            }
        }