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

View File

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

View File

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

View File

@ -948,7 +948,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard2'},
direct:true,
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;
var info=get.info(event.card);
if(info.allowMultiple==false) return false;
@ -1050,10 +1050,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
sibian:{
audio:2,
trigger:{player:'phaseDrawBefore'},
trigger:{player:'phaseDrawBegin1'},
content:function(){
'step 0'
trigger.cancel();
trigger.cancel(null,null,'notrigger');
event.cards=get.cards(4);
game.cardsGotoOrdering(event.cards);
player.showCards(event.cards);
@ -2644,28 +2644,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
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']},
frequent:true,
filter:function(event,player){
return player.storage.gzjili==player.getAttackRange();
return player.getHistory('useCard').length+player.getHistory('respond').length==player.getAttackRange();
},
audio:2,
content:function(){
@ -3572,46 +3554,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
sptunjiang:{
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'},
frequent:true,
prompt2:'结束阶段若你未跳过本回合的出牌阶段且你于本回合出牌阶段内未使用牌指定过其他角色为目标则你可以摸X张牌X为全场势力数。',
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(){
player.draw(game.countGroup());
}
}
}
},
},
bingzhao:{
audio:2,
@ -6286,10 +6244,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
xinyongsi1:{
audio:'yongsi1',
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin1'},
forced:true,
content:function(){
trigger.num+=game.countGroup()-2;
player.draw(game.countGroup());
trigger.cancel(null,null,'notrigger');
}
},
xinyongsi2:{
@ -6731,7 +6690,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
zhaolie:{
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin1'},
direct:true,
content:function(){
'step 0'
@ -8448,7 +8407,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
yawang:{
audio:2,
trigger:{player:'phaseDrawBefore'},
trigger:{player:'phaseDrawBegin1'},
forced:true,
check:function(event,player){
var num=game.countPlayer(function(target){
@ -8462,7 +8421,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return num>=3;
},
content:function(){
trigger.cancel();
trigger.cancel(null,null,'notrigger');
var num=game.countPlayer(function(target){
return target.hp==player.hp;
});
@ -9371,7 +9330,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
tunchu:{
audio:2,
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
check:function(event,player){
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,
//usable:3,
filter:function(event,player){
if(!event.cards||event.cards.length!=1) return false;
if(_status.currentPhase!=player) return false;
if(!player.storage.fenyin) return false;
return get.color(player.storage.fenyin)!=get.color(event.cards[0]);
var evt=player.getLastUsed(1);
if(!evt) return false;
var color1=get.color(evt.card);
var color2=get.color(event.card);
return color1&&color2&&color1!='none'&&color2!='none'&&color1!=color2;
},
content:function(){
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:{
audio:2,
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
frequent:true,
content:function(){
trigger.num+=1+Math.floor(player.countCards('e')/2);
@ -9905,21 +9840,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
mozhi:{
audio:2,
intro:{
content:'cards'
},
init:function(player){
player.storage.mozhi=[];
},
trigger:{player:'phaseJieshuBegin'},
direct:true,
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(){
if(player.storage.mozhi.length&&player.countCards('h')){
var card=player.storage.mozhi.shift();
card={name:card.name,nature:card.nature,suit:card.suit,number:card.number};
"step 0"
event.history=player.getHistory('useCard',function(evt){
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(game.hasPlayer(function(current){
return player.canUse(card,current);
@ -9938,10 +9874,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
next.backup('mozhix');
}
}
event.redo();
}
"step 2"
if(result.bool) event.goto(1);
},
group:['mozhi2','mozhi3']
},
mozhix:{
filterCard:function(card){
@ -9950,28 +9886,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
selectCard:1,
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:{},
ranshang:{
audio:2,
@ -10208,7 +10122,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fengpo3:{},
biluan:{
audio:2,
trigger:{player:'phaseDrawBefore'},
trigger:{player:'phaseDrawBegin1'},
mark:true,
unique:true,
intro:{
@ -10267,7 +10181,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.storage.biluan+=ng.length;
player.markSkill('biluan');
game.addVideo('storage',player,['biluan',player.storage.biluan]);
trigger.cancel();
trigger.cancel(null,null,'notrigger');
},
mod:{
globalTo:function(from,to,distance){
@ -10345,7 +10259,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
canshi:{
audio:2,
trigger:{player:'phaseDrawBefore'},
trigger:{player:'phaseDrawBegin1'},
check:function(event,player){
var num=game.countPlayer(function(current){
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)+'张牌?';
},
content:function(){
trigger.cancel();
trigger.cancel(null,null,'notrigger');
var num=game.countPlayer(function(current){
if(player.hasZhuSkill('guiming')&&current.group=='wu'&&current!=player) return true;
return current.isDamaged();
@ -11826,7 +11740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
hengzheng:{
audio:2,
trigger:{player:'phaseDrawBefore'},
trigger:{player:'phaseDrawBegin1'},
filter:function(event,player){
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);
event.targets=targets;
event.num=0;
trigger.cancel();
trigger.cancel(null,null,'notrigger');
player.line(targets,'green');
"step 1"
if(num<event.targets.length){
@ -12694,7 +12608,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
hongyuan:{
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
direct:true,
audio:2,
content:function(){
@ -12965,7 +12879,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
yongsi1:{
audio:2,
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
forced:true,
content:function(){
trigger.num+=game.countGroup();

View File

@ -298,7 +298,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
tuxi:{
audio:2,
trigger:{player:'phaseDrawBefore'},
trigger:{player:'phaseDrawBegin1'},
direct:true,
content:function(){
"step 0"
@ -319,7 +319,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
player.logSkill('tuxi',result.targets);
player.gainMultiple(result.targets);
trigger.cancel();
trigger.cancel(null,null,'notrigger');
}
else{
event.finish();
@ -334,7 +334,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
luoyi:{
audio:2,
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
check:function(event,player){
if(player.countCards('h')<3) return false;
if(!player.hasSha()) return false;
@ -1738,7 +1738,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.needsToDiscard();
},
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(){
trigger.cancel();
@ -1770,7 +1775,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
yingzi:{
audio:2,
audioname:['sp_lvmeng'],
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
frequent:true,
content:function(){
trigger.num++;

View File

@ -294,116 +294,47 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
"xinfu_sidao":{
group:["xinfu_sidao_count","xinfu_sidao_init"],
subSkill:{
init:{
sub:true,
forced:true,
silent:true,
popup:false,
trigger:{
player:"phaseBefore",
},
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){
return (event.targets&&event.targets.length);
},
content:function (){
for(var i=0;i<game.players.length;i++){
if(game.players[i]==player) continue;
if(game.players[i].storage.sidao){
if(trigger.targets.contains(game.players[i])) game.players[i].storage.sidao++;
else delete game.players[i].storage.sidao;
}else{
if(trigger.targets.contains(game.players[i])) game.players[i].storage.sidao=1;
}
}
},
},
},
audio:2,
enable:"chooseToUse",
usable:1,
filterCard:true,
trigger:{
player:'useCardAfter',
},
filter:function(event,player){
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(){
var targets=player.getLastUsed(1).targets;
var next=player.chooseToUse();
next.set('targets',game.filterPlayer(function(current){
return targets.contains(current)&&trigger.targets.contains(current);
}));
next.set('openskilldialog',get.prompt2('xinfu_sidao'));
next.set('norestore',true);
next.set('_backupevent','xinfu_sidaox');
next.backup('xinfu_sidaox');
},
},
xinfu_sidaox:{
audio:'xinfu_sidao',
position:"h",
viewAs:{
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){
return target.storage.sidao&&target.storage.sidao>1;
return lib.filter.filterTarget.apply(this,arguments);
},
prompt:"将一张手牌当顺手牵羊使用",
check:function (card){return 4-get.value(card)},
ai:{
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,
},
},
check:function (card){return 7-get.value(card)},
onuse:function(links,player){player.addTempSkill('xinfu_sidaoy')},
},
xinfu_sidaoy:{},
"tanbei_effect1":{
},
"tanbei_effect2":{
@ -816,7 +747,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
audio:2,
trigger:{
player:"phaseDrawBefore",
player:"phaseDrawBegin1",
},
//priority:10,
content:function (){
@ -979,70 +910,42 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
"xinfu_lianpian":{
audio:2,
subSkill:{
refrain:{
forced:true,
silent:true,
popup:false,
usable:3,
trigger:{
global:["phaseBefore","phaseAfter"],
player:"useCardToPlayered",
},
content:function (){
player.storage.xinfu_lianpian=[];
player.storage.xinfu_lianpian_number=0;
},
},
},
group:["xinfu_lianpian_refrain"],
trigger:{
player:"useCard",
},
forced:true,
popup:false,
frequent:true,
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 (){
'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();
}
else event.goto(4);
'step 2'
'step 1'
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){
return _status.event.ablers.contains(target)&&target!=player;
}).set('ablers',event.ablers).ai=function(){
}).set('ablers',ablers).ai=function(){
return false;
};
}
'step 3'
else event.finish();
'step 2'
if(result.bool){
player.give(event.card,result.targets[0],true);
}
'step 4'
player.storage.xinfu_lianpian=trigger.targets;
},
},
"xinfu_lingren":{
@ -1220,7 +1123,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
"xinfu_xionghuo":{
group:["xinfu_xionghuo_damage","xinfu_xionghuo_begin"],
group:["xinfu_xionghuo_damage","xinfu_xionghuo_begin","xinfu_xionghuo_init"],
subSkill:{
begin:{
silent:true,
@ -1282,14 +1185,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
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,
enable:"phaseUse",
usable:null,
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:"戾",
intro:{
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'){
player.gain(trigger.parent.cards,"gain2");
}
if(!player.storage.xinfu_xionghuo) player.storage.xinfu_xionghuo=0;
player.storage.xinfu_xionghuo++;
player.markSkill('xinfu_xionghuo');
player.syncStorage('xinfu_xionghuo');
@ -1996,12 +1912,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_falu":{
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']={
spade:true,heart:true,diamond:true,club:true,
spade:false,heart:false,diamond:false,club:false,
};
},
mark:true,
//mark:true,
intro:{
content:function (content,player){
var storage=player.storage.xinfu_falu_map;
@ -2021,15 +1937,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true,
audio:2,
trigger:{
player:"discardAfter",
player:["discardAfter","enterGame"],
global:"gameDrawAfter",
},
filter:function (event,player){
if(event.name!='discard') return true;
for(var i=0;i<event.cards.length;i++){
if(!player.storage.xinfu_falu_map[get.suit(event.cards[i])]) return true;
}
return false;
},
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++){
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,
audio:2,
filter:function (event,player){
return player.storage.xinfu_falu>0;
return player.storage.xinfu_falu&&player.storage.xinfu_falu>0;
},
content:function (){
'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++;
}
player.storage.xinfu_falu=num;
player.markSkill('xinfu_falu');
player[num?'markSkill':'unmarkSkill']('xinfu_falu');
event.num=0;
event.togain=[];
'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++;
}
player.storage.xinfu_falu=num;
player.markSkill('xinfu_falu');
player[num?'markSkill':'unmarkSkill']('xinfu_falu');
player.logSkill('xinfu_zhenyi',trigger.player);
player.line(trigger.player);
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++;
}
player.storage.xinfu_falu=num;
player.markSkill('xinfu_falu');
player[num?'markSkill':'unmarkSkill']('xinfu_falu');
},
ai:{
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++;
}
player.storage.xinfu_falu=num;
player.markSkill('xinfu_falu');
player[num?'markSkill':'unmarkSkill']('xinfu_falu');
player.judge(function(card){
if(get.color(card)=='black') return 4;
return -1;
@ -3223,17 +3149,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{
global:"phaseUseEnd",
},
init:function (player){
player.storage.guanwei={num:0,suit:[]};
},
filter:function (event,player){
if(player.storage.guanwei&&player.storage.guanwei.suit.length==1&&player.storage.guanwei.num>1) return true;
return false;
var history=event.player.getHistory('useCard',function(evt){
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,
content:function (){
'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;
return 9-get.value(card);
}).set('logSkill','xinfu_guanwei');
@ -3259,39 +3193,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 3'
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":{
audio:true,
@ -3543,33 +3444,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{
content:"单调递增",
},
init:function (player){
player.storage.guanchao=0;
},
onremove:function (player){
delete player.storage.guanchao;
},
trigger:{
player:"useCard",
},
silent:true,
audio:"xinfu_guanchao",
forced:true,
popup:false,
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 (){
var num1=get.number(trigger.card);
var num2=player.storage.guanchao;
if(num2!=0&&num1>num2){
player.logSkill('xinfu_guanchao');
player.draw();
player.storage.guanchao=num1;
}
else if(num2==0){
player.storage.guanchao=num1;
}
else player.storage.guanchao=14;
},
sub:true,
},
@ -3588,24 +3483,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{
player:"useCard",
},
silent:true,
audio:"xinfu_guanchao",
forced:true,
popup:false,
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 (){
var num1=get.number(trigger.card);
var num2=player.storage.guanchao;
if(num2!=0&&num1<num2){
player.logSkill('xinfu_guanchao');
player.draw();
player.storage.guanchao=num1;
}
else if(num2==0){
player.storage.guanchao=num1;
}
else player.storage.guanchao=14;
},
sub:true,
},
@ -4758,6 +4653,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
forced:true,
unique:true,
juexingji:true,
trigger:{
player:["useCardAfter","respondAfter"],
},
@ -5313,93 +5209,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
"rw_baiyin_skill":{
equipSkill:true,
inherit:"baiyin_skill",
trigger:{
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;
},
audio:"baiyin_skill",
},
"rw_lanyinjia":{
equipSkill:true,
inherit:"lanyinjia",
enable:["chooseToRespond","chooseToUse"],
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],
},
},
audio:"lanyinjia",
},
"rw_minguangkai_cancel":{
equipSkill:true,
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":{
equipSkill:true,
inherit:"minguangkai_link",
trigger:{
player:"linkBefore",
@ -5415,22 +5235,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
effect:{
target:function (card,player,target,current){
if(target.isMinor()&&['tiesuo','lulitongxin'].contains(card.name)){
return 'zeroplayertarget';
if(['tiesuo','lulitongxin'].contains(card.name)){
return 'zerotarget';
}
},
},
},
},
"rw_renwang_skill":{
equipSkill:true,
inherit:"renwang_skill",
trigger:{
target:"shaBegin",
},
forced:true,
priority:6,
audio:true,
audio:"renwang_skill",
filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.player.hasSkillTag('unequip',false,{
@ -5440,104 +5254,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
})) return false;
return (event.card.name=='sha'&&['spade','club','heart'].contains(get.suit(event.card)))
},
content:function (){
trigger.cancel();
},
ai:{
effect:{
target:function (card,player){
target:function (card,player,target){
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=='sha'&&get.color(card)=='black') return 'zerotarget';
if(card.name=='sha'&&['spade','club','heart'].contains(get.suit(card))) return 'zerotarget';
},
},
},
},
"rw_tengjia1":{
equipSkill:true,
inherit:"tengjia1",
trigger:{
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';
}
},
},
},
audio:"tengjia1",
},
"rw_tengjia2":{
equipSkill:true,
inherit:"tengjia2",
trigger:{
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;
},
},
},
audio:"tengjia1",
},
"rw_tengjia3":{
equipSkill:true,
audio:"tengjia1",
inherit:"rw_minguangkai_link",
trigger:{
player:"linkBefore",
},
forced:true,
priority:20,
filter:function (event,player){
return !player.isLinked();
},
content:function (){
trigger.cancel();
},
ai:{
effect:{
target:function (card,player,target,current){
@ -5550,6 +5291,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
"rw_tengjia4":{
inherit:"tengjia3",
audio:"tengjia1",
},
},
translate:{
@ -5567,6 +5309,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_tanbei":"贪狈",
"xinfu_tanbei_info":"出牌阶段限一次,你可以令一名其他角色选择一项:<br>1.令你随机获得其区域内的一张牌,本回合内你不能对其使用牌。<br>2.令你此回合内对其使用牌没有次数与距离限制。",
"xinfu_sidao":"伺盗",
xinfu_sidaox:'伺盗',
"xinfu_sidao_info":"出牌阶段限一次,当你对一名其他角色连续使用两张牌后,你可以将一张手牌当做【顺手牵羊】对其使用。",
"tanbei_effect1":"贪狈",
"tanbei_effect1_info":"",

View File

@ -195,25 +195,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xindanshou:{
audio:'danshou',
trigger:{
global:['phaseJieshuBegin','phaseBefore'],
global:'phaseJieshuBegin',
target:'useCardToTargeted',
},
forced:true,
popup:false,
direct:true,
filter:function(event,player,name){
return name=='phaseBefore'||
((name=='phaseJieshuBegin'&&event.player!=player&&player.countCards('he')>=event.player.countCards('h'))||
(event.targets&&event.targets.contains(player)))
return ((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'))))
&&!player.hasSkill('xindanshou_as');
},
content:function(){
'step 0'
if(event.triggername=='phaseBefore'){
player.storage.xindanshou=0;
event.finish();
return;
}
else if(event.triggername=='phaseJieshuBegin'){
if(event.triggername=='phaseJieshuBegin'){
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(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{
if(!['basic','trick'].contains(get.type(trigger.card,'trick'))){
event.finish();
return;
};
if(!player.storage.xindanshou) player.storage.xindanshou=0;
player.storage.xindanshou++;
player.chooseBool(get.prompt('xindanshou')+'(可摸'+get.cnNumber(player.storage.xindanshou)+'张牌)',get.translation('xindanshou_info'));
var num=0;
for(var i=0;i<game.players.length;i++){
var history=game.players[i].getHistory('useCard');
for(var j=0;j<history.length;j++){
if(history[j].targets&&history[j].targets.contains(player)) num++;
}
}
event.num=num;
player.chooseBool(get.prompt('xindanshou')+'(可摸'+get.cnNumber(num)+'张牌)',get.translation('xindanshou_info'));
}
'step 1'
if(result.bool){
@ -238,7 +233,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('xindanshou',trigger.player);
}
if(event.triggername=='useCardToTargeted'){
player.draw(player.storage.xindanshou);
player.draw(num);
player.addTempSkill('xindanshou_as');
}
else{
@ -1082,7 +1077,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xintaoluan_backup:{},
xincaishi:{
trigger:{
player:'phaseDrawBegin'
player:'phaseDrawBegin2'
},
audio:'caishi',
direct:true,
@ -1509,7 +1504,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.isMaxHandcard();
},
check:function(event,player){
if(player.storage.pingkou) return false;
if(player.getHistory('skipped').length>0) return false;
return game.hasPlayer(function(current){
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){
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 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:{
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'},
direct:true,
filter:function(event,player){
return player.storage.pingkou>0;
return player.getHistory('skipped').length>0;
},
content:function(){
'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;
}).set('ai',function(target){
var player=_status.event.player;
@ -3068,7 +3038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
subSkill:{
draw:{
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
forced:true,
popup:false,
onremove:true,
@ -3802,12 +3772,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
filter:function(event,player){
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;
return true;
},
init:function(player){
player.storage.huisheng=[];
if(player.storage.huisheng) player.storage.huisheng=[];
},
content:function(){
'step 0'
@ -4541,7 +4511,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
duliang2:{
trigger:{player:'phaseDrawBefore'},
trigger:{player:'phaseDrawBegin'},
forced:true,
mark:true,
audio:false,
@ -8271,11 +8241,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
qieting:{
audio:2,
global:'qieting2',
globalSilent:true,
trigger:{global:'phaseEnd'},
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,
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:{
audio:'zhuikong',
inherit:'zhuikong',
@ -8778,7 +8742,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
xinxuanhuo:{
audio:2,
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin1'},
direct:true,
content:function(){
"step 0"
@ -8796,7 +8760,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
});
"step 1"
if(result.bool){
trigger.cancel();
trigger.cancel(null,null,'notrigger');
player.logSkill('xinxuanhuo',result.targets);
event.target=result.targets[0];
event.target.draw(2);
@ -9456,7 +9420,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
zishou:{
audio:2,
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
check:function(event,player){
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:{
audio:2,
trigger:{player:'phaseDrawBegin'},
trigger:{player:'phaseDrawBegin2'},
direct:true,
content:function(){
"step 0"
@ -10143,7 +10107,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseUseEnd'},
frequent:true,
filter:function(event,player){
return player.countUsed()>=player.hp;
return player.countUsed(null,true)>=player.hp;
},
content:function(){
player.draw(2);
@ -10154,7 +10118,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseJieshuBegin'},
frequent:true,
filter:function(event,player){
return player.countUsed()>=player.hp;
return player.countUsed(null,true)>=player.hp;
},
content:function(){
player.draw(2);
@ -10610,44 +10574,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard'},
frequent:true,
filter:function(event,player){
if(event.jianyinged) return false;
if(!event.cards||event.cards.length!=1) return false;
var evt=player.getLastUsed(1);
if(!evt||!evt.card) return false;
if(!player.isPhaseUsing()) return false;
if(!player.storage.jianying) return false;
return get.suit(player.storage.jianying)==get.suit(event.cards[0])||
player.storage.jianying.number==event.cards[0].number;
var evt2=evt.getParent('phaseUse');
if(!evt2||evt2.name!='phaseUse'||evt2.player!=player) return false;
return get.suit(evt.card)&&get.suit(evt.card)==get.suit(event.card)||
evt.card.number&&evt.card.number==event.card.number;
},
content:function(){
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:{
trigger:{player:'damageEnd'},