MC_survival/eventDec.d.ts

314 lines
4.8 KiB
TypeScript
Raw Normal View History

2025-01-14 12:27:52 +08:00
type MotaAction = any;
type MotaEvent = any[];
/**
*
*/
type ShopEventOf<T extends keyof ShopEventMap> = ShopEventMap[T];
interface ShopEventMap {
/**
*
*/
common: CommonShopEvent;
/**
*
*/
item: ItemShopEvent;
/**
*
*/
event: CommonEventShopEvent;
}
interface ShopEventBase {
/**
* id
*/
id: string;
/**
*
*/
textInList: string;
/**
*
*/
mustEnable: boolean;
/**
*
*/
disablePreview: boolean;
}
/**
*
*/
interface CommonShopChoice {
/**
*
*/
text: string;
/**
*
*/
need: string;
/**
*
*/
icon: AllIds;
/**
*
*/
color: Color;
/**
*
*/
action: MotaEvent;
}
/**
*
*/
interface CommonShopEvent extends ShopEventBase {
/**
*
*/
text: string;
/**
*
*/
choices: CommonShopChoice[];
}
/**
*
*/
interface ItemShopChoice {
/**
* id
*/
id: AllIdsOf<'items'>;
/**
*
*/
number: number;
/**
* ${}
*/
money: string;
/**
*
*/
sell: string;
/**
*
*/
condition: string;
}
/**
*
*/
interface ItemShopEvent extends ShopEventBase {
/**
*
*/
item: true;
/**
* 西
*/
use: 'money' | 'exp';
/**
*
*/
choices: ItemShopChoice[];
}
interface CommonEventShopEvent {
/**
* 使
*/
commonEvent: EventDeclaration;
}
interface AutoEventBase {
/**
*
*/
condition: string;
/**
*
*/
currentFloor: boolean;
/**
*
*/
priority: number;
/**
*
*/
delayExecute: boolean;
/**
*
*/
multiExecute: boolean;
/**
*
*/
data: MotaEvent;
}
interface AutoEvent extends AutoEventBase {
/**
* id
*/
floorId: FloorIds;
/**
*
*/
index: string;
/**
*
*/
x: number;
/**
*
*/
y: number;
/**
*
*/
symbol: string;
}
interface LevelChooseEvent {
/**
*
*/
title: string;
/**
*
*/
name: string;
/**
* hard值
*/
hard: number;
/**
*
*/
color: RGBArray;
/**
*
*/
action: MotaEvent;
}
interface LevelUpEvent {
/**
*
*/
need: number;
/**
*
*/
title: string;
/**
*
*/
action: MotaEvent;
}
/**
*
*/
interface DoorInfo {
/**
*
*/
time: number;
/**
*
*/
openSound: SoundIds;
/**
*
*/
closeSound: SoundIds;
/**
*
*/
keys: Partial<Record<ItemIdOf<'tools'> | `${ItemIdOf<'tools'>}:o`, number>>;
/**
*
*/
afterOpenDoor?: MotaEvent;
}
interface ChangeFloorEvent {
/**
*
*/
floorId: ':before' | ':after' | ':now' | FloorIds;
/**
* stair就无效了
*/
loc?: LocArr;
/**
*
*/
stair?: FloorChangeStair;
/**
*
*/
direction?: HeroTurnDir;
/**
*
*/
time?: number;
/**
* 穿
*/
ignoreChangeFloor?: boolean;
}