diff --git a/character/yijiang.js b/character/yijiang.js index a1ad7020a..7cc2216a5 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -382,7 +382,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ if(player.hasSkill('wengua3')) return false; return player.countCards('h')&&game.hasPlayer(function(current){ - return current.hasSkill('wengua')&¤t!=player; + return current.hasSkill('wengua'); }); }, direct:true, @@ -393,7 +393,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:function(){ var player=_status.event.player; var list=game.filterPlayer(function(current){ - return current.hasSkill('wengua')&¤t!=player; + return current.hasSkill('wengua'); }); var str='将一张手牌交给'+get.translation(list); if(list.length>1) str+='中的一人'; @@ -406,7 +406,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ "step 0" var targets=game.filterPlayer(function(current){ - return current.hasSkill('wengua')&¤t!=player; + return current.hasSkill('wengua'); }); if(targets.length==1){ event.target=targets[0]; @@ -434,8 +434,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.target){ player.logSkill('wengua',event.target); player.addTempSkill('wengua3'); - player.give(cards,event.target); event.card=cards[0]; + if(event.target!=player){ + player.give(cards,event.target); + } } else{ event.finish(); @@ -465,7 +467,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.index==1){ game.log(event.target,'将获得的牌置于牌堆底'); ui.cardPile.appendChild(event.card); - if(ui.cardPile.childElementCount==1){ + if(ui.cardPile.childElementCount==1||player==event.target){ event.togain=[ui.cardPile.firstChild]; ui.cardPile.firstChild.remove(); } @@ -476,9 +478,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ game.log(player,'将获得的牌置于牌堆顶'); ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); - if(ui.cardPile.childElementCount==1){ - event.togain=[ui.cardPile.firstChild]; - ui.cardPile.firstChild.remove(); + if(ui.cardPile.childElementCount==1||player==event.target){ + event.togain=[ui.cardPile.lastChild]; + ui.cardPile.lastChild.remove(); } else{ event.togain=[ui.cardPile.lastChild,ui.cardPile.lastChild.previousSibling]; @@ -512,7 +514,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, wengua3:{}, daiyan:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseEnd'}, direct:true, init:function(){ lib.onwash.push(function(){ @@ -549,7 +551,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.logSkill('daiyan',target); - var tao=get.cardPile2('tao'); + var tao=get.cardPile2(function(card){ + return get.suit(card)=='heart'&&get.type(card)=='basic'; + }); if(tao){ target.gain(tao,'gain2'); } @@ -566,91 +570,95 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - threaten:2, + threaten:1.5, expose:0.2 } }, fumian:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseBegin'}, direct:true, content:function(){ 'step 0' - delete player.storage.fumian; - delete player.storage.fumian_markcount; if(player.storage.fumian_choice=='draw'){ - player.chooseBool(get.prompt('fumian'),'下回合你使用红色牌可以多选择两个目标'); + player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','你使用红色牌可以多选择两个目标',function(event,player){ + if(player.hp==1||player.countCards('h')<=1) return 0; + return 1; + }); } else if(player.storage.fumian_choice=='red'){ - player.chooseBool(get.prompt('fumian'),'下回合摸牌阶段多摸两张牌'); + player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸两张牌','你使用红色牌可以多选择一个目标',function(event,player){ + return 0; + }); } else{ - player.chooseControlList(get.prompt('fumian'),'下回合摸牌阶段多摸一张牌','下回合你使用红色牌可以多选择一个目标',function(event,player){ - if(player.hp==1||player.countCards('h')<=1) return 0; + player.chooseControlList(get.prompt('fumian'),'摸牌阶段多摸一张牌','你使用红色牌可以多选择一个目标',function(event,player){ + if(player.hp==1||player.countCards('h')