完善部分ui

This commit is contained in:
unanmed 2022-12-29 13:39:40 +08:00
parent db5ff1b183
commit 190201b386
15 changed files with 70 additions and 49 deletions

View File

@ -36,7 +36,7 @@
- 宝石目标设定
- 自动宝物规划,选中两个或更多宝物后自动在本地图中规划出最优拾取路线,原则是尽量减少其余宝物的捡拾,自动切换主动技能,怪物造成的伤害最低的路线
- 临界显示方式,宝石数还是数值
- 怪物目标设定
- 怪物目标设定(完成)
- 木牌查看系统
- 宝物目标设定
- 每个怪物加一个怪物说明
@ -54,3 +54,4 @@
- 真能刷:勇气之路的刷血怪刷到 15w 以上的血
- 满腹经纶:把所有能学的怪物技能都学一遍
- 冰与火之舞:通过第二章特殊战的困难难度
- 你是怎么做到的?!:山路地图与勇气之路地图中与若干个神秘的木牌对话

View File

@ -570,12 +570,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
{
"need": "0",
"title": "原始人",
"action": [
{
"type": "comment",
"text": "此处是初始等级,只需填写称号"
}
]
"action": []
},
{
"need": "3000",
@ -610,7 +605,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
},
{
"need": "10000",
"title": "智人",
"title": "低级智人",
"clear": true,
"action": [
{
@ -624,7 +619,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
},
{
"need": "50000",
"title": "领导者",
"title": "古人",
"clear": true,
"action": []
}

View File

@ -22,9 +22,9 @@ main.floors.MT0=
[141, 34, 34,141, 0,141, 0, 0, 0,141, 0,494,482,482,20040],
[141, 33, 33,492, 0,141, 0, 0, 0,141, 0,141, 33, 33,20040],
[141, 34, 34,141, 0,141, 0,559, 0,141, 0,141,141,141,20040],
[141,141,141,141, 0,129,558, 46,560, 0, 0,141, 33, 33,20040],
[141,141,141,141, 0, 0,558, 46,560, 0, 0,141, 33, 33,20040],
[141, 33, 33,141, 0,141,367, 0,129,141, 0,494,482,482,20040],
[141, 33, 33,492, 0,141, 0, 0,129,141, 0,141, 33, 33,20040],
[141, 33, 33,492, 0,141,129, 0,129,141, 0,141, 33, 33,20040],
[141,141,141,141,141,141,141,141,141,141,141,141,141,141,20040]
],
"firstArrive": [
@ -51,7 +51,7 @@ main.floors.MT0=
"8,12": [
"该塔计分方式:生命+5000*黄钥匙+15000*蓝钥匙"
],
"5,11": [
"6,13": [
"原声音乐可以在网易云音乐搜索:魔塔 人类:开天辟地 bgm部分音乐因为版权问题可能无法播放或者不在歌单内"
]
},
@ -66,20 +66,14 @@ main.floors.MT0=
},
"afterBattle": {},
"afterGetItem": {
"7,11": [
{
"type": "setValue",
"name": "flag:usePlatFly",
"value": "true"
},
{
"type": "setValue",
"name": "flag:__useMinimap__",
"value": "true"
}
],
"6,11": [
"这个可以查看bgm也可以设置bgm也可以清空设置的bgm"
],
"8,11": [
"请仔细阅读这个道具内的说明"
],
"7,10": [
"里面包含了所有游戏的设置,请仔细查看设置"
]
},
"afterOpenDoor": {},

View File

@ -79,7 +79,7 @@ main.floors.MT1=
[20042, 0, 0,201, 0, 0,141, 0,141,202, 17, 0, 0, 0,20040],
[20042,202, 17, 17, 0, 0,205, 31, 0, 28, 17, 28, 0, 32,20040],
[20042, 0, 27, 17, 31,141,141,141,141,201, 17, 17, 17, 17,20040],
[20042, 32, 0, 17, 0,201, 36, 35,201, 31,202, 0, 32, 0,20040],
[20042, 32, 0, 17, 0,201, 0, 0,201, 31,202, 0, 32, 0,20040],
[20036,20033,20033,20033,20033,20033,20034, 93,20032,20033,20033,20033,20033,20033,20035]
],
"bgmap": [

View File

@ -2,7 +2,9 @@
var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
init: function () {
this._afterLoadResources = function () {};
this._afterLoadResources = function () {
core.resetSettings();
};
},
sprite: function () {
const sprites = {};

View File

@ -64,7 +64,7 @@
<div class="detail-info">
<span style="color: lawngreen"
>经验&nbsp;&nbsp;&nbsp;&nbsp;{{
core.formatBigNumber(enemy.money)
core.formatBigNumber(enemy.exp)
}}</span
>
</div>

View File

@ -8,7 +8,7 @@
"变宽,然后拖动。电脑端点击状态栏也可以使边框变宽。",
"<br>",
"<br>",
"状态栏可以纵向滚动,如果你发现状态栏显示不全,可以尝试拉大状态栏,或者纵向拖动状态栏,就像网页上下动一样。",
"状态栏可以纵向滚动,如果你发现状态栏显示不全,可以尝试拉大状态栏,或者纵向拖动状态栏,就像网页上下动一样。",
"电脑端还可以使用滚轮上下滚动。",
"<br>",
"<br>",
@ -36,5 +36,11 @@
"<br>",
"这个功能可以用于标记boss或者较强的挡路怪当这些怪能够攻击时你可以直接收到信息不需要再时刻费心注意怪物的伤害。"
]
},
"book": {
"text": "怪物手册",
"desc": [
""
]
}
}

View File

@ -6,6 +6,7 @@ import animate from './plugin/animateController';
import utils from './plugin/utils';
import status from './plugin/ui/statusBar';
import mark from './plugin/mark';
import setting from './plugin/settings';
window.addEventListener('load', () => {
// 每个引入的插件都要在这里执行,否则不会被转发
@ -16,7 +17,8 @@ window.addEventListener('load', () => {
animate(),
utils(),
status(),
mark()
mark(),
setting()
];
// 初始化所有插件并转发到core上

View File

@ -10,6 +10,13 @@ watch(transition, n => {
core.setLocalStorage('transition', n);
});
window.addEventListener('load', () => {
/**
* localStorage读取即可
*/
function reset() {
transition.value = core.getLocalStorage('transition');
});
}
export default function init() {
return { resetSettings: reset };
}

View File

@ -75,16 +75,12 @@ async function hideApp(index: number) {
app.style.transition = 'all 0.6s linear';
app.style.opacity = '0';
await sleep(600);
uiStack.value.splice(index, 1);
app.style.display = 'none';
if (!noClosePanel.value) core.closePanel();
noClosePanel.value = false;
} else {
app.style.transition = '';
app.style.opacity = '0';
uiStack.value.splice(index, 1);
app.style.display = 'none';
if (!noClosePanel.value) core.closePanel();
noClosePanel.value = false;
}
uiStack.value.splice(index, 1);
app.style.display = 'none';
if (!noClosePanel.value) core.closePanel();
noClosePanel.value = false;
}

View File

@ -115,7 +115,12 @@ interface PluginDeclaration extends PluginUtils {
/**
*
*/
checkMarkedEnemy();
checkMarkedEnemy(): void;
/**
*
*/
resetSettings(): void;
}
interface PluginUtils {

View File

@ -202,9 +202,8 @@ function keydown(e: KeyboardEvent) {
onMounted(async () => {
const div = document.getElementById('book') as HTMLDivElement;
div.style.opacity = '1';
if (core.plugin.transition.value) await sleep(600);
else await sleep(100);
else await sleep(50);
document.addEventListener('keyup', keyup);
document.addEventListener('keydown', keydown);
});
@ -217,7 +216,6 @@ onUnmounted(async () => {
<style lang="less" scoped>
#book {
opacity: 0;
user-select: none;
width: 80%;
height: 100%;

View File

@ -183,9 +183,10 @@ import { computed, onMounted, onUnmounted, reactive, ref, watch } from 'vue';
import Scroll from '../components/scroll.vue';
import { getAddStatus, getEquips, getNowStatus } from '../plugin/ui/equipbox';
import BoxAnimate from '../components/boxAnimate.vue';
import { has, tip, type } from '../plugin/utils';
import { has, keycode, tip, type } from '../plugin/utils';
import { cancelGlobalDrag, isMobile, useDrag } from '../plugin/use';
import { hyper, sleep } from 'mutate-animate';
import { KeyCode } from '../plugin/keyCodes';
const equips = ref(getEquips());
const col = ref('all');
@ -425,16 +426,27 @@ async function toTool() {
core.plugin.transition.value = before;
}
function keyup(e: KeyboardEvent) {
const c = keycode(e.keyCode);
if (c === KeyCode.KeyQ || c === KeyCode.KeyX || c === KeyCode.Escape) {
exit();
}
}
watch(toShow, n => {
bind();
});
onMounted(() => {
onMounted(async () => {
bind();
if (core.plugin.transition.value) await sleep(600);
else await sleep(50);
document.addEventListener('keyup', keyup);
});
onUnmounted(() => {
cancelGlobalDrag(dragEquip);
document.removeEventListener('keyup', keyup);
});
</script>

View File

@ -75,10 +75,10 @@
keys[2]?.toString().padStart(2, '0')
}}</span>
</div>
<div class="status-item">
<div v-if="skillOpened" class="status-item">
<span id="skill-tree" class="button-text">技能树</span>
</div>
<div class="status-item">
<div v-if="skillOpened" class="status-item">
<span id="status-skill" class="button-text"
>查看技能</span
>
@ -112,6 +112,7 @@ const lvName = ref<string>();
const skill = ref<string>('无');
const up = ref(0);
const spring = ref<number>();
const skillOpened = ref(core.getFlag('chapter', 0) > 0);
/**
* 要展示的勇士属性
*/
@ -148,6 +149,7 @@ function update() {
if (core.hasFlag('spring')) {
spring.value = 50 - flags.springCount;
}
skillOpened.value = core.getFlag('chapter', 0) > 0;
}
</script>

View File

@ -197,7 +197,7 @@ async function toEquip() {
function keyup(e: KeyboardEvent) {
const c = keycode(e.keyCode);
if (c === KeyCode.Escape || c === KeyCode.KeyX) {
if (c === KeyCode.Escape || c === KeyCode.KeyX || c === KeyCode.KeyT) {
exit();
}
if (c === KeyCode.Enter || c === KeyCode.KeyC) {
@ -239,7 +239,8 @@ function keydown(e: KeyboardEvent) {
}
onMounted(async () => {
await sleep(600);
if (core.plugin.transition.value) await sleep(600);
else await sleep(50);
document.addEventListener('keyup', keyup);
document.addEventListener('keydown', keydown);
});