Amethyst || 100% pen platformer 3


@Stage\n\nwhen flag clicked\nforever\n    play sound [Nebula v] until done\nend\n\nset volume to (50) %\n\n@PEN\n\ndefine ゴール\nステージ\n背景\nYou won\nstop [all v]\n\nwhen flag clicked\ndelete (join [] [all]) of [判定 v]\nステージ\nforever\n    PLAYERプログラム\nend\n\ndefine PLAYERプログラム\nif <<<mouse down?> and <[50] < (mouse x)>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n    change [x v] by (1)\nend\nif <<<mouse down?> and <(mouse x) < [-50]>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n    change [x v] by (-1)\nend\nset [x v] to ((X) * (0.89))\nchange [player-x v] by (X)\nrepeat (7)\n    当たり判定\n    if <[判定 v] contains [1]?> then\n        change [player-y v] by (1)\n    end\nend\n当たり判定\nif <[判定 v] contains [1]?> then\n    change [player-x v] by (() - (X))\n    change [player-y v] by (-7)\n    if <<<mouse down?> and <(mouse y) > [50]>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        set [y v] to [10]\n        set [x v] to ((6) - ((12) * <(X) = ([abs v] of (X) )>))\n    else\n        set [x v] to [0]\n    end\nend\nchange [player-y v] by (-1)\n当たり判定\nif <[判定 v] contains [1]?> then\n    if <<<mouse down?> and <(mouse y) > [50]>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        set [y v] to [15]\n    end\nend\nchange [player-y v] by (1)\nchange [y v] by (-1)\nchange [player-y v] by (Y)\n当たり判定\nif <[判定 v] contains [1]?> then\n    change [player-y v] by (() - (Y))\n    set [y v] to [0]\nend\n当たり判定\nif <<(scroll-y) < [-400]> or <[判定 v] contains [2]?>> then\n    初期化\nend\n当たり判定\nif <[判定 v] contains [3]?> then\n    set [y v] to [25]\nend\nif <[判定 v] contains [4]?> then\n    ゴール\nend\n\ndefine 判定 (x1) (x2) (y1) (y2) (x) (y)\nif <<([abs v] of ((((x1) + (x2)) / (2)) - (x)) ) < (([abs v] of ((x1) - (((x1) + (x2)) / (2))) ) + (20))> and <([abs v] of ((((y1) + (y2)) / (2)) - (y)) ) < (([abs v] of ((y1) - (((y1) + (y2)) / (2))) ) + (20))>> then\n    add (item ((判定1) + (5)) of [ステージ v]) to [判定 v]\nend\n\ndefine X Y (x) (y)\ngo to x: ((x) - (scroll-x)) y: ((y) - (scroll-y))\n\ndefine PLAYER (x) (y) (辺)\nset pen size to (10)\nset pen color to (#b200ff)\nset pen (transparency v) to (50)\ngo to x: ((x) + (辺)) y: ((y) + (辺))\npen down\nset x to ((x) - (辺))\nset y to ((y) - (辺))\nset x to ((x) + (辺))\nset y to ((y) + (辺))\npen up\nset pen (transparency v) to (0)\nset pen size to (7.5)\ngo to x: ((x) + (辺)) y: ((y) + (辺))\npen down\nset x to ((x) - (辺))\nset y to ((y) - (辺))\nset x to ((x) + (辺))\nset y to ((y) + (辺))\npen up\n\ndefine 当たり判定\ndelete all of [判定 v]\nset [判定1 v] to [0]\nrepeat ((length of [ステージ v]) / (5))\n    判定 ((item ((判定1) + (1)) of [ステージ v]) + ((item ((判定1) + (3)) of [ステージ v]) / (2))) ((item ((判定1) + (1)) of [ステージ v]) - ((item ((判定1) + (3)) of [ステージ v]) / (2))) ((item ((判定1) + (2)) of [ステージ v]) + ((item ((判定1) + (4)) of [ステージ v]) / (2))) ((item ((判定1) + (2)) of [ステージ v]) - ((item ((判定1) + (4)) of [ステージ v]) / (2))) ((scroll-x) + (PLAYER-X)) ((scroll-y) + (PLAYER-Y))\n    change [判定1 v] by (5)\nend\n\ndefine ステージ追加 (x) (y) 横長さ (横長さ) 縦長さ (縦長さ) 種類 (種類)\nadd (x) to [ステージ v]\nadd (y) to [ステージ v]\nadd (横長さ) to [ステージ v]\nadd (縦長さ) to [ステージ v]\nadd (種類) to [ステージ v]\n\ndefine 初期化\nset [x v] to [0]\nset [y v] to [0]\nset [player-x v] to [0]\nset [player-y v] to [0]\nset [scroll-x v] to [0]\nset [scroll-y v] to [0]\n\nwhen flag clicked\n初期化\n\ndefine ステージ描写\nset [描写1 v] to [0]\nrepeat ((length of [ステージ v]) / (5))\n    X Y ((item ((描写1) + (1)) of [ステージ v]) + ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) + ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    ステージ色\n    set pen size to (10)\n    set pen (transparency v) to (50)\n    pen down\n    X Y ((item ((描写1) + (1)) of [ステージ v]) + ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) - ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    X Y ((item ((描写1) + (1)) of [ステージ v]) - ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) - ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    X Y ((item ((描写1) + (1)) of [ステージ v]) - ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) + ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    X Y ((item ((描写1) + (1)) of [ステージ v]) + ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) + ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    pen up\n    set pen size to (7.5)\n    set pen (transparency v) to (0)\n    pen down\n    X Y ((item ((描写1) + (1)) of [ステージ v]) + ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) - ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    X Y ((item ((描写1) + (1)) of [ステージ v]) - ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) - ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    X Y ((item ((描写1) + (1)) of [ステージ v]) - ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) + ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    X Y ((item ((描写1) + (1)) of [ステージ v]) + ((item ((描写1) + (3)) of [ステージ v]) / (2))) ((item ((描写1) + (2)) of [ステージ v]) + ((item ((描写1) + (4)) of [ステージ v]) / (2)))\n    pen up\n    change [描写1 v] by (5)\nend\nPLAYER (PLAYER-X) (PLAYER-Y) [12.5]\n\ndefine ステージ色\nif <(item ((描写1) + (5)) of [ステージ v]) = [1]> then\n    set pen color to (#0400ff)\nelse\n    if <(item ((描写1) + (5)) of [ステージ v]) = [2]> then\n        set pen color to (#ff0000)\n    else\n        if <(item ((描写1) + (5)) of [ステージ v]) = [3]> then\n            set pen color to (#65ff00)\n        else\n            if <(item ((描写1) + (5)) of [ステージ v]) = [4]> then\n                set pen color to (#ff00f6)\n            else\n                if <[4] < (item ((描写1) + (5)) of [ステージ v])> then\n                    set pen color to (#ffe900)\n                end\n            end\n        end\n    end\nend\n\ndefine 背景\nset pen size to ((1) / (0))\nset pen color to (#000000)\ngo to x: (0) y: (0)\npen down\npen up\n\nwhen flag clicked\nforever\n    change [scroll-x v] by (round (((PLAYER-X) + (X)) / (13)))\n    change [player-x v] by (() - (round (((PLAYER-X) + (X)) / (13))))\n    change [player-y v] by (() - (round ((((PLAYER-Y) + (Y)) + (20)) / (13))))\n    change [scroll-y v] by (round ((((PLAYER-Y) + (Y)) + (20)) / (13)))\nend\n\ndefine 升\nset [雑用 v] to (((scroll-x) - ((scroll-x) mod (50))) - (200))\nset pen color to (#696969)\nset pen (transparency v) to (80)\nset pen size to (12)\nrepeat (10)\n    X Y (雑用) [10000]\n    pen down\n    X Y (雑用) [-10000]\n    pen up\n    change [雑用 v] by (50)\nend\nset [雑用 v] to (((scroll-y) - ((scroll-y) mod (50))) - (200))\nrepeat (10)\n    X Y [10000] (雑用)\n    pen down\n    X Y [-10000] (雑用)\n    pen up\n    change [雑用 v] by (50)\nend\n\nwhen flag clicked\nステージ\nforever\n    erase all\n    背景\n    升\n    ステージ描写\nend\n\ndefine You won\nset pen color to (#ffffff)\nset pen size to (10)\ngo to x: (-220) y: (30)\npen down\ngo to x: (-200) y: (0)\ngo to x: (-180) y: (30)\npen up\ngo to x: (-200) y: (0)\npen down\ngo to x: (-200) y: (-30)\npen up\nwait (0) seconds\nset [θ v] to [0]\nrepeat (360)\n    go to x: ((-130) + ((30) * ([cos v] of (θ) ))) y: ((0) + ((30) * ([sin v] of (θ) )))\n    pen down\n    change [θ v] by (1)\nend\npen up\nwait (0) seconds\nset [θ v] to [0]\nrepeat (180)\n    go to x: ((-50) + ((30) * ([cos v] of (θ) ))) y: ((0) + ((30) * ([sin v] of (θ) )))\n    pen down\n    change [θ v] by (-1)\nend\npen up\ngo to x: (-80) y: (0)\npen down\ngo to x: (-80) y: (30)\npen up\ngo to x: (-20) y: (0)\npen down\ngo to x: (-20) y: (30)\npen up\nwait (0) seconds\ngo to x: (10) y: (30)\npen down\ngo to x: (25) y: (-30)\ngo to x: (40) y: (30)\ngo to x: (55) y: (-30)\ngo to x: (70) y: (30)\npen up\nwait (0) seconds\nset [θ v] to [0]\nrepeat (360)\n    go to x: ((120) + ((30) * ([cos v] of (θ) ))) y: ((0) + ((30) * ([sin v] of (θ) )))\n    pen down\n    change [θ v] by (1)\nend\npen up\nwait (0) seconds\ngo to x: (170) y: (-30)\npen down\ngo to x: (170) y: (30)\ngo to x: (210) y: (-30)\ngo to x: (210) y: (30)\npen up\n\ndefine ステージ\ndelete (join [] [all]) of [ステージ v]\nステージ追加 [0] [-200] 横長さ [300] 縦長さ [200] 種類 [1]\nステージ追加 [-177] [200] 横長さ [50] 縦長さ [1175] 種類 [1]\nステージ追加 [75] [250] 横長さ [100] 縦長さ [50] 種類 [1]\nステージ追加 [-98] [400] 横長さ [100] 縦長さ [50] 種類 [1]\nステージ追加 [75] [550] 横長さ [100] 縦長さ [50] 種類 [1]\nステージ追加 [48] [750] 横長さ [400] 縦長さ [25] 種類 [1]\nステージ追加 [48] [775] 横長さ [400] 縦長さ [25] 種類 [2]\nステージ追加 [263] [590] 横長さ [50] 縦長さ [150] 種類 [1]\nステージ追加 [223] [590] 横長さ [25] 縦長さ [150] 種類 [2]\nステージ追加 [450] [670] 横長さ [50] 縦長さ [50] 種類 [3]\nステージ追加 [223] [822] 横長さ [50] 縦長さ [50] 種類 [3]\nステージ追加 [0] [822] 横長さ [50] 縦長さ [50] 種類 [3]\nステージ追加 [-235] [-300] 横長さ [50] 縦長さ [50] 種類 [1]\nステージ追加 [-435] [-200] 横長さ [50] 縦長さ [50] 種類 [1]\nステージ追加 [-635] [-100] 横長さ [100] 縦長さ [50] 種類 [3]\nステージ追加 [-865] [200] 横長さ [50] 縦長さ [50] 種類 [1]\nステージ追加 [-865] [375] 横長さ [50] 縦長さ [50] 種類 [1]\nステージ追加 [-865] [550] 横長さ [50] 縦長さ [50] 種類 [1]\nステージ追加 [-865] [725] 横長さ [50] 縦長さ [50] 種類 [1]\nステージ追加 [-865] [900] 横長さ [50] 縦長さ [50] 種類 [1]\nステージ追加 [-1010] [1050] 横長さ [100] 縦長さ [50] 種類 [3]\nステージ追加 [-790] [1200] 横長さ [100] 縦長さ [50] 種類 [3]\nステージ追加 [-590] [1350] 横長さ [100] 縦長さ [50] 種類 [3]\nステージ追加 [-870] [1500] 横長さ [300] 縦長さ [50] 種類 [1]\nステージ追加 [-920] [1675] 横長さ [50] 縦長さ [300] 種類 [4]\n\nステージ追加 [650] [-350] 横長さ [500] 縦長さ [50] 種類 [1]\nステージ追加 [1025] [-350] 横長さ [50] 縦長さ [50] 種類 [3]\n\n@thumbnail\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\n\n