Exemplo n.º 1
0
        public override void OnAutoReload(PlayerController player, Gun gun)
        {
            if (player.HasPickupID(323) || player.HasPickupID(815))
            {
                float value = UnityEngine.Random.Range(0.0f, 1.0f);
                if (value <= 0.25f)
                {
                    this.RageDamageMultiplier = 2f;
                    this.RageDuration         = 5f;
                    this.RageFlatColor        = new Color(0.5f, 0f, 0f, 0.75f);

                    TableFlipItem rageitem = PickupObjectDatabase.GetById(399).GetComponent <TableFlipItem>();

                    if (this.m_rageElapsed > 0f)
                    {
                        this.m_rageElapsed = this.RageDuration;
                        if (player.HasActiveBonusSynergy(CustomSynergyType.ANGRIER_BULLETS, false))
                        {
                            this.m_rageElapsed *= 3f;
                        }
                        if (this.rageInstanceVFX == null)
                        {
                            this.rageInstanceVFX = player.PlayEffectOnActor(rageitem.RageOverheadVFX, new Vector3(0f, 1.375f, 0f), true, true, false);
                        }
                    }
                    else
                    {
                        player.StartCoroutine(this.HandleRageCooldown());
                    }
                }
            }
        }
Exemplo n.º 2
0
        private IEnumerator HandleRageCooldown()
        {
            PlayerController player   = this.gun.CurrentOwner as PlayerController;
            TableFlipItem    rageitem = PickupObjectDatabase.GetById(399).GetComponent <TableFlipItem>();

            this.rageInstanceVFX = null;
            this.rageInstanceVFX = player.PlayEffectOnActor(rageitem.RageOverheadVFX, new Vector3(0f, 1.375f, 0f), true, true, false);
            this.m_rageElapsed   = this.RageDuration;
            if (player.HasActiveBonusSynergy(CustomSynergyType.ANGRIER_BULLETS, false))
            {
                this.m_rageElapsed *= 3f;
            }
            StatModifier damageStat = new StatModifier();

            damageStat.amount      = this.RageDamageMultiplier;
            damageStat.modifyType  = StatModifier.ModifyMethod.MULTIPLICATIVE;
            damageStat.statToBoost = PlayerStats.StatType.Damage;
            PlayerController cachedOwner = player;

            cachedOwner.ownerlessStatModifiers.Add(damageStat);
            cachedOwner.stats.RecalculateStats(cachedOwner, false, false);
            Color rageColor = this.RageFlatColor;

            while (this.m_rageElapsed > 0f)
            {
                cachedOwner.baseFlatColorOverride = rageColor.WithAlpha(Mathf.Lerp(rageColor.a, 0f, 1f - Mathf.Clamp01(this.m_rageElapsed)));
                if (this.rageInstanceVFX && this.m_rageElapsed < this.RageDuration - 1f)
                {
                    this.rageInstanceVFX.GetComponent <tk2dSpriteAnimator>().PlayAndDestroyObject("rage_face_vfx_out", null);
                    this.rageInstanceVFX = null;
                }
                yield return(null);

                this.m_rageElapsed -= BraveTime.DeltaTime;
            }
            if (this.rageInstanceVFX)
            {
                this.rageInstanceVFX.GetComponent <tk2dSpriteAnimator>().PlayAndDestroyObject("rage_face_vfx_out", null);
            }
            cachedOwner.ownerlessStatModifiers.Remove(damageStat);
            cachedOwner.stats.RecalculateStats(cachedOwner, false, false);
            yield break;
        }
Exemplo n.º 3
0
        public TableTechChaos()
        {
            TableFlipItem ttrage    = PickupObjectDatabase.GetById(399) as TableFlipItem;
            TableFlipItem ttsight   = PickupObjectDatabase.GetById(396) as TableFlipItem;
            TableFlipItem ttrocket  = PickupObjectDatabase.GetById(398) as TableFlipItem;
            TableFlipItem ttheat    = PickupObjectDatabase.GetById(666) as TableFlipItem;
            TableFlipItem ttblank   = PickupObjectDatabase.GetById(400) as TableFlipItem;
            TableFlipItem ttshotgun = PickupObjectDatabase.GetById(633) as TableFlipItem;

            this.RageOverheadVFX         = ttrage.RageOverheadVFX;
            this.ProjectileExplosionData = ttrocket.ProjectileExplosionData;
            this.CustomAccelerationCurve = ttrocket.CustomAccelerationCurve;
            this.Volley                 = ttshotgun.Volley;
            this.VolleyOverride         = ttshotgun.VolleyOverrides[0];
            this.TableHeatEffect        = ttheat.TableHeatEffect;
            this.TableHeatSynergyEffect = ttheat.TableHeatSynergyEffect;
            this.BeeProjectile          = ttblank.BeeProjectile;
            this.RadialSlow             = ttsight.RadialSlow;
            this.m_volleyElapsed        = -1f;
        }