Merge pull request #1198 from nonameShijian/PR-Branch
修改扩展导入失败提示,修改扩展模板为esm,添加cost和getIndex的类型注释,重构game.checkFileList写法,跟进并修复其他类型注释
This commit is contained in:
commit
1f4dd94c87
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card',function(){
|
||||
return {
|
||||
name:'extra',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'gujian',
|
||||
card:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'guozhan',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'gwent',
|
||||
card:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'hearth',
|
||||
card:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'huanlekapai',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'mtg',
|
||||
card:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'sp',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'standard',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'swd',
|
||||
card:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'yingbian',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'yongjian',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'yunchou',
|
||||
card:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'zhenfa',
|
||||
card:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('card', function () {
|
||||
return {
|
||||
name:'zhulu',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character',function(){
|
||||
return {
|
||||
//clan n.宗派;(尤指苏格兰的)宗族,氏族,家族;庞大的家族;帮派;小集团
|
||||
name:'clan',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'collab',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'ddd',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'diy',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'extra',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'gujian',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'gwent',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'hearth',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'huicui',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'jiange',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'jsrg',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'mobile',
|
||||
//connectBanned:['miheng'],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'mtg',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'offline',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'old',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'onlyOL',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'ow',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'refresh',
|
||||
characterSort:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
//strategy and battle, "sb" in short
|
||||
name:'sb',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'shenhua',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'shiji',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'sp',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'sp2',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'standard',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'swd',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'tw',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'xiake',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'xianding',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'xianjian',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'xinghuoliaoyuan',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'yijiang',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'yingbian',
|
||||
connect:true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'yxs',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { game } from '../noname.js';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../noname.js';
|
||||
game.import('character', function () {
|
||||
return {
|
||||
name:'zhuogui',
|
||||
character:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('play',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../../noname.js';
|
||||
game.import('play', function () {
|
||||
return {
|
||||
name:'boss',
|
||||
init:function(){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('play',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../../noname.js';
|
||||
game.import('play', function () {
|
||||
return {
|
||||
name:'cardpile',
|
||||
arenaReady:function(){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('play',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../../noname.js';
|
||||
game.import('play', function () {
|
||||
return {
|
||||
name:'coin',
|
||||
init:function(){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
game.import('play',function(lib,game,ui,get,ai,_status){
|
||||
import { lib, game, ui, get, ai, _status } from '../../noname.js';
|
||||
game.import('play', function () {
|
||||
return {
|
||||
name:'wuxing',
|
||||
arenaReady:function(){
|
||||
|
|
|
@ -1011,8 +1011,9 @@ declare interface Skill {
|
|||
* @param event 事件,即event._trigger,相当于trigger时机(此时的event为触发该技能时机时的事件)
|
||||
* @param player
|
||||
* @param name 触发名,为event.triggername,目前只有在lib.filter.filterTrigger中才传该值,即被动触发,主动触发不检测该值,目前暂未完善
|
||||
* @param target v1.10.11 触发的目标
|
||||
*/
|
||||
filter?(event: GameEventPromise, player: Player, name?: string): boolean | void | null;
|
||||
filter?(event: GameEventPromise, player: Player, name?: string, target?: Player): boolean | void | null;
|
||||
/**
|
||||
* 选择的目标武将牌上出现什么字。
|
||||
*
|
||||
|
@ -1281,9 +1282,11 @@ declare interface Skill {
|
|||
* 若是方法,则配置一个方法直接返回文本,或者玩家
|
||||
*
|
||||
* 若没有配置prompt,显示该配置的提示
|
||||
*
|
||||
* @param target v1.10.11 触发的目标
|
||||
*/
|
||||
logTarget?: string | TwoParmFun<GameEventPromise, Player, string | Player | Player[] | null>;
|
||||
/**
|
||||
logTarget?: string | ((event?: GameEventPromise, player?: Player, triggername?: string, target?: Player) => string | Player | Player[] | null);
|
||||
/**
|
||||
* 是否通过logTarget显示触发者的目标日志;
|
||||
*
|
||||
* 目的:应该是为了细节化显示日志;在createTrigger,step3中使用,取值false,不使用logTarget,显示logSkill;
|
||||
|
@ -1365,7 +1368,9 @@ declare interface Skill {
|
|||
*
|
||||
* 无参,简洁写法;
|
||||
*/
|
||||
check?: ((card: Card) => number | boolean | void) | ((event: GameEventPromise, player: Player) => number | boolean | void) | (() => number | boolean | void);
|
||||
check?: ((card: Card) => number | boolean | void) |
|
||||
((event: GameEventPromise, player: Player, triggername?: string, target?: Player) => number | boolean | void) |
|
||||
(() => number | boolean | void);
|
||||
// check?(...any:any):number|boolean;
|
||||
// /** ai用于检测的方法:用于主动使用触发技能 */
|
||||
// check?(card:Card):number|boolean;
|
||||
|
@ -1388,7 +1393,30 @@ declare interface Skill {
|
|||
* 手动设置技能的标签
|
||||
*/
|
||||
categories?: (skill: string, player: Player) => string[];
|
||||
|
||||
/**
|
||||
* v1.10.11
|
||||
*
|
||||
* 将技能的cost选择和content执行分离,从而回避原本的含糊不清的情况。
|
||||
*
|
||||
* 对于原本使用direct:true取消logSkill,然后在技能内部选择消耗,再logSkill的情况而言,虽然有效,但是难以区分“技能选择消耗的过程”和“技能本身的效果”,不是一件好事。
|
||||
*
|
||||
* 因此,我们决定将技能的cost和content分离(旧的写法仍然有效,不受影响)。使用例见张辽【突袭】
|
||||
*/
|
||||
cost?: (event: GameEventPromise, trigger: GameEventPromise, player: Player) => Promise<any>;
|
||||
/**
|
||||
* v1.10.11
|
||||
*
|
||||
* “按点卖血”类技能和“同时机多个目标分别结算”的技能。
|
||||
*
|
||||
* 现在,无名杀的“按点卖血”技能可以和OL线上一样,在同时触发多个技能时,自选技能的顺序了。
|
||||
*
|
||||
* 用例见郭嘉【遗计】
|
||||
*
|
||||
* 而对于一些牌移动事件的技能而言,不仅要“多次发动”,每次发动时还都有不同的目标。
|
||||
*
|
||||
* 比如伊籍的【急援】,可能会出现“同时将一些牌交给了多名角色”的情况
|
||||
*/
|
||||
getIndex?: (event, player, triggername) => number | Player[];
|
||||
//日后还有很多属性要添加的
|
||||
[key: string]: any;
|
||||
}
|
||||
|
@ -1881,7 +1909,7 @@ interface ChooseButtonConfigData {
|
|||
* 既player.chooseButton的ai
|
||||
* @param button
|
||||
*/
|
||||
check?(button: Button): number;
|
||||
check?(button: Button): number | void;
|
||||
/**
|
||||
* 选择数目,默认为1
|
||||
*
|
||||
|
|
|
@ -60,7 +60,7 @@ export class Game {
|
|||
/**
|
||||
* 洗牌
|
||||
*/
|
||||
washCard(): any;
|
||||
washCard(): false | never[] | (import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise);
|
||||
/**
|
||||
* 基于钩子的添加势力方法
|
||||
*/
|
||||
|
@ -77,7 +77,7 @@ export class Game {
|
|||
* @param {Parameters<HookType[Name]>} args
|
||||
*/
|
||||
callHook<HookType extends import("../library/hooks/interface.js").NonameHookType, Name extends keyof HookType>(name: Name, args: Parameters<HookType[Name]>): void;
|
||||
yingbianEffect(event: any, content: any, ...args: any[]): any;
|
||||
yingbianEffect(event: any, content: any, ...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
setYingbianConditionColor(yingbianCondition: any, color: any): void;
|
||||
setComplexYingbianCondition(yingbianCondition: any, condition: any): void;
|
||||
setSimpleYingbianCondition(yingbianCondition: any, condition: any): void;
|
||||
|
@ -164,7 +164,7 @@ export class Game {
|
|||
*/
|
||||
loseAsync(arg?: {
|
||||
[key: string]: any;
|
||||
} | undefined): any;
|
||||
} | undefined): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
callFuncUseStepCache(prefix: any, func: any, params: any): any;
|
||||
/**
|
||||
* @param {string} name
|
||||
|
@ -173,19 +173,19 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasGlobalHistory<T extends keyof GameHistory>(key: T, filter: (event: any) => boolean, last?: any): boolean;
|
||||
hasGlobalHistory<T extends keyof GameHistory>(key: T, filter: (event: import('../library/index.js').GameEventPromise) => boolean, last?: import("../library/index.js").GameEventPromise | undefined): boolean;
|
||||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { void }
|
||||
*/
|
||||
checkGlobalHistory<T_1 extends keyof GameHistory>(key: T_1, filter: (event: any) => boolean, last?: any): void;
|
||||
checkGlobalHistory<T_1 extends keyof GameHistory>(key: T_1, filter: (event: import('../library/index.js').GameEventPromise) => boolean, last?: import("../library/index.js").GameEventPromise | undefined): void;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { GameHistory }
|
||||
|
@ -195,27 +195,27 @@ export class Game {
|
|||
* @template { keyof GameHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter]
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { GameHistory[T] }
|
||||
*/
|
||||
getGlobalHistory<T_2 extends keyof GameHistory>(key: T_2, filter?: ((event: any) => boolean) | undefined, last?: any): GameHistory[T_2];
|
||||
getGlobalHistory<T_2 extends keyof GameHistory>(key: T_2, filter?: ((event: import('../library/index.js').GameEventPromise) => boolean) | undefined, last?: import("../library/index.js").GameEventPromise | undefined): GameHistory[T_2];
|
||||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasAllGlobalHistory<T_3 extends keyof GameHistory>(key: T_3, filter: (event: any) => boolean, last?: any): boolean;
|
||||
hasAllGlobalHistory<T_3 extends keyof GameHistory>(key: T_3, filter: (event: import('../library/index.js').GameEventPromise) => boolean, last?: import("../library/index.js").GameEventPromise | undefined): boolean;
|
||||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { void }
|
||||
*/
|
||||
checkAllGlobalHistory<T_4 extends keyof GameHistory>(key: T_4, filter: (event: any) => boolean, last?: any): void;
|
||||
checkAllGlobalHistory<T_4 extends keyof GameHistory>(key: T_4, filter: (event: import('../library/index.js').GameEventPromise) => boolean, last?: import("../library/index.js").GameEventPromise | undefined): void;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { GameHistory[] }
|
||||
|
@ -225,11 +225,11 @@ export class Game {
|
|||
* @template { keyof GameHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter]
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { GameHistory[T] }
|
||||
*/
|
||||
getAllGlobalHistory<T_5 extends keyof GameHistory>(key: T_5, filter?: ((event: any) => boolean) | undefined, last?: any): GameHistory[T_5];
|
||||
getAllGlobalHistory<T_5 extends keyof GameHistory>(key: T_5, filter?: ((event: import('../library/index.js').GameEventPromise) => boolean) | undefined, last?: import("../library/index.js").GameEventPromise | undefined): GameHistory[T_5];
|
||||
/**
|
||||
* @overload
|
||||
* @returns { void }
|
||||
|
@ -238,15 +238,15 @@ export class Game {
|
|||
/**
|
||||
* @overload
|
||||
* @param { Card } cards
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsDiscard(cards: any): any;
|
||||
cardsDiscard(cards: any): import('../library/index.js').GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsDiscard(cards: Card[]): any;
|
||||
cardsDiscard(cards: Card[]): import('../library/index.js').GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { void }
|
||||
|
@ -255,15 +255,15 @@ export class Game {
|
|||
/**
|
||||
* @overload
|
||||
* @param { Card } cards
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsGotoOrdering(cards: any): any;
|
||||
cardsGotoOrdering(cards: any): import('../library/index.js').GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsGotoOrdering(cards: Card[]): any;
|
||||
cardsGotoOrdering(cards: Card[]): import('../library/index.js').GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { void }
|
||||
|
@ -273,16 +273,16 @@ export class Game {
|
|||
* @overload
|
||||
* @param { Card } cards
|
||||
* @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsGotoSpecial(cards: any, bool?: false | "toRenku" | undefined): any;
|
||||
cardsGotoSpecial(cards: any, bool?: false | "toRenku" | undefined): import('../library/index.js').GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsGotoSpecial(cards: Card[], bool?: false | "toRenku" | undefined): any;
|
||||
cardsGotoSpecial(cards: Card[], bool?: false | "toRenku" | undefined): import('../library/index.js').GameEventPromise;
|
||||
/**
|
||||
*
|
||||
* @param {...(
|
||||
|
@ -297,11 +297,11 @@ export class Game {
|
|||
cardsGotoPile(...args: (Card[] | Card | Function | 'insert' | 'washCard' | 'triggeronly' | [
|
||||
string,
|
||||
any
|
||||
])[]): any;
|
||||
])[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { GameEventPromise } event
|
||||
* @param { import('../library/index.js').GameEventPromise } event
|
||||
*/
|
||||
$cardsGotoPile(event: any): void;
|
||||
$cardsGotoPile(event: import('../library/index.js').GameEventPromise): void;
|
||||
/**
|
||||
* @param { false } [pause]
|
||||
*/
|
||||
|
@ -517,72 +517,86 @@ export class Game {
|
|||
* @overload
|
||||
* @param { 'character' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importCharacterConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
import(type: 'character', content: (lib: any, game: typeof Game, ui: any, get: any, ai: any, _status: any) => importCharacterConfig, url?: any): any;
|
||||
import(type: 'character', content: (lib: InstanceType<typeof import('../library/index.js').Library>, game: InstanceType<typeof Game>, ui: InstanceType<typeof import('../ui/index.js').UI>, get: InstanceType<typeof import('../get/index.js').Get>, ai: InstanceType<typeof import('../ai/index.js').AI>, _status: InstanceType<typeof import('../status/index.js').status>) => importCharacterConfig, url?: any): any;
|
||||
/**
|
||||
* @overload
|
||||
* @param { 'card' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importCardConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
import(type: 'card', content: (lib: any, game: typeof Game, ui: any, get: any, ai: any, _status: any) => importCardConfig, url?: any): any;
|
||||
import(type: 'card', content: (lib: InstanceType<typeof import('../library/index.js').Library>, game: InstanceType<typeof Game>, ui: InstanceType<typeof import('../ui/index.js').UI>, get: InstanceType<typeof import('../get/index.js').Get>, ai: InstanceType<typeof import('../ai/index.js').AI>, _status: InstanceType<typeof import('../status/index.js').status>) => importCardConfig, url?: any): any;
|
||||
/**
|
||||
* @overload
|
||||
* @param { 'mode' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importModeConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
import(type: 'mode', content: (lib: any, game: typeof Game, ui: any, get: any, ai: any, _status: any) => importModeConfig, url?: any): any;
|
||||
import(type: 'mode', content: (lib: InstanceType<typeof import('../library/index.js').Library>, game: InstanceType<typeof Game>, ui: InstanceType<typeof import('../ui/index.js').UI>, get: InstanceType<typeof import('../get/index.js').Get>, ai: InstanceType<typeof import('../ai/index.js').AI>, _status: InstanceType<typeof import('../status/index.js').status>) => importModeConfig, url?: any): any;
|
||||
/**
|
||||
* @overload
|
||||
* @param { 'player' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importPlayerConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
import(type: 'player', content: (lib: any, game: typeof Game, ui: any, get: any, ai: any, _status: any) => importPlayerConfig, url?: any): any;
|
||||
import(type: 'player', content: (lib: InstanceType<typeof import('../library/index.js').Library>, game: InstanceType<typeof Game>, ui: InstanceType<typeof import('../ui/index.js').UI>, get: InstanceType<typeof import('../get/index.js').Get>, ai: InstanceType<typeof import('../ai/index.js').AI>, _status: InstanceType<typeof import('../status/index.js').status>) => importPlayerConfig, url?: any): any;
|
||||
/**
|
||||
* @overload
|
||||
* @param { 'extension' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importExtensionConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
import(type: 'extension', content: (lib: any, game: typeof Game, ui: any, get: any, ai: any, _status: any) => importExtensionConfig, url?: any): any;
|
||||
import(type: 'extension', content: (lib: InstanceType<typeof import('../library/index.js').Library>, game: InstanceType<typeof Game>, ui: InstanceType<typeof import('../ui/index.js').UI>, get: InstanceType<typeof import('../get/index.js').Get>, ai: InstanceType<typeof import('../ai/index.js').AI>, _status: InstanceType<typeof import('../status/index.js').status>) => importExtensionConfig, url?: any): any;
|
||||
/**
|
||||
* @overload
|
||||
* @param { 'play' } type
|
||||
* @param {(
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importPlayConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
import(type: 'play', content: (lib: InstanceType<typeof import('../library/index.js').Library>, game: InstanceType<typeof Game>, ui: InstanceType<typeof import('../ui/index.js').UI>, get: InstanceType<typeof import('../get/index.js').Get>, ai: InstanceType<typeof import('../ai/index.js').AI>, _status: InstanceType<typeof import('../status/index.js').status>) => importPlayConfig, url?: any): any;
|
||||
loadExtension(object: any): Promise<any>;
|
||||
/**
|
||||
* 下载文件
|
||||
|
@ -611,9 +625,9 @@ export class Game {
|
|||
removeFile: ((filename: string, callback?: ((e: Error) => void) | undefined) => void) | undefined;
|
||||
/**
|
||||
* 获取文件列表
|
||||
* @type { undefined | ((dir: string, success: (folders: string[], files: string[]) => any, failure: (e: Error) => void) => void) }
|
||||
* @type { undefined | ((dir: string, success: (folders: string[], files: string[]) => any, failure?: (e: Error) => void) => void) }
|
||||
*/
|
||||
getFileList: ((dir: string, success: (folders: string[], files: string[]) => any, failure: (e: Error) => void) => void) | undefined;
|
||||
getFileList: ((dir: string, success: (folders: string[], files: string[]) => any, failure?: ((e: Error) => void) | undefined) => void) | undefined;
|
||||
/**
|
||||
* 按路径依次创建文件夹
|
||||
* @type { undefined | ((list: string | string[], callback: Function, file?: boolean) => void) }
|
||||
|
@ -862,18 +876,18 @@ export class Game {
|
|||
* @param { string } name
|
||||
* @param { string } skill
|
||||
* @param { Player } player
|
||||
* @param { GameEventPromise } event
|
||||
* @returns { GameEventPromise }
|
||||
* @param { import('../library/index.js').GameEventPromise } event
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
createTrigger(name: string, skill: string, player: any, event: any, indexedData: any): any;
|
||||
createTrigger(name: string, skill: string, player: any, event: import('../library/index.js').GameEventPromise, indexedData: any): import('../library/index.js').GameEventPromise;
|
||||
/**
|
||||
* @legacy Use {@link lib.element.GameEvent.constructor} instead.
|
||||
*
|
||||
* @param { string } name
|
||||
* @param { false } [trigger]
|
||||
* @param { GameEventPromise } [triggerEvent]
|
||||
* @param { import('../library/index.js').GameEventPromise } [triggerEvent]
|
||||
*/
|
||||
createEvent(name: string, trigger?: false | undefined, triggerEvent?: any): any;
|
||||
createEvent(name: string, trigger?: false | undefined, triggerEvent?: import("../library/index.js").GameEventPromise | undefined): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { string } name
|
||||
* @param { { extension: string, sex: Sex, group: string, hp: string | number, skills?: string[], tags?: any[], translate: string } } information
|
||||
|
@ -959,8 +973,9 @@ export class Game {
|
|||
addGlobalSkill(skill: string, player?: any): boolean;
|
||||
/**
|
||||
* @param { string } skill
|
||||
* @param { lib.element.Player } player
|
||||
*/
|
||||
removeGlobalSkill(skill: string): void;
|
||||
removeGlobalSkill(skill: string, player: lib.element.Player): void;
|
||||
resetSkills(): void;
|
||||
/**
|
||||
* @param { string } extensionName
|
||||
|
@ -1031,23 +1046,23 @@ export class Game {
|
|||
*/
|
||||
executingAsyncEventMap: Map<GameEvent, Promise<any>>;
|
||||
/**
|
||||
* @type { GameEventPromise[] }
|
||||
* @type { import('../library/index.js').GameEventPromise[] }
|
||||
*/
|
||||
belongAsyncEventList: GameEventPromise[];
|
||||
belongAsyncEventList: import('../library/index.js').GameEventPromise[];
|
||||
/**
|
||||
* @param { GameEventPromise } [belongAsyncEvent]
|
||||
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent]
|
||||
*/
|
||||
loop(belongAsyncEvent?: any): Promise<void>;
|
||||
loop(belongAsyncEvent?: import("../library/index.js").GameEventPromise | undefined): Promise<void>;
|
||||
/**
|
||||
* @param { GameEventPromise } [belongAsyncEvent]
|
||||
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent]
|
||||
*/
|
||||
runContent(belongAsyncEvent?: any): Promise<any>;
|
||||
runContent(belongAsyncEvent?: import("../library/index.js").GameEventPromise | undefined): Promise<any>;
|
||||
pause(): void;
|
||||
pause2(): void;
|
||||
resume(): void;
|
||||
resume2(): void;
|
||||
delaye(...args: any[]): any;
|
||||
delayex(...args: any[]): any;
|
||||
delaye(...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
delayex(...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { number } [time]
|
||||
* @param { number } [time2]
|
||||
|
@ -1077,9 +1092,9 @@ export class Game {
|
|||
*/
|
||||
asyncDelayx(time?: number | undefined, time2?: number | undefined): Promise<void>;
|
||||
/**
|
||||
* @param { GameEventPromise } [event]
|
||||
* @param { import('../library/index.js').GameEventPromise } [event]
|
||||
*/
|
||||
check(event?: any): boolean;
|
||||
check(event?: import("../library/index.js").GameEventPromise | undefined): boolean;
|
||||
Check: Check;
|
||||
uncheck(...args: any[]): void;
|
||||
/**
|
||||
|
@ -1129,7 +1144,7 @@ export class Game {
|
|||
/**
|
||||
* @param { Player } [player]
|
||||
*/
|
||||
gameDraw(player?: any, num?: number): any;
|
||||
gameDraw(player?: any, num?: number): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
chooseCharacterDouble(...args: any[]): void;
|
||||
updateRoundNumber(): void;
|
||||
/**
|
||||
|
@ -1166,11 +1181,11 @@ export class Game {
|
|||
* @param { Player } player
|
||||
* @param { string | Card[] } card
|
||||
* @param { Player[] } [targets]
|
||||
* @param { GameEventPromise } [event]
|
||||
* @param { import('../library/index.js').GameEventPromise } [event]
|
||||
* @param { boolean } [forced]
|
||||
* @param { string } [logvid]
|
||||
*/
|
||||
logv(player: any, card: string | Card[], targets?: any[] | undefined, event?: any, forced?: boolean | undefined, logvid?: string | undefined): HTMLDivElement | undefined;
|
||||
logv(player: any, card: string | Card[], targets?: any[] | undefined, event?: import("../library/index.js").GameEventPromise | undefined, forced?: boolean | undefined, logvid?: string | undefined): HTMLDivElement | undefined;
|
||||
/**
|
||||
* @param { string } storeName
|
||||
* @param { string } idbValidKey
|
||||
|
@ -1252,7 +1267,7 @@ export class Game {
|
|||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
triggerEnter(player: any): any;
|
||||
triggerEnter(player: any): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
|
@ -1371,6 +1386,7 @@ export type GameHistory = {
|
|||
everything: GameEventPromise[];
|
||||
};
|
||||
export type Video = {
|
||||
name?: string;
|
||||
type: string;
|
||||
player?: string;
|
||||
content?: string | any[];
|
||||
|
|
14
node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEvent.d.ts
generated
vendored
14
node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEvent.d.ts
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
export class GameEvent {
|
||||
static initialGameEvent(): any;
|
||||
static initialGameEvent(): GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param {string | GameEvent} [name]
|
||||
* @param {false} [trigger]
|
||||
|
@ -203,7 +203,7 @@ export class GameEvent {
|
|||
putTempCache(key1: any, key2: any, value: any): any;
|
||||
_tempCache: {} | undefined;
|
||||
getTempCache(key1: any, key2: any): any;
|
||||
cancel(arg1: any, arg2: any, notrigger: any): any;
|
||||
cancel(arg1: any, arg2: any, notrigger: any): (GameEvent & import("./gameEventPromise.js").GameEventPromise) | null | undefined;
|
||||
neutralize(event: any): this;
|
||||
_neutralized: boolean | undefined;
|
||||
_neutralize_event: any;
|
||||
|
@ -242,8 +242,8 @@ export class GameEvent {
|
|||
getRand(name: any): any;
|
||||
_rand_map: {} | undefined;
|
||||
_rand: number | undefined;
|
||||
insert(content: any, map: any): any;
|
||||
insertAfter(content: any, map: any): any;
|
||||
insert(content: any, map: any): GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
insertAfter(content: any, map: any): GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
backup(skill: any): this;
|
||||
_backup: any;
|
||||
filterButton: any;
|
||||
|
@ -273,14 +273,12 @@ export class GameEvent {
|
|||
isPhaseUsing(player: any): boolean;
|
||||
addTrigger(skills: any, player: any): this;
|
||||
removeTrigger(skills: any, player: any): this;
|
||||
trigger(name: any): any;
|
||||
trigger(name: any): (GameEvent & import("./gameEventPromise.js").GameEventPromise) | null | undefined;
|
||||
untrigger(all: boolean | undefined, player: any): this;
|
||||
/**
|
||||
* 事件转为Promise化
|
||||
*
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
toPromise(): any;
|
||||
toPromise(): this & import("./gameEventPromise.js").GameEventPromise;
|
||||
#private;
|
||||
}
|
||||
import { lib } from "../index.js";
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
*/
|
||||
export class GameEventPromise extends Promise<any> {
|
||||
/**
|
||||
* @param { GameEvent | GameEventPromise } arg
|
||||
* @param { import('./gameEvent.js').GameEvent } arg
|
||||
*/
|
||||
constructor(arg: GameEvent | GameEventPromise);
|
||||
constructor(arg: import('./gameEvent.js').GameEvent);
|
||||
/** 获取原事件对象 */
|
||||
toEvent(): any;
|
||||
toEvent(): import("./gameEvent.js").GameEvent;
|
||||
/**
|
||||
* 在某个异步事件中调试变量信息
|
||||
*
|
||||
|
@ -45,46 +45,117 @@ export class GameEventPromise extends Promise<any> {
|
|||
*/
|
||||
debugger(): Promise<any>;
|
||||
/**
|
||||
*
|
||||
* 直接获得result中的信息。
|
||||
*
|
||||
*
|
||||
* 获取 Result 对象中的信息。
|
||||
* @example
|
||||
* ①
|
||||
* let chooseCardResult = await player.chooseCard().forResult();
|
||||
* 选择的卡牌:chooseCardResult.cards
|
||||
* ②
|
||||
* let cards = await player.chooseCard().forResult('cards');
|
||||
* 选择的卡牌:cards
|
||||
* ③
|
||||
* let [success,cards,targets] = await player.chooseCardTarget().forResult('bool','cards','targets');
|
||||
* success:是否做出选择。
|
||||
* cards:选择的牌。
|
||||
* targets:选择的目标。
|
||||
* ```js
|
||||
// 示例 1:
|
||||
const chooseCardResult = await player.chooseCard().forResult();
|
||||
// 获取整个结果对象,然后访问如 chooseCardResult.cards 等属性
|
||||
|
||||
// 示例 2:
|
||||
const cards = await player.chooseCard().forResult('cards');
|
||||
// 获取结果对象中 'cards' 属性的值
|
||||
|
||||
// 示例 3:
|
||||
const [success, cards, targets] = await player.chooseCardTarget().forResult('bool', 'cards', 'targets');
|
||||
// 获取结果对象中多个属性的值
|
||||
// - success 表示是否成功
|
||||
// - cards 表示选择的卡片
|
||||
// - targets 表示选择的目标
|
||||
```
|
||||
* @template {keyof Result} T
|
||||
* @overload
|
||||
* @returns {Promise<Result>}
|
||||
*
|
||||
* @returns {Promise} 返回的结果
|
||||
* @overload
|
||||
* @param {T} param0
|
||||
* @returns {Promise<Exclude<Result[T], undefined>>}
|
||||
*
|
||||
* @overload
|
||||
* @param { T[] } params
|
||||
* @returns { Promise<Exclude<Result[T], undefined>[]> }
|
||||
*/
|
||||
forResult(...args: any[]): Promise<any>;
|
||||
forResult<T extends keyof Result>(): Promise<Result>;
|
||||
/**
|
||||
* 返回result中的bool项。
|
||||
* 获取 Result 对象中的信息。
|
||||
* @example
|
||||
* ```js
|
||||
// 示例 1:
|
||||
const chooseCardResult = await player.chooseCard().forResult();
|
||||
// 获取整个结果对象,然后访问如 chooseCardResult.cards 等属性
|
||||
|
||||
// 示例 2:
|
||||
const cards = await player.chooseCard().forResult('cards');
|
||||
// 获取结果对象中 'cards' 属性的值
|
||||
|
||||
// 示例 3:
|
||||
const [success, cards, targets] = await player.chooseCardTarget().forResult('bool', 'cards', 'targets');
|
||||
// 获取结果对象中多个属性的值
|
||||
// - success 表示是否成功
|
||||
// - cards 表示选择的卡片
|
||||
// - targets 表示选择的目标
|
||||
```
|
||||
* @template {keyof Result} T
|
||||
* @overload
|
||||
* @returns {Promise<Result>}
|
||||
*
|
||||
* @returns {Promise<boolean>} 返回的bool项
|
||||
* @overload
|
||||
* @param {T} param0
|
||||
* @returns {Promise<Exclude<Result[T], undefined>>}
|
||||
*
|
||||
* @overload
|
||||
* @param { T[] } params
|
||||
* @returns { Promise<Exclude<Result[T], undefined>[]> }
|
||||
*/
|
||||
forResult<T extends keyof Result>(param0: T): Promise<Exclude<Result[T], undefined>>;
|
||||
/**
|
||||
* 获取 Result 对象中的信息。
|
||||
* @example
|
||||
* ```js
|
||||
// 示例 1:
|
||||
const chooseCardResult = await player.chooseCard().forResult();
|
||||
// 获取整个结果对象,然后访问如 chooseCardResult.cards 等属性
|
||||
|
||||
// 示例 2:
|
||||
const cards = await player.chooseCard().forResult('cards');
|
||||
// 获取结果对象中 'cards' 属性的值
|
||||
|
||||
// 示例 3:
|
||||
const [success, cards, targets] = await player.chooseCardTarget().forResult('bool', 'cards', 'targets');
|
||||
// 获取结果对象中多个属性的值
|
||||
// - success 表示是否成功
|
||||
// - cards 表示选择的卡片
|
||||
// - targets 表示选择的目标
|
||||
```
|
||||
* @template {keyof Result} T
|
||||
* @overload
|
||||
* @returns {Promise<Result>}
|
||||
*
|
||||
* @overload
|
||||
* @param {T} param0
|
||||
* @returns {Promise<Exclude<Result[T], undefined>>}
|
||||
*
|
||||
* @overload
|
||||
* @param { T[] } params
|
||||
* @returns { Promise<Exclude<Result[T], undefined>[]> }
|
||||
*/
|
||||
forResult<T extends keyof Result>(params: T[]): Promise<Exclude<Result[T], undefined>[]>;
|
||||
/**
|
||||
* 返回result中的bool项
|
||||
*/
|
||||
forResultTest(): Promise<(boolean | any[])[]>;
|
||||
/**
|
||||
* 返回result中的bool项
|
||||
*/
|
||||
forResultBool(): Promise<boolean>;
|
||||
/**
|
||||
* 返回result中的targets项。
|
||||
*
|
||||
* @returns {Promise<Player[]>} 返回的targets项。
|
||||
*
|
||||
*/
|
||||
forResultTargets(): Promise<Player[]>;
|
||||
forResultTargets(): Promise<any[]>;
|
||||
/**
|
||||
* 返回result中的cards项
|
||||
*
|
||||
* @returns {Promise<Card[]>} 返回的cards项。
|
||||
*
|
||||
*/
|
||||
forResultCards(): Promise<Card[]>;
|
||||
forResultCards(): Promise<any[]>;
|
||||
/**
|
||||
* 返回result中的card项
|
||||
*
|
||||
|
@ -94,15 +165,11 @@ export class GameEventPromise extends Promise<any> {
|
|||
forResultCard(): Promise<VCard> | Promise<Card>;
|
||||
/**
|
||||
* 返回result中的control项。
|
||||
*
|
||||
* @returns {Promise<string>} 返回的control项。
|
||||
*/
|
||||
forResultControl(): Promise<string>;
|
||||
/**
|
||||
* 返回result中的links项。
|
||||
*
|
||||
* @returns {Promise<Array<any>>} 返回的links项。
|
||||
*/
|
||||
forResultLinks(): Promise<Array<any>>;
|
||||
forResultLinks(): Promise<any[]>;
|
||||
#private;
|
||||
}
|
||||
|
|
193
node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts
generated
vendored
193
node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts
generated
vendored
|
@ -290,8 +290,8 @@ export class Player extends HTMLDivElement {
|
|||
/**
|
||||
* 让一名角色明置一些手牌
|
||||
*/
|
||||
addShownCards(...args: any[]): any;
|
||||
hideShownCards(...args: any[]): any;
|
||||
addShownCards(...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
hideShownCards(...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
/**
|
||||
* 获取角色所有的明置手牌
|
||||
*/
|
||||
|
@ -329,7 +329,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param {*} judge2
|
||||
* @returns
|
||||
*/
|
||||
executeDelayCardEffect(card: Card | string, target: Player, judge: any, judge2: any, ...args: any[]): any;
|
||||
executeDelayCardEffect(card: Card | string, target: Player, judge: any, judge2: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* Check if the card does not count toward hand limit
|
||||
*
|
||||
|
@ -344,7 +344,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param { Card | Card[] } cards
|
||||
* @param { Player } target
|
||||
*/
|
||||
gift(cards: Card | Card[], target: Player, ...args: any[]): any;
|
||||
gift(cards: Card | Card[], target: Player, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* Check if the player can gift the card
|
||||
*
|
||||
|
@ -381,7 +381,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param { (player: Player, cards: Card[]) => any } [recastingLose]
|
||||
* @param { (player: Player, cards: Card[]) => any } [recastingGain]
|
||||
*/
|
||||
recast(cards: Card | Card[], recastingLose?: ((player: Player, cards: Card[]) => any) | undefined, recastingGain?: ((player: Player, cards: Card[]) => any) | undefined, ...args: any[]): any;
|
||||
recast(cards: Card | Card[], recastingLose?: ((player: Player, cards: Card[]) => any) | undefined, recastingGain?: ((player: Player, cards: Card[]) => any) | undefined, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* Check if the player can recast the card
|
||||
*
|
||||
|
@ -459,19 +459,19 @@ export class Player extends HTMLDivElement {
|
|||
*
|
||||
* 参数:废除来源角色(不写默认当前事件角色),废除区域(数字/区域字符串/数组,可以写多个,重复废除)
|
||||
*/
|
||||
disableEquip(...args: any[]): any;
|
||||
disableEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* 新的恢复装备区
|
||||
*
|
||||
* 参数:恢复来源角色(不写默认当前事件角色),恢复区域(数字/区域字符串/数组,可以写多个,重复恢复)
|
||||
*/
|
||||
enableEquip(...args: any[]): any;
|
||||
enableEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* 新的扩展装备区
|
||||
*
|
||||
* 参数:扩展来源角色(不写默认当前事件角色),扩展区域(数字/区域字符串/数组,可以写多个,重复扩展)
|
||||
*/
|
||||
expandEquip(...args: any[]): any;
|
||||
expandEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* 判断判定区是否被废除
|
||||
*/
|
||||
|
@ -512,7 +512,7 @@ export class Player extends HTMLDivElement {
|
|||
* @deprecated
|
||||
*/
|
||||
$enableEquip(): void;
|
||||
chooseToDebate(...args: any[]): any;
|
||||
chooseToDebate(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* 向target发起协力
|
||||
* @param { Player } target
|
||||
|
@ -520,7 +520,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param {*} reason
|
||||
*/
|
||||
cooperationWith(target: Player, type: any, reason: any): void;
|
||||
chooseCooperationFor(...args: any[]): any;
|
||||
chooseCooperationFor(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
checkCooperationStatus(target: any, reason: any): boolean;
|
||||
removeCooperation(info: any): void;
|
||||
/**
|
||||
|
@ -564,7 +564,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param { string } skill
|
||||
*/
|
||||
removeSkillBlocker(skill: string): void;
|
||||
loseToSpecial(cards: any, tag: any, target: any): any;
|
||||
loseToSpecial(cards: any, tag: any, target: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { Card | Card[] } cards
|
||||
* @param { string } tag
|
||||
|
@ -599,15 +599,15 @@ export class Player extends HTMLDivElement {
|
|||
* @param { 0 | 1 | 2 } num
|
||||
* @param { false } [log]
|
||||
*/
|
||||
showCharacter(num: 0 | 1 | 2, log?: false | undefined, ...args: any[]): any;
|
||||
showCharacter(num: 0 | 1 | 2, log?: false | undefined, ...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
/**
|
||||
* @param { 0 | 1 | 2 } num
|
||||
* @param { false } [log]
|
||||
*/
|
||||
$showCharacter(num: 0 | 1 | 2, log?: false | undefined): void;
|
||||
chooseToPlayBeatmap(beatmap: any, ...args: any[]): any;
|
||||
chooseToMove(...args: any[]): any;
|
||||
chooseToGuanxing(num: any): any;
|
||||
chooseToPlayBeatmap(beatmap: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToMove(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToGuanxing(num: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { Player } target
|
||||
* @param { string } name
|
||||
|
@ -664,17 +664,17 @@ export class Player extends HTMLDivElement {
|
|||
/**
|
||||
* @param { string } group
|
||||
*/
|
||||
changeGroup(group: string, log: any, broadcast: any, ...args: any[]): any;
|
||||
changeGroup(group: string, log: any, broadcast: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { Player } target
|
||||
*/
|
||||
chooseToDuiben(target: Player): any;
|
||||
chooseToDuiben(target: Player): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { Player } target
|
||||
*/
|
||||
chooseToPSS(target: Player): any;
|
||||
chooseToEnable(...args: any[]): any;
|
||||
chooseToDisable(...args: any[]): any;
|
||||
chooseToPSS(target: Player): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToEnable(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToDisable(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { boolean } [notmeisok]
|
||||
*/
|
||||
|
@ -682,7 +682,7 @@ export class Player extends HTMLDivElement {
|
|||
/**
|
||||
* @param { Player } target
|
||||
*/
|
||||
swapEquip(target: Player): any;
|
||||
swapEquip(target: Player): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { Player } target
|
||||
* @param { boolean } [goon]
|
||||
|
@ -691,8 +691,8 @@ export class Player extends HTMLDivElement {
|
|||
canCompare(target: Player, goon?: boolean | undefined, bool?: boolean | undefined): boolean;
|
||||
$disableJudge(): void;
|
||||
$enableJudge(): void;
|
||||
disableJudge(): any;
|
||||
enableJudge(): any;
|
||||
disableJudge(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
enableJudge(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
init(character: any, character2: any, skill: any, update: any): this | undefined;
|
||||
skin: {
|
||||
name: any;
|
||||
|
@ -836,95 +836,96 @@ export class Player extends HTMLDivElement {
|
|||
syncSkills(): void;
|
||||
playerfocus(time: any): this;
|
||||
setIdentity(identity: any, nature: any): this;
|
||||
insertPhase(skill: any, insert: any): any;
|
||||
insertEvent(name: any, content: any, arg: any): any;
|
||||
phase(skill: any): any;
|
||||
phaseZhunbei(): any;
|
||||
phaseJudge(): any;
|
||||
phaseDraw(): any;
|
||||
phaseUse(): any;
|
||||
phaseDiscard(): any;
|
||||
phaseJieshu(): any;
|
||||
chooseToUse(use: any, ...args: any[]): any;
|
||||
chooseToRespond(...args: any[]): any;
|
||||
chooseToGive(...args: any[]): any;
|
||||
chooseToDiscard(...args: any[]): any;
|
||||
chooseToCompare(target: any, check: any, ...args: any[]): any;
|
||||
insertPhase(skill: any, insert: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
insertEvent(name: any, content: any, arg: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
phase(skill: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
phaseZhunbei(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
phaseJudge(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
phaseDraw(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
phaseUse(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
phaseDiscard(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
phaseJieshu(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToUse(use: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToRespond(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToGive(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToDiscard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseToCompare(target: any, check: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseSkill(target: any, ...args: any[]): void;
|
||||
discoverCard(list: any, ...args: any[]): any;
|
||||
chooseCardButton(...args: any[]): any;
|
||||
chooseVCardButton(...args: any[]): any;
|
||||
chooseButton(...args: any[]): any;
|
||||
chooseButtonOL(list: any, callback: any, ai: any, ...args: any[]): any;
|
||||
chooseCardOL(...args: any[]): any;
|
||||
chooseCard(choose: any, ...args: any[]): any;
|
||||
chooseUseTarget(...args: any[]): any;
|
||||
chooseTarget(...args: any[]): any;
|
||||
chooseCardTarget(choose: any, ...args: any[]): any;
|
||||
chooseControlList(...args: any[]): any;
|
||||
chooseControl(...args: any[]): any;
|
||||
chooseBool(...args: any[]): any;
|
||||
chooseDrawRecover(...args: any[]): any;
|
||||
choosePlayerCard(...args: any[]): any;
|
||||
discardPlayerCard(...args: any[]): any;
|
||||
gainPlayerCard(...args: any[]): any;
|
||||
showHandcards(str: any, ...args: any[]): any;
|
||||
showCards(cards: any, str: any, ...args: any[]): any;
|
||||
viewCards(str: any, cards: any, ...args: any[]): any;
|
||||
viewHandcards(target: any): any;
|
||||
discoverCard(list: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseCardButton(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseVCardButton(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseButton(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseButtonOL(list: any, callback: any, ai: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseCardOL(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseCard(choose: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseUseTarget(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseTarget(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseCardTarget(choose: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseControlList(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseControl(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseBool(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
chooseDrawRecover(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
choosePlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
discardPlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
gainPlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
showHandcards(str: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
showCards(cards: any, str: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
viewCards(str: any, cards: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
viewHandcards(target: any): false | (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise);
|
||||
canMoveCard(withatt: any, nojudge: any, ...args: any[]): boolean;
|
||||
moveCard(...args: any[]): any;
|
||||
useResult(result: any, event: any): any;
|
||||
useCard(...args: any[]): any;
|
||||
useSkill(...args: any[]): any;
|
||||
drawTo(num: any, args: any): any;
|
||||
draw(...args: any[]): any;
|
||||
moveCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
useResult(result: any, event: any): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
useCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
useSkill(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
drawTo(num: any, args: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
draw(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
randomDiscard(...args: any[]): any[];
|
||||
randomGain(...args: any[]): any;
|
||||
discard(...args: any[]): any;
|
||||
loseToDiscardpile(...args: any[]): any;
|
||||
respond(...args: any[]): any;
|
||||
swapHandcards(target: any, cards1: any, cards2: any): any;
|
||||
discard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
loseToDiscardpile(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
respond(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
swapHandcards(target: any, cards1: any, cards2: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
directequip(cards: any): void;
|
||||
$addToExpansion(cards: any, broadcast: any, gaintag: any): this;
|
||||
directgain(cards: any, broadcast: any, gaintag: any): this;
|
||||
directgains(cards: any, broadcast: any, gaintag: any): this;
|
||||
gainMultiple(targets: any, position: any): any;
|
||||
gain(...args: any[]): any;
|
||||
addToExpansion(...args: any[]): any;
|
||||
gainMultiple(targets: any, position: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
gain(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
addToExpansion(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
give(cards: any, target: any, visible: any): any;
|
||||
lose(...args: any[]): any;
|
||||
damage(...args: any[]): any;
|
||||
recover(...args: any[]): any;
|
||||
doubleDraw(): any;
|
||||
loseHp(num: any): any;
|
||||
loseMaxHp(...args: any[]): any;
|
||||
gainMaxHp(...args: any[]): any;
|
||||
changeHp(num: any, popup: any): any;
|
||||
changeHujia(num: any, type: any, limit: any): any;
|
||||
lose(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
damage(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
recover(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
recoverTo(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
doubleDraw(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
loseHp(num: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
loseMaxHp(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
gainMaxHp(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
changeHp(num: any, popup: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
changeHujia(num: any, type: any, limit: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
getBuff(...args: any[]): this;
|
||||
getDebuff(...args: any[]): this;
|
||||
dying(reason: any): any;
|
||||
die(reason: any): any;
|
||||
dying(reason: any): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
die(reason: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
revive(hp: any, log: any): void;
|
||||
isMad(): boolean;
|
||||
goMad(end: any): void;
|
||||
unMad(): void;
|
||||
tempHide(): void;
|
||||
addExpose(num: any): this;
|
||||
equip(card: any, draw: any): any;
|
||||
addJudge(card: any, cards: any): any;
|
||||
equip(card: any, draw: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
addJudge(card: any, cards: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @returns { boolean }
|
||||
*/
|
||||
canAddJudge(card: any): boolean;
|
||||
addJudgeNext(card: any, unlimited: any): void;
|
||||
judge(...args: any[]): any;
|
||||
turnOver(bool: any): any;
|
||||
judge(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
turnOver(bool: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
out(skill: any): void;
|
||||
outSkills: any[] | undefined;
|
||||
in(skill: any): void;
|
||||
link(bool: any): any;
|
||||
link(bool: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
skip(name: any): void;
|
||||
wait(callback: any): void;
|
||||
unwait(result: any): void;
|
||||
|
@ -966,9 +967,9 @@ export class Player extends HTMLDivElement {
|
|||
getUseValue(card: any, distance: any, includecard: any): number;
|
||||
addSubPlayer(cfg: any): string;
|
||||
removeSubPlayer(name: any): void;
|
||||
callSubPlayer(...args: any[]): any;
|
||||
toggleSubPlayer(...args: any[]): any;
|
||||
exitSubPlayer(remove: any): any;
|
||||
callSubPlayer(...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
toggleSubPlayer(...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
exitSubPlayer(remove: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
getSubPlayers(tag: any): any[];
|
||||
addSkillTrigger(skills: any, hidden: any, triggeronly: any): this;
|
||||
_hookTrigger: any[] | undefined;
|
||||
|
@ -976,16 +977,16 @@ export class Player extends HTMLDivElement {
|
|||
removeSkillLog(skill: any, popup: any): this | undefined;
|
||||
addInvisibleSkill(skill: any): void;
|
||||
removeInvisibleSkill(skill: any, ...args: any[]): any;
|
||||
addSkills(skill: any): any;
|
||||
removeSkills(skill: any): any;
|
||||
changeSkills(addSkill?: any[], removeSkill?: any[]): any;
|
||||
addSkills(skill: any): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
removeSkills(skill: any): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
changeSkills(addSkill?: any[], removeSkill?: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined;
|
||||
addSkill(skill: any, checkConflict: any, nobroadcast: any, addToSkills: any): any;
|
||||
addAdditionalSkills(skill: any, skillsToAdd: any, keep: any): any;
|
||||
addAdditionalSkills(skill: any, skillsToAdd: any, keep: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
addAdditionalSkill(skill: any, skillsToAdd: any, keep: any): this;
|
||||
$removeAdditionalSkills(skill: any, target: any): void;
|
||||
getRemovableAdditionalSkills(skill: any, target: any): string[];
|
||||
removeAdditionalSkill(skill: any, target: any): this;
|
||||
removeAdditionalSkills(skill: any, target: any): any;
|
||||
removeAdditionalSkills(skill: any, target: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
awakenSkill(skill: any, nounmark: any): this;
|
||||
restoreSkill(skill: any, nomark: any): this;
|
||||
disableSkill(skill: any, skills: any): this;
|
||||
|
@ -995,7 +996,7 @@ export class Player extends HTMLDivElement {
|
|||
removeEquipTrigger(card: any): this;
|
||||
removeSkillTrigger(skills: any, triggeronly: any): this;
|
||||
removeSkill(skill: any, ...args: any[]): any;
|
||||
addTempSkills(skillsToAdd: any, expire: any): any;
|
||||
addTempSkills(skillsToAdd: any, expire: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
addTempSkill(skill: any, expire: any, checkConflict: any): any;
|
||||
tempBanSkill(skill: any, expire: any, log: any): any;
|
||||
isTempBanned(skill: any): boolean;
|
||||
|
|
|
@ -227,7 +227,7 @@ export class Library {
|
|||
yingbian: {
|
||||
condition: {
|
||||
color: Map<string, string>;
|
||||
complex: Map<string, (event: any, ...args: any[]) => any>;
|
||||
complex: Map<string, (event: any, ...args: any[]) => Element.GameEvent & Element.GameEventPromise>;
|
||||
simple: Map<string, (event: any) => any>;
|
||||
};
|
||||
effect: Map<string, () => void>;
|
||||
|
@ -4043,7 +4043,10 @@ export class Library {
|
|||
readonly nodews: Element.NodeWS;
|
||||
};
|
||||
card: {
|
||||
list: never[];
|
||||
/**
|
||||
* @type { [CardBaseUIData['suit'], CardBaseUIData['number'], string][] }
|
||||
*/
|
||||
list: [CardBaseUIData['suit'], CardBaseUIData['number'], string][];
|
||||
cooperation_damage: {
|
||||
fullskin: boolean;
|
||||
};
|
||||
|
@ -4438,7 +4441,7 @@ export type VCard = InstanceType<typeof lib.element.VCard>;
|
|||
export type Button = InstanceType<typeof lib.element.Button>;
|
||||
export type Dialog = InstanceType<typeof lib.element.Dialog>;
|
||||
export type GameEvent = InstanceType<typeof lib.element.GameEvent>;
|
||||
export type GameEventPromise = InstanceType<typeof lib.element.GameEvent> & InstanceType<typeof lib.element.GameEventPromise>;
|
||||
export type GameEventPromise = GameEvent & InstanceType<typeof lib.element.GameEventPromise>;
|
||||
export type NodeWS = InstanceType<typeof lib.element.NodeWS>;
|
||||
export type Control = InstanceType<typeof lib.element.Control>;
|
||||
import * as Element from "./element/index.js";
|
||||
|
|
|
@ -45,6 +45,24 @@ export class status {
|
|||
* @type { boolean | void }
|
||||
*/
|
||||
connectMode: boolean | void;
|
||||
/**
|
||||
* @type { boolean | void }
|
||||
*/
|
||||
importingExtension: boolean | void;
|
||||
/**
|
||||
* @type { Promise<any>[] | void }
|
||||
*/
|
||||
extensionLoaded: Promise<any>[] | void;
|
||||
/**
|
||||
* @type { Promise<any>[] | void }
|
||||
*/
|
||||
extensionLoading: Promise<any>[] | void;
|
||||
/**
|
||||
* @type { { [key: string]: Promise<any>[] } | void }
|
||||
*/
|
||||
importing: void | {
|
||||
[key: string]: Promise<any>[];
|
||||
};
|
||||
}
|
||||
export let _status: status;
|
||||
export function setStatus(instance?: status | undefined): void;
|
||||
|
|
|
@ -59,12 +59,12 @@ declare type GeneratorContentFuncByAll = (event: GameEventPromise, map: {
|
|||
|
||||
declare type OldContentFuncByAll = () => void
|
||||
|
||||
declare type Game = typeof import('./nonameModules/noname.d.ts').game;
|
||||
declare type Library = typeof import('./nonameModules/noname.d.ts').lib;
|
||||
declare type Status = typeof import('./nonameModules/noname.d.ts')._status;
|
||||
declare type UI = typeof import('./nonameModules/noname.d.ts').ui;
|
||||
declare type Get = typeof import('./nonameModules/noname.d.ts').get;
|
||||
declare type AI = typeof import('./nonameModules/noname.d.ts').ai;
|
||||
declare type Game = typeof import('noname-typings/nonameModules/noname.js').game;
|
||||
declare type Library = typeof import('noname-typings/nonameModules/noname.js').lib;
|
||||
declare type Status = typeof import('noname-typings/nonameModules/noname.js')._status;
|
||||
declare type UI = typeof import('noname-typings/nonameModules/noname.js').ui;
|
||||
declare type Get = typeof import('noname-typings/nonameModules/noname.js').get;
|
||||
declare type AI = typeof import('noname-typings/nonameModules/noname.js').ai;
|
||||
|
||||
declare type Button = import('./nonameModules/noname/library/index.js').Button;
|
||||
declare type Card = import('./nonameModules/noname/library/index.js').Card;
|
||||
|
@ -195,7 +195,6 @@ declare interface importCharacterConfig {
|
|||
* 若里面是项目内的同名字段,将覆盖原方法
|
||||
*/
|
||||
game?: SMap<any>;
|
||||
|
||||
/**
|
||||
* 类型:键值对
|
||||
*
|
||||
|
@ -538,6 +537,80 @@ declare interface importExtensionConfig {
|
|||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入玩法的配置
|
||||
*/
|
||||
declare interface importPlayConfig {
|
||||
/** 扩展名 */
|
||||
name: string;
|
||||
arenaReady?: Function;
|
||||
/**
|
||||
* 设置播放录像
|
||||
*/
|
||||
video?: Function;
|
||||
/**
|
||||
* 设置技能
|
||||
* */
|
||||
skill?: SMap<Skill>;
|
||||
/**
|
||||
* 设置该武将包独有的卡牌(或者是特殊卡牌)
|
||||
*
|
||||
* */
|
||||
card?: SMap<any>;
|
||||
translate?: SMap<string>;
|
||||
/**
|
||||
* 对应lib.element
|
||||
*
|
||||
* 若里面是项目内的同名字段,将覆盖原方法
|
||||
*/
|
||||
element?: SMap<any>;
|
||||
/**
|
||||
* 对应ai
|
||||
*
|
||||
* 若里面是项目内的同名字段,将覆盖原方法
|
||||
*/
|
||||
ai?: SMap<any>;
|
||||
/**
|
||||
* 对应ui
|
||||
*
|
||||
* 若里面是项目内的同名字段,将覆盖原方法
|
||||
*/
|
||||
ui?: SMap<any>;
|
||||
/**
|
||||
* 对应game
|
||||
*
|
||||
* 若里面是项目内的同名字段,将覆盖原方法
|
||||
*/
|
||||
game?: SMap<any>;
|
||||
/**
|
||||
* 类型:键值对
|
||||
*
|
||||
* 作用:对应get
|
||||
* 若里面是项目内的同名字段,将覆盖原方法
|
||||
*/
|
||||
get?: SMap<any>;
|
||||
/**
|
||||
* 帮助内容将显示在菜单-选项-帮助中
|
||||
*
|
||||
* 游戏编辑器的帮助代码基本示例结构:
|
||||
*
|
||||
* "帮助条目":
|
||||
* ```jsx
|
||||
* <ul>
|
||||
* <li>列表1-条目1
|
||||
* <li>列表1-条目2
|
||||
* </ul>
|
||||
* <ol>
|
||||
* <li>列表2-条目1
|
||||
* <li>列表2-条目2
|
||||
* </ul>
|
||||
* ```
|
||||
* (目前可显示帮助信息:mode,extension,card卡包,character武将包)
|
||||
*/
|
||||
help?: SMap<string>;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单的选项的配置
|
||||
*
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/**
|
||||
* @typedef {{
|
||||
* cardMove:GameEventPromise[],
|
||||
* cardMove: GameEventPromise[],
|
||||
* custom: GameEventPromise[],
|
||||
* useCard: GameEventPromise[],
|
||||
* changeHp: GameEventPromise[],
|
||||
* everything: GameEventPromise[]
|
||||
* }} GameHistory
|
||||
* @typedef { { type: string, player?: string, content?: string | any[], delay: number } } Video
|
||||
* @typedef { { name?: string, type: string, player?: string, content?: string | any[], delay: number } } Video
|
||||
* @typedef { { mode: string, name: string[], name1: string, name2?: string, time: number, video: Video, win: boolean } } Videos
|
||||
*/
|
||||
|
||||
|
@ -495,8 +495,8 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasGlobalHistory(key, filter, last) {
|
||||
|
@ -519,8 +519,8 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { void }
|
||||
*/
|
||||
checkGlobalHistory(key, filter, last) {
|
||||
|
@ -548,8 +548,8 @@ export class Game {
|
|||
* @template { keyof GameHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter]
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { GameHistory[T] }
|
||||
*/
|
||||
getGlobalHistory(key, filter, last) {
|
||||
|
@ -570,8 +570,8 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasAllGlobalHistory(key, filter, last) {
|
||||
|
@ -594,8 +594,8 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { void }
|
||||
*/
|
||||
checkAllGlobalHistory(key, filter, last) {
|
||||
|
@ -625,8 +625,8 @@ export class Game {
|
|||
* @template { keyof GameHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter]
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @returns { GameHistory[T] }
|
||||
*/
|
||||
getAllGlobalHistory(key, filter, last) {
|
||||
|
@ -658,12 +658,12 @@ export class Game {
|
|||
/**
|
||||
* @overload
|
||||
* @param { Card } cards
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsDiscard(cards) {
|
||||
/** @type { 'cards' | 'card' | void } */
|
||||
|
@ -686,12 +686,12 @@ export class Game {
|
|||
/**
|
||||
* @overload
|
||||
* @param { Card } cards
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsGotoOrdering(cards) {
|
||||
/** @type { 'cards' | 'card' | void } */
|
||||
|
@ -711,13 +711,13 @@ export class Game {
|
|||
* @overload
|
||||
* @param { Card } cards
|
||||
* @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库
|
||||
* @returns { GameEventPromise }
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
cardsGotoSpecial(cards, bool) {
|
||||
/** @type { 'cards' | 'card' | void } */
|
||||
|
@ -780,7 +780,7 @@ export class Game {
|
|||
return next;
|
||||
}
|
||||
/**
|
||||
* @param { GameEventPromise } event
|
||||
* @param { import('../library/index.js').GameEventPromise } event
|
||||
*/
|
||||
$cardsGotoPile(event) {
|
||||
const cards = event.cards;
|
||||
|
@ -890,56 +890,40 @@ export class Game {
|
|||
* @param { Function } proceed
|
||||
*/
|
||||
checkFileList(updates, proceed) {
|
||||
if (!Array.isArray(updates) || !updates.length) proceed();
|
||||
let n = updates.length;
|
||||
if (!n) {
|
||||
proceed(n);
|
||||
}
|
||||
for (let i = 0; i < updates.length; i++) {
|
||||
if (lib.node && lib.node.fs) {
|
||||
lib.node.fs.access(__dirname + '/' + updates[i], (function (entry) {
|
||||
return function (err) {
|
||||
if (!err) {
|
||||
let stat = lib.node.fs.statSync(__dirname + '/' + entry);
|
||||
if (stat.size == 0) {
|
||||
err = true;
|
||||
}
|
||||
}
|
||||
if (err) {
|
||||
n--;
|
||||
if (n == 0) {
|
||||
proceed();
|
||||
}
|
||||
}
|
||||
else {
|
||||
n--;
|
||||
updates.remove(entry);
|
||||
if (n == 0) {
|
||||
proceed();
|
||||
}
|
||||
}
|
||||
lib.node.fs.access(__dirname + '/' + updates[i], err => {
|
||||
if (!err) {
|
||||
let stat = lib.node.fs.statSync(__dirname + '/' + updates[i]);
|
||||
// @ts-ignore
|
||||
if (stat.size == 0) err = true;
|
||||
}
|
||||
}(updates[i])));
|
||||
n--;
|
||||
if (!err) updates.remove(updates[i]);
|
||||
if (n == 0) proceed();
|
||||
});
|
||||
}
|
||||
else {
|
||||
resolveLocalFileSystemURL(lib.assetURL + updates[i], (function (name) {
|
||||
return function (entry) {
|
||||
n--;
|
||||
updates.remove(name);
|
||||
if (n == 0) {
|
||||
proceed();
|
||||
}
|
||||
}
|
||||
}(updates[i])), function () {
|
||||
window.resolveLocalFileSystemURL(nonameInitialized + updates[i], () => {
|
||||
n--;
|
||||
if (n == 0) {
|
||||
proceed();
|
||||
}
|
||||
updates.remove(updates[i]);
|
||||
if (n == 0) proceed();
|
||||
}, () => {
|
||||
n--;
|
||||
if (n == 0) proceed();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {...(Player[] | Player)} args
|
||||
* @overload
|
||||
* @param {[Player[]]} args
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {Player[]} args
|
||||
*/
|
||||
replaceHandcards(...args) {
|
||||
var next = game.createEvent('replaceHandcards');
|
||||
|
@ -1701,12 +1685,12 @@ export class Game {
|
|||
* @overload
|
||||
* @param { 'character' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importCharacterConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
|
@ -1714,12 +1698,12 @@ export class Game {
|
|||
* @overload
|
||||
* @param { 'card' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importCardConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
|
@ -1727,12 +1711,12 @@ export class Game {
|
|||
* @overload
|
||||
* @param { 'mode' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importModeConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
|
@ -1740,12 +1724,12 @@ export class Game {
|
|||
* @overload
|
||||
* @param { 'player' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importPlayerConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
|
@ -1753,15 +1737,28 @@ export class Game {
|
|||
* @overload
|
||||
* @param { 'extension' } type
|
||||
* @param {(
|
||||
* lib: Library,
|
||||
* game: typeof Game,
|
||||
* ui: UI,
|
||||
* get: Get,
|
||||
* ai: AI,
|
||||
* _status: Status
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importExtensionConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param { 'play' } type
|
||||
* @param {(
|
||||
* lib: InstanceType<typeof import('../library/index.js').Library>,
|
||||
* game: InstanceType<typeof Game>,
|
||||
* ui: InstanceType<typeof import('../ui/index.js').UI>,
|
||||
* get: InstanceType<typeof import('../get/index.js').Get>,
|
||||
* ai: InstanceType<typeof import('../ai/index.js').AI>,
|
||||
* _status: InstanceType<typeof import('../status/index.js').status>
|
||||
* ) => importPlayConfig } content
|
||||
* @param {*} [url]
|
||||
*/
|
||||
import(type, content, url) {
|
||||
if (type == 'extension') {
|
||||
const promise = game.loadExtension(content).then((name) => {
|
||||
|
@ -1939,7 +1936,7 @@ export class Game {
|
|||
removeFile;
|
||||
/**
|
||||
* 获取文件列表
|
||||
* @type { undefined | ((dir: string, success: (folders: string[], files: string[]) => any, failure: (e: Error) => void) => void) }
|
||||
* @type { undefined | ((dir: string, success: (folders: string[], files: string[]) => any, failure?: (e: Error) => void) => void) }
|
||||
*/
|
||||
getFileList;
|
||||
/**
|
||||
|
@ -2017,7 +2014,17 @@ export class Game {
|
|||
return;
|
||||
}
|
||||
//导入
|
||||
const UHP = error => alert(`导入失败:\n${JSON.stringify(error, null, '\t')}`);
|
||||
const UHP = error => {
|
||||
if (!(error instanceof Error)) error = new Error(error);
|
||||
for (const [key, value] of Object.entries(Object.getOwnPropertyDescriptors(error))) {
|
||||
if (value.configurable === true) {
|
||||
Reflect.defineProperty(error, key, Object.assign(value, {
|
||||
enumerable: true
|
||||
}));
|
||||
}
|
||||
}
|
||||
alert(`导入失败:\n${JSON.stringify(error, null, '\t')}`)
|
||||
};
|
||||
try {
|
||||
zip.load(data);
|
||||
// alert(zip.file('文件夹/加扩展.js').asText())
|
||||
|
@ -4328,8 +4335,8 @@ export class Game {
|
|||
* @param { string } name
|
||||
* @param { string } skill
|
||||
* @param { Player } player
|
||||
* @param { GameEventPromise } event
|
||||
* @returns { GameEventPromise }
|
||||
* @param { import('../library/index.js').GameEventPromise } event
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
*/
|
||||
createTrigger(name, skill, player, event, indexedData) {
|
||||
let info = get.info(skill);
|
||||
|
@ -4352,7 +4359,7 @@ export class Game {
|
|||
*
|
||||
* @param { string } name
|
||||
* @param { false } [trigger]
|
||||
* @param { GameEventPromise } [triggerEvent]
|
||||
* @param { import('../library/index.js').GameEventPromise } [triggerEvent]
|
||||
*/
|
||||
createEvent(name, trigger, triggerEvent) {
|
||||
const next = (new lib.element.GameEvent(name, trigger)).toPromise();
|
||||
|
@ -5495,11 +5502,11 @@ export class Game {
|
|||
*/
|
||||
executingAsyncEventMap = new Map();
|
||||
/**
|
||||
* @type { GameEventPromise[] }
|
||||
* @type { import('../library/index.js').GameEventPromise[] }
|
||||
*/
|
||||
belongAsyncEventList = [];
|
||||
/**
|
||||
* @param { GameEventPromise } [belongAsyncEvent]
|
||||
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent]
|
||||
*/
|
||||
async loop(belongAsyncEvent) {
|
||||
if (belongAsyncEvent) {
|
||||
|
@ -5665,7 +5672,7 @@ export class Game {
|
|||
}
|
||||
}
|
||||
/**
|
||||
* @param { GameEventPromise } [belongAsyncEvent]
|
||||
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent]
|
||||
*/
|
||||
runContent(belongAsyncEvent) {
|
||||
return new Promise(resolve => {
|
||||
|
@ -5892,7 +5899,7 @@ export class Game {
|
|||
return game.asyncDelay(time, time2);
|
||||
}
|
||||
/**
|
||||
* @param { GameEventPromise } [event]
|
||||
* @param { import('../library/index.js').GameEventPromise } [event]
|
||||
*/
|
||||
check(event = _status.event) {
|
||||
game.callHook("checkBegin", [event]);
|
||||
|
@ -7413,7 +7420,7 @@ export class Game {
|
|||
* @param { Player } player
|
||||
* @param { string | Card[] } card
|
||||
* @param { Player[] } [targets]
|
||||
* @param { GameEventPromise } [event]
|
||||
* @param { import('../library/index.js').GameEventPromise } [event]
|
||||
* @param { boolean } [forced]
|
||||
* @param { string } [logvid]
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,7 @@ import { ui } from '../../ui/index.js';
|
|||
import { AsyncFunction } from '../../util/index.js';
|
||||
|
||||
export class GameEvent {
|
||||
/** @type { GameEventPromise } */
|
||||
/** @type { this & import('./gameEventPromise.js').GameEventPromise } */
|
||||
#promise;
|
||||
/**
|
||||
* @param {string | GameEvent} [name]
|
||||
|
@ -74,6 +74,11 @@ export class GameEvent {
|
|||
*/
|
||||
// @ts-ignore
|
||||
player;
|
||||
/**
|
||||
* @type { Player[] }
|
||||
*/
|
||||
// @ts-ignore
|
||||
players;
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
|
@ -477,7 +482,7 @@ export class GameEvent {
|
|||
* 获取事件的父节点。
|
||||
* 获取事件链上的指定事件。
|
||||
* 默认获取上一个父节点(核心)。
|
||||
* @param {number|string|(evt:gameEvent)=>boolean} [level=1] 获取深度(number)/指定名字(string)/指定特征(function)
|
||||
* @param {number|string|((evt:GameEvent)=>boolean)} [level=1] 获取深度(number)/指定名字(string)/指定特征(function)
|
||||
* @param {boolean} [forced] 若获取不到节点,默认返回{},若forced为true则返回null
|
||||
* @param {boolean} [includeSelf] 若level不是数字,指定搜索时是否包含事件本身
|
||||
* @returns {GameEvent|{}|null}
|
||||
|
@ -903,11 +908,10 @@ export class GameEvent {
|
|||
}
|
||||
/**
|
||||
* 事件转为Promise化
|
||||
*
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
toPromise() {
|
||||
if (!this.#promise) {
|
||||
// @ts-ignore
|
||||
this.#promise = new lib.element.GameEventPromise(this);
|
||||
}
|
||||
return this.#promise;
|
||||
|
|
|
@ -35,14 +35,11 @@ export class GameEventPromise extends Promise {
|
|||
}
|
||||
#event;
|
||||
/**
|
||||
* @param { GameEvent | GameEventPromise } arg
|
||||
* @param { import('./gameEvent.js').GameEvent } arg
|
||||
*/
|
||||
constructor(arg) {
|
||||
if (arg instanceof GameEventPromise)
|
||||
throw new Error("GameEventPromise cannot copy.")
|
||||
/**
|
||||
* @type {GameEvent}
|
||||
*/
|
||||
const event = arg;
|
||||
super(resolve => {
|
||||
// 设置为异步事件
|
||||
|
@ -165,45 +162,47 @@ export class GameEventPromise extends Promise {
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取 Result 对象中的信息。
|
||||
* @example
|
||||
* ```js
|
||||
// 示例 1:
|
||||
const chooseCardResult = await player.chooseCard().forResult();
|
||||
// 获取整个结果对象,然后访问如 chooseCardResult.cards 等属性
|
||||
|
||||
// 示例 2:
|
||||
const cards = await player.chooseCard().forResult('cards');
|
||||
// 获取结果对象中 'cards' 属性的值
|
||||
|
||||
// 示例 3:
|
||||
const [success, cards, targets] = await player.chooseCardTarget().forResult('bool', 'cards', 'targets');
|
||||
// 获取结果对象中多个属性的值
|
||||
// - success 表示是否成功
|
||||
// - cards 表示选择的卡片
|
||||
// - targets 表示选择的目标
|
||||
```
|
||||
* @template {keyof Result} T
|
||||
* @overload
|
||||
* @returns {Promise<Result>}
|
||||
*
|
||||
* 直接获得result中的信息。
|
||||
* @overload
|
||||
* @param {T} param0
|
||||
* @returns {Promise<Exclude<Result[T], undefined>>}
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* ①
|
||||
* let chooseCardResult = await player.chooseCard().forResult();
|
||||
* 选择的卡牌:chooseCardResult.cards
|
||||
* ②
|
||||
* let cards = await player.chooseCard().forResult('cards');
|
||||
* 选择的卡牌:cards
|
||||
* ③
|
||||
* let [success,cards,targets] = await player.chooseCardTarget().forResult('bool','cards','targets');
|
||||
* success:是否做出选择。
|
||||
* cards:选择的牌。
|
||||
* targets:选择的目标。
|
||||
*
|
||||
* @returns {Promise} 返回的结果
|
||||
* @overload
|
||||
* @param { T[] } params
|
||||
* @returns { Promise<Exclude<Result[T], undefined>[]> }
|
||||
*/
|
||||
forResult(){
|
||||
if(arguments.length == 0){
|
||||
return this.then(event=>{
|
||||
return Promise.resolve(event.result);
|
||||
});
|
||||
}else if(arguments.length == 1){
|
||||
return this.then(event=>{
|
||||
return Promise.resolve(event.result[arguments[0]]);
|
||||
});
|
||||
}else{
|
||||
return this.then(event=>{
|
||||
return Promise.resolve(Array.from(arguments).map(key=>event.result[key]));
|
||||
});
|
||||
forResult(...params){
|
||||
if (params.length == 0) {
|
||||
return this.then(({ result }) => result);
|
||||
} else if (params.length == 1) {
|
||||
return this.then(event => event.result[params[0]]);
|
||||
} else {
|
||||
return this.then(event => Array.from(params).map(key => event.result[key]));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回result中的bool项。
|
||||
*
|
||||
* @returns {Promise<boolean>} 返回的bool项
|
||||
* 返回result中的bool项
|
||||
*/
|
||||
forResultBool(){
|
||||
return this.forResult('bool');
|
||||
|
@ -211,9 +210,6 @@ export class GameEventPromise extends Promise {
|
|||
|
||||
/**
|
||||
* 返回result中的targets项。
|
||||
*
|
||||
* @returns {Promise<Player[]>} 返回的targets项。
|
||||
*
|
||||
*/
|
||||
forResultTargets(){
|
||||
return this.forResult('targets');
|
||||
|
@ -221,9 +217,6 @@ export class GameEventPromise extends Promise {
|
|||
|
||||
/**
|
||||
* 返回result中的cards项
|
||||
*
|
||||
* @returns {Promise<Card[]>} 返回的cards项。
|
||||
*
|
||||
*/
|
||||
forResultCards(){
|
||||
return this.forResult('cards');
|
||||
|
@ -241,8 +234,6 @@ export class GameEventPromise extends Promise {
|
|||
|
||||
/**
|
||||
* 返回result中的control项。
|
||||
*
|
||||
* @returns {Promise<string>} 返回的control项。
|
||||
*/
|
||||
forResultControl(){
|
||||
return this.forResult('control');
|
||||
|
@ -250,8 +241,6 @@ export class GameEventPromise extends Promise {
|
|||
|
||||
/**
|
||||
* 返回result中的links项。
|
||||
*
|
||||
* @returns {Promise<Array<any>>} 返回的links项。
|
||||
*/
|
||||
forResultLinks(){
|
||||
return this.forResult('links');
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @typedef { InstanceType<typeof lib.element.Button> } Button
|
||||
* @typedef { InstanceType<typeof lib.element.Dialog> } Dialog
|
||||
* @typedef { InstanceType<typeof lib.element.GameEvent> } GameEvent
|
||||
* @typedef { InstanceType<typeof lib.element.GameEvent> & InstanceType<typeof lib.element.GameEventPromise> } GameEventPromise
|
||||
* @typedef { GameEvent & InstanceType<typeof lib.element.GameEventPromise> } GameEventPromise
|
||||
* @typedef { InstanceType<typeof lib.element.NodeWS> } NodeWS
|
||||
* @typedef { InstanceType<typeof lib.element.Control> } Control
|
||||
*/
|
||||
|
@ -9448,6 +9448,9 @@ export class Library {
|
|||
}
|
||||
};
|
||||
card = {
|
||||
/**
|
||||
* @type { [CardBaseUIData['suit'], CardBaseUIData['number'], string][] }
|
||||
*/
|
||||
list: [],
|
||||
cooperation_damage: {
|
||||
fullskin: true,
|
||||
|
|
|
@ -54,6 +54,22 @@ export class status {
|
|||
* @type { boolean | void }
|
||||
*/
|
||||
connectMode = undefined
|
||||
/**
|
||||
* @type { boolean | void }
|
||||
*/
|
||||
importingExtension = undefined
|
||||
/**
|
||||
* @type { Promise<any>[] | void }
|
||||
*/
|
||||
extensionLoaded = undefined
|
||||
/**
|
||||
* @type { Promise<any>[] | void }
|
||||
*/
|
||||
extensionLoading = undefined
|
||||
/**
|
||||
* @type { { [key: string]: Promise<any>[] } | void }
|
||||
*/
|
||||
importing = undefined
|
||||
};
|
||||
|
||||
export let _status = new status();
|
||||
|
|
|
@ -419,7 +419,7 @@ export const extensionMenu = function (connectMenu) {
|
|||
}
|
||||
str += ',files:' + JSON.stringify(files);
|
||||
str += '}';
|
||||
var extension = { 'extension.js': 'game.import("extension",function(lib,game,ui,get,ai,_status){return ' + str + '})' };
|
||||
var extension = { 'extension.js': 'import { lib, game, ui, get, ai, _status } from "../../noname.js";\ngame.import("extension",function(){\n\treturn ' + str + '\n});' };
|
||||
for (var i in dash1.content.image) {
|
||||
extension[i] = dash1.content.image[i];
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
||||
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
||||
"strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
||||
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
||||
"strictPropertyInitialization": false, /* Check for class properties that are declared but not set in the constructor. */
|
||||
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
||||
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
||||
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
||||
|
|
Loading…
Reference in New Issue