Exemplo n.º 1
0
 private void CheckDieEnd(HealthHaver hh)
 {
     if (hh == playerToWatch)
     {
         endScreen.gameObject.SetActive(true);
         endScreen.StartSequence(deathEndStrings[Random.Range(0, deathEndStrings.Count)], scoreToRead.Score, scoreToRead.highestMultiplier, indicatorToRead.MaxInstruments);
     }
 }
Exemplo n.º 2
0
        public override void Pickup(PlayerController player)
        {
            HealthHaver healthHaver = player.healthHaver;

            healthHaver.ModifyDamage += this.ModifyIncomingDamage;
            player.OnNewFloorLoaded  += this.Gdagadgdagad;
            base.Pickup(player);
        }
Exemplo n.º 3
0
        public override DebrisObject Drop(PlayerController player)
        {
            HealthHaver healthHaver = player.healthHaver;

            healthHaver.ModifyDamage -= this.ModifyIncomingDamage;

            return(base.Drop(player));
        }
        public override DebrisObject Drop(PlayerController player)
        {
            DebrisObject debrisObject = base.Drop(player);
            HealthHaver  healthHaver  = player.healthHaver;

            healthHaver.ModifyDamage = (Action <HealthHaver, HealthHaver.ModifyDamageEventArgs>)Delegate.Remove(healthHaver.ModifyDamage, new Action <HealthHaver, HealthHaver.ModifyDamageEventArgs>(this.ModifyIncomingDamage));
            return(debrisObject);
        }
Exemplo n.º 5
0
 private void DoubleDamage(HealthHaver hh, HealthHaver.ModifyDamageEventArgs args)
 {
     if (args == EventArgs.Empty)
     {
         return;
     }
     args.ModifiedDamage *= 2;
 }
        public void BattleStarted(HealthHaver currentBoss)
        {
            this.m_currentBoss = currentBoss;

            this.m_battleStart = Time.time;

            Module.Data.StartBattleLog(GetVariantId(this.m_currentBoss.gameActor));
        }
Exemplo n.º 7
0
 static bool Prefix(HealthHaver __instance, bool ___isPlayerCharacter)
 {
     if (___isPlayerCharacter)
     {
         return(!configGodModeEnabled.Value);
     }
     return(true);
 }
Exemplo n.º 8
0
 private void OnEnemyKilled(PlayerController player, HealthHaver enemy)
 {
     if (enemy.specRigidbody != null && enemy.aiActor != null && base.Owner != null)
     {
         float duration = 0.75f;
         DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(goopDefs[0]).TimedAddGoopCircle(enemy.specRigidbody.UnitCenter, player.PlayerHasActiveSynergy("Fireproof") ? (player.PlayerHasActiveSynergy("Rainpour") ? 8f : 6f) : player.PlayerHasActiveSynergy("Rainpour") ? 6f : 4f, duration, false);
     }
 }
Exemplo n.º 9
0
 protected void RaiseDetachEvent(HealthHaver check)
 {
     if (check == hh && IsAbsorbed())
     {
         OnDetach?.Invoke();
         RaiseChangeEvent();
     }
 }
Exemplo n.º 10
0
 private void ModifyDamageForCompanions(HealthHaver hh, HealthHaver.ModifyDamageEventArgs args)
 {
     if (args == HealthHaver.ModifyDamageEventArgs.Empty)
     {
         return;
     }
     args.ModifiedDamage *= 5f;
 }
Exemplo n.º 11
0
 private void OnEnemyDamaged(float damage, bool fatal, HealthHaver enemyHealth)
 {
     if (enemyHealth.specRigidbody != null)
     {
         bool flag2 = enemyHealth.aiActor && fatal;
         if (flag2)
         {
             if (ItemChanceBoost == true)
             {
                 this.random = UnityEngine.Random.Range(0.00f, 1.00f);
                 if (random <= 0.08f)
                 {
                     this.RollRnG();
                     this.Spawnquality = (PickupObject.ItemQuality)(RnG);
                     this.target       = LootEngine.GetItemOfTypeAndQuality <PickupObject>(this.Spawnquality, GameManager.Instance.RewardManager.ItemsLootTable, false);
                     LootEngine.SpawnItem(this.target.gameObject, enemyHealth.specRigidbody.UnitCenter, Vector2.down, 0f, false, true, false);
                     ItemChanceBoost = false;
                 }
             }
             else //if (ItemChanceBoost == false)
             {
                 this.random = UnityEngine.Random.Range(0.00f, 1.00f);
                 if (random <= 0.025f)
                 {
                     this.RollRnG();
                     this.Spawnquality = (PickupObject.ItemQuality)(RnG);
                     this.target       = LootEngine.GetItemOfTypeAndQuality <PickupObject>(this.Spawnquality, GameManager.Instance.RewardManager.ItemsLootTable, false);
                     LootEngine.SpawnItem(this.target.gameObject, enemyHealth.specRigidbody.UnitCenter, Vector2.down, 0f, false, true, false);
                 }
             }
             {
                 if (GunChanceBoost == true)
                 {
                     this.random = UnityEngine.Random.Range(0.00f, 1.00f);
                     if (random <= 0.08f)
                     {
                         this.RollRnG();
                         this.Spawnquality = (PickupObject.ItemQuality)(RnG);
                         this.target1      = LootEngine.GetItemOfTypeAndQuality <PickupObject>(this.Spawnquality, GameManager.Instance.RewardManager.GunsLootTable, false);
                         LootEngine.SpawnItem(this.target1.gameObject, enemyHealth.specRigidbody.UnitCenter, Vector2.down, 0f, false, true, false);
                         GunChanceBoost = false;
                     }
                 }
                 else                        // if (GunChanceBoost == false)
                 {
                     this.random = UnityEngine.Random.Range(0.00f, 1.00f);
                     if (random <= 0.025f)
                     {
                         this.RollRnG();
                         this.Spawnquality = (PickupObject.ItemQuality)(RnG);
                         this.target1      = LootEngine.GetItemOfTypeAndQuality <PickupObject>(this.Spawnquality, GameManager.Instance.RewardManager.GunsLootTable, false);
                         LootEngine.SpawnItem(this.target1.gameObject, enemyHealth.specRigidbody.UnitCenter, Vector2.down, 0f, false, true, false);
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 12
0
 void Start()
 {
     _health       = GetComponent <HealthHaver>();
     _damageTaker  = GetComponent <PlayerDamageTaker>();
     _mover        = GetComponent <PlayerMover>();
     _shooter      = GetComponent <WeaponShooter>();
     _health.Died += StartSpawnEffect;
     StartSpawnEffect();
 }
Exemplo n.º 13
0
 // Token: 0x060074CC RID: 29900 RVA: 0x002D92BD File Offset: 0x002D74BD
 protected override void OnDestroy()
 {
     if (this.m_pickedUp)
     {
         HealthHaver healthHaver = this.m_owner.healthHaver;
         healthHaver.ModifyHealing = (Action <HealthHaver, HealthHaver.ModifyHealingEventArgs>)Delegate.Combine(healthHaver.ModifyHealing, new Action <HealthHaver, HealthHaver.ModifyHealingEventArgs>(this.ModifyIncomingHealing));
     }
     base.OnDestroy();
 }
 private void ModifyDamage(HealthHaver player, HealthHaver.ModifyDamageEventArgs args)
 {
     //ETGModConsole.Log("OnDamaged ran");
     //ETGModConsole.Log("Initial Damage: "+args.InitialDamage);
     if (args.InitialDamage > 0 && m_attachedPlayer.ModdedCharacterIdentity() == ModdedCharacterID.Shade)
     {
         GameManager.Instance.StartCoroutine(PostDamageCheck(m_attachedPlayer));
     }
 }
Exemplo n.º 15
0
 void Awake()
 {
     _boxCollider    = GetComponent <BoxCollider2D>();
     _circleCollider = GetComponent <CircleCollider2D>();
     _myShooter      = GetComponent <WeaponShooter>();
     _myRidigbody2D  = GetComponent <Rigidbody2D>();
     _myHealth       = GetComponent <HealthHaver>();
     _myHealth.Died += HandleDied;
 }
Exemplo n.º 16
0
        // Token: 0x060074CB RID: 29899 RVA: 0x002D9274 File Offset: 0x002D7474
        public override DebrisObject Drop(PlayerController player)
        {
            DebrisObject debrisObject = base.Drop(player);
            HealthHaver  healthHaver  = player.healthHaver;

            healthHaver.ModifyHealing = (Action <HealthHaver, HealthHaver.ModifyHealingEventArgs>)Delegate.Remove(healthHaver.ModifyHealing, new Action <HealthHaver, HealthHaver.ModifyHealingEventArgs>(this.ModifyIncomingHealing));
            //debrisObject.GetComponent<HealingReceivedModificationItem>().m_pickedUpThisRun = true;
            return(debrisObject);
        }
Exemplo n.º 17
0
 private void HitGlow(float n, HealthHaver na)
 {
     if (hitSequence != null)
     {
         StopCoroutine(hitSequence);
     }
     hitSequence = HitGlowSequence(n, na);
     StartCoroutine(hitSequence);
 }
Exemplo n.º 18
0
 protected override void OnDestroy()
 {
     if (Owner)
     {
         HealthHaver healthHaver = Owner.healthHaver;
         healthHaver.ModifyDamage = (Action <HealthHaver, HealthHaver.ModifyDamageEventArgs>)Delegate.Remove(healthHaver.ModifyDamage, new Action <HealthHaver, HealthHaver.ModifyDamageEventArgs>(this.HandleEffect));
         Owner.DropPassiveItem(this);
     }
     base.OnDestroy();
 }
Exemplo n.º 19
0
 public void IdiotDumbDumb(HealthHaver health, HealthHaver.ModifyDamageEventArgs damageArgs)
 {
     if (damageArgs != EventArgs.Empty)
     {
         if (damageArgs.InitialDamage <= 2)
         {
             damageArgs.InitialDamage = 1;
         }
     }
 }
Exemplo n.º 20
0
 public void AmmoInator(PlayerController player, HealthHaver healed)
 {
     if (healed && healed.specRigidbody && player)
     {
         if (BoxOTools.BasicRandom(0.825f) && Shells < Mathf.FloorToInt(55 * player.stats.GetStatValue(PlayerStats.StatType.AmmoCapacityMultiplier)) && player.HasGun(Gungeon.Game.Items["psm:wastelanders_shotgun"].PickupObjectId))
         {
             LootEngine.SpawnItem(PickupObjectDatabase.GetById(NuclearAmmoPickup.id).gameObject, healed.specRigidbody.UnitCenter, Vector2.zero, 1f, true, true);
         }
     }
 }
Exemplo n.º 21
0
 private void OnKilledEnemy(PlayerController player, HealthHaver enemy)
 {
     if (player.PlayerHasActiveSynergy("Fully Funded"))
     {
         if (player.CurrentGun.PickupObjectId == Creditor.CreditorID && UnityEngine.Random.value <= 0.25 && enemy.GetMaxHealth() >= 15)
         {
             LootEngine.SpawnCurrency(enemy.specRigidbody.UnitCenter, 1, true);
         }
     }
 }
Exemplo n.º 22
0
        protected override void OnPreDrop(PlayerController user)
        {
            HealthHaver healthHaver = base.LastOwner.healthHaver;

            healthHaver.ModifyDamage = (Action <HealthHaver, HealthHaver.ModifyDamageEventArgs>)Delegate.Remove(healthHaver.ModifyDamage, new Action <HealthHaver, HealthHaver.ModifyDamageEventArgs>(this.HandleEffect));
            user.OnHitByProjectile  -= this.OwnerHitByProjectile;
            this.DebtEnabled         = false;
            this.DisableVFX(base.LastOwner);
            base.OnPreDrop(user);
        }
Exemplo n.º 23
0
 public override DebrisObject Drop(PlayerController player)
 {
     this.DisableVFX(base.Owner);
     {
         GameManager.Instance.OnNewLevelFullyLoaded -= this.OnNewFloor;
         HealthHaver healthHaver = player.healthHaver;
         healthHaver.ModifyDamage = (Action <HealthHaver, HealthHaver.ModifyDamageEventArgs>)Delegate.Remove(healthHaver.ModifyDamage, new Action <HealthHaver, HealthHaver.ModifyDamageEventArgs>(this.HandleEffect));
         return(base.Drop(player));
     }
 }
 private void SpawnCasingSynergy(float damage, bool fatal, HealthHaver enemy)
 {
     if (enemy && enemy.aiActor && fatal)
     {
         if (Owner.HasPickupID(93) || Owner.HasPickupID(321) || Owner.HasPickupID(641) || Owner.HasPickupID(53) || Owner.HasPickupID(231) || Owner.HasPickupID(532) || Owner.HasPickupID(Gungeon.Game.Items["nn:golden_armour"].PickupObjectId) || Owner.HasPickupID(Gungeon.Game.Items["nn:gold_guon_stone"].PickupObjectId))
         {
             LootEngine.SpawnItem(PickupObjectDatabase.GetById(68).gameObject, enemy.specRigidbody.UnitCenter, Vector2.zero, 1f, false, true, false);
         }
     }
 }
Exemplo n.º 25
0
        private IEnumerator DelayedKill(HealthHaver haverofhealth, GameObject lightning)
        {
            yield return(new WaitForSeconds(0.1f));

            if (haverofhealth)
            {
                haverofhealth.ApplyDamage(400 * LastOwner.stats.GetStatValue(PlayerStats.StatType.Damage), Vector2.zero, "THUNDERSTRUCK");
            }
            AkSoundEngine.PostEvent("Play_OBJ_lightning_flash_01", gameObject);
            yield break;
        }
Exemplo n.º 26
0
 private void OnKilledEnemy(PlayerController player, HealthHaver enemy)
 {
     if (gun && player && enemy && player.PlayerHasActiveSynergy("Fully Funded"))
     {
         if (player.CurrentGun.PickupObjectId == 476 && enemy.GetMaxHealth() >= 10)
         {
             //ETGModConsole.Log("Spawned bonus");
             LootEngine.SpawnCurrency(enemy.specRigidbody.UnitCenter, 1, false);
         }
     }
 }
Exemplo n.º 27
0
 private void OnEnemyDamaged(float damage, bool fatal, HealthHaver enemyHealth)
 {
     if (enemyHealth.specRigidbody != null)
     {
         bool flag1 = enemyHealth.aiActor && fatal;
         if (flag1)
         {
             this.DropLoot(enemyHealth, fatal);
         }
     }
 }
Exemplo n.º 28
0
 private void OnEnemyDamagedYes(float damage, bool fatal, HealthHaver enemyHealth)
 {
     if (enemyHealth.specRigidbody != null)
     {
         bool flag = enemyHealth.aiActor && fatal;
         if (flag)
         {
             GameManager.Instance.StartCoroutine(Bolster());
         }
     }
 }
Exemplo n.º 29
0
 private void OnEnemyDamaged(float damage, bool fatal, HealthHaver enemyHealth)
 {
     if (enemyHealth.specRigidbody != null)
     {
         bool flag = enemyHealth.aiActor && fatal;
         if (flag)
         {
             this.Boom(enemyHealth.sprite.WorldCenter);
         }
     }
 }
Exemplo n.º 30
0
 private void ModifyIncomingDamage(HealthHaver source, HealthHaver.ModifyDamageEventArgs args)
 {
     if (args == EventArgs.Empty)
     {
         return;
     }
     if (UnityEngine.Random.value < ((source.gameActor.CurrentGun.PickupObjectId == 380 || source.gameActor.CurrentGun.PickupObjectId == ETGMod.Databases.Items["aegis"].PickupObjectId) ? 0.3f : 0.15f))
     {
         args.ModifiedDamage = 0f;
     }
 }