寒假写一个小游戏计划(v0.01)
本帖最后由 zyx2012 于 2025-1-18 16:53 编辑放寒假了,对于我这种对编程一知半解的初中生……{:5_102:} {:5_104:} {:5_104:}
打算不知天高地厚的做一个口袋妖怪对战系统。
先用了一下午的不懈努力……
打出了一个超大字典,记录了宝可梦的编号,属性,弱点(好像直接用相生相克表格就行,没啥必要,打了就打了吧),HP,攻击,防御,速度(特攻和特防没弄,因为我不知道什么意思而且有点麻烦,先这样)
static/image/hrline/line4.png
pdict = {1: {'name': 'bulbasaur', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 45, 'attack': 49, 'defense': 49, 'speed': 45}
,2: {'name': 'ivysaur', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 60, 'attack': 62, 'defense': 63, 'speed': 60}
,3: {'name': 'venusaur', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 80, 'attack': 82, 'defense': 83, 'speed': 80}
,4: {'name': 'charmander', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 39, 'attack': 52, 'defense': 43, 'speed': 65}
,5: {'name': 'charmeleon', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 58, 'attack': 64, 'defense': 58, 'speed': 80}
,6: {'name': 'charizard', 'type': ['fire', 'flying'], 'weakness': ['ground', 'rock', 'water'], 'HP': 78, 'attack': 84, 'defense': 78, 'speed': 100}
,7: {'name': 'squirtle', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 44, 'attack': 48, 'defense': 65, 'speed': 43}
,8: {'name': 'wartortle', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 59, 'attack': 63, 'defense': 80, 'speed': 58}
,9: {'name': 'blastoise', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 79, 'attack': 83, 'defense': 100, 'speed': 78}
,10: {'name': 'caterpie', 'type': ['bug'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 45, 'attack': 30, 'defense': 35, 'speed': 45}
,11: {'name': 'metapod', 'type': ['bug'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 50, 'attack': 20, 'defense': 55, 'speed': 30}
,12: {'name': 'butterfree', 'type': ['bug', 'flying'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 60, 'attack': 45, 'defense': 50, 'speed': 70}
,13: {'name': 'weedle', 'type': ['bug', 'poison'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 40, 'attack': 35, 'defense': 30, 'speed': 50}
,14: {'name': 'kakuna', 'type': ['bug', 'poison'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 45, 'attack': 25, 'defense': 50, 'speed': 35}
,15: {'name': 'beedrill', 'type': ['bug', 'poison'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 65, 'attack': 90, 'defense': 40, 'speed': 75}
,16: {'name': 'pidgey', 'type': ['normal', 'flying'], 'weakness': ['fighting'], 'HP': 40, 'attack': 45, 'defense': 40, 'speed': 56}
,17: {'name': 'pidgeotto', 'type': ['normal', 'flying'], 'weakness': ['fighting'], 'HP': 63, 'attack': 60, 'defense': 55, 'speed': 71}
,18: {'name': 'pidgeot', 'type': ['normal', 'flying'], 'weakness': ['fighting'], 'HP': 83, 'attack': 80, 'defense': 75, 'speed': 101}
,19: {'name': 'rattata', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 30, 'attack': 56, 'defense': 35, 'speed': 72}
,20: {'name': 'raticate', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 55, 'attack': 81, 'defense': 60, 'speed': 97}
,21: {'name': 'spearow', 'type': ['normal', 'flying'], 'weakness': ['fighting'], 'HP': 40, 'attack': 60, 'defense': 30, 'speed': 70}
,22: {'name': 'fearow', 'type': ['normal', 'flying'], 'weakness': ['fighting'], 'HP': 65, 'attack': 90, 'defense': 65, 'speed': 100}
,23: {'name': 'ekans', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 35, 'attack': 60, 'defense': 44, 'speed': 55}
,24: {'name': 'arbok', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 60, 'attack': 95, 'defense': 69, 'speed': 80}
,25: {'name': 'pikachu', 'type': ['electric'], 'weakness': ['ground'], 'HP': 35, 'attack': 55, 'defense': 40, 'speed': 90}
,26: {'name': 'raichu', 'type': ['electric'], 'weakness': ['ground'], 'HP': 60, 'attack': 90, 'defense': 55, 'speed': 110}
,27: {'name': 'sandshrew', 'type': ['ground'], 'weakness': ['water', 'grass', 'ice'], 'HP': 50, 'attack': 75, 'defense': 85, 'speed': 40}
,28: {'name': 'sandslash', 'type': ['ground'], 'weakness': ['water', 'grass', 'ice'], 'HP': 75, 'attack': 100, 'defense': 110, 'speed': 65}
,29: {'name': 'nidoran-f', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 55, 'attack': 47, 'defense': 52, 'speed': 41}
,30: {'name': 'nidorina', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 70, 'attack': 62, 'defense': 67, 'speed': 56}
,31: {'name': 'nidoqueen', 'type': ['poison', 'ground'], 'weakness': ['ground', 'psychic'], 'HP': 90, 'attack': 92, 'defense': 87, 'speed': 76}
,32: {'name': 'nidoran-m', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 46, 'attack': 57, 'defense': 40, 'speed': 50}
,33: {'name': 'nidorino', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 61, 'attack': 72, 'defense': 57, 'speed': 65}
,34: {'name': 'nidoking', 'type': ['poison', 'ground'], 'weakness': ['ground', 'psychic'], 'HP': 81, 'attack': 102, 'defense': 77, 'speed': 85}
,35: {'name': 'clefairy', 'type': ['fairy'], 'weakness': ['poison', 'steel'], 'HP': 70, 'attack': 45, 'defense': 48, 'speed': 35}
,36: {'name': 'clefable', 'type': ['fairy'], 'weakness': ['poison', 'steel'], 'HP': 95, 'attack': 70, 'defense': 73, 'speed': 60}
,37: {'name': 'vulpix', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 38, 'attack': 41, 'defense': 40, 'speed': 65}
,38: {'name': 'ninetales', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 73, 'attack': 76, 'defense': 75, 'speed': 100}
,39: {'name': 'jigglypuff', 'type': ['normal', 'fairy'], 'weakness': ['fighting'], 'HP': 115, 'attack': 45, 'defense': 20, 'speed': 20}
,40: {'name': 'wigglytuff', 'type': ['normal', 'fairy'], 'weakness': ['fighting'], 'HP': 140, 'attack': 70, 'defense': 45, 'speed': 45}
,41: {'name': 'zubat', 'type': ['poison', 'flying'], 'weakness': ['ground', 'psychic'], 'HP': 40, 'attack': 45, 'defense': 35, 'speed': 55}
,42: {'name': 'golbat', 'type': ['poison', 'flying'], 'weakness': ['ground', 'psychic'], 'HP': 75, 'attack': 80, 'defense': 70, 'speed': 90}
,43: {'name': 'oddish', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 45, 'attack': 50, 'defense': 55, 'speed': 30}
,44: {'name': 'gloom', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 60, 'attack': 65, 'defense': 70, 'speed': 40}
,45: {'name': 'vileplume', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 75, 'attack': 80, 'defense': 85, 'speed': 50}
,46: {'name': 'paras', 'type': ['bug', 'grass'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 35, 'attack': 70, 'defense': 55, 'speed': 25}
,47: {'name': 'parasect', 'type': ['bug', 'grass'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 60, 'attack': 95, 'defense': 80, 'speed': 30}
,48: {'name': 'venonat', 'type': ['bug', 'poison'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 60, 'attack': 55, 'defense': 50, 'speed': 45}
,49: {'name': 'venomoth', 'type': ['bug', 'poison'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 70, 'attack': 65, 'defense': 60, 'speed': 90}
,50: {'name': 'diglett', 'type': ['ground'], 'weakness': ['water', 'grass', 'ice'], 'HP': 10, 'attack': 55, 'defense': 25, 'speed': 95}
,51: {'name': 'dugtrio', 'type': ['ground'], 'weakness': ['water', 'grass', 'ice'], 'HP': 35, 'attack': 100, 'defense': 50, 'speed': 120}
,52: {'name': 'meowth', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 40, 'attack': 45, 'defense': 35, 'speed': 90}
,53: {'name': 'persian', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 65, 'attack': 70, 'defense': 60, 'speed': 115}
,54: {'name': 'psyduck', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 50, 'attack': 52, 'defense': 48, 'speed': 55}
,55: {'name': 'golduck', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 80, 'attack': 82, 'defense': 78, 'speed': 85}
,56: {'name': 'mankey', 'type': ['fighting'], 'weakness': ['flying', 'psychic', 'fairy'], 'HP': 40, 'attack': 80, 'defense': 35, 'speed': 70}
,57: {'name': 'primeape', 'type': ['fighting'], 'weakness': ['flying', 'psychic', 'fairy'], 'HP': 65, 'attack': 105, 'defense': 60, 'speed': 95}
,58: {'name': 'growlithe', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 55, 'attack': 70, 'defense': 45, 'speed': 60}
,59: {'name': 'arcanine', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 90, 'attack': 110, 'defense': 80, 'speed': 95}
,60: {'name': 'poliwag', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 40, 'attack': 50, 'defense': 40, 'speed': 90}
,61: {'name': 'poliwhirl', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 65, 'attack': 65, 'defense': 65, 'speed': 90}
,62: {'name': 'poliwrath', 'type': ['water', 'fighting'], 'weakness': ['grass', 'electric'], 'HP': 90, 'attack': 95, 'defense': 95, 'speed': 70}
,63: {'name': 'abra', 'type': ['psychic'], 'weakness': ['bug', 'ghost', 'dark'], 'HP': 25, 'attack': 20, 'defense': 15, 'speed': 90}
,64: {'name': 'kadabra', 'type': ['psychic'], 'weakness': ['bug', 'ghost', 'dark'], 'HP': 40, 'attack': 35, 'defense': 30, 'speed': 105}
,65: {'name': 'alakazam', 'type': ['psychic'], 'weakness': ['bug', 'ghost', 'dark'], 'HP': 55, 'attack': 50, 'defense': 45, 'speed': 120}
,66: {'name': 'machop', 'type': ['fighting'], 'weakness': ['flying', 'psychic', 'fairy'], 'HP': 70, 'attack': 80, 'defense': 50, 'speed': 35}
,67: {'name': 'machoke', 'type': ['fighting'], 'weakness': ['flying', 'psychic', 'fairy'], 'HP': 80, 'attack': 100, 'defense': 70, 'speed': 45}
,68: {'name': 'machamp', 'type': ['fighting'], 'weakness': ['flying', 'psychic', 'fairy'], 'HP': 90, 'attack': 130, 'defense': 80, 'speed': 55}
,69: {'name': 'bellsprout', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 50, 'attack': 75, 'defense': 35, 'speed': 40}
,70: {'name': 'weepinbell', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 65, 'attack': 90, 'defense': 50, 'speed': 55}
,71: {'name': 'victreebel', 'type': ['grass', 'poison'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 80, 'attack': 105, 'defense': 65, 'speed': 70}
,72: {'name': 'tentacool', 'type': ['water', 'poison'], 'weakness': ['grass', 'electric'], 'HP': 40, 'attack': 40, 'defense': 35, 'speed': 70}
,73: {'name': 'tentacruel', 'type': ['water', 'poison'], 'weakness': ['grass', 'electric'], 'HP': 80, 'attack': 70, 'defense': 65, 'speed': 100}
,74: {'name': 'geodude', 'type': ['rock', 'ground'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 40, 'attack': 80, 'defense': 100, 'speed': 20}
,75: {'name': 'graveler', 'type': ['rock', 'ground'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 55, 'attack': 95, 'defense': 115, 'speed': 35}
,76: {'name': 'golem', 'type': ['rock', 'ground'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 80, 'attack': 120, 'defense': 130, 'speed': 45}
,77: {'name': 'ponyta', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 50, 'attack': 85, 'defense': 55, 'speed': 90}
,78: {'name': 'rapidash', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 65, 'attack': 100, 'defense': 70, 'speed': 105}
,79: {'name': 'slowpoke', 'type': ['water', 'psychic'], 'weakness': ['grass', 'electric'], 'HP': 90, 'attack': 65, 'defense': 65, 'speed': 15}
,80: {'name': 'slowbro', 'type': ['water', 'psychic'], 'weakness': ['grass', 'electric'], 'HP': 95, 'attack': 75, 'defense': 110, 'speed': 30}
,81: {'name': 'magnemite', 'type': ['electric', 'steel'], 'weakness': ['ground'], 'HP': 25, 'attack': 35, 'defense': 70, 'speed': 45}
,82: {'name': 'magneton', 'type': ['electric', 'steel'], 'weakness': ['ground'], 'HP': 50, 'attack': 60, 'defense': 95, 'speed': 70}
,83: {'name': 'farfetchd', 'type': ['normal', 'flying'], 'weakness': ['fighting'], 'HP': 52, 'attack': 90, 'defense': 55, 'speed': 60}
,84: {'name': 'doduo', 'type': ['normal', 'flying'], 'weakness': ['fighting'], 'HP': 35, 'attack': 85, 'defense': 45, 'speed': 75}
,85: {'name': 'dodrio', 'type': ['normal', 'flying'], 'weakness': ['fighting'], 'HP': 60, 'attack': 110, 'defense': 70, 'speed': 110}
,86: {'name': 'seel', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 65, 'attack': 45, 'defense': 55, 'speed': 45}
,87: {'name': 'dewgong', 'type': ['water', 'ice'], 'weakness': ['grass', 'electric'], 'HP': 90, 'attack': 70, 'defense': 80, 'speed': 70}
,88: {'name': 'grimer', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 80, 'attack': 80, 'defense': 50, 'speed': 25}
,89: {'name': 'muk', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 105, 'attack': 105, 'defense': 75, 'speed': 50}
,90: {'name': 'shellder', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 30, 'attack': 65, 'defense': 100, 'speed': 40}
,91: {'name': 'cloyster', 'type': ['water', 'ice'], 'weakness': ['grass', 'electric'], 'HP': 50, 'attack': 95, 'defense': 180, 'speed': 70}
,92: {'name': 'gastly', 'type': ['ghost', 'poison'], 'weakness': ['ghost', 'dark'], 'HP': 30, 'attack': 35, 'defense': 30, 'speed': 80}
,93: {'name': 'haunter', 'type': ['ghost', 'poison'], 'weakness': ['ghost', 'dark'], 'HP': 45, 'attack': 50, 'defense': 45, 'speed': 95}
,94: {'name': 'gengar', 'type': ['ghost', 'poison'], 'weakness': ['ghost', 'dark'], 'HP': 60, 'attack': 65, 'defense': 60, 'speed': 110}
,95: {'name': 'onix', 'type': ['rock', 'ground'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 35, 'attack': 45, 'defense': 160, 'speed': 70}
,96: {'name': 'drowzee', 'type': ['psychic'], 'weakness': ['bug', 'ghost', 'dark'], 'HP': 60, 'attack': 48, 'defense': 45, 'speed': 42}
,97: {'name': 'hypno', 'type': ['psychic'], 'weakness': ['bug', 'ghost', 'dark'], 'HP': 85, 'attack': 73, 'defense': 70, 'speed': 67}
,98: {'name': 'krabby', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 30, 'attack': 105, 'defense': 90, 'speed': 50}
,99: {'name': 'kingler', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 55, 'attack': 130, 'defense': 115, 'speed': 75}
,100: {'name': 'voltorb', 'type': ['electric'], 'weakness': ['ground'], 'HP': 40, 'attack': 30, 'defense': 50, 'speed': 100}
,101: {'name': 'electrode', 'type': ['electric'], 'weakness': ['ground'], 'HP': 60, 'attack': 50, 'defense': 70, 'speed': 150}
,102: {'name': 'exeggcute', 'type': ['grass', 'psychic'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 60, 'attack': 40, 'defense': 80, 'speed': 40}
,103: {'name': 'exeggutor', 'type': ['grass', 'psychic'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 95, 'attack': 95, 'defense': 85, 'speed': 55}
,104: {'name': 'cubone', 'type': ['ground'], 'weakness': ['water', 'grass', 'ice'], 'HP': 50, 'attack': 50, 'defense': 95, 'speed': 35}
,105: {'name': 'marowak', 'type': ['ground'], 'weakness': ['water', 'grass', 'ice'], 'HP': 60, 'attack': 80, 'defense': 110, 'speed': 45}
,106: {'name': 'hitmonlee', 'type': ['fighting'], 'weakness': ['flying', 'psychic', 'fairy'], 'HP': 50, 'attack': 120, 'defense': 53, 'speed': 87}
,107: {'name': 'hitmonchan', 'type': ['fighting'], 'weakness': ['flying', 'psychic', 'fairy'], 'HP': 50, 'attack': 105, 'defense': 79, 'speed': 76}
,108: {'name': 'lickitung', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 90, 'attack': 55, 'defense': 75, 'speed': 30}
,109: {'name': 'koffing', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 40, 'attack': 65, 'defense': 95, 'speed': 35}
,110: {'name': 'weezing', 'type': ['poison'], 'weakness': ['ground', 'psychic'], 'HP': 65, 'attack': 90, 'defense': 120, 'speed': 60}
,111: {'name': 'rhyhorn', 'type': ['ground', 'rock'], 'weakness': ['water', 'grass', 'ice'], 'HP': 80, 'attack': 85, 'defense': 95, 'speed': 25}
,112: {'name': 'rhydon', 'type': ['ground', 'rock'], 'weakness': ['water', 'grass', 'ice'], 'HP': 105, 'attack': 130, 'defense': 120, 'speed': 40}
,113: {'name': 'chansey', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 250, 'attack': 5, 'defense': 5, 'speed': 50}
,114: {'name': 'tangela', 'type': ['grass'], 'weakness': ['flying', 'poison', 'bug', 'fire', 'ice'], 'HP': 65, 'attack': 55, 'defense': 115, 'speed': 60}
,115: {'name': 'kangaskhan', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 105, 'attack': 95, 'defense': 80, 'speed': 90}
,116: {'name': 'horsea', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 30, 'attack': 40, 'defense': 70, 'speed': 60}
,117: {'name': 'seadra', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 55, 'attack': 65, 'defense': 95, 'speed': 85}
,118: {'name': 'goldeen', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 45, 'attack': 67, 'defense': 60, 'speed': 63}
,119: {'name': 'seaking', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 80, 'attack': 92, 'defense': 65, 'speed': 68}
,120: {'name': 'staryu', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 30, 'attack': 45, 'defense': 55, 'speed': 85}
,121: {'name': 'starmie', 'type': ['water', 'psychic'], 'weakness': ['grass', 'electric'], 'HP': 60, 'attack': 75, 'defense': 85, 'speed': 115}
,122: {'name': 'mr-mime', 'type': ['psychic', 'fairy'], 'weakness': ['bug', 'ghost', 'dark'], 'HP': 40, 'attack': 45, 'defense': 65, 'speed': 90}
,123: {'name': 'scyther', 'type': ['bug', 'flying'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 70, 'attack': 110, 'defense': 80, 'speed': 105}
,124: {'name': 'jynx', 'type': ['ice', 'psychic'], 'weakness': ['fighting', 'rock', 'steel', 'fire'], 'HP': 65, 'attack': 50, 'defense': 35, 'speed': 95}
,125: {'name': 'electabuzz', 'type': ['electric'], 'weakness': ['ground'], 'HP': 65, 'attack': 83, 'defense': 57, 'speed': 105}
,126: {'name': 'magmar', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 65, 'attack': 95, 'defense': 57, 'speed': 93}
,127: {'name': 'pinsir', 'type': ['bug'], 'weakness': ['flying', 'rock', 'fire'], 'HP': 65, 'attack': 125, 'defense': 100, 'speed': 85}
,128: {'name': 'tauros', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 75, 'attack': 100, 'defense': 95, 'speed': 110}
,129: {'name': 'magikarp', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 20, 'attack': 10, 'defense': 55, 'speed': 80}
,130: {'name': 'gyarados', 'type': ['water', 'flying'], 'weakness': ['grass', 'electric'], 'HP': 95, 'attack': 125, 'defense': 79, 'speed': 81}
,131: {'name': 'lapras', 'type': ['water', 'ice'], 'weakness': ['grass', 'electric'], 'HP': 130, 'attack': 85, 'defense': 80, 'speed': 60}
,132: {'name': 'ditto', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 48, 'attack': 48, 'defense': 48, 'speed': 48}
,133: {'name': 'eevee', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 55, 'attack': 55, 'defense': 50, 'speed': 55}
,134: {'name': 'vaporeon', 'type': ['water'], 'weakness': ['grass', 'electric'], 'HP': 130, 'attack': 65, 'defense': 60, 'speed': 65}
,135: {'name': 'jolteon', 'type': ['electric'], 'weakness': ['ground'], 'HP': 65, 'attack': 65, 'defense': 60, 'speed': 130}
,136: {'name': 'flareon', 'type': ['fire'], 'weakness': ['ground', 'rock', 'water'], 'HP': 65, 'attack': 130, 'defense': 60, 'speed': 65}
,137: {'name': 'porygon', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 65, 'attack': 60, 'defense': 70, 'speed': 40}
,138: {'name': 'omanyte', 'type': ['rock', 'water'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 35, 'attack': 40, 'defense': 100, 'speed': 35}
,139: {'name': 'omastar', 'type': ['rock', 'water'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 70, 'attack': 60, 'defense': 125, 'speed': 55}
,140: {'name': 'kabuto', 'type': ['rock', 'water'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 30, 'attack': 80, 'defense': 90, 'speed': 55}
,141: {'name': 'kabutops', 'type': ['rock', 'water'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 60, 'attack': 115, 'defense': 105, 'speed': 80}
,142: {'name': 'aerodactyl', 'type': ['rock', 'flying'], 'weakness': ['fighting', 'ground', 'steel', 'water', 'grass'], 'HP': 80, 'attack': 105, 'defense': 65, 'speed': 130}
,143: {'name': 'snorlax', 'type': ['normal'], 'weakness': ['fighting'], 'HP': 160, 'attack': 110, 'defense': 65, 'speed': 30}
,144: {'name': 'articuno', 'type': ['ice', 'flying'], 'weakness': ['fighting', 'rock', 'steel', 'fire'], 'HP': 90, 'attack': 85, 'defense': 100, 'speed': 85}
,145: {'name': 'zapdos', 'type': ['electric', 'flying'], 'weakness': ['ground'], 'HP': 90, 'attack': 90, 'defense': 85, 'speed': 100}
,146: {'name': 'moltres', 'type': ['fire', 'flying'], 'weakness': ['ground', 'rock', 'water'], 'HP': 90, 'attack': 100, 'defense': 90, 'speed': 90}
,147: {'name': 'dratini', 'type': ['dragon'], 'weakness': ['ice', 'dragon', 'fairy'], 'HP': 41, 'attack': 64, 'defense': 45, 'speed': 50}
,148: {'name': 'dragonair', 'type': ['dragon'], 'weakness': ['ice', 'dragon', 'fairy'], 'HP': 61, 'attack': 84, 'defense': 65, 'speed': 70}
,149: {'name': 'dragonite', 'type': ['dragon', 'flying'], 'weakness': ['ice', 'dragon', 'fairy'], 'HP': 91, 'attack': 134, 'defense': 95, 'speed': 80}
,150: {'name': 'mewtwo', 'type': ['psychic'], 'weakness': ['bug', 'ghost', 'dark'], 'HP': 106, 'attack': 110, 'defense': 90, 'speed': 130}
,151: {'name': 'mew', 'type': ['psychic'], 'weakness': ['bug', 'ghost', 'dark'], 'HP': 100, 'attack': 100, 'defense': 100, 'speed': 100}
}
用的pokeAPI,所以所有的都用了英文
第一天,就这样吧 哇,这个计划听起来很棒!对于初中生来说,做一个口袋妖怪对战系统是个有趣的挑战。以下是一些建议,可以帮助你在项目中取得更大的进展:
1. 定义清晰的目标
[*]确定你想实现哪些功能,比如简单的对战系统、评分标准或者图形界面。
[*]定义项目的范围,这样就不会因为复杂性而太过分心。
2. 数据结构和存储
[*]利用好你创建的字典,考虑完善每个宝可梦的数据,比如填写"type"和"weakness"。
[*]考虑使用CSV或数据库来存储和管理大量宝可梦数据。
3. 游戏逻辑
[*]编写基本的战斗逻辑,比如攻击、防御和计算伤害。
[*]实现合理的回合机制,比如每次回合玩家和AI都能选择攻击或防守。
4. 逐步迭代与测试
[*]先实现一个简单的命令行版本,然后慢慢扩展功能。
[*]频繁测试,确保每个功能都如预期般工作。
5. 资源和帮助
[*]使用学习资源,比如Python编程入门书籍或在线教程。
[*]向社区提问,比如在编程论坛上求助。]https://www.pokeapi.co/]求助。
希望这能帮到你,让你有一个充实且有意义的寒假项目!继续加油!如果你有更多问题或者需要代码帮助,随时问我哦!
以上回复来自 FishC AI 小助理,如未能正确解答您的问题,请继续追问。 期待 支持,期待!~ 加油
666
页:
[1]