Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. # Add New Hero.py
  2. # Add a new hero to the db
  3. # Richy
  4. # 2018-10-13
  5.  
  6. from pymongo import MongoClient
  7.  
  8. client = MongoClient("mongodb+srv://readwriteuser:r5miO2lKg5VtHUg7@cluster0-rghri.mongodb.net")
  9. db = client.neoninobot
  10.  
  11.  
  12. def main():
  13. hero = {
  14. 'wikiName': 'Eir: Merciful Death',
  15. 'displayName': 'Eir',
  16. 'aliases': [
  17. 'Eir',
  18. 'Obtain Her by Completing Chapter 1 Part 5 of Book III'
  19. ],
  20. 'portraitUrl': '',
  21. 'weaponType': 'Colorless Dagger',
  22. 'movementType': 'Flying',
  23. 'legendaryBonus': {
  24. 'element': 'Light',
  25. 'statBoost': [
  26. 3,
  27. 0,
  28. 0,
  29. 0,
  30. 5
  31. ]
  32. },
  33. 'weapons': [
  34. ['Iron Dagger', 1],
  35. ['Steel Dagger', 2],
  36. ['Silver Dagger', 3],
  37. ['Lyfjaberg', 5]
  38. ],
  39. 'assists': [
  40.  
  41. ],
  42. 'specials': [
  43. ['Chilling Wind', 3],
  44. ['Iceberg', 4]
  45. ],
  46. 'a': [
  47. ['Darting Blow 1', 1],
  48. ['Swift Sparrow 1', 2],
  49. ['Swift Sparrow 2', 4]
  50. ],
  51. 'b': [
  52. ['Mystic Boost 1', 3],
  53. ['Mystic Boost 2', 4],
  54. ['Mystic Boost 3', 5]
  55. ],
  56. 'c': [
  57. ['Sparkling Boost', 5]
  58. ],
  59. 'id': 317,
  60. 'lowestRarity': 5,
  61. 'baseStats': {
  62. 'hp': 15,
  63. 'atk': 7,
  64. 'spd': 8,
  65. 'def': 3,
  66. 'res': 6
  67. },
  68. 'growths': {
  69. 'hp': 45,
  70. 'atk': 55,
  71. 'spd': 65,
  72. 'def': 25,
  73. 'res': 55
  74. },
  75. 'skills': [
  76. [ # 1 Star
  77. 'Iron Dagger',
  78. '',
  79. '',
  80. '',
  81. '',
  82. '',
  83. 'Darting Blow 1',
  84. '',
  85. ''
  86. ],
  87. [ # 2 Star
  88. 'Iron Dagger',
  89. '',
  90. '',
  91. 'Steel Dagger',
  92. '',
  93. '',
  94. 'Swift Sparrow 1',
  95. '',
  96. ''
  97. ],
  98. [ # 3 Star
  99. 'Steel Dagger',
  100. '',
  101. '',
  102. 'Silver Dagger',
  103. '',
  104. 'Chilling Wind',
  105. '',
  106. 'Mystic Boost 1',
  107. ''
  108. ],
  109. [ # 4 Star
  110. 'Silver Dagger',
  111. '',
  112. 'Chilling Wind',
  113. '',
  114. '',
  115. 'Iceberg',
  116. 'Swift Sparrow 2',
  117. 'Mystic Boost 2',
  118. ''],
  119. [ # 5 Star
  120. 'Lyfjaberg',
  121. '',
  122. 'Chilling Wind',
  123. '',
  124. '',
  125. '',
  126. '',
  127. 'Mystic Boost 3',
  128. 'Sparkling Boost'
  129. ]
  130. ]
  131. }
  132.  
  133. print("{0}".format(hero))
  134. result = db.heroes.insert_one(hero)
  135. print(result)
  136. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement