diff --git a/card/gujian.js b/card/gujian.js index 2f689665e..13dd7869c 100644 --- a/card/gujian.js +++ b/card/gujian.js @@ -1544,9 +1544,7 @@ card.gujian={ content:function(){ player.chooseToUse(get.prompt('shihuifen',trigger.player).replace(/发动/,'使用'),function(card,player){ if(card.name!='shihuifen') return false; - var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.getSkills()); - if(mod!='unchanged') return mod; - return true; + return lib.filter.cardEnabled(card,player,'forceEnable'); },trigger.player,-1).targetRequired=true; } }, @@ -1560,9 +1558,7 @@ card.gujian={ content:function(){ player.chooseToUse(get.prompt('jinlianzhu',trigger.player).replace(/发动/,'使用'),function(card,player){ if(card.name!='jinlianzhu') return false; - var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.getSkills()); - if(mod!='unchanged') return mod; - return true; + return lib.filter.cardEnabled(card,player,'forceEnable'); },trigger.player,-1).targetRequired=true; } }, diff --git a/card/standard.js b/card/standard.js index ac2991cea..3da1276f3 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1590,9 +1590,7 @@ card.standard={ event.tempnowuxie=(trigger.targets&&trigger.targets.length>1&&!trigger.multitarget); event.filterCard=function(card,player){ if(card.name!='wuxie') return false; - var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.getSkills()); - if(mod!='unchanged') return mod; - return true; + return lib.filter.cardEnabled(card,player,'forceEnable'); }; event.send=function(player,state,isJudge,card,source,target,targets,id,id2,tempnowuxie,skillState){ if(skillState){ diff --git a/game/game.js b/game/game.js index 49042f706..131a1f682 100644 --- a/game/game.js +++ b/game/game.js @@ -18238,12 +18238,19 @@ cardEnabled:function(card,player,event){ card=get.autoViewAs(card,null,player); if(player==undefined) player=_status.event.player; - var filter=get.info(card).enable; - if(!filter) return; - var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.getSkills()); - if(mod!='unchanged') return mod; - if(typeof filter=='boolean') return filter; - if(typeof filter=='function') return filter(card,player); + if(event==='forceEnable'){ + var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.getSkills()); + if(mod!='unchanged') return mod; + return true; + } + else{ + var filter=get.info(card).enable; + if(!filter) return; + var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.getSkills()); + if(mod!='unchanged') return mod; + if(typeof filter=='boolean') return filter; + if(typeof filter=='function') return filter(card,player); + } }, cardRespondable:function(card,player){ if(_status.event.name!='chooseToRespond') return true; diff --git a/game/update.js b/game/update.js index 3e21c0fb5..18ad37ed8 100644 --- a/game/update.js +++ b/game/update.js @@ -10,9 +10,9 @@ window.noname_update={ // 'game/config.js', // 'game/source.js', // 'game/asset.js', - // 'card/*', - 'card/sp.js', - 'card/yunchou.js', + 'card/*', + // 'card/sp.js', + // 'card/yunchou.js', 'character/*', // 'character/sp.js', // 'mode/boss.js',