You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Remove mom saving/spending coins (#1); add coins gained from a trainer battle to wCurLevelCoins (#30)
This commit is contained in:
@ -11,9 +11,6 @@
|
||||
const ENGINE_DAY_CARE_MAN_HAS_MON
|
||||
; wDayCareLady
|
||||
const ENGINE_DAY_CARE_LADY_HAS_MON
|
||||
; wMomSavingCoins
|
||||
const ENGINE_MOM_SAVING_COINS
|
||||
const ENGINE_MOM_ACTIVE
|
||||
; wStatusFlags
|
||||
const ENGINE_POKEDEX
|
||||
const ENGINE_UNOWN_DEX
|
||||
|
@ -36,7 +36,6 @@ DEF MAX_DAYS EQU 36 * 7 ; 252
|
||||
|
||||
; significant coins values
|
||||
DEF START_COINS EQU 100
|
||||
DEF MOM_COINS EQU 2300
|
||||
DEF MAX_COINS EQU 999999
|
||||
DEF MAX_LEVEL_COINS EQU 99999
|
||||
DEF MAX_DELTA_COINS_DIGITS EQU 5
|
||||
|
@ -15,7 +15,6 @@ DEF STRING_BUFFER_LENGTH EQU 19
|
||||
const_def
|
||||
const YOUR_COINS ; 0
|
||||
const CUR_LEVEL_COINS ; 1
|
||||
const MOMS_COINS ; 2
|
||||
|
||||
; checkcoins/checkchips return values
|
||||
const_def
|
||||
|
@ -218,14 +218,6 @@ DEF SCRIPT_RUNNING EQU 2
|
||||
const STATUSFLAGS2_REACHED_GOLDENROD_F ; 6
|
||||
const STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F ; 7
|
||||
|
||||
; wMomSavingCoins::
|
||||
DEF MOM_SAVING_SOME_COINS_F EQU 0
|
||||
DEF MOM_SAVING_HALF_COINS_F EQU 1
|
||||
DEF MOM_SAVING_ALL_COINS_F EQU 2
|
||||
DEF MOM_ACTIVE_F EQU 7
|
||||
|
||||
DEF MOM_SAVING_COINS_MASK EQU (1 << MOM_SAVING_SOME_COINS_F) | (1 << MOM_SAVING_HALF_COINS_F) | (1 << MOM_SAVING_ALL_COINS_F)
|
||||
|
||||
; wJohtoBadges::
|
||||
const_def
|
||||
const ZEPHYRBADGE
|
||||
|
@ -20,9 +20,6 @@ EngineFlags:
|
||||
engine_flag wDayCareMan, DAYCAREMAN_HAS_MON_F
|
||||
engine_flag wDayCareLady, DAYCARELADY_HAS_MON_F
|
||||
|
||||
engine_flag wMomSavingCoins, MOM_SAVING_SOME_COINS_F
|
||||
engine_flag wMomSavingCoins, MOM_ACTIVE_F
|
||||
|
||||
engine_flag wStatusFlags, STATUSFLAGS_POKEDEX_F
|
||||
engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F
|
||||
engine_flag wStatusFlags, STATUSFLAGS_CAUGHT_POKERUS_F
|
||||
|
@ -42,7 +42,6 @@ SpecialsPointers::
|
||||
add_special DayCareLady
|
||||
add_special DayCareManOutside
|
||||
add_special MoveDeletion
|
||||
add_special BankOfMom
|
||||
add_special MagnetTrain
|
||||
add_special NameRival
|
||||
add_special OverworldTownMap
|
||||
|
@ -1,29 +0,0 @@
|
||||
MACRO momitem
|
||||
; coins to trigger, cost, kind, item
|
||||
dt \1
|
||||
dt \2
|
||||
db \3, \4
|
||||
ENDM
|
||||
|
||||
MomItems_1:
|
||||
momitem 0, 600, MOM_ITEM, SUPER_POTION
|
||||
momitem 0, 90, MOM_ITEM, ANTIDOTE
|
||||
momitem 0, 180, MOM_ITEM, POKE_BALL
|
||||
momitem 0, 450, MOM_ITEM, ESCAPE_ROPE
|
||||
momitem 0, 500, MOM_ITEM, GREAT_BALL
|
||||
.End
|
||||
|
||||
MomItems_2:
|
||||
momitem 900, 600, MOM_ITEM, SUPER_POTION
|
||||
momitem 4000, 270, MOM_ITEM, REPEL
|
||||
momitem 7000, 600, MOM_ITEM, SUPER_POTION
|
||||
momitem 10000, 1800, MOM_DOLL, DECO_CHARMANDER_DOLL
|
||||
momitem 15000, 3000, MOM_ITEM, MOON_STONE
|
||||
momitem 19000, 600, MOM_ITEM, SUPER_POTION
|
||||
momitem 30000, 4800, MOM_DOLL, DECO_CLEFAIRY_DOLL
|
||||
momitem 40000, 900, MOM_ITEM, HYPER_POTION
|
||||
momitem 50000, 8000, MOM_DOLL, DECO_PIKACHU_DOLL
|
||||
momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL
|
||||
.End
|
||||
|
||||
dt 0 ; unused
|
@ -64,7 +64,6 @@ PredefPointers::
|
||||
add_predef PlayBattleAnim
|
||||
add_predef DummyPredef38
|
||||
add_predef DummyPredef39
|
||||
add_predef DummyPredef3A
|
||||
add_predef PartyMonItemName
|
||||
add_predef GetMonFrontpic
|
||||
add_predef GetMonBackpic
|
||||
|
@ -183,28 +183,6 @@ TiedAgainstText:
|
||||
line "<ENEMY>!"
|
||||
prompt
|
||||
|
||||
SentSomeToMomText:
|
||||
text "<PLAYER> got <COIN>@"
|
||||
text_decimal wBattleReward, 3, 6
|
||||
text_start
|
||||
line "for winning!"
|
||||
cont "Sent some to MOM!"
|
||||
prompt
|
||||
|
||||
SentHalfToMomText:
|
||||
text "Sent half to MOM!"
|
||||
prompt
|
||||
|
||||
SentAllToMomText:
|
||||
text "Sent all to MOM!"
|
||||
prompt
|
||||
|
||||
UnusedRivalLossText: ; unreferenced
|
||||
text "<RIVAL>: Huh? I"
|
||||
line "should've chosen"
|
||||
cont "your #MON!"
|
||||
prompt
|
||||
|
||||
BattleText_MonFainted:
|
||||
text_ram wBattleMonNickname
|
||||
text_start
|
||||
@ -215,12 +193,6 @@ BattleText_UseNextMon:
|
||||
text "Use next #MON?"
|
||||
done
|
||||
|
||||
UnusedRivalWinText: ; unreferenced
|
||||
text "<RIVAL>: Yes!"
|
||||
line "I guess I chose a"
|
||||
cont "good #MON!"
|
||||
prompt
|
||||
|
||||
LostAgainstText:
|
||||
text "Lost against"
|
||||
line "<ENEMY>!"
|
||||
|
@ -2332,27 +2332,7 @@ WinTrainerBattle:
|
||||
ld a, [wAmuletCoin]
|
||||
and a
|
||||
call nz, .DoubleReward
|
||||
call .CheckMaxedOutMomCoins
|
||||
push af
|
||||
ld a, FALSE
|
||||
jr nc, .okay
|
||||
ld a, [wMomSavingCoins]
|
||||
and MOM_SAVING_COINS_MASK
|
||||
cp (1 << MOM_SAVING_SOME_COINS_F) | (1 << MOM_SAVING_HALF_COINS_F)
|
||||
jr nz, .okay
|
||||
inc a ; TRUE
|
||||
|
||||
.okay
|
||||
ld b, a
|
||||
ld c, 4
|
||||
.loop
|
||||
ld a, b
|
||||
and a
|
||||
jr z, .loop2
|
||||
call .AddCoinsToMom
|
||||
dec c
|
||||
dec b
|
||||
jr .loop
|
||||
|
||||
.loop2
|
||||
ld a, c
|
||||
@ -2365,38 +2345,13 @@ WinTrainerBattle:
|
||||
.done
|
||||
call .DoubleReward
|
||||
call .DoubleReward
|
||||
pop af
|
||||
jr nc, .KeepItAll
|
||||
ld a, [wMomSavingCoins]
|
||||
and MOM_SAVING_COINS_MASK
|
||||
jr z, .KeepItAll
|
||||
ld hl, .SentToMomTexts
|
||||
dec a
|
||||
ld c, a
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp StdBattleTextbox
|
||||
|
||||
.KeepItAll:
|
||||
ld hl, GotCoinsForWinningText
|
||||
jp StdBattleTextbox
|
||||
|
||||
.AddCoinsToMom:
|
||||
push bc
|
||||
ld hl, wBattleReward + 2
|
||||
ld de, wMomsCoins + 2
|
||||
call AddBattleCoinsToAccount
|
||||
pop bc
|
||||
ret
|
||||
|
||||
.AddCoinsToWallet:
|
||||
push bc
|
||||
ld hl, wBattleReward + 2
|
||||
ld de, wCoins + 2
|
||||
ld de, wCurLevelCoins + 2
|
||||
call AddBattleCoinsToAccount
|
||||
pop bc
|
||||
ret
|
||||
@ -2415,22 +2370,6 @@ WinTrainerBattle:
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.SentToMomTexts:
|
||||
; entries correspond to MOM_SAVING_* constants
|
||||
dw SentSomeToMomText
|
||||
dw SentHalfToMomText
|
||||
dw SentAllToMomText
|
||||
|
||||
.CheckMaxedOutMomCoins:
|
||||
ld hl, wMomsCoins + 2
|
||||
ld a, [hld]
|
||||
cp LOW(MAX_COINS)
|
||||
ld a, [hld]
|
||||
sbc HIGH(MAX_COINS) ; mid
|
||||
ld a, [hl]
|
||||
sbc HIGH(MAX_COINS >> 8)
|
||||
ret
|
||||
|
||||
AddBattleCoinsToAccount:
|
||||
ld c, 3
|
||||
and a
|
||||
@ -2451,17 +2390,17 @@ AddBattleCoinsToAccount:
|
||||
jr nz, .loop
|
||||
pop hl
|
||||
ld a, [hld]
|
||||
cp LOW(MAX_COINS)
|
||||
cp LOW(MAX_LEVEL_COINS)
|
||||
ld a, [hld]
|
||||
sbc HIGH(MAX_COINS) ; mid
|
||||
sbc HIGH(MAX_LEVEL_COINS) ; mid
|
||||
ld a, [hl]
|
||||
sbc HIGH(MAX_COINS >> 8)
|
||||
sbc HIGH(MAX_LEVEL_COINS >> 8)
|
||||
ret c
|
||||
ld [hl], HIGH(MAX_COINS >> 8)
|
||||
ld [hl], HIGH(MAX_LEVEL_COINS >> 8)
|
||||
inc hl
|
||||
ld [hl], HIGH(MAX_COINS) ; mid
|
||||
ld [hl], HIGH(MAX_LEVEL_COINS) ; mid
|
||||
inc hl
|
||||
ld [hl], LOW(MAX_COINS)
|
||||
ld [hl], LOW(MAX_LEVEL_COINS)
|
||||
ret
|
||||
|
||||
PlayVictoryMusic:
|
||||
@ -8166,7 +8105,7 @@ CheckPayDay:
|
||||
|
||||
.okay
|
||||
ld hl, wPayDayCoins + 2
|
||||
ld de, wCoins + 2
|
||||
ld de, wCurLevelCoins + 2
|
||||
call AddBattleCoinsToAccount
|
||||
ld hl, BattleText_PlayerPickedUpPayDayCoins
|
||||
call StdBattleTextbox
|
||||
|
@ -27,7 +27,7 @@ LoadMaxCoins_bc:
|
||||
cp HIGH(wCurLevelCoins)
|
||||
ld bc, MaxCurLevelCoins ; CUR_LEVEL_COINS
|
||||
ret z
|
||||
ld bc, MaxCoins ; YOUR_COINS or MOMS_COINS
|
||||
ld bc, MaxCoins ; YOUR_COINS
|
||||
ret
|
||||
|
||||
LoadMaxCoins_hl:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,239 +0,0 @@
|
||||
DEF NUM_MOM_ITEMS_1 EQUS "((MomItems_1.End - MomItems_1) / 8)"
|
||||
DEF NUM_MOM_ITEMS_2 EQUS "((MomItems_2.End - MomItems_2) / 8)"
|
||||
|
||||
const_def 1
|
||||
const MOM_ITEM
|
||||
const MOM_DOLL
|
||||
|
||||
MomTriesToBuySomething::
|
||||
ld a, [wMapReentryScriptQueueFlag]
|
||||
and a
|
||||
ret nz
|
||||
call GetMapPhoneService
|
||||
and a
|
||||
ret nz
|
||||
xor a
|
||||
ld [wWhichMomItemSet], a
|
||||
call CheckBalance_MomItem2
|
||||
ret nc
|
||||
call Mom_GiveItemOrDoll
|
||||
ret nc
|
||||
ld b, BANK(.Script)
|
||||
ld de, .Script
|
||||
farcall LoadMemScript
|
||||
scf
|
||||
ret
|
||||
|
||||
.Script:
|
||||
callasm .ASMFunction
|
||||
farsjump Script_ReceivePhoneCall
|
||||
|
||||
.ASMFunction:
|
||||
call MomBuysItem_DeductFunds
|
||||
call Mom_GetScriptPointer
|
||||
ld a, [wWhichMomItemSet]
|
||||
and a
|
||||
jr nz, .ok
|
||||
ld hl, wWhichMomItem
|
||||
inc [hl]
|
||||
.ok
|
||||
ld a, PHONE_MOM
|
||||
ld [wCurCaller], a
|
||||
ld bc, wCallerContact
|
||||
ld hl, PHONE_CONTACT_TRAINER_CLASS
|
||||
add hl, bc
|
||||
ld [hl], TRAINER_NONE
|
||||
inc hl
|
||||
ld [hl], PHONE_MOM
|
||||
ld hl, PHONE_CONTACT_SCRIPT2_BANK
|
||||
add hl, bc
|
||||
ld a, BANK(Mom_GetScriptPointer)
|
||||
ld [hli], a
|
||||
ld a, e
|
||||
ld [hli], a
|
||||
ld a, d
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
CheckBalance_MomItem2:
|
||||
ld a, [wWhichMomItem]
|
||||
cp NUM_MOM_ITEMS_2
|
||||
jr nc, .nope
|
||||
call GetItemFromMom
|
||||
ld a, [hli]
|
||||
ldh [hCoinsTemp], a
|
||||
ld a, [hli]
|
||||
ldh [hCoinsTemp + 1], a
|
||||
ld a, [hli]
|
||||
ldh [hCoinsTemp + 2], a
|
||||
ld de, wMomsCoins
|
||||
ld bc, hCoinsTemp
|
||||
farcall CompareCoins
|
||||
jr nc, .have_enough_coins
|
||||
|
||||
.nope
|
||||
jr .check_have_2300
|
||||
|
||||
.have_enough_coins
|
||||
scf
|
||||
ret
|
||||
|
||||
.check_have_2300
|
||||
ld hl, hCoinsTemp
|
||||
ld [hl], HIGH(MOM_COINS >> 8)
|
||||
inc hl
|
||||
ld [hl], HIGH(MOM_COINS) ; mid
|
||||
inc hl
|
||||
ld [hl], LOW(MOM_COINS)
|
||||
.loop
|
||||
ld de, wMomItemTriggerBalance
|
||||
ld bc, wMomsCoins
|
||||
farcall CompareCoins
|
||||
jr z, .exact
|
||||
jr nc, .less_than
|
||||
call .AddCoins
|
||||
jr .loop
|
||||
|
||||
.less_than
|
||||
xor a
|
||||
ret
|
||||
|
||||
.exact
|
||||
call .AddCoins
|
||||
ld a, NUM_MOM_ITEMS_1
|
||||
call RandomRange
|
||||
inc a
|
||||
ld [wWhichMomItemSet], a
|
||||
scf
|
||||
ret
|
||||
|
||||
.AddCoins:
|
||||
ld de, wMomItemTriggerBalance
|
||||
ld bc, hCoinsTemp
|
||||
farcall AddCoins
|
||||
ret
|
||||
|
||||
MomBuysItem_DeductFunds:
|
||||
call GetItemFromMom
|
||||
ld de, 3 ; cost
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ldh [hCoinsTemp], a
|
||||
ld a, [hli]
|
||||
ldh [hCoinsTemp + 1], a
|
||||
ld a, [hli]
|
||||
ldh [hCoinsTemp + 2], a
|
||||
ld de, wMomsCoins
|
||||
ld bc, hCoinsTemp
|
||||
farcall TakeCoins
|
||||
ret
|
||||
|
||||
Mom_GiveItemOrDoll:
|
||||
call GetItemFromMom
|
||||
ld de, 6 ; item type
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
cp MOM_ITEM
|
||||
jr z, .not_doll
|
||||
ld a, [hl]
|
||||
ld c, a
|
||||
ld b, 1
|
||||
farcall DecorationFlagAction_c
|
||||
scf
|
||||
ret
|
||||
|
||||
.not_doll
|
||||
ld a, [hl]
|
||||
ld [wCurItem], a
|
||||
ld a, 1
|
||||
ld [wItemQuantityChange], a
|
||||
ld hl, wNumPCItems
|
||||
call ReceiveItem
|
||||
ret
|
||||
|
||||
Mom_GetScriptPointer:
|
||||
call GetItemFromMom
|
||||
ld de, 6 ; item type
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld de, .ItemScript
|
||||
cp MOM_ITEM
|
||||
ret z
|
||||
ld de, .DollScript
|
||||
ret
|
||||
|
||||
.ItemScript:
|
||||
writetext MomHiHowAreYouText
|
||||
writetext MomFoundAnItemText
|
||||
writetext MomBoughtWithYourCoinsText
|
||||
writetext MomItsInPCText
|
||||
end
|
||||
|
||||
.DollScript:
|
||||
writetext MomHiHowAreYouText
|
||||
writetext MomFoundADollText
|
||||
writetext MomBoughtWithYourCoinsText
|
||||
writetext MomItsInYourRoomText
|
||||
end
|
||||
|
||||
GetItemFromMom:
|
||||
ld a, [wWhichMomItemSet]
|
||||
and a
|
||||
jr z, .zero
|
||||
dec a
|
||||
ld de, MomItems_1
|
||||
jr .GetFromList1
|
||||
|
||||
.zero
|
||||
ld a, [wWhichMomItem]
|
||||
cp NUM_MOM_ITEMS_2
|
||||
jr c, .ok
|
||||
xor a
|
||||
|
||||
.ok
|
||||
ld de, MomItems_2
|
||||
|
||||
.GetFromList1:
|
||||
ld l, a
|
||||
ld h, 0
|
||||
rept 3 ; multiply hl by 8
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, de
|
||||
ret
|
||||
|
||||
INCLUDE "data/items/mom_phone.asm"
|
||||
|
||||
MomHiHowAreYouText:
|
||||
text_far _MomHiHowAreYouText
|
||||
text_end
|
||||
|
||||
MomFoundAnItemText:
|
||||
text_far _MomFoundAnItemText
|
||||
text_end
|
||||
|
||||
MomBoughtWithYourCoinsText:
|
||||
text_far _MomBoughtWithYourCoinsText
|
||||
text_end
|
||||
|
||||
MomItsInPCText:
|
||||
text_far _MomItsInPCText
|
||||
text_end
|
||||
|
||||
MomFoundADollText:
|
||||
text_far _MomFoundADollText
|
||||
text_end
|
||||
|
||||
MomItsInYourRoomText:
|
||||
text_far _MomItsInYourRoomText
|
||||
text_end
|
||||
|
||||
|
||||
DummyPredef3A_DummyData: ; unreferenced
|
||||
db 0
|
||||
|
||||
DummyPredef3A:
|
||||
ret
|
||||
|
||||
DummyPredef3A_DummyFunction: ; unreferenced
|
||||
ret
|
@ -127,16 +127,6 @@ endc
|
||||
ld a, LOW(START_COINS)
|
||||
ld [wCoins + 2], a
|
||||
|
||||
xor a
|
||||
ld [wWhichMomItem], a
|
||||
|
||||
ld hl, wMomItemTriggerBalance
|
||||
ld [hl], HIGH(MOM_COINS >> 8)
|
||||
inc hl
|
||||
ld [hl], HIGH(MOM_COINS) ; mid
|
||||
inc hl
|
||||
ld [hl], LOW(MOM_COINS)
|
||||
|
||||
call InitializeNPCNames
|
||||
|
||||
farcall InitDecorations
|
||||
|
@ -1205,7 +1205,6 @@ Script_reloadmapafterbattle:
|
||||
.notblackedout
|
||||
bit 0, d
|
||||
jr z, .was_wild
|
||||
farcall MomTriesToBuySomething
|
||||
jr .next
|
||||
|
||||
.was_wild
|
||||
@ -1223,6 +1222,7 @@ Script_reloadmapafterbattle:
|
||||
farcall LoadBoardMenuDieNumbersGFX
|
||||
ld hl, wDisplaySecondarySprites
|
||||
set SECONDARYSPRITES_SPACES_LEFT_F, [hl]
|
||||
call ConstructOverworldHUDTilemap ; refresh coins just won
|
||||
.done
|
||||
jp Script_reloadmap
|
||||
|
||||
@ -1874,10 +1874,7 @@ GetCoinsAccount:
|
||||
and a
|
||||
ld de, wCoins ; YOUR_COINS
|
||||
ret z
|
||||
dec a
|
||||
ld de, wCurLevelCoins ; CUR_LEVEL_COINS
|
||||
ret z
|
||||
ld de, wMomsCoins ; MOMS_COINS
|
||||
ret
|
||||
|
||||
LoadCoinsAmountToMem:
|
||||
|
2
main.asm
2
main.asm
@ -82,7 +82,6 @@ INCLUDE "engine/events/pokecenter_pc.asm"
|
||||
INCLUDE "engine/items/mart.asm"
|
||||
INCLUDE "engine/events/coins.asm"
|
||||
INCLUDE "data/items/marts.asm"
|
||||
INCLUDE "engine/events/mom.asm"
|
||||
INCLUDE "engine/events/daycare.asm"
|
||||
INCLUDE "engine/events/print_unown.asm"
|
||||
INCLUDE "engine/events/print_photo.asm"
|
||||
@ -394,7 +393,6 @@ SECTION "bank3F", ROMX
|
||||
|
||||
INCLUDE "engine/tilesets/tileset_anims.asm"
|
||||
INCLUDE "engine/events/npc_trade.asm"
|
||||
INCLUDE "engine/events/mom_phone.asm"
|
||||
|
||||
|
||||
SECTION "bank41", ROMX
|
||||
|
13
ram/wram.asm
13
ram/wram.asm
@ -2396,14 +2396,6 @@ wStatusFlags2::
|
||||
db
|
||||
|
||||
wCoins:: ds 3
|
||||
wMomsCoins:: ds 3
|
||||
|
||||
wMomSavingCoins::
|
||||
; bit 0: saving some coins
|
||||
; bit 1: saving half coins (unused)
|
||||
; bit 2: saving all coins (unused)
|
||||
; bit 7: active
|
||||
db
|
||||
|
||||
wChips:: dw
|
||||
|
||||
@ -2503,11 +2495,6 @@ wDecoLeftOrnament:: db
|
||||
wDecoRightOrnament:: db
|
||||
wDecoBigDoll:: db
|
||||
|
||||
; Items bought from Mom
|
||||
wWhichMomItem:: db
|
||||
wWhichMomItemSet:: db
|
||||
wMomItemTriggerBalance:: ds 3
|
||||
|
||||
wDailyResetTimer:: dw
|
||||
wDailyFlags1:: db
|
||||
wDailyFlags2:: db
|
||||
|
Reference in New Issue
Block a user