Deploying to gh-pages from @ 90f14bc067 🚀

This commit is contained in:
unanmed 2023-01-04 03:43:06 +00:00
parent dc6eb041df
commit 1ef3e9bb07
405 changed files with 515 additions and 27260 deletions

30
.gitignore vendored
View File

@ -1,30 +0,0 @@
public/_server/config.json
introduce.md
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
dist.zip
story.md

View File

@ -1,3 +0,0 @@
vite.config.ts
public/project/data.js
story.md

View File

@ -1,3 +0,0 @@
{
"recommendations": ["Vue.volar"]
}

View File

@ -1,64 +0,0 @@
# mota-vite 使用说明
图文说明https://h5mota.com/bbs/thread/?tid=940&p=1
## 功能介绍
1. 极细粒度的热重载,使用它开发,你可以省去 95% 以上的刷新操作
2. 支持 vue ts antdv 等插件,使开发更为便捷迅速,写插件和 ui 更加方便
3. 基于 pnpm可以自己安装想要的依赖包
### 热重载
1. 当 libs/ main.js index.html 中的任意一个文件被更改后,会自动刷新塔的页面
2. 修改楼层文件后自动在塔的页面上显示出来,不需要刷新
3. 修改脚本编辑或插件编写后也能自动更新更改的插件或脚本,但不保证不会出问题(一般都不会有问题的
4. 修改图块属性、怪物属性等后会自动更新
5. 当全塔属性被修改时,会自动刷新塔的页面
6. 样板的 styles.css 被修改后也可以直接显示,不需要刷新
7. 当 ts 文件和 vue 文件修改时,会自动更新对应的组件
8. 其余内容修改后不会自动更新也不会刷新页面
## 使用说明
### 进入开发环境
1. 首先需要安装 node.js图文教程见 https://h5mota.com/bbs/thread/?tid=921&p=1
2. 右键 windows 图标,选择打开终端,运行 `npm i -g pnpm`,等待安装完成
3. 用 vscode 打开项目文件夹,修改 mota.config.ts 中的塔 name并保证与全塔属性中的相同否则上传到网站之后可能无法进行游玩
4. 使用 ctrl+j 快捷键打开 vscode 底栏并选择终端选项Terminal运行 pnpm i安装依赖包依赖包较多安装时长可能较长
5. 在系统资源管理器中(不是 vscode打开 public 文件夹,按下 shift + 鼠标右键win11 只按右键即可),选择在终端打开或在 powershell 打开
6. 在刚刚打开的终端中执行`node server.cjs`,运行样板的启动服务,可以提供样板相关的热重载服务
7. 回到 vscode在终端中执行`pnpm dev`,运行 vite 启动服务,可以提供 ts 的按需编译等功能
8. 打开 vite 提供的网址,即可进入游戏界面,打开样板启动服务提供的编辑器网址,即可进入编辑器界面
9. 想要退出时,可以按下 ctrl+c 终止服务或直接退出 vscode 或终端
### 构建 & 发布
1. 开发完成后,你可以执行`pnpm build`进行构建,结果会生成在 dist 文件夹下,对其进行压缩成 zip 后即可发布和更新
2. 构建完成后,你还可以执行`pnpm preview`来预览网站上的效果或使用`pnpm preview-node`在热重载条件下预览网站上的效果
### 开发
1. 对于 vue它会在 body 的一个子标签id="root")上构建 vue app
2. 对于 ts所有在 src 文件夹内的 ts 都会被编译,但会根据引入情况,只将使用到的文件构建
3. 建议安装 vscode 插件 volar它提供了 vue 文件的语法高亮与 ts 支持
### 插件
1. 该样板提供了 ts 插件的解决方案,你可以在 plugin 文件夹下创建你的插件(样板内置了一个弹出显示文字的插件)
2. 插件创建后,必须有一个默认导出,且必须是一个函数,表示进行插件的初始初始化,同时必须有返回值,返回所有在外部会用到的变量与函数,其中所有的变量与函数都会转发到`core.plugin`上,所有不以下划线开头的函数都会转发到`core`上,例如样板内置的弹出显示的插件可以直接在外部使用`core.addPop()`来调用,注意所有的转发会在游戏加载完成后进行!
3. 插件中与样板相关的初始化应当全部在默认导出的函数中进行,不可在函数外部进行,否则会报错!
4. 插件编写完成后,需要在`src/types/plugin.d.ts`中进行类型标注,把所有在外部可见的函数与变量标注在接口`PluginDeclaration`中
5. 之后在`src/initPlugin.ts`中按照示例初始化插件即可
6. 之后便可以在各个地方使用插件中的函数了!
## 注意事项
1. 所有 ts 与 vue 文件中的代码在录像验证时都不会运行,请勿在里面进行直接的与分数相关的操作
2. 如果其中有与其相关的操作,应当为用户操作后的回调函数,并在样板的插件中注册相应录像操作,才能使录像验证正常运行
## 一键更新
1. 在 script/update.ts 中修改你的用户 id 和密码
2. 执行 pnpm update 即可自动发自助更新,之后通知管理员审核即可

View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

View File

Before

Width:  |  Height:  |  Size: 569 B

After

Width:  |  Height:  |  Size: 569 B

View File

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

View File

Before

Width:  |  Height:  |  Size: 1010 B

After

Width:  |  Height:  |  Size: 1010 B

View File

Before

Width:  |  Height:  |  Size: 771 B

After

Width:  |  Height:  |  Size: 771 B

View File

Before

Width:  |  Height:  |  Size: 738 B

After

Width:  |  Height:  |  Size: 738 B

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 669 KiB

After

Width:  |  Height:  |  Size: 669 KiB

View File

Before

Width:  |  Height:  |  Size: 401 KiB

After

Width:  |  Height:  |  Size: 401 KiB

View File

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

@ -0,0 +1,187 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括脚本编辑
* 相关文档 _docs/editor.md ~ http://127.0.0.1:1055/_docs/#/editor?id=修改表格
*/
var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
_type: 'object',
_data: {
events: {
_type: 'object',
_data: {
resetGame: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '重置游戏'
},
win: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '游戏获胜'
},
lose: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '游戏失败'
},
changingFloor: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '切换楼层中'
},
afterChangeFloor: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '切换楼层后'
},
flyTo: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '楼层飞行'
},
beforeBattle: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '战前判定'
},
afterBattle: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '战后脚本'
},
afterOpenDoor: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '开门后脚本'
},
afterGetItem: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '道具后脚本'
},
afterPushBox: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '推箱子后'
}
}
},
enemys: {
_type: 'object',
_data: {
getSpecials: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '怪物特殊属性'
},
getEnemyInfo: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '怪物真实属性'
},
getDamageInfo: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '战斗伤害信息'
}
}
},
actions: {
_type: 'object',
_data: {
onKeyUp: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '按键处理'
}
}
},
control: {
_type: 'object',
_data: {
saveData: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '存档操作'
},
loadData: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '读档操作'
},
getStatusLabel: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '状态名定义'
},
triggerDebuff: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '毒衰咒处理'
},
updateStatusBar: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '更新状态栏'
},
updateCheckBlock: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '阻激夹域伤害'
},
moveOneStep: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '每步后操作'
},
moveDirectly: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '瞬间移动'
},
parallelDo: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '并行脚本'
}
}
},
ui: {
_type: 'object',
_data: {
drawStatistics: {
_leaf: true,
_type: 'textarea',
_lint: true,
_data: '数据统计'
}
}
}
}
};

File diff suppressed because one or more lines are too long

93
assets/antdv.e0a750df.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

27
assets/common.f94eef39.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

18
assets/index.0c3090cd.js Normal file

File diff suppressed because one or more lines are too long

138
assets/index.e41b9955.css Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

21
components.d.ts vendored
View File

@ -1,21 +0,0 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'
export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
ADivider: typeof import('ant-design-vue/es')['Divider']
ASelect: typeof import('ant-design-vue/es')['Select']
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
ASlider: typeof import('ant-design-vue/es')['Slider']
ASwitch: typeof import('ant-design-vue/es')['Switch']
Box: typeof import('./src/components/box.vue')['default']
BoxAnimate: typeof import('./src/components/boxAnimate.vue')['default']
Colomn: typeof import('./src/components/colomn.vue')['default']
EnemyOne: typeof import('./src/components/enemyOne.vue')['default']
Scroll: typeof import('./src/components/scroll.vue')['default']
}
}

57
idea.md
View File

@ -1,57 +0,0 @@
## 怪物
### 第二章 智慧
- 怪物拥有火、水等属性,在不同天气下属性不同
- 同化
- 同化+阻击
- 电摇嘲讽:到同行或同列直接怼过去,门和墙撞碎,不消耗钥匙,攻击怪物,捡道具,改变 bgm可吃补给用
- 抢夺:抢夺你的装备并使用(简单难度中,怪物使用时属性降低)
- 抢夺 2.0:抢夺你的道具(怪物手册和楼传除外),并按照左上、右上、右下、左下的顺序依次放到地图的四角(简单无效)
- 抢夺 3.0:抢夺装备,但每过 10 回合便按照 2.0 方法扔至地图四角(因为怪物觉得装备不好使),然后重新抢夺你的装备(简单无效)
#### Boss
音游,音乐为一个被遗忘的夜晚,可选简单与困难,困难可获得成就冰与火之舞
玩法一个会转动的圆盘带有一个伸出去的把手boss 从四面八方射子弹,当子弹恰好落到把手前端时,点击按键或屏幕,可以抵挡子弹,简单难度 3 条命,困难 1 条。简单难度音符密度低。困难难度为冰与火之舞的节奏。简单难度判定时间为前后各 100ms困难为 50ms
## 主角
- 反抢夺1 级反 1.02 级反 2.03 级反 3.0,用智慧点点
- 学习:学习选定怪物的选定技能(不能学光环),消耗智慧点,初始 400但每次消耗点数+100持续 3 场战斗
- 铸剑为盾:主动技能,减少攻击,增加防御
- 血之代偿:消耗一定血量,战前对怪物造成同等数值的伤害
### 第三章 战争
## 机制
### 通用
- 实时天气
- 成就系统
- 装备合成、装备(孔)强化
- 宝石目标设定
- 自动宝物规划,选中两个或更多宝物后自动在本地图中规划出最优拾取路线,原则是尽量减少其余宝物的捡拾,自动切换主动技能,怪物造成的伤害最低的路线
- 临界显示方式,宝石数还是数值
- 怪物目标设定(完成)
- 木牌查看系统
- 宝物目标设定
- 每个怪物加一个怪物说明
- 歌词展示系统
### 第二章 智慧
- 按下一个开关,所有红门变黄门,黄门变蓝门,蓝门变红门
## 成就
- 虚惊一场:打完山洞门口的怪只剩 1 滴血
- 学坏了:学习敌人的电摇嘲讽技能
- 我就是傻子:不学习反抢夺通过第二章
- 真能刷:勇气之路的刷血怪刷到 15w 以上的血
- 满腹经纶:把所有能学的怪物技能都学一遍
- 冰与火之舞:通过第二章特殊战的困难难度
- 你是怎么做到的?!:山路地图与勇气之路地图中与若干个神秘的木牌对话

View File

@ -2,6 +2,8 @@
<html>
<head>
<script type="module" crossorigin src="/games/HumanBreak/assets/polyfills.24a28418.js"></script>
<meta http-equiv='content-type' content='text/html' charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=Edge, chrome=1'>
<meta name='author' content='ckcz123'>
@ -15,7 +17,13 @@
<meta name="x5-orientation" content="portrait">
<meta name="x5-fullscreen" content="true">
<meta name="x5-page-mode" content="app">
<link id="mota-css" type='text/css' href='/styles.css' rel='stylesheet'>
<link id="mota-css" type='text/css' href='/games/HumanBreak/styles.css' rel='stylesheet'>
<script type="module" crossorigin src="/games/HumanBreak/assets/index.0c3090cd.js"></script>
<link rel="modulepreload" crossorigin href="/games/HumanBreak/assets/antdv.e0a750df.js">
<link rel="modulepreload" crossorigin href="/games/HumanBreak/assets/common.f94eef39.js">
<link rel="stylesheet" href="/games/HumanBreak/assets/index.e41b9955.css">
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head>
<body>
@ -201,10 +209,13 @@
<script src='libs/thirdparty/zip.min.js'></script>
<script src="libs/thirdparty/lodash.min.js"></script>
<script id='mainScript' src='main.js'></script>
<script src="/src/initPlugin.ts" type="module"></script>
<script src="/src/main.ts" type="module"></script>
<script>main.init('play'); main.listen();</script>
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="/games/HumanBreak/assets/polyfills-legacy.852057b5.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="/games/HumanBreak/assets/index-legacy.81e68bf6.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>

View File

@ -125,13 +125,6 @@ actions.prototype._init = function () {
this._sys_longClick_lockControl,
50
);
// --- onStatusBarClick注册
this.registerAction(
'onStatusBarClick',
'_sys_onStatusBarClick',
this._sys_onStatusBarClick,
0
);
};
////// 注册一个用户交互行为 //////
@ -1050,24 +1043,6 @@ actions.prototype._sys_longClick_lockControl = function (x, y, px, py) {
return false;
};
actions.prototype.onStatusBarClick = function (e) {
if (!core.isPlaying()) return false;
var left = core.dom.gameGroup.offsetLeft + 3;
var top = core.dom.gameGroup.offsetTop + 3;
var px = parseInt((e.clientX - left) / core.domStyle.scale),
py = parseInt((e.clientY - top) / core.domStyle.scale);
return this.doRegisteredAction(
'onStatusBarClick',
Math.max(px, 0),
Math.max(py, 0)
);
};
actions.prototype._sys_onStatusBarClick = function (px, py, vertical) {
if (this.actionsdata.onStatusBarClick)
return this.actionsdata.onStatusBarClick(px, py, vertical);
};
/////////////////// 在某个界面时的按键点击效果 ///////////////////
actions.prototype._getChoicesTopIndex = function (length) {
@ -2992,10 +2967,8 @@ actions.prototype._clickGameInfo = function (x, y) {
case 3:
return core.ui._drawHelp();
case 4:
return core.ui._drawAbout();
case 5:
return this._clickGameInfo_download();
case 6:
case 5:
core.status.event.selection = 5;
core.playSound('取消');
core.ui._drawSettings();

View File

@ -2471,20 +2471,6 @@ control.prototype._replayAction_key = function (action) {
return true;
};
control.prototype._replayAction_click = function (action) {
if (action.indexOf('click:') != 0) return false;
var p = action.split(':');
if (p.length != 4) return false;
core.actions.doRegisteredAction(
'onStatusBarClick',
parseInt(p[2]),
parseInt(p[3]),
parseInt(p[1])
);
core.replay();
return true;
};
control.prototype._replayAction_ignoreInput = function (action) {
if (
action.indexOf('input:') == 0 ||
@ -3202,7 +3188,6 @@ control.prototype.setHeroLoc = function (name, value, noGather) {
if ((name == 'x' || name == 'y') && !noGather) {
this.gatherFollowers();
}
core.ui.drawStatusBar();
};
////// 获得勇士的位置 //////

Some files were not shown because too many files have changed in this diff Show More