mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-04 19:04:32 +08:00
refactor: hero
This commit is contained in:
1 parent
0c9e0543ee
commit
db6983b4bd
11 files changed
+14
-80
No files matched your search
@@ -6,7 +6,6 @@ import * as replay from './replay';
|
||||
import * as ui from './ui';
|
||||
import * as rewrite from './fx/rewrite';
|
||||
import * as halo from './fx/halo';
|
||||
import * as hero from '../../game/hero';
|
||||
import * as loopMap from './loopMap';
|
||||
import * as removeMap from './removeMap';
|
||||
import * as shop from './shop';
|
||||
@@ -37,7 +36,6 @@ Mota.Plugin.register('study_g', study);
|
||||
Mota.Plugin.register('remainEnemy_g', remainEnemy);
|
||||
Mota.Plugin.register('checkBlock_g', checkBlock, checkBlock.init);
|
||||
// todo: 这几个不应该放到插件
|
||||
Mota.Plugin.register('hero_g', hero);
|
||||
Mota.Plugin.register('ui_g', ui, ui.init);
|
||||
|
||||
// export {
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ export function markEnemy(id: EnemyIds) {
|
||||
id,
|
||||
enemy,
|
||||
mode: 0b011111,
|
||||
lastAtk: Mota.Plugin.require('hero_g').getHeroStatusOn('atk', 'empty'),
|
||||
lastAtk: Mota.requireAll('fn').getHeroStatusOn('atk', 'empty'),
|
||||
lastDamage: enemy.calDamage().damage,
|
||||
status: 0b0,
|
||||
update: ref(true)
|
||||
@@ -65,7 +65,7 @@ export function unmarkEnemy(id: EnemyIds) {
|
||||
}
|
||||
|
||||
export function checkMarkedEnemy() {
|
||||
const { getHeroStatusOn } = Mota.Plugin.require('hero_g');
|
||||
const { getHeroStatusOn } = Mota.requireAll('fn');
|
||||
marked.forEach(v => {
|
||||
const { id, enemy, mode, lastAtk, lastDamage, markDamage } = v;
|
||||
const atk = getHeroStatusOn('atk', 'empty');
|
||||
|
||||
@@ -59,7 +59,7 @@ export function getNowStatus(nowEquip?: Equip, onCol: boolean = false) {
|
||||
'hpmax',
|
||||
'money'
|
||||
] as (keyof SelectType<HeroStatus, number>)[];
|
||||
const { getHeroStatusOn } = Mota.Plugin.require('hero_g');
|
||||
const { getHeroStatusOn } = Mota.requireAll('fn');
|
||||
|
||||
return (
|
||||
<div id="hero-status">
|
||||
|
||||
Reference in new issue
Block a user