public StormElitesManager() { var eliteDef = new EliteDef { modifierToken = EliteName, color = new Color32(162, 179, 241, 255) }; var equipDef = new EquipmentDef { cooldown = 10f, pickupModelPath = "", pickupIconPath = HailstormAssets.IconStormElite, nameToken = EquipName, pickupToken = "Storm Bringer", descriptionToken = "Storm Bringer", canDrop = false, enigmaCompatible = false }; var buffDef = new BuffDef { buffColor = eliteDef.color, iconPath = HailstormAssets.IconStormElite, canStack = false }; var equip = new CustomEquipment(equipDef, new ItemDisplayRule[0]); var buff = new CustomBuff(BuffName, buffDef); var elite = new CustomElite(EliteName, eliteDef, equip, buff, 1); EliteIndex = (EliteIndex)ItemAPI.AddCustomElite(elite); BuffIndex = (BuffIndex)ItemAPI.AddCustomBuff(buff); EquipIndex = (EquipmentIndex)ItemAPI.AddCustomEquipment(equip); eliteDef.eliteEquipmentIndex = EquipIndex; equipDef.passiveBuff = BuffIndex; buffDef.eliteIndex = EliteIndex; //Storm elites are immune to twisters TwisterProjectileController.ImmunityBuff = BuffIndex; TornadoLauncher.StormBuff = BuffIndex; //Storm elites are tier 2 elites, on the same order as malachites //They're a bit less tanky than malachites, but even more dangerous in terms of damage var card = new EliteAffixCard { spawnWeight = 1.0f, costMultiplier = 30.0f, damageBoostCoeff = 6.0f, healthBoostCoeff = 20.0f, eliteType = EliteIndex, isAvailable = () => Run.instance.loopClearCount > 0, onSpawned = OnSpawned }; //Register the card for spawning if ESO is enabled EsoLib.Cards.Add(card); Card = card; }
public BarrierElitesManager() { var eliteDef = new EliteDef { modifierToken = BarrierElitesManager.EliteName, color = new Color32(162, 179, 241, 255) }; var equipDef = new EquipmentDef { cooldown = 10f, pickupModelPath = "", pickupIconPath = HailstormAssets.IconBarrierElite, nameToken = EquipName, pickupToken = "Shield-Bearer", descriptionToken = "Shield-Bearer", canDrop = false, enigmaCompatible = false }; var buffDef = new BuffDef { buffColor = eliteDef.color, iconPath = HailstormAssets.IconBarrierElite, canStack = false }; var equip = new CustomEquipment(equipDef, new ItemDisplayRule[0]); var buff = new CustomBuff(BuffName, buffDef); var elite = new CustomElite(EliteName, eliteDef, equip, buff, 1); _eliteIndex = (EliteIndex)ItemAPI.AddCustomElite(elite); _buffIndex = (BuffIndex)ItemAPI.AddCustomBuff(buff); _equipIndex = (EquipmentIndex)ItemAPI.AddCustomEquipment(equip); eliteDef.eliteEquipmentIndex = _equipIndex; equipDef.passiveBuff = _buffIndex; buffDef.eliteIndex = _eliteIndex; //Barrier elites are a bit more uncommon than regular tier 1 elites //They're also a bit tankier than usual, but not more damaging var card = new EliteAffixCard { spawnWeight = 0.5f, costMultiplier = 10.0f, damageBoostCoeff = 1.0f, healthBoostCoeff = 10.0f, eliteType = _eliteIndex }; //Register the card for spawning if ESO is enabled EsoLib.Cards.Add(card); Card = card; }
private void AddFireBuff() { #pragma warning disable CS0618 // Type or member is obsolete this.fireBuff = (BuffIndex)ItemAPI.AddCustomBuff(new CustomBuff("AltArtiFireBuff", new BuffDef { buffColor = new Color(0.9f, 0.2f, 0.2f), canStack = true, iconPath = "Textures/BuffIcons/texBuffAffixRed", isDebuff = false, name = "AltArtiFireBuff" })); #pragma warning restore CS0618 // Type or member is obsolete this.burnBuff = BuffIndex.OnFire; this.burnDot = DotController.DotIndex.Burn; AltArtiPassive.fireBuff = this.fireBuff; }
public DarkElitesManager() { _rng = new Xoroshiro128Plus((ulong)DateTime.Now.Ticks); var eliteDef = new EliteDef { modifierToken = EliteName, color = new Color32(0, 0, 0, 255), }; var equipDef = new EquipmentDef { cooldown = 10f, pickupModelPath = "", pickupIconPath = HailstormAssets.IconDarkElite, nameToken = EquipName, pickupToken = "Darkness", descriptionToken = "Night-bringer", canDrop = false, enigmaCompatible = false }; var buffDef = new BuffDef { buffColor = new Color32(255, 255, 255, 255), iconPath = HailstormAssets.IconDarkElite, canStack = false }; var equip = new CustomEquipment(equipDef, new ItemDisplayRule[0]); var buff = new CustomBuff(BuffName, buffDef); var elite = new CustomElite(EliteName, eliteDef, equip, buff, 1); _eliteIndex = (EliteIndex)ItemAPI.AddCustomElite(elite); _buffIndex = (BuffIndex)ItemAPI.AddCustomBuff(buff); _equipIndex = (EquipmentIndex)ItemAPI.AddCustomEquipment(equip); eliteDef.eliteEquipmentIndex = _equipIndex; equipDef.passiveBuff = _buffIndex; buffDef.eliteIndex = _eliteIndex; //When the camera starts up, hook in our darkness effect On.RoR2.CameraRigController.Start += CameraRigControllerOnStart; //Update elite materials On.RoR2.CharacterModel.InstanceUpdate += CharacterModelOnInstanceUpdate; //Dark elites spawn much less frequently, but are only slightly stronger/costlier than tier 1s var card = new EliteAffixCard { spawnWeight = 0.3f, costMultiplier = 10.0f, damageBoostCoeff = 2.0f, healthBoostCoeff = 6.0f, eliteType = _eliteIndex }; //Register the card for spawning if ESO is enabled EsoLib.Cards.Add(card); Card = card; //Create random walk trackers for dark elite material texture animation _walkerU = new AnimatedFloat { Accel = 0.3f, MaxSpeed = 0.6f }; _walkerV = new AnimatedFloat { Accel = 0.3f, MaxSpeed = 0.6f }; //Whenever scene changes, stop the breathing sound SceneManager.sceneUnloaded += s => AkSoundEngine.PostEvent(SoundEvents.StopLargeBreathing, null); }