Professor-Redwood icon indicating copy to clipboard operation
Professor-Redwood copied to clipboard

Add Attack command, make argument order more user friendly

Open awilbur opened this issue 6 years ago • 0 comments

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!

awilbur avatar Sep 02 '17 02:09 awilbur