Earth Ⅱ Mobile Platformer

Instructions: •Difficulty:★★★★★\n•Arrow keys, WASD keys, and touch the screen to move.\n•Avoid spikes and lava.\n•Aim a high score and comment your time.\n\n•難易度：★★★★★\n•矢印キー、WASDキー、画面タッチで操作\n•とげとマグマを避けよう\n•ハイスコアを狙い、あなたのタイムをコメントしよう

@Stage\n\nwhen flag clicked\nforever\n    if <not <(level) = [17]>> then\n        if <<(level) = [1]> or <<(level) = [2]> or <<(level) = [3]> or <(level) = [4]>>>> then\n            switch backdrop to (background_plain v)\n        else\n            if <<(level) = [5]> or <<(level) = [6]> or <(level) = [7]>>> then\n                switch backdrop to (background_cave v)\n            else\n                if <<(level) = [8]> or <<(level) = [9]> or <(level) = [10]>>> then\n                    switch backdrop to (background_desert v)\n                else\n                    switch backdrop to (background_plain v)\n                end\n            end\n        end\n    else\n        switch backdrop to (background_finish v)\n    end\nend\n\n@Player\n\nwhen flag clicked\nshow list [time v]\nhide\n\nwhen I receive [spikes v]\nstart sound [Rip v]\nstart position\n\nwhen I receive [finish v]\ngo to x: (0) y: (0)\nhide\n\ndefine start position\npoint in direction (90)\ngo to x: (-210) y: (15)\nset size to (90) %\ngo to [back v] layer\ngo [forward v] (3) layers\nshow\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nset rotation style [left-right v]\nswitch costume to (1 v)\nstart position\nset [ghost v] effect to (0)\nforever\n    if <(player's moving) = [n]> then\nend\n\nwhen flag clicked\nforever\n    if <touching (sea v)?> then\n        start sound [water-throw-stone2 \(1\) v]\n        wait until <not <touching (sea v)?>>\n    end\nend\n\n@Level\n\nwhen I receive [finish v]\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nset size to (100) %\nshow\nforever\n    set [ghost v] effect to (0)\n    switch costume to (level)\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\n\n@Spikes and Lava\n\nwhen I receive [finish v]\ngo to x: (0) y: (0)\nhide\n\ndefine x : 0  y : 0  表示する (コスチュームno.)\nswitch costume to (コスチュームno.)\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (4) layers\nforever\n    switch costume to (level)\n    go to x: (0) y: (0)\n    show\nend\n\nif <<(level) = [1]> or <(level) = [10]>> then\n    hide\nend\nif <(level) = [2]> then\n    x : 0  y : 0  表示する [2]\nend\nif <(level) = [3]> then\n    x : 0  y : 0  表示する [3]\nend\nif <(level) = [4]> then\n    x : 0  y : 0  表示する [4]\nend\nif <(level) = [5]> then\n    x : 0  y : 0  表示する [5]\nend\nif <(level) = [6]> then\n    x : 0  y : 0  表示する [6]\nend\nif <(level) = [7]> then\n    x : 0  y : 0  表示する [7]\nend\nif <(level) = [8]> then\n    x : 0  y : 0  表示する [8]\nend\nif <(level) = [9]> then\n    x : 0  y : 0  表示する [9]\nend\n\n@BGM\n\nwhen flag clicked\nstop all sounds\nforever\n    play sound [bgm v] until done\nend\n\n@Timer\n\nwhen flag clicked\nforever\n    if <(level) = [17]> then\n        delete all of [time v]\n        set [time_バグ修正用 v] to (timer)\n        add (time_バグ修正用) to [time v]\n        if <(time_バグ修正用) > [132]> then\n            add [Rank : s ᴀ ʙ ᴄ ᴅ E] to [time v]\n        else\n            if <(time_バグ修正用) < [120]> then\n                if <(time_バグ修正用) < [109]> then\n                    if <(time_バグ修正用) < [100]> then\n                        if <(time_バグ修正用) < [93]> then\n                            if <(time_バグ修正用) < [88]> then\n                                add [Rank : S ᴀ ʙ ᴄ ᴅ ᴇ] to [time v]\n                            else\n                                add [Rank : s A ʙ ᴄ ᴅ ᴇ] to [time v]\n                            end\n                        else\n                            add [Rank : s ᴀ B ᴄ ᴅ ᴇ] to [time v]\n                        end\n                    else\n                        add [Rank : s ᴀ ʙ C ᴅ ᴇ] to [time v]\n                    end\n                else\n                    add [Rank : s ᴀ ʙ ᴄ D ᴇ] to [time v]\n                end\n            else\n            end\n        end\n        wait until <not <(level) = [17]>>\n    else\n    end\nend\n\nwhen flag clicked\ndelete all of [time v]\nshow list [time v]\nreset timer\n\nwhen I receive [tiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiime v]\nhide list [time v]\n\n@Effect_Lava\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (2) layers\nforever\n    switch costume to (level)\n    show\n    set [ghost v] effect to (50)\nend\n\ngo to x: (0) y: (0)\n\n@Effect_Background_Mountains\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (1) layers\nforever\n    if <<<<(level) = [1]> or <<(level) = [2]> or <<(level) = [3]> or <(level) = [4]>>>> or <<(level) = [14]> or <<(level) = [15]> or <<(level) = [16]> or <(level) = [17]>>>>> or <<(level) = [8]> or <<(level) = [9]> or <(level) = [10]>>>> then\n        show\n    else\n        hide\n    end\n    if <<<(level) = [1]> or <<(level) = [2]> or <<(level) = [3]> or <(level) = [4]>>>> or <<(level) = [14]> or <<(level) = [15]> or <<(level) = [16]> or <(level) = [17]>>>>> then\n        switch costume to (2 v)\n    else\n        switch costume to (3 v)\n    end\nend\n\n@Explanation\n\nwhen flag clicked\n\ngo to [back v] layer\nshow\nforever\n    レベル名→ [1] | show? : [y]\n    レベル名→ [2] | show? : [y]\n    レベル名→ [3] | show? : [y]\n    レベル名→ [4] | show? : [y]\n    レベル名→ [5] | show? : [y]\n    レベル名→ [6] | show? : [n]\n    レベル名→ [7] | show? : [n]\n    レベル名→ [8] | show? : [n]\n    レベル名→ [9] | show? : [n]\n    レベル名→ [10] | show? : [n]\n    レベル名→ [11] | show? : [n]\n    レベル名→ [12] | show? : [n]\n    レベル名→ [13] | show? : [n]\n    レベル名→ [14] | show? : [n]\n    レベル名→ [15] | show? : [y]\n    point in direction (90)\n    change [angle v] by (12)\n    set size to ((100) + (([sin v] of (angle) ) * (5))) %\nend\n\ndefine レベル名→ (1~15\(level\)) | show? : (y/n)\nif <(level) = (1~15\(level\))> then\n    switch costume to (1~15\(level\))\n    go to x: (0) y: (105)\n    if <(y/n) = [y]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [finish v]\nstop [other scripts in sprite v]\nhide\n\n@Next\n\nwhen flag clicked\nset [player's moving v] to [y]\nhide\n\nwhen I receive [neeeeeeeeeeeeeeeeeeeeeeeeeext v]\nif <not <(level) = [17]>> then\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    if <<(level) = [1]> or <<(level) = [2]> or <<(level) = [3]> or <(level) = [4]>>>> then\n        switch costume to (next_plain v)\n    else\n        if <<(level) = [5]> or <<(level) = [6]> or <(level) = [7]>>> then\n            switch costume to (next_cave v)\n        else\n            if <<(level) = [8]> or <<(level) = [9]> or <(level) = [10]>>> then\n                switch costume to (next_desert v)\n            else\n                if <<(level) = [11]> or <<(level) = [12]> or <(level) = [13]>>> then\n                    switch costume to (next_sea v)\n                else\n                    switch costume to (next_plain v)\n                end\n            end\n        end\n    end\n    go [backward v] (1) layers\n    set [player's moving v] to [n]\n    go to x: (-381) y: (0)\n    set size to (100) %\n    show\n    repeat until <(x position) > [1]>\n        change x by (((2) - (x position)) / (4))\n    end\n    repeat until <(x position) > [381]>\n        change x by (((2) + (x position)) / (4))\n    end\n    hide\n    set [player's moving v] to [y]\nelse\n    set [ghost v] effect to (0)\n    switch costume to (finish v)\n    go to [front v] layer\n    go [backward v] (1) layers\n    go to x: (-381) y: (0)\n    set size to (100) %\n    show\n    repeat until <(x position) > [1]>\n        change x by (((2) - (x position)) / (4))\n    end\n    repeat until <(x position) > [381]>\n        change x by (((2) + (x position)) / (4))\n    end\n    hide\n    broadcast (tiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiime v)\nend\n\nwhen I start as a clone\nrepeat (7)\n    change [ghost v] effect by (15)\n    change [brightness v] effect by (1.5)\nend\ndelete this clone\n\n@Detector\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen I receive [finish v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\ngo to [front v] layer\ngo [forward v] (1) layers\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (-2) y: (0)\nif <<(level) = [1]> or <<(level) = [2]> or <<(level) = [3]> or <(level) = [4]>>>> then\n    switch costume to (1 v)\nelse\n    if <<(level) = [5]> or <<(level) = [6]> or <(level) = [7]>>> then\n        switch costume to (2 v)\n    else\n        if <<(level) = [8]> or <<(level) = [9]> or <(level) = [10]>>> then\n            switch costume to (3 v)\n        else\n            if <<(level) = [11]> or <<(level) = [12]> or <(level) = [13]>>> then\n                switch costume to (4 v)\n            else\n                switch costume to (5 v)\n            end\n        end\n    end\nend\nset [ghost v] effect to (100)\nstart sound [Magic Spell v]\nrepeat (100)\n    change [ghost v] effect by (-5)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n@Light_Player\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (1) layers\nforever\n    go to x: ([x position v] of [player v]) y: ([y position v] of [player v])\n    if <<(level) = [5]> or <<(level) = [6]> or <(level) = [7]>>> then\n        show\n    else\n        hide\n    end\nend\n\n@引っ掛け\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (8 v)\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    if <(level) = [9]> then\n        show\n    else\n        hide\n    end\n    if <touching (player v)?> then\n        set [ghost v] effect to (32)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@Sea\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (2) layers\nforever\n    if <<(level) = [11]> or <<(level) = [12]> or <(level) = [13]>>> then\n        set [ghost v] effect to (15)\n        show\n    else\n        set [ghost v] effect to (0)\n        hide\n    end\nend\n\n