private void OnEnemyGapcloser(object sender, GapcloserManagerArgs args) { try { if (args.UniqueId.Equals("e-gapcloser") && E.IsReady() && BestTargetOnlyManager.Check("e-gapcloser", E, args.Hero)) { if (args.End.Distance(Player.Position) <= E.Range) { E.Cast(args.End); } } if (string.IsNullOrEmpty(args.UniqueId)) { if (Ultimate.IsActive(UltimateModeType.Gapcloser, args.Hero) && BestTargetOnlyManager.Check("r-gapcloser", R, args.Hero)) { RLogic(UltimateModeType.Gapcloser, HitChance.High, args.Hero); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
protected override void Combo() { var single = false; var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(); var w = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady(); var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady(); var r = Ultimate.IsActive(UltimateModeType.Combo) && R.IsReady(); if (q) { QLogic(Q.GetHitChance("combo")); } if (w) { WLogic(W.GetHitChance("combo")); } if (e) { ELogic(); } if (r) { if (!RLogic(UltimateModeType.Combo, R.GetHitChance("combo"))) { RLogicSingle(UltimateModeType.Combo, R.GetHitChance("combo")); single = true; } } ItemsSummonersLogic(null, single); }
private void RLogicSingle(UltimateModeType mode) { try { if (Ultimate.ShouldSingle(mode)) { foreach (var target in GameObjects.EnemyHeroes.Where( t => Ultimate.CheckSingle(mode, t) && (R.GetDamage(t) * 0.95f > t.Health || t.Distance(Player) + 300 < Orbwalking.GetRealAutoAttackRange(t) * 0.8f))) { var hits = GetRHits(target); if (hits.Item1 > 0) { R.Cast(hits.Item3); break; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
protected override void Combo() { var single = false; var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(); var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady() && ResourceManager.Check("combo-e"); var r = Ultimate.IsActive(UltimateModeType.Combo) && R.IsReady(); var rTarget = TargetSelector.GetTarget(R); if (r) { if (!RLogic(UltimateModeType.Combo, rTarget)) { RLogicSingle(UltimateModeType.Combo); single = true; } } if (q) { Casting.TargetSkill(Q); } if (e) { if (GetEHits().Item1 > 0) { E.Cast(); } } ItemsSummonersLogic(rTarget, single); }
private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target) { try { if (target == null || !Ultimate.IsActive(mode)) { return(false); } var pred = CPrediction.Circle(R, target, hitChance); if (pred.TotalHits > 0) { if (Ultimate.Check(mode, pred.Hits)) { _lastRCast = Game.Time; _lastRPosition = pred.CastPosition; R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
public void TestMonitorGroupe() { //Obtention du dataset Interface bdd = new Interface(); string requeteDir = @"G:\UZX\Resources\Reporting\MonitoringGroupe\MonitoringGroupe.sql"; List<string> parametres = new List<string>(); parametres.Add("@date"); parametres.Add("'27/06/2012'"); parametres.Add("@rapportCle"); parametres.Add("'MonitoringGroupe'"); parametres.Add("@cle_Montant"); parametres.Add("'MonitoringGroupe'"); parametres.Add("@rubriqueEncours"); parametres.Add("'Encours'"); string commande = bdd.getCommande(requeteDir); commande= bdd.replaceArguments(commande,parametres); DataSet ds = bdd.multiRequeteSQL(commande, ""); string[] sheetNames = null;//{ "RETRAITE" }; string date = "27/06/2012"; string tmplt = @"G:\UZX\Resources\Reporting\MonitoringGroupe\Template.xlsx"; string saveDir = @"MonitorGroupe.xlsx"; string styleDir = @"G:\UZX\Resources\Reporting\MonitoringGroupe\stylesMonitoringGroupe.txt"; string graphDir = @"G:\UZX\Resources\Reporting\MonitoringGroupe\graphMonitoringGroupe.txt"; Ultimate g2 = new Ultimate(tmplt, saveDir, styleDir, graphDir); g2.execution(ds, date, sheetNames); }
/// <summary> /// Helper pour generer une feuille excel OpenXML /// </summary> /// <param name="ds">les donnees</param> /// <param name="saveFilePath">repertoire de sauvegarde et nom du fichier en sortie</param> /// <param name="styleFilepath">repertoire et nom du fichier de style</param> /// <param name="templateFilepath">repertoire et nom du fichier de style</param> /// <param name="graphFilepath">repertoire et nom du fichier de graphiques</param> /// <param name="date">constante pour la page de garde</param> /// <param name="sheetNames">la liste des noms des onglets</param> /// <param name="monoSheetFlag">Flag = TRUE: toutes les datatables de la dataset sur le même onglet</param> public static void CreateExcelWorkbook(DataSet ds, String saveFilepath, String styleFilepath, String templateFilepath, String graphFilepath, String date, String[] sheetNames, Boolean monoSheetFlag) { try { // Rechercher les fichiers de configuration string templateFilepath2 = Config.InitFile.SearchForFile(templateFilepath); string styleFilepath2 = null; string graphFilepath2 = null; if (styleFilepath != null) { styleFilepath2 = Config.InitFile.SearchForFile(styleFilepath); } if (graphFilepath != null) { graphFilepath2 = Config.InitFile.SearchForFile(graphFilepath); } Ultimate g2 = new Ultimate(templateFilepath2, saveFilepath, styleFilepath2, graphFilepath2); g2.execution(ds, date, sheetNames, monoSheetFlag); } catch (Exception e) { IntegratorBatch.ExceptionLogger.Fatal("Impossible de créer le fichier Excel:" + saveFilepath, e); throw e; } }
protected override void Combo() { var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>(); var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>(); var r = Ultimate.IsActive(UltimateModeType.Combo); if (q && Q.IsReady()) { QLogic(); } if (e && E.IsReady()) { var target = TargetSelector.GetTarget(E); if (target != null) { ELogic(target, E.GetHitChance("combo")); } } if (r && R.IsReady()) { var target = TargetSelector.GetTarget(R); if (target != null) { if (!RLogic(UltimateModeType.Combo, R.GetHitChance("combo"), target)) { RLogicSingle(UltimateModeType.Combo, R.GetHitChance("combo")); } } } }
public void TestMaturite() { //Obtention du dataset Interface bdd = new Interface(); string requeteDir = @"G:\UZX\Resources\Reporting\Maturite\ReportMaturiteSensi.sql"; List<string> parametres = new List<string>(); parametres.Add("@dateInventaire"); parametres.Add("'27/06/2012'"); parametres.Add("@rapporCle"); parametres.Add("'MonitoringMaturiteSe'"); string commande = bdd.getCommande(requeteDir); commande = bdd.replaceArguments(commande, parametres); DataSet ds = bdd.multiRequeteSQL(commande, ""); string[] sheetNames ={ "RETRAITE","ASSURANCE","EXTERNE","GLOBAL" }; string date = "27/06/2012"; string tmplt = @"G:\UZX\Resources\Reporting\Maturite\Template.xlsx"; string saveDir = @"ReportingMaturiteSensi.xlsx"; string styleDir = @"G:\UZX\Resources\Reporting\Maturite\stylesMaturiteSensi.txt"; string graphDir = @"G:\UZX\Resources\Reporting\Maturite\graphMaturiteSensi.txt"; Ultimate g2 = new Ultimate(tmplt, saveDir, styleDir, graphDir); g2.execution(ds, date, sheetNames); }
public void TestIRCEM() { //Obtention du dataset Interface bdd = new Interface(); string requeteDir = @"G:\UZX\Resources\Reporting\IRCEM\IRCEM.sql"; List<string> parametres = new List<string>(); parametres.Add("@date"); parametres.Add("'31/05/2012'"); string commande = bdd.getCommande(requeteDir); commande = bdd.replaceArguments(commande, parametres); DataSet ds = bdd.multiRequeteSQL(commande, ""); string[] sheetNames = null;//{ "RETRAITE" }; string date = "27/06/2012"; string tmplt = @"G:\UZX\Resources\Reporting\IRCEM\TemplateIRCEM.xlsx"; string saveDir = @"IRCEM.xlsx"; string styleDir = null;// @"G:\UZX\Resources\Reporting\MonitoringGroupe\stylesMonitoringGroupe.txt"; string graphDir = null;// @"G:\UZX\Resources\Reporting\MonitoringGroupe\graphMonitoringGroupe.txt"; //IRCEM i = new IRCEM(tmplt, saveDir); //i.execution2(ds); Ultimate g2 = new Ultimate(tmplt, saveDir, styleDir, graphDir); g2.execution(ds, date, sheetNames,true); }
public void TestBDDI7() { //Obtention du dataset Interface bdd = new Interface(); string requeteDir = @"G:\UZX\Resources\Reporting\BDDI\E7.sql"; List<string> parametres = new List<string>(); parametres.Add("@datedebut"); parametres.Add("'31/12/2011'"); parametres.Add("@datefin"); parametres.Add("'30/03/2012'"); string commande = bdd.getCommande(requeteDir); commande = bdd.replaceArguments(commande, parametres); DataSet ds = bdd.multiRequeteSQL(commande, "omega"); string[] sheetNames = { "Requete Exterieur" }; //string date = "27/06/2012"; string tmplt = @"G:\UZX\Resources\Reporting\BDDI\Template.xlsx"; string saveDir = @"FGA - Enregistrement 7.xlsx"; string styleDir = @"G:\UZX\Resources\Reporting\BDDI\style.txt"; string graphDir = null;// @"G:\UZX\Resources\Reporting\MonitoringGroupe\graphMonitoringGroupe.txt"; Ultimate g2 = new Ultimate(tmplt, saveDir, styleDir, graphDir); g2.execution(ds, "", sheetNames); }
private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target) { try { if (Q.IsCharging || target == null || !Ultimate.IsActive(mode)) { return(false); } var pred = R.GetPrediction(target); if (pred.Hitchance >= hitChance) { var hits = GameObjects.EnemyHeroes.Where(x => x.Distance(target) <= _rSpreadRadius).ToList(); if (Ultimate.Check(mode, hits)) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private void RLogicSingle(UltimateModeType mode, HitChance hitChance) { try { if (Ultimate.ShouldSingle(mode)) { return; } foreach (var t in GameObjects.EnemyHeroes.Where(t => Ultimate.CheckSingle(mode, t))) { var pred = CPrediction.Circle(R, t, hitChance); if (pred.TotalHits > 0) { _lastRCast = Game.Time; _lastRPosition = pred.CastPosition; R.Cast(pred.CastPosition); break; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
void ShootUlitmate() { GameObject ultsomthing = GameObject.FindGameObjectWithTag("ulttag"); Ultimate u = ultsomthing.GetComponent <Ultimate>(); Instantiate(Ulti, firePoint.position, firePoint.rotation); u.Ult = 0; }
private static void OnUpdate(EventArgs args) { if (!ObjectManager.Player.IsActive(Spells.R)) { if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { Combo.Execute(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { Clear.Execute(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { Jungle.Execute(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { Harass.Execute(); } } if (ObjectManager.Player.IsActive(Spells.R)) { PortAIO.OrbwalkerManager.SetAttack(false); PortAIO.OrbwalkerManager.SetMovement(false); } else if (!ObjectManager.Player.IsActive(Spells.R)) { PortAIO.OrbwalkerManager.SetAttack(true); PortAIO.OrbwalkerManager.SetMovement(true); } if (getKeyBindItem(Config.SemiManualUlt, "semi.manual.ult") && !ObjectManager.Player.IsActive(Spells.R)) { Orbwalker.MoveTo(Game.CursorPos); } if (Spells.R.IsReady() && getKeyBindItem(Config.SemiManualUlt, "semi.manual.ult")) { Ultimate.Execute(); } if (getCheckBoxItem(Config.itemMenu, "use.qss") && (Items.HasItem((int)ItemId.Quicksilver_Sash) && Items.CanUseItem((int)ItemId.Quicksilver_Sash) || Items.CanUseItem(3139) && Items.HasItem(3137))) { Qss.ExecuteQss(); } if (getCheckBoxItem(Config.miscMenu, "auto.orb.buy") && ObjectManager.Player.Level >= getSliderItem(Config.miscMenu, "orb.level") && !Items.HasItem((int)ItemId.Farsight_Alteration)) { Shop.BuyItem(ItemId.Farsight_Alteration); } }
protected override void Combo() { var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>(); var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>(); var r = Ultimate.IsActive(UltimateModeType.Combo); if (e && !Q.IsCharging && E.IsReady()) { var target = TargetSelector.GetTarget(E); if (target != null) { var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.e-settings.stacks").GetValue <Slider>().Value > 0; if (Menu.Item(Menu.Name + ".combo.e-settings.always").GetValue <bool>() || stacks || GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.e-settings.stacks").GetValue <Slider>().Value || E.IsKillable(target) || CPrediction.Circle(E, target, E.GetHitChance("combo")).TotalHits >= Menu.Item(Menu.Name + ".combo.e-settings.min").GetValue <Slider>().Value) { ELogic(target, E.GetHitChance("combo")); } } } if (q && Q.IsReady()) { var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType); if (target != null) { var stacks = W.Level == 0 && Menu.Item(Menu.Name + ".combo.q-settings.stacks").GetValue <Slider>().Value > 0; if (Q.IsCharging || Menu.Item(Menu.Name + ".combo.q-settings.always").GetValue <bool>() || target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target) * 1.2f || stacks || GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.q-settings.stacks").GetValue <Slider>().Value || CPrediction.Line(Q, target, Q.GetHitChance("combo")).TotalHits >= Menu.Item(Menu.Name + ".combo.q-settings.min").GetValue <Slider>().Value || Q.IsKillable(target)) { QLogic( target, Q.GetHitChance("combo"), Menu.Item(Menu.Name + ".combo.q-settings.fast-cast-min").GetValue <Slider>().Value); } } } if (r && R.IsReady()) { var target = TargetSelector.GetTarget(R); if (target != null) { if (!RLogic(UltimateModeType.Combo, R.GetHitChance("combo"), target)) { RLogicSingle(UltimateModeType.Combo, R.GetHitChance("combo")); } } } }
private static void OnUpdate(EventArgs args) { switch (Orbwalker.ActiveMode) { case OrbwalkingMode.Combo: Combo.Execute(); break; case OrbwalkingMode.LaneClear: Jungle.Execute(); Clear.Execute(); break; case OrbwalkingMode.Hybrid: Harass.Execute(); break; } if (ObjectManager.Player.IsActive(Spells.R)) { Orbwalker.AttackState = false; Orbwalker.MovementState = false; Orbwalker.Enabled = false; } else if (!ObjectManager.Player.IsActive(Spells.R)) { Orbwalker.AttackState = true; Orbwalker.MovementState = true; Orbwalker.Enabled = true; } if (Config.SemiManualUlt.Active && !ObjectManager.Player.IsActive(Spells.R)) { Orbwalker.Move(Game.CursorPos); } if (Config.SemiManualUlt.Active && Spells.R.IsReady()) { Ultimate.Execute(); } if (Config.Menu["activator.settings"]["use.qss"] && (Items.HasItem((int)ItemId.Quicksilver_Sash) && Items.CanUseItem((int)ItemId.Quicksilver_Sash) || Items.CanUseItem(3139) && Items.HasItem(3137))) { Qss.ExecuteQss(); } if (Config.Menu["misc.settings"]["auto.orb.buy"] && ObjectManager.Player.Level >= Config.Menu["misc.settings"]["orb.level"] && !Items.HasItem((int)ItemId.Farsight_Alteration)) { Shop.BuyItem(ItemId.Farsight_Alteration); } }
static Config() { // Initialize menu Menu = MainMenu.AddMenu(MenuName, MenuName + "_hellsing"); // Initialize sub menus Modes.Initialize(); Ultimate.Initialize(); Misc.Initialize(); Drawing.Initialize(); }
// Update is called once per frame void Update() { GameObject ultsomthing = GameObject.FindGameObjectWithTag("ulttag"); Ultimate u = ultsomthing.GetComponent <Ultimate>(); if (Input.GetButtonDown("Fire1") && AmmoText.ammoAmount > 0) { Shoot(); recoileffect.SetBool("recoil", true); } else if (Input.GetKeyDown(KeyCode.R) && u.Ult >= 0.3f) { ShootUlitmate(); recoileffect.SetBool("recoil", true); } else { recoileffect.SetBool("recoil", false); } //throwing grenade. if (Input.GetKeyDown(KeyCode.G) && grenadeCount > 0 && activeGrenadeCount < maxActiveGrenade) { grenade = Instantiate(grenadeMod, firePoint.position, firePoint.rotation); grenadeArr[activeGrenadeCount] = grenade; activeGrenadeCount += 1; grenadeCount -= 1; GrenadeAmmo.ammoAmount -= 1; } if (Input.GetKeyDown(KeyCode.T)) { for (int i = 0; i < activeGrenadeCount; i++) { if (grenadeArr[i] != null) { Grenade g = grenadeArr[i].GetComponent <Grenade>(); if (gameObject.GetComponent <CharacterController2D>().facingRight()) { g.GoRight(); g.SuicideBombing(); } else { g.GoLeft(); g.SuicideBombing(); } grenadeArr[i] = null; } } } }
protected override void OnPostUpdate() { if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit && !Player.Spellbook.IsAutoAttacking && Menu.Item(Menu.Name + ".lasthit.q").GetValue <bool>() && Q.IsReady()) { var m = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly) .FirstOrDefault( e => e.HealthPercent <= 75 && (_lastAaMinion == null || e.NetworkId != _lastAaMinion.NetworkId || Game.Time > _lastAaMinionEndTime) && HealthPrediction.GetHealthPrediction(e, (int)(Q.Delay * 1000f)) < Q.GetDamage(e)); if (m != null) { Casting.TargetSkill(m, Q); } } if (Ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady()) { if (Ultimate.ShouldMove(UltimateModeType.Assisted)) { Orbwalking.MoveTo(Game.CursorPos); } var target = TargetSelector.GetTarget(R); if (target != null && !RLogic(UltimateModeType.Assisted, target)) { RLogicSingle(UltimateModeType.Assisted); } } if (Ultimate.IsActive(UltimateModeType.Auto) && R.IsReady()) { var target = TargetSelector.GetTarget(R); if (target != null && !RLogic(UltimateModeType.Auto, target)) { RLogicSingle(UltimateModeType.Auto); } } if (Menu.Item(Menu.Name + ".miscellaneous.e-auto").GetValue <bool>() && E.IsReady() && ResourceManager.Check("auto-e") && !Player.IsRecalling() && !Player.InFountain()) { var buff = GetEBuff(); if (buff == null || buff.EndTime - Game.Time <= Game.Ping / 2000f + 0.5f) { E.Cast(); } } }
void AttachUlt(CharacterConfig character) { if (!character.ultimate) { return; } GameObject ultObj = Instantiate(character.ultimate); ultObj.transform.parent = transform; Ultimate ult = ultObj.GetComponent <Ultimate>(); ult.Init(this); this.ult = ult; }
private void OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args) { try { if (sender.IsEnemy && args.DangerLevel == Interrupter2.DangerLevel.High && Ultimate.IsActive(UltimateModeType.Interrupt, sender) && sender.IsFacing(Player)) { Casting.SkillShot(sender, R, HitChance.High); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
/// <summary> /// Jhin's On Update Event /// </summary> /// <param name="args">args</param> private static void JhinOnUpdate(EventArgs args) { #region Orbwalker & Modes if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { Combo.ExecuteCombo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { Jungle.ExecuteJungle(); Clear.ExecuteClear(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { Mixed.ExecuteHarass(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None)) { None.ImmobileExecute(); None.KillSteal(); None.TeleportE(); Ultimate.ComboUltimate(); } #endregion #region Check Ultimate if (ObjectManager.Player.IsActive(Spells.R)) { Orbwalker.DisableMovement = true; Orbwalker.DisableAttacking = true; } else { Orbwalker.DisableMovement = false; Orbwalker.DisableAttacking = false; } #endregion }
public RangeHero(HeroTable hero) { Talents.Add("L1", hero.TalentL1); Talents.Add("L2", hero.TalentL2); Talents.Add("L3", hero.TalentL3); Talents.Add("L4", hero.TalentL4); Talents.Add("R1", hero.TalentR1); Talents.Add("R2", hero.TalentR2); Talents.Add("R3", hero.TalentR3); Talents.Add("R4", hero.TalentR4); Name = hero.Name; Hp = hero.Hp; Mana = hero.Mana; IncHp = hero.IncHp; IncMana = hero.IncMana; MainAttribute = hero.MainAttribute; Strength = hero.Strength; Agility = hero.Agility; Intelligence = hero.Intelligence; IncStrength = hero.IncStrength; IncAgility = hero.IncAgility; IncIntelligence = hero.IncIntelligence; Damage = hero.Damage; Armor = hero.Armor; AttackSpeed = hero.AttackSpeed; Speed = hero.Speed; Description = hero.Description; AttackRange = (int)hero.AttackRange; ProjectileSpeed = (int)hero.ProjectileSpeed; using (DotaBaseContext context = new DotaBaseContext()) { List <AbilityTable> abilities = context.AbilityTable.ToList(); DefaultSpell First = new DefaultSpell(abilities.First(x => x.Name == hero.FirstSpell)); FirstSpell = First; DefaultSpell Second = new DefaultSpell(abilities.First(x => x.Name == hero.SecondSpell)); SecondSpell = Second; DefaultSpell Third = new DefaultSpell(abilities.First(x => x.Name == hero.ThirdSpell)); ThirdSpell = Third; Ultimate Ulti = new Ultimate(abilities.First(x => x.Name == hero.Ultimate)); Ultimate = Ulti; } }
// use this to kill the AI //void OnTriggerEnter2D(Collider2D hitInfo) //{ // Enemy enemy = hitInfo.GetComponent<Enemy>(); // Patrol2 enemyMech = hitInfo.GetComponent<Patrol2>(); // MeleeScript enemyMelee = hitInfo.GetComponent<MeleeScript>(); // flyEnemy enemyfly = hitInfo.GetComponent<flyEnemy>(); // GroundMechScript groundMech = hitInfo.GetComponent<GroundMechScript>(); // BossAI boss = hitInfo.GetComponent<BossAI>(); // if (enemy != null) // { // enemy.TakeDamage(Damage); // } // else if (enemyMech != null) // { // enemyMech.TakeDamage(Damage); // } // else if (enemyMelee != null) // { // enemyMelee.TakeDamage(Damage); // } // else if (enemyfly != null) // { // enemyfly.TakeDamage(Damage); // } // else if (groundMech != null) // { // groundMech.TakeDamage(Damage); // } // else if (boss != null) // { // boss.TakeDamage(Damage); // } // Instantiate(impactEffect, transform.position, transform.rotation); // Destroy(gameObject); // Destroy(other); //} void OnCollisionEnter2D(Collision2D hitInfo) { GameObject ultsomthing = GameObject.FindGameObjectWithTag("ulttag"); Ultimate u = ultsomthing.GetComponent <Ultimate>(); Enemy enemy = hitInfo.gameObject.GetComponent <Enemy>(); Patrol2 enemyMech = hitInfo.gameObject.GetComponent <Patrol2>(); MeleeScript enemyMelee = hitInfo.gameObject.GetComponent <MeleeScript>(); flyEnemy enemyfly = hitInfo.gameObject.GetComponent <flyEnemy>(); GroundMechScript groundMech = hitInfo.gameObject.GetComponent <GroundMechScript>(); BossAI boss = hitInfo.gameObject.GetComponent <BossAI>(); if (enemy != null) { enemy.TakeDamage(Damage); } else if (enemyMech != null) { enemyMech.TakeDamage(Damage); u.Ult += 0.03f; } else if (enemyMelee != null) { enemyMelee.TakeDamage(Damage); u.Ult += 0.03f; } else if (enemyfly != null) { enemyfly.TakeDamage(Damage); u.Ult += 0.03f; } else if (groundMech != null) { groundMech.TakeDamage(Damage); u.Ult += 0.03f; } else if (boss != null) { boss.TakeDamage(Damage); } Instantiate(impactEffect, transform.position, transform.rotation); Destroy(gameObject); Destroy(other); }
public void TestBDDI2() { //Obtention du dataset Interface bdd = new Interface(); string requeteDir = @"G:\UZX\Resources\Reporting\BDDI\E2.sql"; string commande = bdd.getCommande(requeteDir); DataSet ds = bdd.multiRequeteSQL(commande, "omega"); string[] sheetNames = { "Requete exterieure" }; string tmplt = @"G:\UZX\Resources\Reporting\BDDI\Template.xlsx"; string saveDir = @"FGA - Enregistrement 2.xlsx"; string styleDir = @"G:\UZX\Resources\Reporting\BDDI\style.txt"; string graphDir = null;// @"G:\UZX\Resources\Reporting\MonitoringGroupe\graphMonitoringGroupe.txt"; Ultimate g2 = new Ultimate(tmplt, saveDir, styleDir, graphDir); g2.execution(ds, "", sheetNames); }
public void Ulti() { if (!Manager.Instance.playerHealth.SpendMana(ultimateManaCost)) { return; } currentUltimateObj = Instantiate(faceRight ? ultimateObjectRight : ultimateObjectLeft, slashArea.transform.position, transform.rotation); currentUltimateObj.transform.parent = this.transform; Invoke("EndUlti", ultimateLifespan); Ultimate ultimate = currentUltimateObj.GetComponentInChildren <Ultimate>(); ultimate.damage = ultDamage + attackPower; ultimate.knockback = ultKnockback; ultimate.damageFrequency = ultDamageFrequency; isUsingUltimate = true; }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target) { try { if (Ultimate.IsActive(mode)) { var pred = CPrediction.Line(R, target, R.GetHitChance("combo")); if (pred.TotalHits > 0 && Ultimate.Check(mode, pred.Hits)) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(UltimateModeType mode, AIHeroClient target) { try { if (Ultimate.IsActive(mode)) { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && Ultimate.Check(mode, pred.Hits)) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
public void TestPIIGS() { //Obtention du dataset Interface bdd = new Interface(); string requeteDir = @"G:\UZX\Resources\Reporting\PIIGS\ExpositionPaysPIIGS.sql"; List<string> parametres = new List<string>(); parametres.Add("@date"); parametres.Add("'27/06/2012'"); parametres.Add("@rapportCle"); parametres.Add("'MonitorExpoPays'"); parametres.Add("@cle_Montant"); parametres.Add("'MonitorExpoPays'"); parametres.Add("@rubriqueEncours"); parametres.Add("'TOTAL'"); parametres.Add("@sousRubriqueEncours"); parametres.Add("'TOTAL_HOLDING'"); parametres.Add("@key"); parametres.Add("'MonitorExpoPaysDur'"); string commande = bdd.getCommande(requeteDir); commande = bdd.replaceArguments(commande, parametres); DataSet ds = bdd.multiRequeteSQL(commande, ""); string[] sheetNames = { "ASSURANCE", "ASSUANCE_Duration" }; string date = "27/06/2012"; string tmplt = @"G:\UZX\Resources\Reporting\PIIGS\Template.xlsx"; string saveDir = @"ReportingPIIGS.xlsx"; string styleDir = @"G:\UZX\Resources\Reporting\PIIGS\stylesExpositionPaysPIIGS.txt"; string graphDir = @"G:\UZX\Resources\Reporting\PIIGs\graphExpositionPays.txt"; Ultimate g2 = new Ultimate(tmplt, saveDir, styleDir, graphDir); g2.execution(ds, date, sheetNames); }