mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 04:19:30 +08:00
增加跳跃次数的显示
This commit is contained in:
parent
aad49a0c30
commit
0b0c7c7958
@ -20,7 +20,7 @@ var ignoreInJump = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** @type {FloorIds[]} */
|
/** @type {FloorIds[]} */
|
||||||
const jumpIgnoreFloor = [
|
export const jumpIgnoreFloor = [
|
||||||
'MT31',
|
'MT31',
|
||||||
'snowTown',
|
'snowTown',
|
||||||
'MT36',
|
'MT36',
|
||||||
@ -177,5 +177,6 @@ export function jumpSkill() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
core.plugin.skillEffects = {
|
core.plugin.skillEffects = {
|
||||||
jumpSkill
|
jumpSkill,
|
||||||
|
jumpIgnoreFloor
|
||||||
};
|
};
|
||||||
|
5
src/types/plugin.d.ts
vendored
5
src/types/plugin.d.ts
vendored
@ -31,6 +31,7 @@ interface PluginDeclaration
|
|||||||
hero: GamePluginHeroRealStatus;
|
hero: GamePluginHeroRealStatus;
|
||||||
|
|
||||||
skills: Record<Chapter, Skill[]>;
|
skills: Record<Chapter, Skill[]>;
|
||||||
|
skillEffects: SkillEffects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加函数 例:添加弹出文字,像这个就可以使用core.addPop或core.plugin.addPop调用
|
* 添加函数 例:添加弹出文字,像这个就可以使用core.addPop或core.plugin.addPop调用
|
||||||
@ -435,6 +436,10 @@ interface PluginAchievement {
|
|||||||
checkVisitedFloor(): void;
|
checkVisitedFloor(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface SkillEffects {
|
||||||
|
jumpIgnoreFloor: FloorIds[];
|
||||||
|
}
|
||||||
|
|
||||||
type Chapter = 'chapter1' | 'chapter2';
|
type Chapter = 'chapter1' | 'chapter2';
|
||||||
|
|
||||||
interface Skill {
|
interface Skill {
|
||||||
|
@ -25,6 +25,12 @@
|
|||||||
class="status-icon"
|
class="status-icon"
|
||||||
/>
|
/>
|
||||||
<span>{{ skill }}</span>
|
<span>{{ skill }}</span>
|
||||||
|
<span
|
||||||
|
v-if="has(spring)"
|
||||||
|
id="status-spring"
|
||||||
|
class="status-extra"
|
||||||
|
>剩余{{ spring }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div id="status-hp" class="status-item">
|
<div id="status-hp" class="status-item">
|
||||||
<img src="/project/images/hp.png" class="status-icon" />
|
<img src="/project/images/hp.png" class="status-icon" />
|
||||||
@ -37,10 +43,10 @@
|
|||||||
>+{{ format(hero.hpmax!) }}/t</span
|
>+{{ format(hero.hpmax!) }}/t</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="has(spring)"
|
v-if="has(jumpCnt)"
|
||||||
id="status-spring"
|
id="status-jump"
|
||||||
class="status-extra"
|
class="status-extra"
|
||||||
>剩余{{ spring }}</span
|
>跳跃剩余{{ jumpCnt }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div id="status-atk" class="status-item">
|
<div id="status-atk" class="status-item">
|
||||||
@ -124,7 +130,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, shallowReactive, watch } from 'vue';
|
import { onMounted, ref, shallowReactive, watch } from 'vue';
|
||||||
import Box from '../components/box.vue';
|
import Box from '../components/box.vue';
|
||||||
import Scroll from '../components/scroll.vue';
|
import Scroll from '../components/scroll.vue';
|
||||||
import { status } from '../plugin/ui/statusBar';
|
import { status } from '../plugin/ui/statusBar';
|
||||||
@ -150,6 +156,7 @@ const up = ref(0);
|
|||||||
const spring = ref<number>();
|
const spring = ref<number>();
|
||||||
const skillOpened = ref(core.getFlag('chapter', 0) > 0);
|
const skillOpened = ref(core.getFlag('chapter', 0) > 0);
|
||||||
const studyOpened = ref(core.plugin.skillTree.getSkillLevel(11) > 0);
|
const studyOpened = ref(core.plugin.skillTree.getSkillLevel(11) > 0);
|
||||||
|
const jumpCnt = ref<number>();
|
||||||
/**
|
/**
|
||||||
* 要展示的勇士属性
|
* 要展示的勇士属性
|
||||||
*/
|
*/
|
||||||
@ -198,6 +205,11 @@ function update() {
|
|||||||
}
|
}
|
||||||
skillOpened.value = core.getFlag('chapter', 0) > 0;
|
skillOpened.value = core.getFlag('chapter', 0) > 0;
|
||||||
studyOpened.value = core.plugin.skillTree.getSkillLevel(11) > 0;
|
studyOpened.value = core.plugin.skillTree.getSkillLevel(11) > 0;
|
||||||
|
jumpCnt.value =
|
||||||
|
flags.skill2 &&
|
||||||
|
!core.plugin.skillEffects.jumpIgnoreFloor.includes(core.status.floorId)
|
||||||
|
? 3 - flags[`jump_${core.status.floorId}`]
|
||||||
|
: void 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function openSkillTree() {
|
function openSkillTree() {
|
||||||
@ -213,6 +225,10 @@ function viewMap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openStudy() {}
|
function openStudy() {}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
update();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@ -300,6 +316,12 @@ function openStudy() {}
|
|||||||
font-size: 1.4vw;
|
font-size: 1.4vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#status-jump {
|
||||||
|
line-height: 0;
|
||||||
|
top: 0;
|
||||||
|
font-size: 1.3vw;
|
||||||
|
}
|
||||||
|
|
||||||
#status-key {
|
#status-key {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
Loading…
Reference in New Issue
Block a user