.set LOCALID_WONDER_NEWS_BERRY_MAN, 1

CeruleanCity_House4_MapScripts::
	.byte 0

CeruleanCity_House4_EventScript_WonderNewsBerryMan::
	goto_if_questlog EventScript_ReleaseEnd
	special QuestLog_CutRecording
	lock
	specialvar VAR_0x8004, GetMENewsJisanItemAndState
	copyvar VAR_0x8008, VAR_RESULT
	goto_if_eq VAR_0x8004, 0, CeruleanCity_House4_EventScript_NoNews
	goto_if_eq VAR_0x8004, 1, CeruleanCity_House4_EventScript_News1
	goto_if_eq VAR_0x8004, 2, CeruleanCity_House4_EventScript_News2
	goto_if_eq VAR_0x8004, 3, CeruleanCity_House4_EventScript_NewsNotSpread
	goto_if_eq VAR_0x8004, 4, CeruleanCity_House4_EventScript_NewsSpread1
	goto_if_eq VAR_0x8004, 5, CeruleanCity_House4_EventScript_NewsSpread2
	goto_if_eq VAR_0x8004, 6, CeruleanCity_House4_EventScript_NewsDone
	end

CeruleanCity_House4_EventScript_NoNews::
	msgbox CeruleanCity_House4_Text_NothingEntertaining
	release
	end

CeruleanCity_House4_EventScript_News1::
	call CeruleanCity_House4_EventScript_MovementReactionToNews
	msgbox CeruleanCity_House4_Text_NewNewsInformativeHaveThis
	giveitem VAR_0x8008
	goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House4_EventScript_NoRoomForBerries
	release
	end

CeruleanCity_House4_EventScript_News2::
	call CeruleanCity_House4_EventScript_MovementReactionToNews
	msgbox CeruleanCity_House4_Text_IncredibleNewsHaveBerries
	giveitem VAR_0x8008, 4
	goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House4_EventScript_NoRoomForBerries
	release
	end

CeruleanCity_House4_EventScript_NewsNotSpread::
	applymovement LOCALID_WONDER_NEWS_BERRY_MAN, Movement_FacePlayer
	waitmovement 0
	msgbox CeruleanCity_House4_Text_WishCouldShareNewsWithOthers
	release
	end

CeruleanCity_House4_EventScript_NewsSpread1::
	call CeruleanCity_House4_EventScript_MovementReactionToNews
	msgbox CeruleanCity_House4_Text_ThanksForSpreadingNewsTakeThis
	giveitem VAR_0x8008
	goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House4_EventScript_NoRoomForBerries
	release
	end

CeruleanCity_House4_EventScript_NewsSpread2::
	call CeruleanCity_House4_EventScript_MovementReactionToNews
	msgbox CeruleanCity_House4_Text_MagnificentNewsSpreadHaveBerries
	giveitem VAR_0x8008, 4
	goto_if_eq VAR_RESULT, FALSE, CeruleanCity_House4_EventScript_NoRoomForBerries
	release
	end

CeruleanCity_House4_EventScript_NewsDone::
	applymovement LOCALID_WONDER_NEWS_BERRY_MAN, Movement_FacePlayer
	waitmovement 0
	msgbox CeruleanCity_House4_Text_EnjoyingMyselfWithAllSortsOfNews
	release
	end

CeruleanCity_House4_EventScript_MovementReactionToNews::
	playse SE_PIN
	applymovement LOCALID_WONDER_NEWS_BERRY_MAN, Movement_ExclamationMark
	waitmovement 0
	applymovement LOCALID_WONDER_NEWS_BERRY_MAN, Movement_FacePlayer
	waitmovement 0
	applymovement LOCALID_WONDER_NEWS_BERRY_MAN, Movement_Delay48
	waitmovement 0
	return

CeruleanCity_House4_EventScript_NoRoomForBerries::
	msgbox CeruleanCity_House4_Text_YourBerryPouchIsFull
	release
	end
