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

Aug sept 2024 #211

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Aug sept 2024 #211

wants to merge 15 commits into from

Conversation

SethBarberee
Copy link
Collaborator

Getting better about doing this more in the open so people know what I'm working on..

@SethBarberee SethBarberee marked this pull request as ready for review October 1, 2024 02:01
@SethBarberee
Copy link
Collaborator Author

Ready for review

KECLEON_STORE_BUY_ITEM_MENU = 16,
KECLEON_STORE_BUY_ITEM_RECEIPT,
KECLEON_STORE_BUY_ITEM_INFO = 21,
KECLEON_STORE_BUY_ITEM,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are enough skips with the enum number values that it may be easier to define all of them explicitly.

{
if(pokemon->info->isNotTeamMember)
{
info->shopkeeper = 2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values can use the ShopkeeperMode enum in structs/dungeon_entity.h.

iVar4 = DungeonRandInt(1000);
recruitRate = GetRecruitRate(targetInfo->id);
if (recruitRate != -999) {
if (HasHeldItem(pokemon,0x2e)) { // FRIEND_BOW
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swap the number out for the ITEM_FRIEND_BOW macro.

info->maxHPStat += leveldata.gainHP;
info->HP += leveldata.gainHP;

if(info->maxHPStat > 0x3E6)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These hex values are equal to 998 and 999 in decimal. Since these numbers are directly visible to the player, using decimal would be easier to read here.

CANCEL_ACTION,
SEND_THANK_YOU_MAIL_ACTION,
GET_THANK_YOU_MAIL_ACTION,
// 3 - GAME_LINK
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If some of these missing enums are known, perhaps they can be added even if they aren't used yet.

Copy link
Contributor

@mateon1 mateon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good, made some minor suggestions

u8 spAtk;
u8 def;
u8 spDef;
// NOTE: cannot re-use offense struct as it pads.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we make it a packed struct then?

targetInfo = target->info;
iVar8 = -1;
size = GetBodySize(targetInfo->apparentID);
if ((1 < ((u16)(gDungeon->bossBattleIndex - 4))) && (gDungeon->bossBattleIndex != 9) && (gDungeon->bossBattleIndex != 0xf)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comparison has broken me. I no longer know what kind of horrendous comparison macros they could have used.

(targetInfo->id != 0x19e) &&
(targetInfo->id != 0x195) &&
(targetInfo->id != 0x196) &&
(targetInfo->id != 0x197)) || (HasRecruitedMon(targetInfo->id) == 0)) &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are MONSTER_ constants

{NULL, 0x0},
{"Confirm", CONFIRM_ACTION},
{"Info", INFO_ACTION},
{NULL, CANCEL_ACTION},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it doesn't make more sense to make these last terminator entries use empty {} initializers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While doing that, the explicit array size could be removed.

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.

3 participants