function E0090()
    MNA()CMU("CS_Vivi")FAI(0)
end
function E0091()
    MNA()CMU("CS_Vivi")FAI(1)
end
function E0092()
    MNA()CMU("CS_Vivi")FAI(2)
end
function E0093()
    MNA()CMU("CS_Vivi")FAI(3)
end
function E0094()
    MNA()CMU("CS_Vivi")FAI(4)
end

function GoSoapCastle()
    if(FLJ("FindSomeFood")) then
        PRI()FAC("jack_normal")MS4("We might find food in this room,")NOD()
        CAT("\nlet's look around~")NOD()
    else
        PRI()FAO(3)TRA("CS_soapcastle","E0091",46,22)
    end
end

function SwimSoapCastleTalaRoom()
    PRI()FAO(2)TRA("CS_soapcastle_talaroom","E0090",38,1)
end

function GetFishFeed()
    PRI()
    FAC("jack_normal")MS4("This looks like Ironhead's fish feed,")NOD()
    CAT("\nMimiga should be able") 
    CAT("\nto eat some of it...")NOD()CLR()
    FAC()CAT("\nI think that works~")NOD()CLR()
    FAC("jack_normal")CAT("Then I'll take one package...")NOD()CLR()
    ITP("FishFeed")
    GIT("FishFeed")
    SOU("CS_038_get_item")
    DNP("GetFishFeed")
    FLP("GetFishFeed")
    FLS("FindSomeFood")
    FAC()CAT("\nObtained =FISH FEED=.")NOD()
    FLP("StoreRoomSavePoint")
    CNP("SavePoint","CS_savepoint",0,0)
end

function PuuPickUpAni()
    KEY()
    MM0()
    PMU(5)
    WAI(32)
    MS2("\nYou hear footsteps...")NOD()CLO()
    WAI(60)
    SNP("CS_puu_animate",7,16,1,"mainLayer","Puu1")
    WAI(60)
    FAC("puu_normal")MS3("\nRed paint, looking for red paint...")NOD()CLO()
    ANP("Puu1","walk",1)
    WAI(128)
    ANP("Puu1","normal",1)
    WAI(32)
    ANP("Puu1","normal",0)
    WAI(32)
    ANP("Puu1","back",0)
    WAI(32)
    ANP("Puu1","back",1)
    WAI(32)
    ANP("Puu1","normal",1)
    WAI(32)
    FAC("puu_normal")MS3("\nFound it!")NOD()CLO()
    ANP("Puu1","walk",1)
    WAI(144)
    ANP("Puu1","back",1)
    WAI(64)
    DNP("RedTank")
    ANP("Puu1","show_tank")
    WAI(32)
    ANP("Puu1","normal",0)
    WAI(32)
    ANP("Puu1","walk",0)
    WAI(128 + 144)
    ANP("Puu1","normal",0)
    WAI(32)
    ANP("Puu1","back",0)
    WAI(32)
    DNP("Puu1")
    RMU(5)
    DNP("PuuPickUpAni")
    FLP("PuuPickUpAni")
end

function ChangeBackMimiga()
    DNP("ChangeBackMimiga")
    FLP("ChangeBackMimiga")
    KEY()
    FAO(0)
    WAI(64)
    SOU("CS_071_little_crash")
    WAI(64)
    SOU("CS_029_teleport")
    WAI(64)
    FLS("FishState")
    SMC()
    local playerNum = GOP();
    --变回咪咪卡
    if(MCN(PLY()) == "CS_mychar_jackfish") then
        SPL(0,"CS_mychar_jack_p1")
        AGP("CS_mychar_jack_p1",false)
        SPL(1,"CS_mychar_santa_p2")
        if(playerNum == 1) then
            AGP("CS_mychar_santa_p2",true)
        end
    else
        SPL(0,"CS_mychar_santa_p2")
        AGP("CS_mychar_santa_p2",false)
        SPL(1,"CS_mychar_jack_p1")
        if(playerNum == 1) then
            AGP("CS_mychar_jack_p1",true)
        end
    end
    DGP("CS_mychar_jackfish_p1")
    DGP("CS_mychar_santafish_p2")
    DGP("CS_mychar_puppyfish_p3")
    --倒在地上
    MOV(28,16,0)
    MOV(29,16,1)
    SLR("CS_mychar_jack_p1")
    AMC("lie")
    SNP("CS_puppy_animate",30,16,1,"mainLayer","Puppy1")
    ANP("Puppy1","normal",0)
    FAI(2)
    WAI(64)
    FAC("jack_><")MS3("Landing as a fish") 
    CAT("\nstill hurts a bit...")NOD()CLO()
    WAI(32)
    AMC("normal","CS_mychar_santa")
    WAI(64)
    MS3("\nWe've changed back!")NOD()CLO()
    ANP("Puppy1","bark")WAI(16)ANP("Puppy1","bark")WAI(16)
    WAI(64)
    FAC("jack_><")MS3("Really...")NOD()
    CAT("\nThat's a relief.")NOD()CLO()
    WAI(32)
    AMC("normal","CS_mychar_jack")
    --SLR("CS_mychar_santa_p2")
    WAI(32)
    AMC("normal",0,"CS_mychar_santa_p2")
    WAI(32)
    AMC("back",0,"CS_mychar_santa_p2")
    AMC("normal",0,"CS_mychar_jack_p1")
    WAI(32)
    MS3("\nThis place looks like a warehouse...")NOD()CLR()
    AMC("normal",0,"CS_mychar_santa_p2")
    SLR("CS_mychar_jack_p1")
    FAC("jack_normal")MS3("Maybe we can find something") 
    CAT("\nto eat here,")NOD()
    CAT("\nlet's look around.")NOD()CLO()
    --小狗AI
    SGP("CS_mychar_puppy",30,16,0,"CS_mychar_puppy_p3")
    AGP("CS_mychar_puppy_p3",true)
    DNP("Puppy1")
    FLP("FindSomeFood")
    LIP(1000)
end

function StackedFeed()
    if(FLJ("HeroBack")) then
        PRI()
        MS3("Your database scan indicates")NOD()
        CAT("\nthese are feed for large carnivorous fish.")NOD()
    elseif(FLJ("GetFishFeed")) then
        PRI()
        MS3("These are all fish feed,")NOD()
        CAT("\nseems like the monsters like fish too.")NOD()
    else
        PRI()
        MS3("Very heavy-looking sacks piled into a mountain,")NOD()
        CAT("\nwonder what's inside them.")NOD()
    end
end

function BlueTank()
    if(FLJ("HeroBack")) then
        PRI()
        MS3("Your database scan indicates")
        CAT("\nthis is a large blue acrylic paint container")NOD()
    else
        PRI()
        MS3("\nThis is a large blue paint container.")NOD()
    end
end

function YellowTank()
    if(FLJ("HeroBack")) then
        PRI()
        MS3("Your database scan indicates")
        CAT("\nthis is a large yellow acrylic paint container")NOD()
    else
        PRI()
        MS3("\nThis is a large yellow paint container.")NOD()
    end
end
