DarkShadow44

JS Test

Mar 13th, 2015
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. ItemList = {};
  2. MonsterList = {};
  3.  
  4. function MakeItemList()
  5. {
  6. Weapons = {};
  7. Weapons.ShortSword = {
  8. name: 'Short Sword',
  9. itemQuality: 'Common',
  10. subType: 'Sword',
  11. color: 'black',
  12. image: 'ShortSword',
  13. minDamage: 2,
  14. maxDamage: 4,
  15. strength: 1,
  16. agility: 2,
  17. value: 15
  18. };
  19. Weapons.HandAxe = {
  20. name: 'Hand Axe',
  21. itemQuality: 'Common',
  22. subType: 'Axe',
  23. color: 'black',
  24. image: 'HandAxe',
  25. minDamage: 1,
  26. maxDamage: 5,
  27. strength: 2,
  28. agility: 1,
  29. value: 20
  30. };
  31. ItemList.Weapons = Weapons;
  32.  
  33. Armors = {};
  34. Armors.LeatherArmor = {
  35. name: 'Leather Armor',
  36. itemQuality: 'Common',
  37. subType: 'chest',
  38. color: 'black',
  39. image: 'LeatherArmor',
  40. defense: 3,
  41. agility: 3,
  42. dexterity: 2,
  43. endurance: 1,
  44. value: 40
  45. };
  46. Armors.ReinforcedLeatherVest = {
  47. name: 'Reinforced Leather Vest',
  48. itemQuality: 'Uncommon',
  49. subType: 'chest',
  50. color: 'green',
  51. image: 'ReinforcedLeatherVest',
  52. defense: 7,
  53. agility: 6,
  54. dexterity: 4,
  55. endurance: 2,
  56. value: 90
  57. };
  58. ItemList.Armors = Armors;
  59. }
  60.  
  61. function NewDrop(item, chance)
  62. {
  63. drop = {};
  64. drop.item = item;
  65. drop.chance = chance;
  66. return drop;
  67. }
  68.  
  69. function MakeMonsterList()
  70. {
  71. Bandit = {};
  72. Bandit.Drops = [];
  73. Bandit.Drops.push(NewDrop(ItemList.Weapons.ShortSword, 50));
  74. Bandit.Drops.push(NewDrop(ItemList.Weapons.LeatherArmor, 20));
  75. Bandit.Stats = {
  76. HP: 2000,
  77. Strength = 15,
  78. Exp = 180
  79. };
  80. MonsterList.Bandit = Bandit;
  81.  
  82. Dragon = {};
  83. Dragon.Drops = [];
  84. Dragon.Drops.push(NewDrop(ItemList.Weapons.HandAxe, 40));
  85. Dragon.Drops.push(NewDrop(ItemList.Weapons.ReinforcedLeatherVest, 35));
  86. Dragon.Stats = {
  87. HP: 50000,
  88. Strength = 200,
  89. Exp = 3500
  90. };
  91. MonsterList.Dragon = Dragon;
  92. }
Advertisement
Add Comment
Please, Sign In to add comment