Merge branch 'PR-Branch' into PR-Branch

This commit is contained in:
huanyu 2024-01-20 16:56:26 +08:00 committed by GitHub
commit faad85a930
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 26 additions and 18 deletions

View File

@ -2679,6 +2679,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
priority:5,
popup:false,
forced:true,
silent:true,
filter:function(event,player){
if(event.card.storage&&event.card.storage.nowuxie) return false;
var card=event.card;

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

@ -993,6 +993,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '手牌上限+'+storage;
}
},
onremove:true,
charlotte:true,
mod:{
maxHandcard(player,num){

View File

@ -655,7 +655,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const event=get.event();
if(!event.isMine()) return;
if(button.classList.contains('selectable')==false) return;
if(ui.selected.buttons.length>=lib.skill.sbkanpo.getNumber) return false;
if(ui.selected.buttons.length>=sum) return false;
button.classList.add('selected');
ui.selected.buttons.push(button);
let counterNode=button.querySelector('.caption');
@ -1822,7 +1822,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
})):0,alter=[null,1,1],temp;
for(let i of game.players){
if(player===i) continue;
let vplayer=new lib.element.Player(i);
let vplayer=ui.create.player(i);
temp=get.effect(i,new lib.element.VCard({name:'juedou',isCard:true}),vplayer,i);
vplayer.remove();
if(temp){

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

@ -1,3 +1,3 @@
window.bannedKeyWords=[
'ghs','直肠','性交','做爱','http','吃奶','骚逼','哈巴狗','美眉','癌','屁眼','艹','傻逼','操你','做鸡','奸','姦','华为','屄','狗子','屎','同性恋','肖战','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NCVCMSVFOSVBQSVBOCVFNSVBNCVCNCUyMiUyQyUyMiVFNSU5MCU4MyVFNSVCMSU4MSUyMiUyQyUyMiVFNSU4MiVCQiUyMiUyQyUyMiVFNSVBNSVBNSVFNSU4OCVBOSVFNyVCQiU5OSUyMiUyQyUyMiVFNCVCOCU4MSVFNyU5QyU5RiUyMiUyQyUyMiVFOCU5QiU4NiUyMiUyQyUyMiVFOSVCQyVBMCVFOSVCQyVBMCUyMiUyQyUyMiVFOSVCQyVBMCVFNCVCQSVCQSUyMiUyQyUyMiVFNyVBNSU5RSVFNSU4RiU4QiUyMiUyQyUyMiUzQyUyRmElM0UlMjIlNUQ=")));

View File

@ -8434,7 +8434,6 @@ export class Game extends Uninstantable {
return true;
});
}
/**
* 此方法用于对所有targets按顺序执行一个async函数
*
@ -8450,6 +8449,6 @@ export class Game extends Uninstantable {
await Promise.resolve(asyncFunc(target,i));
}
}
};
}
export const game = Game;

View File

@ -2011,8 +2011,10 @@ export const Content = {
}
},
arrangeTrigger: async function (event,trigger,player) {
while(event.doingList.length>0){
event.doing = event.doingList.shift();
const doingList = event.doingList.slice(0);
while(doingList.length>0){
event.doing = doingList.shift();
while(true){
if (trigger.filterStop && trigger.filterStop()) return;
const usableSkills = event.doing.todoList.filter(info => {
@ -2030,10 +2032,10 @@ export const Content = {
}
else {
event.choice = usableSkills.filter(n => n.priority == usableSkills[0].priority);
//现在只要找到一个同优先度技能为silent 便优先执行该技能
//现在只要找到一个同优先度技能为silent,或没有技能描述的技能 便优先执行该技能
const silentSkill = event.choice.find(item => {
const skillInfo = lib.skill[item.skill];
return (skillInfo && skillInfo.silent);
return (skillInfo && (skillInfo.silent || !lib.translate[item.skill]));
})
if (silentSkill){
event.current = silentSkill;

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
*/
@ -11228,6 +11228,7 @@ export class Library extends Uninstantable {
charlotte: true,
priority: -100,
lastDo: true,
silent:true,
content: function () {
player.removeSkill('counttrigger');
delete player.storage.counttrigger;
@ -11253,6 +11254,7 @@ export class Library extends Uninstantable {
priority: 100,
firstDo: true,
popup: false,
silent:true,
filter: function (event, player) {
return player.hp >= player.maxHp;
},
@ -11341,6 +11343,7 @@ export class Library extends Uninstantable {
popup: false,
priority: -100,
lastDo: true,
silent:true,
filter: function (event) {
return !event._cleared && event.card.name != 'wuxie';
},
@ -11357,6 +11360,7 @@ export class Library extends Uninstantable {
popup: false,
priority: -100,
lastDo: true,
silent:true,
filter: function (event) {
return ui.todiscard[event.discardid] ? true : false;
},
@ -11386,6 +11390,7 @@ export class Library extends Uninstantable {
priority: 5,
forced: true,
popup: false,
silent:true,
filter: function (event, player) {
//if(!event.player.isDying()) return false;
//if(event.source&&event.source.isIn()&&event.source!=player) return false;
@ -11539,6 +11544,7 @@ export class Library extends Uninstantable {
popup: false,
logv: false,
forceDie: true,
silent:true,
//priority:-5,
content: function () {
"step 0";
@ -11567,6 +11573,7 @@ export class Library extends Uninstantable {
forced: true,
popup: false,
forceDie: true,
silent:true,
filter: function (event, player) {
var evt = event.getParent();
return evt && evt.name == 'damage' && evt.hasNature('linked') && player.isLinked();
@ -13088,7 +13095,7 @@ export class Library extends Uninstantable {
static other = {
ignore: () => void 0
};
};
}
Library.config = undefined;
Library.configOL = undefined;