Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Add New Hero.py
- # Add a new hero to the db
- # Richy
- # 2018-10-13
- from pymongo import MongoClient
- client = MongoClient("mongodb+srv://readwriteuser:r5miO2lKg5VtHUg7@cluster0-rghri.mongodb.net")
- db = client.neoninobot
- def main():
- hero = {
- 'wikiName': 'Eir: Merciful Death',
- 'displayName': 'Eir',
- 'aliases': [
- 'Eir',
- 'Obtain Her by Completing Chapter 1 Part 5 of Book III'
- ],
- 'portraitUrl': '',
- 'weaponType': 'Colorless Dagger',
- 'movementType': 'Flying',
- 'legendaryBonus': {
- 'element': 'Light',
- 'statBoost': [
- 3,
- 0,
- 0,
- 0,
- 5
- ]
- },
- 'weapons': [
- ['Iron Dagger', 1],
- ['Steel Dagger', 2],
- ['Silver Dagger', 3],
- ['Lyfjaberg', 5]
- ],
- 'assists': [
- ],
- 'specials': [
- ['Chilling Wind', 3],
- ['Iceberg', 4]
- ],
- 'a': [
- ['Darting Blow 1', 1],
- ['Swift Sparrow 1', 2],
- ['Swift Sparrow 2', 4]
- ],
- 'b': [
- ['Mystic Boost 1', 3],
- ['Mystic Boost 2', 4],
- ['Mystic Boost 3', 5]
- ],
- 'c': [
- ['Sparkling Boost', 5]
- ],
- 'id': 317,
- 'lowestRarity': 5,
- 'baseStats': {
- 'hp': 15,
- 'atk': 7,
- 'spd': 8,
- 'def': 3,
- 'res': 6
- },
- 'growths': {
- 'hp': 45,
- 'atk': 55,
- 'spd': 65,
- 'def': 25,
- 'res': 55
- },
- 'skills': [
- [ # 1 Star
- 'Iron Dagger',
- '',
- '',
- '',
- '',
- '',
- 'Darting Blow 1',
- '',
- ''
- ],
- [ # 2 Star
- 'Iron Dagger',
- '',
- '',
- 'Steel Dagger',
- '',
- '',
- 'Swift Sparrow 1',
- '',
- ''
- ],
- [ # 3 Star
- 'Steel Dagger',
- '',
- '',
- 'Silver Dagger',
- '',
- 'Chilling Wind',
- '',
- 'Mystic Boost 1',
- ''
- ],
- [ # 4 Star
- 'Silver Dagger',
- '',
- 'Chilling Wind',
- '',
- '',
- 'Iceberg',
- 'Swift Sparrow 2',
- 'Mystic Boost 2',
- ''],
- [ # 5 Star
- 'Lyfjaberg',
- '',
- 'Chilling Wind',
- '',
- '',
- '',
- '',
- 'Mystic Boost 3',
- 'Sparkling Boost'
- ]
- ]
- }
- print("{0}".format(hero))
- result = db.heroes.insert_one(hero)
- print(result)
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement