'use strict'; game.import('card',function(lib,game,ui,get,ai,_status){ return { name:'zhulu', connect:true, card:{ zhulu_card:{ audio:true, fullskin:true, type:'trick', enable:true, cardcolor:'red', selectTarget:-1, filterTarget:true, contentBefore:function(){ "step 0" if(get.is.versus()){ player.chooseControl('顺时针','逆时针',function(event,player){ if(player.next.side==player.side) return '逆时针'; return '顺时针'; }).set('prompt','选择'+get.translation(card)+'的结算方向'); } else{ event.goto(2); } "step 1" if(result&&result.control=='顺时针'){ var evt=event.getParent(); evt.fixedSeat=true; evt.targets.sortBySeat(); evt.targets.reverse(); if(evt.targets[evt.targets.length-1]==player){ evt.targets.unshift(evt.targets.pop()); } } "step 2" ui.clear(); var num; if(event.targets){ num=event.targets.length; } else{ num=game.countPlayer(); } var cards=[]; for(var i=0;i1){ var next=target.chooseButton(true,function(button){ var player=_status.event.player; return get.effect(player,button.link,player,player); }); next.set('equips',equips); next.set('filterButton',function(button){ return _status.event.equips.contains(button.link); }); next.set('dialog',event.preResult); next.set('closeDialog',false); next.set('dialogdisplay',true); } else if(equips.length){ event.directButton=equips[0]; } else event.finish(); "step 1" var dialog=event.dialog; var card; if(event.directButton){ card=event.directButton; } else{ card=result.links[0]; } var button; for(var i=0;i0; }, content:function(){ var es=target.getCards('e'); if(es.length) target.gain(es,'gain2','log'); }, ai:{ order:10, tag:{ gain:1, loseCard:1, }, basic:{ useful:0.5, value:0.5, }, result:{ target:function(player,target){ var e5=target.getEquip(5); if(e5&&e5.name=='muniu'&&e5.cards&&e5.cards.length>1) return -1; if(target.countCards('e',function(card){ return get.value(card,target)<=0; })||target.hasSkillTag('noe')) return 1; return 0; }, }, }, }, caochuan:{ fullskin:true, type:'trick', wuxieable:true, global:['caochuan_skill'], notarget:true, content:function(){ var evt2=event.getParent(3)._trigger; evt2.cancel(); var evt=evt2.getParent(); var next=game.createEvent('caochuan_gain'); _status.event.next.remove(next); evt.after.push(next); next.player=player; next.setContent(function(){ var cards=event.getParent().cards.filterInD(); if(cards.length) player.gain(cards,'gain2','log'); }); }, ai:{ basic:{ useful:[6,4], value:[6,4], }, result:{player:1}, }, }, numa:{ fullskin:true, type:'equip', subtype:'equip4', filterTarget:lib.filter.notMe, selectTarget:1, toself:false, loseThrow:true, customSwap:function(){ return true; }, ai:{ order:9, equipValue:function(card,player){ if(get.position(card)=='e') return 0; return 1; }, basic:{ equipValue:5, }, result:{ keepAI:true, target:function(player,target){ var card=target.getCards('e'); var val=get.value(card); if(val>0) return -val; return 0; }, }, }, }, yajiaoqiang:{ fullskin:true, type:'equip', subtype:'equip1', distance:{attackFrom:-2}, skills:['yajiaoqiang_skill'], ai:{ equipValue:function(card,player){ var skills=['longdan','kanpo','rekanpo','qingguo','reqingguo']; for(var i=0;i0) val+=4/num; return -val; } return 0; }, }, } }, yexingyi:{ fullskin:true, type:'equip', subtype:'equip2', skills:['yexingyi_skill'], ai:{ equipValue:4, basic:{ equipValue:4, }, } }, jinhe:{ fullskin:true, type:'equip', subtype:'equip5', filterTarget:lib.filter.notMe, selectTarget:1, toself:false, skills:['jinhe_skill'], global:['jinhe_lose'], loseDelay:false, onEquip:function(){ "step 0" player.markSkill('jinhe_skill'); if(event.getParent(2).name!='jinhe') event.finish(); else{ event.target=player; event.player=event.getParent(2).player; } "step 1" var id=card.cardid; event.cardid=id; if(!_status.jinhe) _status.jinhe={}; if(_status.jinhe[id]){ game.cardsDiscard(_status.jinhe[id].card); delete _status.jinhe[id]; } var cards2=get.cards(2); event.cards2=cards2; player.chooseButton(['选择一张牌作为「礼」',cards2],true); "step 2" var id=event.cardid; _status.jinhe[id]={ player:player, card:result.links[0], }; game.broadcast(function(jinhe){ _status.jinhe=jinhe; },_status.jinhe); game.cardsGotoSpecial(result.links[0]); event.cards2.remove(result.links[0]); event.cards2[0].fix(); ui.cardPile.insertBefore(event.cards2[0],ui.cardPile.firstChild); game.updateRoundNumber(); target.markSkill('jinhe_skill'); }, onLose:function(){ player.unmarkSkill('jinhe_skill'); var id=card.cardid; if((event.getParent(2)&&event.getParent(2).name!='swapEquip')&&get.position(card)!='d'&&event.parent.type!='equip'&&_status.jinhe&&_status.jinhe[id]){ var card2=_status.jinhe[id].card; player.$throw(card2,1000); game.log(card,'掉落了',card2); game.cardsDiscard(card2); delete _status.jinhe[id]; } }, ai:{ order:9.5, equipValue:function(card,player){ if(get.position(card)!='e') return 5; if(_status.jinhe&&_status.jinhe[card.cardid]&&(_status.event.name=='discardPlayerCard'||_status.event.name=='chooseToDiscard')) return 2*player.countCards('h'); return 0; }, basic:{ equipValue:5, }, result:{ keepAI:true, target:function(player,target,cardx){ if(_status.jinhe&&_status.jinhe[cardx.cardid]) return -0.5-2*target.countCards('h'); var card=target.getEquip(5); if(!card) return 0; return -get.value(card,target); }, target_use:function(player,target){ return -0.5-2*target.countCards('h'); }, }, } }, }, skill:{ jinhe_lose:{ trigger:{ player:['loseAfter','equipAfter'], }, equipSkill:true, forced:true, filter:function(event,player){ if(event.getl===false) return false; if(event.name=='lose'&&event.position!=ui.discardPile||!_status.jinhe||event.getParent(2).name=='jinhe_skill'&&event.getParent(2).player==player) return false; var evt=event.getl(player); if(!evt) return false; for(var i=0;i0; }, content:function(){ if(player!=game.me&&!player.isUnderControl()&&!player.isOnline()) game.delayx(); player.chooseToDiscard(true,'he',function(card){ return card!=_status.event.card; }).set('card',player.getEquip('wufengjian')); }, }, yajiaoqiang_skill:{ trigger:{player:'useCardAfter'}, filter:function(event,player){ if(_status.currentPhase==player||get.color(event.card)!='black'||event.cards.filterInD().length==0) return false; return player.getHistory('useCard',function(evt){ return get.color(evt.card)=='black'; }).indexOf(event)==0; }, prompt2:function(event,player){ return '获得'+get.translation(event.cards.filterInD()); }, content:function(){ player.gain(trigger.cards.filterInD(),'gain2','log'); }, }, caochuan_skill:{ trigger:{target:'useCardToBegin'}, forced:true, priority:6, filter:function(event,player){ if(event.directHit||!get.tag(event.card,'damage')||!['basic','trick'].contains(get.type(event.card))) return false; return player.hasUsableCard('caochuan'); }, content:function(){ var next=player.chooseToUse(); next.set('prompt','是否使用【草船借箭】响应'+get.translation(trigger.player)+'使用的'+get.translation(trigger.card)+'?'); next.set('filterCard',function(card){ if(get.name(card)!='caochuan') return false; return lib.filter.cardEnabled(card,player,'forceEnable'); }); next.set('respondTo',[trigger.player,trigger.card]); next.set('goon',-get.effect(player,trigger.card,trigger.player,player)); next.set('ai1',function(card){ return _status.event.goon; }) }, }, }, translate:{ jinhe:'锦盒', jinhe_info:'当你使用【锦盒】时,你将原有的与此牌对应的「礼」置入弃牌堆(若有),然后观看牌堆顶的两张牌并将其中一张置于游戏外与此牌对应,称之为「礼」。
出牌阶段,你可以将与此牌对应的「礼」置入弃牌堆,然后弃置【锦盒】以及所有与「礼」花色相同的手牌。当此牌因其他原因进入弃牌堆后,你将与此牌对应的「礼」置入弃牌堆并弃置所有手牌。', jinhe_skill:'锦盒', jinhe_lose:'锦盒', yexingyi:'夜行衣', yexingyi_info:'锁定技,你不是黑色锦囊牌的合法目标。', nvzhuang:'女装', nvzhuang_info:'锁定技,当此牌进入或离开你的装备区时,若你的性别为男性,你弃置一张不为此牌的牌。', yinfengjia:'引蜂甲', yinfengjia_info:'锁定技,当你受到锦囊牌造成的伤害时,此伤害+1。', yinfengjia_skill:'引蜂甲', zheji:'折戟', zheji_info:'这是一把坏掉的武器...', wufengjian:'无锋剑', wufengjian_info:'锁定技,当你使用【杀】时,你弃置一张不为装备区内【无锋剑】的牌。', wufengjian_skill:'无锋剑', yajiaoqiang_skill:'涯角枪', yajiaoqiang:'涯角枪', yajiaoqiang_info:'当你于一名其他角色的回合内第一次使用的黑色牌结算完成后,你可以获得此牌对应的所有实体牌。', numa:'驽马', numa_info:'锁定技,当此牌进入你的装备区时,你弃置装备区内的所有其他牌。', caochuan:'草船借箭', caochuan_info:'当带有「伤害」标签的基本牌或普通锦囊牌对你生效前,对此牌使用。抵消此牌对你产生的效果。当此牌结算完成后,你获得此牌对应的所有实体牌。', jiejia:'解甲归田', jiejia_info:'出牌阶段,对一名装备区内有牌的角色使用。该角色获得其装备区内的所有牌。', kaihua:'树上开花', kaihua_info:'出牌阶段,对包含你自己在内的一名角色使用。目标角色弃置一至两张牌,然后摸等量的牌。若其以此法弃置了装备牌,则多摸一张牌。', zhulu_card:'逐鹿天下', zhulu_card_info:'出牌阶段,对所有角色使用。你从牌堆和弃牌堆亮出等同于目标角色数的装备牌,每名目标角色将其中一张牌置于自己的装备区。', gifts_tag:'赠', }, list:[ ['diamond',3,'jiejia'], ['diamond',4,'shan'], ['diamond',5,'yajiaoqiang'], ['diamond',6,'sha'], ['diamond',8,'shan'], ['diamond',9,'kaihua'], ['diamond',10,'yinfengjia',null,['gifts']], ['diamond',11,'sha'], ['club',3,'jiejia'], ['club',4,'sha','thunder'], ['club',5,'zheji',null,['gifts']], ['club',6,'jiu'], ['club',8,'jiu'], ['club',9,'zhulu_card'], ['club',10,'jinhe',null,['gifts']], ['club',11,'sha'], ['heart',3,'sha','fire'], ['heart',4,'shan'], ['heart',5,'numa',null,['gifts']], ['heart',6,'tao'], ['heart',8,'shan'], ['heart',9,'kaihua'], ['heart',10,'nvzhuang',null,['gifts']], ['heart',11,'kaihua'], ['spade',3,'caochuan'], ['spade',4,'sha','thunder'], ['spade',5,'wufengjian',null,['gifts']], ['spade',6,'caochuan'], ['spade',8,'sha'], ['spade',9,'sha'], ['spade',10,'yexingyi'], ['spade',11,'sha'], ], } });