This commit is contained in:
libccy 2017-02-25 11:52:59 +08:00
parent 34782b5dd7
commit e5d35123c9
3 changed files with 107 additions and 113 deletions

View File

@ -1993,24 +1993,6 @@ character.sp={
chat:['粗鄙之语','天地不容','谄谀之臣','皓首匹夫,苍髯老贼','二臣贼子','断脊之犬','我从未见过有如此厚顔无耻之人!'], chat:['粗鄙之语','天地不容','谄谀之臣','皓首匹夫,苍髯老贼','二臣贼子','断脊之犬','我从未见过有如此厚顔无耻之人!'],
callback:function(){ callback:function(){
'step 0' 'step 0'
event.num1=event.card1.number;
event.num2=event.card2.number;
if(player.hasSkill('jici')&&event.num1<=player.storage.gushe){
player.chooseBool(get.prompt('jici'));
}
else{
event.goto(2);
}
'step 1'
if(result.bool){
if(event.num1<player.storage.gushe){
event.num1+=player.storage.gushe;
}
else{
player.getStat().skill.gushe--;
}
}
'step 2'
if(event.num1>event.num2){ if(event.num1>event.num2){
target.chooseToDiscard('he','弃置一张牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){ target.chooseToDiscard('he','弃置一张牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){
if(_status.event.goon) return 6-ai.get.value(card); if(_status.event.goon) return 6-ai.get.value(card);
@ -2030,7 +2012,7 @@ character.sp={
event.finish(); event.finish();
} }
} }
'step 3' 'step 1'
if(!result.bool){ if(!result.bool){
player.draw(); player.draw();
} }
@ -2059,7 +2041,20 @@ character.sp={
} }
} }
}, },
jici:{}, jici:{
trigger:{player:'compare'},
filter:function(event,player){
return event.getParent().name=='gushe'&&!event.iwhile&&event.num1<=player.storage.gushe;
},
content:function(){
if(trigger.num1<player.storage.gushe){
trigger.num1+=player.storage.gushe;
}
else{
player.getStat().skill.gushe--;
}
}
},
juesi:{ juesi:{
enable:'phaseUse', enable:'phaseUse',
filter:function(event,player){ filter:function(event,player){

View File

@ -7514,52 +7514,62 @@
event.list[i].lose(result[i].cards); event.list[i].lose(result[i].cards);
cards.push(result[i].cards[0]); cards.push(result[i].cards[0]);
} }
event.list2=cards; event.cardlist=cards;
event.card1=result[0].cards[0]; event.card1=result[0].cards[0];
event.result={player:event.card1,targets:cards.slice(0)}; event.num1=event.card1.number;
event.list.shift(); event.iwhile=0;
event.result={
player:event.card1,
targets:event.cardlist.slice(0),
num1:[],
num2:[],
};
game.log(player,'的拼点牌为',event.card1); game.log(player,'的拼点牌为',event.card1);
"step 3" "step 3"
if(event.list.length){ if(event.iwhile<targets.length){
event.current=event.list.shift(); event.target=targets[event.iwhile];
event.current.animate('target'); event.target.animate('target');
player.animate('target'); player.animate('target');
event.card2=event.list2.shift(); event.card2=event.cardlist[event.iwhile];
game.log(event.current,'的拼点牌为',event.card2); event.num2=event.card2.number;
player.line(event.current); game.log(event.target,'的拼点牌为',event.card2);
player.$compare(event.card1,event.current,event.card2); player.line(event.target);
game.delay(4); player.$compare(event.card1,event.target,event.card2);
setTimeout(function(){ event.trigger('compare');
var str; game.delay(0,1500);
if(event.card1.number>event.card2.number){
player.popup('胜');
event.current.popup('负');
str=get.translation(player.name)+'拼点成功';
} }
else{ else{
if(event.card1.number==event.card2.number){ event.finish();
}
"step 4"
event.result.num1[event.iwhile]=event.num1;
event.result.num2[event.iwhile]=event.num2;
var str;
if(event.num1>event.num2){
str=get.translation(player.name)+'拼点成功';
player.popup('胜');
target.popup('负');
}
else{
str=get.translation(player.name)+'拼点失败';
if(event.num1==event.num2){
player.popup('平'); player.popup('平');
event.current.popup('平'); target.popup('平');
} }
else{ else{
player.popup('负'); player.popup('负');
event.current.popup('胜'); target.popup('胜');
} }
str=get.translation(player.name)+'拼点失败';
} }
game.broadcastAll(function(str){ game.broadcastAll(function(str){
var dialog=ui.create.dialog(str); var dialog=ui.create.dialog(str);
dialog.classList.add('center'); dialog.classList.add('center');
setTimeout(function(){ setTimeout(function(){
dialog.close(); dialog.close();
},500); },1000);
},str); },str);
},1500); game.delay(2);
} "step 5"
else{
event.finish();
}
"step 4"
if(event.callback){ if(event.callback){
game.broadcastAll(function(card1,card2){ game.broadcastAll(function(card1,card2){
if(card1.clone) card1.clone.style.opacity=0.5; if(card1.clone) card1.clone.style.opacity=0.5;
@ -7567,13 +7577,16 @@
},event.card1,event.card2); },event.card1,event.card2);
var next=game.createEvent('compareMultiple'); var next=game.createEvent('compareMultiple');
next.player=player; next.player=player;
next.target=event.current; next.target=event.target;
next.card1=event.card1; next.card1=event.card1;
next.card2=event.card2; next.card2=event.card2;
next.num1=event.num1;
next.num2=event.num2;
next.setContent(event.callback); next.setContent(event.callback);
} }
"step 5" "step 6"
game.broadcastAll(ui.clear); game.broadcastAll(ui.clear);
event.iwhile++;
event.goto(3); event.goto(3);
}, },
chooseToCompare:function(){ chooseToCompare:function(){
@ -7658,76 +7671,52 @@
player.$compare(event.card1,target,event.card2); player.$compare(event.card1,target,event.card2);
game.log(player,'的拼点牌为',event.card1); game.log(player,'的拼点牌为',event.card1);
game.log(target,'的拼点牌为',event.card2); game.log(target,'的拼点牌为',event.card2);
event.num1=event.card1.number;
event.num2=event.card2.number;
event.trigger('compare');
game.delay(0,1500);
"step 6"
event.result={ event.result={
player:event.card1, player:event.card1,
target:event.card2, target:event.card2,
num1:event.num1,
num2:event.num2
} }
event.dialogid=lib.status.videoId++; var str;
if(get.number(event.card1)>get.number(event.card2)){ if(event.num1>event.num2){
event.result.bool=true; event.result.bool=true;
setTimeout(function(){ str=get.translation(player.name)+'拼点成功';
var str=get.translation(player.name)+'拼点成功';
game.broadcast(function(str,id){
var dialog=ui.create.dialog(str);
dialog.videoId=id;
dialog.classList.add('center');
},str,event.dialogid);
event.dialog=ui.create.dialog(str);
event.dialog.classList.add('center');
player.popup('胜'); player.popup('胜');
target.popup('负'); target.popup('负');
game.resume();
},1500);
} }
else{ else{
event.result.bool=false; event.result.bool=false;
if(get.number(event.card1)==get.number(event.card2)){ str=get.translation(player.name)+'拼点失败';
if(event.num1==event.num2){
event.result.tie=true; event.result.tie=true;
setTimeout(function(){
var str=get.translation(player.name)+'拼点失败';
game.broadcast(function(str,id){
var dialog=ui.create.dialog(str);
dialog.videoId=id;
dialog.classList.add('center');
},str,event.dialogid);
event.dialog=ui.create.dialog(str);
event.dialog.classList.add('center');
player.popup('平'); player.popup('平');
target.popup('平'); target.popup('平');
game.resume();
},1500);
} }
else{ else{
setTimeout(function(){
var str=get.translation(player.name)+'拼点失败';
game.broadcast(function(str,id){
var dialog=ui.create.dialog(str);
dialog.videoId=id;
dialog.classList.add('center');
},str,event.dialogid);
event.dialog=ui.create.dialog(str);
event.dialog.classList.add('center');
player.popup('负'); player.popup('负');
target.popup('胜'); target.popup('胜');
game.resume();
},1500);
} }
} }
game.pause(); game.broadcastAll(function(str){
"step 6" var dialog=ui.create.dialog(str);
dialog.classList.add('center');
setTimeout(function(){
dialog.close();
},1000);
},str);
game.delay(2); game.delay(2);
"step 7" "step 7"
if(typeof event.target.ai.shown=='number'&&event.target.ai.shown<=0.85&&event.addToAI){ if(typeof event.target.ai.shown=='number'&&event.target.ai.shown<=0.85&&event.addToAI){
event.target.ai.shown+=0.1; event.target.ai.shown+=0.1;
} }
game.broadcastAll(function(){
ui.arena.classList.remove('thrownhighlight'); ui.arena.classList.remove('thrownhighlight');
game.broadcast(function(id){ });
var dialog=get.idDialog(id);
if(dialog){
dialog.close();
}
ui.arena.classList.remove('thrownhighlight');
},event.dialogid);
game.addVideo('thrownhighlight2'); game.addVideo('thrownhighlight2');
if(event.clear!==false){ if(event.clear!==false){
game.broadcastAll(ui.clear); game.broadcastAll(ui.clear);
@ -7741,7 +7730,6 @@
else if(event.preserve=='lose'){ else if(event.preserve=='lose'){
event.preserve=!event.result.bool; event.preserve=!event.result.bool;
} }
event.dialog.close();
}, },
chooseButton:function(){ chooseButton:function(){
"step 0" "step 0"

View File

@ -261,7 +261,18 @@ mode.guozhan={
} }
}, },
yingyang:{ yingyang:{
trigger:{player:'compare',target:'compare'},
filter:function(event){
return !event.iwhile;
},
content:function(){
if(player==trigger.player){
trigger.num1+=3;
}
else{
trigger.num2+=3;
}
}
}, },
gzqianxi:{ gzqianxi:{
audio:'qianxi', audio:'qianxi',