Merge pull request #570 from mengxinzxz/PR-Branch

bugfix+技能调整
This commit is contained in:
Spmario233 2023-10-23 22:30:21 +08:00 committed by GitHub
commit 0643780fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 175 additions and 34 deletions

View File

@ -170,6 +170,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:'phaseBegin',
},
forced:true,
popup:false,
forceDie:true,
onremove:true,
filter:function(event,player){
@ -178,10 +179,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return player.getStorage('jsrgqingzi_clear').length>0;
},
logTarget:function(event,player){
if(event.name!='phase') return event.player;
return player.getStorage('jsrgqingzi_clear');
},
content:function(){
'step 0'
var targets=player.getStorage('jsrgqingzi_clear');
@ -205,7 +202,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(targets.length>0){
event.redo();
}
else{
else if(!storage.length){
player.removeSkill('jsrgqingzi_clear');
}
},

View File

@ -4385,7 +4385,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xinjianying:{
audio:2,
subfrequent:['draw'],
group:['xinjianying_draw'],
enable:'phaseUse',
usable:1,
filter:function(event,player){
@ -4433,8 +4432,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
backup:function(links,player){
var next={
audio:'jianying',
audioname:['xin_jushou'],
audio:'xinjianying',
filterCard:true,
popname:true,
position:'he',
@ -4460,6 +4458,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
result:{player:7},
},
group:['xinjianying_draw','jianying_mark'],
init:function(player){
if(player.isPhaseUsing()){
var evt=_status.event.getParent('phaseUse');
var history=player.getHistory('useCard',function(evt2){
return evt2.getParent('phaseUse')==evt;
});
if(history.length){
var trigger=history[history.length-1];
player.storage.jianying_mark=trigger.card;
player.markSkill('jianying_mark');
game.broadcastAll(function(player,suit){
if(player.marks.jianying_mark) player.marks.jianying_mark.firstChild.innerHTML=get.translation(suit);
},player,get.suit(trigger.card,player));
player.when('phaseUseAfter').then(()=>{
player.unmarkSkill('jianying_mark');
delete player.storage.jianying_mark;
});
}
}
},
onremove:function(player){
player.unmarkSkill('jianying_mark');
delete player.storage.jianying_mark;
},
subSkill:{
draw:{inherit:'jianying',audio:'xinjianying'},
},

View File

@ -3269,6 +3269,60 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
player.draw();
},
group:'dcjianying_mark',
init:function(player){
var history=player.getAllHistory('useCard');
if(history.length){
var trigger=history[history.length-1];
if(get.suit(trigger.card,player)=='none'||typeof get.number(trigger.card,player)!='number') return;
player.storage.dcjianying_mark=trigger.card;
player.markSkill('dcjianying_mark');
game.broadcastAll(function(player,suit){
if(player.marks.dcjianying_mark) player.marks.dcjianying_mark.firstChild.innerHTML=get.translation(suit);
},player,get.suit(trigger.card,player));
}
},
onremove:function(player){
player.unmarkSkill('dcjianying_mark');
delete player.storage.dcjianying_mark;
},
subSkill:{
mark:{
charlotte:true,
trigger:{player:'useCard1'},
forced:true,
popup:false,
firstDo:true,
content:function(){
if(get.suit(trigger.card,player)=='none'||typeof get.number(trigger.card,player)!='number') player.unmarkSkill('dcjianying_mark');
else{
player.storage.dcjianying_mark=trigger.card;
player.markSkill('dcjianying_mark');
game.broadcastAll(function(player,suit){
if(player.marks.dcjianying_mark) player.marks.dcjianying_mark.firstChild.innerHTML=get.translation(suit);
},player,get.suit(trigger.card,player));
}
},
intro:{
markcount:function(card,player){
var num=get.number(card,player);
var list=[1,11,12,13];
if(list.contains(num)) return ['A','J','Q','K'][list.indexOf(num)];
return parseFloat(num);
},
content:function(card,player){
var suit=get.suit(card,player);
var num=get.number(card,player);
var str='<li>上一张牌的花色:'+get.translation(suit);
str+='<br><li>上一张牌的点数:';
var list=[1,11,12,13];
if(list.contains(num)) str+=['A(1)','J(11)','Q(12)','K(13)'][list.indexOf(num)];
else str+=parseFloat(num);
return str;
},
},
},
},
},
//十周年步练师
dcanxu:{

View File

@ -1464,8 +1464,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard1'},
forced:true,
filter:function(event,player){
return event.card.name=='sha'&&event.cards.length==1&&player.getHistory('useCard',function(evt){
return evt.card.name=='sha'&&evt.cards.length==1;
if(event.card.name!='sha'||!event.cards||event.cards.length!=1) return false;
var evt=event.getParent('phaseUse');
return evt&&evt.player==player&&player.getHistory('useCard',function(evt2){
return evt2.card.name=='sha'&&evt.cards&&evt.cards.length==1&&evt2.getParent('phaseUse')==evt;
}).indexOf(event)==0;
},
content:function(){
@ -3241,7 +3243,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
},
group:['yizhu_use','yizhu_discard'],
group:'yizhu_use',
subSkill:{
use:{
audio:'yizhu',
@ -3258,7 +3260,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.effect(event.targets[0],event.card,event.player,player)<0;
},
prompt2:function(event,player){
return '令'+get.translation(event.card)+'无效并可重新使用';
return '令'+get.translation(event.card)+'无效';
},
content:function(){
trigger.cancel();
@ -3269,26 +3271,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
});
player.unmarkAuto('yizhu',list);
game.delayx();
player.chooseUseTarget(trigger.card,trigger.cards,false,'nothrow');
},
},
discard:{
trigger:{
global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter'],
},
forced:true,
locked:false,
filter:function(event,player){
return player.storage.yizhu&&player.storage.yizhu.length&&event.getd().filter(function(i){
return player.storage.yizhu.contains(i);
}).length>0;
},
content:function(){
var list=trigger.getd().filter(function(i){
return player.storage.yizhu.contains(i);
});
player.unmarkAuto('yizhu',list);
player.draw();
},
},
},
@ -6487,7 +6469,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
heji:'合击',
heji_info:'当有角色使用的【决斗】或红色【杀】结算完成后若此牌对应的目标数为1则你可以对相同的目标使用一张【杀】或【决斗】无距离和次数限制。若你以此法使用的牌不为转化牌则你从牌堆中随机获得一张红色牌。',
liubing:'流兵',
liubing_info:'锁定技。①当你声明使用【杀】后,若此牌是你本回合使用的第一张有唯一对应实体牌的【杀】,则你将此牌的花色改为♦。②其他角色于其出牌阶段内使用的非转化黑色杀结算结束后,若此【杀】未造成伤害,则你获得之。',
liubing_info:'锁定技。①你于出牌阶段使用的第一张有唯一对应实体牌的【杀】的花色视为♦。②其他角色于其出牌阶段内使用的非转化黑色杀结算结束后,若此【杀】未造成伤害,则你获得之。',
sp_mifuren:'手杀糜夫人',
spcunsi:'存嗣',
spcunsi2:'存嗣',
@ -6598,7 +6580,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
rehuaibi_info:'主公技,锁定技,你的手牌上限+XX为你因〖邀虎〗选择势力的角色数量)。',
qiaogong:'桥公',
yizhu:'遗珠',
yizhu_info:'①结束阶段你摸两张牌然后将两张牌随机插入牌堆前2X张牌的位置中X为角色数选择牌的牌名对其他角色可见。②当有其他角色使用“遗珠”牌指定唯一目标时,你可清除对应的“遗珠”标记并取消此目标,然后你可使用此牌。③当有“遗珠”牌进入弃牌堆后,你摸一张牌并清除对应的“遗珠”标记。',
yizhu_info:'①结束阶段你摸两张牌然后将两张牌随机插入牌堆前2X张牌的位置中X为角色数选择牌的牌名对其他角色可见。②其他角色使用“遗珠”牌指定唯一目标时,你可以取消此目标,然后你清除对应的“遗珠”标记。',
luanchou:'鸾俦',
luanchou_info:'出牌阶段限一次,你可令两名角色获得“姻”标记并清除原有标记。拥有“姻”标记的角色视为拥有技能〖共患〗。',
gonghuan:'共患',

View File

@ -7188,6 +7188,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var number=get.number(card,false);
game.log(player,'将','#y'+get.strNumber(number),'记录为','#g“圆环之弧”');
player.markAuto('dcgeyuan_homura',[number]);
player.markSkill('dcgeyuan');
if(player.getStorage('dcgeyuan').length>player.getStorage('dcgeyuan_homura').length){
if(cards.length>0) event.redo();
else event.finish()
@ -7235,6 +7236,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var num1=list[0],num2=list[list.length-1];
player.storage.dcgeyuan_homura=[];
game.log(player,'清空了','#g“圆环之弧”');
player.markSkill('dcgeyuan');
if(player.getStorage('dcgeyuan').length>3){
player.unmarkAuto('dcgeyuan',[num1,num2]);
game.log(player,'从','#g“圆环之理”','中移除了','#y'+get.strNumber(num1),'和','#y'+get.strNumber(num2));
@ -7308,6 +7310,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
intro:{
name:'圆环之理',
markcount:function(storage,player){
if(!player.storage.dcgeyuan||!player.getStorage('dcgeyuan_homura').length) return 0;
var list=player.storage.dcgeyuan.filter(i=>lib.skill.dcgeyuan.filterNumber(player,i));
if(!list.length) return 0;
list=list.map(num=>{
var list=[1,10,11,12,13];
if(list.contains(num)) return ['A','X','J','Q','K'][list.indexOf(num)];
return parseFloat(num);
});
return list.reduce((str,num)=>{
return str+num;
},'');
},
mark:function(dialog,storage,player){
dialog.content.style['overflow-x']='visible';
var list=storage;

View File

@ -13627,6 +13627,76 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
player.draw();
},
group:'jianying_mark',
init:function(player){
if(player.isPhaseUsing()){
var evt=_status.event.getParent('phaseUse');
var history=player.getHistory('useCard',function(evt2){
return evt2.getParent('phaseUse')==evt;
});
if(history.length){
var trigger=history[history.length-1];
if(get.suit(trigger.card,player)=='none'||typeof get.number(trigger.card,player)!='number') return;
player.storage.jianying_mark=trigger.card;
player.markSkill('jianying_mark');
game.broadcastAll(function(player,suit){
if(player.marks.jianying_mark) player.marks.jianying_mark.firstChild.innerHTML=get.translation(suit);
},player,get.suit(trigger.card,player));
player.when('phaseUseAfter').then(()=>{
player.unmarkSkill('jianying_mark');
delete player.storage.jianying_mark;
});
}
}
},
onremove:function(player){
player.unmarkSkill('jianying_mark');
delete player.storage.jianying_mark;
},
subSkill:{
mark:{
charlotte:true,
trigger:{player:'useCard1'},
filter:function(event,player){
return player.isPhaseUsing();
},
forced:true,
popup:false,
firstDo:true,
content:function(){
if(get.suit(trigger.card,player)=='none'||typeof get.number(trigger.card,player)!='number') player.unmarkSkill('jianying_mark');
else{
player.storage.jianying_mark=trigger.card;
player.markSkill('jianying_mark');
game.broadcastAll(function(player,suit){
if(player.marks.jianying_mark) player.marks.jianying_mark.firstChild.innerHTML=get.translation(suit);
},player,get.suit(trigger.card,player));
player.when('phaseUseAfter').then(()=>{
player.unmarkSkill('jianying_mark');
delete player.storage.jianying_mark;
});
}
},
intro:{
markcount:function(card,player){
var num=get.number(card,player);
var list=[1,11,12,13];
if(list.contains(num)) return ['A','J','Q','K'][list.indexOf(num)];
return parseFloat(num);
},
content:function(card,player){
var suit=get.suit(card,player);
var num=get.number(card,player);
var str='<li>上一张牌的花色:'+get.translation(suit);
str+='<br><li>上一张牌的点数:';
var list=[1,11,12,13];
if(list.contains(num)) str+=['A(1)','J(11)','Q(12)','K(13)'][list.indexOf(num)];
else str+=parseFloat(num);
return str;
},
},
},
},
},
zzhenggong:{
trigger:{player:'damageEnd'},