Skip to content

Conversation

@Mitsunee
Copy link
Contributor

Adds enum to replace magic numbers returned by IsMonDisobedient

Description

IsMonDisobedient returns magic numbers (0 to 2) and this PR adds an enum:

#define DISOBEDIENCE_OBEDIENT 0
#define DISOBEDIENCE_IGNORED  1 // command is ignored
#define DISOBEDIENCE_OTHER    2 // random move or self-hit

I also noticed that HITMARKER_OBEYS does not necessarily mean that the Pokemon actually obeyed the command, so I'd like to rename that, but didn't have a good idea and just left a comment. It seems the flag is always set, unless the Pokemon chose to use a different move (incl. hitting itself with pseudo-POUND).

Discord contact info

Mitsunee

@hedara90
Copy link
Contributor

This change passes with an actual enum too instead of the #define.
20251217_10h45m27s_grim

@Mitsunee
Copy link
Contributor Author

this repository generally uses #define over enum for most cases. I'm aware there is no difference in this case since there's also no typedef used.

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