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

function InitRoom()
    if(FLJ("ExploreEscapeRoutes")) then
        if(not FLJ("DefeatedPuu&Tala")) then
            SNP("CS_soapwalker_animate",29,17,1,"mainLayer","Tala1")
            ANP("Tala1","look_down")
            SNP("CS_puu_animate",32,17,0,"mainLayer","Puu1")
        end
    end
end

function GoSoapCastle()
    if(FLJ("InBossFight")) then
        PRI()MS4("不能逃跑！")NOD()
    else
        PRI()FAO(1)TRA("CS_soapcastle","E0093",4,15,0,75)
    end
end

function GoSoapCastleStair()
    if(FLJ("InBossFight")) then
        PRI()MS4("不能逃跑！")NOD()
    else
        PRI()FAO(3)TRA("CS_soapcastle_stair","E0091",90,20,0,3)
    end
end

function SoapKingGoResturant()
    KEY()
    CMU("XXXX")
    SNP("CS_puu_animate",14,17,0,"mainLayer","Puu1")
    FAI(2)
    WAI(32)
    SNP("CS_soapking_animate",4,17,1,"mainLayer","Soapking1")
    WAI(16)
    ANP("Puu1","walk",0)
    WAI(16)
    ANP("Soapking1","walk",1)
    WAI(16)
    ANP("Puu1","normal",0)
    WAI(48)
    ANP("Soapking1","normal",1)
    CMU("CS_Access")
    FAC("puu_normal")MS3("欢迎大王回来，")NOD()
    CAT("\n今天的赛鱼好看嘛？")NOD()CLR()
    FAC()CAT("不好看，")NOD()
    CAT("\n而且简直一塌糊涂。")NOD()
    CAT("\n他们那的鱼完全比不过我的龙鱼库龙，")NOD()
    CAT("\n库龙要是去的话就能拿第一吧。")NOD()CLR()
    FAC("puu_normal")CAT("那是肯定的！")NOD()
    CAT("\n咱的库龙是最强的。")NOD()CLR()
    FAC()CAT("听你这么一说，")NOD()
    CAT("\n我现在就想去见见我的鱼了...")NOD()CLO()
    ANP("Soapking1","walk",1)
    WAI(32)
    ANP("Puu1","normal",1)
    FAC("puu_normal")MS3("\n大王等等......")WAI(32)CLO()
    WAI(32)
    ANP("Puu1","walk",1)
    WAI(32)
    FAO(0)
    TRA("CS_soapcastle","SoapKingGoResturant",46,11)
end

function MeetMonster()
    KEY()
    MM0()
    WAI(16)
    FAO(0)
    MOV(48,17,"CS_mychar_jack_p1")
    MOV(49,17,"CS_mychar_santa_p2")
    MOV(50,17,"CS_mychar_puppy_p3")
    SLR(0)
    FAI(2)
    FLP("MeetMonster")
    DNP("MeetMonster")
    WAI(32)
    if(SKJ("QuickPuuBoss")) then
        ANP("Puu1","normal",1)
        ANP("Tala1","look_normal")
        FAC("puu_normal")MS3("\n抓住他们！")NOD()
    else
        ANP("Puu1","normal",1)
        WAI(32)
        ANP("Tala1","look_normal")
        WAI(32)
        FAC("puu_normal")MS3("嘿！我看到了什么？！")NOD()
        CAT("\n两只全新的咪咪卡！")NOD()CLO()
        AMC("walk",0,"CS_mychar_puppy_p3")
        WAI(48)
        AMC("stand_bark",0,"CS_mychar_puppy_p3")
        WAI(24)
        AMC("stand_bark",0,"CS_mychar_puppy_p3")
        WAI(16)
        FAC("soapwalker_normal")MS3("甚至还有一条汪酱呢~")NOD()
        CAT("\n不知道高第们会不会收狗子，")NOD()
        CAT("\n但这样一来无论如何")
        CAT("\n我们就有6只咪咪卡了~")NOD()CLR()
        FAC("puu_normal")CAT("是啊，")NOD()
        CAT("\n我今晚幸运极了。")NOD()CLR()
        FAC("soapwalker_normal")CAT("那么兄弟")
        CAT("\n我们俩一起上抓住他们吧~")NOD()CLR()
        FAC("puu_normal")CAT("\n就这么办！")NOD()CLR()
        FAC("jack_normal")CAT("\n大家！准备战斗！")NOD()
    end
    CMU("CS_FireEye")
    CNP("Puu1","CS_boss_puu",0,1)
    CNP("Tala1","CS_boss_tala",0,1)
    AMC("normal",0,"CS_mychar_puppy_p3")
    ANP("GroupHpBar1",500,1)--设置boss血条计数
    FLP("InBossFight")
    SKP("QuickPuuBoss")
    BSL("GroupHpBar1")
end

--战胜了Puu和Tala
function GroupHpBar1()
    KEY()
    KIL("CS_puububble_empty")
    KIL("CS_puububble_soapa")
    KIL("CS_puububble_soapb")
    KIL("CS_puububble_soapc")
    KIL("CS_enemy_soapa")
    KIL("CS_enemy_soapb")
    KIL("CS_enemy_soapc")
    FLS("InBossFight")
    SKS("QuickPuuBoss")
    FLP("DefeatedPuu&Tala")
    FLP("GolemTrap")
    CMU("CS_Fanfale3")
    MS4("\n扑悠&塔拉 被击败了！")WAI(140)NOD()CLO()
    WAI(32)
    FAC("jack_normal")MS3("怪物们似乎已经变成雕像了，")NOD()
    CAT("\n我们接下来继续前进吧。")NOD()
end
