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

Implement initiative ranking command #7

Merged
merged 5 commits into from
Aug 7, 2023
Merged

Implement initiative ranking command #7

merged 5 commits into from
Aug 7, 2023

Commits on Mar 18, 2023

  1. Include rank field for NPCs

    The rank field is meant as a generic stand-in for the table top concept of initiative. This includes two values so that the rank can be temporarily modified by status effects or death and be restored to its original value when these effects pass.
    Yochien committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    4973dc6 View commit details
    Browse the repository at this point in the history
  2. Type hint NPC equals method

    Requires some unique rules defined here: https://peps.python.org/pep-0484/#forward-references
    Yochien committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    f23504f View commit details
    Browse the repository at this point in the history
  3. Implement the rank command

    Implements a basic ranking system for NPCs in which a higher value places them higher in their listing.
    
    This command might require displaying output once it finishes since it could be hard to visualize how it would affect the current list.
    Yochien committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    65ef978 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2023

  1. Simplify main program loop

    This change is made in preparation for sorting the encounter list after every command. This could be potentially wasteful, but would also ensure NPC ranking is always up to date.
    
    This new change excludes empty inputs from processing allowing for some trimmed down code branching.
    
    This code also provides a soft error message in the case the user provides some input that is visually empty, i.e. all whitespace or entirely empty, by changing the command prompt back to its longer form.
    Yochien committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    9c9ca3c View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2023

  1. Correct relative imports

    Should allow github's test runners to run properly again.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    6300159 View commit details
    Browse the repository at this point in the history