Merge branch 'libccy:PR-Branch' into PR-Branch

This commit is contained in:
157 2023-10-09 16:37:38 +08:00 committed by GitHub
commit 16970f36ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 47 deletions

View File

@ -2164,7 +2164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
str+=('摸'+get.cnNumber(Math.min(8,num2-num1))+'张牌,然后手牌上限-1。'); str+=('摸'+get.cnNumber(Math.min(8,num2-num1))+'张牌,然后手牌上限-1。');
} }
str+=('<br>※当前手牌上限:'+num2); str+=('<br>※当前手牌上限:'+num2);
var num3=player.countMark('clanguixiang_count'); var num3=((_status.event.getParent().phaseIndex||0)+1);
if(num3>0){ if(num3>0){
str+=(';阶段数:'+num3) str+=(';阶段数:'+num3)
} }
@ -2186,7 +2186,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
order:function(item,player){ order:function(item,player){
var num=player.getHandcardLimit(),numx=player.countMark('clanguixiang_count'); var num=player.getHandcardLimit(),numx=((_status.event.getParent().phaseIndex||0)+1);
if(num==5&&numx==4&&player.getStat('skill').clanyirong) return 0; if(num==5&&numx==4&&player.getStat('skill').clanyirong) return 0;
if(player.countCards('h')==num+1&&num!=2&&(num<=4||num>4&&numx>4)) return 10; if(player.countCards('h')==num+1&&num!=2&&(num<=4||num>4&&numx>4)) return 10;
return 0.5; return 0.5;
@ -2197,56 +2197,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
clanguixiang:{ clanguixiang:{
audio:2, audio:2,
init:function(player){
player.addSkill('clanguixiang_count');
},
onremove:function(player){
player.removeSkill('clanguixiang_count');
var event=_status.event.getParent('phase');
if(event) delete event._clanguixiang;
},
trigger:{ trigger:{
player:['phaseZhunbeiBefore','phaseJudgeBefore','phaseDrawBefore','phaseDiscardBefore','phaseJieshuBefore'], player:'phaseChange',
}, },
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
var evt=event.getParent('phase'); if(event.phaseList[event.num].startsWith('phaseUse')) return false;
if(!evt||!evt._clanguixiang) return false; var num1=player.getHandcardLimit()-1,num2=event.num;
var num1=player.getHandcardLimit()-1,num2=player.countMark('clanguixiang_count');
return num1==num2; return num1==num2;
}, },
content:function(){ content:function(){
trigger.cancel(null,null,'notrigger'); trigger.phaseList[trigger.num]='phaseUse|clanguixiang';
var next=player.phaseUse(); game.delayx();
event.next.remove(next);
trigger.getParent().next.unshift(next);
},
subSkill:{
count:{
trigger:{
player:['phaseZhunbeiBegin','phaseJudgeBegin','phaseDrawBegin','phaseDiscardBegin','phaseJieshuBegin','phaseUseBegin'],
},
forced:true,
popup:false,
lastDo:true,
priority:-Infinity,
content:function(){
player.addMark('clanguixiang_count',1,false);
},
group:'clanguixiang_clear',
},
clear:{
trigger:{player:'phaseBefore'},
forced:true,
charlotte:true,
popup:false,
firstDo:true,
priority:Infinity,
content:function(){
delete player.storage.clanguixiang_count;
trigger._clanguixiang=true;
},
},
}, },
}, },
clanmuyin:{ clanmuyin:{

View File

@ -4585,11 +4585,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
//周宣 //周宣
dcwumei:{ dcwumei:{
audio:2, audio:2,
trigger:{player:'phaseBegin'}, trigger:{player:'phaseBeginStart'},
filter:function(event,player){ filter:function(event,player){
return !player.hasSkill('dcwumei_used'); return !player.hasSkill('dcwumei_used');
}, },
priority:10,//离谱的优先机制
direct:true, direct:true,
content:function(){ content:function(){
'step 0' 'step 0'
@ -4616,6 +4615,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger._triggered=5; trigger._triggered=5;
var evt=player.insertPhase(); var evt=player.insertPhase();
delete evt.skill; delete evt.skill;
game.broadcastAll(function(player){
player.classList.remove('glow_phase');
delete _status.currentPhase;
},player);
} }
} }
}, },