Skip to content

Pokemon Showdown random battle driver/data collector. Enters random battles and tries to make the best move based on available info. Not updated for gen 8.

Notifications You must be signed in to change notification settings

armhandstudios/psaiduck

Repository files navigation

To run, call the Run() command from psaiduckDriver.py. It takes a JSON configuration file as the sole parameter.
The JSON file requires four parameters to function properly:
    1) username - the username you want psaiduck to log on as
    2) password - the corresponding password
    3) challengeUser - the user you want psaiduck to challenge to a random battle
    4) battleMode - can be either:
        a) "challenge" - you want psaiduck to challenge challengeUser to a battle
        b) "accept" - you want psaiduck to wait for a user (doesn't have to be challengeUser) to
                      challenge psaiduck to a battle, and accept when the challenge request is recieved.
    5) battleStyle - currently supports "random" and "basic" values. Read more below
    
You may notice the sample JSON file includes a "battleStyle" attribute. Currently implemented are "random", which does everything
    randomly, and "basic", which attacks with the move that would deal the most base damage, and switches to whatever pokemon would
    be strongest against the opposing pokemon. Battle styles are defined by:
        -Adding a getMyBattleStyle() method, a myMakeMove(trainerSelf, trainerEnemy) method, and a myMakeSwitch method.
            the getMyBattleStyle method needs only to return BattleStyle(myMakeMove, mySwitchMove). The other two methods need
            to return the move or pokemon it wants to make/switch to.
        -In psaiduckDriver, add the key to be placed in the json settings file you wish to correspond to your battle style, and 
            the name of your getMyBattleStyle method

The battle currently follows this flow:
  -psaiduck collects information about own active pokemon, then own benched pokemon
  -psaiduck collects information about opponents active pokemon
  -psaiduck attacks
  -psaiduck waits for the next turn. If a switch is needed, psaiduck switches to a different pokemon
  -repeat until game ends, then close

Known Bugs:
-Cannot track forced switches (e.g. roar, whirlwind). Will not crash, and will continue to work properly if manually
  changed back to mon that was forced out

About

Pokemon Showdown random battle driver/data collector. Enters random battles and tries to make the best move based on available info. Not updated for gen 8.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages