-
Notifications
You must be signed in to change notification settings - Fork 520
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
Apply some "Bombcus in Logic" checks globally and fix Logic bugs when "Bombchus in Logic" is off #3720
Apply some "Bombcus in Logic" checks globally and fix Logic bugs when "Bombchus in Logic" is off #3720
Conversation
This type of question, among other similar comments are better fit for our discord. Comments on pull requests should be limited to feedback about the code changes made 👍 |
@@ -1255,8 +1255,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) { | |||
this->itemGiveFunc = itemEntry->itemGiveFunc; | |||
this->buyEventFunc = itemEntry->buyEventFunc; | |||
// If chus are in logic, make the 10 pack affordable without a wallet upgrade |
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.
// If chus are in logic, make the 10 pack affordable without a wallet upgrade | |
// randomizer logic expects the 10 pack to be affordable without a wallet upgrade |
FoundBombchus = (BombchuDrop || Bombchus || Bombchus5 || Bombchus10 || Bombchus20) && (BombBag || BombchusInLogic); | ||
CanPlayBowling = (BombchusInLogic && FoundBombchus) || (!BombchusInLogic && BombBag); | ||
HasBombchus = (BuyBombchus10 || BuyBombchus20 || (AmmoDrops.Is(AMMODROPS_BOMBCHU) && FoundBombchus)); |
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.
unless i'm misunderstanding this, it seems this would make it so logic never expects a scenario where someone
- has chus in logic off, has chu drops on
- finds chus
- uses chus
which is definitely possible because without chus in logic chus will drop if someone has chus (even if they don't have bomb bag)
based on
//If bombchus in logic, need to have found chus to buy; if not just need bomb bag | |
else if (placed == BUY_BOMBCHU_10 || placed == BUY_BOMBCHU_20) { | |
OtherCondition = (!BombchusInLogic && Bombs) || (BombchusInLogic && FoundBombchus); | |
} |
i'd think we want this to be
FoundBombchus = (BombchuDrop || Bombchus || Bombchus5 || Bombchus10 || Bombchus20) && (BombBag || BombchusInLogic); | |
CanPlayBowling = (BombchusInLogic && FoundBombchus) || (!BombchusInLogic && BombBag); | |
HasBombchus = (BuyBombchus10 || BuyBombchus20 || (AmmoDrops.Is(AMMODROPS_BOMBCHU) && FoundBombchus)); | |
FoundBombchus = (BombchuDrop || Bombchus || Bombchus5 || Bombchus10 || Bombchus20); | |
CanPlayBowling = (BombchusInLogic && FoundBombchus) || (!BombchusInLogic && BombBag); | |
HasBombchus = (((BuyBombchus10 || BuyBombchus20) && (BombBag || BombchusInLogic)) || (AmmoDrops.Is(AMMODROPS_BOMBCHU) && FoundBombchus)); |
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.
The suggested line of code does nothing, as BuyBombchus is already accounting for bomb bag properly in the shop logic code.
The purpose of that line is to patch the case where finding a bombchu chest was putting using bombchus in logic without a bomb bag on seeds where bombcus in logic is off, and while this matches the practicallity of what is happeneing in game, it is not in the spirit of disabling bombchus in logic and will create a scenario where HasBombchus is true when HasExplosives is false resulting in inconsistent logic.
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.
HasBombchus is true when HasExplosives is false resulting in inconsistent logic
HasExplosives = Bombs || (BombchusInLogic && HasBombchus); |
yes, that is intentional. chus in logic means you can be expected to use chus to get checks locked behind having explosives. chus out of logic means you won't be expected to get those checks using chus.
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.
It is not intended when "Bombchus in Logic" is off, which is what happens in this case. The full requirements are:
- "Bombchus in Logic" is off
- "Bombchu Drops" is on
- There is no bomb bag in logic
- There is a bombchu chest in logic
- The check looks for HasBombchus specifically, not HasExplosives
When these 5 things happen, the logic will see the bombchus as a valid item even when it shouldn't be because settings say bombchus should only be needed after the bomb bag. HasExplosives having that BombchusInLogic check and HasBombchus not having it is what causes the wierdness.
cb82e77
into
HarbourMasters:develop-macready
Addresses a few small issues with bombchu logic by doing 3 quick fixes:
Build Artifacts