Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.20 KB | None | 0 0
  1. 'use strict';
  2.  
  3. exports.BattleMovedex = {
  4. willowisp: {
  5. inherit: true,
  6. accuracy: 100
  7. },
  8. leechseed: {
  9. inherit: true,
  10. accuracy: 100
  11. },
  12. magmastorm: {
  13. inherit: true,
  14. accuracy: 100,
  15. basePower: 80
  16. },
  17. hyperfang: {
  18. inherit: true,
  19. accuracy: 100,
  20. basePower: 100
  21. },
  22. skydrop: {
  23. inherit: true,
  24. basePower: 75
  25. },
  26. dragontail: {
  27. inherit: true,
  28. accuracy: true
  29. },
  30. circlethrow: {
  31. inherit: true,
  32. accuracy: true
  33. },
  34. outrage: {
  35. inherit: true,
  36. target: "Normal",
  37. basePower: 150,
  38. pp: 5,
  39. self: {
  40. boosts: {
  41. spe: -1,
  42. def: -1,
  43. spd: -1
  44. }
  45. },
  46. },
  47. petaldance: {
  48. inherit: true,
  49. target: "Normal",
  50. basePower: 150,
  51. pp: 5,
  52. self: {
  53. boosts: {
  54. spe: -1,
  55. def: -1,
  56. spd: -1
  57. }
  58. },
  59. },
  60. thrash: {
  61. inherit: true,
  62. target: "Normal",
  63. basePower: 150,
  64. pp: 5,
  65. self: {
  66. boosts: {
  67. spe: -1,
  68. def: -1,
  69. spd: -1
  70. }
  71. },
  72. },
  73. rage: {
  74. inherit: true,
  75. Type: "Dark",
  76. basePower: 80,
  77. pp: 20,
  78. self: {
  79. boosts: {
  80. atk: 1,
  81. def: -1,
  82. spd: -1
  83. }
  84. },
  85. },
  86. megapunch: {
  87. inherit: true,
  88. priority: 1,
  89. accuracy: 100,
  90. self: {
  91. boosts: {
  92. def: -1,
  93. spd: -1
  94. }
  95. },
  96. },
  97. megakick: {
  98. inherit: true,
  99. priority: 1,
  100. accuracy: 100,
  101. self: {
  102. volatileStatus: 'mustrecharge'
  103. },
  104. },
  105. crushgrip: {
  106. inherit: true,
  107. basePowerCallback: function (pokemon, target) {
  108. return Math.floor(Math.floor((150 * (100 * Math.floor(target.hp * 4096 / target.maxhp)) + 2048 - 1) / 4096) / 100) || 1;
  109. },
  110. },
  111. crushclaw: {
  112. inherit: true,
  113. accuracy: 100,
  114. secondary: {
  115. chance: 100,
  116. boosts: {
  117. def: -1
  118. }
  119. },
  120. },
  121. stealthrock: {
  122. inherit: true,
  123. effect: {
  124. // this is a side condition
  125. onStart: function (side) {
  126. this.add('-sidestart', side, 'move: Stealth Rock');
  127. },
  128. onSwitchIn: function (pokemon) {
  129. var typeMod = this.clampIntRange(pokemon.runEffectiveness('Rock'), -6, 6);
  130. this.damage(pokemon.maxhp * Math.pow(2, typeMod) / 12);
  131. }
  132. },
  133. },
  134. hyperbeam: {
  135. inherit: true,
  136. accuracy: 100,
  137. forceSwitch: true
  138. },
  139. gigaimpact: {
  140. inherit: true,
  141. accuracy: 100,
  142. forceSwitch: true
  143. },
  144. rockwrecker: {
  145. inherit: true,
  146. accuracy: 100,
  147. forceSwitch: true
  148. },
  149. roaroftime: {
  150. inherit: true,
  151. accuracy: 100,
  152. forceSwitch: true
  153. },
  154. hydrocannon: {
  155. inherit: true,
  156. accuracy: 100,
  157. forceSwitch: true
  158. },
  159. blastburn: {
  160. inherit: true,
  161. accuracy: 100,
  162. forceSwitch: true
  163. },
  164. frenzyplant: {
  165. inherit: true,
  166. accuracy: 100,
  167. forceSwitch: true
  168. },
  169. dreameater: {
  170. inherit: true,
  171. basePower: 120
  172. },
  173. rockslide: {
  174. inherit: true,
  175. accuracy: 100,
  176. basePower: 70
  177. },
  178. airslash: {
  179. inherit: true,
  180. accuracy: 100
  181. },
  182. wringout: {
  183. inherit: true,
  184. type: "Grass"
  185. },
  186. psychoboost: {
  187. inherit: true,
  188. accuracy: 100
  189. },
  190. leafstorm: {
  191. inherit: true,
  192. accuracy: 100
  193. },
  194. overheat: {
  195. inherit: true,
  196. accuracy: 100
  197. },
  198. dracometeor: {
  199. inherit: true,
  200. accuracy: 100
  201. },
  202. spacialrend: {
  203. inherit: true,
  204. accuracy: 100
  205. },
  206. firespin: {
  207. inherit: true,
  208. accuracy: 100
  209. },
  210. wrap: {
  211. inherit: true,
  212. accuracy: 100
  213. },
  214. clamp: {
  215. inherit: true,
  216. accuracy: 100
  217. },
  218. bind: {
  219. inherit: true,
  220. accuracy: 100
  221. },
  222. whirlpool: {
  223. inherit: true,
  224. accuracy: 100
  225. },
  226. sandtomb: {
  227. inherit: true,
  228. accuracy: 100
  229. },
  230. crabhammer: {
  231. inherit: true,
  232. accuracy: 100
  233. },
  234. superfang: {
  235. inherit: true,
  236. accuracy: 100
  237. },
  238. sacredfire: {
  239. inherit: true,
  240. accuracy: 100
  241. },
  242. aeroblast: {
  243. inherit: true,
  244. accuracy: 100
  245. },
  246. dynamicpunch: {
  247. inherit: true,
  248. basePower: 110
  249. },
  250. meteormash: {
  251. inherit: true,
  252. accuracy: 100
  253. },
  254. firefang: {
  255. inherit: true,
  256. accuracy: 100
  257. },
  258. thunderfang: {
  259. inherit: true,
  260. accuracy: 100
  261. },
  262. icefang: {
  263. inherit: true,
  264. accuracy: 100
  265. },
  266. zenheadbutt: {
  267. inherit: true,
  268. accuracy: 100
  269. },
  270. drillrun: {
  271. inherit: true,
  272. accuracy: 100
  273. },
  274. aircutter: {
  275. inherit: true,
  276. accuracy: 100
  277. },
  278. snarl: {
  279. inherit: true,
  280. accuracy: 100
  281. },
  282. cometpunch: {
  283. inherit: true,
  284. accuracy: 100,
  285. basePower: 25
  286. },
  287. hypervoice: {
  288. inherit: true,
  289. basePower: 100
  290. },
  291. playrough: {
  292. inherit: true,
  293. accuracy: 100,
  294. basePower: 85
  295. },
  296. iciclecrash: {
  297. inherit: true,
  298. accuracy: 100,
  299. basePower: 80
  300. },
  301. spikecannon: {
  302. inherit: true,
  303. priority: 1
  304. },
  305. paraboliccharge: {
  306. inherit: true,
  307. basepower: 65
  308. },
  309. belch: {
  310. inherit: true,
  311. accuracy: 100,
  312. basePower: 135
  313. },
  314. selfdestruct: {
  315. inherit: true,
  316. basePower: 180,
  317. type: "Fire"
  318. },
  319. octazooka: {
  320. inherit: true,
  321. accuracy: 100,
  322. priority: 1,
  323. basePower: 80,
  324. self: {
  325. boosts: {
  326. spa: -2
  327. }
  328. },
  329. },
  330. quash: {
  331. inherit: true,
  332. priority: 1
  333. },
  334. blazekick: {
  335. inherit: true,
  336. onEffectiveness: function (typeMod, type, move) {
  337. return typeMod + this.getEffectiveness('Fighting', type);
  338. },
  339. },
  340. skullbash: {
  341. inherit: true,
  342. secondary: {
  343. boosts: {
  344. def: -2
  345. }
  346. },
  347. },
  348. razorwind: {
  349. inherit: true,
  350. basePower: 120,
  351. accuracy: 100,
  352. onHit: function (target) {
  353. target.clearBoosts();
  354. this.add('-clearboost', target);
  355. },
  356. },
  357. quickguard: {
  358. inherit: true,
  359. priority: 4
  360. },
  361. craftyshield :{
  362. inherit: true,
  363. sideCondition: 'craftyshield',
  364. onTryHitSide: function (side, source) {
  365. return !!this.willAct();
  366. },
  367. effect: {
  368. duration: 3,
  369. onStart: function (target, source) {
  370. this.add('-singleturn', source, 'Crafty Shield');
  371. },
  372. onTryHitPriority: 3,
  373. onTryHit: function (target, source, move) {
  374. if (move.breaksProtect) {
  375. target.side.removeSideCondition('craftyshield');
  376. return;
  377. }
  378. if (move && (move.target === 'self' || move.category !== 'Status')) return;
  379. this.add('-activate', target, 'Crafty Shield');
  380. return null;
  381. }
  382. },
  383. },
  384. iondeluge: {
  385. inherit: true,
  386. pseudoWeather: 'iondeluge',
  387. effect: {
  388. duration: 4,
  389. onStart: function (target) {
  390. this.add('-fieldactivate', 'move: Ion Deluge');
  391. },
  392. onModifyMovePriority: -2,
  393. onModifyMove: function (move) {
  394. if (move.type === 'Normal') {
  395. move.type = 'Electric';
  396. this.debug(move.name + "'s type changed to Electric");
  397. }
  398. }
  399. },
  400. },
  401. bonemerang: {
  402. inherit: true,
  403. accuracy: 100,
  404. basePower: 45,
  405. onEffectiveness: function (typeMod, type) {
  406. if (type === 'Flying') return 1;
  407. if (move.type !== 'Ground') return;
  408. var target = this.activeTarget;
  409. // only the attack that grounds the target ignores effectiveness
  410. // if called from a chat plugin, don't ignore effectiveness
  411. if (!this.runEvent || !this.runEvent('NegateImmunity', target, 'Ground')) return;
  412. if (!this.getImmunity('Ground', target)) return 0;
  413. },
  414. },
  415. bonerush: {
  416. inherit: true,
  417. accuracy: 100,
  418. onEffectiveness: function (typeMod, type, move) {
  419. if (move.type !== 'Ground') return;
  420. var target = this.activeTarget;
  421. // only the attack that grounds the target ignores effectiveness
  422. // if called from a chat plugin, don't ignore effectiveness
  423. if (!this.runEvent || !this.runEvent('NegateImmunity', target, 'Ground')) return;
  424. if (!this.getImmunity('Ground', target)) return 0;
  425. },
  426. },
  427. boneclub: {
  428. inherit: true,
  429. accuracy: 100,
  430. onEffectiveness: function (typeMod, type, move) {
  431. if (move.type !== 'Ground') return;
  432. var target = this.activeTarget;
  433. // only the attack that grounds the target ignores effectiveness
  434. // if called from a chat plugin, don't ignore effectiveness
  435. if (!this.runEvent || !this.runEvent('NegateImmunity', target, 'Ground')) return;
  436. if (!this.getImmunity('Ground', target)) return 0;
  437. },
  438. volatileStatus: 'smackdown',
  439. effect: {
  440. onStart: function (pokemon) {
  441. var applies = false;
  442. if (pokemon.hasType('Flying') || pokemon.hasAbility('levitate')) applies = true;
  443. if (pokemon.hasItem('ironball') || pokemon.volatiles['ingrain'] || this.getPseudoWeather('gravity')) applies = false;
  444. if (pokemon.removeVolatile('fly') || pokemon.removeVolatile('bounce')) {
  445. applies = true;
  446. this.cancelMove(pokemon);
  447. pokemon.removeVolatile('twoturnmove');
  448. }
  449. if (pokemon.volatiles['magnetrise']) {
  450. applies = true;
  451. delete pokemon.volatiles['magnetrise'];
  452. }
  453. if (pokemon.volatiles['telekinesis']) {
  454. applies = true;
  455. delete pokemon.volatiles['telekinesis'];
  456. }
  457. if (!applies) return false;
  458. this.add('-start', pokemon, 'Smack Down');
  459. },
  460. onRestart: function (pokemon) {
  461. if (pokemon.removeVolatile('fly') || pokemon.removeVolatile('bounce')) {
  462. this.cancelMove(pokemon);
  463. this.add('-start', pokemon, 'Smack Down');
  464. }
  465. },
  466. onNegateImmunity: function (pokemon, type) {
  467. if (type === 'Ground') return false;
  468. }
  469. },
  470. },
  471. acidspray: {
  472. inherit: true,
  473. onEffectiveness: function (typeMod, type) {
  474. if (type === 'Steel') return 1;
  475. },
  476. },
  477. acid: {
  478. inherit: true,
  479. basePower: 65,
  480. secondary: {
  481. chance: 20,
  482. boosts: {
  483. spd: -1
  484. }
  485. },
  486. onEffectiveness: function (typeMod, type) {
  487. if (type === 'Steel') return 1;
  488. },
  489. },
  490. waterspout: {
  491. inherit: true,
  492. basePower: 140,
  493. basePowerCallback: function (pokemon) {
  494. return 140 * pokemon.hp / pokemon.maxhp;
  495. },
  496. },
  497. eruption: {
  498. inherit: true,
  499. basePower: 140,
  500. basePowerCallback: function (pokemon) {
  501. return 140 * pokemon.hp / pokemon.maxhp;
  502. },
  503. },
  504. chargebeam: {
  505. inherit: true,
  506. accuracy: 100,
  507. basePower: 40,
  508. self: {
  509. boost: {
  510. spa: 1
  511. }
  512. },
  513. },
  514. slash: {
  515. inherit: true,
  516. basePower: 65,
  517. willCrit: true
  518. },
  519. muddywater: {
  520. inherit: true,
  521. basePower: 80,
  522. accuracy: 100,
  523. secondary: {
  524. chance: 100,
  525. boosts: {
  526. spe: -1
  527. }
  528. },
  529. },
  530. nightdaze: {
  531. inherit: true,
  532. basePower: 80,
  533. accuracy: 100,
  534. selfSwitch: true,
  535. secondary: false
  536. },
  537. relicsong: {
  538. inherit: true,
  539. basePower: 60,
  540. volatileStatus: 'yawn',
  541. onTryHit: function (target) {
  542. if (target.status || !target.runImmunity('slp')) {
  543. return false;
  544. }
  545. },
  546. effect: {
  547. noCopy: true, // doesn't get copied by Baton Pass
  548. duration: 2,
  549. onStart: function (target, source) {
  550. this.add('-start', target, 'move: Yawn', '[of] ' + source);
  551. },
  552. onEnd: function (target) {
  553. this.add('-end', target, 'move: Yawn', '[silent]');
  554. target.trySetStatus('slp');
  555. }
  556. },
  557. },
  558. mysticalfire: {
  559. inherit: true,
  560. secondary: {
  561. chance: 100,
  562. boosts: {
  563. spa: -1,
  564. spd: -1
  565. }
  566. },
  567. },
  568. drillpeck: {
  569. inherit: true,
  570. critRatio: 2
  571. },
  572. rocksmash: {
  573. inherit: true,
  574. secondary: {
  575. chance: 100,
  576. boosts: {
  577. def: -1
  578. }
  579. },
  580. },
  581.  
  582. poisontail: {
  583. inherit: true,
  584. basePower: 60,
  585. secondary: {
  586. chance: 30,
  587. status: 'psn'
  588. },
  589. },
  590. payback: {
  591. inherit: true,
  592. basePower: 65,
  593. basePowerCallback: function (pokemon, target) {
  594. if (target.newlySwitched) {
  595. this.debug('Payback NOT boosted on a switch');
  596. return 65;
  597. }
  598. if (this.willMove(target)) {
  599. this.debug('Payback NOT boosted');
  600. return 65;
  601. }
  602. this.debug('Payback damage boost');
  603. return 130;
  604. },
  605. },
  606. punishment: {
  607. inherit: true,
  608. basePower: 0,
  609. basePowerCallback: function (pokemon, target) {
  610. return 60 + 30 * target.positiveBoosts();
  611. },
  612. },
  613. razorshell: {
  614. inherit: true,
  615. accuracy: 100,
  616. secondary: {
  617. chance: 100,
  618. boosts: {
  619. def: -1
  620. }
  621. },
  622. },
  623. diamondstorm: {
  624. inherit: true,
  625. accuracy: 100,
  626. secondary: {
  627. self: {
  628. chance: 100,
  629. boosts: {
  630. def: 1
  631. }
  632. }
  633. }
  634. },
  635. fellstinger: {
  636. inherit: true,
  637. basePower: 20,
  638. priority: 1
  639. },
  640. landswrath: {
  641. inherit: true,
  642. onHit: function (target) {
  643. target.clearBoosts();
  644. this.add('-clearboost', target);
  645. },
  646. },
  647. mistball: {
  648. inherit: true,
  649. secondary: {
  650. chance: 100,
  651. boosts: {
  652. spa: -1
  653. }
  654. },
  655. },
  656. lusterpurge: {
  657. inherit: true,
  658. secondary: {
  659. chance: 100,
  660. boosts: {
  661. spd: -1
  662. }
  663. },
  664. },
  665. wideguard: {
  666. inherit: true,
  667. effect: {
  668. duration: 1,
  669. onStart: function (target, source) {
  670. this.add('-singleturn', source, 'Wide Guard');
  671. },
  672. onTryHitPriority: 4,
  673. onTryHit: function (target, source, effect) {
  674. // Wide Guard blocks damaging spread moves
  675. if (effect && (effect.target !== 'allAdjacent' && effect.target !== 'allAdjacentFoes')) {
  676. return;
  677. }
  678. this.add('-activate', target, 'Wide Guard');
  679. var lockedmove = source.getVolatile('lockedmove');
  680. if (lockedmove) {
  681. // Outrage counter is reset
  682. if (source.volatiles['lockedmove'].duration === 2) {
  683. delete source.volatiles['lockedmove'];
  684. }
  685. }
  686. return null;
  687. }
  688. },
  689. },
  690. grassyterrain: {
  691. inherit: true,
  692. effect: {
  693. duration: 5,
  694. onBasePower: function (basePower, attacker, defender, move) {
  695. var weakenedMoves = {'earthquake':1, 'bulldoze':1, 'magnitude':1};
  696. if (move.id in weakenedMoves) {
  697. this.debug('move weakened by grassy terrain');
  698. return this.chainModify(0.5);
  699. }
  700. if (Pokemon.hasType === ('Grass') && attacker.isGrounded()) {
  701. this.debug('grassy terrain boost');
  702. return this.chainModify(1.3);
  703. }
  704. },
  705. onStart: function (target, source) {
  706. this.add('-fieldstart', 'move: Grassy Terrain');
  707. },
  708. onResidualOrder: 5,
  709. onResidualSubOrder: 2,
  710. onResidual: function (battle) {
  711. this.debug('onResidual battle');
  712. var pokemon;
  713. for (var s in battle.sides) {
  714. for (var p in battle.sides[s].active) {
  715. pokemon = battle.sides[s].active[p];
  716. if (pokemon.isGrounded() && !pokemon.isSemiInvulnerable()) {
  717. this.debug('Pokemon is grounded, healing through Grassy Terrain.');
  718. this.heal(pokemon.maxhp / 8, pokemon, pokemon);
  719. }
  720. }
  721. }
  722. },
  723. onEnd: function () {
  724. this.add('-fieldend', 'move: Grassy Terrain');
  725. }
  726. },
  727. },
  728. mistyterrain: {
  729. inherit: true,
  730. effect: {
  731. duration: 5,
  732. onSetStatus: function (status, target, source, effect) {
  733. if (!target.isGrounded() || target.isSemiInvulnerable()) return;
  734. this.debug('misty terrain preventing status');
  735. return false;
  736. },
  737. onBasePower: function (basePower, attacker, defender, move) {
  738. if (pokemon.hasType === ('Dragon') && defender.isGrounded() && !defender.isSemiInvulnerable()) {
  739. this.debug('misty terrain weaken');
  740. return this.chainModify(0.5);
  741. }
  742. },
  743. onStart: function (side) {
  744. this.add('-fieldstart', 'Misty Terrain');
  745. },
  746. onResidualOrder: 21,
  747. onResidualSubOrder: 2,
  748. onEnd: function (side) {
  749. this.add('-fieldend', 'Misty Terrain');
  750. }
  751. },
  752. },
  753. electricterrain: {
  754. inherit: true,
  755. effect: {
  756. duration: 5,
  757. onSetStatus: function (status, target, source, effect) {
  758. if (status.id === 'slp' && target.isGrounded() && !target.isSemiInvulnerable()) {
  759. this.debug('Interrupting sleep from Electric Terrain');
  760. return false;
  761. }
  762. },
  763. onTryHit: function (target, source, move) {
  764. if (!target.isGrounded() || target.isSemiInvulnerable()) return;
  765. if (move && move.id === 'yawn') {
  766. return false;
  767. }
  768. },
  769. onBasePower: function (basePower, attacker, defender, move) {
  770. if (pokemon.hasType === ('Electric') && attacker.isGrounded() && !attacker.isSemiInvulnerable()) {
  771. this.debug('electric terrain boost');
  772. return this.chainModify(1.3);
  773. }
  774. },
  775. onUpdate: function (pokemon) {
  776. if (pokemon.status === 'slp'&& target.isGrounded() && !target.isSemiInvulnerable()) {
  777. pokemon.cureStatus();
  778. }
  779. },
  780. onStart: function () {
  781. this.add('-fieldstart', 'move: Electric Terrain');
  782. },
  783. onResidualOrder: 21,
  784. onResidualSubOrder: 2,
  785. onEnd: function () {
  786. this.add('-fieldend', 'move: Electric Terrain');
  787. }
  788. },
  789. },
  790. teleport: {
  791. inherit: true,
  792. onTryHit: function (pokemon, target, move) {
  793. if (move.id === 'pursuit') {
  794. this.add('-immune', pokemon, '[msg]');
  795. return null;
  796. }
  797. },
  798. priority: 1,
  799. selfSwitch: true,
  800. },
  801. present: {
  802. inherit: true,
  803. category: "Status",
  804. priority: 3,
  805. effect: {
  806. duration: 1,
  807. onStart: function (target) {
  808. this.add('-start', target, 'Present');
  809. },
  810. onTryMove: function (pokemon, target, move) {
  811. if (move.category === 'Status') {
  812. this.add('-activate', pokemon, 'Present');
  813. this.damage(this.clampIntRange(Math.round(pokemon.maxhp / 2), 1));
  814. return false;
  815. }
  816. }
  817. },
  818. },
  819. ominouswind: {
  820. inherit: true,
  821. priority: -3,
  822. beforeTurnCallback: function (pokemon) {
  823. pokemon.addVolatile('ominouswind');
  824. },
  825. beforeMoveCallback: function (pokemon) {
  826. if (!pokemon.removeVolatile('ominouswind')) {
  827. return false;
  828. }
  829. if (pokemon.lastAttackedBy && pokemon.lastAttackedBy.thisTurn && pokemon.lastAttackedBy.damage > 0 && this.getMove(pokemon.lastAttackedBy.move).category !== 'Status') {
  830. this.add('cant', pokemon, 'Ominous Wind', 'Ominous Wind');
  831. return true;
  832. }
  833. },
  834. effect: {
  835. duration: 1,
  836. onStart: function (pokemon) {
  837. this.add('-singleturn', pokemon, 'move: Ominous Wind');
  838. }
  839. },
  840. secondary: {
  841. chance: 100,
  842. self: {
  843. boosts: {
  844. atk: 1,
  845. def: 1,
  846. spa: 1,
  847. spd: 1,
  848. spe: 1
  849. }
  850. },
  851. },
  852. },
  853. silverwind: {
  854. inherit: true,
  855. priority: -3,
  856. beforeTurnCallback: function (pokemon) {
  857. pokemon.addVolatile('silverwind');
  858. },
  859. beforeMoveCallback: function (pokemon) {
  860. if (!pokemon.removeVolatile('silverwind')) {
  861. return false;
  862. }
  863. if (pokemon.lastAttackedBy && pokemon.lastAttackedBy.thisTurn && pokemon.lastAttackedBy.damage > 0 && this.getMove(pokemon.lastAttackedBy.move).category !== 'Status') {
  864. this.add('cant', pokemon, 'Silver Wind', 'Silver Wind');
  865. return true;
  866. }
  867. },
  868. effect: {
  869. duration: 1,
  870. onStart: function (pokemon) {
  871. this.add('-singleturn', pokemon, 'move: Silver Wind');
  872. }
  873. },
  874. secondary: {
  875. chance: 100,
  876. self: {
  877. boosts: {
  878. atk: 1,
  879. def: 1,
  880. spa: 1,
  881. spd: 1,
  882. spe: 1
  883. }
  884. },
  885. },
  886. },
  887. ancientpower: {
  888. inherit: true,
  889. priority: -3,
  890. beforeTurnCallback: function (pokemon) {
  891. pokemon.addVolatile('ancientpower');
  892. },
  893. beforeMoveCallback: function (pokemon) {
  894. if (!pokemon.removeVolatile('ancientpower')) {
  895. return false;
  896. }
  897. if (pokemon.lastAttackedBy && pokemon.lastAttackedBy.thisTurn && pokemon.lastAttackedBy.damage > 0 && this.getMove(pokemon.lastAttackedBy.move).category !== 'Status') {
  898. this.add('cant', pokemon, 'Ancient Power', 'Ancient Power');
  899. return true;
  900. }
  901. },
  902. effect: {
  903. duration: 1,
  904. onStart: function (pokemon) {
  905. this.add('-singleturn', pokemon, 'move: Ancient Power');
  906. }
  907. },
  908. secondary: {
  909. chance: 100,
  910. self: {
  911. boosts: {
  912. atk: 1,
  913. def: 1,
  914. spa: 1,
  915. spd: 1,
  916. spe: 1
  917. }
  918. },
  919. },
  920. },
  921. endure: {
  922. inherit: true,
  923. onTryHit: function (pokemon) {
  924. return this.willAct() && this.runEvent('StallMove', pokemon);
  925. },
  926. onHit: function (pokemon) {
  927. pokemon.addVolatile('stall');
  928. },
  929. effect: {
  930. duration: 1,
  931. onStart: function (target) {
  932. this.add('-singleturn', target, 'move: Endure');
  933. },
  934. onDamagePriority: -10,
  935. onDamage: function (damage, target, source, effect) {
  936. if (effect && effect.effectType === 'Move' && damage >= target.hp) {
  937. this.add('-activate', target, 'move: Endure');
  938. return target.hp - 1;
  939. this.boost({spe:1});
  940. }
  941. }
  942. },
  943. },
  944. charge: {
  945. inherit: true,
  946. effect: {
  947. onBasePowerPriority: 3,
  948. onBasePower: function (basePower, attacker, defender, move) {
  949. if (move.type === 'Electric') {
  950. this.debug('charge boost');
  951. return this.chainModify(2);
  952. }
  953. }
  954. },
  955. },
  956. aromaticmist: {
  957. inherit: true,
  958. target: "AllySide",
  959. },
  960. uproar: {
  961. inherit: true,
  962. basePower: 80,
  963. sleepUsable: true,
  964. target: "Normal",
  965. onBasePower: function (basePower, pokemon) {
  966. if (pokemon.status && pokemon.status == 'slp') {
  967. return this.chainModify(2);
  968. }
  969. },
  970. },
  971. swallow: {
  972. inherit: true,
  973. onTryHit: true,
  974. onHit: function (pokemon) {
  975. var healAmount = [0.20, 0.40, 0.60, 0.80];
  976. this.heal(this.modify(pokemon.maxhp, healAmount[(pokemon.volatiles['stockpile'].layers)]));
  977. },
  978. },
  979. spitup: {
  980. inherit: true,
  981. basePower: 0,
  982. basePowerCallback: function (pokemon) {
  983. return 50 + pokemon.volatiles['stockpile'].layers * 50
  984. },
  985. onTry: true,
  986. onAfterMove: false,
  987. },
  988. flyingpress: {
  989. inherit: true,
  990. accuracy: 100,
  991. onEffectiveness: function (typeMod, type) {
  992. if (type === 'Bug') return 1;
  993. if (type === 'Grass') return 1;
  994. if (type === 'Fighting') return 1;
  995. },
  996. },
  997. nightmare: {
  998. inherit: true,
  999. effect: {
  1000. duration: 5,
  1001. onResidualOrder: 26,
  1002. onResidualSubOrder: 1,
  1003. onResidual: function (pokemon) {
  1004. if (!pokemon.hp) return;
  1005. for (var i = 0; i < pokemon.side.foe.active.length; i++) {
  1006. var target = pokemon.side.foe.active[i];
  1007. if (!target || !target.hp) continue;
  1008. if (target.status === 'slp') {
  1009. this.damage(target.maxhp / 4, target);
  1010. }
  1011. }
  1012. },
  1013. onStart: function (side) {
  1014. this.add('-sidestart', side, 'move: Nightmare');
  1015. },
  1016. onResidualOrder: 21,
  1017. onResidualSubOrder: 1,
  1018. onEnd: function (side) {
  1019. this.add('-sideend', side, 'move: Nightmare');
  1020. }
  1021. },
  1022. },
  1023. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement