public static void AddHololensInterface() { // Remove the Main Camera if found. GameObject _mainCam = GameObject.FindWithTag("MainCamera"); if (_mainCam != null) { Object.DestroyImmediate(_mainCam); } // Remove old interface if it exists Veil _mainVeil = GameObject.FindObjectOfType <Veil>(); if (_mainVeil != null) { Object.DestroyImmediate(_mainVeil.gameObject); } // Add the Hololens Prefab GameObject _hl = HUXEditorUtils.AddToScene(HololensPath, false); if (Selection.activeGameObject) { _hl.transform.parent = Selection.activeGameObject.transform; } }
private static bool IsFullDebuffed() { if ((Atos != null && Atos.CanBeCasted() && Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Atos.Name) && !Target.HasModifier("modifier_item_rod_of_atos") && !Utils.SleepCheck("atossleep")) || (Veil != null && Veil.CanBeCasted() && Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Veil.Name) && !Target.HasModifier("modifier_item_veil_of_discord")) || (Silence != null && Silence.CanBeCasted() && Menu.Item("abilities").GetValue <AbilityToggler>().IsEnabled(Silence.Name) && !Target.HasModifier("modifier_skywrath_mage_ancient_seal")) || (Orchid != null && Orchid.CanBeCasted() && Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Orchid.Name) && !Target.HasModifier("modifier_item_orchid_malevolence")) || (Ethereal != null && Ethereal.CanBeCasted() && Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name) && !Target.HasModifier("modifier_item_ethereal_blade_slow") && !Utils.SleepCheck("slowsleep")) || (Bloodthorn != null && Bloodthorn.CanBeCasted() && Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Bloodthorn.Name) && !Target.HasModifier("modifier_item_bloodthorn")) || (Slow != null && Slow.CanBeCasted() && Menu.Item("abilities").GetValue <AbilityToggler>().IsEnabled(Slow.Name) && !Target.HasModifier("modifier_skywrath_mage_concussive_shot_slow")) && !Utils.SleepCheck("slowsleep")) { return(false); } return(true); }
private static bool NothingCanCast() { return(!Q.CanBeCasted() && !W.CanBeCasted() && !R.CanBeCasted() && !Dagon.CanBeCasted() && (!Ethereal.CanBeCasted() || !_menuValue.IsEnabled("item_ethereal_blade")) && (!Hex.CanBeCasted() || !_menuValue.IsEnabled("item_sheepstick")) && (!Shiva.CanBeCasted() || !_menuValue.IsEnabled("item_shivas_guard")) && (!Eul.CanBeCasted() || !_menuValue.IsEnabled("item_cyclone")) && (!Veil.CanBeCasted() || !_menuValue.IsEnabled("item_veil_of_discord")) && (!Orchid.CanBeCasted() || !_menuValue.IsEnabled("item_orchid"))); }
private void Start() { m_Veil = Veil.Instance; m_InitialPosition = m_Veil.transform.position; m_InitialRotation = m_Veil.transform.rotation; // VR Mode if (VRSettings.loadedDeviceName == "Oculus" || VRSettings.loadedDeviceName == "PlayStationVR") { InputTracking.Recenter(); } }
private void LoadParticleSystem() { //particleSystems List <Texture2D> texList = new List <Texture2D>(); texList.Add(GameConstants.Content.Load <Texture2D>("Particles/bubble")); //texList.Add(GameConstants.Content.Load<Texture2D>("Particles/cloud1")); //texList.Add(GameConstants.Content.Load<Texture2D>("Particles/cloud2")); //texList.Add(GameConstants.Content.Load<Texture2D>("Particles/cloud3")); VeilParticles = new VeilOfDath(texList, 10, 1f, new Vector2(0.5f, 0.5f)); VeilofDeath = new Veil(GameConstants.iDifficulty, Player, VeilParticles); }
private static bool nothingCanCast() { if (!Laser.CanBeCasted() && !Rocket.CanBeCasted() && !Ethereal.CanBeCasted() && !Dagon.CanBeCasted() && !Hex.CanBeCasted() && !Veil.CanBeCasted()) { return(true); } else { return(false); } }
public static void Game_OnUpdate(EventArgs args) { me = ObjectMgr.LocalHero; if (me == null || !Game.IsInGame || me.ClassID != ClassID.CDOTA_Unit_Hero_Tinker) { return; } // Ability init Laser = me.Spellbook.Spell1; Rocket = me.Spellbook.Spell2; Refresh = me.Spellbook.Spell4; // Item init Blink = me.FindItem("item_blink"); Dagon = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon")); Hex = me.FindItem("item_sheepstick"); Soulring = me.FindItem("item_soul_ring"); Ethereal = me.FindItem("item_ethereal_blade"); Veil = me.FindItem("item_veil_of_discord"); Orchid = me.FindItem("item_orchid"); Shiva = me.FindItem("item_shivas_guard"); // Manacost calculations var manaForCombo = Laser.ManaCost + Rocket.ManaCost; if (Dagon != null && Dagon.CanBeCasted()) { manaForCombo += 180; } if (Hex != null && Hex.CanBeCasted()) { manaForCombo += 100; } if (Ethereal != null && Ethereal.CanBeCasted()) { manaForCombo += 150; } if (Veil != null && Veil.CanBeCasted()) { manaForCombo += 50; } if (Shiva != null && Shiva.CanBeCasted()) { manaForCombo += 100; } // Main combo if (active && toggle) { if ((target == null || !target.IsVisible) && !me.IsChanneling()) { me.Move(Game.MousePosition); } target = me.ClosestToMouseTarget(1000); if (target != null && target.IsAlive && !target.IsIllusion && !target.IsMagicImmune() && Utils.SleepCheck("refresh") && !Refresh.IsChanneling) { if (Soulring != null && Soulring.CanBeCasted() && me.Health > 300 && Utils.SleepCheck("soulring")) { Soulring.UseAbility(); Utils.Sleep(150 + Game.Ping, "soulring"); } // Blink if (Blink != null && Blink.CanBeCasted() && (me.Distance2D(target) > 500) && Utils.SleepCheck("Blink") && blinkToggle) { Blink.UseAbility(target.Position); Utils.Sleep(1000 + Game.Ping, "Blink"); } // Items else if (Shiva != null && Shiva.CanBeCasted() && Utils.SleepCheck("shiva")) { Shiva.UseAbility(); Utils.Sleep(100 + Game.Ping, "shiva"); Utils.ChainStun(me, 200 + Game.Ping, null, false); } else if (Veil != null && Veil.CanBeCasted() && Utils.SleepCheck("veil")) { Veil.UseAbility(target.Position); Utils.Sleep(150 + Game.Ping, "veil"); Utils.Sleep(300 + Game.Ping, "ve"); Utils.ChainStun(me, 170 + Game.Ping, null, false); } else if (Hex != null && Hex.CanBeCasted() && Utils.SleepCheck("hex")) { Hex.UseAbility(target); Utils.Sleep(150 + Game.Ping, "hex"); Utils.Sleep(300 + Game.Ping, "h"); Utils.ChainStun(me, 170 + Game.Ping, null, false); } else if (Ethereal != null && Ethereal.CanBeCasted() && Utils.SleepCheck("ethereal")) { Ethereal.UseAbility(target); Utils.Sleep(270 + Game.Ping, "ethereal"); Utils.ChainStun(me, 200 + Game.Ping, null, false); } else if (Dagon != null && Dagon.CanBeCasted() && Utils.SleepCheck("ethereal") && Utils.SleepCheck("h") && Utils.SleepCheck("dagon") && Utils.SleepCheck("veil")) { Dagon.UseAbility(target); Utils.Sleep(270 + Game.Ping, "dagon"); Utils.ChainStun(me, 200 + Game.Ping, null, false); } // Skills else if (Rocket != null && Rocket.CanBeCasted() && Utils.SleepCheck("rocket") && Utils.SleepCheck("ethereal") && Utils.SleepCheck("veil")) { Rocket.UseAbility(); Utils.Sleep(150 + Game.Ping, "rocket"); Utils.ChainStun(me, 150 + Game.Ping, null, false); } else if (Laser != null && Laser.CanBeCasted() && Utils.SleepCheck("laser") && Utils.SleepCheck("ethereal") && Utils.SleepCheck("rocket")) { Laser.UseAbility(target); Utils.Sleep(150 + Game.Ping, "laser"); Utils.ChainStun(me, 150 + Game.Ping, null, false); } else if (Refresh != null && Refresh.CanBeCasted() && me.Mana > 200 && Utils.SleepCheck("refresh") && !Refresh.IsChanneling && nothingCanCast()) { Refresh.UseAbility(); Utils.ChainStun(me, (Refresh.ChannelTime * 1000) + Game.Ping + 400, null, false); Utils.Sleep(700 + Game.Ping, "refresh"); } else if (!me.IsChanneling() && !Refresh.IsChanneling && nothingCanCast()) { me.Attack(target); } } } }
// ---------------------------------------------------------------- // Initialize // ---------------------------------------------------------------- public void Initialize(GameController _gameControllerRef, Transform tf_world, RoomData _roomData) { gameControllerRef = _gameControllerRef; MyRoomData = _roomData; this.gameObject.name = MyRoomData.RoomKey; GameUtils.ParentAndReset(this.gameObject, tf_world); this.transform.localPosition = PosGlobal; // Position me! // Initialize channels! gateChannels = new GateChannel[5]; for (int i = 0; i < gateChannels.Length; i++) { gateChannels[i] = new GateChannel(this, i); } // Instantiate my props! RoomData rd = MyRoomData; ResourcesHandler rh = ResourcesHandler.Instance; int numProgressGates = 0; // for deteriming their indexes. int numVeils = 0; // for determining their indexes. foreach (PropData propData in rd.allPropDatas) { System.Type pt = propData.GetType(); if (false) { } // Enemies else if (pt == typeof(DweebData)) { Dweeb newProp = Instantiate(rh.Dweeb).GetComponent <Dweeb>(); newProp.Initialize(this, propData as DweebData); } // Grounds else if (pt == typeof(CrateData)) { Crate newProp = Instantiate(rh.Crate).GetComponent <Crate>(); newProp.Initialize(this, propData as CrateData); } else if (pt == typeof(DispGroundData)) { DispGround newProp = Instantiate(rh.DispGround).GetComponent <DispGround>(); newProp.Initialize(this, propData as DispGroundData); } else if (pt == typeof(GateData)) { Gate newProp = Instantiate(rh.Gate).GetComponent <Gate>(); newProp.Initialize(this, propData as GateData); gateChannels[newProp.ChannelID].AddGate(newProp); } else if (pt == typeof(ToggleGroundData)) { ToggleGround newProp = Instantiate(rh.ToggleGround).GetComponent <ToggleGround>(); newProp.Initialize(this, propData as ToggleGroundData); } else if (pt == typeof(PlatformData)) { Platform newProp = Instantiate(rh.Platform).GetComponent <Platform>(); newProp.Initialize(this, propData as PlatformData); } else if (pt == typeof(GroundData)) { Ground newProp = Instantiate(rh.Ground).GetComponent <Ground>(); newProp.Initialize(this, propData as GroundData); } // Everything else! else if (pt == typeof(BatteryData)) { Battery newProp = Instantiate(rh.Battery).GetComponent <Battery>(); newProp.Initialize(this, propData as BatteryData); } else if (pt == typeof(BuzzsawData)) { Buzzsaw newProp = Instantiate(rh.Buzzsaw).GetComponent <Buzzsaw>(); newProp.Initialize(this, propData as BuzzsawData); } else if (pt == typeof(CharBarrelData)) { CharBarrel newProp = Instantiate(rh.CharBarrel).GetComponent <CharBarrel>(); newProp.Initialize(this, propData as CharBarrelData, charBarrels.Count); charBarrels.Add(newProp); } else if (pt == typeof(CharUnlockOrbData)) { CharUnlockOrb newProp = Instantiate(rh.CharUnlockOrb).GetComponent <CharUnlockOrb>(); newProp.Initialize(this, propData as CharUnlockOrbData); } else if (pt == typeof(CameraBoundsData)) { CameraBounds newProp = Instantiate(rh.CameraBounds).GetComponent <CameraBounds>(); newProp.Initialize(this, propData as CameraBoundsData); } else if (pt == typeof(GateButtonData)) { GateButton newProp = Instantiate(rh.GateButton).GetComponent <GateButton>(); newProp.Initialize(this, propData as GateButtonData); gateChannels[newProp.ChannelID].AddButton(newProp); } else if (pt == typeof(GemData)) { Gem newProp = Instantiate(rh.Gem).GetComponent <Gem>(); newProp.Initialize(this, propData as GemData, gems.Count); gems.Add(newProp); } else if (pt == typeof(InfoSignData)) { InfoSign newProp = Instantiate(rh.InfoSign).GetComponent <InfoSign>(); newProp.Initialize(this, propData as InfoSignData); } else if (pt == typeof(LaserData)) { Laser newProp = Instantiate(rh.Laser).GetComponent <Laser>(); newProp.Initialize(this, propData as LaserData); } else if (pt == typeof(LiftData)) { Lift newProp = Instantiate(rh.Lift).GetComponent <Lift>(); newProp.Initialize(this, propData as LiftData); } else if (pt == typeof(PlayerStartData)) { PlayerStart newProp = Instantiate(rh.PlayerStart).GetComponent <PlayerStart>(); newProp.Initialize(this, propData as PlayerStartData); } else if (pt == typeof(ProgressGateData)) { ProgressGate newProp = Instantiate(rh.ProgressGate).GetComponent <ProgressGate>(); newProp.Initialize(this, propData as ProgressGateData, numProgressGates++); } else if (pt == typeof(RoomDoorData)) { RoomDoor newProp = Instantiate(rh.RoomDoor).GetComponent <RoomDoor>(); newProp.Initialize(this, propData as RoomDoorData); } else if (pt == typeof(SnackData)) { Snack newProp = Instantiate(rh.Snack).GetComponent <Snack>(); newProp.Initialize(this, propData as SnackData, snacks.Count); snacks.Add(newProp); } else if (pt == typeof(SpikesData)) { Spikes newProp = Instantiate(rh.Spikes).GetComponent <Spikes>(); newProp.Initialize(this, propData as SpikesData); } else if (pt == typeof(TurretData)) { Turret newProp = Instantiate(rh.Turret).GetComponent <Turret>(); newProp.Initialize(this, propData as TurretData); } else if (pt == typeof(VeilData)) { Veil newProp = Instantiate(rh.Veil).GetComponent <Veil>(); newProp.Initialize(this, propData as VeilData, numVeils++); } else { Debug.LogWarning("PropData not recognized: " + propData); } } AddHardcodedRoomElements(); // For development, add bounds so we don't fall out of unconnected rooms! AutoAddInvisibounds(); roomGizmos.Initialize(this); shutters.Initialize(this); }
private async void UseItem(CancellationToken token) { // SoulRing if (SoulRing != null && Config.ItemsToggler.Value.IsEnabled(SoulRing.Item.Name) && SoulRing.CanBeCasted) { SoulRing.UseAbility(); await Await.Delay(SoulRing.GetCastDelay(), token); } else { Elsecount += 1; } // MidnightPulse if (MidnightPulse != null && Config.AbilityToggler.Value.IsEnabled(MidnightPulse.Ability.Name) && MidnightPulse.CanBeCasted) { MidnightPulse.UseAbility(Output.CastPosition); await Await.Delay(MidnightPulse.GetCastDelay(Output.CastPosition), token); } else { Elsecount += 1; } // GlimmerCape if (GlimmerCape != null && Config.ItemsToggler.Value.IsEnabled(GlimmerCape.Item.Name) && GlimmerCape.CanBeCasted) { GlimmerCape.UseAbility(Owner); await Await.Delay(GlimmerCape.GetCastDelay(Owner), token); } else { Elsecount += 1; } // BKB if (BKB != null && Config.ItemsToggler.Value.IsEnabled(BKB.Item.Name) && BKB.CanBeCasted) { BKB.UseAbility(); await Await.Delay(BKB.GetCastDelay(), token); } else { Elsecount += 1; } // Shivas if (Shivas != null && Config.ItemsToggler.Value.IsEnabled(Shivas.Item.Name) && Shivas.CanBeCasted) { Shivas.UseAbility(); await Await.Delay(Shivas.GetCastDelay(), token); } else { Elsecount += 1; } // ArcaneBoots if (ArcaneBoots != null && Config.ItemsToggler.Value.IsEnabled(ArcaneBoots.Item.Name) && ArcaneBoots.CanBeCasted && Owner.Mana * 100 / Owner.MaximumMana <= 92 && Elsecount == 5) { ArcaneBoots.UseAbility(); await Await.Delay(ArcaneBoots.GetCastDelay(), token); } // Guardian if (Guardian != null && Config.ItemsToggler.Value.IsEnabled(Guardian.Item.Name) && Guardian.CanBeCasted && Owner.Mana * 100 / Owner.MaximumMana <= 92 && Elsecount == 5) { Guardian.UseAbility(); await Await.Delay(Guardian.GetCastDelay(), token); } // Veil if (Veil != null && Config.ItemsToggler.Value.IsEnabled(Veil.Item.Name) && Veil.CanBeCasted) { Veil.UseAbility(Output.CastPosition); await Await.Delay(Veil.GetCastDelay(Output.CastPosition), token); } else { Elsecount += 1; } }
private static void ComboUsage(EventArgs args) { if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame || Game.IsChatOpen) { return; } Target = Me.ClosestToMouseTarget(ClosestToMouseRange.GetValue <Slider>().Value); if (Game.IsKeyDown(ComboKey.GetValue <KeyBind>().Key)) { GetAbilities(); if (Target == null || !Target.IsValid || !Target.IsVisible || Target.IsIllusion || !Target.IsAlive || Me.IsChanneling() || Target.IsInvul() || HasModifiers()) { return; } if (Target.IsLinkensProtected()) { PopLinkens(Cyclone); PopLinkens(ForceStaff); PopLinkens(Atos); PopLinkens(Sheep); PopLinkens(Orchid); PopLinkens(Dagon); PopLinkens(Silence); } else { if (!Utils.SleepCheck("combosleep")) { return; } Orbwalk(); if (Target.Distance2D(Me.Position) < 700) { if (Utils.SleepCheck("ezkill")) { EzKill = IsEzKillable(); Utils.Sleep(5000, "ezkill"); } } if (Soulring != null && Soulring.CanBeCasted() && SoulRing.GetValue <bool>()) { Soulring.UseAbility(); } if (!Target.UnitState.HasFlag(UnitState.Hexed) && !Target.UnitState.HasFlag(UnitState.Stunned)) { UseItem(Sheep, Sheep.GetCastRange()); } UseBlink(); CastAbility(Silence, Silence.GetCastRange()); CastAbility(Bolt, Bolt.GetCastRange()); CastAbility(Slow, Slow.GetCastRange()); UseItem(Atos, Atos.GetCastRange(), 140); UseItem(Medal, Medal.GetCastRange()); UseItem(Orchid, Orchid.GetCastRange()); UseItem(Bloodthorn, Bloodthorn.GetCastRange()); UseItem(Veil, Veil.GetCastRange()); UseItem(Ethereal, Ethereal.GetCastRange()); UseDagon(); CastUltimate(); UseItem(Shivas, Shivas.GetCastRange()); Utils.Sleep(150, "combosleep"); } } if (Game.IsKeyDown(HarassKey.GetValue <KeyBind>().Key)) { GetAbilities(); if (Target == null || !Target.IsValid || !Target.IsVisible || Target.IsIllusion || !Target.IsAlive || Me.IsChanneling() || Target.IsInvul() || HasModifiers()) { return; } if (!Utils.SleepCheck("harasssleep")) { return; } Orbwalk(); CastAbility(Bolt, Bolt.GetCastRange()); Utils.Sleep(150, "harasssleep"); } }
private static bool IsEzKillable() { if (!Menu.Item("ezKillCheck").GetValue <bool>()) { return(false); } int totalDamage = 0; int plusPerc = 0; uint reqMana = 0; if (Ethereal != null && Ethereal.CanBeCasted() && Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name)) { totalDamage += (int) Target.SpellDamageTaken((int)(Me.TotalIntelligence * 2) + 75, DamageType.Magical, Me, Ethereal.Name); plusPerc += 40; reqMana += Ethereal.ManaCost; } if (Veil != null && Veil.CanBeCasted() && Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Veil.Name)) { plusPerc += 25; reqMana += Veil.ManaCost; } if (Silence != null && Silence.CanBeCasted() && Menu.Item("abilities").GetValue <AbilityToggler>().IsEnabled(Silence.Name)) { plusPerc += (int)((Silence.Level - 1) * 5 + 30); reqMana += Silence.ManaCost; } if (Dagon != null && Dagon.CanBeCasted() /*Menu.Item("magicItems").GetValue<AbilityToggler>().IsEnabled("item_dagon")*/) { totalDamage += (int) Target.SpellDamageTaken(Dagon.GetAbilityData("damage"), DamageType.Magical, Me, Dagon.Name, minusMagicResistancePerc: plusPerc); reqMana += Dagon.ManaCost; } if (Bolt != null && Bolt.CanBeCasted() && Menu.Item("abilities").GetValue <AbilityToggler>().IsEnabled(Bolt.Name)) { if (Bolt.Level < 4) { totalDamage += (int) Target.SpellDamageTaken((Bolt.GetAbilityData("bolt_damage") + Me.TotalIntelligence * 1.6f) * 1, DamageType.Magical, Me, Bolt.Name, minusMagicResistancePerc: plusPerc); reqMana += Bolt.ManaCost; } else { totalDamage += (int) Target.SpellDamageTaken((Bolt.GetAbilityData("bolt_damage") + Me.TotalIntelligence * 1.6f) * 2, DamageType.Magical, Me, Bolt.Name, minusMagicResistancePerc: plusPerc); reqMana += Bolt.ManaCost * 2; } } if (Slow != null && Slow.CanBeCasted() && Menu.Item("abilities").GetValue <AbilityToggler>().IsEnabled(Slow.Name)) { totalDamage += (int) Target.SpellDamageTaken(Slow.GetAbilityData("damage"), DamageType.Magical, Me, Slow.Name, minusMagicResistancePerc: plusPerc); reqMana += Slow.ManaCost; } if (Me.CanAttack()) { totalDamage += (int)Target.DamageTaken(Me.DamageAverage * 2, DamageType.Physical, Me); } return(reqMana < Me.Mana && Target.Health < totalDamage); }
private static void Game_OnUpdate(EventArgs args) { _me = ObjectManager.LocalHero; if (!Game.IsInGame || _me == null || _me.ClassID != ClassID.CDOTA_Unit_Hero_Lina) { return; } if (Game.IsPaused || Game.IsChatOpen) { return; } _menuValue = Menu.Item("enabledAbilities").GetValue <AbilityToggler>(); _slider = Menu.Item("distance").GetValue <Slider>().Value; Q = _me.Spellbook.Spell1; W = _me.Spellbook.Spell2; R = _me.Spellbook.Spell4; Dagon = _me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon")); Hex = _me.FindItem("item_sheepstick"); Ethereal = _me.FindItem("item_ethereal_blade"); Veil = _me.FindItem("item_veil_of_discord"); Orchid = _me.FindItem("item_orchid"); Shiva = _me.FindItem("item_shivas_guard"); Eul = _me.FindItem("item_cyclone"); Blink = _me.FindItem("item_blink"); if (!Game.IsKeyDown(Menu.Item("Cooombo").GetValue <KeyBind>().Key)) { _targetActive = false; return; } if (!_targetActive) { _target = _me.ClosestToMouseTarget(300); _targetActive = true; } else { var modifHex = _target.Modifiers.Where(y => y.Name == "modifier_sheepstick_debuff") .DefaultIfEmpty(null) .FirstOrDefault(); var modifEul = _target.Modifiers.Where(y => y.Name == "modifier_eul_cyclone").DefaultIfEmpty(null).FirstOrDefault(); if (_target == null || !_target.IsAlive || _target.IsIllusion || _target.IsMagicImmune()) { return; } if (Blink != null && Blink.CanBeCasted() && _me.Distance2D(_target) > _slider + 100 && _menuValue.IsEnabled("item_blink") && Utils.SleepCheck("blink")) { Blink.UseAbility(PositionCalc(_me, _target, _slider)); Utils.Sleep(150 + Game.Ping, "blink"); } else if (Eul != null && Eul.CanBeCasted() && Utils.SleepCheck("eul") && _menuValue.IsEnabled("item_cyclone") && Utils.SleepCheck("blink")) { Eul.UseAbility(_target); Utils.Sleep(4000 + Game.Ping, "eul"); } else if (Eul == null || Eul.Cooldown > 0 || !_menuValue.IsEnabled("item_cyclone")) { if (Orchid != null && Orchid.CanBeCasted() && Utils.SleepCheck("orchid") && modifEul == null && _menuValue.IsEnabled("item_orchid")) { Orchid.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "orchid"); } else if (Shiva != null && Shiva.CanBeCasted() && Utils.SleepCheck("shiva") && modifEul == null && _menuValue.IsEnabled("item_shivas_guard")) { Shiva.UseAbility(); Utils.Sleep(150 + Game.Ping, "shiva"); } else if (Veil != null && Veil.CanBeCasted() && Utils.SleepCheck("veil") && modifEul == null && _menuValue.IsEnabled("item_veil_of_discord")) { Veil.UseAbility(_target.Position); Utils.Sleep(150 + Game.Ping, "veil"); } else if (Ethereal != null && Ethereal.CanBeCasted() && Utils.SleepCheck("ethereal") && modifEul == null && _menuValue.IsEnabled("item_ethereal_blade")) { Ethereal.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "ethereal"); } else if (Dagon != null && Dagon.CanBeCasted() && Utils.SleepCheck("dagon") && modifEul == null) { Dagon.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "dagon"); } else if (Hex != null && Hex.CanBeCasted() && Utils.SleepCheck("hex") && !_target.IsStunned() && Utils.SleepCheck("eul") && _menuValue.IsEnabled("item_sheepstick")) { Hex.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "hex"); } else if (W != null && W.CanBeCasted() && Utils.SleepCheck("w") && (modifEul != null && modifEul.RemainingTime <= W.GetCastDelay(_me, _target, true) + 0.5 || modifHex != null && modifHex.RemainingTime <= W.GetCastDelay(_me, _target, true) + 0.5 || (Hex == null || !_menuValue.IsEnabled("item_sheepstick") || Hex.Cooldown > 0) && (Eul == null || !_menuValue.IsEnabled("item_cyclone") || Eul.Cooldown < 20 && Eul.Cooldown > 0))) { W.UseAbility(W.GetPrediction(_target, W.GetCastDelay(_me, _target))); Utils.Sleep(150 + Game.Ping, "w"); } else if (Q != null && Q.CanBeCasted() && Utils.SleepCheck("q") && modifEul == null) { Q.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "q"); } else if (R != null && R.CanBeCasted() && Utils.SleepCheck("r") && modifEul == null) { R.UseAbility(_target); Utils.Sleep(150 + Game.Ping, "r"); } else if (!_me.IsChanneling() && NothingCanCast() && !_target.IsAttackImmune() && Utils.SleepCheck("attack")) { _me.Attack(_target); Utils.Sleep(1000 + Game.Ping, "attack"); } } } }
protected override void LoadContent() { // Get a proprietory spriteBatch spriteBatch = new SpriteBatch(Game.GraphicsDevice); // Load background images backgroundTextureList[0] = Game.Content.Load<Texture2D>(@"Background Images\Background 1"); backgroundTextureList[1] = Game.Content.Load<Texture2D>(@"Background Images\Background 2"); // Load player, enemies, obstacles, and so forth // Load player Texture2D[] playerTextures = new Texture2D[8]; playerTextures[0] = Game.Content.Load<Texture2D>(@"Player\run"); playerTextures[1] = Game.Content.Load<Texture2D>(@"Player\run"); playerTextures[2] = Game.Content.Load<Texture2D>(@"Player\charge"); playerTextures[3] = Game.Content.Load<Texture2D>(@"Player\jump"); playerTextures[4] = Game.Content.Load<Texture2D>(@"Player\spit"); playerTextures[5] = Game.Content.Load<Texture2D>(@"Player\beaten"); playerTextures[6] = Game.Content.Load<Texture2D>(@"Player\fallover"); playerTextures[7] = Game.Content.Load<Texture2D>(@"Player\turbo"); Point[] playerFrameSizes = new Point[8]; playerFrameSizes[0] = new Point(150, 150); playerFrameSizes[1] = new Point(150, 150); playerFrameSizes[2] = new Point(150, 150); playerFrameSizes[3] = new Point(150, 150); playerFrameSizes[4] = new Point(150, 150); playerFrameSizes[5] = new Point(150, 150); playerFrameSizes[6] = new Point(150, 150); playerFrameSizes[7] = new Point(250, 250); Point[] playerSheetSizes = new Point[8]; playerSheetSizes[0] = new Point(3, 1); playerSheetSizes[1] = new Point(3, 1); playerSheetSizes[2] = new Point(1, 1); playerSheetSizes[3] = new Point(1, 1); playerSheetSizes[4] = new Point(1, 1); playerSheetSizes[5] = new Point(1, 1); playerSheetSizes[6] = new Point(1, 1); playerSheetSizes[7] = new Point(2, 1); SoundEffect playerSoundEffect = Game.Content.Load<SoundEffect>(@"Music\jump"); player = new UserControlledSprite(playerTextures, new Vector2(200, UserControlledSprite.groundLineY), playerFrameSizes, 20, new Point(0, 0), playerSheetSizes, Vector2.Zero, playerSoundEffect, 133); // Pre-load textures for later usage Game.Content.Load<Texture2D>(@"Obstacles\bracket"); Game.Content.Load<Texture2D>(@"Obstacles\peel"); Game.Content.Load<Texture2D>(@"Obstacles\beauty"); Game.Content.Load<Texture2D>(@"PowerUps\bane available"); Game.Content.Load<Texture2D>(@"PowerUps\bane consumed"); Game.Content.Load<Texture2D>(@"PowerUps\bread available"); Game.Content.Load<Texture2D>(@"PowerUps\bread consumed"); Game.Content.Load<Texture2D>(@"PowerUps\Heart"); Game.Content.Load<Texture2D>(@"PowerUps\Dog Food 1"); Game.Content.Load<Texture2D>(@"PowerUps\Dog Food 2"); Game.Content.Load<Texture2D>(@"Weapons\food vestigial"); Game.Content.Load<Texture2D>(@"Enemy Weapons\mud"); Game.Content.Load<Texture2D>(@"Enemies/muddy red idle"); Game.Content.Load<Texture2D>(@"Enemies/muddy red dying"); Game.Content.Load<Texture2D>(@"Enemies/muddy red attacking"); Game.Content.Load<SoundEffect>(@"Music\bane hurt"); Game.Content.Load<SoundEffect>(@"Music\burp"); Game.Content.Load<SoundEffect>(@"Music\eat"); Game.Content.Load<SoundEffect>(@"Music\hit"); Game.Content.Load<SoundEffect>(@"Music\seduce"); Game.Content.Load<SoundEffect>(@"Music\slip"); Game.Content.Load<SoundEffect>(@"Music\dog food"); Game.Content.Load<SoundEffect>(@"Music\heart"); for (int i = 0; i < 4; ++i) { Game.Content.Load<Texture2D>(@"Enemies\Muddy Green " + (i + 1).ToString()); } // Load veil Texture2D[] veilTextures = new Texture2D[6]; for (int i = 0; i < veilTextures.Length; ++i) { veilTextures[i] = Game.Content.Load<Texture2D>(@"Veils\Veil " + (i + 1).ToString()); } veil = new Veil(veilTextures, 200); // Load font for score display scoreFont = Game.Content.Load<SpriteFont>(@"Fonts\score"); // Load maxNumOfLives of lives into livesList Texture2D[] lifeTextures = new Texture2D[1]; lifeTextures[0] = Game.Content.Load<Texture2D>(@"PowerUps\Heart"); Point[] lifeFrameSizes = new Point[1]; lifeFrameSizes[0] = new Point(75, 75); Point[] lifeSheetSizes = new Point[1]; lifeSheetSizes[0] = new Point(1, 1); // Initial number of lives is three for (int i = 0; i < 3; i++) { livesList.Add(new Weapon(lifeTextures, new Vector2( i * 50 + 10, 10), lifeFrameSizes, 10, new Point(0, 0), lifeSheetSizes, Vector2.Zero, null, .6f, 0)); } //trackSound = Game.Content.Load<SoundEffect>(@"Music\background music"); //trackSoundInstance = trackSound.CreateInstance(); //trackSoundInstance.IsLooped = true; //trackSoundInstance.Play(); trackSong = Game.Content.Load<Song>(@"Music\town"); MediaPlayer.IsRepeating = true; base.LoadContent(); }