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

Add Attack command, make argument order more user friendly #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

awilbur
Copy link
Collaborator

@awilbur awilbur commented Sep 2, 2017

This adds damage calculations, accessible by any of the following commands:

!attack
!atk
!damage
!dmg

Argument order is very flexible. The following are all equivalent:

!dmg mewtwo 20 confusion 15 machamp 20 15
!dmg 15 20 mewtwo confusion 15 20 machamp
!dmg mewtwo 20 15 confusion 15 20 machamp
!dmg mewtwo confusion machamp

I added some of the flexibility to the !bp command as well.
Damage calculation moved to its own file, so the chat commands can simply import it.
Also added tests.

This was a long time in the making, and it's very possible I've screwed something up, although I tried to break it in every way I could think of. Please do let me know if there's anything to change!

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.

2 participants