Advertisement
TJSJ

PokeAttempt / Type Effectiveness

Nov 14th, 2019
889
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///defender_type_matchup_type1
  2.  
  3. /* THIS SCRIPT SHOULD ONLY RUN ONE TIME SINCE CALCULATIONS ARE ACCUMULATIVE */
  4.  
  5. /* the commented types are the type of the opponents attacking move */
  6.  
  7. // IMMUNE --> global.aMoveTypeEffect = 0
  8. // IMMUNE --> global.bMoveTypeEffect = 0
  9. // NOT VERY EFFECTIVE --> global.aMoveTypeEffect = 0.5
  10. // NOT VERY EFFECTIVE --> global.bMoveTypeEffect = 0.5
  11. // NORMALLY EFFECTIVE --> global.aMoveTypeEffect = 1 (no need to type)
  12. // NORMALLY EFFECTIVE --> global.bMoveTypeEffect = 1 (no need to type)
  13. // SUPER EFFECTIVE --> global.aMoveTypeEffect = 2
  14. // SUPER EFFECTIVE --> global.bMoveTypeEffect = 2
  15.  
  16. /* TEMPLATE
  17.  
  18. // FIGHTING MOVE
  19. switch(global.aStoredPlyrType1) {
  20.     case "Normal":
  21.     case "Fire":
  22.     case "Fighting":
  23.     case "Water":
  24.     case "Flying":
  25.     case "Grass":
  26.     case "Poison":
  27.     case "Electric":
  28.     case "Ground":
  29.     case "Psychic":
  30.     case "Rock":
  31.     case "Ice":
  32.     case "Bug":
  33.     case "Dragon":
  34.     case "Ghost":
  35.     case "Dark":
  36.     case "Steel":
  37.     case "Fairy":
  38.     case "Cosmic":
  39.     }
  40.    
  41. */
  42.  
  43.  
  44.  
  45. // NORMAL MOVE
  46. if Var.MoveType[global.bMoveChosen] == "Normal" {
  47. switch(global.aStoredPlyrType1) {
  48.     case "Rock": global.bMoveTypeEffect = 0.5; break; //NVE
  49.     case "Ghost": global.bMoveTypeEffect = 0; break; //IMMUNE
  50.     case "Steel": global.bMoveTypeEffect = 0.5; break; //NVE
  51.     default: global.bMoveTypeEffect = 1;
  52.     }
  53. }
  54.    
  55. // FIRE MOVE
  56. if Var.MoveType[global.bMoveChosen] == "Fire" {
  57. switch(global.aStoredPlyrType1) {
  58.     case "Fire": global.bMoveTypeEffect = 0.5; break;
  59.     case "Water": global.bMoveTypeEffect = 0.5; break;
  60.     case "Grass": global.bMoveTypeEffect = 2; break;
  61.     case "Rock": global.bMoveTypeEffect = 0.5; break;
  62.     case "Ice": global.bMoveTypeEffect = 2; break;
  63.     case "Dragon": global.bMoveTypeEffect = 0.5; break;
  64.     case "Steel": global.bMoveTypeEffect = 2; break;
  65.     default: global.bMoveTypeEffect = 1;
  66.     }
  67. }
  68.    
  69. // FIGHTING MOVE
  70. if Var.MoveType[global.bMoveChosen] == "Fighting" {
  71. switch(global.aStoredPlyrType1) {
  72.     case "Normal": global.bMoveTypeEffect = 2; break;
  73.     case "Flying": global.bMoveTypeEffect = 0.5; break;
  74.     case "Poison": global.bMoveTypeEffect = 0.5; break;
  75.     case "Psychic": global.bMoveTypeEffect = 0.5; break;
  76.     case "Rock": global.bMoveTypeEffect = 2; break;
  77.     case "Ice": global.bMoveTypeEffect = 2; break;
  78.     case "Bug": global.bMoveTypeEffect = 0.5; break;
  79.     case "Ghost": global.bMoveTypeEffect = 0; break;
  80.     case "Dark": global.bMoveTypeEffect = 2; break;
  81.     case "Steel": global.bMoveTypeEffect = 2; break;
  82.     case "Fairy": global.bMoveTypeEffect = 0.5; break;
  83.     default: global.bMoveTypeEffect = 1;
  84.     }
  85. }
  86.    
  87. // WATER MOVE
  88. if Var.MoveType[global.bMoveChosen] == "Water" {
  89. switch(global.aStoredPlyrType1) {
  90.     case "Fire": global.bMoveTypeEffect = 2; break;
  91.     case "Water": global.bMoveTypeEffect = 0.5; break;
  92.     case "Grass": global.bMoveTypeEffect = 0.5; break;
  93.     case "Ground": global.bMoveTypeEffect = 2; break;
  94.     case "Rock": global.bMoveTypeEffect = 2; break;
  95.     case "Dragon": global.bMoveTypeEffect = 0.5; break;
  96.     default: global.bMoveTypeEffect = 1;
  97.     }
  98. }
  99.    
  100. // FLYING MOVE
  101. if Var.MoveType[global.bMoveChosen] == "Flying" {
  102. switch(global.aStoredPlyrType1) {
  103.     case "Fighting": global.bMoveTypeEffect = 2; break;
  104.     case "Grass": global.bMoveTypeEffect = 2; break;
  105.     case "Electric": global.bMoveTypeEffect = 0.5; break;
  106.     case "Rock": global.bMoveTypeEffect = 0.5; break;
  107.     case "Ice": global.bMoveTypeEffect = 0.5; break;
  108.     case "Bug": global.bMoveTypeEffect = 2; break;
  109.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  110.     case "Cosmic": global.bMoveTypeEffect = 0.5; break;
  111.     default: global.bMoveTypeEffect = 1;
  112.     }
  113. }
  114.    
  115. // GRASS MOVE
  116. if Var.MoveType[global.bMoveChosen] == "Grass" {
  117. switch(global.aStoredPlyrType1) {
  118.     case "Fire": global.bMoveTypeEffect = 0.5; break;
  119.     case "Water": global.bMoveTypeEffect = 2; break;
  120.     case "Flying": global.bMoveTypeEffect = 0.5; break;
  121.     case "Grass": global.bMoveTypeEffect = 0.5; break;
  122.     case "Poison": global.bMoveTypeEffect = 0.5; break;
  123.     case "Ground": global.bMoveTypeEffect = 2; break;
  124.     case "Rock": global.bMoveTypeEffect = 2; break;
  125.     case "Bug": global.bMoveTypeEffect = 0.5; break;
  126.     case "Dragon": global.bMoveTypeEffect = 0.5; break;
  127.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  128.     case "Cosmic": global.bMoveTypeEffect = 0.5; break;
  129.     default: global.bMoveTypeEffect = 1;
  130.     }
  131. }
  132.    
  133. // POISON MOVE
  134. if Var.MoveType[global.bMoveChosen] == "Poison" {
  135. switch(global.aStoredPlyrType1) {
  136.     case "Grass": global.bMoveTypeEffect = 2; break;
  137.     case "Poison": global.bMoveTypeEffect = 0.5; break;
  138.     case "Ground": global.bMoveTypeEffect = 0.5; break;
  139.     case "Rock": global.bMoveTypeEffect = 0.5; break;
  140.     case "Bug": global.bMoveTypeEffect = 0.5; break;
  141.     case "Ghost": global.bMoveTypeEffect = 0.5; break;
  142.     case "Dark": global.bMoveTypeEffect = 0.5; break;
  143.     case "Steel": global.bMoveTypeEffect = 0; break;
  144.     case "Fairy": global.bMoveTypeEffect = 2; break;
  145.     default: global.bMoveTypeEffect = 1;
  146.     }
  147. }
  148.    
  149. // ELECTRIC MOVE
  150. if Var.MoveType[global.bMoveChosen] == "Electric" {
  151. switch(global.aStoredPlyrType1) {
  152.     case "Water": global.bMoveTypeEffect = 2; break;
  153.     case "Flying": global.bMoveTypeEffect = 2; break;
  154.     case "Grass": global.bMoveTypeEffect = 0.5; break;
  155.     case "Electric": global.bMoveTypeEffect = 0.5; break;
  156.     case "Ground": global.bMoveTypeEffect = 0; break;
  157.     case "Dragon": global.bMoveTypeEffect = 0.5; break;
  158.     case "Cosmic": global.bMoveTypeEffect = 0.5; break;
  159.     default: global.bMoveTypeEffect = 1;
  160.     }
  161. }
  162.    
  163. // GROUND MOVE
  164. if Var.MoveType[global.bMoveChosen] == "Ground" {
  165. switch(global.aStoredPlyrType1) {
  166.     case "Fire": global.bMoveTypeEffect = 2; break;
  167.     case "Flying": global.bMoveTypeEffect = 0; break;
  168.     case "Grass": global.bMoveTypeEffect = 0.5; break;
  169.     case "Electric": global.bMoveTypeEffect = 2; break;
  170.     case "Rock": global.bMoveTypeEffect = 2; break;
  171.     case "Bug": global.bMoveTypeEffect = 0.5; break;
  172.     case "Steel": global.bMoveTypeEffect = 2; break;
  173.     case "Cosmic": global.bMoveTypeEffect = 0.5; break;
  174.     case "Poison": global.bMoveTypeEffect = 2; break;
  175.     default: global.bMoveTypeEffect = 1;
  176.     }
  177. }
  178.    
  179. // PSYCHIC MOVE
  180. if Var.MoveType[global.bMoveChosen] == "Psychic" {
  181. switch(global.aStoredPlyrType1) {
  182.     case "Fighting": global.bMoveTypeEffect = 2; break;
  183.     case "Poison": global.bMoveTypeEffect = 2; break;
  184.     case "Psychic": global.bMoveTypeEffect = 0.5; break;
  185.     case "Dark": global.bMoveTypeEffect = 0; break;
  186.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  187.     default: global.bMoveTypeEffect = 1;
  188.     }
  189. }
  190.    
  191. // ROCK MOVE
  192. if Var.MoveType[global.bMoveChosen] == "Rock" {
  193. switch(global.aStoredPlyrType1) {
  194.     case "Fire": global.bMoveTypeEffect = 2; break;
  195.     case "Fighting": global.bMoveTypeEffect = 0.5; break;
  196.     case "Flying": global.bMoveTypeEffect = 2; break;
  197.     case "Ground": global.bMoveTypeEffect = 0.5; break;
  198.     case "Ice": global.bMoveTypeEffect = 2; break;
  199.     case "Bug": global.bMoveTypeEffect = 2; break;
  200.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  201.     case "Cosmic": global.bMoveTypeEffect = 0.5; break;
  202.     default: global.bMoveTypeEffect = 1;
  203.     }
  204. }
  205.    
  206. // ICE MOVE
  207. if Var.MoveType[global.bMoveChosen] == "Ice" {
  208. switch(global.aStoredPlyrType1) {
  209.     case "Fire": global.bMoveTypeEffect = 0.5; break;
  210.     case "Water": global.bMoveTypeEffect = 0.5; break;
  211.     case "Flying": global.bMoveTypeEffect = 2; break;
  212.     case "Grass": global.bMoveTypeEffect = 2; break;
  213.     case "Ground": global.bMoveTypeEffect = 2; break;
  214.     case "Ice": global.bMoveTypeEffect = 0.5; break;
  215.     case "Dragon": global.bMoveTypeEffect = 2; break;
  216.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  217.     case "Cosmic": global.bMoveTypeEffect = 0; break;
  218.     default: global.bMoveTypeEffect = 1;
  219.     }
  220. }
  221.    
  222. // BUG MOVE
  223. if Var.MoveType[global.bMoveChosen] == "Bug" {
  224. switch(global.aStoredPlyrType1) {
  225.     case "Fire": global.bMoveTypeEffect = 0.5; break;
  226.     case "Fighting": global.bMoveTypeEffect = 0.5; break;
  227.     case "Flying": global.bMoveTypeEffect = 0.5; break;
  228.     case "Grass": global.bMoveTypeEffect = 2; break;
  229.     case "Poison": global.bMoveTypeEffect = 0.5; break;
  230.     case "Ground": global.bMoveTypeEffect = 0.5; break;
  231.     case "Psychic": global.bMoveTypeEffect = 2; break;
  232.     case "Ghost": global.bMoveTypeEffect = 0.5; break;
  233.     case "Dark": global.bMoveTypeEffect = 2; break;
  234.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  235.     case "Fairy": global.bMoveTypeEffect = 0.5; break;
  236.     default: global.bMoveTypeEffect = 1;
  237.     }
  238. }
  239.    
  240. // DRAGON MOVE
  241. if Var.MoveType[global.bMoveChosen] == "Dragon" {
  242. switch(global.aStoredPlyrType1) {
  243.     case "Dragon": global.bMoveTypeEffect = 2; break;
  244.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  245.     case "Fairy": global.bMoveTypeEffect = 0; break;
  246.     default: global.bMoveTypeEffect = 1;
  247.     }
  248. }
  249.    
  250. // GHOST MOVE
  251. if Var.MoveType[global.bMoveChosen] == "Ghost" {
  252. switch(global.aStoredPlyrType1) {
  253.     case "Normal": global.bMoveTypeEffect = 0; break;
  254.     case "Psychic": global.bMoveTypeEffect = 2; break;
  255.     case "Ghost": global.bMoveTypeEffect = 2; break;
  256.     case "Dark": global.bMoveTypeEffect = 0.5; break;
  257.     default: global.bMoveTypeEffect = 1;
  258.     }
  259. }
  260.    
  261. // DARK MOVE
  262. if Var.MoveType[global.bMoveChosen] == "Dark" {
  263. switch(global.aStoredPlyrType1) {
  264.     case "Fighting": global.bMoveTypeEffect = 0.5; break;
  265.     case "Poison": global.bMoveTypeEffect = 0.5; break;
  266.     case "Psychic": global.bMoveTypeEffect = 2; break;
  267.     case "Ghost": global.bMoveTypeEffect = 2; break;
  268.     case "Dark": global.bMoveTypeEffect = 0.5; break;
  269.     case "Fairy": global.bMoveTypeEffect = 0.5; break;
  270.     case "Cosmic": global.bMoveTypeEffect = 2; break;
  271.     default: global.bMoveTypeEffect = 1;
  272.     }
  273. }
  274.    
  275. // STEEL MOVE
  276. if Var.MoveType[global.bMoveChosen] == "Steel" {
  277. switch(global.aStoredPlyrType1) {
  278.     case "Fire": global.bMoveTypeEffect = 0.5; break;
  279.     case "Water": global.bMoveTypeEffect = 0.5; break;
  280.     case "Electric": global.bMoveTypeEffect = 0.5; break;
  281.     case "Rock": global.bMoveTypeEffect = 2; break;
  282.     case "Ice": global.bMoveTypeEffect = 2; break;
  283.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  284.     case "Fairy": global.bMoveTypeEffect = 2; break;
  285.     case "Cosmic": global.bMoveTypeEffect = 0.5; break;
  286.     default: global.bMoveTypeEffect = 1;
  287.     }
  288. }
  289.    
  290. // FAIRY MOVE
  291. if Var.MoveType[global.bMoveChosen] == "Fairy" {
  292. switch(global.aStoredPlyrType1) {
  293.     case "Fire": global.bMoveTypeEffect = 0.5; break;
  294.     case "Fighting": global.bMoveTypeEffect = 2; break;
  295.     case "Poison": global.bMoveTypeEffect = 0.5; break;
  296.     case "Dragon": global.bMoveTypeEffect = 2; break;
  297.     case "Dark": global.bMoveTypeEffect = 2; break;
  298.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  299.     case "Cosmic": global.bMoveTypeEffect = 2; break;
  300.     default: global.bMoveTypeEffect = 1;
  301.     }
  302. }
  303.    
  304. // COSMIC MOVE
  305. if Var.MoveType[global.bMoveChosen] == "Cosmic" {
  306. switch(global.aStoredPlyrType1) {
  307.     case "Normal": global.bMoveTypeEffect = 2; break;
  308.     case "Fighting": global.bMoveTypeEffect = 2; break;
  309.     case "Water": global.bMoveTypeEffect = 2; break;
  310.     case "Flying": global.bMoveTypeEffect = 2; break;
  311.     case "Electric": global.bMoveTypeEffect = 2; break;
  312.     case "Ground": global.bMoveTypeEffect = 0.5; break;
  313.     case "Psychic": global.bMoveTypeEffect = 0.5; break;
  314.     case "Rock": global.bMoveTypeEffect = 0.5; break;
  315.     case "Dragon": global.bMoveTypeEffect = 0.5; break;
  316.     case "Ghost": global.bMoveTypeEffect = 0.5; break;
  317.     case "Steel": global.bMoveTypeEffect = 0.5; break;
  318.     case "Fairy": global.bMoveTypeEffect = 0.5; break;
  319.     case "Cosmic": global.bMoveTypeEffect = 0.5; break;
  320.     default: global.bMoveTypeEffect = 1;
  321.     }
  322. }
  323.    
  324. /* NEXT --- FACTOR IN THE <>SECOND TYPE<> IF APPLICABLE */
  325.  
  326. if global.aStoredPlyrType2 != "" {
  327.     defender_type_matchup_plyr1_type2();
  328.     } else {
  329.     global.bDamageInflicted *= global.bMoveTypeEffect;
  330.     }
  331.    
  332. ///defender_type_matchup_type2
  333.  
  334. /* THIS SCRIPT SHOULD ONLY RUN ONE TIME SINCE CALCULATIONS ARE ACCUMULATIVE */
  335.  
  336. /* the commented types are the type of the opponents attacking move */
  337.  
  338. // IMMUNE --> global.aMoveTypeEffect *= 0
  339. // IMMUNE --> global.bMoveTypeEffect *= 0
  340. // NOT VERY EFFECTIVE --> global.aMoveTypeEffect *= 0.5
  341. // NOT VERY EFFECTIVE --> global.bMoveTypeEffect *= 0.5
  342. // NORMALLY EFFECTIVE --> global.aMoveTypeEffect *= 1 (no need to type)
  343. // NORMALLY EFFECTIVE --> global.bMoveTypeEffect *= 1 (no need to type)
  344. // SUPER EFFECTIVE --> global.aMoveTypeEffect *= 2
  345. // SUPER EFFECTIVE --> global.bMoveTypeEffect *= 2
  346.  
  347. /* TEMPLATE
  348.  
  349. // FIGHTING MOVE
  350. switch(global.aStoredPlyrType2) {
  351.     case "Normal":
  352.     case "Fire":
  353.     case "Fighting":
  354.     case "Water":
  355.     case "Flying":
  356.     case "Grass":
  357.     case "Poison":
  358.     case "Electric":
  359.     case "Ground":
  360.     case "Psychic":
  361.     case "Rock":
  362.     case "Ice":
  363.     case "Bug":
  364.     case "Dragon":
  365.     case "Ghost":
  366.     case "Dark":
  367.     case "Steel":
  368.     case "Fairy":
  369.     case "Cosmic":
  370.     }
  371.    
  372. */
  373.  
  374.  
  375.  
  376. // NORMAL MOVE
  377. if Var.MoveType[global.bMoveChosen] == "Normal" {
  378. switch(global.aStoredPlyrType2) {
  379.     case "Rock": global.bMoveTypeEffect *= 0.5; break; //NVE
  380.     case "Ghost": global.bMoveTypeEffect *= 0; break; //IMMUNE
  381.     case "Steel": global.bMoveTypeEffect *= 0.5; break; //NVE
  382.     default: global.bMoveTypeEffect *= 1;
  383.     }
  384. }
  385.    
  386. // FIRE MOVE
  387. if Var.MoveType[global.bMoveChosen] == "Fire" {
  388. switch(global.aStoredPlyrType2) {
  389.     case "Fire": global.bMoveTypeEffect *= 0.5; break;
  390.     case "Water": global.bMoveTypeEffect *= 0.5; break;
  391.     case "Grass": global.bMoveTypeEffect *= 2; break;
  392.     case "Rock": global.bMoveTypeEffect *= 0.5; break;
  393.     case "Ice": global.bMoveTypeEffect *= 2; break;
  394.     case "Dragon": global.bMoveTypeEffect *= 0.5; break;
  395.     case "Steel": global.bMoveTypeEffect *= 2; break;
  396.     default: global.bMoveTypeEffect *= 1;
  397.     }
  398. }
  399.    
  400. // FIGHTING MOVE
  401. if Var.MoveType[global.bMoveChosen] == "Fighting" {
  402. switch(global.aStoredPlyrType2) {
  403.     case "Normal": global.bMoveTypeEffect *= 2; break;
  404.     case "Flying": global.bMoveTypeEffect *= 0.5; break;
  405.     case "Poison": global.bMoveTypeEffect *= 0.5; break;
  406.     case "Psychic": global.bMoveTypeEffect *= 0.5; break;
  407.     case "Rock": global.bMoveTypeEffect *= 2; break;
  408.     case "Ice": global.bMoveTypeEffect *= 2; break;
  409.     case "Bug": global.bMoveTypeEffect *= 0.5; break;
  410.     case "Ghost": global.bMoveTypeEffect *= 0; break;
  411.     case "Dark": global.bMoveTypeEffect *= 2; break;
  412.     case "Steel": global.bMoveTypeEffect *= 2; break;
  413.     case "Fairy": global.bMoveTypeEffect *= 0.5; break;
  414.     default: global.bMoveTypeEffect *= 1;
  415.     }
  416. }
  417.    
  418. // WATER MOVE
  419. if Var.MoveType[global.bMoveChosen] == "Water" {
  420. switch(global.aStoredPlyrType2) {
  421.     case "Fire": global.bMoveTypeEffect *= 2; break;
  422.     case "Water": global.bMoveTypeEffect *= 0.5; break;
  423.     case "Grass": global.bMoveTypeEffect *= 0.5; break;
  424.     case "Ground": global.bMoveTypeEffect *= 2; break;
  425.     case "Rock": global.bMoveTypeEffect *= 2; break;
  426.     case "Dragon": global.bMoveTypeEffect *= 0.5; break;
  427.     default: global.bMoveTypeEffect *= 1;
  428.     }
  429. }
  430.    
  431. // FLYING MOVE
  432. if Var.MoveType[global.bMoveChosen] == "Flying" {
  433. switch(global.aStoredPlyrType2) {
  434.     case "Fighting": global.bMoveTypeEffect *= 2; break;
  435.     case "Grass": global.bMoveTypeEffect *= 2; break;
  436.     case "Electric": global.bMoveTypeEffect *= 0.5; break;
  437.     case "Rock": global.bMoveTypeEffect *= 0.5; break;
  438.     case "Ice": global.bMoveTypeEffect *= 0.5; break;
  439.     case "Bug": global.bMoveTypeEffect *= 2; break;
  440.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  441.     case "Cosmic": global.bMoveTypeEffect *= 0.5; break;
  442.     default: global.bMoveTypeEffect *= 1;
  443.     }
  444. }
  445.    
  446. // GRASS MOVE
  447. if Var.MoveType[global.bMoveChosen] == "Grass" {
  448. switch(global.aStoredPlyrType2) {
  449.     case "Fire": global.bMoveTypeEffect *= 0.5; break;
  450.     case "Water": global.bMoveTypeEffect *= 2; break;
  451.     case "Flying": global.bMoveTypeEffect *= 0.5; break;
  452.     case "Grass": global.bMoveTypeEffect *= 0.5; break;
  453.     case "Poison": global.bMoveTypeEffect *= 0.5; break;
  454.     case "Ground": global.bMoveTypeEffect *= 2; break;
  455.     case "Rock": global.bMoveTypeEffect *= 2; break;
  456.     case "Bug": global.bMoveTypeEffect *= 0.5; break;
  457.     case "Dragon": global.bMoveTypeEffect *= 0.5; break;
  458.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  459.     case "Cosmic": global.bMoveTypeEffect *= 0.5; break;
  460.     default: global.bMoveTypeEffect *= 1;
  461.     }
  462. }
  463.    
  464. // POISON MOVE
  465. if Var.MoveType[global.bMoveChosen] == "Poison" {
  466. switch(global.aStoredPlyrType2) {
  467.     case "Grass": global.bMoveTypeEffect *= 2; break;
  468.     case "Poison": global.bMoveTypeEffect *= 0.5; break;
  469.     case "Ground": global.bMoveTypeEffect *= 0.5; break;
  470.     case "Rock": global.bMoveTypeEffect *= 0.5; break;
  471.     case "Bug": global.bMoveTypeEffect *= 0.5; break;
  472.     case "Ghost": global.bMoveTypeEffect *= 0.5; break;
  473.     case "Dark": global.bMoveTypeEffect *= 0.5; break;
  474.     case "Steel": global.bMoveTypeEffect *= 0; break;
  475.     case "Fairy": global.bMoveTypeEffect *= 2; break;
  476.     default: global.bMoveTypeEffect *= 1;
  477.     }
  478. }
  479.    
  480. // ELECTRIC MOVE
  481. if Var.MoveType[global.bMoveChosen] == "Electric" {
  482. switch(global.aStoredPlyrType2) {
  483.     case "Water": global.bMoveTypeEffect *= 2; break;
  484.     case "Flying": global.bMoveTypeEffect *= 2; break;
  485.     case "Grass": global.bMoveTypeEffect *= 0.5; break;
  486.     case "Electric": global.bMoveTypeEffect *= 0.5; break;
  487.     case "Ground": global.bMoveTypeEffect *= 0; break;
  488.     case "Dragon": global.bMoveTypeEffect *= 0.5; break;
  489.     case "Cosmic": global.bMoveTypeEffect *= 0.5; break;
  490.     default: global.bMoveTypeEffect *= 1;
  491.     }
  492. }
  493.    
  494. // GROUND MOVE
  495. if Var.MoveType[global.bMoveChosen] == "Ground" {
  496. switch(global.aStoredPlyrType2) {
  497.     case "Fire": global.bMoveTypeEffect *= 2; break;
  498.     case "Flying": global.bMoveTypeEffect *= 0; break;
  499.     case "Grass": global.bMoveTypeEffect *= 0.5; break;
  500.     case "Electric": global.bMoveTypeEffect *= 2; break;
  501.     case "Rock": global.bMoveTypeEffect *= 2; break;
  502.     case "Bug": global.bMoveTypeEffect *= 0.5; break;
  503.     case "Steel": global.bMoveTypeEffect *= 2; break;
  504.     case "Cosmic": global.bMoveTypeEffect *= 0.5; break;
  505.     case "Poison": global.bMoveTypeEffect = 2; break;
  506.     default: global.bMoveTypeEffect *= 1;
  507.     }
  508. }
  509.    
  510. // PSYCHIC MOVE
  511. if Var.MoveType[global.bMoveChosen] == "Psychic" {
  512. switch(global.aStoredPlyrType2) {
  513.     case "Fighting": global.bMoveTypeEffect *= 2; break;
  514.     case "Poison": global.bMoveTypeEffect *= 2; break;
  515.     case "Psychic": global.bMoveTypeEffect *= 0.5; break;
  516.     case "Dark": global.bMoveTypeEffect *= 0; break;
  517.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  518.     default: global.bMoveTypeEffect *= 1;
  519.     }
  520. }
  521.    
  522. // ROCK MOVE
  523. if Var.MoveType[global.bMoveChosen] == "Rock" {
  524. switch(global.aStoredPlyrType2) {
  525.     case "Fire": global.bMoveTypeEffect *= 2; break;
  526.     case "Fighting": global.bMoveTypeEffect *= 0.5; break;
  527.     case "Flying": global.bMoveTypeEffect *= 2; break;
  528.     case "Ground": global.bMoveTypeEffect *= 0.5; break;
  529.     case "Ice": global.bMoveTypeEffect *= 2; break;
  530.     case "Bug": global.bMoveTypeEffect *= 2; break;
  531.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  532.     case "Cosmic": global.bMoveTypeEffect *= 0.5; break;
  533.     default: global.bMoveTypeEffect *= 1;
  534.     }
  535. }
  536.    
  537. // ICE MOVE
  538. if Var.MoveType[global.bMoveChosen] == "Ice" {
  539. switch(global.aStoredPlyrType2) {
  540.     case "Fire": global.bMoveTypeEffect *= 0.5; break;
  541.     case "Water": global.bMoveTypeEffect *= 0.5; break;
  542.     case "Flying": global.bMoveTypeEffect *= 2; break;
  543.     case "Grass": global.bMoveTypeEffect *= 2; break;
  544.     case "Ground": global.bMoveTypeEffect *= 2; break;
  545.     case "Ice": global.bMoveTypeEffect *= 0.5; break;
  546.     case "Dragon": global.bMoveTypeEffect *= 2; break;
  547.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  548.     case "Cosmic": global.bMoveTypeEffect *= 0; break;
  549.     default: global.bMoveTypeEffect *= 1;
  550.     }
  551. }
  552.    
  553. // BUG MOVE
  554. if Var.MoveType[global.bMoveChosen] == "Bug" {
  555. switch(global.aStoredPlyrType2) {
  556.     case "Fire": global.bMoveTypeEffect *= 0.5; break;
  557.     case "Fighting": global.bMoveTypeEffect *= 0.5; break;
  558.     case "Flying": global.bMoveTypeEffect *= 0.5; break;
  559.     case "Grass": global.bMoveTypeEffect *= 2; break;
  560.     case "Poison": global.bMoveTypeEffect *= 0.5; break;
  561.     case "Ground": global.bMoveTypeEffect *= 0.5; break;
  562.     case "Psychic": global.bMoveTypeEffect *= 2; break;
  563.     case "Ghost": global.bMoveTypeEffect *= 0.5; break;
  564.     case "Dark": global.bMoveTypeEffect *= 2; break;
  565.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  566.     case "Fairy": global.bMoveTypeEffect *= 0.5; break;
  567.     default: global.bMoveTypeEffect *= 1;
  568.     }
  569. }
  570.    
  571. // DRAGON MOVE
  572. if Var.MoveType[global.bMoveChosen] == "Dragon" {
  573. switch(global.aStoredPlyrType2) {
  574.     case "Dragon": global.bMoveTypeEffect *= 2; break;
  575.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  576.     case "Fairy": global.bMoveTypeEffect *= 0; break;
  577.     default: global.bMoveTypeEffect *= 1;
  578.     }
  579. }
  580.    
  581. // GHOST MOVE
  582. if Var.MoveType[global.bMoveChosen] == "Ghost" {
  583. switch(global.aStoredPlyrType2) {
  584.     case "Normal": global.bMoveTypeEffect *= 0; break;
  585.     case "Psychic": global.bMoveTypeEffect *= 2; break;
  586.     case "Ghost": global.bMoveTypeEffect *= 2; break;
  587.     case "Dark": global.bMoveTypeEffect *= 0.5; break;
  588.     default: global.bMoveTypeEffect *= 1;
  589.     }
  590. }
  591.    
  592. // DARK MOVE
  593. if Var.MoveType[global.bMoveChosen] == "Dark" {
  594. switch(global.aStoredPlyrType2) {
  595.     case "Fighting": global.bMoveTypeEffect *= 0.5; break;
  596.     case "Poison": global.bMoveTypeEffect *= 0.5; break;
  597.     case "Psychic": global.bMoveTypeEffect *= 2; break;
  598.     case "Ghost": global.bMoveTypeEffect *= 2; break;
  599.     case "Dark": global.bMoveTypeEffect *= 0.5; break;
  600.     case "Fairy": global.bMoveTypeEffect *= 0.5; break;
  601.     case "Cosmic": global.bMoveTypeEffect *= 2; break;
  602.     default: global.bMoveTypeEffect *= 1;
  603.     }
  604. }
  605.    
  606. // STEEL MOVE
  607. if Var.MoveType[global.bMoveChosen] == "Steel" {
  608. switch(global.aStoredPlyrType2) {
  609.     case "Fire": global.bMoveTypeEffect *= 0.5; break;
  610.     case "Water": global.bMoveTypeEffect *= 0.5; break;
  611.     case "Electric": global.bMoveTypeEffect *= 0.5; break;
  612.     case "Rock": global.bMoveTypeEffect *= 2; break;
  613.     case "Ice": global.bMoveTypeEffect *= 2; break;
  614.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  615.     case "Fairy": global.bMoveTypeEffect *= 2; break;
  616.     case "Cosmic": global.bMoveTypeEffect *= 0.5; break;
  617.     default: global.bMoveTypeEffect *= 1;
  618.     }
  619. }
  620.    
  621. // FAIRY MOVE
  622. if Var.MoveType[global.bMoveChosen] == "Fairy" {
  623. switch(global.aStoredPlyrType2) {
  624.     case "Fire": global.bMoveTypeEffect *= 0.5; break;
  625.     case "Fighting": global.bMoveTypeEffect *= 2; break;
  626.     case "Poison": global.bMoveTypeEffect *= 0.5; break;
  627.     case "Dragon": global.bMoveTypeEffect *= 2; break;
  628.     case "Dark": global.bMoveTypeEffect *= 2; break;
  629.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  630.     case "Cosmic": global.bMoveTypeEffect *= 2; break;
  631.     default: global.bMoveTypeEffect *= 1;
  632.     }
  633. }
  634.    
  635. // COSMIC MOVE
  636. if Var.MoveType[global.bMoveChosen] == "Cosmic" {
  637. switch(global.aStoredPlyrType2) {
  638.     case "Normal": global.bMoveTypeEffect *= 2; break;
  639.     case "Fighting": global.bMoveTypeEffect *= 2; break;
  640.     case "Water": global.bMoveTypeEffect *= 2; break;
  641.     case "Flying": global.bMoveTypeEffect *= 2; break;
  642.     case "Electric": global.bMoveTypeEffect *= 2; break;
  643.     case "Ground": global.bMoveTypeEffect *= 0.5; break;
  644.     case "Psychic": global.bMoveTypeEffect *= 0.5; break;
  645.     case "Rock": global.bMoveTypeEffect *= 0.5; break;
  646.     case "Dragon": global.bMoveTypeEffect *= 0.5; break;
  647.     case "Ghost": global.bMoveTypeEffect *= 0.5; break;
  648.     case "Steel": global.bMoveTypeEffect *= 0.5; break;
  649.     case "Fairy": global.bMoveTypeEffect *= 0.5; break;
  650.     case "Cosmic": global.bMoveTypeEffect *= 0.5; break;
  651.     default: global.bMoveTypeEffect *= 1;
  652.     }
  653. }
  654.  
  655. global.bDamageInflicted *= global.bMoveTypeEffect;
  656.  
  657. if Var.MoveAccuracy[global.bMoveChosen] < 1 && global.bMoveTypeEffect != 0 {
  658.     var MoveChance = irandom_range(0,100);
  659.     if MoveChance < 100-Var.MoveAccuracy[global.bMoveChosen]*100 { //if misses...
  660.         global.bMoveTypeEffect = -1;
  661.         global.bDamageInflicted *= 0;
  662.         }
  663.     }
  664.    
  665. ///defender_type_matchup_type1
  666.  
  667. /* THIS SCRIPT SHOULD ONLY RUN ONE TIME SINCE CALCULATIONS ARE ACCUMULATIVE */
  668.  
  669. /* the commented types are the type of the opponents attacking move */
  670.  
  671. // IMMUNE --> global.aMoveTypeEffect = 0
  672. // IMMUNE --> global.aMoveTypeEffect = 0
  673. // NOT VERY EFFECTIVE --> global.aMoveTypeEffect = 0.5
  674. // NOT VERY EFFECTIVE --> global.aMoveTypeEffect = 0.5
  675. // NORMALLY EFFECTIVE --> global.aMoveTypeEffect = 1 (no need to type)
  676. // NORMALLY EFFECTIVE --> global.aMoveTypeEffect = 1 (no need to type)
  677. // SUPER EFFECTIVE --> global.aMoveTypeEffect = 2
  678. // SUPER EFFECTIVE --> global.aMoveTypeEffect = 2
  679.  
  680. /* TEMPLATE
  681.  
  682. // FIGHTING MOVE
  683. switch(global.bStoredPlyrType1) {
  684.     case "Normal":
  685.     case "Fire":
  686.     case "Fighting":
  687.     case "Water":
  688.     case "Flying":
  689.     case "Grass":
  690.     case "Poison":
  691.     case "Electric":
  692.     case "Ground":
  693.     case "Psychic":
  694.     case "Rock":
  695.     case "Ice":
  696.     case "Bug":
  697.     case "Dragon":
  698.     case "Ghost":
  699.     case "Dark":
  700.     case "Steel":
  701.     case "Fairy":
  702.     case "Cosmic":
  703.     }
  704.    
  705. */
  706.  
  707.  
  708.  
  709. // NORMAL MOVE
  710. if Var.MoveType[global.aMoveChosen] == "Normal" {
  711. switch(global.bStoredPlyrType1) {
  712.     case "Rock": global.aMoveTypeEffect = 0.5; break; //NVE
  713.     case "Ghost": global.aMoveTypeEffect = 0; break; //IMMUNE
  714.     case "Steel": global.aMoveTypeEffect = 0.5; break; //NVE
  715.     default: global.aMoveTypeEffect = 1;
  716.     }
  717. }
  718.    
  719. // FIRE MOVE
  720. if Var.MoveType[global.aMoveChosen] == "Fire" {
  721. switch(global.bStoredPlyrType1) {
  722.     case "Fire": global.aMoveTypeEffect = 0.5; break;
  723.     case "Water": global.aMoveTypeEffect = 0.5; break;
  724.     case "Grass": global.aMoveTypeEffect = 2; break;
  725.     case "Rock": global.aMoveTypeEffect = 0.5; break;
  726.     case "Ice": global.aMoveTypeEffect = 2; break;
  727.     case "Dragon": global.aMoveTypeEffect = 0.5; break;
  728.     case "Steel": global.aMoveTypeEffect = 2; break;
  729.     default: global.aMoveTypeEffect = 1;
  730.     }
  731. }
  732.    
  733. // FIGHTING MOVE
  734. if Var.MoveType[global.aMoveChosen] == "Fighting" {
  735. switch(global.bStoredPlyrType1) {
  736.     case "Normal": global.aMoveTypeEffect = 2; break;
  737.     case "Flying": global.aMoveTypeEffect = 0.5; break;
  738.     case "Poison": global.aMoveTypeEffect = 0.5; break;
  739.     case "Psychic": global.aMoveTypeEffect = 0.5; break;
  740.     case "Rock": global.aMoveTypeEffect = 2; break;
  741.     case "Ice": global.aMoveTypeEffect = 2; break;
  742.     case "Bug": global.aMoveTypeEffect = 0.5; break;
  743.     case "Ghost": global.aMoveTypeEffect = 0; break;
  744.     case "Dark": global.aMoveTypeEffect = 2; break;
  745.     case "Steel": global.aMoveTypeEffect = 2; break;
  746.     case "Fairy": global.aMoveTypeEffect = 0.5; break;
  747.     default: global.aMoveTypeEffect = 1;
  748.     }
  749. }
  750.    
  751. // WATER MOVE
  752. if Var.MoveType[global.aMoveChosen] == "Water" {
  753. switch(global.bStoredPlyrType1) {
  754.     case "Fire": global.aMoveTypeEffect = 2; break;
  755.     case "Water": global.aMoveTypeEffect = 0.5; break;
  756.     case "Grass": global.aMoveTypeEffect = 0.5; break;
  757.     case "Ground": global.aMoveTypeEffect = 2; break;
  758.     case "Rock": global.aMoveTypeEffect = 2; break;
  759.     case "Dragon": global.aMoveTypeEffect = 0.5; break;
  760.     default: global.aMoveTypeEffect = 1;
  761.     }
  762. }
  763.    
  764. // FLYING MOVE
  765. if Var.MoveType[global.aMoveChosen] == "Flying" {
  766. switch(global.bStoredPlyrType1) {
  767.     case "Fighting": global.aMoveTypeEffect = 2; break;
  768.     case "Grass": global.aMoveTypeEffect = 2; break;
  769.     case "Electric": global.aMoveTypeEffect = 0.5; break;
  770.     case "Rock": global.aMoveTypeEffect = 0.5; break;
  771.     case "Ice": global.aMoveTypeEffect = 0.5; break;
  772.     case "Bug": global.aMoveTypeEffect = 2; break;
  773.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  774.     case "Cosmic": global.aMoveTypeEffect = 0.5; break;
  775.     default: global.aMoveTypeEffect = 1;
  776.     }
  777. }
  778.    
  779. // GRASS MOVE
  780. if Var.MoveType[global.aMoveChosen] == "Grass" {
  781. switch(global.bStoredPlyrType1) {
  782.     case "Fire": global.aMoveTypeEffect = 0.5; break;
  783.     case "Water": global.aMoveTypeEffect = 2; break;
  784.     case "Flying": global.aMoveTypeEffect = 0.5; break;
  785.     case "Grass": global.aMoveTypeEffect = 0.5; break;
  786.     case "Poison": global.aMoveTypeEffect = 0.5; break;
  787.     case "Ground": global.aMoveTypeEffect = 2; break;
  788.     case "Rock": global.aMoveTypeEffect = 2; break;
  789.     case "Bug": global.aMoveTypeEffect = 0.5; break;
  790.     case "Dragon": global.aMoveTypeEffect = 0.5; break;
  791.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  792.     case "Cosmic": global.aMoveTypeEffect = 0.5; break;
  793.     default: global.aMoveTypeEffect = 1;
  794.     }
  795. }
  796.    
  797. // POISON MOVE
  798. if Var.MoveType[global.aMoveChosen] == "Poison" {
  799. switch(global.bStoredPlyrType1) {
  800.     case "Grass": global.aMoveTypeEffect = 2; break;
  801.     case "Poison": global.aMoveTypeEffect = 0.5; break;
  802.     case "Ground": global.aMoveTypeEffect = 0.5; break;
  803.     case "Rock": global.aMoveTypeEffect = 0.5; break;
  804.     case "Bug": global.aMoveTypeEffect = 0.5; break;
  805.     case "Ghost": global.aMoveTypeEffect = 0.5; break;
  806.     case "Dark": global.aMoveTypeEffect = 0.5; break;
  807.     case "Steel": global.aMoveTypeEffect = 0; break;
  808.     case "Fairy": global.aMoveTypeEffect = 2; break;
  809.     default: global.aMoveTypeEffect = 1;
  810.     }
  811. }
  812.    
  813. // ELECTRIC MOVE
  814. if Var.MoveType[global.aMoveChosen] == "Electric" {
  815. switch(global.bStoredPlyrType1) {
  816.     case "Water": global.aMoveTypeEffect = 2; break;
  817.     case "Flying": global.aMoveTypeEffect = 2; break;
  818.     case "Grass": global.aMoveTypeEffect = 0.5; break;
  819.     case "Electric": global.aMoveTypeEffect = 0.5; break;
  820.     case "Ground": global.aMoveTypeEffect = 0; break;
  821.     case "Dragon": global.aMoveTypeEffect = 0.5; break;
  822.     case "Cosmic": global.aMoveTypeEffect = 0.5; break;
  823.     default: global.aMoveTypeEffect = 1;
  824.     }
  825. }
  826.    
  827. // GROUND MOVE
  828. if Var.MoveType[global.aMoveChosen] == "Ground" {
  829. switch(global.bStoredPlyrType1) {
  830.     case "Fire": global.aMoveTypeEffect = 2; break;
  831.     case "Flying": global.aMoveTypeEffect = 0; break;
  832.     case "Grass": global.aMoveTypeEffect = 0.5; break;
  833.     case "Electric": global.aMoveTypeEffect = 2; break;
  834.     case "Rock": global.aMoveTypeEffect = 2; break;
  835.     case "Bug": global.aMoveTypeEffect = 0.5; break;
  836.     case "Steel": global.aMoveTypeEffect = 2; break;
  837.     case "Cosmic": global.aMoveTypeEffect = 0.5; break;
  838.     case "Poison": global.aMoveTypeEffect = 2; break;
  839.     default: global.aMoveTypeEffect = 1;
  840.     }
  841. }
  842.    
  843. // PSYCHIC MOVE
  844. if Var.MoveType[global.aMoveChosen] == "Psychic" {
  845. switch(global.bStoredPlyrType1) {
  846.     case "Fighting": global.aMoveTypeEffect = 2; break;
  847.     case "Poison": global.aMoveTypeEffect = 2; break;
  848.     case "Psychic": global.aMoveTypeEffect = 0.5; break;
  849.     case "Dark": global.aMoveTypeEffect = 0; break;
  850.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  851.     default: global.aMoveTypeEffect = 1;
  852.     }
  853. }
  854.    
  855. // ROCK MOVE
  856. if Var.MoveType[global.aMoveChosen] == "Rock" {
  857. switch(global.bStoredPlyrType1) {
  858.     case "Fire": global.aMoveTypeEffect = 2; break;
  859.     case "Fighting": global.aMoveTypeEffect = 0.5; break;
  860.     case "Flying": global.aMoveTypeEffect = 2; break;
  861.     case "Ground": global.aMoveTypeEffect = 0.5; break;
  862.     case "Ice": global.aMoveTypeEffect = 2; break;
  863.     case "Bug": global.aMoveTypeEffect = 2; break;
  864.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  865.     case "Cosmic": global.aMoveTypeEffect = 0.5; break;
  866.     default: global.aMoveTypeEffect = 1;
  867.     }
  868. }
  869.    
  870. // ICE MOVE
  871. if Var.MoveType[global.aMoveChosen] == "Ice" {
  872. switch(global.bStoredPlyrType1) {
  873.     case "Fire": global.aMoveTypeEffect = 0.5; break;
  874.     case "Water": global.aMoveTypeEffect = 0.5; break;
  875.     case "Flying": global.aMoveTypeEffect = 2; break;
  876.     case "Grass": global.aMoveTypeEffect = 2; break;
  877.     case "Ground": global.aMoveTypeEffect = 2; break;
  878.     case "Ice": global.aMoveTypeEffect = 0.5; break;
  879.     case "Dragon": global.aMoveTypeEffect = 2; break;
  880.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  881.     case "Cosmic": global.aMoveTypeEffect = 0; break;
  882.     default: global.aMoveTypeEffect = 1;
  883.     }
  884. }
  885.    
  886. // BUG MOVE
  887. if Var.MoveType[global.aMoveChosen] == "Bug" {
  888. switch(global.bStoredPlyrType1) {
  889.     case "Fire": global.aMoveTypeEffect = 0.5; break;
  890.     case "Fighting": global.aMoveTypeEffect = 0.5; break;
  891.     case "Flying": global.aMoveTypeEffect = 0.5; break;
  892.     case "Grass": global.aMoveTypeEffect = 2; break;
  893.     case "Poison": global.aMoveTypeEffect = 0.5; break;
  894.     case "Ground": global.aMoveTypeEffect = 0.5; break;
  895.     case "Psychic": global.aMoveTypeEffect = 2; break;
  896.     case "Ghost": global.aMoveTypeEffect = 0.5; break;
  897.     case "Dark": global.aMoveTypeEffect = 2; break;
  898.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  899.     case "Fairy": global.aMoveTypeEffect = 0.5; break;
  900.     default: global.aMoveTypeEffect = 1;
  901.     }
  902. }
  903.    
  904. // DRAGON MOVE
  905. if Var.MoveType[global.aMoveChosen] == "Dragon" {
  906. switch(global.bStoredPlyrType1) {
  907.     case "Dragon": global.aMoveTypeEffect = 2; break;
  908.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  909.     case "Fairy": global.aMoveTypeEffect = 0; break;
  910.     default: global.aMoveTypeEffect = 1;
  911.     }
  912. }
  913.    
  914. // GHOST MOVE
  915. if Var.MoveType[global.aMoveChosen] == "Ghost" {
  916. switch(global.bStoredPlyrType1) {
  917.     case "Normal": global.aMoveTypeEffect = 0; break;
  918.     case "Psychic": global.aMoveTypeEffect = 2; break;
  919.     case "Ghost": global.aMoveTypeEffect = 2; break;
  920.     case "Dark": global.aMoveTypeEffect = 0.5; break;
  921.     default: global.aMoveTypeEffect = 1;
  922.     }
  923. }
  924.    
  925. // DARK MOVE
  926. if Var.MoveType[global.aMoveChosen] == "Dark" {
  927. switch(global.bStoredPlyrType1) {
  928.     case "Fighting": global.aMoveTypeEffect = 0.5; break;
  929.     case "Poison": global.aMoveTypeEffect = 0.5; break;
  930.     case "Psychic": global.aMoveTypeEffect = 2; break;
  931.     case "Ghost": global.aMoveTypeEffect = 2; break;
  932.     case "Dark": global.aMoveTypeEffect = 0.5; break;
  933.     case "Fairy": global.aMoveTypeEffect = 0.5; break;
  934.     case "Cosmic": global.aMoveTypeEffect = 2; break;
  935.     default: global.aMoveTypeEffect = 1;
  936.     }
  937. }
  938.    
  939. // STEEL MOVE
  940. if Var.MoveType[global.aMoveChosen] == "Steel" {
  941. switch(global.bStoredPlyrType1) {
  942.     case "Fire": global.aMoveTypeEffect = 0.5; break;
  943.     case "Water": global.aMoveTypeEffect = 0.5; break;
  944.     case "Electric": global.aMoveTypeEffect = 0.5; break;
  945.     case "Rock": global.aMoveTypeEffect = 2; break;
  946.     case "Ice": global.aMoveTypeEffect = 2; break;
  947.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  948.     case "Fairy": global.aMoveTypeEffect = 2; break;
  949.     case "Cosmic": global.aMoveTypeEffect = 0.5; break;
  950.     default: global.aMoveTypeEffect = 1;
  951.     }
  952. }
  953.    
  954. // FAIRY MOVE
  955. if Var.MoveType[global.aMoveChosen] == "Fairy" {
  956. switch(global.bStoredPlyrType1) {
  957.     case "Fire": global.aMoveTypeEffect = 0.5; break;
  958.     case "Fighting": global.aMoveTypeEffect = 2; break;
  959.     case "Poison": global.aMoveTypeEffect = 0.5; break;
  960.     case "Dragon": global.aMoveTypeEffect = 2; break;
  961.     case "Dark": global.aMoveTypeEffect = 2; break;
  962.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  963.     case "Cosmic": global.aMoveTypeEffect = 2; break;
  964.     default: global.aMoveTypeEffect = 1;
  965.     }
  966. }
  967.    
  968. // COSMIC MOVE
  969. if Var.MoveType[global.aMoveChosen] == "Cosmic" {
  970. switch(global.bStoredPlyrType1) {
  971.     case "Normal": global.aMoveTypeEffect = 2; break;
  972.     case "Fighting": global.aMoveTypeEffect = 2; break;
  973.     case "Water": global.aMoveTypeEffect = 2; break;
  974.     case "Flying": global.aMoveTypeEffect = 2; break;
  975.     case "Electric": global.aMoveTypeEffect = 2; break;
  976.     case "Ground": global.aMoveTypeEffect = 0.5; break;
  977.     case "Psychic": global.aMoveTypeEffect = 0.5; break;
  978.     case "Rock": global.aMoveTypeEffect = 0.5; break;
  979.     case "Dragon": global.aMoveTypeEffect = 0.5; break;
  980.     case "Ghost": global.aMoveTypeEffect = 0.5; break;
  981.     case "Steel": global.aMoveTypeEffect = 0.5; break;
  982.     case "Fairy": global.aMoveTypeEffect = 0.5; break;
  983.     case "Cosmic": global.aMoveTypeEffect = 0.5; break;
  984.     default: global.aMoveTypeEffect = 1;
  985.     }
  986. }
  987.    
  988. /* NEXT --- FACTOR IN THE <>SECOND TYPE<> IF APPLICABLE */
  989.  
  990. if global.bStoredPlyrType2 != "" {
  991.     defender_type_matchup_plyr2_type2();
  992.     } else {
  993.     global.aDamageInflicted *= global.aMoveTypeEffect;
  994.     }
  995.    
  996. ///defender_type_matchup_type1
  997.  
  998. /* THIS SCRIPT SHOULD ONLY RUN ONE TIME SINCE CALCULATIONS ARE ACCUMULATIVE */
  999.  
  1000. /* the commented types are the type of the opponents attacking move */
  1001.  
  1002. // IMMUNE --> global.aMoveTypeEffect *= 0
  1003. // IMMUNE --> global.aMoveTypeEffect *= 0
  1004. // NOT VERY EFFECTIVE --> global.aMoveTypeEffect *= 0.5
  1005. // NOT VERY EFFECTIVE --> global.aMoveTypeEffect *= 0.5
  1006. // NORMALLY EFFECTIVE --> global.aMoveTypeEffect *= 1 (no need to type)
  1007. // NORMALLY EFFECTIVE --> global.aMoveTypeEffect *= 1 (no need to type)
  1008. // SUPER EFFECTIVE --> global.aMoveTypeEffect *= 2
  1009. // SUPER EFFECTIVE --> global.aMoveTypeEffect *= 2
  1010.  
  1011. /* TEMPLATE
  1012.  
  1013. // FIGHTING MOVE
  1014. switch(global.bStoredPlyrType2) {
  1015.     case "Normal":
  1016.     case "Fire":
  1017.     case "Fighting":
  1018.     case "Water":
  1019.     case "Flying":
  1020.     case "Grass":
  1021.     case "Poison":
  1022.     case "Electric":
  1023.     case "Ground":
  1024.     case "Psychic":
  1025.     case "Rock":
  1026.     case "Ice":
  1027.     case "Bug":
  1028.     case "Dragon":
  1029.     case "Ghost":
  1030.     case "Dark":
  1031.     case "Steel":
  1032.     case "Fairy":
  1033.     case "Cosmic":
  1034.     }
  1035.    
  1036. */
  1037.  
  1038.  
  1039.  
  1040. // NORMAL MOVE
  1041. if Var.MoveType[global.aMoveChosen] == "Normal" {
  1042. switch(global.bStoredPlyrType2) {
  1043.     case "Rock": global.aMoveTypeEffect *= 0.5; break; //NVE
  1044.     case "Ghost": global.aMoveTypeEffect *= 0; break; //IMMUNE
  1045.     case "Steel": global.aMoveTypeEffect *= 0.5; break; //NVE
  1046.     default: global.aMoveTypeEffect *= 1;
  1047.     }
  1048. }
  1049.    
  1050. // FIRE MOVE
  1051. if Var.MoveType[global.aMoveChosen] == "Fire" {
  1052. switch(global.bStoredPlyrType2) {
  1053.     case "Fire": global.aMoveTypeEffect *= 0.5; break;
  1054.     case "Water": global.aMoveTypeEffect *= 0.5; break;
  1055.     case "Grass": global.aMoveTypeEffect *= 2; break;
  1056.     case "Rock": global.aMoveTypeEffect *= 0.5; break;
  1057.     case "Ice": global.aMoveTypeEffect *= 2; break;
  1058.     case "Dragon": global.aMoveTypeEffect *= 0.5; break;
  1059.     case "Steel": global.aMoveTypeEffect *= 2; break;
  1060.     default: global.aMoveTypeEffect *= 1;
  1061.     }
  1062. }
  1063.    
  1064. // FIGHTING MOVE
  1065. if Var.MoveType[global.aMoveChosen] == "Fighting" {
  1066. switch(global.bStoredPlyrType2) {
  1067.     case "Normal": global.aMoveTypeEffect *= 2; break;
  1068.     case "Flying": global.aMoveTypeEffect *= 0.5; break;
  1069.     case "Poison": global.aMoveTypeEffect *= 0.5; break;
  1070.     case "Psychic": global.aMoveTypeEffect *= 0.5; break;
  1071.     case "Rock": global.aMoveTypeEffect *= 2; break;
  1072.     case "Ice": global.aMoveTypeEffect *= 2; break;
  1073.     case "Bug": global.aMoveTypeEffect *= 0.5; break;
  1074.     case "Ghost": global.aMoveTypeEffect *= 0; break;
  1075.     case "Dark": global.aMoveTypeEffect *= 2; break;
  1076.     case "Steel": global.aMoveTypeEffect *= 2; break;
  1077.     case "Fairy": global.aMoveTypeEffect *= 0.5; break;
  1078.     default: global.aMoveTypeEffect *= 1;
  1079.     }
  1080. }
  1081.    
  1082. // WATER MOVE
  1083. if Var.MoveType[global.aMoveChosen] == "Water" {
  1084. switch(global.bStoredPlyrType2) {
  1085.     case "Fire": global.aMoveTypeEffect *= 2; break;
  1086.     case "Water": global.aMoveTypeEffect *= 0.5; break;
  1087.     case "Grass": global.aMoveTypeEffect *= 0.5; break;
  1088.     case "Ground": global.aMoveTypeEffect *= 2; break;
  1089.     case "Rock": global.aMoveTypeEffect *= 2; break;
  1090.     case "Dragon": global.aMoveTypeEffect *= 0.5; break;
  1091.     default: global.aMoveTypeEffect *= 1;
  1092.     }
  1093. }
  1094.    
  1095. // FLYING MOVE
  1096. if Var.MoveType[global.aMoveChosen] == "Flying" {
  1097. switch(global.bStoredPlyrType2) {
  1098.     case "Fighting": global.aMoveTypeEffect *= 2; break;
  1099.     case "Grass": global.aMoveTypeEffect *= 2; break;
  1100.     case "Electric": global.aMoveTypeEffect *= 0.5; break;
  1101.     case "Rock": global.aMoveTypeEffect *= 0.5; break;
  1102.     case "Ice": global.aMoveTypeEffect *= 0.5; break;
  1103.     case "Bug": global.aMoveTypeEffect *= 2; break;
  1104.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1105.     case "Cosmic": global.aMoveTypeEffect *= 0.5; break;
  1106.     default: global.aMoveTypeEffect *= 1;
  1107.     }
  1108. }
  1109.    
  1110. // GRASS MOVE
  1111. if Var.MoveType[global.aMoveChosen] == "Grass" {
  1112. switch(global.bStoredPlyrType2) {
  1113.     case "Fire": global.aMoveTypeEffect *= 0.5; break;
  1114.     case "Water": global.aMoveTypeEffect *= 2; break;
  1115.     case "Flying": global.aMoveTypeEffect *= 0.5; break;
  1116.     case "Grass": global.aMoveTypeEffect *= 0.5; break;
  1117.     case "Poison": global.aMoveTypeEffect *= 0.5; break;
  1118.     case "Ground": global.aMoveTypeEffect *= 2; break;
  1119.     case "Rock": global.aMoveTypeEffect *= 2; break;
  1120.     case "Bug": global.aMoveTypeEffect *= 0.5; break;
  1121.     case "Dragon": global.aMoveTypeEffect *= 0.5; break;
  1122.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1123.     case "Cosmic": global.aMoveTypeEffect *= 0.5; break;
  1124.     default: global.aMoveTypeEffect *= 1;
  1125.     }
  1126. }
  1127.    
  1128. // POISON MOVE
  1129. if Var.MoveType[global.aMoveChosen] == "Poison" {
  1130. switch(global.bStoredPlyrType2) {
  1131.     case "Grass": global.aMoveTypeEffect *= 2; break;
  1132.     case "Poison": global.aMoveTypeEffect *= 0.5; break;
  1133.     case "Ground": global.aMoveTypeEffect *= 0.5; break;
  1134.     case "Rock": global.aMoveTypeEffect *= 0.5; break;
  1135.     case "Bug": global.aMoveTypeEffect *= 0.5; break;
  1136.     case "Ghost": global.aMoveTypeEffect *= 0.5; break;
  1137.     case "Dark": global.aMoveTypeEffect *= 0.5; break;
  1138.     case "Steel": global.aMoveTypeEffect *= 0; break;
  1139.     case "Fairy": global.aMoveTypeEffect *= 2; break;
  1140.     default: global.aMoveTypeEffect *= 1;
  1141.     }
  1142. }
  1143.    
  1144. // ELECTRIC MOVE
  1145. if Var.MoveType[global.aMoveChosen] == "Electric" {
  1146. switch(global.bStoredPlyrType2) {
  1147.     case "Water": global.aMoveTypeEffect *= 2; break;
  1148.     case "Flying": global.aMoveTypeEffect *= 2; break;
  1149.     case "Grass": global.aMoveTypeEffect *= 0.5; break;
  1150.     case "Electric": global.aMoveTypeEffect *= 0.5; break;
  1151.     case "Ground": global.aMoveTypeEffect *= 0; break;
  1152.     case "Dragon": global.aMoveTypeEffect *= 0.5; break;
  1153.     case "Cosmic": global.aMoveTypeEffect *= 0.5; break;
  1154.     default: global.aMoveTypeEffect *= 1;
  1155.     }
  1156. }
  1157.    
  1158. // GROUND MOVE
  1159. if Var.MoveType[global.aMoveChosen] == "Ground" {
  1160. switch(global.bStoredPlyrType2) {
  1161.     case "Fire": global.aMoveTypeEffect *= 2; break;
  1162.     case "Flying": global.aMoveTypeEffect *= 0; break;
  1163.     case "Grass": global.aMoveTypeEffect *= 0.5; break;
  1164.     case "Electric": global.aMoveTypeEffect *= 2; break;
  1165.     case "Rock": global.aMoveTypeEffect *= 2; break;
  1166.     case "Bug": global.aMoveTypeEffect *= 0.5; break;
  1167.     case "Steel": global.aMoveTypeEffect *= 2; break;
  1168.     case "Cosmic": global.aMoveTypeEffect *= 0.5; break;
  1169.     case "Poison": global.aMoveTypeEffect = 2; break;
  1170.     default: global.aMoveTypeEffect *= 1;
  1171.     }
  1172. }
  1173.    
  1174. // PSYCHIC MOVE
  1175. if Var.MoveType[global.aMoveChosen] == "Psychic" {
  1176. switch(global.bStoredPlyrType2) {
  1177.     case "Fighting": global.aMoveTypeEffect *= 2; break;
  1178.     case "Poison": global.aMoveTypeEffect *= 2; break;
  1179.     case "Psychic": global.aMoveTypeEffect *= 0.5; break;
  1180.     case "Dark": global.aMoveTypeEffect *= 0; break;
  1181.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1182.     default: global.aMoveTypeEffect *= 1;
  1183.     }
  1184. }
  1185.    
  1186. // ROCK MOVE
  1187. if Var.MoveType[global.aMoveChosen] == "Rock" {
  1188. switch(global.bStoredPlyrType2) {
  1189.     case "Fire": global.aMoveTypeEffect *= 2; break;
  1190.     case "Fighting": global.aMoveTypeEffect *= 0.5; break;
  1191.     case "Flying": global.aMoveTypeEffect *= 2; break;
  1192.     case "Ground": global.aMoveTypeEffect *= 0.5; break;
  1193.     case "Ice": global.aMoveTypeEffect *= 2; break;
  1194.     case "Bug": global.aMoveTypeEffect *= 2; break;
  1195.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1196.     case "Cosmic": global.aMoveTypeEffect *= 0.5; break;
  1197.     default: global.aMoveTypeEffect *= 1;
  1198.     }
  1199. }
  1200.    
  1201. // ICE MOVE
  1202. if Var.MoveType[global.aMoveChosen] == "Ice" {
  1203. switch(global.bStoredPlyrType2) {
  1204.     case "Fire": global.aMoveTypeEffect *= 0.5; break;
  1205.     case "Water": global.aMoveTypeEffect *= 0.5; break;
  1206.     case "Flying": global.aMoveTypeEffect *= 2; break;
  1207.     case "Grass": global.aMoveTypeEffect *= 2; break;
  1208.     case "Ground": global.aMoveTypeEffect *= 2; break;
  1209.     case "Ice": global.aMoveTypeEffect *= 0.5; break;
  1210.     case "Dragon": global.aMoveTypeEffect *= 2; break;
  1211.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1212.     case "Cosmic": global.aMoveTypeEffect *= 0; break;
  1213.     default: global.aMoveTypeEffect *= 1;
  1214.     }
  1215. }
  1216.    
  1217. // BUG MOVE
  1218. if Var.MoveType[global.aMoveChosen] == "Bug" {
  1219. switch(global.bStoredPlyrType2) {
  1220.     case "Fire": global.aMoveTypeEffect *= 0.5; break;
  1221.     case "Fighting": global.aMoveTypeEffect *= 0.5; break;
  1222.     case "Flying": global.aMoveTypeEffect *= 0.5; break;
  1223.     case "Grass": global.aMoveTypeEffect *= 2; break;
  1224.     case "Poison": global.aMoveTypeEffect *= 0.5; break;
  1225.     case "Ground": global.aMoveTypeEffect *= 0.5; break;
  1226.     case "Psychic": global.aMoveTypeEffect *= 2; break;
  1227.     case "Ghost": global.aMoveTypeEffect *= 0.5; break;
  1228.     case "Dark": global.aMoveTypeEffect *= 2; break;
  1229.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1230.     case "Fairy": global.aMoveTypeEffect *= 0.5; break;
  1231.     default: global.aMoveTypeEffect *= 1;
  1232.     }
  1233. }
  1234.    
  1235. // DRAGON MOVE
  1236. if Var.MoveType[global.aMoveChosen] == "Dragon" {
  1237. switch(global.bStoredPlyrType2) {
  1238.     case "Dragon": global.aMoveTypeEffect *= 2; break;
  1239.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1240.     case "Fairy": global.aMoveTypeEffect *= 0; break;
  1241.     default: global.aMoveTypeEffect *= 1;
  1242.     }
  1243. }
  1244.    
  1245. // GHOST MOVE
  1246. if Var.MoveType[global.aMoveChosen] == "Ghost" {
  1247. switch(global.bStoredPlyrType2) {
  1248.     case "Normal": global.aMoveTypeEffect *= 0; break;
  1249.     case "Psychic": global.aMoveTypeEffect *= 2; break;
  1250.     case "Ghost": global.aMoveTypeEffect *= 2; break;
  1251.     case "Dark": global.aMoveTypeEffect *= 0.5; break;
  1252.     default: global.aMoveTypeEffect *= 1;
  1253.     }
  1254. }
  1255.    
  1256. // DARK MOVE
  1257. if Var.MoveType[global.aMoveChosen] == "Dark" {
  1258. switch(global.bStoredPlyrType2) {
  1259.     case "Fighting": global.aMoveTypeEffect *= 0.5; break;
  1260.     case "Poison": global.aMoveTypeEffect *= 0.5; break;
  1261.     case "Psychic": global.aMoveTypeEffect *= 2; break;
  1262.     case "Ghost": global.aMoveTypeEffect *= 2; break;
  1263.     case "Dark": global.aMoveTypeEffect *= 0.5; break;
  1264.     case "Fairy": global.aMoveTypeEffect *= 0.5; break;
  1265.     case "Cosmic": global.aMoveTypeEffect *= 2; break;
  1266.     default: global.aMoveTypeEffect *= 1;
  1267.     }
  1268. }
  1269.    
  1270. // STEEL MOVE
  1271. if Var.MoveType[global.aMoveChosen] == "Steel" {
  1272. switch(global.bStoredPlyrType2) {
  1273.     case "Fire": global.aMoveTypeEffect *= 0.5; break;
  1274.     case "Water": global.aMoveTypeEffect *= 0.5; break;
  1275.     case "Electric": global.aMoveTypeEffect *= 0.5; break;
  1276.     case "Rock": global.aMoveTypeEffect *= 2; break;
  1277.     case "Ice": global.aMoveTypeEffect *= 2; break;
  1278.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1279.     case "Fairy": global.aMoveTypeEffect *= 2; break;
  1280.     case "Cosmic": global.aMoveTypeEffect *= 0.5; break;
  1281.     default: global.aMoveTypeEffect *= 1;
  1282.     }
  1283. }
  1284.    
  1285. // FAIRY MOVE
  1286. if Var.MoveType[global.aMoveChosen] == "Fairy" {
  1287. switch(global.bStoredPlyrType2) {
  1288.     case "Fire": global.aMoveTypeEffect *= 0.5; break;
  1289.     case "Fighting": global.aMoveTypeEffect *= 2; break;
  1290.     case "Poison": global.aMoveTypeEffect *= 0.5; break;
  1291.     case "Dragon": global.aMoveTypeEffect *= 2; break;
  1292.     case "Dark": global.aMoveTypeEffect *= 2; break;
  1293.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1294.     case "Cosmic": global.aMoveTypeEffect *= 2; break;
  1295.     default: global.aMoveTypeEffect *= 1;
  1296.     }
  1297. }
  1298.    
  1299. // COSMIC MOVE
  1300. if Var.MoveType[global.aMoveChosen] == "Cosmic" {
  1301. switch(global.bStoredPlyrType2) {
  1302.     case "Normal": global.aMoveTypeEffect *= 2; break;
  1303.     case "Fighting": global.aMoveTypeEffect *= 2; break;
  1304.     case "Water": global.aMoveTypeEffect *= 2; break;
  1305.     case "Flying": global.aMoveTypeEffect *= 2; break;
  1306.     case "Electric": global.aMoveTypeEffect *= 2; break;
  1307.     case "Ground": global.aMoveTypeEffect *= 0.5; break;
  1308.     case "Psychic": global.aMoveTypeEffect *= 0.5; break;
  1309.     case "Rock": global.aMoveTypeEffect *= 0.5; break;
  1310.     case "Dragon": global.aMoveTypeEffect *= 0.5; break;
  1311.     case "Ghost": global.aMoveTypeEffect *= 0.5; break;
  1312.     case "Steel": global.aMoveTypeEffect *= 0.5; break;
  1313.     case "Fairy": global.aMoveTypeEffect *= 0.5; break;
  1314.     case "Cosmic": global.aMoveTypeEffect *= 0.5; break;
  1315.     default: global.aMoveTypeEffect *= 1;
  1316.     }
  1317. }
  1318.  
  1319. global.aDamageInflicted *= global.aMoveTypeEffect;
  1320.  
  1321. if Var.MoveAccuracy[global.aMoveChosen] < 1 && global.aMoveTypeEffect != 0 {
  1322.     var MoveChance = irandom_range(0,100);
  1323.     if MoveChance < 100-Var.MoveAccuracy[global.aMoveChosen]*100 { //if misses...
  1324.         global.aMoveTypeEffect = -1;
  1325.         global.aDamageInflicted *= 0;
  1326.         }
  1327.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement