From ec30ba7c047bbfb573ff951517547a7015bffc29 Mon Sep 17 00:00:00 2001 From: libccy Date: Sun, 14 Jan 2018 23:35:35 +0800 Subject: [PATCH] 1 --- character/diy.js | 18 ++++++++++++++++-- game/game.js | 12 ++++++++++++ game/update.js | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/character/diy.js b/character/diy.js index c3b2f5ad2..2a89d246e 100644 --- a/character/diy.js +++ b/character/diy.js @@ -120,6 +120,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsanruo:{ unique:true, init:function(player){ + if(!player.node.handcards1.cardMod){ + player.node.handcards1.cardMod={}; + } + if(!player.node.handcards2.cardMod){ + player.node.handcards2.cardMod={}; + } + var cardMod=function(card){ + if(get.info(card).multitarget) return; + if(card.name=='sha'||get.type(card)=='trick') return ['暗弱','杀或普通锦囊牌对你不可见']; + }; + player.node.handcards1.cardMod.nsanruo=cardMod; + player.node.handcards2.cardMod.nsanruo=cardMod; player.node.handcards1.classList.add('nsanruo'); player.node.handcards2.classList.add('nsanruo'); if(!ui.css.nsanruo){ @@ -130,8 +142,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, onremove:function(player){ - player.node.handcards1.classList.add('nsanruo'); - player.node.handcards2.classList.add('nsanruo'); + player.node.handcards1.classList.remove('nsanruo'); + player.node.handcards2.classList.remove('nsanruo'); + delete player.node.handcards1.cardMod.nsanruo; + delete player.node.handcards2.cardMod.nsanruo; }, ai:{ neg:true diff --git a/game/game.js b/game/game.js index 6f7c95d45..e00bacdbb 100644 --- a/game/game.js +++ b/game/game.js @@ -45251,6 +45251,18 @@ return; } var name=node.name; + if(node.parentNode.cardMod){ + var moded=false; + for(var i in node.parentNode.cardMod){ + var item=node.parentNode.cardMod[i](node); + if(Array.isArray(item)){ + moded=true; + uiintro.add(item[0]); + uiintro._place_text=uiintro.add('
'+item[1]+'
'); + } + } + if(moded) return uiintro; + } if(node.link&&node.link.name&&lib.card[node.link.name]){ name=node.link.name; } diff --git a/game/update.js b/game/update.js index 47bfe9418..6bdc44b00 100644 --- a/game/update.js +++ b/game/update.js @@ -1,5 +1,5 @@ window.noname_update={ - version:'1.9.47', + version:'1.9.47.1', update:'1.9.46', changeLog:[ 'bug修复',