notrigger

This commit is contained in:
libccy 2017-05-22 21:34:35 +08:00
parent 42541da6ef
commit 1eabf322e6
12 changed files with 35 additions and 2 deletions

View File

@ -3039,6 +3039,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
priority:55, priority:55,
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.player.countCards('he')>0; return event.player.countCards('he')>0;
}, },
content:function(){ content:function(){
@ -3376,6 +3377,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
forced:true, forced:true,
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.card&&event.card.name=='sha'&&event.player.countCards('he'); return event.card&&event.card.name=='sha'&&event.player.countCards('he');
}, },
content:function(){ content:function(){
@ -3537,6 +3539,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return get.attitude(player,event.player)<=0; return get.attitude(player,event.player)<=0;
}, },
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive(); return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive();
}, },
logTarget:'player', logTarget:'player',
@ -4170,6 +4173,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.nature&&event.player&&event.player.isAlive(); return event.nature&&event.player&&event.player.isAlive();
}, },
content:function(){ content:function(){

View File

@ -1021,6 +1021,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(event.player==player) return false; if(event.player==player) return false;
if(!event.player.countCards('he')) return false; if(!event.player.countCards('he')) return false;
if(!lib.filter.targetEnabled({name:'chenhuodajie'},player,event.player)) return false; if(!lib.filter.targetEnabled({name:'chenhuodajie'},player,event.player)) return false;
if(event._notrigger.contains(event.player)) return false;
return player.hasCard('chenhuodajie'); return player.hasCard('chenhuodajie');
}, },
content:function(){ content:function(){

View File

@ -197,6 +197,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd',player:'damageEnd'}, trigger:{source:'damageEnd',player:'damageEnd'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return (event.source!=player&&event.source.isIn())||(event.player!=player&&event.player.isIn()); return (event.source!=player&&event.source.isIn())||(event.player!=player&&event.player.isIn());
}, },
content:function(){ content:function(){
@ -494,7 +495,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
content:function(){ content:function(){
player.draw(); player.draw();
if(trigger.player&&trigger.player.isIn()){ if(trigger.player&&trigger.player.isIn()&&!trigger._notrigger.contains(trigger.player)){
trigger.player.randomDiscard(); trigger.player.randomDiscard();
} }
}, },
@ -3202,6 +3203,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xueren:{ xueren:{
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.card&&event.card.name=='sha'&&event.player.isAlive(); return event.card&&event.card.name=='sha'&&event.player.isAlive();
}, },
check:function(event,player){ check:function(event,player){
@ -4164,6 +4166,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd',player:'damageEnd'}, trigger:{source:'damageEnd',player:'damageEnd'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
if(player==event.source){ if(player==event.source){
return event.player!=player&&event.player.countCards('e'); return event.player!=player&&event.player.countCards('e');
} }
@ -4755,6 +4758,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
alter:true, alter:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
if(get.is.altered('xshixin')&&event.player.hp<player.hp) return false; if(get.is.altered('xshixin')&&event.player.hp<player.hp) return false;
return event.player.isAlive()&&event.player!=player; return event.player.isAlive()&&event.player!=player;
}, },
@ -4944,6 +4948,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
alter:true, alter:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.card&&get.color(event.card)=='black'&& return event.card&&get.color(event.card)=='black'&&
!event.player.isTurnedOver()&&event.player.isAlive(); !event.player.isTurnedOver()&&event.player.isAlive();
}, },
@ -5166,6 +5171,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
bingshuang:{ bingshuang:{
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.card&&get.type(event.card)=='trick'&& return event.card&&get.type(event.card)=='trick'&&
event.player.isAlive()&&!event.player.isTurnedOver(); event.player.isAlive()&&!event.player.isTurnedOver();
}, },

View File

@ -210,6 +210,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.card&&event.card.name=='sha'&&event.player.isAlive()&&event.player.countCards('he')>0; return event.card&&event.card.name=='sha'&&event.player.isAlive()&&event.player.countCards('he')>0;
}, },
check:function(){ check:function(){
@ -1131,6 +1132,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
direct:true, direct:true,
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.card&&event.card.name=='sha'&&event.cards&& return event.card&&event.card.name=='sha'&&event.cards&&
get.color(event.cards)=='black'&&event.player.countCards('e'); get.color(event.cards)=='black'&&event.player.countCards('e');
}, },
@ -1456,6 +1458,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{player:'damageEnd',source:'damageEnd'}, trigger:{player:'damageEnd',source:'damageEnd'},
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.num&&event.source&&event.player&& return event.num&&event.source&&event.player&&
event.player.isAlive()&&event.source.isAlive()&&event.source!=event.player; event.player.isAlive()&&event.source.isAlive()&&event.source!=event.player;
}, },

View File

@ -1869,6 +1869,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return (event.card&&event.card.name=='sha'&& return (event.card&&event.card.name=='sha'&&
event.player.classList.contains('dead')==false&& event.player.classList.contains('dead')==false&&
event.player.countCards('h')&&player.countCards('h'))&&event.player!=player; event.player.countCards('h')&&player.countCards('h'))&&event.player!=player;

View File

@ -2897,6 +2897,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhidao:{ zhidao:{
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return _status.currentPhase==player&&event.player.isAlive()&& return _status.currentPhase==player&&event.player.isAlive()&&
event.player.countCards('hej')>0&&event.player!=player&&!player.hasSkill('zhidao2'); event.player.countCards('hej')>0&&event.player!=player&&!player.hasSkill('zhidao2');
}, },
@ -5129,6 +5130,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
bushi:{ bushi:{
trigger:{player:'damageEnd',source:'damageEnd'}, trigger:{player:'damageEnd',source:'damageEnd'},
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive();
}, },
direct:true, direct:true,
@ -7379,6 +7381,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
silent:true, silent:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.nature=='fire'; return event.nature=='fire';
}, },
content:function(){ content:function(){
@ -8420,6 +8423,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true, direct:true,
audio:2, audio:2,
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.card&&event.card.name=='sha'&&event.player.countCards('e'); return event.card&&event.card.name=='sha'&&event.player.countCards('e');
}, },
content:function(){ content:function(){

View File

@ -3106,6 +3106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.player.countCards('e'); return event.player.countCards('e');
}, },
content:function(){ content:function(){
@ -5561,6 +5562,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
direct:true, direct:true,
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.card&&event.card.name=='sha'&&event.player.countCards('he'); return event.card&&event.card.name=='sha'&&event.player.countCards('he');
}, },
content:function(){ content:function(){
@ -5607,6 +5609,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.player.countCards('hej'); return event.player.countCards('hej');
}, },
content:function(){ content:function(){
@ -6109,6 +6112,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
polang:{ polang:{
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.player.countCards('e'); return event.player.countCards('e');
}, },
direct:true, direct:true,

View File

@ -73,6 +73,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return _status.currentPhase==player&&event.card&&event.card.name=='sha'; return _status.currentPhase==player&&event.card&&event.card.name=='sha';
}, },
content:function(){ content:function(){

View File

@ -484,6 +484,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.attitude(player,event.player)<0; return get.attitude(player,event.player)<0;
}, },
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.player!=player&&event.player.isIn()&&!event.player.hasSkill('anwugu2'); return event.player!=player&&event.player.isIn()&&!event.player.hasSkill('anwugu2');
}, },
logTarget:'player', logTarget:'player',
@ -2144,6 +2145,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
forced:true, forced:true,
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
if(get.is.altered('tianjian')) return false; if(get.is.altered('tianjian')) return false;
return event.parent.skill=='tianjian'&&event.player.countCards('he'); return event.parent.skill=='tianjian'&&event.player.countCards('he');
}, },
@ -2749,6 +2751,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
forced:true, forced:true,
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.player.isAlive()&&event.card&&event.card.name=='sha'; return event.player.isAlive()&&event.card&&event.card.name=='sha';
}, },
content:function(){ content:function(){
@ -3750,6 +3753,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
alter:true, alter:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return player.storage.xuanning>0&&event.player.countCards('he')>0; return player.storage.xuanning>0&&event.player.countCards('he')>0;
}, },
direct:true, direct:true,

View File

@ -6738,6 +6738,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.attitude(player,event.player)>0; return get.attitude(player,event.player)>0;
}, },
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.card&&event.card.name=='sha'&&event.player.isAlive(); return event.card&&event.card.name=='sha'&&event.player.isAlive();
}, },
logTarget:'player', logTarget:'player',

View File

@ -106,6 +106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
logTarget:'player', logTarget:'player',
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.player.isIn()&&!event.player.hasSkill('lyuxue2'); return event.player.isIn()&&!event.player.hasSkill('lyuxue2');
}, },
content:function(){ content:function(){
@ -860,6 +861,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
frequent:true, frequent:true,
filter:function(event){ filter:function(event){
if(event._notrigger.contains(event.player)) return false;
return event.player.isAlive()&&event.parent.name=='yanyi'&&event.player.hp<event.player.maxHp; return event.player.isAlive()&&event.parent.name=='yanyi'&&event.player.hp<event.player.maxHp;
}, },
content:function(){ content:function(){
@ -1343,6 +1345,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
if(event.player.isDead()) return false; if(event.player.isDead()) return false;
var nh=event.player.countCards('h'); var nh=event.player.countCards('h');
if(nh==0) return false; if(nh==0) return false;

View File

@ -1766,6 +1766,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
unique:true, unique:true,
filter:function(event,player){ filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.player.isIn()&&event.player.isEnemyOf(player)&&!event.player.hasSkill('boss_zhongdu'); return event.player.isIn()&&event.player.isEnemyOf(player)&&!event.player.hasSkill('boss_zhongdu');
}, },
logTarget:'player', logTarget:'player',