Bean guy text formatting and rando fixes (#6444)

This commit is contained in:
Chris
2026-03-29 21:33:16 -04:00
committed by GitHub
parent efc4086c6a
commit 14b464bab2
4 changed files with 23 additions and 4 deletions

View File

@@ -1355,6 +1355,14 @@ typedef enum {
// - `*DoorShutter`
VB_LOCK_BOSS_DOOR,
// #### `result`
// ```c
// true
// ```
// #### `args`
// - `*EnMs`
VB_MAGIC_BEAN_SALESMAN_TAKE_MONEY,
// #### `result`
// ```c
// CHECK_QUEST_ITEM(QUEST_SONG_EPONA)

View File

@@ -49,9 +49,9 @@ void BuildBeanGuyMessage(uint16_t* textId, bool* loadFromMessageTable) {
"I never thought I'd say this, but I'm selling the last %rMagic Bean%w.^%y99 Rupees%w, no "
"less.\x1B%gYes&No%w",
"Ich hätte nie gedacht, daß ich das sage, aber ich verkaufe die letzte^%rWundererbse%w für %y99 "
"Rubine%w.\x1B&%gJa&Nein%w",
"Je te vends mon dernier %rHaricot&magique%g pour %y99 Rubis%w.\x1B&%gAcheterNe pas acheter%w");
msg.Format();
"Rubine%w.\x1B%gJa&Nein%w",
"Je te vends mon dernier %rHaricot&magique%w pour %y99 Rubis%w.\x1B%gAcheter&Ne pas acheter%w");
msg.AutoFormat();
} else if (*textId == TEXT_BEAN_SALESMAN_BUY_FOR_10) {
msg = CustomMessage("Want to buy [[color]][[1]]%w for %y[[2]] Rupees%w?\x1B%gYes&No%w",
"Möchten Sie [[color]][[1]]%w für %y[[2]] Rubin%w kaufen?\x1B%gJa&Nein%w",

View File

@@ -980,6 +980,15 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
OTRGlobals::Instance->gRandoContext->GetItemLocation(RC_ZR_MAGIC_BEAN_SALESMAN)->GetPrice();
} else if (RAND_GET_OPTION(RSK_SKIP_PLANTING_BEANS)) {
*should = gSaveContext.rupees >= 60;
} else if (BEANS_BOUGHT == 9) {
*should = gSaveContext.rupees >= 99;
}
break;
}
case VB_MAGIC_BEAN_SALESMAN_TAKE_MONEY: {
if (BEANS_BOUGHT == 9) {
Rupees_ChangeBy(-99);
*should = false;
}
break;
}

View File

@@ -150,7 +150,9 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
void EnMs_Sell(EnMs* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
Rupees_ChangeBy(-sPrices[BEANS_BOUGHT]);
if (GameInteractor_Should(VB_MAGIC_BEAN_SALESMAN_TAKE_MONEY, true, this)) {
Rupees_ChangeBy(-sPrices[BEANS_BOUGHT]);
}
this->actor.parent = NULL;
this->actionFunc = EnMs_TalkAfterPurchase;
} else {