沮授【渐营】添加花色点数显示,刘徽【割圆】markcount显示优化
This commit is contained in:
parent
efafeb1655
commit
9d871db8c6
|
@ -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'},
|
||||
},
|
||||
|
|
|
@ -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:{
|
||||
|
|
|
@ -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.getStorage('dcgeyuan_homura').length) return 0;
|
||||
var list=[1,2,3,4,5,6,7,8,9,10,11,12,13].filter(i=>lib.skill.dcgeyuan.filterNumber(player,i));
|
||||
if(!list.length) return 0;
|
||||
list=list.map(num=>{
|
||||
var list=[1,11,12,13];
|
||||
if(list.contains(num)) return ['A','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;
|
||||
|
|
|
@ -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'},
|
||||
|
|
Loading…
Reference in New Issue