Covid-19 | platformer | entry

Instructions:                        ◑ Instructions \ 指示 ◐\n Arrows \ Mobile | 矢印\モバイル\n Dodge The Green Germs and Covid-19 Cannons\n 緑の細菌とCovid-19キャノンをかわす\n\n                    ◑ Credits \ クレジット   ◐\n@griffpatch for the basic platformer engine (modified by me) Me for the Enemy and Cannon code\nMusic is Summit by @-XAF-\n基本的なプラットフォーマーエンジンの @griffpatch（私が変更）敵と大砲のコードの私\n音楽は@ -XAF-によるサミットです

@Stage\n\nwhen flag clicked\nwait (0.05) seconds\nforever\n    play sound [Summit v] until done\nend\n\n@Player\n\ndefine Reset\nset [sy v] to [0]\nset [sx v] to [0]\nset [falling? v] to [0]\nset [jump key v] to [0]\nset [die v] to []\nhide variable [level v]\nhide variable [die v]\nhide variable [jump key v]\nhide variable [falling? v]\nhide variable [sx v]\nhide variable [sy v]\nset size to (50) %\nclear graphic effects\nshow\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    go to x: (-225) y: (-130)\n    repeat until <(Die) > []>\n        Code\n    end\n    if <(Die) = [next]> then\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [reset v]\ngo to [front v] layer\n\nwhen I receive [setup v]\nhide\nReset\n\ndefine Code\nif <<(sy) < [4]> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n    change [sy v] by (-1)\nelse\n    change [sy v] by (-2)\nend\nchange y by (sy)\nTouch Ground <(sy) > [0]>\nif <([abs v] of (sx) ) > [0.5]> then\n    Walk (sx)\nend\nset [sx v] to ((sx) * (0.8))\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [sx v] by (1)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>> then\n    change [sx v] by (-1)\nend\nif <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(falling?) < [4]> then\n        if <(jump key) = [0]> then\n            start sound [Jump v]\n            set [sy v] to [10]\n            set [jump key v] to [10]\n        end\n    end\nelse\n    set [jump key v] to [0]\nend\nif <<touching (spikes v)?> or <<touching (cannon v)?> or <<touching (enemy v)?> or <(y position) < [-179]>>>> then\n    set [die v] to [die]\nend\nif <touching (portal v)?> then\n    set [die v] to [next]\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (platform v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [sy v] to [0]\nend\n\ndefine Walk (speed)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (platform v)?>>>\n    change [slope v] by (1)\n    change y by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <([abs v] of (sx) ) > [3]>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-7]\n        else\n            set [sx v] to [7]\n        end\n        set [sy v] to [9]\n        set [falling? v] to [0]\n    else\n        set [sx v] to [0]\n    end\nend\n\n@Platform\n\nwhen I receive [setup v]\ngo to x: (0) y: (0)\nswitch costume to (Level)\nshow\n\n@Spikes\n\nwhen I receive [setup v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (Level)\n\n@Portal\n\nwhen I receive [setup v]\nswitch costume to (Level)\nreset timer\nshow\n\nwhen flag clicked\nforever\n    go to x: (0) y: (([cos v] of ((timer) * (200)) ) * (3))\nend\n\n@Cannon\n\nwhen flag clicked\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nhide\nset [clone # v] to [1]\nif <(Level) = [2]> then\n    Clone at x [0] y [190]\nelse\n    if <(Level) = [6]> then\n        Clone at x [-200] y [190]\n        Clone at x [200] y [190]\n        Clone at x [-100] y [190]\n        Clone at x [100] y [190]\n        Clone at x [0] y [190]\n    else\n        if <(Level) = [9]> then\n            Clone at x [-288] y [167]\n        else\n            if <(Level) = [10]> then\n                Clone at x [0] y [180]\n            else\n                if <(Level) = [12]> then\n                    Clone at x [-234] y [85]\n                end\n            end\n        end\n    end\nend\n\ndefine Clone at x (x) y (y)\ngo to x: (x) y: (y)\nset [clone id v] to [1]\nchange [clone # v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone ID) = [1]> then\n    show\n    switch costume to (costume1 v)\n    set [timer v] to ((Clone #) * (10))\n    go to [back v] layer\n    repeat until <(Die) > []>\n        point towards (player v)\n        change [timer v] by (1)\n        if <(timer) > [50]> then\n            set [clone id v] to [5]\n            create clone of (_myself_ v)\n            set [timer v] to [0]\n        end\n    end\n    delete this clone\nelse\n    show\n    switch costume to (costume2 v)\n    set size to (85) %\n    repeat (10)\n        move (12) steps\n        if <touching (platform v)?> then\n            delete this clone\n        end\n    end\n    repeat until <<touching (_edge_ v)?> or <<touching (player v)?> or <touching (platform v)?>>>\n        move (12) steps\n        go to [back v] layer\n    end\n    delete this clone\nend\n\n@Enemy\n\nwhen flag clicked\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [setup v]\nhide\nif <(Level) = [4]> then\n    Clone at x [50] y [0]\n    Clone at x [160] y [0]\nelse\n    if <(Level) = [5]> then\n        Clone at x [118] y [-116]\n    else\n        if <(Level) = [7]> then\n            Clone at x [0] y [60]\n            Clone at x [69] y [-60]\n            Clone at x [-69] y [-91]\n        else\n            if <(Level) = [12]> then\n                Clone at x [64] y [-127]\n            end\n        end\n    end\nend\n\ndefine Clone at x (x) y (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nset size to (50) %\nswitch costume to (costume1 v)\nrepeat until <(Die) > []>\n    change [sy v] by (-1)\n    change y by (sy)\n    Touch Ground <(sy) > [0]>\n    if <([x position v] of [player v]) > (x position)> then\n        change [sx v] by (0.7)\n    end\n    if <(x position) > ([x position v] of [player v])> then\n        change [sx v] by (-0.7)\n    end\n    set [sx v] to ((sx) * (0.8))\n    Walk (sx) wall jump when <<<([y position v] of [player v]) > (y position)> or <<([abs v] of ([x position v] of [player v]) ) > (x position)> and <(slope) = [8]>>> and <(distance to [player v]) < [300]>>\n    if <([y position v] of [player v]) > (y position)> then\n        if <(falling?) < [4]> then\n            set [sy v] to [4]\n        end\n    end\nend\ndelete this clone\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <<touching (platform v)?> or <touching (spikes v)?>>>\n    if <up?> then\n        change y by (-1)\n    else\n        set [falling? v] to [0]\n        change y by (1)\n    end\n    set [sy v] to [0]\nend\n\ndefine Walk (sx) wall jump when <thing>\nchange x by (sx)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <<touching (platform v)?> or <touching (spikes v)?>>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (sx))\n    change y by ((0) - (slope))\n    if <thing> then\n        if <([x position v] of [player v]) > (x position)> then\n            set [sx v] to [-4]\n        else\n            set [sx v] to [4]\n        end\n        set [sy v] to [8]\n        set [falling? v] to [0]\n    else\n        set [sx v] to [0]\n    end\nend\n\n@Text\n\nwhen I receive [setup v]\ngo to x: (0) y: (0)\nswitch costume to (Level)\nshow\n\n@tb\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n