-
Notifications
You must be signed in to change notification settings - Fork 532
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
Add OnActorKill & OnEnemyDefeat hooks #3112
Conversation
@@ -87,7 +87,7 @@ typedef enum { | |||
COUNT_ENEMIES_DEFEATED_PARASITIC_TENTACLE, // EN_BA | |||
COUNT_ENEMIES_DEFEATED_PEAHAT, // EN_PEEHAT | |||
COUNT_ENEMIES_DEFEATED_PEAHAT_LARVA, // EN_PEEHAT | |||
COUNT_ENEMIES_DEFEATED_POE, // EN_POH | |||
COUNT_ENEMIES_DEFEATED_POE, // EN_POH & EN_PO_FIELD |
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.
is this bringing things in line with how it was actually working before or changing the meaning?
was it
COUNT_ENEMIES_DEFEATED_POE
means "non-big poes defeated" and COUNT_ENEMIES_DEFEATED_POE_BIG
means "big poes defeated" before, and this is changing it to mean COUNT_ENEMIES_DEFEATED_POE
meaning "big and non-big poes defeated" and COUNT_ENEMIES_DEFEATED_POE_BIG
meaning "big poes defeated"
or was it always
COUNT_ENEMIES_DEFEATED_POE
meaning "big and non-big poes defeated" and COUNT_ENEMIES_DEFEATED_POE_BIG
meaning "big poes defeated"
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.
COUNT_ENEMIES_DEFEATED_POE
means "non-big poes defeated" but ACTOR_EN_PO_FIELD
is used by every poe in hyrule field, even the small ones, I just updated the comment to reflect that.
Here's the code for counting the kills:
case ACTOR_EN_POH:
if (actor->params == EN_POH_FLAT || actor->params == EN_POH_SHARP) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE_COMPOSER]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE]++;
}
break;
case ACTOR_EN_PO_FIELD:
if (actor->params == EN_PO_FIELD_BIG) {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE_BIG]++;
} else {
gSaveContext.sohStats.count[COUNT_ENEMIES_DEFEATED_POE]++;
}
break;
@Pepe20129 not sure if you saw but the builds here failed |
The only change in the commit that has broken builds is the removal of comments so it shouldn't have failed. I have made an empty commit to re-run the build. |
It turns out that the first commit didn't run any builds even though it displays a checkmark. |
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.
Looks like you need to resolve a conflict but otherwise LGTM
Fixed the confict. |
Adds the OnActorKill & OnEnemyDefeat hooks.
Also moves the "Enemies Defeated" stats to
mods.cpp
Build Artifacts