function E0090()
    InitRoom()FAI(0)
end
function E0091()
    InitRoom()FAI(1)
end
function E0092()
    InitRoom()FAI(2)
end
function E0093()
    InitRoom()FAI(3)
end
function E0094()
    InitRoom()FAI(4)
end

function InitRoom()
    MNA()
    if(FLJ("KingBack")) then
        CMU("CS_Quiet")
    else
        CMU("CS_Mura")
    end
end

--去外面
function Door_GoVillage()
    if(FLJ("Night")) then
        PRI()MM0()SOU("CS_011_door")ANP("Door_GoVillage",0,1)FAO(2)TRA("CS_village_night","E0090",51,10)
    else
        PRI()MM0()SOU("CS_011_door")ANP("Door_GoVillage",0,1)FAO(2)TRA("CS_village","E0090",51,10)
    end
end

--调查罐子
function Pot()
    PRI()
    MS3("\n*Looked inside the jar.")NOD()CLR()
    CAT("All the food is gone...")NOD()
    CAT("\nHe's such a glutton!")NOD()
    CAT("\nDidn't leave a single crumb for me.")NOD()
end

--间八钓鱼回到家发现马宾不在
function KanpaBackHome()
    KEY()
    FAI(0)
    WAI(32)
    MS3("\nMahin! I'm back from fishing!")NOD()
    SOU("CS_011_door")ANP("Door_GoVillage",0,1)--开门
    SNP("CS_mychar_kanpa_animate",14,14,1,"mainLayer","Kanpa1")--间八出现
    ANP("Kanpa1",200,0)--显示鱼竿
    WAI(32)
    SOU("CS_011_door")ANP("Door_GoVillage",0,0)--关门
    WAI(32)
    CLO()
    --走到桌子附近
    ANP("Kanpa1",1,1)--走路
    WAI(6*16)--走6格
    ANP("Kanpa1",0,1)--停止
    WAI(16)
    --转头看
    ANP("Kanpa1",0,0)--停止
    WAI(32)
    ANP("Kanpa1",0,1)--停止
    WAI(32)
    MS3("Mahin? Mahin! I'm back from fishing!")NOD()
    CAT("\nMahin?")NOD()
    CAT("\nNot home, huh...")NOD()
    CAT("\nI should ask Toroko and the others.")NOD()
    --水桶在地图上出现
    FLP("KanpaFishingBack")
    FLP("GoTorokoHome")
    --玩家可以控制间八
    MOV(20,14)
    SMC()
    DNP("Kanpa1")
    --如果是双玩家模式
    if(GOP() == 2) then
        P2A(false)--禁止玩家2使用AI切换
    end
    AMC("show_fishing_rod","CS_mychar_kanpa");--显示鱼竿
    SLR(1)
end

function Bed()
    if(FLJ("AskedJack")) then
        PRI()MM0()
        FAO(0)TRA("CS_king_house","ThreeDaysLater",20,15)
    else
        KEY()
        MS4("\nTake a rest?")YNJ()
        if(YES()) then
            FAO(4)CMU("XXXX")WAI(20)CLR()
            MS4("\n...")NOD()CLO()
            WAI(50)
            LIP(1000)
            SOU("CS_020_health_refill")
            AMC(0,1,PLY())
            MS4("\nYou feel refreshed.")NOD()CLO()
            RMU()FAI(4)
        end
    end
end


function SueAndTorokoVisitKanpa()
    KEY()CMU("CS_Mura")FAI(0)
    WAI(64)
    MS3("\nKanpachi！here we come~")NOD()CLO()
    SOU("CS_011_door")ANP("Door_GoVillage",0,1)--开门
    SNP("CS_sue_animate",14,14,1,"mainLayer","Sue1")--数出现
    ANP("Sue1","normal",1)
    WAI(16)
    --数往前走
    ANP("Sue1","walk")
    WAI(3*16)
    SNP("CS_toroko_animate",14,14,1,"mainLayer","Toroko1")--多隆子出现
    ANP("Toroko1","normal",1)
    WAI(16)
    ANP("Toroko1","walk")
    SOU("CS_011_door")ANP("Door_GoVillage",0,0)--关门
    WAI(16)
    ANP("Sue1","normal",1)
    WAI(32)
    ANP("Toroko1","normal",1)
    WAI(32)
    --数转身
    ANP("Sue1","normal",0)
    WAI(16)
    ANP("Sue1","back",0)
    WAI(32)
    FAC("sue_sad")MS3("\nLooks like he's not home...")NOD()CLR()
    FAC("toroko_><")CAT("\nMaybe he's at a bar~")ANP("Sue1","normal",0)NOD()CLR()
    FAC("sue_normal")MS3("That's right!")NOD()
    ANP("Sue1","angry")
    FAC("sue_angry")MS3("\nThen let's go to the bar")
    CAT("\nand find him~")NOD()CLR()
    FAC("toroko_><")MS3("\nHmm?!")NOD()CAT("Can we go to that place?")NOD()CLR()
    ANP("Sue1","normal",0)
    FAC("sue_normal")MS3("Anyway, King is not here")NOD()
    CAT("\nJack, that coward wouldn't do")
    CAT("\nanything to us~")NOD()CLR()
    ANP("Sue1","angry")
    FAC("sue_angry")CAT("\nIt's decided then!")NOD()CLO()
    ANP("Sue1","walk")
    WAI(2*16)
    ANP("Toroko1","normal",0)
    WAI(3*16)
    ANP("Sue1","normal")
    WAI(16)
    ANP("Sue1","back")
    WAI(16)
    SOU("CS_011_door")ANP("Door_GoVillage",0,1)--开门
    WAI(16)
    DNP("Sue1")
    WAI(32)
    FAC("toroko_><")MS3("\nSue, wait for me!")NOD()CLO()
    ANP("Toroko1","run",0)
    ANP("Toroko1","jump",0)
    WAI(54)
    DNP("Toroko1")
    WAI(16)
    SOU("CS_011_door")ANP("Door_GoVillage",0,0)--关门
    FAO(2)
    TRA("CS_king_house","JackWaitKanpa",14,15)
end