diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/LICENSE" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/LICENSE" new file mode 100644 index 0000000..d35e73e --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/LICENSE" @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 FrenchPicnic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/README.md" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/README.md" index fd290d9..df46261 100644 --- "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/README.md" +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/README.md" @@ -124,4 +124,19 @@ [攻击动画](https://pixlab24.com/character/27243/) -首页城堡使用了AI初次绘制,手动二次加工 \ No newline at end of file +首页城堡使用了AI初次绘制,手动二次加工 + +## 源代码 + +参考source文件夹下的src/lib + +运行`moon version --all`后输出如下 +``` +moon 0.1.20241111 (e6d64e0 2024-11-11) ~\.moon\bin\moon.exe +moonc v0.1.20241111+dc2407357 ~\.moon\bin\moonc.exe +moonrun 0.1.20241111 (e6d64e0 2024-11-11) ~\.moon\bin\moonrun.exe +``` + +## License + +MIT License \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/README.md" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/README.md" new file mode 100644 index 0000000..7c06aaf --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/README.md" @@ -0,0 +1,15 @@ +## 命令 + +```bash +moon build --target wasm +npx wasm4 run ./target/wasm/release/build/main/main.wasm +``` + +## MoonBit +moon version --all + +``` +moon 0.1.20241111 (e6d64e0 2024-11-11) ~\.moon\bin\moon.exe +moonc v0.1.20241111+dc2407357 ~\.moon\bin\moonc.exe +moonrun 0.1.20241111 (e6d64e0 2024-11-11) ~\.moon\bin\moonrun.exe +``` \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/moon.mod.json" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/moon.mod.json" new file mode 100644 index 0000000..ea1e073 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/moon.mod.json" @@ -0,0 +1,13 @@ +{ + "name": "frenchpicnic/wasm", + "version": "0.1.0", + "deps": { + "moonbitlang/wasm4": "0.2.2" + }, + "readme": "README.md", + "repository": "", + "license": "MIT License", + "keywords": [], + "description": "", + "source": "src" +} \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/package-lock.json" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/package-lock.json" new file mode 100644 index 0000000..d83ef4e --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/package-lock.json" @@ -0,0 +1,1474 @@ +{ + "name": "MoonbitWasm4", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "wasm4": "^2.7.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha512-LeZY+DZDRnvP7eMuQ6LHfCzUGxAAIViUBliK24P3hWXL6y4SortgR6Nim6xrkfSLlmH0+k+9NYNwVC2s53ZrYQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "license": "MIT", + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmmirror.com/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "license": "MIT", + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.21.1", + "resolved": "https://registry.npmmirror.com/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.10", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/junk": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/junk/-/junk-1.0.3.tgz", + "integrity": "sha512-3KF80UaaSSxo8jVnRYtMKNGFOoVPBdkkVPsw+Ad0y4oxKXPduS6G6iHkrf69yJVff/VAaYXkV42rtZ7daJxU3w==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/maximatch": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/maximatch/-/maximatch-0.1.0.tgz", + "integrity": "sha512-9ORVtDUFk4u/NFfo0vG/ND/z7UQCVZBL539YW0+U1I7H1BkZwizcPx5foFv7LCPcBnm2U6RjFnQOsIvN4/Vm2A==", + "license": "MIT", + "dependencies": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-watch": { + "version": "0.7.4", + "resolved": "https://registry.npmmirror.com/node-watch/-/node-watch-0.7.4.tgz", + "integrity": "sha512-RinNxoz4W1cep1b928fuFhvAQ5ag/+1UlMDV7rbyGthBIgsiEouS4kvRayvvboxii4m8eolKOIBo3OjDqbc+uQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmmirror.com/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "license": "MIT", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.10", + "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "license": "MIT" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pngjs": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/pngjs/-/pngjs-6.0.0.tgz", + "integrity": "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==", + "license": "MIT", + "engines": { + "node": ">=12.13.0" + } + }, + "node_modules/promise": { + "version": "7.3.1", + "resolved": "https://registry.npmmirror.com/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "license": "MIT", + "dependencies": { + "asap": "~2.0.3" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "license": "MIT" + }, + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmmirror.com/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/qrcode/node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmmirror.com/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/recursive-copy": { + "version": "2.0.14", + "resolved": "https://registry.npmmirror.com/recursive-copy/-/recursive-copy-2.0.14.tgz", + "integrity": "sha512-K8WNY8f8naTpfbA+RaXmkaQuD1IeW9EgNEfyGxSqqTQukpVtoOKros9jUqbpEsSw59YOmpd8nCBgtqJZy5nvog==", + "license": "ISC", + "dependencies": { + "errno": "^0.1.2", + "graceful-fs": "^4.1.4", + "junk": "^1.0.1", + "maximatch": "^0.1.0", + "mkdirp": "^0.5.1", + "pify": "^2.3.0", + "promise": "^7.0.1", + "rimraf": "^2.7.1", + "slash": "^1.0.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmmirror.com/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/slash/-/slash-1.0.0.tgz", + "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/wasm4": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/wasm4/-/wasm4-2.7.0.tgz", + "integrity": "sha512-kX2k5QXkq23fXRwLG04I1fFsUeRKx/Ezoe9X572fPAX1/mOjMlVwlzNHMMGtTaC21eCc1w2gxgSmuziz53yF0A==", + "license": "ISC", + "dependencies": { + "commander": "^8.2.0", + "express": "^4.17.1", + "mustache": "^4.2.0", + "node-watch": "^0.7.1", + "open": "^8.2.1", + "pngjs": "^6.0.0", + "qrcode": "^1.4.4", + "recursive-copy": "^2.0.13", + "ws": "^7.5.3" + }, + "bin": { + "w4": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmmirror.com/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/package.json" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/package.json" new file mode 100644 index 0000000..acb6766 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/package.json" @@ -0,0 +1,5 @@ +{ + "dependencies": { + "wasm4": "^2.7.0" + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/README.md" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/README.md" new file mode 100644 index 0000000..c75bdbc --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/README.md" @@ -0,0 +1,34 @@ +# 地上城与108个魔王/Up Dungeon + +是一款肉鸽+RPG的游戏(未完成版) +你需要扮演一个勇士,一路破关斩将,到最终的魔王前打败它逃离这个电子游戏.... + +## 项目说明 + +美术: 我 +程序: 我 +音乐: 我 + +因为默认四原色就满足我的需求了,所以没有其他颜色 +![www](./resource/four_color.png) + + +## 操作说明 + +在游戏下方会有菜单,可以通过左右键来选取一个选项(选中的会浮高) +按下x键后执行对应的选项,同时结束自己的回合 +目前有三种选项 +- Fight: 攻击敌人 +- Heal: 治疗自己 +- Defense: 防御,让敌人攻击的伤害为1 + +当敌人血量归零后,游戏将会胜利 +反之当自己血量归零时,游戏结束 + +## 敌人说明 + +参考[敌人图鉴](./doc/Enemy.md) + +## 博客地址 + +https://frenchpicnic.github.io/posts/201cd6df/ \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/Enemy.md" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/Enemy.md" new file mode 100644 index 0000000..803c038 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/Enemy.md" @@ -0,0 +1,26 @@ +# 敌人图鉴 + +每个敌人和角色一样,都有 攻击/防御/治疗 三种模式 +与玩家一样,敌人的招式也会有所不同,特殊会进行提示(如感叹号) +治疗则是特殊情况下触发,且会有一定应对策略,请参考公式书 + +## 普通 + +### 史莱姆 + +rpg里必然会出现的小怪 + +攻击: [1-5]点伤害 +防御: 无 +治疗: 无 + +### 羊咩咩 + +很可爱的咩咩,但因为你在冲撞路线上了,所以它很生气 + +血量: 200 +攻击: +- 咩咩冲击: [4-10]点伤害,5%概率暴击 + +防御: 每2次攻击后进行防御 +治疗: 无 \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/Pixel.md" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/Pixel.md" new file mode 100644 index 0000000..dca7aa1 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/Pixel.md" @@ -0,0 +1,4 @@ +# 一些美术素材来源 + + +初始攻击动画(剑): https://pixlab24.com/character/27243/ \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/castle.md" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/castle.md" new file mode 100644 index 0000000..47153e6 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/castle.md" @@ -0,0 +1,314 @@ +``` +const ttWidth = 36; +const ttHeight = 52; +const ttFlags = 1; // BLIT_2BPP +const tt = memory.data([ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xa9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xa9,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xa9,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xa9,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x77,0x77,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xff,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0xaa,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xff,0x80,0x00,0x00,0x00,0x00,0x00,0x10,0x0f,0xdf,0x80,0x01,0x00,0x00,0x00,0x00,0x10,0x0f,0xdf,0x80,0x01,0x00,0x00,0x00,0x00,0x10,0x0f,0xdf,0x80,0x01,0x00,0x00,0x00,0x00,0x10,0x07,0x77,0x40,0x01,0x00,0x00,0x00,0x00,0x54,0x0f,0xff,0xe0,0x05,0x40,0x00,0x00,0x01,0xa9,0x0f,0xff,0xe0,0x1a,0x90,0x00,0x00,0x06,0xaa,0x43,0xff,0xe0,0x6a,0xa4,0x00,0x00,0x07,0xfe,0x42,0xaa,0xa0,0x6a,0xa4,0x00,0x00,0x07,0xfe,0x43,0xff,0x80,0x7f,0xe4,0x00,0x00,0x03,0xde,0x03,0xff,0x80,0x7f,0xe4,0x00,0x00,0x03,0xde,0x03,0xff,0x80,0x7f,0xe4,0x00,0x00,0x03,0xfe,0x03,0xff,0x80,0x3d,0xa0,0x00,0x00,0x03,0xfe,0x03,0xff,0x80,0x3d,0xa0,0x00,0x00,0x03,0xfe,0x0f,0xff,0x80,0x3f,0xe0,0x00,0x00,0x03,0xfe,0x0f,0xff,0x80,0x3f,0xe0,0x00,0x00,0x03,0xfe,0x0f,0xff,0x80,0x3f,0xe4,0x00,0x00,0x07,0xfe,0x0f,0xff,0x80,0xff,0xe4,0x00,0x00,0x07,0xfe,0x0f,0xff,0x80,0xff,0xe4,0x00,0x00,0x07,0xfe,0x0f,0xff,0x80,0xff,0xe4,0x00,0x00,0x07,0xfe,0x0f,0xff,0x80,0x15,0x7d,0x54,0x1d,0x5d,0xf5,0x0f,0xff,0x80,0x1f,0xff,0xd4,0x1f,0xfd,0xd5,0x0f,0xff,0x80,0xbf,0xff,0xa4,0x1f,0xfe,0x96,0x0f,0xff,0x80,0xbf,0xff,0xa4,0x1f,0xfe,0x96,0xff,0xff,0x80,0xbf,0xff,0xf4,0x1f,0xff,0xd7,0xfd,0xdd,0xff,0xff,0xff,0xf4,0x1f,0xaa,0xbf,0xfd,0xdd,0xff,0xff,0xef,0xf4,0x07,0xfa,0xbf,0xff,0xff,0xff,0xff,0xfe,0xa0,0x07,0xfe,0xbf,0xff,0xff,0xff,0xd5,0xff,0xa0,0x07,0xfe,0xbf,0x5f,0xff,0xff,0xd5,0xff,0xd0,0x07,0xfe,0xbf,0x5f,0xff,0xff,0xd5,0xff,0xd0,0x07,0xfe,0xbf,0x5f,0xff,0xff,0xd5,0xff,0xd0,0x07,0xfe,0xbf,0xff,0xd5,0xff,0xff,0xff,0xd0,0x07,0xfe,0xbf,0xff,0xd5,0xff,0xff,0xff,0xd0,0x07,0xfe,0xbf,0xff,0x6a,0x7f,0xff,0xff,0xd0,0x07,0xfe,0xbf,0xff,0x6a,0x7f,0xff,0xff,0xd0,0x06,0xaa,0xbf,0xff,0x6a,0x7f,0xff,0xff,0xd0,0x0a,0xaa,0xaa,0xaa,0x6a,0x55,0x55,0x55,0x50,0x0a,0xaa,0xaa,0xaa,0x55,0x6a,0xaa,0xaa,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ]); +``` + +```mbt +// 旧的绘制城堡代码 + +fn draw_castle(x : Int, y : Int, ~size : Int = 2) -> Unit { + + // 主要颜色 + @wasm.set_draw_colors(2, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + // 底部 + for k = 1; k < 33; k = k + 1 { + for l = 32; l < 48; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + + // 左侧 + for k = 6; k < 10; k = k + 1 { + for l = 19; l < 32; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + + // 中间 + for k = 13; k < 20; k = k + 1 { + for l = 11; l < 32; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + + // 右侧 + for k = 23; k < 28; k = k + 1 { + for l = 20; l < 31; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + @lib.draw_pixel(x + i + 28 * size, y + j + 31 * size) + @lib.draw_pixel(x + i + 29 * size, y + j + 31 * size) + // 顶部 + for k = 11; k < 22; k = k + 1 { + for l = 7; l < 10; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + } + } + + // 空掉部分 + @wasm.set_draw_colors(1, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + for k = 11; k < 13; k = k + 1 { + for l = 32; l < 35; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + for k = 20; k < 23; k = k + 1 { + for l = 32; l < 36; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + for l = 23; l < 33; l = l + 1 { + if l > 27 && l < 31 { + continue + } + @lib.draw_pixel(x + i + 23 * size, y + j + l * size) + } + // + for l = 18; l < 25; l = l + 1 { + @lib.draw_pixel(x + i + 13 * size, y + j + l * size) + } + } + } + // 其他点缀 + @wasm.set_draw_colors(3, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + // 左塔 + for k = 7; k < 10; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 17 * size) + } + for k = 6; k < 11; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 18 * size) + @lib.draw_pixel(x + i + k * size, y + j + 34 * size) + @lib.draw_pixel(x + i + k * size, y + j + 35 * size) + } + for k = 18; k < 36; k = k + 1 { + @lib.draw_pixel(x + i + 10 * size, y + j + k * size) + } + // 中塔 + for k = 15; k < 18; k = k + 1 { + for l = 3; l < 7; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + for k = 12; k < 21; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 10 * size) + @lib.draw_pixel(x + i + @math.maximum(14, k) * size, y + j + 19 * size) + } + for k = 10; k < 15; k = k + 1 { + @lib.draw_pixel(x + i + 19 * size, y + j + k * size) + } + for k = 16; k < 20; k = k + 1 { + @lib.draw_pixel(x + i + 20 * size, y + j + k * size) + } + for k = 19; k < 35; k = k + 1 { + @lib.draw_pixel(x + i + 19 * size, y + j + k * size) + } + + // 右塔 + for k = 25; k < 28; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 17 * size) + } + for k = 24; k < 29; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 18 * size) + @lib.draw_pixel(x + i + k * size, y + j + 19 * size) + } + for k = 30; k < 33; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 38 * size) + @lib.draw_pixel(x + i + k * size, y + j + 39 * size) + } + for k = 18; k < 31; k = k + 1 { + @lib.draw_pixel(x + i + 28 * size, y + j + k * size) + } + for k = 33; k < 35; k = k + 1 { + @lib.draw_pixel(x + i + 23 * size, y + j + k * size) + @lib.draw_pixel(x + i + 31 * size, y + j + k * size) + @lib.draw_pixel(x + i + 32 * size, y + j + k * size) + } + @lib.draw_pixel(x + i + 28 * size, y + j + 37 * size) + + // 底侧 + for k = 3; k < 8; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 37 * size) + } + @lib.draw_pixel(x + i + 5 * size, y + j + 38 * size) + for k = 2; k < 8; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 47 * size) + } + for k = 1; k < 15; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 48 * size) + @lib.draw_pixel(x + i + k * size, y + j + 49 * size) + } + for k = 20; k < 33; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 49 * size) + } + for k = 37; k < 49; k = k + 1 { + @lib.draw_pixel(x + i + 6 * size, y + j + k * size) + @lib.draw_pixel(x + i + 7 * size, y + j + k * size) + } + for k = 45; k < 49; k = k + 1 { + @lib.draw_pixel(x + i + 16 * size, y + j + k * size) + @lib.draw_pixel(x + i + 17 * size, y + j + k * size) + @lib.draw_pixel(x + i + 18 * size, y + j + k * size) + } + } + } + // 边框部分 + @wasm.set_draw_colors(4, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + // 主塔尖 + @lib.draw_pixel(x + i + 16 * size, y + j + 0 * size) + @lib.draw_pixel(x + i + 16 * size, y + j + 1 * size) + @lib.draw_pixel(x + i + 16 * size, y + j + 2 * size) + @lib.draw_pixel(x + i + 15 * size, y + j + 2 * size) + @lib.draw_pixel(x + i + 14 * size, y + j + 3 * size) + @lib.draw_pixel(x + i + 14 * size, y + j + 4 * size) + @lib.draw_pixel(x + i + 14 * size, y + j + 5 * size) + @lib.draw_pixel(x + i + 14 * size, y + j + 6 * size) + @lib.draw_pixel(x + i + 18 * size, y + j + 3 * size) + @lib.draw_pixel(x + i + 18 * size, y + j + 4 * size) + @lib.draw_pixel(x + i + 18 * size, y + j + 5 * size) + @lib.draw_pixel(x + i + 18 * size, y + j + 6 * size) + @lib.draw_pixel(x + i + 19 * size, y + j + 4 * size) + @lib.draw_pixel(x + i + 19 * size, y + j + 5 * size) + @lib.draw_pixel(x + i + 19 * size, y + j + 6 * size) + + // 装饰 + @lib.draw_pixel(x + i + 11 * size, y + j + 7 * size) + @lib.draw_pixel(x + i + 13 * size, y + j + 7 * size) + @lib.draw_pixel(x + i + 15 * size, y + j + 7 * size) + @lib.draw_pixel(x + i + 17 * size, y + j + 7 * size) + @lib.draw_pixel(x + i + 19 * size, y + j + 7 * size) + @lib.draw_pixel(x + i + 21 * size, y + j + 7 * size) + @lib.draw_pixel(x + i + 11 * size, y + j + 9 * size) + @lib.draw_pixel(x + i + 21 * size, y + j + 9 * size) + @lib.draw_pixel(x + i + 16 * size, y + j + 12 * size) + @lib.draw_pixel(x + i + 16 * size, y + j + 13 * size) + @lib.draw_pixel(x + i + 16 * size, y + j + 14 * size) + @lib.draw_pixel(x + i + 13 * size, y + j + 15 * size) + @lib.draw_pixel(x + i + 15 * size, y + j + 15 * size) + @lib.draw_pixel(x + i + 17 * size, y + j + 15 * size) + @lib.draw_pixel(x + i + 19 * size, y + j + 15 * size) + + // 左塔尖 + @lib.draw_pixel(x + i + 8 * size, y + j + 12 * size) + @lib.draw_pixel(x + i + 8 * size, y + j + 13 * size) + @lib.draw_pixel(x + i + 8 * size, y + j + 14 * size) + @lib.draw_pixel(x + i + 8 * size, y + j + 15 * size) + @lib.draw_pixel(x + i + 8 * size, y + j + 16 * size) + @lib.draw_pixel(x + i + 9 * size, y + j + 16 * size) + @lib.draw_pixel(x + i + 7 * size, y + j + 16 * size) + @lib.draw_pixel(x + i + 10 * size, y + j + 17 * size) + @lib.draw_pixel(x + i + 6 * size, y + j + 17 * size) + @lib.draw_pixel(x + i + 11 * size, y + j + 18 * size) + @lib.draw_pixel(x + i + 11 * size, y + j + 19 * size) + @lib.draw_pixel(x + i + 11 * size, y + j + 20 * size) + @lib.draw_pixel(x + i + 5 * size, y + j + 18 * size) + @lib.draw_pixel(x + i + 5 * size, y + j + 19 * size) + @lib.draw_pixel(x + i + 5 * size, y + j + 20 * size) + @lib.draw_pixel(x + i + 8 * size, y + j + 21 * size) + @lib.draw_pixel(x + i + 8 * size, y + j + 22 * size) + + //右塔尖 + @lib.draw_pixel(x + i + 26 * size, y + j + 12 * size) + @lib.draw_pixel(x + i + 26 * size, y + j + 13 * size) + @lib.draw_pixel(x + i + 26 * size, y + j + 14 * size) + @lib.draw_pixel(x + i + 26 * size, y + j + 15 * size) + @lib.draw_pixel(x + i + 26 * size, y + j + 16 * size) + @lib.draw_pixel(x + i + 27 * size, y + j + 16 * size) + @lib.draw_pixel(x + i + 25 * size, y + j + 16 * size) + @lib.draw_pixel(x + i + 28 * size, y + j + 17 * size) + @lib.draw_pixel(x + i + 24 * size, y + j + 17 * size) + for k = 18; k < 23; k = k + 1 { + @lib.draw_pixel(x + i + 23 * size, y + j + k * size) + @lib.draw_pixel(x + i + 29 * size, y + j + k * size) + } + for k = 18; k < 23; k = k + 1 { + @lib.draw_pixel(x + i + 23 * size, y + j + k * size) + } + @lib.draw_pixel(x + i + 26 * size, y + j + 23 * size) + @lib.draw_pixel(x + i + 26 * size, y + j + 24 * size) + + // 左外墙 + for k = 32; k < 38; k = k + 1 { + @lib.draw_pixel(x + i + 0 * size, y + j + k * size) + } + for k = 38; k < 48; k = k + 1 { + @lib.draw_pixel(x + i + 1 * size, y + j + k * size) + } + for k = 28; k < 32; k = k + 1 { + @lib.draw_pixel(x + i + 5 * size, y + j + k * size) + } + for k = 32; k < 34; k = k + 1 { + @lib.draw_pixel(x + i + 6 * size, y + j + k * size) + @lib.draw_pixel(x + i + 10 * size, y + j + k * size) + } + for k = 33; k < 37; k = k + 1 { + @lib.draw_pixel(x + i + 8 * size, y + j + k * size) + @lib.draw_pixel(x + i + 9 * size, y + j + k * size) + } + + // 右外墙 + @lib.draw_pixel(x + i + 24 * size, y + j + 32 * size) + for k = 24; k < 28; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 31 * size) + } + for k = 27; k < 31; k = k + 1 { + @lib.draw_pixel(x + i + 29 * size, y + j + k * size) + } + for k = 30; k < 34; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 31 * size) + @lib.draw_pixel(x + i + @math.maximum(32, k) * size, y + j + 32 * size) + } + for k = 33; k < 38; k = k + 1 { + @lib.draw_pixel(x + i + 33 * size, y + j + k * size) + } + for k = 40; k < 49; k = k + 1 { + @lib.draw_pixel(x + i + 32 * size, y + j + k * size) + } + + // 門/窗/其他 + for k = 11; k < 13; k = k + 1 { + for l = 40; l < 43; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + for k = 24; k < 27; k = k + 1 { + for l = 39; l < 43; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + for k = 36; k < 38; k = k + 1 { + @lib.draw_pixel(x + i + 14 * size, y + j + k * size) + @lib.draw_pixel(x + i + 16 * size, y + j + k * size) + @lib.draw_pixel(x + i + 18 * size, y + j + k * size) + } + for k = 16; k < 19; k = k + 1 { + for l = 43; l < 45; l = l + 1 { + @lib.draw_pixel(x + i + k * size, y + j + l * size) + } + } + for k = 45; k < 49; k = k + 1 { + @lib.draw_pixel(x + i + 15 * size, y + j + k * size) + @lib.draw_pixel(x + i + 19 * size, y + j + k * size) + } + for k = 15; k < 20; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 49 * size) + } + for k = 19; k < 33; k = k + 1 { + @lib.draw_pixel(x + i + k * size, y + j + 48 * size) + } + } + } +} +``` \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/todo.md" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/todo.md" new file mode 100644 index 0000000..f96a563 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/doc/todo.md" @@ -0,0 +1,6 @@ +音效 +南瓜王技能 +人物其他技能 +ui + +undertale \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/AI.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/AI.mbt" new file mode 100644 index 0000000..07587ec --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/AI.mbt" @@ -0,0 +1,74 @@ +let default_ai : AI = fn(self) { @wasm.text(self.name.to_string(), 60, 60) } + +let sheep_ai : AI = fn(self) { + // 每两次咩咩冲击进行一次防御 + draw_hero(player.round_pos.x, player.round_pos.y, size=3) + if self.battle == Special { + self.draw(x=self.round_pos.x, y=self.round_pos.y, Fight) + draw_hero(player.bonus_pos.x, player.bonus_pos.y, size=1) + if not((bonus_levels[round.rng].level._)(1, self.level)) { + if bonus_time.b_time[round.rng] != 0 { + bonus_time.b_time[round.rng] = 0 + player.bonus_pos.x = 85 + player.bonus_pos.y = 150 + self.round_reset() + } + self.battle = Default + } + } else { + game.r_time += 1 + if self.attack != 0 && self.attack % 2 == 0 { + self.battle = Defense + self.attack = 0 + self.round_reset() + } else { + if self.round == Default && self.battle == Default { + self.round = Anime + self.battle = Attack + } + (self.skill.anime._)(self, self.skill) + } + } +} + +let pumpkin_ai : AI = fn(self) { + draw_hero(player.round_pos.x, player.round_pos.y, size=3) + if self.attack == 13 && player.level != 19 { + if self.finish == 0 { + self.defense = 1 + } + self.lose_anime() + return + } + if self.battle == Special { + self.draw(x=self.round_pos.x, y=self.round_pos.y, Fight) + draw_hero(player.bonus_pos.x, player.bonus_pos.y, size=1) + if not( + (bonus_levels[round.rng].level._)( + 1 + (self.attack > 10).to_int(), + 30 + self.attack, + ), + ) { + if bonus_time.b_time[round.rng] != 0 { + bonus_time.b_time[round.rng] = 0 + player.bonus_pos.x = 85 + player.bonus_pos.y = 150 + self.round_reset() + } + self.battle = Default + } + } else { + game.r_time += 1 + if self.hp < 56 && self.defense == 0 { + self.hp = 100 + self.defense = 1 + self.round_reset() + } else { + if self.round == Default && self.battle == Default { + self.round = Anime + self.battle = Attack + } + (self.skill.anime._)(self, self.skill) + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/TODO.md" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/TODO.md" new file mode 100644 index 0000000..a689be2 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/TODO.md" @@ -0,0 +1,11 @@ +## TODO + +- [ ] 添加敌人 +- [ ] 添加更多敌人AI +- [ ] 不同的敌人属性 +- [ ] 不同的敌人技能 +- [ ] 添加人物升级与属性提升 +- [ ] 添加大世界 +- [ ] 美化游戏画面(菜单栏/人物模型/血条等) +- [ ] 加入一些神秘的小游戏,充当肉鸽中的惊喜选项 +- [ ] 动画效果(?) \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/anime.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/anime.mbt" new file mode 100644 index 0000000..fdd23ee --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/anime.mbt" @@ -0,0 +1,62 @@ +type Anime (EnemyStatus, Skill) -> Unit + +let stampede : Anime = fn(self, sk) { + let animetime = self.skill.anime_time + match self.round { + Anime => + if game.r_time <= animetime { + self.draw(x=110 - game.r_time * 2, y=self.round_pos.y, Fight) + } else if self.finish == 0 { + self.draw(x=50, y=self.round_pos.y, Fight) + self.round = Action + } else if game.r_time - self.finish <= animetime { + self.draw( + x=50 + (game.r_time - self.finish) * 2, + y=self.round_pos.y, + Fight, + ) + } else { + self.battle = Default + self.attack += 1 + self.round_reset() + return + } + Action => { + self.draw(x=50, y=self.round_pos.y, Fight) + if self.battle == Attack { + damage_player(sk.damage, sk.critical, player) + self.round = Anime + self.finish = game.r_time + } + } + Default => { + self.round_reset() + return + } + } +} + +fn lose_anime(self : EnemyStatus) -> Unit { + self.finish += 1 + if self.finish % 20 == 0 { + self.defense = -self.defense + } + self.draw( + x=self.round_pos.x + 5 * self.defense, + y=self.round_pos.y + 5 * self.defense, + Fight, + ) + two_color(2, 2) + for i = 0; i <= self.finish / 8; i = i + 1 { + for j = 0; j <= self.finish / 8; j = j + 1 { + @lib.draw_pixel(80 + i, 80 + j) + @lib.draw_pixel(80 + i, 80 - j) + @lib.draw_pixel(80 - i, 80 + j) + @lib.draw_pixel(80 - i, 80 - j) + } + } + if self.finish >= 640 { + game.scene = Finish + return + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/bonus.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/bonus.mbt" new file mode 100644 index 0000000..0ec14df --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/bonus.mbt" @@ -0,0 +1,285 @@ +struct BonusLevel { + control : LevelControl + level : B_level +} + +struct BonusTime { + b_time : Array[Int] + mut tenzor : Int + mut level_time : Int +} + +type B_level (Int, Int) -> Bool + +let bonus_time : BonusTime = { + b_time: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + tenzor: 0, + level_time: 0, +} + +let bonus_levels : Array[BonusLevel] = [ + { control: b0_control, level: bonus_0 }, + { control: b1_control, level: bonus_1 }, +] + +fn check_Bouns() -> Unit { + match game.bscene { + LevelUp => level_up() + Heal => heal() + None => return + } +} + +fn men() -> Unit { + if game.konami == "uuddlrlrzx" && bonus_time.tenzor == 0 { + game.konami = "" + game.scene = Secret + player.max_hp = 1024 + player.level = 19 + player.hp = player.max_hp + } + if bonus_time.tenzor >= 60 { + bonus_time.tenzor = 0 + game.scene = game.lscene + } + two_color(2, 0) + @wasm.text("You Find The Code!", 10, 50) + @wasm.text("Health Full", 30, 90) + @wasm.text("Level MAX", 30, 110) + bonus_time.tenzor += 1 +} + +fn level_up() -> Unit { + if bonus_time.level_time == 0 && player.level != 19 { + bonus_time.level_time = game.g_time + player.level = player.level + 1 + player.max_hp = player.max_hp + 50 + player.hp += 20 + } + if game.g_time - bonus_time.level_time >= 30 || player.level == 19 { + bonus_time.level_time = 0 + game.bscene = None + game.scene = game.lscene + } + two_color(2, 0) + @wasm.text("Level Up!", 60, 30) + @wasm.text("MAX_HP UP!", 55, 60) +} + +fn heal() -> Unit { + if bonus_time.level_time == 0 { + bonus_time.level_time = game.g_time + player.hp = @math.minimum(player.max_hp, player.hp + 40) + } + if game.g_time - bonus_time.level_time >= 30 { + bonus_time.level_time = 0 + game.bscene = None + game.scene = game.lscene + bonus_time.tenzor = 0 + } + delete_enemy(bonus_time.tenzor) + two_color(2, 0) + @wasm.text("HP +40", 60, 80) +} + +struct Pipe { + pos : Coordinate + hitbox : Coordinate + move : Int +} + +struct Circle { + pos : Coordinate + hitbox : Coordinate + move : Int + ud : Int + mut catched : Bool +} + +let b0_pipes : Array[Pipe] = Array::new() + +let b1_shield : Pipe = { + pos: { x: 70, y: 117 }, + hitbox: { x: 3, y: 13 }, + move: 0, +} + +let b1_circle : Array[Circle] = Array::new() + +fn b0_pipe_init(lvl : Int) -> Unit { + b0_pipes.clear() + let r = @random.new(seed=sed[game.g_time % 9]) + game.rng = r.int() % 10 + r.int(limit=lvl) + if player.level == 19 { + game.rng += 20 + } + for i = 0; i < game.rng; i = i + 1 { + b0_pipes.push( + { + pos: { x: -25 * (i + 1), y: 80 }, + hitbox: { x: 2, y: @math.maximum(70 - 4 * (i + 1), 35) }, + move: 1, + }, + ) + b0_pipes.push( + { + pos: { x: 160 + 25 * (i + 1), y: @math.maximum(160 - 6 * (i + 1), 120) }, + hitbox: { x: 2, y: @math.maximum(6 * (i + 1), 50) }, + move: -1, + }, + ) + } +} + +let bonus_0 : B_level = fn(speed, lvl) -> Bool { + if bonus_time.b_time[0] == 0 { + player.bonus_pos.x = 85 + player.bonus_pos.y = 150 + bonus_time.b_time[0] = game.g_time + b0_pipe_init(lvl) + } else { + for i = 0; i < b0_pipes.length(); i = i + 1 { + if (game.g_time - bonus_time.b_time[0]) % (4 / speed) == 0 || + player.level == 19 { + b0_pipes[i].pos.x += b0_pipes[i].move + } + two_color(3, 0) + @wasm.rect( + b0_pipes[i].pos.x, + b0_pipes[i].pos.y, + b0_pipes[i].hitbox.x, + b0_pipes[i].hitbox.y, + ) + if ( + player.bonus_pos.x + 8 <= b0_pipes[i].pos.x || + player.bonus_pos.x >= b0_pipes[i].pos.x + b0_pipes[i].hitbox.x + ) || + player.bonus_pos.y + 8 <= b0_pipes[i].pos.y || + player.bonus_pos.y >= b0_pipes[i].pos.y + b0_pipes[i].hitbox.y { + continue + } else { + bonus_time.b_time[0] = 0 + sound() + return false + } + } + } + if b0_pipes[b0_pipes.length() - 1].pos.x <= 0 { + return false + } + return true +} + +fn b1_circle_init(lvl : Int) -> Unit { + b1_circle.clear() + let r = @random.new(seed=sed[game.g_time % 9]) + game.rng = r.int() % 10 + r.int(limit=lvl) + if player.level == 19 { + game.rng += 20 + } + for i = 0; i < 2 * game.rng; i = i + 1 { + // for i = 0; i < 1; i = i + 1 { + let k = r.int() + let dp = r.int() % 2 + let mut j : Int = 0 + if dp == 1 { + if 2 * (k % 2) - 1 < 0 { + j = 160 + 15 * (i + 1) + } else { + j = 0 - 15 * (i + 1) + } + b1_circle.push( + { + pos: { x: j, y: 120 }, + hitbox: { x: 4, y: 4 }, + move: 2 * (k % 2) - 1, + catched: false, + ud: 0, + }, + ) + } else { + if 2 * (k % 2) - 1 < 0 { + j = 160 + 20 * (i + 1) + } else { + j = 80 - 20 * (i + 1) + } + b1_circle.push( + { + pos: { x: 75, y: j }, + hitbox: { x: 4, y: 4 }, + move: 2 * (k % 2) - 1, + catched: false, + ud: 1, + }, + ) + } + } +} + +let bonus_1 : B_level = fn(speed, lvl) -> Bool { + if bonus_time.b_time[1] == 0 { + b1_circle_init(lvl) + player.bonus_pos.x = 75 + player.bonus_pos.y = 120 + bonus_time.b_time[1] = game.g_time + } else { + let mut flag = false + for i = 0; i < b1_circle.length(); i = i + 1 { + if b1_circle[i].catched == false { + flag = true + if (game.g_time - bonus_time.b_time[1]) % (2 / speed) == 0 || + player.level == 19 { + if b1_circle[i].ud == 0 { + b1_circle[i].pos.x += b1_circle[i].move + } else { + b1_circle[i].pos.y += b1_circle[i].move + } + } + two_color(2, 0) + if b1_circle[i].pos.y < 80 { + continue + } + @wasm.oval( + b1_circle[i].pos.x, + b1_circle[i].pos.y, + b1_circle[i].hitbox.x, + b1_circle[i].hitbox.y, + ) + two_color(3, 0) + @wasm.rect( + b1_shield.pos.x, + b1_shield.pos.y, + b1_shield.hitbox.x, + b1_shield.hitbox.y, + ) + if ( + b1_shield.pos.x + b1_shield.hitbox.x <= b1_circle[i].pos.x || + b1_shield.pos.x >= b1_circle[i].pos.x + b1_circle[i].hitbox.x + ) || + b1_shield.pos.y + b1_shield.hitbox.y <= b1_circle[i].pos.y || + b1_shield.pos.y >= b1_circle[i].pos.y + b1_circle[i].hitbox.y { + + } else { + b1_circle[i].catched = true + continue + } + if ( + player.bonus_pos.x + 8 <= b1_circle[i].pos.x || + player.bonus_pos.x >= b1_circle[i].pos.x + b1_circle[i].hitbox.x + ) || + player.bonus_pos.y + 8 <= b1_circle[i].pos.y || + player.bonus_pos.y >= b1_circle[i].pos.y + b1_circle[i].hitbox.y { + continue + } else { + bonus_time.b_time[1] = 0 + sound() + return false + } + } + } + return flag + } + return true +} + +let bonus_2 : B_level = fn(speed, lvl) -> Bool { return true } diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/control.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/control.mbt" new file mode 100644 index 0000000..55e55c8 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/control.mbt" @@ -0,0 +1,173 @@ +enum Button { + Left + Right + Up + Down + X + Z + None +} derive(Eq) + +struct Control { + mut button : Button + mut pressed : Bool + mut la_button : Button +} + +type LevelControl () -> Unit + +let keyboard : Control = Control::{ + button: None, + pressed: false, + la_button: None, +} + +fn Control::button() -> Unit { + let pad = @wasm.get_gamepad() + keyboard.button = if pad.button_right { + Right + } else if pad.button_left { + Left + } else if pad.button_up { + Up + } else if pad.button_down { + Down + } else if pad.button_1 { + X + } else if pad.button_2 { + Z + } else { + None + } + keyboard.pressed = keyboard.button != keyboard.la_button + keyboard.la_button = keyboard.button +} + +fn control() -> Unit { + button() + if game.scene == Fight { + if not(player.selfround) && keyboard.pressed { + game.p_time = game.g_time + fight_control() + } + if round.enemy.battle == Special { + (bonus_levels[round.rng].control._)() + } + } else if game.scene == World { + world_control() + } +} + +fn fight_control() -> Unit { + match keyboard.button { + Left => { + game.konami += "l" + if round.status == "player" { + choice.option = @math.maximum(1, choice.option - 1) + } + } + Right => { + if round.status == "player" { + choice.option = @math.minimum(3, choice.option + 1) + } + game.konami += "r" + } + Up => game.konami += "u" + Down => game.konami += "d" + X => { + game.konami += "x" + if game.konami == "uuddlrlrzx" { + game.lscene = game.scene + game.scene = Secret + return + } + if choice.option > 0 { + if round.status == "player" { + player.selfround = true + } + } + } + Z => game.konami += "z" + _ => () + } +} + +fn world_control() -> Unit { + match keyboard.button { + Left => + if check_border_collision(player.map_pos.x - 1, player.map_pos.y) { + player.map_pos.x = @math.maximum(0, player.map_pos.x - 1) + world.wld.absolute.x -= 1 + } + Right => + if check_border_collision(player.map_pos.x + 1, player.map_pos.y) { + player.map_pos.x = @math.minimum(1090, player.map_pos.x + 1) + world.wld.absolute.x += 1 + } + Up => + if check_border_collision(player.map_pos.x, player.map_pos.y - 1) { + player.map_pos.y = @math.maximum(0, player.map_pos.y - 1) + world.wld.absolute.y -= 1 + } + Down => + if check_border_collision(player.map_pos.x, player.map_pos.y + 1) { + player.map_pos.y = @math.minimum(190, player.map_pos.y + 1) + world.wld.absolute.y += 1 + } + _ => () + } + if game.scene == World { + if world.wld.absolute.x < 0 || player.map_pos.x < 80 { + world.wld.absolute.x = 0 + } else if world.wld.absolute.x > 940 || player.map_pos.x > 1020 { + world.wld.absolute.x = 940 + } + if world.wld.absolute.y < 0 || player.map_pos.y < 80 { + world.wld.absolute.y = 0 + } else if world.wld.absolute.y > 40 || player.map_pos.y > 120 { + world.wld.absolute.y = 40 + } + } +} + +let b0_control : LevelControl = fn() -> Unit { + match keyboard.button { + Left => player.bonus_pos.x = @math.maximum(0, player.bonus_pos.x - 1) + Right => player.bonus_pos.x = @math.minimum(150, player.bonus_pos.x + 1) + Up => player.bonus_pos.y = @math.maximum(80, player.bonus_pos.y - 1) + Down => player.bonus_pos.y = @math.minimum(150, player.bonus_pos.y + 1) + _ => () + } +} + +let b1_control : LevelControl = fn() -> Unit { + if keyboard.pressed { + match keyboard.button { + Left => { + b1_shield.pos.x = 70 + b1_shield.pos.y = 117 + b1_shield.hitbox.x = 3 + b1_shield.hitbox.y = 13 + } + Right => { + b1_shield.pos.x = 87 + b1_shield.pos.y = 117 + b1_shield.hitbox.x = 3 + b1_shield.hitbox.y = 13 + } + Up => { + b1_shield.pos.x = 72 + b1_shield.pos.y = 115 + b1_shield.hitbox.x = 13 + b1_shield.hitbox.y = 3 + } + Down => { + b1_shield.pos.x = 72 + b1_shield.pos.y = 130 + b1_shield.hitbox.x = 13 + b1_shield.hitbox.y = 3 + } + _ => () + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/draw.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/draw.mbt" new file mode 100644 index 0000000..732ab98 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/draw.mbt" @@ -0,0 +1,25 @@ +fn shield(x : Int, y : Int) -> Unit { + two_color(2, 3) + @wasm.rect(x, y, 1, 1) + @wasm.rect(x - 1, y, 1, 1) + @wasm.rect(x - 2, y + 1, 1, 1) + @wasm.rect(x - 3, y + 1, 1, 1) + @wasm.rect(x - 4, y + 2, 1, 1) + @wasm.rect(x - 4, y + 3, 1, 1) + @wasm.rect(x - 4, y + 4, 1, 1) + @wasm.rect(x - 3, y + 5, 1, 1) + @wasm.rect(x - 3, y + 6, 1, 1) + @wasm.rect(x - 2, y + 7, 1, 1) + @wasm.rect(x - 1, y + 8, 1, 1) + @wasm.rect(x, y + 9, 1, 1) + @wasm.rect(x + 1, y, 1, 1) + @wasm.rect(x + 2, y + 1, 1, 1) + @wasm.rect(x + 3, y + 1, 1, 1) + @wasm.rect(x + 4, y + 2, 1, 1) + @wasm.rect(x + 4, y + 3, 1, 1) + @wasm.rect(x + 4, y + 4, 1, 1) + @wasm.rect(x + 3, y + 5, 1, 1) + @wasm.rect(x + 3, y + 6, 1, 1) + @wasm.rect(x + 2, y + 7, 1, 1) + @wasm.rect(x + 1, y + 8, 1, 1) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/enemy.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/enemy.mbt" new file mode 100644 index 0000000..941d082 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/enemy.mbt" @@ -0,0 +1,183 @@ +// 敌人稀有度 + +// 敌人列表 +enum EnemyName { + None + Sheep + Pumpkin +} derive(Eq, Show) + +// 回合状态 +// 动画/行动/默认 +enum RoundStatus { + Anime + Action + Default +} derive(Eq, Show) + +// 战斗状态 +// 防御/攻击/治疗/特殊/默认 +enum BattleStatus { + Defense + Attack + Default + Special +} derive(Eq, Show) + +type AI (EnemyStatus) -> Unit + +struct EnemyStatus { + mut hp : Int + max_hp : Int + level : Int + name : EnemyName + draw : @lib.DrawEnemy + map_pos : Coordinate + hitbox : HitBox + mut battle : BattleStatus + mut round : RoundStatus + mut attack : Int + mut defense : Int + // mut heal:Int + mut finish : Int + round_pos : Coordinate + ai : AI + skill : Skill +} + +struct Skill { + anime_time : Int + anime : Anime + damage : Int + critical : Int +} + +fn delete_enemy(level : Int) -> Unit { + for i, x in world.wld.enemylist { + if x.level == level { + world.wld.enemylist[i].hp = 0 + } + } +} + +fn EnemyStatus::draw( + self : EnemyStatus, + ~x : Int = self.map_pos.x, + ~y : Int = self.map_pos.y, + scene : Scene +) -> Unit { + if scene == Fight { + (self.draw._)(x, y, 3) + } else if scene == World { + if self.name == Pumpkin { + (self.draw._)(x, y, 4) + return + } + (self.draw._)(x, y, 1) + } +} + +fn EnemyStatus::pos(self : EnemyStatus, x : Int, y : Int) -> Unit { + self.map_pos.x = x + self.map_pos.y = y +} + +fn EnemyStatus::round_reset(self : EnemyStatus) -> Unit { + self.round = Default + self.finish = 0 + game.r_time = 0 + round.rng = -1 + player.battle = Default + self.draw(x=self.round_pos.x, y=self.round_pos.y, Fight) + round.status = "player" +} + +fn EnemyStatus::default() -> EnemyStatus { + { + hp: 0, + level: 0, + round: Default, + battle: Default, + max_hp: 0, + name: None, + attack: 0, + defense: 0, + finish: 0, + map_pos: Coordinate::{ x: 0, y: 0 }, + round_pos: Coordinate::{ x: 0, y: 0 }, + hitbox: { width: 0, height: 0 }, + draw: @lib.draw_default, + skill: Skill::{ + anime_time: 30, + anime: default_anime, + damage: 0, + critical: 0, + }, + ai: default_ai, + } +} + +fn EnemyStatus::sheep( + map_x : Int, + map_y : Int, + level : Int, + maxh : Int +) -> EnemyStatus { + { + hp: maxh, + level, + round: Default, + battle: Default, + max_hp: maxh, + name: Sheep, + attack: 0, + defense: 0, + finish: 0, + map_pos: Coordinate::{ x: map_x, y: map_y }, + round_pos: Coordinate::{ x: 110, y: 36 }, + hitbox: { width: 12, height: 7 }, + draw: @lib.draw_sheep, + skill: Skill::{ + anime_time: 30, + anime: stampede, + damage: 3 * level, + critical: 5 * @math.minimum(2, level), + }, + ai: sheep_ai, + } +} + +fn EnemyStatus::pumpkin(map_x : Int, map_y : Int) -> EnemyStatus { + { + hp: 108, + level: 108, + round: Default, + battle: Default, + max_hp: 108, + name: Pumpkin, + attack: 0, + defense: 0, + finish: 0, + map_pos: Coordinate::{ x: map_x, y: map_y }, + round_pos: Coordinate::{ x: 110, y: 36 }, + hitbox: { width: 30, height: 30 }, + draw: @lib.draw_pumpkin, + skill: Skill::{ anime_time: 30, anime: stampede, damage: 5, critical: 0 }, + ai: pumpkin_ai, + } +} +// let pumpkin : EnemyStatus = { +// hp: 200, +// round: Default, +// battle: Default, +// danger: Normal, +// anime: { "stampede": 30 }, +// max_hp: 200, +// name: Pumpkin, +// attack: 0, +// defense: 0, +// finish: 0, +// hitbox: { width: 0, height: 0 }, +// xpos: 0, +// ypos: 0, +// } diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/game.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/game.mbt" new file mode 100644 index 0000000..2672e4b --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/game.mbt" @@ -0,0 +1,120 @@ +struct Game { + mut scene : Scene + mut lscene : Scene + mut bscene : BounsScene + mut g_time : Int + mut r_time : Int + mut p_time : Int + mut a_time : Int + mut konami : String + mut flag : Bool + mut rng : Int +} + +struct Big { + mut wld : World +} + +fn Game::default() -> Game { + { + g_time: 0, + r_time: 0, + p_time: 0, + a_time: 0, + konami: "", + scene: Welcome, + lscene: Welcome, + bscene: None, + flag: true, + rng: 0, + } +} + +fn Game::reset(self : Game) -> Unit { + self.p_time = 0 + self.g_time = 0 + self.r_time = 0 + self.scene = Welcome + self.lscene = Welcome + self.konami = "" + self.rng = 0 +} + +let game : Game = Game::default() + +let world : Big = Big::{ wld: World::new() } + +pub fn start() -> Unit { + player.max_hp = 14 + @wasm.set_palette(1, @wasm.rgb(0xfbf7f3)) + @wasm.set_palette(4, @wasm.rgb(0x222034)) + game.reset() +} + +pub fn update() -> Unit { + game.g_time += 1 + control() + checkStatus() +} + +fn checkStatus() -> Unit { + match game.scene { + Defeat => { + @wasm.text("Game Over", 50, 50) + @wasm.text("Press R to restart", 10, 70) + return + } + Victory => { + two_color(2, 0) + @wasm.text("You Win", 50, 50) + @wasm.text("Press X to Map", 30, 80) + if keyboard.button == X && keyboard.pressed { + for j = 0; j < 210; j = j + 14 { + world.wld.borderlist.push( + Tree::{ + map_pos: Coordinate::{ x: player.map_pos.x - 15, y: j }, + draw: @lib.draw_tree, + lvl: 1, + }, + ) + } + game.lscene = World + game.scene = Bonus + game.bscene = LevelUp + } + return + } + Fight => { + battle(round.enemy) + if game.g_time - game.p_time > 20 { + game.konami = "" + } + } + Welcome => { + welcome() + return + } + Bonus => check_Bouns() + World => { + generate() + return + } + FightAnime => { + fight_anime() + return + } + Secret => { + men() + return + } + Finish => { + two_color(2, 0) + @wasm.rect(0, 0, 160, 160) + two_color(1, 0) + @wasm.text("You Beat The BOSS", 10, 50) + @wasm.text("Thanks for playing", 10, 80) + @wasm.text("Game made by\n FrenchPicnic", 20, 100) + @wasm.text("Press R to restart", 10, 130) + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/info.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/info.mbt" new file mode 100644 index 0000000..e12b1ad --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/info.mbt" @@ -0,0 +1,4 @@ +pub fn info() -> Unit { + @wasm.text(game.scene.to_string(), 20, 20) + @wasm.text(game.r_time.to_string(), 20, 20) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/map.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/map.mbt" new file mode 100644 index 0000000..f672097 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/map.mbt" @@ -0,0 +1,293 @@ +struct World { + enemylist : Array[EnemyStatus] + borderlist : Array[Tree] + heallist : Array[Tree] + // mut borderlist: Array[String] + // relative : Coordinate + absolute : Coordinate +} + +struct Tree { + map_pos : Coordinate + draw : @lib.DrawEnemy + mut lvl : Int +} + +struct Coordinate { + mut x : Int + mut y : Int +} + +struct HitBox { + width : Int + height : Int +} + +fn World::new() -> World { + let tree_list : Array[Tree] = Array::new() + let enemy_list : Array[EnemyStatus] = Array::new() + let medic_list : Array[Tree] = Array::new() + if game.scene == World { + let mut line : Int = 0 + let mut lvl : Int = 1 + let mut flag1 : Bool = true + let mut flag2 : Bool = true + for i = 50; i < 1000; i = i + 14 { + line += 1 + for j = 0; j < 210; j = j + 50 { + if j == 50 { + let r = @random.new(seed=sed[(game.g_time + line) % 9]) + game.g_time += 1 + game.rng = r.int(limit=101) + if line == 1 { + if game.rng % 4 < 2 { + enemy_list.push( + EnemyStatus::sheep(i + 15 + game.rng % 7, 30, lvl, 10 * lvl), + ) + } else { + medic_list.push( + Tree::{ + map_pos: Coordinate::{ x: i + 15 + game.rng % 7, y: 30 }, + draw: @lib.draw_heal, + lvl, + }, + ) + } + } + if line == 10 { + if game.rng % 5 == 0 || game.rng % 5 == 3 || game.rng % 5 == 2 { + flag1 = false + } + } + if flag1 { + tree_list.push( + Tree::{ + map_pos: Coordinate::{ x: i, y: j }, + draw: @lib.draw_tree, + lvl: i, + }, + ) + } + if line == 15 { + flag1 = true + } + } else if j == 100 { + let r = @random.new(seed=sed[(game.g_time + line) % 9]) + game.g_time += 1 + game.rng = r.int(limit=101) + if line == 1 { + if game.rng % 2 == 0 { + enemy_list.push( + EnemyStatus::sheep(i + 15 + game.rng % 15, 80, lvl, 10 * lvl), + ) + } else { + medic_list.push( + Tree::{ + map_pos: Coordinate::{ x: i + 15 + game.rng % 7, y: 80 }, + draw: @lib.draw_heal, + lvl, + }, + ) + } + } + if line == 10 { + if game.rng % 4 == 0 || game.rng % 4 == 3 { + flag2 = false + } + } + if flag2 { + tree_list.push( + Tree::{ + map_pos: Coordinate::{ x: i, y: j }, + draw: @lib.draw_tree, + lvl: i, + }, + ) + } + if line == 15 { + lvl += 1 + line = 0 + flag2 = true + } + } else { + if j == 150 { + if line == 1 { + enemy_list.push( + EnemyStatus::sheep(i + 15 + game.rng % 30, 130, lvl, 10 * lvl), + ) + } + } + tree_list.push( + Tree::{ + map_pos: Coordinate::{ x: i, y: j }, + draw: @lib.draw_tree, + lvl: i, + }, + ) + } + } + } + } + enemy_list.push(EnemyStatus::pumpkin(1020, 80)) + return { + enemylist: enemy_list, + borderlist: tree_list, + heallist: medic_list, + // relative: Coordinate::{ x: 0, y: 0 }, + absolute: Coordinate::{ x: 0, y: 0 }, + } +} + +fn Tree::draw( + self : Tree, + ~x : Int = self.map_pos.x, + ~y : Int = self.map_pos.y, + scene : Scene +) -> Unit { + if scene == Fight { + (self.draw._)(x, y, 3) + } else if scene == World { + (self.draw._)(x, y, 2) + } +} + +fn World::generate() -> Unit { + for k in world.wld.enemylist { + if k.hp <= 0 { + if k.name == Pumpkin { + game.scene = Finish + return + } + continue + } else { + k.draw( + World, + x=k.map_pos.x - world.wld.absolute.x, + y=k.map_pos.y - world.wld.absolute.y, + ) + } + } + for k in world.wld.borderlist { + k.draw( + World, + x=k.map_pos.x - world.wld.absolute.x, + y=k.map_pos.y - world.wld.absolute.y, + ) + } + for k in world.wld.heallist { + if k.lvl == 0 { + continue + } + k.draw( + World, + x=k.map_pos.x - world.wld.absolute.x, + y=k.map_pos.y - world.wld.absolute.y, + ) + } + draw_hero( + player.map_pos.x - world.wld.absolute.x, + player.map_pos.y - world.wld.absolute.y, + ) + if game.scene == World { + check_collision() + check_medic_collision() + } +} + +fn World::fight_anime() -> Unit { + if game.a_time >= 180 { + game.scene = Fight + battle(round.enemy) + game.a_time = 0 + return + } + if game.a_time <= 70 { + generate() + @wasm.set_draw_colors(3, index=2) + for i = 0; i <= 160; i = i + 8 { + for k = 0; k < 4; k = k + 1 { + for j = 0; j < game.a_time * 4; j = j + 1 { + @lib.draw_pixel(i + k, j) + @lib.draw_pixel(i + k + 4, 160 - j) + } + } + } + } else if game.a_time <= 110 { + two_color(3, 3) + @wasm.rect(0, 0, 160, 160) + enemy_small(round.enemy) + } else { + battle(round.enemy) + @wasm.set_draw_colors(3, index=2) + for i = 0; i <= 160; i = i + 8 { + for k = 0; k < 4; k = k + 1 { + for j = 0; j < (180 - game.a_time) * 4; j = j + 1 { + @lib.draw_pixel(i + k + 4, j) + @lib.draw_pixel(i + k, 160 - j) + } + } + } + } + game.a_time += 1 +} + +// 伪碰撞箱检测 +fn check_collision() -> Unit { + for k in world.wld.enemylist { + if ( + player.map_pos.x + 8 <= k.map_pos.x || + player.map_pos.x >= k.map_pos.x + k.hitbox.width + ) || + player.map_pos.y + 8 <= k.map_pos.y || + player.map_pos.y >= k.map_pos.y + k.hitbox.height { + continue + } else if k.hp > 0 { + game.lscene = World + game.scene = FightAnime + game.r_time = 0 + round.enemy = k + return + } + } +} + +fn check_medic_collision() -> Unit { + for k in world.wld.heallist { + if ( + player.map_pos.x + 8 <= k.map_pos.x || + player.map_pos.x >= k.map_pos.x + 4 + ) || + player.map_pos.y + 8 <= k.map_pos.y || + player.map_pos.y >= k.map_pos.y + 4 { + continue + } else if k.lvl != 0 { + game.lscene = game.scene + game.scene = Bonus + game.bscene = Heal + bonus_time.tenzor = k.lvl + k.lvl = 0 + } + } +} + +fn check_border_collision(x : Int, y : Int) -> Bool { + for k in world.wld.borderlist { + if (x + 8 <= k.map_pos.x || x >= k.map_pos.x + 14) || + y + 8 <= k.map_pos.y || + y >= k.map_pos.y + 14 { + continue + } else { + return false + } + } + return true +} + +fn enemy_small(self : EnemyStatus) -> Unit { + two_color(1, 3) + // @wasm.text() + @wasm.rect(40, 40, 70, 60) + two_color(2, 0) + @wasm.text(self.name.to_string(), 45, 60) + (self.draw._)(70, 80, 1) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/menu.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/menu.mbt" new file mode 100644 index 0000000..adea442 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/menu.mbt" @@ -0,0 +1,60 @@ +struct Choice { + mut option : Int + cursor : Coordinate +} + +let choice : Choice = { option: 0, cursor: { x: 20, y: 1 } } + +fn health(enemy : EnemyStatus) -> Unit { + @wasm.text("level " + player.level.to_string(), 0, 0) + @wasm.text("level " + enemy.level.to_string(), 90, 0) + // 外边框 + two_color(1, 3) + @wasm.rect(5, 10, 60, 11) + @wasm.rect(100, 10, 55, 11) + + // 实际血条 + + two_color(2, 3) + @wasm.rect( + 5, + 10, + (60.0 * player.hp.to_double() / player.max_hp.to_double()).to_int(), + 11, + ) + @wasm.rect( + 100, + 10, + (55.0 * enemy.hp.to_double() / enemy.max_hp.to_double()).to_int(), + 11, + ) + two_color(3, 0) + if player.level != 19 { + @wasm.text(player.hp.to_string() + "/" + player.max_hp.to_string(), 7, 12) + } + @wasm.text(enemy.hp.to_string() + "/" + enemy.max_hp.to_string(), 102, 12) + if player.battle == Defense { + shield(70, 10) + } + if enemy.battle == Defense { + shield(90, 10) + } +} + +fn menu(enemy : EnemyStatus) -> Unit { + two_color(0, 2) + @wasm.rect(0, 80, 160, 80) + two_color(2, 0) + if round.status == "player" { + if player.battle != Attack && player.battle != Special { + @wasm.text("Fight", 10, 120 - 5 * (1 == choice.option).to_int()) + @wasm.text(battleStatus[1], 60, 120 - 5 * (2 == choice.option).to_int()) + @wasm.text(battleStatus[2], 120, 120 - 5 * (3 == choice.option).to_int()) + } + } +} + +fn round_scene(enemy : EnemyStatus) -> Unit { + menu(enemy) + health(enemy) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/moon.pkg.json" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/moon.pkg.json" new file mode 100644 index 0000000..0d57db8 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/moon.pkg.json" @@ -0,0 +1,22 @@ +{ + "import": [ + { + "path": "moonbitlang/wasm4", + "alias": "wasm" + }, + "frenchpicnic/wasm/lib" + ], + "link": { + "wasm": { + "exports": [ + "start", + "update" + ], + "import-memory": { + "module": "env", + "name": "memory" + }, + "heap-start-address": 6590 + } + } +} \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/player.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/player.mbt" new file mode 100644 index 0000000..0902cee --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/player.mbt" @@ -0,0 +1,121 @@ +struct PlayerStatus { + mut hp : Int + mut max_hp : Int + mut level : Int + map_pos : Coordinate + round_pos : Coordinate + bonus_pos : Coordinate + mut battle : BattleStatus + mut round : RoundStatus + mut finish : Int + mut damage : Int + mut selfround : Bool +} + +let player : PlayerStatus = PlayerStatus::default() + +fn PlayerStatus::default() -> PlayerStatus { + { + hp: 14, + level: 1, + max_hp: 14, + map_pos: Coordinate::{ x: 20, y: 10 }, + round_pos: Coordinate::{ x: 20, y: 35 }, + bonus_pos: Coordinate::{ x: 85, y: 150 }, + battle: Default, + round: Default, + finish: 0, + damage: 0, + selfround: false, + } +} + +fn draw_hero( + x : Int, + y : Int, + ~size : Int = 1, + ~scene : RoundStatus = Default +) -> Unit { + @lib.hero_body(x, y, ~size) + if scene == Default { + @lib.hero_sword(x, y, ~size) + } +} + +fn sword_attack(enemy : EnemyStatus) -> Unit { + match player.round { + Anime => + if game.r_time < 50 { + draw_hero(player.round_pos.x + game.r_time, player.round_pos.y, size=3) + } else if game.r_time >= 51 && game.r_time < 57 { + draw_hero( + player.round_pos.x + 50, + player.round_pos.y, + size=3, + scene=Anime, + ) + @lib.sword_1(player.round_pos.x + 50, player.round_pos.y, size=3) + } else if game.r_time >= 57 && game.r_time < 63 { + draw_hero( + player.round_pos.x + 50, + player.round_pos.y, + size=3, + scene=Anime, + ) + @lib.sword_2(player.round_pos.x + 50, player.round_pos.y, size=3) + @lib.draw_hit(enemy.round_pos.x + 2, enemy.round_pos.y - 2, size=3) + } else if game.r_time >= 63 && game.r_time < 70 { + draw_hero( + player.round_pos.x + 50, + player.round_pos.y, + size=3, + scene=Anime, + ) + @lib.sword_3(player.round_pos.x + 50, player.round_pos.y, size=3) + @lib.draw_hit(enemy.round_pos.x + 2, enemy.round_pos.y - 2, size=3) + if game.r_time == 69 { + sound() + player.round = Action + } + } else if game.r_time >= 70 && game.r_time < 120 { + draw_hero( + player.round_pos.x + (120 - game.r_time), + player.round_pos.y, + size=3, + scene=Default, + ) + two_color(4, 0) + if enemy.level == 108 && enemy.attack == 13 { + @wasm.text("-108", 130, 25) + } else { + @wasm.text("-" + player.damage.to_string(), 130, 25) + } + } else if game.r_time >= 120 { + draw_hero(player.round_pos.x, player.round_pos.y, size=3, scene=Default) + player.damage = 0 + if game.r_time - 120 > 10 { + player.battle = Default + round_enemy(enemy, 80) + } + } + Action => { + draw_hero(player.round_pos.x + 50, player.round_pos.y, size=3) + let mut damage : Int = 0 + let mut cri : Int = 0 + if choice.cursor.x < 50 || choice.cursor.x >= 110 { + damage = 1 + cri = 5 + } else if choice.cursor.x < 75 || choice.cursor.x >= 80 { + damage = 2 + cri = 10 + } else { + damage = 5 + cri = 20 + } + player.damage = damage_enemy(player.level * damage, cri, enemy) + choice.cursor.x = 20 + player.round = Anime + } + Default => return + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/round.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/round.mbt" new file mode 100644 index 0000000..388433f --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/round.mbt" @@ -0,0 +1,166 @@ +struct Round { + mut status : String + mut enemy : EnemyStatus + mut rng : Int +} + +let round : Round = Round::default() + +fn Round::default() -> Round { + { status: "player", enemy: EnemyStatus::default(), rng: -1 } +} + +fn Round::fight(state : String, enemy : EnemyStatus) -> Unit { + if state == "attack" { + if player.round == Default && player.battle == Default { + player.round = Anime + player.battle = Special + game.r_time = game.g_time + } + if player.battle == Attack { + game.r_time += 1 + sword_attack(enemy) + } + if player.battle == Special { + draw_hero(player.round_pos.x, player.round_pos.y, size=3) + @wasm.set_draw_colors(0, index=2) + @wasm.set_draw_colors(2, index=1) + @wasm.rect(20, 115, 30, 5) + @wasm.rect(110, 115, 30, 5) + @wasm.set_draw_colors(3, index=1) + @wasm.rect(50, 115, 25, 5) + @wasm.rect(80, 115, 30, 5) + @wasm.set_draw_colors(4, index=1) + @wasm.rect(75, 115, 5, 5) + if choice.cursor.x <= 20 { + choice.cursor.y = 1 + } else if choice.cursor.x >= 140 { + choice.cursor.y = -1 + } + choice.cursor.x += choice.cursor.y + @wasm.set_draw_colors(3, index=1) + @wasm.rect(choice.cursor.x, 105, 3, 25) + if keyboard.button == X && + keyboard.pressed && + game.g_time - game.r_time > 1 { + player.battle = Attack + choice.cursor.y = 1 + game.r_time = 0 + } + } + } else if state == "defense" { + player.battle = Defense + round_enemy(enemy, player.finish) + } else if state == "heal" { + player.battle = Default + player.hp = @math.minimum(player.hp + 10, player.max_hp) + round_enemy(enemy, player.finish) + } + enemy.battle = Special +} + +fn Round::battle(enemy : EnemyStatus) -> Unit { + if player.hp <= 0 { + game.scene = Defeat + } + if enemy.hp <= 0 { + game.scene = Victory + delete_enemy(round.enemy.level) + round.round_reset() + return + } + round_scene(enemy) + // @wasm.text(player.battle.to_string(), 20, 20) + if round.status == "player" { + if enemy.level == 108 && enemy.attack == 13 { + two_color(4, 0) + @wasm.text("Finish it!", 45, 25) + battleStatus[1] = "Fight" + battleStatus[2] = "Fight" + } + if round.rng == -1 { + let r = @random.new(seed=sed[game.g_time % 9]) + round.rng = r.int(limit=bonus_levels.length()) + // round.rng = 1 + } + enemy.draw(x=enemy.round_pos.x, y=enemy.round_pos.y, Fight) + if player.selfround { + player.finish += 1 + if player.battle == Defense { + player.battle = Default + } + if enemy.level == 108 && enemy.attack == 13 { + fight(battleStatus[0], round.enemy) + return + } + fight(battleStatus[choice.option - 1], round.enemy) + } else { + game.r_time = 0 + player.finish = 0 + draw_hero(player.round_pos.x, player.round_pos.y, size=3) + } + } else { + choice.option = 0 + (enemy.ai._)(enemy) + } +} + +fn damage_enemy(power : Int, crit : Int, enemy : EnemyStatus) -> Int { + let damage = power * critical(crit) + if enemy.name == Pumpkin { + if player.level != 19 { + enemy.hp = enemy.hp - 10 - 2 * (player.level > 3).to_int() + enemy.battle = Default + return 10 + 2 * (player.level > 3).to_int() + } else { + enemy.hp -= 3 + enemy.battle = Default + return 3 + } + } + if enemy.battle == Defense { + enemy.hp -= 1 + enemy.battle = Default + return 1 + } else { + enemy.hp -= damage + return damage + } +} + +fn damage_player(power : Int, crit : Int, hero : PlayerStatus) -> Unit { + let damage = power * critical(crit) + if hero.level == 19 { + hero.hp -= 102 + hero.battle = Default + return + } + if hero.battle == Defense { + hero.hp -= 1 + hero.battle = Default + } else { + hero.hp -= damage + } +} + +fn Round::round_reset(self : Round) -> Unit { + self.status = "player" + player.hp = player.max_hp + player.battle = Default + player.round = Default + choice.option = 0 + player.selfround = false + self.enemy = EnemyStatus::default() +} + +fn Round::round_enemy(enemy : EnemyStatus, clock : Int) -> Unit { + if clock > 30 { + round.status = "enemy" + enemy.battle = Default + enemy.round = Default + player.selfround = false + player.round = Default + game.r_time = 0 + } + draw_hero(player.round_pos.x, player.round_pos.y, size=3) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/scene.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/scene.mbt" new file mode 100644 index 0000000..5153dd0 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/scene.mbt" @@ -0,0 +1,57 @@ +enum Scene { + Welcome + Fight + FightAnime + Victory + Defeat + Bonus + World + Secret + Finish +} derive(Eq, Show) + +enum BounsScene { + LevelUp + Heal + None +} + +let castle : @wasm.Sprite = @wasm.sprite( + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x50\x00\x00\x00\x00\x00\x00\x00\x01\xa9\x00\x00\x00\x00\x00\x00\x00\x01\xa9\x40\x00\x00\x00\x00\x00\x00\x01\xa9\x40\x00\x00\x00\x00\x00\x00\x01\xa9\x40\x00\x00\x00\x00\x00\x00\x77\x77\x74\x00\x00\x00\x00\x00\x00\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x7f\xff\xf4\x00\x00\x00\x00\x00\x00\x2a\xaa\xa0\x00\x00\x00\x00\x00\x00\x0f\xff\x80\x00\x00\x00\x00\x00\x10\x0f\xdf\x80\x01\x00\x00\x00\x00\x10\x0f\xdf\x80\x01\x00\x00\x00\x00\x10\x0f\xdf\x80\x01\x00\x00\x00\x00\x10\x07\x77\x40\x01\x00\x00\x00\x00\x54\x0f\xff\xe0\x05\x40\x00\x00\x01\xa9\x0f\xff\xe0\x1a\x90\x00\x00\x06\xaa\x43\xff\xe0\x6a\xa4\x00\x00\x07\xfe\x42\xaa\xa0\x6a\xa4\x00\x00\x07\xfe\x43\xff\x80\x7f\xe4\x00\x00\x03\xde\x03\xff\x80\x7f\xe4\x00\x00\x03\xde\x03\xff\x80\x7f\xe4\x00\x00\x03\xfe\x03\xff\x80\x3d\xa0\x00\x00\x03\xfe\x03\xff\x80\x3d\xa0\x00\x00\x03\xfe\x0f\xff\x80\x3f\xe0\x00\x00\x03\xfe\x0f\xff\x80\x3f\xe0\x00\x00\x03\xfe\x0f\xff\x80\x3f\xe4\x00\x00\x07\xfe\x0f\xff\x80\xff\xe4\x00\x00\x07\xfe\x0f\xff\x80\xff\xe4\x00\x00\x07\xfe\x0f\xff\x80\xff\xe4\x00\x00\x07\xfe\x0f\xff\x80\x15\x7d\x54\x1d\x5d\xf5\x0f\xff\x80\x1f\xff\xd4\x1f\xfd\xd5\x0f\xff\x80\xbf\xff\xa4\x1f\xfe\x96\x0f\xff\x80\xbf\xff\xa4\x1f\xfe\x96\xff\xff\x80\xbf\xff\xf4\x1f\xff\xd7\xfd\xdd\xff\xff\xff\xf4\x1f\xaa\xbf\xfd\xdd\xff\xff\xef\xf4\x07\xfa\xbf\xff\xff\xff\xff\xfe\xa0\x07\xfe\xbf\xff\xff\xff\xd5\xff\xa0\x07\xfe\xbf\x5f\xff\xff\xd5\xff\xd0\x07\xfe\xbf\x5f\xff\xff\xd5\xff\xd0\x07\xfe\xbf\x5f\xff\xff\xd5\xff\xd0\x07\xfe\xbf\xff\xd5\xff\xff\xff\xd0\x07\xfe\xbf\xff\xd5\xff\xff\xff\xd0\x07\xfe\xbf\xff\x6a\x7f\xff\xff\xd0\x07\xfe\xbf\xff\x6a\x7f\xff\xff\xd0\x06\xaa\xbf\xff\x6a\x7f\xff\xff\xd0\x0a\xaa\xaa\xaa\x6a\x55\x55\x55\x50\x0a\xaa\xaa\xaa\x55\x6a\xaa\xaa\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00", +) + +fn Game::welcome() -> Unit { + draw_castle() + if keyboard.button == X && keyboard.pressed { + game.scene = World + game.flag = true + world.wld = World::new() + return + } + if game.g_time > 360 { + two_color(2, 0) + @wasm.text("Up Dungeons", 35, @math.minimum(15, game.g_time / 4 - 90)) + } + if game.g_time > 440 { + if game.g_time % 30 == 0 { + game.flag = not(game.flag) + } + if game.flag { + @wasm.text("Press X to start", 20, 140) + } + } +} + +fn draw_castle() -> Unit { + @wasm.set_draw_colors(0, index=1) + @wasm.set_draw_colors(4, index=2) + @wasm.set_draw_colors(3, index=3) + @wasm.set_draw_colors(2, index=4) + castle.blit( + 60, + @math.maximum(50, 160 - game.g_time / 4), + 36, + 52, + { one_bit_per_pixel: false, flip_x: false, flip_y: false, rotate: false }, + ) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/tone.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/tone.mbt" new file mode 100644 index 0000000..f0600b2 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/tone.mbt" @@ -0,0 +1,11 @@ +fn sound() -> Unit { + @wasm.tone( + (500, 30), + @wasm.ADSR::new(25, release=0, decay=0, attack=0), + @wasm.ADSRVolume::new(24, peak=62), + @wasm.ToneFlag::new( + channel=@wasm.ToneChannel::Pulse1, + mode=@wasm.ToneMode::Duty_1_8, + ), + ) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/variable.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/variable.mbt" new file mode 100644 index 0000000..4a01e7a --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/game/variable.mbt" @@ -0,0 +1,24 @@ +let battleStatus = ["attack", "defense", "heal"] + +let default_anime : Anime = fn(self, sk) { } + +let sed : Array[Bytes] = [ + b"11111111111111111111111111111111", b"22222222222222222222222222222222", b"33333333333333333333333333333333", + b"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC", b"99999999999999999999999999999999", b"MBTMBTMBTMBTMBTMBTMBTMBTMBTMBTMB", + b"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", b"88888888888888888888888888888888", b"66666666666666666666666666666666", +] + +fn critical(x : Int) -> Int { + let r = @random.new(seed=sed[game.g_time % 9]) + game.rng = r.int(limit=101) + if x >= game.rng { + return 2 + } + game.rng = r.int(limit=101) + r.int(limit=101) + 1 + return 1 +} + +fn two_color(x : UInt, y : UInt) -> Unit { + @wasm.set_draw_colors(x, index=1) + @wasm.set_draw_colors(y, index=2) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/heal.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/heal.mbt" new file mode 100644 index 0000000..5ec6d5e --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/heal.mbt" @@ -0,0 +1,22 @@ +pub let draw_heal : DrawEnemy = fn(x : Int, y : Int, size : Int) -> Unit { + for k = 0; k < 1 * size; k = k + 1 { + for l = 0; l < 1 * size; l = l + 1 { + @wasm.set_draw_colors(2, index=2) + for i = 0; i < 5; i = i + 1 { + for j = 2; j < 6; j = j + 1 { + draw_pixel(x + k + i * size, y + l + j * size) + } + } + @wasm.set_draw_colors(3, index=2) + draw_pixel(x + k + 1 * size, y + l) + draw_pixel(x + k + 3 * size, y + l) + for i = 1; i < 6; i = i + 1 { + draw_pixel(x + k + 2 * size, y + l + i * size) + } + @wasm.set_draw_colors(4, index=2) + for i = 0; i < 5; i = i + 1 { + draw_pixel(x + k + i * size, y + l + 2 * size) + } + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/hero.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/hero.mbt" new file mode 100644 index 0000000..e71c920 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/hero.mbt" @@ -0,0 +1,202 @@ +pub fn hero_body(x : Int, y : Int, ~size : Int = 1) -> Unit { + @wasm.set_draw_colors(4, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + + // 头发 + draw_pixel(x + i + 2 * size, y + j) + draw_pixel(x + i + 3 * size, y + j) + draw_pixel(x + i + 1 * size, y + j + 1 * size) + draw_pixel(x + i + 1 * size, y + j + 2 * size) + draw_pixel(x + i + 1 * size, y + j + 3 * size) + draw_pixel(x + i + 2 * size, y + j + 2 * size) + draw_pixel(x + i + 2 * size, y + j + 3 * size) + + // 帽子和眼睛 + draw_pixel(x + i + 5 * size, y + j) + draw_pixel(x + i + 2 * size, y + j + 5 * size) + draw_pixel(x + i + 3 * size, y + j + 5 * size) + draw_pixel(x + i + 4 * size, y + j + 5 * size) + draw_pixel(x + i + 5 * size, y + j + 5 * size) + draw_pixel(x + i, y + j + 7 * size) + draw_pixel(x + i + 1 * size, y + j + 6 * size) + draw_pixel(x + i + 1 * size, y + j + 7 * size) + draw_pixel(x + i + 4 * size, y + j + 2 * size) + draw_pixel(x + i + 6 * size, y + j + 2 * size) + + // 脚和剑 + draw_pixel(x + i + 1 * size, y + j + 8 * size) + draw_pixel(x + i + 2 * size, y + j + 8 * size) + draw_pixel(x + i + 5 * size, y + j + 8 * size) + draw_pixel(x + i + 6 * size, y + j + 8 * size) + } + } + @wasm.set_draw_colors(2, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i, y + j + 4 * size) + draw_pixel(x + i, y + j + 5 * size) + draw_pixel(x + i + 2 * size, y + j + 4 * size) + draw_pixel(x + i + 3 * size, y + j + 2 * size) + draw_pixel(x + i + 3 * size, y + j + 3 * size) + draw_pixel(x + i + 3 * size, y + j + 4 * size) + draw_pixel(x + i + 4 * size, y + j + 3 * size) + draw_pixel(x + i + 5 * size, y + j + 2 * size) + draw_pixel(x + i + 5 * size, y + j + 3 * size) + draw_pixel(x + i + 5 * size, y + j + 4 * size) + draw_pixel(x + i + 7 * size, y + j + 5 * size) + draw_pixel(x + i + 8 * size, y + j + 5 * size) + draw_pixel(x + i + 1 * size, y + j + 8 * size) + draw_pixel(x + i + 2 * size, y + j + 8 * size) + draw_pixel(x + i + 5 * size, y + j + 8 * size) + draw_pixel(x + i + 6 * size, y + j + 8 * size) + } + } + @wasm.set_draw_colors(3, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + + // 头盔和剑其他部分 + draw_pixel(x + i + 4 * size, y + j) + draw_pixel(x + i + 2 * size, y + j + 1 * size) + draw_pixel(x + i + 3 * size, y + j + 1 * size) + draw_pixel(x + i + 4 * size, y + j + 1 * size) + draw_pixel(x + i + 5 * size, y + j + 1 * size) + + // 衣服 + draw_pixel(x + i + 1 * size, y + j + 5 * size) + draw_pixel(x + i + 2 * size, y + j + 6 * size) + draw_pixel(x + i + 2 * size, y + j + 7 * size) + draw_pixel(x + i + 3 * size, y + j + 6 * size) + draw_pixel(x + i + 3 * size, y + j + 7 * size) + draw_pixel(x + i + 4 * size, y + j + 6 * size) + draw_pixel(x + i + 4 * size, y + j + 7 * size) + draw_pixel(x + i + 5 * size, y + j + 6 * size) + draw_pixel(x + i + 5 * size, y + j + 7 * size) + draw_pixel(x + i + 6 * size, y + j + 5 * size) + } + } +} + +pub fn hero_sword(x : Int, y : Int, ~size : Int = 1) -> Unit { + @wasm.set_draw_colors(4, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i + 7 * size, y + j + 4 * size) + draw_pixel(x + i + 8 * size, y + j + 4 * size) + draw_pixel(x + i + 9 * size, y + j + 4 * size) + } + } + @wasm.set_draw_colors(3, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i + 8 * size, y + j) + draw_pixel(x + i + 8 * size, y + j + 1 * size) + draw_pixel(x + i + 8 * size, y + j + 2 * size) + draw_pixel(x + i + 8 * size, y + j + 3 * size) + draw_pixel(x + i + 8 * size, y + j + 6 * size) + } + } +} + +pub fn sword_1(x : Int, y : Int, ~size : Int = 1) -> Unit { + @wasm.set_draw_colors(3, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + for k = 0; k < 4; k = k + 1 { + draw_pixel(x + i + 8 * size, y + j + k * size) + } + for k = 6; k < 11; k = k + 1 { + draw_pixel(x + i + k * size, y + j - 2 * size) + } + for k = 9; k < 12; k = k + 1 { + for l = 0; l < 2; l = l + 1 { + draw_pixel(x + i + k * size, y + j - l * size) + draw_pixel(x + i + @math.minimum(k, 10) * size, y + j + 1 * size) + } + } + draw_pixel(x + i + 7 * size, y + j + 4 * size) + draw_pixel(x + i + 7 * size, y + j - 1 * size) + draw_pixel(x + i + 9 * size, y + j + 2 * size) + } + } +} + +pub fn sword_2(x : Int, y : Int, ~size : Int = 1) -> Unit { + @wasm.set_draw_colors(4, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i + 9 * size, y + j + 4 * size) + draw_pixel(x + i + 9 * size, y + j + 6 * size) + } + } + @wasm.set_draw_colors(3, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i + 9 * size, y + j + 5 * size) + for k = 10; k < 17; k = k + 1 { + for l = 5; l < 7; l = l + 1 { + draw_pixel(x + i + k * size, y + j + l * size) + } + } + for k = 12; k < 16; k = k + 1 { + draw_pixel(x + i + k * size, y + j + 7 * size) + } + for k = 12; k < 15; k = k + 1 { + draw_pixel(x + i + k * size, y + j + 3 * size) + } + // + draw_pixel(x + i + 11 * size, y + j + 4 * size) + draw_pixel(x + i + 12 * size, y + j + 4 * size) + draw_pixel(x + i + 13 * size, y + j + 2 * size) + draw_pixel(x + i + 14 * size, y + j + 4 * size) + for k = 16; k < 18; k = k + 1 { + for l = 2; l < 6; l = l + 1 { + draw_pixel(x + i + k * size, y + j + l * size) + } + } + draw_pixel(x + i + 15 * size, y + j + 2 * size) + draw_pixel(x + i + 14 * size, y + j + 1 * size) + draw_pixel(x + i + 15 * size, y + j + 1 * size) + draw_pixel(x + i + 16 * size, y + j + 1 * size) + draw_pixel(x + i + 13 * size, y + j) + draw_pixel(x + i + 14 * size, y + j) + draw_pixel(x + i + 15 * size, y + j) + draw_pixel(x + i + 12 * size, y + j - 1 * size) + draw_pixel(x + i + 13 * size, y + j - 1 * size) + } + } +} + +pub fn sword_3(x : Int, y : Int, ~size : Int = 1) -> Unit { + @wasm.set_draw_colors(3, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i + 2 * size, y + j + 5 * size) + draw_pixel(x + i + 8 * size, y + j + 5 * size) + draw_pixel(x + i + 10 * size, y + j + 5 * size) + draw_pixel(x + i + 12 * size, y + j + 5 * size) + draw_pixel(x + i + 14 * size, y + j + 5 * size) + draw_pixel(x + i + 13 * size, y + j + 4 * size) + draw_pixel(x + i + 14 * size, y + j + 4 * size) + draw_pixel(x + i + 15 * size, y + j + 4 * size) + draw_pixel(x + i + 15 * size, y + j + 3 * size) + // + draw_pixel(x + i + 3 * size, y + j + 6 * size) + draw_pixel(x + i + 4 * size, y + j + 6 * size) + draw_pixel(x + i + 5 * size, y + j + 6 * size) + draw_pixel(x + i + 6 * size, y + j + 6 * size) + draw_pixel(x + i + 7 * size, y + j + 6 * size) + draw_pixel(x + i + 9 * size, y + j + 6 * size) + draw_pixel(x + i + 10 * size, y + j + 6 * size) + draw_pixel(x + i + 11 * size, y + j + 6 * size) + draw_pixel(x + i + 12 * size, y + j + 6 * size) + draw_pixel(x + i + 13 * size, y + j + 6 * size) + draw_pixel(x + i + 5 * size, y + j + 7 * size) + draw_pixel(x + i + 6 * size, y + j + 7 * size) + draw_pixel(x + i + 7 * size, y + j + 7 * size) + draw_pixel(x + i + 8 * size, y + j + 7 * size) + draw_pixel(x + i + 9 * size, y + j + 7 * size) + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/hit.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/hit.mbt" new file mode 100644 index 0000000..1692916 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/hit.mbt" @@ -0,0 +1,13 @@ +pub fn draw_hit(x : Int, y : Int, ~size : Int = 1) -> Unit { + @wasm.set_draw_colors(1, index=1) + @wasm.set_draw_colors(1, index=2) + for i = 0; i < size; i = i + 1 { + for j = 0; j < size; j = j + 1 { + for k = 0; k < 7; k = k + 1 { + let l = 13 - k * 2 + draw_pixel(x + i + k * size, y + j + l * size) + draw_pixel(x + i + k * size, y + j + (l - 1) * size) + } + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/misc.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/misc.mbt" new file mode 100644 index 0000000..c1535f7 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/misc.mbt" @@ -0,0 +1,9 @@ +pub fn draw_pixel(x : Int, y : Int) -> Unit { + @wasm.rect(x, y, 1, 1) +} + +pub type DrawEnemy (Int, Int, Int) -> Unit + +pub let draw_default : DrawEnemy = fn(x : Int, y : Int, size : Int) -> Unit { + @wasm.rect(x, y, size, size) +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/moon.pkg.json" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/moon.pkg.json" new file mode 100644 index 0000000..355a71f --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/moon.pkg.json" @@ -0,0 +1,8 @@ +{ + "import": [ + { + "path": "moonbitlang/wasm4", + "alias": "wasm" + } + ] +} \ No newline at end of file diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/pumpkin.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/pumpkin.mbt" new file mode 100644 index 0000000..7d10020 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/pumpkin.mbt" @@ -0,0 +1,57 @@ +pub let draw_pumpkin : DrawEnemy = fn(x : Int, y : Int, size : Int) -> Unit { + + // 条纹框框 + @wasm.set_draw_colors(2, index=2) + for i = 1 * size; i < 6 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + j + 2 * size, y + i) + draw_pixel(x + j + 4 * size, y + i) + draw_pixel(x + j + 6 * size, y + i) + } + } + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + j, y + 6 * size + i) + draw_pixel(x + j + 8 * size, y + 4 * size + i) + } + } + @wasm.set_draw_colors(3, index=2) + for i = 1 * size; i < 6 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + j + 3 * size, y + i) + draw_pixel(x + j + 5 * size, y + i) + } + } + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + 2 * size + i, y + 9 * size + j) + draw_pixel(x + 3 * size + i, y + 9 * size + j) + draw_pixel(x + 6 * size + i, y + 9 * size + j) + draw_pixel(x + 7 * size + i, y + 9 * size + j) + } + } + + // 眼睛和头发(?) + @wasm.set_draw_colors(4, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i + 4 * size, y + j) + draw_pixel(x + i + 4 * size, y + j + 2 * size) + draw_pixel(x + i + 2 * size, y + j + 2 * size) + draw_pixel(x + i + 4 * size, y + j + 4 * size) + draw_pixel(x + i + 3 * size, y + j + 4 * size) + + // 衣服 + draw_pixel(x + i + 1 * size, y + j + 6 * size) + draw_pixel(x + i + 2 * size, y + j + 6 * size) + for k = 3; k < 7; k = k + 1 { + for v = 6; v < 9; v = v + 1 { + draw_pixel(x + i + k * size, y + j + v * size) + } + } + draw_pixel(x + i + 7 * size, y + j + 6 * size) + draw_pixel(x + i + 8 * size, y + j + 5 * size) + draw_pixel(x + i + 8 * size, y + j + 6 * size) + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/sheep.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/sheep.mbt" new file mode 100644 index 0000000..5a3a36b --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/sheep.mbt" @@ -0,0 +1,56 @@ +pub let draw_sheep : DrawEnemy = fn(x : Int, y : Int, size : Int) -> Unit { + // 羊毛 + @wasm.set_draw_colors(3, index=2) + for i = 0; i < 10 * size; i = i + 1 { + for j = 0; j < 6 * size; j = j + 1 { + draw_pixel(x + i, y + j) + } + } + for i = 10 * size; i < 11 * size; i = i + 1 { + for j = 2 * size; j < 3 * size; j = j + 1 { + draw_pixel(x + i, y + j) + } + } + for i = 11 * size; i < 12 * size; i = i + 1 { + for j = 2 * size; j < 5 * size; j = j + 1 { + draw_pixel(x + i, y + j) + } + } + + //去掉羊毛 + @wasm.set_draw_colors(1, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i, y + j) + draw_pixel(x + i, y + 5 * size + j) + draw_pixel(x + 9 * size + i, y + j) + draw_pixel(x + 9 * size + i, y + 5 * size + j) + } + } + + // 脸耳朵和脚 + @wasm.set_draw_colors(4, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + i, y + j + 1 * size) + draw_pixel(x + i + 4 * size, y + j + 1 * size) + draw_pixel(x + i + 5 * size, y + j + 1 * size) + draw_pixel(x + i + 3 * size, y + j + 6 * size) + draw_pixel(x + i + 7 * size, y + j + 6 * size) + for k = 1 * size; k < 4 * size; k = k + 1 { + draw_pixel(x + i + k, y + j + 2 * size) + draw_pixel(x + i + k, y + j + 3 * size) + draw_pixel(x + i + k, y + j + 4 * size) + } + } + } + + // 眼睛 + @wasm.set_draw_colors(2, index=2) + for i = 0; i < 1 * size; i = i + 1 { + for j = 0; j < 1 * size; j = j + 1 { + draw_pixel(x + 1 * size + i, y + 3 * size + j) + draw_pixel(x + 3 * size + i, y + 3 * size + j) + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/tree.mbt" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/tree.mbt" new file mode 100644 index 0000000..8ec4961 --- /dev/null +++ "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/lib/tree.mbt" @@ -0,0 +1,22 @@ +pub let draw_tree : DrawEnemy = fn(x : Int, y : Int, size : Int) -> Unit { + for k = 0; k < 1 * size; k = k + 1 { + for l = 0; l < 1 * size; l = l + 1 { + @wasm.set_draw_colors(2, index=2) + for i = 2; i < 5; i = i + 1 { + for j = 1; j < 6; j = j + 1 { + draw_pixel(x + k + i * size, y + l + j * size) + } + } + draw_pixel(x + k + 1 * size, y + l + 2 * size) + draw_pixel(x + k + 1 * size, y + l + 4 * size) + draw_pixel(x + k + 5 * size, y + l + 2 * size) + draw_pixel(x + k + 5 * size, y + l + 4 * size) + for i = 0; i < 7; i = i + 1 { + draw_pixel(x + k + i * size, y + l + 5 * size) + } + @wasm.set_draw_colors(3, index=2) + draw_pixel(x + k + 3 * size, y + l + 6 * size) + draw_pixel(x + k + 3 * size, y + l + 7 * size) + } + } +} diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/four_color.png" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/four_color.png" new file mode 100644 index 0000000..8a46e46 Binary files /dev/null and "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/four_color.png" differ diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/382409d887a9756.gif" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/382409d887a9756.gif" new file mode 100644 index 0000000..abff7ec Binary files /dev/null and "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/382409d887a9756.gif" differ diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame2.bmp" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame2.bmp" new file mode 100644 index 0000000..2167e40 Binary files /dev/null and "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame2.bmp" differ diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame3.bmp" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame3.bmp" new file mode 100644 index 0000000..9521793 Binary files /dev/null and "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame3.bmp" differ diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame4.bmp" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame4.bmp" new file mode 100644 index 0000000..801c242 Binary files /dev/null and "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame4.bmp" differ diff --git "a/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame5.bmp" "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame5.bmp" new file mode 100644 index 0000000..d66183d Binary files /dev/null and "b/teams/\351\261\274\351\261\274\350\222\270\344\272\206/source/src/resource/hero/frame5.bmp" differ