-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Make creature's "moves" a protected variable #72258
Conversation
I'd recommend making the member protected and then fixing all the errors at once. |
What, and make more work for myself? Fine, fine. Reason wins again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-requesting reviews from non-collaborators: @wapcaplet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes on some potential errors of conversion
Co-authored-by: Fris0uman <[email protected]>
Summary
None
Purpose of change
Magic numbers bad
Accessing a creature's moves directly, also bad
Describe the solution
Replaced some instances of other arbitrary valuations with calculations for fractions of get_speed() that matched the previous numbers, assuming speed == 100
Actions which were related to the character performing a task use
get_speed()
to calculate their new time. Actions which were related to things happening (e.g. interacting with a computer) calculate their new move cost in seconds. For creatures with speed of == 100 (and indeed, most of these are just hardcoded player actions) there is no functional change.Describe alternatives you've considered
Testing
Compiles 👍
Reviewers are advised to scrutinize the monster files in particular... my best effort was made to make sense of what was going on in there but I annotated at least two places where functionality has changed. Previous behavior of modifying monster moves' by flat value assumed to be a bug.
Additional context