Merge pull request #434 from mengxinzxz/PR-Branch

bugfix
This commit is contained in:
Spmario233 2023-10-01 00:14:10 +08:00 committed by GitHub
commit 88c94ff411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 58 deletions

View File

@ -6944,44 +6944,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){
init:function(player,name){
player.storage[name]=[1,2,3,4];
},
trigger:{player:'phaseBegin'},
trigger:{player:'damageEnd'},
filter:(event,player)=>player!=_status.currentPhase,
forced:true,
popup:false,
locked:false,
content:function(){
trigger._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0);
player.storage.shanduan=[1,2,3,4]
if(!player.storage.shanduan) player.storage.shanduan=[1,2,3,4];
var list=player.storage.shanduan;
for(var i=0;i<list.length;i++){
var num=list[i],add=true;
for(var j=0;j<list.length;j++){
if(list[j]<num){
add=false;
break;
}
}
if(add){
list[i]++;
break;
}
}
game.delayx();
},
group:['shanduan_draw','shanduan_use','shanduan_discard','shanduan_damage'],
group:['shanduan_draw','shanduan_use','shanduan_discard'],
ai:{
notemp:true,
threaten:3.6,
},
subSkill:{
damage:{
audio:'shanduan',
trigger:{player:'damageEnd'},
forced:true,
locked:false,
filter:(event,player)=>player!=_status.currentPhase,
content:function(){
if(!player.storage.shanduan) player.storage.shanduan=[1,2,3,4];
var list=player.storage.shanduan;
for(var i=0;i<list.length;i++){
var num=list[i],add=true;
for(var j=0;j<list.length;j++){
if(list[j]<num){
add=false;
break;
}
}
if(add){
list[i]++;
break;
}
}
game.delayx();
},
},
draw:{
audio:'shanduan',
trigger:{player:'phaseDrawBegin'},
@ -6989,14 +6979,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
locked:false,
filter:function(event,player){
var list=event.getParent()._shanduan;
return list&&list.length>0;
return !list||list.length>0;
},
content:function(){
'step 0'
var list=trigger.getParent()._shanduan;
if(!list){
trigger.getParent()._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0);
player.storage.shanduan=[1,2,3,4];
}
'step 1'
var list=trigger.getParent()._shanduan;
if(list.length==1) event._result={index:0};
else player.chooseControl(list).set('prompt','善断:为摸牌阶段的摸牌数分配一个数值').set('choice',list.indexOf(Math.max.apply(Math,list))).set('ai',()=>_status.event.choice);
'step 1'
'step 2'
var list=trigger.getParent()._shanduan;
var num=list[result.index];
trigger.num=num;
@ -7011,11 +7007,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
locked:false,
filter:function(event,player){
var list=event.getParent()._shanduan;
return list&&list.length>0;
return !list||list.length>0;
},
content:function(){
'step 0'
var list=trigger.getParent()._shanduan;
if(!list){
trigger.getParent()._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0);
player.storage.shanduan=[1,2,3,4];
}
'step 1'
var list=trigger.getParent()._shanduan;
if(list.length==1) event._result={index:0};
else player.chooseControl(list).set('prompt','善断:为攻击范围基数分配一个数值').set('list',list).set('ai',function(){
var player=_status.event.player,list=_status.event.list,card={name:'sha'};
@ -7041,7 +7043,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return list.indexOf(Math.min.apply(Math,list));
});
'step 1'
'step 2'
var list=trigger.getParent()._shanduan;
var num=list[result.index];
if(!player.storage.shanduan_effect) player.storage.shanduan_effect={};
@ -7066,7 +7068,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return list.indexOf(Math.min.apply(Math,list));
});
'step 2'
'step 3'
var list=trigger.getParent()._shanduan;
var num=list[result.index];
if(!player.storage.shanduan_effect) player.storage.shanduan_effect={};
@ -7082,14 +7084,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
locked:false,
filter:function(event,player){
var list=event.getParent()._shanduan;
return list&&list.length>0;
return !list||list.length>0;
},
content:function(){
'step 0'
var list=trigger.getParent()._shanduan;
if(!list){
trigger.getParent()._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0);
player.storage.shanduan=[1,2,3,4];
}
'step 1'
var list=trigger.getParent()._shanduan;
if(list.length==1) event._result={index:0};
else player.chooseControl(list).set('prompt','善断:为手牌上限基数分配一个数值').set('choice',list.indexOf(Math.max.apply(Math,list))).set('ai',()=>_status.event.choice);
'step 1'
'step 2'
var list=trigger.getParent()._shanduan;
var num=list[result.index];
if(!player.storage.shanduan_effect) player.storage.shanduan_effect={};
@ -25352,7 +25360,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tongxie_info:'出牌阶段开始时你可以选择包括你在内的至多三名角色你与这些角色均称为“同协角色”。这些角色中手牌数唯一最少的角色摸一张牌且你获得如下效果直到你下回合开始①当有“同协角色”对唯一目标角色使用的【杀】结算结束后其他“同协角色”可以依次对目标角色使用一张【杀】无距离和次数限制且不能再触发此效果。②当有“同协角色”受到伤害时其他“同协角色”本回合内失去过体力的角色除外可以防止此伤害失去1点体力。',
jin_zhouchu:'周处',
shanduan:'善断',
shanduan_info:'锁定技。①回合开始时你生成数组R=[1,2,3,4]。②摸牌阶段开始时你从数组R中选择并移除一个数字A。你本阶段的额定摸牌数改为A。③出牌阶段开始时你从数组R中选择并移除两个数字B和C。你将你本阶段内的攻击范围基数最小值和使用【杀】的次数上限基础值改为B和C。④弃牌阶段开始时你从数组R中选择并移除一个数字D。你令你本回合的手牌上限基数改为D。⑤当你于回合外受到伤害后你令下回合生成的R中最小的一个数字+1。',
shanduan_info:'锁定技。①摸牌/出牌/弃牌阶段开始时,你为本回合摸牌阶段摸牌数/攻击范围和使用【杀】的限制次数/手牌上限的默认值从数组R=[1234]中分配数值。②当你于回合外受到伤害后你令下回合〖善断①〗以此法分配的数值集合R中的最小值+1。',
yilie:'义烈',
yilie_info:'每轮每种牌名限一次。你可以将两张颜色相同的手牌当做任意一种基本牌使用。',
caoxiancaohua:'曹宪曹华',

View File

@ -6302,7 +6302,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.list=list;
player.draw(list[0]);
'step 1'
player.storage.dchuishu_effect=event.list[2];
player.addTempSkill('dchuishu_effect');
player.chooseToDiscard('h',true,event.list[1]);
},
@ -6315,22 +6314,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(storage,player){
var list=lib.skill.dchuishu.getList(player);
return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后你从弃牌堆中获得等同于本回合弃牌数的非基本牌。';
return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后你从弃牌堆中获得['+list[2]+']张非基本牌。';
},
},
subSkill:{
effect:{
charlotte:true,
audio:'dchuishu',
trigger:{
player:'loseAfter',
global:'loseAsyncAfter',
},
forced:true,
popup:false,
charlotte:true,
onremove:true,
filter:function(event,player){
var num=player.storage.dchuishu_effect;
var num=lib.skill.dchuishu.getList(player)[2];
if(typeof num!='number') return false;
if(event.type!='discard'||event.getlx===false) return false;
var evt=event.getl(player);
@ -6346,14 +6342,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
});
return prev>num;
},
forced:true,
popup:false,
firstDo:true,
content:function(){
player.removeSkill('dchuishu_effect');
var evt=trigger.getl(player);
var num=0;
player.getHistory('lose',function(evt){
if(evt.type!='discard') return false;
num+=evt.cards2.length;
});
var num=lib.skill.dchuishu.getList(player)[2];
var cards=[];
for(var i=0;i<num;i++){
var card=get.discardPile(function(card){
@ -12200,7 +12193,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
dchuishu:function(player){
var list=lib.skill.dchuishu.getList(player);
return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后你从弃牌堆中随机获得等同于本回合弃牌数的非基本牌。';
return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后你从弃牌堆中随机获得〖慧淑〗第三个括号数字张非基本牌。';
},
dcshoutan:function(player){
if(player.storage.dcshoutan) return '转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。<span class="bluetext">阳:你可以弃置一张黑色手牌。</span>';
@ -12457,7 +12450,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcpeiqi_info:'当你受到伤害后,你可以移动场上的一张牌。然后若场上所有角色均在彼此的攻击范围内,则你可以再移动场上的一张牌。',
quanhuijie:'全惠解',
dchuishu:'慧淑',
dchuishu_info:'摸牌阶段结束时,你可以摸[3]张牌。若如此做:你弃置[1]张手牌,且当你于本回合内弃置第[2]+1张牌后你从弃牌堆中随机获得等同于本回合弃牌数的非基本牌。',
dchuishu_info:'摸牌阶段结束时,你可以摸[3]张牌。若如此做:你弃置[1]张手牌,且当你于本回合内弃置第[2]+1张牌后你从弃牌堆中随机获得〖慧淑〗第三个括号数字张非基本牌。',
dcyishu:'易数',
dcyishu_info:'锁定技。当你不因出牌阶段而失去牌后,你同时令{〖慧淑〗的中括号内最小的一个数字+2}且{〖慧淑〗的中括号内最大的一个数字-1}。',
dcligong:'离宫',

View File

@ -9547,13 +9547,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
yanyu2:{
trigger:{player:'phaseUseEnd'},
direct:true,
filter:function(event,player){
return player.getHistory('lose',function(evt){
var evt2=evt.getParent();
return evt2.name=='useSkill'&&evt2.skill=='yanyu'&&evt.getParent(3)==event;
return player.getHistory('useSkill',function(evt){
return evt.event.getParent('phaseUse')==event&&evt.skill=='yanyu';
}).length>=2;
},
direct:true,
content:function(){
'step 0'
player.chooseTarget(get.prompt('yanyu'),'令一名男性角色摸两张牌',function(card,player,target){