GithubHelp home page GithubHelp logo

pokemon's People

Contributors

pcattori avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pokemon's Issues

Items

Support for items

  • potions
  • status heal

Categorize moves

  • deal damage
  • deal damage AND secondary effect
  • status effect
  • "queue moves": affect next turns
  • one-hit KO moves (is this just "deals โˆž damage"?)
  • custom (eg. metronome)

API

import pokemon
moves = ('scratch', 'growl', 'ember', 'leer')
charmander = pokemon.Pokemon.of_species('charmander', level=3, moves=[
    pokemon.MOVEDEX.by_name(move) for move in moves])
>>> charmander.species
Species(national_pokedex_number=4, name='charmander', types=['fire'], base_stats=Stats(hp=39, attack=52, defense=43, special=50, speed=65))
>>> charmander.level
3
>>> charmander.ivs
Stats(hp=0, attack=4, defense=4, special=12, speed=10)
>>> charmander.evs
Stats(hp=0, attack=0, defense=0, special=0, speed=0)
>>> charmander.stats
Stats(hp=15, attack=8, defense=7, special=8, speed=9)
>>> charmander.moves
[Move(name='scratch', type_='normal', category='physical', power=40, accuracy=100, pp=35), Move(name='growl', type_='normal', category='status', power=None, accuracy=100, pp=40), Move(name='ember', type_='fire', category='special', power=40, accuracy=100, pp=25), Move(name='leer', type_='normal', category='status', power=None, accuracy=100, pp=30)]

maybe pokemon.species('charmander') and pokemon.move('ember') convenience functions?

Come up with "thin, pass-through wrapper" pattern to deal with different layers of persistence

"Terse composition":

class FallbackWrapper:
    def __init__(self, fallback):
        # hit __dict__ directly to avoid calling __setattr__ before
        # `_fallback` is assigned
        self.__dict__['_fallback'] = fallback

    def __getattr__(self, attr):
        return getattr(self._fallback, attr)

    def __setattr__(self, attr, value):
        if attr not in self.__dict__ and hasattr(self._fallback, attr):
            setattr(self._fallback, attr, value)
        # default behavior
        super().__setattr__(attr, value)

pokemon is not a package

I'm having trouble trying to import any of the modules. It gives me an input error when I try to do it.

Model Pokemon rules

`Pokemon#moves` as a `dict`?

Might make more sense...

eg. squirtle.moves[2] vs squirtle.moves['bubble']

especially since moves are currently keyed by their name

MVP

  • Simulate Base Stats, IVs, EVs
  • Pokemon database
  • Moves database
  • Simulate physical/special attack damage
  • Simulate battle (eg. pp depletion, damage dealt, priority, accuracy)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.