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

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

--去小房间
function Door_GoSmallRoom()
    PRI()MM0()FAO(2)TRA("CS_bar_smallroom","E0090",20,12)
end

--设置科恩动作
function SetColonAction()
    if(FLJ("ColonLeave")) then
        --科恩在桑塔家
        DNP("Colon1_2")
        DNP("Colon2")
        DNP("Colon3")
        ANP("Bar",0,0)
        MNA()CMU("CS_Mura")
    else
        if(FLJ("GaveTheFish")) then
            ANP("Colon1_2","sleep_on_bed",0)--睡着的
        else
            ANP("Colon1","sleep_on_bed",0)--睡着的
        end
        ANP("Colon2",5,1)--坐着的
        ANP("Colon3",2,0)--背对着的
        MNA()CMU("CS_Anzen")
    end
end

--科恩1（睡觉的）
function Colon1()
    if(FLJ("GaveTheFish")) then
        KEY()
        MS4("Kanpachi, can you show me how")NOD()
        CAT("\nto fish when you're free?~")NOD()
    else
        if(ITJ("Chinfish")) then
            KEY()
            SLR(0,PLY())
            MS4("\n*snore*..")NOD()CLR()
            CAT("\n*sniff* *sniff*")NOD()CLR()
            CAT("Fishy... smell...")NOD()
            CAT("\nSo hungry for... fish...")NOD()CLO()MYB(0,PLY())WAS()MYB(0,PLY())WAS()
            --科恩1站起
            WAI(32)
            ANP("Colon1",0,1)
            WAI(32)
            MS4("Oh my! It's Kanpachi!")NOD()
            CAT("\nDid you bring me any fish?~")NOD()CLR()
            --放下水桶
            SNP("CS_bucket",11,13,0,"mainLayer","Bucket1")
            CAT("Thank you!")NOD()
            CAT("\nLemme give you something in return.")NOD()CLR()
            SOU("CS_022_chest_open")
            GIT("LifeCapsule")
            CMU("CS_Fanfale2")CAT("Got a =LIFE CAPSULE=!")WAI(160)NOD()RMU()
            MLP(5)
            CAT("\nMax health increased by 5!")NOD()
            ITS("Chinfish")
            FLP("GaveTheFish")
        else
            KEY()
            MS4("\n*snore*....")NOD()
        end
    end
end
--科恩1_2（睡觉的）
function Colon1_2()
    KEY()
    MS4("\n*snore*.... Kanpachi..")NOD()
end

--科恩2（坐着的）
function Colon2()
    KEY()
    MS4("It's so good to live on the surface!")NOD()
    CAT("\nThough sometimes I still dream about")
    CAT("\nmy days in the Sand Zone Residence.")NOD()
end
--科恩3
function Colon3()
    KEY()
    MS4("It's getting chilly outside.")NOD()
    CAT("\nThe fireplace makes me feel so warm~")NOD()
end

--柜台（科恩4）
function Bar()
    if(FLJ("ColonLeave")) then
        KEY()
        MSG("\nThere's no one at the counter.")NOD()
    else
        if(FLJ("ChatWithColon4")) then
            KEY()
            MS4("We'll be waiting here for everyone to return.")NOD()
            CAT("\nGood night, Kanpachi. Get some rest~")NOD()
        else
            KEY()
            MS4("Curly hasn't been around these days either,")NOD()
            CAT("\nSo it's our turn to watch the house~")NOD()CLR()
            CAT("\nWould you like something to drink, Kanpachi?")NOD()CLR()
            CAT("Hmm...?")NOD()
            CAT("\nWe're not drinking alcohol in secret!")NOD()
            CAT("\nWe're little,")NOD()
            CAT("\nbut we'd never do that.")NOD()CLR()
            CAT("Got it!")NOD()
            CAT("\nWe won't cause any trouble,")NOD()
            CAT("\nDon't worry, Kanpachi!")NOD()
            FLP("ChatWithColon4")
        end
    end
end

function Party()
    KEY()
    CMU("CS_Anzen")

    SNP("CS_santa_animate",19,14,0,"mainLayer","Santa1")--桑塔
    ANP("Santa1","sit_on_chair")
    ANP("Table1","wine")

    SNP("CS_sue_animate",21,14,0,"mainLayer","Sue1")--数
    ANP("Sue1","sit_on_chair")
    ANP("Table2","juice")

    SNP("CS_toroko_animate",25,14,0,"mainLayer","Toroko1")--多隆子
    ANP("Table3","chess")
    ANP("Colon3","normal",1)

    DNP("Colon1_2")
    SNP("CS_colon_animate",14,14,0,"mainLayer","Colon1")
    ANP("Colon1","sit")
    ANP("Colon2","sit")
    SNP("CS_poker",12,14,0,"mainLayer","Poker1")
    FAI(2)
    WAI(64)
    FAC("sue_angry")MS3("\nThis place is absolutely amazing!")NOD()CLR()
    FAC("toroko_><")CAT("\nBut it's already midnight~")NOD()CLR()
    FAC("sue_normal")CAT("While King is away,")NOD()
    CAT("\nToroko, let's come play here")
    CAT("\nevery night!")NOD()CLR()
    FAC("toroko_normal")CAT("If Jack finds out we're still up,")
    FAC("toroko_><")CAT("\nhe'll scold us for sure..")NOD()CLR()
    FAC("sue_normal")CAT("Don't worry!")NOD()
    FAC("sue_angry")CAT("\nWith me here, he wouldn't dare...")NOD()CLO()
    WAI(32)
    CMU("XXXX")
    SOU("CS_011_door")ANP("Door_GoVillage",0,1)
    WAI(32)
    --杰克出现
    SNP("CS_jack_animate",28,14,0,"mainLayer","Jack1")--杰克
    WAI(32)
    ANP("Toroko1","normal",1)
    WAI(32)
    --多隆子跑到数旁边
    ANP("Toroko1","run",0)
    ANP("Toroko1","jump",0)
    WAI(54)
    WAI(16)
    ANP("Toroko1","normal",1)
    WAI(32)
    --数往右看
    ANP("Sue1","normal",1)
    WAI(32)
    ANP("Colon1","sit",1)
    WAI(32)
    --扑克牌倒了
    ANP("Poker1","collapsed")
    WAI(64)

    MS3("\n.")
    for i=0,5,1 do
        WAI(16)
        CAT(".")
    end
    CLR()
    FAC("jack_normal")CAT("It's midnight already.")
    CAT("\nDon't any of you sleep?")NOD()CLR()
    FAC("sue_sad")CAT("We know, we know.")NOD()
    CAT("\nWe're going now...")NOD()CLO()
    ANP("Sue1","walk")
    WAI(80)
    ANP("Jack1","walk")
    WAI(16)
    ANP("Jack1","normal")
    WAI(14)
    ANP("Sue1","back")
    WAI(2)
    ANP("Toroko1","run",1)
    ANP("Toroko1","jump",1)
    WAI(16)
    DNP("Sue1")
    WAI(78)
    DNP("Toroko1")
    WAI(64)
    FAC("jack_normal")MS3("Colons, you all should also")
    CAT("\ngo to bed properly after your shift.")NOD()CLR()
    FAC()CAT("\nGot it, Mayor Jack~")NOD()CLO()
    FAO(2)
    TRA("CS_toroko_house_night","BeforeSleep",15,16)
end
