// Re-initialize everything! public void StartNewSpell (string spellType = null) { winBox.GetComponent<Canvas>().enabled = false; loseBox.GetComponent<Canvas>().enabled = false; isStarted = false; curSpell = null; spellList = GameObject.Find ("SpellList").GetComponent<SpellList> (); spellList.Reset (); ShowInstructions (); }
/// <summary> /// Local script initialization. Not much to do here at the moment /// </summary> void IScript.Init() { Console.WriteLine("Init() -- Begin"); // Initialize all the lists Bindings = new BindingList(); Actions = new PlayerActionList(); HealingSpells = new SpellList(); SConsumable.Instance.Init(player); Consumable = SConsumable.Instance; Console.WriteLine("Init() -- End"); }
public override void KillSteal() { foreach (var target in EntityManager.Heroes.Enemies.Where(e => e != null && e.IsValidTarget())) { foreach ( var skillshot in SpellList.Where( s => s.WillKill(target) && s.IsReady() && target.IsKillable(s.Range) && s.Slot != SpellSlot.W && KillStealMenu.CheckBoxValue(s.Slot)) .Select(spell => spell as Spell.Skillshot)) { skillshot.Cast(target, HitChance.Medium); } } }
public void SetUpSpells() { //intalize spell Q = new Spell(SpellSlot.Q, 900); W = new Spell(SpellSlot.W, 800); E = new Spell(SpellSlot.E, 875); R = new Spell(SpellSlot.R, 850); Q.SetSkillshot(0.25f, 100, 1600, false, SkillshotType.SkillshotLine); E.SetSkillshot(0.25f, 60, 1200, true, SkillshotType.SkillshotLine); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
private void LoadSpell() { //intalize spell Q = new Spell(SpellSlot.Q, 650); W = new Spell(SpellSlot.W, 900); E = new Spell(SpellSlot.E, 1005); R = new Spell(SpellSlot.R, 650); W.SetSkillshot(1.25f, 230f, float.MaxValue, false, SkillshotType.SkillshotCircle); E.SetSkillshot(.2f, 330f, float.MaxValue, false, SkillshotType.SkillshotCircle); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
public override void Draw() { if (DrawMenu.CheckBoxValue("LV")) { foreach (var enemy in StalkedEnemies.Where(e => Core.GameTickCount - e.LastVisibleTime > 100 && Core.GameTickCount - e.LastVisibleTime < 3750)) { Circle.Draw(SharpDX.Color.Red, 250, enemy.PredictedPosition); Drawing.DrawText(enemy.PredictedPosition.WorldToScreen(), Color.Red, enemy.Target.Name() + ": LastVisiblePosition", 10); } } foreach (var spell in SpellList.Where(s => DrawMenu.CheckBoxValue(s.Slot))) { Circle.Draw(spell.IsReady() ? SharpDX.Color.Chartreuse : SharpDX.Color.OrangeRed, spell.Range, user); } if (IsCastingR && LastRPosition != null) { if (AutoMenu.CheckBoxValue("Rmouse")) { Circle.Draw(SharpDX.Color.Goldenrod, AutoMenu.SliderValue("MouseRange"), Game.CursorPos); } if (DrawMenu.CheckBoxValue("RSector")) { JhinRSector(LastRPosition).Draw(Color.AliceBlue, 2); } } if (DrawMenu.CheckBoxValue("Notifications") && R.IsReady()) { var i = 0f; foreach (var t in EntityManager.Heroes.Enemies.Where(e => e.IsKillable())) { if (t != null && t.IsKillable(R.Range + R.Radius)) { var totalRDamage = TotalRDamage(t); if (totalRDamage >= t.TotalShieldHealth()) { i += 0.02f; Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * (0.4f + i), Color.YellowGreen, (int)(t.TotalShieldHealth() / (totalRDamage / 4)) + " x Ult can kill: " + t.ChampionName + " have: " + (int)t.TotalShieldHealth() + "HP / TotalRDamage: " + (int)TotalRDamage(t)); Extentions.DrawLine(t.Position, user.Position, 6, Color.Yellow); } } } } }
static Caitlyn() { MenuIni = MainMenu.AddMenu(MenuName, MenuName); AutoMenu = MenuIni.AddSubMenu("Auto"); ComboMenu = MenuIni.AddSubMenu("Combo"); HarassMenu = MenuIni.AddSubMenu("Harass"); LaneClearMenu = MenuIni.AddSubMenu("LaneClear"); KillStealMenu = MenuIni.AddSubMenu("KillSteal"); Q = new Spell.Skillshot(SpellSlot.Q, 1240, SkillShotType.Linear, 250, 2000, 60); { Q.AllowedCollisionCount = int.MaxValue; } W = new Spell.Skillshot(SpellSlot.W, 820, SkillShotType.Circular, 500, int.MaxValue, 80); { W.AllowedCollisionCount = int.MaxValue; } E = new Spell.Skillshot(SpellSlot.E, 800, SkillShotType.Linear, 250, 1600, 80); R = new Spell.Targeted(SpellSlot.R, 2000); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); AutoMenu.CreateCheckBox("E", "Flee E"); AutoMenu.CreateCheckBox("GapW", "Anti-GapCloser W"); AutoMenu.CreateCheckBox("GapE", "Anti-GapCloser E"); AutoMenu.CreateCheckBox("IntW", "Interrupter W"); foreach (var spell in SpellList) { ComboMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); if (spell != R) { HarassMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); HarassMenu.CreateSlider(spell.Slot + "mana", spell.Slot + " Mana Manager", 60); LaneClearMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); LaneClearMenu.CreateSlider(spell.Slot + "mana", spell.Slot + " Mana Manager", 60); } KillStealMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); } Gapcloser.OnGapcloser += Gapcloser_OnGapcloser; Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell; Dash.OnDash += Dash_OnDash; }
private void LoadSpellData() { Q = new Spell(SpellSlot.Q, 875); W = new Spell(SpellSlot.W, 1000); E = new Spell(SpellSlot.E, 550); R = new Spell(SpellSlot.R); Q.SetSkillshot(0.66f, 160f, 2000, false, SkillshotType.SkillshotCircle); //160 W.SetSkillshot(0.65f, 100f, 1600f, false, SkillshotType.SkillshotLine); QMana = new[] { 20, 20, 26, 32, 38, 44 }; SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
public override void Combo() { var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical); if (target == null || !target.IsKillable(Q.Range)) { return; } foreach ( var spell in SpellList.Where(s => s.IsReady() && target.IsKillable(s.Range) && ComboMenu.CheckBoxValue(s.Slot)) .Where(spell => spell != R && spell != W)) { spell.Cast(target, HitChance.Medium); } }
private void LoadSpells() { //intalize spell Q = new Spell(SpellSlot.Q, 1000); W = new Spell(SpellSlot.W, 950); E = new Spell(SpellSlot.E, 650); R = new Spell(SpellSlot.R, 625); Q.SetSkillshot(.5f, 110f, 750f, false, SkillshotType.SkillshotLine); W.SetSkillshot(.25f, 1f, float.MaxValue, false, SkillshotType.SkillshotLine); R.SetSkillshot(.25f, 200f, float.MaxValue, false, SkillshotType.SkillshotCircle); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
private void LoadSpellData() { Q = new Spell(SpellSlot.Q, 1100); W = new Spell(SpellSlot.W, 300); E = new Spell(SpellSlot.E, 350); R = new Spell(SpellSlot.R, 550); Q.SetSkillshot(0.25f, 100f, 2000f, true, SkillshotType.SkillshotLine); W.SetSkillshot(0f, 300f, float.MaxValue, false, SkillshotType.SkillshotCircle); E.SetSkillshot(0.5f, 350f, float.MaxValue, false, SkillshotType.SkillshotCircle); R.SetSkillshot(0.25f, 550f, float.MaxValue, false, SkillshotType.SkillshotCircle); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
public override void LaneClear() { foreach ( var target in EntityManager.MinionsAndMonsters.EnemyMinions.Where(m => m != null && m.IsValidTarget())) { foreach ( var skillshot in SpellList.Where( s => s.IsReady() && LaneClearMenu.CheckBoxValue(s.Slot) && LaneClearMenu.CompareSlider(s.Slot + "mana", user.ManaPercent) && s != W && s != R) .Select(spell => spell as Spell.Skillshot)) { skillshot.Cast(target, HitChance.Medium); } } }
public override void OnAwake() { Instance = this; // _spellDict = Resources.LoadAll<SpellListInfo>("Utility")[0].SpellDictionary; var spells = Resources.LoadAll<Spell>("Prefabs/Spells"); _spellDict = new Dictionary<string, Spell>(); foreach (Spell spell in spells) { if (!_spellDict.ContainsKey(spell.SpellID)) _spellDict.Add(spell.SpellID, spell); else Debug.LogWarning("Spell already exists: " + spell.SpellID); spell.gameObject.SetActive(false); } }
static Azir() { MenuIni = MainMenu.AddMenu(MenuName, MenuName); AutoMenu = MenuIni.AddSubMenu("Auto"); ComboMenu = MenuIni.AddSubMenu("Combo"); HarassMenu = MenuIni.AddSubMenu("Harass"); LaneClearMenu = MenuIni.AddSubMenu("LaneClear"); KillStealMenu = MenuIni.AddSubMenu("KillSteal"); Q = new Spell.Skillshot(SpellSlot.Q, 1000, SkillShotType.Linear, 250, 1000, 65) { AllowedCollisionCount = int.MaxValue }; W = new Spell.Skillshot(SpellSlot.W, 525, SkillShotType.Circular); E = new Spell.Skillshot(SpellSlot.E, 1100, SkillShotType.Linear, 250, 1200, 80) { AllowedCollisionCount = int.MaxValue }; R = new Spell.Skillshot(SpellSlot.R, 350, SkillShotType.Linear, 500, 1000, 220) { AllowedCollisionCount = int.MaxValue }; SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); foreach (var spell in SpellList) { ComboMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); HarassMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); HarassMenu.CreateSlider(spell.Slot + "mana", spell.Slot + " Mana Manager", 60); LaneClearMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); LaneClearMenu.CreateSlider(spell.Slot + "mana", spell.Slot + " Mana Manager", 60); KillStealMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); } AutoMenu.CreateCheckBox("GapR", "Anti-GapCloser R"); AutoMenu.CreateCheckBox("IntR", "Interrupter R"); ComboMenu.CreateCheckBox("R", "Use R"); ComboMenu.CreateSlider("RAOE", "R AOE HIT {0}", 2, 1, 5); Gapcloser.OnGapcloser += Gapcloser_OnGapcloser; Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell; Dash.OnDash += Dash_OnDash; }
public override void Harass() { var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical); if (target == null || !target.IsKillable(Q.Range)) return; foreach ( var spell in SpellList.Where( s => s.IsReady() && target.IsKillable(s.Range) && HarassMenu.CheckBoxValue(s.Slot) && HarassMenu.CompareSlider(s.Slot + "mana", user.ManaPercent)) .Where(spell => spell != R && spell != W)) { spell.Cast(target, HitChance.Medium); } }
static Amumu() { MenuIni = MainMenu.AddMenu(MenuName, MenuName); AutoMenu = MenuIni.AddSubMenu("Auto"); ComboMenu = MenuIni.AddSubMenu("Combo"); HarassMenu = MenuIni.AddSubMenu("Harass"); LaneClearMenu = MenuIni.AddSubMenu("LaneClear"); KillStealMenu = MenuIni.AddSubMenu("KillSteal"); Q = new Spell.Skillshot(SpellSlot.Q, 1100, SkillShotType.Linear, 250, 2000, 80) { AllowedCollisionCount = 0 }; W = new Spell.Active(SpellSlot.W, 300); E = new Spell.Active(SpellSlot.E, 350); R = new Spell.Active(SpellSlot.R, 550); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); foreach (var spell in SpellList) { ComboMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); if (spell != R) { HarassMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); HarassMenu.CreateSlider(spell.Slot + "mana", spell.Slot + " Mana Manager", 60); LaneClearMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); LaneClearMenu.CreateSlider(spell.Slot + "mana", spell.Slot + " Mana Manager", 60); } KillStealMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); } AutoMenu.CreateSlider("RAOE", "R AOE hit c**t {0}", 3, 1, 5); AutoMenu.CreateCheckBox("GapQ", "Anti-GapCloser Q"); AutoMenu.CreateCheckBox("IntQ", "Interrupter Q"); AutoMenu.CreateCheckBox("GapR", "Anti-GapCloser R"); AutoMenu.CreateCheckBox("IntR", "Interrupter R"); ComboMenu.CreateSlider("RAOE", "R AOE hit c**t {0}", 3, 1, 5); Gapcloser.OnGapcloser += Gapcloser_OnGapcloser; Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell; Dash.OnDash += Dash_OnDash; }
private void LoadSpellData() { Q = new Spell(SpellSlot.Q, 125); W = new Spell(SpellSlot.W, 700); E = new Spell(SpellSlot.E, 550); R = new Spell(SpellSlot.R, 650); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); if (Player.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower().Contains("smite") || Player.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower().Contains("smite")) { Console.WriteLine("SmiteName : " + Player.Spellbook.GetSpell(SpellSlot.Summoner1).Name); Console.WriteLine("SmiteName : " + Player.Spellbook.GetSpell(SpellSlot.Summoner2).Name); } }
public void MaxSpellLevelIsLevel3() { var spellList = SpellList.CreateForTesting("cleric"); spellList.Add(1, "Cure Light Wounds"); spellList.Add(4, "Cure Serious Wounds"); var cureSpell = new Spell("Cure Light Wounds", "healing"); var cureSeriousSpell = new Spell("Cure Serious Wounds", "healing"); var spellLists = EntityGateway <SpellList> .LoadWithSingleItem(spellList); var spells = EntityGateway <Spell> .LoadFromList(new Spell[] { cureSpell, cureSeriousSpell }); var potionCreator = new PotionCreator(spellLists, spells); var potion = potionCreator.Process(); //Always equals cureSpell Assert.Equal(cureSpell, potion.Spell); }
void OpenSpellList() { string absPath = EditorUtility.OpenFilePanel("Select Spell List", "", ""); if (absPath.StartsWith(Application.dataPath)) { string relPath = absPath.Substring(Application.dataPath.Length - "Assets".Length); SpellList = AssetDatabase.LoadAssetAtPath(relPath, typeof(SpellList)) as SpellList; if (SpellList.SpellListInstance == null) { SpellList.SpellListInstance = new List <Spell>(); } if (SpellList) { EditorPrefs.SetString("ObjectPath", relPath); } } }
private void LoadSpell() { //intalize spell Q = new Spell(SpellSlot.Q, 725); Q2 = new Spell(SpellSlot.Q, 850); W = new Spell(SpellSlot.W, 450); E = new Spell(SpellSlot.E, 1050); R = new Spell(SpellSlot.R, 700); Q.SetSkillshot(0.50f, 100, 1300, false, SkillshotType.SkillshotLine); Q2.SetSkillshot(0.50f, 150, 1300, true, SkillshotType.SkillshotLine); E.SetSkillshot(0.50f, 110, 850, false, SkillshotType.SkillshotLine); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
private void LoadSpells() { //intalize spell Q = new Spell(SpellSlot.Q, 850); QExtend = new Spell(SpellSlot.Q, 1150); W = new Spell(SpellSlot.W, 450); E = new Spell(SpellSlot.E, 2000); R = new Spell(SpellSlot.R, 450); Q.SetSkillshot(0.1f, 100, 1700, false, SkillshotType.SkillshotLine); QExtend.SetSkillshot(0.1f, 100, 1700, false, SkillshotType.SkillshotLine); E.SetSkillshot(0.25f, 100, 1200, false, SkillshotType.SkillshotLine); R.SetSkillshot(0.5f, 700, 1400, false, SkillshotType.SkillshotLine); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
private void LoadSpell() { Q = new Spell(SpellSlot.Q, 875); Q2 = new Spell(SpellSlot.Q, 875); W = new Spell(SpellSlot.W, 1000); E = new Spell(SpellSlot.E, 520); R = new Spell(SpellSlot.R); Q.SetSkillshot(.6f, 50f, float.MaxValue, false, SkillshotType.SkillshotCircle); Q2.SetSkillshot(.6f, 190f, float.MaxValue, false, SkillshotType.SkillshotCircle); W.SetSkillshot(0.25f, 50f, 1600f, false, SkillshotType.SkillshotCircle); R.SetSkillshot(3f, float.MaxValue, float.MaxValue, false, SkillshotType.SkillshotCircle); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
private void LoadSpellData() { Q = new Spell(SpellSlot.Q, 1240); W = new Spell(SpellSlot.W); E = new Spell(SpellSlot.E); R = new Spell(SpellSlot.R); Q.SetSkillshot(0.25f, 90f, 1350f, false, SkillshotType.SkillshotLine); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); QMana = new[] { 70, 80, 90, 100, 110 }; WMana = new[] { 60, 60, 60, 60, 60 }; RMana = new[] { 100, 100, 100 }; }
public void WandsUtilizeAvailableListsToMakeWandsThatMakeSense() { var spellList = SpellList.CreateForTesting("wizard"); spellList.Add(1, "Cure Light Wounds"); var cure = new Spell("Cure Light Wounds", "healing"); var spellGateway = EntityGateway <Spell> .LoadWithSingleItem(cure); var spellListGateway = EntityGateway <SpellList> .LoadWithSingleItem(spellList); var createwands = new WandCreator(spellGateway, spellListGateway); var wand = createwands.Process(); Assert.Equal(cure, wand.Spell); Assert.Equal(50, wand.Charges); Assert.Equal(75000, wand.Value); }
public override void KillSteal() { foreach (var spell in SpellList.Where(s => s.IsReady() && s != W && s != E && KillStealMenu.CheckBoxValue(s.Slot))) { foreach (var target in EntityManager.Heroes.Enemies.Where( m => m != null && m.IsKillable(spell.Range) && spell.WillKill(m))) { if (spell == R) { spell.Cast(target, HitChance.Medium); } else { spell.Cast(); } } } }
private void SetupSpells() { //intalize spell Q = new Spell(SpellSlot.Q, 825); W = new Spell(SpellSlot.W, 250); E = new Spell(SpellSlot.E, 1095); R = new Spell(SpellSlot.R, 370); Q.SetSkillshot(0.25f, 80, 1300, false, SkillshotType.SkillshotLine); W.SetSkillshot(0f, 250, float.MaxValue, false, SkillshotType.SkillshotCircle); E.SetSkillshot(0.25f, 145, 1700, false, SkillshotType.SkillshotLine); R.SetSkillshot(0.60f, 370, float.MaxValue, false, SkillshotType.SkillshotCircle); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); }
static Ahri() { MenuIni = MainMenu.AddMenu(MenuName, MenuName); AutoMenu = MenuIni.AddSubMenu("Auto"); ComboMenu = MenuIni.AddSubMenu("Combo"); HarassMenu = MenuIni.AddSubMenu("Harass"); LaneClearMenu = MenuIni.AddSubMenu("LaneClear"); KillStealMenu = MenuIni.AddSubMenu("KillSteal"); Q = new Spell.Skillshot(SpellSlot.Q, 900, SkillShotType.Linear, 250, 1750, 100) { AllowedCollisionCount = int.MaxValue }; W = new Spell.Active(SpellSlot.W, 750); E = new Spell.Skillshot(SpellSlot.E, 950, SkillShotType.Linear, 250, 1550, 60) { AllowedCollisionCount = 0 }; R = new Spell.Skillshot(SpellSlot.R, 600, SkillShotType.Linear, 250, 1550, 60) { AllowedCollisionCount = int.MaxValue }; SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); foreach (var spell in SpellList) { ComboMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); if (spell != R) { HarassMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); HarassMenu.CreateSlider(spell.Slot + "mana", spell.Slot + " Mana Manager", 60); LaneClearMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); LaneClearMenu.CreateSlider(spell.Slot + "mana", spell.Slot + " Mana Manager", 60); } KillStealMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); } AutoMenu.CreateCheckBox("GapE", "Anti-GapCloser E"); AutoMenu.CreateCheckBox("IntE", "Interrupter E"); Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell; Gapcloser.OnGapcloser += Gapcloser_OnGapcloser; }
public static AIHeroClient GetBestKSHero(SpellSlot slot) { var spell = SpellList.FirstOrDefault(s => s.Slot == slot); if (spell == null) { return(null); } var hero = EntityManager.Heroes.Enemies.OrderBy(x => x.Health).ThenBy(TargetSelector.GetPriority) .FirstOrDefault( e => e.IsValidTarget(spell.Range) && Prediction.Health.GetPrediction(e, spell.CastDelay) + e.TotalShield() <= GetRKSDamage(e) && Prediction.Health.GetPrediction(e, spell.CastDelay) > 20); return(hero); }
private void CheckBonusSpells(SpellList SL, string name, int casterLevel) { string checkName = "CheckBonusSpells"; Dictionary <string, int> MysteryBonusSpells = CharacterClasses.GetMysteryBonusSpells(); if (MysteryBonusSpells != null && MysteryBonusSpells.Any()) { foreach (KeyValuePair <string, int> kvp in MysteryBonusSpells) { if (!SL.SpellExists(kvp.Key)) { _messageXML.AddFail(checkName, "Missing bonus Mystery Spell from spell list -" + kvp.Key); } } } List <string> PatronBonusSpells = CharacterClasses.GetPatronBonusSpells(); if (PatronBonusSpells != null && PatronBonusSpells.Any()) { foreach (string spell in PatronBonusSpells) { if (!SL.SpellExists(spell)) { _messageXML.AddFail(checkName, "Missing bonus Patron Spell from spell list -" + spell); } } } Dictionary <string, int> BloodlineBonusSpells = CharacterClasses.GetBloodlineBonusSpells(); if (BloodlineBonusSpells != null && BloodlineBonusSpells.Any()) { foreach (KeyValuePair <string, int> kvp in BloodlineBonusSpells) { if (!SL.SpellExists(kvp.Key) && casterLevel >= kvp.Value) { _messageXML.AddFail(checkName, "Missing bonus Bloodline Spell from spell list -" + kvp.Key); } } } }
private void LoadSpellData() { Q = new Spell(SpellSlot.Q, 900); W = new Spell(SpellSlot.W, 600); E = new Spell(SpellSlot.E, 600); R = new Spell(SpellSlot.R); Q.SetSkillshot(0.25f, 50f, 2000f, true, SkillshotType.SkillshotLine); // 1700 , 2000 SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); QMana = new[] { 30, 35, 40, 45, 50 }; WMana = new[] { 60, 70, 80, 90, 100 }; EMana = new[] { 60, 70, 80, 90, 100 }; RMana = new[] { 0, 0, 0 }; }
public void StartSpell (string spellType = null){ if (!isStarted) { isStarted = true; spellList = GameObject.Find ("SpellList").GetComponent<SpellList> (); GetNextSpellOrEndGame (spellType); } else { // Only get the next spell if the current spell is done // (i.e. in case this gets called when a spell is in progress, don't get the next spell yet) if (curSpell != null && IsSpellOver (curSpell)) { GetNextSpellOrEndGame (spellType); } else { //cwkTODO figure out why this happens! //for some reason button click is called multiple times after spacebara is pressed on the instructions //Debug.Log ("somebody called start spell when the current spell is in progress"); } } }
static Aatrox() { MenuIni = MainMenu.AddMenu(MenuName, MenuName); AutoMenu = MenuIni.AddSubMenu("Auto"); ComboMenu = MenuIni.AddSubMenu("Combo"); HarassMenu = MenuIni.AddSubMenu("Harass"); LaneClearMenu = MenuIni.AddSubMenu("LaneClear"); KillStealMenu = MenuIni.AddSubMenu("KillSteal"); Q = new Spell.Skillshot(SpellSlot.Q, 650, SkillShotType.Circular, 250, 450, 285) { AllowedCollisionCount = int.MaxValue }; W = new Spell.Active(SpellSlot.W); E = new Spell.Skillshot(SpellSlot.E, 1000, SkillShotType.Linear, 250, 1200, 100) { AllowedCollisionCount = int.MaxValue }; R = new Spell.Active(SpellSlot.R, 500); SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R); foreach (var spell in SpellList) { ComboMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); if (spell != R) { HarassMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); LaneClearMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); } KillStealMenu.CreateCheckBox(spell.Slot, "Use " + spell.Slot); } AutoMenu.CreateCheckBox("GapQ", "Anti-GapCloser Q"); AutoMenu.CreateCheckBox("IntQ", "Interrupter Q"); AutoMenu.CreateCheckBox("flee", "Flee E"); AutoMenu.CreateSlider("RAOE", "R AOE HIT {0}", 3, 0, 5); ComboMenu.CreateSlider("RAOE", "R AOE HIT {0}", 3, 0, 5); Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell; Gapcloser.OnGapcloser += Gapcloser_OnGapcloser; }
static Viktor() { MenuIni = MainMenu.AddMenu(MenuName, MenuName); AutoMenu = MenuIni.AddSubMenu("Auto"); ComboMenu = MenuIni.AddSubMenu("Combo"); HarassMenu = MenuIni.AddSubMenu("Harass"); LaneClearMenu = MenuIni.AddSubMenu("LaneClear"); KillStealMenu = MenuIni.AddSubMenu("KillSteal"); SpellList.ForEach( i => { ComboMenu.CreateCheckBox(i.Slot, "Use " + i.Slot); if (i != R && i != W) { HarassMenu.CreateCheckBox(i.Slot, "Use " + i.Slot); HarassMenu.CreateSlider(i.Slot + "mana", i.Slot + " Mana Manager {0}%", 60); HarassMenu.AddSeparator(0); LaneClearMenu.CreateCheckBox(i.Slot, "Use " + i.Slot); LaneClearMenu.CreateSlider(i.Slot + "mana", i.Slot + " Mana Manager {0}%", 60); LaneClearMenu.AddSeparator(0); } KillStealMenu.CreateCheckBox(i.Slot, i.Slot + " KillSteal"); }); AutoMenu.Add("Wmode", new ComboBox("GapCloser W Mode", 1, "Place On Self", "Place On Enemy")); AutoMenu.CreateCheckBox("GapW", "Auto W Anti-GapCloser"); AutoMenu.CreateCheckBox("IntW", "Auto W Interrupter"); AutoMenu.CreateCheckBox("IntR", "Auto R Interrupter"); AutoMenu.CreateCheckBox("Qunk", "Auto Q UnKillable Minions"); ComboMenu.CreateSlider("RAOE", "R AoE Hit Count {0}", 2, 1, 6); ComboMenu.CreateSlider("RMulti", "Mutilply R Damage By X{0} Times", 3, 1, 10); LaneClearMenu.CreateSlider("Ehits", "E Hit Count {0}", 3, 1, 20); Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast; Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell; Gapcloser.OnGapcloser += Gapcloser_OnGapcloser; Orbwalker.OnUnkillableMinion += Orbwalker_OnUnkillableMinion; GameObject.OnCreate += GameObject_OnCreate; GameObject.OnDelete += GameObject_OnDelete; }
public override void Harass() { var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical); if (target == null || !target.IsKillable(Q.Range)) { return; } foreach ( var spell in SpellList.Where( s => s.IsReady() && s == Q && target.IsKillable(s.Range) && ComboMenu.CheckBoxValue(s.Slot))) { spell.Cast(); } }
public static XmlElement spellList(XmlDocument doc, SpellList spls) { XmlElement e = doc.CreateElement("SpellList"); foreach (Spell sp in spls.toList()) e.AppendChild(spell(doc, sp)); return e; }
private static extern short GetSpellRecast(int instanceID, SpellList index);
/// <summary> /// Will get the name of the passed spell ID /// </summary> /// <param name="spell">SpellList enum indicating the Spell to get the name of.</param> /// <returns>In-game name of the spell passed, String.Empty on error</returns> public static String GetSpellName(SpellList spell) { if (Instance == null) return String.Empty; int key = (int)((ushort)spell) | (int)ResourceBit.Spell; String result; if (Instance.ResourcesCache.TryGetValue(key, out result)) return result; return String.Empty; }
private void loadContent() { Graphics.instantiate(); gen = new Tilemap("gen"); cinfo=cinfo_load(".\\xml\\class_info.xml"); spellList = spellList_load(".\\xml\\spell_list.xml"); recruitLs = recruits_Load(".\\xml\\recruitment_info.xml"); gen_load(".\\xml\\gen.xml"); audio = new Audio(); audio.songs.test = Game1.Instance.Content.Load<Song>(@"audio\\song\\test"); audio.songs.worldMap = Game1.Instance.Content.Load<Song>(@"audio\\song\\WorldMap"); shop_load(".\\xml\\item_list.xml"); emap_load(".\\xml\\emap.xml"); text_load(".\\xml\\text.xml"); }
} // @ public short GetSpellRecast(short id) /// <summary> /// Will get the time left in seconds before being able to recast a spell /// </summary> /// <param name="spell">Spell to check recast timer on</param> public short GetSpellRecast (SpellList spell) { // get recast time from fface short time = FFACE.GetSpellRecast(_InstanceID, spell); // FFACE seems to return the recast 1 second shorter then it is if (0 < time) time += 60; return (short)( time / 60 ); } // @ public TimeSpan GetSpellRecast(eSpellList spell)
///<summary> ///Spells you have learned. ///</summary> public bool KnowsSpell(SpellList spell) { return HasSpell(_InstanceID, (uint)( (short)spell * 2 )); }