Alchemy
Loading...
Searching...
No Matches

inn.c File Reference

The inn: room prices, checking in and the night's sleep. More...

Go to the source code of this file.

Enumerations

enum  InnMessageId {
  INN_MESSAGE_WELCOME = 0xd1c , INN_MESSAGE_STAY_COMPLETE , INN_MESSAGE_NOT_ENOUGH_COINS , INN_MESSAGE_GOODBYE ,
  INN_MESSAGE_REST_COMPLETE
}
 The innkeeper's lines, in message order from MsgInnWelcome. More...

Functions

s32 Inn_RoomPrice (s32 innId)
 Returns the night's price: the inn's price per guest times the party members still standing.
s32 Inn_CheckIn (s32 innId, s32 objectId)
 Runs an inn's counter: the innkeeper names the price, and on Yes, with the coins, the party sleeps (Inn_PlaySleep) and the innkeeper speaks again.
void Inn_PlaySleep (s32 roomPrice)
 Charges roomPrice, restores the HP and PP of each member still standing, and plays the night: a fade to black, the inn's music and a fade back.

Variables

static const s8 sInnPricesPerGuest [12]
 The coins a night costs each living guest, by inn: Vale, Vault, Bilibin, Kolima, Imil, Xian, Altin, Kalay, Lunpa, 9 (no inn), Suhalla, Lalivero.

Detailed Description

The inn: room prices, checking in and the night's sleep.

Part of shop.c, the shop object, compiled only through it.

Definition in file inn.c.

Enumeration Type Documentation

◆ InnMessageId

The innkeeper's lines, in message order from MsgInnWelcome.

Enumerator
INN_MESSAGE_WELCOME 
INN_MESSAGE_STAY_COMPLETE 
INN_MESSAGE_NOT_ENOUGH_COINS 
INN_MESSAGE_GOODBYE 
INN_MESSAGE_REST_COMPLETE 

Definition at line 8 of file inn.c.

Function Documentation

◆ Inn_RoomPrice()

s32 Inn_RoomPrice ( s32 innId)

Returns the night's price: the inn's price per guest times the party members still standing.

Called by Inn_CheckIn.

Definition at line 26 of file inn.c.

Referenced by Inn_CheckIn(), and Inn_RoomPrice().

◆ Inn_CheckIn()

s32 Inn_CheckIn ( s32 innId,
s32 objectId )

Runs an inn's counter: the innkeeper names the price, and on Yes, with the coins, the party sleeps (Inn_PlaySleep) and the innkeeper speaks again.

Holds the shop's work block while it runs. Called by the town scenes' innkeepers through SHOP.S (Engine_InnOpen).

Definition at line 43 of file inn.c.

Referenced by Inn_CheckIn(), and TalkToInnkeeper().

◆ Inn_PlaySleep()

void Inn_PlaySleep ( s32 roomPrice)

Charges roomPrice, restores the HP and PP of each member still standing, and plays the night: a fade to black, the inn's music and a fade back.

Called by Inn_CheckIn.

Definition at line 103 of file inn.c.

Referenced by BabiPalace_RestInPalaceBeds(), Inn_CheckIn(), and Inn_PlaySleep().

Variable Documentation

◆ sInnPricesPerGuest

const s8 sInnPricesPerGuest[12]
static
Initial value:
= {
2, 4, 7, 8, 8, 10, 12, 15, 20, 0, 18, 25,
}

The coins a night costs each living guest, by inn: Vale, Vault, Bilibin, Kolima, Imil, Xian, Altin, Kalay, Lunpa, 9 (no inn), Suhalla, Lalivero.

Definition at line 19 of file inn.c.

Referenced by Inn_RoomPrice().