wujichen158

StatusType

May 15th, 2023
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1. //
  2. // Source code recreated from a .class file by IntelliJ IDEA
  3. // (powered by FernFlower decompiler)
  4. //
  5.  
  6. package com.pixelmonmod.pixelmon.battles.status;
  7.  
  8. import com.pixelmonmod.pixelmon.api.util.ITranslatable;
  9. import java.util.HashMap;
  10. import java.util.Locale;
  11. import java.util.Map;
  12.  
  13. public enum StatusType implements ITranslatable {
  14. Burn,
  15. Confusion,
  16. Cursed,
  17. Infatuated,
  18. Flee,
  19. Flinch,
  20. Flying,
  21. Freeze,
  22. Leech,
  23. LightScreen,
  24. Mist,
  25. Paralysis,
  26. Poison,
  27. PoisonBadly,
  28. Protect,
  29. SafeGuard,
  30. Sleep,
  31. SmackedDown,
  32. Substitute,
  33. Sunny,
  34. Wait,
  35. TrickRoom,
  36. Perish,
  37. Yawn,
  38. Disable,
  39. Immobilize,
  40. Recharge,
  41. AquaRing,
  42. UnderGround,
  43. Transformed,
  44. MeanLook,
  45. NoRetreat,
  46. FutureSight,
  47. MagnetRise,
  48. Spikes,
  49. ToxicSpikes,
  50. StealthRock,
  51. Steelsurge,
  52. PartialTrap,
  53. GMaxRepeatDamage,
  54. Reflect,
  55. Submerged,
  56. Raging,
  57. Telekinesis,
  58. Tailwind,
  59. DestinyBond,
  60. Taunt,
  61. TempMoveset,
  62. HealingWish,
  63. Roosting,
  64. Wish,
  65. Encore,
  66. Focus,
  67. MagicCoat,
  68. Ingrain,
  69. Stockpile,
  70. Snatch,
  71. Minimize,
  72. Gravity,
  73. Hail,
  74. Rainy,
  75. Sandstorm,
  76. Torment,
  77. Foresight,
  78. GastroAcid,
  79. GuardSplit,
  80. PowerSplit,
  81. WonderRoom,
  82. LockOn,
  83. GlaiveRush,
  84. Endure,
  85. WideGuard,
  86. Charge,
  87. Nightmare,
  88. MeFirst,
  89. PowerTrick,
  90. Autotomize,
  91. DefenseCurl,
  92. SkyDropping,
  93. SkyDropped,
  94. FollowMe,
  95. Imprison,
  96. HealBlock,
  97. MudSport,
  98. WaterSport,
  99. FirePledge,
  100. GrassPledge,
  101. WaterPledge,
  102. HelpingHand,
  103. QuickGuard,
  104. Embargo,
  105. Grudge,
  106. LuckyChant,
  107. MagicRoom,
  108. LunarDance,
  109. Vanish,
  110. MultiTurn,
  111. Bide,
  112. Uproar,
  113. EchoedVoice,
  114. FuryCutter,
  115. DarkAura,
  116. FairyAura,
  117. CraftyShield,
  118. None,
  119. ElectricTerrain,
  120. Electrify,
  121. FairyLock,
  122. GrassyTerrain,
  123. IonDeluge,
  124. KingsShield,
  125. BanefulBunker,
  126. MatBlock,
  127. MistyTerrain,
  128. Powder,
  129. SpikyShield,
  130. StickyWeb,
  131. PsychicTerrain,
  132. MysteriousAirCurrent,
  133. AuroraVeil,
  134. BeakBlast,
  135. SpeedSwap,
  136. TarShot,
  137. ShellTrap,
  138. CorrosiveGas,
  139. ThroatChop,
  140. MaxGuard,
  141. Obstruct,
  142. LaserFocus,
  143. Frostbite,
  144. Drowsy,
  145. Splinters,
  146. Obscured,
  147. LunarBlessing,
  148. PowerShift,
  149. Fixated,
  150. SpringtideStorm;
  151.  
  152. static final Map<StatusType, StatusPersist> restoreStatusList = new HashMap(8);
  153.  
  154. private StatusType() {
  155. }
  156.  
  157. public boolean isStatus(StatusType... statuses) {
  158. StatusType[] var2 = statuses;
  159. int var3 = statuses.length;
  160.  
  161. for(int var4 = 0; var4 < var3; ++var4) {
  162. StatusType status = var2[var4];
  163. if (this == status) {
  164. return true;
  165. }
  166. }
  167.  
  168. return false;
  169. }
  170.  
  171. public static StatusType getStatusEffect(String string) {
  172. StatusType[] var1 = values();
  173. int var2 = var1.length;
  174.  
  175. for(int var3 = 0; var3 < var2; ++var3) {
  176. StatusType t = var1[var3];
  177. if (t.toString().equalsIgnoreCase(string)) {
  178. return t;
  179. }
  180. }
  181.  
  182. return null;
  183. }
  184.  
  185. public static boolean isStatusEffect(String string) {
  186. return getStatusEffect(string) != null;
  187. }
  188.  
  189. public static StatusType getEffect(int integer) {
  190. StatusType[] statuses = values();
  191. return integer >= 0 && integer < statuses.length ? statuses[integer] : null;
  192. }
  193.  
  194. public static StatusPersist getEffectInstance(int integer) {
  195. StatusType type = getEffect(integer);
  196. return type != null ? (StatusPersist)restoreStatusList.get(type) : null;
  197. }
  198.  
  199. public static boolean isPrimaryStatus(StatusType status) {
  200. return status.isStatus(Poison, Burn, PoisonBadly, Freeze, Sleep, Paralysis);
  201. }
  202.  
  203. public boolean isPrimaryStatus() {
  204. return isPrimaryStatus(this);
  205. }
  206.  
  207. public static float[] getTexturePos(StatusType type) {
  208. switch (type) {
  209. case Burn:
  210. return new float[]{8.0F, 8.0F};
  211. case Freeze:
  212. return new float[]{264.0F, 8.0F};
  213. case Paralysis:
  214. return new float[]{520.0F, 8.0F};
  215. case Poison:
  216. case PoisonBadly:
  217. return new float[]{8.0F, 264.0F};
  218. case Sleep:
  219. return new float[]{520.0F, 264.0F};
  220. case Frostbite:
  221. return new float[]{8.0F, 520.0F};
  222. case Drowsy:
  223. return new float[]{264.0F, 520.0F};
  224. default:
  225. return new float[]{-1.0F, -1.0F};
  226. }
  227. }
  228.  
  229. public String getTranslationKey() {
  230. return "status." + this.name().toLowerCase(Locale.ROOT);
  231. }
  232.  
  233. static {
  234. restoreStatusList.put(Burn, new Burn());
  235. restoreStatusList.put(Freeze, new Freeze());
  236. restoreStatusList.put(Paralysis, new Paralysis());
  237. restoreStatusList.put(Poison, new Poison());
  238. restoreStatusList.put(PoisonBadly, new PoisonBadly());
  239. restoreStatusList.put(Sleep, new Sleep());
  240. restoreStatusList.put(Frostbite, new Frostbite());
  241. restoreStatusList.put(Drowsy, new Drowsy());
  242. }
  243. }
  244.  
Add Comment
Please, Sign In to add comment