koishi-plugin-toram 1.2.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/command/dishes.d.ts +14 -17
- package/lib/command/levelUP.d.ts +3 -3
- package/lib/command/register.d.ts +2 -3
- package/lib/command/updateBoss.d.ts +2 -3
- package/lib/command/updateDishes.d.ts +2 -3
- package/lib/function/cache.d.ts +5 -0
- package/lib/function/monster.d.ts +24 -0
- package/lib/function/other.d.ts +5 -0
- package/lib/function/player.d.ts +21 -0
- package/lib/function/reply.d.ts +9 -0
- package/lib/index.d.ts +14 -6
- package/lib/index.js +667 -361
- package/package.json +1 -1
package/lib/command/dishes.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
十: string;
|
|
16
|
-
};
|
|
17
|
-
export declare function command_dishes(ctx: Context, config: Config, args: string[]): Promise<string>;
|
|
1
|
+
import { Event } from "..";
|
|
2
|
+
export interface Dish {
|
|
3
|
+
type: string;
|
|
4
|
+
level: number;
|
|
5
|
+
update: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PlayerDishInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
level: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function command_dishes(event: Event, args: string[]): Promise<void>;
|
|
13
|
+
export declare function toDishLevel(level: string): number;
|
|
14
|
+
export declare function getDishesType(name: string): string;
|
package/lib/command/levelUP.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
1
|
+
import { Event } from "..";
|
|
2
|
+
export declare function command_levelUP(event: Event, args: string[]): Promise<void>;
|
|
3
|
+
export declare function toLevel(level: string): number;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function command_register(ctx: Context, session: Session, config: Config, args: string[]): Promise<string>;
|
|
1
|
+
import { Event } from "..";
|
|
2
|
+
export declare function command_register(event: Event, args: string[]): Promise<void>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function command_updateBoss(ctx: Context, session: Session, config: Config, args: string[]): Promise<string>;
|
|
1
|
+
import { Event } from "..";
|
|
2
|
+
export declare function command_updateBoss(event: Event, args: string[]): Promise<void>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function command_updateDishes(ctx: Context, session: Session, config: Config, args: string[]): Promise<string>;
|
|
1
|
+
import { Event } from "..";
|
|
2
|
+
export declare function command_updateDishes(event: Event, args: string[]): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface MonsterData {
|
|
2
|
+
id: number;
|
|
3
|
+
type: number;
|
|
4
|
+
name: string;
|
|
5
|
+
baseLevel: number;
|
|
6
|
+
baseExp: number;
|
|
7
|
+
map: string;
|
|
8
|
+
element: string;
|
|
9
|
+
recommend: number;
|
|
10
|
+
update: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class Monster {
|
|
13
|
+
type: number;
|
|
14
|
+
name: string;
|
|
15
|
+
star: number;
|
|
16
|
+
level: number;
|
|
17
|
+
baseExp: number;
|
|
18
|
+
map: string;
|
|
19
|
+
element: string;
|
|
20
|
+
recommend: number;
|
|
21
|
+
constructor(monsterData: MonsterData, star: number);
|
|
22
|
+
getPlayerExp(level: number): number;
|
|
23
|
+
cmdPlayerLevelUP(level: number): string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Event } from "..";
|
|
2
|
+
import { Dish } from "../command/dishes";
|
|
3
|
+
export interface PlayerData {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
dishes: string;
|
|
7
|
+
path: number;
|
|
8
|
+
qqOpenId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class Player {
|
|
11
|
+
id: number;
|
|
12
|
+
name: string;
|
|
13
|
+
dishes: Dish[];
|
|
14
|
+
path: number;
|
|
15
|
+
qqOpenId: string;
|
|
16
|
+
constructor(playerData: PlayerData);
|
|
17
|
+
reName(name: string): void;
|
|
18
|
+
getData(): PlayerData;
|
|
19
|
+
}
|
|
20
|
+
export declare function getPlayerName(event: Event): Promise<string>;
|
|
21
|
+
export declare function getPlayer(event: Event, name?: string): Promise<PlayerData>;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Context, Schema } from 'koishi';
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { Context, Logger, Schema, Session } from 'koishi';
|
|
2
|
+
import { Cache } from './function/cache';
|
|
3
|
+
import { PlayerData } from './function/player';
|
|
4
|
+
import { MonsterData } from './function/monster';
|
|
4
5
|
export declare const name = "toram";
|
|
6
|
+
export declare const inject: string[];
|
|
5
7
|
declare module 'koishi' {
|
|
6
8
|
interface Tables {
|
|
7
9
|
monster: MonsterData;
|
|
@@ -12,11 +14,17 @@ export interface Config {
|
|
|
12
14
|
account_qq: string;
|
|
13
15
|
maxLevel: number;
|
|
14
16
|
dishes_return: number;
|
|
17
|
+
levelUP_player_recommend: number;
|
|
15
18
|
levelUP_player_fixedBossReturn: number;
|
|
16
19
|
levelUP_player_wildBossReturn: number;
|
|
17
|
-
reply: {
|
|
18
|
-
[key: string]: string[];
|
|
19
|
-
};
|
|
20
20
|
}
|
|
21
21
|
export declare const Config: Schema<Config>;
|
|
22
|
+
export interface Event {
|
|
23
|
+
ctx: Context;
|
|
24
|
+
session?: Session;
|
|
25
|
+
config: Config;
|
|
26
|
+
cache: Cache;
|
|
27
|
+
logger: Logger;
|
|
28
|
+
}
|
|
22
29
|
export declare function apply(ctx: Context, config: Config): Promise<void>;
|
|
30
|
+
export declare function useCommand(event: Event, command: string, args?: string[]): Promise<void>;
|