Merge pull request #820 from Tipx-L/PR-Branch

Finally fix the gift mechanic.
This commit is contained in:
Spmario233 2024-01-20 14:13:40 +08:00 committed by GitHub
commit 70cfb46fb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 8 deletions

View File

@ -414,7 +414,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
filter:(event,player)=>event.player!=player,
logTarget:'player',
content:()=>{
trigger.deniedGift.add(trigger.card);
trigger.deniedGifts.add(trigger.card);
},
ai:{
refuseGifts:true

View File

@ -710,7 +710,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.storage.xinluoshen=event.cards.slice(0);
return;
}
};
}
}
},
mod:{

View File

@ -8434,6 +8434,6 @@ export class Game extends Uninstantable {
return true;
});
}
};
}
export const game = Game;

View File

@ -1,9 +1,7 @@
import { AI as ai } from '../../ai/index.js';
import { Get as get } from '../../get/index.js';
import { Game as game } from '../../game/index.js';
import { Library as lib } from "../index.js";
import { status as _status } from '../../status/index.js';
import { UI as ui } from '../../ui/index.js';
import { AsyncFunction } from '../../util/index.js';
/**
@ -16,7 +14,7 @@ import { AsyncFunction } from '../../util/index.js';
* 且Promise的原有属性无法被修改一切对这个类实例的属性修改删除
* 再配置等操作都会转发到事件对应的属性中
*
* @template { GameEvent } T
* @extends {Promise<GameEvent>}
*
* @example
* 使用await xx()等待异步事件执行

View File

@ -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 & typeof Promise<InstanceType<typeof lib.element.GameEvent>> } GameEventPromise
* @typedef { InstanceType<typeof lib.element.GameEvent> & InstanceType<typeof lib.element.GameEventPromise> } GameEventPromise
* @typedef { InstanceType<typeof lib.element.NodeWS> } NodeWS
* @typedef { InstanceType<typeof lib.element.Control> } Control
*/
@ -13088,7 +13088,7 @@ export class Library extends Uninstantable {
static other = {
ignore: () => void 0
};
};
}
Library.config = undefined;
Library.configOL = undefined;