public static GameActorHealthEffect GeneratePoison(float dps = 3, bool damagesEnemies = true, float duration = 4, bool affectsPlayers = true) { GameActorHealthEffect customPoison = new GameActorHealthEffect { duration = duration, TintColor = StaticStatusEffects.irradiatedLeadEffect.TintColor, DeathTintColor = StaticStatusEffects.irradiatedLeadEffect.DeathTintColor, effectIdentifier = "Poison", AppliesTint = true, AppliesDeathTint = true, resistanceType = EffectResistanceType.Poison, DamagePerSecondToEnemies = dps, ignitesGoops = false, //Eh OverheadVFX = StaticStatusEffects.irradiatedLeadEffect.OverheadVFX, AffectsEnemies = damagesEnemies, AffectsPlayers = StaticStatusEffects.irradiatedLeadEffect.AffectsPlayers, AppliesOutlineTint = StaticStatusEffects.irradiatedLeadEffect.AppliesOutlineTint, OutlineTintColor = StaticStatusEffects.irradiatedLeadEffect.OutlineTintColor, PlaysVFXOnActor = StaticStatusEffects.irradiatedLeadEffect.PlaysVFXOnActor, }; return(customPoison); }
private void PostProcessBeamChanceTick(BeamController beamController) { if (UnityEngine.Random.value < this.chanceActivate) { Projectile projectile2 = ((Gun)ETGMod.Databases.Items[341]).DefaultModule.projectiles[0]; GameObject gameObject = SpawnManager.SpawnProjectile(projectile2.gameObject, base.Owner.sprite.WorldCenter, Quaternion.Euler(0f, 0f, (base.Owner.CurrentGun == null) ? 0f : base.Owner.CurrentGun.CurrentAngle), true); Projectile component = gameObject.GetComponent <Projectile>(); if (component != null) { if (Owner.PlayerHasActiveSynergy("Bleeding Edge")) { GameActorHealthEffect bleed = (PickupObjectDatabase.GetById(204) as BulletStatusEffectItem).HealthModifierEffect; bleed.effectIdentifier = "Cel sawblade bleed"; bleed.resistanceType = EffectResistanceType.None; bleed.TintColor = new Color(201, 0, 0, .25f); component.healthEffect = bleed; component.PoisonApplyChance = 1; component.AppliesPoison = true; } component.Owner = base.Owner; component.Shooter = base.Owner.specRigidbody; component.baseData.speed = 25f; component.baseData.damage = 7f; } } }
private void OnPreCollision(SpeculativeRigidbody myRigidbody, PixelCollider myCollider, SpeculativeRigidbody otherRigidbody, PixelCollider otherCollider) { PlayerController player = this.Owner; PhysicsEngine.SkipCollision = true; RoomHandler currentRoom = GameManager.Instance.PrimaryPlayer.CurrentRoom; AIActor component = otherRigidbody.GetComponent <AIActor>(); bool flag = component != null; if (flag) { if (component.healthHaver && component.CenterPosition.GetAbsoluteRoom() == currentRoom) { if (didDamage == false && !player.IsStealthed) { didDamage = true; GameManager.Instance.StartCoroutine(this.DamageTimer()); if (player.HasPickupID(822) || player.HasPickupID(457)) { Gun gun = PickupObjectDatabase.GetById(616) as Gun; GameActorHealthEffect bleedEffect = new GameActorHealthEffect { TintColor = Color.red, DeathTintColor = Color.red, AppliesTint = true, AppliesDeathTint = true, AffectsEnemies = true, AffectsPlayers = false, effectIdentifier = "sharpguonbleed", resistanceType = EffectResistanceType.None, duration = 3f, DamagePerSecondToEnemies = 3f, stackMode = GameActorEffect.EffectStackingMode.Refresh }; component.ApplyEffect(bleedEffect, 1, null); Vector3 vector = component.sprite.WorldBottomLeft.ToVector3ZisY(0); Vector3 vector2 = component.sprite.WorldTopRight.ToVector3ZisY(0); float num = (vector2.y - vector.y) * (vector2.x - vector.x); float num2 = 50f * num; int num3 = Mathf.CeilToInt(Mathf.Max(1f, num2 * BraveTime.DeltaTime)); int num4 = num3; Vector3 minPosition = vector; Vector3 maxPosition = vector2; Vector3 direction = Vector3.up / 2f; float angleVariance = 120f; float magnitudeVariance = 3f; float? startLifetime = new float?(UnityEngine.Random.Range(12, 20f)); GlobalSparksDoer.DoRandomParticleBurst(num4, minPosition, maxPosition, direction, angleVariance, magnitudeVariance, null, startLifetime, null, GlobalSparksDoer.SparksType.BLOODY_BLOOD); } component.healthHaver.ApplyDamage(4f, Vector2.zero, "Sharp Guon", CoreDamageTypes.None, DamageCategory.Normal, false, null, false); } } } }
public void OnHit(Projectile proj, SpeculativeRigidbody target, bool flag) { if (proj && proj.specRigidbody) { target?.aiActor?.ParentRoom?.BetterDoToEnemiesInRadius(proj.specRigidbody.UnitCenter, 6, delegate(AIActor enemy) { if (BoxOTools.BasicRandom(0.5f)) { GameActorHealthEffect poisonEffect = Gungeon.Game.Items["irradiated_lead"].GetComponent <BulletStatusEffectItem>().HealthModifierEffect; enemy.ApplyEffect(poisonEffect); } }); } }
private void PostProcess(Projectile proj, float scalar) { GameActorHealthEffect effect = (PickupObjectDatabase.GetById(204) as BulletStatusEffectItem).HealthModifierEffect; //effect.DamagePerSecondToEnemies *= (Mathf.Clamp((Owner.gameObject.GetOrAddComponent<RiskStat>().RiskAMT * .3f) + 1, 1, 2.5f)); float chance = Mathf.Clamp(Owner.gameObject.GetOrAddComponent <RiskStat>().RiskAMT * .3f, .3f, 1f); if (UnityEngine.Random.value <= chance) { proj.AppliesPoison = true; proj.healthEffect = effect; proj.AdjustPlayerProjectileTint(Color.green.WithAlpha(Color.green.a / 2f), 5, 0f); proj.PoisonApplyChance = 1; } }
// Token: 0x0600034F RID: 847 RVA: 0x00020258 File Offset: 0x0001E458 private void OnHitEnemy(Projectile bullet, SpeculativeRigidbody enemy, bool fatal) { bool flag = enemy && enemy.gameActor && enemy.healthHaver; if (flag) { bool flag2 = UnityEngine.Random.value <= (float)this.procChance; if (flag2) { GameActorHealthEffect healthModifierEffect = Game.Items["irradiated_lead"].GetComponent <BulletStatusEffectItem>().HealthModifierEffect; GameActorHealthEffect gameActorHealthEffect = new GameActorHealthEffect { duration = healthModifierEffect.duration, DamagePerSecondToEnemies = healthModifierEffect.DamagePerSecondToEnemies, TintColor = this.tintColour, DeathTintColor = this.tintColour, effectIdentifier = healthModifierEffect.effectIdentifier, AppliesTint = true, AppliesDeathTint = true, resistanceType = EffectResistanceType.Poison, OverheadVFX = healthModifierEffect.OverheadVFX, AffectsEnemies = true, AffectsPlayers = false, AppliesOutlineTint = false, ignitesGoops = false, OutlineTintColor = this.tintColour, PlaysVFXOnActor = false }; bool flag3 = this.duration > 0; if (flag3) { gameActorHealthEffect.duration = (float)this.duration; } enemy.gameActor.ApplyEffect(gameActorHealthEffect, 1f, null); } } else { ETGModConsole.Log("Target could not be poisoned", false); } }
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 void Greenify(AIActor target) { PlayerController playerController = gun.CurrentOwner as PlayerController; if (playerController.PlayerHasActiveSynergy("No Running Away!") && UnityEngine.Random.value <= 0.25f) { target.ApplyEffect(this.NoMoveDebuff, 1f, null); GameActorHealthEffect tint = new GameActorHealthEffect() { TintColor = Color.green, DeathTintColor = Color.green, AppliesTint = true, AppliesDeathTint = true, AffectsEnemies = true, DamagePerSecondToEnemies = 0f, duration = 10000000, effectIdentifier = "SpearOfJusticeGreening", }; target.ApplyEffect(tint); } }
// Token: 0x0600017F RID: 383 RVA: 0x00013D64 File Offset: 0x00011F64 public static GameActorHealthEffect CopyPoisonFrom(this GameActorHealthEffect self, GameActorHealthEffect other) { bool flag = self == null; if (flag) { self = new GameActorHealthEffect(); } bool flag2 = other == null; GameActorHealthEffect result; if (flag2) { result = null; } else { self.CopyEffectFrom(other); self.DamagePerSecondToEnemies = other.DamagePerSecondToEnemies; self.ignitesGoops = other.ignitesGoops; result = self; } return(result); }