Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show pokemon moves when catching #2117

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions data/charged_moves.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[{"id":32,"name":"Stone Edge","type":"Rock","damage":80,"duration":3100,"energy":100,"dps":25.8},
{"id":28,"name":"Cross Chop","type":"Fighting","damage":60,"duration":2000,"energy":100,"dps":30.0},
{"id":83,"name":"Dragon Claw","type":"Dragon","damage":35,"duration":1500,"energy":50,"dps":23.33},
{"id":40,"name":"Blizzard","type":"Ice","damage":100,"duration":3900,"energy":100,"dps":25.64},
{"id":131,"name":"Body Slam","type":"Normal","damage":40,"duration":1560,"energy":50,"dps":25.64},
{"id":22,"name":"Megahorn","type":"Bug","damage":80,"duration":3200,"energy":100,"dps":25.0},
{"id":122,"name":"Hurricane","type":"Flying","damage":80,"duration":3200,"energy":100,"dps":25.0},
{"id":116,"name":"Solar Beam","type":"Grass","damage":120,"duration":4900,"energy":100,"dps":24.48},
{"id":103,"name":"Fire Blast","type":"Fire","damage":100,"duration":4100,"energy":100,"dps":24.39},
{"id":14,"name":"Hyper Beam","type":"Normal","damage":120,"duration":5000,"energy":100,"dps":24.0},
{"id":31,"name":"Earthquake","type":"Ground","damage":100,"duration":4200,"energy":100,"dps":23.8},
{"id":118,"name":"Power Whip","type":"Grass","damage":70,"duration":2800,"energy":100,"dps":25.0},
{"id":107,"name":"Hydro Pump","type":"Water","damage":90,"duration":3800,"energy":100,"dps":23.68},
{"id":117,"name":"Leaf Blade","type":"Grass","damage":55,"duration":2800,"energy":50,"dps":19.64},
{"id":78,"name":"Thunder","type":"Electric","damage":100,"duration":4300,"energy":100,"dps":23.25},
{"id":123,"name":"Brick Break","type":"Fighting","damage":30,"duration":1600,"energy":33,"dps":18.75},
{"id":92,"name":"Gunk Shot","type":"Poison","damage":65,"duration":3000,"energy":100,"dps":21.66},
{"id":90,"name":"Sludge Bomb","type":"Poison","damage":55,"duration":2600,"energy":50,"dps":21.15},
{"id":42,"name":"Heat Wave","type":"Fire","damage":80,"duration":3800,"energy":100,"dps":21.05},
{"id":87,"name":"Moonblast","type":"Fairy","damage":85,"duration":4100,"energy":100,"dps":20.73},
{"id":91,"name":"Sludge Wave","type":"Poison","damage":70,"duration":3400,"energy":100,"dps":20.58},
{"id":79,"name":"Thunderbolt","type":"Electric","damage":55,"duration":2700,"energy":50,"dps":20.37},
{"id":47,"name":"Petal Blizzard","type":"Grass","damage":65,"duration":3200,"energy":50,"dps":20.31},
{"id":89,"name":"Cross Poison","type":"Poison","damage":25,"duration":1500,"energy":25,"dps":16.66},
{"id":108,"name":"Psychic","type":"Psychic","damage":55,"duration":2800,"energy":50,"dps":19.64},
{"id":58,"name":"Aqua Tail","type":"Water","damage":45,"duration":2350,"energy":50,"dps":19.14},
{"id":24,"name":"Flamethrower","type":"Fire","damage":55,"duration":2900,"energy":50,"dps":18.96},
{"id":88,"name":"Play Rough","type":"Fairy","damage":55,"duration":2900,"energy":50,"dps":18.96},
{"id":82,"name":"Dragon Pulse","type":"Dragon","damage":65,"duration":3600,"energy":50,"dps":18.05},
{"id":39,"name":"Ice Beam","type":"Ice","damage":65,"duration":3650,"energy":50,"dps":17.8},
{"id":49,"name":"Bug Buzz","type":"Bug","damage":75,"duration":4250,"energy":50,"dps":17.64},
{"id":46,"name":"Drill Run","type":"Ground","damage":50,"duration":3400,"energy":33,"dps":14.7},
{"id":59,"name":"Seed Bomb","type":"Grass","damage":40,"duration":2400,"energy":33,"dps":16.66},
{"id":77,"name":"Thunder Punch","type":"Electric","damage":40,"duration":2400,"energy":33,"dps":16.66},
{"id":100,"name":"X Scissor","type":"Bug","damage":35,"duration":2100,"energy":33,"dps":16.66},
{"id":129,"name":"Hyper Fang","type":"Normal","damage":35,"duration":2100,"energy":33,"dps":16.66},
{"id":64,"name":"Rock Slide","type":"Rock","damage":50,"duration":3200,"energy":33,"dps":15.62},
{"id":94,"name":"Bone Club","type":"Ground","damage":25,"duration":1600,"energy":25,"dps":15.62},
{"id":36,"name":"Flash Cannon","type":"Steel","damage":60,"duration":3900,"energy":33,"dps":15.38},
{"id":74,"name":"Iron Head","type":"Steel","damage":30,"duration":2000,"energy":33,"dps":15.0},
{"id":38,"name":"Drill Peck","type":"Flying","damage":40,"duration":2700,"energy":33,"dps":14.81},
{"id":60,"name":"Psyshock","type":"Psychic","damage":40,"duration":2700,"energy":33,"dps":14.81},
{"id":70,"name":"Shadow Ball","type":"Ghost","damage":45,"duration":3080,"energy":33,"dps":14.61},
{"id":99,"name":"Signal Beam","type":"Bug","damage":45,"duration":3100,"energy":33,"dps":14.51},
{"id":115,"name":"Fire Punch","type":"Fire","damage":40,"duration":2800,"energy":33,"dps":14.28},
{"id":54,"name":"Submission","type":"Fighting","damage":30,"duration":2100,"energy":33,"dps":14.28},
{"id":102,"name":"Flame Burst","type":"Fire","damage":30,"duration":2100,"energy":25,"dps":14.28},
{"id":127,"name":"Stomp","type":"Normal","damage":30,"duration":2100,"energy":25,"dps":14.28},
{"id":35,"name":"Discharge","type":"Electric","damage":35,"duration":2500,"energy":33,"dps":14.0},
{"id":65,"name":"Power Gem","type":"Rock","damage":40,"duration":2900,"energy":33,"dps":13.79},
{"id":106,"name":"Scald","type":"Water","damage":55,"duration":4000,"energy":33,"dps":13.75},
{"id":109,"name":"Psystrike","type":"Psychic","damage":70,"duration":5100,"energy":100,"dps":13.72},
{"id":56,"name":"Low Sweep","type":"Fighting","damage":30,"duration":2250,"energy":25,"dps":13.33},
{"id":51,"name":"Night Slash","type":"Dark","damage":30,"duration":2700,"energy":25,"dps":11.11},
{"id":86,"name":"Dazzling Gleam","type":"Fairy","damage":55,"duration":4200,"energy":33,"dps":13.09},
{"id":16,"name":"Dark Pulse","type":"Dark","damage":45,"duration":3500,"energy":33,"dps":12.85},
{"id":33,"name":"Ice Punch","type":"Ice","damage":45,"duration":3500,"energy":33,"dps":12.85},
{"id":26,"name":"Dig","type":"Ground","damage":70,"duration":5800,"energy":33,"dps":12.06},
{"id":20,"name":"Vice Grip","type":"Normal","damage":25,"duration":2100,"energy":20,"dps":11.9},
{"id":18,"name":"Sludge","type":"Poison","damage":30,"duration":2600,"energy":25,"dps":11.53},
{"id":96,"name":"Mud Bomb","type":"Ground","damage":30,"duration":2600,"energy":25,"dps":11.53},
{"id":126,"name":"Horn Attack","type":"Normal","damage":25,"duration":2200,"energy":25,"dps":11.36},
{"id":121,"name":"Air Cutter","type":"Flying","damage":30,"duration":3300,"energy":25,"dps":9.09},
{"id":132,"name":"Rest","type":"Normal","damage":35,"duration":3100,"energy":33,"dps":11.29},
{"id":72,"name":"Magnet Bomb","type":"Steel","damage":30,"duration":2800,"energy":25,"dps":10.71},
{"id":57,"name":"Aqua Jet","type":"Water","damage":25,"duration":2350,"energy":20,"dps":10.63},
{"id":105,"name":"Water Pulse","type":"Water","damage":35,"duration":3300,"energy":25,"dps":10.6},
{"id":30,"name":"Psybeam","type":"Psychic","damage":40,"duration":3800,"energy":25,"dps":10.52},
{"id":63,"name":"Rock Tomb","type":"Rock","damage":30,"duration":3400,"energy":25,"dps":8.82},
{"id":50,"name":"Poison Fang","type":"Poison","damage":25,"duration":2400,"energy":20,"dps":10.41},
{"id":104,"name":"Brine","type":"Water","damage":25,"duration":2400,"energy":25,"dps":10.41},
{"id":45,"name":"Aerial Ace","type":"Flying","damage":30,"duration":2900,"energy":25,"dps":10.34},
{"id":53,"name":"Bubble Beam","type":"Water","damage":30,"duration":2900,"energy":25,"dps":10.34},
{"id":95,"name":"Bulldoze","type":"Ground","damage":35,"duration":3400,"energy":25,"dps":10.29},
{"id":125,"name":"Swift","type":"Normal","damage":30,"duration":3000,"energy":25,"dps":10.0},
{"id":62,"name":"Ancient Power","type":"Rock","damage":35,"duration":3600,"energy":25,"dps":9.72},
{"id":114,"name":"Giga Drain","type":"Grass","damage":35,"duration":3600,"energy":33,"dps":9.72},
{"id":69,"name":"Ominous Wind","type":"Ghost","damage":30,"duration":3100,"energy":25,"dps":9.67},
{"id":67,"name":"Shadow Punch","type":"Ghost","damage":20,"duration":2100,"energy":25,"dps":9.52},
{"id":80,"name":"Twister","type":"Dragon","damage":25,"duration":2700,"energy":20,"dps":9.25},
{"id":85,"name":"Draining Kiss","type":"Fairy","damage":25,"duration":2800,"energy":20,"dps":8.92},
{"id":21,"name":"Flame Wheel","type":"Fire","damage":40,"duration":4600,"energy":25,"dps":8.69},
{"id":133,"name":"Struggle","type":"Normal","damage":15,"duration":1695,"energy":20,"dps":8.84},
{"id":101,"name":"Flame Charge","type":"Fire","damage":25,"duration":3100,"energy":20,"dps":8.06},
{"id":34,"name":"Heart Stamp","type":"Psychic","damage":20,"duration":2550,"energy":25,"dps":7.84},
{"id":75,"name":"Parabolic Charge","type":"Electric","damage":15,"duration":2100,"energy":20,"dps":7.14},
{"id":13,"name":"Wrap","type":"Normal","damage":25,"duration":3700,"energy":20,"dps":6.75},
{"id":111,"name":"Icy Wind","type":"Ice","damage":25,"duration":3800,"energy":20,"dps":6.57},
{"id":84,"name":"Disarming Voice","type":"Fairy","damage":25,"duration":3900,"energy":20,"dps":6.41},
{"id":13,"name":"Wrap","type":"Normal","damage":25,"duration":4000,"energy":20,"dps":6.25},
{"id":66,"name":"Shadow Sneak","type":"Ghost","damage":15,"duration":3100,"energy":20,"dps":4.83},
{"id":48,"name":"Mega Drain","type":"Grass","damage":15,"duration":3200,"energy":20,"dps":4.68}]
41 changes: 41 additions & 0 deletions data/fast_moves.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[{"id":222,"name":"Pound","type":"Normal","damage":7,"duration":540,"energy":7,"dps":12.96},
{"id":228,"name":"Metal Claw","type":"Steel","damage":8,"duration":630,"energy":7,"dps":12.69},
{"id":226,"name":"Psycho Cut","type":"Psychic","damage":7,"duration":570,"energy":7,"dps":12.28},
{"id":210,"name":"Wing Attack","type":"Flying","damage":9,"duration":750,"energy":7,"dps":12.0},
{"id":202,"name":"Bite","type":"Dark","damage":6,"duration":500,"energy":7,"dps":12.0},
{"id":204,"name":"Dragon Breath","type":"Dragon","damage":6,"duration":500,"energy":7,"dps":12.0},
{"id":220,"name":"Scratch","type":"Normal","damage":6,"duration":500,"energy":7,"dps":12.0},
{"id":230,"name":"Water Gun","type":"Water","damage":6,"duration":500,"energy":7,"dps":12.0},
{"id":240,"name":"Fire Fang","type":"Fire","damage":10,"duration":840,"energy":4,"dps":11.9},
{"id":213,"name":"Shadow Claw","type":"Ghost","damage":11,"duration":950,"energy":7,"dps":11.57},
{"id":238,"name":"Feint Attack","type":"Dark","damage":12,"duration":1040,"energy":7,"dps":11.53},
{"id":224,"name":"Poison Jab","type":"Poison","damage":12,"duration":1050,"energy":7,"dps":11.42},
{"id":234,"name":"Zen Headbutt","type":"Psychic","damage":12,"duration":1050,"energy":4,"dps":11.42},
{"id":239,"name":"Steel Wing","type":"Steel","damage":15,"duration":1330,"energy":4,"dps":11.27},
{"id":201,"name":"Bug Bite","type":"Bug","damage":5,"duration":450,"energy":7,"dps":11.11},
{"id":218,"name":"Frost Breath","type":"Ice","damage":9,"duration":810,"energy":7,"dps":11.11},
{"id":233,"name":"Mud Slap","type":"Ground","damage":15,"duration":1350,"energy":9,"dps":11.11},
{"id":216,"name":"Mud Shot","type":"Ground","damage":6,"duration":550,"energy":7,"dps":10.9},
{"id":221,"name":"Tackle","type":"Normal","damage":12,"duration":1100,"energy":7,"dps":10.9},
{"id":237,"name":"Bubble","type":"Water","damage":25,"duration":2300,"energy":15,"dps":10.86},
{"id":214,"name":"Vine Whip","type":"Grass","damage":7,"duration":650,"energy":7,"dps":10.76},
{"id":217,"name":"Ice Shard","type":"Ice","damage":15,"duration":1400,"energy":7,"dps":10.71},
{"id":241,"name":"Rock Smash","type":"Fighting","damage":15,"duration":1410,"energy":7,"dps":10.63},
{"id":223,"name":"Cut","type":"Normal","damage":12,"duration":1130,"energy":7,"dps":10.61},
{"id":236,"name":"Poison Sting","type":"Poison","damage":6,"duration":575,"energy":4,"dps":10.43},
{"id":215,"name":"Razor Leaf","type":"Grass","damage":15,"duration":1450,"energy":7,"dps":10.34},
{"id":212,"name":"Lick","type":"Ghost","damage":5,"duration":500,"energy":7,"dps":10.0},
{"id":206,"name":"Spark","type":"Electric","damage":7,"duration":700,"energy":4,"dps":10.0},
{"id":203,"name":"Sucker Punch","type":"Dark","damage":7,"duration":700,"energy":4,"dps":10.0},
{"id":235,"name":"Confusion","type":"Psychic","damage":15,"duration":1510,"energy":7,"dps":9.93},
{"id":225,"name":"Acid","type":"Poison","damage":10,"duration":1050,"energy":7,"dps":9.52},
{"id":209,"name":"Ember","type":"Fire","damage":10,"duration":1050,"energy":7,"dps":9.52},
{"id":227,"name":"Rock Throw","type":"Rock","damage":12,"duration":1360,"energy":7,"dps":8.82},
{"id":211,"name":"Peck","type":"Flying","damage":10,"duration":1150,"energy":10,"dps":8.69},
{"id":207,"name":"Low Kick","type":"Fighting","damage":5,"duration":600,"energy":7,"dps":8.33},
{"id":205,"name":"Thunder Shock","type":"Electric","damage":5,"duration":600,"energy":7,"dps":8.33},
{"id":229,"name":"Bullet Punch","type":"Steel","damage":10,"duration":1200,"energy":7,"dps":8.33},
{"id":219,"name":"Quick Attack","type":"Normal","damage":10,"duration":1330,"energy":7,"dps":7.51},
{"id":200,"name":"Fury Cutter","type":"Bug","damage":3,"duration":400,"energy":12,"dps":7.5},
{"id":208,"name":"Karate Chop","type":"Fighting","damage":6,"duration":800,"energy":7,"dps":7.5},
{"id":231,"name":"Splash","type":"Water","damage":0,"duration":1230,"energy":7,"dps":0.0}]
12 changes: 12 additions & 0 deletions pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ def __init__(self, config):
# Make our own copy of the workers for this instance
self.workers = []

fast_moves_list = json.load(open('data/fast_moves.json'))
self.fast_moves_dict = {}
for move in fast_moves_list:
id = move['id']
self.fast_moves_dict[id] = move

charged_moves_list = json.load(open('data/charged_moves.json'))
self.charged_moves_dict = {}
for move in charged_moves_list:
id = move['id']
self.charged_moves_dict[id] = move

def start(self):
self._setup_logging()
self._setup_api()
Expand Down
12 changes: 10 additions & 2 deletions pokemongo_bot/cell_workers/pokemon_catch_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def __init__(self, pokemon, bot):
self.spawn_point_guid = ''
self.response_key = ''
self.response_status_key = ''
self.fast_moves_dict = bot.fast_moves_dict
self.charged_moves_dict = bot.charged_moves_dict

def work(self):
encounter_id = self.pokemon['encounter_id']
Expand All @@ -46,6 +48,8 @@ def work(self):
if 'pokemon_data' in pokemon and 'cp' in pokemon['pokemon_data']:
pokemon_data = pokemon['pokemon_data']
cp = pokemon_data['cp']
move_1 = pokemon_data['move_1']
move_2 = pokemon_data['move_2']

individual_attack = pokemon_data.get("individual_attack", 0)
individual_stamina = pokemon_data.get("individual_stamina", 0)
Expand All @@ -60,8 +64,12 @@ def work(self):
pokemon_potential = self.pokemon_potential(pokemon_data)
pokemon_num = int(pokemon_data['pokemon_id']) - 1
pokemon_name = self.pokemon_list[int(pokemon_num)]['Name']
logger.log('A Wild {} appeared! [CP {}] [Potential {}]'.format(
pokemon_name, cp, pokemon_potential), 'yellow')
logger.log('A Wild {} appeared! [CP {}] [Potential {}] [{}({} DPS)] [{}({} DPS)]'.format(
pokemon_name, cp, pokemon_potential,
self.fast_moves_dict[move_1]['name'],
self.fast_moves_dict[move_1]['dps'],
self.charged_moves_dict[move_2]['name'],
self.charged_moves_dict[move_2]['dps']), 'yellow')

logger.log('IV [Stamina/Attack/Defense] = [{}]'.format(iv_display))
pokemon_data['name'] = pokemon_name
Expand Down