修改周处【善断】R的生成时机为每次分配数字时,防止回合内获得【善断】无法使用

This commit is contained in:
mengxinzxz 2023-09-30 22:04:06 +08:00 committed by GitHub
parent c3119f4991
commit f2e682f071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 46 additions and 38 deletions

View File

@ -6944,25 +6944,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
init:function(player,name){ init:function(player,name){
player.storage[name]=[1,2,3,4]; player.storage[name]=[1,2,3,4];
}, },
trigger:{player:'phaseBegin'},
forced:true,
popup:false,
content:function(){
trigger._shanduan=(player.storage.shanduan||[1,2,3,4]).slice(0);
player.storage.shanduan=[1,2,3,4]
},
group:['shanduan_draw','shanduan_use','shanduan_discard','shanduan_damage'],
ai:{
notemp:true,
threaten:3.6,
},
subSkill:{
damage:{
audio:'shanduan',
trigger:{player:'damageEnd'}, trigger:{player:'damageEnd'},
filter:(event,player)=>player!=_status.currentPhase,
forced:true, forced:true,
locked:false, locked:false,
filter:(event,player)=>player!=_status.currentPhase,
content:function(){ content:function(){
if(!player.storage.shanduan) player.storage.shanduan=[1,2,3,4]; if(!player.storage.shanduan) player.storage.shanduan=[1,2,3,4];
var list=player.storage.shanduan; var list=player.storage.shanduan;
@ -6981,7 +6966,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
game.delayx(); game.delayx();
}, },
group:['shanduan_draw','shanduan_use','shanduan_discard'],
ai:{
notemp:true,
threaten:3.6,
}, },
subSkill:{
draw:{ draw:{
audio:'shanduan', audio:'shanduan',
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin'},
@ -6989,14 +6979,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
locked:false, locked:false,
filter:function(event,player){ filter:function(event,player){
var list=event.getParent()._shanduan; var list=event.getParent()._shanduan;
return list&&list.length>0; return !list||list.length>0;
}, },
content:function(){ content:function(){
'step 0' 'step 0'
var list=trigger.getParent()._shanduan; 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}; 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); 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 list=trigger.getParent()._shanduan;
var num=list[result.index]; var num=list[result.index];
trigger.num=num; trigger.num=num;
@ -7011,11 +7007,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
locked:false, locked:false,
filter:function(event,player){ filter:function(event,player){
var list=event.getParent()._shanduan; var list=event.getParent()._shanduan;
return list&&list.length>0; return !list||list.length>0;
}, },
content:function(){ content:function(){
'step 0' 'step 0'
var list=trigger.getParent()._shanduan; 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}; if(list.length==1) event._result={index:0};
else player.chooseControl(list).set('prompt','善断:为攻击范围基数分配一个数值').set('list',list).set('ai',function(){ else player.chooseControl(list).set('prompt','善断:为攻击范围基数分配一个数值').set('list',list).set('ai',function(){
var player=_status.event.player,list=_status.event.list,card={name:'sha'}; 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)); return list.indexOf(Math.min.apply(Math,list));
}); });
'step 1' 'step 2'
var list=trigger.getParent()._shanduan; var list=trigger.getParent()._shanduan;
var num=list[result.index]; var num=list[result.index];
if(!player.storage.shanduan_effect) player.storage.shanduan_effect={}; 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)); return list.indexOf(Math.min.apply(Math,list));
}); });
'step 2' 'step 3'
var list=trigger.getParent()._shanduan; var list=trigger.getParent()._shanduan;
var num=list[result.index]; var num=list[result.index];
if(!player.storage.shanduan_effect) player.storage.shanduan_effect={}; 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, locked:false,
filter:function(event,player){ filter:function(event,player){
var list=event.getParent()._shanduan; var list=event.getParent()._shanduan;
return list&&list.length>0; return !list||list.length>0;
}, },
content:function(){ content:function(){
'step 0' 'step 0'
var list=trigger.getParent()._shanduan; 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}; 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); 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 list=trigger.getParent()._shanduan;
var num=list[result.index]; var num=list[result.index];
if(!player.storage.shanduan_effect) player.storage.shanduan_effect={}; if(!player.storage.shanduan_effect) player.storage.shanduan_effect={};
@ -25349,7 +25357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tongxie_info:'出牌阶段开始时你可以选择包括你在内的至多三名角色你与这些角色均称为“同协角色”。这些角色中手牌数唯一最少的角色摸一张牌且你获得如下效果直到你下回合开始①当有“同协角色”对唯一目标角色使用的【杀】结算结束后其他“同协角色”可以依次对目标角色使用一张【杀】无距离和次数限制且不能再触发此效果。②当有“同协角色”受到伤害时其他“同协角色”本回合内失去过体力的角色除外可以防止此伤害失去1点体力。', tongxie_info:'出牌阶段开始时你可以选择包括你在内的至多三名角色你与这些角色均称为“同协角色”。这些角色中手牌数唯一最少的角色摸一张牌且你获得如下效果直到你下回合开始①当有“同协角色”对唯一目标角色使用的【杀】结算结束后其他“同协角色”可以依次对目标角色使用一张【杀】无距离和次数限制且不能再触发此效果。②当有“同协角色”受到伤害时其他“同协角色”本回合内失去过体力的角色除外可以防止此伤害失去1点体力。',
jin_zhouchu:'周处', jin_zhouchu:'周处',
shanduan:'善断', 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:'义烈',
yilie_info:'每轮每种牌名限一次。你可以将两张颜色相同的手牌当做任意一种基本牌使用。', yilie_info:'每轮每种牌名限一次。你可以将两张颜色相同的手牌当做任意一种基本牌使用。',
caoxiancaohua:'曹宪曹华', caoxiancaohua:'曹宪曹华',