Guest User

SummoningScroll.java

a guest
Aug 14th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.09 KB | None | 0 0
  1. package com.ew.game.player.content;
  2.  
  3. import java.util.HashMap;
  4. import java.util.Map;
  5.  
  6. import com.ew.game.item.Item;
  7.  
  8. /**
  9.  * Represents all of the summoning scrolls.
  10.  *
  11.  * @author Byte Me
  12.  */
  13.  
  14. public enum SummoningScroll {
  15.  
  16.     /**
  17.      * Represents the all the scrolls.
  18.      */
  19.     HOWL_SCROLL(12425, 1, 0.1, new Item(12047)), DREADFOWL_STRIKE_SCROLL(12445,
  20.             4, 0.1, new Item(12043)), FETCH_CASKET_SCROLL(19621, 4, 0.0,
  21.             new Item(-1)), EGG_SPAWN_SCROLL(12428, 4, 10.2, new Item(12059)), SLIME_SPRAY_SCROLL(
  22.             12459, 13, 0.2, new Item(12019)), STONY_SHELL_SCROLL(12533, 16,
  23.             0.2, new Item(12009)), PESTER_SCROLL(12838, 17, 0.5,
  24.             new Item(12778)), ELECTRIC_LASH_SCROLL(12460, 18, 0.4, new Item(
  25.             12049)), VENOM_SHOT_SCROLL(12432, 19, 0.9, new Item(12055)), FIREBALL_ASSAULT_SCROLL(
  26.             12839, 22, 1.1, new Item(12808)), CHEESE_FEAST_SCROLL(12430, 23,
  27.             2.3, new Item(12067)), SANDSTORM_SCROLL(12446, 25, 2.5, new Item(
  28.             12064)), GENERATE_COMPOST_SCROLL(12440, 28, 0.6, new Item(12091)), EXPLODE_SCROLL(
  29.             12834, 29, 2.9, new Item(12800)), VAMPIRE_TOUCH_SCROLL(12447, 31,
  30.             1.5, new Item(12053)), INSANE_FEROCITY_SCROLL(12433, 32, 1.6,
  31.             new Item(12065)), MULTICHOP_SCROLL(12429, 33, 0.7, new Item(12021)), CALL_TO_ARMS_SCROLL(
  32.             12443, 34, 0.7, new Item(12818)), // Need To Add 12781, 12798, 12814
  33.     BRONZE_BULL_RUSH_SCROLL(12461, 36, 3.6, new Item(12073)), UNBURDEN_SCROLL(
  34.             12431, 40, 0.6, new Item(12087)), HERBCALL_SCROLL(12422, 41, 0.8,
  35.             new Item(12071)), EVIL_FLAMES_SCROLL(12448, 42, 2.1,
  36.             new Item(12051)), PETRIFYING_GAZE_SCROLL(12458, 43, 0.9, new Item(
  37.             12095)), // TODO need to add 12097, 12099, 12101, 12103, 12105,
  38.                         // 12107
  39.     IRON_BULL_RUSH_SCROLL(12462, 46, 4.6, new Item(12075)), IMMENSE_HEAT_SCROLL(
  40.             12829, 46, 2.3, new Item(12816)), THIEVING_FINGERS_SCROLL(12426,
  41.             47, 0.9, new Item(12041)), BLOOD_DRAIN_SCROLL(12444, 49, 2.4,
  42.             new Item(12061)), TIRELESS_RUN_SCROLL(12441, 52, 0.8, new Item(
  43.             12007)), ABYSSAL_DRAIN_SCROLL(12454, 54, 1.1, new Item(12035)), DISSOLVE_SCROLL(
  44.             12453, 55, 5.5, new Item(12027)), FISH_RAIN_SCROLL(12424, 56, 1.1,
  45.             new Item(12531)), STEEL_BULL_RUSH_SCROLL(12463, 56, 5.6, new Item(
  46.             12077)), AMBUSH_SCROLL(12836, 57, 5.7, new Item(12812)), RENDING_SCROLL(
  47.             12840, 57, 5.7, new Item(12784)), GOAD_SCROLL(12835, 57, 5.7,
  48.             new Item(12710)), DOOMSPHERE_SCROLL(12455, 58, 5.8, new Item(12023)), DUST_CLOUD_SCROLL(
  49.             12468, 61, 3.1, new Item(12085)), ABYSSAL_STEALTH_SCROLL(12427, 62,
  50.             1.9, new Item(12037)), OPHIDIAN_INCUBATION_SCROLL(12436, 63, 3.2,
  51.             new Item(12015)), POISONOUS_BLAST_SCROLL(12467, 64, 3.2, new Item(
  52.             12045)), MITHRIL_BULL_RUSH_SCROLL(12464, 66, 6.6, new Item(12079)), TOAD_BARK_SCROLL(
  53.             12452, 66, 1.0, new Item(12123)), TESTUDO_SCROLL(12439, 67, 0.7,
  54.             new Item(12031)), SWALLOW_WHOLE_SCROLL(12438, 68, 1.4, new Item(
  55.             12029)), FRUITFALL_SCROLL(12423, 69, 1.4, new Item(12033)), FAMINE_SCROLL(
  56.             12830, 70, 1.4, new Item(12820)), ARCTIC_BLAST_SCROLL(12451, 71,
  57.             1.1, new Item(12057)), RISE_FROM_THE_ASHES_SCROLL(14622, 72, 8.0,
  58.             new Item(14623)), VOLCANIC_STRENGTH_SCROLL(12826, 73, 7.3,
  59.             new Item(12792)), CRUSHING_CLAW_SCROLL(12449, 74, 3.7, new Item(
  60.             12069)), MANTIS_STRIKE_SCROLL(12459, 75, 3.7, new Item(12011)), INFERNO_SCROLL(
  61.             12841, 76, 1.5, new Item(12782)), ADAMANT_BULL_RUSH_SCROLL(12465,
  62.             76, 7.6, new Item(12081)), DEADLY_CLAW_SCROLL(12831, 77, 11.4,
  63.             new Item(12794)), ACORN_MISSILE_SCROLL(12457, 78, 1.6, new Item(
  64.             12013)), TITANS_CONSTITUTION_SCROLL(12824, 79, 7.9, new Item(12802)), // TODO
  65.                                                                                     // add
  66.                                                                                     // 12806,
  67.                                                                                     // and
  68.                                                                                     // 12804
  69.     REGROWTH_SCROLL(12442, 80, 1.6, new Item(12025)), SPIKE_SHOT_SCROLL(12456,
  70.             83, 4.1, new Item(12017)), EBON_THUNDER_SCROLL(12837, 83, 8.3,
  71.             new Item(12788)), SWAMP_PLAGUE_SCROLL(12832, 85, 4.1, new Item(
  72.             12776)), RUNE_BULL_RUSH_SCROLL(12466, 86, 8.6, new Item(12083)), HEALING_AURA_SCROLL(
  73.             12434, 88, 1.8, new Item(12039)), BOIL_SCROLL(12833, 89, 8.9,
  74.             new Item(12786)), MAGIC_FOCUS_SCROLL(12437, 92, 4.6,
  75.             new Item(12089)), ESSENCE_SHIPMENT_SCROLL(12827, 93, 1.9, new Item(
  76.             12796)), IRON_WITHIN_SCROLL(12828, 95, 4.7, new Item(12822)), WINTER_STORAGE_SCROLL(
  77.             12435, 96, 4.8, new Item(12093)), STEEL_OF_LEGENDS_SCROLL(12825,
  78.             99, 4.9, new Item(12790));
  79.  
  80.     /**
  81.      * Gets a summoning pouch object from the mapping.
  82.      *
  83.      * @param pouchId
  84.      *            The pouch item id.
  85.      * @return The {@code SummoningPouch} {@code Object}, <br>
  86.      *         or {@code null} if the pouch didn't exist.
  87.      */
  88.     public static SummoningScroll get(int itemId) {
  89.         return SCROLLS.get(itemId);
  90.     }
  91.  
  92.     /**
  93.      * The mapping.
  94.      */
  95.     private static final Map<Integer, SummoningScroll> SCROLLS = new HashMap<Integer, SummoningScroll>();
  96.  
  97.     /**
  98.      * Populate the mapping.
  99.      */
  100.     static {
  101.         for (SummoningScroll scroll : SummoningScroll.values()) {
  102.             SCROLLS.put(scroll.itemId, scroll);
  103.         }
  104.     }
  105.  
  106.     /**
  107.      * The item id.
  108.      */
  109.     private final int itemId;
  110.  
  111.     /**
  112.      * The level required.
  113.      */
  114.     private final int levelRequired;
  115.  
  116.     /**
  117.      * The experience gained.
  118.      */
  119.     private final double experience;
  120.  
  121.     /**
  122.      * The pouch to transform.
  123.      */
  124.     private final Item pouch;
  125.  
  126.     /**
  127.      * Constructs a new {@code SummoningScroll} {@code Object}.
  128.      *
  129.      * @param itemId
  130.      *            The item id.
  131.      * @param levelRequired
  132.      *            The level required.
  133.      * @param experience
  134.      *            The experience gained.
  135.      * @param pouch
  136.      *            The pouch item to transform.
  137.      */
  138.     private SummoningScroll(int itemId, int levelRequired, double experience,
  139.             Item pouch) {
  140.         this.itemId = itemId;
  141.         this.levelRequired = levelRequired;
  142.         this.experience = experience;
  143.         this.pouch = pouch;
  144.     }
  145.  
  146.     /**
  147.      * @return the itemId
  148.      */
  149.     public int getItemId() {
  150.         return itemId;
  151.     }
  152.  
  153.     /**
  154.      * @return the levelRequired
  155.      */
  156.     public int getLevelRequired() {
  157.         return levelRequired;
  158.     }
  159.  
  160.     /**
  161.      * @return the experience
  162.      */
  163.     public double getExperience() {
  164.         return experience;
  165.     }
  166.  
  167.     /**
  168.      * @return the pouch
  169.      */
  170.     public Item getPouch() {
  171.         return pouch;
  172.     }
  173.  
  174. }
Advertisement
Add Comment
Please, Sign In to add comment