Database


SUBMITTED BY: Alerand

DATE: May 7, 2016, 11:06 a.m.

FORMAT: Text only

SIZE: 22.3 kB

HITS: 9537

  1. #region
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using LeagueSharp;
  6. using LeagueSharp.Common;
  7. #endregion
  8. namespace Marksman.Evade
  9. {
  10. internal class EvadeSpellDatabase
  11. {
  12. public static List<EvadeSpellData> Spells = new List<EvadeSpellData>();
  13. static EvadeSpellDatabase()
  14. {
  15. //Add available evading spells to the database. SORTED BY PRIORITY.
  16. EvadeSpellData spell;
  17. #region Champion SpellShields
  18. #region Sivir
  19. if (ObjectManager.Player.ChampionName == "Sivir")
  20. {
  21. spell = new ShieldData("Sivir E", SpellSlot.E, 100, 1, true);
  22. Spells.Add(spell);
  23. }
  24. #endregion
  25. #region Nocturne
  26. if (ObjectManager.Player.ChampionName == "Nocturne")
  27. {
  28. spell = new ShieldData("Nocturne W", SpellSlot.W, 100, 1, true);
  29. Spells.Add(spell);
  30. }
  31. #endregion
  32. #endregion
  33. #region Champion MoveSpeed buffs
  34. #region Blitzcrank
  35. if (ObjectManager.Player.ChampionName == "Blitzcrank")
  36. {
  37. spell = new MoveBuffData(
  38. "Blitzcrank W", SpellSlot.W, 100, 3,
  39. () =>
  40. ObjectManager.Player.MoveSpeed *
  41. (1 + 0.12f + 0.04f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level));
  42. Spells.Add(spell);
  43. }
  44. #endregion
  45. #region Draven
  46. if (ObjectManager.Player.ChampionName == "Draven")
  47. {
  48. spell = new MoveBuffData(
  49. "Draven W", SpellSlot.W, 100, 3,
  50. () =>
  51. ObjectManager.Player.MoveSpeed *
  52. (1 + 0.35f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level));
  53. Spells.Add(spell);
  54. }
  55. #endregion
  56. #region Evelynn
  57. if (ObjectManager.Player.ChampionName == "Evelynn")
  58. {
  59. spell = new MoveBuffData(
  60. "Evelynn W", SpellSlot.W, 100, 3,
  61. () =>
  62. ObjectManager.Player.MoveSpeed *
  63. (1 + 0.2f + 0.1f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level));
  64. Spells.Add(spell);
  65. }
  66. #endregion
  67. #region Garen
  68. if (ObjectManager.Player.ChampionName == "Garen")
  69. {
  70. spell = new MoveBuffData("Garen Q", SpellSlot.Q, 100, 3, () => ObjectManager.Player.MoveSpeed * (1.35f));
  71. Spells.Add(spell);
  72. }
  73. #endregion
  74. #region Katarina
  75. if (ObjectManager.Player.ChampionName == "Katarina")
  76. {
  77. spell = new MoveBuffData(
  78. "Katarina W", SpellSlot.W, 100, 3,
  79. () =>
  80. ObjectManager.Get<Obj_AI_Hero>().Any(h => h.IsValidTarget(375))
  81. ? ObjectManager.Player.MoveSpeed *
  82. (1 + 0.10f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level)
  83. : 0);
  84. Spells.Add(spell);
  85. }
  86. #endregion
  87. #region Karma
  88. if (ObjectManager.Player.ChampionName == "Karma")
  89. {
  90. spell = new MoveBuffData(
  91. "Karma E", SpellSlot.E, 100, 3,
  92. () =>
  93. ObjectManager.Player.MoveSpeed *
  94. (1 + 0.35f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).Level));
  95. Spells.Add(spell);
  96. }
  97. #endregion
  98. #region Kennen
  99. if (ObjectManager.Player.ChampionName == "Kennen")
  100. {
  101. spell = new MoveBuffData("Kennen E", SpellSlot.E, 100, 3, () => 200 + ObjectManager.Player.MoveSpeed);
  102. //Actually it should be +335 but ingame you only gain +230, rito plz
  103. Spells.Add(spell);
  104. }
  105. #endregion
  106. #region Khazix
  107. if (ObjectManager.Player.ChampionName == "Khazix")
  108. {
  109. spell = new MoveBuffData("Khazix R", SpellSlot.R, 100, 5, () => ObjectManager.Player.MoveSpeed * 1.4f);
  110. Spells.Add(spell);
  111. }
  112. #endregion
  113. #region Lulu
  114. if (ObjectManager.Player.ChampionName == "Lulu")
  115. {
  116. spell = new MoveBuffData(
  117. "Lulu W", SpellSlot.W, 100, 5,
  118. () => ObjectManager.Player.MoveSpeed * (1.3f + ObjectManager.Player.FlatMagicDamageMod / 100 * 0.1f));
  119. Spells.Add(spell);
  120. }
  121. #endregion
  122. #region Nunu
  123. if (ObjectManager.Player.ChampionName == "Nunu")
  124. {
  125. spell = new MoveBuffData(
  126. "Nunu W", SpellSlot.W, 100, 3,
  127. () =>
  128. ObjectManager.Player.MoveSpeed *
  129. (1 + 0.1f + 0.01f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level));
  130. Spells.Add(spell);
  131. }
  132. #endregion
  133. #region Ryze
  134. if (ObjectManager.Player.ChampionName == "Ryze")
  135. {
  136. spell = new MoveBuffData("Ryze R", SpellSlot.R, 100, 5, () => 80 + ObjectManager.Player.MoveSpeed);
  137. Spells.Add(spell);
  138. }
  139. #endregion
  140. #region Shyvana
  141. if (ObjectManager.Player.ChampionName == "Sivir")
  142. {
  143. spell = new MoveBuffData("Sivir R", SpellSlot.R, 100, 5, () => ObjectManager.Player.MoveSpeed * (1.6f));
  144. Spells.Add(spell);
  145. }
  146. #endregion
  147. #region Shyvana
  148. if (ObjectManager.Player.ChampionName == "Shyvana")
  149. {
  150. spell = new MoveBuffData(
  151. "Shyvana W", SpellSlot.W, 100, 4,
  152. () =>
  153. ObjectManager.Player.MoveSpeed *
  154. (1 + 0.25f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level));
  155. spell.CheckSpellName = "ShyvanaImmolationAura";
  156. Spells.Add(spell);
  157. }
  158. #endregion
  159. #region Sona
  160. if (ObjectManager.Player.ChampionName == "Sona")
  161. {
  162. spell = new MoveBuffData(
  163. "Sona E", SpellSlot.E, 100, 3,
  164. () =>
  165. ObjectManager.Player.MoveSpeed *
  166. (1 + 0.12f + 0.01f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).Level +
  167. ObjectManager.Player.FlatMagicDamageMod / 100 * 0.075f +
  168. 0.02f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level));
  169. Spells.Add(spell);
  170. }
  171. #endregion
  172. #region Teemo ^_^
  173. if (ObjectManager.Player.ChampionName == "Teemo")
  174. {
  175. spell = new MoveBuffData(
  176. "Teemo W", SpellSlot.W, 100, 3,
  177. () =>
  178. ObjectManager.Player.MoveSpeed *
  179. (1 + 0.06f + 0.04f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level));
  180. Spells.Add(spell);
  181. }
  182. #endregion
  183. #region Udyr
  184. if (ObjectManager.Player.ChampionName == "Udyr")
  185. {
  186. spell = new MoveBuffData(
  187. "Udyr E", SpellSlot.E, 100, 3,
  188. () =>
  189. ObjectManager.Player.MoveSpeed *
  190. (1 + 0.1f + 0.05f * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).Level));
  191. Spells.Add(spell);
  192. }
  193. #endregion
  194. #region Zilean
  195. if (ObjectManager.Player.ChampionName == "Zilean")
  196. {
  197. spell = new MoveBuffData("Zilean E", SpellSlot.E, 100, 3, () => ObjectManager.Player.MoveSpeed * 1.55f);
  198. Spells.Add(spell);
  199. }
  200. #endregion
  201. #endregion
  202. #region Champion Dashes
  203. #region Aatrox
  204. if (ObjectManager.Player.ChampionName == "Aatrox")
  205. {
  206. spell = new DashData("Aatrox Q", SpellSlot.Q, 650, false, 400, 3000, 3);
  207. spell.Invert = true;
  208. Spells.Add(spell);
  209. }
  210. #endregion
  211. #region Akali
  212. if (ObjectManager.Player.ChampionName == "Akali")
  213. {
  214. spell = new DashData("Akali R", SpellSlot.R, 800, false, 100, 2461, 3);
  215. spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions };
  216. Spells.Add(spell);
  217. }
  218. #endregion
  219. #region Alistar
  220. if (ObjectManager.Player.ChampionName == "Alistar")
  221. {
  222. spell = new DashData("Alistar W", SpellSlot.W, 650, false, 100, 1900, 3);
  223. spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions };
  224. Spells.Add(spell);
  225. }
  226. #endregion
  227. #region Caitlyn
  228. if (ObjectManager.Player.ChampionName == "Caitlyn")
  229. {
  230. spell = new DashData("Caitlyn E", SpellSlot.E, 490, true, 250, 1000, 3);
  231. spell.Invert = true;
  232. Spells.Add(spell);
  233. }
  234. #endregion
  235. #region Corki
  236. if (ObjectManager.Player.ChampionName == "Corki")
  237. {
  238. spell = new DashData("Corki W", SpellSlot.W, 790, false, 250, 1044, 3);
  239. Spells.Add(spell);
  240. }
  241. #endregion
  242. #region Fizz
  243. if (ObjectManager.Player.ChampionName == "Fizz")
  244. {
  245. spell = new DashData("Fizz Q", SpellSlot.Q, 550, true, 100, 1400, 4);
  246. spell.ValidTargets = new[] { SpellValidTargets.EnemyMinions, SpellValidTargets.EnemyChampions };
  247. Spells.Add(spell);
  248. }
  249. #endregion
  250. #region Gragas
  251. if (ObjectManager.Player.ChampionName == "Gragas")
  252. {
  253. spell = new DashData("Gragas E", SpellSlot.E, 600, true, 250, 911, 3);
  254. Spells.Add(spell);
  255. }
  256. #endregion
  257. #region Gnar
  258. if (ObjectManager.Player.ChampionName == "Gnar")
  259. {
  260. spell = new DashData("Gnar E", SpellSlot.E, 50, false, 0, 900, 3);
  261. spell.CheckSpellName = "GnarE";
  262. Spells.Add(spell);
  263. }
  264. #endregion
  265. #region Graves
  266. if (ObjectManager.Player.ChampionName == "Graves")
  267. {
  268. spell = new DashData("Graves E", SpellSlot.E, 425, true, 100, 1223, 3);
  269. Spells.Add(spell);
  270. }
  271. #endregion
  272. #region Irelia
  273. if (ObjectManager.Player.ChampionName == "Irelia")
  274. {
  275. spell = new DashData("Irelia Q", SpellSlot.Q, 650, false, 100, 2200, 3);
  276. spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions };
  277. Spells.Add(spell);
  278. }
  279. #endregion
  280. #region Jax
  281. if (ObjectManager.Player.ChampionName == "Jax")
  282. {
  283. spell = new DashData("Jax Q", SpellSlot.Q, 700, false, 100, 1400, 3);
  284. spell.ValidTargets = new[]
  285. {
  286. SpellValidTargets.EnemyWards, SpellValidTargets.AllyWards, SpellValidTargets.AllyMinions,
  287. SpellValidTargets.AllyChampions, SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions
  288. };
  289. Spells.Add(spell);
  290. }
  291. #endregion
  292. #region Leblanc
  293. if (ObjectManager.Player.ChampionName == "Leblanc")
  294. {
  295. spell = new DashData("LeBlanc W1", SpellSlot.W, 600, false, 100, 1621, 3);
  296. spell.CheckSpellName = "LeblancSlide";
  297. Spells.Add(spell);
  298. }
  299. if (ObjectManager.Player.ChampionName == "Leblanc")
  300. {
  301. spell = new DashData("LeBlanc RW", SpellSlot.R, 600, false, 100, 1621, 3);
  302. spell.CheckSpellName = "LeblancSlideM";
  303. Spells.Add(spell);
  304. }
  305. #endregion
  306. #region LeeSin
  307. if (ObjectManager.Player.ChampionName == "LeeSin")
  308. {
  309. spell = new DashData("LeeSin W", SpellSlot.W, 700, false, 250, 2000, 3);
  310. spell.ValidTargets = new[]
  311. { SpellValidTargets.AllyChampions, SpellValidTargets.AllyMinions, SpellValidTargets.AllyWards };
  312. spell.CheckSpellName = "BlindMonkWOne";
  313. Spells.Add(spell);
  314. }
  315. #endregion
  316. #region Lucian
  317. if (ObjectManager.Player.ChampionName == "Lucian")
  318. {
  319. spell = new DashData("Lucian E", SpellSlot.E, 425, false, 100, 1350, 2);
  320. Spells.Add(spell);
  321. }
  322. #endregion
  323. #region Nidalee
  324. if (ObjectManager.Player.ChampionName == "Nidalee")
  325. {
  326. spell = new DashData("Nidalee W", SpellSlot.W, 375, true, 250, 943, 3);
  327. spell.CheckSpellName = "Pounce";
  328. Spells.Add(spell);
  329. }
  330. #endregion
  331. #region Pantheon
  332. if (ObjectManager.Player.ChampionName == "Pantheon")
  333. {
  334. spell = new DashData("Pantheon W", SpellSlot.W, 600, false, 100, 1000, 3);
  335. spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions };
  336. Spells.Add(spell);
  337. }
  338. #endregion
  339. #region Riven
  340. if (ObjectManager.Player.ChampionName == "Riven")
  341. {
  342. spell = new DashData("Riven Q", SpellSlot.Q, 222, true, 250, 560, 3);
  343. spell.RequiresPreMove = true;
  344. Spells.Add(spell);
  345. spell = new DashData("Riven E", SpellSlot.E, 250, false, 250, 1200, 3);
  346. Spells.Add(spell);
  347. }
  348. #endregion
  349. #region Tristana
  350. if (ObjectManager.Player.ChampionName == "Tristana")
  351. {
  352. spell = new DashData("Tristana W", SpellSlot.W, 900, true, 300, 800, 5);
  353. Spells.Add(spell);
  354. }
  355. #endregion
  356. #region Tryndamare
  357. if (ObjectManager.Player.ChampionName == "Tryndamere")
  358. {
  359. spell = new DashData("Tryndamere E", SpellSlot.E, 650, true, 250, 900, 3);
  360. Spells.Add(spell);
  361. }
  362. #endregion
  363. #region Vayne
  364. if (ObjectManager.Player.ChampionName == "Vayne")
  365. {
  366. spell = new DashData("Vayne Q", SpellSlot.Q, 300, true, 100, 910, 2);
  367. Spells.Add(spell);
  368. }
  369. #endregion
  370. #region Wukong
  371. if (ObjectManager.Player.ChampionName == "MonkeyKing")
  372. {
  373. spell = new DashData("Wukong E", SpellSlot.E, 650, false, 100, 1400, 3);
  374. spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions };
  375. Spells.Add(spell);
  376. }
  377. #endregion
  378. #endregion
  379. #region Champion Blinks
  380. #region Ezreal
  381. if (ObjectManager.Player.ChampionName == "Ezreal")
  382. {
  383. spell = new BlinkData("Ezreal E", SpellSlot.E, 450, 350, 3);
  384. Spells.Add(spell);
  385. }
  386. #endregion
  387. #region Kassadin
  388. if (ObjectManager.Player.ChampionName == "Kassadin")
  389. {
  390. spell = new BlinkData("Kassadin R", SpellSlot.R, 700, 200, 5);
  391. Spells.Add(spell);
  392. }
  393. #endregion
  394. #region Katarina
  395. if (ObjectManager.Player.ChampionName == "Katarina")
  396. {
  397. spell = new BlinkData("Katarina E", SpellSlot.E, 700, 200, 3);
  398. spell.ValidTargets = new[]
  399. {
  400. SpellValidTargets.AllyChampions, SpellValidTargets.AllyMinions, SpellValidTargets.AllyWards,
  401. SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions, SpellValidTargets.EnemyWards
  402. };
  403. Spells.Add(spell);
  404. }
  405. #endregion
  406. #region Shaco
  407. if (ObjectManager.Player.ChampionName == "Shaco")
  408. {
  409. spell = new BlinkData("Shaco Q", SpellSlot.Q, 400, 350, 3);
  410. Spells.Add(spell);
  411. }
  412. #endregion
  413. #region Talon
  414. if (ObjectManager.Player.ChampionName == "Talon")
  415. {
  416. spell = new BlinkData("Talon E", SpellSlot.E, 700, 100, 3);
  417. spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions };
  418. Spells.Add(spell);
  419. }
  420. #endregion
  421. #endregion
  422. #region Champion Invulnerabilities
  423. #region Elise
  424. if (ObjectManager.Player.ChampionName == "Elise")
  425. {
  426. spell = new InvulnerabilityData("Elise E", SpellSlot.E, 250, 3);
  427. spell.CheckSpellName = "EliseSpiderEInitial";
  428. spell.SelfCast = true;
  429. Spells.Add(spell);
  430. }
  431. #endregion
  432. #region Vladimir
  433. if (ObjectManager.Player.ChampionName == "Vladimir")
  434. {
  435. spell = new InvulnerabilityData("Vladimir W", SpellSlot.W, 250, 3);
  436. spell.SelfCast = true;
  437. Spells.Add(spell);
  438. }
  439. #endregion
  440. #region Fizz
  441. if (ObjectManager.Player.ChampionName == "Fizz")
  442. {
  443. spell = new InvulnerabilityData("Fizz E", SpellSlot.E, 250, 3);
  444. Spells.Add(spell);
  445. }
  446. #endregion
  447. #region MasterYi
  448. if (ObjectManager.Player.ChampionName == "MasterYi")
  449. {
  450. spell = new InvulnerabilityData("MasterYi Q", SpellSlot.Q, 250, 3);
  451. spell.MaxRange = 600;
  452. spell.ValidTargets = new[] { SpellValidTargets.EnemyChampions, SpellValidTargets.EnemyMinions };
  453. Spells.Add(spell);
  454. }
  455. #endregion
  456. #endregion
  457. //Flash
  458. /*
  459. if (ObjectManager.Player.GetSpellSlot("SummonerFlash") != SpellSlot.Unknown)
  460. {
  461. spell = new BlinkData("Flash", ObjectManager.Player.GetSpellSlot("SummonerFlash"), 400, 100, 5, true);
  462. Spells.Add(spell);
  463. }
  464. */
  465. //Zhonyas
  466. /*
  467. spell = new EvadeSpellData("Zhonyas", 5);
  468. Spells.Add(spell);
  469. */
  470. #region Champion Shields
  471. #region Akali
  472. #endregion
  473. #region Annie
  474. #endregion
  475. #region Diana
  476. #endregion
  477. #region Galio
  478. #endregion
  479. #region Akali
  480. #endregion
  481. #region Akali
  482. #endregion
  483. #region Akali
  484. #endregion
  485. #region Akali
  486. #endregion
  487. #region Akali
  488. #endregion
  489. #region Akali
  490. #endregion
  491. #region Akali
  492. #endregion
  493. #region Akali
  494. #endregion
  495. #region Akali
  496. #endregion
  497. #region Karma
  498. if (ObjectManager.Player.ChampionName == "Karma")
  499. {
  500. spell = new ShieldData("Karma E", SpellSlot.E, 100, 2);
  501. spell.CanShieldAllies = true;
  502. spell.MaxRange = 800;
  503. Spells.Add(spell);
  504. }
  505. #endregion
  506. #region Janna
  507. if (ObjectManager.Player.ChampionName == "Janna")
  508. {
  509. spell = new ShieldData("Janna E", SpellSlot.E, 100, 1);
  510. spell.CanShieldAllies = true;
  511. spell.MaxRange = 800;
  512. Spells.Add(spell);
  513. }
  514. #endregion
  515. #region Morgana
  516. if (ObjectManager.Player.ChampionName == "Morgana")
  517. {
  518. spell = new ShieldData("Morgana E", SpellSlot.E, 100, 3);
  519. spell.CanShieldAllies = true;
  520. spell.MaxRange = 750;
  521. Spells.Add(spell);
  522. }
  523. #endregion
  524. #endregion
  525. }
  526. public static EvadeSpellData GetByName(string Name)
  527. {
  528. return Spells.FirstOrDefault(evadeSpellData => String.Equals(evadeSpellData.Name, Name, StringComparison.CurrentCultureIgnoreCase));
  529. }
  530. }
  531. }

comments powered by Disqus