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

function GoSeaBed()
    PRI()FAO(1)TRA("CS_seabed","E0093",1,18,1,32)
end

function GoSeaChest()
    PRI()FAO(3)TRA("CS_sea_chest","E0091",38,10)
end

function FallIntoSea()
    PRI()
    CMU("XXXX")
    FAC("jack_><")MS3("Are we there yet?")NOD()
    CAT("\nI feel like I'm dying.")NOD()CLR()
    FAC()CAT("I think we've arrived,")NOD()
    CAT("\nI can see light!")NOD()CLO()
    KEY()
    SMC()
    MOV(19,0,MCI("CS_mychar_jack"))
    MOV(21,0,MCI("CS_mychar_santa"))
    SNP("CS_puppy_animate",20,-2,0,"mainLayer","Puppy1")
    ANP("Puppy1","fall")
    AMC("hurt",1,MCI("CS_mychar_jack"))
    AMC("hurt",0,MCI("CS_mychar_santa"))
    FAI(0)
    SNP("sys_trigger_v_allplayer",20,0,0,"mainLayer","Camera1")
    WAI(1)
    FON("Camera1",1)
    MS2("\nAaaaaahhhhh————!")
    WAS()
    CLO()
    SOU("CS_071_little_crash")
    AMC("smoke")
    AMC("lie")
    WAI(128)
    FAC("jack_><")MS3("\nSanta, I can't hold on much longer.")NOD()CLR()
    FAC()CAT("\nMe neither...")NOD()CLO()
    WAI(64)
    FAO(2)
    WAI(32)
    MSG("Consciousness fading away...")NOD()
    CAT("\nBut a voice echoes in my mind.")NOD()CLR()
    MS2("Are you two giving up so quickly...")NOD()
    CAT("\nI haven't even seen you struggle yet.")NOD()
    CAT("\nEntertain me a little more.")NOD()CLO()
    SOU("CS_101_lightning_strike")
    WAI(64)
    TRA("CS_sea_entrance","WakeUp",19,54)
end

function WakeUp()
    KEY()
    MOV(19,54,MCI("CS_mychar_jack"))
    MOV(22,51,MCI("CS_mychar_santa"))
    --隐藏玩家
    HMC(MCI("CS_mychar_jack"))
    HMC(MCI("CS_mychar_santa"))
    MS3("\nWoof woof...")
    SOU("CS_105_puppy_bark")WAI(64)
    SOU("CS_105_puppy_bark")WAI(16)SOU("CS_105_puppy_bark")
    NOD()CLO()
    --临时替换成鱼
    SGP("CS_mychar_jackfish",19,54,1,"CS_mychar_jackfish_p1")
    SGP("CS_mychar_santafish",21,54,0,"CS_mychar_santafish_p2")
    SGP("CS_mychar_puppyfish",17,52,0,"CS_mychar_puppyfish_p3")
    --更换操控角色
    SPL(0,"CS_mychar_jackfish_p1")
    SPL(1,"CS_mychar_santafish_p2")
    AMC("lie",1,MCI("CS_mychar_jackfish"))
    AMC("lie",0,MCI("CS_mychar_santafish"))
    AMC("float",1,"CS_mychar_puppyfish_p3")
    WAS()
    FAI(0)
    WAI(32)
    MS3("\nWoof woof...")
    AMC("bark",1,"CS_mychar_puppyfish_p3")WAI(64)
    AMC("bark",1,"CS_mychar_puppyfish_p3")WAI(16)AMC("bark",1,"CS_mychar_puppyfish_p3")
    NOD()CLO()
    WAI(32)
    FAC("jack_><")MS3("\nAre we still alive?")NOD()CLR()
    FAC()CAT("I don't know, but I had a dream") 
    CAT("\nthat I turned into a fish.")NOD()CLO()
    WAI(32)
    SNP("CS_exclamation",21,53,0,"mainLayer","null")--感叹号
    AMC("normal",0,MCI("CS_mychar_santafish"))
    WAI(32)
    AMC("bark",1,"CS_mychar_puppyfish_p3")WAI(16)AMC("bark",1,"CS_mychar_puppyfish_p3")
    WAI(64)
    AMC("stand",0,MCI("CS_mychar_santafish"))
    AMC("look_up",0,MCI("CS_mychar_santafish"))
    AMC("swim",1,"CS_mychar_puppyfish_p3")WAI(80)
    AMC("swim",0,"CS_mychar_puppyfish_p3")WAI(80)
    AMC("float",1,"CS_mychar_puppyfish_p3")WAI(32)
    AMC("bark",1,"CS_mychar_puppyfish_p3")WAI(16)AMC("bark",1,"CS_mychar_puppyfish_p3")
    WAI(32)
    MS3("\nNo, I'm still dreaming.")NOD()CLO()
    WAI(32)
    AMC("normal",0,MCI("CS_mychar_santafish"))
    WAI(32)
    AMC("lie",0,MCI("CS_mychar_santafish"))
    WAI(64)
    AMC("bark_high",1,"CS_mychar_puppyfish_p3")WAI(16)AMC("bark_high",1,"CS_mychar_puppyfish_p3")
    WAI(64)
    AMC("set_target",1,"CS_mychar_puppyfish_p3")
    AMC("CS_mychar_santafish",1,"CS_mychar_puppyfish_p3")
    AMC("swim_target",1,"CS_mychar_puppyfish_p3")
    WAI(50)
    AMC("float",1,"CS_mychar_puppyfish_p3")
    AMC("bark_high",1,"CS_mychar_puppyfish_p3")WAI(16)AMC("bark_high",1,"CS_mychar_puppyfish_p3")
    WAI(64)
    AMC("normal",0,MCI("CS_mychar_santafish"))
    WAI(32)
    AMC("bark_high",1,"CS_mychar_puppyfish_p3")WAI(16)AMC("bark_high",1,"CS_mychar_puppyfish_p3")
    MS3("That barking sounds so real,")NOD()
    CAT("\nI guess I'm not dreaming after all...")NOD()CLO()
    WAI(32)
    AMC("normal",1,MCI("CS_mychar_jackfish"))
    AMC("float",0,"CS_mychar_puppyfish_p3")
    FAC("jack_><")MS3("\nSo noisy, what's happening?")NOD()CLR()
    FAC()CAT("\nJack, you're finally awake.")NOD()CLR()
    FAC("jack_normal")CAT("\nWhat's going on?")NOD()CLO()
    AMC("normal",0,MCI("CS_mychar_jackfish"))
    WAI(32)
    AMC("back",0,MCI("CS_mychar_jackfish"))
    WAI(32)
    AMC("back",1,MCI("CS_mychar_jackfish"))
    WAI(32)
    AMC("normal",1,MCI("CS_mychar_jackfish"))
    FAC()MS3("We've actually turned into fish,")NOD()
    CAT("\nand somehow survived underwater.")NOD()CLR()
    FAC("jack_><")CAT("\nBut I don't know how to swim...")NOD()CLR()
    FAC()CAT("\nNeither do I...")NOD()CLO()
    AMC("float_up",0,"CS_mychar_puppyfish_p3")
    AMC("stand",1,MCI("CS_mychar_jackfish"))
    AMC("look_up",1,MCI("CS_mychar_jackfish"))
    AMC("stand",0,MCI("CS_mychar_santafish"))
    AMC("look_up",0,MCI("CS_mychar_santafish"))
    WAI(64)
    AMC("swim",1,"CS_mychar_puppyfish_p3")WAI(40)
    AMC("swim",0,"CS_mychar_puppyfish_p3")WAI(80)
    AMC("float",1,"CS_mychar_puppyfish_p3")WAI(32)
    AMC("bark",1,"CS_mychar_puppyfish_p3")WAI(16)AMC("bark",1,"CS_mychar_puppyfish_p3")
    FAC()MS3("Looks like the dog swims better") 
    CAT("\nthan both of us...")NOD()CLR()
    AMC("normal",1,MCI("CS_mychar_jackfish"))
    FAC("jack_><")CAT("\nStop it... I get it...")NOD()CLR()
    AMC("normal",0,MCI("CS_mychar_santafish"))
    FAC("jack_normal")CAT("We'll learn to swim as we go,")NOD()
    CAT("\nwhat's important is whether") 
    CAT("\nwe're in the right place.")NOD()CLR()
    CAT("\nLet's look around") 
    CAT("\nand see what's going on.")NOD()CLR()
    FAC()CAT("\nGood point.")NOD()CLO()
    --设置
    AMC("normal",0,"CS_mychar_puppyfish_p3")
    FLP("FishState")
    ITS("Mick")
    --如果只有1个玩家
    if(GOP() == 1) then
        --玩家2由AI控制
        AGP("CS_mychar_santafish_p2",true)
    end
    --小狗由AI控制
    AGP("CS_mychar_puppyfish_p3",true)
    --恢复玩家控制
    CMU("CS_Dusk")
end

function Over()
    KEY()
    MYB(1,PLY())WAS()
    MS4("masrofox: This is the end of the current content.")NOD()
    CAT("\nThank you for playing! Please wait for the next update~")NOD()
end