v1.9.96.8

This commit is contained in:
Spmario233 2020-01-01 22:36:18 +08:00 committed by GitHub
parent 8dd983e018
commit 2fee38e20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 337 additions and 763 deletions

View File

@ -444,18 +444,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
mark:true, mark:true,
marktext:'暴', marktext:'暴',
unique:true, unique:true,
init:function(player){ init:function(player,skill){
player.storage.baonu=2; if(!player.storage[skill]) player.storage[skill]=0;
player.markSkill('baonu'); },
player.syncStorage('baonu'); trigger:{
source:'damageSource',
player:['damageEnd','enterGame'],
global:'gameDrawAfter',
}, },
trigger:{source:'damageSource',player:'damageEnd'},
forced:true, forced:true,
filter:function(event){ filter:function(event){
return event.num>0; return event.name!='damage'||event.num>0;
}, },
content:function(){ content:function(){
player.storage.baonu+=trigger.num; player.storage.baonu+=trigger.name=='damage'?trigger.num:2;
player.markSkill('baonu'); player.markSkill('baonu');
player.syncStorage('baonu'); player.syncStorage('baonu');
}, },
@ -1587,14 +1589,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
audio:true, audio:true,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
//priority:-5, //priority:-5,
filter:function(event,player){ filter:function(event,player){
return player.hp<player.maxHp; return player.hp<player.maxHp;
}, },
forced:true, forced:true,
content:function(){ content:function(){
trigger.num+=(player.maxHp-player.hp); trigger.num+=(player.getDamagedHp());
} }
}, },
xinlonghun:{ xinlonghun:{
@ -1750,7 +1752,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
shelie:{ shelie:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
content:function(){ content:function(){
"step 0" "step 0"
trigger.cancel(); trigger.cancel();
@ -2448,7 +2450,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
audio:'drlt_jieying', audio:'drlt_jieying',
trigger:{ trigger:{
player:'phaseDrawBegin' player:'phaseDrawBegin2'
}, },
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){

View File

@ -666,28 +666,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
botu:{ botu:{
audio:2, audio:2,
group:'botu_kanade',
trigger:{player:'phaseAfter'}, trigger:{player:'phaseAfter'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
return player.storage.botu&&player.storage.botu.length>=4; var history=player.getHistory('useCard');
var suits=[];
for(var i=0;i<history.length;i++){
var suit=get.suit(history[i].card);
if(suit) suits.add(suit);
}
return suits.length==4;
}, },
content:function(){ content:function(){
player.insertPhase(); player.insertPhase();
}, },
subSkill:{
kanade:{
trigger:{player:['useCard','phaseBefore']},
silent:true,
content:function(){
if(trigger.name=='phase') player.storage.botu=[];
else{
var suit=get.suit(trigger.card);
if(suit) player.storage.botu.add(suit);
}
},
},
},
}, },
xinleiji:{ xinleiji:{
group:'xinleiji_misa', group:'xinleiji_misa',
@ -1064,7 +1056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
reshuangxiong:{ reshuangxiong:{
trigger:{ trigger:{
player:"phaseDrawBefore", player:"phaseDrawBegin1",
}, },
group:"reshuangxiong2", group:"reshuangxiong2",
audio:"shuangxiong", audio:"shuangxiong",
@ -1075,7 +1067,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function (){ content:function (){
"step 0" "step 0"
trigger.cancel(); trigger.cancel(null,null,'notrigger');
event.cards=get.cards(2); event.cards=get.cards(2);
event.videoId=lib.status.videoId++; event.videoId=lib.status.videoId++;
game.broadcastAll(function(player,id,cards){ game.broadcastAll(function(player,id,cards){
@ -1261,7 +1253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"new_retuxi":{ "new_retuxi":{
audio:"retuxi", audio:"retuxi",
trigger:{ trigger:{
player:"phaseDrawBegin", player:"phaseDrawBegin2",
}, },
direct:true, direct:true,
//priority:-10, //priority:-10,
@ -1407,13 +1399,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"new_reluoyi":{ "new_reluoyi":{
audio:"reluoyi", audio:"reluoyi",
trigger:{ trigger:{
player:"phaseDrawBegin", player:"phaseDrawBegin1",
}, },
forced:true, forced:true,
locked:false, locked:false,
content:function (){ content:function (){
"step 0" "step 0"
var cards=get.cards(3); var cards=get.cards(3);
game.cardsGotoOrdering(cards);
event.cards=cards; event.cards=cards;
player.showCards(event.cards,'裸衣'); player.showCards(event.cards,'裸衣');
var cardsx=[]; var cardsx=[];
@ -1444,11 +1437,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
} }
player.gain(cards,'gain2'); player.gain(cards,'gain2');
game.cardsDiscard(cards2); //game.cardsDiscard(cards2);
player.addTempSkill('reluoyi2',{player:'phaseBefore'}); player.addTempSkill('reluoyi2',{player:'phaseBefore'});
trigger.cancel(); trigger.cancel(null,null,'notrigger');
} }
else game.cardsDiscard(cards); //else game.cardsDiscard(cards);
}, },
}, },
"new_rewusheng":{ "new_rewusheng":{
@ -1789,7 +1782,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:"qingnang", audio:"qingnang",
enable:"phaseUse", enable:"phaseUse",
filterCard:true, filterCard:true,
check:function (card,event,player){ check:function (card){
var player=_status.event.player;
if(game.countPlayer(function(current){ if(game.countPlayer(function(current){
return (get.recoverEffect(current,player,player)>0&&get.attitude(player,current)>2); return (get.recoverEffect(current,player,player)>0&&get.attitude(player,current)>2);
})>1&&get.color(card)=='black'&&player.countCards('h',{color:'red'})>0) return 3-get.value(card); })>1&&get.color(card)=='black'&&player.countCards('h',{color:'red'})>0) return 3-get.value(card);
@ -2589,7 +2583,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},*/ },*/
retuxi:{ retuxi:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin2'},
direct:true, direct:true,
filter:function(event){ filter:function(event){
return event.num>0; return event.num>0;
@ -2699,7 +2693,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
reluoyi:{ reluoyi:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin1'},
check:function(event,player){ check:function(event,player){
if(player.countCards('h','sha')) return true; if(player.countCards('h','sha')) return true;
return Math.random()<0.5; return Math.random()<0.5;
@ -2707,7 +2701,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
"step 0" "step 0"
player.addTempSkill('reluoyi2',{player:'phaseBefore'}); player.addTempSkill('reluoyi2',{player:'phaseBefore'});
trigger.cancel(); trigger.cancel(null,null,'notrigger');
"step 1" "step 1"
event.cards=get.cards(3); event.cards=get.cards(3);
player.showCards(event.cards,'裸衣'); player.showCards(event.cards,'裸衣');
@ -2862,7 +2856,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
reyingzi:{ reyingzi:{
audio:2, audio:2,
audioname:['heqi','sunce'], audioname:['heqi','sunce'],
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
forced:true, forced:true,
content:function(){ content:function(){
trigger.num++; trigger.num++;
@ -3802,7 +3796,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
xunxun:{ xunxun:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
//check:function(event,player){ //check:function(event,player){
// return !player.hasSkill('reyiji2'); // return !player.hasSkill('reyiji2');
//}, //},

View File

@ -601,7 +601,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'1':{ '1':{
audio:["yongsi1",2], audio:["yongsi1",2],
trigger:{ trigger:{
player:'phaseDrawBegin' player:'phaseDrawBegin2'
}, },
forced:true, forced:true,
content:function(){ content:function(){
@ -1518,43 +1518,36 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
"nzry_shicai":{ "nzry_shicai":{
audio:"nzry_shicai_2", audio:"nzry_shicai_2",
group:["nzry_shicai_1","nzry_shicai_2","nzry_shicai_3"],
ai:{ ai:{
reverseOrder:true,
skillTagFilter:function(player){
if(player.getHistory('useCard').length) return false;
},
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(get.type(card)=='equip'&&(!player.storage.nzry_shicai||!player.storage.nzry_shicai.contains('equip'))&&get.equipResult(player,target,card.name)<=0) return [1,3]; if(get.type(card)=='equip'&&(!player.getHistory('useCard').length)&&get.equipResult(player,target,card.name)<=0) return [1,3];
}, },
}, },
threaten:2.4, threaten:2.4,
}, },
subSkill:{ subSkill:{
"1":{
trigger:{
global:'phaseBefore',
player:'useCard1',
},
forced:true,
popup:false,
content:function(){
if(!player.storage.nzry_shicai||event.triggername=='phaseBefore') player.storage.nzry_shicai=[];
if(event.triggername=='useCard1'&&!player.storage.nzry_shicai.contains(get.type(trigger.card))){
trigger.nzry_shicai=true;
player.storage.nzry_shicai.push(get.type(trigger.card));
}
},
},
"2":{ "2":{
audio:2, audio:2,
prompt2:"当你使用牌指定目标时,若此牌与你本回合使用的牌类型均不同(包括装备牌),则你可以将此牌置于牌堆顶,然后摸一张牌", },
},
trigger:{ trigger:{
player:['useCardAfter'], player:['useCardAfter'],
target:'useCardToTargeted', target:'useCardToTargeted',
}, },
filter:function (event,player,name){ filter:function (event,player,name){
if(!event.nzry_shicai&&!event.getParent().nzry_shicai) return false;
if(name=='useCardToTargeted'&&('equip'!=get.type(event.card)||event.player!=player)) return false; if(name=='useCardToTargeted'&&('equip'!=get.type(event.card)||event.player!=player)) return false;
if(name=='useCardAfter'&&['equip','delay'].contains(get.type(event.card))) return false; if(name=='useCardAfter'&&['equip','delay'].contains(get.type(event.card))) return false;
return event.cards.filterInD().length>0; if(event.cards.filterInD().length<=0) return false;
var history=player.getHistory('useCard');
for(var i=0;i<history.length;i++){
if(history[i]!=event&&get.type(history[i].card)==get.type(event.card)) return false;
}
return true;
}, },
check:function (event,player){ check:function (event,player){
if(get.type(event.card)=='equip'){ if(get.type(event.card)=='equip'){
@ -1580,18 +1573,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
}, },
"3":{
trigger:{
global:'phaseAfter'
},
forced:true,
popup:false,
content:function(){
delete player.storage.nzry_shicai;
},
},
},
},
"nzry_cunmu":{ "nzry_cunmu":{
audio:2, audio:2,
trigger:{ trigger:{
@ -3849,7 +3830,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
zaiqi:{ zaiqi:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
filter:function(event,player){ filter:function(event,player){
return player.hp<player.maxHp; return player.hp<player.maxHp;
}, },
@ -3864,20 +3845,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
"step 0" "step 0"
trigger.cancel(); trigger.cancel(null,null,'notrigger');
event.cards=get.cards(player.getDamagedHp()+(event.name=='zaiqi'?0:1)); event.cards=get.cards(player.getDamagedHp()+(event.name=='zaiqi'?0:1));
game.cardsGotoOrdering(event.cards);
player.showCards(event.cards); player.showCards(event.cards);
"step 1" "step 1"
var num=0; var num=0;
var cards2=[];
for(var i=0;i<event.cards.length;i++){ for(var i=0;i<event.cards.length;i++){
if(get.suit(event.cards[i])=='heart'){ if(get.suit(event.cards[i])=='heart'){
num++; num++;
cards2.push(event.cards[i]);
event.cards.splice(i--,1); event.cards.splice(i--,1);
} }
} }
game.cardsDiscard(cards2);
if(num){ if(num){
player.recover(num); player.recover(num);
} }
@ -4137,7 +4116,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
haoshi:{ haoshi:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
threaten:1.4, threaten:1.4,
check:function(event,player){ check:function(event,player){
if(player.countCards('h')<=1) return true; if(player.countCards('h')<=1) return true;
@ -5240,7 +5219,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
shuangxiong:{ shuangxiong:{
audio:true, audio:true,
audioname:['re_yanwen'], audioname:['re_yanwen'],
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
check:function(event,player){ check:function(event,player){
if(player.countCards('h')>player.hp) return true; if(player.countCards('h')>player.hp) return true;
if(player.countCards('h')>3) return true; if(player.countCards('h')>3) return true;
@ -5254,7 +5233,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.$gain2(result.card); player.$gain2(result.card);
player.addTempSkill('shuangxiong2'); player.addTempSkill('shuangxiong2');
player.storage.shuangxiong=get.color(result.card); player.storage.shuangxiong=get.color(result.card);
trigger.cancel(); trigger.cancel(null,null,'notrigger');
} }
}, },
shuangxiong2:{ shuangxiong2:{

View File

@ -948,7 +948,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard2'}, trigger:{player:'useCard2'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(player.countUsed()>=1) return false; if(player.countUsed(null,true)>1) return false;
if(event.card.name!='sha'&&get.type(event.card)!='trick') return false; if(event.card.name!='sha'&&get.type(event.card)!='trick') return false;
var info=get.info(event.card); var info=get.info(event.card);
if(info.allowMultiple==false) return false; if(info.allowMultiple==false) return false;
@ -1050,10 +1050,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
sibian:{ sibian:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
content:function(){ content:function(){
'step 0' 'step 0'
trigger.cancel(); trigger.cancel(null,null,'notrigger');
event.cards=get.cards(4); event.cards=get.cards(4);
game.cardsGotoOrdering(event.cards); game.cardsGotoOrdering(event.cards);
player.showCards(event.cards); player.showCards(event.cards);
@ -2644,28 +2644,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
gzjili:{ gzjili:{
subSkill:{
count:{
trigger:{player:['useCard','respond']},
silent:true,
priority:1,
content:function(){
player.storage.gzjili++;
}
},
init:{
trigger:{global:'phaseBefore'},
silent:true,
content:function(){
player.storage.gzjili=0;
}
}
},
group:['gzjili_count','gzjili_init'],
trigger:{player:['useCard','respond']}, trigger:{player:['useCard','respond']},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
return player.storage.gzjili==player.getAttackRange(); return player.getHistory('useCard').length+player.getHistory('respond').length==player.getAttackRange();
}, },
audio:2, audio:2,
content:function(){ content:function(){
@ -3572,46 +3554,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
sptunjiang:{ sptunjiang:{
audio:2, audio:2,
trigger:{player:'phaseUseBegin'},
silent:true,
locked:false,
subfrequent:['end'],
content:function(){
player.addTempSkill('sptunjiang_count');
player.addTempSkill('sptunjiang_end');
},
subSkill:{
count:{
trigger:{player:'useCardAfter'},
silent:true,
filter:function(event,player){
if(event.targets){
for(var i=0;i<event.targets.length;i++){
if(event.targets[i]!=player){
return true;
}
}
}
return false;
},
content:function(){
player.addTempSkill('sptunjiang_used');
}
},
used:{},
end:{
audio:'sptunjiang',
trigger:{player:'phaseJieshuBegin'}, trigger:{player:'phaseJieshuBegin'},
frequent:true, frequent:true,
prompt2:'结束阶段若你未跳过本回合的出牌阶段且你于本回合出牌阶段内未使用牌指定过其他角色为目标则你可以摸X张牌X为全场势力数。',
filter:function(event,player){ filter:function(event,player){
return !player.hasSkill('sptunjiang_used'); if(player.getHistory('skipped').contains('phaseUse')) return false;
return player.getHistory('useCard',function(evt){
if(evt.targets&&evt.targets.length&&evt.isPhaseUsing()){
var targets=evt.targets.slice(0);
while(targets.contains(player)) targets.remove(player);
return targets.length>0;
}
return false;
}).length==0;
}, },
content:function(){ content:function(){
player.draw(game.countGroup()); player.draw(game.countGroup());
} },
}
}
}, },
bingzhao:{ bingzhao:{
audio:2, audio:2,
@ -6286,10 +6244,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
xinyongsi1:{ xinyongsi1:{
audio:'yongsi1', audio:'yongsi1',
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin1'},
forced:true, forced:true,
content:function(){ content:function(){
trigger.num+=game.countGroup()-2; player.draw(game.countGroup());
trigger.cancel(null,null,'notrigger');
} }
}, },
xinyongsi2:{ xinyongsi2:{
@ -6731,7 +6690,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
zhaolie:{ zhaolie:{
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin1'},
direct:true, direct:true,
content:function(){ content:function(){
'step 0' 'step 0'
@ -8448,7 +8407,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
yawang:{ yawang:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
forced:true, forced:true,
check:function(event,player){ check:function(event,player){
var num=game.countPlayer(function(target){ var num=game.countPlayer(function(target){
@ -8462,7 +8421,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return num>=3; return num>=3;
}, },
content:function(){ content:function(){
trigger.cancel(); trigger.cancel(null,null,'notrigger');
var num=game.countPlayer(function(target){ var num=game.countPlayer(function(target){
return target.hp==player.hp; return target.hp==player.hp;
}); });
@ -9371,7 +9330,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
tunchu:{ tunchu:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
check:function(event,player){ check:function(event,player){
return player.countCards('h')-player.countCards('h',{type:'equip'})<=player.hp; return player.countCards('h')-player.countCards('h',{type:'equip'})<=player.hp;
}, },
@ -9740,43 +9699,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
frequent:true, frequent:true,
//usable:3, //usable:3,
filter:function(event,player){ filter:function(event,player){
if(!event.cards||event.cards.length!=1) return false; var evt=player.getLastUsed(1);
if(_status.currentPhase!=player) return false; if(!evt) return false;
if(!player.storage.fenyin) return false; var color1=get.color(evt.card);
return get.color(player.storage.fenyin)!=get.color(event.cards[0]); var color2=get.color(event.card);
return color1&&color2&&color1!='none'&&color2!='none'&&color1!=color2;
}, },
content:function(){ content:function(){
player.draw(); player.draw();
}, },
intro:{
content:'card'
},
group:['fenyin2','fenyin3']
},
fenyin3:{
trigger:{player:'useCard'},
priority:-1,
silent:true,
filter:function(event,player){
if(!event.cards||event.cards.length!=1) return false;
if(_status.currentPhase!=player) return false;
return true;
},
content:function(){
player.storage.fenyin=trigger.cards[0];
}
},
fenyin2:{
trigger:{player:'phaseBefore'},
silent:true,
priority:10,
content:function(){
player.storage.fenyin=null;
}
}, },
dujin:{ dujin:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
frequent:true, frequent:true,
content:function(){ content:function(){
trigger.num+=1+Math.floor(player.countCards('e')/2); trigger.num+=1+Math.floor(player.countCards('e')/2);
@ -9905,21 +9840,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
mozhi:{ mozhi:{
audio:2, audio:2,
intro:{
content:'cards'
},
init:function(player){
player.storage.mozhi=[];
},
trigger:{player:'phaseJieshuBegin'}, trigger:{player:'phaseJieshuBegin'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return player.storage.mozhi.length>0&&player.countCards('h')>0; return player.getHistory('useCard',function(evt){
return evt.isPhaseUsing()&&['basic','trick'].contains(get.type(evt.card));
}).length>0&&player.countCards('h')>0;
}, },
content:function(){ content:function(){
if(player.storage.mozhi.length&&player.countCards('h')){ "step 0"
var card=player.storage.mozhi.shift(); event.history=player.getHistory('useCard',function(evt){
card={name:card.name,nature:card.nature,suit:card.suit,number:card.number}; return evt.isPhaseUsing()&&['basic','trick'].contains(get.type(evt.card));
})
"step 1"
if(event.history.length&&player.countCards('h')){
var card=event.history.shift().card;
card={name:card.name,nature:card.nature};
if(lib.filter.cardEnabled(card)){ if(lib.filter.cardEnabled(card)){
if(game.hasPlayer(function(current){ if(game.hasPlayer(function(current){
return player.canUse(card,current); return player.canUse(card,current);
@ -9938,10 +9874,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
next.backup('mozhix'); next.backup('mozhix');
} }
} }
event.redo();
} }
"step 2"
if(result.bool) event.goto(1);
}, },
group:['mozhi2','mozhi3']
}, },
mozhix:{ mozhix:{
filterCard:function(card){ filterCard:function(card){
@ -9950,28 +9886,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
selectCard:1, selectCard:1,
popname:true, popname:true,
}, },
mozhi2:{
trigger:{player:'phaseAfter'},
silent:true,
content:function(){
player.storage.mozhi.length=0;
player.unmarkSkill('mozhi');
}
},
mozhi3:{
trigger:{player:'useCard'},
silent:true,
filter:function(event,player){
if(_status.currentPhase!=player) return false;
if(event.parent.parent.name!='phaseUse') return false;
var type=get.type(event.card);
return player.storage.mozhi.length<2&&(type=='basic'||type=='trick');
},
content:function(){
player.storage.mozhi.add(trigger.card);
if(player.hasSkill('mozhi')) player.markSkill('mozhi');
}
},
chenqing2:{}, chenqing2:{},
ranshang:{ ranshang:{
audio:2, audio:2,
@ -10208,7 +10122,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fengpo3:{}, fengpo3:{},
biluan:{ biluan:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
mark:true, mark:true,
unique:true, unique:true,
intro:{ intro:{
@ -10267,7 +10181,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.storage.biluan+=ng.length; player.storage.biluan+=ng.length;
player.markSkill('biluan'); player.markSkill('biluan');
game.addVideo('storage',player,['biluan',player.storage.biluan]); game.addVideo('storage',player,['biluan',player.storage.biluan]);
trigger.cancel(); trigger.cancel(null,null,'notrigger');
}, },
mod:{ mod:{
globalTo:function(from,to,distance){ globalTo:function(from,to,distance){
@ -10345,7 +10259,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
canshi:{ canshi:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
check:function(event,player){ check:function(event,player){
var num=game.countPlayer(function(current){ var num=game.countPlayer(function(current){
if(player.hasZhuSkill('guiming')&&current.group=='wu') return true; if(player.hasZhuSkill('guiming')&&current.group=='wu') return true;
@ -10361,7 +10275,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '残蚀:是否改为摸'+get.cnNumber(num)+'张牌?'; return '残蚀:是否改为摸'+get.cnNumber(num)+'张牌?';
}, },
content:function(){ content:function(){
trigger.cancel(); trigger.cancel(null,null,'notrigger');
var num=game.countPlayer(function(current){ var num=game.countPlayer(function(current){
if(player.hasZhuSkill('guiming')&&current.group=='wu'&&current!=player) return true; if(player.hasZhuSkill('guiming')&&current.group=='wu'&&current!=player) return true;
return current.isDamaged(); return current.isDamaged();
@ -11826,7 +11740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
hengzheng:{ hengzheng:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
filter:function(event,player){ filter:function(event,player){
return player.hp==1||player.countCards('h')==0; return player.hp==1||player.countCards('h')==0;
}, },
@ -11848,7 +11762,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
targets.sort(lib.sort.seat); targets.sort(lib.sort.seat);
event.targets=targets; event.targets=targets;
event.num=0; event.num=0;
trigger.cancel(); trigger.cancel(null,null,'notrigger');
player.line(targets,'green'); player.line(targets,'green');
"step 1" "step 1"
if(num<event.targets.length){ if(num<event.targets.length){
@ -12694,7 +12608,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
hongyuan:{ hongyuan:{
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
direct:true, direct:true,
audio:2, audio:2,
content:function(){ content:function(){
@ -12965,7 +12879,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
yongsi1:{ yongsi1:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
forced:true, forced:true,
content:function(){ content:function(){
trigger.num+=game.countGroup(); trigger.num+=game.countGroup();

View File

@ -298,7 +298,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
tuxi:{ tuxi:{
audio:2, audio:2,
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin1'},
direct:true, direct:true,
content:function(){ content:function(){
"step 0" "step 0"
@ -319,7 +319,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){ if(result.bool){
player.logSkill('tuxi',result.targets); player.logSkill('tuxi',result.targets);
player.gainMultiple(result.targets); player.gainMultiple(result.targets);
trigger.cancel(); trigger.cancel(null,null,'notrigger');
} }
else{ else{
event.finish(); event.finish();
@ -334,7 +334,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
luoyi:{ luoyi:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
check:function(event,player){ check:function(event,player){
if(player.countCards('h')<3) return false; if(player.countCards('h')<3) return false;
if(!player.hasSha()) return false; if(!player.hasSha()) return false;
@ -1738,7 +1738,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.needsToDiscard(); return player.needsToDiscard();
}, },
filter:function(event,player){ filter:function(event,player){
return player.countUsed('sha')==0; if(player.getHistory('skipped').contains('phaseUse')) return true;
var history=player.getHistory('useCard');
for(var i=0;i<history.length;i++){
if(history[i].card.name=='sha'&&history[i].isPhaseUsing()) return false;
}
return true;
}, },
content:function(){ content:function(){
trigger.cancel(); trigger.cancel();
@ -1770,7 +1775,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
yingzi:{ yingzi:{
audio:2, audio:2,
audioname:['sp_lvmeng'], audioname:['sp_lvmeng'],
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
frequent:true, frequent:true,
content:function(){ content:function(){
trigger.num++; trigger.num++;

View File

@ -294,116 +294,47 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"xinfu_sidao":{ "xinfu_sidao":{
group:["xinfu_sidao_count","xinfu_sidao_init"], audio:2,
subSkill:{
init:{
sub:true,
forced:true,
silent:true,
popup:false,
trigger:{ trigger:{
player:"phaseBefore", player:'useCardAfter',
},
content:function (){
for(var i=0;i<game.players.length;i++){
if(game.players[i].storage.sidao){
delete game.players[i].storage.sidao;
}
}
},
},
count:{
sub:true,
forced:true,
silent:true,
popup:false,
trigger:{
player:"useCard",
}, },
filter:function(event,player){ filter:function(event,player){
return (event.targets&&event.targets.length); if(player.hasSkill('xinfu_sidaoy')||!player.countCards('h')) return false;
if(!event.targets||!event.targets.length||!event.isPhaseUsing(player)) return false;
var evt=player.getLastUsed(1);
if(!evt||!evt.targets||!evt.targets.length||!evt.isPhaseUsing(player)) return false;
for(var i=0;i<event.targets.length;i++){
if(evt.targets.contains(event.targets[i])&&lib.filter.filterTarget({name:'shunshou'},player,event.targets[i])) return true;
}
return false;
}, },
direct:true,
content:function(){ content:function(){
for(var i=0;i<game.players.length;i++){ var targets=player.getLastUsed(1).targets;
if(game.players[i]==player) continue; var next=player.chooseToUse();
if(game.players[i].storage.sidao){ next.set('targets',game.filterPlayer(function(current){
if(trigger.targets.contains(game.players[i])) game.players[i].storage.sidao++; return targets.contains(current)&&trigger.targets.contains(current);
else delete game.players[i].storage.sidao; }));
}else{ next.set('openskilldialog',get.prompt2('xinfu_sidao'));
if(trigger.targets.contains(game.players[i])) game.players[i].storage.sidao=1; next.set('norestore',true);
} next.set('_backupevent','xinfu_sidaox');
} next.backup('xinfu_sidaox');
}, },
}, },
}, xinfu_sidaox:{
audio:2, audio:'xinfu_sidao',
enable:"chooseToUse",
usable:1,
filterCard:true,
position:"h", position:"h",
viewAs:{ viewAs:{
name:"shunshou", name:"shunshou",
}, },
viewAsFilter:function (player){
if(!player.countCards('h')||!game.hasPlayer(function(target){
return target.storage.sidao&&target.storage.sidao>1;
})) return false;
},
filterTarget:function (card,player,target){ filterTarget:function (card,player,target){
return target.storage.sidao&&target.storage.sidao>1; return lib.filter.filterTarget.apply(this,arguments);
}, },
prompt:"将一张手牌当顺手牵羊使用", prompt:"将一张手牌当顺手牵羊使用",
check:function (card){return 4-get.value(card)}, check:function (card){return 7-get.value(card)},
ai:{ onuse:function(links,player){player.addTempSkill('xinfu_sidaoy')},
wuxie:function (target,card,player,viewer){
if(get.attitude(viewer,player)>0&&get.attitude(viewer,target)>0){
return 0;
}
},
basic:{
order:7.5,
useful:4,
value:9,
},
result:{
target:function (player,target){
if(get.attitude(player,target)<=0) return (target.countCards('he')>0)?-1.5:1.5;
var js=target.getCards('j');
if(js.length){
var jj=js[0].viewAs?{name:js[0].viewAs}:js[0];
if(jj.name=='shunshou') return 3;
if(js.length==1&&get.effect(target,jj,target,player)>=0){
return -1.5;
}
return 3;
}
return -1.5;
},
player:function (player,target){
if(get.attitude(player,target)<0&&!target.countCards('he')){
return 0;
}
if(get.attitude(player,target)>1){
var js=target.getCards('j');
if(js.length){
var jj=js[0].viewAs?{name:js[0].viewAs}:js[0];
if(jj.name=='shunshou') return 1;
if(js.length==1&&get.effect(target,jj,target,player)>=0){
return 0;
}
return 1;
}
return 0;
}
return 1;
},
},
tag:{
loseCard:1,
gain:1,
},
},
}, },
xinfu_sidaoy:{},
"tanbei_effect1":{ "tanbei_effect1":{
}, },
"tanbei_effect2":{ "tanbei_effect2":{
@ -816,7 +747,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
audio:2, audio:2,
trigger:{ trigger:{
player:"phaseDrawBefore", player:"phaseDrawBegin1",
}, },
//priority:10, //priority:10,
content:function (){ content:function (){
@ -979,70 +910,42 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
"xinfu_lianpian":{ "xinfu_lianpian":{
audio:2, audio:2,
subSkill:{ usable:3,
refrain:{
forced:true,
silent:true,
popup:false,
trigger:{ trigger:{
global:["phaseBefore","phaseAfter"], player:"useCardToPlayered",
}, },
content:function (){ frequent:true,
player.storage.xinfu_lianpian=[];
player.storage.xinfu_lianpian_number=0;
},
},
},
group:["xinfu_lianpian_refrain"],
trigger:{
player:"useCard",
},
forced:true,
popup:false,
filter:function (event,player){ filter:function (event,player){
return _status.currentPhase==player&&player.storage.xinfu_lianpian_number<3; if(!event.targets||!event.targets.length||
event.getParent().triggeredTargets3.length>1||!event.isPhaseUsing()) return false;
var evt=player.getLastUsed(1);
if(!evt||!evt.targets||!evt.targets.length||!evt.isPhaseUsing()) return false;
for(var i=0;i<event.targets.length;i++){
if(evt.targets.contains(event.targets[i])) return true;
}
return false;
}, },
content:function (){ content:function (){
'step 0' 'step 0'
if(!player.storage.xinfu_lianpian){
event.goto(4);
}
else{
event.ablers=[];
for(var i=0;i<trigger.targets.length;i++){
if(player.storage.xinfu_lianpian.contains(trigger.targets[i])){
event.ablers.add(trigger.targets[i]);
}
}
if(!event.ablers.length) event.goto(4);
else{
player.chooseBool(get.prompt2('xinfu_lianpian')).set('ai',function(){
return true;
}).set('prompt2',get.translation('xinfu_lianpian_info'));
}
}
'step 1'
if(result.bool){
player.logSkill('xinfu_lianpian');
player.storage.xinfu_lianpian_number++;
player.draw(); player.draw();
} 'step 1'
else event.goto(4);
'step 2'
event.card=result[0]; event.card=result[0];
if(event.card&&get.owner(event.card)==player&&(event.ablers.length>1||event.ablers[0]!=player)){ var ablers=player.getLastUsed(1).targets.slice(0);
for(var i=0;i<ablers.length;i++){
if(ablers[i]==player||!trigger.targets.contains(ablers[i])) ablers.splice(i--,1);
}
if(event.card&&get.owner(event.card)==player&&ablers.length){
player.chooseTarget('是否将'+get.translation(event.card)+'交给其他角色?',function(card,player,target){ player.chooseTarget('是否将'+get.translation(event.card)+'交给其他角色?',function(card,player,target){
return _status.event.ablers.contains(target)&&target!=player; return _status.event.ablers.contains(target)&&target!=player;
}).set('ablers',event.ablers).ai=function(){ }).set('ablers',ablers).ai=function(){
return false; return false;
}; };
} }
'step 3' else event.finish();
'step 2'
if(result.bool){ if(result.bool){
player.give(event.card,result.targets[0],true); player.give(event.card,result.targets[0],true);
} }
'step 4'
player.storage.xinfu_lianpian=trigger.targets;
}, },
}, },
"xinfu_lingren":{ "xinfu_lingren":{
@ -1220,7 +1123,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"xinfu_xionghuo":{ "xinfu_xionghuo":{
group:["xinfu_xionghuo_damage","xinfu_xionghuo_begin"], group:["xinfu_xionghuo_damage","xinfu_xionghuo_begin","xinfu_xionghuo_init"],
subSkill:{ subSkill:{
begin:{ begin:{
silent:true, silent:true,
@ -1282,14 +1185,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.num++; trigger.num++;
}, },
}, },
init:{
trigger:{
global:"gameDrawAfter",
player:"enterGame",
},
forced:true,
locked:false,
content:function(){
player.storage.xinfu_xionghuo+=3;
player.markSkill("xinfu_xionghuo");
},
},
}, },
audio:2, audio:2,
enable:"phaseUse", enable:"phaseUse",
usable:null, usable:null,
init:function (player){ init:function (player){
if(player.storage.xinfu_xionghuo==undefined) player.storage.xinfu_xionghuo=3; if(player.storage.xinfu_xionghuo==undefined) player.storage.xinfu_xionghuo=0;
}, },
mark:true, //mark:true,
marktext:"戾", marktext:"戾",
intro:{ intro:{
content:"mark", content:"mark",
@ -1368,6 +1283,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(trigger.parent.name=='damage'&&get.itemtype(trigger.parent.cards)=='cards'&&get.position(trigger.parent.cards[0],true)=='o'){ if(trigger.parent.name=='damage'&&get.itemtype(trigger.parent.cards)=='cards'&&get.position(trigger.parent.cards[0],true)=='o'){
player.gain(trigger.parent.cards,"gain2"); player.gain(trigger.parent.cards,"gain2");
} }
if(!player.storage.xinfu_xionghuo) player.storage.xinfu_xionghuo=0;
player.storage.xinfu_xionghuo++; player.storage.xinfu_xionghuo++;
player.markSkill('xinfu_xionghuo'); player.markSkill('xinfu_xionghuo');
player.syncStorage('xinfu_xionghuo'); player.syncStorage('xinfu_xionghuo');
@ -1996,12 +1912,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_falu":{ "xinfu_falu":{
init:function (player,skill){ init:function (player,skill){
if(player.storage[skill]==undefined) player.storage[skill]=4; if(player.storage[skill]==undefined) player.storage[skill]=0;
if(player.storage[skill+'_map']==undefined) player.storage[skill+'_map']={ if(player.storage[skill+'_map']==undefined) player.storage[skill+'_map']={
spade:true,heart:true,diamond:true,club:true, spade:false,heart:false,diamond:false,club:false,
}; };
}, },
mark:true, //mark:true,
intro:{ intro:{
content:function (content,player){ content:function (content,player){
var storage=player.storage.xinfu_falu_map; var storage=player.storage.xinfu_falu_map;
@ -2021,15 +1937,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
audio:2, audio:2,
trigger:{ trigger:{
player:"discardAfter", player:["discardAfter","enterGame"],
global:"gameDrawAfter",
}, },
filter:function (event,player){ filter:function (event,player){
if(event.name!='discard') return true;
for(var i=0;i<event.cards.length;i++){ for(var i=0;i<event.cards.length;i++){
if(!player.storage.xinfu_falu_map[get.suit(event.cards[i])]) return true; if(!player.storage.xinfu_falu_map[get.suit(event.cards[i])]) return true;
} }
return false; return false;
}, },
content:function (){ content:function (){
if(trigger.name!='discard'){
player.storage[event.name]=4;
player.storage[event.name+'_map']={
spade:true,heart:true,diamond:true,club:true,
};
player.markSkill('xinfu_falu');
return;
}
for(var i=0;i<trigger.cards.length;i++){ for(var i=0;i<trigger.cards.length;i++){
player.storage.xinfu_falu_map[get.suit(trigger.cards[i])]=true; player.storage.xinfu_falu_map[get.suit(trigger.cards[i])]=true;
} }
@ -2048,7 +1974,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
frequent:true, frequent:true,
audio:2, audio:2,
filter:function (event,player){ filter:function (event,player){
return player.storage.xinfu_falu>0; return player.storage.xinfu_falu&&player.storage.xinfu_falu>0;
}, },
content:function (){ content:function (){
'step 0' 'step 0'
@ -2084,7 +2010,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.storage.xinfu_falu_map[i]==true) num++; if(player.storage.xinfu_falu_map[i]==true) num++;
} }
player.storage.xinfu_falu=num; player.storage.xinfu_falu=num;
player.markSkill('xinfu_falu'); player[num?'markSkill':'unmarkSkill']('xinfu_falu');
event.num=0; event.num=0;
event.togain=[]; event.togain=[];
'step 1' 'step 1'
@ -2169,7 +2095,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.storage.xinfu_falu_map[i]==true) num++; if(player.storage.xinfu_falu_map[i]==true) num++;
} }
player.storage.xinfu_falu=num; player.storage.xinfu_falu=num;
player.markSkill('xinfu_falu'); player[num?'markSkill':'unmarkSkill']('xinfu_falu');
player.logSkill('xinfu_zhenyi',trigger.player); player.logSkill('xinfu_zhenyi',trigger.player);
player.line(trigger.player); player.line(trigger.player);
player.popup(result.control); player.popup(result.control);
@ -2212,7 +2138,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.storage.xinfu_falu_map[i]==true) num++; if(player.storage.xinfu_falu_map[i]==true) num++;
} }
player.storage.xinfu_falu=num; player.storage.xinfu_falu=num;
player.markSkill('xinfu_falu'); player[num?'markSkill':'unmarkSkill']('xinfu_falu');
}, },
ai:{ ai:{
skillTagFilter:function (player){ skillTagFilter:function (player){
@ -2245,7 +2171,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.storage.xinfu_falu_map[i]==true) num++; if(player.storage.xinfu_falu_map[i]==true) num++;
} }
player.storage.xinfu_falu=num; player.storage.xinfu_falu=num;
player.markSkill('xinfu_falu'); player[num?'markSkill':'unmarkSkill']('xinfu_falu');
player.judge(function(card){ player.judge(function(card){
if(get.color(card)=='black') return 4; if(get.color(card)=='black') return 4;
return -1; return -1;
@ -3223,17 +3149,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{ trigger:{
global:"phaseUseEnd", global:"phaseUseEnd",
}, },
init:function (player){
player.storage.guanwei={num:0,suit:[]};
},
filter:function (event,player){ filter:function (event,player){
if(player.storage.guanwei&&player.storage.guanwei.suit.length==1&&player.storage.guanwei.num>1) return true; var history=event.player.getHistory('useCard',function(evt){
return false; return evt.getParent('phaseUse')==event;
});
var num=0;
var suit=false;
for(var i=0;i<history.length;i++){
var suit2=get.suit(history[i].card);
if(!suit2) continue;
if(suit&&suit!=suit2) return false;
suit=suit2;
num++;
}
return num>1;
}, },
direct:true, direct:true,
content:function (){ content:function (){
'step 0' 'step 0'
player.chooseToDiscard('he',get.prompt2('xinfu_guanwei')).set('ai',function(card){ player.chooseToDiscard('he',get.prompt('xinfu_guanwei',trigger.player),'弃置一张牌,令其摸两张牌并进行一个额外的出牌阶段。').set('ai',function(card){
if(get.attitude(_status.event.player,_status.currentPhase)<1) return 0; if(get.attitude(_status.event.player,_status.currentPhase)<1) return 0;
return 9-get.value(card); return 9-get.value(card);
}).set('logSkill','xinfu_guanwei'); }).set('logSkill','xinfu_guanwei');
@ -3259,39 +3193,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 3' 'step 3'
trigger.player.phaseUse(); trigger.player.phaseUse();
}, },
group:["xinfu_guanwei_count","xinfu_guanwei_clear"],
subSkill:{
count:{
trigger:{
global:"useCard",
},
filter:function (event,player){
return event.player.isPhaseUsing();
},
silent:true,
content:function (){
if(!player.storage.guanwei.suit.contains(get.suit(trigger.card))){
player.storage.guanwei.suit.push(get.suit(trigger.card));
}
player.storage.guanwei.num++;
},
sub:true,
forced:true,
popup:false,
},
clear:{
trigger:{
global:"phaseAfter",
},
silent:true,
content:function (){
player.storage.guanwei={num:0,suit:[]};
},
sub:true,
forced:true,
popup:false,
},
},
}, },
"xinfu_gongqing":{ "xinfu_gongqing":{
audio:true, audio:true,
@ -3543,33 +3444,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{ intro:{
content:"单调递增", content:"单调递增",
}, },
init:function (player){
player.storage.guanchao=0;
},
onremove:function (player){
delete player.storage.guanchao;
},
trigger:{ trigger:{
player:"useCard", player:"useCard",
}, },
silent:true, audio:"xinfu_guanchao",
forced:true, forced:true,
popup:false,
filter:function (event,player){ filter:function (event,player){
return get.number(event.card)&&player.storage.guanchao!=14; var history=player.getHistory('useCard',function(evt){
return evt.isPhaseUsing();
});
if(history.length<2) return false;
var num=get.number(history[0].card);
if(!num) return false;
for(var i=1;i<history.length;i++){
var num2=get.number(history[i].card);
if(!num2||num2<=num) return false;
num=num2;
}
return true;
}, },
content:function (){ content:function (){
var num1=get.number(trigger.card);
var num2=player.storage.guanchao;
if(num2!=0&&num1>num2){
player.logSkill('xinfu_guanchao');
player.draw(); player.draw();
player.storage.guanchao=num1;
}
else if(num2==0){
player.storage.guanchao=num1;
}
else player.storage.guanchao=14;
}, },
sub:true, sub:true,
}, },
@ -3588,24 +3483,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{ trigger:{
player:"useCard", player:"useCard",
}, },
silent:true, audio:"xinfu_guanchao",
forced:true, forced:true,
popup:false,
filter:function (event,player){ filter:function (event,player){
return get.number(event.card)&&player.storage.guanchao!=14; var history=player.getHistory('useCard',function(evt){
return evt.isPhaseUsing();
});
if(history.length<2) return false;
var num=get.number(history[0].card);
if(!num) return false;
for(var i=1;i<history.length;i++){
var num2=get.number(history[i].card);
if(!num2||num2>=num) return false;
num=num2;
}
return true;
}, },
content:function (){ content:function (){
var num1=get.number(trigger.card);
var num2=player.storage.guanchao;
if(num2!=0&&num1<num2){
player.logSkill('xinfu_guanchao');
player.draw(); player.draw();
player.storage.guanchao=num1;
}
else if(num2==0){
player.storage.guanchao=num1;
}
else player.storage.guanchao=14;
}, },
sub:true, sub:true,
}, },
@ -4758,6 +4653,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
forced:true, forced:true,
unique:true, unique:true,
juexingji:true,
trigger:{ trigger:{
player:["useCardAfter","respondAfter"], player:["useCardAfter","respondAfter"],
}, },
@ -5313,93 +5209,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
"rw_baiyin_skill":{ "rw_baiyin_skill":{
equipSkill:true,
inherit:"baiyin_skill", inherit:"baiyin_skill",
trigger:{ audio:"baiyin_skill",
player:"damageBegin4",
},
forced:true,
audio:true,
filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.num<=1) return false;
if(event.source&&event.source.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null,
target:player,
card:event.card
})) return false;
return true;
},
//priority:-10,
content:function (){
trigger.num=1;
},
}, },
"rw_lanyinjia":{ "rw_lanyinjia":{
equipSkill:true,
inherit:"lanyinjia", inherit:"lanyinjia",
enable:["chooseToRespond","chooseToUse"], audio:"lanyinjia",
filterCard:true,
viewAs:{
name:"shan",
},
viewAsFilter:function (player){
if(!player.countCards('h')) return false;
},
prompt:"将一张手牌当闪使用或打出",
check:function (card){
return 6-get.value(card);
},
ai:{
respondShan:true,
skillTagFilter:function (player){
if(!player.countCards('h')) return false;
},
effect:{
target:function (card,player,target,current){
if(get.tag(card,'respondShan')&&current<0&&target.countCards('h')) return 0.59
},
},
order:4,
useful:-0.5,
value:-0.5,
basic:{
useful:[7,2],
value:[7,2],
},
},
}, },
"rw_minguangkai_cancel":{ "rw_minguangkai_cancel":{
equipSkill:true,
inherit:"minguangkai_cancel", inherit:"minguangkai_cancel",
trigger:{
target:"useCardToBefore",
},
forced:true,
priority:15,
check:function (event,player){
return get.effect(event.target,event.card,event.player,player)<0;
},
filter:function (event,player){
if(['huoshaolianying','huogong'].contains(event.card.name)) return true;
if(event.card.name=='sha') return event.card.nature=='fire';
return false;
},
content:function (){
trigger.cancel();
},
ai:{
effect:{
target:function (card,player,target,current){
if(['huoshaolianying','huogong'].contains(card.name)||(card.name=='sha'&&card.nature=='fire')){
return 'zeroplayertarget';
}
},
},
},
}, },
"rw_minguangkai_link":{ "rw_minguangkai_link":{
equipSkill:true,
inherit:"minguangkai_link", inherit:"minguangkai_link",
trigger:{ trigger:{
player:"linkBefore", player:"linkBefore",
@ -5415,22 +5235,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
effect:{ effect:{
target:function (card,player,target,current){ target:function (card,player,target,current){
if(target.isMinor()&&['tiesuo','lulitongxin'].contains(card.name)){ if(['tiesuo','lulitongxin'].contains(card.name)){
return 'zeroplayertarget'; return 'zerotarget';
} }
}, },
}, },
}, },
}, },
"rw_renwang_skill":{ "rw_renwang_skill":{
equipSkill:true,
inherit:"renwang_skill", inherit:"renwang_skill",
trigger:{ audio:"renwang_skill",
target:"shaBegin",
},
forced:true,
priority:6,
audio:true,
filter:function (event,player){ filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false; if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{ if(event.player.hasSkillTag('unequip',false,{
@ -5440,104 +5254,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
})) return false; })) return false;
return (event.card.name=='sha'&&['spade','club','heart'].contains(get.suit(event.card))) return (event.card.name=='sha'&&['spade','club','heart'].contains(get.suit(event.card)))
}, },
content:function (){
trigger.cancel();
},
ai:{ ai:{
effect:{ effect:{
target:function (card,player){ target:function (card,player,target){
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return; if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{ if(player.hasSkillTag('unequip',false,{
name:card?card.name:null, name:card?card.name:null,
target:player, target:player,
card:card card:card
})) return; })) return;
if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; if(card.name=='sha'&&['spade','club','heart'].contains(get.suit(card))) return 'zerotarget';
}, },
}, },
}, },
}, },
"rw_tengjia1":{ "rw_tengjia1":{
equipSkill:true,
inherit:"tengjia1", inherit:"tengjia1",
trigger:{ audio:"tengjia1",
target:"useCardToBefore",
},
forced:true,
priority:6,
audio:true,
filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null,
target:player,
card:event.card
})) return false;
if(event.card.name=='nanman') return true;
if(event.card.name=='wanjian') return true;
},
content:function (){
trigger.cancel();
},
ai:{
effect:{
target:function (card,player,target,current){
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{
name:card?card.name:null,
target:player,
card:card
})) return;
if(card.name=='nanman'||card.name=='wanjian') return 'zerotarget';
if(card.name=='sha'){
var equip1=player.getEquip(1);
if(equip1&&equip1.name=='zhuque') return 2;
if(equip1&&equip1.name=='qinggang') return 1;
if(!card.nature) return 'zerotarget';
}
},
},
},
}, },
"rw_tengjia2":{ "rw_tengjia2":{
equipSkill:true,
inherit:"tengjia2", inherit:"tengjia2",
trigger:{ audio:"tengjia1",
player:"damageBegin3",
},
filter:function (event){
if(event.nature=='fire') return true;
},
audio:true,
forced:true,
content:function (){
trigger.num++;
},
ai:{
effect:{
target:function (card,player,target,current){
if(card.name=='sha'){
if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2;
}
if(get.tag(card,'fireDamage')&&current<0) return 2;
},
},
},
}, },
"rw_tengjia3":{ "rw_tengjia3":{
equipSkill:true, audio:"tengjia1",
inherit:"rw_minguangkai_link", inherit:"rw_minguangkai_link",
trigger:{
player:"linkBefore",
},
forced:true,
priority:20,
filter:function (event,player){
return !player.isLinked();
},
content:function (){
trigger.cancel();
},
ai:{ ai:{
effect:{ effect:{
target:function (card,player,target,current){ target:function (card,player,target,current){
@ -5550,6 +5291,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
"rw_tengjia4":{ "rw_tengjia4":{
inherit:"tengjia3", inherit:"tengjia3",
audio:"tengjia1",
}, },
}, },
translate:{ translate:{
@ -5567,6 +5309,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_tanbei":"贪狈", "xinfu_tanbei":"贪狈",
"xinfu_tanbei_info":"出牌阶段限一次,你可以令一名其他角色选择一项:<br>1.令你随机获得其区域内的一张牌,本回合内你不能对其使用牌。<br>2.令你此回合内对其使用牌没有次数与距离限制。", "xinfu_tanbei_info":"出牌阶段限一次,你可以令一名其他角色选择一项:<br>1.令你随机获得其区域内的一张牌,本回合内你不能对其使用牌。<br>2.令你此回合内对其使用牌没有次数与距离限制。",
"xinfu_sidao":"伺盗", "xinfu_sidao":"伺盗",
xinfu_sidaox:'伺盗',
"xinfu_sidao_info":"出牌阶段限一次,当你对一名其他角色连续使用两张牌后,你可以将一张手牌当做【顺手牵羊】对其使用。", "xinfu_sidao_info":"出牌阶段限一次,当你对一名其他角色连续使用两张牌后,你可以将一张手牌当做【顺手牵羊】对其使用。",
"tanbei_effect1":"贪狈", "tanbei_effect1":"贪狈",
"tanbei_effect1_info":"", "tanbei_effect1_info":"",

View File

@ -195,25 +195,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xindanshou:{ xindanshou:{
audio:'danshou', audio:'danshou',
trigger:{ trigger:{
global:['phaseJieshuBegin','phaseBefore'], global:'phaseJieshuBegin',
target:'useCardToTargeted', target:'useCardToTargeted',
}, },
forced:true, direct:true,
popup:false,
filter:function(event,player,name){ filter:function(event,player,name){
return name=='phaseBefore'|| return ((name=='phaseJieshuBegin'&&event.player!=player&&player.countCards('he')>=event.player.countCards('h'))||
((name=='phaseJieshuBegin'&&event.player!=player&&player.countCards('he')>=event.player.countCards('h'))|| (event.targets&&event.targets.contains(player)&&['basic','trick'].contains(get.type(event.card,'trick'))))
(event.targets&&event.targets.contains(player)))
&&!player.hasSkill('xindanshou_as'); &&!player.hasSkill('xindanshou_as');
}, },
content:function(){ content:function(){
'step 0' 'step 0'
if(event.triggername=='phaseBefore'){ if(event.triggername=='phaseJieshuBegin'){
player.storage.xindanshou=0;
event.finish();
return;
}
else if(event.triggername=='phaseJieshuBegin'){
var num=trigger.player.countCards('h'); var num=trigger.player.countCards('h');
if(num>0) player.chooseToDiscard(get.prompt('xindanshou',trigger.player),num,'弃置'+get.cnNumber(num)+'张牌并对'+get.translation(trigger.player)+'造成1点伤害','he').set('logSkill',['xindanshou',trigger.player]).set('ai',function(card){ if(num>0) player.chooseToDiscard(get.prompt('xindanshou',trigger.player),num,'弃置'+get.cnNumber(num)+'张牌并对'+get.translation(trigger.player)+'造成1点伤害','he').set('logSkill',['xindanshou',trigger.player]).set('ai',function(card){
if(get.damageEffect(_status.event.getTrigger().player,_status.event.player,_status.event.player)>0) return 6-get.value(card); if(get.damageEffect(_status.event.getTrigger().player,_status.event.player,_status.event.player)>0) return 6-get.value(card);
@ -224,13 +217,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}; };
} }
else{ else{
if(!['basic','trick'].contains(get.type(trigger.card,'trick'))){ var num=0;
event.finish(); for(var i=0;i<game.players.length;i++){
return; var history=game.players[i].getHistory('useCard');
}; for(var j=0;j<history.length;j++){
if(!player.storage.xindanshou) player.storage.xindanshou=0; if(history[j].targets&&history[j].targets.contains(player)) num++;
player.storage.xindanshou++; }
player.chooseBool(get.prompt('xindanshou')+'(可摸'+get.cnNumber(player.storage.xindanshou)+'张牌)',get.translation('xindanshou_info')); }
event.num=num;
player.chooseBool(get.prompt('xindanshou')+'(可摸'+get.cnNumber(num)+'张牌)',get.translation('xindanshou_info'));
} }
'step 1' 'step 1'
if(result.bool){ if(result.bool){
@ -238,7 +233,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('xindanshou',trigger.player); player.logSkill('xindanshou',trigger.player);
} }
if(event.triggername=='useCardToTargeted'){ if(event.triggername=='useCardToTargeted'){
player.draw(player.storage.xindanshou); player.draw(num);
player.addTempSkill('xindanshou_as'); player.addTempSkill('xindanshou_as');
} }
else{ else{
@ -1082,7 +1077,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xintaoluan_backup:{}, xintaoluan_backup:{},
xincaishi:{ xincaishi:{
trigger:{ trigger:{
player:'phaseDrawBegin' player:'phaseDrawBegin2'
}, },
audio:'caishi', audio:'caishi',
direct:true, direct:true,
@ -1509,7 +1504,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.isMaxHandcard(); return player.isMaxHandcard();
}, },
check:function(event,player){ check:function(event,player){
if(player.storage.pingkou) return false; if(player.getHistory('skipped').length>0) return false;
return game.hasPlayer(function(current){ return game.hasPlayer(function(current){
return get.attitude(player,current)<0&&current.hp==1&&get.damageEffect(current,player,player)>0; return get.attitude(player,current)<0&&current.hp==1&&get.damageEffect(current,player,player)>0;
}); });
@ -1527,7 +1522,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
check:function(event,player){ check:function(event,player){
if(!player.needsToDiscard()||(player.countCards('e')&&player.isMaxEquip())) return true; if(!player.needsToDiscard()||(player.countCards('e')&&player.isMaxEquip())) return true;
if(player.storage.pingkou) return false; if(player.getHistory('skipped').length>0) return false;
return game.hasPlayer(function(current){ return game.hasPlayer(function(current){
return get.attitude(player,current)<0&&current.hp==1&&get.damageEffect(current,player,player)>0; return get.attitude(player,current)<0&&current.hp==1&&get.damageEffect(current,player,player)>0;
}); });
@ -1555,39 +1550,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
pingkou:{ pingkou:{
audio:2, audio:2,
group:['pingkou_init','pingkou_count'],
subSkill:{
init:{
trigger:{player:'phaseBefore'},
silent:true,
content:function(){
player.storage.pingkou=0;
}
},
count:{
trigger:{player:[
'phaseZhunbeiCancelled','phaseZhunbeiSkipped',
'phaseJudgeCancelled','phaseJudgeSkipped',
'phaseDrawCancelled','phaseDrawSkipped',
'phaseUseCancelled','phaseUseSkipped',
'phaseDiscardCancelled','phaseDiscardSkipped',
'phaseJieshuCancelled','phaseJieshuCancelled'
]},
silent:true,
content:function(){
player.storage.pingkou++;
console.log(event.triggername,trigger.name)
}
}
},
trigger:{player:'phaseEnd'}, trigger:{player:'phaseEnd'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return player.storage.pingkou>0; return player.getHistory('skipped').length>0;
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseTarget([1,player.storage.pingkou],get.prompt2('pingkou'),function(card,player,target){ player.chooseTarget([1,player.getHistory('skipped').length],get.prompt2('pingkou'),function(card,player,target){
return target!=player; return target!=player;
}).set('ai',function(target){ }).set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
@ -3068,7 +3038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
subSkill:{ subSkill:{
draw:{ draw:{
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
forced:true, forced:true,
popup:false, popup:false,
onremove:true, onremove:true,
@ -3802,12 +3772,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(!player.countCards('he')) return false; if(!player.countCards('he')) return false;
if(!event.source||!event.source.isIn()) return false; if(!event.source||event.source==player||!event.source.isIn()) return false;
if(player.storage.huisheng.contains(event.source)) return false; if(player.storage.huisheng.contains(event.source)) return false;
return true; return true;
}, },
init:function(player){ init:function(player){
player.storage.huisheng=[]; if(player.storage.huisheng) player.storage.huisheng=[];
}, },
content:function(){ content:function(){
'step 0' 'step 0'
@ -4541,7 +4511,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
duliang2:{ duliang2:{
trigger:{player:'phaseDrawBefore'}, trigger:{player:'phaseDrawBegin'},
forced:true, forced:true,
mark:true, mark:true,
audio:false, audio:false,
@ -8271,11 +8241,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
qieting:{ qieting:{
audio:2, audio:2,
global:'qieting2',
globalSilent:true,
trigger:{global:'phaseEnd'}, trigger:{global:'phaseEnd'},
filter:function(event,player){ filter:function(event,player){
return event.player!=player&&!event.player.tempSkills.qieting3&&event.player.isAlive(); if(event.player==player||!event.player.isAlive()) return false;
var history=event.player.getHistory('useCard');
for(var i=0;i<history.length;i++){
if(!history[i].targets) continue;
for(var j=0;j<history[i].targets.length;j++){
if(history[i].targets[j]!=event.player) return false;
}
}
return true;
}, },
direct:true, direct:true,
content:function(){ content:function(){
@ -8329,18 +8305,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
}, },
qieting2:{
trigger:{player:'useCard'},
filter:function(event,player){
return _status.currentPhase==player&&event.targets&&(event.targets.length>1||event.targets[0]!=player);
},
forced:true,
popup:false,
content:function(){
player.addTempSkill('qieting3');
}
},
qieting3:{},
oldzhuikong:{ oldzhuikong:{
audio:'zhuikong', audio:'zhuikong',
inherit:'zhuikong', inherit:'zhuikong',
@ -8778,7 +8742,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
xinxuanhuo:{ xinxuanhuo:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin1'},
direct:true, direct:true,
content:function(){ content:function(){
"step 0" "step 0"
@ -8796,7 +8760,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}); });
"step 1" "step 1"
if(result.bool){ if(result.bool){
trigger.cancel(); trigger.cancel(null,null,'notrigger');
player.logSkill('xinxuanhuo',result.targets); player.logSkill('xinxuanhuo',result.targets);
event.target=result.targets[0]; event.target=result.targets[0];
event.target.draw(2); event.target.draw(2);
@ -9456,7 +9420,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
zishou:{ zishou:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
check:function(event,player){ check:function(event,player){
return player.countCards('h')<=player.maxHp||player.skipList.contains('phaseUse'); return player.countCards('h')<=player.maxHp||player.skipList.contains('phaseUse');
}, },
@ -9735,7 +9699,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
jiangchi:{ jiangchi:{
audio:2, audio:2,
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin2'},
direct:true, direct:true,
content:function(){ content:function(){
"step 0" "step 0"
@ -10143,7 +10107,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseUseEnd'}, trigger:{player:'phaseUseEnd'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
return player.countUsed()>=player.hp; return player.countUsed(null,true)>=player.hp;
}, },
content:function(){ content:function(){
player.draw(2); player.draw(2);
@ -10154,7 +10118,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseJieshuBegin'}, trigger:{player:'phaseJieshuBegin'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
return player.countUsed()>=player.hp; return player.countUsed(null,true)>=player.hp;
}, },
content:function(){ content:function(){
player.draw(2); player.draw(2);
@ -10610,44 +10574,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard'}, trigger:{player:'useCard'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
if(event.jianyinged) return false; var evt=player.getLastUsed(1);
if(!event.cards||event.cards.length!=1) return false; if(!evt||!evt.card) return false;
if(!player.isPhaseUsing()) return false; if(!player.isPhaseUsing()) return false;
if(!player.storage.jianying) return false; var evt2=evt.getParent('phaseUse');
return get.suit(player.storage.jianying)==get.suit(event.cards[0])|| if(!evt2||evt2.name!='phaseUse'||evt2.player!=player) return false;
player.storage.jianying.number==event.cards[0].number; return get.suit(evt.card)&&get.suit(evt.card)==get.suit(event.card)||
evt.card.number&&evt.card.number==event.card.number;
}, },
content:function(){ content:function(){
player.draw(); player.draw();
}, },
intro:{
content:'card'
},
group:['jianying2','jianying3']
},
jianying3:{
trigger:{player:'useCard'},
priority:-1,
silent:true,
filter:function(event,player){
if(!event.cards||event.cards.length!=1) return false;
if(_status.currentPhase!=player) return false;
return true;
},
content:function(){
player.storage.jianying={
suit:get.suit(trigger.card),
number:trigger.card.number,
};
trigger.jianyinged=true;
}
},
jianying2:{
trigger:{player:'phaseAfter'},
silent:true,
content:function(){
player.storage.jianying=null;
}
}, },
zzhenggong:{ zzhenggong:{
trigger:{player:'damageEnd'}, trigger:{player:'damageEnd'},