调整部分技能结构

This commit is contained in:
copcap 2023-12-01 06:41:08 +08:00
parent 746dbcc28e
commit 55aefd9c3f
No known key found for this signature in database
GPG Key ID: 30E7AB6699451AEE
3 changed files with 42 additions and 18 deletions

View File

@ -411,12 +411,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'jiefan',
enable:'chooseToUse',
filter:function(event,player){
return event.type=='dying'&&_status.currentPhase&&_status.currentPhase.isIn()&&!event.oldjiefan;
return event.type=='dying'&&_status.currentPhase&&_status.currentPhase.isIn();
},
direct:true,
content:function(){
'step 0'
if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true});
player.chooseToUse(function(card,player,event){
if(get.name(card)!='sha') return false;
return lib.filter.filterCard.apply(this,arguments);
@ -425,13 +423,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return lib.filter.filterTarget.apply(this,arguments);
}).set('logSkill','oldjiefan').set('oncard',function(){
_status.event.player.addTempSkill('oldjiefan_recover');
}).set('custom',{
add:{},
replace:{
window:()=>{
ui.click.cancel();
}
},
});
'step 1'
if(!result.bool){
var evt=event.getParent(2);
evt.oldjiefan=true;
evt.goto(0);
}
},
ai:{
save:true,
@ -440,7 +439,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
subSkill:{
recover:{
audio:'jiefan',
// audio:'jiefan',
trigger:{source:'damageBegin2'},
filter:function(event,player){
return event.getParent(4).name=='oldjiefan';

View File

@ -116,6 +116,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function*(event,map){
const player=map.player;
event.pushHandler('onNextMoveCard',(event,option)=>{
if(_status.connectMode&&event.step==1&&event._result.bool&&option.state=='end'){
game.broadcastAll(()=>{
delete _status.noclearcountdown;
game.stopCountChoose();
});
}
});
let result=yield player.moveCard(false,`###琼英###移动场上的一张牌,然后弃置一张与此牌花色相同的手牌(若没有则展示手牌)。`).set('logSkill','dcqiongying').set('custom',{
add:{},
replace:{
@ -151,6 +159,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
trigger:{player:'phaseJieshuBegin'},
direct:true,
filter:function(event,player){
return game.hasPlayer(current=>current.countCards('e'));
},
content:function*(event,map){
const player=map.player;
let result=yield player.chooseTarget(get.prompt('dcnuanhui'),'选择一名装备区有牌的角色该角色可以依次使用X张基本牌X为其装备区牌数。',(card,player,target)=>{

View File

@ -15714,7 +15714,7 @@ new Promise(resolve=>{
info.onChooseToUse(event);
}
}
_status.noclearcountdown=true;
if(_status.noclearcountdown!=='direct') _status.noclearcountdown=true;
if(event.type=='phase'){
if(event.isMine()){
event.endButton=ui.create.control('结束回合','stayleft',function(){
@ -15951,8 +15951,16 @@ new Promise(resolve=>{
else if(event._sendskill){
event.result._sendskill=event._sendskill;
}
debugger
if((!event.result||!event.result.bool||event.result._noHidingTimer)&&(event.result.skill||event.logSkill)){
var info=get.info(event.result.skill||event.logSkill);
if(info.direct&&!info.clearTime){
_status.noclearcountdown='direct';
}
}
if(event.dialog&&typeof event.dialog=='object') event.dialog.close();
if(!_status.noclearcountdown){
debugger
game.stopCountChoose();
}
"step 5"
@ -15974,7 +15982,7 @@ new Promise(resolve=>{
info.onChooseToRespond(event);
}
}
_status.noclearcountdown=true;
if(_status.noclearcountdown!=='direct') _status.noclearcountdown=true;
if(!_status.connectMode&&lib.config.skip_shan&&event.autochoose&&event.autochoose()){
event.result={bool:false};
}
@ -16133,7 +16141,7 @@ new Promise(resolve=>{
}
if(event.result.skill){
if(info.direct&&!info.clearTime){
_status.noclearcountdown=true;
_status.noclearcountdown='direct';
}
}
if(event.logSkill){
@ -25261,9 +25269,9 @@ new Promise(resolve=>{
if(info.onuse){
info.onuse(result,this);
}
if(info.direct&&!info.clearTime){
_status.noclearcountdown=true;
}
// if(info.direct&&!info.clearTime){
// _status.noclearcountdown=true;
// }
}
if(event.logSkill){
if(typeof event.logSkill=='string'){
@ -26661,7 +26669,7 @@ new Promise(resolve=>{
}
player._hide_all_timer=true;
}
else if(!_status.event._global_waiting){
else if(!_status.event._global_waiting&&_status.noclearcountdown!=='direct'){
player.showTimer(time);
}
lib.node.torespondtimeout[this.playerid]=setTimeout(function(){
@ -26678,7 +26686,7 @@ new Promise(resolve=>{
game.players[i].hideTimer();
}
}
else if(!_status.event._global_waiting){
else if(!get.event('_global_waiting')&&(_status.noclearcountdown!=='direct'||get.event('name')=='chooseToUse'&&result&&result.bool)&&!(result&&result._noHidingTimer)){
this.hideTimer();
}
clearTimeout(lib.node.torespondtimeout[this.playerid]);
@ -26961,6 +26969,7 @@ new Promise(resolve=>{
}
}
showTimer(time){
debugger
if(!time&&lib.configOL){
time=parseInt(lib.configOL.choose_timeout)*1000;
}
@ -37572,6 +37581,7 @@ new Promise(resolve=>{
}
},
stopCountChoose:function(){
debugger
if(_status.countDown){
clearInterval(_status.countDown);
delete _status.countDown;
@ -57188,6 +57198,10 @@ new Promise(resolve=>{
const skill=gameEvent.skill;
if(skill){
result.skill=skill;
const info=get.info(skill);
if(info&&info.direct&&!info.clearTime){
result._noHidingTimer=true;
}
const skillInformation=get.info(gameEvent.skill),viewAs=skillInformation.viewAs;
if(typeof viewAs=='function'){
const viewedAs=viewAs(result.cards,gameEvent.player);