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

function GoSoapCastleGolemTowerPath()
    PRI()FAO(1)TRA("CS_soapcastle_golemtower_path","E0093",5,12,0,61)
end

function SlayTheCastle()
    KEY()
    MNA()CMU("CS_Dr")
    FAI(3)
    WAI(32)
    FAC("king_normal")MS3("Looks like we've reached the castle,")NOD()
    CAT("\nlet's storm in and rescue everyone.")NOD()
    --DNP("LocalCamera2")
end

function Back()
    KEY()
    FAC("king_normal")MS4("\nI will not retreat.")NOD()
end

function Floor1Golem()
    KEY()
    DNP("Floor1Golem")
    MOV(PLY())
    MM0()
    ANP("Floor1CameraH","disable_focus")
    FON("Floor1Camera1")
    if(SKJ("SkipPaper")) then
        --左力场
        for i=47,57,1 do
            SNP("CS_forcefield",12,i,0,"mainLayer","ForcefieldL")
        end
        --右力场
        for i=46,57,1 do
            SNP("CS_forcefield",50,i,0,"mainLayer","ForcefieldR")
        end
        WAI(16)
        CNP("Floor1GolemPaper1","CS_enemy_golempaper",0)
        CNP("Floor1GolemPaper2","CS_enemy_golempaper",0)
        ANP("Floor1GolemPaper1",1060)
        ANP("Floor1GolemPaper2",1060)
        WAI(120)
        ANP("Floor1GolemPaper1","action")
        ANP("Floor1GolemPaper2","action")
    else
        WAS()
        WAI(32)
        FAC("tap_normal")MS3("Looks like we have guests,")NOD()
        CAT("\nlet [Paper] welcome them first.")NOD()CLO()
        --左力场
        for i=47,57,1 do
            SNP("CS_forcefield",12,i,0,"mainLayer","ForcefieldL")
        end
        --右力场
        for i=46,57,1 do
            SNP("CS_forcefield",50,i,0,"mainLayer","ForcefieldR")
        end
        WAI(16)
        CNP("Floor1GolemPaper1","CS_enemy_golempaper",0)
        CNP("Floor1GolemPaper2","CS_enemy_golempaper",0)
        ANP("Floor1GolemPaper1",1060)
        ANP("Floor1GolemPaper2",1060)
        WAI(120)
        ANP("Floor1GolemPaper1","action")
        ANP("Floor1GolemPaper2","action")
        PRI()
        FAC("king_normal")MS3("Enemies approaching!") 
        CAT("\nPrepare for battle!")NOD()
        SKP("SkipPaper")
    end
end

--击败布1
function Floor1GolemPaper1()
    FLP("Floor1GolemPaper1")
    GoNextStair1()
end

--击败布2
function Floor1GolemPaper2()
    FLP("Floor1GolemPaper2")
    GoNextStair1()
end

--去下一层阶梯
function GoNextStair1()
    if(FLJ("Floor1GolemPaper1") and FLJ("Floor1GolemPaper2")) then
        KEY()
        FON("Floor1Camera2")
        WAI(32)
        DNP("ForcefieldR")
        WAI(32)
        FOM()
        ANP("Floor1CameraH","enable_focus")
    end
end

function GoUpFloor2()
    KEY()
    WAI(32)
    HMC(0)HMC(1)
    WAI(32)
    MOV(PLY())
    MOV(61,39,0,61)
    WAI(60)
    SMC(0)SMC(1)
    SLR(0)
end

function Floor2Golem()
    KEY()
    DNP("Floor2Golem")
    MOV(PLY())
    MM0()
    ANP("Floor2CameraH","disable_focus")
    FON("Floor2Camera1")
    if(SKJ("SkipScissors")) then
        --左力场
        for i=25,35,1 do
            SNP("CS_forcefield",12,i,0,"mainLayer","ForcefieldL")
        end
        --右力场
        for i=24,35,1 do
            SNP("CS_forcefield",50,i,0,"mainLayer","ForcefieldR")
        end
        WAI(16)
        CNP("Floor2GolemScissors1","CS_enemy_golemscissors",0)
        CNP("Floor2GolemScissors2","CS_enemy_golemscissors",0)
        ANP("Floor2GolemScissors1",1060)
        ANP("Floor2GolemScissors2",1060)
        WAI(120)
        ANP("Floor2GolemScissors1","action")
        ANP("Floor2GolemScissors2","action")
    else
        WAS()
        WAI(32)
        FAC("tap_normal")MS3("Not bad,")NOD()
        CAT("\nyou seem different from those")
        CAT("\nweaklings who fell with one hit.")NOD()CLR()
        CAT("It's your turn now,")NOD()
        CAT("\nScissors.")NOD()CLO()
        --左力场
        for i=25,35,1 do
            SNP("CS_forcefield",12,i,0,"mainLayer","ForcefieldL")
        end
        --右力场
        for i=24,35,1 do
            SNP("CS_forcefield",50,i,0,"mainLayer","ForcefieldR")
        end
        WAI(16)
        CNP("Floor2GolemScissors1","CS_enemy_golemscissors",0)
        CNP("Floor2GolemScissors2","CS_enemy_golemscissors",0)
        ANP("Floor2GolemScissors1",1060)
        ANP("Floor2GolemScissors2",1060)
        WAI(120)
        ANP("Floor2GolemScissors1","action")
        ANP("Floor2GolemScissors2","action")
        PRI()
        FAC("king_normal")MS3("First [Paper], now [Scissors]...")NOD()
        CAT("\nDoesn't matter who comes,") 
        CAT("\nI'll defeat them all!")NOD()
        SKP("SkipScissors")
    end
end

--击败剪刀1
function Floor2GolemScissors1()
    FLP("Floor2GolemScissors1")
    GoNextStair2()
end

--击败剪刀2
function Floor2GolemScissors2()
    FLP("Floor2GolemScissors2")
    GoNextStair2()
end

--去下一层阶梯
function GoNextStair2()
    if(FLJ("Floor2GolemScissors1") and FLJ("Floor2GolemScissors2")) then
        KEY()
        FON("Floor2Camera2")
        WAI(32)
        DNP("ForcefieldL")
        WAI(32)
        FOM()
        ANP("Floor2CameraH","enable_focus")
    end
end

function GoUpFloor3()
    KEY()
    WAI(32)
    HMC(0)HMC(1)
    WAI(32)
    MOV(PLY())
    MOV(3,16,0,3)
    WAI(60)
    SMC(0)SMC(1)
    SLR(1)
end

function Floor3Golem()
    KEY()
    DNP("Floor3Golem")
    MOV(PLY())
    MM0()
    ANP("Floor3CameraH","disable_focus")
    FON("Floor3Camera1")
    if(SKJ("SkipRock")) then
        --左力场
        for i=3,13,1 do
            SNP("CS_forcefield",12,i,0,"mainLayer","ForcefieldL")
        end
        --右力场
        for i=2,13,1 do
            SNP("CS_forcefield",50,i,0,"mainLayer","ForcefieldR")
        end
        WAI(16)
        CNP("Floor3GolemRock1","CS_enemy_golemrock",0)
        CNP("Floor3GolemRock2","CS_enemy_golemrock",0)
        ANP("Floor3GolemRock1",1060)
        ANP("Floor3GolemRock2",1060)
        WAI(120)
        ANP("Floor3GolemRock1","action")
        ANP("Floor3GolemRock2","action2")
    else
        WAS()
        WAI(32)
        FAC("tap_normal")MS3("You are a formidable opponent,")NOD()
        CAT("\nno need for further words.")NOD()CLR()
        CAT("It's your turn now,")NOD()
        CAT("\nRocks.")NOD()CLO()
        --左力场
        for i=3,13,1 do
            SNP("CS_forcefield",12,i,0,"mainLayer","ForcefieldL")
        end
        --右力场
        for i=2,13,1 do
            SNP("CS_forcefield",50,i,0,"mainLayer","ForcefieldR")
        end
        WAI(16)
        CNP("Floor3GolemRock1","CS_enemy_golemrock",0)
        CNP("Floor3GolemRock2","CS_enemy_golemrock",0)
        ANP("Floor3GolemRock1",1060)
        ANP("Floor3GolemRock2",1060)
        WAI(120)
        ANP("Floor3GolemRock1","action")
        ANP("Floor3GolemRock2","action2")
        PRI()
        FAC("king_normal")MS3("So it's [Rock] this time...")NOD()
        CAT("\nEven rocks can be cut by my blade!")NOD()
        SKP("SkipRock")
    end
end

--击败石头1
function Floor3GolemRock1()
    FLP("Floor3GolemRock1")
    GoNextStair3()
end

--击败石头2
function Floor3GolemRock2()
    FLP("Floor3GolemRock2")
    GoNextStair3()
end

--去下一层阶梯
function GoNextStair3()
    if(FLJ("Floor3GolemRock1") and FLJ("Floor3GolemRock2")) then
        KEY()
        FON("Floor3Camera3")
        WAI(32)
        DNP("ForcefieldR")
        WAI(32)
        FOM()
        ANP("Floor3CameraH","enable_focus")
    end
end