public static void ApplyEffect(Actor target, Spells spell) { switch (spell) { case Spells.BattleLitany: ApplyEffect(target, StatusEffects.BattleLitany, 20); break; case Spells.InternalRelease: ApplyEffect(target, StatusEffects.InternalRelease, 15); break; case Spells.BloodForBlood: ApplyEffect(target, StatusEffects.BloodForBlood, 20); break; case Spells.LifeSurge: ApplyEffect(target, StatusEffects.LifeSurge, 10); break; case Spells.PowerSurge: ApplyEffect(target, StatusEffects.PowerSurge, 10); break; case Spells.StrengthPotion: ApplyEffect(target, StatusEffects.StrengthPotion, 15); break; case Spells.BloodOfTheDragon: ApplyEffect(target, StatusEffects.BloodOfTheDragon, 15); break; } }
public static void ApplyEffect(Actor target, Spells spell) { switch (spell) { case Spells.InternalRelease: ApplyEffect(target, StatusEffects.InternalRelease, 15); break; case Spells.BloodForBlood: ApplyEffect(target, StatusEffects.BloodForBlood, 20); break; case Spells.Duality: ApplyEffect(target, StatusEffects.Duality, 10); break; case Spells.DexterityPotion: ApplyEffect(target, StatusEffects.DexterityPotion, 15); break; case Spells.TrickAttack: ApplyEffect(target, StatusEffects.TrickAttack, 10); break; case Spells.Suiton: ApplyEffect(target, StatusEffects.Suiton, 10); break; case Spells.Kassatsu: target.Cooldowns.Remove(Spells.FumaShuriken); target.Cooldowns.Remove(Spells.Raiton); target.Cooldowns.Remove(Spells.Suiton); ApplyEffect(target, StatusEffects.Kassatsu, 15); break; } }
// Use this for initialization void Start() { GameObject player = GameObject.FindGameObjectWithTag("Player"); playerscript = player.GetComponent(typeof(PlayerController)) as PlayerController; spells = player.GetComponent(typeof(Spells)) as Spells; talents = player.GetComponent (typeof(PlayerTalents)) as PlayerTalents; tagx = gameObject.transform.tag; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); transform.position = player.transform.position + player.transform.up * 0.3f; transform.rotation = player.transform.rotation; collider = GetComponent<CircleCollider2D>(); collider.enabled = false; spells = player.GetComponent(typeof(Spells)) as Spells; StartCoroutine(DoAnimation()); }
public Context(bool isMock = false) { Abilities = new Abilities(); Actions = new Actions(); Characteristics = new Characteristics(); Models = new Models(); Spells = new Spells(); Triggers = new Triggers(); Weapons = new Weapons(); LoadData(isMock); }
// Use this for initialization void Start() { transform.rotation = caster.transform.rotation; spriterender = GetComponent<Renderer>() as SpriteRenderer; player = GameObject.FindGameObjectWithTag("Player"); spells = player.GetComponent(typeof(Spells)) as Spells; int rng = (int)Random.Range(0, 1); if (rng == 0) { transform.position = player.transform.position + player.transform.right * 0.4f; } else { transform.position = player.transform.position - player.transform.right * 0.4f; } StartCoroutine(DoAnimation()); }
public void SpawnPlayer() { runSpeed = 6; spellPrefab = Resources.Load("Spell") as GameObject; playerAnimator = GetComponent<Animator>(); visuals = GameObject.Find("Visuals"); mainCamera = GameObject.Find("Main Camera"); cameraPos = mainCamera.transform.position; spells = GetComponent<Spells>(); spells.InitializeSpells(); uiManager = GameObject.Find("Manager").GetComponent<UIManager>(); spells.selectedSpell1 = spells.test1; spells.selectedSpell2 = spells.test2; spells.selectedSpell3 = spells.test3; spells.selectedSpell4 = spells.test4; uiManager.MoveHighlight(1); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); playerscript = player.GetComponent(typeof(PlayerController)) as PlayerController; spells = player.GetComponent(typeof(Spells)) as Spells; }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); Spells ds = new Spells(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "SpellDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; }
public void Initialize(int numberParam, Spells spellParam, int levelParam) { spell = spellParam; level = levelParam; number = numberParam; }
private float UltimateDamage(Obj_AI_Hero hero) { return(Spells.get("R").Level > 0 ? (float)Damage.CalcDamage(Player, hero, Damage.DamageType.Magical, Damage.GetSpellDamage(Player, hero, SpellSlot.R)) : 0); }
internal Spell GetSpell(Spells spell) { return(_spells[spell]); }
public bool IsSpellKnown(string spellname) => Spells.Any(e => string.Equals(e.Name, spellname, StringComparison.OrdinalIgnoreCase));
// Use this for initialization void Start() { spells = GetComponent<Spells> (); recording = false; rawData = new ArrayList (); }
public int GetSpellPrice(Spells spellType) { int returnValue = 0; foreach (Spell s in spellReference) { if (s.Type == spellType) { returnValue = s.Price; } } return returnValue; }
public static void Execute() { if (Config.ComboE) { var target = TargetSelector.GetTarget(Spells.Q.Range + Spells.E.Range, DamageType.Magical); if (target == null || target.IsInvulnerable || !target.IsValidTarget() || target.IsDead) { return; } switch (Config.ComboEMode) { case 0: if (Spells.E.IsReady() && Spells.Q.IsReady() || Spells.W.IsReady()) { Spells.E.Cast(Game.CursorPos); } break; case 1: if (Spells.E.IsReady() && Spells.Q.IsReady() || Spells.W.IsReady()) { Spells.E.Cast(target); } break; case 2: break; } } if (Config.ComboQ) { var target = TargetSelector.GetTarget(Spells.Q.Range, DamageType.Physical); Spells.CastQ(target); } if (Config.ComboW) { var target = TargetSelector.GetTarget(Spells.W.Range, DamageType.Magical); Spells.CastW(target); } if (Config.ComboR) { Spells.R_CastIfWillHit(Config.ComboREnemies); } if (Config.ItemsBotrk && Spells.Botrk.IsOwned() && Spells.Botrk.IsReady() || Spells.Cutlass.IsOwned() && Spells.Cutlass.IsReady()) { var target = TargetSelector.GetTarget(Spells.Botrk.Range, DamageType.Physical); if (target == null || target.IsInvulnerable || !target.IsValidTarget() || target.IsDead) { return; } if (Config.ItemsBotrkHealth >= Player.Instance.HealthPercent) { return; } if (Spells.Botrk.IsOwned() && Spells.Botrk.IsReady()) { Spells.Botrk.Cast(target); } if (Spells.Cutlass.IsOwned() && Spells.Cutlass.IsReady()) { Spells.Cutlass.Cast(target); } } if (Config.ItemsYoumuu && Spells.Youmuu.IsOwned() && Spells.Youmuu.IsReady()) { var target = TargetSelector.GetTarget(Spells.Youmuu.Range, DamageType.Physical); if (target == null || target.IsInvulnerable || !target.IsValidTarget() || target.IsDead) { return; } Spells.Youmuu.Cast(target); } }
public TrinityPower GetDefensivePower() { var position = Targeting.HealthGlobeExists(35f) ? Targeting.GetBestHealthGlobeClusterPoint(35f) : Targeting.GetLoiterPosition(Targeting.ClosestUnit(35f), 35f); return(Spells.FuriousCharge(position)); }
public bool CastSpell(Spells.Spell spell, Cell cell) { if (!CanCastSpell(spell, cell)) return false; Character.Bot.SendToServer(new GameActionFightCastRequestMessage((short) spell.Template.id, cell.Id)); return true; }
public Data Create(Row row) { Data data; switch (Index) { case 1: { data = new Achievements(row, this); break; } case 2: { data = new Alliance_badges(row, this); break; } case 3: { data = new Alliance_portal(row, this); break; } case 4: { data = new Billing_packages(row, this); break; } case 5: { data = new Building_classes(row, this); break; } case 6: { data = new Buildings(row, this); break; } case 7: { data = new Characters(row, this); break; } case 8: { data = new Decos(row, this); break; } case 9: { data = new Effects(row, this); break; } case 10: { data = new Experience_levels(row, this); break; } case 11: { data = new Faq(row, this); break; } case 12: { data = new Globals(row, this); break; } case 13: { data = new Heroes(row, this); break; } case 14: { data = new Hints(row, this); break; } case 15: { data = new Leagues(row, this); break; } case 16: { data = new Locales(row, this); break; } case 17: { data = new Missions(row, this); break; } case 18: { data = new News(row, this); break; } case 19: { data = new Npcs(row, this); break; } case 20: { data = new Obstacles(row, this); break; } case 21: { data = new Particle_emitters(row, this); break; } case 22: { data = new Projectiles(row, this); break; } case 23: { data = new Resource_packs(row, this); break; } case 24: { data = new Logic.Resources(row, this); break; } case 25: { data = new Shields(row, this); break; } case 26: { data = new Spells(row, this); break; } case 27: { data = new Texts(row, this); break; } case 28: { data = new Traps(row, this); break; } default: { data = new Data(row, this); break; } } return(data); }
public bool CanCastSpell(Spells.Spell spell, Fighter fighter) { return CanCastSpell(spell, fighter.Cell); }
// Use this for initialization void Start() { go = GameObject.Find("CardBuilder"); towerBuilder = go.GetComponent <TowerBuilder>(); spellcaster = go.GetComponent <Spells>(); }
public bool CanCastSpell(Spells.Spell spell, Cell cell) { // todo spells modifications // todo states // todo LoS if (!IsPlaying()) return false; if (spell.LevelTemplate.apCost > Stats.CurrentAP) return false; if (!IsInSpellRange(cell, spell.LevelTemplate)) return false; return true; }
public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target) { try { if (_menu == null || target == null || !target.IsValidTarget()) { return(false); } if (ShouldSingle(mode)) { var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue <Slider>().Value; if (Spells != null && !Spells.Any( s => s.Slot != SpellSlot.R && s.IsReady() && s.IsInRange(target) && s.GetDamage(target, 1) > 10 && Math.Abs(s.Speed - float.MaxValue) < 1 || s.From.Distance(target.ServerPosition) / s.Speed + s.Delay <= 1.0f)) { minHealth = 0; } if (target.HealthPercent < minHealth) { return(false); } var alliesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue <Slider>().Value; var alliesMax = _menu.Item(_menu.Name + ".ultimate.single.max-add-allies").GetValue <Slider>().Value; var enemiesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue <Slider>().Value; var enemiesMax = _menu.Item(_menu.Name + ".ultimate.single.max-add-enemies").GetValue <Slider>().Value; var pos = ObjectManager.Player.Position.Extend( target.Position, ObjectManager.Player.Distance(target) / 2f); var aCount = GameObjects.AllyHeroes.Count( h => h.IsValid && !h.IsDead && !h.IsMe && h.Distance(pos) <= alliesRange); var eCount = GameObjects.EnemyHeroes.Count( h => h.IsValid && !h.IsDead && h.IsVisible && h.NetworkId != target.NetworkId && h.Distance(pos) <= enemiesRange); if (aCount > alliesMax || eCount > enemiesMax) { return(false); } if (DamageCalculation != null) { if (GetDamage(target, mode, 1) < target.Health) { return(false); } } return(true); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
protected HealingBall(Spells id) : base((int)id, id.ToString(), 1, 1, 1, TimeSpan.FromSeconds(10), "HHHHEAL") { }
public void LearnSpell(Spells spell) { spellBook[(int)spell - 1] = 1; }
// Use this for initialization void Start() { spells = (Spells)GetComponent(typeof(Spells)); stamina = 100; moveSpeedOriginal = moveSpeed; StartCoroutine(Recover_Stamina_Passive()); currentHealth = 100; maxHealth = 100; StartCoroutine(StartHealthRegen()); recover = 2; isStunned = false; isMoving = false; stunDuration = 0; moveSpeedModifier = 0; maxHealthModifier = 0; magResistAdjust = 0; stamRecovSpeedModifier = 0; HPSpeedModifier = 0; spells.addHat(1); HasRegen = true; staminaRecoverySpeed = 0.025f; hasHPRegen = true; HPspeed = 1000f; moveSpeedNaked = 1.5f; stamRecovSpeedNaked = 0.025f; hpRecovSpeedNaked = 1000f; maxHealthNaked = 100; magResistNaked = 0f; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); spells = player.GetComponent(typeof(Spells)) as Spells; }
/// <summary> /// Used for Periodic leech effects, mostly Cannibalism /// </summary> /// <param name="school">AuraTickFlags.PeriodicHeal</param> /// <returns></returns> public static void SendPeriodicDamage(WorldObject caster, WorldObject target, uint spellId, Spells.AuraTickFlags type, uint amount) { using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.SMSG_PERIODICAURALOG, 32)) { caster.EntityId.WritePacked(packet); target.EntityId.WritePacked(packet); packet.WriteUInt(spellId); packet.WriteUInt(1); // count packet.WriteUInt((uint)type); packet.WriteUInt(amount); target.PushPacketToSurroundingArea(packet, true, false); } }
/// <summary> /// /// </summary> /// <param name="TargetId"></param> /// <param name="category"></param> /// <returns></returns> public IEnumerable<Spells.Spell> GetAvailableSpells(int? TargetId, Spells.Spell.SpellCategory category) { foreach (Spells.Spell spell in SpellsBook.GetAvailableSpells(TargetId, category)) if (spell.LevelTemplate.apCost <= Stats.CurrentAP) yield return spell; }
/// <summary> /// /// </summary> /// <param name="target">Optional</param> /// <param name="value">Optional</param> public static RealmPacketOut SendSpellLogExecute(ObjectBase caster, uint spellId, Spells.SpellEffectType effect, ObjectBase target, uint value) { RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.SMSG_SPELLLOGEXECUTE, 37); caster.EntityId.WritePacked(packet); packet.WriteUInt(spellId); packet.Write(1); packet.Write((int)effect); if (target != null && caster != target) { target.EntityId.WritePacked(packet); } if (value > 0) { packet.WriteUInt(value); } return packet; }
public void RemoveSpell(Spell s) { //TODO: Cleanup this spell and any current Behaviors related to it Spells.Remove(s); }
/// <summary> /// Refresh Spellbook /// </summary> internal void RefreshSpells() { Spells = new Spells(); }
public bool IsAvailable(int? idTarget, Spells.Spell.SpellCategory? category=null) { if (_nbTurnToWait > 0) return false; // Limit on usage per turn not reached if (LevelTemplate.maxCastPerTurn > 0 && _nbCastAllowed == 0) return false; if (!HasCategory(category)) return false; // No restriction per target => available if (LevelTemplate.maxCastPerTarget <= 0 || _nbCastAllowed > 0) return true; // No target identified if (idTarget == null) return true; if (_targeted != null) { int targetCount = 0; if (!_targeted.TryGetValue(idTarget.Value, out targetCount)) targetCount = 0; if (targetCount >= LevelTemplate.maxCastPerTarget) return false; } return true; }
private void CastR() { Spell R = Spells.get("R"); if (!R.IsReady()) { return; } Obj_AI_Hero target = TargetSelector.GetTarget(Menu.Item("Auto_maxrange").GetValue <Slider>().Value, TargetSelector.DamageType.Physical); if (target == null || Player.Distance(target) < Menu.Item("Auto_minrange").GetValue <Slider>().Value) { return; } float predictedHealth = HealthPrediction.GetHealthPrediction(target, (int)(R.Delay + (Player.Distance(target) / R.Speed) * 1000)); if (UltimateDamage(target) < predictedHealth || predictedHealth <= 0) { return; } bool cast = true; PredictionOutput output = R.GetPrediction(target); Vector2 direction = output.CastPosition.To2D() - Player.Position.To2D(); direction.Normalize(); if (output.Hitchance >= HitChance.VeryHigh) { List <Obj_AI_Hero> enemies = ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && x.IsValidTarget()).ToList(); foreach (var enemy in enemies) { if (enemy.SkinName == target.SkinName || !cast) { continue; } PredictionOutput prediction = R.GetPrediction(enemy); Vector3 predictedPosition = prediction.CastPosition; Vector3 v = output.CastPosition - Player.Position; Vector3 w = predictedPosition - Player.Position; double c1 = Vector3.Dot(w, v); double c2 = Vector3.Dot(v, v); double b = c1 / c2; Vector3 pb = Player.Position + ((float)b * v); float length = Vector3.Distance(predictedPosition, pb); if (length < (R.Width + enemy.BoundingRadius / 2) && Player.Distance(predictedPosition) < Player.Distance(target)) { cast = false; } } if (cast) { R.Cast(target, true); } } }
public Spell GetSpellByName(string spellname) => Spells.FirstOrDefault(e => string.Equals(e.Name, spellname, StringComparison.OrdinalIgnoreCase));
protected override void InitializeMenu() { Menu.AddSubMenu(new Menu("Combo", "Combo")); Menu.SubMenu("Combo").AddItem(new MenuItem("Combo_q", "Use Q").SetValue(true)); Menu.SubMenu("Combo").AddItem(new MenuItem("Combo_w", "Use W").SetValue(true)); Menu.SubMenu("Combo").AddItem(new MenuItem("Combo_e", "Use E").SetValue(true)); Menu.AddSubMenu(new Menu("Harass", "Harass")); Menu.SubMenu("Harass").AddItem(new MenuItem("Harass_q", "Use Q").SetValue(true)); Menu.SubMenu("Harass").AddItem(new MenuItem("Harass_w", "Use W").SetValue(false)); Menu.SubMenu("Harass").AddItem(new MenuItem("Harass_e", "Use E").SetValue(false)); Menu.AddSubMenu(new Menu("Auto", "Auto")); Menu.SubMenu("Auto").AddItem(new MenuItem("Auto_eslow", "Use E on slowed enemies").SetValue(true)); Menu.SubMenu("Auto").AddItem(new MenuItem("Auto_estun", "Use E on stunned enemies").SetValue(true)); Menu.SubMenu("Auto").AddItem(new MenuItem("Auto_egap", "Use E on gapcloser").SetValue(true)); Menu.SubMenu("Auto").AddItem(new MenuItem("Auto_r", "Use R").SetValue(true)); Menu.SubMenu("Auto").AddItem(new MenuItem("Auto_minrange", "Min R range").SetValue(new Slider(1050, 0, 1500))); Menu.SubMenu("Auto").AddItem(new MenuItem("Auto_maxrange", "Max R range").SetValue(new Slider(3000, 1500, 5000))); Menu.AddSubMenu(new Menu("Drawing", "Drawing")); Menu.SubMenu("Drawing").AddItem(new MenuItem("Drawing_q", "Q Range").SetValue(new Circle(true, System.Drawing.Color.FromArgb(100, 0, 255, 0)))); Menu.SubMenu("Drawing").AddItem(new MenuItem("Drawing_w", "W Range").SetValue(new Circle(true, System.Drawing.Color.FromArgb(100, 0, 255, 0)))); Menu.SubMenu("Drawing").AddItem(new MenuItem("Drawing_e", "E Range").SetValue(new Circle(true, System.Drawing.Color.FromArgb(100, 0, 255, 0)))); Menu.SubMenu("Drawing").AddItem(new MenuItem("Drawing_rdamage", "R Damage Indicator").SetValue(true)); Menu.AddSubMenu(new Menu("Misc", "Misc")); Menu.SubMenu("Misc").AddItem(new MenuItem("Misc_qswitch", "Switch to minigun for minions").SetValue(true)); Menu.SubMenu("Misc").AddItem(new MenuItem("Misc_wrange", "W minimum range").SetValue(new Slider(500, 0, (int)Spells.get("W").Range))); }
public void CMagicAttack(GSSession session, CMagicAttack message) { var @char = session.Player.Character; var target = message.Target; MuEmu.Data.SpellInfo spell; Spells spells = null; Monster monster = null; Player player = null; Point pos; int defense = 0; if ([email protected](message.MagicNumber)) { Logger.Error("Invalid Magic, user don't own this spell {0}", message.MagicNumber); return; } spell = @char.Spells.SpellDictionary[message.MagicNumber]; int eDmg = 0; try { if (target >= MonstersMng.MonsterStartIndex) // Is Monster { monster = MonstersMng.Instance.GetMonster(target); spells = monster.Spells; defense = monster.Defense; pos = monster.Position; eDmg = @char.PentagramAttack(monster).Result; } else { player = Program.server.Clients.First(x => x.ID == target).Player; spells = player.Character.Spells; defense = player.Character.Defense; pos = player.Character.Position; eDmg = @char.PentagramAttack(player.Character).Result; } } catch (Exception) { Logger.Error("MagicAttack: Invalid target"); return; } var mana = @char.Mana - spell.Mana; var bp = @char.Stamina; if (mana >= 0 && bp >= 0) { switch (spell.Number) { case Spell.Poison: @char.Spells.AttackSend(spell.Number, message.Target, false); spells.SetBuff(SkillStates.Poison, TimeSpan.FromSeconds(60), @char); break; case Spell.Ice: @char.Spells.AttackSend(spell.Number, message.Target, false); spells.SetBuff(SkillStates.Ice, TimeSpan.FromSeconds(60), @char); break; case Spell.InfinityArrow: if (@char.BaseClass != HeroClass.FaryElf) { return; } spells.SetBuff(SkillStates.InfinityArrow, TimeSpan.FromSeconds(1800), @char); @char.Spells.AttackSend(spell.Number, message.Target, true); break; case Spell.Heal: case Spell.Heal1: case Spell.Heal2: case Spell.Heal3: case Spell.Heal4: case Spell.Heal5: if (@char.BaseClass != HeroClass.FaryElf) { return; } var addLife = @char.EnergyTotal / 5; if (spells.Character == null) { return; } spells.Character.Health += addLife; @char.Spells.AttackSend(spell.Number, message.Target, true); break; case Spell.GreaterDefense: case Spell.GreaterDefense1: case Spell.GreaterDefense2: case Spell.GreaterDefense3: case Spell.GreaterDefense4: case Spell.GreaterDefense5: if (@char.BaseClass != HeroClass.FaryElf) { return; } spells.SetBuff(SkillStates.Defense, TimeSpan.FromSeconds(1800), @char); @char.Spells.AttackSend(spell.Number, message.Target, true); break; case Spell.GreaterDamage: case Spell.GreaterDamage1: case Spell.GreaterDamage2: case Spell.GreaterDamage3: case Spell.GreaterDamage4: case Spell.GreaterDamage5: if (@char.BaseClass != HeroClass.FaryElf) { return; } spells.SetBuff(SkillStates.Attack, TimeSpan.FromSeconds(1800), @char); @char.Spells.AttackSend(spell.Number, message.Target, true); break; case Spell.SoulBarrier: case Spell.SoulBarrier1: case Spell.SoulBarrier2: case Spell.SoulBarrier3: case Spell.SoulBarrier4: case Spell.SoulBarrier5: spells.SetBuff(SkillStates.SoulBarrier, TimeSpan.FromSeconds(60 + @char.EnergyTotal / 40), @char); @char.Spells.AttackSend(spell.Number, message.Target, true); break; case Spell.GreaterFortitude: case Spell.GreatFortitude1: case Spell.GreatFortitude2: case Spell.GreatFortitude3: case Spell.GreatFortitude4: case Spell.GreatFortitude5: spells.SetBuff(SkillStates.SwellLife, TimeSpan.FromSeconds(60 + @char.EnergyTotal / 10), @char); if (@char.Party != null) { foreach (var a in @char.Party.Members) { a.Character.Spells.SetBuff(SkillStates.SwellLife, TimeSpan.FromSeconds(60 + @char.EnergyTotal / 10), @char); } } @char.Spells.AttackSend(spell.Number, message.Target, true); break; case Spell.Reflex: spells.SetBuff(SkillStates.SkillDamageDeflection, TimeSpan.FromSeconds(60 + @char.EnergyTotal / 40), @char); @char.Spells.AttackSend(spell.Number, message.Target, true); break; case Spell.Sleep: spells.SetBuff(SkillStates.SkillSleep, TimeSpan.FromSeconds(30 + @char.EnergyTotal / 25), @char); @char.Spells.AttackSend(spell.Number, message.Target, true); break; default: @char.Spells.AttackSend(spell.Number, message.Target, false); break; } @char.Mana = mana; DamageType type = DamageType.Regular; var attack = 0.0f; switch (spell.Number) { case Spell.Falling_Slash: case Spell.Lunge: case Spell.Uppercut: case Spell.Cyclone: case Spell.Slash: case Spell.TwistingSlash: case Spell.TwistingSlash1: case Spell.TwistingSlash2: case Spell.TwistingSlash3: case Spell.TwistingSlash4: case Spell.TwistingSlash5: case Spell.RagefulBlow: case Spell.RagefulBlow1: case Spell.RagefulBlow2: case Spell.RagefulBlow3: case Spell.RagefulBlow4: case Spell.RagefulBlow5: case Spell.DeathStab: case Spell.DeathStab1: case Spell.DeathStab2: case Spell.DeathStab3: case Spell.DeathStab4: case Spell.DeathStab5: case Spell.CrescentMoonSlash: case Spell.Impale: case Spell.FireBreath: attack = @char.SkillAttack(spell, defense, out type); //else // @char.SkillAttack(spell, player, out type); break; case Spell.Heal: case Spell.Heal1: case Spell.Heal2: case Spell.Heal3: case Spell.Heal4: case Spell.Heal5: case Spell.GreaterDamage: case Spell.GreaterDamage1: case Spell.GreaterDamage2: case Spell.GreaterDamage3: case Spell.GreaterDamage4: case Spell.GreaterDamage5: case Spell.GreaterDefense: case Spell.GreaterDefense1: case Spell.GreaterDefense2: case Spell.GreaterDefense3: case Spell.GreaterDefense4: case Spell.GreaterDefense5: case Spell.GreaterFortitude: case Spell.GreatFortitude1: case Spell.GreatFortitude2: case Spell.GreatFortitude3: case Spell.GreatFortitude4: case Spell.GreatFortitude5: case Spell.SoulBarrier: case Spell.SoulBarrier1: case Spell.SoulBarrier2: case Spell.SoulBarrier3: case Spell.SoulBarrier4: case Spell.SoulBarrier5: case Spell.Teleport: case Spell.InfinityArrow: return; default: if (spell.IsDamage == 0) { return; } if (@char.BaseClass == HeroClass.Summoner || @char.BaseClass == HeroClass.DarkWizard || @char.BaseClass == HeroClass.MagicGladiator) { attack = @char.MagicAttack(spell, defense, out type); } else { attack = @char.SkillAttack(spell, defense, out type); } if (attack <= 0) { attack = 0; type = DamageType.Miss; } break; } if (@char.Spells.CheckCombo(spell.Number)) { attack += (@char.StrengthTotal + @char.AgilityTotal + @char.EnergyTotal) / 2.0f; @char.Spells.AttackSend(Spell.Combo, target, true); } player?.Character.GetAttacked((ushort)@char.Player.Session.ID, @char.Direction, 0, (int)attack, type, spell.Number, eDmg); monster?.GetAttackedDelayed(@char.Player, (int)attack, type, TimeSpan.FromMilliseconds(500)); } }
/// <summary> /// Fired when the game processes a spell cast. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="GameObjectProcessSpellCastEventArgs" /> instance containing the event data.</param> private void ObjAiBaseOnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsAlly || !zhonyaItem.IsReady() || !getCheckBoxItem(this.Menu, "ZhonyaDangerous")) { return; } var spellData = Spells.FirstOrDefault( x => x.SDataName == args.SData.Name.ToLower() || x.MissileName == args.SData.Name.ToLower()); if (spellData == null) { return; } if (!getCheckBoxItem(this.Menu, string.Format("Zhonya{0}", spellData.SDataName)) || !getCheckBoxItem(this.Menu, "ZhonyaDangerous")) { return; } if (Player.LSDistance(args.Start) > spellData.CastRange) { return; } // Targetted spells if (args.SData.TargettingType == SpellDataTargetType.Unit && args.Target.IsMe || args.SData.TargettingType == SpellDataTargetType.SelfAndUnit && args.Target.IsMe || args.SData.TargettingType == SpellDataTargetType.Self || args.SData.TargettingType == SpellDataTargetType.SelfAoe && Player.LSDistance(sender) < spellData.CastRange) { LeagueSharp.Common.Utility.DelayAction.Add((int)spellData.Delay, () => zhonyaItem.Cast()); return; } // Anything besides a skillshot return if (!args.SData.TargettingType.ToString().Contains("Location") && args.SData.TargettingType != SpellDataTargetType.Cone) { return; } // Correct the end position var endPosition = args.End; if (args.Start.LSDistance(endPosition) > spellData.CastRange) { endPosition = args.Start + Vector3.Normalize(endPosition - args.Start) * spellData.CastRange; } // credits to kurisu var isLinear = args.SData.TargettingType == SpellDataTargetType.Cone || args.SData.LineWidth > 0; var width = isLinear && args.SData.TargettingType != SpellDataTargetType.Cone ? args.SData.LineWidth : (args.SData.CastRadius < 1 ? args.SData.CastRadiusSecondary : args.SData.CastRadius); if ((isLinear && width + Player.BoundingRadius > Player.ServerPosition.LSTo2D() .LSDistance( Player.ServerPosition.LSTo2D().LSProjectOn(args.Start.LSTo2D(), endPosition.LSTo2D()).SegmentPoint)) || (!isLinear && Player.LSDistance(endPosition) <= width + Player.BoundingRadius)) { // Let missile client event handle it if (getCheckBoxItem(this.Menu, "NoZhonyaEvade") && spellData.MissileName != null) { return; } zhonyaItem.Cast(); } }
/* public SpellTypes GetSpellType(Spells spell) { return spellsTypes[spell]; } */ public string GetIconBySpell(Spells spell) { return iconsBySpells[spell]; }
private void Start() { field = ObjectsHolder.Instance.field; spells = ObjectsHolder.Instance.spells; }
private void Start() { spells = ObjectsHolder.Instance.spells; SetInfoPanelText(); }
public override int GetHashCode() { int hashCode = 0; unchecked { if (unknown != null) { hashCode += 1000000007 * unknown.GetHashCode(); } hashCode += 1000000009 * Type.GetHashCode(); hashCode += 1000000021 * Gender.GetHashCode(); hashCode += 1000000033 * Race.GetHashCode(); hashCode += 1000000087 * Class.GetHashCode(); hashCode += 1000000093 * Magic.GetHashCode(); hashCode += 1000000097 * Level.GetHashCode(); hashCode += 1000000103 * Language.GetHashCode(); hashCode += 1000000123 * Appearance.GetHashCode(); hashCode += 1000000181 * Face.GetHashCode(); hashCode += 1000000207 * InventoryPicture.GetHashCode(); hashCode += 1000000223 * ActionPoints.GetHashCode(); hashCode += 1000000241 * DialogueOptions.GetHashCode(); hashCode += 1000000271 * ResponseOptions.GetHashCode(); hashCode += 1000000289 * TrainingPoints.GetHashCode(); hashCode += 1000000297 * Gold.GetHashCode(); hashCode += 1000000321 * Rations.GetHashCode(); hashCode += 1000000349 * Conditions.GetHashCode(); hashCode += 1000000363 * Strength.GetHashCode(); hashCode += 1000000403 * Intelligence.GetHashCode(); hashCode += 1000000409 * Dexterity.GetHashCode(); hashCode += 1000000411 * Speed.GetHashCode(); hashCode += 1000000427 * Stamina.GetHashCode(); hashCode += 1000000433 * Luck.GetHashCode(); hashCode += 1000000439 * MagicResistance.GetHashCode(); hashCode += 1000000447 * MagicTallent.GetHashCode(); hashCode += 1000000453 * CloseRangeCombat.GetHashCode(); hashCode += 1000000459 * LongRangeCombat.GetHashCode(); hashCode += 1000000483 * CriticalHit.GetHashCode(); hashCode += 1000000513 * Lockpicking.GetHashCode(); hashCode += 1000000531 * LifePoints.GetHashCode(); hashCode += 1000000579 * SpellPoints.GetHashCode(); hashCode += 1000000007 * Age.GetHashCode(); hashCode += 1000000009 * BaseProtection.GetHashCode(); hashCode += 1000000021 * Protection.GetHashCode(); hashCode += 1000000033 * BaseDamage.GetHashCode(); hashCode += 1000000087 * Damage.GetHashCode(); hashCode += 1000000093 * Experience.GetHashCode(); if (Spells != null) { hashCode += 1000000097 * Spells.GetHashCode(); } if (Name != null) { hashCode += 1000000103 * Name.GetHashCode(); } if (SpellStrengths != null) { hashCode += 1000000123 * SpellStrengths.GetHashCode(); } } return(hashCode); }
protected override void Update() { if (Spells.get("W").Level > 1) { Spells.get("W").Range = 110 + Spells.get("W").Level * 20; } if (Spells.get("R").Level > 1) { Spells.get("R").Range = 900 + Spells.get("R").Level * 300; } if (Menu.Item("Ks_r").GetValue <bool>()) { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsEnemy && enemy.IsValid && enemy.Distance(Player) < Spells.get("R").Range)) { if (HealthPrediction.GetHealthPrediction(enemy, (int)Spells.get("R").Delay * 1000) < UltimateDamage(enemy)) { Spells.CastSkillshot("R", enemy); } } } if (Menu.Item("Auto_passive").GetValue <bool>() && Player.IsDead /*Player.HasBuff("KogMawIcathianSurprise")*/) { Orbwalker.SetMovement(false); Obj_AI_Hero target = null; foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsEnemy && !enemy.IsDead && enemy.Distance(Player) < 1000 && enemy.Health < PassiveDamage(enemy))) { if (target == null) { target = enemy; } else { target = (target.Distance(Player) > enemy.Distance(Player) ? enemy : target); } } if (target == null) { foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsEnemy && !enemy.IsDead && enemy.Distance(Player) < 1000)) { if (target == null) { target = enemy; } else { target = (target.Distance(Player) > enemy.Distance(Player) ? enemy : target); } } } if (target != null) { Player.IssueOrder(GameObjectOrder.MoveTo, target.Position); } else { Orbwalker.SetMovement(true); } } else { Orbwalker.SetMovement(true); } }
internal Data Create(Row _Row) { Data _Data; switch (this.Index) { case 1: _Data = new Buildings(_Row, this); break; case 3: _Data = new Resource(_Row, this); break; case 4: _Data = new Characters(_Row, this); break; case 8: _Data = new Obstacles(_Row, this); break; case 11: _Data = new Experience_Levels(_Row, this); break; case 12: _Data = new Traps(_Row, this); break; // case 13: // _Data = new Alliance_Badges(_Row, this);//not work break; case 14: _Data = new Globals(_Row, this); break; case 17: _Data = new Npcs(_Row, this); break; case 18: _Data = new Decos(_Row, this); break; case 20: _Data = new Shields(_Row, this); break; case 21: _Data = new Missions(_Row, this); break; case 23: _Data = new Achievements(_Row, this); break; case 26: _Data = new Spells(_Row, this); break; case 28: _Data = new Heroes(_Row, this); break; case 29: _Data = new Leagues(_Row, this); break; case 37: _Data = new Variables(_Row, this); break; case 39: _Data = new Village_Objects(_Row, this); break; /*case 2: * _Data = new Locales(_Row, this); * break; * case 3: * _Data = new Resources(_Row, this); * break; * case 4: * _Data = new Characters(_Row, this); * break; * // case 5: Animation * case 6: * _Data = new Projectiles(_Row, this); * break; * case 7: * _Data = new Building_Classes(_Row, this); * break; * case 8: * _Data = new Obstacles(_Row, this); * break; * case 9: * _Data = new Effects(_Row, this); * break; * // case 10: Particle Emitters * case 11: * _Data = new Experience_Levels(_Row, this); * break; * case 12: * _Data = new Traps(_Row, this); * break; * case 13: * _Data = new Alliance_Badges(_Row, this); * break; * case 14: * _Data = new Globals(_Row, this); * break; * // case 15: TownHall Levels * case 16: * _Data = new Alliance_Portal(_Row, this); * break; * case 17: * _Data = new Npcs(_Row, this); * break; * case 18: * _Data = new Decos(_Row, this); * break; * // case 19: Resource Packs * case 20: * _Data = new Shields(_Row, this); * break; * // case 22: Billing Packages * * // case 24: Credits * // case 25: Faq * case 26: * _Data = new Spells(_Row, this); * break; * // case 27: Hints * case 28: * _Data = new Heroes(_Row, this); * break; * case 29: * _Data = new Leagues(_Row, this); * break; * * case 37: * _Data = new Variables(_Row, this); * break; */ default: { _Data = new Data(_Row, this); break; } } return(_Data); }
static EvadeSpellDatabase() { //Add available evading spells to the database. SORTED BY PRIORITY. EvadeSpellData spell; #region Champion SpellShields #region Sivir if (ObjectManager.Player.ChampionName == "Sivir") { spell = new ShieldData("Sivir E", SpellSlot.E, 100, 1, true); Spells.Add(spell); } #endregion #region Nocturne if (ObjectManager.Player.ChampionName == "Nocturne") { spell = new ShieldData("Nocturne E", SpellSlot.E, 100, 1, true); Spells.Add(spell); } #endregion #endregion //Walking. spell = new EvadeSpellData("Walking", 1); Spells.Add(spell); #region Champion MoveSpeed buffs #region Blitzcrank if (ObjectManager.Player.ChampionName == "Blitzcrank") { spell = new MoveBuffData( "Blitzcrank W", SpellSlot.W, 100, 3, () => ObjectManager.Player.MoveSpeed * (1 + 0.12f + 0.04f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level)); Spells.Add(spell); } #endregion #region Draven if (ObjectManager.Player.ChampionName == "Draven") { spell = new MoveBuffData( "Draven W", SpellSlot.W, 100, 3, () => ObjectManager.Player.MoveSpeed * (1 + 0.35f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level)); Spells.Add(spell); } #endregion #region Evelynn if (ObjectManager.Player.ChampionName == "Evelynn") { spell = new MoveBuffData( "Evelynn W", SpellSlot.W, 100, 3, () => ObjectManager.Player.MoveSpeed * (1 + 0.2f + 0.1f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level)); Spells.Add(spell); } #endregion #region Garen if (ObjectManager.Player.ChampionName == "Garen") { spell = new MoveBuffData("Garen Q", SpellSlot.Q, 100, 3, () => ObjectManager.Player.MoveSpeed * (1.35f)); Spells.Add(spell); } #endregion #region Katarina if (ObjectManager.Player.ChampionName == "Katarina") { spell = new MoveBuffData( "Katarina W", SpellSlot.W, 100, 3, () => HeroManager.Enemies.Any(h => h.IsValidTarget(375)) ? ObjectManager.Player.MoveSpeed * (1 + 0.10f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level) : 0); Spells.Add(spell); } #endregion #region Karma if (ObjectManager.Player.ChampionName == "Karma") { spell = new MoveBuffData( "Karma E", SpellSlot.E, 100, 3, () => ObjectManager.Player.MoveSpeed * (1 + 0.35f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).Level)); Spells.Add(spell); } #endregion #region Kennen if (ObjectManager.Player.ChampionName == "Kennen") { spell = new MoveBuffData("Kennen E", SpellSlot.E, 100, 3, () => 200 + ObjectManager.Player.MoveSpeed); //Actually it should be +335 but ingame you only gain +230, rito plz Spells.Add(spell); } #endregion #region Khazix if (ObjectManager.Player.ChampionName == "Khazix") { spell = new MoveBuffData("Khazix R", SpellSlot.R, 100, 5, () => ObjectManager.Player.MoveSpeed * 1.4f); Spells.Add(spell); } #endregion #region Lulu if (ObjectManager.Player.ChampionName == "Lulu") { spell = new MoveBuffData( "Lulu W", SpellSlot.W, 100, 5, () => ObjectManager.Player.MoveSpeed * (1.3f + ObjectManager.Player.FlatMagicDamageMod / 100 * 0.1f)); Spells.Add(spell); } #endregion #region Nunu if (ObjectManager.Player.ChampionName == "Nunu") { spell = new MoveBuffData( "Nunu W", SpellSlot.W, 100, 3, () => ObjectManager.Player.MoveSpeed * (1 + 0.1f + 0.01f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level)); Spells.Add(spell); } #endregion #region Ryze if (ObjectManager.Player.ChampionName == "Ryze") { spell = new MoveBuffData("Ryze R", SpellSlot.R, 100, 5, () => 80 + ObjectManager.Player.MoveSpeed); Spells.Add(spell); } #endregion #region Shyvana if (ObjectManager.Player.ChampionName == "Sivir") { spell = new MoveBuffData("Sivir R", SpellSlot.R, 100, 5, () => ObjectManager.Player.MoveSpeed * (1.6f)); Spells.Add(spell); } #endregion #region Shyvana if (ObjectManager.Player.ChampionName == "Shyvana") { spell = new MoveBuffData( "Shyvana W", SpellSlot.W, 100, 4, () => ObjectManager.Player.MoveSpeed * (1 + 0.25f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level)); spell.CheckSpellName = "ShyvanaImmolationAura"; Spells.Add(spell); } #endregion #region Sona if (ObjectManager.Player.ChampionName == "Sona") { spell = new MoveBuffData( "Sona E", SpellSlot.E, 100, 3, () => ObjectManager.Player.MoveSpeed * (1 + 0.12f + 0.01f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).Level + ObjectManager.Player.FlatMagicDamageMod / 100 * 0.075f + 0.02f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level)); Spells.Add(spell); } #endregion #region Teemo ^_^ if (ObjectManager.Player.ChampionName == "Teemo") { spell = new MoveBuffData( "Teemo W", SpellSlot.W, 100, 3, () => ObjectManager.Player.MoveSpeed * (1 + 0.06f + 0.04f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level)); Spells.Add(spell); } #endregion #region Udyr if (ObjectManager.Player.ChampionName == "Udyr") { spell = new MoveBuffData( "Udyr E", SpellSlot.E, 100, 3, () => ObjectManager.Player.MoveSpeed * (1 + 0.1f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).Level)); Spells.Add(spell); } #endregion #region Zilean if (ObjectManager.Player.ChampionName == "Zilean") { spell = new MoveBuffData("Zilean E", SpellSlot.E, 100, 3, () => ObjectManager.Player.MoveSpeed * 1.55f); Spells.Add(spell); } #endregion #endregion #region Champion Dashes #region Aatrox if (ObjectManager.Player.ChampionName == "Aatrox") { spell = new DashData("Aatrox Q", SpellSlot.Q, 650, false, 400, 3000, 3); spell.Invert = true; Spells.Add(spell); } #endregion #region Akali if (ObjectManager.Player.ChampionName == "Akali") { spell = new DashData("Akali R", SpellSlot.R, 800, false, 100, 2461, 3); spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions }; Spells.Add(spell); } #endregion #region Alistar if (ObjectManager.Player.ChampionName == "Alistar") { spell = new DashData("Alistar W", SpellSlot.W, 650, false, 100, 1900, 3); spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions }; Spells.Add(spell); } #endregion #region Caitlyn if (ObjectManager.Player.ChampionName == "Caitlyn") { spell = new DashData("Caitlyn E", SpellSlot.E, 490, true, 250, 1000, 3); spell.Invert = true; Spells.Add(spell); } #endregion #region Corki if (ObjectManager.Player.ChampionName == "Corki") { spell = new DashData("Corki W", SpellSlot.W, 790, false, 250, 1044, 3); Spells.Add(spell); } #endregion #region Fizz if (ObjectManager.Player.ChampionName == "Fizz") { spell = new DashData("Fizz Q", SpellSlot.Q, 550, true, 100, 1400, 4); spell.ValidTargets = new[] { SpellValidTargets.EnemyMinions, SpellValidTargets.EnemyChampions }; Spells.Add(spell); } #endregion #region Gragas if (ObjectManager.Player.ChampionName == "Gragas") { spell = new DashData("Gragas E", SpellSlot.E, 600, true, 250, 911, 3); Spells.Add(spell); } #endregion #region Gnar if (ObjectManager.Player.ChampionName == "Gnar") { spell = new DashData("Gnar E", SpellSlot.E, 50, false, 0, 900, 3); spell.CheckSpellName = "GnarE"; Spells.Add(spell); } #endregion #region Graves if (ObjectManager.Player.ChampionName == "Graves") { spell = new DashData("Graves E", SpellSlot.E, 425, true, 100, 1223, 3); Spells.Add(spell); } #endregion #region Irelia if (ObjectManager.Player.ChampionName == "Irelia") { spell = new DashData("Irelia Q", SpellSlot.Q, 650, false, 100, 2200, 3); spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions }; Spells.Add(spell); } #endregion #region Jax if (ObjectManager.Player.ChampionName == "Jax") { spell = new DashData("Jax Q", SpellSlot.Q, 700, false, 100, 1400, 3); spell.ValidTargets = new[] { SpellValidTargets.EnemyWards, SpellValidTargets.AllyWards, SpellValidTargets.AllyMinions, SpellValidTargets.AllyChampions, SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions }; Spells.Add(spell); } #endregion #region LeBlanc if (ObjectManager.Player.ChampionName == "LeBlanc") { spell = new DashData("LeBlanc W1", SpellSlot.W, 600, false, 100, 1621, 3); spell.CheckSpellName = "LeblancSlide"; Spells.Add(spell); } if (ObjectManager.Player.ChampionName == "LeBlanc") { spell = new DashData("LeBlanc RW", SpellSlot.R, 600, false, 100, 1621, 3); spell.CheckSpellName = "LeblancSlideM"; Spells.Add(spell); } #endregion #region LeeSin if (ObjectManager.Player.ChampionName == "LeeSin") { spell = new DashData("LeeSin W", SpellSlot.W, 700, false, 250, 2000, 3); spell.ValidTargets = new[] { SpellValidTargets.AllyChampions, SpellValidTargets.AllyMinions, SpellValidTargets.AllyWards }; spell.CheckSpellName = "BlindMonkWOne"; Spells.Add(spell); } #endregion #region Lucian if (ObjectManager.Player.ChampionName == "Lucian") { spell = new DashData("Lucian E", SpellSlot.E, 425, false, 100, 1350, 2); Spells.Add(spell); } #endregion #region Nidalee if (ObjectManager.Player.ChampionName == "Nidalee") { spell = new DashData("Nidalee W", SpellSlot.W, 375, true, 250, 943, 3); spell.CheckSpellName = "Pounce"; Spells.Add(spell); } #endregion #region Pantheon if (ObjectManager.Player.ChampionName == "Pantheon") { spell = new DashData("Pantheon W", SpellSlot.W, 600, false, 100, 1000, 3); spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions }; Spells.Add(spell); } #endregion #region Riven if (ObjectManager.Player.ChampionName == "Riven") { spell = new DashData("Riven Q", SpellSlot.Q, 222, true, 250, 560, 3); spell.RequiresPreMove = true; Spells.Add(spell); spell = new DashData("Riven E", SpellSlot.E, 250, false, 250, 1200, 3); Spells.Add(spell); } #endregion #region Tristana if (ObjectManager.Player.ChampionName == "Tristana") { spell = new DashData("Tristana W", SpellSlot.W, 900, true, 300, 800, 5); Spells.Add(spell); } #endregion #region Tryndamare if (ObjectManager.Player.ChampionName == "Tryndamere") { spell = new DashData("Tryndamere E", SpellSlot.E, 650, true, 250, 900, 3); Spells.Add(spell); } #endregion #region Vayne if (ObjectManager.Player.ChampionName == "Vayne") { spell = new DashData("Vayne Q", SpellSlot.Q, 300, true, 100, 910, 2); Spells.Add(spell); } #endregion #region Wukong if (ObjectManager.Player.ChampionName == "MonkeyKing") { spell = new DashData("Wukong E", SpellSlot.E, 650, false, 100, 1400, 3); spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions }; Spells.Add(spell); } #endregion #endregion #region Champion Blinks #region Ezreal if (ObjectManager.Player.ChampionName == "Ezreal") { spell = new BlinkData("Ezreal E", SpellSlot.E, 450, 350, 3); Spells.Add(spell); } #endregion #region Kassadin if (ObjectManager.Player.ChampionName == "Kassadin") { spell = new BlinkData("Kassadin R", SpellSlot.R, 700, 200, 5); Spells.Add(spell); } #endregion #region Katarina if (ObjectManager.Player.ChampionName == "Katarina") { spell = new BlinkData("Katarina E", SpellSlot.E, 700, 200, 3); spell.ValidTargets = new[] { SpellValidTargets.AllyChampions, SpellValidTargets.AllyMinions, SpellValidTargets.AllyWards, SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions, SpellValidTargets.EnemyWards }; Spells.Add(spell); } #endregion #region Shaco if (ObjectManager.Player.ChampionName == "Shaco") { spell = new BlinkData("Shaco Q", SpellSlot.Q, 400, 350, 3); Spells.Add(spell); } #endregion #region Talon if (ObjectManager.Player.ChampionName == "Talon") { spell = new BlinkData("Talon E", SpellSlot.E, 700, 100, 3); spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions }; Spells.Add(spell); } #endregion #endregion #region Champion Invulnerabilities #region Elise if (ObjectManager.Player.ChampionName == "Elise") { spell = new InvulnerabilityData("Elise E", SpellSlot.E, 250, 3); spell.CheckSpellName = "EliseSpiderEInitial"; spell.SelfCast = true; Spells.Add(spell); } #endregion #region Vladimir if (ObjectManager.Player.ChampionName == "Vladimir") { spell = new InvulnerabilityData("Vladimir W", SpellSlot.W, 250, 3); spell.SelfCast = true; Spells.Add(spell); } #endregion #region Fizz if (ObjectManager.Player.ChampionName == "Fizz") { spell = new InvulnerabilityData("Fizz E", SpellSlot.E, 250, 3); Spells.Add(spell); } #endregion #region MasterYi if (ObjectManager.Player.ChampionName == "MasterYi") { spell = new InvulnerabilityData("MasterYi Q", SpellSlot.Q, 250, 3); spell.MaxRange = 600; spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions }; Spells.Add(spell); } #endregion #endregion //Flash if (ObjectManager.Player.GetSpellSlot("SummonerFlash") != SpellSlot.Unknown) { spell = new BlinkData("Flash", ObjectManager.Player.GetSpellSlot("SummonerFlash"), 400, 100, 5, true); Spells.Add(spell); } //Zhonyas spell = new EvadeSpellData("Zhonyas", 5); Spells.Add(spell); #region Champion Shields #region Akali #endregion #region Annie #endregion #region Diana #endregion #region Galio #endregion #region Akali #endregion #region Akali #endregion #region Akali #endregion #region Akali #endregion #region Akali #endregion #region Akali #endregion #region Akali #endregion #region Akali #endregion #region Akali #endregion #region Karma if (ObjectManager.Player.ChampionName == "Karma") { spell = new ShieldData("Karma E", SpellSlot.E, 100, 2); spell.CanShieldAllies = true; spell.MaxRange = 800; Spells.Add(spell); } #endregion #region Janna if (ObjectManager.Player.ChampionName == "Janna") { spell = new ShieldData("Janna E", SpellSlot.E, 100, 1); spell.CanShieldAllies = true; spell.MaxRange = 800; Spells.Add(spell); } #endregion #region Morgana if (ObjectManager.Player.ChampionName == "Morgana") { spell = new ShieldData("Morgana E", SpellSlot.E, 100, 3); spell.CanShieldAllies = true; spell.MaxRange = 750; Spells.Add(spell); } #endregion #endregion }
public void Save() { Record.Update(); Spells.ForEach(spell => spell.Update()); }
public override void AddSpellsToClass() { Spells.Add(new Fireball()); }
public bool CanBoostSpell(CharacterSpellRecord spell) { //Need to add a check if the character is fighting when fight will be done. return(SpellsPoints >= 0 && spell != null && spell.Level < 6 && SpellsPoints >= spell.Level && Spells.Contains(spell)); }
public bool KnowsSpell(Spells spell) { return spellBook[(int)spell - 1] != 0; }
private void addSpellValues(Dictionary <string, string> dictValues) { Spell spell; if ((spell = Spells.Find(delegate(Spell s) { return(s.Name.Equals("Lifebloom")); })) != null) { dictValues.Add("LB Tick", string.Format("{0}*{1} ticks", Math.Round(spell.PeriodicTick, 2), spell.PeriodicTicks)); dictValues.Add("LB Heal", string.Format("{0}*{1}", spell.AverageTotalHeal.ToString(), spell.HealInterval)); dictValues.Add("LB HPS", string.Format("{0}*HPS is the average amount healed divided by the time to cast the spell", Math.Round(spell.HPS))); dictValues.Add("LB HPM", string.Format("{0}*{1} mana", spell.HPM, spell.Cost)); } else { dictValues.Add("LB Tick", "--"); dictValues.Add("LB Heal", "--"); dictValues.Add("LB HPS", "--"); dictValues.Add("LB HPM", "--"); } if ((spell = Spells.Find(delegate(Spell s) { return(s.Name.Equals("Lifebloom Stack")); })) != null) { dictValues.Add("LBS Tick", string.Format("{0}*{1} ticks", Math.Round(spell.PeriodicTick, 2), spell.PeriodicTicks)); dictValues.Add("LBS HPS", string.Format("{0}*HPS is the average amount healed divided by the time to cast the spell", Math.Round(spell.HPS))); dictValues.Add("LBS HPM", string.Format("{0}*{1} mana", spell.HPM, spell.Cost)); } else { dictValues.Add("LBS Tick", "--"); dictValues.Add("LBS HPS", "--"); dictValues.Add("LBS HPM", "--"); } if ((spell = Spells.Find(delegate(Spell s) { return(s.Name.Equals("Rejuvenation")); })) != null) { dictValues.Add("RJ Tick", string.Format("{0}*{1} ticks", Math.Round(spell.PeriodicTick, 2), spell.PeriodicTicks)); dictValues.Add("RJ HPS", string.Format("{0}*HPS is the average amount healed divided by the time to cast the spell", Math.Round(spell.HPS))); dictValues.Add("RJ HPM", string.Format("{0}*{1} mana", spell.HPM, spell.Cost)); } else { dictValues.Add("RJ Tick", "--"); dictValues.Add("RJ HPS", "--"); dictValues.Add("RJ HPM", "--"); } if ((spell = Spells.Find(delegate(Spell s) { return(s.Name.Equals("Regrowth")); })) != null) { dictValues.Add("RG Tick", string.Format("{0}*{1} ticks", Math.Round(spell.PeriodicTick, 2), spell.PeriodicTicks)); dictValues.Add("RG Heal", String.Format("{0}*{1}", spell.AverageTotalHeal, spell.HealInterval)); dictValues.Add("RG HPS", string.Format("{0}*HPS is the average amount healed divided by the time to cast the spell\nCasttime: {1}", Math.Round(spell.HPS), Math.Round(spell.CastTime, 2))); dictValues.Add("RG HPM", string.Format("{0}*{1} mana", spell.HPM, spell.Cost)); } else { dictValues.Add("Regrowth Tick", "--"); dictValues.Add("Regrowth Heal", "--"); dictValues.Add("Regrowth HPS", "--"); dictValues.Add("Regrowth HPM", "--"); } if ((spell = Spells.Find(delegate(Spell s) { return(s.Name.Equals("Healing Touch")); })) != null) { dictValues.Add("HT Heal", String.Format("{0}*{1}", spell.AverageTotalHeal, spell.HealInterval)); dictValues.Add("HT HPS", string.Format("{0}*HPS is the average amount healed divided by the time to cast the spell\nCasttime: {1}", Math.Round(spell.HPS), Math.Round(spell.CastTime, 2))); dictValues.Add("HT HPM", string.Format("{0}*{1} mana", spell.HPM, spell.Cost)); } else { dictValues.Add("HT Heal", "--"); dictValues.Add("HT HPS", "--"); dictValues.Add("HT HPM", "--"); } }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { Spells ds = new Spells(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; }
internal void PasteFromClipboard(bool recordOnly, bool asNew) { if (!MainView.HasClipboardData()) { MainView.PostStatusWarning(Resources.TheClipboardIsEmpty); return; } var clipboardObject = MainView.Clipboard; bool isRec = clipboardObject is Record || clipboardObject is GroupRecord; bool isRecList = clipboardObject is BaseRecord[]; if (recordOnly && !(isRec || isRecList)) { return; } if (isRec) { BaseRecord node = this.PluginTree.SelectedRecord; try { var dstNode = this.PluginTree.SelectedRecord; if (dstNode is Record && (dstNode.Parent is GroupRecord || dstNode.Parent is Plugin)) { dstNode = dstNode.Parent; } var br = ((BaseRecord)clipboardObject).Clone(); dstNode.AddRecord(br); if (asNew) { Spells.giveRecordNewFormID((Record)br, false); } this.RebuildSelection(); } catch (TESParserException ex) { MessageBox.Show(ex.Message); } } else if (isRecList) { var node = this.PluginTree.SelectedRecord; try { if (node is Record && (node.Parent is GroupRecord)) { node = node.Parent; } foreach (var rec in (BaseRecord[])clipboardObject) { var br = rec.Clone(); node.AddRecord(br); if (asNew) { Spells.giveRecordNewFormID((Record)br, false); } } this.RefreshObject(node as BaseRecord); /* var gr = node as IGroupRecord; * if (gr != null) * { * foreach (var rec in (BaseRecord[]) clipboardObject) * gr.AddRecord(rec); * RefreshObject(gr as BaseRecord); * } */ } catch (TESParserException ex) { MessageBox.Show(ex.Message); } } }
// Use this for initialization void Start() { spells = (Spells)gameObject.GetComponent(typeof(Spells)); playerscript = (PlayerController)gameObject.GetComponent(typeof(PlayerController)); collider = (PolygonCollider2D)gameObject.GetComponent(typeof(PolygonCollider2D)); }
/// <summary> /// Merge data from another participant into this participant. /// </summary> public void Merge(FightParticipant p, int intervalOffset = 0, int timeOffset = 0) { OutboundMissCount += p.OutboundMissCount; OutboundHitCount += p.OutboundHitCount; OutboundHitSum += p.OutboundHitSum; OutboundStrikeCount += p.OutboundStrikeCount; InboundMissCount += p.InboundMissCount; InboundHitCount += p.InboundHitCount; InboundHitSum += p.InboundHitSum; InboundMeleeCount += p.InboundMeleeCount; InboundMeleeSum += p.InboundMeleeSum; InboundRiposteSum += p.InboundRiposteSum; //InboundSpellCount += p.InboundSpellCount; //InboundSpellSum += p.InboundSpellSum; InboundStrikeCount += p.InboundStrikeCount; OutboundHealSum += p.OutboundHealSum; InboundHealSum += p.InboundHealSum; InboundFullHealSum += p.InboundFullHealSum; DeathCount += p.DeathCount; // merge intervals starting at 'intervalOffset' base for (var i = 0; i < p.DPS.Count; i++) { while (DPS.Count <= intervalOffset + i) { DPS.Add(0); } DPS[intervalOffset + i] += p.DPS[i]; } for (var i = 0; i < p.TankDPS.Count; i++) { while (TankDPS.Count <= intervalOffset + i) { TankDPS.Add(0); } TankDPS[intervalOffset + i] += p.TankDPS[i]; } for (var i = 0; i < p.HPS.Count; i++) { while (HPS.Count <= intervalOffset + i) { HPS.Add(0); } HPS[intervalOffset + i] += p.HPS[i]; } for (var i = 0; i < p.InboundHPS.Count; i++) { while (InboundHPS.Count <= intervalOffset + i) { InboundHPS.Add(0); } InboundHPS[intervalOffset + i] += p.InboundHPS[i]; } foreach (var at in p.AttackTypes) { var _at = AttackTypes.FirstOrDefault(x => x.Type == at.Type); if (_at == null) { _at = new FightHit(); _at.Type = at.Type; AttackTypes.Add(_at); } _at.Merge(at); } foreach (var dt in p.DefenseTypes) { var _dt = DefenseTypes.FirstOrDefault(x => x.Type == dt.Type); if (_dt == null) { _dt = new FightMiss(); _dt.Type = dt.Type; DefenseTypes.Add(_dt); } _dt.Merge(dt); } foreach (var h in p.Heals) { var _h = Heals.FirstOrDefault(x => x.Target == h.Target); if (_h == null) { _h = new FightHeal(); _h.Target = h.Target; Heals.Add(_h); } _h.Merge(h); } foreach (var s in p.Spells) { var _s = Spells.FirstOrDefault(x => x.Name == s.Name && x.Type == s.Type); if (_s == null) { _s = new FightSpell(); _s.Type = s.Type; _s.Name = s.Name; //_s.Times = // todo Spells.Add(_s); } _s.Merge(s); } // disabled - merging buffs will create duplicates if fights overlap and include the same buff // it would be better to recreate buffs after merging p.Buffs.Clear(); // >= 0 avoids any pre fight buffs //foreach (var b in p.Buffs.Where(x => x.Time >= 0)) //{ // if (timeOffset == 0) // Buffs.Add(b); // else // Buffs.Add(new FightBuff { Name = b.Name, Time = b.Time + timeOffset }); //} }
// Use this for initialization void Start() { GameObject player = GameObject.FindGameObjectWithTag("Player"); GameObject souls = GameObject.Find("EnergyCluster(Clone)"); playerscript = player.GetComponent(typeof(PlayerController)) as PlayerController; spells = player.GetComponent(typeof(Spells)) as Spells; talents = player.GetComponent(typeof(PlayerTalents)) as PlayerTalents; Items other = player.GetComponent(typeof(Items)) as Items; SaveData data = new SaveData("" + playerscript.savefile); data["name"] = playerscript.name; data["gender"] = playerscript.gender; data["checkpointlevel"] = playerscript.CheckpointLevel; data["checkpointname"] = playerscript.CheckpointName; data["bagisfull"] = playerscript.bagisFull; data["equippedspellL"] = playerscript.equippedSpellL; data["equippedspellR"] = playerscript.equippedSpellR; data["equippedspellQ"] = playerscript.equippedSpellQ; data["equippedspellQ2"] = playerscript.equippedSpellQ2; data["equippedspell1"] = playerscript.equippedSpell1; data["equippedspell2"] = playerscript.equippedSpell2; data["xp"] = playerscript.xp; data["level"] = playerscript.level; data["maxhealth"] = playerscript.maxHealth; data["maxstamina"] = playerscript.max_stamina; data["unlockedspells"] = spells.UnlockedSpells; data["unlockedhats"] = spells.UnlockedHats; data["unlockedtunics"] = spells.UnlockedTunics; data["unlockedamulets"] = spells.UnlockedAmulets; data["pickedupitems"] = spells.PickedUpItems; data["equippedhat"] = spells.EquippedHat; data["equippedtunic"] = spells.EquippedTunic; data["equippedamulet"] = spells.EquippedAmulet; data["itemcount"] = spells.ItemCount; data["bagspace"] = spells.bagSpace; data["bagisfull"] = spells.bagIsFull; data["spellcount"] = spells.SpellCount; data["spellspace"] = spells.SpellSpace; data["spellbookisfull"] = spells.SpellBookIsFull; data["hatcount"] = spells.HatCount; data["hatspace"] = spells.HatSpace; data["hatisfull"] = spells.HatIsFull; data["amuletcount"] = spells.AmuletCount; data["amuletspace"] = spells.AmuletSpace; data["amuletisfull"] = spells.AmuletIsFull; data["tuniccount"] = spells.TunicCount; data["tunicspace"] = spells.TunicSpace; data["tunicisfull"] = spells.TunicIsFull; data["declared"] = talents.Declared; data["declaration"] = talents.declaration; data["spellpower"] = playerscript.SPELLPOWERBONUS; if (talents.Declared) { if (talents.declaration == "Inorganic") { for (int c = 0; c < talents.Inorganic_Talents_t1.Length; ++c) { mystery[c] = talents.Inorganic_Talents_t1[c].mystery; reachable[c] = talents.Inorganic_Talents_t1[c].reachable; visible[c] = talents.Inorganic_Talents_t1[c].visible; gotten[c] = talents.Inorganic_Talents_t1[c].gotten; } } else if (talents.declaration == "Organic") { for (int c = 0; c < talents.Organic_Talents.Length; ++c) { mystery[c] = talents.Organic_Talents[c].mystery; reachable[c] = talents.Organic_Talents[c].reachable; visible[c] = talents.Organic_Talents[c].visible; gotten[c] = talents.Organic_Talents[c].gotten; } } else { for (int c = 0; c < talents.Biolchem_Talents.Length; ++c) { mystery[c] = talents.Biolchem_Talents[c].mystery; reachable[c] = talents.Biolchem_Talents[c].reachable; visible[c] = talents.Biolchem_Talents[c].visible; gotten[c] = talents.Biolchem_Talents[c].gotten; } } } data["talentsmystery"] = mystery; data["talentsreachable"] = reachable; data["talentsvisible"] = visible; data["talentsgotten"] = gotten; data["items"] = other.VodExterior; data["bosses"] = other.bosses; if (souls != null) { EnergyClusterScript ecs = souls.GetComponent<EnergyClusterScript>(); data["energyclusterloc"] = ecs.transform.position; data["energyclusterlevel"] = ecs.levelname; data["energyclusterworth"] = ecs.worth; } else { } /*data["inorg"] = talents.Inorganic_Talent_t1; data["org"] = talents.Organic_Talents; data["bio"] = talents.Biolchem_Talents;*/ data.Save(); print("DONE!"); }
/// <summary> /// Merges damage, heals and spells from a pet into this participant. /// Tanking is not merged. /// All data will be prefixed with "pet:" to distinguish it from the owner. e.g. "pet:slash" vs "slash" /// </summary> public void MergePet(FightParticipant pet) { foreach (var at in pet.AttackTypes) { at.Type = "pet:" + at.Type; //owner.AttackTypes.Add(hit); var match = AttackTypes.FirstOrDefault(x => x.Type == at.Type); if (match != null) { match.Merge(at); } else { AttackTypes.Add(at); } } foreach (var spell in pet.Spells.Where(x => x.Type == "hit")) { spell.Name = "pet:" + spell.Name; var match = Spells.FirstOrDefault(x => x.Type == spell.Type && x.Name == spell.Name); if (match != null) { match.Merge(spell); } else { Spells.Add(spell); } } OutboundHitCount += pet.OutboundHitCount; OutboundHitSum += pet.OutboundHitSum; OutboundMissCount += pet.OutboundMissCount; // merges DPS and HPS intervals (but not TankDPS or InboundHPS) for (var i = 0; i < pet.DPS.Count; i++) { while (DPS.Count <= i) { DPS.Add(0); } DPS[i] += pet.DPS[i]; } for (var i = 0; i < pet.HPS.Count; i++) { while (HPS.Count <= i) { HPS.Add(0); } HPS[i] += pet.HPS[i]; } // removing the pet has the downside of hiding pet tanking //Participants.Remove(pet); // clear the damage on the pet but keep it for tanking stats pet.OutboundHitCount = 0; pet.OutboundHitSum = 0; pet.OutboundMissCount = 0; pet.AttackTypes.Clear(); //pet.Spells.Clear(); pet.Spells.RemoveAll(x => x.Type == "hit"); // leave heals on pet so it shows on the healer list pet.DPS.Clear(); pet.HPS.Clear(); }
public override void Load() { var superParent = new SuperParent(DisplayName); superParent.Initialize(); var spells = new Spells(); // - RIP CLEAN CODE spells.Initialize(); var orbwalker = new OrbwalkerModule(); orbwalker.Load(); var comboParent = new OrbwalkingParent("Combo", orbwalker.OrbwalkerInstance, Orbwalking.OrbwalkingMode.Combo); var harassParent = new OrbwalkingParent("Harass", orbwalker.OrbwalkerInstance, Orbwalking.OrbwalkingMode.Mixed); var jungleParent = new OrbwalkingParent("Jungle", orbwalker.OrbwalkerInstance, Orbwalking.OrbwalkingMode.LaneClear); var laneParent = new OrbwalkingParent("Lane", orbwalker.OrbwalkerInstance, Orbwalking.OrbwalkingMode.LaneClear); var killstealParent = new Parent("Killsteal"); var fleeParent = new Parent("Flee"); var drawingParent = new Parent("Drawing"); var mustNotBeWindingUp = new PlayerMustNotBeWindingUp(); var qReady = new SpellMustBeReady(SpellSlot.Q); var w2Ready = new SpellMustBeReady(SpellSlot.W); var eReady = new SpellMustBeReady(SpellSlot.E); var rReady = new SpellMustBeReady(SpellSlot.R); comboParent.Add(new Base[] { new QCombo().Guardian(qReady).Guardian(mustNotBeWindingUp), new WCombo().Guardian(w2Ready).Guardian(mustNotBeWindingUp), new ECombo().Guardian(eReady).Guardian(mustNotBeWindingUp), new RCombo().Guardian(rReady) }); harassParent.Add(new Base[] { new QHarass().Guardian(qReady).Guardian(mustNotBeWindingUp) }); laneParent.Add(new Base[] { new QLane().Guardian(qReady).Guardian(mustNotBeWindingUp), new W2Lane().Guardian(w2Ready) }); jungleParent.Add(new Base[] { new QJungle().Guardian(qReady).Guardian(mustNotBeWindingUp), new W2Jungle().Guardian(w2Ready).Guardian(mustNotBeWindingUp), new EJungle().Guardian(eReady).Guardian(mustNotBeWindingUp) }); killstealParent.Add(new Base[] { new QKillsteal("Q"), new WKillsteal("W") }); fleeParent.Add(new Base[] { new Flee("Flee") }); drawingParent.Add(new Base[] { new GnarDamage("Damage Indicator"), new QRange("Q"), new WRange("W"), new ERange("E"), new RRange("R") }); superParent.Add(new Base[] { // reformedUtilityParent, orbwalker, comboParent, harassParent, laneParent, jungleParent, killstealParent, new W(), new PermaActive.Antigapcloser.W(), fleeParent, drawingParent }); superParent.Load(); superParent.Menu.Style = FontStyle.Bold; superParent.Menu.Color = Color.Cyan; Game.PrintChat("<b><font color=\"#FFFFFF\">[</font></b><b><font color=\"#00e5e5\">Reformed AIO</font></b><b><font color=\"#FFFFFF\">]</font></b><b><font color=\"#FFFFFF\"> - Gnar!</font></b>"); }
public void OnForgetSpell(Spell s) { //Make sure spell is disabled s.Deactivate(); Spells[Spells.IndexOf(s)] = null; }
internal void isVictimOf(Spells.ISpell aSpell) { TargetOfSpells.Add(aSpell); }
public void AddSpell(Spell s) { //TODO: Check that we don't have too many Spells.Add(s); }