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

#7 Generate option, #1 base happiness and some other things #10

Merged
merged 8 commits into from
Dec 7, 2012

Conversation

CrystalMoogle
Copy link
Member

Fix #7 Added Pokemon.prototype.generate(id, level), which generates a pokemon with id at level.
Example a level 100 Mismagius output: {"num":200,"nick":"Misdreavus","gender":1,"ability":26,"item":0,"level":100,"ivs":{"hp":27,"att":18,"def":29,"spAtt":27,"spDef":13,"speed":27},"evs":{"hp":0,"att":0,"def":0,"spAtt":0,"spDef":0,"speed":0},"moves":["288","195","247","371"],"nature":9,"shiny":false,"happiness":"35"}
#1 Also added the base happiness data since that was needed for generate (though it wasn't that important, but I decided it's better than a base 70).

Fixed the commands message not being sent on login by using the new defaultChan param (originally I just made it send to all channels if this.channel was undefined, but I think that would be a one time thing and I don't think it's worth the extra lines)

Oh and I finally made pokeinfo part of the main scripts :x

Pokemon.prototype.generate(id, level) generates a pokemon id at level
Also moved somethings into the global namespace, Pokemon, EVs, IVs
Added new function rand(min,max) which generates a random number between min/max (I don't like sys.rand :3)
It was previously slightly weighted towards the male side
@CrystalMoogle
Copy link
Member Author

I'll switch it to 0 then, I guess we could make sure people are always in 0 or w/e (the warnings got annoying for me :3)
The moves thing does get the last 4 moves, though I have noticed a problem with it (it skips whatever the last move in the list is), I'll go fix them both now.

coyotte508 pushed a commit that referenced this pull request Dec 7, 2012
#7 Generate option, #1 base happiness and some other things
@coyotte508 coyotte508 merged commit 75edea8 into po-devs:master Dec 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need an option to generate a pokemon at level X
2 participants