From c99e2e7862a337b29a0a6837ce270a93306955cc Mon Sep 17 00:00:00 2001 From: libccy Date: Sat, 15 Apr 2017 08:25:50 +0800 Subject: [PATCH] refresh --- card/extra.js | 1132 +- card/gujian.js | 3324 ++--- card/guozhan.js | 2292 ++-- card/hearth.js | 1360 +- card/sp.js | 1874 +-- card/standard.js | 3802 +++--- card/swd.js | 9880 +++++++-------- card/yunchou.js | 2100 +-- card/zhenfa.js | 842 +- character/diy.js | 2622 ++-- character/extra.js | 2346 ++-- character/gujian.js | 3130 ++--- character/gwent.js | 1728 +-- character/hearth.js | 13148 +++++++++---------- character/jiange.js | 1154 +- character/old.js | 732 +- character/ow.js | 7002 +++++----- character/refresh.js | 2906 ++--- character/shenhua.js | 8704 ++++++------- character/sp.js | 17550 ++++++++++++------------- character/standard.js | 3326 ++--- character/swd.js | 19420 ++++++++++++++-------------- character/xiake.js | 248 +- character/xianjian.js | 5080 ++++---- character/yijiang.js | 15418 +++++++++++----------- character/yxs.js | 5854 ++++----- character/zhuogui.js | 660 +- extension/boss/extension.js | 416 +- extension/cardpile/extension.js | 200 +- extension/coin/extension.js | 2560 ++-- extension/wuxing/extension.js | 426 +- game/game.js | 70 +- mode/boss.js | 7982 ++++++------ mode/brawl.js | 4388 +++---- mode/chess.js | 11898 ++++++++--------- mode/connect.js | 278 +- mode/guozhan.js | 6840 +++++----- mode/identity.js | 3566 +++--- mode/realtime.js | 20 +- mode/stone.js | 20428 +++++++++++++++--------------- mode/tafang.js | 2282 ++-- mode/versus.js | 9598 +++++++------- 42 files changed, 104467 insertions(+), 104119 deletions(-) diff --git a/card/extra.js b/card/extra.js index 0ab1ab688..a3b0c8d1f 100644 --- a/card/extra.js +++ b/card/extra.js @@ -1,605 +1,613 @@ 'use strict'; -game.import('card',{ - name:'extra', - connect:true, - card:{ - jiu:{ - audio:true, - fullskin:true, - type:"basic", - enable:function(event,player){ - return !player.hasSkill('jiu'); - }, - lianheng:true, - logv:false, - savable:function(card,player,dying){ - return dying==player; - }, - usable:1, - selectTarget:-1, - modTarget:true, - filterTarget:function(card,player,target){ - return target==player; - }, - content:function(){ - if(target.isDying()){ - target.recover(); - if(_status.currentPhase==target){ - target.getStat().card.jiu--; - } - } - else{ - if(cards&&cards.length){ - card=cards[0]; - } - game.broadcastAll(function(target,card,gain2){ - target.addSkill('jiu'); - if(!target.node.jiu&&lib.config.jiu_effect){ - target.node.jiu=ui.create.div('.playerjiu',target.node.avatar); - target.node.jiu2=ui.create.div('.playerjiu',target.node.avatar2); - } - if(gain2&&card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){ - card.clone.moveDelete(target); - } - },target,card,target==targets[0]); - if(target==targets[0]){ - if(card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){ - game.addVideo('gain2',target,get.cardsInfo([card])); - } - } - } - }, - ai:{ - basic:{ - useful:function(card,i){ - if(_status.event.player.hp>1){ - if(i==0) return 5; - return 1; - } - if(i==0) return 7.3; - return 3; - }, - value:function(card,player,i){ - if(player.hp>1){ - if(i==0) return 5; - return 1; - } - if(i==0) return 7.3; - return 3; - }, +game.import('card',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'extra', + connect:true, + card:{ + jiu:{ + audio:true, + fullskin:true, + type:"basic", + enable:function(event,player){ + return !player.hasSkill('jiu'); }, - order:function(){ - return get.order({name:'sha'})+0.2; + lianheng:true, + logv:false, + savable:function(card,player,dying){ + return dying==player; }, - result:{ - target:function(player,target){ - if(target&&target.isDying()) return 2; - if(lib.config.mode=='stone'&&!player.isMin()){ - if(player.getActCount()+1>=player.actcount) return 0; + usable:1, + selectTarget:-1, + modTarget:true, + filterTarget:function(card,player,target){ + return target==player; + }, + content:function(){ + if(target.isDying()){ + target.recover(); + if(_status.currentPhase==target){ + target.getStat().card.jiu--; } - var shas=player.getCards('h','sha'); - if(shas.length>1&&player.getCardUsable('sha')>1){ - return 0; + } + else{ + if(cards&&cards.length){ + card=cards[0]; } - var card; - if(shas.length){ - for(var i=0;i0); - })){ + } + }, + ai:{ + basic:{ + useful:function(card,i){ + if(_status.event.player.hp>1){ + if(i==0) return 5; return 1; } - } - return 0; + if(i==0) return 7.3; + return 3; + }, + value:function(card,player,i){ + if(player.hp>1){ + if(i==0) return 5; + return 1; + } + if(i==0) return 7.3; + return 3; + }, }, - }, - tag:{ - save:1 - } - } - }, - huogong:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - if(player!=game.me&&player.countCards('h')<2) return false; - return target.countCards('h')>0; - }, - content:function(){ - "step 0" - if(target.countCards('h')==0){ - event.finish(); - return; - } - var rand=Math.random()<0.5; - target.chooseCard(true).ai=function(card){ - if(rand) return Math.random(); - return get.value(card); - }; - "step 1" - event.dialog=ui.create.dialog(get.translation(target)+'展示的手牌',result.cards); - event.videoId=lib.status.videoId++; - - game.broadcast('createDialog',event.videoId,get.translation(target)+'展示的手牌',result.cards); - game.addVideo('cardDialog',null,[get.translation(target)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]); - event.card2=result.cards[0]; - game.log(target,'展示了',event.card2); - player.chooseToDiscard({suit:get.suit(event.card2)},function(card){ - var evt=_status.event.getParent(); - if(get.damageEffect(evt.target,evt.player,evt.player,'fire')>0){ - return 7-get.value(card,evt.player); + order:function(){ + return get.order({name:'sha'})+0.2; + }, + result:{ + target:function(player,target){ + if(target&&target.isDying()) return 2; + if(lib.config.mode=='stone'&&!player.isMin()){ + if(player.getActCount()+1>=player.actcount) return 0; + } + var shas=player.getCards('h','sha'); + if(shas.length>1&&player.getCardUsable('sha')>1){ + return 0; + } + var card; + if(shas.length){ + for(var i=0;i0); + })){ + return 1; + } + } + return 0; + }, + }, + tag:{ + save:1 } - return -1; - }).prompt=false; - game.delay(2); - "step 2" - if(result.bool){ - target.damage('fire'); } - else{ - target.addTempSkill('huogong2','phaseBegin'); - } - event.dialog.close(); - game.addVideo('cardDialog',null,event.videoId); - game.broadcast('closeDialog',event.videoId); }, - ai:{ - basic:{ - order:4, - value:[3,1], - useful:1, + huogong:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + if(player!=game.me&&player.countCards('h')<2) return false; + return target.countCards('h')>0; }, - wuxie:function(target,card,player,current,state){ - if(get.attitude(current,player)>=0&&state>0) return false; - }, - result:{ - player:function(player){ - var nh=player.countCards('h'); - if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){ - if(typeof _status.event.filterCard=='function'&& - _status.event.filterCard({name:'huogong'})){ - return -10; - } - if(_status.event.skill){ - var viewAs=get.info(_status.event.skill).viewAs; - if(viewAs=='huogong') return -10; - if(viewAs&&viewAs.name=='huogong') return -10; - } + content:function(){ + "step 0" + if(target.countCards('h')==0){ + event.finish(); + return; + } + var rand=Math.random()<0.5; + target.chooseCard(true).ai=function(card){ + if(rand) return Math.random(); + return get.value(card); + }; + "step 1" + event.dialog=ui.create.dialog(get.translation(target)+'展示的手牌',result.cards); + event.videoId=lib.status.videoId++; + + game.broadcast('createDialog',event.videoId,get.translation(target)+'展示的手牌',result.cards); + game.addVideo('cardDialog',null,[get.translation(target)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]); + event.card2=result.cards[0]; + game.log(target,'展示了',event.card2); + player.chooseToDiscard({suit:get.suit(event.card2)},function(card){ + var evt=_status.event.getParent(); + if(get.damageEffect(evt.target,evt.player,evt.player,'fire')>0){ + return 7-get.value(card,evt.player); } - return 0; + return -1; + }).prompt=false; + game.delay(2); + "step 2" + if(result.bool){ + target.damage('fire'); + } + else{ + target.addTempSkill('huogong2','phaseBegin'); + } + event.dialog.close(); + game.addVideo('cardDialog',null,event.videoId); + game.broadcast('closeDialog',event.videoId); + }, + ai:{ + basic:{ + order:4, + value:[3,1], + useful:1, }, - target:function(player,target){ - if(target.hasSkill('huogong2')||target.countCards('h')==0) return 0; - if(player.countCards('h')<=1) return 0; - if(target==player){ - if(typeof _status.event.filterCard=='function'&& - _status.event.filterCard({name:'huogong'})){ - return -1.5; + wuxie:function(target,card,player,current,state){ + if(get.attitude(current,player)>=0&&state>0) return false; + }, + result:{ + player:function(player){ + var nh=player.countCards('h'); + if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){ + if(typeof _status.event.filterCard=='function'&& + _status.event.filterCard({name:'huogong'})){ + return -10; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='huogong') return -10; + if(viewAs&&viewAs.name=='huogong') return -10; + } } - if(_status.event.skill){ - var viewAs=get.info(_status.event.skill).viewAs; - if(viewAs=='huogong') return -1.5; - if(viewAs&&viewAs.name=='huogong') return -1.5; + return 0; + }, + target:function(player,target){ + if(target.hasSkill('huogong2')||target.countCards('h')==0) return 0; + if(player.countCards('h')<=1) return 0; + if(target==player){ + if(typeof _status.event.filterCard=='function'&& + _status.event.filterCard({name:'huogong'})){ + return -1.5; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='huogong') return -1.5; + if(viewAs&&viewAs.name=='huogong') return -1.5; + } + return 0; + } + return -1.5; + } + }, + tag:{ + damage:1, + fireDamage:1, + natureDamage:1, + norepeat:1 + } + } + }, + tiesuo:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + filterTarget:true, + selectTarget:[1,2], + content:function(){ + target.link(); + }, + chongzhu:true, + ai:{ + wuxie:function(){ + if(Math.random()<0.5) return 0; + }, + basic:{ + useful:4, + value:4, + order:7 + }, + result:{ + target:function(player,target){ + if(target.isLinked()) return 1; + if(get.attitude(player,target)>=0) return -1; + if(ui.selected.targets.length) return -1; + if(game.hasPlayer(function(current){ + return get.attitude(player,current)<=-1&¤t!=target&&!current.isLinked(); + })){ + return -1; } return 0; } - return -1.5; + }, + tag:{ + multitarget:1, + multineg:1, + norepeat:1 + } + } + }, + bingliang:{ + audio:true, + fullskin:true, + type:'delay', + range:{global:1}, + filterTarget:function(card,player,target){ + return (lib.filter.judge(card,player,target)&&player!=target); + }, + judge:function(card){ + if(get.suit(card)=='club') return 0; + return -3; + }, + effect:function(){ + if(result.bool==false){ + player.skip('phaseDraw'); } }, - tag:{ - damage:1, - fireDamage:1, - natureDamage:1, - norepeat:1 - } - } - }, - tiesuo:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - filterTarget:true, - selectTarget:[1,2], - content:function(){ - target.link(); - }, - chongzhu:true, - ai:{ - wuxie:function(){ - if(Math.random()<0.5) return 0; - }, - basic:{ - useful:4, - value:4, - order:7 - }, - result:{ - target:function(player,target){ - if(target.isLinked()) return 1; - if(get.attitude(player,target)>=0) return -1; - if(ui.selected.targets.length) return -1; - if(game.hasPlayer(function(current){ - return get.attitude(player,current)<=-1&¤t!=target&&!current.isLinked(); - })){ - return -1; + ai:{ + basic:{ + order:1, + useful:1, + value:4, + }, + result:{ + target:function(player,target){ + return -1-target.countCards('h'); } - return 0; + }, + tag:{ + skip:'phaseDraw' + } + } + }, + hualiu:{ + fullskin:true, + type:'equip', + subtype:'equip3', + distance:{globalTo:1}, + }, + zhuque:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-3}, + ai:{ + basic:{ + equipValue:2 } }, + skills:['zhuque_skill'] + }, + guding:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-1}, + ai:{ + basic:{ + equipValue:2 + } + }, + skills:['guding_skill'] + }, + tengjia:{ + fullskin:true, + type:'equip', + subtype:'equip2', + ai:{ + basic:{ + equipValue:function(card,player){ + if(player.hasSkillTag('maixie')&&player.hp>1) return 0; + if(player.hasSkillTag('noDirectDamage')) return 10; + if(get.damageEffect(player,player,player,'fire')>=0) return 10; + var num=3-game.countPlayer(function(current){ + return get.attitude(current,player)<0; + }); + if(player.hp==1) num+=4; + if(player.hp==2) num+=1; + if(player.hp==3) num--; + if(player.hp>3) num-=4; + return num; + } + }, + }, + skills:['tengjia1','tengjia2'] + }, + baiyin:{ + fullskin:true, + type:'equip', + subtype:'equip2', + onLose:function(){ + player.recover(); + }, + filterLose:function(card,player){ + return player.hp1) return 0; - if(player.hasSkillTag('noDirectDamage')) return 10; - if(get.damageEffect(player,player,player,'fire')>=0) return 10; - var num=3-game.countPlayer(function(current){ - return get.attitude(current,player)<0; - }); - if(player.hp==1) num+=4; - if(player.hp==2) num+=1; - if(player.hp==3) num--; - if(player.hp>3) num-=4; - return num; - } - }, - }, - skills:['tengjia1','tengjia2'] - }, - baiyin:{ - fullskin:true, - type:'equip', - subtype:'equip2', - onLose:function(){ - player.recover(); - }, - filterLose:function(card,player){ - return player.hp0; + tengjia1:{ + trigger:{target:'useCardToBefore'}, + forced:true, + priority:6, + audio:true, + filter:function(event,player){ + if(event.player.hasSkillTag('unequip',false,event.card)) return false; + if(event.card.name=='nanman') return true; + if(event.card.name=='wanjian') return true; + if(event.card.name=='sha'&&!event.card.nature) return true; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(player.hasSkillTag('unequip',false,card)) return; + if(card.name=='nanman'||card.name=='wanjian') return 'zerotarget'; + if(card.name=='sha'){ + var equip1=player.getEquip(1); + if(equip1&&equip1.name=='zhuque') return 2; + if(equip1&&equip1.name=='qinggang') return 1; + if(!card.nature) return 'zerotarget'; + } + } + } } - return att<=0; }, - content:function(){ - trigger.card.nature='fire'; - player.addSkill('zhuque_skill2'); - player.storage.zhuque_skill=trigger.card; - } + tengjia2:{ + trigger:{player:'damageBegin'}, + filter:function(event){ + if(event.nature=='fire') return true; + }, + audio:true, + forced:true, + content:function(){ + trigger.num++; + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'){ + if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2; + } + if(get.tag(card,'fireDamage')&¤t<0) return 2; + } + } + } + }, + baiyin_skill:{ + trigger:{player:'damageBegin'}, + forced:true, + audio:true, + filter:function(event,player){ + if(event.num<=1) return false; + if(event.source&&event.source.hasSkillTag('unequip',false,event.card)) return false; + return true; + }, + priority:-10, + content:function(){ + trigger.num=1; + } + }, + zhuque_skill:{ + trigger:{player:'useCardToBefore'}, + priority:7, + filter:function(event,player){ + if(event.card.name=='sha'&&!event.card.nature) return true; + }, + audio:true, + check:function(event,player){ + var att=get.attitude(player,event.target); + if(event.target.hasSkillTag('nofire')){ + return att>0; + } + return att<=0; + }, + content:function(){ + trigger.card.nature='fire'; + player.addSkill('zhuque_skill2'); + player.storage.zhuque_skill=trigger.card; + } + }, + zhuque_skill2:{ + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + content:function(){ + delete player.storage.zhuque_skill.nature; + } + }, + huogon2:{}, }, - zhuque_skill2:{ - trigger:{player:'useCardAfter'}, - forced:true, - popup:false, - content:function(){ - delete player.storage.zhuque_skill.nature; - } + translate:{ + jiu:'酒', + jiu_info:'出牌阶段,对自己使用,令自己的下一张使用的【杀】造成的伤害+1(每回合限使用1次);濒死阶段,对自己使用,回复1点体力', + huogong:'火攻', + tiesuo:'铁锁连环', + tiesuo_info:'出牌阶段使用,选择1至2个角色,分别横置或重置这些角色', + huogong_bg:'攻', + huogong_info:'目标角色展示一张手牌,然后若你能弃掉一张与所展示牌相同花色的手牌,则火攻对该角色造成1点火焰伤害。', + tiesuo_bg:'锁', + bingliang:'兵粮寸断', + hualiu:'骅骝', + zhuque:'朱雀羽扇', + bingliang_bg:'粮', + bingliang_info:'目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。', + hualiu_bg:'+马', + hualiu_info:'你的防御距离+1', + zhuque_bg:'扇', + zhuque_skill:'朱雀羽扇', + zhuque_info:'你可以将一张普通【杀】当具火焰伤害的【杀】使用。', + guding:'古锭刀', + guding_info:'锁定技,当你使用【杀】对目标角色造成伤害时,若其没有手牌,此伤害+1。', + guding_skill:'古锭刀', + tengjia:'藤甲', + tengjia_info:'锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。', + tengjia1:'藤甲', + tengjia2:'藤甲', + baiyin:'白银狮子', + baiyin_info:'锁定技,你每次受到伤害时,最多承受1点伤害(防止多余的伤害);当你失去装备区里的【白银狮子】时,你回复1点体力。', + baiyin_skill:'白银狮子', + _baiyin:'白银狮子', }, - huogon2:{}, - }, - translate:{ - jiu:'酒', - jiu_info:'出牌阶段,对自己使用,令自己的下一张使用的【杀】造成的伤害+1(每回合限使用1次);濒死阶段,对自己使用,回复1点体力', - huogong:'火攻', - tiesuo:'铁锁连环', - tiesuo_info:'出牌阶段使用,选择1至2个角色,分别横置或重置这些角色', - huogong_bg:'攻', - huogong_info:'目标角色展示一张手牌,然后若你能弃掉一张与所展示牌相同花色的手牌,则火攻对该角色造成1点火焰伤害。', - tiesuo_bg:'锁', - bingliang:'兵粮寸断', - hualiu:'骅骝', - zhuque:'朱雀羽扇', - bingliang_bg:'粮', - bingliang_info:'目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。', - hualiu_bg:'+马', - hualiu_info:'你的防御距离+1', - zhuque_bg:'扇', - zhuque_skill:'朱雀羽扇', - zhuque_info:'你可以将一张普通【杀】当具火焰伤害的【杀】使用。', - guding:'古锭刀', - guding_info:'锁定技,当你使用【杀】对目标角色造成伤害时,若其没有手牌,此伤害+1。', - guding_skill:'古锭刀', - tengjia:'藤甲', - tengjia_info:'锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。', - tengjia1:'藤甲', - tengjia2:'藤甲', - baiyin:'白银狮子', - baiyin_info:'锁定技,你每次受到伤害时,最多承受1点伤害(防止多余的伤害);当你失去装备区里的【白银狮子】时,你回复1点体力。', - baiyin_skill:'白银狮子', - _baiyin:'白银狮子', - }, - list:[ - ["heart",4,"sha","fire"], - ["heart",7,"sha","fire"], - ["heart",10,"sha","fire"], - ["diamond",4,"sha","fire"], - ["diamond",5,"sha","fire"], - ["spade",4,"sha","thunder"], - ["spade",5,"sha","thunder"], - ["spade",6,"sha","thunder"], - ["spade",7,"sha","thunder"], - ["spade",8,"sha","thunder"], - ["club",5,"sha","thunder"], - ["club",6,"sha","thunder"], - ["club",7,"sha","thunder"], - ["club",8,"sha","thunder"], - ["heart",8,"shan"], - ["heart",9,"shan"], - ["heart",11,"shan"], - ["heart",12,"shan"], - ["diamond",6,"shan"], - ["diamond",7,"shan"], - ["diamond",8,"shan"], - ["diamond",10,"shan"], - ["diamond",11,"shan"], - ["heart",5,"tao"], - ["heart",6,"tao"], - ["diamond",2,"tao"], - ["diamond",3,"tao"], - ["diamond",9,"jiu"], - ["spade",3,"jiu"], - ["spade",9,"jiu"], - ["club",3,"jiu"], - ["club",9,"jiu"], + list:[ + ["heart",4,"sha","fire"], + ["heart",7,"sha","fire"], + ["heart",10,"sha","fire"], + ["diamond",4,"sha","fire"], + ["diamond",5,"sha","fire"], + ["spade",4,"sha","thunder"], + ["spade",5,"sha","thunder"], + ["spade",6,"sha","thunder"], + ["spade",7,"sha","thunder"], + ["spade",8,"sha","thunder"], + ["club",5,"sha","thunder"], + ["club",6,"sha","thunder"], + ["club",7,"sha","thunder"], + ["club",8,"sha","thunder"], + ["heart",8,"shan"], + ["heart",9,"shan"], + ["heart",11,"shan"], + ["heart",12,"shan"], + ["diamond",6,"shan"], + ["diamond",7,"shan"], + ["diamond",8,"shan"], + ["diamond",10,"shan"], + ["diamond",11,"shan"], + ["heart",5,"tao"], + ["heart",6,"tao"], + ["diamond",2,"tao"], + ["diamond",3,"tao"], + ["diamond",9,"jiu"], + ["spade",3,"jiu"], + ["spade",9,"jiu"], + ["club",3,"jiu"], + ["club",9,"jiu"], - ["diamond",13,"hualiu"], - ["club",1,"baiyin"], - ["spade",2,"tengjia",'fire'], - ["club",2,"tengjia",'fire'], - ["spade",1,"guding"], - ["diamond",1,"zhuque",'fire'], + ["diamond",13,"hualiu"], + ["club",1,"baiyin"], + ["spade",2,"tengjia",'fire'], + ["club",2,"tengjia",'fire'], + ["spade",1,"guding"], + ["diamond",1,"zhuque",'fire'], - ["heart",2,"huogong","fire"], - ["heart",3,"huogong","fire"], - ["diamond",12,"huogong","fire"], - ["spade",11,"tiesuo"], - ["spade",12,"tiesuo"], - ["club",10,"tiesuo"], - ["club",11,"tiesuo"], - ["club",12,"tiesuo"], - ["club",13,"tiesuo"], - ["heart",13,"wuxie"], - ["heart",13,"wuxie"], - ["spade",13,"wuxie"], - ["spade",10,"bingliang"], - ["club",4,"bingliang"], - ], + ["heart",2,"huogong","fire"], + ["heart",3,"huogong","fire"], + ["diamond",12,"huogong","fire"], + ["spade",11,"tiesuo"], + ["spade",12,"tiesuo"], + ["club",10,"tiesuo"], + ["club",11,"tiesuo"], + ["club",12,"tiesuo"], + ["club",13,"tiesuo"], + ["heart",13,"wuxie"], + ["heart",13,"wuxie"], + ["spade",13,"wuxie"], + ["spade",10,"bingliang"], + ["club",4,"bingliang"], + ], + } }); diff --git a/card/gujian.js b/card/gujian.js index e9570193a..fc91989f6 100644 --- a/card/gujian.js +++ b/card/gujian.js @@ -1,1689 +1,1697 @@ 'use strict'; -game.import('card',{ - name:'gujian', - card:{ - luyugeng:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('luyugeng'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.luyugeng=card; - target.storage.luyugeng_markcount=2; - target.addSkill('luyugeng'); - }, - ai:{ - order:2, - value:4, - result:{ - target:1 - } - } - }, - jinlianzhu:{ - type:'trick', - fullskin:true, - filterTarget:true, - content:function(){ - var evt=event.getParent(3)._trigger; - evt.untrigger(); - evt.finish(); - if(evt.source){ - evt.source.draw(); - } - }, - ai:{ - order:1, - value:[5,1], - useful:[6,1], - result:{ - target:function(player,target){ - var evt=_status.event.getTrigger(); - var eff=get.damageEffect(target,evt.source,target,evt.nature); - if(eff>0) return -1; - if(eff<0) return 2; - return 0; - } - } - } - }, - chunbing:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('chunbing'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.chunbing=card; - target.storage.chunbing_markcount=5; - target.addSkill('chunbing'); - }, - ai:{ - order:2, - value:4, - result:{ - target:function(player,target){ - var num=target.needsToDiscard(); - if(num){ - if(target==player&&num>1){ - return num; - } - return Math.sqrt(num); - } - return 0; - } - } - } - }, - gudonggeng:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('gudonggeng'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.gudonggeng=card; - target.storage.gudonggeng_markcount=3; - target.addSkill('gudonggeng'); - }, - ai:{ - order:2, - value:4, - result:{ - target:function(player,target){ - if(player==target&&!player.hasShan()) return 2; - return 1/Math.max(1,target.hp); - } - } - } - }, - liyutang:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('liyutang'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.liyutang=card; - target.storage.liyutang_markcount=2; - target.addSkill('liyutang'); - }, - ai:{ - order:2, - value:4, - result:{ - target:function(player,target){ - if(player==target&&target.isLowestHp()) return 2; - if(target.isLowestHp()) return 1.5; - return 1/Math.max(1,target.hp); - } - } - } - }, - mizhilianou:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('mizhilianou'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.mizhilianou=card; - target.storage.mizhilianou_markcount=4; - target.addSkill('mizhilianou'); - }, - ai:{ - order:2, - value:4, - result:{ - target:function(player,target){ - if(target==player){ - if(target.countCards('he',{suit:'heart'})){ - if(target.isDamaged()) return 1.5; - } - else{ - return 0.2; - } - } - else if(target.isDamaged()){ - return 1; - } - return 0.5; - } - } - } - }, - xiajiao:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('xiajiao'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.xiajiao=card; - target.storage.xiajiao_markcount=3; - target.addSkill('xiajiao'); - target.addTempSkill('xiajiao3','phaseAfter'); - }, - ai:{ - order:2, - value:5, - result:{ - target:1 - } - } - }, - tanhuadong:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('tanhuadong'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.tanhuadong=card; - target.storage.tanhuadong_markcount=3; - target.addSkill('tanhuadong'); - }, - ai:{ - order:2, - value:5, - result:{ - target:1 - } - } - }, - mapodoufu:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('mapodoufu'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.mapodoufu=card; - target.storage.mapodoufu_markcount=3; - target.addSkill('mapodoufu'); - }, - ai:{ - order:2, - value:5, - result:{ - target:function(player,target){ - return player==target?2:1; - } - } - } - }, - qingtuan:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('qingtuan'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.qingtuan=card; - target.storage.qingtuan_markcount=2; - target.addSkill('qingtuan'); - }, - ai:{ - order:4, - value:4, - result:{ - target:function(player,target){ - if(target==player){ - if(target.hasSha()) return 2; - } - else{ - var nh=target.countCards('h'); - if(nh>=3) return 1; - if(target.hasSha()) return 1; - if(nh&&Math.random()<0.5) return 1; - } - return player.needsToDiscard()?0.2:0; - } - } - } - }, - yougeng:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('yougeng'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.yougeng=card; - target.storage.yougeng_markcount=2; - target.addSkill('yougeng'); - }, - ai:{ - order:2, - value:4, - result:{ - target:function(player,target){ - if(target.isHealthy()) return player.needsToDiscard()?0.1:0; - if(target.isLowestHp()) return 1.5; - return 1/Math.max(1,target.hp); - } - } - } - }, - molicha:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('molicha'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.discard(target.getCards('j')); - target.storage.molicha=card; - target.storage.molicha_markcount=5; - target.addSkill('molicha'); - }, - ai:{ - order:2, - value:4, - result:{ - target:function(player,target){ - if(target.countCards('j')) return 2; - return 1; - } - } - } - }, - yuanbaorou:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('yuanbaorou'); - }, - range:{global:1}, - content:function(){ - target.$gain2(cards); - target.storage.yuanbaorou=card; - target.storage.yuanbaorou_markcount=3; - target.addSkill('yuanbaorou'); - }, - ai:{ - order:2, - value:4, - result:{ - target:function(player,target){ - if(target==player){ - if(target.hasSha()) return 2; - } - else{ - var nh=target.countCards('h'); - if(nh>=3) return 1; - if(target.hasSha()) return 1; - if(nh&&Math.random()<0.5) return 1; - } - return player.needsToDiscard()?0.2:0; - } - } - } - }, - heilonglinpian:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - modTarget:true, - content:function(){ - target.changeHujia(); - target.addTempSkill('heilonglinpian',{player:'phaseBegin'}); - }, - ai:{ - value:[5.5,1], - useful:1, - order:2, - result:{ - target:1 - } - } - }, - mutoumianju:{ - fullskin:true, - type:'equip', - subtype:'equip2', - skills:['mutoumianju_skill'], - ai:{ - equipValue:4 - } - }, - yuheng:{ - fullskin:true, - type:'equip', - subtype:'equip5', - nopower:true, - nomod:true, - unique:true, - skills:['yuheng_skill'], - ai:{ - equipValue:function(card,player){ - if(player.hp>=4) return 5; - if(player.hp>=3) return 4; - if(player.hp>=2) return 2; - return 1; - } - } - }, - yuheng_plus:{ - fullskin:true, - type:'equip', - subtype:'equip5', - nopower:true, - unique:true, - nomod:true, - epic:true, - cardimage:'yuheng', - skills:['yuheng_plus_skill'], - ai:{ - equipValue:function(card,player){ - if(player.hp>=4) return 7; - if(player.hp>=3) return 6; - if(player.hp>=2) return 2.5; - return 1; - } - } - }, - yuheng_pro:{ - fullskin:true, - type:'equip', - subtype:'equip5', - nopower:true, - unique:true, - nomod:true, - legend:true, - cardimage:'yuheng', - skills:['yuheng_pro_skill'], - ai:{ - equipValue:function(card,player){ - if(player.hp>=4) return 7.5; - if(player.hp>=3) return 6; - if(player.hp>=2) return 2.5; - return 1; - } - } - }, - shujinsan:{ - fullskin:true, - type:'basic', - enable:true, - filterTarget:function(card,player,target){ - return target.countCards('he')>0; - }, - content:function(){ - 'step 0' - target.chooseToDiscard('he',[1,target.countCards('he')],'弃置任意张牌并摸等量的牌').ai=function(card){ - return 6-get.value(card); - } - 'step 1' - if(result.bool){ - target.draw(result.cards.length); - } - }, - ai:{ - order:1.5, - value:[4,1], - result:{ - target:function(player,target){ - if(target==player){ - var cards=player.getCards('he'); - var num=-1; - for(var i=0;i0) return -1; + if(eff<0) return 2; + return 0; + } + } + } + }, + chunbing:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('chunbing'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.chunbing=card; + target.storage.chunbing_markcount=5; + target.addSkill('chunbing'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + var num=target.needsToDiscard(); + if(num){ + if(target==player&&num>1){ + return num; + } + return Math.sqrt(num); + } + return 0; + } + } + } + }, + gudonggeng:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('gudonggeng'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.gudonggeng=card; + target.storage.gudonggeng_markcount=3; + target.addSkill('gudonggeng'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + if(player==target&&!player.hasShan()) return 2; + return 1/Math.max(1,target.hp); + } + } + } + }, + liyutang:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('liyutang'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.liyutang=card; + target.storage.liyutang_markcount=2; + target.addSkill('liyutang'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + if(player==target&&target.isLowestHp()) return 2; + if(target.isLowestHp()) return 1.5; + return 1/Math.max(1,target.hp); + } + } + } + }, + mizhilianou:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('mizhilianou'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.mizhilianou=card; + target.storage.mizhilianou_markcount=4; + target.addSkill('mizhilianou'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + if(target==player){ + if(target.countCards('he',{suit:'heart'})){ + if(target.isDamaged()) return 1.5; + } + else{ + return 0.2; + } + } + else if(target.isDamaged()){ + return 1; + } + return 0.5; + } + } + } + }, + xiajiao:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('xiajiao'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.xiajiao=card; + target.storage.xiajiao_markcount=3; + target.addSkill('xiajiao'); + target.addTempSkill('xiajiao3','phaseAfter'); + }, + ai:{ + order:2, + value:5, + result:{ + target:1 + } + } + }, + tanhuadong:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('tanhuadong'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.tanhuadong=card; + target.storage.tanhuadong_markcount=3; + target.addSkill('tanhuadong'); + }, + ai:{ + order:2, + value:5, + result:{ + target:1 + } + } + }, + mapodoufu:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('mapodoufu'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.mapodoufu=card; + target.storage.mapodoufu_markcount=3; + target.addSkill('mapodoufu'); + }, + ai:{ + order:2, + value:5, + result:{ + target:function(player,target){ + return player==target?2:1; + } + } + } + }, + qingtuan:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('qingtuan'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.qingtuan=card; + target.storage.qingtuan_markcount=2; + target.addSkill('qingtuan'); + }, + ai:{ + order:4, + value:4, + result:{ + target:function(player,target){ + if(target==player){ + if(target.hasSha()) return 2; + } + else{ + var nh=target.countCards('h'); + if(nh>=3) return 1; + if(target.hasSha()) return 1; + if(nh&&Math.random()<0.5) return 1; + } + return player.needsToDiscard()?0.2:0; + } + } + } + }, + yougeng:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('yougeng'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.yougeng=card; + target.storage.yougeng_markcount=2; + target.addSkill('yougeng'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + if(target.isHealthy()) return player.needsToDiscard()?0.1:0; + if(target.isLowestHp()) return 1.5; + return 1/Math.max(1,target.hp); + } + } + } + }, + molicha:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('molicha'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.discard(target.getCards('j')); + target.storage.molicha=card; + target.storage.molicha_markcount=5; + target.addSkill('molicha'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + if(target.countCards('j')) return 2; + return 1; + } + } + } + }, + yuanbaorou:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('yuanbaorou'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.yuanbaorou=card; + target.storage.yuanbaorou_markcount=3; + target.addSkill('yuanbaorou'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + if(target==player){ + if(target.hasSha()) return 2; + } + else{ + var nh=target.countCards('h'); + if(nh>=3) return 1; + if(target.hasSha()) return 1; + if(nh&&Math.random()<0.5) return 1; + } + return player.needsToDiscard()?0.2:0; + } + } + } + }, + heilonglinpian:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + modTarget:true, + content:function(){ + target.changeHujia(); + target.addTempSkill('heilonglinpian',{player:'phaseBegin'}); + }, + ai:{ + value:[5.5,1], + useful:1, + order:2, + result:{ + target:1 + } + } + }, + mutoumianju:{ + fullskin:true, + type:'equip', + subtype:'equip2', + skills:['mutoumianju_skill'], + ai:{ + equipValue:4 + } + }, + yuheng:{ + fullskin:true, + type:'equip', + subtype:'equip5', + nopower:true, + nomod:true, + unique:true, + skills:['yuheng_skill'], + ai:{ + equipValue:function(card,player){ + if(player.hp>=4) return 5; + if(player.hp>=3) return 4; + if(player.hp>=2) return 2; + return 1; + } + } + }, + yuheng_plus:{ + fullskin:true, + type:'equip', + subtype:'equip5', + nopower:true, + unique:true, + nomod:true, + epic:true, + cardimage:'yuheng', + skills:['yuheng_plus_skill'], + ai:{ + equipValue:function(card,player){ + if(player.hp>=4) return 7; + if(player.hp>=3) return 6; + if(player.hp>=2) return 2.5; + return 1; + } + } + }, + yuheng_pro:{ + fullskin:true, + type:'equip', + subtype:'equip5', + nopower:true, + unique:true, + nomod:true, + legend:true, + cardimage:'yuheng', + skills:['yuheng_pro_skill'], + ai:{ + equipValue:function(card,player){ + if(player.hp>=4) return 7.5; + if(player.hp>=3) return 6; + if(player.hp>=2) return 2.5; + return 1; + } + } + }, + shujinsan:{ + fullskin:true, + type:'basic', + enable:true, + filterTarget:function(card,player,target){ + return target.countCards('he')>0; + }, + content:function(){ + 'step 0' + target.chooseToDiscard('he',[1,target.countCards('he')],'弃置任意张牌并摸等量的牌').ai=function(card){ + return 6-get.value(card); + } + 'step 1' + if(result.bool){ + target.draw(result.cards.length); + } + }, + ai:{ + order:1.5, + value:[4,1], + result:{ + target:function(player,target){ + if(target==player){ + var cards=player.getCards('he'); + var num=-1; + for(var i=0;i0&&!target.hasSkill('bingpotong'); - }, - content:function(){ - "step 0" - if(target.countCards('h')==0||player.countCards('h')==0){ - event.finish(); - return; - } - player.chooseCard(true); - "step 1" - event.card1=result.cards[0]; - var rand=Math.random()<0.5; - target.chooseCard(true).ai=function(card){ - var num=0; - if(get.color(card)=='red'){ - if(rand) num-=6; - } - else{ - if(!rand) num-=6; - } - var value=get.value(card); - if(value>=8) return -100; - return num-value; - }; - "step 2" - event.card2=result.cards[0]; - ui.arena.classList.add('thrownhighlight'); - game.addVideo('thrownhighlight1'); - player.$compare(event.card1,target,event.card2); - game.delay(4); - "step 3" - game.log(player,'展示了',event.card1); - game.log(target,'展示了',event.card2); - if(get.color(event.card2)==get.color(event.card1)){ - player.discard(event.card1).animate=false; - target.$gain2(event.card2); - var clone=event.card1.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([clone])); + content:function(){ + target.storage.yunvyuanshen_skill=game.createCard('yunvyuanshen'); + target.addSkill('yunvyuanshen_skill'); + if(cards&&cards.length){ + card=cards[0]; } - target.loseHp(); - event.finish(); - } - else{ - player.$gain2(event.card1); - target.$gain2(event.card2); - game.delay(); - } - ui.arena.classList.remove('thrownhighlight'); - game.addVideo('thrownhighlight2'); - "step 4" - if(cards&&cards.length){ - player.gain(cards,'gain2'); - target.addTempSkill('bingpotong','phaseAfter'); - } - }, - ai:{ - basic:{ + if(target==targets[0]&&card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){ + card.clone.moveDelete(target); + game.addVideo('gain2',target,get.cardsInfo([card])); + } + }, + ai:{ + basic:{ + value:9, + useful:4, + }, order:2, - value:[5,1], - useful:1, - }, - result:{ - player:function(player,target){ - if(player.countCards('h')<=Math.min(5,Math.max(2,player.hp))&&_status.event.name=='chooseToUse'){ - if(typeof _status.event.filterCard=='function'&& - _status.event.filterCard({name:'dujian'})){ - return -10; - } - if(_status.event.skill){ - var viewAs=get.info(_status.event.skill).viewAs; - if(viewAs=='dujian') return -10; - if(viewAs&&viewAs.name=='dujian') return -10; - } - } - return 0; + result:{ + target:function(player,target){ + return 1/Math.sqrt(1+target.hp); + }, }, - target:function(player,target){ - if(player.countCards('h')<=1) return 0; - return -1.5; - } + } + }, + liuxiaxianniang:{ + fullskin:true, + type:'basic', + }, + bingpotong:{ + fullskin:true, + type:'jiguan', + enable:true, + wuxieable:true, + filterTarget:function(card,player,target){ + return target.countCards('h')>0&&!target.hasSkill('bingpotong'); }, - tag:{ - loseHp:1 - } - } - }, - feibiao:{ - type:'jiguan', - enable:true, - fullskin:true, - wuxieable:true, - filterTarget:function(card,player,target){ - return get.distance(player,target)>1; - }, - content:function(){ - "step 0" - if(!target.countCards('h',{color:'black'})){ - target.loseHp(); - event.finish(); - } - else{ - target.chooseToDiscard({color:'black'},'弃置一张黑色手牌或受流失一点体力').ai=function(card){ - return 8-get.value(card); + content:function(){ + "step 0" + if(target.countCards('h')==0||player.countCards('h')==0){ + event.finish(); + return; + } + player.chooseCard(true); + "step 1" + event.card1=result.cards[0]; + var rand=Math.random()<0.5; + target.chooseCard(true).ai=function(card){ + var num=0; + if(get.color(card)=='red'){ + if(rand) num-=6; + } + else{ + if(!rand) num-=6; + } + var value=get.value(card); + if(value>=8) return -100; + return num-value; }; - } - "step 1" - if(!result.bool){ - target.loseHp(); - } - }, - ai:{ - basic:{ - order:9, - value:3, - useful:1, + "step 2" + event.card2=result.cards[0]; + ui.arena.classList.add('thrownhighlight'); + game.addVideo('thrownhighlight1'); + player.$compare(event.card1,target,event.card2); + game.delay(4); + "step 3" + game.log(player,'展示了',event.card1); + game.log(target,'展示了',event.card2); + if(get.color(event.card2)==get.color(event.card1)){ + player.discard(event.card1).animate=false; + target.$gain2(event.card2); + var clone=event.card1.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([clone])); + } + target.loseHp(); + event.finish(); + } + else{ + player.$gain2(event.card1); + target.$gain2(event.card2); + game.delay(); + } + ui.arena.classList.remove('thrownhighlight'); + game.addVideo('thrownhighlight2'); + "step 4" + if(cards&&cards.length){ + player.gain(cards,'gain2'); + target.addTempSkill('bingpotong','phaseAfter'); + } }, - result:{ - target:-2 - }, - tag:{ - discard:1, - loseHp:1 - } - } - }, - qiankunbiao:{ - type:'jiguan', - enable:true, - fullskin:true, - wuxieable:true, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - changeTarget:function(player,targets){ - game.filterPlayer(function(current){ - return get.distance(targets[0],current,'pure')==1&¤t.countCards('he'); - },targets); - }, - content:function(){ - var he=target.getCards('he'); - if(he.length){ - target.discard(he.randomGet()).delay=false; - } - }, - contentAfter:function(){ - game.delay(0.5); - }, - ai:{ - order:7, - tag:{ - loseCard:1, - discard:1, - }, - wuxie:function(){ - return 0; - }, - result:{ - player:function(player,target){ - return game.countPlayer(function(current){ - if(current==target||(get.distance(target,current,'pure')==1&¤t.countCards('he'))){ - var att=get.attitude(player,current); - if(att>0){ - return -1; - } - else if(att<0){ - return 1; - } - } - }); - } - } - } - }, - wenhuangsan:{ - type:'jiguan', - enable:true, - fullskin:true, - }, - tuhunsha:{ - type:'jiguan', - enable:true, - fullskin:true, - }, - shenhuofeiya:{ - type:'jiguan', - enable:true, - fullskin:true, - }, - mianlijinzhen:{ - type:'jiguan', - enable:true, - fullskin:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - 'step 0' - target.draw('visible'); - 'step 1' - if(Array.isArray(result)&&get.suit(result[0])=='spade'){ - return; - } - else{ - target.damage(); - } - }, - ai:{ - order:2, - value:[4,1], - useful:1, - result:{ - target:-1.5 - }, - tag:{ - damage:1 - } - } - }, - longxugou:{ - type:'jiguan', - enable:true, - fullskin:true, - }, - liutouge:{ - type:'jiguan', - enable:true, - fullskin:true, - filterTarget:true, - wuxieable:true, - content:function(){ - var list=[1,2,3,4,5,6]; - if(player.getEnemies().contains(target)){ - if(target.countCards('he')==0){ - list.remove(1); - } - if(target.isLinked()){ - list.remove(4); - } - if(target.hasSkill('fengyin')){ - list.remove(5); - } - switch(list.randomGet()){ - case 1:target.discard(target.getCards('he').randomGet());break; - case 2:target.loseHp();break; - case 3:target.damage();break; - case 4:if(!target.isLinked()) target.link();break; - case 5:target.addTempSkill('fengyin',{player:'phaseAfter'});break; - case 6:{ - var list=[]; - for(var i=0;i
打出一张闪,否则本回合无法对其他角色使用卡牌'); - 'step 1' - if(!result.bool){ - _status.currentPhase.addTempSkill('shihuifen','phaseUseAfter'); - } - }, - ai:{ - order:1, - value:[5,1], - useful:[5,1], - tag:{ - respond:1, - respondShan:1, - }, - result:{ - target:function(player,target){ - if(target.countCards('h')>=3||target.needsToDiscard()) return -1.5; - return 0; - } - } - } - }, - }, - skill:{ - luyugeng:{ - mark:'card', - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '准备阶段,你对一名体力值全场最高的随机敌人造成一点雷属性伤害(剩余'+player.storage.luyugeng_markcount+'回合)' - } - }, - content:function(){ - var list=player.getEnemies(); - for(var i=0;i0; - }, - prompt:'将一张红桃牌当桃使用', - check:function(card){return 10-get.value(card)}, - ai:{ - skillTagFilter:function(player){ - return player.countCards('he',{suit:'heart'})>0; - }, - save:true, - } - } - } - }, - chunbing:{ - mark:'card', - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '你的手牌上限+1(剩余'+player.storage.chunbing_markcount+'回合)' - } - }, - mod:{ - maxHandcard:function(player,num){ - return num+1; - } - }, - content:function(){ - player.storage.chunbing_markcount--; - if(player.storage.chunbing_markcount==0){ - delete player.storage.chunbing; - delete player.storage.chunbing_markcount; - player.removeSkill('chunbing'); - } - else{ - player.updateMarks(); - } - }, - }, - gudonggeng:{ - mark:'card', - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '你受到杀造成的伤害时有50%的机率令伤害-1(剩余'+player.storage.gudonggeng_markcount+'回合)' - } - }, - content:function(){ - player.storage.gudonggeng_markcount--; - if(player.storage.gudonggeng_markcount==0){ - delete player.storage.gudonggeng; - delete player.storage.gudonggeng_markcount; - player.removeSkill('gudonggeng'); - } - else{ - player.updateMarks(); - } - }, - group:'gudonggeng_damage', - subSkill:{ - damage:{ - trigger:{player:'damageBegin'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.num>0&&Math.random()<0.5; - }, - forced:true, - content:function(){ - trigger.num--; - } - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(card.name=='sha'&&get.attitude(player,target)<0) return 0.5; - } - } - } - }, - qingtuan:{ - mark:'card', - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '你在回合内使用首张杀时摸一张牌(剩余'+player.storage.qingtuan_markcount+'回合)' - } - }, - content:function(){ - player.storage.qingtuan_markcount--; - if(player.storage.qingtuan_markcount==0){ - delete player.storage.qingtuan; - delete player.storage.qingtuan_markcount; - player.removeSkill('qingtuan'); - } - else{ - player.updateMarks(); - } - }, - group:'qingtuan_draw', - subSkill:{ - draw:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return event.card.name=='sha'&&_status.currentPhase==player; - }, - usable:1, - forced:true, - content:function(){ - player.draw(); - } - } - } - }, - liyutang:{ - mark:'card', - trigger:{player:'phaseEnd'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '结束阶段,若你的体力值为全场最少或之一,你获得一点护甲(剩余'+player.storage.liyutang_markcount+'回合)' - } - }, - content:function(){ - if(player.isLowestHp()){ - player.logSkill('liyutang'); - player.changeHujia(); - } - player.storage.liyutang_markcount--; - if(player.storage.liyutang_markcount==0){ - delete player.storage.liyutang; - delete player.storage.liyutang_markcount; - player.removeSkill('liyutang'); - } - else{ - player.updateMarks(); - } - }, - }, - yougeng:{ - mark:'card', - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '准备阶段,若你的体力值为全场最少或之一,你回复一点体力(剩余'+player.storage.yougeng_markcount+'回合)' - } - }, - content:function(){ - if(player.isDamaged()&&player.isLowestHp()){ - player.logSkill('yougeng'); - player.recover(); - } - player.storage.yougeng_markcount--; - if(player.storage.yougeng_markcount==0){ - delete player.storage.yougeng; - delete player.storage.yougeng_markcount; - player.removeSkill('yougeng'); - } - else{ - player.updateMarks(); - } - }, - }, - molicha:{ - mark:'card', - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '你不能成为延时锦囊牌的目标(剩余'+player.storage.molicha_markcount+'回合)' - } - }, - mod:{ - targetEnabled:function(card){ - if(get.type(card)=='delay'){ - return false; + ai:{ + basic:{ + order:2, + value:[5,1], + useful:1, + }, + result:{ + player:function(player,target){ + if(player.countCards('h')<=Math.min(5,Math.max(2,player.hp))&&_status.event.name=='chooseToUse'){ + if(typeof _status.event.filterCard=='function'&& + _status.event.filterCard({name:'dujian'})){ + return -10; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='dujian') return -10; + if(viewAs&&viewAs.name=='dujian') return -10; + } + } + return 0; + }, + target:function(player,target){ + if(player.countCards('h')<=1) return 0; + return -1.5; + } + }, + tag:{ + loseHp:1 } } - }, - content:function(){ - player.storage.molicha_markcount--; - if(player.storage.molicha_markcount==0){ - delete player.storage.molicha; - delete player.storage.molicha_markcount; - player.removeSkill('molicha'); - } - else{ - player.updateMarks(); - } - }, - ai:{ - effect:{ - target:function(card){ - if(get.type(card)=='delay'){ - return 'zeroplayertarget'; - } - } - } - } - }, - yuanbaorou:{ - mark:'card', - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '你在出牌阶段可以额外使用一张杀(剩余'+player.storage.yuanbaorou_markcount+'回合)' - } - }, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; + }, + feibiao:{ + type:'jiguan', + enable:true, + fullskin:true, + wuxieable:true, + filterTarget:function(card,player,target){ + return get.distance(player,target)>1; + }, + content:function(){ + "step 0" + if(!target.countCards('h',{color:'black'})){ + target.loseHp(); + event.finish(); + } + else{ + target.chooseToDiscard({color:'black'},'弃置一张黑色手牌或受流失一点体力').ai=function(card){ + return 8-get.value(card); + }; + } + "step 1" + if(!result.bool){ + target.loseHp(); + } + }, + ai:{ + basic:{ + order:9, + value:3, + useful:1, + }, + result:{ + target:-2 + }, + tag:{ + discard:1, + loseHp:1 + } + } + }, + qiankunbiao:{ + type:'jiguan', + enable:true, + fullskin:true, + wuxieable:true, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + changeTarget:function(player,targets){ + game.filterPlayer(function(current){ + return get.distance(targets[0],current,'pure')==1&¤t.countCards('he'); + },targets); + }, + content:function(){ + var he=target.getCards('he'); + if(he.length){ + target.discard(he.randomGet()).delay=false; + } + }, + contentAfter:function(){ + game.delay(0.5); + }, + ai:{ + order:7, + tag:{ + loseCard:1, + discard:1, + }, + wuxie:function(){ + return 0; + }, + result:{ + player:function(player,target){ + return game.countPlayer(function(current){ + if(current==target||(get.distance(target,current,'pure')==1&¤t.countCards('he'))){ + var att=get.attitude(player,current); + if(att>0){ + return -1; + } + else if(att<0){ + return 1; + } + } + }); + } + } + } + }, + wenhuangsan:{ + type:'jiguan', + enable:true, + fullskin:true, + }, + tuhunsha:{ + type:'jiguan', + enable:true, + fullskin:true, + }, + shenhuofeiya:{ + type:'jiguan', + enable:true, + fullskin:true, + }, + mianlijinzhen:{ + type:'jiguan', + enable:true, + fullskin:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + 'step 0' + target.draw('visible'); + 'step 1' + if(Array.isArray(result)&&get.suit(result[0])=='spade'){ + return; + } + else{ + target.damage(); + } + }, + ai:{ + order:2, + value:[4,1], + useful:1, + result:{ + target:-1.5 + }, + tag:{ + damage:1 + } + } + }, + longxugou:{ + type:'jiguan', + enable:true, + fullskin:true, + }, + liutouge:{ + type:'jiguan', + enable:true, + fullskin:true, + filterTarget:true, + wuxieable:true, + content:function(){ + var list=[1,2,3,4,5,6]; + if(player.getEnemies().contains(target)){ + if(target.countCards('he')==0){ + list.remove(1); + } + if(target.isLinked()){ + list.remove(4); + } + if(target.hasSkill('fengyin')){ + list.remove(5); + } + switch(list.randomGet()){ + case 1:target.discard(target.getCards('he').randomGet());break; + case 2:target.loseHp();break; + case 3:target.damage();break; + case 4:if(!target.isLinked()) target.link();break; + case 5:target.addTempSkill('fengyin',{player:'phaseAfter'});break; + case 6:{ + var list=[]; + for(var i=0;i
打出一张闪,否则本回合无法对其他角色使用卡牌'); + 'step 1' + if(!result.bool){ + _status.currentPhase.addTempSkill('shihuifen','phaseUseAfter'); + } + }, + ai:{ + order:1, + value:[5,1], + useful:[5,1], + tag:{ + respond:1, + respondShan:1, + }, + result:{ + target:function(player,target){ + if(target.countCards('h')>=3||target.needsToDiscard()) return -1.5; + return 0; + } + } + } + }, + }, + skill:{ + luyugeng:{ + mark:'card', + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '准备阶段,你对一名体力值全场最高的随机敌人造成一点雷属性伤害(剩余'+player.storage.luyugeng_markcount+'回合)' + } + }, + content:function(){ + var list=player.getEnemies(); + for(var i=0;i0; + }, + prompt:'将一张红桃牌当桃使用', + check:function(card){return 10-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + return player.countCards('he',{suit:'heart'})>0; + }, + save:true, + } + } + } + }, + chunbing:{ + mark:'card', + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '你的手牌上限+1(剩余'+player.storage.chunbing_markcount+'回合)' + } + }, + mod:{ + maxHandcard:function(player,num){ + return num+1; + } + }, + content:function(){ + player.storage.chunbing_markcount--; + if(player.storage.chunbing_markcount==0){ + delete player.storage.chunbing; + delete player.storage.chunbing_markcount; + player.removeSkill('chunbing'); + } + else{ + player.updateMarks(); + } + }, + }, + gudonggeng:{ + mark:'card', + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '你受到杀造成的伤害时有50%的机率令伤害-1(剩余'+player.storage.gudonggeng_markcount+'回合)' + } + }, + content:function(){ + player.storage.gudonggeng_markcount--; + if(player.storage.gudonggeng_markcount==0){ + delete player.storage.gudonggeng; + delete player.storage.gudonggeng_markcount; + player.removeSkill('gudonggeng'); + } + else{ + player.updateMarks(); + } + }, + group:'gudonggeng_damage', + subSkill:{ + damage:{ + trigger:{player:'damageBegin'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.num>0&&Math.random()<0.5; + }, + forced:true, + content:function(){ + trigger.num--; + } + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(card.name=='sha'&&get.attitude(player,target)<0) return 0.5; + } + } + } + }, + qingtuan:{ + mark:'card', + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '你在回合内使用首张杀时摸一张牌(剩余'+player.storage.qingtuan_markcount+'回合)' + } + }, + content:function(){ + player.storage.qingtuan_markcount--; + if(player.storage.qingtuan_markcount==0){ + delete player.storage.qingtuan; + delete player.storage.qingtuan_markcount; + player.removeSkill('qingtuan'); + } + else{ + player.updateMarks(); + } + }, + group:'qingtuan_draw', + subSkill:{ + draw:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return event.card.name=='sha'&&_status.currentPhase==player; + }, + usable:1, + forced:true, + content:function(){ + player.draw(); + } + } + } + }, + liyutang:{ + mark:'card', + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '结束阶段,若你的体力值为全场最少或之一,你获得一点护甲(剩余'+player.storage.liyutang_markcount+'回合)' + } + }, + content:function(){ + if(player.isLowestHp()){ + player.logSkill('liyutang'); + player.changeHujia(); + } + player.storage.liyutang_markcount--; + if(player.storage.liyutang_markcount==0){ + delete player.storage.liyutang; + delete player.storage.liyutang_markcount; + player.removeSkill('liyutang'); + } + else{ + player.updateMarks(); + } + }, + }, + yougeng:{ + mark:'card', + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '准备阶段,若你的体力值为全场最少或之一,你回复一点体力(剩余'+player.storage.yougeng_markcount+'回合)' + } + }, + content:function(){ + if(player.isDamaged()&&player.isLowestHp()){ + player.logSkill('yougeng'); + player.recover(); + } + player.storage.yougeng_markcount--; + if(player.storage.yougeng_markcount==0){ + delete player.storage.yougeng; + delete player.storage.yougeng_markcount; + player.removeSkill('yougeng'); + } + else{ + player.updateMarks(); + } + }, + }, + molicha:{ + mark:'card', + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '你不能成为延时锦囊牌的目标(剩余'+player.storage.molicha_markcount+'回合)' + } + }, + mod:{ + targetEnabled:function(card){ + if(get.type(card)=='delay'){ + return false; + } + } + }, + content:function(){ + player.storage.molicha_markcount--; + if(player.storage.molicha_markcount==0){ + delete player.storage.molicha; + delete player.storage.molicha_markcount; + player.removeSkill('molicha'); + } + else{ + player.updateMarks(); + } + }, + ai:{ + effect:{ + target:function(card){ + if(get.type(card)=='delay'){ + return 'zeroplayertarget'; + } + } + } + } + }, + yuanbaorou:{ + mark:'card', + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '你在出牌阶段可以额外使用一张杀(剩余'+player.storage.yuanbaorou_markcount+'回合)' + } + }, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + } + }, + content:function(){ + player.storage.yuanbaorou_markcount--; + if(player.storage.yuanbaorou_markcount==0){ + delete player.storage.yuanbaorou; + delete player.storage.yuanbaorou_markcount; + player.removeSkill('yuanbaorou'); + } + else{ + player.updateMarks(); + } + }, + }, + tanhuadong:{ + mark:'card', + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '结束阶段有,你50%机率摸一张牌(剩余'+player.storage.tanhuadong_markcount+'回合)' + } + }, + content:function(){ + if(Math.random()<0.5){ + player.logSkill('tanhuadong'); + player.draw(); + } + player.storage.tanhuadong_markcount--; + if(player.storage.tanhuadong_markcount==0){ + delete player.storage.tanhuadong; + delete player.storage.tanhuadong_markcount; + player.removeSkill('tanhuadong'); + } + else{ + player.updateMarks(); + } + } + }, + mapodoufu:{ + mark:'card', + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '结束阶段,你有65%的机率弃置一名随机敌人的一张随机牌(剩余'+player.storage.mapodoufu_markcount+'回合)' + } + }, + content:function(){ + if(Math.random()<0.65){ + var list=player.getEnemies(); + for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.loseHp(); - 'step 1' - var hs=target.getCards('h'); - if(hs.length){ - var card=hs.randomGet(); - player.gain(card,target); - target.$give(card,player); - if(get.suit(card)=='spade'){ - event.bool=true; - } - } - 'step 2' - if(event.bool){ - target.loseHp(); - } - var card=player.getEquip('yuheng'); - if(card){ - if(typeof card.storage.yuheng!='number'){ - card.storage.yuheng=1; - } - else{ - card.storage.yuheng++; - } - if(card.storage.yuheng>=3){ - card.init([card.suit,card.number,'yuheng_plus',card.nature]); - player.addTempSkill('yuheng_plus_temp','phaseAfter'); - } - } - }, - ai:{ - order:6, - result:{ - target:function(player,target){ - if(get.attitude(player,target)>=0) return 0; - var nh=target.countCards('h'); - var num=-1/Math.sqrt(1+nh); - if(player.hp>=4) return num; - if(player.hp>=3&&nh<=2) return num; - if(player.hp>=2&&target.hp==1&&nh<=2) return num; - return 0; - } - } - } - }, - yuheng_plus_temp:{}, - yuheng_plus_skill:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return !player.hasSkill('yuheng_plus_temp'); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.loseHp(); - 'step 1' - var hs=target.getCards('h'); - if(hs.length){ - var card=hs.randomGet(); - player.gain(card,target); - target.$give(card,player); - if(get.color(card)=='black'){ - event.bool=true; - } - } - 'step 2' - if(event.bool){ - target.loseHp(); - } - var card=player.getEquip('yuheng_plus'); - if(card){ - if(typeof card.storage.yuheng!='number'){ - card.storage.yuheng=1; - } - else{ - card.storage.yuheng++; - } - if(card.storage.yuheng>=7){ - card.init([card.suit,card.number,'yuheng_pro',card.nature]); - } - } - }, - ai:{ - order:6, - result:{ - target:function(player,target){ - if(get.attitude(player,target)>=0) return 0; - var nh=target.countCards('h'); - var num=-1/Math.sqrt(1+nh); - if(player.hp>=4) return num; - if(player.hp>=3&&nh<=2) return num; - if(player.hp>=2&&target.hp==1&&nh<=2) return num; - return 0; - } - } - } - }, - yuheng_pro_skill:{ - enable:'phaseUse', - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.loseHp(); - 'step 1' - var hs=target.getCards('h'); - if(hs.length){ - var card=hs.randomGet(); - player.gain(card,target); - target.$give(card,player); - if(get.color(card)=='black'){ - event.bool=true; - } - } - 'step 2' - if(event.bool){ - target.loseHp(); - } - }, - ai:{ - order:6, - result:{ - target:function(player,target){ - if(get.attitude(player,target)>=0) return 0; - var nh=target.countCards('h'); - var num=-1/Math.sqrt(1+nh); - if(player.hp>=4) return num; - if(player.hp>=3&&nh<=2) return num; - if(player.hp>=2&&target.hp==1&&nh<=2) return num; - return 0; - } - } - } - }, - shihuifen:{ - mark:true, - intro:{ - content:'使用卡牌无法指定其他角色为目标' - }, - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target) return false; - } - } - }, - _shihuifen:{ - trigger:{global:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - if(event.player.hasSkill('shihuifen')) return false; - if(event.player==player) return false; - if(!lib.filter.targetEnabled({name:'shihuifen'},player,event.player)) return false; - return player.hasCard('shihuifen')||player.hasSkillTag('shihuifen'); + yuheng_skill:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + var hs=target.getCards('h'); + if(hs.length){ + var card=hs.randomGet(); + player.gain(card,target); + target.$give(card,player); + if(get.suit(card)=='spade'){ + event.bool=true; + } + } + 'step 2' + if(event.bool){ + target.loseHp(); + } + var card=player.getEquip('yuheng'); + if(card){ + if(typeof card.storage.yuheng!='number'){ + card.storage.yuheng=1; + } + else{ + card.storage.yuheng++; + } + if(card.storage.yuheng>=3){ + card.init([card.suit,card.number,'yuheng_plus',card.nature]); + player.addTempSkill('yuheng_plus_temp','phaseAfter'); + } + } + }, + ai:{ + order:6, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>=0) return 0; + var nh=target.countCards('h'); + var num=-1/Math.sqrt(1+nh); + if(player.hp>=4) return num; + if(player.hp>=3&&nh<=2) return num; + if(player.hp>=2&&target.hp==1&&nh<=2) return num; + return 0; + } + } + } + }, + yuheng_plus_temp:{}, + yuheng_plus_skill:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.hasSkill('yuheng_plus_temp'); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + var hs=target.getCards('h'); + if(hs.length){ + var card=hs.randomGet(); + player.gain(card,target); + target.$give(card,player); + if(get.color(card)=='black'){ + event.bool=true; + } + } + 'step 2' + if(event.bool){ + target.loseHp(); + } + var card=player.getEquip('yuheng_plus'); + if(card){ + if(typeof card.storage.yuheng!='number'){ + card.storage.yuheng=1; + } + else{ + card.storage.yuheng++; + } + if(card.storage.yuheng>=7){ + card.init([card.suit,card.number,'yuheng_pro',card.nature]); + } + } + }, + ai:{ + order:6, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>=0) return 0; + var nh=target.countCards('h'); + var num=-1/Math.sqrt(1+nh); + if(player.hp>=4) return num; + if(player.hp>=3&&nh<=2) return num; + if(player.hp>=2&&target.hp==1&&nh<=2) return num; + return 0; + } + } + } + }, + yuheng_pro_skill:{ + enable:'phaseUse', + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + var hs=target.getCards('h'); + if(hs.length){ + var card=hs.randomGet(); + player.gain(card,target); + target.$give(card,player); + if(get.color(card)=='black'){ + event.bool=true; + } + } + 'step 2' + if(event.bool){ + target.loseHp(); + } + }, + ai:{ + order:6, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>=0) return 0; + var nh=target.countCards('h'); + var num=-1/Math.sqrt(1+nh); + if(player.hp>=4) return num; + if(player.hp>=3&&nh<=2) return num; + if(player.hp>=2&&target.hp==1&&nh<=2) return num; + return 0; + } + } + } + }, + shihuifen:{ + mark:true, + intro:{ + content:'使用卡牌无法指定其他角色为目标' + }, + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target) return false; + } + } + }, + _shihuifen:{ + trigger:{global:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + if(event.player.hasSkill('shihuifen')) return false; + if(event.player==player) return false; + if(!lib.filter.targetEnabled({name:'shihuifen'},player,event.player)) return false; + return player.hasCard('shihuifen')||player.hasSkillTag('shihuifen'); + }, + content:function(){ + player.chooseToUse(get.prompt('shihuifen',trigger.player).replace(/发动/,'使用'),function(card,player){ + if(card.name!='shihuifen') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + },trigger.player,-1).targetRequired=true; + } }, - content:function(){ - player.chooseToUse(get.prompt('shihuifen',trigger.player).replace(/发动/,'使用'),function(card,player){ - if(card.name!='shihuifen') return false; - return lib.filter.cardEnabled(card,player,'forceEnable'); - },trigger.player,-1).targetRequired=true; - } - }, - _jinlianzhu:{ - trigger:{global:'damageBefore'}, - direct:true, - filter:function(event,player){ - if(!lib.filter.targetEnabled({name:'jinlianzhu'},player,event.player)) return false; - return player.hasCard('jinlianzhu'); + _jinlianzhu:{ + trigger:{global:'damageBefore'}, + direct:true, + filter:function(event,player){ + if(!lib.filter.targetEnabled({name:'jinlianzhu'},player,event.player)) return false; + return player.hasCard('jinlianzhu'); + }, + content:function(){ + player.chooseToUse(get.prompt('jinlianzhu',trigger.player).replace(/发动/,'使用'),function(card,player){ + if(card.name!='jinlianzhu') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + },trigger.player,-1).targetRequired=true; + } }, - content:function(){ - player.chooseToUse(get.prompt('jinlianzhu',trigger.player).replace(/发动/,'使用'),function(card,player){ - if(card.name!='jinlianzhu') return false; - return lib.filter.cardEnabled(card,player,'forceEnable'); - },trigger.player,-1).targetRequired=true; - } - }, - }, - cardType:{ - food:0.3 - }, - translate:{ - jinlianzhu:'金莲珠', - jinlianzhu_info:'对一名即将受到伤害的角色使用,防止此伤害,并令伤害来源摸一张牌', - shihuifen:'石灰粉', - shihuifen_info:'在一名其他角色的出牌阶段开始时对其使用,目标需打出一张闪,否则此阶段使用卡牌无法指定其他角色为目标', - liufengsan:'流风散', - liufengsan_info:'出牌阶段对一名角色使用,目标获得两张闪', - liutouge:'六骰格', - liutouge_info:'出牌阶段对一名角色使用,若目标是敌人,对目标施加一个随机的负面效果;否则对目标施加一个随机的正面效果', - // longxugou:'龙须钩', - // longxugou_info:'龙须钩', - mianlijinzhen:'棉里针', - mianlijinzhen_info:'令一名角色摸一张牌并展示,若不是黑桃,你对其造成一点伤害', - // shenhuofeiya:'神火飞鸦', - // shenhuofeiya_info:'神火飞鸦', - // tuhunsha:'土魂砂', - // tuhunsha_info:'土魂砂', - // wenhuangsan:'瘟癀伞', - // wenhuangsan_info:'瘟癀伞', - qiankunbiao:'乾坤镖', - qiankunbiao_info:'随机弃置一名其他角色和其相邻角色的一张牌', + }, + cardType:{ + food:0.3 + }, + translate:{ + jinlianzhu:'金莲珠', + jinlianzhu_info:'对一名即将受到伤害的角色使用,防止此伤害,并令伤害来源摸一张牌', + shihuifen:'石灰粉', + shihuifen_info:'在一名其他角色的出牌阶段开始时对其使用,目标需打出一张闪,否则此阶段使用卡牌无法指定其他角色为目标', + liufengsan:'流风散', + liufengsan_info:'出牌阶段对一名角色使用,目标获得两张闪', + liutouge:'六骰格', + liutouge_info:'出牌阶段对一名角色使用,若目标是敌人,对目标施加一个随机的负面效果;否则对目标施加一个随机的正面效果', + // longxugou:'龙须钩', + // longxugou_info:'龙须钩', + mianlijinzhen:'棉里针', + mianlijinzhen_info:'令一名角色摸一张牌并展示,若不是黑桃,你对其造成一点伤害', + // shenhuofeiya:'神火飞鸦', + // shenhuofeiya_info:'神火飞鸦', + // tuhunsha:'土魂砂', + // tuhunsha_info:'土魂砂', + // wenhuangsan:'瘟癀伞', + // wenhuangsan_info:'瘟癀伞', + qiankunbiao:'乾坤镖', + qiankunbiao_info:'随机弃置一名其他角色和其相邻角色的一张牌', - bingpotong:'冰魄针', - bingpotong_info:'出牌阶段,对一名有手牌的角色使用,你与其同时展示一张手牌,若颜色相同,你弃置展示的牌,目标流失一点体力;若颜色不同,你收回此牌且本回合内不能再对该目标使用', - feibiao:'飞镖', - feibiao_info:'出牌阶段,对一名距离1以外的角色使用,令其弃置一张黑色手牌或流失一点体力', + bingpotong:'冰魄针', + bingpotong_info:'出牌阶段,对一名有手牌的角色使用,你与其同时展示一张手牌,若颜色相同,你弃置展示的牌,目标流失一点体力;若颜色不同,你收回此牌且本回合内不能再对该目标使用', + feibiao:'飞镖', + feibiao_info:'出牌阶段,对一名距离1以外的角色使用,令其弃置一张黑色手牌或流失一点体力', - // liuxiaxianniang:'流霞仙酿', - // liuxiaxianniang_info:'流霞仙酿', - yunvyuanshen:'玉女元参', - yunvyuanshen_skill:'玉女元参', - yunvyuanshen_info:'出牌阶段对一名角色使用,目标在下一次进入濒死状态时回复一点体力', - // ziyangdan:'紫阳丹', - // ziyangdan_info:'紫阳丹', - yuheng:'玉衡', - yuheng_plus:'玉衡', - yuheng_pro:'玉衡', - yuheng_skill:'玉衡', - yuheng_plus_skill:'玉衡', - yuheng_pro_skill:'玉衡', - yuheng_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的一张手牌并展示,若为黑桃牌,该角色也失去一点体力(此牌在本局游戏中第三次和第七次发动效果后,分别自动获得一次强化)', - yuheng_plus_info:'由普通玉衡强化得到,将玉衡技能描述中的“黑桃牌”改为“黑色牌”', - yuheng_pro_info:'由普通玉衡二次强化得到,将玉横技能描述中的“黑桃牌”改为“黑色牌”,并去掉使用次数限制', - yuheng_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑桃牌,该角色也失去一点体力', - yuheng_plus_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力', - yuheng_pro_skill_info:'出牌阶段,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力', - shujinsan:'舒筋散', - shujinsan_info:'出牌阶段对任意角色使用,目标可弃置任意张牌,并摸等量的牌', - mutoumianju:'木头面具', - mutoumianju_info:'你可以将一张手牌当作杀使用', - mutoumianju_skill:'木杀', - mutoumianju_skill_info:'你可以将一张手牌当作杀使用', - heilonglinpian:'黑龙鳞片', - heilonglinpian_info:'出牌阶段对自己使用,获得一点护甲,直到下一回合开始,你的防御距离+1', + // liuxiaxianniang:'流霞仙酿', + // liuxiaxianniang_info:'流霞仙酿', + yunvyuanshen:'玉女元参', + yunvyuanshen_skill:'玉女元参', + yunvyuanshen_info:'出牌阶段对一名角色使用,目标在下一次进入濒死状态时回复一点体力', + // ziyangdan:'紫阳丹', + // ziyangdan_info:'紫阳丹', + yuheng:'玉衡', + yuheng_plus:'玉衡', + yuheng_pro:'玉衡', + yuheng_skill:'玉衡', + yuheng_plus_skill:'玉衡', + yuheng_pro_skill:'玉衡', + yuheng_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的一张手牌并展示,若为黑桃牌,该角色也失去一点体力(此牌在本局游戏中第三次和第七次发动效果后,分别自动获得一次强化)', + yuheng_plus_info:'由普通玉衡强化得到,将玉衡技能描述中的“黑桃牌”改为“黑色牌”', + yuheng_pro_info:'由普通玉衡二次强化得到,将玉横技能描述中的“黑桃牌”改为“黑色牌”,并去掉使用次数限制', + yuheng_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑桃牌,该角色也失去一点体力', + yuheng_plus_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力', + yuheng_pro_skill_info:'出牌阶段,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力', + shujinsan:'舒筋散', + shujinsan_info:'出牌阶段对任意角色使用,目标可弃置任意张牌,并摸等量的牌', + mutoumianju:'木头面具', + mutoumianju_info:'你可以将一张手牌当作杀使用', + mutoumianju_skill:'木杀', + mutoumianju_skill_info:'你可以将一张手牌当作杀使用', + heilonglinpian:'黑龙鳞片', + heilonglinpian_info:'出牌阶段对自己使用,获得一点护甲,直到下一回合开始,你的防御距离+1', - food:'食物', - chunbing:'春饼', - chunbing_info:'你的手牌上限+1,持续五回合', - gudonggeng:'骨董羹', - gudonggeng_info:'你受到杀造成的伤害时有50%的机率令伤害-1,持续三回合', - yougeng:'酉羹', - yougeng_info:'准备阶段,若你的体力值为全场最少或之一,你回复一点体力,持续两回合', - liyutang:'鲤鱼汤', - liyutang_info:'结束阶段,若你的体力值为全场最少或之一,你获得一点护甲,持续两回合', - mizhilianou:'蜜汁藕', - mizhilianou_info:'你可以将一张红桃牌当作桃使用,持续四回合', - xiajiao:'虾饺', - xiajiao_info:'你在摸牌阶段额外摸一张牌,并在摸牌阶段时弃置一张牌,持续三回合', - tanhuadong:'昙花冻', - tanhuadong_info:'结束阶段,你有50%的机率摸一张牌,持续三回合', - qingtuan:'青团', - qingtuan_info:'你在回合内使用首张杀时摸一张牌,持续两回合', - luyugeng:'鲈鱼羹', - luyugeng_info:'准备阶段,你对一名体力值全场最高的随机敌人造成一点雷属性伤害,持续两回合', - yuanbaorou:'元宝肉', - yuanbaorou_info:'你在出牌阶段可以额外使用一张杀,持续三回合', - molicha:'茉莉茶', - molicha_info:'弃置判定区内的所有牌;你不能成为延时锦囊牌的目标,持续五回合', - mapodoufu:'麻婆豆腐', - mapodoufu_info:'结束阶段,你有65%的机率弃置一名随机敌人的一张随机牌,持续三回合', - }, - list:[ - ['spade',2,'tanhuadong'], - ['club',1,'molicha'], - ['club',3,'chunbing'], - ['heart',12,'yougeng'], - ['heart',8,'gudonggeng'], - ['heart',1,'liyutang'], - ['diamond',4,'mizhilianou'], - ['diamond',6,'xiajiao'], - ['spade',3,'qingtuan'], - ['club',11,'luyugeng'], - ['heart',4,'mapodoufu'], - ['spade',8,'yuanbaorou'], + food:'食物', + chunbing:'春饼', + chunbing_info:'你的手牌上限+1,持续五回合', + gudonggeng:'骨董羹', + gudonggeng_info:'你受到杀造成的伤害时有50%的机率令伤害-1,持续三回合', + yougeng:'酉羹', + yougeng_info:'准备阶段,若你的体力值为全场最少或之一,你回复一点体力,持续两回合', + liyutang:'鲤鱼汤', + liyutang_info:'结束阶段,若你的体力值为全场最少或之一,你获得一点护甲,持续两回合', + mizhilianou:'蜜汁藕', + mizhilianou_info:'你可以将一张红桃牌当作桃使用,持续四回合', + xiajiao:'虾饺', + xiajiao_info:'你在摸牌阶段额外摸一张牌,并在摸牌阶段时弃置一张牌,持续三回合', + tanhuadong:'昙花冻', + tanhuadong_info:'结束阶段,你有50%的机率摸一张牌,持续三回合', + qingtuan:'青团', + qingtuan_info:'你在回合内使用首张杀时摸一张牌,持续两回合', + luyugeng:'鲈鱼羹', + luyugeng_info:'准备阶段,你对一名体力值全场最高的随机敌人造成一点雷属性伤害,持续两回合', + yuanbaorou:'元宝肉', + yuanbaorou_info:'你在出牌阶段可以额外使用一张杀,持续三回合', + molicha:'茉莉茶', + molicha_info:'弃置判定区内的所有牌;你不能成为延时锦囊牌的目标,持续五回合', + mapodoufu:'麻婆豆腐', + mapodoufu_info:'结束阶段,你有65%的机率弃置一名随机敌人的一张随机牌,持续三回合', + }, + list:[ + ['spade',2,'tanhuadong'], + ['club',1,'molicha'], + ['club',3,'chunbing'], + ['heart',12,'yougeng'], + ['heart',8,'gudonggeng'], + ['heart',1,'liyutang'], + ['diamond',4,'mizhilianou'], + ['diamond',6,'xiajiao'], + ['spade',3,'qingtuan'], + ['club',11,'luyugeng'], + ['heart',4,'mapodoufu'], + ['spade',8,'yuanbaorou'], - ['spade',7,'yuheng'], - ['club',4,'mutoumianju'], - ['spade',2,'heilonglinpian'], - ['spade',1,'mianlijinzhen'], - ['heart',13,'yunvyuanshen'], + ['spade',7,'yuheng'], + ['club',4,'mutoumianju'], + ['spade',2,'heilonglinpian'], + ['spade',1,'mianlijinzhen'], + ['heart',13,'yunvyuanshen'], - ['club',8,'feibiao','poison'], - ['diamond',9,'feibiao','poison'], + ['club',8,'feibiao','poison'], + ['diamond',9,'feibiao','poison'], - ['spade',3,'bingpotong','poison'], - ['club',12,'bingpotong','poison'], + ['spade',3,'bingpotong','poison'], + ['club',12,'bingpotong','poison'], - ['club',5,'shihuifen'], - ['club',1,'shihuifen'], - ['spade',13,'shihuifen'], + ['club',5,'shihuifen'], + ['club',1,'shihuifen'], + ['spade',13,'shihuifen'], - ['diamond',6,'shujinsan'], - ['spade',2,'shujinsan'], + ['diamond',6,'shujinsan'], + ['spade',2,'shujinsan'], - ['spade',9,'qiankunbiao'], - ['club',13,'qiankunbiao'], + ['spade',9,'qiankunbiao'], + ['club',13,'qiankunbiao'], - ['heart',9,'jinlianzhu'], - ['spade',7,'jinlianzhu'], + ['heart',9,'jinlianzhu'], + ['spade',7,'jinlianzhu'], - ['heart',6,'liutouge'], - ['club',6,'liutouge'], + ['heart',6,'liutouge'], + ['club',6,'liutouge'], - ['club',6,'liufengsan'], - ['club',3,'liufengsan'], + ['club',6,'liufengsan'], + ['club',3,'liufengsan'], - ] + ] + }; }); diff --git a/card/guozhan.js b/card/guozhan.js index 68b1f6609..3abe55716 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -1,460 +1,480 @@ 'use strict'; -game.import('card',{ - name:'guozhan', - connect:true, - card:{ - feilongduofeng:{ - mode:['guozhan'], - fullskin:true, - type:'equip', - subtype:'equip1', - nomod:true, - nopower:true, - unique:true, - distance:{attackFrom:-1}, - skills:['feilongduofeng','feilongduofeng2'], - ai:{ - equipValue:function(card,player){ - if(player.hasSkill('zhangwu')) return 9; - if(game.hasPlayer(function(current){ - return current.hasSkill('zhangwu')&&get.attitude(player,current)<=0; - })){ - return 1; - } - return 8; - } - } - }, - taipingyaoshu:{ - mode:['guozhan'], - fullskin:true, - type:'equip', - subtype:'equip2', - nomod:true, - nopower:true, - unique:true, - skills:['taipingyaoshu'], - ai:{ - equipValue:function(card,player){ - if(player.hasSkill('wendao')) return 9; - if(game.hasPlayer(function(current){ - return current.hasSkill('wendao')&&get.attitude(player,current)<=0; - })){ - return 1; - } - return 6; - } - }, - onLose:function(){ - 'step 0' - player.loseHp(); - 'step 1' - player.draw(2); - } - }, - yuxi:{ - mode:['guozhan'], - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['yuxi_skill'], - ai:{ - equipValue:9 - } - }, - xietianzi:{ - fullskin:true, - type:'trick', - lianheng:true, - enable:function(card,player){ - if(get.mode()=='guozhan'&&!player.isMajor()) return false; - if(player.hasSkill('xietianzi')) return false; - return _status.event.getParent().name=='phaseUse'; - }, - filterTarget:function(card,player,target){ - return player==target; - }, - selectTarget:-1, - content:function(){ - var evt=_status.event.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse'){ - evt.skipped=true; - } - target.addSkill('xietianzi'); - }, - ai:{ - order:0.5, - value:4, - useful:2, - result:{ - target:function(player,target){ - if(target.countCards('he')>=2) return 1; - return 0; - } - } - } - }, - shuiyanqijunx:{ - fullskin:true, - type:'trick', - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('e')>0; - }, - enable:true, - content:function(){ - 'step 0' - target.chooseControl('discard_card','take_damage',function(event,player){ - if(get.damageEffect(player,event.player,player,'thunder')>=0){ - return 'take_damage'; - } - if(player.hp>=3&&player.countCards('e')>=2){ - return 'take_damage'; - } - return 'discard_card'; - }); - 'step 1' - if(result.control=='discard_card'){ - target.discard(target.getCards('e')); - } - else{ - target.damage('thunder'); - } - }, - ai:{ - order:7, - value:4, - useful:2, - tag:{ - damage:1, - thunderDamage:1, - natureDamage:1 - }, - result:{ - target:function(player,target){ - return -target.countCards('e'); - } - } - } - }, - lulitongxin:{ - fullskin:true, - type:'trick', - enable:function(card,player){ - return game.hasPlayer(function(current){ - return current.isMajor(); - }); - }, - mode:['guozhan'], - filterTarget:true, - chongzhu:true, - changeTarget:function(player,targets){ - var target=targets[0]; - game.filterPlayer(function(current){ - return current.isMajor()==target.isMajor()&¤t!=target; - },targets); - }, - content:function(){ - if(target.isLinked()){ - target.draw(); - } - else{ - target.link(); - } - }, - ai:{ - order:7.5, - value:4, - useful:2, - wuxie:function(){ - return 0; - }, - result:{ - player:function(player,target){ - return game.countPlayer(function(current){ - if(target.isMajor()==current.isMajor()){ - if(current.isLinked()){ - return get.attitude(player,target); - } - else{ - return -get.attitude(player,target)*0.8; - } - } - }); - } - } - } - }, - lianjunshengyan:{ - fullskin:true, - type:'trick', - enable:function(card,player){ - return !player.isUnseen(); - }, - mode:['guozhan'], - filterTarget:function(card,player,target){ - return target.identity!='unknown'&&(target.identity!=player.identity||target.identity=='ye'); - }, - changeTarget:function(player,targets){ - var target=targets[0]; - targets.push(player); - if(target.identity!='ye'){ - game.filterPlayer(function(current){ - return target!=current&&target.identity==current.identity; - },targets); - } - }, - content:function(){ - 'step 0' - if(target==player){ - target.draw(targets.length-1); - event.finish(); - } - else{ - target.chooseDrawRecover(true); - } - 'step 1' - target.link(false); - }, - ai:{ - order:3, - value:4, - useful:2, - result:{ - player:0.8, - target:1 - } - } - }, - chiling:{ - fullskin:true, - type:'trick', - enable:true, - mode:['guozhan'], - filterTarget:function(card,player,target){ - return target.isUnseen(); - }, - selectTarget:-1, - chooseai:function(event,player){ - if(_status.event.controls.contains('选项三')){ - return Math.random()<0.5?'选项一':'选项三'; - } - else{ - if(player.hasSkillTag('maixie')||player.hp<=2) return '选项一'; - return Math.random()<0.5?'选项一':'选项二'; - } - }, - content:function(){ - 'step 0' - var choiceList=['明置一张武将牌,然后摸一张牌','失去1点体力']; - if(target.countCards('he',{type:'equip'})){ - choiceList.push('弃置一张装备牌'); - } - target.chooseControl(lib.card.chiling.chooseai).set('prompt','敕令').set('choiceList',choiceList); - 'step 1' - if(result.control=='选项一'){ - target.chooseControl('主将','副将',function(){ - return Math.floor(Math.random()*2); - }).set('prompt','选择要明置的武将牌'); - } - else if(result.control=='选项二'){ - target.loseHp(); - event.finish(); - } - else{ - target.chooseToDiscard('he',{type:'equip'},true); - event.finish(); - } - 'step 2' - if(result.index==0){ - target.showCharacter(0); - } - else{ - target.showCharacter(1); - } - target.draw(); - }, - ai:{ - order:6, - result:{ - target:-1 - } - } - }, - diaohulishan:{ - fullskin:true, - type:'trick', - lianheng:true, - enable:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - target.addTempSkill('diaohulishan','phaseAfter'); - }, - ai:{ - order:10, - value:4, - useful:[2,1], - wuxie:function(){ - return 0; - }, - result:{ - player:function(player,target){ - var att=get.attitude(player,target); - if(target.hp==1&&att<0) return 0; +game.import('card',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'guozhan', + connect:true, + card:{ + feilongduofeng:{ + mode:['guozhan'], + fullskin:true, + type:'equip', + subtype:'equip1', + nomod:true, + nopower:true, + unique:true, + distance:{attackFrom:-1}, + skills:['feilongduofeng','feilongduofeng2'], + ai:{ + equipValue:function(card,player){ + if(player.hasSkill('zhangwu')) return 9; if(game.hasPlayer(function(current){ - return get.attitude(player,current)=2) return 1; + return 0; + } + } + } + }, + shuiyanqijunx:{ + fullskin:true, + type:'trick', + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('e')>0; + }, + enable:true, + content:function(){ + 'step 0' + target.chooseControl('discard_card','take_damage',function(event,player){ + if(get.damageEffect(player,event.player,player,'thunder')>=0){ + return 'take_damage'; + } + if(player.hp>=3&&player.countCards('e')>=2){ + return 'take_damage'; + } + return 'discard_card'; + }); + 'step 1' + if(result.control=='discard_card'){ + target.discard(target.getCards('e')); + } + else{ + target.damage('thunder'); + } + }, + ai:{ + order:7, + value:4, + useful:2, + tag:{ + damage:1, + thunderDamage:1, + natureDamage:1 + }, + result:{ + target:function(player,target){ + return -target.countCards('e'); + } + } + } + }, + lulitongxin:{ + fullskin:true, + type:'trick', + enable:function(card,player){ + return game.hasPlayer(function(current){ + return current.isMajor(); + }); + }, + mode:['guozhan'], + filterTarget:true, + chongzhu:true, + changeTarget:function(player,targets){ + var target=targets[0]; + game.filterPlayer(function(current){ + return current.isMajor()==target.isMajor()&¤t!=target; + },targets); + }, + content:function(){ + if(target.isLinked()){ + target.draw(); + } + else{ + target.link(); + } + }, + ai:{ + order:7.5, + value:4, + useful:2, + wuxie:function(){ + return 0; + }, + result:{ + player:function(player,target){ + return game.countPlayer(function(current){ + if(target.isMajor()==current.isMajor()){ + if(current.isLinked()){ + return get.attitude(player,target); + } + else{ + return -get.attitude(player,target)*0.8; + } + } + }); + } + } + } + }, + lianjunshengyan:{ + fullskin:true, + type:'trick', + enable:function(card,player){ + return !player.isUnseen(); + }, + mode:['guozhan'], + filterTarget:function(card,player,target){ + return target.identity!='unknown'&&(target.identity!=player.identity||target.identity=='ye'); + }, + changeTarget:function(player,targets){ + var target=targets[0]; + targets.push(player); + if(target.identity!='ye'){ + game.filterPlayer(function(current){ + return target!=current&&target.identity==current.identity; + },targets); + } + }, + content:function(){ + 'step 0' + if(target==player){ + target.draw(targets.length-1); + event.finish(); + } + else{ + target.chooseDrawRecover(true); + } + 'step 1' + target.link(false); + }, + ai:{ + order:3, + value:4, + useful:2, + result:{ + player:0.8, + target:1 + } + } + }, + chiling:{ + fullskin:true, + type:'trick', + enable:true, + mode:['guozhan'], + filterTarget:function(card,player,target){ + return target.isUnseen(); + }, + selectTarget:-1, + chooseai:function(event,player){ + if(_status.event.controls.contains('选项三')){ + return Math.random()<0.5?'选项一':'选项三'; + } + else{ + if(player.hasSkillTag('maixie')||player.hp<=2) return '选项一'; + return Math.random()<0.5?'选项一':'选项二'; + } + }, + content:function(){ + 'step 0' + var choiceList=['明置一张武将牌,然后摸一张牌','失去1点体力']; + if(target.countCards('he',{type:'equip'})){ + choiceList.push('弃置一张装备牌'); + } + target.chooseControl(lib.card.chiling.chooseai).set('prompt','敕令').set('choiceList',choiceList); + 'step 1' + if(result.control=='选项一'){ + target.chooseControl('主将','副将',function(){ + return Math.floor(Math.random()*2); + }).set('prompt','选择要明置的武将牌'); + } + else if(result.control=='选项二'){ + target.loseHp(); + event.finish(); + } + else{ + target.chooseToDiscard('he',{type:'equip'},true); + event.finish(); + } + 'step 2' + if(result.index==0){ + target.showCharacter(0); + } + else{ + target.showCharacter(1); + } + target.draw(); + }, + ai:{ + order:6, + result:{ + target:-1 + } + } + }, + diaohulishan:{ + fullskin:true, + type:'trick', + lianheng:true, + enable:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + target.addTempSkill('diaohulishan','phaseAfter'); + }, + ai:{ + order:10, + value:4, + useful:[2,1], + wuxie:function(){ + return 0; + }, + result:{ + player:function(player,target){ + var att=get.attitude(player,target); + if(target.hp==1&&att<0) return 0; + if(game.hasPlayer(function(current){ + return get.attitude(player,current)1){ - player.chooseControl(controls); - } - if(controls.length==0) event.finish(); - "step 1" - var content; - var str=get.translation(target)+'的'; - if(result.control){ - if(result.control=='手牌'){ + zhibi:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + chongzhu:true, + filterTarget:function(card,player,target){ + if(player==target) return false; + return (target.countCards('h')||target.isUnseen(2)); + }, + content:function(){ + "step 0" + if(!player.storage.zhibi){ + player.storage.zhibi=[]; + } + player.storage.zhibi.add(target); + var controls=[]; + if(target.countCards('h')) controls.push('手牌'); + if(target.isUnseen(0)) controls.push('主将'); + if(target.isUnseen(1)) controls.push('副将'); + if(controls.length>1){ + player.chooseControl(controls); + } + if(controls.length==0) event.finish(); + "step 1" + var content; + var str=get.translation(target)+'的'; + if(result.control){ + if(result.control=='手牌'){ + content=[str+'手牌',target.getCards('h')]; + game.log(player,'观看了',target,'的手牌'); + } + else if(result.control=='主将'){ + content=[str+'主将',[[target.name1],'character']]; + game.log(player,'观看了',target,'的主将'); + } + else{ + content=[str+'副将',[[target.name2],'character']]; + game.log(player,'观看了',target,'的副将'); + } + } + else if(target.countCards('h')){ content=[str+'手牌',target.getCards('h')]; game.log(player,'观看了',target,'的手牌'); } - else if(result.control=='主将'){ + else if(target.isUnseen(0)){ content=[str+'主将',[[target.name1],'character']]; game.log(player,'观看了',target,'的主将'); } @@ -462,727 +482,715 @@ game.import('card',{ content=[str+'副将',[[target.name2],'character']]; game.log(player,'观看了',target,'的副将'); } - } - else if(target.countCards('h')){ - content=[str+'手牌',target.getCards('h')]; - game.log(player,'观看了',target,'的手牌'); - } - else if(target.isUnseen(0)){ - content=[str+'主将',[[target.name1],'character']]; - game.log(player,'观看了',target,'的主将'); - } - else{ - content=[str+'副将',[[target.name2],'character']]; - game.log(player,'观看了',target,'的副将'); - } - player.chooseControl('ok').set('dialog',content); - }, - mode:['guozhan'], - ai:{ - order:9.5, - wuxie:function(){ - return 0; + player.chooseControl('ok').set('dialog',content); }, - result:{ - player:function(player,target){ - if(player.countCards('h')<=player.hp) return 0; - if(player.storage.zhibi&&player.storage.zhibi.contains(target)) return 0; - return target.isUnseen()?1:0; - } - } - } - }, - yiyi:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - if(get.mode()=='guozhan'){ - if(player.identity=='unknown'||player.identity=='ye') return player==target; - return player.identity==target.identity; - } - else if(get.is.versus()){ - return player.side==target.side; - } - else{ - return true; - } - }, - selectTarget:function(){ - if(get.mode()=='guozhan') return -1; - return [1,3]; - }, - content:function(){ - target.draw(2); - target.chooseToDiscard(2,'he',true).ai=get.disvalue; - }, - ai:{ - wuxie:function(){ - return 0; - }, - basic:{ - useful:3, - value:3, - order:5 - }, - result:{ - target:function(player,target){ - var hs=target.getCards('h'); - if(hs.length<=1){ - if(target==player&&hs[0].name=='yiyi'){ - return 0; - } - return 0.3; - } - return 1; + mode:['guozhan'], + ai:{ + order:9.5, + wuxie:function(){ + return 0; }, + result:{ + player:function(player,target){ + if(player.countCards('h')<=player.hp) return 0; + if(player.storage.zhibi&&player.storage.zhibi.contains(target)) return 0; + return target.isUnseen()?1:0; + } + } + } + }, + yiyi:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + if(get.mode()=='guozhan'){ + if(player.identity=='unknown'||player.identity=='ye') return player==target; + return player.identity==target.identity; + } + else if(get.is.versus()){ + return player.side==target.side; + } + else{ + return true; + } }, - tag:{ - loseCard:1, - discard:1 - } - }, - }, - wuliu:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-1}, - ai:{ - basic:{ - equipValue:function(card,player){ - if(player.identity=='unknown'||player.identity=='ye') return 2.5; - return 2+game.countPlayer(function(current){ - return current.identity==player.identity; - })/2; - } - } - }, - skills:['wuliu_skill'], - mode:['guozhan'], - }, - sanjian:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-2}, - ai:{ - basic:{ - equipValue:4 - } - }, - skills:['sanjian_skill'] - }, - jingfanma:{ - fullskin:true, - type:'equip', - subtype:'equip4', - lianheng:true, - distance:{globalFrom:-1}, - }, - }, - skill:{ - _feilongduofeng_ai:{ - ai:{ - effect:{ - player:function(card,player){ - if(player.hasSkill('zhangwu')) return; - if(card.name=='feilongduofeng'&&game.hasPlayer(function(current){ - return current.hasSkill('zhangwu')&&get.attitude(player,current)<=0; - })){ - return [0,0,0,0]; - } - } - } - } - }, - _taipingyaoshu_ai:{ - ai:{ - effect:{ - player:function(card,player){ - if(player.hasSkill('wendao')) return; - if(card.name=='taipingyaoshu'&&game.hasPlayer(function(current){ - return current.hasSkill('wendao')&&get.attitude(player,current)<=0; - })){ - return [0,0,0,0]; - } - } - } - } - }, - feilongduofeng:{ - trigger:{player:'shaBegin'}, - priority:5, - logTarget:'target', - filter:function(event,player){ - return event.target.countCards('he'); - }, - content:function(){ - trigger.target.chooseToDiscard('he',true); - }, - }, - feilongduofeng2:{ - trigger:{source:'dieAfter'}, - filter:function(event,player){ - if(event.reason&&event.reason.card&&event.reason.card.name=='sha'){ - return event.player.isDead()&&lib.group.contains(player.identity)&&player.isMinor(); - } - return false; - }, - logTarget:'player', - content:function(){ - 'step 0' - var list=[]; - for(var i=0;i<_status.characterlist.length;i++){ - var info=lib.character[_status.characterlist[i]]; - if(info[4]&&info[4].contains('jun')) continue; - if(info[1]==player.identity){ - list.push(_status.characterlist[i]); - } - } - event.identity=event.player.identity; - if(trigger.player==game.me&&!_status.auto){ - event.dialog=ui.create.dialog('是否选择一名角色重新加入游戏?',[list,'character']); - event.filterButton=function(){return true}; - event.player=game.me; - event.custom.replace.confirm=function(){ - if(!ui.selected.buttons.length){ - event.directresult='refuse'; - } - else{ - event.directresult=ui.selected.buttons[0].link; - } - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - game.resume(); - } - event.switchToAuto=function(){ - event.directresult=list.randomGet(); - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - }; - game.check(); - game.pause(); - } - else if(trigger.player.isOnline()){ - trigger.player.send(function(player,list){ - if(_status.auto){ - _status.event._result=list.randomGet(); - } - else{ - var next=game.createEvent('replacePlayer'); - next.source=player; - next.list=list; - next.setContent(function(){ - event.dialog=ui.create.dialog('是否选择一名角色重新加入游戏?',[event.list,'character']); - event.filterButton=function(){return true}; - event.player=event.source; - event.custom.replace.confirm=function(){ - if(!ui.selected.buttons.length){ - event.result='refuse'; - } - else{ - event.result=ui.selected.buttons[0].link; - } - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - game.resume(); - game.uncheck(); + selectTarget:function(){ + if(get.mode()=='guozhan') return -1; + return [1,3]; + }, + content:function(){ + target.draw(2); + target.chooseToDiscard(2,'he',true).ai=get.disvalue; + }, + ai:{ + wuxie:function(){ + return 0; + }, + basic:{ + useful:3, + value:3, + order:5 + }, + result:{ + target:function(player,target){ + var hs=target.getCards('h'); + if(hs.length<=1){ + if(target==player&&hs[0].name=='yiyi'){ + return 0; } - event.switchToAuto=function(){ - event.result=list.randomGet(); - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - game.uncheck(); - }; - game.check(); - game.pause(); + return 0.3; + } + return 1; + }, + }, + tag:{ + loseCard:1, + discard:1 + } + }, + }, + wuliu:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-1}, + ai:{ + basic:{ + equipValue:function(card,player){ + if(player.identity=='unknown'||player.identity=='ye') return 2.5; + return 2+game.countPlayer(function(current){ + return current.identity==player.identity; + })/2; + } + } + }, + skills:['wuliu_skill'], + mode:['guozhan'], + }, + sanjian:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-2}, + ai:{ + basic:{ + equipValue:4 + } + }, + skills:['sanjian_skill'] + }, + jingfanma:{ + fullskin:true, + type:'equip', + subtype:'equip4', + lianheng:true, + distance:{globalFrom:-1}, + }, + }, + skill:{ + _feilongduofeng_ai:{ + ai:{ + effect:{ + player:function(card,player){ + if(player.hasSkill('zhangwu')) return; + if(card.name=='feilongduofeng'&&game.hasPlayer(function(current){ + return current.hasSkill('zhangwu')&&get.attitude(player,current)<=0; + })){ + return [0,0,0,0]; + } + } + } + } + }, + _taipingyaoshu_ai:{ + ai:{ + effect:{ + player:function(card,player){ + if(player.hasSkill('wendao')) return; + if(card.name=='taipingyaoshu'&&game.hasPlayer(function(current){ + return current.hasSkill('wendao')&&get.attitude(player,current)<=0; + })){ + return [0,0,0,0]; + } + } + } + } + }, + feilongduofeng:{ + trigger:{player:'shaBegin'}, + priority:5, + logTarget:'target', + filter:function(event,player){ + return event.target.countCards('he'); + }, + content:function(){ + trigger.target.chooseToDiscard('he',true); + }, + }, + feilongduofeng2:{ + trigger:{source:'dieAfter'}, + filter:function(event,player){ + if(event.reason&&event.reason.card&&event.reason.card.name=='sha'){ + return event.player.isDead()&&lib.group.contains(player.identity)&&player.isMinor(); + } + return false; + }, + logTarget:'player', + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i<_status.characterlist.length;i++){ + var info=lib.character[_status.characterlist[i]]; + if(info[4]&&info[4].contains('jun')) continue; + if(info[1]==player.identity){ + list.push(_status.characterlist[i]); + } + } + event.identity=event.player.identity; + if(trigger.player==game.me&&!_status.auto){ + event.dialog=ui.create.dialog('是否选择一名角色重新加入游戏?',[list,'character']); + event.filterButton=function(){return true}; + event.player=game.me; + event.custom.replace.confirm=function(){ + if(!ui.selected.buttons.length){ + event.directresult='refuse'; + } + else{ + event.directresult=ui.selected.buttons[0].link; + } + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + game.resume(); + } + event.switchToAuto=function(){ + event.directresult=list.randomGet(); + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + }; + game.check(); + game.pause(); + } + else if(trigger.player.isOnline()){ + trigger.player.send(function(player,list){ + if(_status.auto){ + _status.event._result=list.randomGet(); + } + else{ + var next=game.createEvent('replacePlayer'); + next.source=player; + next.list=list; + next.setContent(function(){ + event.dialog=ui.create.dialog('是否选择一名角色重新加入游戏?',[event.list,'character']); + event.filterButton=function(){return true}; + event.player=event.source; + event.custom.replace.confirm=function(){ + if(!ui.selected.buttons.length){ + event.result='refuse'; + } + else{ + event.result=ui.selected.buttons[0].link; + } + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + game.resume(); + game.uncheck(); + } + event.switchToAuto=function(){ + event.result=list.randomGet(); + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + game.uncheck(); + }; + game.check(); + game.pause(); + }); + } + game.resume(); + },trigger.player,list); + trigger.player.wait(); + game.pause(); + } + else{ + event.directresult=list.randomGet(); + } + event.list=list; + 'step 1' + game.uncheck(); + if(!event.directresult){ + if(event.resultOL){ + event.directresult=event.resultOL[trigger.player.playerid]; + } + if(!event.directresult||event.directresult=='ai'){ + event.directresult=event.list.randomGet(); + } + } + if(event.directresult=='refuse'){ + game.log(trigger.player,'拒绝重新加入游戏'); + return; + } + game.log(trigger.player,'重新加入游戏'); + var name=event.directresult; + game.log(trigger.player,'将主将替换为','#b'+name); + _status.characterlist.remove(name); + game.broadcastAll(function(source,name,identity){ + source.revive(2,false); + source.identity=identity; + source._group=identity; + source.setIdentity(); + if(source==game.me){ + ui.arena.classList.remove('selecting'); + } + },trigger.player,name,event.identity); + trigger.player.draw(); + trigger.player.reinit(trigger.player.name1,name,false); + trigger.player.removeCharacter(1); + trigger.getParent('damage').untrigger(false,trigger.player); + game.addVideo('setIdentity',trigger.player,event.identity); + } + }, + taipingyaoshu:{ + trigger:{player:'damageBefore'}, + filter:function(event){ + if(event.source&&event.source.hasSkillTag('unequip',false,event.card)) return false; + if(event.nature) return true; + }, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + nothunder:true, + effect:{ + target:function(card,player,target,current){ + if(player.hasSkillTag('unequip',false,card)) return; + if(get.tag(card,'natureDamage')) return 'zerotarget'; + if(card.name=='tiesuo'){ + return [0,0]; + } + } + } + } + }, + _taipingyaoshu:{ + mod:{ + maxHandcard:function(player,num){ + var source=game.findPlayer(function(current){ + return current.hasSkill('taipingyaoshu')&¤t.isFriendOf(player); + }); + if(source){ + if(source.hasSkill('huangjintianbingfu')){ + num+=source.storage.huangjintianbingfu.length; + } + return num+game.countPlayer(function(current){ + return current.isFriendOf(source); }); } - game.resume(); - },trigger.player,list); - trigger.player.wait(); - game.pause(); - } - else{ - event.directresult=list.randomGet(); - } - event.list=list; - 'step 1' - game.uncheck(); - if(!event.directresult){ - if(event.resultOL){ - event.directresult=event.resultOL[trigger.player.playerid]; } - if(!event.directresult||event.directresult=='ai'){ - event.directresult=event.list.randomGet(); - } - } - if(event.directresult=='refuse'){ - game.log(trigger.player,'拒绝重新加入游戏'); - return; - } - game.log(trigger.player,'重新加入游戏'); - var name=event.directresult; - game.log(trigger.player,'将主将替换为','#b'+name); - _status.characterlist.remove(name); - game.broadcastAll(function(source,name,identity){ - source.revive(2,false); - source.identity=identity; - source._group=identity; - source.setIdentity(); - if(source==game.me){ - ui.arena.classList.remove('selecting'); - } - },trigger.player,name,event.identity); - trigger.player.draw(); - trigger.player.reinit(trigger.player.name1,name,false); - trigger.player.removeCharacter(1); - trigger.getParent('damage').untrigger(false,trigger.player); - game.addVideo('setIdentity',trigger.player,event.identity); - } - }, - taipingyaoshu:{ - trigger:{player:'damageBefore'}, - filter:function(event){ - if(event.source&&event.source.hasSkillTag('unequip',false,event.card)) return false; - if(event.nature) return true; + }, }, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); + yuxi_skill:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + filter:function(event,player){ + return !player.isUnseen(); + }, + content:function(){ + trigger.num++; + }, + ai:{ + threaten:1.3 + }, + group:'yuxi_skill2' }, - ai:{ - nofire:true, - nothunder:true, - effect:{ - target:function(card,player,target,current){ - if(player.hasSkillTag('unequip',false,card)) return; - if(get.tag(card,'natureDamage')) return 'zerotarget'; - if(card.name=='tiesuo'){ - return [0,0]; - } - } - } - } - }, - _taipingyaoshu:{ - mod:{ - maxHandcard:function(player,num){ - var source=game.findPlayer(function(current){ - return current.hasSkill('taipingyaoshu')&¤t.isFriendOf(player); + yuxi_skill2:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + filter:function(event,player){ + if(player.isUnseen()) return false; + return game.hasPlayer(function(current){ + return player.canUse('zhibi',current); }); - if(source){ - if(source.hasSkill('huangjintianbingfu')){ - num+=source.storage.huangjintianbingfu.length; + }, + content:function(){ + 'step 0' + player.chooseTarget('玉玺:选择知己知彼的目标',function(card,player,target){ + return player.canUse({name:'zhibi'},target); + },true).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'zhibi'},player,player); + }); + 'step 1' + if(result.bool){ + player.useCard({name:'zhibi'},result.targets); + } + } + }, + xietianzi:{ + trigger:{player:'phaseAfter'}, + filter:function(event,player){ + return player.hasSkill('xietianzi'); + }, + forced:true, + popup:false, + priority:-50, + content:function(){ + "step 0" + player.removeSkill('xietianzi'); + if(player.countCards('he')>0){ + player.chooseToDiscard('he','是否弃置一张牌并获得一个额外回合?').set('ai',function(card){ + return 10-get.value(card); + }); + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + player.insertPhase(); + } + }, + }, + _chiling1:{ + mode:['guozhan'], + trigger:{player:'discardAfter'}, + filter:function(event,player){ + for(var i=0;i0; + }, + content:function(){ + trigger.num--; + player.addSkill('huxinjing2'); + } + }, + huxinjing2:{ + trigger:{player:['damageEnd','damageZero']}, + priority:10, + forced:true, + popup:false, + content:function(){ + var card=player.getEquip('huxinjing'); + if(card){ + player.discard(card); + } + player.removeSkill('huxinjing2'); + } + }, + _lianheng:{ + mode:['guozhan'], + enable:'phaseUse', + prompt:'将可连横的牌交给一名与你势力不同的角色,或未确定势力的角色,若你交给与你势力不同的角色,则你摸一张牌', + filter:function(event,player){ + return (player.getCards('h',function(card){ + return get.info(card).lianheng; + }).length); + }, + filterCard:function(card){ + return get.info(card).lianheng; + }, + filterTarget:function(card,player,target){ + if(target==player) return false; + if(player.isUnseen()) return target.isUnseen(); + if(player.identity=='ye') return true; + return target.identity!=player.identity; + }, + prepare:'give', + discard:false, + // delay:0.5, + content:function(){ + "step 0" + target.gain(cards,player); + "step 1" + if(!target.isUnseen()){ + player.draw(); + } + }, + ai:{ + basic:{ + order:2 + }, + result:{ + player:function(player,target){ + if(target.isUnseen()) return 0; + if(player.isMajor()) return 0; + return 0.5; + }, + target:function(player,target){ + if(target.isUnseen()) return 0; + return 1; + } + }, + } + }, + wuliu_skill:{}, + _wuliu_skill2:{ + mod:{ + attackFrom:function(from,to,distance){ + return distance-game.countPlayer(function(current){ + if(current==from) return false; + if(current.identity=='unknown'||current.identity=='ye') return false; + if(current.identity!=from.identity) return false; + if(current.hasSkill('wuliu_skill')) return true; }); } } }, - }, - yuxi_skill:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - filter:function(event,player){ - return !player.isUnseen(); - }, - content:function(){ - trigger.num++; - }, - ai:{ - threaten:1.3 - }, - group:'yuxi_skill2' - }, - yuxi_skill2:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - filter:function(event,player){ - if(player.isUnseen()) return false; - return game.hasPlayer(function(current){ - return player.canUse('zhibi',current); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget('玉玺:选择知己知彼的目标',function(card,player,target){ - return player.canUse({name:'zhibi'},target); - },true).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'zhibi'},player,player); - }); - 'step 1' - if(result.bool){ - player.useCard({name:'zhibi'},result.targets); - } - } - }, - xietianzi:{ - trigger:{player:'phaseAfter'}, - filter:function(event,player){ - return player.hasSkill('xietianzi'); - }, - forced:true, - popup:false, - priority:-50, - content:function(){ - "step 0" - player.removeSkill('xietianzi'); - if(player.countCards('he')>0){ - player.chooseToDiscard('he','是否弃置一张牌并获得一个额外回合?').set('ai',function(card){ - return 10-get.value(card); + sanjian_skill:{ + audio:true, + trigger:{source:'damageAfter'}, + direct:true, + filter:function(event,player){ + if(player.countCards('h')==0) return false; + if(!event.card) return false; + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return current!=event.player&&get.distance(event.player,current)<=1; }); - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - player.insertPhase(); - } - }, - }, - _chiling1:{ - mode:['guozhan'], - trigger:{player:'discardAfter'}, - filter:function(event,player){ - for(var i=0;i0; - }, - content:function(){ - trigger.num--; - player.addSkill('huxinjing2'); - } - }, - huxinjing2:{ - trigger:{player:['damageEnd','damageZero']}, - priority:10, - forced:true, - popup:false, - content:function(){ - var card=player.getEquip('huxinjing'); - if(card){ - player.discard(card); - } - player.removeSkill('huxinjing2'); - } - }, - _lianheng:{ - mode:['guozhan'], - enable:'phaseUse', - prompt:'将可连横的牌交给一名与你势力不同的角色,或未确定势力的角色,若你交给与你势力不同的角色,则你摸一张牌', - filter:function(event,player){ - return (player.getCards('h',function(card){ - return get.info(card).lianheng; - }).length); - }, - filterCard:function(card){ - return get.info(card).lianheng; - }, - filterTarget:function(card,player,target){ - if(target==player) return false; - if(player.isUnseen()) return target.isUnseen(); - if(player.identity=='ye') return true; - return target.identity!=player.identity; - }, - prepare:'give', - discard:false, - // delay:0.5, - content:function(){ - "step 0" - target.gain(cards,player); - "step 1" - if(!target.isUnseen()){ - player.draw(); - } - }, - ai:{ - basic:{ - order:2 - }, - result:{ - player:function(player,target){ - if(target.isUnseen()) return 0; - if(player.isMajor()) return 0; - return 0.5; - }, - target:function(player,target){ - if(target.isUnseen()) return 0; - return 1; + content:function(){ + "step 0" + var damaged=trigger.player; + player.chooseCardTarget({ + filterCard:lib.filter.cardDiscardable, + filterTarget:function(card,player,target){ + var damaged=_status.event.damaged; + return get.distance(damaged,target)<=1&&target!=damaged; + }, + ai1:function(card){ + return 9-get.value(card); + }, + ai2:function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }, + prompt:get.prompt('sanjian') + }).set('damaged',damaged); + "step 1" + if(result.bool){ + player.logSkill('sanjian_skill',result.targets); + player.discard(result.cards); + result.targets[0].damage(); } - }, - } - }, - wuliu_skill:{}, - _wuliu_skill2:{ - mod:{ - attackFrom:function(from,to,distance){ - return distance-game.countPlayer(function(current){ - if(current==from) return false; - if(current.identity=='unknown'||current.identity=='ye') return false; - if(current.identity!=from.identity) return false; - if(current.hasSkill('wuliu_skill')) return true; - }); } - } - }, - sanjian_skill:{ - audio:true, - trigger:{source:'damageAfter'}, - direct:true, - filter:function(event,player){ - if(player.countCards('h')==0) return false; - if(!event.card) return false; - if(event.card.name!='sha') return false; - return game.hasPlayer(function(current){ - return current!=event.player&&get.distance(event.player,current)<=1; - }); }, - content:function(){ - "step 0" - var damaged=trigger.player; - player.chooseCardTarget({ - filterCard:lib.filter.cardDiscardable, - filterTarget:function(card,player,target){ - var damaged=_status.event.damaged; - return get.distance(damaged,target)<=1&&target!=damaged; - }, - ai1:function(card){ - return 9-get.value(card); - }, - ai2:function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }, - prompt:get.prompt('sanjian') - }).set('damaged',damaged); - "step 1" - if(result.bool){ - player.logSkill('sanjian_skill',result.targets); - player.discard(result.cards); - result.targets[0].damage(); - } - } }, - }, - translate:{ - feilongduofeng:'飞龙夺凤', - feilongduofeng2:'飞龙夺凤', - feilongduofeng_info:'当你使用【杀】指定一名角色为目标后,你可令该角色弃置一张牌。你使用【杀】杀死一名角色后,若你所属的势力是全场最少的(或之一),你可令该角色的使用者选择是否从未使用的武将牌中选择一张与你势力相同的武将牌重新加入游戏', - taipingyaoshu:'太平要术', - taipingyaoshu_info:'锁定技,防止你受到的所有属性伤害;全场每有一名与你势力相同的角色存活,所有此势力角色的手牌上限便+1;当你失去装备区里的【太平要术】时,你失去1点体力,然后摸两张牌', - yuxi_skill:'玉玺', - yuxi_skill2:'玉玺', - yuxi:'玉玺', - yuxi_info:'锁定技,若你有明置的武将牌,你的势力视为唯一的大势力;锁定技,摸牌阶段,若你有明置的武将牌,你多摸一张牌;锁定技,出牌阶段开始时,若你有明置的武将牌,你视为使用【知己知彼】', - xietianzi:'挟令', - xietianzi_info:'出牌阶段,对自己使用。你结束出牌阶段,若如此做,此回合结束时,你可以弃置一张牌,获得一个额外的回合', - xietianzi_info_guozhan:'出牌阶段,对为大势力角色的你使用。你结束出牌阶段,若如此做,此回合结束时,你可以弃置一张牌,获得一个额外的回合', - shuiyanqijunx:'水淹七军', - shuiyanqijunx_info:'出牌阶段,对一名装备区里有牌的其他角色使用。目标角色选择一项:1、弃置装备区里的所有牌;2、受到你造成的1点雷电伤害', - lulitongxin:'勠力同心', - lulitongxin_info:'出牌阶段,对所有大势力角色或所有小势力角色使用。若目标角色:不处于“连环状态”,其横置;处于“连环状态”,其摸一张牌', - lianjunshengyan:'联军盛宴', - lianjunshengyan_info:'出牌阶段,对你和你选择的除你的势力外的一个势力的所有角色。若目标角色:为你,你摸X张牌(X为该势力的角色数);不为你,其选择一项:1、回复1点体力;2、摸一张牌,然后重置', - chiling:'敕令', - chiling_info:'出牌阶段,对所有没有势力的角色使用。目标角色选择一项:1、明置一张武将牌,然后摸一张牌;2、弃置一张装备牌;3、失去1点体力。当【敕令】因判定或弃置而置入弃牌堆时,系统将之移出游戏,然后系统于当前回合结束后视为对所有没有势力的角色使用【敕令】', - diaohulishan:'调虎离山', - diaohulishan_info:'出牌阶段,对至多两名其他角色使用。目标角色于此回合结束之前不计入距离的计算且不能使用牌且不是牌的合法目标。此牌结算结束时,你摸一张牌', - _lianheng:'连横', - huoshaolianying:'火烧连营', - huoshaolianying_bg:'烧', - huoshaolianying_info_guozhan:'出牌阶段,对你的下家和与其处于同一队列的角色使用,每名角色受到一点火焰伤害', - huoshaolianying_info:'对离你最近的一名横置角色使用(若无横置角色则改为对距离你最近的所有角色使用),对目标造成一点火焰伤害', - yuanjiao:'远交近攻', - yuanjiao_info_guozhan:'对一名不同势力的角色使用,对方摸一张牌,然后你摸3张牌', - yuanjiao_info:'对一名其他角色使用,你与其各摸一张牌', - yuanjiao_bg:'交', - zhibi:'知己知彼', - zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或武将牌', - yiyi:'以逸待劳', - yiyi_info_guozhan:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌', - yiyi_info_combat:'对所有友方角色使用,摸两张牌然后弃置两张牌', - yiyi_info:'对与任意三名角色使用,摸两张牌然后弃置两张牌', - yiyi_bg:'逸', - wuliu:'吴六剑', - wuliu_info:'其他与装备者势力相同的角色攻击范围+1', - sanjian:'三尖两刃刀', - sanjian_info:'当你使用杀造成伤害后,可以弃置1张手牌对一名距离受伤害角色1以内的其他角色造成1点伤害', - wuliu_skill:'吴六剑', - sanjian_skill:'三尖两刃刀', - jingfanma_bg:'-马', - jingfanma:'惊帆', - jingfanma_info:'你的进攻距离+1', - huxinjing_bg:'镜', - huxinjing:'护心镜', - huxinjing_info:'抵消一点伤害', - }, - list:[ - ['heart',9,'yuanjiao'], - ['club',3,'zhibi'], - ['club',4,'zhibi'], - ['diamond',4,'yiyi'], - ['heart',11,'yiyi'], - ['diamond',6,'wuliu'], - ['diamond',12,'sanjian'], - ['heart',3,'jingfanma'], - ["spade",4,'shunshou'], - ["spade",12,'guohe'], - ["spade",11,'wuxie'], - ['spade',3,'huoshaolianying','fire'], - ['club',11,'huoshaolianying','fire'], - ['heart',12,'huoshaolianying','fire'], - ['club',2,'huxinjing'], - ['heart',2,'diaohulishan'], - ['diamond',10,'diaohulishan'], - ['heart',1,'lianjunshengyan'], - ['club',3,'chiling'], - ['spade',12,'lulitongxin'], - ['club',10,'lulitongxin'], - ['club',12,'shuiyanqijunx'], - ['heart',13,'shuiyanqijunx'], - ['spade',1,'xietianzi'], - ['diamond',1,'xietianzi'], - ['diamond',4,'xietianzi'], - ['club',1,'yuxi'], - ], + translate:{ + feilongduofeng:'飞龙夺凤', + feilongduofeng2:'飞龙夺凤', + feilongduofeng_info:'当你使用【杀】指定一名角色为目标后,你可令该角色弃置一张牌。你使用【杀】杀死一名角色后,若你所属的势力是全场最少的(或之一),你可令该角色的使用者选择是否从未使用的武将牌中选择一张与你势力相同的武将牌重新加入游戏', + taipingyaoshu:'太平要术', + taipingyaoshu_info:'锁定技,防止你受到的所有属性伤害;全场每有一名与你势力相同的角色存活,所有此势力角色的手牌上限便+1;当你失去装备区里的【太平要术】时,你失去1点体力,然后摸两张牌', + yuxi_skill:'玉玺', + yuxi_skill2:'玉玺', + yuxi:'玉玺', + yuxi_info:'锁定技,若你有明置的武将牌,你的势力视为唯一的大势力;锁定技,摸牌阶段,若你有明置的武将牌,你多摸一张牌;锁定技,出牌阶段开始时,若你有明置的武将牌,你视为使用【知己知彼】', + xietianzi:'挟令', + xietianzi_info:'出牌阶段,对自己使用。你结束出牌阶段,若如此做,此回合结束时,你可以弃置一张牌,获得一个额外的回合', + xietianzi_info_guozhan:'出牌阶段,对为大势力角色的你使用。你结束出牌阶段,若如此做,此回合结束时,你可以弃置一张牌,获得一个额外的回合', + shuiyanqijunx:'水淹七军', + shuiyanqijunx_info:'出牌阶段,对一名装备区里有牌的其他角色使用。目标角色选择一项:1、弃置装备区里的所有牌;2、受到你造成的1点雷电伤害', + lulitongxin:'勠力同心', + lulitongxin_info:'出牌阶段,对所有大势力角色或所有小势力角色使用。若目标角色:不处于“连环状态”,其横置;处于“连环状态”,其摸一张牌', + lianjunshengyan:'联军盛宴', + lianjunshengyan_info:'出牌阶段,对你和你选择的除你的势力外的一个势力的所有角色。若目标角色:为你,你摸X张牌(X为该势力的角色数);不为你,其选择一项:1、回复1点体力;2、摸一张牌,然后重置', + chiling:'敕令', + chiling_info:'出牌阶段,对所有没有势力的角色使用。目标角色选择一项:1、明置一张武将牌,然后摸一张牌;2、弃置一张装备牌;3、失去1点体力。当【敕令】因判定或弃置而置入弃牌堆时,系统将之移出游戏,然后系统于当前回合结束后视为对所有没有势力的角色使用【敕令】', + diaohulishan:'调虎离山', + diaohulishan_info:'出牌阶段,对至多两名其他角色使用。目标角色于此回合结束之前不计入距离的计算且不能使用牌且不是牌的合法目标。此牌结算结束时,你摸一张牌', + _lianheng:'连横', + huoshaolianying:'火烧连营', + huoshaolianying_bg:'烧', + huoshaolianying_info_guozhan:'出牌阶段,对你的下家和与其处于同一队列的角色使用,每名角色受到一点火焰伤害', + huoshaolianying_info:'对离你最近的一名横置角色使用(若无横置角色则改为对距离你最近的所有角色使用),对目标造成一点火焰伤害', + yuanjiao:'远交近攻', + yuanjiao_info_guozhan:'对一名不同势力的角色使用,对方摸一张牌,然后你摸3张牌', + yuanjiao_info:'对一名其他角色使用,你与其各摸一张牌', + yuanjiao_bg:'交', + zhibi:'知己知彼', + zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或武将牌', + yiyi:'以逸待劳', + yiyi_info_guozhan:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌', + yiyi_info_combat:'对所有友方角色使用,摸两张牌然后弃置两张牌', + yiyi_info:'对与任意三名角色使用,摸两张牌然后弃置两张牌', + yiyi_bg:'逸', + wuliu:'吴六剑', + wuliu_info:'其他与装备者势力相同的角色攻击范围+1', + sanjian:'三尖两刃刀', + sanjian_info:'当你使用杀造成伤害后,可以弃置1张手牌对一名距离受伤害角色1以内的其他角色造成1点伤害', + wuliu_skill:'吴六剑', + sanjian_skill:'三尖两刃刀', + jingfanma_bg:'-马', + jingfanma:'惊帆', + jingfanma_info:'你的进攻距离+1', + huxinjing_bg:'镜', + huxinjing:'护心镜', + huxinjing_info:'抵消一点伤害', + }, + list:[ + ['heart',9,'yuanjiao'], + ['club',3,'zhibi'], + ['club',4,'zhibi'], + ['diamond',4,'yiyi'], + ['heart',11,'yiyi'], + ['diamond',6,'wuliu'], + ['diamond',12,'sanjian'], + ['heart',3,'jingfanma'], + ["spade",4,'shunshou'], + ["spade",12,'guohe'], + ["spade",11,'wuxie'], + ['spade',3,'huoshaolianying','fire'], + ['club',11,'huoshaolianying','fire'], + ['heart',12,'huoshaolianying','fire'], + ['club',2,'huxinjing'], + ['heart',2,'diaohulishan'], + ['diamond',10,'diaohulishan'], + ['heart',1,'lianjunshengyan'], + ['club',3,'chiling'], + ['spade',12,'lulitongxin'], + ['club',10,'lulitongxin'], + ['club',12,'shuiyanqijunx'], + ['heart',13,'shuiyanqijunx'], + ['spade',1,'xietianzi'], + ['diamond',1,'xietianzi'], + ['diamond',4,'xietianzi'], + ['club',1,'yuxi'], + ], + } }); diff --git a/card/hearth.js b/card/hearth.js index ab9ec9f0b..d488a497a 100644 --- a/card/hearth.js +++ b/card/hearth.js @@ -1,718 +1,726 @@ 'use strict'; -game.import('card',{ - name:'hearth', - card:{ - linghunzhihuo:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:true, - content:function(){ - 'step 0' - target.damage('fire'); - 'step 1' - var hs=player.getCards('h'); - if(hs.length){ - player.discard(hs.randomGet()); - } - }, - ai:{ - basic:{ - order:1.8, - value:[6,1], - useful:2, +game.import('card',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'hearth', + card:{ + linghunzhihuo:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:true, + content:function(){ + 'step 0' + target.damage('fire'); + 'step 1' + var hs=player.getCards('h'); + if(hs.length){ + player.discard(hs.randomGet()); + } }, - result:{ - player:function(player,target){ - if(player==target) return -1; - if(player.countCards('h')>=player.hp) return -0.1; - if(player.countCards('h')>1) return -0.5; - return 0; + ai:{ + basic:{ + order:1.8, + value:[6,1], + useful:2, }, - target:-1 + result:{ + player:function(player,target){ + if(player==target) return -1; + if(player.countCards('h')>=player.hp) return -0.1; + if(player.countCards('h')>1) return -0.5; + return 0; + }, + target:-1 + }, + tag:{ + damage:1, + fireDamage:1, + natureDamage:1, + } + } + }, + jihuocard:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return player==target; }, - tag:{ - damage:1, - fireDamage:1, - natureDamage:1, + selectTarget:-1, + modTarget:true, + content:function(){ + if(_status.currentPhase==target){ + target.addTempSkill('jihuocard2','phaseAfter'); + } + target.draw(); + }, + ai:{ + order:10, + result:{ + target:1 + } } - } - }, - jihuocard:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return player==target; }, - selectTarget:-1, - modTarget:true, - content:function(){ - if(_status.currentPhase==target){ - target.addTempSkill('jihuocard2','phaseAfter'); - } - target.draw(); - }, - ai:{ - order:10, - result:{ - target:1 - } - } - }, - zhaomingdan:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('hej')>0; - }, - content:function(){ - 'step 0' - if(target.countCards('hej')){ - var next=player.discardPlayerCard('hej',target,true); - next.visible=true; - next.delay=false; - } - else{ - event.goto(2); - } - 'step 1' - if(result.bool){ + zhaomingdan:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('hej')>0; + }, + content:function(){ + 'step 0' + if(target.countCards('hej')){ + var next=player.discardPlayerCard('hej',target,true); + next.visible=true; + next.delay=false; + } + else{ + event.goto(2); + } + 'step 1' + if(result.bool){ + game.delay(0.5); + } + 'step 2' + target.draw(false); + target.$draw(); game.delay(0.5); + 'step 3' + player.draw(); + }, + ai:{ + order:9.5, + value:6, + useful:3, + result:{ + target:function(player,target){ + var es=target.getCards('e'); + var nh=target.countCards('h'); + var noe=(es.length==0||target.hasSkillTag('noe')); + var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ + return 0; + } + return 3; + } + return 0.1; + } + } } - 'step 2' - target.draw(false); - target.$draw(); - game.delay(0.5); - 'step 3' - player.draw(); }, - ai:{ - order:9.5, - value:6, - useful:3, - result:{ - target:function(player,target){ - var es=target.getCards('e'); - var nh=target.countCards('h'); - var noe=(es.length==0||target.hasSkillTag('noe')); - var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ + shijieshu:{ + fullskin:true, + enable:true, + type:'trick', + filterTarget:function(card,player,target){ + return !target.isMin(); + }, + content:function(){ + 'step 0' + var cards=[]; + for(var i=0;i<2;i++){ + var card=get.cardPile(function(card){ + return get.type(card)=='equip'; + }); + if(card){ + ui.special.appendChild(card); + cards.push(card); + } + } + switch(cards.length){ + case 1:{ + target.$gain(cards[0]); + game.delay(); + break; + } + case 2:{ + target.$gain(cards[0]); + setTimeout(function(){ + target.$gain(cards[1]); + },250); + game.delay(); + break; + } + } + event.cards=cards; + 'step 1' + if(event.cards.length){ + target.equip(event.cards.shift()); + game.delay(0.5); + if(event.cards.length){ + event.redo(); + } + } + 'step 2' + game.delay(0.5); + 'step 3' + if(target.countCards('h')){ + target.chooseToDiscard('h',true); + } + }, + ai:{ + order:9, + value:6, + useful:2, + result:{ + target:function(player,target){ + return Math.max(0,2-target.countCards('e'))+(target.countCards('h')?0:0.5); + }, + }, + tag:{ + norepeat:1 + } + } + }, + shandianjian:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + if(player!=game.me&&player.countCards('h')<2) return false; + return target.countCards('h')>0; + }, + content:function(){ + "step 0" + if(target.countCards('h')==0){ + event.finish(); + return; + } + var rand=Math.random()<0.5; + target.chooseCard(true).ai=function(card){ + if(rand) return Math.random(); + return get.value(card); + }; + "step 1" + event.dialog=ui.create.dialog(get.translation(target.name)+'展示的手牌',result.cards); + event.card2=result.cards[0]; + event.videoId=lib.status.videoId++; + game.addVideo('cardDialog',null,[get.translation(target.name)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]); + game.log(target,'展示了',event.card2); + player.chooseToDiscard(function(card){ + return get.suit(card)==get.suit(_status.event.parent.card2); + },function(card){ + if(get.damageEffect(target,player,player,'thunder')>0){ + return 6-get.value(card,_status.event.player); + } + return -1; + }).prompt=false; + game.delay(2); + "step 2" + if(result.bool){ + target.damage('thunder'); + } + else{ + target.addTempSkill('huogong2','phaseBegin'); + } + game.addVideo('cardDialog',null,event.videoId); + event.dialog.close(); + }, + ai:{ + basic:{ + order:4, + value:[3,1], + useful:1, + }, + wuxie:function(target,card,player,current,state){ + if(get.attitude(current,player)>=0&&state>0) return false; + }, + result:{ + player:function(player){ + var nh=player.countCards('h'); + if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){ + if(typeof _status.event.filterCard=='function'&& + _status.event.filterCard({name:'shandianjian'})){ + return -10; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='shandianjian') return -10; + if(viewAs&&viewAs.name=='shandianjian') return -10; + } + } + return 0; + }, + target:function(player,target){ + if(target.hasSkill('huogong2')||target.countCards('h')==0) return 0; + if(player.countCards('h')<=1) return 0; + if(target==player){ + if(typeof _status.event.filterCard=='function'&& + _status.event.filterCard({name:'shandianjian'})){ + return -1.5; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='shandianjian') return -1.5; + if(viewAs&&viewAs.name=='shandianjian') return -1.5; + } return 0; } - return 3; + return -1.5; } - return 0.1; - } - } - } - }, - shijieshu:{ - fullskin:true, - enable:true, - type:'trick', - filterTarget:function(card,player,target){ - return !target.isMin(); - }, - content:function(){ - 'step 0' - var cards=[]; - for(var i=0;i<2;i++){ - var card=get.cardPile(function(card){ - return get.type(card)=='equip'; - }); - if(card){ - ui.special.appendChild(card); - cards.push(card); - } - } - switch(cards.length){ - case 1:{ - target.$gain(cards[0]); - game.delay(); - break; - } - case 2:{ - target.$gain(cards[0]); - setTimeout(function(){ - target.$gain(cards[1]); - },250); - game.delay(); - break; - } - } - event.cards=cards; - 'step 1' - if(event.cards.length){ - target.equip(event.cards.shift()); - game.delay(0.5); - if(event.cards.length){ - event.redo(); - } - } - 'step 2' - game.delay(0.5); - 'step 3' - if(target.countCards('h')){ - target.chooseToDiscard('h',true); - } - }, - ai:{ - order:9, - value:6, - useful:2, - result:{ - target:function(player,target){ - return Math.max(0,2-target.countCards('e'))+(target.countCards('h')?0:0.5); }, - }, - tag:{ - norepeat:1 - } - } - }, - shandianjian:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - if(player!=game.me&&player.countCards('h')<2) return false; - return target.countCards('h')>0; - }, - content:function(){ - "step 0" - if(target.countCards('h')==0){ - event.finish(); - return; - } - var rand=Math.random()<0.5; - target.chooseCard(true).ai=function(card){ - if(rand) return Math.random(); - return get.value(card); - }; - "step 1" - event.dialog=ui.create.dialog(get.translation(target.name)+'展示的手牌',result.cards); - event.card2=result.cards[0]; - event.videoId=lib.status.videoId++; - game.addVideo('cardDialog',null,[get.translation(target.name)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]); - game.log(target,'展示了',event.card2); - player.chooseToDiscard(function(card){ - return get.suit(card)==get.suit(_status.event.parent.card2); - },function(card){ - if(get.damageEffect(target,player,player,'thunder')>0){ - return 6-get.value(card,_status.event.player); + tag:{ + damage:1, + thunderDamage:1, + natureDamage:1, + norepeat:1 } - return -1; - }).prompt=false; - game.delay(2); - "step 2" - if(result.bool){ - target.damage('thunder'); } - else{ - target.addTempSkill('huogong2','phaseBegin'); - } - game.addVideo('cardDialog',null,event.videoId); - event.dialog.close(); }, - ai:{ - basic:{ - order:4, - value:[3,1], + shihuawuqi:{ + fullskin:true, + type:'basic', + enable:true, + usable:1, + filterTarget:function(card,player,target){ + return player==target; + }, + selectTarget:-1, + content:function(){ + player.addTempSkill('shihuawuqi','phaseAfter'); + if(!player.countCards('h','sha')){ + var card=get.cardPile('sha'); + if(card){ + player.gain(card,'gain2'); + } + } + }, + ai:{ + value:4, + useful:2, + order:8, + result:{ + target:function(player,target){ + return target.countCards('h','sha')?0:1; + } + } + } + }, + siwangchanrao:{ + enable:true, + type:'trick', + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h')>0; + }, + selectTarget:1, + content:function(){ + 'step 0' + var hs=target.getCards('h'); + if(hs.length){ + target.discard(hs.randomGet()); + } + 'step 1' + if(!target.countCards('h')){ + player.draw(); + } + }, + ai:{ + order:9, + value:4, useful:1, - }, - wuxie:function(target,card,player,current,state){ - if(get.attitude(current,player)>=0&&state>0) return false; - }, - result:{ - player:function(player){ - var nh=player.countCards('h'); - if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){ - if(typeof _status.event.filterCard=='function'&& - _status.event.filterCard({name:'shandianjian'})){ - return -10; - } - if(_status.event.skill){ - var viewAs=get.info(_status.event.skill).viewAs; - if(viewAs=='shandianjian') return -10; - if(viewAs&&viewAs.name=='shandianjian') return -10; - } - } - return 0; - }, - target:function(player,target){ - if(target.hasSkill('huogong2')||target.countCards('h')==0) return 0; - if(player.countCards('h')<=1) return 0; - if(target==player){ - if(typeof _status.event.filterCard=='function'&& - _status.event.filterCard({name:'shandianjian'})){ - return -1.5; - } - if(_status.event.skill){ - var viewAs=get.info(_status.event.skill).viewAs; - if(viewAs=='shandianjian') return -1.5; - if(viewAs&&viewAs.name=='shandianjian') return -1.5; - } - return 0; - } - return -1.5; - } - }, - tag:{ - damage:1, - thunderDamage:1, - natureDamage:1, - norepeat:1 - } - } - }, - shihuawuqi:{ - fullskin:true, - type:'basic', - enable:true, - usable:1, - filterTarget:function(card,player,target){ - return player==target; - }, - selectTarget:-1, - content:function(){ - player.addTempSkill('shihuawuqi','phaseAfter'); - if(!player.countCards('h','sha')){ - var card=get.cardPile('sha'); - if(card){ - player.gain(card,'gain2'); - } - } - }, - ai:{ - value:4, - useful:2, - order:8, - result:{ - target:function(player,target){ - return target.countCards('h','sha')?0:1; - } - } - } - }, - siwangchanrao:{ - enable:true, - type:'trick', - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h')>0; - }, - selectTarget:1, - content:function(){ - 'step 0' - var hs=target.getCards('h'); - if(hs.length){ - target.discard(hs.randomGet()); - } - 'step 1' - if(!target.countCards('h')){ - player.draw(); - } - }, - ai:{ - order:9, - value:4, - useful:1, - result:{ - target:-1, - player:function(player,target){ - if(target.countCards('h')==1) return 1; - } - } - } - }, - dunpaigedang:{ - fullskin:true, - enable:true, - type:'trick', - filterTarget:function(card,player,target){ - return player==target; - }, - selectTarget:-1, - modTarget:true, - content:function(){ - target.changeHujia(); - target.draw(); - }, - ai:{ - order:8.5, - value:7, - useful:3, - result:{ - target:1 - } - } - }, - chuansongmen:{ - fullskin:true, - type:'trick', - enable:true, - discard:false, - selectTarget:-1, - filterTarget:function(card,player,target){ - return target==player; - }, - modTarget:true, - // usable:3, - // forceUsable:true, - content:function(){ - 'step 0' - var gained=get.cards()[0]; - target.gain(gained,'gain2'); - if(event.getParent(3).name=='phaseUse'&&_status.currentPhase==target&& - lib.filter.filterCard(gained,target,event.getParent(2))){ - var next=target.chooseToUse(); - next.filterCard=function(card){ - return card==gained; - }; - next.prompt='是否使用'+get.translation(gained)+'?'; - if(cards[0]){ - ui.special.appendChild(cards[0]); - } - else{ - event.finish(); - } - } - else{ - if(cards[0]){ - ui.discardPile.appendChild(cards[0]); - } - event.finish(); - } - 'step 1' - if(result.bool&&!target.hasSkill('chuansongmen3')){ - if(target.hasSkill('chuansongmen2')){ - target.addTempSkill('chuansongmen3','phaseAfter'); - } - else{ - target.addTempSkill('chuansongmen2','phaseAfter'); - } - target.gain(cards,'gain2'); - } - else{ - ui.discardPile.appendChild(cards[0]); - } - }, - ai:{ - order:9.5, - value:7, - useful:3, - result:{ - target:1 - }, - tag:{ - norepeat:1 - } - } - }, - tanshezhiren:{ - fullskin:true, - type:'trick', - enable:true, - chongzhu:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - modTarget:true, - content:function(){ - 'step 0' - event.current=target; - event.num=game.countPlayer(); - if(event.num%2==0){ - event.num--; - } - 'step 1' - if(event.num){ - var enemies=event.current.getEnemies(); - for(var i=0;i2) return 1; - return 0; - }, - }, - tag:{ - recover:1 - } - } - }, - shenenshu:{ - fullskin:true, - enable:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - type:'trick', - content:function(){ - var num=player.countCards('h')-target.countCards('h'); - if(num<-3) num=-3; - if(num>3) num=3; - if(num>0){ - target.draw(num); - } - else if(num<0){ - player.draw(-num); - } - else{ - game.asyncDraw([target,player]); - } - }, - ai:{ - order:10, - value:7, - useful:2, - result:{ - target:function(player,target){ - var nh=player.countCards('h')-target.countCards('h'); - if(!player.hasSkill('jizhi')){ - nh--; - } - if(nh>0) return nh; - if(nh==0) return 1; - return 0; - }, - player:function(player,target){ - var nh=target.countCards('h')-player.countCards('h'); - if(!player.hasSkill('jizhi')){ - nh++; - } - if(nh>0) return nh; - if(nh==0) return 1; - return 0; - } - }, - expose:0.2 - } - }, - zhiliaobo:{ - fullskin:true, - enable:true, - filterTarget:function(card,player,target){ - return target.hp=0){ - if(target.hasSkillTag('maixie')){ - if(ui.selected.cards.length) return 0; + modTarget:true, + // usable:3, + // forceUsable:true, + content:function(){ + 'step 0' + var gained=get.cards()[0]; + target.gain(gained,'gain2'); + if(event.getParent(3).name=='phaseUse'&&_status.currentPhase==target&& + lib.filter.filterCard(gained,target,event.getParent(2))){ + var next=target.chooseToUse(); + next.filterCard=function(card){ + return card==gained; + }; + next.prompt='是否使用'+get.translation(gained)+'?'; + if(cards[0]){ + ui.special.appendChild(cards[0]); } else{ - return 0; + event.finish(); } } - if(player.hasSkillTag('notricksource')) return 0; - if(target.hasSkillTag('notrick')) return 0; - if(card.name=='tao') return 0; - if(target.hp==1&&card.name=='jiu') return 0; - if(get.type(card)!='basic'){ - return 10-get.value(card); + else{ + if(cards[0]){ + ui.discardPile.appendChild(cards[0]); + } + event.finish(); + } + 'step 1' + if(result.bool&&!target.hasSkill('chuansongmen3')){ + if(target.hasSkill('chuansongmen2')){ + target.addTempSkill('chuansongmen3','phaseAfter'); + } + else{ + target.addTempSkill('chuansongmen2','phaseAfter'); + } + target.gain(cards,'gain2'); + } + else{ + ui.discardPile.appendChild(cards[0]); + } + }, + ai:{ + order:9.5, + value:7, + useful:3, + result:{ + target:1 + }, + tag:{ + norepeat:1 } - return 8-get.value(card); - }; - "step 1" - if(!result.bool||result.cards.length<2){ - if(result.bool) target.damage(2-result.cards.length,'thunder'); - else target.damage(2,'thunder'); } }, - ai:{ - basic:{ - order:7, - useful:[5,1] + tanshezhiren:{ + fullskin:true, + type:'trick', + enable:true, + chongzhu:true, + filterTarget:function(card,player,target){ + return target==player; }, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nothunder')) return 0; - if(player.hasUnknown(2)) return 0; - var nh=target.countCards('he'); - if(target==player) nh--; - if(nh==2) return -2.5; - if(nh==1) return -3; - if(nh==0) return -4; - return -2; + selectTarget:-1, + modTarget:true, + content:function(){ + 'step 0' + event.current=target; + event.num=game.countPlayer(); + if(event.num%2==0){ + event.num--; + } + 'step 1' + if(event.num){ + var enemies=event.current.getEnemies(); + for(var i=0;i2) return 1; + return 0; + }, + }, + tag:{ + recover:1 + } + } + }, + shenenshu:{ + fullskin:true, + enable:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + type:'trick', + content:function(){ + var num=player.countCards('h')-target.countCards('h'); + if(num<-3) num=-3; + if(num>3) num=3; + if(num>0){ + target.draw(num); + } + else if(num<0){ + player.draw(-num); + } + else{ + game.asyncDraw([target,player]); + } + }, + ai:{ + order:10, + value:7, + useful:2, + result:{ + target:function(player,target){ + var nh=player.countCards('h')-target.countCards('h'); + if(!player.hasSkill('jizhi')){ + nh--; + } + if(nh>0) return nh; + if(nh==0) return 1; + return 0; + }, + player:function(player,target){ + var nh=target.countCards('h')-player.countCards('h'); + if(!player.hasSkill('jizhi')){ + nh++; + } + if(nh>0) return nh; + if(nh==0) return 1; + return 0; + } + }, + expose:0.2 + } + }, + zhiliaobo:{ + fullskin:true, + enable:true, + filterTarget:function(card,player,target){ + return target.hp=0){ + if(target.hasSkillTag('maixie')){ + if(ui.selected.cards.length) return 0; + } + else{ + return 0; + } + } + if(player.hasSkillTag('notricksource')) return 0; + if(target.hasSkillTag('notrick')) return 0; + if(card.name=='tao') return 0; + if(target.hp==1&&card.name=='jiu') return 0; + if(get.type(card)!='basic'){ + return 10-get.value(card); + } + return 8-get.value(card); + }; + "step 1" + if(!result.bool||result.cards.length<2){ + if(result.bool) target.damage(2-result.cards.length,'thunder'); + else target.damage(2,'thunder'); + } + }, + ai:{ + basic:{ + order:7, + useful:[5,1] + }, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nothunder')) return 0; + if(player.hasUnknown(2)) return 0; + var nh=target.countCards('he'); + if(target==player) nh--; + if(nh==2) return -2.5; + if(nh==1) return -3; + if(nh==0) return -4; + return -2; + }, + }, + tag:{ + damage:1, + natureDamage:1, + thunderDamage:1, + multitarget:1, + multineg:1, + discard:2, + loseCard:2, + } } } }, - jihuocard2:{ - mod:{ - maxHandcard:function(player,num){ - return num+2; + skill:{ + chuansongmen2:{}, + chuansongmen3:{}, + shihuawuqi:{ + mod:{ + attackFrom:function(from,to,distance){ + return distance-1; + } + } + }, + jihuocard2:{ + mod:{ + maxHandcard:function(player,num){ + return num+2; + } } } - } - }, - translate:{ - linghunzhihuo:'灵魂之火', - linghunzhihuo_info:'对一名角色造成一点火焰伤害,然后随机弃置一张手牌', - shenenshu:'神恩术', - shenenshu_info:'对一名其他角色使用,令你与目标中手牌数较少的摸若干张牌,直到手牌数相等(X不大于3),若手牌数已相等,改为你与目标各摸一张牌', - zhiliaobo:'治疗波', - zhiliaobo_info:'对一名受伤角色使用,令其回复一点体力,并进行一次判定,若结果为红色则目标摸一张牌', - yuansuhuimie:'元素毁灭', - yuansuhuimie_info:'对所有角色使用,令目标弃置0~2张牌,并受到2-X点雷电伤害,X为其弃置的手牌数', - xingjiegoutong:'星界沟通', - xingjiegoutong_info:'增加一点体力上限并回复一点体力,弃置你的所有手牌', - tanshezhiren:'弹射之刃', - tanshezhiren_info:'出牌阶段对自己使用,第一次结算时随机弃置一名使用者的敌人的一张手牌,从第二次结算开始,每次随机弃置一名上一次被弃牌角色的敌人的一张手牌,共结算X次,X为存活角色数,若X为偶数,改为X-1', - chuansongmen:'传送门', - chuansongmen_info:'摸一张牌并展示,若发生在出牌阶段,你可以立即使用摸到的牌,若如此做,你将传送门收回手牌(每阶段最多收回2张传送门)', - dunpaigedang:'盾牌格挡', - dunpaigedang_info:'获得一点护甲值,摸一张牌', - siwangchanrao:'死亡缠绕', - siwangchanrao_infox:'弃置一名其他角色的一张手牌,若其此时没有手牌,则你摸一张牌', - shihuawuqi:'石化武器', - shihuawuqi_infox:'本回合内攻击范围+1;若你手牌中没有杀,则从牌堆中获得一张杀', - shandianjian:'闪电箭', - shandianjian_info:'目标角色展示一张手牌,然后若你能弃掉一张与所展示牌相同花色的手牌,则对该角色造成1点雷电伤害。', - shijieshu:'视界术', - shijieshu_info:'目标随机装备两张装备牌,然后弃置一张手牌', - zhaomingdan:'照明弹', - zhaomingdan_info:'观看一名其他角色的手牌,并弃置其区域内的一张牌,然后其与你各摸一张牌', - jihuocard:'激活', - jihuocard_info:'摸一张牌,本回合手牌上限+2', - }, - list:[ - // ['heart',2,'shenenshu'], - // ['diamond',12,'shenenshu'], - ['club',7,'zhiliaobo'], - ['spade',1,'zhiliaobo'], - ['spade',13,'yuansuhuimie'], - ['spade',13,'xingjiegoutong'], - ['diamond',2,'tanshezhiren'], - ['diamond',2,'chuansongmen'], - ['heart',2,'chuansongmen'], - ['club',3,'dunpaigedang'], - ['club',3,'shandianjian','thunder'], - ['spade',1,'shandianjian','thunder'], - ['spade',7,'shijieshu'], - ['diamond',5,'zhaomingdan'], - ['heart',10,'zhaomingdan'], - ['diamond',2,'jihuocard'], - ['diamond',1,'linghunzhihuo'], - ], + }, + translate:{ + linghunzhihuo:'灵魂之火', + linghunzhihuo_info:'对一名角色造成一点火焰伤害,然后随机弃置一张手牌', + shenenshu:'神恩术', + shenenshu_info:'对一名其他角色使用,令你与目标中手牌数较少的摸若干张牌,直到手牌数相等(X不大于3),若手牌数已相等,改为你与目标各摸一张牌', + zhiliaobo:'治疗波', + zhiliaobo_info:'对一名受伤角色使用,令其回复一点体力,并进行一次判定,若结果为红色则目标摸一张牌', + yuansuhuimie:'元素毁灭', + yuansuhuimie_info:'对所有角色使用,令目标弃置0~2张牌,并受到2-X点雷电伤害,X为其弃置的手牌数', + xingjiegoutong:'星界沟通', + xingjiegoutong_info:'增加一点体力上限并回复一点体力,弃置你的所有手牌', + tanshezhiren:'弹射之刃', + tanshezhiren_info:'出牌阶段对自己使用,第一次结算时随机弃置一名使用者的敌人的一张手牌,从第二次结算开始,每次随机弃置一名上一次被弃牌角色的敌人的一张手牌,共结算X次,X为存活角色数,若X为偶数,改为X-1', + chuansongmen:'传送门', + chuansongmen_info:'摸一张牌并展示,若发生在出牌阶段,你可以立即使用摸到的牌,若如此做,你将传送门收回手牌(每阶段最多收回2张传送门)', + dunpaigedang:'盾牌格挡', + dunpaigedang_info:'获得一点护甲值,摸一张牌', + siwangchanrao:'死亡缠绕', + siwangchanrao_infox:'弃置一名其他角色的一张手牌,若其此时没有手牌,则你摸一张牌', + shihuawuqi:'石化武器', + shihuawuqi_infox:'本回合内攻击范围+1;若你手牌中没有杀,则从牌堆中获得一张杀', + shandianjian:'闪电箭', + shandianjian_info:'目标角色展示一张手牌,然后若你能弃掉一张与所展示牌相同花色的手牌,则对该角色造成1点雷电伤害。', + shijieshu:'视界术', + shijieshu_info:'目标随机装备两张装备牌,然后弃置一张手牌', + zhaomingdan:'照明弹', + zhaomingdan_info:'观看一名其他角色的手牌,并弃置其区域内的一张牌,然后其与你各摸一张牌', + jihuocard:'激活', + jihuocard_info:'摸一张牌,本回合手牌上限+2', + }, + list:[ + // ['heart',2,'shenenshu'], + // ['diamond',12,'shenenshu'], + ['club',7,'zhiliaobo'], + ['spade',1,'zhiliaobo'], + ['spade',13,'yuansuhuimie'], + ['spade',13,'xingjiegoutong'], + ['diamond',2,'tanshezhiren'], + ['diamond',2,'chuansongmen'], + ['heart',2,'chuansongmen'], + ['club',3,'dunpaigedang'], + ['club',3,'shandianjian','thunder'], + ['spade',1,'shandianjian','thunder'], + ['spade',7,'shijieshu'], + ['diamond',5,'zhaomingdan'], + ['heart',10,'zhaomingdan'], + ['diamond',2,'jihuocard'], + ['diamond',1,'linghunzhihuo'], + ], + }; }); diff --git a/card/sp.js b/card/sp.js index 2708a13fd..f5d190c58 100644 --- a/card/sp.js +++ b/card/sp.js @@ -1,981 +1,989 @@ 'use strict'; -game.import('card',{ - name:'sp', - connect:true, - card:{ - jinchan:{ - fullskin:true, - type:'trick', - ai:{ - useful:function(){ - var player=_status.event.player; - var nj=player.countCards('h','jinchan'); - var num=player.getHandcardLimit(); - if(nj>=num){ - return 10; +game.import('card',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'sp', + connect:true, + card:{ + jinchan:{ + fullskin:true, + type:'trick', + ai:{ + useful:function(){ + var player=_status.event.player; + var nj=player.countCards('h','jinchan'); + var num=player.getHandcardLimit(); + if(nj>=num){ + return 10; + } + if(nj==num-1){ + return 6; + } + return 1; + }, + value:5 + } + }, + qijia:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + if(target.getEquip(5)){ + return target.countCards('e')>1; } - if(nj==num-1){ - return 6; + else{ + return target.countCards('e')>0; } - return 1; }, - value:5 - } - }, - qijia:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - if(target.getEquip(5)){ - return target.countCards('e')>1; - } - else{ - return target.countCards('e')>0; - } - }, - content:function(){ - 'step 0' - var e1=[],e2=[]; - var he=target.getCards('he'); - for(var i=0;ie2.length||(target.hp>=3&&Math.random()<0.3)){ - choice=1; - } - event.e1=e1; - event.e2=e2; - target.chooseControl(choice).set('choiceList',['弃置'+get.translation(e1),'弃置'+get.translation(e2)]); - } - else{ - if(e1.length){ - target.discard(e1); - } - else if(e2.length){ - target.discard(e2); - } - event.finish(); - } - 'step 1' - if(result.index==0){ - target.discard(event.e1); - } - else{ - target.discard(event.e2); - } - }, - ai:{ - order:9.01, - useful:1, - value:5, - result:{ - target:function(player,target){ - var num1=0,num2=0; - for(var i=1;i<=4;i++){ - var card=target.getEquip(i); - if(card){ - if(i==1||i==4){ - num1+=get.equipValue(card); - } - else{ - num2+=get.equipValue(card); - } + content:function(){ + 'step 0' + var e1=[],e2=[]; + var he=target.getCards('he'); + for(var i=0;ie2.length||(target.hp>=3&&Math.random()<0.3)){ + choice=1; } - else if(num2==0){ - num=num1; + event.e1=e1; + event.e2=e2; + target.chooseControl(choice).set('choiceList',['弃置'+get.translation(e1),'弃置'+get.translation(e2)]); + } + else{ + if(e1.length){ + target.discard(e1); + } + else if(e2.length){ + target.discard(e2); + } + event.finish(); + } + 'step 1' + if(result.index==0){ + target.discard(event.e1); + } + else{ + target.discard(event.e2); + } + }, + ai:{ + order:9.01, + useful:1, + value:5, + result:{ + target:function(player,target){ + var num1=0,num2=0; + for(var i=1;i<=4;i++){ + var card=target.getEquip(i); + if(card){ + if(i==1||i==4){ + num1+=get.equipValue(card); + } + else{ + num2+=get.equipValue(card); + } + } + } + var num; + if(num1==0){ + num=num2; + } + else if(num2==0){ + num=num1; + } + else{ + num=Math.min(num1,num2); + } + if(num>0){ + return -0.8-num/10; + } + else{ + return 0; + } + } + }, + tag:{ + loseCard:1, + discard:1 + } + } + }, + fulei:{ + fullskin:true, + type:'delay', + modTarget:function(card,player,target){ + return lib.filter.judge(card,player,target); + }, + enable:function(card,player){ + return player.canAddJudge(card); + }, + filterTarget:function(card,player,target){ + return (lib.filter.judge(card,player,target)&&player==target); + }, + selectTarget:[-1,-1], + judge:function(card){ + if(get.suit(card)=='spade') return -6; + return 0; + }, + effect:function(){ + if(result.judge){ + if(!card.storage.fulei){ + card.storage.fulei=1; } else{ - num=Math.min(num1,num2); + card.storage.fulei++; } - if(num>0){ - return -0.8-num/10; + player.damage(card.storage.fulei,'thunder','nosource'); + } + player.addJudgeNext(card); + }, + cancel:function(){ + player.addJudgeNext(card); + }, + ai:{ + basic:{ + order:1, + useful:0, + value:0, + }, + result:{ + target:function(player,target){ + return lib.card.shandian.ai.result.target(player,target); + } + }, + } + }, + qibaodao:{ + fullskin:true, + type:'equip', + subtype:'equip1', + skills:['qibaodao'], + distance:{attackFrom:-1}, + ai:{ + equipValue:function(card,player){ + if(game.hasPlayer(function(current){ + return player.canUse('sha',current)&¤t.isHealthy()&&get.attitude(player,current)<0; + })){ + return 5; + } + return 3; + } + }, + }, + zhungangshuo:{ + fullskin:true, + type:'equip', + subtype:'equip1', + skills:['zhungangshuo'], + distance:{attackFrom:-2}, + ai:{ + equipValue:4 + }, + }, + lanyinjia:{ + fullskin:true, + type:'equip', + subtype:'equip2', + skills:['lanyinjia','lanyinjia2'], + ai:{ + equipValue:6 + } + }, + yinyueqiang:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-2}, + ai:{ + basic:{ + equipValue:4 + } + }, + skills:['yinyueqiang'] + }, + muniu:{ + fullskin:true, + type:'equip', + subtype:'equip5', + nomod:true, + onEquip:function(){ + player.markSkill('muniu_skill6'); + }, + onLose:function(){ + player.unmarkSkill('muniu_skill6'); + if(event.parent.type!='equip'&&card&&card.cards&&card.cards.length){ + player.$throw(card.cards,1000); + player.popup('muniu'); + game.log(card,'掉落了',card.cards); + while(card.cards.length){ + var card2=card.cards.shift(); + if(card2.parentNode.id=='special'){ + ui.discardPile.appendChild(card2); + } + } + } + }, + equipDelay:false, + loseDelay:false, + skills:['muniu_skill','muniu_skill2','muniu_skill6','muniu_skill7'], + ai:{ + basic:{ + equipValue:function(card){ + if(card.card) return 8+card.card.length; + return 8; + } + } + } + }, + du:{ + type:'basic', + fullskin:true, + ai:{ + value:-5, + useful:6, + result:{ + player:function(player,target){ + if(player.hasSkillTag('usedu')) return 5; + return -1; + } + }, + order:7.5 + }, + enable:true, + modTarget:true, + filterTarget:function(card,player,target){ + return target==player; + }, + delay:false, + content:function(){}, + selectTarget:-1 + }, + shengdong:{ + fullskin:true, + enable:true, + chongzhu:function(){ + return game.countPlayer()<=2; + }, + singleCard:true, + type:'trick', + selectTarget:2, + multitarget:true, + targetprompt:['给一张牌','得两张牌'], + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + 'step 0' + if(!player.countCards('h')){ + event.finish(); + } + else{ + event.target1=target; + event.target2=event.addedTarget; + player.chooseCard('h','将一张手牌交给'+get.translation(event.target1),true); + } + 'step 1' + player.$giveAuto(result.cards,event.target1); + event.target1.gain(result.cards,player); + 'step 2' + if(!event.target1.countCards('h')){ + event.finish(); + } + else{ + var he=event.target1.getCards('he'); + if(he.length<=2){ + event.directresult=he; } else{ + event.target1.chooseCard('he','将两张牌交给'+get.translation(event.target2),2,true); + } + } + 'step 3' + if(!event.directresult){ + event.directresult=result.cards; + } + event.target1.$giveAuto(event.directresult,event.target2); + event.target2.gain(event.directresult,event.target1); + }, + ai:{ + order:2.5, + value:[4,1], + useful:1, + wuxie:function(){ + return 0; + }, + result:{ + target:function(player,target){ + var ok=false; + var hs=player.getCards('h'); + if(hs.length<=1) return 0; + for(var i=0;i1); + event.more=true; } else{ - card.storage.fulei++; + target.chooseToDiscard('he',2,true).set('ai',get.disvalue2); } - player.damage(card.storage.fulei,'thunder','nosource'); - } - player.addJudgeNext(card); - }, - cancel:function(){ - player.addJudgeNext(card); - }, - ai:{ - basic:{ - order:1, - useful:0, - value:0, - }, - result:{ - target:function(player,target){ - return lib.card.shandian.ai.result.target(player,target); + 'step 2' + if(event.more&&!result.bool){ + target.chooseToDiscard('he',2,true).set('ai',get.disvalue2); } }, - } - }, - qibaodao:{ - fullskin:true, - type:'equip', - subtype:'equip1', - skills:['qibaodao'], - distance:{attackFrom:-1}, - ai:{ - equipValue:function(card,player){ - if(game.hasPlayer(function(current){ - return player.canUse('sha',current)&¤t.isHealthy()&&get.attitude(player,current)<0; - })){ - return 5; - } - return 3; - } - }, - }, - zhungangshuo:{ - fullskin:true, - type:'equip', - subtype:'equip1', - skills:['zhungangshuo'], - distance:{attackFrom:-2}, - ai:{ - equipValue:4 - }, - }, - lanyinjia:{ - fullskin:true, - type:'equip', - subtype:'equip2', - skills:['lanyinjia','lanyinjia2'], - ai:{ - equipValue:6 - } - }, - yinyueqiang:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-2}, - ai:{ - basic:{ - equipValue:4 - } - }, - skills:['yinyueqiang'] - }, - muniu:{ - fullskin:true, - type:'equip', - subtype:'equip5', - nomod:true, - onEquip:function(){ - player.markSkill('muniu_skill6'); - }, - onLose:function(){ - player.unmarkSkill('muniu_skill6'); - if(event.parent.type!='equip'&&card&&card.cards&&card.cards.length){ - player.$throw(card.cards,1000); - player.popup('muniu'); - game.log(card,'掉落了',card.cards); - while(card.cards.length){ - var card2=card.cards.shift(); - if(card2.parentNode.id=='special'){ - ui.discardPile.appendChild(card2); + ai:{ + order:7, + useful:4, + value:10, + tag:{ + draw:2 + }, + result:{ + target:function(player,target){ + if(target.hasJudge('lebu')) return 0; + return Math.max(1,2-target.countCards('h')/10); } } } - }, - equipDelay:false, - loseDelay:false, - skills:['muniu_skill','muniu_skill2','muniu_skill6','muniu_skill7'], - ai:{ - basic:{ - equipValue:function(card){ - if(card.card) return 8+card.card.length; - return 8; - } - } - } - }, - du:{ - type:'basic', - fullskin:true, - ai:{ - value:-5, - useful:6, - result:{ - player:function(player,target){ - if(player.hasSkillTag('usedu')) return 5; - return -1; + }, + caomu:{ + fullskin:true, + enable:true, + type:'delay', + filterTarget:function(card,player,target){ + return (lib.filter.judge(card,player,target)&&player!=target); + }, + judge:function(card){ + if(get.suit(card)=='club') return 0; + return -3; + }, + effect:function(){ + if(result.bool==false){ + player.addTempSkill('caomu_skill','phaseAfter'); } }, - order:7.5 - }, - enable:true, - modTarget:true, - filterTarget:function(card,player,target){ - return target==player; - }, - delay:false, - content:function(){}, - selectTarget:-1 + ai:{ + basic:{ + order:1, + useful:1, + value:4.5, + }, + result:{ + player:function(player,target){ + return game.countPlayer(function(current){ + if(get.distance(target,current)<=1&¤t!=target){ + var att=get.attitude(player,current); + if(att>3){ + return 1.1; + } + else if(att>0){ + return 1; + } + else if(att<-3){ + return -1.1; + } + else if(att<0){ + return -1; + } + } + }); + }, + target:-1 + }, + } + } }, - shengdong:{ - fullskin:true, - enable:true, - chongzhu:function(){ - return game.countPlayer()<=2; - }, - singleCard:true, - type:'trick', - selectTarget:2, - multitarget:true, - targetprompt:['给一张牌','得两张牌'], - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - 'step 0' - if(!player.countCards('h')){ - event.finish(); - } - else{ - event.target1=target; - event.target2=event.addedTarget; - player.chooseCard('h','将一张手牌交给'+get.translation(event.target1),true); - } - 'step 1' - player.$giveAuto(result.cards,event.target1); - event.target1.gain(result.cards,player); - 'step 2' - if(!event.target1.countCards('h')){ - event.finish(); - } - else{ - var he=event.target1.getCards('he'); - if(he.length<=2){ - event.directresult=he; - } - else{ - event.target1.chooseCard('he','将两张牌交给'+get.translation(event.target2),2,true); - } - } - 'step 3' - if(!event.directresult){ - event.directresult=result.cards; - } - event.target1.$giveAuto(event.directresult,event.target2); - event.target2.gain(event.directresult,event.target1); - }, - ai:{ - order:2.5, - value:[4,1], - useful:1, - wuxie:function(){ - return 0; + skill:{ + lanyinjia:{ + enable:['chooseToRespond'], + filterCard:true, + viewAs:{name:'shan'}, + viewAsFilter:function(player){ + if(!player.countCards('h')) return false; }, - result:{ - target:function(player,target){ - var ok=false; - var hs=player.getCards('h'); - if(hs.length<=1) return 0; - for(var i=0;i=0) return false; + if(player.hasCard(function(card){ + return get.value(card)>=8; + })){ + return false; + } + var n1=event.target.countCards('h'); + return n1>0&&n1<=player.countCards('h'); + }, + content:function(){ + 'step 0' + game.delayx(); + 'step 1' + trigger.target.discardPlayerCard('h',player,true); + 'step 2' + player.discardPlayerCard('h',trigger.target,true); + } + }, + qibaodao:{ + trigger:{source:'damageBegin'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.player.isHealthy(); + }, + content:function(){ + trigger.num++; + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha') return true; + return false; + }, + effect:{ + player:function(card,player,target){ + if(card.name=='sha'&&target.isHealthy()&&get.attitude(player,target)>0){ + return [1,-2]; } } - if(!ok) return 0; - if(ui.selected.targets.length==1) return 2; - if(target.countCards('he')==0) return 0; - if(player.hasFriend()) return -1; + } + } + }, + _jinchan:{ + trigger:{target:'useCardToBefore'}, + forced:true, + popup:false, + filter:function(event,player){ + if(event.player==player) return false; + var num=player.countCards('h','jinchan'); + return num&&num==player.countCards('h'); + }, + content:function(){ + 'step 0' + player.showHandcards(get.translation(player)+'发动了【金蝉脱壳】'); + 'step 1' + var type=get.type(trigger.card,'trick'); + if(type=='basic'||type=='trick'){ + trigger.untrigger(); + trigger.finish(); + } + player.draw(2); + } + }, + _jinchan2:{ + trigger:{player:'discardAfter'}, + forced:true, + filter:function(event,player){ + for(var i=0;i0; + }, + prepare:function(cards,player){ + player.$give(1,player,false); + }, + content:function(){ + "step 0" + for(var i=0;i=3&&get.attitude(current,player)>=3){ + return true; + } + }); + players.sort(lib.sort.seat); + var choice=players[0]; + var next=player.chooseTarget('是否移动木牛流马?',function(card,player,target){ + return !target.isMin()&&player!=target&&!target.getEquip(5); + }); + next.set('ai',function(target){ + return target==_status.event.choice?1:-1; + }); + next.set('choice',choice); + "step 1" + if(result.bool){ + var card=player.getEquip(5); + result.targets[0].equip(card); + player.$give(card,result.targets[0]); + player.line(result.targets,'green'); + game.delay(); + } + else{ + player.updateMarks(); + } + }, + ai:{ + save:true, + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag){ + var muniu=player.getEquip(5); + if(!muniu||!muniu.cards) return false; + for(var i=0;i1) return -2; + if(get.select(get.info(button.link).selectTarget)[1]==-1){ + if(get.type(button.link)=='delay') return -1; + if(get.type(button.link)=='equip'){ + var current=player.getCards('e',{subtype:get.subtype(button.link)})[0]; + if(current&&get.equipValue(current)>=get.equipValue(button.link)) return -1; + return 1; + } + if(get.tag(button.link,'multitarget')) return -1; + if(button.link.name=='huoshaolianying') return -1; + } + if(button.link.name=='jiu'){ + if(get.effect(player,{name:'jiu'},player)>0){ + return 1; + } + return -1; + } + return 1; + }, + backup:function(links,player){ + return { + filterCard:function(){return false}, + selectCard:-1, + viewAs:links[0], + onuse:function(result,player){ + var muniu=player.getEquip(5); + if(muniu&&muniu.cards){ + muniu.cards.remove(result.card); + lib.skill.muniu_skill.sync(muniu); + } + player.updateMarks(); + } + } + }, + prompt:function(links,player){ + return '选择'+get.translation(links)+'的目标'; + } + }, + ai:{ + order:4, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); + return 1; + } + }, + useful:-1, + value:-1 + } + }, + muniu_skill6:{ + mark:true, + intro:{ + content:function(storage,player){ + var muniu=player.getEquip(5); + if(!muniu||!muniu.cards||!muniu.cards.length) return '共有〇张牌'; + if(player.isUnderControl(true)){ + return get.translation(muniu.cards); + } + else{ + return '共有'+get.cnNumber(muniu.cards.length)+'张牌'; + } + }, + mark:function(dialog,storage,player){ + var muniu=player.getEquip(5); + if(!muniu||!muniu.cards||!muniu.cards.length) return '共有〇张牌'; + if(player.isUnderControl(true)){ + dialog.addAuto(muniu.cards); + } + else{ + return '共有'+get.cnNumber(muniu.cards.length)+'张牌'; + } + }, + markcount:function(storage,player){ + var muniu=player.getEquip(5); + if(muniu&&muniu.cards) return muniu.cards.length; return 0; } } - } - }, - zengbin:{ - fullskin:true, - enable:true, - type:'trick', - filterTarget:true, - content:function(){ - 'step 0' - target.draw(3); - 'step 1' - if(target.countCards('he',{type:'basic'})1); - event.more=true; - } - else{ - target.chooseToDiscard('he',2,true).set('ai',get.disvalue2); - } - 'step 2' - if(event.more&&!result.bool){ - target.chooseToDiscard('he',2,true).set('ai',get.disvalue2); - } }, - ai:{ - order:7, - useful:4, - value:10, - tag:{ - draw:2 - }, - result:{ - target:function(player,target){ - if(target.hasJudge('lebu')) return 0; - return Math.max(1,2-target.countCards('h')/10); - } - } - } - }, - caomu:{ - fullskin:true, - enable:true, - type:'delay', - filterTarget:function(card,player,target){ - return (lib.filter.judge(card,player,target)&&player!=target); - }, - judge:function(card){ - if(get.suit(card)=='club') return 0; - return -3; - }, - effect:function(){ - if(result.bool==false){ - player.addTempSkill('caomu_skill','phaseAfter'); - } - }, - ai:{ - basic:{ - order:1, - useful:1, - value:4.5, - }, - result:{ - player:function(player,target){ - return game.countPlayer(function(current){ - if(get.distance(target,current)<=1&¤t!=target){ - var att=get.attitude(player,current); - if(att>3){ - return 1.1; - } - else if(att>0){ - return 1; - } - else if(att<-3){ - return -1.1; - } - else if(att<0){ - return -1; - } - } - }); - }, - target:-1 - }, - } - } - }, - skill:{ - lanyinjia:{ - enable:['chooseToRespond'], - filterCard:true, - viewAs:{name:'shan'}, - viewAsFilter:function(player){ - if(!player.countCards('h')) return false; - }, - prompt:'将一张手牌当闪打出', - check:function(card){ - return 6-get.value(card); - }, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - if(!player.countCards('h')) return false; - }, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0&&target.countCards('h')) return 0.59 - } - }, - order:4, - useful:-0.5, - value:-0.5 - } - }, - lanyinjia2:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.getEquip('lanyinjia'); - }, - content:function(){ - var card=player.getEquip('lanyinjia'); - if(card){ - player.discard(card); - } - }, - }, - zhungangshuo:{ - trigger:{player:'shaBegin'}, - logTarget:'target', - filter:function(event,player){ - return event.player.countCards('h')||player.countCards('h'); - }, - check:function(event,player){ - var target=event.target; - if(get.attitude(player,target)>=0) return false; - if(player.hasCard(function(card){ - return get.value(card)>=8; - })){ - return false; - } - var n1=event.target.countCards('h'); - return n1>0&&n1<=player.countCards('h'); - }, - content:function(){ - 'step 0' - game.delayx(); - 'step 1' - trigger.target.discardPlayerCard('h',player,true); - 'step 2' - player.discardPlayerCard('h',trigger.target,true); - } - }, - qibaodao:{ - trigger:{source:'damageBegin'}, - forced:true, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.player.isHealthy(); - }, - content:function(){ - trigger.num++; - }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.name=='sha') return true; - return false; - }, - effect:{ - player:function(card,player,target){ - if(card.name=='sha'&&target.isHealthy()&&get.attitude(player,target)>0){ - return [1,-2]; - } - } - } - } - }, - _jinchan:{ - trigger:{target:'useCardToBefore'}, - forced:true, - popup:false, - filter:function(event,player){ - if(event.player==player) return false; - var num=player.countCards('h','jinchan'); - return num&&num==player.countCards('h'); - }, - content:function(){ - 'step 0' - player.showHandcards(get.translation(player)+'发动了【金蝉脱壳】'); - 'step 1' - var type=get.type(trigger.card,'trick'); - if(type=='basic'||type=='trick'){ - trigger.untrigger(); - trigger.finish(); - } - player.draw(2); - } - }, - _jinchan2:{ - trigger:{player:'discardAfter'}, - forced:true, - filter:function(event,player){ - for(var i=0;i0; - }, - prepare:function(cards,player){ - player.$give(1,player,false); - }, - content:function(){ - "step 0" - for(var i=0;i=3&&get.attitude(current,player)>=3){ - return true; - } - }); - players.sort(lib.sort.seat); - var choice=players[0]; - var next=player.chooseTarget('是否移动木牛流马?',function(card,player,target){ - return !target.isMin()&&player!=target&&!target.getEquip(5); - }); - next.set('ai',function(target){ - return target==_status.event.choice?1:-1; - }); - next.set('choice',choice); - "step 1" - if(result.bool){ - var card=player.getEquip(5); - result.targets[0].equip(card); - player.$give(card,result.targets[0]); - player.line(result.targets,'green'); - game.delay(); - } - else{ - player.updateMarks(); - } - }, - ai:{ - save:true, - respondSha:true, - respondShan:true, - skillTagFilter:function(player,tag){ + muniu_skill7:{ + filter:function(){return false}, + hiddenCard:function(player,name){ var muniu=player.getEquip(5); - if(!muniu||!muniu.cards) return false; - for(var i=0;i1) return -2; - if(get.select(get.info(button.link).selectTarget)[1]==-1){ - if(get.type(button.link)=='delay') return -1; - if(get.type(button.link)=='equip'){ - var current=player.getCards('e',{subtype:get.subtype(button.link)})[0]; - if(current&&get.equipValue(current)>=get.equipValue(button.link)) return -1; - return 1; - } - if(get.tag(button.link,'multitarget')) return -1; - if(button.link.name=='huoshaolianying') return -1; - } - if(button.link.name=='jiu'){ - if(get.effect(player,{name:'jiu'},player)>0){ - return 1; - } - return -1; - } - return 1; - }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - selectCard:-1, - viewAs:links[0], - onuse:function(result,player){ - var muniu=player.getEquip(5); - if(muniu&&muniu.cards){ - muniu.cards.remove(result.card); - lib.skill.muniu_skill.sync(muniu); - } - player.updateMarks(); + _du:{ + trigger:{player:['useCardAfter','respondAfter','discardAfter']}, + popup:false, + forced:true, + filter:function(event,player){ + if(player.hasSkillTag('nodu')) return false; + if(event.cards){ + for(var i=0;i=0) return -1; + return 11-get.value(card); + }); + next.autochoose=lib.filter.autoRespondShan; + } + "step 1" + if(result.bool==false){ + event.trigger('shaHit'); + } + else{ + event.trigger('shaMiss'); + event.responded=result; + } + "step 2" + if(result.bool==false&&!event.unhurt){ + target.damage(get.nature(event.card)); + event.result={bool:true} + event.trigger('shaDamage'); + } + else{ + event.result={bool:false} + event.trigger('shaUnhirt'); + } }, - tag:{ - damage:1 + ai:{ + basic:{ + useful:[5,1], + value:[5,1], + }, + order:function(){ + if(_status.event.player.hasSkillTag('presha',true,null,true)) return 10; + return 3; + }, + result:{ + target:function(player,target){ + if(player.hasSkill('jiu')&&!target.getEquip('baiyin')){ + if(get.attitude(player,target)>0){ + return -6; + } + else{ + return -3; + } + } + return -1.5; + }, + }, + tag:{ + respond:1, + respondShan:1, + damage:function(card){ + if(card.nature=='poison') return; + return 1; + }, + natureDamage:function(card){ + if(card.nature) return 1; + }, + fireDamage:function(card,nature){ + if(card.nature=='fire') return 1; + }, + thunderDamage:function(card,nature){ + if(card.nature=='thunder') return 1; + }, + poisonDamage:function(card,nature){ + if(card.nature=='poison') return 1; + } + } } - } - }, - recover:{ - ai:{ - result:{ - target:1.5 + }, + shacopy:{ + ai:{ + basic:{ + useful:[5,1], + value:[5,1], + }, + order:3, + result:{ + target:-1.5, + }, + tag:{ + respond:1, + respondShan:1, + damage:function(card){ + if(card.nature=='poison') return; + return 1; + }, + natureDamage:function(card){ + if(card.nature) return 1; + }, + fireDamage:function(card,nature){ + if(card.nature=='fire') return 1; + }, + thunderDamage:function(card,nature){ + if(card.nature=='thunder') return 1; + }, + poisonDamage:function(card,nature){ + if(card.nature=='poison') return 1; + } + } + } + }, + shan:{ + audio:true, + fullskin:true, + type:'basic', + ai:{ + basic:{ + useful:[7,2], + value:[7,2] + } + } + }, + tao:{ + fullskin:true, + type:'basic', + enable:function(card,player){ + return player.hp=2&&target.countCards('h','tao')<=1){ + keep=true; + } + var mode=get.mode(); + if(target.hp>=2&&keep&&target.hasFriend()){ + if(target.hp>2||nd==0) return 0; + if(target.hp==2){ + if(game.hasPlayer(function(current){ + if(target!=current&&get.attitude(target,current)>=3){ + if(current.hp<=1) return true; + if((mode=='identity'||mode=='versus'||mode=='chess')&¤t.identity=='zhu'&¤t.hp<=2) return true; + } + })){ + return 0; + } + } + } + if(target.hp<0&&target!=player&&target.identity!='zhu') return 0; + var att=get.attitude(player,target); + if(att<3&&att>=0&&player!=target) return 0; + var tri=_status.event.getTrigger(); + if(mode=='identity'&&player.identity=='fan'&&target.identity=='fan'){ + if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='fan'&&tri.source!=target){ + var num=game.countPlayer(function(current){ + if(current.identity=='fan'){ + return current.countCards('h','tao'); + } + }); + if(num>1&&player==target) return 2; + return 0; + } + } + if(mode=='identity'&&player.identity=='zhu'&&target.identity=='nei'){ + if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='zhong'){ + return 0; + } + } + if(mode=='stone'&&target.isMin()&& + player!=target&&tri&&tri.name=='dying'&&player.side==target.side&& + tri.source!=target.getEnemy()){ + return 0; + } + return 2; + }, + }, + tag:{ + recover:1, + save:1, + } } - } - }, - sha:{ - audio:true, - fullskin:true, - nature:['thunder','fire'], - type:'basic', - enable:true, - usable:1, - range:{attack:1}, - selectTarget:1, - filterTarget:function(card,player,target){return player!=target}, - content:function(){ - "step 0" - if(event.skipShan){ - event._result={bool:true}; + }, + bagua:{ + fullskin:true, + type:'equip', + subtype:'equip2', + ai:{ + basic:{ + equipValue:7.5 + } + }, + skills:['bagua_skill'] + }, + jueying:{ + fullskin:true, + type:'equip', + subtype:'equip3', + distance:{globalTo:1}, + }, + dilu:{ + fullskin:true, + type:'equip', + subtype:'equip3', + distance:{globalTo:1}, + }, + zhuahuang:{ + fullskin:true, + type:'equip', + subtype:'equip3', + distance:{globalTo:1}, + }, + chitu:{ + fullskin:true, + type:'equip', + subtype:'equip4', + distance:{globalFrom:-1}, + }, + dawan:{ + fullskin:true, + type:'equip', + subtype:'equip4', + distance:{globalFrom:-1}, + }, + zixin:{ + fullskin:true, + type:'equip', + subtype:'equip4', + distance:{globalFrom:-1}, + }, + zhuge:{ + fullskin:true, + type:'equip', + subtype:'equip1', + ai:{ + basic:{ + equipValue:function(card,player){ + if(!game.hasPlayer(function(current){ + return player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)<0; + })){ + return 1; + } + if(player.hasSha()&&_status.currentPhase==player){ + if(player.getEquip('zhuge')||player.getCardUsable('sha')==0){ + return 10; + } + } + var num=player.countCards('h','sha'); + if(num>1) return 4+num; + return 2+num; + } + }, + tag:{ + valueswap:1 + } + }, + skills:['zhuge_skill'] + }, + cixiong:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-1}, + ai:{ + basic:{ + equipValue:2 + } + }, + skills:['cixiong_skill'] + }, + qinggang:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-1}, + ai:{ + basic:{ + equipValue:2 + } + }, + skills:['qinggang_skill'] + }, + qinglong:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-2}, + ai:{ + basic:{ + equipValue:function(card,player){ + return Math.min(2.5+player.countCards('h','sha'),4); + } + } + }, + skills:['qinglong_skill'] + }, + zhangba:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-2}, + ai:{ + basic:{ + equipValue:function(card,player){ + var num=2.5+player.countCards('h')/3; + return Math.min(num,4); + } + } + }, + skills:['zhangba_skill'] + }, + guanshi:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-2}, + ai:{ + basic:{ + equipValue:function(card,player){ + var num=2.5+(player.countCards('h')+player.countCards('e'))/2.5; + return Math.min(num,5); + } + } + }, + skills:['guanshi_skill'] + }, + fangtian:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-3}, + ai:{ + basic:{ + equipValue:2.5 + } + }, + skills:['fangtian_skill'] + }, + qilin:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-4}, + ai:{ + basic:{ + equipValue:3 + } + }, + skills:['qilin_skill'] + }, + wugu:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + selectTarget:-1, + filterTarget:true, + contentBefore:function(){ + "step 0" + game.delay(); + "step 1" + 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(3); + } + "step 2" + 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 3" + ui.clear(); + var cards=get.cards(game.countPlayer()); + var dialog=ui.create.dialog('五谷丰登',cards,true); + _status.dieClose.push(dialog); + dialog.videoId=lib.status.videoId++; + game.addVideo('cardDialog',null,['五谷丰登',get.cardsInfo(cards),dialog.videoId]); + event.getParent().preResult=dialog.videoId; + game.broadcast(function(cards,id){ + var dialog=ui.create.dialog('五谷丰登',cards,true); + _status.dieClose.push(dialog); + dialog.videoId=id; + },cards,dialog.videoId); + }, + content:function(){ + "step 0" + for(var i=0;i1){ + var next=target.chooseButton(true,function(button){ + return get.value(button.link,_status.event.player); + }); + next.set('dialog',event.preResult); + next.set('closeDialog',false); + next.set('dialogdisplay',true); + } + else{ + event.directButton=event.dialog.buttons[0]; + } + "step 1" + var dialog=event.dialog; + var card; + if(event.directButton){ + card=event.directButton.link; + } + else{ + card=result.links[0]; + } + + var button; + for(var i=0;i=0) return 0; + if(evt.player.hasSkillTag('notricksource')) return 0; + if(evt.target.hasSkillTag('notrick')) return 0; + return 11-get.value(card); + }); + next.autochoose=lib.filter.autoRespondSha; + "step 1" + if(result.bool==false){ + target.damage(); + } + }, + ai:{ + wuxie:function(target,card,player,viewer){ + if(get.attitude(viewer,target)>0&&target.countCards('h','sha')){ + if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0; + } + }, + basic:{ + order:9, + useful:[5,1], + value:5 + }, + result:{ + target:function(player,target){ + if(player.hasUnknown(2)&&get.mode()!='guozhan') return 0; + var nh=target.countCards('h'); + if(get.mode()=='identity'){ + if(target.isZhu&&nh<=2&&target.hp<=1) return -100; + } + if(nh==0) return -2; + if(nh==1) return -1.7 + return -1.5; + }, + }, + tag:{ + respond:1, + respondSha:1, + damage:1, + multitarget:1, + multineg:1, + } + } + }, + wanjian:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + selectTarget:-1, + reverseOrder:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + "step 0" var next=target.chooseToRespond({name:'shan'}); next.set('ai',function(card){ - var target=_status.event.player; var evt=_status.event.getParent(); - if(target.hasSkillTag('useShan')){ - return 11-get.value(card); - } - if(get.damageEffect(target,evt.player,target,evt.card.nature)>=0) return -1; + if(get.damageEffect(evt.target,evt.player,evt.target)>=0) return 0; + if(evt.player.hasSkillTag('notricksource')) return 0; + if(evt.target.hasSkillTag('notrick')) return 0; return 11-get.value(card); }); next.autochoose=lib.filter.autoRespondShan; - } - "step 1" - if(result.bool==false){ - event.trigger('shaHit'); - } - else{ - event.trigger('shaMiss'); - event.responded=result; - } - "step 2" - if(result.bool==false&&!event.unhurt){ - target.damage(get.nature(event.card)); - event.result={bool:true} - event.trigger('shaDamage'); - } - else{ - event.result={bool:false} - event.trigger('shaUnhirt'); + "step 1" + if(result.bool==false){ + target.damage(); + } + }, + ai:{ + wuxie:function(target,card,player,viewer){ + if(get.attitude(viewer,target)>0&&target.countCards('h','shan')){ + if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0; + } + }, + basic:{ + order:9, + useful:1, + value:5 + }, + result:{ + target:function(player,target){ + if(player.hasUnknown(2)&&get.mode()!='guozhan') return 0; + var nh=target.countCards('h'); + if(get.mode()=='identity'){ + if(target.isZhu&&nh<=2&&target.hp<=1) return -100; + } + if(nh==0) return -2; + if(nh==1) return -1.7 + return -1.5; + }, + }, + tag:{ + respond:1, + respondShan:1, + damage:1, + multitarget:1, + multineg:1, + } } }, - ai:{ - basic:{ - useful:[5,1], - value:[5,1], + wuzhong:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + selectTarget:-1, + filterTarget:function(card,player,target){ + return target==player; }, - order:function(){ - if(_status.event.player.hasSkillTag('presha',true,null,true)) return 10; - return 3; + modTarget:true, + content:function(){ + if(get.is.versus()){ + if(game.friend.contains(target)){ + if(game.friend.lengthgame.enemy.length){ + target.draw(3);return; + } + } + } + target.draw(2); }, - result:{ - target:function(player,target){ - if(player.hasSkill('jiu')&&!target.getEquip('baiyin')){ - if(get.attitude(player,target)>0){ - return -6; + ai:{ + basic:{ + order:7.2, + useful:4, + value:9.2 + }, + result:{ + target:2, + }, + tag:{ + draw:2 + } + } + }, + juedou:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + "step 0" + if(event.turn==undefined) event.turn=target; + "step 1" + event.trigger('juedou'); + "step 2" + if(event.directHit){ + event._result={bool:false}; + } + else{ + var next=event.turn.chooseToRespond({name:'sha'}); + next.set('ai',function(card){ + var event=_status.event; + var player=event.splayer; + var target=event.starget; + if(player.hasSkillTag('notricksource')) return 0; + if(target.hasSkillTag('notrick')) return 0; + if(event.player==target){ + if(player.hasSkill('naman')) return -1; + if(get.attitude(target,player)<0||event.player.hp<=1){ + return get.unuseful2(card) + } + return -1; } else{ - return -3; - } - } - return -1.5; - }, - }, - tag:{ - respond:1, - respondShan:1, - damage:function(card){ - if(card.nature=='poison') return; - return 1; - }, - natureDamage:function(card){ - if(card.nature) return 1; - }, - fireDamage:function(card,nature){ - if(card.nature=='fire') return 1; - }, - thunderDamage:function(card,nature){ - if(card.nature=='thunder') return 1; - }, - poisonDamage:function(card,nature){ - if(card.nature=='poison') return 1; - } - } - } - }, - shacopy:{ - ai:{ - basic:{ - useful:[5,1], - value:[5,1], - }, - order:3, - result:{ - target:-1.5, - }, - tag:{ - respond:1, - respondShan:1, - damage:function(card){ - if(card.nature=='poison') return; - return 1; - }, - natureDamage:function(card){ - if(card.nature) return 1; - }, - fireDamage:function(card,nature){ - if(card.nature=='fire') return 1; - }, - thunderDamage:function(card,nature){ - if(card.nature=='thunder') return 1; - }, - poisonDamage:function(card,nature){ - if(card.nature=='poison') return 1; - } - } - } - }, - shan:{ - audio:true, - fullskin:true, - type:'basic', - ai:{ - basic:{ - useful:[7,2], - value:[7,2] - } - } - }, - tao:{ - fullskin:true, - type:'basic', - enable:function(card,player){ - return player.hp=2&&target.countCards('h','tao')<=1){ - keep=true; - } - var mode=get.mode(); - if(target.hp>=2&&keep&&target.hasFriend()){ - if(target.hp>2||nd==0) return 0; - if(target.hp==2){ - if(game.hasPlayer(function(current){ - if(target!=current&&get.attitude(target,current)>=3){ - if(current.hp<=1) return true; - if((mode=='identity'||mode=='versus'||mode=='chess')&¤t.identity=='zhu'&¤t.hp<=2) return true; - } - })){ - return 0; + if(target.hasSkill('naman')) return -1; + if(get.attitude(player,target)<0||event.player.hp<=1){ + return get.unuseful2(card) } + return -1; } - } - if(target.hp<0&&target!=player&&target.identity!='zhu') return 0; - var att=get.attitude(player,target); - if(att<3&&att>=0&&player!=target) return 0; - var tri=_status.event.getTrigger(); - if(mode=='identity'&&player.identity=='fan'&&target.identity=='fan'){ - if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='fan'&&tri.source!=target){ - var num=game.countPlayer(function(current){ - if(current.identity=='fan'){ - return current.countCards('h','tao'); - } - }); - if(num>1&&player==target) return 2; - return 0; - } - } - if(mode=='identity'&&player.identity=='zhu'&&target.identity=='nei'){ - if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='zhong'){ - return 0; - } - } - if(mode=='stone'&&target.isMin()&& - player!=target&&tri&&tri.name=='dying'&&player.side==target.side&& - tri.source!=target.getEnemy()){ - return 0; - } - return 2; - }, - }, - tag:{ - recover:1, - save:1, - } - } - }, - bagua:{ - fullskin:true, - type:'equip', - subtype:'equip2', - ai:{ - basic:{ - equipValue:7.5 - } - }, - skills:['bagua_skill'] - }, - jueying:{ - fullskin:true, - type:'equip', - subtype:'equip3', - distance:{globalTo:1}, - }, - dilu:{ - fullskin:true, - type:'equip', - subtype:'equip3', - distance:{globalTo:1}, - }, - zhuahuang:{ - fullskin:true, - type:'equip', - subtype:'equip3', - distance:{globalTo:1}, - }, - chitu:{ - fullskin:true, - type:'equip', - subtype:'equip4', - distance:{globalFrom:-1}, - }, - dawan:{ - fullskin:true, - type:'equip', - subtype:'equip4', - distance:{globalFrom:-1}, - }, - zixin:{ - fullskin:true, - type:'equip', - subtype:'equip4', - distance:{globalFrom:-1}, - }, - zhuge:{ - fullskin:true, - type:'equip', - subtype:'equip1', - ai:{ - basic:{ - equipValue:function(card,player){ - if(!game.hasPlayer(function(current){ - return player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)<0; - })){ - return 1; - } - if(player.hasSha()&&_status.currentPhase==player){ - if(player.getEquip('zhuge')||player.getCardUsable('sha')==0){ - return 10; - } - } - var num=player.countCards('h','sha'); - if(num>1) return 4+num; - return 2+num; - } - }, - tag:{ - valueswap:1 - } - }, - skills:['zhuge_skill'] - }, - cixiong:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-1}, - ai:{ - basic:{ - equipValue:2 - } - }, - skills:['cixiong_skill'] - }, - qinggang:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-1}, - ai:{ - basic:{ - equipValue:2 - } - }, - skills:['qinggang_skill'] - }, - qinglong:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-2}, - ai:{ - basic:{ - equipValue:function(card,player){ - return Math.min(2.5+player.countCards('h','sha'),4); - } - } - }, - skills:['qinglong_skill'] - }, - zhangba:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-2}, - ai:{ - basic:{ - equipValue:function(card,player){ - var num=2.5+player.countCards('h')/3; - return Math.min(num,4); - } - } - }, - skills:['zhangba_skill'] - }, - guanshi:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-2}, - ai:{ - basic:{ - equipValue:function(card,player){ - var num=2.5+(player.countCards('h')+player.countCards('e'))/2.5; - return Math.min(num,5); - } - } - }, - skills:['guanshi_skill'] - }, - fangtian:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-3}, - ai:{ - basic:{ - equipValue:2.5 - } - }, - skills:['fangtian_skill'] - }, - qilin:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-4}, - ai:{ - basic:{ - equipValue:3 - } - }, - skills:['qilin_skill'] - }, - wugu:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - selectTarget:-1, - filterTarget:true, - contentBefore:function(){ - "step 0" - game.delay(); - "step 1" - 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(3); - } - "step 2" - 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 3" - ui.clear(); - var cards=get.cards(game.countPlayer()); - var dialog=ui.create.dialog('五谷丰登',cards,true); - _status.dieClose.push(dialog); - dialog.videoId=lib.status.videoId++; - game.addVideo('cardDialog',null,['五谷丰登',get.cardsInfo(cards),dialog.videoId]); - event.getParent().preResult=dialog.videoId; - game.broadcast(function(cards,id){ - var dialog=ui.create.dialog('五谷丰登',cards,true); - _status.dieClose.push(dialog); - dialog.videoId=id; - },cards,dialog.videoId); - }, - content:function(){ - "step 0" - for(var i=0;i1){ - var next=target.chooseButton(true,function(button){ - return get.value(button.link,_status.event.player); - }); - next.set('dialog',event.preResult); - next.set('closeDialog',false); - next.set('dialogdisplay',true); - } - else{ - event.directButton=event.dialog.buttons[0]; - } - "step 1" - var dialog=event.dialog; - var card; - if(event.directButton){ - card=event.directButton.link; - } - else{ - card=result.links[0]; - } - - var button; - for(var i=0;i=0) return 0; - if(evt.player.hasSkillTag('notricksource')) return 0; - if(evt.target.hasSkillTag('notrick')) return 0; - return 11-get.value(card); - }); - next.autochoose=lib.filter.autoRespondSha; - "step 1" - if(result.bool==false){ - target.damage(); - } - }, - ai:{ - wuxie:function(target,card,player,viewer){ - if(get.attitude(viewer,target)>0&&target.countCards('h','sha')){ - if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0; - } - }, - basic:{ - order:9, - useful:[5,1], - value:5 - }, - result:{ - target:function(player,target){ - if(player.hasUnknown(2)&&get.mode()!='guozhan') return 0; - var nh=target.countCards('h'); - if(get.mode()=='identity'){ - if(target.isZhu&&nh<=2&&target.hp<=1) return -100; - } - if(nh==0) return -2; - if(nh==1) return -1.7 - return -1.5; - }, - }, - tag:{ - respond:1, - respondSha:1, - damage:1, - multitarget:1, - multineg:1, - } - } - }, - wanjian:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - selectTarget:-1, - reverseOrder:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - "step 0" - var next=target.chooseToRespond({name:'shan'}); - next.set('ai',function(card){ - var evt=_status.event.getParent(); - if(get.damageEffect(evt.target,evt.player,evt.target)>=0) return 0; - if(evt.player.hasSkillTag('notricksource')) return 0; - if(evt.target.hasSkillTag('notrick')) return 0; - return 11-get.value(card); - }); - next.autochoose=lib.filter.autoRespondShan; - "step 1" - if(result.bool==false){ - target.damage(); - } - }, - ai:{ - wuxie:function(target,card,player,viewer){ - if(get.attitude(viewer,target)>0&&target.countCards('h','shan')){ - if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0; - } - }, - basic:{ - order:9, - useful:1, - value:5 - }, - result:{ - target:function(player,target){ - if(player.hasUnknown(2)&&get.mode()!='guozhan') return 0; - var nh=target.countCards('h'); - if(get.mode()=='identity'){ - if(target.isZhu&&nh<=2&&target.hp<=1) return -100; - } - if(nh==0) return -2; - if(nh==1) return -1.7 - return -1.5; - }, - }, - tag:{ - respond:1, - respondShan:1, - damage:1, - multitarget:1, - multineg:1, - } - } - }, - wuzhong:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - selectTarget:-1, - filterTarget:function(card,player,target){ - return target==player; - }, - modTarget:true, - content:function(){ - if(get.is.versus()){ - if(game.friend.contains(target)){ - if(game.friend.lengthgame.enemy.length){ - target.draw(3);return; - } - } - } - target.draw(2); - }, - ai:{ - basic:{ - order:7.2, - useful:4, - value:9.2 - }, - result:{ - target:2, - }, - tag:{ - draw:2 - } - } - }, - juedou:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - "step 0" - if(event.turn==undefined) event.turn=target; - "step 1" - event.trigger('juedou'); - "step 2" - if(event.directHit){ - event._result={bool:false}; - } - else{ - var next=event.turn.chooseToRespond({name:'sha'}); - next.set('ai',function(card){ - var event=_status.event; - var player=event.splayer; - var target=event.starget; - if(player.hasSkillTag('notricksource')) return 0; - if(target.hasSkillTag('notrick')) return 0; - if(event.player==target){ - if(player.hasSkill('naman')) return -1; - if(get.attitude(target,player)<0||event.player.hp<=1){ - return get.unuseful2(card) - } - return -1; - } - else{ - if(target.hasSkill('naman')) return -1; - if(get.attitude(player,target)<0||event.player.hp<=1){ - return get.unuseful2(card) - } - return -1; - } - }); - next.set('splayer',player); - next.set('starget',target); - next.autochoose=lib.filter.autoRespondSha; - if(event.turn==target){ - next.source=player; - } - else{ - next.source=target; - } - } - "step 3" - if(event.target.isDead()||event.player.isDead()){ - event.finish(); - } - else{ - if(result.bool){ - if(event.turn==target) event.turn=player; - else event.turn=target; - event.goto(1); - } - else{ + }); + next.set('splayer',player); + next.set('starget',target); + next.autochoose=lib.filter.autoRespondSha; if(event.turn==target){ - target.damage(); + next.source=player; } else{ - player.damage(target); + next.source=target; } } - } - }, - ai:{ - basic:{ - order:5, - useful:1, - value:4.5 - }, - result:{ - target:-1.5, - player:function(player,target){ - if(get.damageEffect(target,player,target)>0&&get.attitude(player,target)>0&&get.attitude(target,player)>0){ - return 0; - } - var hs1=target.getCards('h','sha'); - var hs2=player.getCards('h','sha'); - if(hs1.length>hs2.length+1){ - return -2; - } - var hsx=target.getCards('h'); - if(hsx.length>2&&hs2.length==0&&hsx[0].number<6){ - return -2; - } - if(hsx.length>3&&hs2.length==0){ - return -2; - } - if(hs1.length>hs2.length&&(!hs2.length||hs1[0].number>hs2[0].number)){ - return -2; - } - return -0.5; + "step 3" + if(event.target.isDead()||event.player.isDead()){ + event.finish(); } - }, - tag:{ - respond:2, - respondSha:2, - damage:1, - } - } - }, - shunshou:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - range:{global:1}, - selectTarget:1, - postAi:function(targets){ - return targets.length==1&&targets[0].countCards('j'); - }, - filterTarget:function(card,player,target){ - if(player==target) return false; - return (target.countCards('hej')>0); - }, - content:function(){ - if(target.countCards('hej')){ - player.gainPlayerCard('hej',target,true); - } - }, - ai:{ - wuxie:function(target,card,player,viewer){ - if(get.attitude(viewer,player)>0&&get.attitude(viewer,target)>0){ - return 0; - } - }, - basic:{ - order:7.5, - useful:4, - value:9 - }, - result:{ - target:function(player,target){ - if(get.attitude(player,target)<=0) return (target.countCards('he')>0)?-1.5:1.5; - var js=target.getCards('j'); - if(js.length){ - var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; - if(jj.name=='shunshou') return 3; - if(js.length==1&&get.effect(target,jj,target,player)>=0){ - return -1.5; + else{ + if(result.bool){ + if(event.turn==target) event.turn=player; + else event.turn=target; + event.goto(1); + } + else{ + if(event.turn==target){ + target.damage(); + } + else{ + player.damage(target); } - return 3; } - return -1.5; + } + }, + ai:{ + basic:{ + order:5, + useful:1, + value:4.5 }, - player:function(player,target){ - if(get.attitude(player,target)<0&&!target.countCards('he')){ + result:{ + target:-1.5, + player:function(player,target){ + if(get.damageEffect(target,player,target)>0&&get.attitude(player,target)>0&&get.attitude(target,player)>0){ + return 0; + } + var hs1=target.getCards('h','sha'); + var hs2=player.getCards('h','sha'); + if(hs1.length>hs2.length+1){ + return -2; + } + var hsx=target.getCards('h'); + if(hsx.length>2&&hs2.length==0&&hsx[0].number<6){ + return -2; + } + if(hsx.length>3&&hs2.length==0){ + return -2; + } + if(hs1.length>hs2.length&&(!hs2.length||hs1[0].number>hs2[0].number)){ + return -2; + } + return -0.5; + } + }, + tag:{ + respond:2, + respondSha:2, + damage:1, + } + } + }, + shunshou:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + range:{global:1}, + selectTarget:1, + postAi:function(targets){ + return targets.length==1&&targets[0].countCards('j'); + }, + filterTarget:function(card,player,target){ + if(player==target) return false; + return (target.countCards('hej')>0); + }, + content:function(){ + if(target.countCards('hej')){ + player.gainPlayerCard('hej',target,true); + } + }, + ai:{ + wuxie:function(target,card,player,viewer){ + if(get.attitude(viewer,player)>0&&get.attitude(viewer,target)>0){ return 0; } - if(get.attitude(player,target)>1){ + }, + basic:{ + order:7.5, + useful:4, + value:9 + }, + result:{ + target:function(player,target){ + if(get.attitude(player,target)<=0) return (target.countCards('he')>0)?-1.5:1.5; var js=target.getCards('j'); if(js.length){ var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; - if(jj.name=='shunshou') return 1; + if(jj.name=='shunshou') return 3; if(js.length==1&&get.effect(target,jj,target,player)>=0){ - return 0; + return -1.5; } - return 1; + return 3; } - return 0; + return -1.5; + }, + player:function(player,target){ + if(get.attitude(player,target)<0&&!target.countCards('he')){ + return 0; + } + if(get.attitude(player,target)>1){ + var js=target.getCards('j'); + if(js.length){ + var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; + if(jj.name=='shunshou') return 1; + if(js.length==1&&get.effect(target,jj,target,player)>=0){ + return 0; + } + return 1; + } + return 0; + } + return 1; } - return 1; + }, + tag:{ + loseCard:1, + gain:1, + } + } + }, + guohe:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + selectTarget:1, + postAi:function(targets){ + return targets.length==1&&targets[0].countCards('j'); + }, + filterTarget:function(card,player,target){ + if(player==target) return false; + return (target.countCards('hej')>0); + }, + content:function(){ + if(target.countCards('hej')){ + player.discardPlayerCard('hej',target,true); } }, - tag:{ - loseCard:1, - gain:1, - } - } - }, - guohe:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - selectTarget:1, - postAi:function(targets){ - return targets.length==1&&targets[0].countCards('j'); - }, - filterTarget:function(card,player,target){ - if(player==target) return false; - return (target.countCards('hej')>0); - }, - content:function(){ - if(target.countCards('hej')){ - player.discardPlayerCard('hej',target,true); - } - }, - ai:{ - basic:{ - order:9, - useful:1, - value:5, - }, - result:{ - target:function(player,target){ - var es=target.getCards('e'); - var nh=target.countCards('h'); - var noe=(es.length==0||target.hasSkillTag('noe')); - var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ - return -1.5; + ai:{ + basic:{ + order:9, + useful:1, + value:5, + }, + result:{ + target:function(player,target){ + var es=target.getCards('e'); + var nh=target.countCards('h'); + var noe=(es.length==0||target.hasSkillTag('noe')); + var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ + return -1.5; + } + return 2; } - return 2; - } - return -1.5; + return -1.5; + }, }, - }, - tag:{ - loseCard:1, - discard:1 - } - } - }, - jiedao:{ - audio:true, - fullskin:true, - type:'trick', - enable:true, - selectTarget:2, - singleCard:true, - multitarget:true, - targetprompt:['被借刀','出杀目标'], - complexTarget:true, - filterTarget:function(card,player,target){ - if(ui.selected.targets.length==0){ - return (player!=target&&target.getCards('e',{subtype:'equip1'}).length); - } - else{ - return lib.filter.filterTarget({name:'sha'},ui.selected.targets[0],target); + tag:{ + loseCard:1, + discard:1 + } } }, - content:function(){ - "step 0" - if(!target.hasSha()){ - event.directfalse=true; - } - else{ - target.chooseToUse('对'+get.translation(event.addedTarget)+'使用一张杀,或令'+get.translation(player)+'获得你的武器牌', - {name:'sha'},event.addedTarget,-1).set('targetRequired',true); - } - "step 1" - if(event.directfalse||result.bool==false){ - player.gain(targets[0].getCards('e',{subtype:'equip1'}),targets[0]); - targets[0].$give(targets[0].getCards('e',{subtype:'equip1'}),player); - } - }, - ai:{ - basic:{ - order:8, - value:2, - useful:1, + jiedao:{ + audio:true, + fullskin:true, + type:'trick', + enable:true, + selectTarget:2, + singleCard:true, + multitarget:true, + targetprompt:['被借刀','出杀目标'], + complexTarget:true, + filterTarget:function(card,player,target){ + if(ui.selected.targets.length==0){ + return (player!=target&&target.getCards('e',{subtype:'equip1'}).length); + } + else{ + return lib.filter.filterTarget({name:'sha'},ui.selected.targets[0],target); + } }, - result:{ - target:-1.5, - player:function(player){ - if(player.getCards('he',{subtype:'equip1'}).length) return 0; - return 1.5; + content:function(){ + "step 0" + if(!target.hasSha()){ + event.directfalse=true; + } + else{ + target.chooseToUse('对'+get.translation(event.addedTarget)+'使用一张杀,或令'+get.translation(player)+'获得你的武器牌', + {name:'sha'},event.addedTarget,-1).set('targetRequired',true); + } + "step 1" + if(event.directfalse||result.bool==false){ + player.gain(targets[0].getCards('e',{subtype:'equip1'}),targets[0]); + targets[0].$give(targets[0].getCards('e',{subtype:'equip1'}),player); + } + }, + ai:{ + basic:{ + order:8, + value:2, + useful:1, }, - }, - tag:{ - gain:1, - use:1, - useSha:1, - multitarget:1, - multineg:1, - loseCard:1, + result:{ + target:-1.5, + player:function(player){ + if(player.getCards('he',{subtype:'equip1'}).length) return 0; + return 1.5; + }, + }, + tag:{ + gain:1, + use:1, + useSha:1, + multitarget:1, + multineg:1, + loseCard:1, + } } - } - }, - wuxie:{ - audio:true, - fullskin:true, - type:'trick', - ai:{ - basic:{ - useful:[6,4], - value:[6,4], - }, - result:{player:1}, - expose:0.2 }, - notarget:true, - content:function(){ - event.result='wuxied'; - if(player.isOnline()){ - player.send(function(player){ + wuxie:{ + audio:true, + fullskin:true, + type:'trick', + ai:{ + basic:{ + useful:[6,4], + value:[6,4], + }, + result:{player:1}, + expose:0.2 + }, + notarget:true, + content:function(){ + event.result='wuxied'; + if(player.isOnline()){ + player.send(function(player){ + if(ui.tempnowuxie&&!player.hasWuxie()){ + ui.tempnowuxie.close(); + delete ui.tempnowuxie; + } + },player); + } + else if(player==game.me){ if(ui.tempnowuxie&&!player.hasWuxie()){ ui.tempnowuxie.close(); delete ui.tempnowuxie; } - },player); - } - else if(player==game.me){ - if(ui.tempnowuxie&&!player.hasWuxie()){ - ui.tempnowuxie.close(); - delete ui.tempnowuxie; + } + }, + }, + lebu:{ + audio:true, + fullskin:true, + type:'delay', + filterTarget:function(card,player,target){ + return (lib.filter.judge(card,player,target)&&player!=target); + }, + judge:function(card){ + if(get.suit(card)=='heart') return 0; + return -3; + }, + effect:function(){ + if(result.bool==false){ + player.skip('phaseUse'); + } + }, + ai:{ + basic:{ + order:1, + useful:1, + value:8, + }, + result:{ + target:function(player,target){ + var num=target.hp-target.countCards('h')-2; + if(num>-1) return -0.01; + if(target.hp<3) num--; + if(target.isTurnedOver()) num/=2; + var dist=get.distance(player,target,'absolute'); + if(dist<1) dist=1; + return num/Math.sqrt(dist); + } + }, + tag:{ + skip:'phaseUse' } } }, - }, - lebu:{ - audio:true, - fullskin:true, - type:'delay', - filterTarget:function(card,player,target){ - return (lib.filter.judge(card,player,target)&&player!=target); - }, - judge:function(card){ - if(get.suit(card)=='heart') return 0; - return -3; - }, - effect:function(){ - if(result.bool==false){ - player.skip('phaseUse'); - } - }, - ai:{ - basic:{ - order:1, - useful:1, - value:8, + shandian:{ + audio:true, + fullskin:true, + type:'delay', + modTarget:function(card,player,target){ + return lib.filter.judge(card,player,target); }, - result:{ - target:function(player,target){ - var num=target.hp-target.countCards('h')-2; - if(num>-1) return -0.01; - if(target.hp<3) num--; - if(target.isTurnedOver()) num/=2; - var dist=get.distance(player,target,'absolute'); - if(dist<1) dist=1; - return num/Math.sqrt(dist); + enable:function(card,player){ + return player.canAddJudge(card); + }, + filterTarget:function(card,player,target){ + return (lib.filter.judge(card,player,target)&&player==target); + }, + selectTarget:[-1,-1], + judge:function(card){ + if(get.suit(card)=='spade'&&get.number(card)>1&&get.number(card)<10) return -6; + return 0; + }, + effect:function(){ + if(result.judge){ + player.damage(3,'thunder','nosource'); + } + else{ + player.addJudgeNext(card); } }, - tag:{ - skip:'phaseUse' - } - } - }, - shandian:{ - audio:true, - fullskin:true, - type:'delay', - modTarget:function(card,player,target){ - return lib.filter.judge(card,player,target); - }, - enable:function(card,player){ - return player.canAddJudge(card); - }, - filterTarget:function(card,player,target){ - return (lib.filter.judge(card,player,target)&&player==target); - }, - selectTarget:[-1,-1], - judge:function(card){ - if(get.suit(card)=='spade'&&get.number(card)>1&&get.number(card)<10) return -6; - return 0; - }, - effect:function(){ - if(result.judge){ - player.damage(3,'thunder','nosource'); - } - else{ + cancel:function(){ player.addJudgeNext(card); - } - }, - cancel:function(){ - player.addJudgeNext(card); - }, - ai:{ - basic:{ - order:1, - useful:0, - value:0, }, - result:{ - target:function(player,target){ - var num=game.countPlayer(function(current){ - var skills=current.getSkills(); - for(var j=0;j0&& - get.attitude(current,target)>0){ - return rejudge; + ai:{ + basic:{ + order:1, + useful:0, + value:0, + }, + result:{ + target:function(player,target){ + var num=game.countPlayer(function(current){ + var skills=current.getSkills(); + for(var j=0;j0&& + get.attitude(current,target)>0){ + return rejudge; + } + else{ + return -rejudge; + } + } + } + }); + if(num>0) return num; + if(num==0){ + var mode=get.mode(); + if(mode=='identity'){ + if(target.identity=='nei') return 1; + var situ=get.situation(); + if(target.identity=='fan'){ + if(situ>1) return 1; } else{ - return -rejudge; + if(situ<-1) return 1; + } + } + else if(mode=='guozhan'){ + if(target.identity=='ye') return 1; + if(game.hasPlayer(function(current){ + return current.identity=='unknown'; + })){ + return -1; + } + if(get.population(target.identity)==1){ + if(target.maxHp>2&&target.hp<2) return 1; + if(game.countPlayer()<3) return -1; + if(target.hp<=2&&target.countCards('he')<=3) return 1; } } } - }); - if(num>0) return num; - if(num==0){ - var mode=get.mode(); - if(mode=='identity'){ - if(target.identity=='nei') return 1; - var situ=get.situation(); - if(target.identity=='fan'){ - if(situ>1) return 1; - } - else{ - if(situ<-1) return 1; - } - } - else if(mode=='guozhan'){ - if(target.identity=='ye') return 1; - if(game.hasPlayer(function(current){ - return current.identity=='unknown'; - })){ - return -1; - } - if(get.population(target.identity)==1){ - if(target.maxHp>2&&target.hp<2) return 1; - if(game.countPlayer()<3) return -1; - if(target.hp<=2&&target.countCards('he')<=3) return 1; - } - } + return -1; } - return -1; + }, + tag:{ + // damage:1, + // natureDamage:1, + // thunderDamage:1, } - }, - tag:{ - // damage:1, - // natureDamage:1, - // thunderDamage:1, - } - } - }, - hanbing:{ - fullskin:true, - type:"equip", - subtype:"equip1", - distance:{attackFrom:-1}, - skills:['hanbing_skill'], - ai:{ - basic:{ - equipValue:2 } }, - }, - renwang:{ - fullskin:true, - type:"equip", - subtype:"equip2", - skills:['renwang_skill'], - ai:{ - basic:{ - equipValue:7.5 + hanbing:{ + fullskin:true, + type:"equip", + subtype:"equip1", + distance:{attackFrom:-1}, + skills:['hanbing_skill'], + ai:{ + basic:{ + equipValue:2 + } + }, + }, + renwang:{ + fullskin:true, + type:"equip", + subtype:"equip2", + skills:['renwang_skill'], + ai:{ + basic:{ + equipValue:7.5 + }, }, }, }, - }, - skill:{ - hanbing_skill:{ - trigger:{player:'shaHit'}, - direct:true, - audio:true, - filter:function(event){ - return event.target.getCards('he').length>0; + skill:{ + hanbing_skill:{ + trigger:{player:'shaHit'}, + direct:true, + audio:true, + filter:function(event){ + return event.target.getCards('he').length>0; + }, + content:function(){ + "step 0" + player.discardPlayerCard(get.prompt('hanbing'),'he',trigger.target,Math.min(2,trigger.target.countCards('he')),function(button){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var eff=get.damageEffect(trigger.target,player,player); + if(get.attitude(player,trigger.target)>0){ + if(eff>=0) return false; + return 10-get.buttonValue(button); + } + if(eff<=0) return get.buttonValue(button); + if(trigger.target.hp==1) return false; + if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')|| + player.hasSkill('luoyi2')||player.hasSkill('reluoyi2')) return false; + if(_status.event.dialog.buttons.length<2) return -1; + var num=0; + for(var i=0;i<_status.event.dialog.buttons.length;i++){ + if(get.buttonValue(_status.event.dialog.buttons[i])>1.5) num++; + } + if(num>=2) return get.buttonValue(button)-1.5; + }).set('logSkill','hanbing_skill'); + "step 1" + if(result.bool){ + trigger.untrigger(); + trigger.unhurt=true; + } + } }, - content:function(){ - "step 0" - player.discardPlayerCard(get.prompt('hanbing'),'he',trigger.target,Math.min(2,trigger.target.countCards('he')),function(button){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var eff=get.damageEffect(trigger.target,player,player); - if(get.attitude(player,trigger.target)>0){ - if(eff>=0) return false; - return 10-get.buttonValue(button); - } - if(eff<=0) return get.buttonValue(button); - if(trigger.target.hp==1) return false; - if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')|| - player.hasSkill('luoyi2')||player.hasSkill('reluoyi2')) return false; - if(_status.event.dialog.buttons.length<2) return -1; - var num=0; - for(var i=0;i<_status.event.dialog.buttons.length;i++){ - if(get.buttonValue(_status.event.dialog.buttons[i])>1.5) num++; - } - if(num>=2) return get.buttonValue(button)-1.5; - }).set('logSkill','hanbing_skill'); - "step 1" - if(result.bool){ + renwang_skill:{ + trigger:{target:'shaBefore'}, + forced:true, + priority:6, + audio:true, + filter:function(event){ + if(event.player.hasSkillTag('unequip',false,event.card)) return false; + return (event.card.name=='sha'&&get.color(event.card)=='black') + }, + content:function(){ trigger.untrigger(); - trigger.unhurt=true; - } - } - }, - renwang_skill:{ - trigger:{target:'shaBefore'}, - forced:true, - priority:6, - audio:true, - filter:function(event){ - if(event.player.hasSkillTag('unequip',false,event.card)) return false; - return (event.card.name=='sha'&&get.color(event.card)=='black') - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - effect:{ - target:function(card,player){ - if(player.hasSkillTag('unequip',false,card)) return; - if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; - } - } - } - }, - zhuge_skill:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'){ - if(get.is.versus()){ - return num+3; + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card,player){ + if(player.hasSkillTag('unequip',false,card)) return; + if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; } - return Infinity; } } }, - }, - cixiong_skill:{ - trigger:{player:'shaBegin'}, - priority:5, - audio:true, - logTarget:'target', - filter:function(event,player){ - if(player.sex=='male'&&event.target.sex=='female') return true; - if(player.sex=='female'&&event.target.sex=='male') return true; - return false; + zhuge_skill:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'){ + if(get.is.versus()){ + return num+3; + } + return Infinity; + } + } + }, }, - content:function(){ - "step 0" - trigger.target.chooseToDiscard('弃置一张手牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){ - var trigger=_status.event.getTrigger(); - return -get.attitude(trigger.target,trigger.player)-get.value(card); - }); - "step 1" - if(result.bool==false) player.draw(); - } - }, - qinggang_skill:{ - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.name=='sha') return true; + cixiong_skill:{ + trigger:{player:'shaBegin'}, + priority:5, + audio:true, + logTarget:'target', + filter:function(event,player){ + if(player.sex=='male'&&event.target.sex=='female') return true; + if(player.sex=='female'&&event.target.sex=='male') return true; return false; - } - } - }, - qinglong_skill:{ - trigger:{player:'shaMiss'}, - direct:true, - filter:function(event,player){ - return player.canUse('sha',event.target)&&player.hasSha(); - }, - content:function(){ - "step 0" - if(player.hasSkill('jiu')){ - game.broadcastAll(function(player){ - player.removeSkill('jiu'); - if(player.node.jiu){ - player.node.jiu.delete(); - player.node.jiu2.delete(); - delete player.node.jiu; - delete player.node.jiu2; - } - },player); - event.jiu=true; - } - player.chooseToUse(get.prompt('qinglong'),{name:'sha'},trigger.target,-1).logSkill='qinglong_skill'; - "step 1" - if(result.bool); - else if(event.jiu){ - player.addSkill('jiu'); - } - } - }, - zhangba_skill:{ - enable:['chooseToUse','chooseToRespond'], - filterCard:true, - selectCard:2, - position:'h', - viewAs:{name:'sha'}, - filter:function(event,player){ - return player.countCards('h')>=2; - }, - audio:true, - prompt:'将两张手牌当杀使用或打出', - check:function(card){ - if(card.name=='sha') return 0; - return 6-get.useful(card) - }, - ai:{ - respondSha:true, - skillTagFilter:function(player){ - return player.countCards('h')>=2; }, - } - }, - guanshi_skill:{ - trigger:{player:'shaMiss'}, - direct:true, - audio:true, - filter:function(event,player){ - return player.countCards('he')>2&&event.target.isAlive(); - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('guanshi'),2,'he',function(card){ - return _status.event.player.getCards('e',{subtype:'equip1'}).contains(card)==false; - }); - next.logSkill='guanshi_skill'; - next.set('ai',function(card){ - var evt=_status.event.getParent(); - if(get.attitude(evt.player,evt._trigger.target)<0){ - if(evt.player.hasSkill('jiu')|| - evt.player.hasSkill('tianxianjiu')|| - evt._trigger.target.hp==1){ - return 8-get.value(card) - } - return 5-get.value(card) - } - return -1; - }); - "step 1" - if(result.bool){ - trigger.untrigger(); - trigger.trigger('shaHit'); - trigger._result.bool=false; - } - } - }, - fangtian_skill:{ - mod:{ - selectTarget:function(card,player,range){ - if(card.name!='sha') return; - if(range[1]==-1) return; - var cards=player.getCards('h'); - for(var i=0;i0 - }, - direct:true, - audio:true, - content:function(){ - "step 0" - var att=(get.attitude(player,trigger.target)<=0); - var next=player.chooseButton(); - next.set('att',att); - next.set('createDialog',['选择要弃置的马',trigger.target.getCards('e',{subtype:['equip3','equip4']})]); - next.set('ai',function(button){ - if(_status.event.att) return get.buttonValue(button); - return 0; - }); - "step 1" - if(result.bool){ - player.logSkill('qilin_skill'); - trigger.target.discard(result.links[0]); - } - } - }, - bagua_skill:{ - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!event.filterCard({name:'shan'})) return false; - var evt=event.getParent(); - if(evt.player&&evt.player.hasSkillTag('unequip',false,evt.card)) return false; - return true; - }, - audio:true, - check:function(event,player){ - if(get.damageEffect(player,event.player,player)>=0) return false; - return true; - }, - content:function(){ - "step 0" - player.judge('bagua',function(card){return (get.color(card)=='red')?1.5:-0.5}); - "step 1" - if(result.judge>0){ - trigger.untrigger(); - trigger.responded=true; - trigger.result={bool:true,card:{name:'shan'}} + content:function(){ + "step 0" + trigger.target.chooseToDiscard('弃置一张手牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){ + var trigger=_status.event.getTrigger(); + return -get.attitude(trigger.target,trigger.player)-get.value(card); + }); + "step 1" + if(result.bool==false) player.draw(); } }, - ai:{ - effect:{ - target:function(card,player,target,effect){ - if(player.hasSkillTag('unequip',false,card)) return; - if(get.tag(card,'respondShan')) return 0.5; - } - } - } - }, - _wuxie:{ - trigger:{player:['useCardToBefore','phaseJudge']}, - priority:5, - popup:false, - forced:true, - filter:function(event,player){ - if(event.name!='phaseJudge'){ - var info=get.info(event.card); - if(!event.target){ - if(info.wuxieable) return true; + qinggang_skill:{ + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha') return true; return false; } - if(event.player.hasSkillTag('playernowuxie')) return false; - if(get.type(event.card)!='trick'&&!info.wuxieable) return false; } - return true; }, - content:function(){ - 'step 0' - if(trigger.multitarget){ - event.targets=trigger.targets; + qinglong_skill:{ + trigger:{player:'shaMiss'}, + direct:true, + filter:function(event,player){ + return player.canUse('sha',event.target)&&player.hasSha(); + }, + content:function(){ + "step 0" + if(player.hasSkill('jiu')){ + game.broadcastAll(function(player){ + player.removeSkill('jiu'); + if(player.node.jiu){ + player.node.jiu.delete(); + player.node.jiu2.delete(); + delete player.node.jiu; + delete player.node.jiu2; + } + },player); + event.jiu=true; + } + player.chooseToUse(get.prompt('qinglong'),{name:'sha'},trigger.target,-1).logSkill='qinglong_skill'; + "step 1" + if(result.bool); + else if(event.jiu){ + player.addSkill('jiu'); + } } - event.target=trigger.target; - if(event.triggername=='phaseJudge'){ - event.target=trigger.player; + }, + zhangba_skill:{ + enable:['chooseToUse','chooseToRespond'], + filterCard:true, + selectCard:2, + position:'h', + viewAs:{name:'sha'}, + filter:function(event,player){ + return player.countCards('h')>=2; + }, + audio:true, + prompt:'将两张手牌当杀使用或打出', + check:function(card){ + if(card.name=='sha') return 0; + return 6-get.useful(card) + }, + ai:{ + respondSha:true, + skillTagFilter:function(player){ + return player.countCards('h')>=2; + }, } - event.sourcex=event.targets||event.target; - if(!event.targets&&trigger.targets&&trigger.targets.length==1){ - event.sourcex2=trigger.player; - } - event.source=trigger.player; - event.state=true; - event.card=trigger.card; - event._global_waiting=true; - event.tempnowuxie=(trigger.targets&&trigger.targets.length>1&&!trigger.multitarget); - event.filterCard=function(card,player){ - if(card.name!='wuxie') return false; - return lib.filter.cardEnabled(card,player,'forceEnable'); - }; - event.send=function(player,state,isJudge,card,source,target,targets,id,id2,tempnowuxie,skillState){ - if(skillState){ - player.applySkills(skillState); - } - state=state?1:-1; - var str=''; - if(isJudge){ - str+=get.translation(source)+'的'; - } - if(isJudge){ - str+=get.translation(card,'viewAs'); - } - else{ - str+=get.translation(card); - } - if((targets||target)&&!isJudge){ - str+='对'+get.translation(targets||target); - } - str+='将'+(state>0?'生效':'失效')+',是否无懈?'; - - if(player.isUnderControl(true)&&!_status.auto&&!ui.tempnowuxie&&tempnowuxie){ - var translation=get.translation(card.name); - if(translation.length>=4){ - translation=lib.translate[card.name+'_ab']||translation.slice(0,2); + }, + guanshi_skill:{ + trigger:{player:'shaMiss'}, + direct:true, + audio:true, + filter:function(event,player){ + return player.countCards('he')>2&&event.target.isAlive(); + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('guanshi'),2,'he',function(card){ + return _status.event.player.getCards('e',{subtype:'equip1'}).contains(card)==false; + }); + next.logSkill='guanshi_skill'; + next.set('ai',function(card){ + var evt=_status.event.getParent(); + if(get.attitude(evt.player,evt._trigger.target)<0){ + if(evt.player.hasSkill('jiu')|| + evt.player.hasSkill('tianxianjiu')|| + evt._trigger.target.hp==1){ + return 8-get.value(card) + } + return 5-get.value(card) } - ui.tempnowuxie=ui.create.control('不无懈'+translation,ui.click.tempnowuxie,'stayleft'); - ui.tempnowuxie._origin=id2; + return -1; + }); + "step 1" + if(result.bool){ + trigger.untrigger(); + trigger.trigger('shaHit'); + trigger._result.bool=false; } - var next=player.chooseToUse({ - filterCard:function(card,player){ - if(card.name!='wuxie') return false; - return lib.filter.cardEnabled(card,player,'forceEnable'); - }, - prompt:str, - type:'wuxie', - state:state, - _global_waiting:true, - ai1:function(){ - if(isJudge){ - var name=card.viewAs||card.name; - var info=lib.card[name]; - if(info&&info.ai&&info.ai.wuxie){ - var aiii=info.ai.wuxie(source,card,source,_status.event.player,state); - if(typeof aiii=='number') return aiii; - } - if(Math.abs(get.attitude(_status.event.player,source))<3) return 0; - if(source.hasSkill('guanxing')) return 0; - if(name!='lebu'&&name!='bingliang'){ - if(source!=_status.event.player){ - return 0; + } + }, + fangtian_skill:{ + mod:{ + selectTarget:function(card,player,range){ + if(card.name!='sha') return; + if(range[1]==-1) return; + var cards=player.getCards('h'); + for(var i=0;i0 + }, + direct:true, + audio:true, + content:function(){ + "step 0" + var att=(get.attitude(player,trigger.target)<=0); + var next=player.chooseButton(); + next.set('att',att); + next.set('createDialog',['选择要弃置的马',trigger.target.getCards('e',{subtype:['equip3','equip4']})]); + next.set('ai',function(button){ + if(_status.event.att) return get.buttonValue(button); + return 0; + }); + "step 1" + if(result.bool){ + player.logSkill('qilin_skill'); + trigger.target.discard(result.links[0]); + } + } + }, + bagua_skill:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'shan'})) return false; + var evt=event.getParent(); + if(evt.player&&evt.player.hasSkillTag('unequip',false,evt.card)) return false; + return true; + }, + audio:true, + check:function(event,player){ + if(get.damageEffect(player,event.player,player)>=0) return false; + return true; + }, + content:function(){ + "step 0" + player.judge('bagua',function(card){return (get.color(card)=='red')?1.5:-0.5}); + "step 1" + if(result.judge>0){ + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'shan'}} + } + }, + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(player.hasSkillTag('unequip',false,card)) return; + if(get.tag(card,'respondShan')) return 0.5; + } + } + } + }, + _wuxie:{ + trigger:{player:['useCardToBefore','phaseJudge']}, + priority:5, + popup:false, + forced:true, + filter:function(event,player){ + if(event.name!='phaseJudge'){ + var info=get.info(event.card); + if(!event.target){ + if(info.wuxieable) return true; + return false; + } + if(event.player.hasSkillTag('playernowuxie')) return false; + if(get.type(event.card)!='trick'&&!info.wuxieable) return false; + } + return true; + }, + content:function(){ + 'step 0' + if(trigger.multitarget){ + event.targets=trigger.targets; + } + event.target=trigger.target; + if(event.triggername=='phaseJudge'){ + event.target=trigger.player; + } + event.sourcex=event.targets||event.target; + if(!event.targets&&trigger.targets&&trigger.targets.length==1){ + event.sourcex2=trigger.player; + } + event.source=trigger.player; + event.state=true; + event.card=trigger.card; + event._global_waiting=true; + event.tempnowuxie=(trigger.targets&&trigger.targets.length>1&&!trigger.multitarget); + event.filterCard=function(card,player){ + if(card.name!='wuxie') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + }; + event.send=function(player,state,isJudge,card,source,target,targets,id,id2,tempnowuxie,skillState){ + if(skillState){ + player.applySkills(skillState); + } + state=state?1:-1; + var str=''; + if(isJudge){ + str+=get.translation(source)+'的'; + } + if(isJudge){ + str+=get.translation(card,'viewAs'); + } + else{ + str+=get.translation(card); + } + if((targets||target)&&!isJudge){ + str+='对'+get.translation(targets||target); + } + str+='将'+(state>0?'生效':'失效')+',是否无懈?'; + + if(player.isUnderControl(true)&&!_status.auto&&!ui.tempnowuxie&&tempnowuxie){ + var translation=get.translation(card.name); + if(translation.length>=4){ + translation=lib.translate[card.name+'_ab']||translation.slice(0,2); + } + ui.tempnowuxie=ui.create.control('不无懈'+translation,ui.click.tempnowuxie,'stayleft'); + ui.tempnowuxie._origin=id2; + } + var next=player.chooseToUse({ + filterCard:function(card,player){ + if(card.name!='wuxie') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + }, + prompt:str, + type:'wuxie', + state:state, + _global_waiting:true, + ai1:function(){ + if(isJudge){ + var name=card.viewAs||card.name; + var info=lib.card[name]; + if(info&&info.ai&&info.ai.wuxie){ + var aiii=info.ai.wuxie(source,card,source,_status.event.player,state); + if(typeof aiii=='number') return aiii; } - } - var card2; - if(name!=card.name){ - card2={name:name}; + if(Math.abs(get.attitude(_status.event.player,source))<3) return 0; + if(source.hasSkill('guanxing')) return 0; + if(name!='lebu'&&name!='bingliang'){ + if(source!=_status.event.player){ + return 0; + } + } + var card2; + if(name!=card.name){ + card2={name:name}; + } + else{ + card2=card; + } + var eff=get.effect(source,card2,source,source); + if(eff>=0) return 0; + return state*get.attitude(_status.event.player,source); } else{ - card2=card; + var triggerevent=_status.event.getTrigger(); + if(triggerevent&&triggerevent.parent&& + triggerevent.parent.postAi&& + triggerevent.player.isUnknown(_status.event.player)){ + return 0; + } + var info=get.info(card); + if(info.ai&&info.ai.wuxie){ + var aiii=info.ai.wuxie(target,card,source,_status.event.player,state); + if(typeof aiii=='number') return aiii; + } + if(info.multitarget&&targets){ + var eff=0; + for(var i=0;i=0) return 0; - return state*get.attitude(_status.event.player,source); + }, + source:target, + source2:targets, + id:id, + id2:id2 + }); + if(game.online){ + _status.event._resultid=id; + game.resume(); + } + else{ + next.nouse=true; + } + }; + 'step 1' + var list=game.filterPlayer(function(current){ + return current.hasWuxie(); + }); + event.list=list; + event.id=get.id(); + list.sort(function(a,b){ + return get.distance(event.source,a,'absolute')-get.distance(event.source,b,'absolute'); + }); + 'step 2' + if(event.list.length==0){ + event.finish(); + if(!event.state){ + trigger.untrigger(); + if(event.triggername=='phaseJudge'){ + trigger.cancelled=true; } else{ - var triggerevent=_status.event.getTrigger(); - if(triggerevent&&triggerevent.parent&& - triggerevent.parent.postAi&& - triggerevent.player.isUnknown(_status.event.player)){ - return 0; - } - var info=get.info(card); - if(info.ai&&info.ai.wuxie){ - var aiii=info.ai.wuxie(target,card,source,_status.event.player,state); - if(typeof aiii=='number') return aiii; - } - if(info.multitarget&&targets){ - var eff=0; - for(var i=0;i0; - }, - content:function(){ - "step 0" - if(target.countCards('h')==0||player.countCards('h')==0){ - event.finish(); - return; - } - player.chooseCard(true); - "step 1" - event.card1=result.cards[0]; - var rand=Math.random()<0.5; - target.chooseCard(true).ai=function(card){ - if(rand) return Math.random(); - return get.value(card); - }; - "step 2" - event.card2=result.cards[0]; - ui.arena.classList.add('thrownhighlight'); - game.addVideo('thrownhighlight1'); - player.$compare(event.card1,target,event.card2); - game.delay(4); - "step 3" - game.log(player,'展示了',event.card1); - game.log(target,'展示了',event.card2); - if(get.color(event.card2)==get.color(event.card1)){ - player.discard(event.card1).animate=false; - target.$gain2(event.card2); - var clone=event.card1.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([clone])); - } - target.loseHp(); - } - else{ - player.$gain2(event.card1); - target.$gain2(event.card2); - target.addTempSkill('dujian2','phaseBegin'); - } - ui.arena.classList.remove('thrownhighlight'); - game.addVideo('thrownhighlight2'); - }, - ai:{ - basic:{ - order:2, - value:3, - useful:1, +game.import('card',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'swd', + card:{ + dujian:{ + fullskin:true, + type:'basic', + enable:true, + filterTarget:function(card,player,target){ + return target.countCards('h')>0; }, - result:{ - player:function(player,target){ - if(player.countCards('h')<=Math.min(5,Math.max(2,player.hp))&&_status.event.name=='chooseToUse'){ - if(typeof _status.event.filterCard=='function'&& - _status.event.filterCard({name:'dujian'})){ - return -10; - } - if(_status.event.skill){ - var viewAs=get.info(_status.event.skill).viewAs; - if(viewAs=='dujian') return -10; - if(viewAs&&viewAs.name=='dujian') return -10; - } + content:function(){ + "step 0" + if(target.countCards('h')==0||player.countCards('h')==0){ + event.finish(); + return; + } + player.chooseCard(true); + "step 1" + event.card1=result.cards[0]; + var rand=Math.random()<0.5; + target.chooseCard(true).ai=function(card){ + if(rand) return Math.random(); + return get.value(card); + }; + "step 2" + event.card2=result.cards[0]; + ui.arena.classList.add('thrownhighlight'); + game.addVideo('thrownhighlight1'); + player.$compare(event.card1,target,event.card2); + game.delay(4); + "step 3" + game.log(player,'展示了',event.card1); + game.log(target,'展示了',event.card2); + if(get.color(event.card2)==get.color(event.card1)){ + player.discard(event.card1).animate=false; + target.$gain2(event.card2); + var clone=event.card1.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([clone])); } - return 0; - }, - target:function(player,target){ - if(target.hasSkill('dujian2')||target.countCards('h')==0) return 0; - if(player.countCards('h')<=1) return 0; - return -1.5; - } - }, - tag:{ - loseHp:1 - } - } - }, - yangpijuan:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return target==player; - }, - modTarget:true, - content:function(){ - 'step 0' - var choice; - if(target.countCards('h','shan')==0||target.countCards('h','sha')==0||target.hp<=1){ - choice='basic'; - } - else{ - var e2=target.getEquip(2); - var e3=target.getEquip(3); - if((e2&&e3)||((e2||e3)&&target.needsToDiscard()<=1)||Math.random()<0.5){ - choice='trick'; + target.loseHp(); } else{ - choice='equip'; + player.$gain2(event.card1); + target.$gain2(event.card2); + target.addTempSkill('dujian2','phaseBegin'); + } + ui.arena.classList.remove('thrownhighlight'); + game.addVideo('thrownhighlight2'); + }, + ai:{ + basic:{ + order:2, + value:3, + useful:1, + }, + result:{ + player:function(player,target){ + if(player.countCards('h')<=Math.min(5,Math.max(2,player.hp))&&_status.event.name=='chooseToUse'){ + if(typeof _status.event.filterCard=='function'&& + _status.event.filterCard({name:'dujian'})){ + return -10; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='dujian') return -10; + if(viewAs&&viewAs.name=='dujian') return -10; + } + } + return 0; + }, + target:function(player,target){ + if(target.hasSkill('dujian2')||target.countCards('h')==0) return 0; + if(player.countCards('h')<=1) return 0; + return -1.5; + } + }, + tag:{ + loseHp:1 } } - target.chooseControl('basic','trick','equip',function(){ - return choice; - }).set('prompt','选择一种卡牌类型'); - 'step 1' - var list=get.inpile(result.control,'trick'); - list=list.randomGets(3); - for(var i=0;i0) return 0; - if(get.damageEffect(target,player,target)>=0) return 0; - return -1; + yangpijuan:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target==player; + }, + modTarget:true, + content:function(){ + 'step 0' + var choice; + if(target.countCards('h','shan')==0||target.countCards('h','sha')==0||target.hp<=1){ + choice='basic'; + } + else{ + var e2=target.getEquip(2); + var e3=target.getEquip(3); + if((e2&&e3)||((e2||e3)&&target.needsToDiscard()<=1)||Math.random()<0.5){ + choice='trick'; + } + else{ + choice='equip'; + } + } + target.chooseControl('basic','trick','equip',function(){ + return choice; + }).set('prompt','选择一种卡牌类型'); + 'step 1' + var list=get.inpile(result.control,'trick'); + list=list.randomGets(3); + for(var i=0;i0) return 0; + if(get.damageEffect(target,player,target)>=0) return 0; + return -1; + } + }, + } }, - selectTarget:-1, - modTarget:true, - content:function(){ - 'step 0' - event.num=3; - var list=[]; - event.list=list; - for(var i=0;i0&&info.selectTarget[1]>=info.selectTarget[0]){ + yuruyi:{ + type:'equip', + subtype:'equip5', + skills:['yuruyi'], + fullskin:true, + ai:{ + basic:{ + equipValue:6 + } + }, + }, + fengyinzhidan:{ + type:'basic', + enable:true, + fullskin:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + modTarget:true, + content:function(){ + 'step 0' + event.num=3; + var list=[]; + event.list=list; + for(var i=0;i0&&info.selectTarget[1]>=info.selectTarget[0]){ + list.push(lib.inpile[i]); + } + } + else if(typeof info.selectTarget=='number'){ list.push(lib.inpile[i]); } } - else if(typeof info.selectTarget=='number'){ - list.push(lib.inpile[i]); - } } } - } - 'step 1' - var list=event.list; - while(list.length){ - var card={name:list.randomRemove()}; - var info=get.info(card); - var targets=game.filterPlayer(function(current){ - return lib.filter.filterTarget(card,target,current); - }); - if(targets.length){ - targets.sort(lib.sort.seat); - if(info.selectTarget==-1){ - target.useCard(card,targets,'noai'); - } - else{ - var num=info.selectTarget; - if(Array.isArray(num)){ - if(targets.length0){ + event.redo(); + } + break; } - if(--event.num>0){ - event.redo(); - } - break; - } - } - }, - ai:{ - order:9, - value:8, - useful:3, - result:{ - target:1 - } - } - }, - yuchanqian:{ - fullskin:true, - type:'jiqi', - addinfo:'杀', - autoViewAs:'sha', - ai:{ - value:6, - useful:[5,1] - } - }, - yuchankun:{ - fullskin:true, - type:'jiqi', - addinfo:'药', - autoViewAs:'caoyao', - ai:{ - value:6, - useful:[7,2] - } - }, - yuchanzhen:{ - fullskin:true, - type:'jiqi', - autoViewAs:'jiu', - addinfo:'酒', - savable:function(card,player,dying){ - return dying==player; - }, - ai:{ - value:6, - useful:[4,1] - } - }, - yuchanxun:{ - fullskin:true, - type:'jiqi', - autoViewAs:'tao', - addinfo:'桃', - savable:true, - ai:{ - value:6, - useful:[8,6.5] - } - }, - yuchankan:{ - fullskin:true, - type:'jiqi', - autoViewAs:'shenmiguo', - addinfo:'果', - ai:{ - order:1, - useful:4, - value:6, - result:{ - player:function(){ - var cardname=_status.event.cardname; - if(cardname=='tiesuo') return 0; - if(cardname=='jiu') return 0; - if(cardname=='tianxianjiu') return 0; - if(cardname=='toulianghuanzhu') return 0; - if(cardname=='shijieshu') return 0; - if(cardname=='xietianzi') return 0; - if(cardname=='huogong') return 0; - if(cardname=='shandianjian') return 0; - return 1; } }, - } - }, - yuchanli:{ - fullskin:true, - type:'jiqi', - autoViewAs:'tianxianjiu', - addinfo:'仙', - ai:{ - value:6, - useful:1 - } - }, - yuchangen:{ - fullskin:true, - type:'jiqi', - addinfo:'蛋', - autoViewAs:'fengyinzhidan', - ai:{ - value:6, - useful:1 - } - }, - yuchandui:{ - fullskin:true, - type:'jiqi', - addinfo:'雪', - autoViewAs:'xuejibingbao', - ai:{ - value:6, - useful:4 - } - }, - mujiaren:{ - fullskin:true, - enable:true, - type:'jiguan', - usable:1, - forceUsable:true, - wuxieable:true, - selectTarget:-1, - filterTarget:function(card,player,target){ - return target==player; - }, - content:function(){ - 'step 0' - var cards=target.getCards('h',function(card){ - return get.type(card)!='basic'; - }); - if(cards.length){ - target.lose(cards)._triggered=null; - } - event.num=1+cards.length; - 'step 1' - var cards=[]; - var list=get.typeCard('jiguan'); - if(list.length){ - for(var i=0;i=0) return 0; - return 8-get.useful(card); - }); - } - else{ - target.damage('fire'); - event.parent.preResult=true; - event.finish(); - } - "step 1" - if(result.bool==false){ - target.damage('fire'); - event.parent.preResult=true; - } - }, - contentAfter:function(){ - if(!event.preResult) player.draw(); - }, - ai:{ - wuxie:function(target,card,player,viewer){ - if(get.attitude(viewer,target)>0){ - if(target.countCards('h')>0||target.hp>1) return 0; - } - }, - basic:{ + ai:{ order:9, + value:8, + useful:3, + result:{ + target:1 + } + } + }, + yuchanqian:{ + fullskin:true, + type:'jiqi', + addinfo:'杀', + autoViewAs:'sha', + ai:{ + value:6, + useful:[5,1] + } + }, + yuchankun:{ + fullskin:true, + type:'jiqi', + addinfo:'药', + autoViewAs:'caoyao', + ai:{ + value:6, + useful:[7,2] + } + }, + yuchanzhen:{ + fullskin:true, + type:'jiqi', + autoViewAs:'jiu', + addinfo:'酒', + savable:function(card,player,dying){ + return dying==player; + }, + ai:{ + value:6, + useful:[4,1] + } + }, + yuchanxun:{ + fullskin:true, + type:'jiqi', + autoViewAs:'tao', + addinfo:'桃', + savable:true, + ai:{ + value:6, + useful:[8,6.5] + } + }, + yuchankan:{ + fullskin:true, + type:'jiqi', + autoViewAs:'shenmiguo', + addinfo:'果', + ai:{ + order:1, + useful:4, + value:6, + result:{ + player:function(){ + var cardname=_status.event.cardname; + if(cardname=='tiesuo') return 0; + if(cardname=='jiu') return 0; + if(cardname=='tianxianjiu') return 0; + if(cardname=='toulianghuanzhu') return 0; + if(cardname=='shijieshu') return 0; + if(cardname=='xietianzi') return 0; + if(cardname=='huogong') return 0; + if(cardname=='shandianjian') return 0; + return 1; + } + }, + } + }, + yuchanli:{ + fullskin:true, + type:'jiqi', + autoViewAs:'tianxianjiu', + addinfo:'仙', + ai:{ + value:6, useful:1 + } + }, + yuchangen:{ + fullskin:true, + type:'jiqi', + addinfo:'蛋', + autoViewAs:'fengyinzhidan', + ai:{ + value:6, + useful:1 + } + }, + yuchandui:{ + fullskin:true, + type:'jiqi', + addinfo:'雪', + autoViewAs:'xuejibingbao', + ai:{ + value:6, + useful:4 + } + }, + mujiaren:{ + fullskin:true, + enable:true, + type:'jiguan', + usable:1, + forceUsable:true, + wuxieable:true, + selectTarget:-1, + filterTarget:function(card,player,target){ + return target==player; }, - result:{ - target:function(player,target){ - if(player.hasUnknown(2)) return 0; - var nh=target.countCards('h'); - if(get.mode()=='identity'){ - if(target.isZhu&&nh<=1&&target.hp<=1) return -100; + content:function(){ + 'step 0' + var cards=target.getCards('h',function(card){ + return get.type(card)!='basic'; + }); + if(cards.length){ + target.lose(cards)._triggered=null; + } + event.num=1+cards.length; + 'step 1' + var cards=[]; + var list=get.typeCard('jiguan'); + if(list.length){ + for(var i=0;i2; - }, - distance:{attackFrom:-3}, - onEquip:function(){ - if(!player.hasSkill('xuanyuan')&&player.hp<=2){ - player.discard(card); - } - else{ - player.changeHujia(); - } - }, - ai:{ - equipValue:9 - } - }, - pangufu:{ - fullskin:true, - type:'equip', - subtype:'equip1', - skills:['pangufu'], - nomod:true, - nopower:true, - unique:true, - distance:{attackFrom:-3}, - ai:{ - equipValue:8 - } - }, - lianyaohu:{ - fullskin:true, - type:'equip', - subtype:'equip5', - equipDelay:false, - loseDelay:false, - nomod:true, - nopower:true, - unique:true, - onEquip:function(){ - player.markSkill('lianyaohu_skill'); - }, - onLose:function(){ - player.unmarkSkill('lianyaohu_skill'); - }, - ai:{ - equipValue:6 - }, - skills:['lianhua','shouna','lianyaohu_skill'] - }, - haotianta:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['haotianta'], - nomod:true, - nopower:true, - unique:true, - ai:{ - equipValue:7 - } - }, - fuxiqin:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['kongxin'], - nomod:true, - nopower:true, - unique:true, - ai:{ - equipValue:6 - } - }, - shennongding:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['shennongding'], - nomod:true, - nopower:true, - unique:true, - ai:{ - equipValue:6 - } - }, - kongdongyin:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['kongdongyin'], - nomod:true, - nopower:true, - unique:true, - ai:{ - basic:{ - equipValue:function(card,player){ - if(player.hp==2) return 7; - if(player.hp==1) return 10; - return 5; + ai:{ + wuxie:function(){ + return 0; + }, + order:1, + result:{ + target:1 } } - } - }, - kunlunjingc:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['kunlunjingc'], - nomod:true, - nopower:true, - unique:true, - ai:{ - equipValue:6 - } - }, - nvwashi:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['nvwashi'], - nomod:true, - nopower:true, - unique:true, - ai:{ - equipValue:5 - } - }, - guisheqi:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:true, - content:function(){ - target.changeHujia(); }, - ai:{ - basic:{ - order:5, - useful:3, - value:6 + zhiluxiaohu:{ + enable:function(card,player){ + return lib.filter.filterCard({name:'sha'},player); }, - result:{ - target:function(player,target){ - return 2/Math.max(1,Math.sqrt(target.hp)); - }, + fullskin:true, + type:'jiguan', + wuxieable:true, + filterTarget:function(card,player,target){ + return target==player; }, - } - }, - jiguanfeng:{ - fullskin:true, - type:'jiguan', - enable:true, - wuxieable:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - "step 0" - var next=target.chooseToRespond({name:'shan'}); - next.autochoose=lib.filter.autoRespondShan; - "step 1" - if(result.bool==false){ - if(!target.hasSkill('fengyin')){ - target.addTempSkill('fengyin',{player:'phaseBegin'}); + modTarget:true, + selectTarget:-1, + content:function(){ + 'step 0' + var targets=target.getEnemies(); + if(targets.length){ + var target2=targets.randomGet(); + target2.addExpose(0.2); + target.useCard({name:'sha'},target2); } - target.damage(); - } - else{ - event.finish(); - } - }, - ai:{ - basic:{ - order:9, - useful:3, - value:6.5, + player.addSkill('zhiluxiaohu'); + 'step 1' + player.removeSkill('zhiluxiaohu'); }, - result:{ - target:-2, + ai:{ + value:6, + result:{ + target:1 + }, + order:function(){ + return get.order({name:'sha'})+0.1; + }, + } + }, + xuejibingbao:{ + enable:true, + fullskin:true, + type:'basic', + filterTarget:function(card,player,target){ + return !target.hasSkill('xuejibingbao'); }, - tag:{ - respond:1, - respondShan:1, - // damage:1, - } - } - }, - jiguanyuan:{ - fullskin:true, - type:'jiguan', - wuxieable:true, - enable:function(card,player){ - var hs=player.getCards('he'); - return hs.length>1||(hs.length==1&&hs[0]!=card); - }, - filterTarget:function(card,player,target){ - return target!=player&&!target.hasSkill('jiguanyuan'); - }, - content:function(){ - 'step 0' - if(player.countCards('he')){ - player.chooseCard(true,'he'); - } - else{ - event.finish(); - } - 'step 1' - player.$throw(result.cards); - player.lose(result.cards,ui.special); - ui.special.appendChild(cards[0]); - event.togive=[cards[0],result.cards[0]]; - game.delay(); - 'step 2' - // target.gain(event.togive).delay=false; - target.$gain2(event.togive); - target.storage.jiguanyuan=event.togive; - target.addSkill('jiguanyuan'); - game.log(target,'从',player,'获得了',event.togive); - player.draw(); - }, - ai:{ - basic:{ + content:function(){ + target.storage.xuejibingbao=2; + target.addSkill('xuejibingbao'); + }, + ai:{ order:2, - useful:2, - value:7 + value:6, + result:{ + target:function(player,target){ + var num=1; + if(target.hp<2) num=0.5; + return num/Math.sqrt(Math.max(1,target.countCards('h'))); + } + } + } + }, + gouhunluo:{ + enable:true, + fullskin:true, + type:'jiguan', + wuxieable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('gouhunluo'); }, - result:{ - target:function(player,target){ - var players=game.filterPlayer(function(current){ - return (current!=player&&!current.isTurnedOver()&& - get.attitude(player,current)>=3&&get.attitude(current,player)>=3) + content:function(){ + target.storage.gouhunluo=3; + target.storage.gouhunluo2=player; + target.addSkill('gouhunluo'); + }, + ai:{ + order:2, + value:5, + result:{ + target:function(player,target){ + return -1/Math.max(1,target.hp); + } + } + } + }, + zhuquezhizhang:{ + type:'jiqi', + fullskin:true, + ai:{ + value:8, + useful:6.5, + } + }, + xuanwuzhihuang:{ + type:'jiqi', + fullskin:true, + ai:{ + value:8, + useful:6.5, + } + }, + huanglinzhicong:{ + type:'jiqi', + fullskin:true, + ai:{ + value:8, + useful:6.5, + } + }, + cangchizhibi:{ + type:'jiqi', + fullskin:true, + ai:{ + value:8, + useful:6.5, + } + }, + qinglongzhigui:{ + type:'jiqi', + fullskin:true, + ai:{ + value:8, + useful:6.5, + } + }, + baishouzhihu:{ + type:'jiqi', + fullskin:true, + ai:{ + value:8, + useful:6.5, + } + }, + jiguantong:{ + fullskin:true, + type:'jiguan', + enable:true, + wuxieable:true, + selectTarget:-1, + reverseOrder:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + "step 0" + if(target.countCards('h')){ + var next=target.chooseToDiscard('机关火筒:弃置一张手牌或受到一点火焰伤害'); + next.set('ai',function(card){ + var evt=_status.event.getParent(); + if(get.damageEffect(evt.target,evt.player,evt.target,'fire')>=0) return 0; + return 8-get.useful(card); }); - players.sort(lib.sort.seat); - if(target==players[0]) return 2; - return 0.5; + } + else{ + target.damage('fire'); + event.parent.preResult=true; + event.finish(); + } + "step 1" + if(result.bool==false){ + target.damage('fire'); + event.parent.preResult=true; + } + }, + contentAfter:function(){ + if(!event.preResult) player.draw(); + }, + ai:{ + wuxie:function(target,card,player,viewer){ + if(get.attitude(viewer,target)>0){ + if(target.countCards('h')>0||target.hp>1) return 0; + } }, - }, - } - }, - shenmiguo_old:{ - fullskin:true, - type:'trick', - enable:true, - selectTarget:-1, - filterTarget:function(card,player,target){ - return target==player; - }, - modTarget:true, - content:function(){ - var list=[]; - for(var i in lib.card){ - if(lib.card[i].derivation){ - list.push(i); + basic:{ + order:9, + useful:1 + }, + result:{ + target:function(player,target){ + if(player.hasUnknown(2)) return 0; + var nh=target.countCards('h'); + if(get.mode()=='identity'){ + if(target.isZhu&&nh<=1&&target.hp<=1) return -100; + } + if(nh==0) return -1; + if(nh==1) return -0.7 + return -0.5; + }, + }, + tag:{ + discard:1, + loseCard:1, + damage:1, + natureDamage:1, + fireDamage:1, + multitarget:1, + multineg:1, } } - if(get.mode()=='stone'){ - list.remove('hslingjian_jinjilengdong'); - } - if(list.length){ - target.gain(game.createCard(list.randomGet()),'draw'); + }, + donghuangzhong:{ + fullskin:true, + type:'equip', + subtype:'equip5', + nomod:true, + nopower:true, + unique:true, + skills:['donghuangzhong'], + ai:{ + equipValue:7 } }, - ai:{ - basic:{ - order:7.3, - useful:2, - value:6 + xuanyuanjian:{ + fullskin:true, + type:'equip', + subtype:'equip1', + nomod:true, + nopower:true, + unique:true, + skills:['xuanyuanjian','xuanyuanjian2','xuanyuanjian3'], + enable:function(card,player){ + return player.hasSkill('xuanyuan')||player.hp>2; }, - result:{ - target:2, - }, - } - }, - shenmiguo:{ - fullskin:true, - type:'basic', - content:function(){ - if(Array.isArray(player.storage.shenmiguo)){ - player.useCard(player.storage.shenmiguo[0],player.storage.shenmiguo[1]); - } - }, - ai:{ - order:1, - useful:6, - value:6, - result:{ - player:function(){ - var cardname=_status.event.cardname; - if(get.tag({name:cardname},'norepeat')) return 0; - return 1; + distance:{attackFrom:-3}, + onEquip:function(){ + if(!player.hasSkill('xuanyuan')&&player.hp<=2){ + player.discard(card); + } + else{ + player.changeHujia(); } }, - } - }, - qinglianxindeng:{ - fullskin:true, - type:'equip', - subtype:'equip2', - skills:['qinglianxindeng'], - ai:{ - basic:{ + ai:{ + equipValue:9 + } + }, + pangufu:{ + fullskin:true, + type:'equip', + subtype:'equip1', + skills:['pangufu'], + nomod:true, + nopower:true, + unique:true, + distance:{attackFrom:-3}, + ai:{ equipValue:8 } }, - }, - lingjiandai:{ - fullskin:true, - enable:true, - type:'jiguan', - wuxieable:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - modTarget:true, - content:function(){ - var list=get.typeCard('hslingjian'); - if(list.length){ - list=list.randomGets(3); - for(var i=0;i0; }, - content:function(){ - target.discard(target.getCards('he').randomGet()); + kunlunjingc:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['kunlunjingc'], + nomod:true, + nopower:true, + unique:true, + ai:{ + equipValue:6 + } }, - ai:{ - order:9, - result:{ - target:-1, + nvwashi:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['nvwashi'], + nomod:true, + nopower:true, + unique:true, + ai:{ + equipValue:5 + } + }, + guisheqi:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:true, + content:function(){ + target.changeHujia(); }, - useful:[2,0.5], - value:[2,0.5], - } - }, - hslingjian_zhongxinghujia:{ - type:'hslingjian', - fullimage:true, - vanish:true, - enable:true, - derivation:true, - derivationpack:'swd', - filterTarget:function(card,player,target){ - return !target.isMin(); + ai:{ + basic:{ + order:5, + useful:3, + value:6 + }, + result:{ + target:function(player,target){ + return 2/Math.max(1,Math.sqrt(target.hp)); + }, + }, + } }, - content:function(){ - 'step 0' - var list=[]; - for(var i=0;i1||(hs.length==1&&hs[0]!=card); + }, + filterTarget:function(card,player,target){ + return target!=player&&!target.hasSkill('jiguanyuan'); + }, + content:function(){ + 'step 0' + if(player.countCards('he')){ + player.chooseCard(true,'he'); + } + else{ + event.finish(); + } + 'step 1' + player.$throw(result.cards); + player.lose(result.cards,ui.special); + ui.special.appendChild(cards[0]); + event.togive=[cards[0],result.cards[0]]; game.delay(); - target.equip(card); - } - 'step 1' - var hs=target.getCards('h'); - if(hs.length){ - target.discard(hs.randomGet()); + 'step 2' + // target.gain(event.togive).delay=false; + target.$gain2(event.togive); + target.storage.jiguanyuan=event.togive; + target.addSkill('jiguanyuan'); + game.log(target,'从',player,'获得了',event.togive); + player.draw(); + }, + ai:{ + basic:{ + order:2, + useful:2, + value:7 + }, + result:{ + target:function(player,target){ + var players=game.filterPlayer(function(current){ + return (current!=player&&!current.isTurnedOver()&& + get.attitude(player,current)>=3&&get.attitude(current,player)>=3) + }); + players.sort(lib.sort.seat); + if(target==players[0]) return 2; + return 0.5; + }, + }, } }, - ai:{ - order:4, - result:{ - target:function(player,target){ - if(target.getEquip(2)){ - if(target.countCards('h')&&!target.hasSkillTag('noe')) return -0.6; - return 0; + shenmiguo_old:{ + fullskin:true, + type:'trick', + enable:true, + selectTarget:-1, + filterTarget:function(card,player,target){ + return target==player; + }, + modTarget:true, + content:function(){ + var list=[]; + for(var i in lib.card){ + if(lib.card[i].derivation){ + list.push(i); + } + } + if(get.mode()=='stone'){ + list.remove('hslingjian_jinjilengdong'); + } + if(list.length){ + target.gain(game.createCard(list.randomGet()),'draw'); + } + }, + ai:{ + basic:{ + order:7.3, + useful:2, + value:6 + }, + result:{ + target:2, + }, + } + }, + shenmiguo:{ + fullskin:true, + type:'basic', + content:function(){ + if(Array.isArray(player.storage.shenmiguo)){ + player.useCard(player.storage.shenmiguo[0],player.storage.shenmiguo[1]); + } + }, + ai:{ + order:1, + useful:6, + value:6, + result:{ + player:function(){ + var cardname=_status.event.cardname; + if(get.tag({name:cardname},'norepeat')) return 0; + return 1; + } + }, + } + }, + qinglianxindeng:{ + fullskin:true, + type:'equip', + subtype:'equip2', + skills:['qinglianxindeng'], + ai:{ + basic:{ + equipValue:8 + } + }, + }, + lingjiandai:{ + fullskin:true, + enable:true, + type:'jiguan', + wuxieable:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + modTarget:true, + content:function(){ + var list=get.typeCard('hslingjian'); + if(list.length){ + list=list.randomGets(3); + for(var i=0;i6) return num; - } - } - if(hs.length>4) return num+0.5; + }(es[i],lib.skill._lingjianduanzao.process([card,es[i]]),i==es.length-1)),i*200); + } + target.$gain2(cards); + game.pause(); + 'step 1' + target.addEquipTrigger(); + }, + ai:{ + value:7, + order:7.5, + result:{ + // target:function(player,target){ + // var es=target.getCards('e'); + // var num=0; + // for(var i=0;i0; + }, + content:function(){ + target.discard(target.getCards('he').randomGet()); + }, + ai:{ + order:9, + result:{ + target:-1, + }, + useful:[2,0.5], + value:[2,0.5], + } + }, + hslingjian_zhongxinghujia:{ + type:'hslingjian', + fullimage:true, + vanish:true, + enable:true, + derivation:true, + derivationpack:'swd', + filterTarget:function(card,player,target){ + return !target.isMin(); + }, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i6) return num; + } + } + if(hs.length>4) return num+0.5; + } + else{ + if(hs.length){ + if(hs.length<=3) return num; + return num+0.5; + } + } + return num+1; + } + } + }, + useful:[2,0.5], + value:[2,0.5], + } + }, + hslingjian_xingtigaizao:{ + type:'hslingjian', + fullimage:true, + vanish:true, + enable:true, + derivation:true, + derivationpack:'swd', + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + target.draw(); + target.addSkill('hslingjian_xingtigaizao'); + if(typeof target.storage.hslingjian_xingtigaizao=='number'){ + target.storage.hslingjian_xingtigaizao++; + } + else{ + target.storage.hslingjian_xingtigaizao=1; + } + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(!player.needsToDiscard()) return 1; + return 0; + } + }, + useful:[2,0.5], + value:[2,0.5], + } + }, + hslingjian_shijianhuisu:{ + type:'hslingjian', + fullimage:true, + vanish:true, + enable:true, + derivation:true, + derivationpack:'swd', + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('e')>0; + }, + content:function(){ + var es=target.getCards('e'); + target.gain(es); + target.$gain2(es); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noe')) return target.countCards('e')*2; + if(target.getEquip('baiyin')&&target.isDamaged()) return 2; + if(target.getEquip('xuanyuanjian')||target.getEquip('qiankundai')) return 1; + if(target.hasSkill('jiguanyaoshu_skill')) return 0.5; + var num=0; + var es=target.getCards('e'); + for(var i=0;i0; - }, - content:function(){ - var es=target.getCards('e'); - target.gain(es); - target.$gain2(es); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - if(target.hasSkillTag('noe')) return target.countCards('e')*2; - if(target.getEquip('baiyin')&&target.isDamaged()) return 2; - if(target.getEquip('xuanyuanjian')||target.getEquip('qiankundai')) return 1; - if(target.hasSkill('jiguanyaoshu_skill')) return 0.5; - var num=0; - var es=target.getCards('e'); - for(var i=0;i1; }, - content:function(){ - "step 0" - if(!target.countCards('h',{color:'black'})){ - target.loseHp(); - event.finish(); - } - else{ - target.chooseToDiscard({color:'black'},'弃置一张黑色手牌或受流失一点体力').ai=function(card){ - return 8-get.value(card); - }; - } - "step 1" - if(!result.bool){ - target.loseHp(); - } + qinglonglingzhu:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['qinglonglingzhu'], + ai:{ + basic:{ + equipValue:5 + }, + }, }, - ai:{ - basic:{ - order:9, - value:3, - useful:1, + baihupifeng:{ + fullskin:true, + type:"equip", + subtype:"equip2", + skills:['baihupifeng'], + ai:{ + basic:{ + equipValue:function(card,player){ + if(player.hp<=2) return 8; + return 6; + } + }, }, - result:{ - target:-2 - }, - tag:{ - discard:1, - loseHp:1 - } - } - }, - caoyao:{ - fullskin:true, - type:'basic', - range:{global:1}, - enable:true, - filterTarget:function(card,player,target){ - return target.hp0}, - notarget:true, - mode:['identity','guozhan'], - fullskin:true, - content:function(){ - "step 0" - var list=[]; - for(var i=0;i3) return 7; + }, + xiayuncailing:{ + type:'equip', + subtype:'equip3', + fullskin:true, + distance:{globalFrom:1,globalTo:2}, + }, + shentoumianju:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['shentou'], + ai:{ + basic:{ + equipValue:7, } - return -10; + } + }, + pusafazhou:{ + type:'equip', + subtype:'equip5', + skills:['pusafazhou'], + ai:{ + basic:{ + equipValue:function(card,player){ + if(player.hp==2) return 7; + if(player.hp==1) return 9; + return 5; + } + } + } + }, + xianluhui:{ + fullskin:true, + type:'trick', + enable:true, + selectTarget:-1, + reverseOrder:true, + filterTarget:function(card,player,target){ + return target.isDamaged(); }, - result:{ - player:function(player){ + content:function(){ + target.changeHujia(); + }, + ai:{ + tag:{ + multitarget:1, + }, + basic:{ + order:7, + useful:3, + value:3, + }, + result:{ + target:function(player,target){ + if(target.hp<=1) return 1.5; + if(target.hp==2) return 1.2; + return 1; + }, + }, + } + }, + xiangyuye:{ + type:'basic', + enable:true, + fullskin:true, + filterTarget:function(card,player,target){ + return get.distance(player,target,'attack')>1; + }, + content:function(){ + "step 0" + if(!target.countCards('h',{color:'black'})){ + target.loseHp(); + event.finish(); + } + else{ + target.chooseToDiscard({color:'black'},'弃置一张黑色手牌或受流失一点体力').ai=function(card){ + return 8-get.value(card); + }; + } + "step 1" + if(!result.bool){ + target.loseHp(); + } + }, + ai:{ + basic:{ + order:9, + value:3, + useful:1, + }, + result:{ + target:-2 + }, + tag:{ + discard:1, + loseHp:1 + } + } + }, + caoyao:{ + fullskin:true, + type:'basic', + range:{global:1}, + enable:true, + filterTarget:function(card,player,target){ + return target.hp0}, + notarget:true, + mode:['identity','guozhan'], + fullskin:true, + content:function(){ + "step 0" + var list=[]; + for(var i=0;i3) return 2; + if(get.attitude(player,game.dead[i])>3) return 7; } return -10; + }, + result:{ + player:function(player){ + for(var i=0;i3) return 2; + } + return -10; + } + }, + } + }, + tianxianjiu:{ + fullskin:true, + type:'basic', + enable:function(event,player){ + return !player.hasSkill('tianxianjiu'); + }, + savable:function(card,player){ + return _status.event.dying==player; + }, + usable:1, + selectTarget:-1, + logv:false, + modTarget:true, + filterTarget:function(card,player,target){ + return target==player; + }, + content:function(){ + "step 0" + if(target.isDying()) target.recover(); + else{ + target.addTempSkill('tianxianjiu',['phaseAfter','shaAfter']); + if(cards&&cards.length){ + card=cards[0]; + } + if(target==targets[0]&&card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){ + card.clone.moveDelete(target); + game.addVideo('gain2',target,get.cardsInfo([card])); + } } }, - } - }, - tianxianjiu:{ - fullskin:true, - type:'basic', - enable:function(event,player){ - return !player.hasSkill('tianxianjiu'); + ai:{ + basic:{ + useful:function(card,i){ + if(_status.event.player.hp>1){ + if(i==0) return 5; + return 1; + } + if(i==0) return 7.3; + return 3; + }, + value:function(card,player,i){ + if(player.hp>1){ + if(i==0) return 5; + return 1; + } + if(i==0) return 7.3; + return 3; + }, + }, + order:function(){ + return get.order({name:'sha'})+0.2; + }, + result:{ + target:function(player,target){ + if(target&&target.isDying()) return 2; + if(lib.config.mode=='stone'&&!player.isMin()){ + if(player.getActCount()+1>=player.actcount) return false; + } + var shas=player.getCards('h','sha'); + if(shas.length>1&&player.getCardUsable('sha')>1){ + return 0; + } + var card; + if(shas.length){ + for(var i=0;i0); + })){ + return 1; + } + } + return 0; + }, + }, + } }, - savable:function(card,player){ - return _status.event.dying==player; - }, - usable:1, - selectTarget:-1, - logv:false, - modTarget:true, - filterTarget:function(card,player,target){ - return target==player; - }, - content:function(){ - "step 0" - if(target.isDying()) target.recover(); - else{ - target.addTempSkill('tianxianjiu',['phaseAfter','shaAfter']); + huanpodan:{ + fullskin:true, + type:'basic', + enable:true, + logv:false, + filterTarget:function(card,player,target){ + return !target.hasSkill('huanpodan_skill'); + }, + content:function(){ + target.addSkill('huanpodan_skill'); if(cards&&cards.length){ card=cards[0]; } @@ -1584,3599 +1667,3524 @@ game.import('card',{ card.clone.moveDelete(target); game.addVideo('gain2',target,get.cardsInfo([card])); } + }, + ai:{ + basic:{ + value:8, + useful:4, + }, + order:2, + result:{ + target:function(player,target){ + return 1/Math.sqrt(1+target.hp); + }, + }, } }, - ai:{ - basic:{ - useful:function(card,i){ - if(_status.event.player.hp>1){ - if(i==0) return 5; - return 1; - } - if(i==0) return 7.3; - return 3; - }, - value:function(card,player,i){ - if(player.hp>1){ - if(i==0) return 5; - return 1; - } - if(i==0) return 7.3; - return 3; - }, + langeguaiyi:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['longfan'], + ai:{ + basic:{ + equipValue:7, + } + } + }, + guiyoujie:{ + fullskin:true, + type:'delay', + filterTarget:function(card,player,target){ + return (lib.filter.judge(card,player,target)&&player!=target); }, - order:function(){ - return get.order({name:'sha'})+0.2; + judge:function(card){ + if(get.color(card)=='black') return -3; + return 0; }, - result:{ - target:function(player,target){ - if(target&&target.isDying()) return 2; - if(lib.config.mode=='stone'&&!player.isMin()){ - if(player.getActCount()+1>=player.actcount) return false; - } - var shas=player.getCards('h','sha'); - if(shas.length>1&&player.getCardUsable('sha')>1){ - return 0; - } - var card; - if(shas.length){ - for(var i=0;i0); - })){ - return 1; - } - } + effect:function(){ + if(result.bool==false){ + player.turnOver(); + player.draw(); + } + }, + ai:{ + basic:{ + order:1, + useful:1, + value:6, + }, + result:{ + target:-3 + }, + } + }, + yufulu:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['touzhi'], + ai:{ + basic:{ + equipValue:5 + } + } + }, + xixueguizhihuan:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['xixue'], + ai:{ + basic:{ + equipValue:5 + } + } + }, + zhufangshenshi:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + player.storage.zhufangshenshi=target; + player.addTempSkill('zhufangshenshi','phaseAfter'); + }, + ai:{ + value:4, + wuxie:function(){ return 0; }, - }, - } - }, - huanpodan:{ - fullskin:true, - type:'basic', - enable:true, - logv:false, - filterTarget:function(card,player,target){ - return !target.hasSkill('huanpodan_skill'); - }, - content:function(){ - target.addSkill('huanpodan_skill'); - if(cards&&cards.length){ - card=cards[0]; - } - if(target==targets[0]&&card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){ - card.clone.moveDelete(target); - game.addVideo('gain2',target,get.cardsInfo([card])); - } - }, - ai:{ - basic:{ - value:8, - useful:4, - }, - order:2, - result:{ - target:function(player,target){ - return 1/Math.sqrt(1+target.hp); + useful:[2,1], + basic:{ + order:7, }, + result:{ + player:function(player,target){ + if(get.attitude(player,target)<0){ + if(get.distance(player,target)>1) return 1; + return 0.6; + } + return 0.3; + } + } }, - } - }, - langeguaiyi:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['longfan'], - ai:{ - basic:{ - equipValue:7, + }, + jingleishan:{ + fullskin:true, + type:'trick', + enable:true, + selectTarget:-1, + reverseOrder:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + "step 0" + var next=target.chooseToRespond({name:'sha'}); + next.ai=function(card){ + if(get.damageEffect(target,player,target,'thunder')>=0) return 0; + if(player.hasSkillTag('notricksource')) return 0; + if(target.hasSkillTag('notrick')) return 0; + return 11-get.value(card); + }; + next.autochoose=lib.filter.autoRespondSha; + "step 1" + if(result.bool==false){ + target.damage('thunder'); + } + }, + ai:{ + wuxie:function(target,card,player,viewer){ + if(get.attitude(viewer,target)>0&&target.countCards('h','sha')){ + if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0; + } + }, + basic:{ + order:9, + useful:[5,1], + value:5 + }, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nothunder')) return 0; + if(target.hasUnknown(2)) return 0; + var nh=target.countCards('h'); + if(lib.config.mode=='identity'){ + if(target.isZhu&&nh<=2&&target.hp<=1) return -100; + } + if(nh==0) return -2; + if(nh==1) return -1.7 + return -1.5; + }, + }, + tag:{ + respond:1, + respondSha:1, + damage:1, + natureDamage:1, + thunderDamage:1, + multitarget:1, + multineg:1, + } } - } + }, + chiyuxi:{ + fullskin:true, + type:'trick', + enable:true, + selectTarget:-1, + reverseOrder:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + "step 0" + var next=target.chooseToRespond({name:'shan'}); + next.ai=function(card){ + if(get.damageEffect(target,player,target,'fire')>=0) return 0; + if(player.hasSkillTag('notricksource')) return 0; + if(target.hasSkillTag('notrick')) return 0; + return 11-get.value(card); + }; + next.autochoose=lib.filter.autoRespondShan; + "step 1" + if(result.bool==false){ + target.damage('fire'); + } + }, + ai:{ + wuxie:function(target,card,player,viewer){ + if(get.attitude(viewer,target)>0&&target.countCards('h','shan')){ + if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0; + } + }, + basic:{ + order:9, + useful:1, + value:5 + }, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nofire')) return 0; + if(player.hasUnknown(2)) return 0; + var nh=target.countCards('h'); + if(lib.config.mode=='identity'){ + if(target.isZhu&&nh<=2&&target.hp<=1) return -100; + } + if(nh==0) return -2; + if(nh==1) return -1.7 + return -1.5; + }, + }, + tag:{ + respond:1, + respondShan:1, + damage:1, + natureDamage:1, + fireDamage:1, + multitarget:1, + multineg:1, + } + } + }, + guangshatianyi:{ + fullskin:true, + type:'equip', + subtype:'equip2', + skills:['guangshatianyi'], + ai:{ + basic:{ + equipValue:6 + } + } + }, + guilingzhitao:{ + type:'equip', + fullskin:true, + subtype:'equip5', + skills:['nigong'], + ai:{ + basic:{ + equipValue:function(card,player){ + if(!player.storage.nigong) return 5; + return 5+player.storage.nigong; + } + } + }, + equipDelay:false, + loseDelay:false, + onLose:function(){ + player.storage.nigong=0; + player.unmarkSkill('nigong'); + }, + onEquip:function(){ + player.storage.nigong=0; + player.markSkill('nigong'); + } + }, + qipoguyu:{ + type:'equip', + subtype:'equip5', + skills:['xujin'], + equipDelay:false, + loseDelay:false, + onLose:function(){ + player.storage.xujin=0; + }, + onEquip:function(){ + player.storage.xujin=0; + } + }, + sadengjinhuan:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['sadengjinhuan'], + ai:{ + basic:{ + equipValue:5.5 + } + }, + }, + sifeizhenmian:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['yiluan'], + ai:{ + basic:{ + equipValue:6 + } + }, + }, + shuchui:{ + fullskin:true, + type:'equip', + subtype:'equip5', + skills:['shuchui'], + ai:{ + basic:{ + equipValue:5.5 + } + }, + }, + ximohu:{ + type:'equip', + subtype:'equip5', + skills:['ximohu'], + ai:{ + basic:{ + equipValue:6 + } + }, + }, + guiyanfadao:{ + fullskin:true, + type:'equip', + subtype:'equip1', + distance:{attackFrom:-1}, + ai:{ + basic:{ + equipValue:3 + } + }, + skills:['guiyanfadao'] + }, }, - guiyoujie:{ - fullskin:true, - type:'delay', - filterTarget:function(card,player,target){ - return (lib.filter.judge(card,player,target)&&player!=target); - }, - judge:function(card){ - if(get.color(card)=='black') return -3; - return 0; - }, - effect:function(){ - if(result.bool==false){ - player.turnOver(); + skill:{ + zhiluxiaohu:{ + trigger:{source:'damageAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.getParent(3).name=='zhiluxiaohu'; + }, + content:function(){ player.draw(); } }, - ai:{ - basic:{ + zhufangshenshi:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(player.storage.zhufangshenshi==target) return true; + }, + }, + mark:true, + intro:{ + content:'player' + }, + onremove:true, + }, + _zhufangshenshi:{ + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card.name=='zhufangshenshi'; + }, + content:function(){ + player.draw(); + } + }, + huanpodan_skill:{ + mark:true, + intro:{ + content:'防止一次死亡,改为弃置所有牌,将体力值变为1并摸一张牌' + }, + trigger:{player:'dieBefore'}, + forced:true, + content:function(){ + 'step 0' + trigger.untrigger(); + trigger.finish(); + player.discard(player.getCards('he')); + player.removeSkill('huanpodan_skill'); + 'step 1' + player.changeHp(1-player.hp); + 'step 2' + player.draw(); + } + }, + dujian2:{}, + _yuchan_swap:{ + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + silent:true, + priority:-1, + content:function(){ + var hs=player.getCards('h'); + var list=['yuchanqian','yuchankun','yuchanzhen','yuchanxun','yuchangen','yuchanli','yuchankan','yuchandui']; + for(var i=0;i0; + } + } + return false; + }, + filterCard:{type:'basic'}, + selectCard:[1,Infinity], + prompt:'弃置任意张基本牌并摸等量的牌', + check:function(card){ + return 6-get.value(card) + }, + content:function(){ + player.draw(cards.length); + }, + ai:{ order:1, - useful:1, - value:6, - }, - result:{ - target:-3 - }, - } - }, - yufulu:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['touzhi'], - ai:{ - basic:{ - equipValue:5 - } - } - }, - xixueguizhihuan:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['xixue'], - ai:{ - basic:{ - equipValue:5 - } - } - }, - zhufangshenshi:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - player.storage.zhufangshenshi=target; - player.addTempSkill('zhufangshenshi','phaseAfter'); - }, - ai:{ - value:4, - wuxie:function(){ - return 0; - }, - useful:[2,1], - basic:{ - order:7, - }, - result:{ - player:function(player,target){ - if(get.attitude(player,target)<0){ - if(get.distance(player,target)>1) return 1; - return 0.6; - } - return 0.3; - } - } - }, - }, - jingleishan:{ - fullskin:true, - type:'trick', - enable:true, - selectTarget:-1, - reverseOrder:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - "step 0" - var next=target.chooseToRespond({name:'sha'}); - next.ai=function(card){ - if(get.damageEffect(target,player,target,'thunder')>=0) return 0; - if(player.hasSkillTag('notricksource')) return 0; - if(target.hasSkillTag('notrick')) return 0; - return 11-get.value(card); - }; - next.autochoose=lib.filter.autoRespondSha; - "step 1" - if(result.bool==false){ - target.damage('thunder'); - } - }, - ai:{ - wuxie:function(target,card,player,viewer){ - if(get.attitude(viewer,target)>0&&target.countCards('h','sha')){ - if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0; - } - }, - basic:{ - order:9, - useful:[5,1], - value:5 - }, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nothunder')) return 0; - if(target.hasUnknown(2)) return 0; - var nh=target.countCards('h'); - if(lib.config.mode=='identity'){ - if(target.isZhu&&nh<=2&&target.hp<=1) return -100; - } - if(nh==0) return -2; - if(nh==1) return -1.7 - return -1.5; + result:{ + player:1 }, }, - tag:{ - respond:1, - respondSha:1, - damage:1, - natureDamage:1, - thunderDamage:1, - multitarget:1, - multineg:1, - } - } - }, - chiyuxi:{ - fullskin:true, - type:'trick', - enable:true, - selectTarget:-1, - reverseOrder:true, - filterTarget:function(card,player,target){ - return target!=player; }, - content:function(){ - "step 0" - var next=target.chooseToRespond({name:'shan'}); - next.ai=function(card){ - if(get.damageEffect(target,player,target,'fire')>=0) return 0; - if(player.hasSkillTag('notricksource')) return 0; - if(target.hasSkillTag('notrick')) return 0; - return 11-get.value(card); - }; - next.autochoose=lib.filter.autoRespondShan; - "step 1" - if(result.bool==false){ - target.damage('fire'); - } - }, - ai:{ - wuxie:function(target,card,player,viewer){ - if(get.attitude(viewer,target)>0&&target.countCards('h','shan')){ - if(!target.countCards('h')||target.hp==1||Math.random()<0.7) return 0; - } - }, - basic:{ - order:9, - useful:1, - value:5 - }, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nofire')) return 0; - if(player.hasUnknown(2)) return 0; - var nh=target.countCards('h'); - if(lib.config.mode=='identity'){ - if(target.isZhu&&nh<=2&&target.hp<=1) return -100; + yuchanqian_equip1:{}, + yuchanqian_equip2:{}, + yuchanqian_equip3:{}, + yuchanqian_equip4:{}, + yuchanqian_equip5:{}, + yuchankun_equip1:{}, + yuchankun_equip2:{}, + yuchankun_equip3:{}, + yuchankun_equip4:{}, + yuchankun_equip5:{}, + yuchanzhen_equip1:{}, + yuchanzhen_equip2:{}, + yuchanzhen_equip3:{}, + yuchanzhen_equip4:{}, + yuchanzhen_equip5:{}, + yuchanxun_equip1:{}, + yuchanxun_equip2:{}, + yuchanxun_equip3:{}, + yuchanxun_equip4:{}, + yuchanxun_equip5:{}, + yuchankan_equip1:{}, + yuchankan_equip2:{}, + yuchankan_equip3:{}, + yuchankan_equip4:{}, + yuchankan_equip5:{}, + yuchanli_equip1:{}, + yuchanli_equip2:{}, + yuchanli_equip3:{}, + yuchanli_equip4:{}, + yuchanli_equip5:{}, + yuchangen_equip1:{}, + yuchangen_equip2:{}, + yuchangen_equip3:{}, + yuchangen_equip4:{}, + yuchangen_equip5:{}, + yuchandui_equip1:{}, + yuchandui_equip2:{}, + yuchandui_equip3:{}, + yuchandui_equip4:{}, + yuchandui_equip5:{}, + lianyaohu_skill:{ + mark:true, + intro:{ + content:function(storage,player){ + var card=player.getEquip('lianyaohu'); + if(card&&card.storage.shouna&&card.storage.shouna.length){ + return '共有'+get.cnNumber(card.storage.shouna.length)+'张牌'; } - if(nh==0) return -2; - if(nh==1) return -1.7 - return -1.5; + return '共有〇张牌'; }, - }, - tag:{ - respond:1, - respondShan:1, - damage:1, - natureDamage:1, - fireDamage:1, - multitarget:1, - multineg:1, - } - } - }, - guangshatianyi:{ - fullskin:true, - type:'equip', - subtype:'equip2', - skills:['guangshatianyi'], - ai:{ - basic:{ - equipValue:6 - } - } - }, - guilingzhitao:{ - type:'equip', - fullskin:true, - subtype:'equip5', - skills:['nigong'], - ai:{ - basic:{ - equipValue:function(card,player){ - if(!player.storage.nigong) return 5; - return 5+player.storage.nigong; + mark:function(dialog,storage,player){ + var card=player.getEquip('lianyaohu'); + if(card&&card.storage.shouna&&card.storage.shouna.length){ + dialog.addAuto(card.storage.shouna); + } + else{ + return '共有〇张牌'; + } + }, + markcount:function(storage,player){ + var card=player.getEquip('lianyaohu'); + if(card&&card.storage.shouna) return card.storage.shouna.length; + return 0; } } }, - equipDelay:false, - loseDelay:false, - onLose:function(){ - player.storage.nigong=0; - player.unmarkSkill('nigong'); - }, - onEquip:function(){ - player.storage.nigong=0; - player.markSkill('nigong'); - } - }, - qipoguyu:{ - type:'equip', - subtype:'equip5', - skills:['xujin'], - equipDelay:false, - loseDelay:false, - onLose:function(){ - player.storage.xujin=0; - }, - onEquip:function(){ - player.storage.xujin=0; - } - }, - sadengjinhuan:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['sadengjinhuan'], - ai:{ - basic:{ - equipValue:5.5 - } - }, - }, - sifeizhenmian:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['yiluan'], - ai:{ - basic:{ - equipValue:6 - } - }, - }, - shuchui:{ - fullskin:true, - type:'equip', - subtype:'equip5', - skills:['shuchui'], - ai:{ - basic:{ - equipValue:5.5 - } - }, - }, - ximohu:{ - type:'equip', - subtype:'equip5', - skills:['ximohu'], - ai:{ - basic:{ - equipValue:6 - } - }, - }, - guiyanfadao:{ - fullskin:true, - type:'equip', - subtype:'equip1', - distance:{attackFrom:-1}, - ai:{ - basic:{ - equipValue:3 - } - }, - skills:['guiyanfadao'] - }, - }, - skill:{ - zhiluxiaohu:{ - trigger:{source:'damageAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.getParent(3).name=='zhiluxiaohu'; - }, - content:function(){ - player.draw(); - } - }, - zhufangshenshi:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(player.storage.zhufangshenshi==target) return true; + _shencaojie:{ + trigger:{source:'damageBegin'}, + direct:true, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(player.hasCard('shencaojie')) return true; + return false; }, + content:function(){ + player.chooseToUse(get.prompt('shencaojie',trigger.player).replace(/发动/,'使用'),function(card,player){ + if(card.name!='shencaojie') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + },trigger.player,-1).targetRequired=true; + } }, - mark:true, - intro:{ - content:'player' + _shenmiguo:{ + trigger:{player:'useCardAfter'}, + direct:true, + filter:function(event,player){ + if(event.parent.name=='_shenmiguo') return false; + if(_status.currentPhase!=player) return false; + if(event.parent.parent.name!='phaseUse') return false; + if(!event.targets||!event.card) return false; + if(event.card.name=='shenmiguo') return false; + if(event.card.name=='yuchankan') return false; + if(player.hasSkill('shenmiguo2')) return false; + if(get.info(event.card).complexTarget) return false; + if(!lib.filter.cardEnabled(event.card,player,event.parent)) return false; + var type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); + var targets=event._targets||event.targets; + for(var i=0;i1; + }, + content:function(){ + var value=get.value(ui.cardPile.firstChild); + var num=Math.min(20,ui.cardPile.childElementCount); + var list=[],list2=[],list3=[]; + for(var i=1;ivalue){ + list.push(ui.cardPile.childNodes[i]); + if(val>value+1&&val>=7){ + list2.push(ui.cardPile.childNodes[i]); + } + if(val>value+1&&val>=8){ + list3.push(ui.cardPile.childNodes[i]); + } + } + } + var card; + if(list3.length){ + card=list3.randomGet(); + } + else if(list2.length){ + card=list2.randomGet(); + } + else if(list.length){ + card=list.randomGet(); + } + if(card){ + ui.cardPile.insertBefore(card,ui.cardPile.firstChild); } } - } - }, - _yuchan_equip:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - var skills=player.getSkills(); - for(var i=0;i0; - } - } - return false; }, - filterCard:{type:'basic'}, - selectCard:[1,Infinity], - prompt:'弃置任意张基本牌并摸等量的牌', - check:function(card){ - return 6-get.value(card) - }, - content:function(){ - player.draw(cards.length); - }, - ai:{ - order:1, - result:{ - player:1 + shuchui:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canUse('sha',target); }, - }, - }, - yuchanqian_equip1:{}, - yuchanqian_equip2:{}, - yuchanqian_equip3:{}, - yuchanqian_equip4:{}, - yuchanqian_equip5:{}, - yuchankun_equip1:{}, - yuchankun_equip2:{}, - yuchankun_equip3:{}, - yuchankun_equip4:{}, - yuchankun_equip5:{}, - yuchanzhen_equip1:{}, - yuchanzhen_equip2:{}, - yuchanzhen_equip3:{}, - yuchanzhen_equip4:{}, - yuchanzhen_equip5:{}, - yuchanxun_equip1:{}, - yuchanxun_equip2:{}, - yuchanxun_equip3:{}, - yuchanxun_equip4:{}, - yuchanxun_equip5:{}, - yuchankan_equip1:{}, - yuchankan_equip2:{}, - yuchankan_equip3:{}, - yuchankan_equip4:{}, - yuchankan_equip5:{}, - yuchanli_equip1:{}, - yuchanli_equip2:{}, - yuchanli_equip3:{}, - yuchanli_equip4:{}, - yuchanli_equip5:{}, - yuchangen_equip1:{}, - yuchangen_equip2:{}, - yuchangen_equip3:{}, - yuchangen_equip4:{}, - yuchangen_equip5:{}, - yuchandui_equip1:{}, - yuchandui_equip2:{}, - yuchandui_equip3:{}, - yuchandui_equip4:{}, - yuchandui_equip5:{}, - lianyaohu_skill:{ - mark:true, - intro:{ - content:function(storage,player){ - var card=player.getEquip('lianyaohu'); - if(card&&card.storage.shouna&&card.storage.shouna.length){ - return '共有'+get.cnNumber(card.storage.shouna.length)+'张牌'; - } - return '共有〇张牌'; + filter:function(event,player){ + return player.countCards('h','sha')>0&&lib.filter.cardUsable({name:'sha'},player); }, - mark:function(dialog,storage,player){ - var card=player.getEquip('lianyaohu'); - if(card&&card.storage.shouna&&card.storage.shouna.length){ - dialog.addAuto(card.storage.shouna); + content:function(){ + 'step 0' + player.addSkill('shuchui2'); + player.storage.shuchui2=false; + event.num=0; + 'step 1' + var card=player.getCards('h','sha')[0]; + if(card){ + player.useCard(card,target); } else{ - return '共有〇张牌'; + if(player.storage.shuchui2){ + player.draw(); + } + player.removeSkill('shuchui2'); + event.finish(); + } + 'step 2' + if(event.num++<2&&target.isAlive()){ + event.goto(1); + } + else{ + if(player.storage.shuchui2){ + player.draw(); + } + player.removeSkill('shuchui2'); } }, - markcount:function(storage,player){ - var card=player.getEquip('lianyaohu'); - if(card&&card.storage.shouna) return card.storage.shouna.length; - return 0; - } - } - }, - _shencaojie:{ - trigger:{source:'damageBegin'}, - direct:true, - filter:function(event,player){ - if(get.type(event.card)!='trick') return false; - if(player.hasCard('shencaojie')) return true; - return false; - }, - content:function(){ - player.chooseToUse(get.prompt('shencaojie',trigger.player).replace(/发动/,'使用'),function(card,player){ - if(card.name!='shencaojie') return false; - return lib.filter.cardEnabled(card,player,'forceEnable'); - },trigger.player,-1).targetRequired=true; - } - }, - _shenmiguo:{ - trigger:{player:'useCardAfter'}, - direct:true, - filter:function(event,player){ - if(event.parent.name=='_shenmiguo') return false; - if(_status.currentPhase!=player) return false; - if(event.parent.parent.name!='phaseUse') return false; - if(!event.targets||!event.card) return false; - if(event.card.name=='shenmiguo') return false; - if(event.card.name=='yuchankan') return false; - if(player.hasSkill('shenmiguo2')) return false; - if(get.info(event.card).complexTarget) return false; - if(!lib.filter.cardEnabled(event.card,player,event.parent)) return false; - var type=get.type(event.card); - if(type!='basic'&&type!='trick') return false; - var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); - var targets=event._targets||event.targets; - for(var i=0;i1; - }, - content:function(){ - var value=get.value(ui.cardPile.firstChild); - var num=Math.min(20,ui.cardPile.childElementCount); - var list=[],list2=[],list3=[]; - for(var i=1;ivalue){ - list.push(ui.cardPile.childNodes[i]); - if(val>value+1&&val>=7){ - list2.push(ui.cardPile.childNodes[i]); - } - if(val>value+1&&val>=8){ - list3.push(ui.cardPile.childNodes[i]); + ai:{ + order:function(){ + return get.order({name:'sha'})+0.11; + }, + result:{ + target:function(player,target){ + return get.effect(target,{name:'sha'},player,target); } } } - var card; - if(list3.length){ - card=list3.randomGet(); - } - else if(list2.length){ - card=list2.randomGet(); - } - else if(list.length){ - card=list.randomGet(); - } - if(card){ - ui.cardPile.insertBefore(card,ui.cardPile.firstChild); - } - } - }, - shuchui:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player.canUse('sha',target); }, - filter:function(event,player){ - return player.countCards('h','sha')>0&&lib.filter.cardUsable({name:'sha'},player); - }, - content:function(){ - 'step 0' - player.addSkill('shuchui2'); - player.storage.shuchui2=false; - event.num=0; - 'step 1' - var card=player.getCards('h','sha')[0]; - if(card){ - player.useCard(card,target); + shuchui2:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + onremove:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&!player.storage.shuchui2; + }, + content:function(){ + player.storage.shuchui2=true; } - else{ - if(player.storage.shuchui2){ - player.draw(); + }, + xuejibingbao:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + mark:true, + temp:true, + intro:{ + content:'摸牌阶段摸牌数+1' + }, + nopop:true, + content:function(){ + trigger.num++; + player.storage.xuejibingbao--; + if(player.storage.xuejibingbao<=0){ + player.removeSkill('xuejibingbao'); + delete player.storage.xuejibingbao; } - player.removeSkill('shuchui2'); - event.finish(); - } - 'step 2' - if(event.num++<2&&target.isAlive()){ - event.goto(1); - } - else{ - if(player.storage.shuchui2){ - player.draw(); - } - player.removeSkill('shuchui2'); - } - }, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.11; - }, - result:{ - target:function(player,target){ - return get.effect(target,{name:'sha'},player,target); + else{ + player.updateMarks(); } } - } - }, - shuchui2:{ - trigger:{source:'damageEnd'}, - forced:true, - popup:false, - onremove:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&!player.storage.shuchui2; }, - content:function(){ - player.storage.shuchui2=true; - } - }, - xuejibingbao:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - mark:true, - temp:true, - intro:{ - content:'摸牌阶段摸牌数+1' - }, - nopop:true, - content:function(){ - trigger.num++; - player.storage.xuejibingbao--; - if(player.storage.xuejibingbao<=0){ - player.removeSkill('xuejibingbao'); - delete player.storage.xuejibingbao; - } - else{ - player.updateMarks(); - } - } - }, - gouhunluo:{ - mark:true, - intro:{ - content:function(storage,player){ - if(storage==1){ - '在'+get.translation(player.storage.gouhunluo2)+'的下个准备阶段失去一点体力并弃置所有手牌' + gouhunluo:{ + mark:true, + intro:{ + content:function(storage,player){ + if(storage==1){ + '在'+get.translation(player.storage.gouhunluo2)+'的下个准备阶段失去一点体力并弃置所有手牌' + } + return '在'+storage+'轮后'+get.translation(player.storage.gouhunluo2)+'的准备阶段失去一点体力并弃置所有手牌' } - return '在'+storage+'轮后'+get.translation(player.storage.gouhunluo2)+'的准备阶段失去一点体力并弃置所有手牌' - } + }, + nopop:true, + temp:true, + trigger:{global:'phaseBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.gouhunluo2==event.player; + }, + content:function(){ + 'step 0' + player.storage.gouhunluo--; + if(player.storage.gouhunluo<=0){ + player.logSkill('gouhunluo'); + player.loseHp(); + player.removeSkill('gouhunluo'); + delete player.storage.gouhunluo; + delete player.storage.gouhunluo2; + } + else{ + player.updateMarks(); + event.finish(); + } + 'step 1' + var es=player.getCards('h'); + if(es.length){ + player.discard(es); + } + }, + group:'gouhunluo2' }, - nopop:true, - temp:true, - trigger:{global:'phaseBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.gouhunluo2==event.player; - }, - content:function(){ - 'step 0' - player.storage.gouhunluo--; - if(player.storage.gouhunluo<=0){ - player.logSkill('gouhunluo'); - player.loseHp(); + gouhunluo2:{ + trigger:{global:'dieBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.gouhunluo2==event.player; + }, + content:function(){ player.removeSkill('gouhunluo'); delete player.storage.gouhunluo; delete player.storage.gouhunluo2; } - else{ - player.updateMarks(); - event.finish(); - } - 'step 1' - var es=player.getCards('h'); - if(es.length){ - player.discard(es); + }, + jiguanyuan:{ + mark:'card', + intro:{ + content:'cards' + }, + trigger:{player:'phaseEnd'}, + forced:true, + temp:true, + popup:false, + content:function(){ + player.gain(player.storage.jiguanyuan,'gain2'); + player.removeSkill('jiguanyuan'); + delete player.storage.jiguanyuan; } }, - group:'gouhunluo2' - }, - gouhunluo2:{ - trigger:{global:'dieBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.gouhunluo2==event.player; - }, - content:function(){ - player.removeSkill('gouhunluo'); - delete player.storage.gouhunluo; - delete player.storage.gouhunluo2; - } - }, - jiguanyuan:{ - mark:'card', - intro:{ - content:'cards' - }, - trigger:{player:'phaseEnd'}, - forced:true, - temp:true, - popup:false, - content:function(){ - player.gain(player.storage.jiguanyuan,'gain2'); - player.removeSkill('jiguanyuan'); - delete player.storage.jiguanyuan; - } - }, - _qinglongzhigui:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.countCards('h','qinglongzhigui')>0; - }, - content:function(){ - 'step 0' - player.showCards(get.translation(player)+'发动了【青龙之圭】',player.getCards('h','qinglongzhigui')); - player.draw(2); - 'step 1' - player.chooseToDiscard('he',true); - } - }, - _baishouzhihu:{ - trigger:{player:'discardEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('h','baishouzhihu')>0; - }, - content:function(){ - "step 0" - player.chooseTarget([1,1],get.prompt('baishouzhihu'),function(card,player,target){ - if(player==target) return false; - return target.countCards('he')>0; - }).ai=function(target){ - return -get.attitude(player,target); - }; - "step 1" - if(result.bool){ - player.showCards(get.translation(player)+'发动了【白兽之琥】',player.getCards('h','baishouzhihu')); - player.logSkill('_baishouzhihu',result.targets); - player.discardPlayerCard(result.targets[0],'he',true); - } - else{ - event.finish(); + _qinglongzhigui:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.countCards('h','qinglongzhigui')>0; + }, + content:function(){ + 'step 0' + player.showCards(get.translation(player)+'发动了【青龙之圭】',player.getCards('h','qinglongzhigui')); + player.draw(2); + 'step 1' + player.chooseToDiscard('he',true); } }, - }, - _zhuquezhizhang:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event,player){ - return event.source&&event.source!=player&&event.source.isAlive()&&player.countCards('h','zhuquezhizhang')>0; - }, - logTarget:'source', - check:function(event,player){ - return get.damageEffect(event.source,player,player,'fire')>0; - }, - content:function(){ - 'step 0' - player.showCards(get.translation(player)+'发动了【朱雀之璋】',player.getCards('h','zhuquezhizhang')); - trigger.source.damage('fire'); - 'step 1' - game.delay(); - } - }, - _xuanwuzhihuang:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event,player){ - return player.countCards('h','xuanwuzhihuang')>0&&event.num>0&&player.hp0; - }, - content:function(){ - player.showCards(get.translation(player)+'发动了【黄麟之琮】',player.getCards('h','huanglinzhicong')); - player.changeHujia(); - player.update(); - }, - }, - _cangchizhibi:{ - trigger:{player:'phaseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h','cangchizhibi')>0; - }, - content:function(){ - 'step 0' - player.chooseTarget([1,3],get.prompt('cangchizhibi')).ai=function(target){ - var att=get.attitude(player,target); - if(target.isLinked()){ - return att; + _baishouzhihu:{ + trigger:{player:'discardEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('h','baishouzhihu')>0; + }, + content:function(){ + "step 0" + player.chooseTarget([1,1],get.prompt('baishouzhihu'),function(card,player,target){ + if(player==target) return false; + return target.countCards('he')>0; + }).ai=function(target){ + return -get.attitude(player,target); + }; + "step 1" + if(result.bool){ + player.showCards(get.translation(player)+'发动了【白兽之琥】',player.getCards('h','baishouzhihu')); + player.logSkill('_baishouzhihu',result.targets); + player.discardPlayerCard(result.targets[0],'he',true); } - return -att; - }; - 'step 1' - if(result.bool){ - player.showCards(get.translation(player)+'发动了【苍螭之璧】',player.getCards('h','cangchizhibi')); - player.logSkill('_cangchizhibi',result.targets); - for(var i=0;i0&&player.hujia==0 + }, }, - content:function(){ - 'step 0' - var next=player.chooseToDiscard('he',{color:'black'},get.prompt('huanglinzhicong_duanzao')); - next.ai=function(card){ - return 8-get.value(card); - }; - next.logSkill='huanglinzhicong_equip1' - 'step 1' - if(result.bool){ + _zhuquezhizhang:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.source&&event.source!=player&&event.source.isAlive()&&player.countCards('h','zhuquezhizhang')>0; + }, + logTarget:'source', + check:function(event,player){ + return get.damageEffect(event.source,player,player,'fire')>0; + }, + content:function(){ + 'step 0' + player.showCards(get.translation(player)+'发动了【朱雀之璋】',player.getCards('h','zhuquezhizhang')); + trigger.source.damage('fire'); + 'step 1' + game.delay(); + } + }, + _xuanwuzhihuang:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return player.countCards('h','xuanwuzhihuang')>0&&event.num>0&&player.hp0; + }, + content:function(){ + player.showCards(get.translation(player)+'发动了【黄麟之琮】',player.getCards('h','huanglinzhicong')); player.changeHujia(); - } - } - }, - huanglinzhicong_equip2:{ - inherit:'huanglinzhicong_equip1' - }, - huanglinzhicong_equip3:{ - inherit:'huanglinzhicong_equip1' - }, - huanglinzhicong_equip4:{ - inherit:'huanglinzhicong_equip1' - }, - huanglinzhicong_equip5:{ - inherit:'huanglinzhicong_equip1' - }, - xuanwuzhihuang_equip1:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0&&player.hp0; - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - position:'he', - filterTarget:function(card,player,target){ - return player!=target&&target.hp>=player.hp; - }, - filterCard:function(card,player){ - return get.color(card)=='red'&&lib.filter.cardDiscardable(card,player); - }, - ai1:function(card){ - return 9-get.value(card); - }, - ai2:function(target){ - return get.damageEffect(target,player,player,'fire'); - }, - prompt:get.prompt('zhuquezhizhang_duanzao') - }); - "step 1" - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('zhuquezhizhang_equip1',event.target,'fire'); - player.discard(result.cards); - } - else{ - event.finish(); - } - "step 2" - if(event.target){ - event.target.damage('fire'); - } - }, - }, - zhuquezhizhang_equip2:{ - inherit:'zhuquezhizhang_equip1' - }, - zhuquezhizhang_equip3:{ - inherit:'zhuquezhizhang_equip1' - }, - zhuquezhizhang_equip4:{ - inherit:'zhuquezhizhang_equip1' - }, - zhuquezhizhang_equip5:{ - inherit:'zhuquezhizhang_equip1' - }, - baishouzhihu_equip1:{ - trigger:{player:'phaseEnd'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget([1,1],get.prompt('baishouzhihu_duanzao'),function(card,player,target){ - if(player==target) return false; - return target.countCards('he')>0; - }).ai=function(target){ - return -get.attitude(player,target); - }; - "step 1" - if(result.bool){ - player.logSkill('baishouzhihu_equip1',result.targets); - player.discardPlayerCard(result.targets[0],'he',true); - } - else{ - event.finish(); - } - }, - }, - baishouzhihu_equip2:{ - inherit:'baishouzhihu_equip1' - }, - baishouzhihu_equip3:{ - inherit:'baishouzhihu_equip1' - }, - baishouzhihu_equip4:{ - inherit:'baishouzhihu_equip1' - }, - baishouzhihu_equip5:{ - inherit:'baishouzhihu_equip1' - }, - qinglongzhigui_equip1:{ - trigger:{player:'phaseEnd'}, - forced:true, - content:function(){ - player.draw(); - } - }, - qinglongzhigui_equip2:{ - inherit:'qinglongzhigui_equip1' - }, - qinglongzhigui_equip3:{ - inherit:'qinglongzhigui_equip1' - }, - qinglongzhigui_equip4:{ - inherit:'qinglongzhigui_equip1' - }, - qinglongzhigui_equip5:{ - inherit:'qinglongzhigui_equip1' - }, - kunlunjingc:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - delay:false, - content:function(){ - 'step 0' - var cards=get.cards(3); - event.cards=cards; - player.chooseCardButton('选择一张牌',cards,true); - 'step 1' - event.card=result.links[0]; - player.chooseCard('h',true,'用一张手牌替换'+get.translation(event.card)); - 'step 2' - if(result.bool){ - event.cards[event.cards.indexOf(event.card)]=result.cards[0]; - player.lose(result.cards,ui.special); - var cardx=ui.create.card(); - cardx.classList.add('infohidden'); - cardx.classList.add('infoflip'); - player.$throw(cardx,1000,'nobroadcast'); - } - else{ - event.finish(); - } - 'step 3' - player.gain(event.card); - player.$draw(); - for(var i=event.cards.length-1;i>=0;i--){ - event.cards[i].fix(); - ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); - } - game.delay(); - }, - ai:{ - order:10, - result:{ - player:1 - } - } - }, - lianhua:{ - enable:'phaseUse', - filter:function(event,player){ - var hu=player.getEquip('lianyaohu'); - if(hu&&hu.storage.shouna&&hu.storage.shouna.length>1){ - return true; - } - return false; - }, - usable:1, - delay:false, - content:function(){ - "step 0" - event.hu=player.getEquip('lianyaohu'); - player.chooseCardButton('弃置两张壶中的牌,然后从牌堆中获得一张类别不同的牌',2,event.hu.storage.shouna).ai=function(){ - return 1; - } - "step 1" - if(result.bool){ - var type=[]; - player.$throw(result.links); - game.log(player,'弃置了',result.links); - for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseTarget([1,3],get.prompt('cangchizhibi')).ai=function(target){ + var att=get.attitude(player,target); + if(target.isLinked()){ + return att; + } + return -att; + }; + 'step 1' + if(result.bool){ + player.showCards(get.translation(player)+'发动了【苍螭之璧】',player.getCards('h','cangchizhibi')); + player.logSkill('_cangchizhibi',result.targets); + for(var i=0;i0&&player.hujia==0 + }, + content:function(){ + 'step 0' + var next=player.chooseToDiscard('he',{color:'black'},get.prompt('huanglinzhicong_duanzao')); + next.ai=function(card){ + return 8-get.value(card); + }; + next.logSkill='huanglinzhicong_equip1' + 'step 1' + if(result.bool){ + player.changeHujia(); + } + } + }, + huanglinzhicong_equip2:{ + inherit:'huanglinzhicong_equip1' + }, + huanglinzhicong_equip3:{ + inherit:'huanglinzhicong_equip1' + }, + huanglinzhicong_equip4:{ + inherit:'huanglinzhicong_equip1' + }, + huanglinzhicong_equip5:{ + inherit:'huanglinzhicong_equip1' + }, + xuanwuzhihuang_equip1:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0&&player.hp0; + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + position:'he', + filterTarget:function(card,player,target){ + return player!=target&&target.hp>=player.hp; + }, + filterCard:function(card,player){ + return get.color(card)=='red'&&lib.filter.cardDiscardable(card,player); + }, + ai1:function(card){ + return 9-get.value(card); + }, + ai2:function(target){ + return get.damageEffect(target,player,player,'fire'); + }, + prompt:get.prompt('zhuquezhizhang_duanzao') + }); + "step 1" + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('zhuquezhizhang_equip1',event.target,'fire'); + player.discard(result.cards); + } + else{ + event.finish(); + } + "step 2" + if(event.target){ + event.target.damage('fire'); + } + }, + }, + zhuquezhizhang_equip2:{ + inherit:'zhuquezhizhang_equip1' + }, + zhuquezhizhang_equip3:{ + inherit:'zhuquezhizhang_equip1' + }, + zhuquezhizhang_equip4:{ + inherit:'zhuquezhizhang_equip1' + }, + zhuquezhizhang_equip5:{ + inherit:'zhuquezhizhang_equip1' + }, + baishouzhihu_equip1:{ + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget([1,1],get.prompt('baishouzhihu_duanzao'),function(card,player,target){ + if(player==target) return false; + return target.countCards('he')>0; + }).ai=function(target){ + return -get.attitude(player,target); + }; + "step 1" + if(result.bool){ + player.logSkill('baishouzhihu_equip1',result.targets); + player.discardPlayerCard(result.targets[0],'he',true); + } + else{ + event.finish(); + } + }, + }, + baishouzhihu_equip2:{ + inherit:'baishouzhihu_equip1' + }, + baishouzhihu_equip3:{ + inherit:'baishouzhihu_equip1' + }, + baishouzhihu_equip4:{ + inherit:'baishouzhihu_equip1' + }, + baishouzhihu_equip5:{ + inherit:'baishouzhihu_equip1' + }, + qinglongzhigui_equip1:{ + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + player.draw(); + } + }, + qinglongzhigui_equip2:{ + inherit:'qinglongzhigui_equip1' + }, + qinglongzhigui_equip3:{ + inherit:'qinglongzhigui_equip1' + }, + qinglongzhigui_equip4:{ + inherit:'qinglongzhigui_equip1' + }, + qinglongzhigui_equip5:{ + inherit:'qinglongzhigui_equip1' + }, + kunlunjingc:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + delay:false, + content:function(){ + 'step 0' + var cards=get.cards(3); + event.cards=cards; + player.chooseCardButton('选择一张牌',cards,true); + 'step 1' + event.card=result.links[0]; + player.chooseCard('h',true,'用一张手牌替换'+get.translation(event.card)); + 'step 2' + if(result.bool){ + event.cards[event.cards.indexOf(event.card)]=result.cards[0]; + player.lose(result.cards,ui.special); + var cardx=ui.create.card(); + cardx.classList.add('infohidden'); + cardx.classList.add('infoflip'); + player.$throw(cardx,1000,'nobroadcast'); + } + else{ + event.finish(); + } + 'step 3' + player.gain(event.card); + player.$draw(); + for(var i=event.cards.length-1;i>=0;i--){ + event.cards[i].fix(); + ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); + } + game.delay(); + }, + ai:{ + order:10, + result:{ + player:1 + } + } + }, + lianhua:{ + enable:'phaseUse', + filter:function(event,player){ + var hu=player.getEquip('lianyaohu'); + if(hu&&hu.storage.shouna&&hu.storage.shouna.length>1){ + return true; + } + return false; + }, + usable:1, + delay:false, + content:function(){ + "step 0" + event.hu=player.getEquip('lianyaohu'); + player.chooseCardButton('弃置两张壶中的牌,然后从牌堆中获得一张类别不同的牌',2,event.hu.storage.shouna).ai=function(){ + return 1; + } + "step 1" + if(result.bool){ + var type=[]; + player.$throw(result.links); + game.log(player,'弃置了',result.links); + for(var i=0;i0; + }, + usable:1, + filterCard:true, + check:function(card){ + return 6-get.value(card); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + var card=target.getCards('h').randomGet(); + var hu=player.getEquip('lianyaohu'); + if(card&&hu){ + if(!hu.storage.shouna){ + hu.storage.shouna=[]; + } + target.$give(card,player); + target.lose(card,ui.special); + hu.storage.shouna.push(card); + player.updateMarks(); + } + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + return -1/Math.sqrt(1+target.countCards('h')); + } + } + } + }, + shouna_old:{ + trigger:{global:'discardAfter'}, + filter:function(event,player){ + if(player.hasSkill('shouna2')) return false; + if(_status.currentPhase==event.player) return false; + if(event.player==player) return false; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterTarget:true, + filterCard:lib.filter.cardDiscardable, + ai1:function(card){ + return 8-get.useful(card); + }, + ai2:function(target){ + return -get.attitude(player,target); + }, + prompt:get.prompt('donghuangzhong') + }); + 'step 1' + if(result.bool){ + player.logSkill('donghuangzhong',result.targets); + player.discard(result.cards); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + var target=event.target; + var list=[]; + for(var i=0;i0; + }, + content:function(){ + trigger.player.chooseToDiscard(true,'he'); + } + }, + shouhua:{ + mode:['identity','infinity'], + enable:'phaseUse', + filter:function(event,player){ + return player==game.me; + }, + usable:1, + filterTarget:function(card,player,target){ + return target!=game.zhu&&target!=game.me&&target.hp0){ + return 1+trigger.judge(button.link); + } + if(get.attitude(player,trigger.player)<0){ + return 1-trigger.judge(button.link); + } + return 0; + }; + "step 1" + if(!result.bool){ + event.finish(); + return; + } + player.logSkill('haotianta',trigger.player); + var card=result.links[0]; + event.cards.remove(card); + var judgestr=get.translation(trigger.player)+'的'+trigger.judgestr+'判定'; + event.videoId=lib.status.videoId++; + event.dialog=ui.create.dialog(judgestr); + event.dialog.classList.add('center'); + event.dialog.videoId=event.videoId; + + game.addVideo('judge1',player,[get.cardInfo(card),judgestr,event.videoId]); + for(var i=0;i0){ + trigger.result.bool=true; + trigger.player.popup('洗具'); + } + if(trigger.result.judge<0){ + trigger.result.bool=false; + trigger.player.popup('杯具'); + } + game.log(trigger.player,'的判定结果为',card); + trigger.direct=true; + trigger.position.appendChild(card); + game.delay(2); + } + else{ + event.finish(); + } + "step 2" + ui.arena.classList.remove('thrownhighlight'); + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + ui.clear(); + var card=trigger.result.card; + trigger.position.appendChild(card); + trigger.result.node.delete(); + game.delay(); + }, + ai:{ + tag:{ + rejudge:1 + } + } + }, + shennongding:{ + enable:'phaseUse', + usable:1, + filterCard:true, + selectCard:2, + check:function(card){ + if(get.tag(card,'recover')>=1) return 0; + return 7-get.value(card); + }, + filter:function(event,player){ + return player.hp=2; + }, + content:function(){ + player.recover(); + }, + ai:{ + result:{ + player:function(player){ + return get.recoverEffect(player); + } + }, + order:2.5 + } + }, + kongdongyin:{ + trigger:{player:'dieBefore'}, + forced:true, + filter:function(event,player){ + return player.maxHp>0; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + player.hp=1; + player.draw(); + player.discard(player.getCards('e',{subtype:'equip5'})); + game.delay(); + } + }, + + nvwashi:{ + trigger:{global:'dying'}, + priority:6, + filter:function(event,player){ + return event.player.hp<=0&&player.hp>1; + }, + check:function(event,player){ + return get.attitude(player,event.player)>=3; + }, + logTarget:'player', + content:function(){ + "step 0" + trigger.player.recover(); + "step 1" + player.loseHp(); + }, + ai:{ + threaten:1.2, + expose:0.2 + } + }, + kongxin:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h'); + }, + filter:function(event,player){ + return player.countCards('h')?true:false; + }, + content:function(){ + "step 0" + player.chooseToCompare(target); + "step 1" + if(result.bool){ + event.bool=true; + player.chooseTarget('选择一个目标视为'+get.translation(target)+'对其使用一张杀',function(card,player,target2){ + return player!=target2&&target.canUse('sha',target2); + }).ai=function(target2){ + return get.effect(target2,{name:'sha'},target,player); + } + } + else{ + target.discardPlayerCard(player); + } + "step 2" + if(event.bool&&result.bool){ + target.useCard({name:'sha'},result.targets); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(player.countCards('h')<=1) return 0; + if(get.attitude(player,target)>=0) return 0; + if(game.hasPlayer(function(current){ + return (player!=current&&target.canUse('sha',current)&& + get.effect(current,{name:'sha'},target,player)>0) + })){ + return -1; + } + return 0; + } + } + } + }, + kongxin2:{ + trigger:{player:'dying'}, + priority:10, + forced:true, + popup:false, + filter:function(event,player){ + return player==game.me; + }, + content:function(){ + player.removeSkill('kongxin2'); + game.swapPlayer(player); + player.storage.kongxin.lockOut=false; + player.storage.kongxin.out(); + if(player==game.me) game.swapPlayer(player.storage.kongxin); + if(lib.config.mode=='identity') player.storage.kongxin.setIdentity(); + delete player.storage.kongxin; + }, + }, + lianyao_hujia:{ + mode:['identity','guozhan'], + enable:'phaseUse', + usable:1, + filter:function(event,player){ + if(player!=game.me) return false; + var card=player.getEquip('lianyaohu'); + if(card.storage.shouhua&&card.storage.shouhua.length) return true; + return false; + }, + content:function(){ + "step 0" + var list=[]; + var card=player.getEquip('lianyaohu'); + for(var i=0;i0; + }, + filterTarget:function(card,player,target){ + return target.countCards('he')>0; + }, + check:function(card){ + return 5-get.value(card); + }, + content:function(){ + target.discard(target.getCards('he').randomGet()); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + var dh=player.countCards('he')-target.countCards('he'); + if(dh>0){ + return -Math.sqrt(dh); + } + return 0; + } + } + } + }, + hslingjian_zhongxinghujia_equip1:{ + trigger:{source:'damageEnd'}, + check:function(event,player){ + return !player.getEquip(2); + }, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + var card=game.createCard(get.inpile('equip2').randomGet()); + player.equip(card); + player.$draw(card); + game.delay(); + } + }, + hslingjian_zhongxinghujia_equip2:{ + trigger:{player:'damageEnd'}, + check:function(event,player){ + return get.attitude(player,event.source)<0; + }, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.source&&event.source.getEquip(2); + }, + content:function(){ + player.line(trigger.source,'green'); + trigger.source.discard(trigger.source.getEquip(2)); + } + }, + hslingjian_zhongxinghujia_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.getEquip(2)) return distance+1; + } + } + }, + hslingjian_zhongxinghujia_equip4:{ + mod:{ + globalFrom:function(from,to,distance){ + if(from.getEquip(2)) return distance-1; + } + } + }, + hslingjian_zhongxinghujia_equip5:{ + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + filterTarget:true, + selectCard:2, + filter:function(event,player){ + return player.countCards('he')>=2; + }, + check:function(card){ + return 5-get.value(card); + }, + content:function(){ + var card=game.createCard(get.inpile('equip2').randomGet()); + target.equip(card); + target.$draw(card); + game.delay(); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(target.getEquip(2)) return 0; + return 1; + } + } + } + }, + hslingjian_jinjilengdong_equip1:{ + trigger:{source:'damageEnd'}, + check:function(event,player){ + if(event.player.isTurnedOver()){ + return get.attitude(player,event.player)>0; + } + return get.attitude(player,event.player)<=0; + }, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive(); + }, + logTarget:'player', + content:function(){ + trigger.player.draw(2); + trigger.player.turnOver(); + } + }, + hslingjian_jinjilengdong_equip2:{ + trigger:{player:'damageEnd'}, + check:function(event,player){ + if(event.player.isTurnedOver()){ + return get.attitude(player,event.source)>0; + } + return get.attitude(player,event.source)<=0; + }, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.source&&event.source.isAlive(); + }, + logTarget:'source', + content:function(){ + player.line(trigger.source,'green'); + trigger.source.draw(2); + trigger.source.turnOver(); + } + }, + hslingjian_jinjilengdong_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.isTurnedOver()) return distance+2; + } + } + }, + hslingjian_jinjilengdong_equip4:{ + mod:{ + globalFrom:function(from,to,distance){ + if(from.isTurnedOver()) return distance-2; + } + } + }, + hslingjian_jinjilengdong_equip5:{ + trigger:{player:'phaseAfter'}, + direct:true, + filter:function(event,player){ + return !player.isTurnedOver(); + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('hslingjian_jinjilengdong_duanzao'),function(card,player,target){ + return player!=target&&!target.isTurnedOver(); + }).ai=function(target){ + return Math.max(0,-get.attitude(player,target)-2); + }; + "step 1" + if(result.bool){ + player.logSkill('hslingjian_jinjilengdong_equip5',result.targets); + player.turnOver(); + result.targets[0].turnOver(); + game.asyncDraw([player,result.targets[0]],2); + } + }, + }, + hslingjian_yinmilichang_equip1:{ + trigger:{source:'damageEnd'}, + direct:true, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('hslingjian_yinmilichang_duanzao'),function(card,player,target){ + return target!=player&&!target.hasSkill('qianxing'); + }).ai=function(target){ + var att=get.attitude(player,target); + if(get.distance(player,target,'absolute')<=1) return 0; + if(target.hp==1) return 2*att; + if(target.hp==2&&target.countCards('h')<=2) return 1.2*att; + return att; + } + 'step 1' + if(result.bool){ + player.logSkill('hslingjian_yinmilichang_equip1',result.targets); + result.targets[0].addTempSkill('qianxing',{player:'phaseBegin'}); + } + } + }, + hslingjian_yinmilichang_equip2:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return !player.hasSkill('qianxing'); + }, + content:function(){ + player.addTempSkill('qianxing','phaseAfter'); + } + }, + hslingjian_yinmilichang_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.hp==1) return distance+1; + } + } + }, + hslingjian_yinmilichang_equip4:{ + mod:{ + globalFrom:function(from,to,distance){ + if(from.hp==1) return distance-1; + } + } + }, + hslingjian_yinmilichang_equip5:{ + mod:{ + targetEnabled:function(card,player,target,now){ + if(target.countCards('h')==0){ + if(card.name=='sha'||card.name=='juedou') return false; + } + } + }, + ai:{ + noh:true, + skillTagFilter:function(player,tag){ + if(tag=='noh'){ + if(player.countCards('h')!=1) return false; + } + } + } + }, + hslingjian_xingtigaizao_equip1:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + player.draw(); + } + }, + hslingjian_xingtigaizao_equip2:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + player.draw(); + } + }, + hslingjian_xingtigaizao_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + return distance+1; + }, + globalFrom:function(from,to,distance){ + return distance+1; + } + } + }, + hslingjian_xingtigaizao_equip4:{ + mod:{ + globalTo:function(from,to,distance){ + return distance-1; + }, + globalFrom:function(from,to,distance){ + return distance-1; + } + } + }, + hslingjian_xingtigaizao_equip5:{ + mod:{ + maxHandcard:function(player,num){ + return num-1; + } + }, + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + trigger.num++; + } + }, + hslingjian_shengxiuhaojiao_equip1:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return event.target.hasSkill('hslingjian_chaofeng'); + }, + content:function(){ + trigger.directHit=true; + } + }, + hslingjian_shengxiuhaojiao_equip2:{ + mod:{ + targetEnabled:function(card,player,target){ + if(player.hasSkill('hslingjian_chaofeng')) return false; + } + } + }, + hslingjian_shengxiuhaojiao_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.hp0; + }, + position:'he', + content:function(){ + var es=target.getCards('e'); + target.gain(es); + target.$gain2(es); + }, + check:function(card){ + return 4-get.value(card); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noe')) return target.countCards('e')*2; + return -target.countCards('e'); + } + }, + } + }, + jiguanyaoshu_skill_old:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h',{type:['trick','delay']})>0; + }, + filterCard:{type:['trick','delay']}, + check:function(card){ + return 5-get.value(card); + }, + viewAs:{name:'jiguanshu'} + }, + jiguanyaoshu_skill:{ + trigger:{player:'loseEnd'}, + forced:true, + filter:function(event,player){ + if(_status.currentPhase==player) return false; + for(var i=0;i'+lib.translate[lingjians[i]]+'
'; + for(var j=0;j'; + if(type=='jiqi') break; + } + str+='
'; + } + return str; + }, + check:function(card){ + if(get.type(card)=='jiqi'){ + if(_status.event.player.needsToDiscard()){ + return 0.5; + } + return 0; + } + var num=1+get.value(card); + if(get.position(card)=='e'){ + num+=0.1; + } + return num; + }, + filterCard:function(card){ + var type=get.type(card); + if(type=='equip'){ + if(!lib.inpile.contains(card.name)) return false; + if(lib.card[card.name].nopower) return false; + if(lib.card[card.name].unique) return false; + } + if(ui.selected.cards.length){ + var type2=get.type(ui.selected.cards[0]); + if(type2=='equip'){ + return type=='hslingjian'||type=='jiqi'; + } + else{ + return type=='equip'; + } + } + else{ + return type=='equip'||type=='hslingjian'||type=='jiqi'; + } + }, + process:function(cards){ + var equip; + for(var i=0;i0; - }, - usable:1, - filterCard:true, - check:function(card){ - return 6-get.value(card); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - var card=target.getCards('h').randomGet(); - var hu=player.getEquip('lianyaohu'); - if(card&&hu){ - if(!hu.storage.shouna){ - hu.storage.shouna=[]; - } - target.$give(card,player); - target.lose(card,ui.special); - hu.storage.shouna.push(card); - player.updateMarks(); - } - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - return -1/Math.sqrt(1+target.countCards('h')); - } - } - } - }, - shouna_old:{ - trigger:{global:'discardAfter'}, - filter:function(event,player){ - if(player.hasSkill('shouna2')) return false; - if(_status.currentPhase==event.player) return false; - if(event.player==player) return false; - for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.chooseCardTarget({ - filterTarget:true, - filterCard:lib.filter.cardDiscardable, - ai1:function(card){ - return 8-get.useful(card); - }, - ai2:function(target){ - return -get.attitude(player,target); - }, - prompt:get.prompt('donghuangzhong') - }); - 'step 1' - if(result.bool){ - player.logSkill('donghuangzhong',result.targets); - player.discard(result.cards); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - var target=event.target; - var list=[]; - for(var i=0;i0; - }, - content:function(){ - trigger.player.chooseToDiscard(true,'he'); - } - }, - shouhua:{ - mode:['identity','infinity'], - enable:'phaseUse', - filter:function(event,player){ - return player==game.me; - }, - usable:1, - filterTarget:function(card,player,target){ - return target!=game.zhu&&target!=game.me&&target.hp0){ - return 1+trigger.judge(button.link); - } - if(get.attitude(player,trigger.player)<0){ - return 1-trigger.judge(button.link); - } - return 0; - }; - "step 1" - if(!result.bool){ - event.finish(); - return; - } - player.logSkill('haotianta',trigger.player); - var card=result.links[0]; - event.cards.remove(card); - var judgestr=get.translation(trigger.player)+'的'+trigger.judgestr+'判定'; - event.videoId=lib.status.videoId++; - event.dialog=ui.create.dialog(judgestr); - event.dialog.classList.add('center'); - event.dialog.videoId=event.videoId; - - game.addVideo('judge1',player,[get.cardInfo(card),judgestr,event.videoId]); - for(var i=0;i0){ - trigger.result.bool=true; - trigger.player.popup('洗具'); - } - if(trigger.result.judge<0){ - trigger.result.bool=false; - trigger.player.popup('杯具'); - } - game.log(trigger.player,'的判定结果为',card); - trigger.direct=true; - trigger.position.appendChild(card); - game.delay(2); - } - else{ - event.finish(); - } - "step 2" - ui.arena.classList.remove('thrownhighlight'); - event.dialog.close(); - game.addVideo('judge2',null,event.videoId); - ui.clear(); - var card=trigger.result.card; - trigger.position.appendChild(card); - trigger.result.node.delete(); - game.delay(); - }, - ai:{ - tag:{ - rejudge:1 - } - } - }, - shennongding:{ - enable:'phaseUse', - usable:1, - filterCard:true, - selectCard:2, - check:function(card){ - if(get.tag(card,'recover')>=1) return 0; - return 7-get.value(card); - }, - filter:function(event,player){ - return player.hp=2; - }, - content:function(){ - player.recover(); - }, - ai:{ - result:{ - player:function(player){ - return get.recoverEffect(player); - } - }, - order:2.5 - } - }, - kongdongyin:{ - trigger:{player:'dieBefore'}, - forced:true, - filter:function(event,player){ - return player.maxHp>0; - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - player.hp=1; - player.draw(); - player.discard(player.getCards('e',{subtype:'equip5'})); - game.delay(); - } - }, - - nvwashi:{ - trigger:{global:'dying'}, - priority:6, - filter:function(event,player){ - return event.player.hp<=0&&player.hp>1; - }, - check:function(event,player){ - return get.attitude(player,event.player)>=3; - }, - logTarget:'player', - content:function(){ - "step 0" - trigger.player.recover(); - "step 1" - player.loseHp(); - }, - ai:{ - threaten:1.2, - expose:0.2 - } - }, - kongxin:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h'); - }, - filter:function(event,player){ - return player.countCards('h')?true:false; - }, - content:function(){ - "step 0" - player.chooseToCompare(target); - "step 1" - if(result.bool){ - event.bool=true; - player.chooseTarget('选择一个目标视为'+get.translation(target)+'对其使用一张杀',function(card,player,target2){ - return player!=target2&&target.canUse('sha',target2); - }).ai=function(target2){ - return get.effect(target2,{name:'sha'},target,player); - } - } - else{ - target.discardPlayerCard(player); - } - "step 2" - if(event.bool&&result.bool){ - target.useCard({name:'sha'},result.targets); - } - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(player.countCards('h')<=1) return 0; - if(get.attitude(player,target)>=0) return 0; - if(game.hasPlayer(function(current){ - return (player!=current&&target.canUse('sha',current)&& - get.effect(current,{name:'sha'},target,player)>0) - })){ - return -1; - } - return 0; - } - } - } - }, - kongxin2:{ - trigger:{player:'dying'}, - priority:10, - forced:true, - popup:false, - filter:function(event,player){ - return player==game.me; - }, - content:function(){ - player.removeSkill('kongxin2'); - game.swapPlayer(player); - player.storage.kongxin.lockOut=false; - player.storage.kongxin.out(); - if(player==game.me) game.swapPlayer(player.storage.kongxin); - if(lib.config.mode=='identity') player.storage.kongxin.setIdentity(); - delete player.storage.kongxin; - }, - }, - lianyao_hujia:{ - mode:['identity','guozhan'], - enable:'phaseUse', - usable:1, - filter:function(event,player){ - if(player!=game.me) return false; - var card=player.getEquip('lianyaohu'); - if(card.storage.shouhua&&card.storage.shouhua.length) return true; - return false; - }, - content:function(){ - "step 0" - var list=[]; - var card=player.getEquip('lianyaohu'); - for(var i=0;i0; - }, - filterTarget:function(card,player,target){ - return target.countCards('he')>0; - }, - check:function(card){ - return 5-get.value(card); - }, - content:function(){ - target.discard(target.getCards('he').randomGet()); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - var dh=player.countCards('he')-target.countCards('he'); - if(dh>0){ - return -Math.sqrt(dh); - } - return 0; - } - } - } - }, - hslingjian_zhongxinghujia_equip1:{ - trigger:{source:'damageEnd'}, - check:function(event,player){ - return !player.getEquip(2); - }, - filter:function(event){ - return event.card&&event.card.name=='sha'; - }, - content:function(){ - var card=game.createCard(get.inpile('equip2').randomGet()); - player.equip(card); - player.$draw(card); - game.delay(); - } - }, - hslingjian_zhongxinghujia_equip2:{ - trigger:{player:'damageEnd'}, - check:function(event,player){ - return get.attitude(player,event.source)<0; - }, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.source&&event.source.getEquip(2); - }, - content:function(){ - player.line(trigger.source,'green'); - trigger.source.discard(trigger.source.getEquip(2)); - } - }, - hslingjian_zhongxinghujia_equip3:{ - mod:{ - globalTo:function(from,to,distance){ - if(to.getEquip(2)) return distance+1; - } - } - }, - hslingjian_zhongxinghujia_equip4:{ - mod:{ - globalFrom:function(from,to,distance){ - if(from.getEquip(2)) return distance-1; - } - } - }, - hslingjian_zhongxinghujia_equip5:{ - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - filterTarget:true, - selectCard:2, - filter:function(event,player){ - return player.countCards('he')>=2; - }, - check:function(card){ - return 5-get.value(card); - }, - content:function(){ - var card=game.createCard(get.inpile('equip2').randomGet()); - target.equip(card); - target.$draw(card); - game.delay(); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(target.getEquip(2)) return 0; - return 1; - } - } - } - }, - hslingjian_jinjilengdong_equip1:{ - trigger:{source:'damageEnd'}, - check:function(event,player){ - if(event.player.isTurnedOver()){ - return get.attitude(player,event.player)>0; - } - return get.attitude(player,event.player)<=0; - }, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive(); - }, - logTarget:'player', - content:function(){ - trigger.player.draw(2); - trigger.player.turnOver(); - } - }, - hslingjian_jinjilengdong_equip2:{ - trigger:{player:'damageEnd'}, - check:function(event,player){ - if(event.player.isTurnedOver()){ - return get.attitude(player,event.source)>0; - } - return get.attitude(player,event.source)<=0; - }, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.source&&event.source.isAlive(); - }, - logTarget:'source', - content:function(){ - player.line(trigger.source,'green'); - trigger.source.draw(2); - trigger.source.turnOver(); - } - }, - hslingjian_jinjilengdong_equip3:{ - mod:{ - globalTo:function(from,to,distance){ - if(to.isTurnedOver()) return distance+2; - } - } - }, - hslingjian_jinjilengdong_equip4:{ - mod:{ - globalFrom:function(from,to,distance){ - if(from.isTurnedOver()) return distance-2; - } - } - }, - hslingjian_jinjilengdong_equip5:{ - trigger:{player:'phaseAfter'}, - direct:true, - filter:function(event,player){ - return !player.isTurnedOver(); - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('hslingjian_jinjilengdong_duanzao'),function(card,player,target){ - return player!=target&&!target.isTurnedOver(); - }).ai=function(target){ - return Math.max(0,-get.attitude(player,target)-2); - }; - "step 1" - if(result.bool){ - player.logSkill('hslingjian_jinjilengdong_equip5',result.targets); - player.turnOver(); - result.targets[0].turnOver(); - game.asyncDraw([player,result.targets[0]],2); - } - }, - }, - hslingjian_yinmilichang_equip1:{ - trigger:{source:'damageEnd'}, - direct:true, - filter:function(event){ - return event.card&&event.card.name=='sha'; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('hslingjian_yinmilichang_duanzao'),function(card,player,target){ - return target!=player&&!target.hasSkill('qianxing'); - }).ai=function(target){ - var att=get.attitude(player,target); - if(get.distance(player,target,'absolute')<=1) return 0; - if(target.hp==1) return 2*att; - if(target.hp==2&&target.countCards('h')<=2) return 1.2*att; - return att; - } - 'step 1' - if(result.bool){ - player.logSkill('hslingjian_yinmilichang_equip1',result.targets); - result.targets[0].addTempSkill('qianxing',{player:'phaseBegin'}); - } - } - }, - hslingjian_yinmilichang_equip2:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event,player){ - return !player.hasSkill('qianxing'); - }, - content:function(){ - player.addTempSkill('qianxing','phaseAfter'); - } - }, - hslingjian_yinmilichang_equip3:{ - mod:{ - globalTo:function(from,to,distance){ - if(to.hp==1) return distance+1; - } - } - }, - hslingjian_yinmilichang_equip4:{ - mod:{ - globalFrom:function(from,to,distance){ - if(from.hp==1) return distance-1; - } - } - }, - hslingjian_yinmilichang_equip5:{ - mod:{ - targetEnabled:function(card,player,target,now){ - if(target.countCards('h')==0){ - if(card.name=='sha'||card.name=='juedou') return false; - } - } - }, - ai:{ - noh:true, - skillTagFilter:function(player,tag){ - if(tag=='noh'){ - if(player.countCards('h')!=1) return false; - } - } - } - }, - hslingjian_xingtigaizao_equip1:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event){ - return event.card&&event.card.name=='sha'; - }, - content:function(){ - player.draw(); - } - }, - hslingjian_xingtigaizao_equip2:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event){ - return event.card&&event.card.name=='sha'; - }, - content:function(){ - player.draw(); - } - }, - hslingjian_xingtigaizao_equip3:{ - mod:{ - globalTo:function(from,to,distance){ - return distance+1; - }, - globalFrom:function(from,to,distance){ - return distance+1; - } - } - }, - hslingjian_xingtigaizao_equip4:{ - mod:{ - globalTo:function(from,to,distance){ - return distance-1; - }, - globalFrom:function(from,to,distance){ - return distance-1; - } - } - }, - hslingjian_xingtigaizao_equip5:{ - mod:{ - maxHandcard:function(player,num){ - return num-1; - } - }, - trigger:{player:'phaseDrawBegin'}, - forced:true, - content:function(){ - trigger.num++; - } - }, - hslingjian_shengxiuhaojiao_equip1:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return event.target.hasSkill('hslingjian_chaofeng'); - }, - content:function(){ - trigger.directHit=true; - } - }, - hslingjian_shengxiuhaojiao_equip2:{ - mod:{ - targetEnabled:function(card,player,target){ - if(player.hasSkill('hslingjian_chaofeng')) return false; - } - } - }, - hslingjian_shengxiuhaojiao_equip3:{ - mod:{ - globalTo:function(from,to,distance){ - if(to.hp0; - }, - position:'he', - content:function(){ - var es=target.getCards('e'); - target.gain(es); - target.$gain2(es); - }, - check:function(card){ - return 4-get.value(card); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - if(target.hasSkillTag('noe')) return target.countCards('e')*2; - return -target.countCards('e'); - } - }, - } - }, - jiguanyaoshu_skill_old:{ - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h',{type:['trick','delay']})>0; - }, - filterCard:{type:['trick','delay']}, - check:function(card){ - return 5-get.value(card); - }, - viewAs:{name:'jiguanshu'} - }, - jiguanyaoshu_skill:{ - trigger:{player:'loseEnd'}, - forced:true, - filter:function(event,player){ - if(_status.currentPhase==player) return false; - for(var i=0;i'+lib.translate[lingjians[i]]+''; - for(var j=0;j'; - if(type=='jiqi') break; + var dvalue=(type=='jiqi'?3:1); + var getValue=function(value,dvalue){ + if(dvalue==1) return Math.min(10,value+dvalue); + value+=dvalue; + if(value>10) return 10+(value-10)/10; + if(value<9) return 8+value/10; + return value; + }; + if(typeof lib.card[name].ai.equipValue=='number'){ + lib.card[name].ai.equipValue=getValue(lib.card[name].ai.equipValue,dvalue); } - str+=''; - } - return str; - }, - check:function(card){ - if(get.type(card)=='jiqi'){ - if(_status.event.player.needsToDiscard()){ - return 0.5; + else if(typeof lib.card[name].ai.equipValue=='function'){ + lib.card[name].ai.equipValue=function(){ + return getValue(lib.card[equipname].ai.equipValue.apply(this,arguments),dvalue); + } } - return 0; - } - var num=1+get.value(card); - if(get.position(card)=='e'){ - num+=0.1; - } - return num; - }, - filterCard:function(card){ - var type=get.type(card); - if(type=='equip'){ - if(!lib.inpile.contains(card.name)) return false; - if(lib.card[card.name].nopower) return false; - if(lib.card[card.name].unique) return false; - } - if(ui.selected.cards.length){ - var type2=get.type(ui.selected.cards[0]); - if(type2=='equip'){ - return type=='hslingjian'||type=='jiqi'; + else if(lib.card[name].ai.basic&&typeof lib.card[name].ai.basic.equipValue=='number'){ + lib.card[name].ai.basic.equipValue=getValue(lib.card[name].ai.basic.equipValue,dvalue); + } + else if(lib.card[name].ai.basic&&typeof lib.card[name].ai.basic.equipValue=='function'){ + lib.card[name].ai.basic.equipValue=function(){ + return getValue(lib.card[equipname].ai.basic.equipValue.apply(this,arguments),dvalue); + } } else{ - return type=='equip'; + if(dvalue==3){ + lib.card[name].ai.equipValue=7; + } + else{ + lib.card[name].ai.equipValue=dvalue; + } } - } - else{ - return type=='equip'||type=='hslingjian'||type=='jiqi'; - } - }, - process:function(cards){ - var equip; - for(var i=0;i10) return 10+(value-10)/10; - if(value<9) return 8+value/10; - return value; - }; - if(typeof lib.card[name].ai.equipValue=='number'){ - lib.card[name].ai.equipValue=getValue(lib.card[name].ai.equipValue,dvalue); - } - else if(typeof lib.card[name].ai.equipValue=='function'){ - lib.card[name].ai.equipValue=function(){ - return getValue(lib.card[equipname].ai.equipValue.apply(this,arguments),dvalue); - } - } - else if(lib.card[name].ai.basic&&typeof lib.card[name].ai.basic.equipValue=='number'){ - lib.card[name].ai.basic.equipValue=getValue(lib.card[name].ai.basic.equipValue,dvalue); - } - else if(lib.card[name].ai.basic&&typeof lib.card[name].ai.basic.equipValue=='function'){ - lib.card[name].ai.basic.equipValue=function(){ - return getValue(lib.card[equipname].ai.basic.equipValue.apply(this,arguments),dvalue); - } - } - else{ - if(dvalue==3){ - lib.card[name].ai.equipValue=7; + if(Array.isArray(lib.card[name].skills)){ + lib.card[name].skills=lib.card[name].skills.slice(0); } else{ - lib.card[name].ai.equipValue=dvalue; + lib.card[name].skills=[]; + } + // lib.card[name].filterTarget=function(card,player,target){ + // return !target.isMin(); + // }; + // lib.card[name].selectTarget=1; + // lib.card[name].range={global:1}; + var str=lib.translate[cards[0].name+'_duanzao']; + var str2=get.translation(equip.name,'skill'); + lib.translate[name]=str+str2; + str2=lib.translate[equip.name+'_info']||''; + if(str2[str2.length-1]=='.'||str2[str2.length-1]=='。'){ + str2=str2.slice(0,str2.length-1); + } + for(var i=0;i0; - if(event.target.hp==1) return att>0; - if(event.target.hasSkillTag('maixie')){ - return att<=0; - } - if(player.hasSkill('tianxianjiu')) return false; - return att<=0; - }, - filter:function(event,player){ - return !event.target.isTurnedOver(); - }, - logTarget:'target', - content:function(){ - trigger.unhurt=true; - trigger.target.turnOver(); - trigger.target.draw(); - } - }, - chilongya:{ - trigger:{source:'damageBegin'}, - forced:true, - filter:function(event){ - return event.nature=='fire'&&event.notLink(); - }, - content:function(){ - trigger.num++; - } - }, - chilongya2:{ - trigger:{source:'damageBegin'}, - filter:function(event,player){ - return (event.card&&event.card.name=='sha'); - }, - popup:false, - forced:true, - content:function(){ - if(Math.random()<0.5){ - trigger.num++; - trigger.player.addSkill('chilongfengxue'); - } - } - }, - chilongfengxue:{ - trigger:{global:'shaAfter'}, - forced:true, - popup:false, - content:function(){ - player.draw(); - player.removeSkill('chilongfengxue'); - } - }, - shentou:{ - enable:'phaseUse', - usable:1, - filterCard:true, - filter:function(event,player){ - var nh=player.countCards('h'); - if(nh==0) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h')>nh; - }); - }, - check:function(card){ - return 8-get.value(card); - }, - filterTarget:function(card,player,target){ - if(target.countCards('h')==0) return false; - if(target==player) return false; - if(target.countCards('h')<=player.countCards('h')) return false; - return true; - }, - content:function(){ - "step 0" - player.judge(function(card){ - if(get.suit(card)=='club') return -1; - return 1; - }); - "step 1" - if(result.bool){ - var card=target.getCards('h').randomGet(); - if(card){ - player.gain(card,target); - target.$giveAuto(card,player); - } - } - }, - ai:{ - basic:{ - order:5 - }, - result:{ - player:0.3, - target:-1, - } - } - }, - pusafazhou:{ - trigger:{player:'dieBefore'}, - forced:true, - filter:function(event,player){ - return player.maxHp>0; - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - player.hp=1; - player.draw(); - player.discard(player.getCards('e',{subtype:'equip5'})); - game.delay(); - } - }, - old_longfan:{ - enable:'phaseUse', - usable:1, - prompt:'?', - filterTarget:true, - content:function(){ - "step 0" - if(event.isMine()){ - event.longfan=ui.create.control('〇','〇','〇','〇',function(){ - event.longfan.status--; - }); - event.longfan.status=4; - for(var i=0;i1) event.count(1); - if(event.longfan.status>2) event.count(2); - if(event.longfan.status>3) event.count(3); - },200); - event.count=function(num){ - event.longfan.childNodes[num].num=(event.longfan.childNodes[num].num+1)%10; - if(event.longfan.childNodes[num].num==2) event.longfan.childNodes[num].innerHTML='二'; - else event.longfan.childNodes[num].innerHTML=get.cnNumber(event.longfan.childNodes[num].num); - } - game.pause(); - } - else{ - event.finish(); - var x=Math.random(); - if(x<0.1) target.draw(); - else if(x<0.2) target.chooseToDiscard(true); - else if(x<0.3) target.loseHp(); - else if(x<0.4) target.recover(); - else if(x<0.6){ - if(get.attitude(player,target)>0) target.draw(); - else target.chooseToDiscard(true); - } - else if(x<0.8){ - if(get.attitude(player,target)>0) target.recover(); - else target.loseHp(); - } - } - "step 1" - var str=''; - for(var i=0;iplayer.hp?2:0; - case 'diamond':return 1; - case 'club':return 1; - case 'spade':return 0; - } - }); - "step 1" - switch(result.suit){ - case 'heart':player.recover();break; - case 'diamond':player.draw();break; - case 'club':{ - player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }).ai=function(target){ - return -get.attitude(player,target); - }; - break; - } - } - if(result.suit!='club'){ - event.finish(); - } - "step 2" - if(result.bool&&result.targets&&result.targets.length){ - player.line(result.targets[0],'green'); - player.discardPlayerCard(result.targets[0],'he',true); - } - }, - ai:{ - order:10, - result:{ - player:1 - } - } - }, - touzhi:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return get.subtype(card)=='equip1'; - }, - filter:function(event,player){ - return player.countCards('he',{subtype:'equip1'})>0; - }, - discard:false, - prepare:'give', - filterTarget:function(card,player,target){ - if(player==target) return false; - return true; - }, - content:function(){ - target.damage(); - target.gain(cards,player); - // game.delay(); - }, - check:function(card){ - return 10-get.value(card); - }, - position:'he', - ai:{ - basic:{ - order:8 }, - result:{ - target:-1 - } - } - }, - xixue:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.hp1/3) return false; - return true; - }, - content:function(){ - trigger.num--; - } - }, - nigong:{ - trigger:{player:'damageAfter'}, - group:['nigong2','nigong3'], - forced:true, - content:function(){ - player.storage.nigong+=trigger.num; - if(player.storage.nigong>4){ - player.storage.nigong=4; - } - player.updateMarks(); - }, - ai:{ - effect:function(card,player,target){ - if(get.tag(card,'damage')&&!target.hujia) return [1,0.5]; + mark:true, + intro:{ + content:'手牌上限-#' + }, + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.removeSkill('hslingjian_xingtigaizao'); + player.storage.hslingjian_xingtigaizao=0; } }, - intro:{ - content:'已积攒#点伤害' - } - }, - nigong2:{ - enable:'phaseUse', - filter:function(event,player){ - return player.storage.nigong>1; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - prompt:function(event){ - var str='弃置所有逆攻标记,'; - if(event.player.storage.nigong%2!=0){ - str+='摸一张牌,'; - } - str+='并对一名其他角色造成'+get.cnNumber(Math.floor(event.player.storage.nigong/2))+'点伤害'; - return str; - }, - content:function(){ - if(player.storage.nigong%2!=0){ - player.draw(); - } - target.damage(Math.floor(player.storage.nigong/2)); - player.storage.nigong=0; - player.updateMarks(); - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - var num=get.damageEffect(target,player,target); - if(player.storage.nigong>=4&&num>0){ - num=0; + qinglonglingzhu:{ + trigger:{source:'damageEnd'}, + direct:true, + filter:function(event,player){ + return event.nature&&event.player&&event.player.isAlive(); + }, + content:function(){ + player.gainPlayerCard(get.prompt('qinglonglingzhu',trigger.player),trigger.player,function(button){ + if(get.attitude(player,trigger.player)<=0){ + return get.buttonValue(button); } - return num; + return 0; + },'he').logSkill=['qinglonglingzhu',trigger.player]; + }, + }, + xingjunyan:{ + trigger:{source:'damageBegin',player:'damageBegin'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + trigger.num++; + } + }, + baihupifeng:{ + trigger:{player:'phaseEnd'}, + frequent:true, + filter:function(event,player){ + return player.isLowestHp()&&player.isDamaged(); + }, + content:function(){ + player.recover(); + }, + }, + fengxueren:{ + trigger:{player:'shaHit'}, + check:function(event,player){ + var att=get.attitude(player,event.target); + if(player.hasSkill('jiu')) return att>0; + if(event.target.hp==1) return att>0; + if(event.target.hasSkillTag('maixie')){ + return att<=0; + } + if(player.hasSkill('tianxianjiu')) return false; + return att<=0; + }, + filter:function(event,player){ + return !event.target.isTurnedOver(); + }, + logTarget:'target', + content:function(){ + trigger.unhurt=true; + trigger.target.turnOver(); + trigger.target.draw(); + } + }, + chilongya:{ + trigger:{source:'damageBegin'}, + forced:true, + filter:function(event){ + return event.nature=='fire'&&event.notLink(); + }, + content:function(){ + trigger.num++; + } + }, + chilongya2:{ + trigger:{source:'damageBegin'}, + filter:function(event,player){ + return (event.card&&event.card.name=='sha'); + }, + popup:false, + forced:true, + content:function(){ + if(Math.random()<0.5){ + trigger.num++; + trigger.player.addSkill('chilongfengxue'); } } - } - }, - nigong3:{ - enable:'phaseUse', - filter:function(event,player){ - return player.storage.nigong==1; }, - content:function(){ - player.draw(); - player.storage.nigong=0; - player.updateMarks(); + chilongfengxue:{ + trigger:{global:'shaAfter'}, + forced:true, + popup:false, + content:function(){ + player.draw(); + player.removeSkill('chilongfengxue'); + } }, - ai:{ - order:10, - result:{ - player:1 + shentou:{ + enable:'phaseUse', + usable:1, + filterCard:true, + filter:function(event,player){ + var nh=player.countCards('h'); + if(nh==0) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>nh; + }); + }, + check:function(card){ + return 8-get.value(card); + }, + filterTarget:function(card,player,target){ + if(target.countCards('h')==0) return false; + if(target==player) return false; + if(target.countCards('h')<=player.countCards('h')) return false; + return true; + }, + content:function(){ + "step 0" + player.judge(function(card){ + if(get.suit(card)=='club') return -1; + return 1; + }); + "step 1" + if(result.bool){ + var card=target.getCards('h').randomGet(); + if(card){ + player.gain(card,target); + target.$giveAuto(card,player); + } + } + }, + ai:{ + basic:{ + order:5 + }, + result:{ + player:0.3, + target:-1, + } } - } - }, - sadengjinhuan:{ - trigger:{player:'shaMiss'}, - check:function(event,player){ - return get.attitude(player,event.target)<0; }, - content:function(){ - "step 0" - player.judge(function(card){ - return get.color(card)=='red'?1:0; - }) - "step 1" - if(result.bool){ - trigger.target.chooseToRespond({name:'shan'}).autochoose=lib.filter.autoRespondShan; - } - else{ - event.finish(); - } - "step 2" - if(!result.bool){ + pusafazhou:{ + trigger:{player:'dieBefore'}, + forced:true, + filter:function(event,player){ + return player.maxHp>0; + }, + content:function(){ trigger.untrigger(); - trigger.trigger('shaHit'); - trigger._result.bool=false; + trigger.finish(); + player.hp=1; + player.draw(); + player.discard(player.getCards('e',{subtype:'equip5'})); + game.delay(); } - } - }, - ximohu:{ - trigger:{player:'damageBefore'}, - forced:true, - filter:function(event){ - return event.nature=='thunder'; }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - player.recover(trigger.num); - }, - ai:{ - effect:function(card){ - if(get.tag(card,'thunderDamage')) return [0,2]; + old_longfan:{ + enable:'phaseUse', + usable:1, + prompt:'?', + filterTarget:true, + content:function(){ + "step 0" + if(event.isMine()){ + event.longfan=ui.create.control('〇','〇','〇','〇',function(){ + event.longfan.status--; + }); + event.longfan.status=4; + for(var i=0;i1) event.count(1); + if(event.longfan.status>2) event.count(2); + if(event.longfan.status>3) event.count(3); + },200); + event.count=function(num){ + event.longfan.childNodes[num].num=(event.longfan.childNodes[num].num+1)%10; + if(event.longfan.childNodes[num].num==2) event.longfan.childNodes[num].innerHTML='二'; + else event.longfan.childNodes[num].innerHTML=get.cnNumber(event.longfan.childNodes[num].num); + } + game.pause(); + } + else{ + event.finish(); + var x=Math.random(); + if(x<0.1) target.draw(); + else if(x<0.2) target.chooseToDiscard(true); + else if(x<0.3) target.loseHp(); + else if(x<0.4) target.recover(); + else if(x<0.6){ + if(get.attitude(player,target)>0) target.draw(); + else target.chooseToDiscard(true); + } + else if(x<0.8){ + if(get.attitude(player,target)>0) target.recover(); + else target.loseHp(); + } + } + "step 1" + var str=''; + for(var i=0;i0; - if(event.target.hasSkillTag('maixie_hp')){ - return att<=0; + }, + longfan:{ + enable:'phaseUse', + usable:1, + content:function(){ + "step 0" + player.judge(function(card){ + switch(get.suit(card)){ + case 'heart':return player.maxHp>player.hp?2:0; + case 'diamond':return 1; + case 'club':return 1; + case 'spade':return 0; + } + }); + "step 1" + switch(result.suit){ + case 'heart':player.recover();break; + case 'diamond':player.draw();break; + case 'club':{ + player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }).ai=function(target){ + return -get.attitude(player,target); + }; + break; + } + } + if(result.suit!='club'){ + event.finish(); + } + "step 2" + if(result.bool&&result.targets&&result.targets.length){ + player.line(result.targets[0],'green'); + player.discardPlayerCard(result.targets[0],'he',true); + } + }, + ai:{ + order:10, + result:{ + player:1 + } } - if(player.hasSkill('tianxianjiu')) return false; - if(event.target.hujia>0) return att<0; - if(event.target.hp==1) return att>0; - return false; }, - content:function(){ - trigger.unhurt=true; - trigger.target.loseHp(); - } - }, - guiyanfadao2:{ - trigger:{player:'useCardAfter'}, - forced:true, - popup:false, - content:function(){ - delete player.storage.zhuque_skill.nature; - } - }, - tianxianjiu:{ - trigger:{source:'damageEnd'}, - filter:function(event){ - return (event.card&&(event.card.name=='sha')); + touzhi:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return get.subtype(card)=='equip1'; + }, + filter:function(event,player){ + return player.countCards('he',{subtype:'equip1'})>0; + }, + discard:false, + prepare:'give', + filterTarget:function(card,player,target){ + if(player==target) return false; + return true; + }, + content:function(){ + target.damage(); + target.gain(cards,player); + // game.delay(); + }, + check:function(card){ + return 10-get.value(card); + }, + position:'he', + ai:{ + basic:{ + order:8 + }, + result:{ + target:-1 + } + } + }, + xixue:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&player.hp1/3) return false; + return true; + }, + content:function(){ + trigger.num--; + } + }, + nigong:{ + trigger:{player:'damageAfter'}, + group:['nigong2','nigong3'], + forced:true, + content:function(){ + player.storage.nigong+=trigger.num; + if(player.storage.nigong>4){ + player.storage.nigong=4; + } + player.updateMarks(); + }, + ai:{ + effect:function(card,player,target){ + if(get.tag(card,'damage')&&!target.hujia) return [1,0.5]; + } + }, + intro:{ + content:'已积攒#点伤害' + } + }, + nigong2:{ + enable:'phaseUse', + filter:function(event,player){ + return player.storage.nigong>1; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + prompt:function(event){ + var str='弃置所有逆攻标记,'; + if(event.player.storage.nigong%2!=0){ + str+='摸一张牌,'; + } + str+='并对一名其他角色造成'+get.cnNumber(Math.floor(event.player.storage.nigong/2))+'点伤害'; + return str; + }, + content:function(){ + if(player.storage.nigong%2!=0){ + player.draw(); + } + target.damage(Math.floor(player.storage.nigong/2)); + player.storage.nigong=0; + player.updateMarks(); + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + var num=get.damageEffect(target,player,target); + if(player.storage.nigong>=4&&num>0){ + num=0; + } + return num; + } + } + } + }, + nigong3:{ + enable:'phaseUse', + filter:function(event,player){ + return player.storage.nigong==1; + }, + content:function(){ + player.draw(); + player.storage.nigong=0; + player.updateMarks(); + }, + ai:{ + order:10, + result:{ + player:1 + } + } + }, + sadengjinhuan:{ + trigger:{player:'shaMiss'}, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + content:function(){ + "step 0" + player.judge(function(card){ + return get.color(card)=='red'?1:0; + }) + "step 1" + if(result.bool){ + trigger.target.chooseToRespond({name:'shan'}).autochoose=lib.filter.autoRespondShan; + } + else{ + event.finish(); + } + "step 2" + if(!result.bool){ + trigger.untrigger(); + trigger.trigger('shaHit'); + trigger._result.bool=false; + } + } + }, + ximohu:{ + trigger:{player:'damageBefore'}, + forced:true, + filter:function(event){ + return event.nature=='thunder'; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + player.recover(trigger.num); + }, + ai:{ + effect:function(card){ + if(get.tag(card,'thunderDamage')) return [0,2]; + } + } + }, + guiyanfadao:{ + trigger:{player:'shaHit'}, + check:function(event,player){ + var att=get.attitude(player,event.target); + if(player.hasSkill('jiu')) return att>0; + if(event.target.hasSkillTag('maixie_hp')){ + return att<=0; + } + if(player.hasSkill('tianxianjiu')) return false; + if(event.target.hujia>0) return att<0; + if(event.target.hp==1) return att>0; + return false; + }, + content:function(){ + trigger.unhurt=true; + trigger.target.loseHp(); + } + }, + guiyanfadao2:{ + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + content:function(){ + delete player.storage.zhuque_skill.nature; + } + }, + tianxianjiu:{ + trigger:{source:'damageEnd'}, + filter:function(event){ + return (event.card&&(event.card.name=='sha')); + }, + forced:true, + temp:true, + content:function(){ + player.draw(2); + player.removeSkill('tianxianjiu'); + } }, - forced:true, - temp:true, - content:function(){ - player.draw(2); - player.removeSkill('tianxianjiu'); - } }, - }, - cardType:{ - hslingjian:0.5, - jiqi:0.4, - jiguan:0.45 - }, - translate:{ - _yuchan_equip:'玉蝉', - yuchanqian_duanzao:'玉蝉', - yuchanqian_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanqian_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanqian_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanqian_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanqian_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankun_duanzao:'玉蝉', - yuchankun_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankun_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankun_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankun_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankun_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanzhen_duanzao:'玉蝉', - yuchanzhen_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanzhen_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanzhen_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanzhen_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanzhen_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanxun_duanzao:'玉蝉', - yuchanxun_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanxun_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanxun_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanxun_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanxun_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankan_duanzao:'玉蝉', - yuchankan_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankan_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankan_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankan_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchankan_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanli_duanzao:'玉蝉', - yuchanli_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanli_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanli_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanli_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanli_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchangen_duanzao:'玉蝉', - yuchangen_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchangen_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchangen_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchangen_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchangen_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchandui_duanzao:'玉蝉', - yuchandui_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchandui_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchandui_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchandui_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchandui_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', - yuchanqian:'乾玉蝉', - yuchanqian_info:'在你行动时可当作杀使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', - yuchankun:'坤玉蝉', - yuchankun_info:'在你行动时可当作草药使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', - yuchanzhen:'震玉蝉', - yuchanzhen_info:'在你行动时可当作酒使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', - yuchanxun:'巽玉蝉', - yuchanxun_info:'在你行动时可当作桃使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', - yuchankan:'坎玉蝉', - yuchankan_info:'在你行动时可当作神秘果使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', - yuchanli:'离玉蝉', - yuchanli_info:'在你行动时可当作天仙酒使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', - yuchangen:'艮玉蝉', - yuchangen_info:'在你行动时可当作封印之蛋使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', - yuchandui:'兑玉蝉', - yuchandui_info:'在你行动时可当作雪肌冰鲍使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', - yangpijuan:'羊皮卷', - yangpijuan_info:'出牌阶段对自己使用,选择一种卡牌类别,从3张随机该类别的卡牌中选择一张加入手牌', - // pantao:'蟠桃', - // pantao_info:'出牌阶段对自己使用,或对濒死角色使用,目标回复两点体力并获得一点护甲', - shencaojie:'神草结', - shencaojie_info:'你的锦囊牌即将造成伤害时对目标使用,令此伤害+1', - yuruyi:'玉如意', - yuruyi_ab:'如意', - yuruyi_info:'你有更高的机率摸到好牌', - fengyinzhidan:'封印之蛋', - fengyinzhidan_info:'随机使用三张普通锦囊牌(随机指定目标)', - shuchui:'鼠槌', - shuchui_info:'出牌阶段限一次,你可以指定一名攻击范围内的角色,依次将手牌中的至多3张杀对该角色使用,若杀造成了伤害,你摸一张牌', - zhiluxiaohu:'指路小狐', - zhiluxiaohu_info:'出牌阶段对自己使用,视为对一名随机敌方角色使用一张杀,若此杀造成伤害,你摸一张牌', - xuejibingbao:'雪肌冰鲍', - xuejibingbao_info:'出牌阶段对一名角色使用,该角色摸牌阶段摸牌数+1,持续2个回合', - gouhunluo:'勾魂锣', - gouhunluo_info:'出牌阶段对一名角色使用,在3轮后你的准备阶段令该角色失去1点体力并弃置所有手牌', - jiguan:'机关', - jiqi:'祭器', - qinglongzhigui:'青龙之圭', - _qinglongzhigui:'青龙之圭', - qinglongzhigui_info:'可用于煅造装备;此牌在你手牌中时,准备阶段,你摸两张牌然后弃置一张牌', - qinglongzhigui_duanzao:'云屏', - qinglongzhigui_equip1_info:'结束阶段,你摸一张牌', - qinglongzhigui_equip2_info:'结束阶段,你摸一张牌', - qinglongzhigui_equip3_info:'结束阶段,你摸一张牌', - qinglongzhigui_equip4_info:'结束阶段,你摸一张牌', - qinglongzhigui_equip5_info:'结束阶段,你摸一张牌', - baishouzhihu:'白兽之琥', - _baishouzhihu:'白兽之琥', - baishouzhihu_info:'可用于煅造装备;此牌在你手牌中时,每当你弃置卡牌,你可以弃置一名其他角色的一张牌', - baishouzhihu_duanzao:'风牙', - baishouzhihu_equip1_info:'结束阶段,你可以弃置一名其他角色的一张牌', - baishouzhihu_equip2_info:'结束阶段,你可以弃置一名其他角色的一张牌', - baishouzhihu_equip3_info:'结束阶段,你可以弃置一名其他角色的一张牌', - baishouzhihu_equip4_info:'结束阶段,你可以弃置一名其他角色的一张牌', - baishouzhihu_equip5_info:'结束阶段,你可以弃置一名其他角色的一张牌', - zhuquezhizhang:'朱雀之璋', - _zhuquezhizhang:'朱雀之璋', - zhuquezhizhang_info:'可用于煅造装备;此牌在你手牌中时,每当你受到其他角色造成的伤害,你对伤害来源造成一点火属性伤害', - zhuquezhizhang_duanzao:'炽翎', - zhuquezhizhang_equip1_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', - zhuquezhizhang_equip2_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', - zhuquezhizhang_equip3_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', - zhuquezhizhang_equip4_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', - zhuquezhizhang_equip5_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', - xuanwuzhihuang:'玄武之璜', - _xuanwuzhihuang:'玄武之璜', - xuanwuzhihuang_duanzao:'寒晶', - xuanwuzhihuang_info:'可用于煅造装备;此牌在你手牌中时,每当你造成伤害,你回复等量的体力', - xuanwuzhihuang_equip1_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', - xuanwuzhihuang_equip2_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', - xuanwuzhihuang_equip3_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', - xuanwuzhihuang_equip4_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', - xuanwuzhihuang_equip5_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', - huanglinzhicong:'黄麟之琮', - _huanglinzhicong:'黄麟之琮', - huanglinzhicong_duanzao:'玄甲', - huanglinzhicong_info:'可用于煅造装备;此牌在你手牌中时,准备阶段,若你没有护甲,你获得一点护甲', - huanglinzhicong_equip1_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', - huanglinzhicong_equip2_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', - huanglinzhicong_equip3_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', - huanglinzhicong_equip4_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', - huanglinzhicong_equip5_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', - cangchizhibi:'苍螭之璧', - _cangchizhibi:'苍螭之璧', - cangchizhibi_duanzao:'灵枢', - cangchizhibi_info:'可用于煅造装备;此牌在你手牌中时,准备阶段,你可以选择至多3名角色横置或重置之', - cangchizhibi_equip1_info:'结束阶段,你可以横置或重置一名角色', - cangchizhibi_equip2_info:'结束阶段,你可以横置或重置一名角色', - cangchizhibi_equip3_info:'结束阶段,你可以横置或重置一名角色', - cangchizhibi_equip4_info:'结束阶段,你可以横置或重置一名角色', - cangchizhibi_equip5_info:'结束阶段,你可以横置或重置一名角色', + cardType:{ + hslingjian:0.5, + jiqi:0.4, + jiguan:0.45 + }, + translate:{ + _yuchan_equip:'玉蝉', + yuchanqian_duanzao:'玉蝉', + yuchanqian_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanqian_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanqian_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanqian_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanqian_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankun_duanzao:'玉蝉', + yuchankun_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankun_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankun_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankun_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankun_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanzhen_duanzao:'玉蝉', + yuchanzhen_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanzhen_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanzhen_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanzhen_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanzhen_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanxun_duanzao:'玉蝉', + yuchanxun_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanxun_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanxun_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanxun_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanxun_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankan_duanzao:'玉蝉', + yuchankan_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankan_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankan_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankan_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchankan_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanli_duanzao:'玉蝉', + yuchanli_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanli_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanli_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanli_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanli_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchangen_duanzao:'玉蝉', + yuchangen_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchangen_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchangen_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchangen_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchangen_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchandui_duanzao:'玉蝉', + yuchandui_equip1_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchandui_equip2_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchandui_equip3_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchandui_equip4_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchandui_equip5_info:'出牌阶段限一次,你可以弃置任意张基本牌并摸等量的牌', + yuchanqian:'乾玉蝉', + yuchanqian_info:'在你行动时可当作杀使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', + yuchankun:'坤玉蝉', + yuchankun_info:'在你行动时可当作草药使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', + yuchanzhen:'震玉蝉', + yuchanzhen_info:'在你行动时可当作酒使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', + yuchanxun:'巽玉蝉', + yuchanxun_info:'在你行动时可当作桃使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', + yuchankan:'坎玉蝉', + yuchankan_info:'在你行动时可当作神秘果使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', + yuchanli:'离玉蝉', + yuchanli_info:'在你行动时可当作天仙酒使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', + yuchangen:'艮玉蝉', + yuchangen_info:'在你行动时可当作封印之蛋使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', + yuchandui:'兑玉蝉', + yuchandui_info:'在你行动时可当作雪肌冰鲍使用;可用于煅造装备;在你使用一张牌后,此牌会随机切换形态', + yangpijuan:'羊皮卷', + yangpijuan_info:'出牌阶段对自己使用,选择一种卡牌类别,从3张随机该类别的卡牌中选择一张加入手牌', + // pantao:'蟠桃', + // pantao_info:'出牌阶段对自己使用,或对濒死角色使用,目标回复两点体力并获得一点护甲', + shencaojie:'神草结', + shencaojie_info:'你的锦囊牌即将造成伤害时对目标使用,令此伤害+1', + yuruyi:'玉如意', + yuruyi_ab:'如意', + yuruyi_info:'你有更高的机率摸到好牌', + fengyinzhidan:'封印之蛋', + fengyinzhidan_info:'随机使用三张普通锦囊牌(随机指定目标)', + shuchui:'鼠槌', + shuchui_info:'出牌阶段限一次,你可以指定一名攻击范围内的角色,依次将手牌中的至多3张杀对该角色使用,若杀造成了伤害,你摸一张牌', + zhiluxiaohu:'指路小狐', + zhiluxiaohu_info:'出牌阶段对自己使用,视为对一名随机敌方角色使用一张杀,若此杀造成伤害,你摸一张牌', + xuejibingbao:'雪肌冰鲍', + xuejibingbao_info:'出牌阶段对一名角色使用,该角色摸牌阶段摸牌数+1,持续2个回合', + gouhunluo:'勾魂锣', + gouhunluo_info:'出牌阶段对一名角色使用,在3轮后你的准备阶段令该角色失去1点体力并弃置所有手牌', + jiguan:'机关', + jiqi:'祭器', + qinglongzhigui:'青龙之圭', + _qinglongzhigui:'青龙之圭', + qinglongzhigui_info:'可用于煅造装备;此牌在你手牌中时,准备阶段,你摸两张牌然后弃置一张牌', + qinglongzhigui_duanzao:'云屏', + qinglongzhigui_equip1_info:'结束阶段,你摸一张牌', + qinglongzhigui_equip2_info:'结束阶段,你摸一张牌', + qinglongzhigui_equip3_info:'结束阶段,你摸一张牌', + qinglongzhigui_equip4_info:'结束阶段,你摸一张牌', + qinglongzhigui_equip5_info:'结束阶段,你摸一张牌', + baishouzhihu:'白兽之琥', + _baishouzhihu:'白兽之琥', + baishouzhihu_info:'可用于煅造装备;此牌在你手牌中时,每当你弃置卡牌,你可以弃置一名其他角色的一张牌', + baishouzhihu_duanzao:'风牙', + baishouzhihu_equip1_info:'结束阶段,你可以弃置一名其他角色的一张牌', + baishouzhihu_equip2_info:'结束阶段,你可以弃置一名其他角色的一张牌', + baishouzhihu_equip3_info:'结束阶段,你可以弃置一名其他角色的一张牌', + baishouzhihu_equip4_info:'结束阶段,你可以弃置一名其他角色的一张牌', + baishouzhihu_equip5_info:'结束阶段,你可以弃置一名其他角色的一张牌', + zhuquezhizhang:'朱雀之璋', + _zhuquezhizhang:'朱雀之璋', + zhuquezhizhang_info:'可用于煅造装备;此牌在你手牌中时,每当你受到其他角色造成的伤害,你对伤害来源造成一点火属性伤害', + zhuquezhizhang_duanzao:'炽翎', + zhuquezhizhang_equip1_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', + zhuquezhizhang_equip2_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', + zhuquezhizhang_equip3_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', + zhuquezhizhang_equip4_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', + zhuquezhizhang_equip5_info:'结束阶段,你可以弃置一张红色牌并对一名体力值不小于你的角色造成一点火属性伤害', + xuanwuzhihuang:'玄武之璜', + _xuanwuzhihuang:'玄武之璜', + xuanwuzhihuang_duanzao:'寒晶', + xuanwuzhihuang_info:'可用于煅造装备;此牌在你手牌中时,每当你造成伤害,你回复等量的体力', + xuanwuzhihuang_equip1_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', + xuanwuzhihuang_equip2_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', + xuanwuzhihuang_equip3_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', + xuanwuzhihuang_equip4_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', + xuanwuzhihuang_equip5_info:'结束阶段,你可以弃置一张红色牌并回复一点体力', + huanglinzhicong:'黄麟之琮', + _huanglinzhicong:'黄麟之琮', + huanglinzhicong_duanzao:'玄甲', + huanglinzhicong_info:'可用于煅造装备;此牌在你手牌中时,准备阶段,若你没有护甲,你获得一点护甲', + huanglinzhicong_equip1_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', + huanglinzhicong_equip2_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', + huanglinzhicong_equip3_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', + huanglinzhicong_equip4_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', + huanglinzhicong_equip5_info:'结束阶段,若你没有护甲,你可以弃置一张黑色牌并获得一点护甲', + cangchizhibi:'苍螭之璧', + _cangchizhibi:'苍螭之璧', + cangchizhibi_duanzao:'灵枢', + cangchizhibi_info:'可用于煅造装备;此牌在你手牌中时,准备阶段,你可以选择至多3名角色横置或重置之', + cangchizhibi_equip1_info:'结束阶段,你可以横置或重置一名角色', + cangchizhibi_equip2_info:'结束阶段,你可以横置或重置一名角色', + cangchizhibi_equip3_info:'结束阶段,你可以横置或重置一名角色', + cangchizhibi_equip4_info:'结束阶段,你可以横置或重置一名角色', + cangchizhibi_equip5_info:'结束阶段,你可以横置或重置一名角色', - guisheqi:'龟蛇旗', - guisheqi_info:'出牌阶段对一名角色使用,目标获得一点护甲', - jiguanfeng:'机关蜂', - jiguanfeng_info:'出牌阶段对一名其他角色使用,目标需打出一张闪,否则非锁定技失效直到下一回合开始,并受到一点伤害', - jiguanyuan:'机关鸢', - jiguanyuan_info:'出牌阶段对一名其他角色使用,你将此牌和一张其它牌置于一名其他角色的武将牌上,然后摸一张牌;该角色于下一结束阶段获得武将牌上的牌', - jiguantong:'机关火筒', - jiguantong_ab:'火筒', - jiguantong_info:'出牌阶段对所有其他角色使用,目标弃置一张手牌,或受到一点火焰伤害;若没有人因此受到伤害,使用者摸一张牌', - jiutiansuanchi:'九天算尺', - jiutiansuanchi_info:'每当你使用杀造成伤害,你可以弃置一张牌并展示受伤害角色的一张手牌,若此牌与你弃置的牌花色或点数相同,此杀的伤害+2', - shenmiguo:'神秘果', - shenmiguo_info:'出牌阶段内,当你使用一张基本牌或普通锦囊牌后使用,令此牌再结算一次。每阶段限用一次', - qinglianxindeng:'青莲心灯', - qinglianxindeng_info:'你防止锦囊牌造成的伤害', - hslingjian_xuanfengzhiren_duanzao:'风刃', - hslingjian_xuanfengzhiren_duanzao2:'风', - hslingjian_xuanfengzhiren_equip1_info:'每当你用杀造成一次伤害,受伤害角色随机弃置一张牌', - hslingjian_xuanfengzhiren_equip2_info:'每当你受到杀造成的伤害,伤害来源随机弃置一张牌', - hslingjian_xuanfengzhiren_equip3_info:'当你于回合外失去牌后,你本回合的防御距离+1', - hslingjian_xuanfengzhiren_equip4_info:'当你于回合内失去牌后,你本回合的进攻距离+1', - hslingjian_xuanfengzhiren_equip5_info:'出牌阶段限一次,你可以弃置一张牌,然后随机弃置一名其他角色的一张牌', - hslingjian_zhongxinghujia_duanzao:'重甲', - hslingjian_zhongxinghujia_duanzao2:'护', - hslingjian_zhongxinghujia_equip1_info:'每当你用杀造成一次伤害,你可以随机装备一件防具牌', - hslingjian_zhongxinghujia_equip2_info:'每当你受到杀造成的伤害,你可以弃置伤害来源的防具牌', - hslingjian_zhongxinghujia_equip3_info:'当你的装备区内有防具牌时,你的防御距离+1', - hslingjian_zhongxinghujia_equip4_info:'当你的装备区内有防具牌时,你的进攻距离+1', - hslingjian_zhongxinghujia_equip5_info:'出牌阶段限一次,你可以弃置两张牌,然后令一名角色随机装备一件防具', - hslingjian_jinjilengdong_duanzao:'冰冻', - hslingjian_jinjilengdong_duanzao2:'冰', - hslingjian_jinjilengdong_equip1_info:'每当你用杀造成一次伤害,你可以令目标摸两张牌并翻面', - hslingjian_jinjilengdong_equip2_info:'每当你受到杀造成的伤害,你可以令伤害来源摸两张牌并翻面', - hslingjian_jinjilengdong_equip3_info:'你的武将牌背面朝上时防御距离+2', - hslingjian_jinjilengdong_equip4_info:'你的武将牌背面朝上时进攻距离+2', - hslingjian_jinjilengdong_equip5_info:'回合结束后,若你的武将牌正面朝上,你可以与一名武将牌正面朝上的其他角色同时翻面,然后各摸两张牌', - hslingjian_yinmilichang_duanzao:'隐力', - hslingjian_yinmilichang_duanzao2:'隐', - hslingjian_yinmilichang_equip1_info:'每当你用杀造成一次伤害,你可以令一名其他角色获得潜行直到其下一回合开始', - hslingjian_yinmilichang_equip2_info:'每当你受到一次伤害,你本回合内获得潜行', - hslingjian_yinmilichang_equip3_info:'当你的体力值为1时,你的防御距离+1', - hslingjian_yinmilichang_equip4_info:'当你的体力值为1时,你的进攻距离+1', - hslingjian_yinmilichang_equip5_info:'当你没有手牌时,你不能成为杀或决斗的目标', - hslingjian_xingtigaizao_duanzao:'移形', - hslingjian_xingtigaizao_duanzao2:'形', - hslingjian_xingtigaizao_equip1_info:'每当你用杀造成一次伤害,你摸一张牌', - hslingjian_xingtigaizao_equip2_info:'每当你受到杀造成的伤害,你摸一张牌', - hslingjian_xingtigaizao_equip3_info:'你的防御距离+1,进攻距离-1', - hslingjian_xingtigaizao_equip4_info:'你的防御距离-1,进攻距离+1', - hslingjian_xingtigaizao_equip5_info:'你于摸牌阶段额外摸一张牌;你的手牌上限-1', - hslingjian_shengxiuhaojiao_duanzao:'号角', - hslingjian_shengxiuhaojiao_duanzao2:'角', - hslingjian_shengxiuhaojiao_equip1_info:'有嘲讽的角色不能闪避你的杀', - hslingjian_shengxiuhaojiao_equip2_info:'有嘲讽的角色不能对你使用杀', - hslingjian_shengxiuhaojiao_equip3_info:'若你的手牌数大于你的体力值,你的防御距离+1', - hslingjian_shengxiuhaojiao_equip4_info:'若你的手牌数大于你的体力值,你的进攻距离+1', - hslingjian_shengxiuhaojiao_equip5_info:'出牌阶段限一次,你可以弃置两张牌,然后令一名角色获得或解除嘲讽', - hslingjian_shijianhuisu_duanzao:'回溯', - hslingjian_shijianhuisu_duanzao2:'溯', - hslingjian_shijianhuisu_equip1_info:'当你装备一张防具牌时,你摸一张牌', - hslingjian_shijianhuisu_equip2_info:'当你装备一张武器牌时,你摸一张牌', - hslingjian_shijianhuisu_equip3_info:'当你的装备区内没有其他牌时,你的防御距离+1', - hslingjian_shijianhuisu_equip4_info:'当你的装备区内没有其他牌时,你的进攻距离+1', - hslingjian_shijianhuisu_equip5_info:'出牌阶段限一次,你可以弃置一张牌,然后令一名其他角色将其装备区内的牌收回手牌', - _lingjianduanzao:'煅造', - _lingjianduanzao_info:'出牌阶段,你可以将一张装备牌和一张可煅造的牌合成为一件强化装备,并可装备给距离1以内的一名角色', - jiguanshu:'机关鼠', - jiguanshu_info:'出牌阶段对自己使用,用随机祭器强化装备区内的一张随机装备,然后用随机零件强化其余的装备', - lingjiandai:'零件袋', - lingjiandai_info:'出牌阶段对自己使用,获得3张随机零件', - mujiaren:'木甲人', - mujiaren_info:'出牌阶段限用一次,获得一张随机机关牌,并将你手牌中的非基本牌替换为随机的机关牌', - jiguanyaoshu:'机关要术', - jiguanyaoshu_skill:'巧匠', - jiguanyaoshu_skill_info:'每当你于回合外失去装备区内的牌,你获得一个随机零件', - jiguanyaoshu_info:'出牌阶段对距离1以内的一名角色使用,目标随机装备一件装备牌并获得技能巧匠(每当你于回合外失去装备区内的牌,你获得一个随机零件)', - hslingjian:'零件', - hslingjian_xuanfengzhiren:'旋风之刃', - hslingjian_xuanfengzhiren_info:'可用于煅造装备;随机弃置一名角色的一张牌', - hslingjian_zhongxinghujia:'重型护甲', - hslingjian_zhongxinghujia_info:'可用于煅造装备;令一名角色装备一件随机防具,然后随机弃置其一张手牌', - hslingjian_jinjilengdong:'紧急冷冻', - hslingjian_jinjilengdong_info:'可用于煅造装备;令一名武将牌正面朝上的其他角色获得两点护甲并翻面,然后获得技能潜行直到武将牌翻回正面', - hslingjian_yinmilichang:'隐秘力场', - hslingjian_yinmilichang_info:'可用于煅造装备;令一名其他角色获得技能潜行,直到其下一回合开始', - hslingjian_xingtigaizao:'型体改造', - hslingjian_xingtigaizao_info:'可用于煅造装备;摸一张牌,本回合手牌上限-1', - hslingjian_shengxiuhaojiao:'生锈号角', - hslingjian_shengxiuhaojiao_info:'可用于煅造装备;令一名角色获得技能嘲讽,直到其下一回合开始', - hslingjian_shijianhuisu:'时间回溯', - hslingjian_shijianhuisu_info:'可用于煅造装备;令一名其他角色将其装备牌收回手牌', - hslingjian_chaofeng:'嘲讽', - hslingjian_chaofeng_info:'锁定技,若你的手牌数大于你的体力值,则只要你在任一其他角色的攻击范围内,该角色使用【杀】时便不能指定你以外的角色为目标', - qinglonglingzhu:'青龙灵珠', - qinglonglingzhu_ab:'灵珠', - qinglonglingzhu_info:'每当你造成一次属性伤害,你可以获得对方的一张牌', - xingjunyan:'星君眼', - xingjunyan_info:'你的杀造成的伤害+1;杀对你造成的伤害+1', - guiyanfadao:'鬼眼法刀', - guiyanfadao_bg:'眼', - guiyanfadao_info:'每当你使用杀命中目标,你可以防止伤害,改为令目标失去一点体力', - tianxianjiu:'天仙酒', - tianxianjiu_bg:'仙', - tianxianjiu_info:'出牌阶段对自己使用,你使用的下一张杀造成伤害后可以摸两张牌;濒死阶段,对自己使用,回复1点体力', - // xiangyuye:'翔羽叶', - // xiangyuye_info:'出牌阶段,对一名攻击范围外的角色使用,令其弃置一张黑色手牌或流失一点体力', - // huanpodan:'还魄丹', - // huanpodan_bg:'魄', - // huanpodan_info:'出牌阶段对一名角色使用,在目标即将死亡时防止其死亡,改为令其弃置所有牌,将体力值回复至1并摸一张牌', - // huanpodan_skill:'还魄丹', - // huanpodan_skill_bg:'丹', - // huanpodan_skill_info:'防止一次死亡,改为弃置所有牌,将体力值变为1并摸一张牌', - ximohu:'吸魔壶', - ximohu_bg:'魔', - // ximohu_info:'锁定技,你将即将受到的雷属性伤害转化为你的体力值', - sadengjinhuan:'萨登荆环', - sadengjinhuan_ab:'荆环', - sadengjinhuan_info:'当你的杀被闪避后,可以进行一次判定,若结果为红色目标需再打出一张闪', - sadengjinhuan_bg:'荆', - qipoguyu:'奇魄古玉', - xujin:'蓄劲', - xujin2:'蓄劲', - // qipoguyu_info:'装备后获得蓄劲技能', - xujin_info:'回合开始前,若你的蓄劲标记数小于当前的体力值,你可以跳过此回合,并获得一枚蓄劲标记。锁定技,每当你即将造成伤害,你令此伤害+X,然后弃置一枚蓄劲标记,X为你拥有的蓄劲标记数', - guilingzhitao:'归灵指套', - nigong:'逆攻', - nigong2:'逆攻', - nigong3:'逆攻', - nigong4:'逆攻', - guilingzhitao_info:'每当你受到一点伤害,你获得一个逆攻标记,标记数不能超过4。出牌阶段,你可以弃置所有逆攻标记并令对一名其他角色造成标记数一半的伤害(若非整数则向下取整并摸一张牌)', - nigong_info:'每当你受到一点伤害,你获得一个逆攻标记,标记数不能超过4。出牌阶段,你可以弃置所有逆攻标记并令对一名其他角色造成标记数一半的伤害(若非整数则向下取整并摸一张牌)', - baihupifeng:'白狐披风', - baihupifeng_bg:'狐', - baihupifeng_info:'结束阶段,若你的体力值是全场最小的之一,你可以回复一点体力', - fengxueren:'封雪刃', - fengxueren_bg:'雪', - fengxueren_info:'你使用杀击中目标后,若目标武将牌正面朝上,你可以防止伤害,然后令目标摸一张牌并翻面', - chilongya:'赤龙牙', - chilongya_info:'锁定技,你的火属性伤害+1', - daihuofenglun:'带火风轮', - daihuofenglun_ab:'风轮', - daihuofenglun_bg:'轮', - daihuofenglun_info:'你的进攻距离+2,你的防御距离-1', - xiayuncailing:'霞云彩绫', - xiayuncailing_ab:'彩绫', - xiayuncailing_bg:'云', - xiayuncailing_info:'你的进攻距离-1,你的防御距离+2', - shentoumianju:'神偷面具', - shentoumianju_bg:'偷', - shentoumianju_info:'出牌阶段,你可以指定一名手牌比你多的角色,弃置一张手牌并进行一次判定,若结果不为梅花,你获得其一张手牌', - shentou:'神偷', - shentou_info:'出牌阶段,你可以进行一次判定,若结果不为梅花,你获得任意一名角色的一张手牌', - pusafazhou:'菩萨发咒', - pusafazhou_bg:'发', - // pusafazhou_info:'令你抵挡一次死亡,将体力回复至1,并摸一张牌', - xianluhui:'仙炉灰', - xianluhui_info:'令所有已受伤角色获得一点护甲', - caoyao:'草药', - caoyao_info:'出牌阶段,对距离为1以内的角色使用,回复一点体力。', - langeguaiyi:'蓝格怪衣', - langeguaiyi_bg:'格', - langeguaiyi_info:'出牌阶段限一次,你可以进行一次判定,然后按花色执行以下效果。红桃:你回复一点体力;方片:你摸一张牌;梅花:你弃置一名其他角色的一张牌;黑桃:无事发生', - longfan:'龙帆', - longfan_info:'出牌阶段限一次,你可以进行一次判定,然后按花色执行以下效果。红桃:你回复一点体力;方片:你摸一张牌;梅花:你弃置一名其他角色的一张牌;黑桃:无事发生', - // longfan_info:'0000:翻面;1111:弃手牌;2222:弃装备牌;3333:受伤害;4444:流失体力;5555:连环;6666:摸牌;7777:回复体力;8888:弃置判定牌;9999:置衡', - guiyoujie:'鬼幽结', - guiyoujie_info:'出牌阶段,对一名其他角色使用。若判定结果为黑色,其摸一张牌并翻面。', - yufulu:'御夫录', - yufulu_info:'出牌阶段,可弃置一张武器牌令一名角色受到一点伤害,然后该角色获得此武器牌', - touzhi:'投掷', - touzhi_info:'出牌阶段,可弃置一张武器牌令一名角色受到一点伤害,然后该角色获得此武器牌', - xixueguizhihuan:'吸血鬼指环', - xixueguizhihuan_info:'锁定技,每当你使用杀造成一点伤害,你回复一点体力', - xixue:'吸血', - xixue_info:'锁定技,每当你使用杀造成一点伤害,你回复一点体力', - zhufangshenshi:'祠符', - zhufangshenshi_info:'出牌阶段,对一名其他角色使用,本回合内对其使用卡牌无视距离,结算后摸一张牌', - jingleishan:'惊雷闪', - jingleishan_info:'出牌阶段,对所有其他角色使用。每名目标角色需打出一张【杀】,否则受到1点雷电伤害。', - chiyuxi:'炽羽袭', - chiyuxi_info:'出牌阶段,对所有其他角色使用。每名目标角色需打出一张【闪】,否则受到1点火焰伤害。', - guangshatianyi:'光纱天衣', - guangshatianyi_bg:'纱', - guangshatianyi_info:'锁定技,每当你即将受到伤害,有三分之一的概率令伤害减一', - sifeizhenmian:'四非真面', - sifeizhenmian_info:'出牌阶段限一次,若你没翻面,你可以弃置一张牌并指定一名其他角色进行判定,若结果为黑色,你翻面,该角色进入混乱状态直到下一回合结束;若结果为红色,你与其各摸一张牌', - yiluan:'意乱', - yiluan_info:'出牌阶段限一次,若你没翻面,你可以弃置一张牌并指定一名其他角色进行判定,若结果为黑色,你翻面,该角色进入混乱状态直到下一回合结束;若结果为红色,你与其各摸一张牌', - donghuangzhong:'东皇钟', - xuanyuanjian:'轩辕剑', - xuanyuanjian2:'轩辕剑', - pangufu:'盘古斧', - lianyaohu:'炼妖壶', - lianyaohu_skill:'炼妖壶', - lianyaohu_skill_bg:'壶', - haotianta:'昊天塔', - fuxiqin:'伏羲琴', - shennongding:'神农鼎', - kongdongyin:'崆峒印', - kunlunjingc:'昆仑镜', - nvwashi:'女娲石', - donghuangzhong_bg:'钟', - lianyaohu_bg:'壶', - haotianta_bg:'塔', - fuxiqin_bg:'琴', - shennongding_bg:'鼎', - kongdongyin_bg:'印', - kunlunjingc_bg:'镜', - nvwashi_bg:'石', - kongxin:'控心', - lianhua:'炼化', - // dujian:'毒箭', - // dujian_info:'出牌阶段,对一名有手牌或装备牌的角色使用,令其展示一张手牌,若与你选择的手牌颜色相同,其流失一点体力', - lianhua_info:'出牌阶段限一次,你可以弃置两张炼妖壶中的牌,从牌堆中获得一张与弃置的牌类别均不相同的牌', - shouna:'收纳', - shouna_info:'出牌阶段限一次,你可以弃置一张手牌,并将一名其他角色的一张手牌置入炼妖壶', - donghuangzhong_info:'结束阶段,你可以弃置一张手牌,并选择一名角色将一张随机单体延时锦囊置入其判定区', - xuanyuanjian_info:'装备时获得一点护甲;每当你即将造成一次伤害,你令此伤害加一并变为雷属性,并在伤害结算后流失一点体力。任何时候,若你体力值不超过2,则立即失去轩辕剑', - pangufu_info:'锁定技,每当你造成一次伤害,受伤角色须弃置一张牌', - haotianta_info:'锁定技,任意一名角色进行判定前,你观看牌堆顶的2张牌,并选择一张作为判定结果,此结果不可被更改,也不能触发技能', - shennongding_info:'出牌阶段,你可以弃置两张手牌,然后回复一点体力。每阶段限一次', - kongdongyin_info:'令你抵挡一次死亡,将体力回复至1,并摸一张牌,发动后进入弃牌堆', - kunlunjingc_info:'出牌阶段限一次,你可以观看牌堆顶的三张牌,然后用一张手牌替换其中的一张', - nvwashi_info:'当一名角色濒死时,若你的体力值大于1,你可以失去一点体力并令其回复一点体力', - kongxin_info:'出牌阶段限一次,你可以与一名其他角色进行拼点,若你赢,你可以指定另一名角色视为对方对该角色使用一张杀,否则对方可弃置你一张牌', - fuxiqin_info:'出牌阶段限一次,你可以与一名其他角色进行拼点,若你赢,你可以指定另一名角色视为对方对该角色使用一张杀,否则对方可弃置你一张牌', - lianyaohu_info:'出牌阶段各限一次,你可以选择一项:1.弃置一张手牌,并将一名其他角色的一张手牌置入炼妖壶;2.弃置两张炼妖壶中的牌,从牌堆中获得一张与弃置的牌类别均不相同的牌', - }, - list:[ - ['spade',1,'baihupifeng'], - ['club',1,'fengxueren'], - ['diamond',1,'langeguaiyi'], - ['heart',1,'daihuofenglun','fire'], + guisheqi:'龟蛇旗', + guisheqi_info:'出牌阶段对一名角色使用,目标获得一点护甲', + jiguanfeng:'机关蜂', + jiguanfeng_info:'出牌阶段对一名其他角色使用,目标需打出一张闪,否则非锁定技失效直到下一回合开始,并受到一点伤害', + jiguanyuan:'机关鸢', + jiguanyuan_info:'出牌阶段对一名其他角色使用,你将此牌和一张其它牌置于一名其他角色的武将牌上,然后摸一张牌;该角色于下一结束阶段获得武将牌上的牌', + jiguantong:'机关火筒', + jiguantong_ab:'火筒', + jiguantong_info:'出牌阶段对所有其他角色使用,目标弃置一张手牌,或受到一点火焰伤害;若没有人因此受到伤害,使用者摸一张牌', + jiutiansuanchi:'九天算尺', + jiutiansuanchi_info:'每当你使用杀造成伤害,你可以弃置一张牌并展示受伤害角色的一张手牌,若此牌与你弃置的牌花色或点数相同,此杀的伤害+2', + shenmiguo:'神秘果', + shenmiguo_info:'出牌阶段内,当你使用一张基本牌或普通锦囊牌后使用,令此牌再结算一次。每阶段限用一次', + qinglianxindeng:'青莲心灯', + qinglianxindeng_info:'你防止锦囊牌造成的伤害', + hslingjian_xuanfengzhiren_duanzao:'风刃', + hslingjian_xuanfengzhiren_duanzao2:'风', + hslingjian_xuanfengzhiren_equip1_info:'每当你用杀造成一次伤害,受伤害角色随机弃置一张牌', + hslingjian_xuanfengzhiren_equip2_info:'每当你受到杀造成的伤害,伤害来源随机弃置一张牌', + hslingjian_xuanfengzhiren_equip3_info:'当你于回合外失去牌后,你本回合的防御距离+1', + hslingjian_xuanfengzhiren_equip4_info:'当你于回合内失去牌后,你本回合的进攻距离+1', + hslingjian_xuanfengzhiren_equip5_info:'出牌阶段限一次,你可以弃置一张牌,然后随机弃置一名其他角色的一张牌', + hslingjian_zhongxinghujia_duanzao:'重甲', + hslingjian_zhongxinghujia_duanzao2:'护', + hslingjian_zhongxinghujia_equip1_info:'每当你用杀造成一次伤害,你可以随机装备一件防具牌', + hslingjian_zhongxinghujia_equip2_info:'每当你受到杀造成的伤害,你可以弃置伤害来源的防具牌', + hslingjian_zhongxinghujia_equip3_info:'当你的装备区内有防具牌时,你的防御距离+1', + hslingjian_zhongxinghujia_equip4_info:'当你的装备区内有防具牌时,你的进攻距离+1', + hslingjian_zhongxinghujia_equip5_info:'出牌阶段限一次,你可以弃置两张牌,然后令一名角色随机装备一件防具', + hslingjian_jinjilengdong_duanzao:'冰冻', + hslingjian_jinjilengdong_duanzao2:'冰', + hslingjian_jinjilengdong_equip1_info:'每当你用杀造成一次伤害,你可以令目标摸两张牌并翻面', + hslingjian_jinjilengdong_equip2_info:'每当你受到杀造成的伤害,你可以令伤害来源摸两张牌并翻面', + hslingjian_jinjilengdong_equip3_info:'你的武将牌背面朝上时防御距离+2', + hslingjian_jinjilengdong_equip4_info:'你的武将牌背面朝上时进攻距离+2', + hslingjian_jinjilengdong_equip5_info:'回合结束后,若你的武将牌正面朝上,你可以与一名武将牌正面朝上的其他角色同时翻面,然后各摸两张牌', + hslingjian_yinmilichang_duanzao:'隐力', + hslingjian_yinmilichang_duanzao2:'隐', + hslingjian_yinmilichang_equip1_info:'每当你用杀造成一次伤害,你可以令一名其他角色获得潜行直到其下一回合开始', + hslingjian_yinmilichang_equip2_info:'每当你受到一次伤害,你本回合内获得潜行', + hslingjian_yinmilichang_equip3_info:'当你的体力值为1时,你的防御距离+1', + hslingjian_yinmilichang_equip4_info:'当你的体力值为1时,你的进攻距离+1', + hslingjian_yinmilichang_equip5_info:'当你没有手牌时,你不能成为杀或决斗的目标', + hslingjian_xingtigaizao_duanzao:'移形', + hslingjian_xingtigaizao_duanzao2:'形', + hslingjian_xingtigaizao_equip1_info:'每当你用杀造成一次伤害,你摸一张牌', + hslingjian_xingtigaizao_equip2_info:'每当你受到杀造成的伤害,你摸一张牌', + hslingjian_xingtigaizao_equip3_info:'你的防御距离+1,进攻距离-1', + hslingjian_xingtigaizao_equip4_info:'你的防御距离-1,进攻距离+1', + hslingjian_xingtigaizao_equip5_info:'你于摸牌阶段额外摸一张牌;你的手牌上限-1', + hslingjian_shengxiuhaojiao_duanzao:'号角', + hslingjian_shengxiuhaojiao_duanzao2:'角', + hslingjian_shengxiuhaojiao_equip1_info:'有嘲讽的角色不能闪避你的杀', + hslingjian_shengxiuhaojiao_equip2_info:'有嘲讽的角色不能对你使用杀', + hslingjian_shengxiuhaojiao_equip3_info:'若你的手牌数大于你的体力值,你的防御距离+1', + hslingjian_shengxiuhaojiao_equip4_info:'若你的手牌数大于你的体力值,你的进攻距离+1', + hslingjian_shengxiuhaojiao_equip5_info:'出牌阶段限一次,你可以弃置两张牌,然后令一名角色获得或解除嘲讽', + hslingjian_shijianhuisu_duanzao:'回溯', + hslingjian_shijianhuisu_duanzao2:'溯', + hslingjian_shijianhuisu_equip1_info:'当你装备一张防具牌时,你摸一张牌', + hslingjian_shijianhuisu_equip2_info:'当你装备一张武器牌时,你摸一张牌', + hslingjian_shijianhuisu_equip3_info:'当你的装备区内没有其他牌时,你的防御距离+1', + hslingjian_shijianhuisu_equip4_info:'当你的装备区内没有其他牌时,你的进攻距离+1', + hslingjian_shijianhuisu_equip5_info:'出牌阶段限一次,你可以弃置一张牌,然后令一名其他角色将其装备区内的牌收回手牌', + _lingjianduanzao:'煅造', + _lingjianduanzao_info:'出牌阶段,你可以将一张装备牌和一张可煅造的牌合成为一件强化装备,并可装备给距离1以内的一名角色', + jiguanshu:'机关鼠', + jiguanshu_info:'出牌阶段对自己使用,用随机祭器强化装备区内的一张随机装备,然后用随机零件强化其余的装备', + lingjiandai:'零件袋', + lingjiandai_info:'出牌阶段对自己使用,获得3张随机零件', + mujiaren:'木甲人', + mujiaren_info:'出牌阶段限用一次,获得一张随机机关牌,并将你手牌中的非基本牌替换为随机的机关牌', + jiguanyaoshu:'机关要术', + jiguanyaoshu_skill:'巧匠', + jiguanyaoshu_skill_info:'每当你于回合外失去装备区内的牌,你获得一个随机零件', + jiguanyaoshu_info:'出牌阶段对距离1以内的一名角色使用,目标随机装备一件装备牌并获得技能巧匠(每当你于回合外失去装备区内的牌,你获得一个随机零件)', + hslingjian:'零件', + hslingjian_xuanfengzhiren:'旋风之刃', + hslingjian_xuanfengzhiren_info:'可用于煅造装备;随机弃置一名角色的一张牌', + hslingjian_zhongxinghujia:'重型护甲', + hslingjian_zhongxinghujia_info:'可用于煅造装备;令一名角色装备一件随机防具,然后随机弃置其一张手牌', + hslingjian_jinjilengdong:'紧急冷冻', + hslingjian_jinjilengdong_info:'可用于煅造装备;令一名武将牌正面朝上的其他角色获得两点护甲并翻面,然后获得技能潜行直到武将牌翻回正面', + hslingjian_yinmilichang:'隐秘力场', + hslingjian_yinmilichang_info:'可用于煅造装备;令一名其他角色获得技能潜行,直到其下一回合开始', + hslingjian_xingtigaizao:'型体改造', + hslingjian_xingtigaizao_info:'可用于煅造装备;摸一张牌,本回合手牌上限-1', + hslingjian_shengxiuhaojiao:'生锈号角', + hslingjian_shengxiuhaojiao_info:'可用于煅造装备;令一名角色获得技能嘲讽,直到其下一回合开始', + hslingjian_shijianhuisu:'时间回溯', + hslingjian_shijianhuisu_info:'可用于煅造装备;令一名其他角色将其装备牌收回手牌', + hslingjian_chaofeng:'嘲讽', + hslingjian_chaofeng_info:'锁定技,若你的手牌数大于你的体力值,则只要你在任一其他角色的攻击范围内,该角色使用【杀】时便不能指定你以外的角色为目标', + qinglonglingzhu:'青龙灵珠', + qinglonglingzhu_ab:'灵珠', + qinglonglingzhu_info:'每当你造成一次属性伤害,你可以获得对方的一张牌', + xingjunyan:'星君眼', + xingjunyan_info:'你的杀造成的伤害+1;杀对你造成的伤害+1', + guiyanfadao:'鬼眼法刀', + guiyanfadao_bg:'眼', + guiyanfadao_info:'每当你使用杀命中目标,你可以防止伤害,改为令目标失去一点体力', + tianxianjiu:'天仙酒', + tianxianjiu_bg:'仙', + tianxianjiu_info:'出牌阶段对自己使用,你使用的下一张杀造成伤害后可以摸两张牌;濒死阶段,对自己使用,回复1点体力', + // xiangyuye:'翔羽叶', + // xiangyuye_info:'出牌阶段,对一名攻击范围外的角色使用,令其弃置一张黑色手牌或流失一点体力', + // huanpodan:'还魄丹', + // huanpodan_bg:'魄', + // huanpodan_info:'出牌阶段对一名角色使用,在目标即将死亡时防止其死亡,改为令其弃置所有牌,将体力值回复至1并摸一张牌', + // huanpodan_skill:'还魄丹', + // huanpodan_skill_bg:'丹', + // huanpodan_skill_info:'防止一次死亡,改为弃置所有牌,将体力值变为1并摸一张牌', + ximohu:'吸魔壶', + ximohu_bg:'魔', + // ximohu_info:'锁定技,你将即将受到的雷属性伤害转化为你的体力值', + sadengjinhuan:'萨登荆环', + sadengjinhuan_ab:'荆环', + sadengjinhuan_info:'当你的杀被闪避后,可以进行一次判定,若结果为红色目标需再打出一张闪', + sadengjinhuan_bg:'荆', + qipoguyu:'奇魄古玉', + xujin:'蓄劲', + xujin2:'蓄劲', + // qipoguyu_info:'装备后获得蓄劲技能', + xujin_info:'回合开始前,若你的蓄劲标记数小于当前的体力值,你可以跳过此回合,并获得一枚蓄劲标记。锁定技,每当你即将造成伤害,你令此伤害+X,然后弃置一枚蓄劲标记,X为你拥有的蓄劲标记数', + guilingzhitao:'归灵指套', + nigong:'逆攻', + nigong2:'逆攻', + nigong3:'逆攻', + nigong4:'逆攻', + guilingzhitao_info:'每当你受到一点伤害,你获得一个逆攻标记,标记数不能超过4。出牌阶段,你可以弃置所有逆攻标记并令对一名其他角色造成标记数一半的伤害(若非整数则向下取整并摸一张牌)', + nigong_info:'每当你受到一点伤害,你获得一个逆攻标记,标记数不能超过4。出牌阶段,你可以弃置所有逆攻标记并令对一名其他角色造成标记数一半的伤害(若非整数则向下取整并摸一张牌)', + baihupifeng:'白狐披风', + baihupifeng_bg:'狐', + baihupifeng_info:'结束阶段,若你的体力值是全场最小的之一,你可以回复一点体力', + fengxueren:'封雪刃', + fengxueren_bg:'雪', + fengxueren_info:'你使用杀击中目标后,若目标武将牌正面朝上,你可以防止伤害,然后令目标摸一张牌并翻面', + chilongya:'赤龙牙', + chilongya_info:'锁定技,你的火属性伤害+1', + daihuofenglun:'带火风轮', + daihuofenglun_ab:'风轮', + daihuofenglun_bg:'轮', + daihuofenglun_info:'你的进攻距离+2,你的防御距离-1', + xiayuncailing:'霞云彩绫', + xiayuncailing_ab:'彩绫', + xiayuncailing_bg:'云', + xiayuncailing_info:'你的进攻距离-1,你的防御距离+2', + shentoumianju:'神偷面具', + shentoumianju_bg:'偷', + shentoumianju_info:'出牌阶段,你可以指定一名手牌比你多的角色,弃置一张手牌并进行一次判定,若结果不为梅花,你获得其一张手牌', + shentou:'神偷', + shentou_info:'出牌阶段,你可以进行一次判定,若结果不为梅花,你获得任意一名角色的一张手牌', + pusafazhou:'菩萨发咒', + pusafazhou_bg:'发', + // pusafazhou_info:'令你抵挡一次死亡,将体力回复至1,并摸一张牌', + xianluhui:'仙炉灰', + xianluhui_info:'令所有已受伤角色获得一点护甲', + caoyao:'草药', + caoyao_info:'出牌阶段,对距离为1以内的角色使用,回复一点体力。', + langeguaiyi:'蓝格怪衣', + langeguaiyi_bg:'格', + langeguaiyi_info:'出牌阶段限一次,你可以进行一次判定,然后按花色执行以下效果。红桃:你回复一点体力;方片:你摸一张牌;梅花:你弃置一名其他角色的一张牌;黑桃:无事发生', + longfan:'龙帆', + longfan_info:'出牌阶段限一次,你可以进行一次判定,然后按花色执行以下效果。红桃:你回复一点体力;方片:你摸一张牌;梅花:你弃置一名其他角色的一张牌;黑桃:无事发生', + // longfan_info:'0000:翻面;1111:弃手牌;2222:弃装备牌;3333:受伤害;4444:流失体力;5555:连环;6666:摸牌;7777:回复体力;8888:弃置判定牌;9999:置衡', + guiyoujie:'鬼幽结', + guiyoujie_info:'出牌阶段,对一名其他角色使用。若判定结果为黑色,其摸一张牌并翻面。', + yufulu:'御夫录', + yufulu_info:'出牌阶段,可弃置一张武器牌令一名角色受到一点伤害,然后该角色获得此武器牌', + touzhi:'投掷', + touzhi_info:'出牌阶段,可弃置一张武器牌令一名角色受到一点伤害,然后该角色获得此武器牌', + xixueguizhihuan:'吸血鬼指环', + xixueguizhihuan_info:'锁定技,每当你使用杀造成一点伤害,你回复一点体力', + xixue:'吸血', + xixue_info:'锁定技,每当你使用杀造成一点伤害,你回复一点体力', + zhufangshenshi:'祠符', + zhufangshenshi_info:'出牌阶段,对一名其他角色使用,本回合内对其使用卡牌无视距离,结算后摸一张牌', + jingleishan:'惊雷闪', + jingleishan_info:'出牌阶段,对所有其他角色使用。每名目标角色需打出一张【杀】,否则受到1点雷电伤害。', + chiyuxi:'炽羽袭', + chiyuxi_info:'出牌阶段,对所有其他角色使用。每名目标角色需打出一张【闪】,否则受到1点火焰伤害。', + guangshatianyi:'光纱天衣', + guangshatianyi_bg:'纱', + guangshatianyi_info:'锁定技,每当你即将受到伤害,有三分之一的概率令伤害减一', + sifeizhenmian:'四非真面', + sifeizhenmian_info:'出牌阶段限一次,若你没翻面,你可以弃置一张牌并指定一名其他角色进行判定,若结果为黑色,你翻面,该角色进入混乱状态直到下一回合结束;若结果为红色,你与其各摸一张牌', + yiluan:'意乱', + yiluan_info:'出牌阶段限一次,若你没翻面,你可以弃置一张牌并指定一名其他角色进行判定,若结果为黑色,你翻面,该角色进入混乱状态直到下一回合结束;若结果为红色,你与其各摸一张牌', + donghuangzhong:'东皇钟', + xuanyuanjian:'轩辕剑', + xuanyuanjian2:'轩辕剑', + pangufu:'盘古斧', + lianyaohu:'炼妖壶', + lianyaohu_skill:'炼妖壶', + lianyaohu_skill_bg:'壶', + haotianta:'昊天塔', + fuxiqin:'伏羲琴', + shennongding:'神农鼎', + kongdongyin:'崆峒印', + kunlunjingc:'昆仑镜', + nvwashi:'女娲石', + donghuangzhong_bg:'钟', + lianyaohu_bg:'壶', + haotianta_bg:'塔', + fuxiqin_bg:'琴', + shennongding_bg:'鼎', + kongdongyin_bg:'印', + kunlunjingc_bg:'镜', + nvwashi_bg:'石', + kongxin:'控心', + lianhua:'炼化', + // dujian:'毒箭', + // dujian_info:'出牌阶段,对一名有手牌或装备牌的角色使用,令其展示一张手牌,若与你选择的手牌颜色相同,其流失一点体力', + lianhua_info:'出牌阶段限一次,你可以弃置两张炼妖壶中的牌,从牌堆中获得一张与弃置的牌类别均不相同的牌', + shouna:'收纳', + shouna_info:'出牌阶段限一次,你可以弃置一张手牌,并将一名其他角色的一张手牌置入炼妖壶', + donghuangzhong_info:'结束阶段,你可以弃置一张手牌,并选择一名角色将一张随机单体延时锦囊置入其判定区', + xuanyuanjian_info:'装备时获得一点护甲;每当你即将造成一次伤害,你令此伤害加一并变为雷属性,并在伤害结算后流失一点体力。任何时候,若你体力值不超过2,则立即失去轩辕剑', + pangufu_info:'锁定技,每当你造成一次伤害,受伤角色须弃置一张牌', + haotianta_info:'锁定技,任意一名角色进行判定前,你观看牌堆顶的2张牌,并选择一张作为判定结果,此结果不可被更改,也不能触发技能', + shennongding_info:'出牌阶段,你可以弃置两张手牌,然后回复一点体力。每阶段限一次', + kongdongyin_info:'令你抵挡一次死亡,将体力回复至1,并摸一张牌,发动后进入弃牌堆', + kunlunjingc_info:'出牌阶段限一次,你可以观看牌堆顶的三张牌,然后用一张手牌替换其中的一张', + nvwashi_info:'当一名角色濒死时,若你的体力值大于1,你可以失去一点体力并令其回复一点体力', + kongxin_info:'出牌阶段限一次,你可以与一名其他角色进行拼点,若你赢,你可以指定另一名角色视为对方对该角色使用一张杀,否则对方可弃置你一张牌', + fuxiqin_info:'出牌阶段限一次,你可以与一名其他角色进行拼点,若你赢,你可以指定另一名角色视为对方对该角色使用一张杀,否则对方可弃置你一张牌', + lianyaohu_info:'出牌阶段各限一次,你可以选择一项:1.弃置一张手牌,并将一名其他角色的一张手牌置入炼妖壶;2.弃置两张炼妖壶中的牌,从牌堆中获得一张与弃置的牌类别均不相同的牌', + }, + list:[ + ['spade',1,'baihupifeng'], + ['club',1,'fengxueren'], + ['diamond',1,'langeguaiyi'], + ['heart',1,'daihuofenglun','fire'], - ['diamond',2,'xiayuncailing'], - // ['heart',2,'pantao'], - // ['heart',2,'huanpodan'], + ['diamond',2,'xiayuncailing'], + // ['heart',2,'pantao'], + // ['heart',2,'huanpodan'], - ['club',3,'caoyao'], - ['diamond',3,'chilongya','fire'], - ['spade',3,'guiyoujie'], + ['club',3,'caoyao'], + ['diamond',3,'chilongya','fire'], + ['spade',3,'guiyoujie'], - ['club',4,'caoyao'], - ['spade',4,'zhufangshenshi'], - // ['spade',4,'huanpodan'], + ['club',4,'caoyao'], + ['spade',4,'zhufangshenshi'], + // ['spade',4,'huanpodan'], - ['club',5,'caoyao'], - ['spade',5,'xixueguizhihuan'], - // ['diamond',5,'huanpodan'], + ['club',5,'caoyao'], + ['spade',5,'xixueguizhihuan'], + // ['diamond',5,'huanpodan'], - ['club',6,'shentoumianju'], - ['spade',6,'yufulu'], + ['club',6,'shentoumianju'], + ['spade',6,'yufulu'], - ['diamond',7,'chiyuxi','fire'], - ['club',7,'jingleishan','thunder'], - ['spade',7,'guilingzhitao'], + ['diamond',7,'chiyuxi','fire'], + ['club',7,'jingleishan','thunder'], + ['spade',7,'guilingzhitao'], - ['spade',8,'zhufangshenshi'], - // ['club',8,'xiangyuye','poison'], + ['spade',8,'zhufangshenshi'], + // ['club',8,'xiangyuye','poison'], - ['spade',9,'yangpijuan'], - ['club',9,'guiyoujie'], - // ['diamond',9,'xiangyuye','poison'], + ['spade',9,'yangpijuan'], + ['club',9,'guiyoujie'], + // ['diamond',9,'xiangyuye','poison'], - // ['diamond',9,'tianxianjiu'], - ['heart',9,'tianxianjiu'], - ['diamond',2,'tianxianjiu'], + // ['diamond',9,'tianxianjiu'], + ['heart',9,'tianxianjiu'], + ['diamond',2,'tianxianjiu'], - ['spade',2,'qinglonglingzhu'], - ['spade',7,'xingjunyan'], + ['spade',2,'qinglonglingzhu'], + ['spade',7,'xingjunyan'], - //['spade',10,'qipoguyu'], - //['diamond',10,'xiangyuye','poison'], - ['club',7,'yangpijuan'], + //['spade',10,'qipoguyu'], + //['diamond',10,'xiangyuye','poison'], + ['club',7,'yangpijuan'], - // ['spade',11,'xiangyuye','poison'], + // ['spade',11,'xiangyuye','poison'], - ['spade',12,'guiyanfadao','poison'], + ['spade',12,'guiyanfadao','poison'], - ['spade',13,'xianluhui'], - ['diamond',3,'guangshatianyi'], - ['club',13,'sadengjinhuan'], + ['spade',13,'xianluhui'], + ['diamond',3,'guangshatianyi'], + ['club',13,'sadengjinhuan'], - ['club',2,'lingjiandai'], - ['spade',3,'lingjiandai'], - ['heart',5,'lingjiandai'], - ['diamond',8,'lingjiandai'], + ['club',2,'lingjiandai'], + ['spade',3,'lingjiandai'], + ['heart',5,'lingjiandai'], + ['diamond',8,'lingjiandai'], - ['club',2,'jiguanshu'], - // ['spade',2,'jiguanshu'], - // ['heart',2,'jiguanshu'], - ['diamond',2,'jiguanshu'], + ['club',2,'jiguanshu'], + // ['spade',2,'jiguanshu'], + // ['heart',2,'jiguanshu'], + ['diamond',2,'jiguanshu'], - ['club',3,'jiguanyaoshu'], - ['spade',3,'jiguanyaoshu'], - // ['heart',3,'jiguanyaoshu'], - // ['diamond',3,'jiguanyaoshu'], + ['club',3,'jiguanyaoshu'], + ['spade',3,'jiguanyaoshu'], + // ['heart',3,'jiguanyaoshu'], + // ['diamond',3,'jiguanyaoshu'], - ['spade',4,'sifeizhenmian'], - ['heart',13,'qinglianxindeng'], - ['club',3,'jiguanyuan'], - ['diamond',2,'jiguanyuan'], - ['diamond',4,'jiguantong'], - ['club',7,'jiguantong'], - ['spade',1,'shenmiguo'], - ['spade',2,'shenmiguo'], - ['heart',1,'shenmiguo'], - ['club',3,'jiguanfeng'], - ['spade',4,'jiguanfeng'], - ['spade',9,'guisheqi'], - ['club',7,'guisheqi'], + ['spade',4,'sifeizhenmian'], + ['heart',13,'qinglianxindeng'], + ['club',3,'jiguanyuan'], + ['diamond',2,'jiguanyuan'], + ['diamond',4,'jiguantong'], + ['club',7,'jiguantong'], + ['spade',1,'shenmiguo'], + ['spade',2,'shenmiguo'], + ['heart',1,'shenmiguo'], + ['club',3,'jiguanfeng'], + ['spade',4,'jiguanfeng'], + ['spade',9,'guisheqi'], + ['club',7,'guisheqi'], - ['diamond',13,'donghuangzhong'], - ['diamond',13,'fuxiqin'], - ['spade',13,'kunlunjingc'], - ['spade',13,'xuanyuanjian'], - ['spade',13,'pangufu'], - ['club',13,'lianyaohu'], - ['diamond',13,'haotianta'], - ['club',13,'shennongding'], - ['heart',13,'nvwashi'], - ['heart',13,'kongdongyin'], + ['diamond',13,'donghuangzhong'], + ['diamond',13,'fuxiqin'], + ['spade',13,'kunlunjingc'], + ['spade',13,'xuanyuanjian'], + ['spade',13,'pangufu'], + ['club',13,'lianyaohu'], + ['diamond',13,'haotianta'], + ['club',13,'shennongding'], + ['heart',13,'nvwashi'], + ['heart',13,'kongdongyin'], - ['heart',6,'qinglongzhigui'], - ['diamond',6,'zhuquezhizhang'], - ['spade',6,'baishouzhihu'], - ['club',6,'xuanwuzhihuang'], - ['spade',7,'cangchizhibi'], - ['heart',5,'huanglinzhicong'], + ['heart',6,'qinglongzhigui'], + ['diamond',6,'zhuquezhizhang'], + ['spade',6,'baishouzhihu'], + ['club',6,'xuanwuzhihuang'], + ['spade',7,'cangchizhibi'], + ['heart',5,'huanglinzhicong'], - ['spade',9,'gouhunluo'], - ['club',7,'gouhunluo'], + ['spade',9,'gouhunluo'], + ['club',7,'gouhunluo'], - ['spade',1,'xuejibingbao'], - ['club',1,'xuejibingbao'], + ['spade',1,'xuejibingbao'], + ['club',1,'xuejibingbao'], - ['heart',3,'zhiluxiaohu'], - ['diamond',4,'zhiluxiaohu'], + ['heart',3,'zhiluxiaohu'], + ['diamond',4,'zhiluxiaohu'], - ['club',7,'mujiaren'], - ['heart',6,'mujiaren'], - ['diamond',11,'mujiaren'], + ['club',7,'mujiaren'], + ['heart',6,'mujiaren'], + ['diamond',11,'mujiaren'], - ['club',6,'shuchui'], + ['club',6,'shuchui'], - // ['club',1,'fengyinzhidan'], - // ['diamond',1,'fengyinzhidan'], - ['heart',1,'fengyinzhidan'], - ['spade',1,'fengyinzhidan'], + // ['club',1,'fengyinzhidan'], + // ['diamond',1,'fengyinzhidan'], + ['heart',1,'fengyinzhidan'], + ['spade',1,'fengyinzhidan'], - ['heart',9,'yuruyi'], + ['heart',9,'yuruyi'], - ['club',4,'shencaojie'], - ['diamond',4,'shencaojie'], - ['spade',4,'shencaojie'], + ['club',4,'shencaojie'], + ['diamond',4,'shencaojie'], + ['spade',4,'shencaojie'], - ['spade',1,'yuchanqian'], - ['club',2,'yuchankun'], - ['diamond',3,'yuchanzhen'], - ['heart',4,'yuchanxun'], - ['spade',5,'yuchankan'], - ['club',6,'yuchanli'], - ['diamond',7,'yuchangen'], - ['heart',8,'yuchandui'], + ['spade',1,'yuchanqian'], + ['club',2,'yuchankun'], + ['diamond',3,'yuchanzhen'], + ['heart',4,'yuchanxun'], + ['spade',5,'yuchankan'], + ['club',6,'yuchanli'], + ['diamond',7,'yuchangen'], + ['heart',8,'yuchandui'], - // ['spade',3,'dujian','poison'], - // ['club',11,'dujian','poison'], - // ['club',12,'dujian','poison'], - ], + // ['spade',3,'dujian','poison'], + // ['club',11,'dujian','poison'], + // ['club',12,'dujian','poison'], + ], + }; }); diff --git a/card/yunchou.js b/card/yunchou.js index bd1640f1c..bb0eac91c 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -1,803 +1,838 @@ 'use strict'; -game.import('card',{ - name:'yunchou', - card:{ - diaobingqianjiang:{ - fullskin:true, - type:'trick', - enable:true, - selectTarget:-1, - filterTarget:function(card,player,target){ - return player==target||target.countCards('h'); - }, - contentBefore:function(){ - "step 0" - game.delay(); - player.draw(); - "step 1" - 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(3); - } - "step 2" - 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 3" - ui.clear(); - var cards=get.cards(Math.ceil(game.countPlayer()/2)); - var dialog=ui.create.dialog('调兵遣将',cards,true); - _status.dieClose.push(dialog); - dialog.videoId=lib.status.videoId++; - game.addVideo('cardDialog',null,['调兵遣将',get.cardsInfo(cards),dialog.videoId]); - event.getParent().preResult=dialog.videoId; - }, - content:function(){ - "step 0" - for(var i=0;i0){ - return get.value(button.link,nextSeat)-5; +game.import('card',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'yunchou', + card:{ + diaobingqianjiang:{ + fullskin:true, + type:'trick', + enable:true, + selectTarget:-1, + filterTarget:function(card,player,target){ + return player==target||target.countCards('h'); + }, + contentBefore:function(){ + "step 0" + game.delay(); + player.draw(); + "step 1" + if(get.is.versus()){ + player.chooseControl('顺时针','逆时针',function(event,player){ + if(player.next.side==player.side) return '逆时针'; + return '顺时针'; + }).set('prompt','选择'+get.translation(card)+'的结算方向'); } else{ - return 5-get.value(button.link,nextSeat); + event.goto(3); } - } - next.set('closeDialog',false); - next.set('dialogdisplay',true); - 'step 1' - if(result&&result.bool&&result.links&&result.links.length){ - for(var i=0;i0&&target!=player; - }, - content:function(){ - 'step 0' - if(target.countCards('h','sha')){ - var name=get.translation(player.name); - target.chooseControl().set('prompt',get.translation('caochuanjiejian')).set('choiceList',[ - '将手牌中的所有杀交给'+name+',并视为对'+name+'使用一张杀','展示手牌并令'+name+'弃置任意一张' - ],function(){ - if(get.effect(player,{name:'sha'},target,target)<0) return 1; - if(target.countCards('h','sha')>=3) return 1; - return 0; + if(!event.dialog||!target.countCards('h')){ + event.finish(); + return; + } + var minValue=20; + var hs=target.getCards('h'); + for(var i=0;i0){ + return get.value(button.link,nextSeat)-5; } else{ - game.log(target,'展示了',target.getCards('h')); + return 5-get.value(button.link,nextSeat); } - player.discardPlayerCard(target,'h',true,'visible'); } - event.finish(); - } - else{ - var hs=target.getCards('h','sha'); - player.gain(hs,target); - target.$give(hs,player); - } - 'step 2' - target.useCard({name:'sha'},player); - }, - ai:{ - order:4, - value:[5,1], - result:{ - target:function(player,target){ - if(player.hasShan()) return -1; + next.set('closeDialog',false); + next.set('dialogdisplay',true); + 'step 1' + if(result&&result.bool&&result.links&&result.links.length){ + for(var i=0;i0; }, - chongzhu:function(){ - return game.countPlayer()<=2; + caochuanjiejian:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target.countCards('h')>0&&target!=player; + }, + content:function(){ + 'step 0' + if(target.countCards('h','sha')){ + var name=get.translation(player.name); + target.chooseControl().set('prompt',get.translation('caochuanjiejian')).set('choiceList',[ + '将手牌中的所有杀交给'+name+',并视为对'+name+'使用一张杀','展示手牌并令'+name+'弃置任意一张' + ],function(){ + if(get.effect(player,{name:'sha'},target,target)<0) return 1; + if(target.countCards('h','sha')>=3) return 1; + return 0; + }); + } + else{ + event.directfalse=true; + } + 'step 1' + if(event.directfalse||result.control=='选项二'){ + if(target.countCards('h')){ + if(!player.isUnderControl(true)){ + target.showHandcards(); + } + else{ + game.log(target,'展示了',target.getCards('h')); + } + player.discardPlayerCard(target,'h',true,'visible'); + } + event.finish(); + } + else{ + var hs=target.getCards('h','sha'); + player.gain(hs,target); + target.$give(hs,player); + } + 'step 2' + target.useCard({name:'sha'},player); + }, + ai:{ + order:4, + value:[5,1], + result:{ + target:function(player,target){ + if(player.hasShan()) return -1; + return 0; + } + } + } }, - multitarget:true, - multiline:true, - singleCard:true, - content:function(){ - 'step 0' - target.chooseToCompare(event.addedTarget); - 'step 1' - if(!result.tie){ + xiaolicangdao:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + multitarget:true, + content:function(){ + 'step 0' + if(cards&&cards.length){ + target.gain(cards,player); + target.$gain2(cards); + if(cards.length==1){ + event.card1=cards[0]; + } + } + 'step 1' + event.card2=target.getCards('h').randomGet(); + if(event.card2){ + target.discard(event.card2); + } + else{ + event.finish(); + } + 'step 2' + if(event.card1&&event.card1.name==event.card2.name){ + target.damage(); + } + }, + ai:{ + order:6, + value:[3,1], + result:{ + target:function(player,target){ + return -2/Math.sqrt(1+target.countCards('h')); + }, + }, + tag:{ + damage:1, + discard:1, + loseCard:1, + } + } + }, + geanguanhuo:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + chongzhu:function(){ + return game.countPlayer()<=2; + }, + multitarget:true, + multiline:true, + singleCard:true, + content:function(){ + 'step 0' + target.chooseToCompare(event.addedTarget); + 'step 1' + if(!result.tie){ + if(result.bool){ + target.gainPlayerCard(event.addedTarget,true); + target.line(targets[1]); + } + else{ + event.addedTarget.gainPlayerCard(target,true); + event.addedTarget.line(target); + } + event.finish(); + } + 'step 2' + target.discardPlayerCard(player); + target.line(player); + }, + selectTarget:2, + ai:{ + order:5, + value:[7,1], + useful:[4,1], + result:{ + target:-1, + } + } + }, + shezhanqunru:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + modTarget:true, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current!=target&¤t.countCards('h'); + }); + if(!list.length){ + target.draw(3); + event.finish(); + } + else{ + list.sortBySeat(target); + event.list=list; + event.torespond=[]; + } + 'step 1' + if(event.list.length){ + event.current=event.list.shift(); + event.current.chooseBool('是否响应'+get.translation(target)+'的舌战群儒?',function(event,player){ + if(get.attitude(player,_status.event.source)>=0) return false; + var hs=player.getCards('h'); + var dutag=player.hasSkillTag('nodu'); + for(var i=0;i=8&&value<=7) return true; + if(value<=3) return true; + } + else if(_status.event.hasTarget%2==1){ + if(hs[i].number>=11&&value<=6) return true; + } + } + return false; + }).set('source',target).set('hasTarget',event.torespond.length); + } + else{ + event.goto(3); + } + 'step 2' if(result.bool){ - target.gainPlayerCard(event.addedTarget,true); - target.line(targets[1]); + event.torespond.push(event.current); + event.current.line(target,'green'); + event.current.popup('响应'); + game.log(event.current,'响应了舌战群儒'); + game.delayx(0.5); + } + event.goto(1); + 'step 3' + if(event.torespond.length==0){ + event.num=1; } else{ - event.addedTarget.gainPlayerCard(target,true); - event.addedTarget.line(target); + event.num=0; + target.chooseToCompare(event.torespond).callback=lib.card.shezhanqunru.callback; + } + 'step 4' + if(event.num>0){ + target.draw(3); } - event.finish(); - } - 'step 2' - target.discardPlayerCard(player); - target.line(player); - }, - selectTarget:2, - ai:{ - order:5, - value:[7,1], - useful:[4,1], - result:{ - target:-1, - } - } - }, - shezhanqunru:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - modTarget:true, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current!=target&¤t.countCards('h'); - }); - if(!list.length){ - target.draw(3); - event.finish(); - } - else{ - list.sortBySeat(target); - event.list=list; - event.torespond=[]; - } - 'step 1' - if(event.list.length){ - event.current=event.list.shift(); - event.current.chooseBool('是否响应'+get.translation(target)+'的舌战群儒?',function(event,player){ - if(get.attitude(player,_status.event.source)>=0) return false; - var hs=player.getCards('h'); - var dutag=player.hasSkillTag('nodu'); - for(var i=0;i=8&&value<=7) return true; - if(value<=3) return true; - } - else if(_status.event.hasTarget%2==1){ - if(hs[i].number>=11&&value<=6) return true; - } - } - return false; - }).set('source',target).set('hasTarget',event.torespond.length); - } - else{ - event.goto(3); - } - 'step 2' - if(result.bool){ - event.torespond.push(event.current); - event.current.line(target,'green'); - event.current.popup('响应'); - game.log(event.current,'响应了舌战群儒'); - game.delayx(0.5); - } - event.goto(1); - 'step 3' - if(event.torespond.length==0){ - event.num=1; - } - else{ - event.num=0; - target.chooseToCompare(event.torespond).callback=lib.card.shezhanqunru.callback; - } - 'step 4' - if(event.num>0){ - target.draw(3); - } - }, - callback:function(){ - if(event.card1.number>event.card2.number){ - event.parent.parent.num++; - } - else{ - event.parent.parent.num--; - } - }, - ai:{ - order:8.5, - value:[6,1], - useful:[3,1], - tag:{ - draw:1 }, - result:{ - target:function(player,target){ - var hs=target.getCards('h'); - for(var i=0;i=7&&value<=6) return 1; - if(value<=3) return 1; - } - return 0; - } - } - } - }, - youdishenru:{ - fullskin:true, - type:'trick', - notarget:true, - wuxieable:true, - content:function(){ - 'step 0' - var info=event.getParent(2).youdiinfo||event.getParent(3).youdiinfo; - if(!info){ - event.finish(); - return; - } - info.evt.untrigger(); - info.evt.finish(); - event.source=info.source; - event.source.storage.youdishenru=player; - event.source.addSkill('youdishenru'); - 'step 1' - var next=event.source.chooseToUse({name:'sha'},player,-1,'对'+get.translation(player)+'使用一张杀,或受到一点伤害'); - next.ai2=function(){ - return 1; - }; - 'step 2' - if(result.bool){ - if(event.source.storage.youdishenru){ - event.goto(1); + callback:function(){ + if(event.card1.number>event.card2.number){ + event.parent.parent.num++; } else{ + event.parent.parent.num--; + } + }, + ai:{ + order:8.5, + value:[6,1], + useful:[3,1], + tag:{ + draw:1 + }, + result:{ + target:function(player,target){ + var hs=target.getCards('h'); + for(var i=0;i=7&&value<=6) return 1; + if(value<=3) return 1; + } + return 0; + } + } + } + }, + youdishenru:{ + fullskin:true, + type:'trick', + notarget:true, + wuxieable:true, + content:function(){ + 'step 0' + var info=event.getParent(2).youdiinfo||event.getParent(3).youdiinfo; + if(!info){ + event.finish(); + return; + } + info.evt.untrigger(); + info.evt.finish(); + event.source=info.source; + event.source.storage.youdishenru=player; + event.source.addSkill('youdishenru'); + 'step 1' + var next=event.source.chooseToUse({name:'sha'},player,-1,'对'+get.translation(player)+'使用一张杀,或受到一点伤害'); + next.ai2=function(){ + return 1; + }; + 'step 2' + if(result.bool){ + if(event.source.storage.youdishenru){ + event.goto(1); + } + else{ + event.source.removeSkill('youdishenru'); + } + } + else{ + event.source.damage(player); event.source.removeSkill('youdishenru'); } - } - else{ - event.source.damage(player); - event.source.removeSkill('youdishenru'); - } - }, - ai:{ - value:[5,1], - useful:[5,1], - order:1, - wuxie:function(target,card,player,current,state){ - return -state*get.attitude(player,current); }, - result:{ - player:function(player){ - if(_status.event.parent.youdiinfo&& - get.attitude(player,_status.event.parent.youdiinfo.source)<=0){ - return 1; + ai:{ + value:[5,1], + useful:[5,1], + order:1, + wuxie:function(target,card,player,current,state){ + return -state*get.attitude(player,current); + }, + result:{ + player:function(player){ + if(_status.event.parent.youdiinfo&& + get.attitude(player,_status.event.parent.youdiinfo.source)<=0){ + return 1; + } + return 0; } - return 0; } } - } - }, - wangmeizhike:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return (target.isLowestHp()&&target.isDamaged())||target.isFewestHandcard(); }, - content:function(){ - 'step 0' - if(target.isFewestHandcard()) target.draw(2); - 'step 1' - if(target.isLowestHp()) target.recover(); - }, - ai:{ - order:2.5, - value:7, - result:{ - target:function(player,target){ - var num=0; - if(target.isLowestHp()&&get.recoverEffect(target)>0){ - if(target.hp==1){ - num+=3; + wangmeizhike:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return (target.isLowestHp()&&target.isDamaged())||target.isFewestHandcard(); + }, + content:function(){ + 'step 0' + if(target.isFewestHandcard()) target.draw(2); + 'step 1' + if(target.isLowestHp()) target.recover(); + }, + ai:{ + order:2.5, + value:7, + result:{ + target:function(player,target){ + var num=0; + if(target.isLowestHp()&&get.recoverEffect(target)>0){ + if(target.hp==1){ + num+=3; + } + else{ + num+=2; + } } - else{ + if(target.isFewestHandcard()){ num+=2; } + return num; } - if(target.isFewestHandcard()){ - num+=2; - } - return num; } } - } - }, - suolianjia:{ - fullskin:true, - type:"equip", - subtype:"equip2", - skills:['suolianjia'], - onEquip:function(){ - if(player.isLinked()==false) player.link(); }, - onLose:function(){ - if(player.isLinked()) player.link(); - }, - ai:{ - basic:{ - equipValue:5 + suolianjia:{ + fullskin:true, + type:"equip", + subtype:"equip2", + skills:['suolianjia'], + onEquip:function(){ + if(player.isLinked()==false) player.link(); }, - }, - }, - chenhuodajie:{ - fullskin:true, - type:'trick', - filterTarget:true, - content:function(){ - if(target.countCards('he')){ - player.gainPlayerCard('he',target,true); - } - }, - ai:{ - order:1, - useful:6, - value:6, - result:{ - target:-1 + onLose:function(){ + if(player.isLinked()) player.link(); }, - tag:{ - loseCard:1 - } - } - }, - yihuajiemu:{ - fullskin:true, - type:'trick', - enable:true, - singleCard:true, - filterTarget:function(card,player,target){ - if(target.isMin()) return false; - if(ui.selected.targets.length){ - return target.getCards('e',{subtype:'equip5'}).length==0; - } - else{ - return target.getCards('e',{subtype:'equip5'}).length>0; - } - }, - selectTarget:2, - multitarget:true, - complexTarget:true, - content:function(){ - if(target.getEquip(5)){ - target.$give(target.getEquip(5),event.addedTarget); - event.addedTarget.equip(target.getEquip(5)); - game.delay(); - } - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(target.getCards('e',{subtype:'equip5'}).length){ - if(get.attitude(target,player)>0){ - return -0.5; - } - return -1; - } - return 1; - } - }, - tag:{ - loseCard:1 - } - } - }, - fudichouxin:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - content:function(){ - "step 0" - player.chooseToCompare(target).set('preserve','win').clear=false; - "step 1" - if(result.bool){ - player.gain([result.player,result.target]); - result.player.clone.moveDelete(player); - result.target.clone.moveDelete(player); - game.addVideo('gain2',player,get.cardsInfo([result.player,result.target])); - } - else if(!result.cancelled){ - result.player.clone.delete(); - result.target.clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([result.player,result.target])); - } - }, - ai:{ - order:4, - result:{ - target:function(player){ - if(player.countCards('h')<=1) return 0; - return -1; + ai:{ + basic:{ + equipValue:5 }, - player:function(player){ - if(player.countCards('h')<=1) return 0; - return 0.5; + }, + }, + chenhuodajie:{ + fullskin:true, + type:'trick', + filterTarget:true, + content:function(){ + if(target.countCards('he')){ + player.gainPlayerCard('he',target,true); } }, - tag:{ - loseCard:1 + ai:{ + order:1, + useful:6, + value:6, + result:{ + target:-1 + }, + tag:{ + loseCard:1 + } } - } - }, - shuiyanqijun:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return target.countCards('e'); }, - selectTarget:-1, - content:function(){ - if(target.countCards('e')) target.chooseToDiscard('e',true); - }, - reverseOrder:true, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(target.countCards('e')) return -1; - return 0; + yihuajiemu:{ + fullskin:true, + type:'trick', + enable:true, + singleCard:true, + filterTarget:function(card,player,target){ + if(target.isMin()) return false; + if(ui.selected.targets.length){ + return target.getCards('e',{subtype:'equip5'}).length==0; + } + else{ + return target.getCards('e',{subtype:'equip5'}).length>0; } }, - tag:{ - multitarget:1, - multineg:1 - } - } - }, - toulianghuanzhu:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:function(card,player,target){ - return target.countCards('h')>0; - }, - selectTarget:2, - multitarget:true, - singleCard:true, - targetprompt:['被拿牌','得牌'], - content:function(){ - "step 0" - target.addTempSkill('toulianghuanzhu2','phaseAfter'); - var hs=target.getCards('h'); - event.num=Math.min(2,hs.length); - if(event.num){ - var gived=hs.randomGets(event.num); - event.addedTarget.gain(gived,target); - target.$giveAuto(gived,event.addedTarget); - game.delay(); - } - else{ - event.finish(); - } - "step 1" - if(event.addedTarget.countCards('h')){ - if(_status.auto&&event.addedTarget==game.me){ + selectTarget:2, + multitarget:true, + complexTarget:true, + content:function(){ + if(target.getEquip(5)){ + target.$give(target.getEquip(5),event.addedTarget); + event.addedTarget.equip(target.getEquip(5)); game.delay(); } - event.addedTarget.chooseCard(true,event.num,'选择'+get.cnNumber(event.num)+'张手牌还给'+get.translation(target)).ai=get.disvalue; - } - else{ - event.finish(); - } - "step 2" - target.gain(result.cards,event.addedTarget); - event.addedTarget.$give(event.num,target); - }, - ai:{ - order:6.5, - tag:{ - loseCard:1, - multitarget:1, - multineg:1, - norepeat:1, }, - result:{ - target:function(player,target){ - if(ui.selected.targets.length){ - if(target==player&&target.countCards('h')<=1) return 0; + ai:{ + order:1, + result:{ + target:function(player,target){ + if(target.getCards('e',{subtype:'equip5'}).length){ + if(get.attitude(target,player)>0){ + return -0.5; + } + return -1; + } + return 1; + } + }, + tag:{ + loseCard:1 + } + } + }, + fudichouxin:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + content:function(){ + "step 0" + player.chooseToCompare(target).set('preserve','win').clear=false; + "step 1" + if(result.bool){ + player.gain([result.player,result.target]); + result.player.clone.moveDelete(player); + result.target.clone.moveDelete(player); + game.addVideo('gain2',player,get.cardsInfo([result.player,result.target])); + } + else if(!result.cancelled){ + result.player.clone.delete(); + result.target.clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([result.player,result.target])); + } + }, + ai:{ + order:4, + result:{ + target:function(player){ + if(player.countCards('h')<=1) return 0; + return -1; + }, + player:function(player){ + if(player.countCards('h')<=1) return 0; return 0.5; } - if(target.hasSkill('toulianghuanzhu2')) return 0; - return -0.5; + }, + tag:{ + loseCard:1 } + } + }, + shuiyanqijun:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target.countCards('e'); }, - wuxie:function(){ + selectTarget:-1, + content:function(){ + if(target.countCards('e')) target.chooseToDiscard('e',true); + }, + reverseOrder:true, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(target.countCards('e')) return -1; + return 0; + } + }, + tag:{ + multitarget:1, + multineg:1 + } + } + }, + toulianghuanzhu:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + return target.countCards('h')>0; + }, + selectTarget:2, + multitarget:true, + singleCard:true, + targetprompt:['被拿牌','得牌'], + content:function(){ + "step 0" + target.addTempSkill('toulianghuanzhu2','phaseAfter'); + var hs=target.getCards('h'); + event.num=Math.min(2,hs.length); + if(event.num){ + var gived=hs.randomGets(event.num); + event.addedTarget.gain(gived,target); + target.$giveAuto(gived,event.addedTarget); + game.delay(); + } + else{ + event.finish(); + } + "step 1" + if(event.addedTarget.countCards('h')){ + if(_status.auto&&event.addedTarget==game.me){ + game.delay(); + } + event.addedTarget.chooseCard(true,event.num,'选择'+get.cnNumber(event.num)+'张手牌还给'+get.translation(target)).ai=get.disvalue; + } + else{ + event.finish(); + } + "step 2" + target.gain(result.cards,event.addedTarget); + event.addedTarget.$give(event.num,target); + }, + ai:{ + order:6.5, + tag:{ + loseCard:1, + multitarget:1, + multineg:1, + norepeat:1, + }, + result:{ + target:function(player,target){ + if(ui.selected.targets.length){ + if(target==player&&target.countCards('h')<=1) return 0; + return 0.5; + } + if(target.hasSkill('toulianghuanzhu2')) return 0; + return -0.5; + } + }, + wuxie:function(){ + return 0; + }, + useful:[3,1], + value:[4,1] + } + }, + hufu:{ + fullskin:true, + type:'basic', + savable:function(card,player,dying){ + return dying==player; + }, + ai:{ + value:[7.5,5,2], + useful:[7.5,5,2], + } + }, + huoshan:{ + fullskin:true, + type:'delay', + modTarget:function(card,player,target){ + return lib.filter.judge(card,player,target); + }, + enable:function(card,player){ + return player.canAddJudge(card); + }, + filterTarget:function(card,player,target){ + return (lib.filter.judge(card,player,target)&&player==target); + }, + selectTarget:[-1,-1], + judge:function(card){ + if(get.suit(card)=='heart'&&get.number(card)>1&&get.number(card)<10) return -6; return 0; }, - useful:[3,1], - value:[4,1] - } - }, - hufu:{ - fullskin:true, - type:'basic', - savable:function(card,player,dying){ - return dying==player; - }, - ai:{ - value:[7.5,5,2], - useful:[7.5,5,2], - } - }, - huoshan:{ - fullskin:true, - type:'delay', - modTarget:function(card,player,target){ - return lib.filter.judge(card,player,target); - }, - enable:function(card,player){ - return player.canAddJudge(card); - }, - filterTarget:function(card,player,target){ - return (lib.filter.judge(card,player,target)&&player==target); - }, - selectTarget:[-1,-1], - judge:function(card){ - if(get.suit(card)=='heart'&&get.number(card)>1&&get.number(card)<10) return -6; - return 0; - }, - effect:function(){ - if(result.judge){ - player.damage(2,'fire','nosource'); - var players=game.filterPlayer(function(current){ - return get.distance(player,current)<=1&&player!=current; - }); - players.sort(lib.sort.seat); - for(var i=0;i1&&get.number(card)<10) return -3; - return 0; - }, - fullskin:true, - effect:function(){ - if(result.judge){ - if(player.countCards('he')==0) player.loseHp(); else{ - player.discard(player.getCards('he').randomGets(3)); + player.addJudgeNext(card); } - var players=get.players(); - for(var i=0;i1&&get.number(card)<10) return -3; + return 0; + }, + fullskin:true, + effect:function(){ + if(result.judge){ + if(player.countCards('he')==0) player.loseHp(); + else{ + player.discard(player.getCards('he').randomGets(3)); + } + var players=get.players(); + for(var i=0;i=0) return 0; + if(player.hasSkillTag('notricksource')) return 0; + if(target.hasSkillTag('notrick')) return 0; + if(card.name=='tao') return 0; + if(target.hp==1&&card.name=='jiu') return 0; + if(target.hp==1&&get.type(card)!='basic'){ + return 10-get.value(card); + } + return 8-get.value(card); + }; + } + "step 1" + if(event.directfalse||!result.bool){ + target.damage('fire'); + } + }, + ai:{ + basic:{ + order:4, + value:7, + useful:2, + }, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nofire')) return 0; + if(get.damageEffect(target,player,player)<0&&get.attitude(player,target)>0){ + return -2; + } + var nh=target.countCards('he'); + if(target==player) nh--; + switch(nh){ + case 0:case 1:return -2; + case 2:return -1.5; + case 3:return -1; + default:return -0.7; + } + } + }, + tag:{ + damage:1, + fireDamage:1, + natureDamage:1, + discard:1, + loseCard:1, + position:'he', } - } - else{ - card.expired=false; } }, - ai:{ - basic:{ - useful:0, - value:0, + qiankundai:{ + fullskin:true, + type:'equip', + subtype:'equip5', + onLose:function(){ + player.draw(); }, - order:1, - result:{ - target:function(player,target){ - return lib.card.shandian.ai.result.target(player,target); - } - }, - } - }, - liuxinghuoyu:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:true, - content:function(){ - "step 0" - if(target.countCards('he')<2){ - event.directfalse=true; - } - else{ - target.chooseToDiscard('he',2).ai=function(card){ - if(target.hasSkillTag('nofire')) return 0; - if(get.damageEffect(target,player,target,'fire')>=0) return 0; - if(player.hasSkillTag('notricksource')) return 0; - if(target.hasSkillTag('notrick')) return 0; - if(card.name=='tao') return 0; - if(target.hp==1&&card.name=='jiu') return 0; - if(target.hp==1&&get.type(card)!='basic'){ - return 10-get.value(card); + skills:['qiankundai'], + ai:{ + order:9.5, + basic:{ + equipValue:function(card,player){ + if(player.countCards('h','qiankundai')) return 6; + return 1; } - return 8-get.value(card); + } + } + }, + }, + skill:{ + suolianjia:{ + trigger:{player:'damageBefore'}, + filter:function(event){ + if(event.source&&event.source.hasSkillTag('unequip',false,event.card)) return; + if(event.nature) return true; + }, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + nothunder:true, + effect:{ + target:function(card,player,target,current){ + if(player.hasSkillTag('unequip',false,card)) return; + if(get.tag(card,'natureDamage')) return 'zerotarget'; + if(card.name=='tiesuo'){ + return [0,0]; + } + } + } + } + }, + toulianghuanzhu2:{}, + youdishenru:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + silent:true, + onremove:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.player==player.storage.youdishenru; + }, + content:function(){ + delete player.storage.youdishenru; + } + }, + _youdishenru:{ + trigger:{target:'shaBefore'}, + direct:true, + filter:function(event,player){ + return player.hasCard('youdishenru'); + }, + content:function(){ + event.youdiinfo={ + source:trigger.player, + evt:trigger }; - } - "step 1" - if(event.directfalse||!result.bool){ - target.damage('fire'); + player.chooseToUse(function(card,player){ + if(card.name!='youdishenru') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + },'是否使用诱敌深入?').set('source',trigger.player); } }, - ai:{ - basic:{ - order:4, - value:7, - useful:2, + _chenhuodajie:{ + trigger:{global:'damageEnd'}, + direct:true, + filter:function(event,player){ + if(event.player==player) return false; + if(!event.player.countCards('he')) return false; + if(!lib.filter.targetEnabled({name:'chenhuodajie'},player,event.player)) return false; + return player.hasCard('chenhuodajie'); }, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nofire')) return 0; - if(get.damageEffect(target,player,player)<0&&get.attitude(player,target)>0){ - return -2; - } - var nh=target.countCards('he'); - if(target==player) nh--; - switch(nh){ - case 0:case 1:return -2; - case 2:return -1.5; - case 3:return -1; - default:return -0.7; - } + content:function(){ + player.chooseToUse(get.prompt('chenhuodajie',trigger.player).replace(/发动/,'使用'),function(card,player){ + if(card.name!='chenhuodajie') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + },trigger.player,-1).targetRequired=true; + } + }, + qiankundai:{ + mod:{ + maxHandcard:function(player,num){ + return num+1; } }, - tag:{ - damage:1, - fireDamage:1, - natureDamage:1, - discard:1, - loseCard:1, - position:'he', - } - } - }, - qiankundai:{ - fullskin:true, - type:'equip', - subtype:'equip5', - onLose:function(){ - player.draw(); }, - skills:['qiankundai'], - ai:{ - order:9.5, - basic:{ - equipValue:function(card,player){ - if(player.countCards('h','qiankundai')) return 6; - return 1; - } - } - } - }, - }, - skill:{ - suolianjia:{ - trigger:{player:'damageBefore'}, - filter:function(event){ - if(event.source&&event.source.hasSkillTag('unequip',false,event.card)) return; - if(event.nature) return true; - }, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - nofire:true, - nothunder:true, - effect:{ - target:function(card,player,target,current){ - if(player.hasSkillTag('unequip',false,card)) return; - if(get.tag(card,'natureDamage')) return 'zerotarget'; - if(card.name=='tiesuo'){ - return [0,0]; - } - } - } - } - }, - toulianghuanzhu2:{}, - youdishenru:{ - trigger:{source:'damageEnd'}, - forced:true, - popup:false, - silent:true, - onremove:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.player==player.storage.youdishenru; - }, - content:function(){ - delete player.storage.youdishenru; - } - }, - _youdishenru:{ - trigger:{target:'shaBefore'}, - direct:true, - filter:function(event,player){ - return player.hasCard('youdishenru'); - }, - content:function(){ - event.youdiinfo={ - source:trigger.player, - evt:trigger - }; - player.chooseToUse(function(card,player){ - if(card.name!='youdishenru') return false; - return lib.filter.cardEnabled(card,player,'forceEnable'); - },'是否使用诱敌深入?').set('source',trigger.player); - } - }, - _chenhuodajie:{ - trigger:{global:'damageEnd'}, - direct:true, - filter:function(event,player){ - if(event.player==player) return false; - if(!event.player.countCards('he')) return false; - if(!lib.filter.targetEnabled({name:'chenhuodajie'},player,event.player)) return false; - return player.hasCard('chenhuodajie'); - }, - content:function(){ - player.chooseToUse(get.prompt('chenhuodajie',trigger.player).replace(/发动/,'使用'),function(card,player){ - if(card.name!='chenhuodajie') return false; - return lib.filter.cardEnabled(card,player,'forceEnable'); - },trigger.player,-1).targetRequired=true; - } - }, - qiankundai:{ - mod:{ - maxHandcard:function(player,num){ - return num+1; + _hufu_sha:{ + enable:['chooseToRespond','chooseToUse'], + filter:function(event,player){ + return player.countCards('h','hufu')>0; + }, + filterCard:{name:'hufu'}, + viewAs:{name:'sha'}, + prompt:'将一张虎符当杀使用或打出', + check:function(card){return 1}, + ai:{ + order:1, + useful:7.5, + value:7.5 } }, - }, - _hufu_sha:{ - enable:['chooseToRespond','chooseToUse'], - filter:function(event,player){ - return player.countCards('h','hufu')>0; + _hufu_shan:{ + enable:['chooseToRespond','chooseToUse'], + filter:function(event,player){ + return player.countCards('h','hufu')>0; + }, + filterCard:{name:'hufu'}, + viewAs:{name:'shan'}, + prompt:'将一张虎符当闪使用或打出', + check:function(){return 1}, + ai:{ + order:1, + useful:7.5, + value:7.5 + } }, - filterCard:{name:'hufu'}, - viewAs:{name:'sha'}, - prompt:'将一张虎符当杀使用或打出', - check:function(card){return 1}, - ai:{ - order:1, - useful:7.5, - value:7.5 - } - }, - _hufu_shan:{ - enable:['chooseToRespond','chooseToUse'], - filter:function(event,player){ - return player.countCards('h','hufu')>0; + _hufu_jiu:{ + enable:['chooseToRespond','chooseToUse'], + filter:function(event,player){ + return player.countCards('h','hufu')>0; + }, + filterCard:{name:'hufu'}, + viewAs:{name:'jiu'}, + prompt:'将一张虎符当酒使用', + check:function(){return 1}, }, - filterCard:{name:'hufu'}, - viewAs:{name:'shan'}, - prompt:'将一张虎符当闪使用或打出', - check:function(){return 1}, - ai:{ - order:1, - useful:7.5, - value:7.5 - } }, - _hufu_jiu:{ - enable:['chooseToRespond','chooseToUse'], - filter:function(event,player){ - return player.countCards('h','hufu')>0; - }, - filterCard:{name:'hufu'}, - viewAs:{name:'jiu'}, - prompt:'将一张虎符当酒使用', - check:function(){return 1}, + translate:{ + diaobingqianjiang:'调兵遣将', + diaobingqianjiang_info:'出牌阶段,对你及其他有手牌的角色使用。你摸一张牌,然后亮出牌堆顶的X张牌(X为存活角色数的一半,向上取整),目标可以用一张手牌替换其中的一张牌。结算后,你可以将剩余的牌中的任意张以任意顺序置于牌堆顶', + caochuanjiejian:'草船借箭', + caochuanjiejian_info:'出牌阶段对一名有手牌的其他角色使用,目标选择一项:将手牌中的所有杀(至少1张)交给你,并视为对你使用一张杀;或展示手牌并令你弃置任意张', + xiaolicangdao:'笑里藏刀', + xiaolicangdao_info:'出牌阶段,对一名其他角色使用。你将此【笑里藏刀】交给目标,然后弃置其一张手牌,若这两张牌牌名相同,你对其造成1点伤害', + shezhanqunru:'舌战群儒', + shezhanqunru_info:'出牌阶段,对你使用。你请求所有有手牌的其他角色响应,然后同时与响应的角色拼点。若有角色响应且结果中你赢的次数更多,或若没有角色响应,你摸三张牌', + youdishenru:'诱敌深入', + youdishenru_info:'当以你为目标的【杀】生效前,对此【杀】使用。抵消此【杀】,然后此【杀】的使用者需对你使用【杀】(在此【杀】结算结束之后,若此【杀】未对你造成伤害,其重复此流程),否则受到你造成的1点伤害', + suolianjia:'锁链甲', + suolianjia_info:'锁定技,你防止即将受到的属性伤害,当装备时进入连环状态,当卸下时解除连环状态', + suolianjia_bg:'链', + geanguanhuo:'隔岸观火', + geanguanhuo_info:'出牌阶段对一名其他角色使用,令目标与一名你指定的另一名角色拼点,赢的角色获得对方的一张牌;若点数相同,目标可弃置你一张牌(存活角色不超过2时可重铸)', + toulianghuanzhu:'偷梁换柱', + toulianghuanzhu_info:'出牌阶段对一名有手牌的角色使用,选择另一名有手牌的角色获得目标两张手牌(不足则全拿),然后还给其等量手牌', + toulianghuanzhu_bg:'柱', + yihuajiemu:'移花接木', + yihuajiemu_info:'对一名装备区内有宝物的角色使用,将其宝物牌转移至另一名角色', + fudichouxin:'釜底抽薪', + fudichouxin_info:'与一名角色进行拼点,若成功则获得双方拼点牌', + shuiyanqijun:'水攻', + shuiyanqijun_info:'令所有有装备的角色各弃置一张装备牌', + wangmeizhike:'望梅止渴', + wangmeizhike_info:'出牌阶段对一名角色使用,若没有角色手牌比目标少,目标摸两张牌;若没有角色体力比目标少,目标回复一点体力', + chenhuodajie:'趁火打劫', + chenhuodajie_info:'任意一名其他角色受到伤害时对其使用,获得其一张牌', + huoshan:'火山', + huoshan_info:'出牌阶段,对自己使用。若判定结果为红桃2~9,则目标角色受到2点火焰伤害,距离目标1以内的其他角色受到1点火焰伤害。若判定不为红桃2~9,将之移动到下家的判定区里。', + hongshui:'洪水', + hongshui_info:'出牌阶段,对自己使用。若判定结果为梅花2~9,该角色随机弃置3张牌,距离该角色为X的角色随机弃置3-X张牌,若没有牌则失去一点体力,X至少为1', + liuxinghuoyu:'流星火羽', + liuxinghuoyu_info:'出牌阶段,对一名角色使用,令目标弃置2张牌,或受到一点火焰伤害', + qiankundai:'乾坤袋', + qiankundai_info:'你的手牌上限+1。当你失去该装备时,你摸一张牌。', + hufu:'虎符', + hufu_bg:'符', + _hufu_sha:'符杀', + _hufu_shan:'符闪', + _hufu_jiu:'符酒', + hufu_info:'你可以将一张虎符当作杀、闪或酒使用或打出', }, - }, - translate:{ - diaobingqianjiang:'调兵遣将', - diaobingqianjiang_info:'出牌阶段,对你及其他有手牌的角色使用。你摸一张牌,然后亮出牌堆顶的X张牌(X为存活角色数的一半,向上取整),目标可以用一张手牌替换其中的一张牌。结算后,你可以将剩余的牌中的任意张以任意顺序置于牌堆顶', - caochuanjiejian:'草船借箭', - caochuanjiejian_info:'出牌阶段对一名有手牌的其他角色使用,目标选择一项:将手牌中的所有杀(至少1张)交给你,并视为对你使用一张杀;或展示手牌并令你弃置任意张', - xiaolicangdao:'笑里藏刀', - xiaolicangdao_info:'出牌阶段,对一名其他角色使用。你将此【笑里藏刀】交给目标,然后弃置其一张手牌,若这两张牌牌名相同,你对其造成1点伤害', - shezhanqunru:'舌战群儒', - shezhanqunru_info:'出牌阶段,对你使用。你请求所有有手牌的其他角色响应,然后同时与响应的角色拼点。若有角色响应且结果中你赢的次数更多,或若没有角色响应,你摸三张牌', - youdishenru:'诱敌深入', - youdishenru_info:'当以你为目标的【杀】生效前,对此【杀】使用。抵消此【杀】,然后此【杀】的使用者需对你使用【杀】(在此【杀】结算结束之后,若此【杀】未对你造成伤害,其重复此流程),否则受到你造成的1点伤害', - suolianjia:'锁链甲', - suolianjia_info:'锁定技,你防止即将受到的属性伤害,当装备时进入连环状态,当卸下时解除连环状态', - suolianjia_bg:'链', - geanguanhuo:'隔岸观火', - geanguanhuo_info:'出牌阶段对一名其他角色使用,令目标与一名你指定的另一名角色拼点,赢的角色获得对方的一张牌;若点数相同,目标可弃置你一张牌(存活角色不超过2时可重铸)', - toulianghuanzhu:'偷梁换柱', - toulianghuanzhu_info:'出牌阶段对一名有手牌的角色使用,选择另一名有手牌的角色获得目标两张手牌(不足则全拿),然后还给其等量手牌', - toulianghuanzhu_bg:'柱', - yihuajiemu:'移花接木', - yihuajiemu_info:'对一名装备区内有宝物的角色使用,将其宝物牌转移至另一名角色', - fudichouxin:'釜底抽薪', - fudichouxin_info:'与一名角色进行拼点,若成功则获得双方拼点牌', - shuiyanqijun:'水攻', - shuiyanqijun_info:'令所有有装备的角色各弃置一张装备牌', - wangmeizhike:'望梅止渴', - wangmeizhike_info:'出牌阶段对一名角色使用,若没有角色手牌比目标少,目标摸两张牌;若没有角色体力比目标少,目标回复一点体力', - chenhuodajie:'趁火打劫', - chenhuodajie_info:'任意一名其他角色受到伤害时对其使用,获得其一张牌', - huoshan:'火山', - huoshan_info:'出牌阶段,对自己使用。若判定结果为红桃2~9,则目标角色受到2点火焰伤害,距离目标1以内的其他角色受到1点火焰伤害。若判定不为红桃2~9,将之移动到下家的判定区里。', - hongshui:'洪水', - hongshui_info:'出牌阶段,对自己使用。若判定结果为梅花2~9,该角色随机弃置3张牌,距离该角色为X的角色随机弃置3-X张牌,若没有牌则失去一点体力,X至少为1', - liuxinghuoyu:'流星火羽', - liuxinghuoyu_info:'出牌阶段,对一名角色使用,令目标弃置2张牌,或受到一点火焰伤害', - qiankundai:'乾坤袋', - qiankundai_info:'你的手牌上限+1。当你失去该装备时,你摸一张牌。', - hufu:'虎符', - hufu_bg:'符', - _hufu_sha:'符杀', - _hufu_shan:'符闪', - _hufu_jiu:'符酒', - hufu_info:'你可以将一张虎符当作杀、闪或酒使用或打出', - }, - list:[ - ['heart',1,'hufu'], - ['spade',1,'hufu'], - ['club',1,'qiankundai'], - ['heart',6,'huoshan','fire'], - ['club',7,'hongshui'], - ['diamond',3,'liuxinghuoyu','fire'], - ['heart',6,'liuxinghuoyu','fire'], - ['heart',9,'liuxinghuoyu','fire'], - ['heart',3,'yihuajiemu'], - ["diamond",3,'guohe'], + list:[ + ['heart',1,'hufu'], + ['spade',1,'hufu'], + ['club',1,'qiankundai'], + ['heart',6,'huoshan','fire'], + ['club',7,'hongshui'], + ['diamond',3,'liuxinghuoyu','fire'], + ['heart',6,'liuxinghuoyu','fire'], + ['heart',9,'liuxinghuoyu','fire'], + ['heart',3,'yihuajiemu'], + ["diamond",3,'guohe'], - ['diamond',4,'fudichouxin'], - ['diamond',1,'yihuajiemu'], - ['club',6,'fudichouxin'], - ['spade',1,'fudichouxin'], - ['club',7,'shuiyanqijun'], - ['diamond',7,'yihuajiemu'], - ['club',8,'shuiyanqijun'], - ['club',8,'guohe'], - ['spade',9,'shuiyanqijun'], - ['heart',9,'toulianghuanzhu'], - ['club',10,'toulianghuanzhu'], - ['spade',13,'guohe'], - ['heart',6,'wangmeizhike'], - ['club',1,'wangmeizhike'], - ['diamond',6,'chenhuodajie'], - ['diamond',9,'chenhuodajie'], - ['club',3,'chenhuodajie'], + ['diamond',4,'fudichouxin'], + ['diamond',1,'yihuajiemu'], + ['club',6,'fudichouxin'], + ['spade',1,'fudichouxin'], + ['club',7,'shuiyanqijun'], + ['diamond',7,'yihuajiemu'], + ['club',8,'shuiyanqijun'], + ['club',8,'guohe'], + ['spade',9,'shuiyanqijun'], + ['heart',9,'toulianghuanzhu'], + ['club',10,'toulianghuanzhu'], + ['spade',13,'guohe'], + ['heart',6,'wangmeizhike'], + ['club',1,'wangmeizhike'], + ['diamond',6,'chenhuodajie'], + ['diamond',9,'chenhuodajie'], + ['club',3,'chenhuodajie'], - ['club',13,'suolianjia'], + ['club',13,'suolianjia'], - ['club',3,'caochuanjiejian'], - ['spade',7,'caochuanjiejian'], - ['spade',5,'xiaolicangdao'], - ['diamond',11,'xiaolicangdao'], - ['heart',1,'geanguanhuo'], - ['spade',6,'geanguanhuo'], - ['heart',4,'shezhanqunru'], - ['club',8,'shezhanqunru'], - ['diamond',1,'diaobingqianjiang'], - ['spade',2,'diaobingqianjiang'], - ['heart',12,'youdishenru'], - ['club',2,'youdishenru'], - ['spade',9,'youdishenru'], - ], + ['club',3,'caochuanjiejian'], + ['spade',7,'caochuanjiejian'], + ['spade',5,'xiaolicangdao'], + ['diamond',11,'xiaolicangdao'], + ['heart',1,'geanguanhuo'], + ['spade',6,'geanguanhuo'], + ['heart',4,'shezhanqunru'], + ['club',8,'shezhanqunru'], + ['diamond',1,'diaobingqianjiang'], + ['spade',2,'diaobingqianjiang'], + ['heart',12,'youdishenru'], + ['club',2,'youdishenru'], + ['spade',9,'youdishenru'], + ], + }; }); diff --git a/card/zhenfa.js b/card/zhenfa.js index be8b3a935..f3f82fd1b 100644 --- a/card/zhenfa.js +++ b/card/zhenfa.js @@ -1,442 +1,450 @@ 'use strict'; -game.import('card',{ - name:'zhenfa', - card:{ - pozhenjue:{ - type:'zhenfa', - chongzhu:true, - enable:true, - filterTarget:true, - selectTarget:-1, - multitarget:true, - content:function(){ - var n=targets.length; - while(n--){ - game.swapSeat(targets.randomGet(),targets.randomGet()); - } - }, - mode:['guozhan'], - ai:{ - order:8, - result:{ - player:1, +game.import('card',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'zhenfa', + card:{ + pozhenjue:{ + type:'zhenfa', + chongzhu:true, + enable:true, + filterTarget:true, + selectTarget:-1, + multitarget:true, + content:function(){ + var n=targets.length; + while(n--){ + game.swapSeat(targets.randomGet(),targets.randomGet()); + } }, - } - }, - changshezhen:{ - type:'zhenfa', - chongzhu:true, - enable:function(card,player){ - if(player.inline()) return true; - if(player.identity=='unknown'||player.identity=='ye') return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.isFriendOf(player); - }); - }, - filterTarget:function(card,player,target){ - if(player.inline()) return player.inline(target); - if(!player.getNext()) return false; - var list=game.filterPlayer(function(current){ - return current!=player&¤t.isFriendOf(player); - }); - list.sort(function(a,b){ - return get.distance(player,a,'absolute')-get.distance(player,b,'absolute'); - }); - return target==list[0]; - }, - selectTarget:-1, - multitarget:true, - multiline:true, - content:function(){ - if(targets.length==1){ - game.swapSeat(targets[0],game.me.getNext(),true,true); + mode:['guozhan'], + ai:{ + order:8, + result:{ + player:1, + }, } - else{ + }, + changshezhen:{ + type:'zhenfa', + chongzhu:true, + enable:function(card,player){ + if(player.inline()) return true; + if(player.identity=='unknown'||player.identity=='ye') return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.isFriendOf(player); + }); + }, + filterTarget:function(card,player,target){ + if(player.inline()) return player.inline(target); + if(!player.getNext()) return false; + var list=game.filterPlayer(function(current){ + return current!=player&¤t.isFriendOf(player); + }); + list.sort(function(a,b){ + return get.distance(player,a,'absolute')-get.distance(player,b,'absolute'); + }); + return target==list[0]; + }, + selectTarget:-1, + multitarget:true, + multiline:true, + content:function(){ + if(targets.length==1){ + game.swapSeat(targets[0],game.me.getNext(),true,true); + } + else{ + game.asyncDraw(targets); + } + }, + mode:['guozhan'], + ai:{ + order:6.5, + result:{ + target:1, + }, + tag:{ + draw:1 + } + } + }, + tianfuzhen:{ + type:'zhenfa', + chongzhu:true, + enable:function(){ + return game.hasPlayer(function(current){ + return current.isMajor(); + }); + }, + filterTarget:function(card,player,target){ + return target.isMajor()&&target.countCards('he')>0; + }, + selectTarget:-1, + content:function(){ + target.chooseToDiscard('he',true); + }, + mode:['guozhan'], + ai:{ + order:7, + result:{ + target:-1, + }, + tag:{ + discard:1 + } + } + }, + dizaizhen:{ + type:'zhenfa', + chongzhu:true, + enable:function(){ + return game.hasPlayer(function(current){ + return current.isNotMajor(); + }); + }, + multitarget:true, + multiline:true, + filterTarget:function(card,player,target){ + return target.isNotMajor(); + }, + selectTarget:-1, + content:function(){ game.asyncDraw(targets); - } - }, - mode:['guozhan'], - ai:{ - order:6.5, - result:{ - target:1, }, - tag:{ - draw:1 - } - } - }, - tianfuzhen:{ - type:'zhenfa', - chongzhu:true, - enable:function(){ - return game.hasPlayer(function(current){ - return current.isMajor(); - }); - }, - filterTarget:function(card,player,target){ - return target.isMajor()&&target.countCards('he')>0; - }, - selectTarget:-1, - content:function(){ - target.chooseToDiscard('he',true); - }, - mode:['guozhan'], - ai:{ - order:7, - result:{ - target:-1, - }, - tag:{ - discard:1 - } - } - }, - dizaizhen:{ - type:'zhenfa', - chongzhu:true, - enable:function(){ - return game.hasPlayer(function(current){ - return current.isNotMajor(); - }); - }, - multitarget:true, - multiline:true, - filterTarget:function(card,player,target){ - return target.isNotMajor(); - }, - selectTarget:-1, - content:function(){ - game.asyncDraw(targets); - }, - mode:['guozhan'], - ai:{ - order:7, - result:{ - target:1, - }, - tag:{ - draw:1 - } - } - }, - fengyangzhen:{ - type:'zhenfa', - chongzhu:true, - enable:true, - filterTarget:function(card,player,target){ - return target.sieged(); - }, - selectTarget:-1, - content:function(){ - target.addTempSkill('feiying',{player:'damageAfter'}); - target.popup('feiying'); - game.log(target,'获得了技能','【飞影】'); - }, - mode:['guozhan'], - ai:{ - order:7, - result:{ - target:2, - }, - } - }, - yunchuizhen:{ - type:'zhenfa', - chongzhu:true, - enable:true, - filterTarget:function(card,player,target){ - return target.siege(); - }, - selectTarget:-1, - content:function(){ - target.addTempSkill('wushuang',{source:'damageAfter'}); - target.popup('wushuang'); - game.log(target,'获得了技能','【无双】'); - }, - mode:['guozhan'], - ai:{ - order:7, - result:{ - target:2, - }, - } - }, - qixingzhen:{ - type:'zhenfa', - chongzhu:true, - enable:function(card,player){ - return player.siege()||player.sieged(); - }, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - content:function(){ - 'step 0' - event.targets=game.filterPlayer(function(current){ - return current.siege(player); - }); - 'step 1' - if(event.targets.length){ - var current=event.targets.shift(); - player.line(current,'green'); - player.discardPlayerCard(current,true); - event.redo(); - } - 'step 2' - var list=game.filterPlayer(function(current){ - return current.sieged(player); - }); - if(list.length){ - player.useCard({name:'sha'},list,false); - } - }, - mode:['guozhan'], - ai:{ - order:7, - result:{ - target:1, - }, - } - }, - shepanzhen:{ - type:'zhenfa', - chongzhu:true, - enable:function(card,player){ - if(player.identity=='unknown'||player.identity=='ye') return false; - if(get.population(player.identity)<=1) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.identity==player.identity&&!player.inline(current); - }); - }, - filterTarget:function(card,player,target){ - return target.identity==player.identity; - }, - multitarget:true, - selectTarget:-1, - content:function(){ - targets.sortBySeat(); - for(var i=1;i0){ - return 6-get.value(card); + mode:['guozhan'], + ai:{ + order:7, + result:{ + target:1, + }, + tag:{ + draw:1 } - return 0; - }; - "step 1" - if(result.bool){ - player.useCard({name:'sha'},result.cards,target,false); } - "step 2" - if(target==player.next) event.player2=player.next.next; - else event.player2=player.previous.previous; - event.player2.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){ - return get.type(card)!='basic'; - }).ai=function(card){ - if(get.effect(target,{name:'sha'},event.player2,event.player2)>0){ - return 6-get.value(card); + }, + fengyangzhen:{ + type:'zhenfa', + chongzhu:true, + enable:true, + filterTarget:function(card,player,target){ + return target.sieged(); + }, + selectTarget:-1, + content:function(){ + target.addTempSkill('feiying',{player:'damageAfter'}); + target.popup('feiying'); + game.log(target,'获得了技能','【飞影】'); + }, + mode:['guozhan'], + ai:{ + order:7, + result:{ + target:2, + }, + } + }, + yunchuizhen:{ + type:'zhenfa', + chongzhu:true, + enable:true, + filterTarget:function(card,player,target){ + return target.siege(); + }, + selectTarget:-1, + content:function(){ + target.addTempSkill('wushuang',{source:'damageAfter'}); + target.popup('wushuang'); + game.log(target,'获得了技能','【无双】'); + }, + mode:['guozhan'], + ai:{ + order:7, + result:{ + target:2, + }, + } + }, + qixingzhen:{ + type:'zhenfa', + chongzhu:true, + enable:function(card,player){ + return player.siege()||player.sieged(); + }, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + 'step 0' + event.targets=game.filterPlayer(function(current){ + return current.siege(player); + }); + 'step 1' + if(event.targets.length){ + var current=event.targets.shift(); + player.line(current,'green'); + player.discardPlayerCard(current,true); + event.redo(); } - return 0; - }; - "step 3" - if(result.bool){ - event.player2.useCard({name:'sha'},result.cards,target,false); + 'step 2' + var list=game.filterPlayer(function(current){ + return current.sieged(player); + }); + if(list.length){ + player.useCard({name:'sha'},list,false); + } + }, + mode:['guozhan'], + ai:{ + order:7, + result:{ + target:1, + }, } }, - mode:['guozhan'], - ai:{ - order:7, - result:{ - target:-2, + shepanzhen:{ + type:'zhenfa', + chongzhu:true, + enable:function(card,player){ + if(player.identity=='unknown'||player.identity=='ye') return false; + if(get.population(player.identity)<=1) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.identity==player.identity&&!player.inline(current); + }); }, - } + filterTarget:function(card,player,target){ + return target.identity==player.identity; + }, + multitarget:true, + selectTarget:-1, + content:function(){ + targets.sortBySeat(); + for(var i=1;i0){ + return 6-get.value(card); + } + return 0; + }; + "step 1" + if(result.bool){ + player.useCard({name:'sha'},result.cards,target,false); + } + "step 2" + if(target==player.next) event.player2=player.next.next; + else event.player2=player.previous.previous; + event.player2.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){ + return get.type(card)!='basic'; + }).ai=function(card){ + if(get.effect(target,{name:'sha'},event.player2,event.player2)>0){ + return 6-get.value(card); + } + return 0; + }; + "step 3" + if(result.bool){ + event.player2.useCard({name:'sha'},result.cards,target,false); + } + }, + mode:['guozhan'], + ai:{ + order:7, + result:{ + target:-2, + }, + } + }, + niaoxiangzhen:{ + type:'zhenfa', + chongzhu:true, + enable:true, + filterTarget:function(card,player,target){ + if(player.identity==target.identity) return false; + if(target.identity=='unknown'||target.identity=='ye') return false; + return target.identity==target.next.identity||target.identity==target.previous.identity + }, + selectTarget:-1, + content:function(){ + "step 0" + var next=target.chooseToRespond({name:'shan'}); + next.ai=function(card){ + if(get.damageEffect(target,player,target)>=0) return 0; + return 1; + }; + next.autochoose=lib.filter.autoRespondShan; + "step 1" + if(result.bool==false){ + target.damage(); + } + }, + ai:{ + basic:{ + order:9, + useful:1 + }, + result:{ + target:-1.5, + }, + tag:{ + respond:1, + respondShan:1, + damage:1, + } + }, + mode:['guozhan'], + }, }, - niaoxiangzhen:{ - type:'zhenfa', - chongzhu:true, - enable:true, - filterTarget:function(card,player,target){ - if(player.identity==target.identity) return false; - if(target.identity=='unknown'||target.identity=='ye') return false; - return target.identity==target.next.identity||target.identity==target.previous.identity - }, - selectTarget:-1, - content:function(){ - "step 0" - var next=target.chooseToRespond({name:'shan'}); - next.ai=function(card){ - if(get.damageEffect(target,player,target)>=0) return 0; - return 1; - }; - next.autochoose=lib.filter.autoRespondShan; - "step 1" - if(result.bool==false){ - target.damage(); - } - }, - ai:{ - basic:{ - order:9, - useful:1 - }, - result:{ - target:-1.5, - }, - tag:{ - respond:1, - respondShan:1, - damage:1, - } - }, - mode:['guozhan'], + skill:{ + }, - }, - skill:{ + translate:{ + zhenfa:'阵法', + changshezhen:'长蛇阵', + pozhenjue:'破阵决', + tianfuzhen:'天覆阵', + dizaizhen:'地载阵', + fengyangzhen:'风扬阵', + yunchuizhen:'云垂阵', + qixingzhen:'七星阵', + shepanzhen:'蛇蟠阵', + shepanzhen_bg:'列', + yunchuizhen_bg:'垂', + longfeizhen:'龙飞阵', + huyizhen:'虎翼阵', + niaoxiangzhen:'鸟翔阵', + niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到一点伤害', + qixingzhen_info:'弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀', + // longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌', + // qixingzhen_info:'令我方所有角色进入围攻状态', + // shepanzhen_info:'令我方所有角色进入队列状态', + // yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害', + // fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害', + dizaizhen_info:'所有小势力角色摸一张牌', + changshezhen_info:'若你处于队列中,与你同一队列的所有角色摸一张牌,否则将与你逆时针距离最近的同势力角色移至你下家', + // pozhenjue_info:'将所有角色的顺序随机重排', + tianfuzhen_info:'所有大势力角色弃置一张牌' + }, + list:[ + ["diamond",1,'changshezhen'], + ["club",1,'changshezhen'], + // ["spade",1,'changshezhen'], + // ["heart",1,'changshezhen'], - }, - translate:{ - zhenfa:'阵法', - changshezhen:'长蛇阵', - pozhenjue:'破阵决', - tianfuzhen:'天覆阵', - dizaizhen:'地载阵', - fengyangzhen:'风扬阵', - yunchuizhen:'云垂阵', - qixingzhen:'七星阵', - shepanzhen:'蛇蟠阵', - shepanzhen_bg:'列', - yunchuizhen_bg:'垂', - longfeizhen:'龙飞阵', - huyizhen:'虎翼阵', - niaoxiangzhen:'鸟翔阵', - niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到一点伤害', - qixingzhen_info:'弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀', - // longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌', - // qixingzhen_info:'令我方所有角色进入围攻状态', - // shepanzhen_info:'令我方所有角色进入队列状态', - // yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害', - // fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害', - dizaizhen_info:'所有小势力角色摸一张牌', - changshezhen_info:'若你处于队列中,与你同一队列的所有角色摸一张牌,否则将与你逆时针距离最近的同势力角色移至你下家', - // pozhenjue_info:'将所有角色的顺序随机重排', - tianfuzhen_info:'所有大势力角色弃置一张牌' - }, - list:[ - ["diamond",1,'changshezhen'], - ["club",1,'changshezhen'], - // ["spade",1,'changshezhen'], - // ["heart",1,'changshezhen'], + ["diamond",2,'tianfuzhen'], + // ["club",2,'tianfuzhen'], + ["spade",2,'tianfuzhen'], + ["heart",2,'tianfuzhen'], - ["diamond",2,'tianfuzhen'], - // ["club",2,'tianfuzhen'], - ["spade",2,'tianfuzhen'], - ["heart",2,'tianfuzhen'], + ["diamond",3,'dizaizhen'], + // ["club",3,'dizaizhen'], + ["spade",3,'dizaizhen'], + ["heart",3,'dizaizhen'], - ["diamond",3,'dizaizhen'], - // ["club",3,'dizaizhen'], - ["spade",3,'dizaizhen'], - ["heart",3,'dizaizhen'], + // ["diamond",4,'fengyangzhen'], + // ["club",4,'fengyangzhen'], + // ["spade",4,'fengyangzhen'], + // ["heart",4,'fengyangzhen'], - // ["diamond",4,'fengyangzhen'], - // ["club",4,'fengyangzhen'], - // ["spade",4,'fengyangzhen'], - // ["heart",4,'fengyangzhen'], + // ["diamond",5,'zhonghuangzhen'], + // ["club",5,'zhonghuangzhen'], + // ["spade",5,'zhonghuangzhen'], + // ["heart",5,'zhonghuangzhen'], - // ["diamond",5,'zhonghuangzhen'], - // ["club",5,'zhonghuangzhen'], - // ["spade",5,'zhonghuangzhen'], - // ["heart",5,'zhonghuangzhen'], + // ["diamond",6,'huyizhen'], + // ["club",6,'huyizhen'], + // ["spade",6,'huyizhen'], + // ["heart",6,'huyizhen'], - // ["diamond",6,'huyizhen'], - // ["club",6,'huyizhen'], - // ["spade",6,'huyizhen'], - // ["heart",6,'huyizhen'], + ["diamond",7,'qixingzhen'], + ["club",7,'qixingzhen'], + ["spade",7,'qixingzhen'], + // ["heart",7,'qixingzhen'], - ["diamond",7,'qixingzhen'], - ["club",7,'qixingzhen'], - ["spade",7,'qixingzhen'], - // ["heart",7,'qixingzhen'], + // ["diamond",8,'shepanzhen'], + // ["club",8,'shepanzhen'], + // ["spade",8,'shepanzhen'], + // ["heart",8,'shepanzhen'], - // ["diamond",8,'shepanzhen'], - // ["club",8,'shepanzhen'], - // ["spade",8,'shepanzhen'], - // ["heart",8,'shepanzhen'], + // ["diamond",9,'longfeizhen'], + // ["club",9,'longfeizhen'], + // ["spade",9,'longfeizhen'], + // ["heart",9,'longfeizhen'], - // ["diamond",9,'longfeizhen'], - // ["club",9,'longfeizhen'], - // ["spade",9,'longfeizhen'], - // ["heart",9,'longfeizhen'], + ["diamond",11,'niaoxiangzhen'], + // ["club",11,'niaoxiangzhen'], + ["spade",11,'niaoxiangzhen'], + ["heart",11,'niaoxiangzhen'], - ["diamond",11,'niaoxiangzhen'], - // ["club",11,'niaoxiangzhen'], - ["spade",11,'niaoxiangzhen'], - ["heart",11,'niaoxiangzhen'], + // ["diamond",12,'yunchuizhen'], + // ["club",12,'yunchuizhen'], + // ["spade",12,'yunchuizhen'], + // ["heart",12,'yunchuizhen'], - // ["diamond",12,'yunchuizhen'], - // ["club",12,'yunchuizhen'], - // ["spade",12,'yunchuizhen'], - // ["heart",12,'yunchuizhen'], - - // ["diamond",13,'pozhenjue'], - // ["club",13,'pozhenjue'], - // ["spade",13,'pozhenjue'], - //["heart",13,'pozhenjue'], - ], + // ["diamond",13,'pozhenjue'], + // ["club",13,'pozhenjue'], + // ["spade",13,'pozhenjue'], + //["heart",13,'pozhenjue'], + ], + }; }); diff --git a/character/diy.js b/character/diy.js index 35ff6d034..32c7979b9 100644 --- a/character/diy.js +++ b/character/diy.js @@ -1,1396 +1,1404 @@ 'use strict'; -game.import('character',{ - name:'diy', - character:{ - // diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']], - // diy_hanlong:['male','wei',4,['siji','ciqiu']], - diy_feishi:['male','shu',3,['shuaiyan','moshou']], - diy_liuyan:['male','shu',3,['juedao','geju']], - // diy_luxun:['male','wu',3,['shaoying','zonghuo']], - diy_yuji:['male','qun',3,['diyguhuo','diychanyuan']], - // diy_zhouyu:['male','wu',3,['jieyan','honglian']], - // diy_zhouyu:['male','wu',3,['xiongzi','yaliang']], - diy_caiwenji:['female','qun',3,['beige','guihan']], - diy_lukang:['male','wu',4,['luweiyan','qianxun']], - diy_xuhuang:['male','wei',4,['diyduanliang']], - // diy_dianwei:['male','wei',4,['diyqiangxi']], - // diy_huangzhong:['male','shu',4,['liegong','fuli']], - // diy_weiyan:['male','shu',4,['diykuanggu']], - diy_zhenji:['female','wei',3,['diy_jiaoxia','yiesheng']], - // diy_menghuo:['male','shu',4,['huoshou','zaiqix']], - re_huangyueying:['female','shu',3,['rejizhi','qicai']], +game.import('character',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'diy', + character:{ + // diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']], + // diy_hanlong:['male','wei',4,['siji','ciqiu']], + diy_feishi:['male','shu',3,['shuaiyan','moshou']], + diy_liuyan:['male','shu',3,['juedao','geju']], + // diy_luxun:['male','wu',3,['shaoying','zonghuo']], + diy_yuji:['male','qun',3,['diyguhuo','diychanyuan']], + // diy_zhouyu:['male','wu',3,['jieyan','honglian']], + // diy_zhouyu:['male','wu',3,['xiongzi','yaliang']], + diy_caiwenji:['female','qun',3,['beige','guihan']], + diy_lukang:['male','wu',4,['luweiyan','qianxun']], + diy_xuhuang:['male','wei',4,['diyduanliang']], + // diy_dianwei:['male','wei',4,['diyqiangxi']], + // diy_huangzhong:['male','shu',4,['liegong','fuli']], + // diy_weiyan:['male','shu',4,['diykuanggu']], + diy_zhenji:['female','wei',3,['diy_jiaoxia','yiesheng']], + // diy_menghuo:['male','shu',4,['huoshou','zaiqix']], + re_huangyueying:['female','shu',3,['rejizhi','qicai']], - diy_liufu:['male','wei',3,['zhucheng','duoqi']], - diy_xizhenxihong:['male','shu',4,['fuchou','jinyan']], - diy_liuzan:['male','wu',4,['kangyin']], - diy_zaozhirenjun:['male','wei',3,['liangce','jianbi','juntun']], - diy_yangyi:['male','shu',3,['choudu','liduan']], - diy_tianyu:['male','wei',4,['chezhen','youzhan']], - }, - characterIntro:{ - diy_feishi:'字公举,生卒年不详,益州犍为郡南安县(今四川省乐山市)人。刘璋占据益州时,以费诗为绵竹县县令。刘备进攻刘璋夺取益州,费诗举城而降,后受拜督军从事,转任牂牁郡太守,再为州前部司马。', - diy_liuyan:'字元海,新兴(今山西忻州北)人,匈奴族,匈奴首领冒顿单于之后[1] ,南匈奴单于于夫罗之孙,左贤王刘豹之子,母呼延氏,十六国时期前赵政权开国皇帝,304年-310年在位。', - diy_lukang:'字幼节,吴郡吴县(今江苏苏州)人。三国时期吴国名将,丞相陆逊次子。', - diy_liufu:'字元颖,沛国相县(今安徽濉溪县西北)人。东汉末年名守。在汉末避难于淮南,说服袁术将戚寄和秦翊率部投奔曹操,曹操大悦,使司徒辟其为掾属。', - diy_xizhenxihong:'习珍,襄阳人。三国时蜀汉将领。先主刘备时曾任零陵北部都尉,加裨将军。建安二十四年,关羽率荆州大军攻打樊城,唯有习珍据城不降。被困月余,直到箭尽粮绝,拔剑自刎而死。习宏,生卒年不详,习珍之弟。曾在东吴入侵蜀汉时建议哥哥习珍伪降,约樊胄举兵。习珍死后,弟弟习宏落在东吴,有问必不答,终身不为孙权发一言。', - diy_zaozhirenjun:'枣祗,生卒年月不详,东汉末年颍川阳翟(今河南省禹州市)人。曾任东阿令、羽林监、屯田都尉、陈留太守等职。任峻(?—204年),字伯达,河南郡中牟县人。曹操每次出征,任峻通常在后方补给军队。后来发生饥荒,枣祗建议实施屯田,任峻被任命为典农中郎将,招募百姓在许下屯田,结果连年丰收,积谷足以装满全部粮仓。', - diy_yangyi:'字威公,襄阳(今湖北襄阳)人,三国时期蜀汉政治家。最初,为荆州刺史傅群的主簿,后投奔关羽,任为功曹。羽遣其至成都,大受刘备赞赏,擢为尚书。建兴三年(225年)任丞相参军,此后一直跟随诸葛亮战斗。亮卒,他部署安全退军。亮生前定蒋琬继己任,仪仅拜中军师。建兴十三年(235年),因多出怨言,被削职流放至汉嘉郡。但杨仪仍不自省,又上书诽谤,言辞激烈,最后下狱,自杀身亡。', - diy_tianyu:'字国让,渔阳雍奴(今天津市武清区东北)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。', - }, - perfectPair:{ - yuji:['zuoci'] - }, - skill:{ - liangce:{ - enable:'phaseUse', - viewAs:{name:'wugu'}, - usable:1, - filterCard:{type:'basic'}, - filter:function(event,player){ - return player.countCards('h',{type:'basic'})>0; - }, - check:function(card){ - return 6-get.value(card); - }, - group:'liangce2' + diy_liufu:['male','wei',3,['zhucheng','duoqi']], + diy_xizhenxihong:['male','shu',4,['fuchou','jinyan']], + diy_liuzan:['male','wu',4,['kangyin']], + diy_zaozhirenjun:['male','wei',3,['liangce','jianbi','juntun']], + diy_yangyi:['male','shu',3,['choudu','liduan']], + diy_tianyu:['male','wei',4,['chezhen','youzhan']], }, - liangce2:{ - trigger:{global:'wuguRemained'}, - direct:true, - filter:function(event){ - return event.remained.length>0; - }, - content:function(){ - 'step 0' - var du=0; - for(var i=0;i=trigger.remained.length/2) return -att; - return att; - } - 'step 1' - if(result.bool){ - player.logSkill('liangce',result.targets); - result.targets[0].gain(trigger.remained.slice(0),'gain2','log'); - trigger.remained.length=0; - } - } + characterIntro:{ + diy_feishi:'字公举,生卒年不详,益州犍为郡南安县(今四川省乐山市)人。刘璋占据益州时,以费诗为绵竹县县令。刘备进攻刘璋夺取益州,费诗举城而降,后受拜督军从事,转任牂牁郡太守,再为州前部司马。', + diy_liuyan:'字元海,新兴(今山西忻州北)人,匈奴族,匈奴首领冒顿单于之后[1] ,南匈奴单于于夫罗之孙,左贤王刘豹之子,母呼延氏,十六国时期前赵政权开国皇帝,304年-310年在位。', + diy_lukang:'字幼节,吴郡吴县(今江苏苏州)人。三国时期吴国名将,丞相陆逊次子。', + diy_liufu:'字元颖,沛国相县(今安徽濉溪县西北)人。东汉末年名守。在汉末避难于淮南,说服袁术将戚寄和秦翊率部投奔曹操,曹操大悦,使司徒辟其为掾属。', + diy_xizhenxihong:'习珍,襄阳人。三国时蜀汉将领。先主刘备时曾任零陵北部都尉,加裨将军。建安二十四年,关羽率荆州大军攻打樊城,唯有习珍据城不降。被困月余,直到箭尽粮绝,拔剑自刎而死。习宏,生卒年不详,习珍之弟。曾在东吴入侵蜀汉时建议哥哥习珍伪降,约樊胄举兵。习珍死后,弟弟习宏落在东吴,有问必不答,终身不为孙权发一言。', + diy_zaozhirenjun:'枣祗,生卒年月不详,东汉末年颍川阳翟(今河南省禹州市)人。曾任东阿令、羽林监、屯田都尉、陈留太守等职。任峻(?—204年),字伯达,河南郡中牟县人。曹操每次出征,任峻通常在后方补给军队。后来发生饥荒,枣祗建议实施屯田,任峻被任命为典农中郎将,招募百姓在许下屯田,结果连年丰收,积谷足以装满全部粮仓。', + diy_yangyi:'字威公,襄阳(今湖北襄阳)人,三国时期蜀汉政治家。最初,为荆州刺史傅群的主簿,后投奔关羽,任为功曹。羽遣其至成都,大受刘备赞赏,擢为尚书。建兴三年(225年)任丞相参军,此后一直跟随诸葛亮战斗。亮卒,他部署安全退军。亮生前定蒋琬继己任,仪仅拜中军师。建兴十三年(235年),因多出怨言,被削职流放至汉嘉郡。但杨仪仍不自省,又上书诽谤,言辞激烈,最后下狱,自杀身亡。', + diy_tianyu:'字国让,渔阳雍奴(今天津市武清区东北)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。', }, - jianbi:{ - trigger:{global:'useCard'}, - priority:5, - filter:function(event,player){ - if(get.type(event.card)!='trick') return false; - if(get.info(event.card).multitarget) return false; - if(event.targets.length<2) return false; - if(!event.targets.contains(player)) return false; - return true; + perfectPair:{ + yuji:['zuoci'] + }, + skill:{ + liangce:{ + enable:'phaseUse', + viewAs:{name:'wugu'}, + usable:1, + filterCard:{type:'basic'}, + filter:function(event,player){ + return player.countCards('h',{type:'basic'})>0; + }, + check:function(card){ + return 6-get.value(card); + }, + group:'liangce2' }, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('jianbi'), - [1,Math.max(1,player.maxHp-player.hp)],function(card,player,target){ - return _status.event.getTrigger().targets.contains(target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var eff=-get.effect(target,trigger.card,trigger.player,_status.event.player); - if(trigger.card.name=='wugu'&&eff==0&&get.attitude(player,target)<0){ - return 0.01; + liangce2:{ + trigger:{global:'wuguRemained'}, + direct:true, + filter:function(event){ + return event.remained.length>0; + }, + content:function(){ + 'step 0' + var du=0; + for(var i=0;i=trigger.remained.length/2) return -att; + return att; + } + 'step 1' + if(result.bool){ + player.logSkill('liangce',result.targets); + result.targets[0].gain(trigger.remained.slice(0),'gain2','log'); + trigger.remained.length=0; + } + } + }, + jianbi:{ + trigger:{global:'useCard'}, + priority:5, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(get.info(event.card).multitarget) return false; + if(event.targets.length<2) return false; + if(!event.targets.contains(player)) return false; + return true; + }, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('jianbi'), + [1,Math.max(1,player.maxHp-player.hp)],function(card,player,target){ + return _status.event.getTrigger().targets.contains(target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var eff=-get.effect(target,trigger.card,trigger.player,_status.event.player); + if(trigger.card.name=='wugu'&&eff==0&&get.attitude(player,target)<0){ + return 0.01; + } + return eff; + }); + "step 1" + if(result.bool){ + event.targets=result.targets; + if(event.isMine()){ + player.logSkill('jianbi',event.targets); + event.finish(); + } + for(var i=0;i0; }, - position:'he', - filterCard:{type:'equip'}, - check:function(card){ - var player=_status.event.player; - var he=player.getCards('he'); - var subtype=get.subtype(card); - var value=get.equipValue(card); - for(var i=0;i=value){ - return 10; + juntun:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + position:'he', + filterCard:{type:'equip'}, + check:function(card){ + var player=_status.event.player; + var he=player.getCards('he'); + var subtype=get.subtype(card); + var value=get.equipValue(card); + for(var i=0;i=value){ + return 10; + } + } + if(!player.needsToDiscard()){ + return 4-get.equipValue(card); + } + return 0; + }, + content:function(){ + player.draw(); + }, + discard:false, + prompt:'将一张装备牌置入弃牌堆并摸一张牌', + delay:0.5, + prepare:function(cards,player){ + player.$throw(cards,1000); + }, + ai:{ + basic:{ + order:8.5 + }, + result:{ + player:1, + }, + } + }, + choudu:{ + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + filterTarget:function(card,player,target){ + return lib.filter.cardEnabled({name:'diaobingqianjiang'},target); + }, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + var list=game.filterPlayer(); + list.sortBySeat(target); + target.useCard({name:'diaobingqianjiang'},list); + }, + ai:{ + order:1, + result:{ + player:function(player,target){ + if(get.attitude(player,target)<=1) return 0; + return game.countPlayer(function(current){ + return get.effect(current,{name:'diaobingqianjiang'},target,player); + }); + } } } - if(!player.needsToDiscard()){ - return 4-get.equipValue(card); - } - return 0; }, - content:function(){ - player.draw(); - }, - discard:false, - prompt:'将一张装备牌置入弃牌堆并摸一张牌', - delay:0.5, - prepare:function(cards,player){ - player.$throw(cards,1000); - }, - ai:{ - basic:{ - order:8.5 + liduan:{ + trigger:{global:'gainAfter'}, + filter:function(event,player){ + if(event.player==player) return false; + if(_status.currentPhase==event.player) return false; + if(event.cards.length!=1) return false; + return get.type(event.cards[0])=='equip'&&get.position(event.cards[0])=='h'; }, - result:{ - player:1, - }, - } - }, - choudu:{ - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - filterTarget:function(card,player,target){ - return lib.filter.cardEnabled({name:'diaobingqianjiang'},target); - }, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - var list=game.filterPlayer(); - list.sortBySeat(target); - target.useCard({name:'diaobingqianjiang'},list); - }, - ai:{ - order:1, - result:{ - player:function(player,target){ - if(get.attitude(player,target)<=1) return 0; - return game.countPlayer(function(current){ - return get.effect(current,{name:'diaobingqianjiang'},target,player); - }); - } - } - } - }, - liduan:{ - trigger:{global:'gainAfter'}, - filter:function(event,player){ - if(event.player==player) return false; - if(_status.currentPhase==event.player) return false; - if(event.cards.length!=1) return false; - return get.type(event.cards[0])=='equip'&&get.position(event.cards[0])=='h'; - }, - logTarget:'player', - check:function(event,player){ - var att=get.attitude(player,event.player); - var subtype=get.subtype(event.cards[0]); - if(att>0){ - if(event.player.countCards('h')>=player.countCards('h')+2) return true; - return event.player.countCards('e',{subtype:subtype})==0; - } - else{ - return event.player.countCards('e',{subtype:subtype})>0; - } - }, - content:function(){ - 'step 0' - var bool=false; - var subtype=get.subtype(trigger.cards[0]); - var current=trigger.player.getEquip('e',parseInt(subtype[5])); - var att=get.attitude(trigger.player,player); - if(current){ + logTarget:'player', + check:function(event,player){ + var att=get.attitude(player,event.player); + var subtype=get.subtype(event.cards[0]); if(att>0){ - bool=true; + if(event.player.countCards('h')>=player.countCards('h')+2) return true; + return event.player.countCards('e',{subtype:subtype})==0; } else{ - if(get.equipValue(current)>get.equipValue(trigger.cards[0])){ + return event.player.countCards('e',{subtype:subtype})>0; + } + }, + content:function(){ + 'step 0' + var bool=false; + var subtype=get.subtype(trigger.cards[0]); + var current=trigger.player.getEquip('e',parseInt(subtype[5])); + var att=get.attitude(trigger.player,player); + if(current){ + if(att>0){ bool=true; } + else{ + if(get.equipValue(current)>get.equipValue(trigger.cards[0])){ + bool=true; + } + } } - } - trigger.player.chooseCard('立断:将一张手牌交给'+get.translation(player)+',或取消并使用'+get.translation(trigger.cards)).ai=function(card){ - if(bool){ - if(att>0){ - return 8-get.value(card); + trigger.player.chooseCard('立断:将一张手牌交给'+get.translation(player)+',或取消并使用'+get.translation(trigger.cards)).ai=function(card){ + if(bool){ + if(att>0){ + return 8-get.value(card); + } + else{ + return 4-get.value(card); + } } else{ - return 4-get.value(card); + if(att<=0) return -get.value(card); + return 0; } } + 'step 1' + if(result.bool){ + player.gain(result.cards,trigger.player); + trigger.player.$give(1,player); + } else{ - if(att<=0) return -get.value(card); - return 0; + trigger.player.useCard(trigger.cards,trigger.player); } } - 'step 1' - if(result.bool){ - player.gain(result.cards,trigger.player); - trigger.player.$give(1,player); - } - else{ - trigger.player.useCard(trigger.cards,trigger.player); - } - } - }, - jinyan:{ - mod:{ - cardEnabled:function(card,player){ - if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; - }, - cardUsable:function(card,player){ - if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; - }, - cardRespondable:function(card,player){ - if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; - }, - cardSavable:function(card,player){ - if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; - }, }, - enable:['chooseToUse','chooseToRespond'], - filterCard:function(card){ - return get.type(card,'trick')=='trick'&&get.color(card)=='black'; - }, - viewAsFilter:function(player){ - if(player.hp>2) return false; - if(!player.hasCard(function(card){ + jinyan:{ + mod:{ + cardEnabled:function(card,player){ + if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; + }, + cardUsable:function(card,player){ + if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; + }, + cardRespondable:function(card,player){ + if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; + }, + cardSavable:function(card,player){ + if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; + }, + }, + enable:['chooseToUse','chooseToRespond'], + filterCard:function(card){ return get.type(card,'trick')=='trick'&&get.color(card)=='black'; - })) return false; - }, - viewAs:{name:'sha'}, - prompt:'将一张黑色锦囊牌当作杀使用或打出', - check:function(){return 1}, - ai:{ - respondSha:true, - skillTagFilter:function(player){ + }, + viewAsFilter:function(player){ if(player.hp>2) return false; if(!player.hasCard(function(card){ return get.type(card,'trick')=='trick'&&get.color(card)=='black'; })) return false; + }, + viewAs:{name:'sha'}, + prompt:'将一张黑色锦囊牌当作杀使用或打出', + check:function(){return 1}, + ai:{ + respondSha:true, + skillTagFilter:function(player){ + if(player.hp>2) return false; + if(!player.hasCard(function(card){ + return get.type(card,'trick')=='trick'&&get.color(card)=='black'; + })) return false; + } } - } - }, - fuchou:{ - trigger:{target:'shaBefore'}, - filter:function(event,player){ - return player.countCards('he')>0; }, - direct:true, - content:function(){ - 'step 0' - var bool=false; - if(!player.hasShan()&&get.effect(player,trigger.card,trigger.player,player)<0){ - bool=true; - } - player.chooseCard('he',get.prompt('fuchou',trigger.player)).ai=function(card){ - if(bool){ - if(player.hp<=1){ - if(get.tag(card,'save')) return 0; - return 8-get.value(card); + fuchou:{ + trigger:{target:'shaBefore'}, + filter:function(event,player){ + return player.countCards('he')>0; + }, + direct:true, + content:function(){ + 'step 0' + var bool=false; + if(!player.hasShan()&&get.effect(player,trigger.card,trigger.player,player)<0){ + bool=true; + } + player.chooseCard('he',get.prompt('fuchou',trigger.player)).ai=function(card){ + if(bool){ + if(player.hp<=1){ + if(get.tag(card,'save')) return 0; + return 8-get.value(card); + } + return 6-get.value(card); } - return 6-get.value(card); + return -get.value(card); } - return -get.value(card); - } - 'step 1' - if(result.bool){ - trigger.untrigger(); - trigger.finish(); - player.logSkill('fuchou',trigger.player); - trigger.player.gain(result.cards,player); - if(get.position(result.cards[0])=='h'){ - player.$give(1,trigger.player); - } - else{ - player.$give(result.cards,trigger.player); - } - player.storage.fuchou2.add(trigger.player); - } - }, - group:'fuchou2' - }, - fuchou2:{ - init:function(player){ - player.storage.fuchou2=[]; - }, - forced:true, - trigger:{global:'phaseAfter'}, - filter:function(event,player){ - for(var i=0;i0); - var next=player.chooseToDiscard('he',{type:'equip'},get.prompt('youzhan',trigger.target)); - next.ai=function(card){ - if(bool){ - return 7-get.value(card); + fuchou2:{ + init:function(player){ + player.storage.fuchou2=[]; + }, + forced:true, + trigger:{global:'phaseAfter'}, + filter:function(event,player){ + for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.loseHp(); - 'step 1' - player.discardPlayerCard(target,true); - 'step 2' - if(player.isDamaged()&&result.links&&result.links.length){ - if(get.type(result.links[0])=='basic'){ - player.chooseTarget([1,player.maxHp-player.hp], - '选择至多'+get.cnNumber(player.maxHp-player.hp)+'名角色各摸一张牌').ai=function(target){ - return get.attitude(player,target); + return false; + }, + content:function(){ + 'step 0' + if(player.storage.fuchou2.length){ + var target=player.storage.fuchou2.shift(); + if(target.isAlive()){ + player.draw(); + if(player.canUse('sha',target,false)&&player.hasSha()){ + player.chooseToUse({name:'sha'},target,-1,'对'+get.translation(target)+'使用一张杀,或失去一点体力'); + } + else{ + player.loseHp(); + event.redo(); + } } } else{ - player.storage.kangyin2=player.maxHp-player.hp; - player.addTempSkill('kangyin2','phaseAfter'); event.finish(); } - } - else{ - event.finish(); - } - 'step 3' - if(result.targets&&result.targets.length){ - result.targets.sort(lib.sort.seat); - player.line(result.targets,'green'); - game.asyncDraw(result.targets); + 'step 1' + if(!result.bool){ + player.loseHp(); + } + event.goto(0); } }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(player.hp>=4) return -1; - if(player.hp==3&&!player.needsToDiscard()) return -1; - return 0; + chezhen:{ + mod:{ + globalFrom:function(from,to,distance){ + if(from.countCards('e')) return distance-1; + }, + globalTo:function(from,to,distance){ + if(!to.countCards('e')) return distance+1; } } - } - }, - kangyin2:{ - mark:true, - intro:{ - content:'到其他角色的距离-#;使用【杀】的额外目标数上限+#' }, - onremove:true, - mod:{ - globalFrom:function(from,to,distance){ - return distance-from.storage.kangyin2; + youzhan:{ + trigger:{global:'shaBefore'}, + direct:true, + filter:function(event,player){ + return get.distance(player,event.target)<=1&&player.countCards('he',{type:'equip'}); }, - selectTarget:function(card,player,range){ - if(card.name=='sha'&&range[1]!=-1) range[1]+=player.storage.kangyin2; - }, - } - }, - duoqi:{ - trigger:{global:'discardAfter'}, - filter:function(event,player){ - if(_status.currentPhase==player) return false; - if(!player.storage.zhucheng||!player.storage.zhucheng.length) return false; - var evt=event.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse') return true; - return false; + content:function(){ + 'step 0' + var bool=(get.attitude(player,trigger.player)<0&&get.attitude(player,trigger.target)>0); + var next=player.chooseToDiscard('he',{type:'equip'},get.prompt('youzhan',trigger.target)); + next.ai=function(card){ + if(bool){ + return 7-get.value(card); + } + return 0; + }; + next.logSkill=['youzhan',trigger.target]; + 'step 1' + if(result.bool){ + event.youdiinfo={ + source:trigger.player, + evt:trigger + } + trigger.target.useCard({name:'youdishenru'}); + } + } }, - direct:true, - content:function(){ - 'step 0' - var bool=false; - if(get.attitude(player,trigger.player)<0&&trigger.player.needsToDiscard()){ - bool=true; + kangyin:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + player.discardPlayerCard(target,true); + 'step 2' + if(player.isDamaged()&&result.links&&result.links.length){ + if(get.type(result.links[0])=='basic'){ + player.chooseTarget([1,player.maxHp-player.hp], + '选择至多'+get.cnNumber(player.maxHp-player.hp)+'名角色各摸一张牌').ai=function(target){ + return get.attitude(player,target); + } + } + else{ + player.storage.kangyin2=player.maxHp-player.hp; + player.addTempSkill('kangyin2','phaseAfter'); + event.finish(); + } + } + else{ + event.finish(); + } + 'step 3' + if(result.targets&&result.targets.length){ + result.targets.sort(lib.sort.seat); + player.line(result.targets,'green'); + game.asyncDraw(result.targets); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(player.hp>=4) return -1; + if(player.hp==3&&!player.needsToDiscard()) return -1; + return 0; + } + } } - player.chooseCardButton(get.prompt('zhucheng',_status.currentPhase),player.storage.zhucheng).ai=function(button){ - return bool?1:0; + }, + kangyin2:{ + mark:true, + intro:{ + content:'到其他角色的距离-#;使用【杀】的额外目标数上限+#' + }, + onremove:true, + mod:{ + globalFrom:function(from,to,distance){ + return distance-from.storage.kangyin2; + }, + selectTarget:function(card,player,range){ + if(card.name=='sha'&&range[1]!=-1) range[1]+=player.storage.kangyin2; + }, } - 'step 1' - if(result.bool){ - player.logSkill('zhucheng',_status.currentPhase); - player.$throw(result.links[0]); - player.storage.zhucheng.remove(result.links[0]); - ui.discardPile.appendChild(result.links[0]); - player.syncStorage('zhucheng'); - if(player.storage.zhucheng.length==0){ + }, + duoqi:{ + trigger:{global:'discardAfter'}, + filter:function(event,player){ + if(_status.currentPhase==player) return false; + if(!player.storage.zhucheng||!player.storage.zhucheng.length) return false; + var evt=event.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse') return true; + return false; + }, + direct:true, + content:function(){ + 'step 0' + var bool=false; + if(get.attitude(player,trigger.player)<0&&trigger.player.needsToDiscard()){ + bool=true; + } + player.chooseCardButton(get.prompt('zhucheng',_status.currentPhase),player.storage.zhucheng).ai=function(button){ + return bool?1:0; + } + 'step 1' + if(result.bool){ + player.logSkill('zhucheng',_status.currentPhase); + player.$throw(result.links[0]); + player.storage.zhucheng.remove(result.links[0]); + ui.discardPile.appendChild(result.links[0]); + player.syncStorage('zhucheng'); + if(player.storage.zhucheng.length==0){ + player.unmarkSkill('zhucheng'); + } + else{ + player.updateMarks(); + } + var evt=trigger.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse'){ + evt.skipped=true; + } + } + }, + ai:{ + expose:0.2 + } + }, + zhucheng:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + return !player.storage.zhucheng||!player.storage.zhucheng.length; + }, + check:function(event,player){ + if(player.storage.zhucheng&&player.storage.zhucheng.length){ + if(!player.hasShan()) return false; + if(player.storage.zhucheng.length>=2) return false; + } + return true; + }, + intro:{ + content:'cards' + }, + content:function(){ + if(player.storage.zhucheng&&player.storage.zhucheng.length){ + player.gain(player.storage.zhucheng,'gain2'); + delete player.storage.zhucheng; player.unmarkSkill('zhucheng'); } else{ - player.updateMarks(); - } - var evt=trigger.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse'){ - evt.skipped=true; - } - } - }, - ai:{ - expose:0.2 - } - }, - zhucheng:{ - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - return !player.storage.zhucheng||!player.storage.zhucheng.length; - }, - check:function(event,player){ - if(player.storage.zhucheng&&player.storage.zhucheng.length){ - if(!player.hasShan()) return false; - if(player.storage.zhucheng.length>=2) return false; - } - return true; - }, - intro:{ - content:'cards' - }, - content:function(){ - if(player.storage.zhucheng&&player.storage.zhucheng.length){ - player.gain(player.storage.zhucheng,'gain2'); - delete player.storage.zhucheng; - player.unmarkSkill('zhucheng'); - } - else{ - var cards=get.cards(Math.max(1,player.maxHp-player.hp)); - player.$gain2(cards); - player.storage.zhucheng=cards; - player.markSkill('zhucheng'); - } - }, - ai:{ - target:function(card,player,target,current){ - if(card.name=='sha'&&player.storage.zhucheng&&player.storage.zhucheng.length){ - if(player.storage.zhucheng.length>=2){ - if(!player.hasFriend()&&player.countCards('he')-20; - }, - content:function(){ - 'step 0' - var bool=false; - if(get.effect(player,trigger.card,trigger.player,trigger.player)>=0){ - bool=true; - } - var num=player.storage.zhucheng.length; - trigger.player.chooseToDiscard('弃置'+get.cnNumber(num)+'张牌,或令杀无效',num).ai=function(card){ - if(bool){ - return 7-get.value(card); - } - return 0; - } - 'step 1' - if(!result.bool){ - trigger.untrigger(); - trigger.finish(); - } - } - }, - diy_jiaoxia:{ - audio:['jiaoxia',2], - trigger:{target:'useCardToBegin'}, - filter:function(event,player){ - return event.card&&get.color(event.card)=='red'; - }, - frequent:true, - content:function(){ - player.draw(); - }, - ai:{ - effect:function(card,player,target){ - if(get.color(card)=='red') return [1,1]; - }, - } - }, - zaiqix:{ - trigger:{player:'phaseDrawBefore'}, - filter:function(event,player){ - return player.hp=2; - } - return true; - }, - content:function(){ - "step 0" - trigger.untrigger(); - trigger.finish(); - event.cards=get.cards(player.maxHp-player.hp+1); - player.showCards(event.cards); - "step 1" - var num=0; - for(var i=0;i=player.maxHp-1) return [0,0]; - } - } - } - }, - diykuanggu:{ - trigger:{source:'damageEnd'}, - forced:true, - content:function(){ - if(get.distance(trigger.player,player,'attack')>1){ - player.draw(trigger.num); - } - else{ - player.recover(trigger.num); - } - } - }, - diyduanliang:{ - group:['diyduanliang1','diyduanliang2'], - ai:{ - threaten:1.2 - } - }, - diyduanliang1:{ - enable:'phaseUse', - usable:1, - discard:false, - filter:function(event,player){ - var cards=player.getCards('he',{color:'black'}); - for(var i=0;i0) return false; - }, - save:true, - result:{ - player:4, - target:function(player,target){ - if(target.hp==target.maxHp) return 2; - return 4; - } - }, - threaten:function(player,target){ - if(!target.storage.guihan) return 0.8; - } - }, - intro:{ - content:'limited' - } - }, - luweiyan:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return get.type(card)!='basic'; - }, - position:'he', - filter:function(event,player){ - return player.hasCard(function(card){ - return get.type(card)!='basic'; - },'he'); - }, - viewAs:{name:'shuiyanqijun'}, - prompt:'将一张非基本牌当水淹七军使用', - check:function(card){return 8-get.value(card)}, - group:'luweiyan2' - }, - luweiyan2:{ - trigger:{player:'useCardAfter'}, - direct:true, - filter:function(event,player){ - if(event.skill!='luweiyan') return false; - for(var i=0;i0; - }, - content:function(){ - trigger.source.discard(trigger.source.getCards('he',{color:'red'})); - }, - ai:{ - expose:0.1, - result:{ - threaten:0.8, - target:function(card,player,target){ - if(get.tag(card,'damage')&&get.attitude(target,player)<0){ - return [1,0,0,-player.countCards('he',{color:'red'})]; - } - } - } - } - }, - diyguhuo:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.countCards('hej')>0; - }, - content:function(){ - "step 0" - player.draw(2); - "step 1" - var next=player.discardPlayerCard(player,'hej',2,true); - next.ai=function(button){ - if(get.position(button.link)=='j') return 10; - return -get.value(button.link); - }; - next.filterButton=function(button){ - return lib.filter.cardDiscardable(button.link,player); - } - }, - ai:{ - effect:{ - target:function(card){ - if(get.type(card)=='delay') return [0,0.5]; - } - } - } - }, - diychanyuan:{ - trigger:{player:'dieBegin'}, - forced:true, - filter:function(event){ - return event.source!=undefined; - }, - content:function(){ - trigger.source.loseMaxHp(true); - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 0.2; - }, - result:{ + ai:{ target:function(card,player,target,current){ - if(target.hp<=1&&get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-5]; - return [1,0,0,-2]; - } - } - } - } - }, - zonghuo:{ - trigger:{source:'damageBefore'}, - direct:true, - priority:10, - filter:function(event){ - return event.nature!='fire'; - }, - content:function(){ - "step 0" - player.chooseToDiscard(get.prompt('zonghuo')).ai=function(card){ - var att=get.attitude(player,trigger.player); - if(trigger.player.hasSkillTag('nofire')){ - if(att>0) return 8-get.value(card); - return -1; - } - if(att<0){ - return 7-get.value(card); - } - return -1; - } - "step 1" - if(result.bool){ - player.logSkill('zonghuo',trigger.player,'fire'); - trigger.nature='fire'; - } - } - }, - shaoying:{ - trigger:{source:'damageAfter'}, - direct:true, - filter:function(event){ - return event.nature=='fire'; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('shaoying'),function(card,player,target){ - return get.distance(trigger.player,target)<=1&&trigger.player!=target; - }).ai=function(target){ - return get.damageEffect(target,player,player,'fire'); - } - "step 1" - if(result.bool){ - var card=get.cards()[0]; - ui.discardPile.appendChild(card); - player.showCards(card); - event.bool=get.color(card)=='red'; - event.target=result.targets[0]; - player.logSkill('shaoying',event.target,false); - trigger.player.line(event.target,'fire'); - } - else{ - event.finish(); - } - "step 2" - if(event.bool){ - event.target.damage('fire'); - } - } - }, - tiangong:{ - group:['tiangong2'], - trigger:{player:'damageBefore'}, - filter:function(event){ - if(event.nature=='thunder') return true; - }, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='tiesuo') return 0; - if(get.tag(card,'thunderDamage')) return 0; - } - }, - threaten:0.5 - } - }, - tiangong2:{ - trigger:{source:'damageAfter'}, - filter:function(event){ - if(event.nature=='thunder') return true; - }, - forced:true, - popup:false, - priority:1, - content:function(){ - player.draw(); - }, - }, - xicai:{ - inherit:'jianxiong' - }, - diyjianxiong:{ - mode:['identity'], - trigger:{global:'dieBefore'}, - forced:true, - filter:function(event,player){ - return event.player!=game.zhu&&_status.currentPhase==player; - }, - content:function(){ - trigger.player.identity='fan'; - trigger.player.setIdentity('fan'); - trigger.player.identityShown=true; - } - }, - shuaiyan:{ - trigger:{global:'recoverAfter'}, - filter:function(event,player){ - return event.player!=player&&_status.currentPhase!=player; - }, - content:function(){ - "step 0" - var att=get.attitude(trigger.player,player); - var bool=0; - if(att<0){ - if(trigger.player.countCards('e')==0&&trigger.player.countCards('h')>2) bool=1; - else if(trigger.player.countCards('he')==0) bool=1; - } - else if(att==0&&trigger.player.countCards('he')==0){ - bool=1; - } - trigger.player.chooseControl(function(){ - return bool; - }).set('prompt','率言').set('choiceList',['令'+get.translation(player)+'摸一张牌','令'+get.translation(player)+'弃置你一张牌']); - "step 1" - if(result.control=='选项一'){ - player.draw(); - event.finish(); - } - else if(trigger.player.countCards('he')){ - player.discardPlayerCard(trigger.player,true,'he'); - } - else{ - event.finish(); - } - }, - ai:{ - threaten:1.2 - } - }, - moshou:{ - mod:{ - targetEnabled:function(card,player,target,now){ - if(card.name=='bingliang'||card.name=='lebu') return false; - } - }, - }, - siji:{ - trigger:{player:'phaseDiscardEnd'}, - frequent:true, - filter:function(event,player){ - if(event.cards){ - for(var i=0;i=2){ + if(!player.hasFriend()&&player.countCards('he')-20; + }, + content:function(){ + 'step 0' + var bool=false; + if(get.effect(player,trigger.card,trigger.player,trigger.player)>=0){ + bool=true; + } + var num=player.storage.zhucheng.length; + trigger.player.chooseToDiscard('弃置'+get.cnNumber(num)+'张牌,或令杀无效',num).ai=function(card){ + if(bool){ + return 7-get.value(card); + } + return 0; + } + 'step 1' + if(!result.bool){ + trigger.untrigger(); + trigger.finish(); + } + } + }, + diy_jiaoxia:{ + audio:['jiaoxia',2], + trigger:{target:'useCardToBegin'}, + filter:function(event,player){ + return event.card&&get.color(event.card)=='red'; + }, + frequent:true, + content:function(){ + player.draw(); + }, + ai:{ + effect:function(card,player,target){ + if(get.color(card)=='red') return [1,1]; + }, + } + }, + zaiqix:{ + trigger:{player:'phaseDrawBefore'}, + filter:function(event,player){ + return player.hp=2; + } + return true; + }, + content:function(){ + "step 0" + trigger.untrigger(); + trigger.finish(); + event.cards=get.cards(player.maxHp-player.hp+1); + player.showCards(event.cards); + "step 1" + var num=0; + for(var i=0;i=player.maxHp-1) return [0,0]; + } + } + } + }, + diykuanggu:{ + trigger:{source:'damageEnd'}, + forced:true, + content:function(){ + if(get.distance(trigger.player,player,'attack')>1){ + player.draw(trigger.num); + } + else{ + player.recover(trigger.num); + } + } + }, + diyduanliang:{ + group:['diyduanliang1','diyduanliang2'], + ai:{ + threaten:1.2 + } + }, + diyduanliang1:{ + enable:'phaseUse', + usable:1, + discard:false, + filter:function(event,player){ + var cards=player.getCards('he',{color:'black'}); + for(var i=0;i0) return false; + }, + save:true, + result:{ + player:4, + target:function(player,target){ + if(target.hp==target.maxHp) return 2; + return 4; + } + }, + threaten:function(player,target){ + if(!target.storage.guihan) return 0.8; + } + }, + intro:{ + content:'limited' + } + }, + luweiyan:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return get.type(card)!='basic'; + }, + position:'he', + filter:function(event,player){ + return player.hasCard(function(card){ + return get.type(card)!='basic'; + },'he'); + }, + viewAs:{name:'shuiyanqijun'}, + prompt:'将一张非基本牌当水淹七军使用', + check:function(card){return 8-get.value(card)}, + group:'luweiyan2' + }, + luweiyan2:{ + trigger:{player:'useCardAfter'}, + direct:true, + filter:function(event,player){ + if(event.skill!='luweiyan') return false; + for(var i=0;i0; + }, + content:function(){ + trigger.source.discard(trigger.source.getCards('he',{color:'red'})); + }, + ai:{ + expose:0.1, + result:{ + threaten:0.8, + target:function(card,player,target){ + if(get.tag(card,'damage')&&get.attitude(target,player)<0){ + return [1,0,0,-player.countCards('he',{color:'red'})]; } } } } }, - mod:{ - globalFrom:function(from,to,distance){ - if(from.isLinked()) return distance+1; + diyguhuo:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.countCards('hej')>0; }, - globalTo:function(from,to,distance){ - if(to.isLinked()) return distance+1; + content:function(){ + "step 0" + player.draw(2); + "step 1" + var next=player.discardPlayerCard(player,'hej',2,true); + next.ai=function(button){ + if(get.position(button.link)=='j') return 10; + return -get.value(button.link); + }; + next.filterButton=function(button){ + return lib.filter.cardDiscardable(button.link,player); + } }, - } - }, - geju:{ - trigger:{player:'phaseBegin'}, - frequent:true, - filter:function(event,player){ - var list=[]; - var players=game.filterPlayer(); - for(var i=0;i0; }, - content:function(){ - var list=[]; - var players=game.filterPlayer(); - for(var i=0;i0) player.draw(list.length); - } - }, - diyqiangxi:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return get.subtype(card)=='equip1'; - }, - selectCard:[0,1], - filterTarget:function(card,player,target){ - if(player==target) return false; - return get.distance(player,target,'attack')<=1; - }, - content:function(){ - "step 0" - if(cards.length==0){ - player.loseHp(); - } - "step 1" - target.damage(); - "step 2" - if(target.isAlive()&&target.countCards('he')){ - player.discardPlayerCard(target); - } - }, - check:function(card){ - return 10-get.value(card); - }, - position:'he', - ai:{ - order:8, - result:{ - player:function(player,target){ - if(ui.selected.cards.length) return 0; - if(player.hp>=target.hp) return -0.9; - if(player.hp<=2) return -10; - return -2; + diychanyuan:{ + trigger:{player:'dieBegin'}, + forced:true, + filter:function(event){ + return event.source!=undefined; + }, + content:function(){ + trigger.source.loseMaxHp(true); + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 0.2; }, - target:function(player,target){ - if(player.hp<=1) return 0; - return get.damageEffect(target,player); + result:{ + target:function(card,player,target,current){ + if(target.hp<=1&&get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-5]; + return [1,0,0,-2]; + } + } } } }, - threaten:1.3 + zonghuo:{ + trigger:{source:'damageBefore'}, + direct:true, + priority:10, + filter:function(event){ + return event.nature!='fire'; + }, + content:function(){ + "step 0" + player.chooseToDiscard(get.prompt('zonghuo')).ai=function(card){ + var att=get.attitude(player,trigger.player); + if(trigger.player.hasSkillTag('nofire')){ + if(att>0) return 8-get.value(card); + return -1; + } + if(att<0){ + return 7-get.value(card); + } + return -1; + } + "step 1" + if(result.bool){ + player.logSkill('zonghuo',trigger.player,'fire'); + trigger.nature='fire'; + } + } + }, + shaoying:{ + trigger:{source:'damageAfter'}, + direct:true, + filter:function(event){ + return event.nature=='fire'; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('shaoying'),function(card,player,target){ + return get.distance(trigger.player,target)<=1&&trigger.player!=target; + }).ai=function(target){ + return get.damageEffect(target,player,player,'fire'); + } + "step 1" + if(result.bool){ + var card=get.cards()[0]; + ui.discardPile.appendChild(card); + player.showCards(card); + event.bool=get.color(card)=='red'; + event.target=result.targets[0]; + player.logSkill('shaoying',event.target,false); + trigger.player.line(event.target,'fire'); + } + else{ + event.finish(); + } + "step 2" + if(event.bool){ + event.target.damage('fire'); + } + } + }, + tiangong:{ + group:['tiangong2'], + trigger:{player:'damageBefore'}, + filter:function(event){ + if(event.nature=='thunder') return true; + }, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='tiesuo') return 0; + if(get.tag(card,'thunderDamage')) return 0; + } + }, + threaten:0.5 + } + }, + tiangong2:{ + trigger:{source:'damageAfter'}, + filter:function(event){ + if(event.nature=='thunder') return true; + }, + forced:true, + popup:false, + priority:1, + content:function(){ + player.draw(); + }, + }, + xicai:{ + inherit:'jianxiong' + }, + diyjianxiong:{ + mode:['identity'], + trigger:{global:'dieBefore'}, + forced:true, + filter:function(event,player){ + return event.player!=game.zhu&&_status.currentPhase==player; + }, + content:function(){ + trigger.player.identity='fan'; + trigger.player.setIdentity('fan'); + trigger.player.identityShown=true; + } + }, + shuaiyan:{ + trigger:{global:'recoverAfter'}, + filter:function(event,player){ + return event.player!=player&&_status.currentPhase!=player; + }, + content:function(){ + "step 0" + var att=get.attitude(trigger.player,player); + var bool=0; + if(att<0){ + if(trigger.player.countCards('e')==0&&trigger.player.countCards('h')>2) bool=1; + else if(trigger.player.countCards('he')==0) bool=1; + } + else if(att==0&&trigger.player.countCards('he')==0){ + bool=1; + } + trigger.player.chooseControl(function(){ + return bool; + }).set('prompt','率言').set('choiceList',['令'+get.translation(player)+'摸一张牌','令'+get.translation(player)+'弃置你一张牌']); + "step 1" + if(result.control=='选项一'){ + player.draw(); + event.finish(); + } + else if(trigger.player.countCards('he')){ + player.discardPlayerCard(trigger.player,true,'he'); + } + else{ + event.finish(); + } + }, + ai:{ + threaten:1.2 + } + }, + moshou:{ + mod:{ + targetEnabled:function(card,player,target,now){ + if(card.name=='bingliang'||card.name=='lebu') return false; + } + }, + }, + siji:{ + trigger:{player:'phaseDiscardEnd'}, + frequent:true, + filter:function(event,player){ + if(event.cards){ + for(var i=0;i0; + }, + content:function(){ + var list=[]; + var players=game.filterPlayer(); + for(var i=0;i0) player.draw(list.length); + } + }, + diyqiangxi:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return get.subtype(card)=='equip1'; + }, + selectCard:[0,1], + filterTarget:function(card,player,target){ + if(player==target) return false; + return get.distance(player,target,'attack')<=1; + }, + content:function(){ + "step 0" + if(cards.length==0){ + player.loseHp(); + } + "step 1" + target.damage(); + "step 2" + if(target.isAlive()&&target.countCards('he')){ + player.discardPlayerCard(target); + } + }, + check:function(card){ + return 10-get.value(card); + }, + position:'he', + ai:{ + order:8, + result:{ + player:function(player,target){ + if(ui.selected.cards.length) return 0; + if(player.hp>=target.hp) return -0.9; + if(player.hp<=2) return -10; + return -2; + }, + target:function(player,target){ + if(player.hp<=1) return 0; + return get.damageEffect(target,player); + } + } + }, + threaten:1.3 + }, }, - }, - translate:{ - diy_liufu:'刘馥', - diy_xizhenxihong:'习珍习宏', - diy_liuzan:'留赞', - diy_zaozhirenjun:'枣祗任峻', - diy_yangyi:'杨仪', - diy_tianyu:'田豫', + translate:{ + diy_liufu:'刘馥', + diy_xizhenxihong:'习珍习宏', + diy_liuzan:'留赞', + diy_zaozhirenjun:'枣祗任峻', + diy_yangyi:'杨仪', + diy_tianyu:'田豫', - // diy_caocao:'曹操', - diy_menghuo:'孟获', - diy_huangzhong:'黄汉升', - diy_xuhuang:'徐公明', - diy_dianwei:'新典韦', - diy_weiyan:'魏文长', - xicai:'惜才', - diyjianxiong:'奸雄', - diy_feishi:'费诗', - shuaiyan:'率言', - moshou:'墨守', - diy_hanlong:'韩龙', - diy_luxun:'陆伯言', - diy_yuji:'于吉', - diy_zhouyu:'周公瑾', - diy_lukang:'陆抗', - diy_caiwenji:'蔡昭姬', - diy_zhenji:'甄宓', + // diy_caocao:'曹操', + diy_menghuo:'孟获', + diy_huangzhong:'黄汉升', + diy_xuhuang:'徐公明', + diy_dianwei:'新典韦', + diy_weiyan:'魏文长', + xicai:'惜才', + diyjianxiong:'奸雄', + diy_feishi:'费诗', + shuaiyan:'率言', + moshou:'墨守', + diy_hanlong:'韩龙', + diy_luxun:'陆伯言', + diy_yuji:'于吉', + diy_zhouyu:'周公瑾', + diy_lukang:'陆抗', + diy_caiwenji:'蔡昭姬', + diy_zhenji:'甄宓', - liangce:'粮策', - liangce_info:'①出牌阶段限一次,你可以将一张基本牌当【五谷丰登】使用。②当因执行【五谷丰登】的效果而亮出的牌因效果执行完毕而置入弃牌堆后,你可以选择一名角色,令该角色获取之', - jianbi:'坚壁', - jianbi_info:'当你成为锦囊牌的目标时,若此牌的目标包括其他角色,你可以令此牌对1至X个目标无效(X为你已损失的体力值且至少为1)', - juntun:'军屯', - juntun_info:'出牌阶段,你可以重铸装备牌', - choudu:'筹度', - choudu_info:'出牌阶段限一次,你可以弃置一张牌,并指定一名角色视为其使用一张调兵遣将', - liduan:'立断', - liduan_info:'当一名其他角色于其回合外获得牌后,若其此次获得的牌数为1且为装备牌(无论是否可见),你可以令该角色选择一项:1.使用此牌;2.将一张手牌交给你', - fuchou:'负仇', - fuchou2:'负仇', - fuchou_info:'当你成为【杀】的目标时,你可以将一张牌交给此【杀】的使用者,令此【杀】对你无效且你到其的距离于当前回合内视为1,若如此做,此回合的结束阶段开始时,其令你摸一张牌,然后你需对其使用【杀】,否则失去1点体力', - jinyan:'噤言', - jinyan_info:'锁定技。若你的体力值不大于2,你的黑色锦囊牌视为【杀】', - chezhen:'车阵', - chezhen_info:'锁定技。若你的装备区里:没有牌,你的防御距离+1;有牌,你的进攻距离+1', - youzhan:'诱战', - youzhan_info:'当以你距离不大于1的角色为目标的【杀】的使用结算开始时,你可以弃置一张装备牌,令该角色视为使用【诱敌深入】', - kangyin:'亢音', - kangyin2:'亢音', - kangyin_info:'出牌阶段限一次,你可以失去1点体力并选择一名其他角色,弃置该角色的一张牌。若此牌:为基本牌,你可以令一至X名角色各摸一张牌;不为基本牌,于此回合内:你的进攻距离+X,且你使用杀的额外目标数上限+X。(X为你已损失的体力值)', - zhucheng:'筑城', - zhucheng2:'筑城', - zhucheng_info:'①结束阶段开始时,若没有“筑”,你可以将牌堆顶的X张牌置于你的武将牌上〔称为“筑”〕(X为你已损失的体力值与1中的较大值),否则你可以获取所有“筑”。②当你成为杀的目标时,若有“筑”,你可以令此杀的使用者弃置X张牌(X为“筑”的数量),否则杀对你无效', - duoqi:'夺气', - duoqi_info:'当一名角色于除你之外的角色的出牌阶段内因弃置而失去牌后,你可以移去一张“筑”,并结束此出牌阶段', + liangce:'粮策', + liangce_info:'①出牌阶段限一次,你可以将一张基本牌当【五谷丰登】使用。②当因执行【五谷丰登】的效果而亮出的牌因效果执行完毕而置入弃牌堆后,你可以选择一名角色,令该角色获取之', + jianbi:'坚壁', + jianbi_info:'当你成为锦囊牌的目标时,若此牌的目标包括其他角色,你可以令此牌对1至X个目标无效(X为你已损失的体力值且至少为1)', + juntun:'军屯', + juntun_info:'出牌阶段,你可以重铸装备牌', + choudu:'筹度', + choudu_info:'出牌阶段限一次,你可以弃置一张牌,并指定一名角色视为其使用一张调兵遣将', + liduan:'立断', + liduan_info:'当一名其他角色于其回合外获得牌后,若其此次获得的牌数为1且为装备牌(无论是否可见),你可以令该角色选择一项:1.使用此牌;2.将一张手牌交给你', + fuchou:'负仇', + fuchou2:'负仇', + fuchou_info:'当你成为【杀】的目标时,你可以将一张牌交给此【杀】的使用者,令此【杀】对你无效且你到其的距离于当前回合内视为1,若如此做,此回合的结束阶段开始时,其令你摸一张牌,然后你需对其使用【杀】,否则失去1点体力', + jinyan:'噤言', + jinyan_info:'锁定技。若你的体力值不大于2,你的黑色锦囊牌视为【杀】', + chezhen:'车阵', + chezhen_info:'锁定技。若你的装备区里:没有牌,你的防御距离+1;有牌,你的进攻距离+1', + youzhan:'诱战', + youzhan_info:'当以你距离不大于1的角色为目标的【杀】的使用结算开始时,你可以弃置一张装备牌,令该角色视为使用【诱敌深入】', + kangyin:'亢音', + kangyin2:'亢音', + kangyin_info:'出牌阶段限一次,你可以失去1点体力并选择一名其他角色,弃置该角色的一张牌。若此牌:为基本牌,你可以令一至X名角色各摸一张牌;不为基本牌,于此回合内:你的进攻距离+X,且你使用杀的额外目标数上限+X。(X为你已损失的体力值)', + zhucheng:'筑城', + zhucheng2:'筑城', + zhucheng_info:'①结束阶段开始时,若没有“筑”,你可以将牌堆顶的X张牌置于你的武将牌上〔称为“筑”〕(X为你已损失的体力值与1中的较大值),否则你可以获取所有“筑”。②当你成为杀的目标时,若有“筑”,你可以令此杀的使用者弃置X张牌(X为“筑”的数量),否则杀对你无效', + duoqi:'夺气', + duoqi_info:'当一名角色于除你之外的角色的出牌阶段内因弃置而失去牌后,你可以移去一张“筑”,并结束此出牌阶段', - siji:'伺机', - ciqiu:'刺酋', - ciqiu2:'刺酋', - ciqiu3:'刺酋', - diy_liuyan:'刘焉', - juedao:'绝道', - geju:'割据', - shaoying:'烧营', - zonghuo:'纵火', - diychanyuan:'缠怨', - diyguhuo:'蛊惑', - jieyan:'劫焰', - honglian:'红莲', - xiongzi:'雄姿', - luweiyan:'围堰', - guihan:'归汉', - diyduanliang:'断粮', - diyduanliang1:'断粮', - diyduanliang2:'断粮', - diyqiangxi:'强袭', - diykuanggu:'狂骨', - diyzaiqi:'再起', - batu:'霸图', - zaiqix:'再起', - diy_jiaoxia:'皎霞', - yaliang:'雅量', - yaliang_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。', - diy_jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', - zaiqix_info:'摸牌阶段,若你已受伤,你可以改为展示牌堆顶的X+1张牌,X为你已损失的体力值,其中每有一张♥牌,你回复1点体力,然后弃掉这些♥牌,将其余的牌收入手牌。', - batu_info:'结束阶段,你可以将手牌数补至X,X为现存的势力数', - diyzaiqi_info:'锁定技,你摸牌阶段额外摸X张牌,X为你已损失的体力值', - diykuanggu_info:'锁定技,每当你造成一点伤害,你在其攻击范围内,你回复一点体力,否则你摸一张牌', - diyqiangxi_info:'出牌阶段,你可以自减一点体力或弃一张武器牌,然后你对你攻击范围内的一名角色造成一点伤害并弃置其一张牌,每回合限一次。', - diyduanliang_info:'出牌阶段限一次,你可以将一张黑色的基本牌当兵粮寸断对一名角色使用,然后摸一张牌。你的兵粮寸断可以指定距离2以内的角色作为目标', - guihan_info:'限定技,当你进入濒死状态时,可以指定一名男性角色与其各回复一点体力并摸两张牌', - luweiyan_info:'出牌阶段限一次,你可以将一张非基本牌当作水攻使用;结算后你可以视为对其中一个目标使用一张不计入出杀次数的杀', - xiongzi_info:'锁定技,你于摸牌阶段额外摸X+1张牌,X为你装备区牌数的一半,向下取整', - honglian_info:'每当你受到来自其他角色的伤害,可以弃置伤害来源的所有红色牌', - jieyan_info:'出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到一点火焰伤害', - diyguhuo_info:'锁定技,准备阶段,你摸两张牌,然后弃置区域内的两张牌', - diychanyuan_info:'锁定技,杀死你的角色失去一点体力上限', - zonghuo_info:'你可弃置一张牌将你即将造成的伤害变为火焰伤害', - shaoying_info:'每当你造成一次火焰伤害,可指定距离受伤害角色1以内的另一名角色,并展示牌堆顶的一张牌,若此牌为红色,该角色受到一点火焰伤害', - juedao_info:'出牌阶段,你可以弃置一张手牌,横置你的武将牌;锁定技,若你处于连环状态,你进攻距离-1、防御距离+1。', - geju_info:'准备阶段开始时,你可以摸X张牌(X为攻击范围内不含有你的势力数)。', - siji_info:'弃牌阶段结束后,你可以摸2X张牌(X为你于此阶段内弃置的【杀】的数量)。', - ciqiu_info:'锁定技,每当你使用【杀】对目标角色造成伤害时,若该角色未受伤,你令此伤害+1;锁定技,每当未受伤的角色因受到你使用【杀】造成的伤害而扣减体力后,若该角色的体力值为0,你令其死亡,然后你失去“刺酋”。 ', - shuaiyan_info:'每当其他角色于你的回合外回复体力后,你可以令该角色选择一项:1.令你摸一张牌;2.令你弃置其一张牌。', - moshou_info:'锁定技,你不能成为乐不思蜀和兵粮寸断的目标。', - xicai_info:'你可以立即获得对你造成伤害的牌', - diyjianxiong_info:'锁定技,在身份局中,在你回合内死亡的角色均视为反贼,国战中,在你回合内死亡的角色若与你势力相同则随机改为另一个势力', - }, + siji:'伺机', + ciqiu:'刺酋', + ciqiu2:'刺酋', + ciqiu3:'刺酋', + diy_liuyan:'刘焉', + juedao:'绝道', + geju:'割据', + shaoying:'烧营', + zonghuo:'纵火', + diychanyuan:'缠怨', + diyguhuo:'蛊惑', + jieyan:'劫焰', + honglian:'红莲', + xiongzi:'雄姿', + luweiyan:'围堰', + guihan:'归汉', + diyduanliang:'断粮', + diyduanliang1:'断粮', + diyduanliang2:'断粮', + diyqiangxi:'强袭', + diykuanggu:'狂骨', + diyzaiqi:'再起', + batu:'霸图', + zaiqix:'再起', + diy_jiaoxia:'皎霞', + yaliang:'雅量', + yaliang_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。', + diy_jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', + zaiqix_info:'摸牌阶段,若你已受伤,你可以改为展示牌堆顶的X+1张牌,X为你已损失的体力值,其中每有一张♥牌,你回复1点体力,然后弃掉这些♥牌,将其余的牌收入手牌。', + batu_info:'结束阶段,你可以将手牌数补至X,X为现存的势力数', + diyzaiqi_info:'锁定技,你摸牌阶段额外摸X张牌,X为你已损失的体力值', + diykuanggu_info:'锁定技,每当你造成一点伤害,你在其攻击范围内,你回复一点体力,否则你摸一张牌', + diyqiangxi_info:'出牌阶段,你可以自减一点体力或弃一张武器牌,然后你对你攻击范围内的一名角色造成一点伤害并弃置其一张牌,每回合限一次。', + diyduanliang_info:'出牌阶段限一次,你可以将一张黑色的基本牌当兵粮寸断对一名角色使用,然后摸一张牌。你的兵粮寸断可以指定距离2以内的角色作为目标', + guihan_info:'限定技,当你进入濒死状态时,可以指定一名男性角色与其各回复一点体力并摸两张牌', + luweiyan_info:'出牌阶段限一次,你可以将一张非基本牌当作水攻使用;结算后你可以视为对其中一个目标使用一张不计入出杀次数的杀', + xiongzi_info:'锁定技,你于摸牌阶段额外摸X+1张牌,X为你装备区牌数的一半,向下取整', + honglian_info:'每当你受到来自其他角色的伤害,可以弃置伤害来源的所有红色牌', + jieyan_info:'出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到一点火焰伤害', + diyguhuo_info:'锁定技,准备阶段,你摸两张牌,然后弃置区域内的两张牌', + diychanyuan_info:'锁定技,杀死你的角色失去一点体力上限', + zonghuo_info:'你可弃置一张牌将你即将造成的伤害变为火焰伤害', + shaoying_info:'每当你造成一次火焰伤害,可指定距离受伤害角色1以内的另一名角色,并展示牌堆顶的一张牌,若此牌为红色,该角色受到一点火焰伤害', + juedao_info:'出牌阶段,你可以弃置一张手牌,横置你的武将牌;锁定技,若你处于连环状态,你进攻距离-1、防御距离+1。', + geju_info:'准备阶段开始时,你可以摸X张牌(X为攻击范围内不含有你的势力数)。', + siji_info:'弃牌阶段结束后,你可以摸2X张牌(X为你于此阶段内弃置的【杀】的数量)。', + ciqiu_info:'锁定技,每当你使用【杀】对目标角色造成伤害时,若该角色未受伤,你令此伤害+1;锁定技,每当未受伤的角色因受到你使用【杀】造成的伤害而扣减体力后,若该角色的体力值为0,你令其死亡,然后你失去“刺酋”。 ', + shuaiyan_info:'每当其他角色于你的回合外回复体力后,你可以令该角色选择一项:1.令你摸一张牌;2.令你弃置其一张牌。', + moshou_info:'锁定技,你不能成为乐不思蜀和兵粮寸断的目标。', + xicai_info:'你可以立即获得对你造成伤害的牌', + diyjianxiong_info:'锁定技,在身份局中,在你回合内死亡的角色均视为反贼,国战中,在你回合内死亡的角色若与你势力相同则随机改为另一个势力', + }, + }; }); diff --git a/character/extra.js b/character/extra.js index beceeb62f..1fb2b2979 100644 --- a/character/extra.js +++ b/character/extra.js @@ -1,1231 +1,1239 @@ 'use strict'; -game.import('character',{ - name:'extra', - character:{ - shen_guanyu:['male','shen',6,['wuhun','wushen'],['shu']], - shen_zhaoyun:['male','shen',2,['juejing','longhun'],['shu']], - shen_zhugeliang:['male','shen',3,['qixing','kuangfeng','dawu'],['shu']], - shen_lvmeng:['male','shen',3,['shelie','gongxin'],['wu']], - shen_zhouyu:['male','shen',4,['yeyan','qinyin'],['wu']], - shen_simayi:['male','shen',4,['renjie','sbaiyin','lianpo'],['wei']], - shen_caocao:['male','shen',3,['guixin','feiying'],['wei']], - shen_lvbu:['male','shen',5,['baonu','wuqian','shenfen'],['qun']], - }, - characterIntro:{ - shen_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。', - shen_lvmeng:'吕蒙,字子明,汝南富陂人,东吴名将,原有“吴下阿蒙”之贬称,后受孙权劝说,奋发读书,最终成就一代名将。', - shen_zhouyu:'字公瑾,庐江舒县人。东汉末年名将。有姿貌、精音律,江东有“曲有误,周郎顾”之语。周瑜少与孙策交好,后孙策遇刺身亡,孙权继任。周瑜将兵赴丧,以中护军的身份与长史张昭共掌众事,建安十三年(208年),周瑜率东吴军与刘备军联合,在赤壁击败曹操。此战也奠定了三分天下的基础。', - shen_zhugeliang:'字孔明、号卧龙,汉族,琅琊阳都人,三国时期蜀汉丞相、杰出的政治家、军事家、发明家、文学家。在世时被封为武乡侯,死后追谥忠武侯,后来东晋政权推崇诸葛亮军事才能,特追封他为武兴王。诸葛亮为匡扶蜀汉政权,呕心沥血、鞠躬尽瘁、死而后已。其代表作有《前出师表》、《后出师表》、《诫子书》等。曾发明木牛流马等,并改造连弩,可一弩十矢俱发。于234年在宝鸡五丈原逝世。', - }, - skill:{ - qinyin:{ - audio:2, - trigger:{player:'phaseDiscardEnd'}, - direct:true, - filter:function(event,player){ - return event.cards&&event.cards.length>1 - }, - content:function(){ - "step 0" - if(typeof event.count!='number'){ - // event.count=trigger.cards.length-1; - event.count=1; - } - var recover=0,lose=0,players=game.filterPlayer(); - for(var i=0;i0){ - if(players[i].hp<2){ - lose--; - recover+=0.5; - } - lose--; - recover++; - } - else if(get.attitude(player,players[i])<0){ - if(players[i].hp<2){ - lose++; - recover-=0.5; - } - lose++; - recover--; - } - } - else{ - if(get.attitude(player,players[i])>0){ - lose--; - } - else if(get.attitude(player,players[i])<0){ - lose++; - } - } - } - var prompt=get.prompt('qinyin')+'(剩余'+get.cnNumber(event.count)+'次)'; - player.chooseControl('失去体力','回复体力','cancel2', - ui.create.dialog(get.prompt('qinyin'),'hidden')).ai=function(){ - if(lose>recover&&lose>0) return 0; - if(lose0) return 1; - return 2; - } - "step 1" - if(result.control=='cancel2'){ - event.finish(); - } - else{ - player.logSkill('qinyin'); - event.bool=(result.control=='回复体力'); - event.num=0; - event.players=game.filterPlayer(); - } - "step 2" - if(event.num1){ - event.count--; - event.goto(0); - } - }, - ai:{ - expose:0.1, - threaten:2 - } +game.import('character',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'extra', + character:{ + shen_guanyu:['male','shen',6,['wuhun','wushen'],['shu']], + shen_zhaoyun:['male','shen',2,['juejing','longhun'],['shu']], + shen_zhugeliang:['male','shen',3,['qixing','kuangfeng','dawu'],['shu']], + shen_lvmeng:['male','shen',3,['shelie','gongxin'],['wu']], + shen_zhouyu:['male','shen',4,['yeyan','qinyin'],['wu']], + shen_simayi:['male','shen',4,['renjie','sbaiyin','lianpo'],['wei']], + shen_caocao:['male','shen',3,['guixin','feiying'],['wei']], + shen_lvbu:['male','shen',5,['baonu','wuqian','shenfen'],['qun']], }, - lianpo:{ - audio:true, - trigger:{source:'dieAfter'}, - forced:true, - filter:function(event,player){ - return !player.hasSkill('lianpo2'); - }, - content:function(){ - player.addSkill('lianpo2'); - } + characterIntro:{ + shen_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。', + shen_lvmeng:'吕蒙,字子明,汝南富陂人,东吴名将,原有“吴下阿蒙”之贬称,后受孙权劝说,奋发读书,最终成就一代名将。', + shen_zhouyu:'字公瑾,庐江舒县人。东汉末年名将。有姿貌、精音律,江东有“曲有误,周郎顾”之语。周瑜少与孙策交好,后孙策遇刺身亡,孙权继任。周瑜将兵赴丧,以中护军的身份与长史张昭共掌众事,建安十三年(208年),周瑜率东吴军与刘备军联合,在赤壁击败曹操。此战也奠定了三分天下的基础。', + shen_zhugeliang:'字孔明、号卧龙,汉族,琅琊阳都人,三国时期蜀汉丞相、杰出的政治家、军事家、发明家、文学家。在世时被封为武乡侯,死后追谥忠武侯,后来东晋政权推崇诸葛亮军事才能,特追封他为武兴王。诸葛亮为匡扶蜀汉政权,呕心沥血、鞠躬尽瘁、死而后已。其代表作有《前出师表》、《后出师表》、《诫子书》等。曾发明木牛流马等,并改造连弩,可一弩十矢俱发。于234年在宝鸡五丈原逝世。', }, - lianpo2:{ - trigger:{global:'phaseAfter'}, - forced:true, - priority:-50, - content:function(){ - player.removeSkill('lianpo2'); - player.insertPhase(); - } - }, - baonu:{ - trigger:{source:'damageEnd',player:'damageEnd'}, - forced:true, - mark:true, - audio:2, - filter:function(event){ - return event.num>0; - }, - init:function(player){ - player.storage.baonu=2; - game.addVideo('storage',player,['baonu',player.storage.baonu]); - }, - content:function(){ - player.storage.baonu+=trigger.num; - game.addVideo('storage',player,['baonu',player.storage.baonu]); - }, - intro:{ - content:'mark' - } - }, - shenfen:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return !player.storage.shenfen&&player.storage.baonu>=6; - }, - init:function(player){ - player.storage.shenfen=false; - }, - skillAnimation:true, - animationColor:'metal', - mark:true, - content:function(){ - "step 0" - player.awakenSkill('shenfen'); - player.storage.shenfen=true; - player.storage.baonu-=6; - event.targets=game.filterPlayer(); - event.targets.remove(player); - event.targets.sort(lib.sort.seat); - event.targets2=event.targets.slice(0); - player.line(event.targets,'green'); - "step 1" - if(event.targets.length){ - event.targets.shift().damage(); - event.redo(); - } - "step 2" - if(event.targets2.length){ - var cur=event.targets2.shift(); - if(cur&&cur.countCards('he')){ - cur.chooseToDiscard('he',true,4); + skill:{ + qinyin:{ + audio:2, + trigger:{player:'phaseDiscardEnd'}, + direct:true, + filter:function(event,player){ + return event.cards&&event.cards.length>1 + }, + content:function(){ + "step 0" + if(typeof event.count!='number'){ + // event.count=trigger.cards.length-1; + event.count=1; } - event.redo(); - } - }, - intro:{ - content:'limited' - }, - ai:{ - order:10, - result:{ - player:function(player){ - return game.countPlayer(function(current){ - if(current!=player){ - return get.sgn(get.damageEffect(current,player,player)); - } - }); - } - } - } - }, - wuqian:{ - audio:2, - enable:'phaseUse', - derivation:'wushuang', - filter:function(event,player){ - return player.storage.baonu>=2&&!player.hasSkill('wushuang'); - }, - content:function(){ - player.storage.baonu-=2; - player.addTempSkill('wushuang','phaseAfter'); - }, - ai:{ - order:5, - result:{ - player:function(player){ - if(!player.storage.shenfen) return 0; - var cards=player.getCards('h','sha'); - if(cards.length){ - if(game.hasPlayer(function(current){ - return (player.canUse('sha',current)&& - get.effect(current,cards[0],player,player)>0&¤t.hasShan()); - })){ - return 1; - } - } - return 0; - } - } - } - }, - renjie:{ - audio:true, - trigger:{player:'damageEnd'}, - forced:true, - unique:true, - group:'renjie2', - mark:true, - filter:function(event){ - return event.num>0; - }, - init:function(player){ - player.storage.renjie=0; - game.addVideo('storage',player,['renjie',player.storage.renjie]); - }, - content:function(){ - player.storage.renjie+=trigger.num; - game.addVideo('storage',player,['renjie',player.storage.renjie]); - }, - intro:{ - content:'mark' - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(get.tag(card,'damage')){ - if(target.hp==target.maxHp){ - if(!target.hasSkill('jilue')){ - return [0,1]; + var recover=0,lose=0,players=game.filterPlayer(); + for(var i=0;i0){ + if(players[i].hp<2){ + lose--; + recover+=0.5; } - return [0.7,1]; + lose--; + recover++; } - return 0.7; - } - }, - player:function(card,player){ - if(_status.currentPhase!=player) return; - if(get.type(card)=='basic'||get.type(card,'trick')=='trick') return; - if(player.hp<=2) return; - if(!player.hasSkill('jilue')||player.storage.renjie==0){ - return [0,0,0,0]; - } - } - } - } - }, - renjie2:{ - audio:true, - trigger:{player:'phaseDiscardEnd'}, - forced:true, - filter:function(event){ - return event.cards&&event.cards.length>0; - }, - content:function(){ - player.storage.renjie+=trigger.cards.length; - game.addVideo('storage',player,['renjie',player.storage.renjie]); - } - }, - sbaiyin:{ - skillAnimation:'epic', - trigger:{player:'phaseBegin'}, - forced:true, - unique:true, - audio:true, - filter:function(event,player){ - return player.storage.renjie>=4; - }, - content:function(){ - player.loseMaxHp(); - player.addSkill('jilue'); - player.awakenSkill('sbaiyin'); - } - }, - jilue:{ - unique:true, - group:['jilue_guicai','jilue_fangzhu','jilue_wansha','jilue_zhiheng','jilue_jizhi'] - }, - jilue_guicai:{ - audio:true, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0&&player.storage.renjie>0; - }, - content:function(){ - "step 0" - player.chooseCard('是否弃置一枚“忍”,并发动【鬼才】?').ai=function(card){ - var trigger=_status.event.parent._trigger; - var player=_status.event.player; - var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result-get.value(card)/2; - } - else{ - return -result-get.value(card)/2; - } - }; - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.logSkill('jilue_guicai'); - player.storage.renjie--; - player.updateMarks(); - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - ui.discardPile.appendChild(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.position.appendChild(result.cards[0]); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, - ai:{ - tag:{ - rejudge:1, - } - } - }, - jilue_fangzhu:{ - audio:true, - trigger:{player:'damageEnd'}, - direct:true, - priority:-1, - filter:function(event,player){ - return player.storage.renjie>0; - }, - content:function(){ - "step 0" - player.chooseTarget('是否弃置一枚“忍”,并发动【放逐】?',function(card,player,target){ - return player!=target - }).ai=function(target){ - if(target.isTurnedOver()){ - return get.attitude(player,target)-1; - } - else{ - if(player.maxHp-player.hp==1){ - return -get.attitude(player,target)-1; - } - } - return 0; - } - "step 1" - if(result.bool){ - player.storage.renjie--; - player.updateMarks(); - player.logSkill('jilue_fangzhu',result.targets); - result.targets[0].draw(player.maxHp-player.hp); - result.targets[0].turnOver(); - } - }, - }, - jilue_wansha:{ - audio:true, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.storage.renjie>0; - }, - content:function(){ - player.storage.renjie--; - player.updateMarks(); - player.addTempSkill('wansha','phaseAfter'); - } - }, - jilue_zhiheng:{ - audio:true, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.storage.renjie>0; - }, - position:'he', - filterCard:true, - selectCard:[1,Infinity], - prompt:'弃置一枚“忍”,然后弃置任意张牌并摸等量的牌', - check:function(card){return 6-get.value(card)}, - content:function(){ - player.storage.renjie--; - player.updateMarks(); - player.draw(cards.length); - }, - ai:{ - order:1, - result:{ - player:function(player){ - var num=0; - var cards=player.getCards('he'); - for(var i=0;i2) return 1; - if(cards.length==2&&player.storage.jilue>1); - return 0; - } - }, - threaten:1.5 - }, - }, - jilue_jizhi:{ - audio:true, - trigger:{player:'useCard'}, - filter:function(event,player){ - return (get.type(event.card)=='trick'&&event.cards[0]&&event.cards[0]==event.card)&&player.storage.renjie>0; - }, - content:function(){ - player.storage.renjie--; - player.updateMarks(); - player.draw(); - }, - ai:{ - threaten:1.4 - } - }, - wushen:{ - mod:{ - cardEnabled:function(card,player){ - if(_status.event.skill!='wushen'&&card.name!='sha'&&get.suit(card)=='heart') return false; - }, - cardUsable:function(card,player){ - if(_status.event.skill!='wushen'&&card.name!='sha'&&get.suit(card)=='heart') return false; - }, - cardRespondable:function(card,player){ - if(_status.event.skill!='wushen'&&card.name!='sha'&&get.suit(card)=='heart') return false; - }, - cardSavable:function(card,player){ - if(_status.event.skill!='wushen'&&card.name!='sha'&&get.suit(card)=='heart') return false; - }, - targetInRange:function(card){ - if(get.suit(card)=='heart'||_status.event.skill=='wushen') return true; - } - }, - audio:2, - enable:['chooseToUse','chooseToRespond'], - filterCard:{suit:'heart'}, - viewAs:{name:'sha'}, - check:function(){return 1}, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondSha')&¤t<0) return 0.6 - } - }, - respondSha:true, - order:4, - useful:-1, - value:-1 - } - }, - wuhun:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - filter:function(event){ - return event.source!=undefined; - }, - content:function(){ - trigger.source.addSkill('wuhun2'); - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 0.5; - }, - effect:{ - target:function(card,player,target,current){ - if(target.hp<=1&&get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-5]; - if(!target.hasFriend()) return; - if(player.hp>2&&get.attitude(player,target)<=0) return [0,2]; - return [1,0,0,-player.hp]; - } - } - } - } - }, - wuhun2:{ - audio:3, - trigger:{global:'dieAfter'}, - forced:true, - content:function(){ - if(player.hp0){ - return true; - } - }); - return num>=2; - }, - content:function(){ - "step 0" - var targets=game.filterPlayer(); - targets.remove(player); - targets.sort(lib.sort.seat); - event.targets=targets; - event.num=0; - player.line(targets,'green'); - "step 1" - if(num0){ + lose--; + } + else if(get.attitude(player,players[i])<0){ + lose++; + } } } - event.num++; - event.redo(); - } - "step 2" - player.turnOver(); - }, - ai:{ - maixie:true, - maixie_hp:true, - threaten:function(player,target){ - if(target.hp==1) return 2.5; - return 1; + var prompt=get.prompt('qinyin')+'(剩余'+get.cnNumber(event.count)+'次)'; + player.chooseControl('失去体力','回复体力','cancel2', + ui.create.dialog(get.prompt('qinyin'),'hidden')).ai=function(){ + if(lose>recover&&lose>0) return 0; + if(lose0) return 1; + return 2; + } + "step 1" + if(result.control=='cancel2'){ + event.finish(); + } + else{ + player.logSkill('qinyin'); + event.bool=(result.control=='回复体力'); + event.num=0; + event.players=game.filterPlayer(); + } + "step 2" + if(event.num1){ + event.count--; + event.goto(0); + } }, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(target.hp==1) return 0.8; - if(target.isTurnedOver()) return [0,3]; - var num=game.countPlayer(function(current){ - if(current.countCards('he')&¤t!=player&&get.attitude(player,current)<=0){ - return true; - } - if(current.countCards('j')&¤t!=player&&get.attitude(player,current)>0){ - return true; + ai:{ + expose:0.1, + threaten:2 + } + }, + lianpo:{ + audio:true, + trigger:{source:'dieAfter'}, + forced:true, + filter:function(event,player){ + return !player.hasSkill('lianpo2'); + }, + content:function(){ + player.addSkill('lianpo2'); + } + }, + lianpo2:{ + trigger:{global:'phaseAfter'}, + forced:true, + priority:-50, + content:function(){ + player.removeSkill('lianpo2'); + player.insertPhase(); + } + }, + baonu:{ + trigger:{source:'damageEnd',player:'damageEnd'}, + forced:true, + mark:true, + audio:2, + filter:function(event){ + return event.num>0; + }, + init:function(player){ + player.storage.baonu=2; + game.addVideo('storage',player,['baonu',player.storage.baonu]); + }, + content:function(){ + player.storage.baonu+=trigger.num; + game.addVideo('storage',player,['baonu',player.storage.baonu]); + }, + intro:{ + content:'mark' + } + }, + shenfen:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.shenfen&&player.storage.baonu>=6; + }, + init:function(player){ + player.storage.shenfen=false; + }, + skillAnimation:true, + animationColor:'metal', + mark:true, + content:function(){ + "step 0" + player.awakenSkill('shenfen'); + player.storage.shenfen=true; + player.storage.baonu-=6; + event.targets=game.filterPlayer(); + event.targets.remove(player); + event.targets.sort(lib.sort.seat); + event.targets2=event.targets.slice(0); + player.line(event.targets,'green'); + "step 1" + if(event.targets.length){ + event.targets.shift().damage(); + event.redo(); + } + "step 2" + if(event.targets2.length){ + var cur=event.targets2.shift(); + if(cur&&cur.countCards('he')){ + cur.chooseToDiscard('he',true,4); + } + event.redo(); + } + }, + intro:{ + content:'limited' + }, + ai:{ + order:10, + result:{ + player:function(player){ + return game.countPlayer(function(current){ + if(current!=player){ + return get.sgn(get.damageEffect(current,player,player)); } }); - if(num>2) return [0,1]; - if(num==2) return [0.5,1]; } } } - } - }, - qixing:{ - audio:2, - unique:true, - trigger:{global:'gameDrawAfter',player:'phaseBegin'}, - forced:true, - check:function(event,player){ - return player.hp<=1; }, - filter:function(event,player){ - return !player.storage.qixing; - }, - content:function(){ - "step 0" - player.gain(get.cards(7))._triggered=null; - "step 1" - if(player==game.me){ - game.addVideo('delay',null); + wuqian:{ + audio:2, + enable:'phaseUse', + derivation:'wushuang', + filter:function(event,player){ + return player.storage.baonu>=2&&!player.hasSkill('wushuang'); + }, + content:function(){ + player.storage.baonu-=2; + player.addTempSkill('wushuang','phaseAfter'); + }, + ai:{ + order:5, + result:{ + player:function(player){ + if(!player.storage.shenfen) return 0; + var cards=player.getCards('h','sha'); + if(cards.length){ + if(game.hasPlayer(function(current){ + return (player.canUse('sha',current)&& + get.effect(current,cards[0],player,player)>0&¤t.hasShan()); + })){ + return 1; + } + } + return 0; + } + } } - player.chooseCard('选择七张牌作为星',7,true).ai=function(card){ - return get.value(card); - }; - "step 2" - player.lose(result.cards,ui.special)._triggered=null; - player.storage.qixing=result.cards; - game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']); }, - mark:true, - intro:{ - mark:function(dialog,content,player){ - if(content&&content.length){ - if(player==game.me||player.isUnderControl()){ - dialog.addAuto(content); + renjie:{ + audio:true, + trigger:{player:'damageEnd'}, + forced:true, + unique:true, + group:'renjie2', + mark:true, + filter:function(event){ + return event.num>0; + }, + init:function(player){ + player.storage.renjie=0; + game.addVideo('storage',player,['renjie',player.storage.renjie]); + }, + content:function(){ + player.storage.renjie+=trigger.num; + game.addVideo('storage',player,['renjie',player.storage.renjie]); + }, + intro:{ + content:'mark' + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(get.tag(card,'damage')){ + if(target.hp==target.maxHp){ + if(!target.hasSkill('jilue')){ + return [0,1]; + } + return [0.7,1]; + } + return 0.7; + } + }, + player:function(card,player){ + if(_status.currentPhase!=player) return; + if(get.type(card)=='basic'||get.type(card,'trick')=='trick') return; + if(player.hp<=2) return; + if(!player.hasSkill('jilue')||player.storage.renjie==0){ + return [0,0,0,0]; + } + } + } + } + }, + renjie2:{ + audio:true, + trigger:{player:'phaseDiscardEnd'}, + forced:true, + filter:function(event){ + return event.cards&&event.cards.length>0; + }, + content:function(){ + player.storage.renjie+=trigger.cards.length; + game.addVideo('storage',player,['renjie',player.storage.renjie]); + } + }, + sbaiyin:{ + skillAnimation:'epic', + trigger:{player:'phaseBegin'}, + forced:true, + unique:true, + audio:true, + filter:function(event,player){ + return player.storage.renjie>=4; + }, + content:function(){ + player.loseMaxHp(); + player.addSkill('jilue'); + player.awakenSkill('sbaiyin'); + } + }, + jilue:{ + unique:true, + group:['jilue_guicai','jilue_fangzhu','jilue_wansha','jilue_zhiheng','jilue_jizhi'] + }, + jilue_guicai:{ + audio:true, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0&&player.storage.renjie>0; + }, + content:function(){ + "step 0" + player.chooseCard('是否弃置一枚“忍”,并发动【鬼才】?').ai=function(card){ + var trigger=_status.event.parent._trigger; + var player=_status.event.player; + var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result-get.value(card)/2; } else{ + return -result-get.value(card)/2; + } + }; + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.logSkill('jilue_guicai'); + player.storage.renjie--; + player.updateMarks(); + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + ui.discardPile.appendChild(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.position.appendChild(result.cards[0]); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, + ai:{ + tag:{ + rejudge:1, + } + } + }, + jilue_fangzhu:{ + audio:true, + trigger:{player:'damageEnd'}, + direct:true, + priority:-1, + filter:function(event,player){ + return player.storage.renjie>0; + }, + content:function(){ + "step 0" + player.chooseTarget('是否弃置一枚“忍”,并发动【放逐】?',function(card,player,target){ + return player!=target + }).ai=function(target){ + if(target.isTurnedOver()){ + return get.attitude(player,target)-1; + } + else{ + if(player.maxHp-player.hp==1){ + return -get.attitude(player,target)-1; + } + } + return 0; + } + "step 1" + if(result.bool){ + player.storage.renjie--; + player.updateMarks(); + player.logSkill('jilue_fangzhu',result.targets); + result.targets[0].draw(player.maxHp-player.hp); + result.targets[0].turnOver(); + } + }, + }, + jilue_wansha:{ + audio:true, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.storage.renjie>0; + }, + content:function(){ + player.storage.renjie--; + player.updateMarks(); + player.addTempSkill('wansha','phaseAfter'); + } + }, + jilue_zhiheng:{ + audio:true, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.storage.renjie>0; + }, + position:'he', + filterCard:true, + selectCard:[1,Infinity], + prompt:'弃置一枚“忍”,然后弃置任意张牌并摸等量的牌', + check:function(card){return 6-get.value(card)}, + content:function(){ + player.storage.renjie--; + player.updateMarks(); + player.draw(cards.length); + }, + ai:{ + order:1, + result:{ + player:function(player){ + var num=0; + var cards=player.getCards('he'); + for(var i=0;i2) return 1; + if(cards.length==2&&player.storage.jilue>1); + return 0; + } + }, + threaten:1.5 + }, + }, + jilue_jizhi:{ + audio:true, + trigger:{player:'useCard'}, + filter:function(event,player){ + return (get.type(event.card)=='trick'&&event.cards[0]&&event.cards[0]==event.card)&&player.storage.renjie>0; + }, + content:function(){ + player.storage.renjie--; + player.updateMarks(); + player.draw(); + }, + ai:{ + threaten:1.4 + } + }, + wushen:{ + mod:{ + cardEnabled:function(card,player){ + if(_status.event.skill!='wushen'&&card.name!='sha'&&get.suit(card)=='heart') return false; + }, + cardUsable:function(card,player){ + if(_status.event.skill!='wushen'&&card.name!='sha'&&get.suit(card)=='heart') return false; + }, + cardRespondable:function(card,player){ + if(_status.event.skill!='wushen'&&card.name!='sha'&&get.suit(card)=='heart') return false; + }, + cardSavable:function(card,player){ + if(_status.event.skill!='wushen'&&card.name!='sha'&&get.suit(card)=='heart') return false; + }, + targetInRange:function(card){ + if(get.suit(card)=='heart'||_status.event.skill=='wushen') return true; + } + }, + audio:2, + enable:['chooseToUse','chooseToRespond'], + filterCard:{suit:'heart'}, + viewAs:{name:'sha'}, + check:function(){return 1}, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondSha')&¤t<0) return 0.6 + } + }, + respondSha:true, + order:4, + useful:-1, + value:-1 + } + }, + wuhun:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + filter:function(event){ + return event.source!=undefined; + }, + content:function(){ + trigger.source.addSkill('wuhun2'); + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 0.5; + }, + effect:{ + target:function(card,player,target,current){ + if(target.hp<=1&&get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-5]; + if(!target.hasFriend()) return; + if(player.hp>2&&get.attitude(player,target)<=0) return [0,2]; + return [1,0,0,-player.hp]; + } + } + } + } + }, + wuhun2:{ + audio:3, + trigger:{global:'dieAfter'}, + forced:true, + content:function(){ + if(player.hp0){ + return true; + } + }); + return num>=2; + }, + content:function(){ + "step 0" + var targets=game.filterPlayer(); + targets.remove(player); + targets.sort(lib.sort.seat); + event.targets=targets; + event.num=0; + player.line(targets,'green'); + "step 1" + if(num0){ + return true; + } + }); + if(num>2) return [0,1]; + if(num==2) return [0.5,1]; + } + } + } + } + }, + qixing:{ + audio:2, + unique:true, + trigger:{global:'gameDrawAfter',player:'phaseBegin'}, + forced:true, + check:function(event,player){ + return player.hp<=1; + }, + filter:function(event,player){ + return !player.storage.qixing; + }, + content:function(){ + "step 0" + player.gain(get.cards(7))._triggered=null; + "step 1" + if(player==game.me){ + game.addVideo('delay',null); + } + player.chooseCard('选择七张牌作为星',7,true).ai=function(card){ + return get.value(card); + }; + "step 2" + player.lose(result.cards,ui.special)._triggered=null; + player.storage.qixing=result.cards; + game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']); + }, + mark:true, + intro:{ + mark:function(dialog,content,player){ + if(content&&content.length){ + if(player==game.me||player.isUnderControl()){ + dialog.addAuto(content); + } + else{ + return '共有'+get.cnNumber(content.length)+'张星'; + } + } + }, + content:function(content,player){ + if(content&&content.length){ + if(player==game.me||player.isUnderControl()){ + return get.translation(content); + } return '共有'+get.cnNumber(content.length)+'张星'; } } }, - content:function(content,player){ - if(content&&content.length){ - if(player==game.me||player.isUnderControl()){ - return get.translation(content); - } - return '共有'+get.cnNumber(content.length)+'张星'; + group:['qixing2'], + }, + qixing2:{ + trigger:{player:'phaseDrawAfter'}, + direct:true, + filter:function(event,player){ + return player.storage.qixing&&player.storage.qixing.length; + }, + content:function(){ + "step 0" + player.chooseCard('选择任意张手牌与星交换',[1,player.countCards('h')]).ai=function(card){ + return 1; + }; + "step 1" + if(result.bool){ + player.logSkill('qixing'); + player.lose(result.cards,ui.special)._triggered=null; + player.storage.qixing=player.storage.qixing.concat(result.cards); + game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']); + event.num=result.cards.length; + } + else{ + event.finish(); + } + "step 2" + player.chooseCardButton(player.storage.qixing,'选择'+event.num+'张牌作为手牌',event.num,true).ai=function(button){ + if(player.skipList.contains('phaseUse')&&button.link!='du'){ + return -get.value(button.link); + } + return get.value(button.link); + } + if(player==game.me&&_status.auto){ + game.delay(0.5); + } + "step 3" + player.gain(result.links)._triggered=null; + for(var i=0;i=4){ - if(target.hp==1&&target.maxHp>2) return att; - if(target.hp==2&&target.maxHp>3&&target.countCards('he')==0) return att*0.7; - return 0; - } - return -1; - } - "step 1" - if(result.bool){ - var length=result.targets.length; - for(var i=0;i=4){ + if(target.hp==1&&target.maxHp>2) return att; + if(target.hp==2&&target.maxHp>3&&target.countCards('he')==0) return att*0.7; + return 0; } - case 'respondShan':{ - if(player.countCards('he',{suit:'club'})=1) return [0,0]; - if(!target.hasFriend()) return; - if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp>1) return [0,1]; + content:function(){ + "step 0" + player.chooseTarget('选择一名角色获得狂风标记').ai=function(target){ + return -1; } + "step 1" + if(result.bool){ + var length=result.targets.length; + for(var i=0;i1) return 0; - return 10-get.value(card); - }, - selectCard:function(){ - return Math.max(1,_status.event.player.hp); - }, - viewAs:{name:'tao'}, - filter:function(event,player){ - return player.countCards('he',{suit:'heart'})>=player.hp; - }, - filterCard:function(card){ - return get.suit(card)=='heart'; - } - }, - longhun2:{ - audio:true, - enable:['chooseToUse','chooseToRespond'], - prompt:function(){ - return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张方片当作火杀使用或打出'; - }, - position:'he', - check:function(card,event){ - if(_status.event.player.hp>1) return 0; - return 10-get.value(card); - }, - selectCard:function(){ - return Math.max(1,_status.event.player.hp); - }, - viewAs:{name:'sha',nature:'fire'}, - filter:function(event,player){ - return player.countCards('he',{suit:'diamond'})>=player.hp; - }, - filterCard:function(card){ - return get.suit(card)=='diamond'; - } - }, - longhun3:{ - audio:true, - enable:['chooseToUse','chooseToRespond'], - prompt:function(){ - return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张黑桃牌当作无懈可击使用'; - }, - position:'he', - check:function(card,event){ - if(_status.event.player.hp>1) return 0; - return 7-get.value(card); - }, - selectCard:function(){ - return Math.max(1,_status.event.player.hp); - }, - viewAs:{name:'wuxie'}, - viewAsFilter:function(player){ - return player.countCards('he',{suit:'spade'})>=player.hp; - }, - filterCard:function(card){ - return get.suit(card)=='spade'; - } - }, - longhun4:{ - audio:true, - enable:['chooseToUse','chooseToRespond'], - prompt:function(){ - return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张梅花牌当作闪打出'; - }, - position:'he', - check:function(card,event){ - if(_status.event.player.hp>1) return 0; - return 10-get.value(card); - }, - selectCard:function(){ - return Math.max(1,_status.event.player.hp); - }, - viewAs:{name:'shan'}, - filterCard:function(card){ - return get.suit(card)=='club'; - } - }, - juejing:{ - mod:{ - maxHandcard:function(player,num){ - return 2+num; + mark:true, + intro:{ + content:'已获得大雾标记' + }, + forced:true, + content:function(){ + trigger.num++; + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'fireDamage')) return 1.5; + } + } } }, - audio:true, - trigger:{player:'phaseDrawBegin'}, - priority:-5, - filter:function(event,player){ - return player.hp=1) return [0,0]; + if(!target.hasFriend()) return; + if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp>1) return [0,1]; + } + }, + threaten:function(player,target){ + if(target.hp==1) return 2; + return 0.5; + }, + } }, - content:function(){ - "step 0" - event.videoId=lib.status.videoId++; - var cards=target.getCards('h'); - if(player.isOnline2()){ - player.send(function(cards,id){ - ui.create.dialog('攻心',cards).videoId=id; - },cards,event.videoId); + longhun1:{ + audio:true, + enable:['chooseToUse','chooseToRespond'], + prompt:function(){ + return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张红桃牌当作桃使用'; + }, + position:'he', + check:function(card,event){ + if(_status.event.player.hp>1) return 0; + return 10-get.value(card); + }, + selectCard:function(){ + return Math.max(1,_status.event.player.hp); + }, + viewAs:{name:'tao'}, + filter:function(event,player){ + return player.countCards('he',{suit:'heart'})>=player.hp; + }, + filterCard:function(card){ + return get.suit(card)=='heart'; } - event.dialog=ui.create.dialog('攻心',cards); - event.dialog.videoId=event.videoId; - if(!event.isMine()){ - event.dialog.style.display='none'; + }, + longhun2:{ + audio:true, + enable:['chooseToUse','chooseToRespond'], + prompt:function(){ + return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张方片当作火杀使用或打出'; + }, + position:'he', + check:function(card,event){ + if(_status.event.player.hp>1) return 0; + return 10-get.value(card); + }, + selectCard:function(){ + return Math.max(1,_status.event.player.hp); + }, + viewAs:{name:'sha',nature:'fire'}, + filter:function(event,player){ + return player.countCards('he',{suit:'diamond'})>=player.hp; + }, + filterCard:function(card){ + return get.suit(card)=='diamond'; } - player.chooseButton().set('filterButton',function(button){ - return get.suit(button.link)=='heart'; - }).set('dialog',event.videoId); - "step 1" - if(result.bool){ - event.card=result.links[0]; - var func=function(card,id){ - var dialog=get.idDialog(id); - if(dialog){ - for(var i=0;i1) return 0; + return 7-get.value(card); + }, + selectCard:function(){ + return Math.max(1,_status.event.player.hp); + }, + viewAs:{name:'wuxie'}, + viewAsFilter:function(player){ + return player.countCards('he',{suit:'spade'})>=player.hp; + }, + filterCard:function(card){ + return get.suit(card)=='spade'; + } + }, + longhun4:{ + audio:true, + enable:['chooseToUse','chooseToRespond'], + prompt:function(){ + return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张梅花牌当作闪打出'; + }, + position:'he', + check:function(card,event){ + if(_status.event.player.hp>1) return 0; + return 10-get.value(card); + }, + selectCard:function(){ + return Math.max(1,_status.event.player.hp); + }, + viewAs:{name:'shan'}, + filterCard:function(card){ + return get.suit(card)=='club'; + } + }, + juejing:{ + mod:{ + maxHandcard:function(player,num){ + return 2+num; + } + }, + audio:true, + trigger:{player:'phaseDrawBegin'}, + priority:-5, + filter:function(event,player){ + return player.hp0; - }, - filter:function(event,player){ - return event.player.isFewestHandcard(); - }, - logTarget:'player', - content:function(){ - trigger.player.draw(); - }, - ai:{ - expose:0.1 - } + characterIntro:{ + gjqt_bailitusu:'原名韩云溪,太子长琴半身。幼时经历灭族之灾,本来已死去,但因体内被封进了太子长琴一半魂魄而得以死而复生。身怀凶剑焚寂的煞气,在某次煞气发作中被紫胤真人所救,后拜入昆仑山天墉城,以“屠绝鬼气,苏醒人魂”之意更名为“百里屠苏”。', + gjqt_fengqingxue:'来自幽暗无边的地界,大哥为幽都娲皇神殿“十巫”之一的巫咸——风广陌。奉命寻兄而来到人间,邂逅百里屠苏,陷入了焚寂的宿命纠葛。后与百里屠苏相知相爱。终局,百里屠苏化为永世无法轮回的荒魂,她为寻找重生之法,放弃自己的轮回,换取下长久的寿命,在人间执着不悔地寻觅了九百年。最后,与重生后的屠苏回到桃花谷相守。', + gjqt_xiangling:'青丘之国国主九尾天狐与人界女子所生,半人半妖。由南疆紫榕林榕爷爷抚养,在山林间无拘无束长大,娇俏可爱。后来下江南寻找生母,却被抓进翻云寨,偶然被百里屠苏相救,为报答救命之恩,便一直跟随百里屠苏。在漫漫征途中成长起来,变得成熟懂事。得知方兰生对自己的感情,十分矛盾,后来终于错过。最后结局,启程前往青丘之国。', + gjqt_fanglansheng:'家住琴川的一介书生,家境殷实,母亲在家常住庵堂,吃斋念佛,父亲虽是琴川附近某间寺庙的住持,但却比商人还会敛财。跟随父亲学过降妖除鬼的佛家法术,并以此自傲。梦想能找一个娇小可爱,温柔美丽的女子共渡此生。对襄铃一见钟情。', + gjqt_yinqianshang:'原名风广陌,是幽都“十巫”之一的巫咸。奉女娲之命前往乌蒙灵谷增强焚寂封印。但因为欧阳少恭与雷严的争夺关系,他受到焚寂之力力量冲击,失去记忆,后为欧阳少恭所救。尹千觞为了报恩,跟随在百里屠苏等人身边监视。在这个过程中,他慢慢恢复过往的记忆。后为阻止欧阳少恭,随众人前往蓬莱决战。最后,对曾给予他一次重生的欧阳少恭以死相陪,一起归于火海。', + gjqt_hongyu:'上古庆枫族族人,紫胤真人的剑灵,宿体为古剑·红玉。在百里屠苏离开昆仑山天墉城后,奉命随行保护。终局之后,她依然回到了天墉城,陪伴在紫胤真人身边。', + + gjqt_yuewuyi:'成长于长安富商家庭。其养父曾是战功显赫的将军,退隐后从商,很快就富甲一方;其养母是精擅偃术的南疆天玄教偃女族传人,待无异一如己出般疼爱有加;无异的生父是捐毒大将兀火罗,亡母是一名中原女子,因此他具有一半胡人的血统。', + gjqt_wenrenyu:'出身于百草谷“天罡”部队。从小在军中生活的她见惯生死,拥有超越其年龄的沉着果敢,头脑冷静严谨,洞察力敏锐,性格大方爽快。', + gjqt_xiayize:'本为当朝圣元帝三子李焱,天资聪颖,勤奋好学,于道术一途颇具天赋。幼时体弱,因身世原因被太华山的诀微长老清和真人带走,从此过上了道家清修的生活。', + gjqt_aruan:'千年前,昭明崩裂损毁,剑心为神农所得,其将剑心植入用辟邪之骨所造之人,是为巫山神女。神女爱慕司幽,却始终得不到司幽回应,心绪起伏加速灵力散逸,不久后死去,司幽自责不已,失去踪迹。神女死后,剑心碎片落地生根,吸纳灵气变为露草,露草渐渐化为人形,形貌与巫山神女一样,而且保留了她零散的记忆,阿阮正是这些露草中的一个。当阿阮灵气耗尽就会重新变为露草,并失去人时的记忆,直到重新吸纳足够的灵力才能恢复人形。', + + gjqt_xunfang:'蓬莱国公主,美丽善良,为欧阳少恭前世妻子,太子长琴转世后,巽芳为寻找丈夫来到中原。蓬莱人寿命虽长却终有极限,终究躲不过容颜老去。当巽芳找到分离多年后的少恭时,自惭形秽,不愿相认,她希望少恭心中的自己永远都是青春貌美,于是化名“寂桐”守护在其身旁。', + gjqt_ouyangshaogong:'前身为太子长琴,今生只有一半仙灵,另一半仙灵被铸进焚寂之中,成为焚寂剑灵。他在漫长时光中经历太多悲欢离合,渐渐迷失自我。后与蓬莱国公主巽芳相爱,度过一段美好时光。之后蓬莱毁于天灾,他误以为巽芳已死,便不再压抑内心的疯狂与憎恨,为逆天改命不惜一切。', }, - xfanghua:{ - trigger:{target:'useCardToBegin'}, - priority:-1, - filter:function(event,player){ - return get.color(event.card)=='red'&&player.isDamaged(); + skill:{ + zuiji:{ + enable:'phaseUse', + filterCard:true, + position:'he', + viewAs:{name:'jiu'}, + viewAsFilter:function(player){ + if(!player.countCards('he')) return false; + }, + prompt:'将一张手牌或装备牌当酒使用', + check:function(card){ + return 5-get.value(card); + }, + ai:{ + threaten:1.2 + } }, - frequent:true, - content:function(){ - player.recover(); + manwu:{ + trigger:{global:'phaseEnd'}, + check:function(event,player){ + return get.attitude(player,event.player)>0; + }, + filter:function(event,player){ + return event.player.isFewestHandcard(); + }, + logTarget:'player', + content:function(){ + trigger.player.draw(); + }, + ai:{ + expose:0.1 + } }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.color(card)=='red'&&target.isDamaged()) return [1,1]; + xfanghua:{ + trigger:{target:'useCardToBegin'}, + priority:-1, + filter:function(event,player){ + return get.color(event.card)=='red'&&player.isDamaged(); + }, + frequent:true, + content:function(){ + player.recover(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.color(card)=='red'&&target.isDamaged()) return [1,1]; + } } } - } - }, - duhun:{ - enable:'chooseToUse', - filter:function(event,player){ - if(event.type!='dying') return false; - if(player!=event.dying) return false; - if(player.maxHp<=1) return false; - if(player.countCards('h')==0) return false; - return true; }, - alter:true, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0&&target.hp>0&&target.hp<=player.maxHp; - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(!result.bool){ - player.die(); - event.finish(); - } - else{ - event.num=target.hp-player.hp; - player.loseMaxHp(); - } - 'step 2' - player.changeHp(event.num); - if(get.is.altered('duhun')){ - event.finish(); - } - 'step 3' - event.target.changeHp(-event.num); - 'step 4' - if(event.target.hp<=0){ - event.target.dying({source:player}); - } - }, - ai:{ - order:1, - skillTagFilter:function(player){ + duhun:{ + enable:'chooseToUse', + filter:function(event,player){ + if(event.type!='dying') return false; + if(player!=event.dying) return false; if(player.maxHp<=1) return false; - if(player.hp>0) return false; if(player.countCards('h')==0) return false; + return true; }, - save:true, - result:{ - target:-1, - player:1 + alter:true, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0&&target.hp>0&&target.hp<=player.maxHp; }, - threaten:2 - }, - }, - yunyin:{ - trigger:{player:'phaseEnd'}, - direct:true, - subSkill:{ - count:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return _status.currentPhase==player; - }, - content:function(){ - if(!player.storage.yunyin){ - player.storage.yunyin=[]; - } - var suit=get.suit(trigger.card); - if(suit){ - player.storage.yunyin.add(suit); - } - } - }, - set:{ - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - silent:true, - content:function(){ - delete player.storage.yunyin; - } - } - }, - filter:function(event,player){ - if(!player.storage.yunyin) return true; - var hs=player.getCards('h'); - for(var i=0;i0){ - taoyuan++; - } - else if(eff1<0){ - taoyuan--; - } - if(eff2>0){ - nanman++; - } - else if(eff2<0){ - nanman--; - } - } - if(Math.max(taoyuan,nanman)>1){ - if(taoyuan>nanman) return name=='taoyuan'?1:0; - return name=='nanman'?1:0; - } - if(player.countCards('h')=2){ - return name=='wuzhong'?1:0; - } - if(player.hp0) return false; + if(player.countCards('h')==0) return false; + }, + save:true, + result:{ + target:-1, + player:1 + }, + threaten:2 + }, }, - ai:{ - threaten:function(player,target){ - return Math.sqrt(Math.max(1,target.maxHp-target.hp)); - } - } - }, - xiuhua:{ - trigger:{global:['loseEnd','discardAfter']}, - filter:function(event,player){ - if(event.player==player) return false; - if(event.name=='lose'&&event.parent.name!='equip') return false; - for(var i=0;i=2) return true; - } - } - }, - filterCard:function(card){ - var info=get.info(card); - return info.type=='equip'&&!info.nomod&&!info.unique&&lib.inpile.contains(card.name); - }, - selectCard:2, - position:'he', - check:function(card){ - return get.value(card); - }, - content:function(){ - var name=cards[0].name+'_'+cards[1].name; - var info1=get.info(cards[0]),info2=get.info(cards[1]); - if(!lib.card[name]){ - var info={ - enable:true, - type:'equip', - subtype:get.subtype(cards[0]), - vanish:true, - cardimage:info1.cardimage||cards[0].name, - filterTarget:function(card,player,target){ - return target==player; + yunyin:{ + trigger:{player:'phaseEnd'}, + direct:true, + subSkill:{ + count:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return _status.currentPhase==player; }, - selectTarget:-1, - modTarget:true, - content:lib.element.content.equipCard, - legend:true, - source:[cards[0].name,cards[1].name], - onEquip:[], - onLose:[], - skills:[], - distance:{}, - ai:{ - order:8.9, - equipValue:10, - useful:2.5, - value:function(card,player){ - var value=0; - var info=get.info(card); - var current=player.getEquip(info.subtype); - if(current&&card!=current){ - value=get.value(current,player); - } - var equipValue=info.ai.equipValue||info.ai.basic.equipValue; - if(typeof equipValue=='function') return equipValue(card,player)-value; - return equipValue-value; - }, - result:{ - target:function(player,target){ - return get.equipResult(player,target,name); - } + content:function(){ + if(!player.storage.yunyin){ + player.storage.yunyin=[]; + } + var suit=get.suit(trigger.card); + if(suit){ + player.storage.yunyin.add(suit); + } + } + }, + set:{ + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + silent:true, + content:function(){ + delete player.storage.yunyin; + } + } + }, + filter:function(event,player){ + if(!player.storage.yunyin) return true; + var hs=player.getCards('h'); + for(var i=0;i0){ + taoyuan++; + } + else if(eff1<0){ + taoyuan--; + } + if(eff2>0){ + nanman++; + } + else if(eff2<0){ + nanman--; + } + } + if(Math.max(taoyuan,nanman)>1){ + if(taoyuan>nanman) return name=='taoyuan'?1:0; + return name=='nanman'?1:0; + } + if(player.countCards('h')=2){ + return name=='wuzhong'?1:0; + } + if(player.hp0; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he','魅影:是否弃置一张红色牌视为对'+get.translation(trigger.player)+'使用一张杀?'); - next.logSkill=['meiying',trigger.player]; - var eff=get.effect(trigger.player,{name:'sha'},player,player); - next.ai=function(card){ - if(eff>0){ - return 7-get.value(card); + 'step 3' + if(result.bool){ + player.useCard({name:'juedou'},result.targets); } - return 0; - } - "step 1" - if(result.bool){ - player.useCard({name:'sha'},trigger.player).animate=false; - } - }, - ai:{ - expose:0.1 - } - }, - meiying2:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return _status.currentPhase==player&&event.targets&&(event.targets.length>1||event.targets[0]!=player); - }, - forced:true, - popup:false, - content:function(){ - player.addTempSkill('meiying3','phaseAfter'); - } - }, - meiying3:{}, - jianwu:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return get.distance(event.target,player,'attack')>1; - }, - content:function(){ - trigger.directHit=true; - } - }, - zuizhan:{ - trigger:{player:'useCard'}, - popup:false, - filter:function(event,player){ - if(event.card.name!='sha') return false; - return game.hasPlayer(function(current){ - return (event.targets.contains(current)==false&¤t!=player&& - lib.filter.targetEnabled(event.card,player,current)) - }); - }, - content:function(){ - var list=game.filterPlayer(function(current){ - return (trigger.targets.contains(current)==false&¤t!=player&& - lib.filter.targetEnabled(trigger.card,player,current)) - }); - if(list.length){ - event.target=list.randomGet(); - player.line(event.target,'green'); - game.log(event.target,'被追加为额外目标'); - trigger.targets.push(event.target); - player.draw(); - } - } - }, - xidie:{ - trigger:{player:'phaseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>player.hp; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('xidie'),[1,Math.min(3,player.countCards('h')-player.hp)]); - next.ai=function(card){ - return 6-get.value(card); - } - next.logSkill='xidie'; - "step 1" - if(result.bool){ - player.storage.xidie=result.cards.length; - } - }, - group:'xidie2' - }, - xidie2:{ - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player.storage.xidie>0; - }, - content:function(){ - player.draw(player.storage.xidie); - player.storage.xidie=0; - } - }, - meihu:{ - trigger:{player:'damageEnd'}, - check:function(event,player){ - return get.attitude(player,event.source)<4; - }, - filter:function(event,player){ - return event.source&&event.source!=player&&event.source.countCards('h')>0; - }, - logTarget:'source', - content:function(){ - "step 0" - trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌',true).ai=function(card){ - return -get.value(card); - }; - "step 1" - if(result.bool){ - player.gain(result.cards[0],trigger.source); - trigger.source.$give(1,player); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-1.5]; - return [1,0,0,-0.5]; - } - } - } - } - }, - qianhuan:{ - trigger:{player:'phaseAfter'}, - check:function(event,player){ - return player.hp==1||player.isTurnedOver(); - }, - filter:function(event,player){ - return player.hp1||player.countCards('h',{color:'black'})>1; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('fumo',trigger.source),2,function(card){ - if(get.damageEffect(trigger.source,player,player,'thunder')<=0) return 0; - if(ui.selected.cards.length){ - return get.color(card)==get.color(ui.selected.cards[0]); - } - return player.countCards('h',{color:get.color(card)})>1; - }).set('complexCard',true); - next.ai=function(card){ - if(get.damageEffect(trigger.source,player,player,'thunder')>0){ - return 8-get.value(card); - } - return 0; - }; - next.logSkill=['fumo',trigger.source,'thunder']; - "step 1" - if(result.bool){ - trigger.source.damage('thunder'); - } - }, - ai:{ - threaten:0.8 - } - }, - fanyin:{ - trigger:{player:'phaseEnd'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('fanyin'),function(card,player,target){ - if(player==target) return false; - if(target.isLinked()) return true; - if(target.isTurnedOver()) return true; - if(target.countCards('j')) return true; - if(target.hp==target.maxHp) return false; - return target.isLowestHp(); - }).ai=function(target){ - var num=0; - var att=get.attitude(player,target); - if(att>0){ - if(target.isLowestHp()){ - num+=5; - } - if(target.isTurnedOver()){ - num+=5; - } - if(target.countCards('j')){ - num+=2; - } - if(target.isLinked()){ - num++; - } - if(num>0){ - return num+att; - } - } - return num; - } - "step 1" - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('fanyin',event.target); - } - else{ - event.finish(); - } - "step 2" - if(event.target.isLinked()){ - event.target.link(); - } - "step 3" - if(event.target.isTurnedOver()){ - event.target.turnOver(); - } - "step 4" - var cards=event.target.getCards('j'); - if(cards.length){ - event.target.discard(cards); - } - "step 5" - if(event.target.isLowestHp()){ - event.target.recover(); - } - }, - ai:{ - expose:0.2, - threaten:1.3 - } - }, - mingkong:{ - trigger:{player:'damageBegin'}, - forced:true, - filter:function(event,player){ - return player.countCards('h')==0&&event.num>=1; - }, - content:function(){ - if(trigger.num>=1){ - trigger.num--; - } - if(trigger.source){ - trigger.source.storage.mingkong=true; - trigger.source.addTempSkill('mingkong2','phaseAfter'); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')&&target.countCards('h')==0){ - if(player.hasSkillTag('jueqing')) return; - return 0.1; - } + ai:{ + threaten:function(player,target){ + return Math.sqrt(Math.max(1,target.maxHp-target.hp)); } } }, - }, - mingkong2:{ - trigger:{source:['damageEnd','damageZero']}, - forced:true, - popup:false, - audio:false, - filter:function(event,player){ - return player.storage.mingkong?true:false; - }, - content:function(){ - player.draw(); - player.storage.mingkong=false; - player.removeSkill('mingkong2'); - } - }, - yuehua:{ - trigger:{player:['useCardAfter','respondAfter','discardAfter']}, - frequent:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - if(event.cards){ + xiuhua:{ + trigger:{global:['loseEnd','discardAfter']}, + filter:function(event,player){ + if(event.player==player) return false; + if(event.name=='lose'&&event.parent.name!='equip') return false; for(var i=0;i0; + yanjia:{ + enable:'phaseUse', + filter:function(event,player){ + var he=player.getCards('he'); + var num=0; + for(var i=0;i=2) return true; + } + } + }, + filterCard:function(card){ + var info=get.info(card); + return info.type=='equip'&&!info.nomod&&!info.unique&&lib.inpile.contains(card.name); + }, + selectCard:2, + position:'he', + check:function(card){ + return get.value(card); + }, + content:function(){ + var name=cards[0].name+'_'+cards[1].name; + var info1=get.info(cards[0]),info2=get.info(cards[1]); + if(!lib.card[name]){ + var info={ + enable:true, + type:'equip', + subtype:get.subtype(cards[0]), + vanish:true, + cardimage:info1.cardimage||cards[0].name, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + modTarget:true, + content:lib.element.content.equipCard, + legend:true, + source:[cards[0].name,cards[1].name], + onEquip:[], + onLose:[], + skills:[], + distance:{}, + ai:{ + order:8.9, + equipValue:10, + useful:2.5, + value:function(card,player){ + var value=0; + var info=get.info(card); + var current=player.getEquip(info.subtype); + if(current&&card!=current){ + value=get.value(current,player); + } + var equipValue=info.ai.equipValue||info.ai.basic.equipValue; + if(typeof equipValue=='function') return equipValue(card,player)-value; + return equipValue-value; + }, + result:{ + target:function(player,target){ + return get.equipResult(player,target,name); + } + } + } + } + for(var i in info1.distance){ + info.distance[i]=info1.distance[i]; + } + for(var i in info2.distance){ + if(typeof info.distance[i]=='number'){ + info.distance[i]+=info2.distance[i]; + } + else{ + info.distance[i]=info2.distance[i]; + } + } + if(info1.skills){ + info.skills=info.skills.concat(info1.skills); + } + if(info2.skills){ + info.skills=info.skills.concat(info2.skills); + } + if(info1.onEquip){ + if(Array.isArray(info1.onEquip)){ + info.onEquip=info.onEquip.concat(info1.onEquip); + } + else{ + info.onEquip.push(info1.onEquip); + } + } + if(info2.onEquip){ + if(Array.isArray(info2.onEquip)){ + info.onEquip=info.onEquip.concat(info2.onEquip); + } + else{ + info.onEquip.push(info2.onEquip); + } + } + if(info1.onLose){ + if(Array.isArray(info1.onLose)){ + info.onLose=info.onLose.concat(info1.onLose); + } + else{ + info.onLose.push(info1.onLose); + } + } + if(info2.onLose){ + if(Array.isArray(info2.onLose)){ + info.onLose=info.onLose.concat(info2.onLose); + } + else{ + info.onLose.push(info2.onLose); + } + } + if(info.onEquip.length==0) delete info.onEquip; + if(info.onLose.length==0) delete info.onLose; + lib.card[name]=info; + lib.translate[name]=get.translation(cards[0].name,'skill')+get.translation(cards[1].name,'skill'); + var str=lib.translate[cards[0].name+'_info']; + if(str[str.length-1]=='.'||str[str.length-1]=='。'){ + str=str.slice(0,str.length-1); + } + lib.translate[name+'_info']=str+';'+lib.translate[cards[1].name+'_info']; + try{ + game.addVideo('newcard',null,{ + name:name, + translate:lib.translate[name], + info:lib.translate[name+'_info'], + card:cards[0].name, + legend:true, + }); + } + catch(e){ + console.log(e); + } + } + player.gain(game.createCard({name:name,suit:cards[0].suit,number:cards[0].number}),'gain2'); + }, + ai:{ + order:9.5, + result:{ + player:1 + } + } }, - direct:true, - priority:-5, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('qinglan',trigger.player),'he'); - next.logSkill=['qinglan',trigger.player]; - next.ai=function(card){ - if(trigger.num>1||!trigger.source){ - if(get.attitude(player,trigger.player)>0){ - return 9-get.value(card); + meiying:{ + global:'meiying2', + globalSilent:true, + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + return event.player!=player&&!event.player.tempSkills.meiying3&&event.player.isAlive()&&player.countCards('he',{color:'red'})>0; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he','魅影:是否弃置一张红色牌视为对'+get.translation(trigger.player)+'使用一张杀?'); + next.logSkill=['meiying',trigger.player]; + var eff=get.effect(trigger.player,{name:'sha'},player,player); + next.ai=function(card){ + if(eff>0){ + return 7-get.value(card); + } + return 0; + } + "step 1" + if(result.bool){ + player.useCard({name:'sha'},trigger.player).animate=false; + } + }, + ai:{ + expose:0.1 + } + }, + meiying2:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return _status.currentPhase==player&&event.targets&&(event.targets.length>1||event.targets[0]!=player); + }, + forced:true, + popup:false, + content:function(){ + player.addTempSkill('meiying3','phaseAfter'); + } + }, + meiying3:{}, + jianwu:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return get.distance(event.target,player,'attack')>1; + }, + content:function(){ + trigger.directHit=true; + } + }, + zuizhan:{ + trigger:{player:'useCard'}, + popup:false, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return (event.targets.contains(current)==false&¤t!=player&& + lib.filter.targetEnabled(event.card,player,current)) + }); + }, + content:function(){ + var list=game.filterPlayer(function(current){ + return (trigger.targets.contains(current)==false&¤t!=player&& + lib.filter.targetEnabled(trigger.card,player,current)) + }); + if(list.length){ + event.target=list.randomGet(); + player.line(event.target,'green'); + game.log(event.target,'被追加为额外目标'); + trigger.targets.push(event.target); + player.draw(); + } + } + }, + xidie:{ + trigger:{player:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>player.hp; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('xidie'),[1,Math.min(3,player.countCards('h')-player.hp)]); + next.ai=function(card){ + return 6-get.value(card); + } + next.logSkill='xidie'; + "step 1" + if(result.bool){ + player.storage.xidie=result.cards.length; + } + }, + group:'xidie2' + }, + xidie2:{ + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player.storage.xidie>0; + }, + content:function(){ + player.draw(player.storage.xidie); + player.storage.xidie=0; + } + }, + meihu:{ + trigger:{player:'damageEnd'}, + check:function(event,player){ + return get.attitude(player,event.source)<4; + }, + filter:function(event,player){ + return event.source&&event.source!=player&&event.source.countCards('h')>0; + }, + logTarget:'source', + content:function(){ + "step 0" + trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌',true).ai=function(card){ + return -get.value(card); + }; + "step 1" + if(result.bool){ + player.gain(result.cards[0],trigger.source); + trigger.source.$give(1,player); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-1.5]; + return [1,0,0,-0.5]; + } + } + } + } + }, + qianhuan:{ + trigger:{player:'phaseAfter'}, + check:function(event,player){ + return player.hp==1||player.isTurnedOver(); + }, + filter:function(event,player){ + return player.hp1||player.countCards('h',{color:'black'})>1; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('fumo',trigger.source),2,function(card){ + if(get.damageEffect(trigger.source,player,player,'thunder')<=0) return 0; + if(ui.selected.cards.length){ + return get.color(card)==get.color(ui.selected.cards[0]); + } + return player.countCards('h',{color:get.color(card)})>1; + }).set('complexCard',true); + next.ai=function(card){ + if(get.damageEffect(trigger.source,player,player,'thunder')>0){ + return 8-get.value(card); + } + return 0; + }; + next.logSkill=['fumo',trigger.source,'thunder']; + "step 1" + if(result.bool){ + trigger.source.damage('thunder'); + } + }, + ai:{ + threaten:0.8 + } + }, + fanyin:{ + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('fanyin'),function(card,player,target){ + if(player==target) return false; + if(target.isLinked()) return true; + if(target.isTurnedOver()) return true; + if(target.countCards('j')) return true; + if(target.hp==target.maxHp) return false; + return target.isLowestHp(); + }).ai=function(target){ + var num=0; + var att=get.attitude(player,target); + if(att>0){ + if(target.isLowestHp()){ + num+=5; + } + if(target.isTurnedOver()){ + num+=5; + } + if(target.countCards('j')){ + num+=2; + } + if(target.isLinked()){ + num++; + } + if(num>0){ + return num+att; + } + } + return num; + } + "step 1" + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('fanyin',event.target); + } + else{ + event.finish(); + } + "step 2" + if(event.target.isLinked()){ + event.target.link(); + } + "step 3" + if(event.target.isTurnedOver()){ + event.target.turnOver(); + } + "step 4" + var cards=event.target.getCards('j'); + if(cards.length){ + event.target.discard(cards); + } + "step 5" + if(event.target.isLowestHp()){ + event.target.recover(); + } + }, + ai:{ + expose:0.2, + threaten:1.3 + } + }, + mingkong:{ + trigger:{player:'damageBegin'}, + forced:true, + filter:function(event,player){ + return player.countCards('h')==0&&event.num>=1; + }, + content:function(){ + if(trigger.num>=1){ + trigger.num--; + } + if(trigger.source){ + trigger.source.storage.mingkong=true; + trigger.source.addTempSkill('mingkong2','phaseAfter'); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')&&target.countCards('h')==0){ + if(player.hasSkillTag('jueqing')) return; + return 0.1; + } + } + } + }, + }, + mingkong2:{ + trigger:{source:['damageEnd','damageZero']}, + forced:true, + popup:false, + audio:false, + filter:function(event,player){ + return player.storage.mingkong?true:false; + }, + content:function(){ + player.draw(); + player.storage.mingkong=false; + player.removeSkill('mingkong2'); + } + }, + yuehua:{ + trigger:{player:['useCardAfter','respondAfter','discardAfter']}, + frequent:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(event.cards){ + for(var i=0;i0; + }, + direct:true, + priority:-5, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('qinglan',trigger.player),'he'); + next.logSkill=['qinglan',trigger.player]; + next.ai=function(card){ + if(trigger.num>1||!trigger.source){ + if(get.attitude(player,trigger.player)>0){ + return 9-get.value(card); + } + return -1; + } + else if(get.attitude(player,trigger.player)>0){ + if(trigger.player.hp==1){ + return 8-get.value(card); + } + if(trigger.source.hp==trigger.source.maxHp){ + return 6-get.value(card); + } + } + else if(get.attitude(player,trigger.source)>0&& + trigger.source.hp1){ + if(get.color(card)=='red') return 5-get.value(card); } return -1; } - else if(get.attitude(player,trigger.player)>0){ - if(trigger.player.hp==1){ - return 8-get.value(card); + "step 1" + if(result.bool){ + trigger.untrigger(); + trigger.finish(); + if(trigger.source){ + trigger.source.recover(); } - if(trigger.source.hp==trigger.source.maxHp){ - return 6-get.value(card); - } - } - else if(get.attitude(player,trigger.source)>0&& - trigger.source.hp1){ - if(get.color(card)=='red') return 5-get.value(card); - } - return -1; - } - "step 1" - if(result.bool){ - trigger.untrigger(); - trigger.finish(); - if(trigger.source){ - trigger.source.recover(); - } - } - else{ - event.finish(); - } - "step 2" - if(trigger.source){ - trigger.source.draw(); - } - }, - ai:{ - expose:0.1 - } - }, - fanshi:{ - trigger:{player:'phaseDiscardAfter'}, - forced:true, - filter:function(event,player){ - return player.getStat('damage')>0; - }, - check:function(event,player){ - return player.hp==player.maxHp; - }, - content:function(){ - "step 0" - player.loseHp(); - "step 1" - player.draw(); - } - }, - xuelu:{ - unique:true, - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.maxHp>player.hp&&player.countCards('he',{color:'red'})>0; - }, - alter:true, - content:function(){ - "step 0" - player.chooseCardTarget({ - position:'he', - filterTarget:function(card,player,target){ - return player!=target; - }, - filterCard:function(card,player){ - return get.color(card)=='red'&&lib.filter.cardDiscardable(card,player); - }, - ai1:function(card){ - return 9-get.value(card); - }, - ai2:function(target){ - return get.damageEffect(target,player,player,'fire'); - }, - prompt:get.prompt('xuelu') - }); - "step 1" - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('xuelu',event.target,'fire'); - if(get.is.altered('xuelu')){ - event.num=1; } else{ - event.num=Math.min(2,Math.ceil((player.maxHp-player.hp)/2)); + event.finish(); } - player.discard(result.cards); - } - else{ - event.finish(); - } - "step 2" - if(event.target){ - event.target.damage(event.num,'fire'); + "step 2" + if(trigger.source){ + trigger.source.draw(); + } + }, + ai:{ + expose:0.1 } }, - ai:{ - maixie:true, - expose:0.2, - threaten:function(player,target){ - if(target.hp==1) return 3; - if(target.hp==2) return 1.5; - return 0.5; + fanshi:{ + trigger:{player:'phaseDiscardAfter'}, + forced:true, + filter:function(event,player){ + return player.getStat('damage')>0; }, - effect:{ - target:function(card,player,target){ - if(!target.hasFriend()) return; - if(get.tag(card,'damage')){ - if(target.hp==target.maxHp) return [0,1]; + check:function(event,player){ + return player.hp==player.maxHp; + }, + content:function(){ + "step 0" + player.loseHp(); + "step 1" + player.draw(); + } + }, + xuelu:{ + unique:true, + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.maxHp>player.hp&&player.countCards('he',{color:'red'})>0; + }, + alter:true, + content:function(){ + "step 0" + player.chooseCardTarget({ + position:'he', + filterTarget:function(card,player,target){ + return player!=target; + }, + filterCard:function(card,player){ + return get.color(card)=='red'&&lib.filter.cardDiscardable(card,player); + }, + ai1:function(card){ + return 9-get.value(card); + }, + ai2:function(target){ + return get.damageEffect(target,player,player,'fire'); + }, + prompt:get.prompt('xuelu') + }); + "step 1" + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('xuelu',event.target,'fire'); + if(get.is.altered('xuelu')){ + event.num=1; + } + else{ + event.num=Math.min(2,Math.ceil((player.maxHp-player.hp)/2)); + } + player.discard(result.cards); + } + else{ + event.finish(); + } + "step 2" + if(event.target){ + event.target.damage(event.num,'fire'); + } + }, + ai:{ + maixie:true, + expose:0.2, + threaten:function(player,target){ + if(target.hp==1) return 3; + if(target.hp==2) return 1.5; + return 0.5; + }, + effect:{ + target:function(card,player,target){ + if(!target.hasFriend()) return; + if(get.tag(card,'damage')){ + if(target.hp==target.maxHp) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; } } - } - }, - xiuhua_old:{ - changeSeat:true, - trigger:{player:'shaHit'}, - filter:function(event,player){ - return event.target!=player.previous; }, - content:function(){ - game.swapSeat(trigger.target,player,true,true); - } - }, - shahun:{ - enable:'chooseToUse', - skillAnimation:true, - animationColor:'fire', - derivation:'juejing', - alter:true, - filter:function(event,player){ - return !player.storage.shahun&&player.hp<=0; - }, - content:function(){ - "step 0" - var cards=player.getCards('hej'); - player.discard(cards); - "step 1" - if(player.isLinked()) player.link(); - "step 2" - if(player.isTurnedOver()) player.turnOver(); - "step 3" - player.draw(3); - "step 4" - player.recover(1-player.hp); - player.removeSkill('fanshi'); - player.addSkill('juejing'); - if(get.is.altered('shahun')){ - player.storage.shahun=2; - } - else{ - player.storage.shahun=3; - } - player.markSkill('shahun'); - game.addVideo('storage',player,['shahun',player.storage.shahun]); - }, - group:'shahun2', - intro:{ - content:'turn' - }, - ai:{ - save:true, - skillTagFilter:function(player){ - if(player.storage.shahun) return false; - if(player.hp>0) return false; + xiuhua_old:{ + changeSeat:true, + trigger:{player:'shaHit'}, + filter:function(event,player){ + return event.target!=player.previous; }, - result:{ - player:3 + content:function(){ + game.swapSeat(trigger.target,player,true,true); } - } - }, - shahun2:{ - trigger:{player:'phaseAfter'}, - forced:true, - filter:function(event,player){ - return player.storage.shahun?true:false; }, - content:function(){ - if(player.storage.shahun>1){ - player.storage.shahun--; + shahun:{ + enable:'chooseToUse', + skillAnimation:true, + animationColor:'fire', + derivation:'juejing', + alter:true, + filter:function(event,player){ + return !player.storage.shahun&&player.hp<=0; + }, + content:function(){ + "step 0" + var cards=player.getCards('hej'); + player.discard(cards); + "step 1" + if(player.isLinked()) player.link(); + "step 2" + if(player.isTurnedOver()) player.turnOver(); + "step 3" + player.draw(3); + "step 4" + player.recover(1-player.hp); + player.removeSkill('fanshi'); + player.addSkill('juejing'); + if(get.is.altered('shahun')){ + player.storage.shahun=2; + } + else{ + player.storage.shahun=3; + } + player.markSkill('shahun'); game.addVideo('storage',player,['shahun',player.storage.shahun]); - } - else{ - player.die(); - } - } - }, - yanjia_old:{ - enable:'chooseToUse', - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - filterCard:function(card){ - return get.type(card)=='equip'; - }, - position:'he', - viewAs:{name:'wuzhong'}, - prompt:'将一张装备牌当无中生有使用', - check:function(card){ - var player=_status.currentPhase; - if(player.countCards('he',{subtype:get.subtype(card)})>1){ - return 11-get.equipValue(card); - } - if(player.countCards('h')0) return false; + }, + result:{ + player:3 } } - } - }, - xuanning:{ - group:['xuanning1','xuanning2'], - intro:{ - content:'mark' }, - ai:{ - threaten:0.9 - } - }, - xuanning1:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h',{type:'basic'})>0&&player.storage.xuanning!=3; - }, - filterCard:function(card){ - return get.type(card)=='basic'; - }, - check:function(card){ - return 7-get.useful(card); - }, - content:function(){ - player.storage.xuanning=3; - player.markSkill('xuanning'); - game.addVideo('storage',player,['xuanning',player.storage.xuanning]); - }, - ai:{ - result:{ - player:function(player){ - var num=player.countCards('h'); - if(num>player.hp+1) return 1; - if(player.storage.xuanning>=2) return 0; - if(num>player.hp) return 1 - if(player.storage.xuanning>=1) return 0; - return 1; - }, + shahun2:{ + trigger:{player:'phaseAfter'}, + forced:true, + filter:function(event,player){ + return player.storage.shahun?true:false; }, - order:5 - } - }, - xuanning2:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event,player){ - if(player.storage.xuanning){ - return (event.source&&event.source.countCards('he')>0); + content:function(){ + if(player.storage.shahun>1){ + player.storage.shahun--; + game.addVideo('storage',player,['shahun',player.storage.shahun]); + } + else{ + player.die(); + } } - return false; }, - logTarget:'source', - content:function(){ - var he=trigger.source.getCards('he'); - if(he.length){ - trigger.source.discard(he.randomGet()); + yanjia_old:{ + enable:'chooseToUse', + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + filterCard:function(card){ + return get.type(card)=='equip'; + }, + position:'he', + viewAs:{name:'wuzhong'}, + prompt:'将一张装备牌当无中生有使用', + check:function(card){ + var player=_status.currentPhase; + if(player.countCards('he',{subtype:get.subtype(card)})>1){ + return 11-get.equipValue(card); + } + if(player.countCards('h')0&&player.storage.xuanning!=3; + }, + filterCard:function(card){ + return get.type(card)=='basic'; + }, + check:function(card){ + return 7-get.useful(card); + }, + content:function(){ + player.storage.xuanning=3; + player.markSkill('xuanning'); + game.addVideo('storage',player,['xuanning',player.storage.xuanning]); + }, + ai:{ + result:{ + player:function(player){ + var num=player.countCards('h'); + if(num>player.hp+1) return 1; + if(player.storage.xuanning>=2) return 0; + if(num>player.hp) return 1 + if(player.storage.xuanning>=1) return 0; + return 1; + }, + }, + order:5 + } + }, + xuanning2:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + if(player.storage.xuanning){ + return (event.source&&event.source.countCards('he')>0); + } + return false; + }, + logTarget:'source', + content:function(){ + var he=trigger.source.getCards('he'); + if(he.length){ + trigger.source.discard(he.randomGet()); + } player.storage.xuanning--; if(!player.storage.xuanning){ player.unmarkSkill('xuanning'); } - event.targets=result.targets.slice(0); - event.targets.sort(lib.sort.seat); - player.logSkill('liuguang',result.targets); game.addVideo('storage',player,['xuanning',player.storage.xuanning]); } - else{ - event.finish(); - } - "step 2" - if(event.targets.length){ - var target=event.targets.shift(); - var next=target.chooseToDiscard('流光:弃置一张牌或受到一点伤害','he'); - next.ai=function(card){ - if(get.damageEffect(_status.event.player,player,_status.event.player)>=0) return -1; - if(_status.event.player.hp==1) return 9-get.value(card); - return 8-get.value(card); - }; - next.autochoose=function(){ - return this.player.countCards('he')==0; - }; - event.current=target; - } - else{ - event.finish(); - } - "step 3" - if(result.bool&&result.cards&&result.cards.length){ - event.goto(2); - } - else{ - event.current.damage(); - } }, - ai:{ - expose:0.2, - threaten:1.3 - } - }, - yangming:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.storage.yangming2>0) return false; - return player.countCards('h',{color:'red'})>0; - }, - filterCard:function(card){ - return get.color(card)=='red'; - }, - content:function(){ - player.storage.yangming2=2; - player.addSkill('yangming2'); - game.addVideo('storage',player,['yangming2',player.storage.yangming2]); - }, - check:function(card){ - return 6-get.value(card); - }, - ai:{ - result:{ - player:function(player){ - if(player.countCards('h')<=player.hp&&player.hp==player.maxHp){ - return 0; + liuguang:{ + trigger:{player:'phaseBegin'}, + direct:true, + filter:function(event,player){ + if(player.storage.xuanning) return true; + return false; + }, + content:function(){ + "step 0" + player.chooseTarget(function(card,player,target){ + return player!=target; + },get.prompt('liuguang'),[1,3]).ai=function(target){ + return get.damageEffect(target,player,player); + } + "step 1" + if(result.bool){ + player.storage.xuanning--; + if(!player.storage.xuanning){ + player.unmarkSkill('xuanning'); } - return 1; + event.targets=result.targets.slice(0); + event.targets.sort(lib.sort.seat); + player.logSkill('liuguang',result.targets); + game.addVideo('storage',player,['xuanning',player.storage.xuanning]); + } + else{ + event.finish(); + } + "step 2" + if(event.targets.length){ + var target=event.targets.shift(); + var next=target.chooseToDiscard('流光:弃置一张牌或受到一点伤害','he'); + next.ai=function(card){ + if(get.damageEffect(_status.event.player,player,_status.event.player)>=0) return -1; + if(_status.event.player.hp==1) return 9-get.value(card); + return 8-get.value(card); + }; + next.autochoose=function(){ + return this.player.countCards('he')==0; + }; + event.current=target; + } + else{ + event.finish(); + } + "step 3" + if(result.bool&&result.cards&&result.cards.length){ + event.goto(2); + } + else{ + event.current.damage(); } }, - order:6, - threaten:1.3 - } - }, - yangming2:{ - trigger:{player:'phaseUseEnd'}, - direct:true, - mark:true, - content:function(){ - "step 0" - player.storage.yangming2--; - game.addVideo('storage',player,['yangming2',player.storage.yangming2]); - if(player.storage.yangming2>0){ - event.finish(); + ai:{ + expose:0.2, + threaten:1.3 } - else{ - player.removeSkill('yangming2'); - var num=game.countPlayer(function(current){ - return get.distance(player,current)<=1&¤t.isDamaged(); - }); - if(num==0){ + }, + yangming:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.storage.yangming2>0) return false; + return player.countCards('h',{color:'red'})>0; + }, + filterCard:function(card){ + return get.color(card)=='red'; + }, + content:function(){ + player.storage.yangming2=2; + player.addSkill('yangming2'); + game.addVideo('storage',player,['yangming2',player.storage.yangming2]); + }, + check:function(card){ + return 6-get.value(card); + }, + ai:{ + result:{ + player:function(player){ + if(player.countCards('h')<=player.hp&&player.hp==player.maxHp){ + return 0; + } + return 1; + } + }, + order:6, + threaten:1.3 + } + }, + yangming2:{ + trigger:{player:'phaseUseEnd'}, + direct:true, + mark:true, + content:function(){ + "step 0" + player.storage.yangming2--; + game.addVideo('storage',player,['yangming2',player.storage.yangming2]); + if(player.storage.yangming2>0){ event.finish(); } else{ - player.chooseTarget(function(card,player,target){ - return get.distance(player,target)<=1&&target.hp1) return false; - if(target.hp>2) return false; - if(get.attitude(player,target)>=0) return false; - return get.damageEffect(target,player,player,'fire'); - } - } - } - }, - jiehuo_old:{ - unique:true, - forbid:['infinity'], - skillAnimation:true, - animationColor:'fire', - init:function(player){ - player.storage.jiehuo=false; - }, - enable:'phaseUse', - filter:function(event,player){ - //if(player.maxHp<=1) return false; - return !player.storage.jiehuo - }, - intro:{ - content:'limited' - }, - // mark:true, - line:'fire', - filterTarget:function(card,player,target){ - return player!=target; - }, - selectTarget:-1, - content:function(){ - if(!player.storage.jiehuo2){ - player.storage.jiehuo2=player.maxHp; - player.addSkill('jiehuo2'); - } - player.storage.jiehuo=true; - target.damage(Math.min(target.hp,player.storage.jiehuo2),'fire'); - } - }, - jiehuo2:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - popup:false, - content:function(){ - player.die(); - } - }, - yuling:{ - unique:true, - locked:true, - group:['yuling1','yuling2','yuling3','yuling4','yuling5','yuling6'], - intro:{ - content:'time' - }, - alter:true, - ai:{ - noh:true, - threaten:0.8, - effect:{ - target:function(card,player,target){ - if(card.name=='bingliang') return 0; - if(card.name=='lebu') return 1.5; - if(card.name=='guohe'){ - if(!target.countCards('e')) return 0; - return 0.5; + player.removeSkill('yangming2'); + var num=game.countPlayer(function(current){ + return get.distance(player,current)<=1&¤t.isDamaged(); + }); + if(num==0){ + event.finish(); + } + else{ + player.chooseTarget(function(card,player,target){ + return get.distance(player,target)<=1&&target.hp1) return false; + if(target.hp>2) return false; + if(get.attitude(player,target)>=0) return false; + return get.damageEffect(target,player,player,'fire'); } - if(card.name=='liuxinghuoyu') return 0; } } - } - }, - yuling1:{ - trigger:{player:['phaseDrawBefore','phaseDiscardBefore']}, - priority:10, - forced:true, - popup:false, - check:function(){ - return false; }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - } - }, - yuling2:{ - trigger:{player:['loseEnd','drawEnd'],global:'gameDrawAfter'}, - check:function(event,player){ - return player.countCards('h')<2; - }, - priority:10, - forced:true, - filter:function(event,player){ - return player.countCards('h')<5; - }, - content:function(){ - player.draw(5-player.countCards('h')); - } - }, - yuling3:{ - trigger:{player:'gainEnd'}, - priority:10, - forced:true, - filter:function(event,player){ - return player.countCards('h')>5; - }, - check:function(event,player){ - return player.countCards('h')<2; - }, - content:function(){ - player.chooseToDiscard(true,player.countCards('h')-5); - } - }, - yuling4:{ - mod:{ - cardEnabled:function(card,player){ - if(_status.currentPhase!=player) return; - var num=2; - if(get.is.altered('yuling')) num=1; - if(get.cardCount(true,player)>=player.maxHp+num) return false; + jiehuo_old:{ + unique:true, + forbid:['infinity'], + skillAnimation:true, + animationColor:'fire', + init:function(player){ + player.storage.jiehuo=false; + }, + enable:'phaseUse', + filter:function(event,player){ + //if(player.maxHp<=1) return false; + return !player.storage.jiehuo + }, + intro:{ + content:'limited' + }, + // mark:true, + line:'fire', + filterTarget:function(card,player,target){ + return player!=target; + }, + selectTarget:-1, + content:function(){ + if(!player.storage.jiehuo2){ + player.storage.jiehuo2=player.maxHp; + player.addSkill('jiehuo2'); + } + player.storage.jiehuo=true; + target.damage(Math.min(target.hp,player.storage.jiehuo2),'fire'); } - } + }, + jiehuo2:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + content:function(){ + player.die(); + } + }, + yuling:{ + unique:true, + locked:true, + group:['yuling1','yuling2','yuling3','yuling4','yuling5','yuling6'], + intro:{ + content:'time' + }, + alter:true, + ai:{ + noh:true, + threaten:0.8, + effect:{ + target:function(card,player,target){ + if(card.name=='bingliang') return 0; + if(card.name=='lebu') return 1.5; + if(card.name=='guohe'){ + if(!target.countCards('e')) return 0; + return 0.5; + } + if(card.name=='liuxinghuoyu') return 0; + } + } + } + }, + yuling1:{ + trigger:{player:['phaseDrawBefore','phaseDiscardBefore']}, + priority:10, + forced:true, + popup:false, + check:function(){ + return false; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + } + }, + yuling2:{ + trigger:{player:['loseEnd','drawEnd'],global:'gameDrawAfter'}, + check:function(event,player){ + return player.countCards('h')<2; + }, + priority:10, + forced:true, + filter:function(event,player){ + return player.countCards('h')<5; + }, + content:function(){ + player.draw(5-player.countCards('h')); + } + }, + yuling3:{ + trigger:{player:'gainEnd'}, + priority:10, + forced:true, + filter:function(event,player){ + return player.countCards('h')>5; + }, + check:function(event,player){ + return player.countCards('h')<2; + }, + content:function(){ + player.chooseToDiscard(true,player.countCards('h')-5); + } + }, + yuling4:{ + mod:{ + cardEnabled:function(card,player){ + if(_status.currentPhase!=player) return; + var num=2; + if(get.is.altered('yuling')) num=1; + if(get.cardCount(true,player)>=player.maxHp+num) return false; + } + } + }, + yuling5:{ + trigger:{player:['useCardAfter','phaseBegin']}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.yuling=player.maxHp+2-get.cardCount(true,player); + } + }, + yuling6:{ + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + silent:true, + content:function(){ + delete player.storage.yuling; + } + }, }, - yuling5:{ - trigger:{player:['useCardAfter','phaseBegin']}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.yuling=player.maxHp+2-get.cardCount(true,player); - } + translate:{ + gjqt_bailitusu:'百里屠苏', + gjqt_fengqingxue:'风晴雪', + gjqt_fanglansheng:'方兰生', + gjqt_xiangling:'襄铃', + gjqt_yinqianshang:'尹千觞', + gjqt_hongyu:'红玉', + + gjqt_ouyangshaogong:'欧阳少恭', + gjqt_xunfang:'巽芳', + + gjqt_yuewuyi:'乐无异', + gjqt_wenrenyu:'闻人羽', + gjqt_xiayize:'夏夷则', + gjqt_aruan:'阿阮', + + zuiji:'醉饮', + zuiji_info:'出牌阶段,你可以将一张手牌或装备牌当作酒使用', + manwu:'曼舞', + manwu_info:'在一名角色的结束阶段,若其手牌数为全场最少或之一,你可以令其摸一张牌', + xfanghua:'芳华', + xfanghua_info:'在你成为红色牌的目标后,你可以回复一点体力', + yunyin:'云音', + yunyin_info:'结束阶段,你可以弃置一张与本回合使用过的卡牌花色均不相同的手牌,视为使用一张基本牌或普通锦囊牌', + shishui:'逝水', + shishui_info:'锁定技,每当你使用一张红色牌,你令目标流失一点体力', + duhun:'渡魂', + duhun_info:'濒死阶段,你可以与一名体力值不超过你的体力上限的角色拼点,若你赢,你失去一点体力上限并与该角色交换体力值;若你没赢,你立即死亡', + duhun_info_alter:'濒死阶段,你可以与一名体力值不超过你的体力上限的角色拼点,若你赢,你失去一点体力上限并将体力值回复至与该角色相同;若你没赢,你立即死亡', + chizhen:'驰阵', + chizhen_info:'出牌阶段开始时,你可以摸X张牌并弃置X张牌,若你弃置了杀,可以视为使用一张决斗(X为你已损失的体力值且至少为1)', + xidie:'戏蝶', + xidie2:'戏蝶', + xidie_info:'准备阶段,若你的手牌数大于体力值,可以弃置至多X张牌,并于结束阶段摸等量的牌,X为你的体力值与手牌数之差且不超过3', + meihu:'魅狐', + meihu2:'魅狐', + meihu_info:'当你受到伤害后,可令伤害来源交给你一张手牌', + jianwu:'剑舞', + jianwu_info:'锁定技,攻击范围不含你的角色无法闪避你的杀', + meiying:'魅影', + meiying_info:'一名其他角色的回合结束时,若其未于此回合内使用过指定另一名角色为目标的牌,你可以弃置一张红色牌视为对其使用一张杀', + zuizhan:'乱斩', + zuizhan_info:'每当你使用一张杀,可以摸一张牌,然后此杀随机增加一个额外目标', + qianhuan:'千幻', + qianhuan_info:'回合结束后,若你已受伤,你可以回复一点体力并将武将牌翻面。若你的武将牌背面朝上,你不能使用卡牌,也不能成为卡牌的目标', + fumo:'伏魔', + fumo_info:'每当你受到一次伤害,可以弃置两张颜色相同的手牌并对伤害来源造成一点雷电伤害', + fanyin:'梵音', + fanyin_info:'结束阶段,你可以令其他一名角色复原武将牌。若其体力值是全场最少的之一,其回复一点体力。', + mingkong:'明空', + mingkong_info:'锁定技,若你没有手牌,你受到的伤害-1,然后伤害来源摸一张牌', + qinglan:'晴岚', + qinglan_info:'每当有一名角色即将受到属性伤害,你可以弃置一张牌令其防止此伤害,然后伤害来源摸一张牌并回复一点体力', + yuehua:'月华', + yuehua_info:'每当你于回合外使用、打出或弃置红色牌,你可以摸一张牌', + xuelu:'血戮', + xuelu_info:'结束阶段,若你已受伤,你可以弃置一张红色牌并对一名其他角色造成一点火焰伤害;若你已损失体力值不少于3,改为造成两点火焰伤害', + xuelu_info_alter:'结束阶段,若你已受伤,你可以弃置一张红色牌并对一名其他角色造成一点火焰伤害', + fanshi:'反噬', + fanshi_info:'锁定技,弃牌阶段结束时,若你本回合内造成过伤害,你流失一点体力并摸一张牌', + shahun:'煞魂', + shahun2:'煞魂', + shahun_info:'限定技,濒死阶段,你可以复原武将牌,弃置所有牌并摸三张牌,然后将体力回复至1;若如此做,你失去技能【反噬】,获得技能【绝境】,并于三回合后立即死亡', + shahun_info_alter:'限定技,濒死阶段,你可以复原武将牌,弃置所有牌并摸三张牌,然后将体力回复至1;若如此做,你失去技能【反噬】,获得技能【绝境】,并于两回合后立即死亡', + + yanjia:'偃甲', + yanjia_info:'出牌阶段,你可以将两张非特殊装备牌合成为一张强化装备', + xiuhua:'袖花', + xiuhua_info:'每当一件其他角色的装备因被替换或弃置进入弃牌堆,你可以获得之', + liuying:'流影', + liuying_info:'每当你使用一张杀,你可以指定一名不是此杀目标的角色并进行一次判定,若结果是黑色,将其追加为杀的额外目标并可以再次判定', + boyun:'拨云', + boyun1:'拨云', + boyun2:'拨云', + boyun_info:'在你的回合内,你可以弃置一张装备牌,并展示牌堆顶的一张牌,若其为装备牌,你须将其交给任意一张角色并对其造成一点伤害,否则你摸一张牌', + jizhan:'疾战', + jizhan_info:'出牌阶段限一次,你可以将移动到任意一名角色的前一位,视为对其使用了一张不计入出杀次数的杀', + qianjun:'千军', + qianjun_info:'每当你使用一张杀,你可以弃置一张牌,令距离目标1以内的所有角色成为额外目标', + xuanning:'玄凝', + xuanning1:'玄凝', + xuanning2:'玄凝', + liuguang:'流光', + yangming:'养命', + yangming2:'养命', + xuanning_info:'出牌阶段,你可以弃置一基本牌,获得至多3个玄凝标记。当你受到伤害时,你失去一枚玄凝标记,伤害来源随机弃置一张牌', + liuguang_info:'准备阶段,若你有玄凝标记,你可以弃置一枚玄凝标记,选择至多三名角色依次令其选择一项:弃置一张牌,或受到一点伤害,并终止流光结算', + yangming_info:'出牌阶段,你可以弃置一张红色牌,并在下个出牌阶段结束时令距离1以内的任意名角色回复一点体力,在此之前不可再次发动', + zhaolu:'朝露', + jiehuo:'劫火', + yuling:'御灵', + yuling1:'御灵', + yuling2:'御灵', + yuling3:'御灵', + yuling4:'御灵', + zhaolu_info:'锁定技,每隔X回合,你流失一点体力上限,每当你受到一点伤害或有人死亡,视为减少两个回合,X为现存角色数且至多为5', + jiehuo_info:'限定技,出牌阶段,你可以对一名其他角色造成两点火焰伤害,然后死亡', + yuling_info:'锁定技,你没有摸牌和弃牌阶段,你的手牌数始终为5,你在一个出牌阶段最多使用X+2张牌,X为你的体力上限', + yuling_info_alter:'锁定技,你没有摸牌和弃牌阶段,你的手牌数始终为5,你在一个出牌阶段最多使用X+1张牌,X为你的体力上限', }, - yuling6:{ - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - silent:true, - content:function(){ - delete player.storage.yuling; - } - }, - }, - translate:{ - gjqt_bailitusu:'百里屠苏', - gjqt_fengqingxue:'风晴雪', - gjqt_fanglansheng:'方兰生', - gjqt_xiangling:'襄铃', - gjqt_yinqianshang:'尹千觞', - gjqt_hongyu:'红玉', - - gjqt_ouyangshaogong:'欧阳少恭', - gjqt_xunfang:'巽芳', - - gjqt_yuewuyi:'乐无异', - gjqt_wenrenyu:'闻人羽', - gjqt_xiayize:'夏夷则', - gjqt_aruan:'阿阮', - - zuiji:'醉饮', - zuiji_info:'出牌阶段,你可以将一张手牌或装备牌当作酒使用', - manwu:'曼舞', - manwu_info:'在一名角色的结束阶段,若其手牌数为全场最少或之一,你可以令其摸一张牌', - xfanghua:'芳华', - xfanghua_info:'在你成为红色牌的目标后,你可以回复一点体力', - yunyin:'云音', - yunyin_info:'结束阶段,你可以弃置一张与本回合使用过的卡牌花色均不相同的手牌,视为使用一张基本牌或普通锦囊牌', - shishui:'逝水', - shishui_info:'锁定技,每当你使用一张红色牌,你令目标流失一点体力', - duhun:'渡魂', - duhun_info:'濒死阶段,你可以与一名体力值不超过你的体力上限的角色拼点,若你赢,你失去一点体力上限并与该角色交换体力值;若你没赢,你立即死亡', - duhun_info_alter:'濒死阶段,你可以与一名体力值不超过你的体力上限的角色拼点,若你赢,你失去一点体力上限并将体力值回复至与该角色相同;若你没赢,你立即死亡', - chizhen:'驰阵', - chizhen_info:'出牌阶段开始时,你可以摸X张牌并弃置X张牌,若你弃置了杀,可以视为使用一张决斗(X为你已损失的体力值且至少为1)', - xidie:'戏蝶', - xidie2:'戏蝶', - xidie_info:'准备阶段,若你的手牌数大于体力值,可以弃置至多X张牌,并于结束阶段摸等量的牌,X为你的体力值与手牌数之差且不超过3', - meihu:'魅狐', - meihu2:'魅狐', - meihu_info:'当你受到伤害后,可令伤害来源交给你一张手牌', - jianwu:'剑舞', - jianwu_info:'锁定技,攻击范围不含你的角色无法闪避你的杀', - meiying:'魅影', - meiying_info:'一名其他角色的回合结束时,若其未于此回合内使用过指定另一名角色为目标的牌,你可以弃置一张红色牌视为对其使用一张杀', - zuizhan:'乱斩', - zuizhan_info:'每当你使用一张杀,可以摸一张牌,然后此杀随机增加一个额外目标', - qianhuan:'千幻', - qianhuan_info:'回合结束后,若你已受伤,你可以回复一点体力并将武将牌翻面。若你的武将牌背面朝上,你不能使用卡牌,也不能成为卡牌的目标', - fumo:'伏魔', - fumo_info:'每当你受到一次伤害,可以弃置两张颜色相同的手牌并对伤害来源造成一点雷电伤害', - fanyin:'梵音', - fanyin_info:'结束阶段,你可以令其他一名角色复原武将牌。若其体力值是全场最少的之一,其回复一点体力。', - mingkong:'明空', - mingkong_info:'锁定技,若你没有手牌,你受到的伤害-1,然后伤害来源摸一张牌', - qinglan:'晴岚', - qinglan_info:'每当有一名角色即将受到属性伤害,你可以弃置一张牌令其防止此伤害,然后伤害来源摸一张牌并回复一点体力', - yuehua:'月华', - yuehua_info:'每当你于回合外使用、打出或弃置红色牌,你可以摸一张牌', - xuelu:'血戮', - xuelu_info:'结束阶段,若你已受伤,你可以弃置一张红色牌并对一名其他角色造成一点火焰伤害;若你已损失体力值不少于3,改为造成两点火焰伤害', - xuelu_info_alter:'结束阶段,若你已受伤,你可以弃置一张红色牌并对一名其他角色造成一点火焰伤害', - fanshi:'反噬', - fanshi_info:'锁定技,弃牌阶段结束时,若你本回合内造成过伤害,你流失一点体力并摸一张牌', - shahun:'煞魂', - shahun2:'煞魂', - shahun_info:'限定技,濒死阶段,你可以复原武将牌,弃置所有牌并摸三张牌,然后将体力回复至1;若如此做,你失去技能【反噬】,获得技能【绝境】,并于三回合后立即死亡', - shahun_info_alter:'限定技,濒死阶段,你可以复原武将牌,弃置所有牌并摸三张牌,然后将体力回复至1;若如此做,你失去技能【反噬】,获得技能【绝境】,并于两回合后立即死亡', - - yanjia:'偃甲', - yanjia_info:'出牌阶段,你可以将两张非特殊装备牌合成为一张强化装备', - xiuhua:'袖花', - xiuhua_info:'每当一件其他角色的装备因被替换或弃置进入弃牌堆,你可以获得之', - liuying:'流影', - liuying_info:'每当你使用一张杀,你可以指定一名不是此杀目标的角色并进行一次判定,若结果是黑色,将其追加为杀的额外目标并可以再次判定', - boyun:'拨云', - boyun1:'拨云', - boyun2:'拨云', - boyun_info:'在你的回合内,你可以弃置一张装备牌,并展示牌堆顶的一张牌,若其为装备牌,你须将其交给任意一张角色并对其造成一点伤害,否则你摸一张牌', - jizhan:'疾战', - jizhan_info:'出牌阶段限一次,你可以将移动到任意一名角色的前一位,视为对其使用了一张不计入出杀次数的杀', - qianjun:'千军', - qianjun_info:'每当你使用一张杀,你可以弃置一张牌,令距离目标1以内的所有角色成为额外目标', - xuanning:'玄凝', - xuanning1:'玄凝', - xuanning2:'玄凝', - liuguang:'流光', - yangming:'养命', - yangming2:'养命', - xuanning_info:'出牌阶段,你可以弃置一基本牌,获得至多3个玄凝标记。当你受到伤害时,你失去一枚玄凝标记,伤害来源随机弃置一张牌', - liuguang_info:'准备阶段,若你有玄凝标记,你可以弃置一枚玄凝标记,选择至多三名角色依次令其选择一项:弃置一张牌,或受到一点伤害,并终止流光结算', - yangming_info:'出牌阶段,你可以弃置一张红色牌,并在下个出牌阶段结束时令距离1以内的任意名角色回复一点体力,在此之前不可再次发动', - zhaolu:'朝露', - jiehuo:'劫火', - yuling:'御灵', - yuling1:'御灵', - yuling2:'御灵', - yuling3:'御灵', - yuling4:'御灵', - zhaolu_info:'锁定技,每隔X回合,你流失一点体力上限,每当你受到一点伤害或有人死亡,视为减少两个回合,X为现存角色数且至多为5', - jiehuo_info:'限定技,出牌阶段,你可以对一名其他角色造成两点火焰伤害,然后死亡', - yuling_info:'锁定技,你没有摸牌和弃牌阶段,你的手牌数始终为5,你在一个出牌阶段最多使用X+2张牌,X为你的体力上限', - yuling_info_alter:'锁定技,你没有摸牌和弃牌阶段,你的手牌数始终为5,你在一个出牌阶段最多使用X+1张牌,X为你的体力上限', - }, + }; }); diff --git a/character/gwent.js b/character/gwent.js index 7824d9ac4..70b5b4ee0 100644 --- a/character/gwent.js +++ b/character/gwent.js @@ -1,916 +1,924 @@ 'use strict'; -game.import('character',{ - name:'gwent', - character:{ - gw_huoge:['male','qun',3,['quanzhang']], - gw_aisinie:['female','wu',3,['huihun']], - gw_enxier:['male','wei',4,['gwbaquan']], +game.import('character',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'gwent', + character:{ + gw_huoge:['male','qun',3,['quanzhang']], + gw_aisinie:['female','wu',3,['huihun']], + gw_enxier:['male','wei',4,['gwbaquan']], - gw_kaerweite:['male','shu',4,['gwjiquan']], - gw_falanxisika:['female','wu',3,['shewu']], - gw_haluo:['male','qun',4,['nuhou']], + gw_kaerweite:['male','shu',4,['gwjiquan']], + gw_falanxisika:['female','wu',3,['shewu']], + gw_haluo:['male','qun',4,['nuhou']], - gw_airuiting:['male','wei',4,['kuanglie']], - gw_laduoweide:['male','wei',4,['gwxiaoshou']], - gw_dagong:['male','qun',4,['tianbian']], + gw_airuiting:['male','wei',4,['kuanglie']], + gw_laduoweide:['male','wei',4,['gwxiaoshou']], + gw_dagong:['male','qun',4,['tianbian']], - // gw_bulanwang:['male','qun',3,[]], - // gw_kuite:['male','qun',3,[]], - // gw_fuertaisite:['male','qun',3,[]], - // gw_hengsaite:['male','qun',3,[]], - // gw_fulisi:['male','qun',3,[]], - // gw_gaier:['male','shu',3,['hunmo']], + // gw_bulanwang:['male','qun',3,[]], + // gw_kuite:['male','qun',3,[]], + // gw_fuertaisite:['male','qun',3,[]], + // gw_hengsaite:['male','qun',3,[]], + // gw_fulisi:['male','qun',3,[]], + // gw_gaier:['male','shu',3,['hunmo']], - gw_jieluote:['male','qun',6,['fayin']], - gw_yenaifa:['female','qun',3,['xuezhou']], - gw_telisi:['female','wei',3,['huandie']], - gw_xili:['female','wu',3,['fengjian']], - gw_luoqi:['male','wei',4,['gwzhanjiang']], - gw_yioufeisi:['male','wu',4,['gwchuanxin']], - }, - characterIntro:{ - gw_huoge:'那个老年痴呆?不知道他是活着还是已经被制成标本了!', - gw_aisinie:'树精皇后有着熔银做成的眼睛,冰冷铸钢的心脏。', - gw_gaier:'画作应该要传达情绪,而不是字句。', - gw_enxier:'我可没什么耐心,最好小心点,否则脑袋不保', + gw_jieluote:['male','qun',6,['fayin']], + gw_yenaifa:['female','qun',3,['xuezhou']], + gw_telisi:['female','wei',3,['huandie']], + gw_xili:['female','wu',3,['fengjian']], + gw_luoqi:['male','wei',4,['gwzhanjiang']], + gw_yioufeisi:['male','wu',4,['gwchuanxin']], + }, + characterIntro:{ + gw_huoge:'那个老年痴呆?不知道他是活着还是已经被制成标本了!', + gw_aisinie:'树精皇后有着熔银做成的眼睛,冰冷铸钢的心脏。', + gw_gaier:'画作应该要传达情绪,而不是字句。', + gw_enxier:'我可没什么耐心,最好小心点,否则脑袋不保', - gw_yenaifa:'魔法是艺术、混沌与科学的结合。因为魔法的确是一门技艺也是一种诅咒。', - gw_telisi:'我可以照顾我自己,相信我。', - gw_jieluote:'如果要付出这种代价才能拯救世界,那最好还是让世界消逝吧。', - gw_xili:'我想去哪,就去哪。', - gw_luoqi:'是个爱国者…还是个货真价实的王八蛋。', - gw_yioufeisi:'国王还是乞丐,两者有何区别,人类少一个算一个', - }, - skill:{ - tianbian:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - content:function(){ - 'step 0' - var num1=0,num2=0; - var choice; - if(player.hasUnknown(2)){ - if(game.dead.length==0){ - choice='选项二'; - } - else{ - choice='cancel2'; - } - } - else{ - game.countPlayer(function(current){ - var att=get.attitude(player,current); - if(att>0){ - num1++; - } - else if(att<0){ - num2++; - } - }); - choice=(num1>num2)?'选项一':'选项二'; - } - player.chooseControl('选项一','选项二','cancel2',function(){ - return choice; - }).set('prompt',get.prompt('tianbian')).set('choiceList',['随机使用一张对全场有正面效果的牌','随机使用一张对全场有负面效果的牌']); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('tianbian'); - var list=[]; - for(var i in lib.card){ - if(lib.inpile.contains(i)&& - lib.card[i].selectTarget==-1&& - lib.card[i].type!='equip'&& - lib.card[i].ai&&lib.card[i].ai.tag&& - lib.card[i].ai.tag.multitarget){ - if(lib.card[i].ai.tag.multineg){ - if(result.control=='选项二'){ - list.push(i); - } - } - else{ - if(result.control=='选项一'){ - list.push(i); - } - } - } - } - var name=null; - while(list.length){ - name=list.randomRemove(); - if(game.hasPlayer(function(current){ - return player.canUse(name,current) - })){ - break; + gw_yenaifa:'魔法是艺术、混沌与科学的结合。因为魔法的确是一门技艺也是一种诅咒。', + gw_telisi:'我可以照顾我自己,相信我。', + gw_jieluote:'如果要付出这种代价才能拯救世界,那最好还是让世界消逝吧。', + gw_xili:'我想去哪,就去哪。', + gw_luoqi:'是个爱国者…还是个货真价实的王八蛋。', + gw_yioufeisi:'国王还是乞丐,两者有何区别,人类少一个算一个', + }, + skill:{ + tianbian:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + content:function(){ + 'step 0' + var num1=0,num2=0; + var choice; + if(player.hasUnknown(2)){ + if(game.dead.length==0){ + choice='选项二'; } else{ - name=null; + choice='cancel2'; } } - if(name){ - var targets=game.filterPlayer(function(current){ - return player.canUse(name,current); - }); - targets.sortBySeat(); - player.useCard({name:name},targets); - } - } - } - }, - gwxiaoshou:{ - enable:'phaseUse', - usable:2, - filterTarget:function(card,player,target){ - return target.isHighestHp(); - }, - check:function(card){return 7-get.value(card);}, - position:'he', - filterCard:true, - content:function(){ - target.damage(); - }, - ai:{ - result:{ - target:function(player,target){ - return get.damageEffect(target,player); - }, - }, - order:7 - } - }, - kuanglie:{ - trigger:{player:'useCardToBegin'}, - filter:function(event,player){ - return event.target&&event.target!=player&&event.target.countCards('he')&&get.color(event.card)=='black'; - }, - init:function(player){ - player.storage.kuanglie=0; - }, - forced:true, - content:function(){ - trigger.target.randomDiscard(); - player.storage.kuanglie++; - if(player.storage.kuanglie%2==0){ - player.draw(); - } - } - }, - kuanglie2:{}, - gwjiquan:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he'); - }, - selectTarget:[1,Infinity], - content:function(){ - 'step 0' - player.gainPlayerCard(target,'he',true); - 'step 1' - target.useCard({name:'sha'},player); - }, - ai:{ - threaten:1.4, - order:7, - result:{ - target:function(player,target){ - if(player.getEquip('tengjia')||player.getEquip('bagua')) return -1; - if(get.effect(player,{name:'sha'},target,player)>=0) return -1; - if(!player.hasShan()){ - if(ui.selected.targets.length) return 0; - if(player.hp>=4) return -1; - if(player.hp>=3&&target.hp==1) return -1; - return 0; - } - var num=player.countCards('h','shan'); - if(num<1){ - num=1; - } - if(ui.selected.targets.length>=num){ - return 0; - } - return -1; - } - } - } - }, - nuhou:{ - enable:'phaseUse', - usable:1, - position:'he', - filterCard:true, - check:function(card){ - return 7-get.value(card) - }, - content:function(){ - 'step 0' - var list=player.getEnemies(); - list.sortBySeat(); - event.list=list; - 'step 1' - if(event.list.length){ - var current=event.list.shift(); - var he=current.getCards('he'); - player.line(current,'green'); - if(he.length){ - current.discard(he.randomGet()); - current.addExpose(0.2); - } - event.redo(); - } - }, - ai:{ - order:8.5, - result:{ - player:1 - }, - }, - }, - shewu:{ - enable:'phaseUse', - usable:1, - position:'he', - filterCard:true, - selectCard:[1,3], - check:function(card){ - if(!ui.selected.cards.length){ - return 6-get.value(card) - } - var player=_status.event.player; - if(player.isDamaged()){ - var hs=player.getCards('h'); - var num=0; - for(var i=0;i=3){ - return 6-get.value(card); - } - } - return 0; - }, - content:function(){ - player.draw(3); - if(cards.length>=2){ - player.addTempSkill('shewu_dist','phaseAfter'); - } - if(cards.length==3){ - player.recover(); - } - }, - ai:{ - order:1, - result:{ - player:1 - }, - threaten:1.6 - }, - subSkill:{ - dist:{ - mod:{ - targetInRange:function(){ - return true; - } - } - } - } - }, - gwzhanjiang:{ - trigger:{global:'phaseBegin'}, - direct:true, - filter:function(event,player){ - return !player.hasSkill('gwzhanjiang2')&&event.player!=player; - }, - content:function(){ - 'step 0' - var bool=(get.effect(trigger.player,{name:'sha'},player,player)>0&& - Math.abs(get.attitude(player,trigger.player))>1&& - game.hasPlayer(function(current){ - return get.attitude(current,player)>0&¤t.hasSha(); - })); - var next=player.chooseToDiscard(get.prompt('gwzhanjiang',trigger.player),'he'); - next.ai=function(card){ - if(bool) return 7-get.value(card); - return 0; - }; - next.logSkill=['gwzhanjiang',trigger.player]; - 'step 1' - if(result.bool){ - player.addTempSkill('gwzhanjiang2',{player:'phaseBegin'}); - event.targets=game.filterPlayer(function(current){ - return current!=trigger.player; - }); - event.targets.sortBySeat(trigger.player); - event.num=0; - } - else{ - event.finish(); - } - 'step 2' - if(event.targets.length){ - event.current=event.targets.shift(); - if(event.current.hasSha()){ - event.current.addTempSkill('gwzhanjiang3','gwzhanjiangAfter'); - event.current.chooseToUse({name:'sha'},'是否对'+get.translation(trigger.player)+'使用一张杀?',trigger.player,-1); - } else{ - event.redo(); + game.countPlayer(function(current){ + var att=get.attitude(player,current); + if(att>0){ + num1++; + } + else if(att<0){ + num2++; + } + }); + choice=(num1>num2)?'选项一':'选项二'; } - } - else{ - event.goto(4); - } - 'step 3' - if(result.bool){ - event.num++; - if(event.num>=2){ - return; - } - } - event.goto(2); - }, - ai:{ - expose:0.2, - threaten:1.4 - }, - }, - gwzhanjiang2:{}, - gwzhanjiang3:{ - trigger:{player:'useCard'}, - filter:function(event){ - return event.card.name=='sha'&&event.getParent(2).name=='gwzhanjiang'; - }, - forced:true, - popup:false, - content:function(){ - player.draw(); - } - }, - gwchuanxin_old:{ - trigger:{player:'shaAfter'}, - filter:function(event,player){ - if(player.storage.gwchuanxin&&player.storage.gwchuanxin.length>=4) return false; - return event.target.isAlive(); - }, - check:function(event,player){ - return get.effect(event.target,{name:'sha'},player,player)>0 - }, - logTarget:'target', - logLine:false, - content:function(){ - 'step 0' - event.card=get.cards()[0]; - player.showCards(event.card,get.translation(player)+'对'+get.translation(trigger.player)+'发动了【穿心】'); - 'step 1' - if(player.storage.gwchuanxin&&!player.storage.gwchuanxin.contains(get.suit(event.card))){ - player.useCard({name:'sha'},[event.card],trigger.target,false); - } - }, - group:['gwchuanxin_count1','gwchuanxin_count2'], - subSkill:{ - count1:{ - trigger:{global:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.gwchuanxin=[]; - } - }, - count2:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - silent:true, - // filter:function(event){ - // return event.card&&event.card.name=='sha'; - // }, - content:function(){ - for(var i=0;i0 - }, - logTarget:'target', - // logLine:false, - content:function(){ - 'step 0' - var cards=get.cards(); - player.showCards(cards,get.translation(player)+'发动了【穿心】'); - event.bool=(get.color(cards[0])=='black'); - 'step 1' - if(event.bool){ - player.useCard({name:'sha'},trigger.target,false).animate=false; + gwxiaoshou:{ + enable:'phaseUse', + usable:2, + filterTarget:function(card,player,target){ + return target.isHighestHp(); + }, + check:function(card){return 7-get.value(card);}, + position:'he', + filterCard:true, + content:function(){ + target.damage(); + }, + ai:{ + result:{ + target:function(player,target){ + return get.damageEffect(target,player); + }, + }, + order:7 } }, - mod:{ - attackFrom:function(from,to,distance){ - return distance-from.hp; - } - } - }, - fengjian:{ - trigger:{player:'useCard'}, - direct:true, - filter:function(event,player){ - var type=get.type(event.card,'trick'); - return type=='trick'&&game.hasPlayer(function(current){ - return player.canUse('sha',current,false)&&!event.targets.contains(current); - }); - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('fengjian'),function(card,player,target){ - return player.canUse('sha',target,false)&&!trigger.targets.contains(target); - }).ai=function(target){ - return get.effect(target,{name:'sha',nature:'thunder'},player,player); - } - "step 1" - if(result.bool){ - player.logSkill('fengjian'); - player.useCard({name:'sha',nature:'thunder'},result.targets,false); - player.addTempSkill('qianxing',{player:'phaseBegin'}); + kuanglie:{ + trigger:{player:'useCardToBegin'}, + filter:function(event,player){ + return event.target&&event.target!=player&&event.target.countCards('he')&&get.color(event.card)=='black'; + }, + init:function(player){ + player.storage.kuanglie=0; + }, + forced:true, + content:function(){ + trigger.target.randomDiscard(); + player.storage.kuanglie++; + if(player.storage.kuanglie%2==0){ + player.draw(); + } } }, - ai:{ - expose:0.2, - threaten:1.5, - noautowuxie:true, - }, - // group:'fengjian_hide', - // subSkill:{ - // hide:{ - // trigger:{source:'damageEnd'}, - // forced:true, - // popup:false, - // filter:function(event,player){ - // return event.getParent(3).name=='fengjian'; - // }, - // content:function(){ - // player.addTempSkill('qianxing',{player:'phaseBegin'}); - // } - // } - // } - }, - huandie:{ - trigger:{player:'phaseBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('huandie'),[0,game.countPlayer()],function(card,player,target){ - return target!=player; - }).ai=function(target){ - return get.attitude(player,target); - } - 'step 1' - if(result.bool){ - result.targets.sortBySeat(); - result.targets.unshift(player); - player.logSkill('huandie',result.targets); - game.asyncDrawAuto(result.targets,function(current){ - return current==player?1:2; - }); - player.addTempSkill('huandie_discard','phaseAfter'); + kuanglie2:{}, + gwjiquan:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he'); + }, + selectTarget:[1,Infinity], + content:function(){ + 'step 0' + player.gainPlayerCard(target,'he',true); + 'step 1' + target.useCard({name:'sha'},player); + }, + ai:{ + threaten:1.4, + order:7, + result:{ + target:function(player,target){ + if(player.getEquip('tengjia')||player.getEquip('bagua')) return -1; + if(get.effect(player,{name:'sha'},target,player)>=0) return -1; + if(!player.hasShan()){ + if(ui.selected.targets.length) return 0; + if(player.hp>=4) return -1; + if(player.hp>=3&&target.hp==1) return -1; + return 0; + } + var num=player.countCards('h','shan'); + if(num<1){ + num=1; + } + if(ui.selected.targets.length>=num){ + return 0; + } + return -1; + } + } } }, - ai:{ - threaten:1.5 + nuhou:{ + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + check:function(card){ + return 7-get.value(card) + }, + content:function(){ + 'step 0' + var list=player.getEnemies(); + list.sortBySeat(); + event.list=list; + 'step 1' + if(event.list.length){ + var current=event.list.shift(); + var he=current.getCards('he'); + player.line(current,'green'); + if(he.length){ + current.discard(he.randomGet()); + current.addExpose(0.2); + } + event.redo(); + } + }, + ai:{ + order:8.5, + result:{ + player:1 + }, + }, }, - subSkill:{ - discard:{ - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.countCards('h')>current.hp; + shewu:{ + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + selectCard:[1,3], + check:function(card){ + if(!ui.selected.cards.length){ + return 6-get.value(card) + } + var player=_status.event.player; + if(player.isDamaged()){ + var hs=player.getCards('h'); + var num=0; + for(var i=0;i=3){ + return 6-get.value(card); + } + } + return 0; + }, + content:function(){ + player.draw(3); + if(cards.length>=2){ + player.addTempSkill('shewu_dist','phaseAfter'); + } + if(cards.length==3){ + player.recover(); + } + }, + ai:{ + order:1, + result:{ + player:1 + }, + threaten:1.6 + }, + subSkill:{ + dist:{ + mod:{ + targetInRange:function(){ + return true; + } + } + } + } + }, + gwzhanjiang:{ + trigger:{global:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return !player.hasSkill('gwzhanjiang2')&&event.player!=player; + }, + content:function(){ + 'step 0' + var bool=(get.effect(trigger.player,{name:'sha'},player,player)>0&& + Math.abs(get.attitude(player,trigger.player))>1&& + game.hasPlayer(function(current){ + return get.attitude(current,player)>0&¤t.hasSha(); + })); + var next=player.chooseToDiscard(get.prompt('gwzhanjiang',trigger.player),'he'); + next.ai=function(card){ + if(bool) return 7-get.value(card); + return 0; + }; + next.logSkill=['gwzhanjiang',trigger.player]; + 'step 1' + if(result.bool){ + player.addTempSkill('gwzhanjiang2',{player:'phaseBegin'}); + event.targets=game.filterPlayer(function(current){ + return current!=trigger.player; }); - }, - logTarget:function(){ - return game.filterPlayer(function(current){ - return current.countCards('h')>current.hp; - }).sortBySeat(); - }, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current.countCards('h')>current.hp; - }).sortBySeat(); - event.list=list; - 'step 1' - if(event.list.length){ - event.list.shift().chooseToDiscard('h',true,2); + event.targets.sortBySeat(trigger.player); + event.num=0; + } + else{ + event.finish(); + } + 'step 2' + if(event.targets.length){ + event.current=event.targets.shift(); + if(event.current.hasSha()){ + event.current.addTempSkill('gwzhanjiang3','gwzhanjiangAfter'); + event.current.chooseToUse({name:'sha'},'是否对'+get.translation(trigger.player)+'使用一张杀?',trigger.player,-1); + } + else{ event.redo(); } } - } - } - }, - xuezhou:{ - trigger:{player:'phaseBegin'}, - direct:true, - unique:true, - forceunique:true, - intro:{ - content:function(storage,player){ - var name=get.translation(player); - if(storage==1){ - return '每当一名角色('+name+'除外)受到一次伤害,该角色失去一点体力,'+name+'回复一点体力'; - } - else if(storage==2){ - return '每当一名角色('+name+'除外)造成一次伤害,该角色失去一点体力,'+name+'(若不是受伤害角色)回复一点体力'; - } else{ - return '未发动'; + event.goto(4); } - } - }, - content:function(){ - 'step 0' - var next=player.chooseControl('选项一','选项二','cancel2',function(){ - if(Math.random()<0.65) return 0; - return 1; - }); - next.prompt=get.prompt('xuezhou'); - next.choiceList=[ - '每当一名其他角色受到一次伤害,该角色失去一点体力,你回复一点体力', - '每当一名其他角色造成一次伤害,该角色失去一点体力,你(若不是受伤害角色)回复一点体力' - ]; - 'step 1' - if(result.control=='cancel2'){ - player.unmarkSkill('xuezhou'); - delete _status.xuezhou; - } - else{ - player.logSkill('xuezhou'); - player.storage.xuezhou=result.index+1; - player.syncStorage('xuezhou'); - player.markSkill('xuezhou'); - _status.xuezhou=player; - } - }, - ai:{ - threaten:2.5 - }, - global:'xuezhou_hp' - }, - xuezhou_hp:{ - trigger:{source:'damageEnd',player:'damageEnd'}, - filter:function(event,player){ - if(!_status.xuezhou) return false; - if(player==_status.xuezhou) return false; - if(!player.isIn()||!_status.xuezhou.isIn()) return false; - switch(_status.xuezhou.storage.xuezhou){ - case 1:return player==event.player; - case 2:return player==event.source; - default:return false; - } - }, - forced:true, - popup:false, - silent:true, - content:function(){ - 'step 0' - game.delayx(); - 'step 1' - _status.xuezhou.logSkill('xuezhou',player); - player.loseHp(); - if(_status.xuezhou!=trigger.player){ - _status.xuezhou.recover(); - } - } - }, - fayin:{ - trigger:{player:'shaBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - var target=trigger.target; - var bool=get.attitude(player,target)<0; - var next=player.chooseToDiscard('he',get.prompt('fayin',target)); - next.ai=function(card){ - if(bool) return 7-get.value(card); - return 0; - }; - next.logSkill=['fayin',target]; - 'step 1' - if(result.bool){ - var target=trigger.target; - var num=5; - if(target.isMad()){ - num=4; - } - switch(Math.floor(Math.random()*num)){ - case 0:target.randomDiscard(2);break; - case 1:target.damage('fire');break; - case 2:player.changeHujia();break; - case 3:target.turnOver();target.draw();break; - case 4:target.goMad({player:'phaseBegin'});break; - } - } - } - }, - gwbaquan:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - 'step 0' - var hs=target.getCards('h'); - player.gain(hs,target); - target.$giveAuto(hs,player); - event.hs=hs; - 'step 1' - var damage=(target.hp>=player.hp&&get.damageEffect(target,player,player)>0); - var hs=event.hs; - if(damage&&target.hp>1){ - for(var i=0;i=8){ - damage=false;break; + 'step 3' + if(result.bool){ + event.num++; + if(event.num>=2){ + return; } } - } - player.chooseCard(hs.length,true,'选择还给'+get.translation(target)+'的牌').ai=function(card){ - if(damage){ - return hs.contains(card)?1:0; - } - else{ - return -get.value(card,player,'raw'); - } - } - if(!event.isMine()) game.delay(); - 'step 2' - target.gain(result.cards,player); - player.$giveAuto(result.cards,target); - event.hs2=result.cards; - if(player.hp>target.hp){ - event.finish(); - } - 'step 3' - for(var i=0;i0){ - target.draw(dh,false); - target.$draw(dh); - game.delay(0.5); - } - else if(dh<0){ - target.chooseToDiscard(-dh,true); - if(player!=target) player.useCard({name:'sha'},target,false); + gwzhanjiang2:{}, + gwzhanjiang3:{ + trigger:{player:'useCard'}, + filter:function(event){ + return event.card.name=='sha'&&event.getParent(2).name=='gwzhanjiang'; + }, + forced:true, + popup:false, + content:function(){ + player.draw(); } }, - ai:{ - order:11, - result:{ - target:function(player,target){ - var dh=Math.min(3,player.hp)-target.countCards('h'); - if(dh<0){ - dh+=get.sgn(get.effect(target,{name:'sha'},player,target)); + gwchuanxin_old:{ + trigger:{player:'shaAfter'}, + filter:function(event,player){ + if(player.storage.gwchuanxin&&player.storage.gwchuanxin.length>=4) return false; + return event.target.isAlive(); + }, + check:function(event,player){ + return get.effect(event.target,{name:'sha'},player,player)>0 + }, + logTarget:'target', + logLine:false, + content:function(){ + 'step 0' + event.card=get.cards()[0]; + player.showCards(event.card,get.translation(player)+'对'+get.translation(trigger.player)+'发动了【穿心】'); + 'step 1' + if(player.storage.gwchuanxin&&!player.storage.gwchuanxin.contains(get.suit(event.card))){ + player.useCard({name:'sha'},[event.card],trigger.target,false); + } + }, + group:['gwchuanxin_count1','gwchuanxin_count2'], + subSkill:{ + count1:{ + trigger:{global:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.gwchuanxin=[]; } - return dh; - } - } - } - }, - hunmo_old2:{ - trigger:{player:['phaseBegin','phaseEnd']}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('hunmo'),[1,game.countPlayer()],function(card,player,target){ - return target.countCards('h')!=Math.min(3,target.hp); - }).ai=function(target){ - return get.attitude(player,target)*(Math.min(3,target.hp)-target.countCards('h')); - } - 'step 1' - if(result.bool){ - player.logSkill('hunmo',result.targets); - event.targets=result.targets.slice(0); - event.targets.sortBySeat(); - } - else{ - event.finish(); - } - 'step 2' - if(event.targets.length){ - var target=event.targets.shift(); - var dh=Math.min(3,target.hp)-target.countCards('h'); - if(dh>0){ - target.draw(dh,false); - target.$draw(dh); - } - else if(dh<0){ - target.chooseToDiscard(-dh,true).delay=false; - } - game.delay(0.5); - event.redo(); - } - } - }, - huihun:{ - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - if(!player.storage.huihun) return false; - for(var i=0;i=2) break; - } - } - player.gain(list,'gain2','log'); - }, - ai:{ - threaten:1.8, - }, - group:['huihun_count','huihun_count2'], - subSkill:{ - count:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return _status.currentPhase==player; }, - content:function(){ - if(!player.storage.huihun){ - player.storage.huihun=[]; - } - for(var i=0;i0 + }, + logTarget:'target', + // logLine:false, + content:function(){ + 'step 0' + var cards=get.cards(); + player.showCards(cards,get.translation(player)+'发动了【穿心】'); + event.bool=(get.color(cards[0])=='black'); + 'step 1' + if(event.bool){ + player.useCard({name:'sha'},trigger.target,false).animate=false; + } + }, + mod:{ + attackFrom:function(from,to,distance){ + return distance-from.hp; + } + } + }, + fengjian:{ + trigger:{player:'useCard'}, + direct:true, + filter:function(event,player){ + var type=get.type(event.card,'trick'); + return type=='trick'&&game.hasPlayer(function(current){ + return player.canUse('sha',current,false)&&!event.targets.contains(current); + }); + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('fengjian'),function(card,player,target){ + return player.canUse('sha',target,false)&&!trigger.targets.contains(target); + }).ai=function(target){ + return get.effect(target,{name:'sha',nature:'thunder'},player,player); + } + "step 1" + if(result.bool){ + player.logSkill('fengjian'); + player.useCard({name:'sha',nature:'thunder'},result.targets,false); + player.addTempSkill('qianxing',{player:'phaseBegin'}); + } + }, + ai:{ + expose:0.2, + threaten:1.5, + noautowuxie:true, + }, + // group:'fengjian_hide', + // subSkill:{ + // hide:{ + // trigger:{source:'damageEnd'}, + // forced:true, + // popup:false, + // filter:function(event,player){ + // return event.getParent(3).name=='fengjian'; + // }, + // content:function(){ + // player.addTempSkill('qianxing',{player:'phaseBegin'}); + // } + // } + // } + }, + huandie:{ + trigger:{player:'phaseBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('huandie'),[0,game.countPlayer()],function(card,player,target){ + return target!=player; + }).ai=function(target){ + return get.attitude(player,target); + } + 'step 1' + if(result.bool){ + result.targets.sortBySeat(); + result.targets.unshift(player); + player.logSkill('huandie',result.targets); + game.asyncDrawAuto(result.targets,function(current){ + return current==player?1:2; + }); + player.addTempSkill('huandie_discard','phaseAfter'); + } + }, + ai:{ + threaten:1.5 + }, + subSkill:{ + discard:{ + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countCards('h')>current.hp; + }); + }, + logTarget:function(){ + return game.filterPlayer(function(current){ + return current.countCards('h')>current.hp; + }).sortBySeat(); + }, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current.countCards('h')>current.hp; + }).sortBySeat(); + event.list=list; + 'step 1' + if(event.list.length){ + event.list.shift().chooseToDiscard('h',true,2); + event.redo(); + } + } + } + } + }, + xuezhou:{ + trigger:{player:'phaseBegin'}, + direct:true, + unique:true, + forceunique:true, + intro:{ + content:function(storage,player){ + var name=get.translation(player); + if(storage==1){ + return '每当一名角色('+name+'除外)受到一次伤害,该角色失去一点体力,'+name+'回复一点体力'; + } + else if(storage==2){ + return '每当一名角色('+name+'除外)造成一次伤害,该角色失去一点体力,'+name+'(若不是受伤害角色)回复一点体力'; + } + else{ + return '未发动'; + } + } + }, + content:function(){ + 'step 0' + var next=player.chooseControl('选项一','选项二','cancel2',function(){ + if(Math.random()<0.65) return 0; + return 1; + }); + next.prompt=get.prompt('xuezhou'); + next.choiceList=[ + '每当一名其他角色受到一次伤害,该角色失去一点体力,你回复一点体力', + '每当一名其他角色造成一次伤害,该角色失去一点体力,你(若不是受伤害角色)回复一点体力' + ]; + 'step 1' + if(result.control=='cancel2'){ + player.unmarkSkill('xuezhou'); + delete _status.xuezhou; + } + else{ + player.logSkill('xuezhou'); + player.storage.xuezhou=result.index+1; + player.syncStorage('xuezhou'); + player.markSkill('xuezhou'); + _status.xuezhou=player; + } + }, + ai:{ + threaten:2.5 + }, + global:'xuezhou_hp' + }, + xuezhou_hp:{ + trigger:{source:'damageEnd',player:'damageEnd'}, + filter:function(event,player){ + if(!_status.xuezhou) return false; + if(player==_status.xuezhou) return false; + if(!player.isIn()||!_status.xuezhou.isIn()) return false; + switch(_status.xuezhou.storage.xuezhou){ + case 1:return player==event.player; + case 2:return player==event.source; + default:return false; + } + }, + forced:true, + popup:false, + silent:true, + content:function(){ + 'step 0' + game.delayx(); + 'step 1' + _status.xuezhou.logSkill('xuezhou',player); + player.loseHp(); + if(_status.xuezhou!=trigger.player){ + _status.xuezhou.recover(); + } + } + }, + fayin:{ + trigger:{player:'shaBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + var target=trigger.target; + var bool=get.attitude(player,target)<0; + var next=player.chooseToDiscard('he',get.prompt('fayin',target)); + next.ai=function(card){ + if(bool) return 7-get.value(card); + return 0; + }; + next.logSkill=['fayin',target]; + 'step 1' + if(result.bool){ + var target=trigger.target; + var num=5; + if(target.isMad()){ + num=4; + } + switch(Math.floor(Math.random()*num)){ + case 0:target.randomDiscard(2);break; + case 1:target.damage('fire');break; + case 2:player.changeHujia();break; + case 3:target.turnOver();target.draw();break; + case 4:target.goMad({player:'phaseBegin'});break; + } + } + } + }, + gwbaquan:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + 'step 0' + var hs=target.getCards('h'); + player.gain(hs,target); + target.$giveAuto(hs,player); + event.hs=hs; + 'step 1' + var damage=(target.hp>=player.hp&&get.damageEffect(target,player,player)>0); + var hs=event.hs; + if(damage&&target.hp>1){ + for(var i=0;i=8){ + damage=false;break; + } + } + } + player.chooseCard(hs.length,true,'选择还给'+get.translation(target)+'的牌').ai=function(card){ + if(damage){ + return hs.contains(card)?1:0; + } + else{ + return -get.value(card,player,'raw'); + } + } + if(!event.isMine()) game.delay(); + 'step 2' + target.gain(result.cards,player); + player.$giveAuto(result.cards,target); + event.hs2=result.cards; + if(player.hp>target.hp){ + event.finish(); + } + 'step 3' + for(var i=0;i0){ + target.draw(dh,false); + target.$draw(dh); + game.delay(0.5); + } + else if(dh<0){ + target.chooseToDiscard(-dh,true); + if(player!=target) player.useCard({name:'sha'},target,false); + } + }, + ai:{ + order:11, + result:{ + target:function(player,target){ + var dh=Math.min(3,player.hp)-target.countCards('h'); + if(dh<0){ + dh+=get.sgn(get.effect(target,{name:'sha'},player,target)); + } + return dh; + } + } + } + }, + hunmo_old2:{ + trigger:{player:['phaseBegin','phaseEnd']}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('hunmo'),[1,game.countPlayer()],function(card,player,target){ + return target.countCards('h')!=Math.min(3,target.hp); + }).ai=function(target){ + return get.attitude(player,target)*(Math.min(3,target.hp)-target.countCards('h')); + } + 'step 1' + if(result.bool){ + player.logSkill('hunmo',result.targets); + event.targets=result.targets.slice(0); + event.targets.sortBySeat(); + } + else{ + event.finish(); + } + 'step 2' + if(event.targets.length){ + var target=event.targets.shift(); + var dh=Math.min(3,target.hp)-target.countCards('h'); + if(dh>0){ + target.draw(dh,false); + target.$draw(dh); + } + else if(dh<0){ + target.chooseToDiscard(-dh,true).delay=false; + } + game.delay(0.5); + event.redo(); + } + } + }, + huihun:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + if(!player.storage.huihun) return false; + for(var i=0;i=2) break; + } } + player.gain(list,'gain2','log'); }, - prompt:function(links,player){ - return '选择'+get.translation(links)+'的目标'; + ai:{ + threaten:1.8, + }, + group:['huihun_count','huihun_count2'], + subSkill:{ + count:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return _status.currentPhase==player; + }, + content:function(){ + if(!player.storage.huihun){ + player.storage.huihun=[]; + } + for(var i=0;itrigger.num){ - player.gainMaxHp(); - player.recover(); - } - else{ - player.draw(2); - } - } - }, - lianzhan2:{}, - kuixin:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - if(current==player) return false; - var nh=current.countCards('h'); - return nh&&nh>=player.countCards('h'); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('kuixin'),function(card,player,target){ - if(target==player) return false; - var nh=target.countCards('h'); - return nh&&nh>=player.countCards('h'); - }).ai=function(target){ - var att=get.attitude(player,target); - if(target.hasSkillTag('noe')){ - att/=3; - } - return -att; - } - 'step 1' - if(result.bool){ - var target=result.targets[0]; - var card=target.getCards('h').randomGet(); - if(card){ - player.logSkill('kuixin',target); - player.gain(card,target); - target.$giveAuto(card,player); - } - } - } - }, - fuhua:{ - enable:'phaseUse', - filterCard:{name:'du'}, - check:function(){return 1}, - filterTarget:function(card,player,target){ - return !target.hasSkill('moxie')&&!target.storage.fuhua_failed; - }, - filter:function(event,player){ - return player.countCards('h','du'); - }, - discard:false, - prepare:'give', - content:function(){ - 'step 0' - target.gain(cards,player); - var choice=1; - if(get.attitude(target,player)>0||(target.hp<=1&&!target.hasSha())){ - choice=0; - } - target.chooseControl(function(){ - return choice; - }).set('choiceList',['获得技能魔血,每个出牌阶段开始时需交给'+get.translation(player)+'一张牌', - '视为'+get.translation(player)+'对你使用一张决斗,若你赢,本局不能再成为腐化目标']); - 'step 1' - if(result.index==0){ - target.storage.fuhua2=player; - target.addSkill('fuhua2'); - target.addSkill('moxie'); - } - else{ - player.useCard({name:'juedou'},target); - } - }, - ai:{ - threaten:2, - order:8, - expos:0.2, - result:{ - player:function(player,target){ - if(get.attitude(target,player)>0) return 1; - if(get.effect(target,{name:'juedou'},player,player)>0) return 1.5; - return 0; - } - } - }, - group:'fuhua3' - }, - fuhua2:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.fuhua2.isIn()&&player.countCards('he')>0; - }, - mark:'character', - intro:{ - content:function(storage){ - return '每个出牌阶段开始时需交给'+get.translation(storage)+'一张牌'; - } - }, - content:function(){ - 'step 0' - player.chooseCard('he',true,'交给'+get.translation(player.storage.fuhua2)+'一张牌'); - 'step 1' - if(result.bool){ - player.storage.fuhua2.gain(result.cards,player); - player.$give(result.cards,player.storage.fuhua2); - player.line(player.storage.fuhua2,'green'); - } - }, - group:'fuhua2_remove', - onremove:true, - subSkill:{ - remove:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.player==player.storage.fuhua2; - }, - content:function(){ - player.removeSkill('fuhua2'); - } - } - } - }, - fuhua3:{ - trigger:{player:'damageBefore'}, - forced:true, - popup:false, - filter:function(event,player){ - var evt=event.getParent(3); - return evt.name=='fuhua'&&evt.target==event.source; - }, - content:function(){ - trigger.getParent(3).target.storage.fuhua_failed=true; - } - }, - moxie:{ - trigger:{player:'duBegin'}, - forced:true, - content:function(){ - player.draw(2); - }, - ai:{ - threaten:1.2, - nodu:true, - usedu:true, - }, - group:'moxie2' - }, - moxie2:{ - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - var hs=player.getCards('h'); - for(var i=0;iplayer.hp; - }); - }, - logTarget:function(event,player){ - return game.filterPlayer(function(current){ - return current.hp>player.hp; - }); - }, - content:function(){ - 'step 0' - event.targets=game.filterPlayer(function(current){ - return current.hp>player.hp; - }); - event.targets.sortBySeat(); - 'step 1' - if(event.targets.length){ - event.target=event.targets.shift(); - if(event.target.countCards('he',{color:'black'})){ - event.target.chooseCard('he','交给'+get.translation(player)+'一张黑色牌,或失去一点体力',{color:'black'}).ai=function(card){ - if(get.attitude(event.target,player)>0) return 10-get.value(card); - return 7-get.value(card); - } - } - else{ - event.target.loseHp(); - event.redo(); - } - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - player.gain(result.cards,event.target); - if(get.position(result.cards[0])=='e'){ - event.target.$give(result.cards,player); - } - else{ - event.target.$give(result.cards.length,player); - } - } - else{ - event.target.loseHp(); - } - event.goto(1); - } - }, - gfuhun:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0&&!player.isTurnedOver(); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('gfuhun'),function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }).ai=function(target){ - return -get.attitude(player,target); - } - 'step 1' - if(result.bool){ - player.logSkill('gfuhun',result.targets); - event.target=result.targets[0]; - player.chooseToCompare(event.target); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - event.target.goMad({player:'phaseAfter'}); - if(!player.isTurnedOver()) player.turnOver(); - } - }, - ai:{ - expose:0.2, - threaten:1.5 - } - }, - qianhou:{ - trigger:{player:'phaseBegin'}, - forced:true, - content:function(){ - var list=[]; - for(var i=0;i0&&info.selectTarget[1]>=info.selectTarget[0]){ - list.push(lib.inpile[i]); - } - } - else if(typeof info.selectTarget=='number'){ - list.push(lib.inpile[i]); - } - } - } - } - while(list.length){ - var card={name:list.randomRemove()}; - var info=get.info(card); - var targets=game.filterPlayer(function(current){ - return lib.filter.filterTarget(card,player,current); - }); - if(targets.length){ - targets.sort(lib.sort.seat); - if(info.selectTarget==-1){ - player.useCard(card,targets,'noai'); - } - else{ - var num=info.selectTarget; - if(Array.isArray(num)){ - if(targets.length0; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('zhongji',trigger.player),{color:'black'}); - next.logSkill=['zhongji',trigger.player]; - next.ai=function(card){ - if(get.attitude(player,trigger.player)<0){ - return 7-get.value(card); - } - return -1; - } - "step 1" - if(result.bool){ - trigger.num++; - } - }, - ai:{ - threaten:1.3 - } - }, - fuwen:{ - trigger:{player:'phaseDiscardEnd'}, - frequent:true, - filter:function(event,player){ - if(event.cards){ - for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('jinzhou'),function(card,player,target){ - return target!=player&&!target.hasSkill('fengyin'); - }).ai=function(target){ - var att=get.attitude(player,target); - if(att>=0) return 0; - var skills=target.getSkills(); - for(var i=0;i0; - }, - filterCard:{type:['trick','delay']}, - check:function(card){ - return 10-get.value(card); - }, - content:function(){ - var list=get.inpile('trick','trick'); - var list2=[]; - for(var i=0;i<3;i++){ - list2.push(game.createCard(list.randomGet())); - } - player.gain(list2,'draw'); - }, - ai:{ - order:9.8, - threaten:1.8, - result:{ - player:1 - } - } - }, - xingluo:{ - trigger:{player:'phaseBegin'}, - direct:true, - filter:function(event,player){ - return !player.isMostHandcard(); - }, - content:function(){ - 'step 0' - var nh=player.countCards('h'); - var num=game.countPlayer(function(current){ - return current.countCards('h')>nh; - }); - player.chooseTarget(get.prompt('xingluo'),[1,num],function(card,player,target){ - return target.countCards('h')>nh; - }).ai=function(target){ - return 0.5-get.attitude(player,target); - } - 'step 1' - if(result.bool){ - event.cards=[]; - event.list=result.targets.slice(0); - event.list.sort(lib.sort.seat); - player.logSkill('xingluo',result.targets); - } - else{ - event.finish(); - } - 'step 2' - if(event.list.length){ - event.list.shift().chooseToDiscard('h',true); - } - else{ - event.goto(4); - } - 'step 3' - if(result.bool&&result.cards.length){ - event.cards.push(result.cards[0]); - } - event.goto(2); - 'step 4' - if(event.cards.length){ - player.chooseCardButton('选择一张加入手牌',event.cards).ai=function(button){ - return get.value(button.link); - }; - } - else{ - event.finish(); - } - 'step 5' - if(result.bool){ - player.gain(result.links,'gain2'); - } - }, - ai:{ - expose:0.2 - } - }, - yuelu:{ - enable:'chooseToUse', - filter:function(event,player){ - return event.type=='dying'&&player.countCards('he',{color:'black'}); - }, - alter:true, - filterCard:{color:'black'}, - position:'he', - check:function(card){ - return 11-get.value(card); - }, - filterTarget:function(card,player,target){ - return target==_status.event.dying; - }, - selectTarget:-1, - content:function(){ - target.recover(); - if(!get.is.altered('yuelu')) target.changeHujia(); - }, - ai:{ - order:10, - skillTagFilter:function(player){ - if(player.countCards('he',{color:'black'})==0) return false; - }, - save:true, - result:{ - target:3 - }, - threaten:2.5 - }, - }, - yushou:{ - enable:'phaseUse', - filterCard:true, - position:'he', - check:function(card){ - return 5-get.value(card); - }, - filter:function(event,player){ - if(player.hasSkill('yushou_misha')&&player.hasSkill('yushou_huofu')&&player.hasSkill('yushou_leiouke')) return false; - return true; - }, - content:function(){ - if(!lib.character.stone_misha){ - lib.character.stone_misha=['male','shu',3,['chaofeng'],['minskin','stone','mode:stone'],[3,3,'hunter']]; - } - if(!lib.character.stone_huofu){ - lib.character.stone_huofu=['male','qun',2,['stone_chongfeng'],['minskin','stone','mode:stone'],[3,4,'hunter']]; - } - if(!lib.character.stone_leiouke){ - lib.character.stone_leiouke=['male','shu',2,['hunter_zhanhuo'],['minskin','stone','mode:stone'],[3,1,'hunter']]; - } - var list=['misha','leiouke','huofu']; - for(var i=0;i=1; - }, - usable:1, - content:function(){ - if(trigger.num>=1){ - trigger.num--; - // player.removeSkill('yushou_misha'); - // player.draw(); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return; - return 0.5; - } - } - } - }, - }, - yushou_huofu:{ - enable:'phaseUse', - viewAs:{name:'juedou'}, - filterCard:{color:'black'}, - position:'he', - viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; - }, - check:function(card){ - return 6-get.value(card); - }, - ai:{ - basic:{ - order:10 - } - } - }, - yushou_leiouke:{ - trigger:{source:'damageBegin'}, - forced:true, - usable:1, - content:function(){ - trigger.num++; - } - }, - qingzun:{ - alter:true, - subSkill:{ - count:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return event.card.name.indexOf('hsqingyu_')==0; - }, - content:function(){ - player.storage.qingzun++; - player.updateMarks(); - } - }, - draw1:{ - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - if(get.is.altered('qingzun')) return player.storage.qingzun>=3; - return player.storage.qingzun>=2; - }, - frequent:true, - content:function(){ - player.draw(); - } - }, - draw2:{ - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - if(get.is.altered('qingzun')) return player.storage.qingzun>=9; - return player.storage.qingzun>=6; - }, - frequent:true, - content:function(){ - player.draw(); - } - }, - }, - mod:{ - maxHandcard:function(player,num){ - return num+player.storage.qingzun; - } - }, - init:function(player){ - player.storage.qingzun=0; - }, - mark:true, - marktext:'玉', - intro:{ - content:function(storage,player){ - if(!storage) return '未使用过青玉牌'; - var str='手牌上限+'+storage; - var num1,num2; - if(get.is.altered('qingzun')){ - num1=3; - num2=9; - } - else{ - num1=2; - num2=6; - } - if(storage>=num2){ - str+=';准备阶段和结束阶段,你可以摸一张牌' - } - else if(storage>=num1){ - str+=';准备阶段,你可以摸一张牌' - } - return str; - } - }, - group:['qingzun_count','qingzun_draw1','qingzun_draw2'], - }, - ayuling:{ - trigger:{player:'damageEnd'}, - frequent:true, - content:function(){ - var list=['feibiao','hufu','zhao','zhanfang','shandian']; - player.gain(game.createCard('hsqingyu_'+list.randomGet()),'draw'); - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(!target.hasFriend()) return; - if(target.hp>=4) return [1,get.tag(card,'damage')*2]; - if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; - } - } - } - } - }, - aoshu:{ - enable:'phaseUse', - usable:1, - position:'he', - filterCard:function(card){ - return get.suit(card)=='spade'; - }, - viewAs:{name:'wuzhong'}, - viewAsFilter:function(player){ - if(!player.countCards('he',{suit:'spade'})) return false; - }, - prompt:'将一张黑桃手牌当作无中生有使用', - check:function(card){return 7-get.value(card)}, - ai:{ - threaten:1.4, - order:9, - } - }, - bzhuiji:{ - trigger:{global:'dieAfter'}, - check:function(event,player){ - return get.attitude(player,event.source)<=0; - }, - filter:function(event,player){ - return event.source&&event.source.isAlive()&&event.source!=player; - }, - content:function(){ - player.draw(2); - player.useCard({name:'juedou'},trigger.source); - }, - ai:{ - threaten:1.5, - expose:0.1 - } - }, - lianjin_old:{ - enable:'phaseUse', - usable:2, - filterCard:true, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - 'step 0' - var list=get.inpile('trick'); - list=list.randomGets(3); - for(var i=0;i=2) continue; - if(names.length>=3) continue; - var select=get.select(info.selectTarget); - if(select[0]==-1&&select[1]==-1){ - names.push(inpile[i]); - if(info.modTarget) single=true; - } - else if(select[0]==1&&select[1]==1){ - names.push(inpile[i]); - single=true; - } - } - if(equip){ - names.push(equips.randomGet()); - } - names.sort(lib.sort.name); - var name='hsyaoshui_'+names[0]+'_'+names[1]+'_'+names[2]; - if(!lib.card[name]){ - lib.card[name]=get.copy(lib.skill.lianjin.template); - lib.card[name].names=names; - lib.card[name].selectTarget=single?1:-1; - lib.translate[name]='药水'; - lib.translate[name+'_info']=get.translation(names[0])+'、'+ - get.translation(names[1])+'、'+get.translation(names[2]); - } - cards[0].style.transitionDuration='0.2s'; - ui.refresh(cards[0]); - cards[0].classList.add('opaque'); - event.cardname=name; - if(player!=game.me){ - var fakecard=game.createCard(name); - fakecard.node.info.remove(); - player.$draw(fakecard); - } - game.delay(0,200); - 'step 1' - cards[0].style.transitionDuration='0s'; - ui.refresh(cards[0]); - cards[0].classList.remove('fullskin'); - cards[0].init([cards[0].suit,cards[0].number,event.cardname]); - game.delay(0,100); - 'step 2' - cards[0].style.transitionDuration=''; - ui.refresh(cards[0]); - cards[0].classList.remove('opaque'); - game.delay(0,200); - }, - template:{ - type:'hsyaoshui', - enable:true, - fullimage:true, - image:'card/hsyaoshui', - vanish:true, - derivation:'hs_kazhakusi', - multitarget:true, - multiline:true, - filterTarget:function(card,player,target){ - var info=get.info(card); - var names=info.names; - for(var i=0;i=3) return -1; - var num=0; - for(var i=0;i0){ - num++; - } - else if(eff<0){ - num-=0.9; - } - } - return num; - } - } - } - }, - ai:{ - order:9, - result:{ - player:1 - }, - threaten:1.4 - }, - }, - shouji:{ - group:['shouji_begin','shouji_miss'], - subSkill:{ - begin:{ - trigger:{player:'shaBegin'}, - frequent:true, - usable:1, - filter:function(event){ - return event.target.countCards('h')>0; - }, - content:function(){ - player.gain(game.createCard(trigger.target.getCards('h').randomGet()),'draw'); - } - }, - miss:{ - trigger:{player:'shaMiss'}, - frequent:true, - usable:1, - filter:function(event){ - return event.target.hasCard(function(card){ - return !get.info(card).unique; - },'e'); - }, - content:function(){ - player.gain(game.createCard(trigger.target.getCards('e',function(card){ - return !get.info(card).unique; - }).randomGet()),'draw'); - } - } - } - }, - yingxi:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return !player.getStat('damage')&&player.countCards('he',{color:'black'})>0; - }, - content:function(){ - 'step 0' - player.chooseCardTarget({ - prompt:get.prompt('yingxi'), - filterCard:{color:'black'}, - filterTarget:function(card,player,target){ - return lib.filter.targetEnabled({name:'sha'},player,target); - }, - position:'he', - ai1:function(card){ - return 8-get.value(card); - }, - ai2:function(target){ - return get.effect(target,{name:'sha'},player,player); - } - }); - 'step 1' - if(result.bool){ - player.useCard({name:'sha'},result.cards,result.targets,'yingxi'); - } - }, - group:'yingxi2', - }, - yingxi2:{ - trigger:{player:'shaBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='yingxi'&&event.target.isHealthy(); - }, - content:function(){ - trigger.directHit=true; - } - }, - guimou:{ - trigger:{player:'damageEnd'}, - check:function(event,player){ - return get.attitude(player,event.source)<=0; - }, - filter:function(event,player){ - return event.source&&event.source.isAlive()&&event.source!=player&&event.source.countCards('h')>0; - }, - content:function(){ - var card=trigger.source.getCards('h').randomGet(); - if(card){ - player.gain(card,trigger.source); - if(get.color(card)=='black'){ - trigger.source.$give(card,player); - event.redo(); - } - else{ - trigger.source.$giveAuto(card,player); - } - game.delay(0.5); - } - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(!target.hasFriend()) return false; - if(get.tag(card,'damage')&&player.countCards('h')>1) return [1,0,0,-1]; - } - } - } - }, - peiyu:{ - trigger:{player:['phaseBegin']}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('peiyu'),function(card,player,target){ - for(var i=1;i<=8;i++){ - if(target.hasSkill('tuteng'+i)) return false; - } - return true; - }).ai=function(target){ - if(player==target&&get.attitude(player,target)>0&&event.parent.triggername=='phaseBegin'){ - return get.attitude(player,target)+10; - } - return get.attitude(player,target); - } - 'step 1' - if(result.bool){ - player.logSkill('peiyu',result.targets); - var rand=['tuteng1','tuteng2','tuteng3','tuteng4', - 'tuteng5','tuteng6','tuteng7','tuteng8']; - result.targets[0].addAdditionalSkill('peiyu',['peiyu2',rand.randomGet()]); - } - } - }, - peiyu2:{ - trigger:{player:'damageAfter'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.removeAdditionalSkill('peiyu'); - } - }, - peiyu_old:{ - enable:'phaseUse', - filterCard:true, - position:'he', - filterTarget:true, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - 'step 0' - var rand=['tuteng1','tuteng2','tuteng3','tuteng4', - 'tuteng5','tuteng6','tuteng7','tuteng8']; - var rand2=[]; - for(var i=0;i1){ - rand.remove('tuteng1'); - } - gain=rand.randomGet(); - target.removeSkill(rand2.randomGet()) - } - } - target.addSkill(gain); - target.storage.peiyu[gain]=player; - game.delay(); - event.finish(); - } - } - else{ - var gain=rand.randomGet(); - target.addSkill(gain); - target.storage.peiyu[gain]=player; - game.delay(); - event.finish(); - } - 'step 1' - var skill1=result.buttons[0].name; - var skill2=result.buttons[1].name; - if(target.hasSkill(skill1)){ - target.removeSkill(skill1); - target.addSkill(skill2); - target.storage.peiyu[skill2]=player; - } - else{ - target.removeSkill(skill2); - target.addSkill(skill1); - target.storage.peiyu[skill1]=player; - } - }, - ai:{ - expose:0.2, - order:5, - result:{ - target:function(player,target){ - for(var i=1;i<=8;i++){ - if(target.hasSkill('tuteng'+i)) return 0; - } - return 1; - } - } - }, - group:'peiyu_old2' - }, - peiyu_old2:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - content:function(){ - game.countPlayer(function(current){ - for(var j in current.storage.peiyu){ - if(current.storage.peiyu[j]==player){ - current.removeSkill(j); - } - } - }); - } - }, - wzhanyi:{ - trigger:{player:'phaseUseBefore'}, - check:function(event,player){ - return player.countCards('h')+2<=player.hp; - }, - content:function(){ - 'step 0' - event.cards=get.cards(3); - trigger.untrigger(); - trigger.finish(); - player.$draw(event.cards.slice(0)); - for(var i=0;i=3; - }, - filterTarget:function(card,player,target){ - return player.canUse('yuansuhuimie',target); - }, - selectTarget:-1, - multitarget:true, - multiline:true, - line:'thunder', - content:function(){ - player.maxHp=player.hp; - player.update(); - targets.sort(lib.sort.seat); - player.useCard({name:'yuansuhuimie'},targets).animate=false; - } - }, - chouhuo:{ - unique:true, - trigger:{player:'phaseBegin'}, - forced:true, - skillAnimation:true, - animationColor:'fire', - filter:function(event,player){ - if(player.storage.nuyan&&player.storage.nuyan.length){ - var num=0; - for(var i=0;i0){ - if(players[i].hp<2){ - lose--; - recover+=0.5; - } - lose--; - recover++; - } - else if(get.attitude(player,players[i])<0){ - if(players[i].hp<2){ - lose++; - recover-=0.5; - } - lose++; - recover--; - } - } - else{ - if(get.attitude(player,players[i])>0){ - lose--; - } - else if(get.attitude(player,players[i])<0){ - lose++; - } - } - } - if(button.link[2]=='nanman'||button.link[2]=='nanman'||button.link[2]=='yuansuhuimie'|| - button.link[2]=='chiyuxi'||button.link[2]=='jingleishan'){ - if(lose>recover&&lose>0){ - return 2; - } - else{ - return 0; - } - } - return 1; - }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - selectCard:-1, - popname:true, - viewAs:{name:links[0][2]}, - onuse:function(result,player){ - player.loseHp(); - } - } - }, - prompt:function(links,player){ - return '失去一点体力,视为使用一张'+get.translation(links[0][2]); - } - }, - ai:{ - order:6, - result:{ - player:function(player){ - if(player.hp>1) return 1; - return 0; - } - }, - } - }, - nuyan:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0 - }, - init:function(player){ - player.storage.nuyan=[]; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[]; - for(var i=0;i0){ - if(players[i].hp<2){ - lose--; - recover+=0.5; - } - lose--; - recover++; - } - else if(get.attitude(player,players[i])<0){ - if(players[i].hp<2){ - lose++; - recover-=0.5; - } - lose++; - recover--; - } - } - else{ - if(get.attitude(player,players[i])>0){ - lose--; - } - else if(get.attitude(player,players[i])<0){ - lose++; - } - } - } - if(button.link[2]=='nanman'||button.link[2]=='nanman'||button.link[2]=='yuansuhuimie'|| - button.link[2]=='chiyuxi'||button.link[2]=='jingleishan'){ - if(lose>recover&&lose>0){ - return 2; - } - else{ - return 0; - } - } - return 1; - }, - backup:function(links,player){ - return { - filterCard:{color:'red'}, - selectCard:1, - position:'he', - popname:true, - viewAs:{name:links[0][2]}, - ai1:function(card){ - return 6-get.value(card); - }, - onuse:function(result,player){ - player.storage.nuyan.add(result.card.name); - } - } - }, - prompt:function(links,player){ - return '将一张红色牌当作'+get.translation(links[0][2])+'使用'; - } - }, - ai:{ - order:6, - result:{ - player:1 - }, - } - }, - duxin:{ - trigger:{player:['phaseBegin','phaseEnd']}, - frequent:true, - filter:function(event,player){ - return !player.countCards('h',{type:'hsdusu'}); - }, - content:function(){ - var list=['hsdusu_xueji','hsdusu_huangxuecao','hsdusu_kuyecao','hsdusu_shinancao','hsdusu_huoyanhua']; - if(typeof lib.cardType.hslingjian!='number'){ - list.remove('hsdusu_kuyecao'); - } - var name=list.randomGet(); - if(name=='hsdusu_huoyanhua'){ - player.gain(game.createCard({name:name,nature:'fire'}),'draw'); - } - else{ - player.gain(game.createCard(name),'draw'); - } - }, - ai:{ - threaten:1.6 - } - }, - hsdusu_shinancao:{ - mark:true, - marktext:'楠', - nopop:true, - intro:{ - content:'下一次造成的伤害+1' - }, - logv:false, - trigger:{source:'damageBegin'}, - forced:true, - content:function(){ - trigger.num++; - player.removeSkill('hsdusu_shinancao'); - } - }, - kuangluan_old:{ - group:['kuangluan_count1','kuangluan_count2','kuangluan_use'], - subSkill:{ - count1:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return _status.currentPhase==player&&get.type(event.card)=='trick'; - }, - content:function(){ - player.storage.kuangluan++; - } - }, - count2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.kuangluan=0; - } - }, - use:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - filter:function(event,player){ - return player.storage.kuangluan>0; - }, - content:function(){ - var list=[]; - for(var i=0;i0&&info.selectTarget[1]>=info.selectTarget[0]){ - list.push(lib.inpile[i]); - } - } - else if(typeof info.selectTarget=='number'){ - list.push(lib.inpile[i]); - } - } - } - } - var n=player.storage.kuangluan; - delete player.storage.kuangluan; - while(list.length){ - var card={name:list.randomRemove()}; - var info=get.info(card); - var targets=game.filterPlayer(function(current){ - return lib.filter.filterTarget(card,player,current); - }); - if(targets.length){ - targets.sort(lib.sort.seat); - if(info.selectTarget==-1){ - player.useCard(card,targets); - } - else{ - var num=info.selectTarget; - if(Array.isArray(num)){ - if(targets.length=2; - }, - content:function(){ - player.recover(player.maxHp); - player.goMad('phaseAfter'); - } - }, - kuangluan3:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.kuangluan=[]; - player.unmarkSkill('kuangluan'); - } - }, - xiubu:{ - trigger:{player:'equipEnd'}, - frequent:true, - filter:function(event){ - return lib.inpile.contains(event.card.name)&&get.subtype(event.card)=='equip1'&&typeof lib.cardType.hslingjian=='number'; - }, - content:function(){ - var num=1; - var info=get.info(trigger.card); - if(info&&info.distance&&typeof info.distance.attackFrom=='number'){ - num=1-info.distance.attackFrom; - } - if(num<1){ - num=1; - } - var list=get.typeCard('hslingjian'); - var cards=[]; - while(num--){ - cards.push(game.createCard(list.randomGet())); - } - player.gain(cards,'gain2'); - }, - threaten:1.3 - }, - zengli:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&!target.isMin(); - }, - delay:false, - content:function(){ - 'step 0' - var list=[]; - for(var i=0;i1){ - return 6-get.value(card); - } - return 0; - }).set('logSkill',['xianji',event.target]); - } - else{ - event.finish(); - } - 'step 1' - if(result.bool){ - event.target.draw(result.cards.length); - player.storage.xianji3=event.target; - player.addSkill('xianji3'); - player.addExpose(0.2); - } - } - }, - xianji3:{ - mark:'character', - intro:{ - content:'每当$对你使用一张牌,你摸一张牌' - }, - trigger:{target:'useCardToBegin'}, - filter:function(event,player){ - return event.player==player.storage.xianji3; - }, - forced:true, - content:function(){ - player.draw(); - }, - }, - tanmi:{ - trigger:{global:'phaseEnd'}, - filter:function(event,player){ - return player.countCards('h')==0&&event.player!=player; - }, - frequent:true, - content:function(){ - 'step 0' - player.draw(2); - 'step 1' - player.chooseToUse(); - 'step 2' - if(result.bool){ - player.chooseToUse(); - } - }, - ai:{ - noh:true, - skillTagFilter:function(player,tag){ - if(tag=='noh'){ - if(player.countCards('h')!=1) return false; - } - } - } - }, - xueren:{ - trigger:{source:'damageEnd'}, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.player.isAlive(); - }, - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return false; - if(player.hp>2) return true; - if(player.hp<2) return false; - return player.hp>=event.player.hp; - }, - content:function(){ - 'step 0' - trigger.player.loseHp(); - 'step 1' - player.loseHp(); - 'step 2' - player.draw(2); - } - }, - maoxian:{ - enable:'phaseUse', - usable:2, - direct:true, - delay:false, - unique:true, - content:function(){ - 'step 0' - var list=get.gainableSkills(); - list.remove('maoxian'); - list=list.randomGets(3); - event.skillai=function(){ - return list.randomGet(); - }; - if(event.isMine()){ - var dialog=ui.create.dialog(); - dialog.add('选择获得一项技能'); - var clickItem=function(){ - _status.event._result=this.link; - dialog.close(); - game.resume(); - }; - for(var i=0;i
【'+ - translation+'】
'+lib.translate[list[i]+'_info']+'
'); - item.firstChild.addEventListener('click',clickItem); - item.firstChild.link=list[i]; - } - } - dialog.add(ui.create.div('.placeholder')); - event.switchToAuto=function(){ - event._result=event.skillai(); - dialog.close(); - game.resume(); - }; - _status.imchoosing=true; - game.pause(); - } - else{ - event._result=event.skillai(); - } - 'step 1' - _status.imchoosing=false; - var link=result; - player.addAdditionalSkill('maoxian',link); - player.popup(link); - game.log(player,'获得了技能','【'+get.translation(link)+'】'); - player.checkMarks(); - player.markSkill('maoxian'); - game.delay(); - }, - intro:{ - content:function(storage,player){ - return '当前技能:'+get.translation(player.additionalSkills.maoxian); - } - }, - ai:{ - order:11, - result:{ - player:function(player){ - if(player.getStat().skill.maoxian) return 0; - return 1; - } - } - } - }, - maoxian_old:{ - enable:'phaseUse', - usable:2, - direct:true, - delay:false, - unique:true, - getSkills:function(player,current){ - var names=[]; - var list=[]; - var map={}; - for(var i=0;i=3; - }, - content:function(){ - 'step 0' - event.cards=get.cards(3); - if(!event.isMine()) player.showCards(event.cards); - 'step 1' - player.chooseCardButton('获得任意张类别不同的牌',[1,3],event.cards).filterButton=function(button){ - var type=get.type(button.link,'trick'); - for(var i=0;iget.value(cards[i]); - } - }); - if(!list.length){ - list=game.findCards(function(name){ - if(cards[i].name==name) return; - if(get.type({name:name},'trick')==type){ - return get.value({name:name})==get.value(cards[i]); - } - }); - } - if(!list.length){ - list=[cards[i].name]; - } - cards2.push(game.createCard(list.randomGet())); - } - player.gain(cards2,'log'); - player.$draw(cards2); - }, - ai:{ - order:8, - result:{ - player:1 - } - } - }, - zhuizong:{ - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - selectCard:[1,Infinity], - check:function(card){ - if(ui.selected.cards.length) return 0; - return 6-get.value(card) - }, - content:function(){ - 'step 0' - event.cards=get.cards(4*cards.length); - player.chooseCardButton('获得其中的一张牌',true,event.cards,true); - 'step 1' - player.gain(result.links,'draw'); - event.cards.remove(result.links[0]); - for(var i=0;itrigger.num){ + player.gainMaxHp(); + player.recover(); + } + else{ + player.draw(2); + } + } + }, + lianzhan2:{}, + kuixin:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + if(current==player) return false; + var nh=current.countCards('h'); + return nh&&nh>=player.countCards('h'); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('kuixin'),function(card,player,target){ + if(target==player) return false; + var nh=target.countCards('h'); + return nh&&nh>=player.countCards('h'); + }).ai=function(target){ + var att=get.attitude(player,target); + if(target.hasSkillTag('noe')){ + att/=3; + } + return -att; + } + 'step 1' + if(result.bool){ + var target=result.targets[0]; + var card=target.getCards('h').randomGet(); + if(card){ + player.logSkill('kuixin',target); + player.gain(card,target); + target.$giveAuto(card,player); + } + } + } + }, + fuhua:{ + enable:'phaseUse', + filterCard:{name:'du'}, + check:function(){return 1}, + filterTarget:function(card,player,target){ + return !target.hasSkill('moxie')&&!target.storage.fuhua_failed; + }, + filter:function(event,player){ + return player.countCards('h','du'); + }, + discard:false, + prepare:'give', + content:function(){ + 'step 0' + target.gain(cards,player); + var choice=1; + if(get.attitude(target,player)>0||(target.hp<=1&&!target.hasSha())){ + choice=0; + } + target.chooseControl(function(){ + return choice; + }).set('choiceList',['获得技能魔血,每个出牌阶段开始时需交给'+get.translation(player)+'一张牌', + '视为'+get.translation(player)+'对你使用一张决斗,若你赢,本局不能再成为腐化目标']); + 'step 1' + if(result.index==0){ + target.storage.fuhua2=player; + target.addSkill('fuhua2'); + target.addSkill('moxie'); + } + else{ + player.useCard({name:'juedou'},target); + } + }, + ai:{ + threaten:2, + order:8, + expos:0.2, + result:{ + player:function(player,target){ + if(get.attitude(target,player)>0) return 1; + if(get.effect(target,{name:'juedou'},player,player)>0) return 1.5; + return 0; + } + } + }, + group:'fuhua3' + }, + fuhua2:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.fuhua2.isIn()&&player.countCards('he')>0; + }, + mark:'character', + intro:{ + content:function(storage){ + return '每个出牌阶段开始时需交给'+get.translation(storage)+'一张牌'; + } + }, + content:function(){ + 'step 0' + player.chooseCard('he',true,'交给'+get.translation(player.storage.fuhua2)+'一张牌'); + 'step 1' + if(result.bool){ + player.storage.fuhua2.gain(result.cards,player); + player.$give(result.cards,player.storage.fuhua2); + player.line(player.storage.fuhua2,'green'); + } + }, + group:'fuhua2_remove', + onremove:true, + subSkill:{ + remove:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.player==player.storage.fuhua2; + }, + content:function(){ + player.removeSkill('fuhua2'); + } + } + } + }, + fuhua3:{ + trigger:{player:'damageBefore'}, + forced:true, + popup:false, + filter:function(event,player){ + var evt=event.getParent(3); + return evt.name=='fuhua'&&evt.target==event.source; + }, + content:function(){ + trigger.getParent(3).target.storage.fuhua_failed=true; + } + }, + moxie:{ + trigger:{player:'duBegin'}, + forced:true, + content:function(){ + player.draw(2); + }, + ai:{ + threaten:1.2, + nodu:true, + usedu:true, + }, + group:'moxie2' + }, + moxie2:{ + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + var hs=player.getCards('h'); + for(var i=0;iplayer.hp; + }); + }, + logTarget:function(event,player){ + return game.filterPlayer(function(current){ + return current.hp>player.hp; + }); + }, + content:function(){ + 'step 0' + event.targets=game.filterPlayer(function(current){ + return current.hp>player.hp; + }); + event.targets.sortBySeat(); + 'step 1' + if(event.targets.length){ + event.target=event.targets.shift(); + if(event.target.countCards('he',{color:'black'})){ + event.target.chooseCard('he','交给'+get.translation(player)+'一张黑色牌,或失去一点体力',{color:'black'}).ai=function(card){ + if(get.attitude(event.target,player)>0) return 10-get.value(card); + return 7-get.value(card); + } + } + else{ + event.target.loseHp(); + event.redo(); + } + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.gain(result.cards,event.target); + if(get.position(result.cards[0])=='e'){ + event.target.$give(result.cards,player); + } + else{ + event.target.$give(result.cards.length,player); + } + } + else{ + event.target.loseHp(); + } + event.goto(1); + } + }, + gfuhun:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0&&!player.isTurnedOver(); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('gfuhun'),function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }).ai=function(target){ + return -get.attitude(player,target); + } + 'step 1' + if(result.bool){ + player.logSkill('gfuhun',result.targets); + event.target=result.targets[0]; + player.chooseToCompare(event.target); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + event.target.goMad({player:'phaseAfter'}); + if(!player.isTurnedOver()) player.turnOver(); + } + }, + ai:{ + expose:0.2, + threaten:1.5 + } + }, + qianhou:{ + trigger:{player:'phaseBegin'}, + forced:true, + content:function(){ + var list=[]; + for(var i=0;i0&&info.selectTarget[1]>=info.selectTarget[0]){ + list.push(lib.inpile[i]); + } + } + else if(typeof info.selectTarget=='number'){ + list.push(lib.inpile[i]); + } + } + } + } + while(list.length){ + var card={name:list.randomRemove()}; + var info=get.info(card); + var targets=game.filterPlayer(function(current){ + return lib.filter.filterTarget(card,player,current); + }); + if(targets.length){ + targets.sort(lib.sort.seat); + if(info.selectTarget==-1){ + player.useCard(card,targets,'noai'); + } + else{ + var num=info.selectTarget; + if(Array.isArray(num)){ + if(targets.length0; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('zhongji',trigger.player),{color:'black'}); + next.logSkill=['zhongji',trigger.player]; + next.ai=function(card){ + if(get.attitude(player,trigger.player)<0){ + return 7-get.value(card); + } + return -1; + } + "step 1" + if(result.bool){ + trigger.num++; + } + }, + ai:{ + threaten:1.3 + } + }, + fuwen:{ + trigger:{player:'phaseDiscardEnd'}, + frequent:true, + filter:function(event,player){ + if(event.cards){ + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('jinzhou'),function(card,player,target){ + return target!=player&&!target.hasSkill('fengyin'); + }).ai=function(target){ + var att=get.attitude(player,target); + if(att>=0) return 0; + var skills=target.getSkills(); + for(var i=0;i0; + }, + filterCard:{type:['trick','delay']}, + check:function(card){ + return 10-get.value(card); + }, + content:function(){ + var list=get.inpile('trick','trick'); + var list2=[]; + for(var i=0;i<3;i++){ + list2.push(game.createCard(list.randomGet())); + } + player.gain(list2,'draw'); + }, + ai:{ + order:9.8, + threaten:1.8, + result:{ + player:1 + } + } + }, + xingluo:{ + trigger:{player:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return !player.isMostHandcard(); + }, + content:function(){ + 'step 0' + var nh=player.countCards('h'); + var num=game.countPlayer(function(current){ + return current.countCards('h')>nh; + }); + player.chooseTarget(get.prompt('xingluo'),[1,num],function(card,player,target){ + return target.countCards('h')>nh; + }).ai=function(target){ + return 0.5-get.attitude(player,target); + } + 'step 1' + if(result.bool){ + event.cards=[]; + event.list=result.targets.slice(0); + event.list.sort(lib.sort.seat); + player.logSkill('xingluo',result.targets); + } + else{ + event.finish(); + } + 'step 2' + if(event.list.length){ + event.list.shift().chooseToDiscard('h',true); + } + else{ + event.goto(4); + } + 'step 3' + if(result.bool&&result.cards.length){ + event.cards.push(result.cards[0]); + } + event.goto(2); + 'step 4' + if(event.cards.length){ + player.chooseCardButton('选择一张加入手牌',event.cards).ai=function(button){ + return get.value(button.link); + }; + } + else{ + event.finish(); + } + 'step 5' + if(result.bool){ + player.gain(result.links,'gain2'); + } + }, + ai:{ + expose:0.2 + } + }, + yuelu:{ + enable:'chooseToUse', + filter:function(event,player){ + return event.type=='dying'&&player.countCards('he',{color:'black'}); + }, + alter:true, + filterCard:{color:'black'}, + position:'he', + check:function(card){ + return 11-get.value(card); + }, + filterTarget:function(card,player,target){ + return target==_status.event.dying; + }, + selectTarget:-1, + content:function(){ + target.recover(); + if(!get.is.altered('yuelu')) target.changeHujia(); + }, + ai:{ + order:10, + skillTagFilter:function(player){ + if(player.countCards('he',{color:'black'})==0) return false; + }, + save:true, + result:{ + target:3 + }, + threaten:2.5 + }, + }, + yushou:{ + enable:'phaseUse', + filterCard:true, + position:'he', + check:function(card){ + return 5-get.value(card); + }, + filter:function(event,player){ + if(player.hasSkill('yushou_misha')&&player.hasSkill('yushou_huofu')&&player.hasSkill('yushou_leiouke')) return false; + return true; + }, + content:function(){ + if(!lib.character.stone_misha){ + lib.character.stone_misha=['male','shu',3,['chaofeng'],['minskin','stone','mode:stone'],[3,3,'hunter']]; + } + if(!lib.character.stone_huofu){ + lib.character.stone_huofu=['male','qun',2,['stone_chongfeng'],['minskin','stone','mode:stone'],[3,4,'hunter']]; + } + if(!lib.character.stone_leiouke){ + lib.character.stone_leiouke=['male','shu',2,['hunter_zhanhuo'],['minskin','stone','mode:stone'],[3,1,'hunter']]; + } + var list=['misha','leiouke','huofu']; + for(var i=0;i=1; + }, + usable:1, + content:function(){ + if(trigger.num>=1){ + trigger.num--; + // player.removeSkill('yushou_misha'); + // player.draw(); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return; + return 0.5; + } + } + } + }, + }, + yushou_huofu:{ + enable:'phaseUse', + viewAs:{name:'juedou'}, + filterCard:{color:'black'}, + position:'he', + viewAsFilter:function(player){ + if(!player.countCards('he',{color:'black'})) return false; + }, + check:function(card){ + return 6-get.value(card); + }, + ai:{ + basic:{ + order:10 + } + } + }, + yushou_leiouke:{ + trigger:{source:'damageBegin'}, + forced:true, + usable:1, + content:function(){ + trigger.num++; + } + }, + qingzun:{ + alter:true, + subSkill:{ + count:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return event.card.name.indexOf('hsqingyu_')==0; + }, + content:function(){ + player.storage.qingzun++; + player.updateMarks(); + } + }, + draw1:{ + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + if(get.is.altered('qingzun')) return player.storage.qingzun>=3; + return player.storage.qingzun>=2; + }, + frequent:true, + content:function(){ + player.draw(); + } + }, + draw2:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + if(get.is.altered('qingzun')) return player.storage.qingzun>=9; + return player.storage.qingzun>=6; + }, + frequent:true, + content:function(){ + player.draw(); + } + }, + }, + mod:{ + maxHandcard:function(player,num){ + return num+player.storage.qingzun; + } + }, + init:function(player){ + player.storage.qingzun=0; + }, + mark:true, + marktext:'玉', + intro:{ + content:function(storage,player){ + if(!storage) return '未使用过青玉牌'; + var str='手牌上限+'+storage; + var num1,num2; + if(get.is.altered('qingzun')){ + num1=3; + num2=9; + } + else{ + num1=2; + num2=6; + } + if(storage>=num2){ + str+=';准备阶段和结束阶段,你可以摸一张牌' + } + else if(storage>=num1){ + str+=';准备阶段,你可以摸一张牌' + } + return str; + } + }, + group:['qingzun_count','qingzun_draw1','qingzun_draw2'], + }, + ayuling:{ + trigger:{player:'damageEnd'}, + frequent:true, + content:function(){ + var list=['feibiao','hufu','zhao','zhanfang','shandian']; + player.gain(game.createCard('hsqingyu_'+list.randomGet()),'draw'); + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(!target.hasFriend()) return; + if(target.hp>=4) return [1,get.tag(card,'damage')*2]; + if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; + } + } + } + } + }, + aoshu:{ + enable:'phaseUse', + usable:1, + position:'he', + filterCard:function(card){ + return get.suit(card)=='spade'; + }, + viewAs:{name:'wuzhong'}, + viewAsFilter:function(player){ + if(!player.countCards('he',{suit:'spade'})) return false; + }, + prompt:'将一张黑桃手牌当作无中生有使用', + check:function(card){return 7-get.value(card)}, + ai:{ + threaten:1.4, + order:9, + } + }, + bzhuiji:{ + trigger:{global:'dieAfter'}, + check:function(event,player){ + return get.attitude(player,event.source)<=0; + }, + filter:function(event,player){ + return event.source&&event.source.isAlive()&&event.source!=player; + }, + content:function(){ + player.draw(2); + player.useCard({name:'juedou'},trigger.source); + }, + ai:{ + threaten:1.5, + expose:0.1 + } + }, + lianjin_old:{ + enable:'phaseUse', + usable:2, + filterCard:true, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + 'step 0' + var list=get.inpile('trick'); + list=list.randomGets(3); + for(var i=0;i=2) continue; + if(names.length>=3) continue; + var select=get.select(info.selectTarget); + if(select[0]==-1&&select[1]==-1){ + names.push(inpile[i]); + if(info.modTarget) single=true; + } + else if(select[0]==1&&select[1]==1){ + names.push(inpile[i]); + single=true; + } + } + if(equip){ + names.push(equips.randomGet()); + } + names.sort(lib.sort.name); + var name='hsyaoshui_'+names[0]+'_'+names[1]+'_'+names[2]; + if(!lib.card[name]){ + lib.card[name]=get.copy(lib.skill.lianjin.template); + lib.card[name].names=names; + lib.card[name].selectTarget=single?1:-1; + lib.translate[name]='药水'; + lib.translate[name+'_info']=get.translation(names[0])+'、'+ + get.translation(names[1])+'、'+get.translation(names[2]); + } + cards[0].style.transitionDuration='0.2s'; + ui.refresh(cards[0]); + cards[0].classList.add('opaque'); + event.cardname=name; + if(player!=game.me){ + var fakecard=game.createCard(name); + fakecard.node.info.remove(); + player.$draw(fakecard); + } + game.delay(0,200); + 'step 1' + cards[0].style.transitionDuration='0s'; + ui.refresh(cards[0]); + cards[0].classList.remove('fullskin'); + cards[0].init([cards[0].suit,cards[0].number,event.cardname]); + game.delay(0,100); + 'step 2' + cards[0].style.transitionDuration=''; + ui.refresh(cards[0]); + cards[0].classList.remove('opaque'); + game.delay(0,200); + }, + template:{ + type:'hsyaoshui', + enable:true, + fullimage:true, + image:'card/hsyaoshui', + vanish:true, + derivation:'hs_kazhakusi', + multitarget:true, + multiline:true, + filterTarget:function(card,player,target){ + var info=get.info(card); + var names=info.names; + for(var i=0;i=3) return -1; + var num=0; + for(var i=0;i0){ + num++; + } + else if(eff<0){ + num-=0.9; + } + } + return num; + } + } + } + }, + ai:{ + order:9, + result:{ + player:1 + }, + threaten:1.4 + }, + }, + shouji:{ + group:['shouji_begin','shouji_miss'], + subSkill:{ + begin:{ + trigger:{player:'shaBegin'}, + frequent:true, + usable:1, + filter:function(event){ + return event.target.countCards('h')>0; + }, + content:function(){ + player.gain(game.createCard(trigger.target.getCards('h').randomGet()),'draw'); + } + }, + miss:{ + trigger:{player:'shaMiss'}, + frequent:true, + usable:1, + filter:function(event){ + return event.target.hasCard(function(card){ + return !get.info(card).unique; + },'e'); + }, + content:function(){ + player.gain(game.createCard(trigger.target.getCards('e',function(card){ + return !get.info(card).unique; + }).randomGet()),'draw'); + } + } + } + }, + yingxi:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return !player.getStat('damage')&&player.countCards('he',{color:'black'})>0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + prompt:get.prompt('yingxi'), + filterCard:{color:'black'}, + filterTarget:function(card,player,target){ + return lib.filter.targetEnabled({name:'sha'},player,target); + }, + position:'he', + ai1:function(card){ + return 8-get.value(card); + }, + ai2:function(target){ + return get.effect(target,{name:'sha'},player,player); + } + }); + 'step 1' + if(result.bool){ + player.useCard({name:'sha'},result.cards,result.targets,'yingxi'); + } + }, + group:'yingxi2', + }, + yingxi2:{ + trigger:{player:'shaBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='yingxi'&&event.target.isHealthy(); + }, + content:function(){ + trigger.directHit=true; + } + }, + guimou:{ + trigger:{player:'damageEnd'}, + check:function(event,player){ + return get.attitude(player,event.source)<=0; + }, + filter:function(event,player){ + return event.source&&event.source.isAlive()&&event.source!=player&&event.source.countCards('h')>0; + }, + content:function(){ + var card=trigger.source.getCards('h').randomGet(); + if(card){ + player.gain(card,trigger.source); + if(get.color(card)=='black'){ + trigger.source.$give(card,player); + event.redo(); + } + else{ + trigger.source.$giveAuto(card,player); + } + game.delay(0.5); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(!target.hasFriend()) return false; + if(get.tag(card,'damage')&&player.countCards('h')>1) return [1,0,0,-1]; + } + } + } + }, + peiyu:{ + trigger:{player:['phaseBegin']}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('peiyu'),function(card,player,target){ + for(var i=1;i<=8;i++){ + if(target.hasSkill('tuteng'+i)) return false; + } + return true; + }).ai=function(target){ + if(player==target&&get.attitude(player,target)>0&&event.parent.triggername=='phaseBegin'){ + return get.attitude(player,target)+10; + } + return get.attitude(player,target); + } + 'step 1' + if(result.bool){ + player.logSkill('peiyu',result.targets); + var rand=['tuteng1','tuteng2','tuteng3','tuteng4', + 'tuteng5','tuteng6','tuteng7','tuteng8']; + result.targets[0].addAdditionalSkill('peiyu',['peiyu2',rand.randomGet()]); + } + } + }, + peiyu2:{ + trigger:{player:'damageAfter'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.removeAdditionalSkill('peiyu'); + } + }, + peiyu_old:{ + enable:'phaseUse', + filterCard:true, + position:'he', + filterTarget:true, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + 'step 0' + var rand=['tuteng1','tuteng2','tuteng3','tuteng4', + 'tuteng5','tuteng6','tuteng7','tuteng8']; + var rand2=[]; + for(var i=0;i1){ + rand.remove('tuteng1'); + } + gain=rand.randomGet(); + target.removeSkill(rand2.randomGet()) + } + } + target.addSkill(gain); + target.storage.peiyu[gain]=player; + game.delay(); + event.finish(); + } + } + else{ + var gain=rand.randomGet(); + target.addSkill(gain); + target.storage.peiyu[gain]=player; + game.delay(); + event.finish(); + } + 'step 1' + var skill1=result.buttons[0].name; + var skill2=result.buttons[1].name; + if(target.hasSkill(skill1)){ + target.removeSkill(skill1); + target.addSkill(skill2); + target.storage.peiyu[skill2]=player; + } + else{ + target.removeSkill(skill2); + target.addSkill(skill1); + target.storage.peiyu[skill1]=player; + } + }, + ai:{ + expose:0.2, + order:5, + result:{ + target:function(player,target){ + for(var i=1;i<=8;i++){ + if(target.hasSkill('tuteng'+i)) return 0; + } + return 1; + } + } + }, + group:'peiyu_old2' + }, + peiyu_old2:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + game.countPlayer(function(current){ + for(var j in current.storage.peiyu){ + if(current.storage.peiyu[j]==player){ + current.removeSkill(j); + } + } + }); + } + }, + wzhanyi:{ + trigger:{player:'phaseUseBefore'}, + check:function(event,player){ + return player.countCards('h')+2<=player.hp; + }, + content:function(){ + 'step 0' + event.cards=get.cards(3); + trigger.untrigger(); + trigger.finish(); + player.$draw(event.cards.slice(0)); + for(var i=0;i=3; + }, + filterTarget:function(card,player,target){ + return player.canUse('yuansuhuimie',target); + }, + selectTarget:-1, + multitarget:true, + multiline:true, + line:'thunder', + content:function(){ + player.maxHp=player.hp; + player.update(); + targets.sort(lib.sort.seat); + player.useCard({name:'yuansuhuimie'},targets).animate=false; + } + }, + chouhuo:{ + unique:true, + trigger:{player:'phaseBegin'}, + forced:true, + skillAnimation:true, + animationColor:'fire', + filter:function(event,player){ + if(player.storage.nuyan&&player.storage.nuyan.length){ + var num=0; + for(var i=0;i0){ + if(players[i].hp<2){ + lose--; + recover+=0.5; + } + lose--; + recover++; + } + else if(get.attitude(player,players[i])<0){ + if(players[i].hp<2){ + lose++; + recover-=0.5; + } + lose++; + recover--; + } + } + else{ + if(get.attitude(player,players[i])>0){ + lose--; + } + else if(get.attitude(player,players[i])<0){ + lose++; + } + } + } + if(button.link[2]=='nanman'||button.link[2]=='nanman'||button.link[2]=='yuansuhuimie'|| + button.link[2]=='chiyuxi'||button.link[2]=='jingleishan'){ + if(lose>recover&&lose>0){ + return 2; + } + else{ + return 0; + } + } + return 1; + }, + backup:function(links,player){ + return { + filterCard:function(){return false}, + selectCard:-1, + popname:true, + viewAs:{name:links[0][2]}, + onuse:function(result,player){ + player.loseHp(); + } + } + }, + prompt:function(links,player){ + return '失去一点体力,视为使用一张'+get.translation(links[0][2]); + } + }, + ai:{ + order:6, + result:{ + player:function(player){ + if(player.hp>1) return 1; + return 0; + } + }, + } + }, + nuyan:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0 + }, + init:function(player){ + player.storage.nuyan=[]; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i=0;i0){ + if(players[i].hp<2){ + lose--; + recover+=0.5; + } + lose--; + recover++; + } + else if(get.attitude(player,players[i])<0){ + if(players[i].hp<2){ + lose++; + recover-=0.5; + } + lose++; + recover--; + } + } + else{ + if(get.attitude(player,players[i])>0){ + lose--; + } + else if(get.attitude(player,players[i])<0){ + lose++; + } + } + } + if(button.link[2]=='nanman'||button.link[2]=='nanman'||button.link[2]=='yuansuhuimie'|| + button.link[2]=='chiyuxi'||button.link[2]=='jingleishan'){ + if(lose>recover&&lose>0){ + return 2; + } + else{ + return 0; + } + } + return 1; + }, + backup:function(links,player){ + return { + filterCard:{color:'red'}, + selectCard:1, + position:'he', + popname:true, + viewAs:{name:links[0][2]}, + ai1:function(card){ + return 6-get.value(card); + }, + onuse:function(result,player){ + player.storage.nuyan.add(result.card.name); + } + } + }, + prompt:function(links,player){ + return '将一张红色牌当作'+get.translation(links[0][2])+'使用'; + } + }, + ai:{ + order:6, + result:{ + player:1 + }, + } + }, + duxin:{ + trigger:{player:['phaseBegin','phaseEnd']}, + frequent:true, + filter:function(event,player){ + return !player.countCards('h',{type:'hsdusu'}); + }, + content:function(){ + var list=['hsdusu_xueji','hsdusu_huangxuecao','hsdusu_kuyecao','hsdusu_shinancao','hsdusu_huoyanhua']; + if(typeof lib.cardType.hslingjian!='number'){ + list.remove('hsdusu_kuyecao'); + } + var name=list.randomGet(); + if(name=='hsdusu_huoyanhua'){ + player.gain(game.createCard({name:name,nature:'fire'}),'draw'); + } + else{ + player.gain(game.createCard(name),'draw'); + } + }, + ai:{ + threaten:1.6 + } + }, + hsdusu_shinancao:{ + mark:true, + marktext:'楠', + nopop:true, + intro:{ + content:'下一次造成的伤害+1' + }, + logv:false, + trigger:{source:'damageBegin'}, + forced:true, + content:function(){ + trigger.num++; + player.removeSkill('hsdusu_shinancao'); + } + }, + kuangluan_old:{ + group:['kuangluan_count1','kuangluan_count2','kuangluan_use'], + subSkill:{ + count1:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return _status.currentPhase==player&&get.type(event.card)=='trick'; + }, + content:function(){ + player.storage.kuangluan++; + } + }, + count2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.kuangluan=0; + } + }, + use:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + filter:function(event,player){ + return player.storage.kuangluan>0; + }, + content:function(){ + var list=[]; + for(var i=0;i0&&info.selectTarget[1]>=info.selectTarget[0]){ + list.push(lib.inpile[i]); + } + } + else if(typeof info.selectTarget=='number'){ + list.push(lib.inpile[i]); + } + } + } + } + var n=player.storage.kuangluan; + delete player.storage.kuangluan; + while(list.length){ + var card={name:list.randomRemove()}; + var info=get.info(card); + var targets=game.filterPlayer(function(current){ + return lib.filter.filterTarget(card,player,current); + }); + if(targets.length){ + targets.sort(lib.sort.seat); + if(info.selectTarget==-1){ + player.useCard(card,targets); + } + else{ + var num=info.selectTarget; + if(Array.isArray(num)){ + if(targets.length=2; + }, + content:function(){ + player.recover(player.maxHp); + player.goMad('phaseAfter'); + } + }, + kuangluan3:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.kuangluan=[]; + player.unmarkSkill('kuangluan'); + } + }, + xiubu:{ + trigger:{player:'equipEnd'}, + frequent:true, + filter:function(event){ + return lib.inpile.contains(event.card.name)&&get.subtype(event.card)=='equip1'&&typeof lib.cardType.hslingjian=='number'; + }, + content:function(){ + var num=1; + var info=get.info(trigger.card); + if(info&&info.distance&&typeof info.distance.attackFrom=='number'){ + num=1-info.distance.attackFrom; + } + if(num<1){ + num=1; + } + var list=get.typeCard('hslingjian'); + var cards=[]; + while(num--){ + cards.push(game.createCard(list.randomGet())); + } + player.gain(cards,'gain2'); + }, + threaten:1.3 + }, + zengli:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&!target.isMin(); + }, + delay:false, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i1){ + return 6-get.value(card); + } + return 0; + }).set('logSkill',['xianji',event.target]); + } + else{ + event.finish(); + } + 'step 1' + if(result.bool){ + event.target.draw(result.cards.length); + player.storage.xianji3=event.target; + player.addSkill('xianji3'); + player.addExpose(0.2); + } + } + }, + xianji3:{ + mark:'character', + intro:{ + content:'每当$对你使用一张牌,你摸一张牌' + }, + trigger:{target:'useCardToBegin'}, + filter:function(event,player){ + return event.player==player.storage.xianji3; + }, + forced:true, + content:function(){ + player.draw(); + }, + }, + tanmi:{ + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + return player.countCards('h')==0&&event.player!=player; + }, + frequent:true, + content:function(){ + 'step 0' + player.draw(2); + 'step 1' + player.chooseToUse(); + 'step 2' + if(result.bool){ + player.chooseToUse(); + } + }, + ai:{ + noh:true, + skillTagFilter:function(player,tag){ + if(tag=='noh'){ + if(player.countCards('h')!=1) return false; + } + } + } + }, + xueren:{ + trigger:{source:'damageEnd'}, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.player.isAlive(); + }, + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return false; + if(player.hp>2) return true; + if(player.hp<2) return false; + return player.hp>=event.player.hp; + }, + content:function(){ + 'step 0' + trigger.player.loseHp(); + 'step 1' + player.loseHp(); + 'step 2' + player.draw(2); + } + }, + maoxian:{ + enable:'phaseUse', + usable:2, + direct:true, + delay:false, + unique:true, + content:function(){ + 'step 0' + var list=get.gainableSkills(); + list.remove('maoxian'); + list=list.randomGets(3); + event.skillai=function(){ + return list.randomGet(); + }; + if(event.isMine()){ + var dialog=ui.create.dialog(); + dialog.add('选择获得一项技能'); + var clickItem=function(){ + _status.event._result=this.link; + dialog.close(); + game.resume(); + }; + for(var i=0;i
【'+ + translation+'】
'+lib.translate[list[i]+'_info']+'
'); + item.firstChild.addEventListener('click',clickItem); + item.firstChild.link=list[i]; + } + } + dialog.add(ui.create.div('.placeholder')); + event.switchToAuto=function(){ + event._result=event.skillai(); + dialog.close(); + game.resume(); + }; + _status.imchoosing=true; + game.pause(); + } + else{ + event._result=event.skillai(); + } + 'step 1' + _status.imchoosing=false; + var link=result; + player.addAdditionalSkill('maoxian',link); + player.popup(link); + game.log(player,'获得了技能','【'+get.translation(link)+'】'); + player.checkMarks(); + player.markSkill('maoxian'); + game.delay(); + }, + intro:{ + content:function(storage,player){ + return '当前技能:'+get.translation(player.additionalSkills.maoxian); + } + }, + ai:{ + order:11, + result:{ + player:function(player){ + if(player.getStat().skill.maoxian) return 0; + return 1; + } + } + } + }, + maoxian_old:{ + enable:'phaseUse', + usable:2, + direct:true, + delay:false, + unique:true, + getSkills:function(player,current){ + var names=[]; + var list=[]; + var map={}; + for(var i=0;i=3; + }, + content:function(){ + 'step 0' + event.cards=get.cards(3); + if(!event.isMine()) player.showCards(event.cards); + 'step 1' + player.chooseCardButton('获得任意张类别不同的牌',[1,3],event.cards).filterButton=function(button){ + var type=get.type(button.link,'trick'); + for(var i=0;iget.value(cards[i]); + } + }); + if(!list.length){ + list=game.findCards(function(name){ + if(cards[i].name==name) return; + if(get.type({name:name},'trick')==type){ + return get.value({name:name})==get.value(cards[i]); + } + }); + } + if(!list.length){ + list=[cards[i].name]; + } + cards2.push(game.createCard(list.randomGet())); + } + player.gain(cards2,'log'); + player.$draw(cards2); + }, + ai:{ + order:8, + result:{ + player:1 + } + } + }, + zhuizong:{ + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + selectCard:[1,Infinity], + check:function(card){ + if(ui.selected.cards.length) return 0; + return 6-get.value(card) + }, + content:function(){ + 'step 0' + event.cards=get.cards(4*cards.length); + player.chooseCardButton('获得其中的一张牌',true,event.cards,true); + 'step 1' + player.gain(result.links,'draw'); + event.cards.remove(result.links[0]); + for(var i=0;i=3) return false; - for(var i=0;i0; - }, - filterTarget:function(card,player,target){ - if(get.color(card)=='red'){ - return player.canUse('chiyuxi',target); - } - else{ - return player.canUse('jingleishan',target); - } - }, - selectTarget:-1, - discard:false, - delay:false, - line:false, - filterCard:true, - position:'he', - log:'notarget', - check:function(card){ - return 6-get.value(card); - }, - multitarget:true, - content:function(){ - if(get.color(cards[0])=='black'){ - player.useCard({name:'jingleishan'},cards,targets); - } - else{ - player.useCard({name:'chiyuxi'},cards,targets); - } - }, - ai:{ - order:9.1, - result:{ - target:function(player,target){ - var card=ui.selected.cards[0]; - if(card&&get.color(card)=='black'){ - return get.effect(target,{name:'jingleishan'},player,target); - } - return get.effect(target,{name:'chiyuxi'},player,target); - } - } - } - }, - shifa:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - content:function(){ - 'step 0' - var list=[]; - var target=player.getEnemies().randomGet(); - for(var i=0;i1&&event.target.countCards('he')>0; - }, - content:function(){ - player.discardPlayerCard(trigger.target,get.prompt('yuanzheng',trigger.target),'hej').logSkill=['yuanzheng',trigger.target]; - } - }, - yuanzheng_old:{ - trigger:{player:'useCardToBegin'}, - direct:true, - filter:function(event,player){ - if(event.getParent(2).name=='yuanzheng') return false; - return event.target&&event.target!=player&&get.distance(player,event.target,'attack')>1; - }, - content:function(){ - 'step 0' - player.chooseControl('draw_card','出杀','cancel2',function(){ - if(get.effect(trigger.target,{name:'sha'},player,player)>0){ - return '出杀'; - } - return 'draw_card'; - }).prompt='是对'+get.translation(trigger.target)+'发动否发动【远征】?'; - 'step 1' - if(result.control!='cancel2'){ - if(result.control=='draw_card'){ - player.draw(); - player.logSkill('yuanzheng'); - } - else{ - player.logSkill('yuanzheng',trigger.target); - player.useCard({name:'sha'},trigger.target,false).animate=false; - // player.discardPlayerCard(trigger.target,'he',true); - } - } - } - }, - byuhuo:{ - unique:true, - trigger:{player:'dying'}, - priority:6, - forced:true, - mark:true, - skillAnimation:true, - animationColor:'fire', - init:function(player){ - player.storage.byuhuo=false; - }, - filter:function(event,player){ - if(player.hp>0) return false; - if(player.storage.byuhuo) return false; - return true; - }, - content:function(){ - player.storage.byuhuo=true; - player.addSkill('byuhuo2'); - player.maxHp=2; - player.hp=2; - player.update(); - if(!player.isTurnedOver()){ - player.turnOver(); - } - }, - ai:{ - threaten:function(player,target){ - if(!target.storage.byuhuo) return 0.6; - } - }, - intro:{ - content:function(storage,player){ - if(storage){ - if(player.hasSkill('byuhuo2')){ - return '不能成为其他角色卡牌的目标;在下一准备阶段,对所有其他角色造成两点火焰伤害'; - } - return '已发动'; - } - else{ - return '未发动'; - } - } - } - }, - byuhuo2:{ - trigger:{player:'phaseBegin'}, - forced:true, - content:function(){ - 'step 0' - var targets=game.filterPlayer(); - targets.remove(player); - targets.sort(lib.sort.seat); - event.targets=targets; - event.num=0; - player.unmarkSkill('byuhuo'); - 'step 1' - if(num=3) return false; + for(var i=0;i0; + }, + filterTarget:function(card,player,target){ + if(get.color(card)=='red'){ + return player.canUse('chiyuxi',target); + } + else{ + return player.canUse('jingleishan',target); + } + }, + selectTarget:-1, + discard:false, + delay:false, + line:false, + filterCard:true, + position:'he', + log:'notarget', + check:function(card){ + return 6-get.value(card); + }, + multitarget:true, + content:function(){ + if(get.color(cards[0])=='black'){ + player.useCard({name:'jingleishan'},cards,targets); + } + else{ + player.useCard({name:'chiyuxi'},cards,targets); + } + }, + ai:{ + order:9.1, + result:{ + target:function(player,target){ + var card=ui.selected.cards[0]; + if(card&&get.color(card)=='black'){ + return get.effect(target,{name:'jingleishan'},player,target); + } + return get.effect(target,{name:'chiyuxi'},player,target); + } + } + } + }, + shifa:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + content:function(){ + 'step 0' + var list=[]; + var target=player.getEnemies().randomGet(); + for(var i=0;i1&&event.target.countCards('he')>0; + }, + content:function(){ + player.discardPlayerCard(trigger.target,get.prompt('yuanzheng',trigger.target),'hej').logSkill=['yuanzheng',trigger.target]; + } + }, + yuanzheng_old:{ + trigger:{player:'useCardToBegin'}, + direct:true, + filter:function(event,player){ + if(event.getParent(2).name=='yuanzheng') return false; + return event.target&&event.target!=player&&get.distance(player,event.target,'attack')>1; + }, + content:function(){ + 'step 0' + player.chooseControl('draw_card','出杀','cancel2',function(){ + if(get.effect(trigger.target,{name:'sha'},player,player)>0){ + return '出杀'; + } + return 'draw_card'; + }).prompt='是对'+get.translation(trigger.target)+'发动否发动【远征】?'; + 'step 1' + if(result.control!='cancel2'){ + if(result.control=='draw_card'){ + player.draw(); + player.logSkill('yuanzheng'); + } + else{ + player.logSkill('yuanzheng',trigger.target); + player.useCard({name:'sha'},trigger.target,false).animate=false; + // player.discardPlayerCard(trigger.target,'he',true); + } + } + } + }, + byuhuo:{ + unique:true, + trigger:{player:'dying'}, + priority:6, + forced:true, + mark:true, + skillAnimation:true, + animationColor:'fire', + init:function(player){ + player.storage.byuhuo=false; + }, + filter:function(event,player){ + if(player.hp>0) return false; + if(player.storage.byuhuo) return false; + return true; + }, + content:function(){ + player.storage.byuhuo=true; + player.addSkill('byuhuo2'); + player.maxHp=2; + player.hp=2; + player.update(); + if(!player.isTurnedOver()){ + player.turnOver(); + } + }, + ai:{ + threaten:function(player,target){ + if(!target.storage.byuhuo) return 0.6; + } + }, + intro:{ + content:function(storage,player){ + if(storage){ + if(player.hasSkill('byuhuo2')){ + return '不能成为其他角色卡牌的目标;在下一准备阶段,对所有其他角色造成两点火焰伤害'; + } + return '已发动'; + } + else{ + return '未发动'; + } + } + } + }, + byuhuo2:{ + trigger:{player:'phaseBegin'}, + forced:true, + content:function(){ + 'step 0' + var targets=game.filterPlayer(); + targets.remove(player); + targets.sort(lib.sort.seat); + event.targets=targets; + event.num=0; + player.unmarkSkill('byuhuo'); + 'step 1' + if(num0; - }, - content:function(){ - 'step 0' - var nh=player.countCards('h'); - if(nh){ - player.draw(nh); - } - else{ - event.finish(); - } - 'step 1' - var hs=player.getCards('h'); - if(hs.length>10&&hs.length>player.hp){ - player.discard(hs.randomGets(hs.length-player.hp)); - } - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(!target.hasFriend()) return; - var nh=target.countCards('h'); - if(nh>5) return [1,-1]; - if(nh<=1) return [1,-0.1]; - if(nh==2){ - if(target.hp>=2) return [1,0.1]; - } - else{ - if(target.hp>=4) return [1,2]; - if(target.hp==3) return [1,1.5]; - if(target.hp==2) return [1,0.5]; - } - } - } - } - } - }, - chuidiao:{ - trigger:{player:'phaseEnd'}, - forced:true, - content:function(){ - var num=Math.floor(Math.random()*3); - if(num) player.draw(num); - }, - }, - hhudun:{ - trigger:{global:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return !player.hujia; - }, - content:function(){ - player.changeHujia(); - }, - group:'hhudun_hujia', - subSkill:{ - hujia:{ - trigger:{player:'damageZero'}, - filter:function(event){ - return event.hujia; - }, - forced:true, - content:function(){ - player.draw(); - } - } - }, - ai:{ - threaten:function(player,target){ - if(target.hujia){ - return 0.5; - } - else{ - return 2; - } - } - } - }, - fenlie:{ - audio:2, - forced:true, - trigger:{player:'gainAfter'}, - filter:function(event,player){ - if(event.parent.parent.name=='phaseDraw') return false; - if(event.parent.name=='fenlie') return false; - if(!event.cards) return false; - for(var i=0;i3000&&event.player.countCards('he')>0&&event.player.isAlive(); - }, - content:function(){ - player.line(trigger.player,'green'); - trigger.player.chooseToDiscard('he',true,Math.floor(trigger.player.storage.shixu/3000)); - delete trigger.player.storage.shixu; - } - } - } - }, - jixuan:{ - trigger:{player:'phaseAfter'}, - forced:true, - priority:-50, - filter:function(event,player){ - return event.skill!='jixuan'; - }, - content:function(){ - player.draw(); - player.insertPhase(); - }, - ai:{ - threaten:1.8 - }, - }, - qianghua:{ - trigger:{player:'useCardAfter'}, - filter:function(event,player){ - if(event.parent.name=='qianghua') return false; - if(player.storage.qianghua>=1) return false; - if(_status.currentPhase!=player) return false; - if(event.parent.parent.name!='phaseUse') return false; - if(!event.targets||!event.card) return false; - if(get.info(event.card).complexTarget) return false; - if(!lib.filter.cardEnabled(event.card,player,event.parent)) return false; - var type=get.type(event.card); - if(type!='basic'&&type!='trick') return false; - var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); - var targets=event._targets||event.targets; - for(var i=0;i0&& - event.targets.contains(player)==false&&event.targets.length==1; - }, - direct:true, - content:function(){ - "step 0" - var effect=0; - for(var i=0;i0; - }, - content:function(){ - trigger.num--; - player.removeSkill('stuxi2'); - } - }, - bingdong:{ - trigger:{source:'damageEnd'}, - forced:true, - usable:1, - filter:function(event,player){ - if(!lib.card.hslingjian_jinjilengdong){ - return false; - } - return true; - }, - content:function(){ - player.gain(game.createCard('hslingjian_jinjilengdong'),'gain2'); - } - }, - bingdong_old:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return !player.isTurnedOver(); - }, - filterTarget:function(card,player,target){ - return !target.isTurnedOver()&&player!=target; - }, - content:function(){ - 'step 0' - if(!player.isTurnedOver()){ - player.turnOver(); - } - 'step 1' - if(!target.isTurnedOver()){ - target.turnOver(); - } - }, - ai:{ - order:1, - expose:0.2, - result:{ - target:function(player,target){ - if(get.attitude(player,target)<-3&&player.identity!='zhu'){ - return -1; - } - return 0; - } - } - } - }, - luoshi:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event,player){ - return player.countCards('he')>0||(event.source&&event.source.countCards('he')>0); - }, - content:function(){ - 'step 0' - var hs=player.getCards('he'); - if(hs.length){ - player.discard(hs.randomGet()) - } - 'step 1' - if(trigger.source){ - var hs=trigger.source.getCards('he'); - if(hs.length){ - trigger.source.discard(hs.randomGet()) - } - } - } - }, - ronghuo:{ - trigger:{player:'useCardToBefore'}, - priority:7, - filter:function(event,player){ - if(event.card.name=='sha'&&!event.card.nature) return true; - }, - check:function(event,player){ - var att=get.attitude(player,event.target); - if(event.target.hasSkillTag('nofire')){ - return att>0; - } - return att<=0; - }, - forced:true, - content:function(){ - trigger.card.nature='fire'; - player.addSkill('ronghuo2'); - player.storage.ronghuo=trigger.card; - } - }, - ronghuo2:{ - trigger:{player:'useCardAfter'}, - forced:true, - popup:false, - content:function(){ - delete player.storage.ronghuo.nature; - } - }, - fushi:{ - enable:'phaseUse', - filterTarget:function(card,player,target){ - return target.hp1){ - if(target.hp<=1) att+=2; - if(target.hp<=2) att++; - } - return att; - }; - 'step 1' - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('jiaohui',event.target); - event.target.chooseDrawRecover(true); - } - }, - }, - chenshui:{ - trigger:{player:'phaseEnd'}, - frequent:true, - content:function(){ - var list=['hsmengjing_feicuiyoulong','hsmengjing_huanxiaojiemei', - 'hsmengjing_suxing','hsmengjing_mengye','hsmengjing_mengjing']; - player.gain(game.createCard(list.randomGet())); - player.$draw(); - }, - ai:{ - threaten:2 - } - }, - liehun:{ - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player.hasCard(function(card){ - return get.type(card)!='basic'&&!get.info(card).unique; - }); - }, - content:function(){ - var hs=player.getCards('h'); - for(var i=0;i0){ - if(target==player){ - num++; - } - if(target.hp==1){ - num+=3; - } - else if(target.hp==2){ - num+=1; - } - } - return num; - } - "step 1" - if(result.bool){ - player.logSkill('lingzhou',result.targets); - result.targets[0].chooseDrawRecover(true); - } - }, - ai:{ - expose:0.2, - threaten:1.5, - noautowuxie:true, - } - }, - mieshi:{ - trigger:{player:'phaseEnd'}, - forced:true, - content:function(){ - 'step 0' - player.loseHp(); - 'step 1' - event.target=game.filterPlayer().randomGet(player); - if(!event.target){ - event.finish(); - return; - } - player.line(event.target,'fire'); - game.delayx(); - 'step 2' - event.target.damage('fire'); - } - }, - xmojian:{ - trigger:{player:'turnOverAfter'}, - direct:true, - filter:function(event,player){ - return !player.isTurnedOver(); - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('xmojian'),function(card,player,target){ - return lib.filter.targetEnabled({name:'sha'},player,target); - }).ai=function(target){ - return get.effect(target,{name:'sha'},player); - } - "step 1" - if(result.bool){ - player.logSkill('xmojian'); - player.useCard({name:'sha'},result.targets,false); - } - }, - ai:{ - expose:0.2, - } - }, - xshixin:{ - trigger:{source:'damageEnd'}, - forced:true, - alter:true, - filter:function(event,player){ - if(get.is.altered('xshixin')&&event.player.hp0){ - if(num>3){ - num=3; - } - if(get.is.altered('enze')&&num>2){ - num=2; - } - target.draw(num); - } - else if(num<0){ - if(get.is.altered('enze')&&num<-2){ - num=-2; - } - target.chooseToDiscard(-num,true); - } - }, - ai:{ - threaten:1.8, - order:function(name,player){ - var max=true,num=0; - var players=game.filterPlayer(); - for(var i=0;inum){ - if(att>0){ - max=true; - } - else if(att<0){ - max=false; - } - num=att*dh; - } - } - if(max) return 10; - return 0.5; - }, - result:{ - player:function(player,target){ - return (player.countCards('h')-target.countCards('h'))*get.attitude(player,target); - } - }, - expose:0.2 - } - }, - chongsheng:{ - unique:true, - enable:'chooseToUse', - mark:true, - init:function(player){ - player.storage.chongsheng=2; - player.syncStorage('chongsheng'); - }, - filter:function(event,player){ - if(event.type!='dying') return false; - if(player!=event.dying) return false; - if(player.storage.chongsheng<=0) return false; - return true; - }, - content:function(){ - 'step 0' - player.hp=Math.min(player.storage.chongsheng,player.maxHp); - player.discard(player.getCards('hej')); - player.draw(player.storage.chongsheng); - player.storage.chongsheng--; - if(player.storage.chongsheng<=0){ - player.unmarkSkill('chongsheng'); - } - 'step 1' - if(player.isLinked()) player.link(); - 'step 2' - if(player.isTurnedOver()) player.turnOver(); - player.syncStorage('chongsheng'); - }, - ai:{ - skillTagFilter:function(player){ - if(player.storage.chongsheng<=0) return false; - if(player.hp>0) return false; - }, - save:true, - result:{ - player:10 - }, - threaten:function(player,target){ - if(target.storage.chongsheng>0) return 0.6; - } - }, - intro:{ - content:'time' - } - }, - guozai:{ - enable:'phaseUse', - usable:1, - alter:true, - filter:function(event,player){ - return player.countCards('h')<(get.is.altered('guozai')?3:4); - }, - init:function(player){ - player.storage.guozai2=0; - }, - content:function(){ - var num=(get.is.altered('guozai')?3:4)-player.countCards('h'); - player.draw(num); - player.addSkill('guozai2'); - player.storage.guozai2+=num; - game.addVideo('storage',player,['guozai2',player.storage.guozai2]); - }, - ai:{ - order:1, - result:{ - player:1 - } - } - }, - guozai2:{ - mark:true, - intro:{ - content:'结束阶段需弃置&张牌' - }, - trigger:{player:'phaseUseEnd'}, - forced:true, - content:function(){ - player.chooseToDiscard('he',true,player.storage.guozai2); - player.storage.guozai2=0; - player.removeSkill('guozai2'); - } - }, - guozaix:{ - enable:'phaseUse', - usable:2, - filter:function(event,player){ - return player.countCards('h')<4; - }, - init:function(player){ - player.storage.guozaix2=0; - }, - content:function(){ - var num=4-player.countCards('h'); - player.draw(num); - player.addSkill('guozaix2'); - player.storage.guozaix2+=num; - game.addVideo('storage',player,['guozaix2',player.storage.guozaix2]); - }, - ai:{ - order:1, - result:{ - player:1 - } - } - }, - guozaix2:{ - mark:true, - intro:{ - content:'结束阶段需弃置&张牌' - }, - trigger:{player:'phaseUseEnd'}, - forced:true, - content:function(){ - player.chooseToDiscard('he',true,player.storage.guozaix2); - player.storage.guozaix2=0; - player.removeSkill('guozaix2'); - } - }, - hanshuang:{ - trigger:{source:'damageEnd'}, - forced:true, - alter:true, - filter:function(event,player){ - return event.card&&get.color(event.card)=='black'&& - !event.player.isTurnedOver()&&event.player.isAlive(); - }, - content:function(){ - trigger.player.turnOver(); - if(get.is.altered('hanshuang')) trigger.player.draw(); - player.loseHp(); - }, - ai:{ - threaten:1.5, - effect:{ - player:function(card,player,target,current){ - if(get.color(card)=='black'&&get.tag(card,'damage')){ - return [1,0,1,-2]; - } - } - } - } - }, - bingshi:{ - global:'bingshi2' - }, - bingshi2:{ - trigger:{global:'dieAfter'}, - forced:true, - globalFixed:true, - filter:function(event,player){ - return event.player.hasSkill('bingshi')&&event.player.isDead(); - }, - content:function(){ - trigger.player.line(player,'thunder'); - player.damage('nosource','thunder').animate=false; - player.$damage(trigger.player); - if(lib.config.animation&&!lib.config.low_performance){ - player.$thunder(); - } - if(!event.parent.parent.bingshi_logv){ - event.parent.parent.bingshi_logv=true; - game.logv(trigger.player,'bingshi',game.filterPlayer(),event.parent.parent); - } - } - }, - huanwu:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return !target.storage.huanwu; - }, - content:function(){ - target.gainMaxHp(); - target.recover(); - target.draw(2); - target.storage.huanwu=true; - target.mark('huanwu',{ - name:'唤雾', - content:'已发动' - }); - game.addVideo('mark',target,{ - name:'唤雾', - content:'已发动', - id:'huanwu' - }); - }, - ai:{ - threaten:1.2, - result:{ - target:function(player,target){ - return 1/target.hp; - } - }, - order:10, - expose:0.3 - } - }, - fengnu:{ - mod:{ - cardUsable:function(card){ - if(get.info(card)&&get.info(card).forceUsable) return; - return Infinity; - }, - targetInRange:function(){ - if(!get.is.altered('fengnu')) return true; - } - }, - alter:true, - trigger:{player:'useCard'}, - filter:function(event,player){ - if(_status.currentPhase!=player) return false; - return get.cardCount(event.card,player)>1; - }, - forced:true, - usable:3, - content:function(){ - player.draw(); - } - }, - shengdun:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return !player.hujia; - }, - content:function(){ - player.changeHujia(); - player.update(); - }, - }, - shengdun_old:{ - trigger:{player:'phaseBegin'}, - forced:true, - silent:true, - popup:false, - priority:10, - init2:function(player){ - player.markSkill('shengdun'); - }, - content:function(){ - if(player.storage.shengdun){ - player.markSkill('shengdun'); - } - player.storage.shengdun=false; - }, - intro:{ - content:'未发动' - }, - group:'shengdun2' - }, - shengdun_old2:{ - trigger:{player:'damageBegin'}, - forced:true, - filter:function(event,player){ - return event.num>0&&!player.storage.shengdun; - }, - content:function(){ - trigger.num--; - player.storage.shengdun=true; - player.unmarkSkill('shengdun'); - } - }, - jingmeng:{ - trigger:{player:'useCard'}, - frequent:true, - filter:function(event,player){ - return _status.currentPhase==player&&get.cardCount(true,player)==1; - }, - content:function(){ - var type=get.type(trigger.card); - var card=get.cardPile(function(card){ - return get.type(card)==type; - }); - if(card){ - player.gain(card,'gain2','log'); - } - }, - ai:{ - threaten:1.1 - } - }, - kuixin_old:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - var nh=player.countCards('h'); - var nm=1; - return game.hasPlayer(function(current){ - if(current!=player&&Math.abs(current.countCards('h')-nh)<=nm){ - return true; - } - }); - }, - content:function(){ - 'step 0' - var nh=player.countCards('h'); - var nm=1; - var check=true; - if(player.countCards('h','tao')){ - check=false; - } - else if(player.countCards('h','shan')&&player.countCards('h','wuxie')){ - check=false; - } - player.chooseTarget(get.prompt('kuixin'),function(card,player,target){ - return target!=player&&Math.abs(target.countCards('h')-nh)<=nm; - }).ai=function(target){ - if(!check) return 0; - if(get.attitude(player,target)<0){ - return target.countCards('h')-nh; - } - return 0; - }; - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('kuixin',result.targets); - var cards0=target.getCards('h'); - var cards1=player.getCards('h'); - target.gain(cards1,player); - player.gain(cards0,target); - target.$give(cards0.length,player); - player.$give(cards1.length,target); - } - }, - ai:{ - expose:0.2, - threaten:1.5 - } - }, - hswuji:{ - trigger:{player:'phaseUseEnd'}, - frequent:true, - filter:function(event,player){ - return get.cardCount(true,player)>0; - }, - content:function(){ - player.draw(get.cardCount(true,player)); - }, - ai:{ - threaten:1.3 - } - }, - bingshuang:{ - trigger:{source:'damageEnd'}, - filter:function(event,player){ - return event.card&&get.type(event.card)=='trick'&& - event.player.isAlive()&&!event.player.isTurnedOver(); - }, - check:function(event,player){ - if(event.player.isTurnedOver()){ - return get.attitude(player,event.player)>0; - } - return get.attitude(player,event.player)<=0; - }, - logTarget:'player', - content:function(){ - trigger.player.draw(2); - trigger.player.turnOver(); - } - }, - yanshu:{ - trigger:{player:'discardAfter'}, - frequent:true, - usable:1, - filter:function(event,player){ - if(!event.cards) return false; - for(var i=0;i0; - }, - content:function(){ - trigger.player.recover(); - player.addTempSkill('shengyan2','phaseAfter'); - }, - ai:{ - expose:0.2 - } - }, - shengyan2:{}, - liechao:{ - enable:'phaseUse', - usable:1, - alter:true, - filter:function(event,player){ - return !player.isTurnedOver()&&player.countCards('h')<=player.hp; - }, - content:function(){ - player.draw(get.is.altered('liechao')?3:4); - player.turnOver(); - player.skip('phaseDiscard'); - }, - ai:{ - order:10, - result:{ - player:1 - } - } - }, - qingliu:{ - trigger:{player:'damageBefore'}, - filter:function(event){ - return event.nature=='fire'; - }, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - nofire:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'fireDamage')) return 0; - } - } - } - }, - zhongjia:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event){ - return event.num>0; - }, - content:function(){ - player.changeHujia(); - }, - ai:{ - nohujia:true, - skillTagFilter:function(player){ - return player.hp>player.countCards('h'); - }, - threaten:function(player,target){ - if(!target.hujia) return 0.8; - }, - effect:{ - target:function(card,player){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-1]; - return 0.8; - } - } - } - } - }, - dunji:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.hujia?true:false; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - selectTarget:function(){ - return [1,_status.event.player.hujia]; - }, - contentBefore:function(){ - player.changeHujia(-player.hujia); - }, - content:function(){ - target.damage(); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - var eff=get.damageEffect(target,player,target)+0.5; - if(eff>0&&eff<=0.5) return 0; - return eff; - } - } - } - }, - fengxing:{ - trigger:{player:'loseEnd'}, - direct:true, - filter:function(event,player){ - return _status.currentPhase!=player&&!player.hasSkill('fengxing2')&&player.countCards('he')>0; - }, - content:function(){ - 'step 0' - if(!event.isMine()) game.delay(0.5); - 'step 1' - player.addTempSkill('fengxing2','phaseAfter'); - player.chooseToDiscard('he',get.prompt('fengxing')).set('ai',function(card){ - return 7-get.value(card); - }).logSkill='fengxing'; - 'step 2' - if(result.bool){ - player.draw(2); - } - }, - ai:{ - threaten:0.6 - } - }, - fengxing2:{}, - fengxian:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target.countCards('h')>0; - }, - selectTarget:-1, - content:function(){ - target.chooseToDiscard(true); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - var nh=target.countCards('h'); - switch(nh){ - case 0:return 0; - case 1:return -1.5; - case 2:return -1.3; - case 3:return -1; - default:return -0.8; - } - } - } - } - }, - qiaodong:{ - enable:['chooseToRespond'], - filterCard:{type:'equip'}, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - viewAs:{name:'shan'}, - position:'he', - prompt:'将一张装备牌当闪使用或打出', - check:function(){return 1}, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - if(!player.countCards('he',{type:'equip'})) return false; - } - } - }, - hsmengjing_mengye:{ - trigger:{player:'phaseEnd'}, - forced:true, - priority:-1, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - player.discard(player.getCards('he')); - player.removeSkill('hsmengjing_mengye'); - }, - mark:'image', - intro:{ - content:'结束阶段,弃置所有牌' - } - }, - zhanhou:{ - enable:'phaseUse', - filterCard:{subtype:'equip2'}, - position:'he', - filter:function(event,player){ - return player.countCards('he',{subtype:'equip2'})>0; - }, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - player.changeHujia(); - }, - ai:{ - order:9.5, - result:{ - player:1 - } - }, - // mod:{ - // globalFrom:function(from,to,distance){ - // return distance-from.hujia; - // } - // }, - }, - shijie:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h'); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('shijie'),function(card,player,target){ - return player!=target&&target.countCards('h')>0; - }).ai=function(target){ - return 11-get.attitude(player,target); - }; - 'step 1' - if(result.bool){ - player.logSkill('shijie',result.targets); - var target=result.targets[0]; - var card=target.getCards('h').randomGet() - player.gain(card,target); - event.target=target; - target.$giveAuto(card,player); - event.target.draw(); - } - }, - ai:{ - expose:0.1 - } - }, - shengguang:{ - enable:'phaseUse', - filterCard:{color:'red'}, - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0; - }, - position:'he', - usable:1, - check:function(card){ - return 9-get.value(card) - }, - filterTarget:function(card,player,target){ - if(player.storage.anying) return true; - if(target.hp>=target.maxHp) return false; - return true; - }, - content:function(){ - if(player.storage.anying){ - target.loseHp(); - } - else{ - target.recover(); - } - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(player.storage.anying) return -1; - if(target.hp==1) return 5; - if(player==target&&player.countCards('h')>player.hp) return 5; - return 2; - } - }, - threaten:2, - expose:0.2 - } - }, - xinci:{ - enable:'phaseUse', - filterCard:{color:'black'}, - filter:function(event,player){ - return player.countCards('he',{color:'black'})>0; - }, - position:'he', - usable:1, - mark:true, - intro:{ - content:'已进入暗影形态' - }, - check:function(card){ - return 9-get.value(card) - }, - filterTarget:true, - content:function(){ - target.loseHp(); - }, - ai:{ - order:9, - result:{ - target:-1 - }, - threaten:2, - expose:0.2 - } - }, - anying:{ - unique:true, - enable:'phaseUse', - skillAnimation:'epic', - animationColor:'thunder', - derivation:'xinci', - filter:function(event,player){ - return !player.storage.anying&&player.countCards('he',{color:'black'})>1; - }, - filterCard:{color:'black'}, - position:'he', - check:function(card){ - return 5-get.value(card); - }, - content:function(){ - player.storage.anying=true; - player.awakenSkill('anying'); - player.removeSkill('shengguang'); - player.addSkill('xinci'); - }, - ai:{ - order:1, - result:{ - player:function(player){ - if(player.hasUnknown()) return 0; - return !game.hasPlayer(function(current){ - return get.attitude(player,current)>0&¤t.isDamaged()&¤t.hp<=2; - }); - } - } - } - }, - bianxing:{ - trigger:{global:'useCard'}, - filter:function(event,player){ - if(player.hasSkill('bianxing2')) return false; - if(event.player==player) return false; - if(_status.currentPhase!=event.player) return false; - if(!event.targets) return false; - if(event.targets.length!=1) return false; - if(event.targets[0]==event.player) return false; - var hs=player.getCards('h'); - for(var i=0;i=0) return 0; - if(card.name=='tao'||card.name=='caoyao'){ - if(trigger.targets[0].hp==trigger.targets[0].maxHp) return 0; - } - if(eff>=0) return 0; - return get.effect(trigger.targets[0],card,trigger.player,player); - }; - 'step 1' - if(result.bool){ - var card=result.cards[0]; - player.lose(result.cards); - event.cards=result.cards; - player.logSkill('bianxing',trigger.player); - game.log(player,'将',trigger.card,'变为',result.cards); - game.delay(0.5); - trigger.untrigger(); - trigger.card=card; - trigger.cards=[card]; - player.addTempSkill('bianxing2','phaseAfter'); - } - else{ - event.finish(); - } - 'step 2' - player.$throw(event.cards); - game.delay(); - 'step 3' - // player.draw(); - 'step 4' - trigger.trigger('useCard'); - }, - ai:{ - expose:0.2, - threaten:1.8 - } - }, - bingjia:{ - enable:'phaseUse', - filter:function(event,player){ - return !player.hasSkill('bingjia2'); - }, - filterCard:true, - check:function(card){ - return 6-get.value(card); - }, - discard:false, - prepare:function(cards,player){ - player.$give(1,player,false); - }, - content:function(){ - player.storage.bingjia=cards[0]; - player.addSkill('bingjia2'); - game.addVideo('storage',player,['bingjia',get.cardInfo(cards[0]),'card']); - }, - ai:{ - order:1, - result:{ - player:1 - } - } - }, - bingjia2:{ - mark:true, - trigger:{target:'useCardToBegin'}, - forced:true, - filter:function(event,player){ - return event.player!=player&&get.suit(event.card)==get.suit(player.storage.bingjia); - }, - content:function(){ - 'step 0' - player.showCards([player.storage.bingjia],get.translation(player)+'发动了【冰甲】'); - player.removeSkill('bingjia2'); - game.addVideo('storage',player,['bingjia',null]); - 'step 1' - ui.discardPile.appendChild(player.storage.bingjia); - delete player.storage.bingjia; - player.changeHujia(); - player.addTempSkill('bingjia3','phaseAfter'); - }, - intro:{ - mark:function(dialog,content,player){ - if(player==game.me||player.isUnderControl()){ - dialog.add([player.storage.bingjia]); - } - else{ - return '已发动冰甲'; - } - }, - content:function(content,player){ - if(player==game.me||player.isUnderControl()){ - return get.translation(player.storage.bingjia); - } - return '已发动冰甲'; - } - } - }, - bingjia3:{ - trigger:{player:'damageBefore'}, - mark:true, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - nofire:true, - nothunder:true, - nodamage:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'damage')) return [0,0]; - } - }, - }, - intro:{ - content:'防止所有伤害' - } - }, - bianxing2:{}, - zuzhou:{ - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - if(!player.countCards('h',{suit:'spade'})) return false; - return !game.hasPlayer(function(current){ - return current.hasJudge('shandian'); - }); - }, - forced:true, - check:function(){ - return false; - }, - content:function(){ - 'step 0' - var card=get.cardPile('shandian',true); - if(card){ - player.addJudge(card); - player.$draw(card); - game.delay(); - } - else{ - event.finish(); - } - 'step 1' - game.delay(); - }, - ai:{ - threaten:1.5 - } - }, - mdzhoufu:{ - enable:'phaseUse', - filterCard:{color:'black'}, - filter:function(event,player){ - return player.countCards('h',{color:'black'})>0; - }, - filterTarget:function(card,player,target){ - return player!=target&&!target.hasSkill('mdzhoufu2'); - }, - prepare:'throw', - discard:false, - content:function(){ - target.$gain2(cards); - target.storage.mdzhoufu2=cards[0]; - target.addSkill('mdzhoufu2'); - target.storage.mdzhoufu3=player; - game.addVideo('storage',target,['mdzhoufu2',get.cardInfo(cards[0]),'card']); - ui.special.appendChild(cards[0]); - }, - check:function(card){ - if(get.suit(card)=='spade'&&card.number>=2&&card.number<=9){ - return 6-get.value(card); - } - return -1; - }, - ai:{ - tag:{ - rejudge:0.1, - }, - threaten:1.5, - expose:0.1, - order:10, - result:{ - target:-1 - } - } - }, - mdzhoufu2:{ - trigger:{player:'judge'}, - forced:true, - priority:10, - mark:'card', - content:function(){ - "step 0" - ui.discardPile.appendChild(player.storage.mdzhoufu2); - player.$throw(player.storage.mdzhoufu2); - if(player.storage.mdzhoufu2.clone){ - player.storage.mdzhoufu2.clone.classList.add('thrownhighlight'); - game.addVideo('highlightnode',player,get.cardInfo(player.storage.mdzhoufu2)); - } - if(player.storage.mdzhoufu3.isAlive()){ - // player.storage.mdzhoufu3.draw(); - player.storage.mdzhoufu3.gain(player.judging[0]); - player.storage.mdzhoufu3.$gain2(player.judging[0]); - } - else{ - ui.discardPile.appendChild(player.judging[0]); - game.delay(1.5); - } - player.removeSkill('mdzhoufu2'); - "step 1" - player.judging[0]=player.storage.mdzhoufu2; - trigger.position.appendChild(player.storage.mdzhoufu2); - // trigger.untrigger(); - game.log(player,'的判定牌改为',player.storage.mdzhoufu2); - delete player.storage.mdzhoufu2; - delete player.storage.mdzhoufu3; - }, - intro:{ - content:'card' - }, - }, - zuzhou_old:{ - trigger:{player:'damageEnd',source:'damageEnd'}, - check:function(event,player){ - var target=(player==event.player)?event.source:event.player; - return get.attitude(player,target)<0; - }, - filter:function(event,player){ - var target=(player==event.player)?event.source:event.player; - return target.isAlive(); - }, - prompt:function(event,player){ - var target=(player==event.player)?event.source:event.player; - return get.prompt('zuzhou',target); - }, - content:function(){ - "step 0" - event.target=(player==trigger.player)?trigger.source:trigger.player; - event.target.judge(function(card){ - return get.color(card)=='black'?-1:0; - }); - "step 1" - if(result.color=='black'){ - event.target.loseHp(); - } - }, - ai:{ - expose:0.1, - threaten:1.3 - } - }, - xianzhi:{ - trigger:{global:'judgeBegin'}, - frequent:true, - filter:function(){ - return ui.cardPile.childNodes.length>1; - }, - check:function(){ - return false; - }, - content:function(){ - 'step 0' - var str=''; - if(trigger.card) str=get.translation(trigger.card.viewAs||trigger.card.name); - else if(trigger.skill) str=get.translation(trigger.skill); - else str=get.translation(trigger.parent.name); + }, + yulu:{ + enable:'phaseUse', + usable:1, + filterTarget:true, + selectTarget:[1,Infinity], + content:function(){ + 'step 0' + if(target==targets[0]){ + game.asyncDraw(targets); + } + 'step 1' + if(target==targets[0]){ + game.delay(); + } + 'step 2' + target.chooseToDiscard('hej',true); + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(target.countCards('j')) return 2; + switch(target.countCards('he')){ + case 0:return 0; + case 1:return 0.5; + case 2:return 0.8; + default:return 1; + } + } + }, + threaten:1.2 + } + }, + duzhang:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + var stat=player.getStat('card'); + for(var i in stat){ + if(typeof stat[i]=='number'&&get.type(i,'trick')=='trick'){ + return false; + } + } + return true; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('duzhang'),function(card,player,target){ + return target!=player; + }).ai=function(target){ + return -get.attitude(player,target)*Math.sqrt(target.countCards('h')); + } + 'step 1' + if(result.bool){ + player.logSkill('duzhang',result.targets); + result.targets[0].addTempSkill('duzhang2',{player:'phaseAfter'}); + } + } + }, + duzhang2:{ + mod:{ + cardEnabled:function(card){ + if(get.type(card,'trick')=='trick') return false; + } + }, + mark:true, + marktext:'瘴', + intro:{ + content:'下个回合无法使用锦囊牌' + } + }, + hannu:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + var nh=player.countCards('h'); + if(nh){ + player.draw(nh); + } + else{ + event.finish(); + } + 'step 1' + var hs=player.getCards('h'); + if(hs.length>10&&hs.length>player.hp){ + player.discard(hs.randomGets(hs.length-player.hp)); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(!target.hasFriend()) return; + var nh=target.countCards('h'); + if(nh>5) return [1,-1]; + if(nh<=1) return [1,-0.1]; + if(nh==2){ + if(target.hp>=2) return [1,0.1]; + } + else{ + if(target.hp>=4) return [1,2]; + if(target.hp==3) return [1,1.5]; + if(target.hp==2) return [1,0.5]; + } + } + } + } + } + }, + chuidiao:{ + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + var num=Math.floor(Math.random()*3); + if(num) player.draw(num); + }, + }, + hhudun:{ + trigger:{global:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return !player.hujia; + }, + content:function(){ + player.changeHujia(); + }, + group:'hhudun_hujia', + subSkill:{ + hujia:{ + trigger:{player:'damageZero'}, + filter:function(event){ + return event.hujia; + }, + forced:true, + content:function(){ + player.draw(); + } + } + }, + ai:{ + threaten:function(player,target){ + if(target.hujia){ + return 0.5; + } + else{ + return 2; + } + } + } + }, + fenlie:{ + audio:2, + forced:true, + trigger:{player:'gainAfter'}, + filter:function(event,player){ + if(event.parent.parent.name=='phaseDraw') return false; + if(event.parent.name=='fenlie') return false; + if(!event.cards) return false; + for(var i=0;i3000&&event.player.countCards('he')>0&&event.player.isAlive(); + }, + content:function(){ + player.line(trigger.player,'green'); + trigger.player.chooseToDiscard('he',true,Math.floor(trigger.player.storage.shixu/3000)); + delete trigger.player.storage.shixu; + } + } + } + }, + jixuan:{ + trigger:{player:'phaseAfter'}, + forced:true, + priority:-50, + filter:function(event,player){ + return event.skill!='jixuan'; + }, + content:function(){ + player.draw(); + player.insertPhase(); + }, + ai:{ + threaten:1.8 + }, + }, + qianghua:{ + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + if(event.parent.name=='qianghua') return false; + if(player.storage.qianghua>=1) return false; + if(_status.currentPhase!=player) return false; + if(event.parent.parent.name!='phaseUse') return false; + if(!event.targets||!event.card) return false; + if(get.info(event.card).complexTarget) return false; + if(!lib.filter.cardEnabled(event.card,player,event.parent)) return false; + var type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); + var targets=event._targets||event.targets; + for(var i=0;i0&& + event.targets.contains(player)==false&&event.targets.length==1; + }, + direct:true, + content:function(){ + "step 0" + var effect=0; + for(var i=0;i0; + }, + content:function(){ + trigger.num--; + player.removeSkill('stuxi2'); + } + }, + bingdong:{ + trigger:{source:'damageEnd'}, + forced:true, + usable:1, + filter:function(event,player){ + if(!lib.card.hslingjian_jinjilengdong){ + return false; + } + return true; + }, + content:function(){ + player.gain(game.createCard('hslingjian_jinjilengdong'),'gain2'); + } + }, + bingdong_old:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.isTurnedOver(); + }, + filterTarget:function(card,player,target){ + return !target.isTurnedOver()&&player!=target; + }, + content:function(){ + 'step 0' + if(!player.isTurnedOver()){ + player.turnOver(); + } + 'step 1' + if(!target.isTurnedOver()){ + target.turnOver(); + } + }, + ai:{ + order:1, + expose:0.2, + result:{ + target:function(player,target){ + if(get.attitude(player,target)<-3&&player.identity!='zhu'){ + return -1; + } + return 0; + } + } + } + }, + luoshi:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return player.countCards('he')>0||(event.source&&event.source.countCards('he')>0); + }, + content:function(){ + 'step 0' + var hs=player.getCards('he'); + if(hs.length){ + player.discard(hs.randomGet()) + } + 'step 1' + if(trigger.source){ + var hs=trigger.source.getCards('he'); + if(hs.length){ + trigger.source.discard(hs.randomGet()) + } + } + } + }, + ronghuo:{ + trigger:{player:'useCardToBefore'}, + priority:7, + filter:function(event,player){ + if(event.card.name=='sha'&&!event.card.nature) return true; + }, + check:function(event,player){ + var att=get.attitude(player,event.target); + if(event.target.hasSkillTag('nofire')){ + return att>0; + } + return att<=0; + }, + forced:true, + content:function(){ + trigger.card.nature='fire'; + player.addSkill('ronghuo2'); + player.storage.ronghuo=trigger.card; + } + }, + ronghuo2:{ + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + content:function(){ + delete player.storage.ronghuo.nature; + } + }, + fushi:{ + enable:'phaseUse', + filterTarget:function(card,player,target){ + return target.hp1){ + if(target.hp<=1) att+=2; + if(target.hp<=2) att++; + } + return att; + }; + 'step 1' + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('jiaohui',event.target); + event.target.chooseDrawRecover(true); + } + }, + }, + chenshui:{ + trigger:{player:'phaseEnd'}, + frequent:true, + content:function(){ + var list=['hsmengjing_feicuiyoulong','hsmengjing_huanxiaojiemei', + 'hsmengjing_suxing','hsmengjing_mengye','hsmengjing_mengjing']; + player.gain(game.createCard(list.randomGet())); + player.$draw(); + }, + ai:{ + threaten:2 + } + }, + liehun:{ + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player.hasCard(function(card){ + return get.type(card)!='basic'&&!get.info(card).unique; + }); + }, + content:function(){ + var hs=player.getCards('h'); + for(var i=0;i0){ + if(target==player){ + num++; + } + if(target.hp==1){ + num+=3; + } + else if(target.hp==2){ + num+=1; + } + } + return num; + } + "step 1" + if(result.bool){ + player.logSkill('lingzhou',result.targets); + result.targets[0].chooseDrawRecover(true); + } + }, + ai:{ + expose:0.2, + threaten:1.5, + noautowuxie:true, + } + }, + mieshi:{ + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + event.target=game.filterPlayer().randomGet(player); + if(!event.target){ + event.finish(); + return; + } + player.line(event.target,'fire'); + game.delayx(); + 'step 2' + event.target.damage('fire'); + } + }, + xmojian:{ + trigger:{player:'turnOverAfter'}, + direct:true, + filter:function(event,player){ + return !player.isTurnedOver(); + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('xmojian'),function(card,player,target){ + return lib.filter.targetEnabled({name:'sha'},player,target); + }).ai=function(target){ + return get.effect(target,{name:'sha'},player); + } + "step 1" + if(result.bool){ + player.logSkill('xmojian'); + player.useCard({name:'sha'},result.targets,false); + } + }, + ai:{ + expose:0.2, + } + }, + xshixin:{ + trigger:{source:'damageEnd'}, + forced:true, + alter:true, + filter:function(event,player){ + if(get.is.altered('xshixin')&&event.player.hp0){ + if(num>3){ + num=3; + } + if(get.is.altered('enze')&&num>2){ + num=2; + } + target.draw(num); + } + else if(num<0){ + if(get.is.altered('enze')&&num<-2){ + num=-2; + } + target.chooseToDiscard(-num,true); + } + }, + ai:{ + threaten:1.8, + order:function(name,player){ + var max=true,num=0; + var players=game.filterPlayer(); + for(var i=0;inum){ + if(att>0){ + max=true; + } + else if(att<0){ + max=false; + } + num=att*dh; + } + } + if(max) return 10; + return 0.5; + }, + result:{ + player:function(player,target){ + return (player.countCards('h')-target.countCards('h'))*get.attitude(player,target); + } + }, + expose:0.2 + } + }, + chongsheng:{ + unique:true, + enable:'chooseToUse', + mark:true, + init:function(player){ + player.storage.chongsheng=2; + player.syncStorage('chongsheng'); + }, + filter:function(event,player){ + if(event.type!='dying') return false; + if(player!=event.dying) return false; + if(player.storage.chongsheng<=0) return false; + return true; + }, + content:function(){ + 'step 0' + player.hp=Math.min(player.storage.chongsheng,player.maxHp); + player.discard(player.getCards('hej')); + player.draw(player.storage.chongsheng); + player.storage.chongsheng--; + if(player.storage.chongsheng<=0){ + player.unmarkSkill('chongsheng'); + } + 'step 1' + if(player.isLinked()) player.link(); + 'step 2' + if(player.isTurnedOver()) player.turnOver(); + player.syncStorage('chongsheng'); + }, + ai:{ + skillTagFilter:function(player){ + if(player.storage.chongsheng<=0) return false; + if(player.hp>0) return false; + }, + save:true, + result:{ + player:10 + }, + threaten:function(player,target){ + if(target.storage.chongsheng>0) return 0.6; + } + }, + intro:{ + content:'time' + } + }, + guozai:{ + enable:'phaseUse', + usable:1, + alter:true, + filter:function(event,player){ + return player.countCards('h')<(get.is.altered('guozai')?3:4); + }, + init:function(player){ + player.storage.guozai2=0; + }, + content:function(){ + var num=(get.is.altered('guozai')?3:4)-player.countCards('h'); + player.draw(num); + player.addSkill('guozai2'); + player.storage.guozai2+=num; + game.addVideo('storage',player,['guozai2',player.storage.guozai2]); + }, + ai:{ + order:1, + result:{ + player:1 + } + } + }, + guozai2:{ + mark:true, + intro:{ + content:'结束阶段需弃置&张牌' + }, + trigger:{player:'phaseUseEnd'}, + forced:true, + content:function(){ + player.chooseToDiscard('he',true,player.storage.guozai2); + player.storage.guozai2=0; + player.removeSkill('guozai2'); + } + }, + guozaix:{ + enable:'phaseUse', + usable:2, + filter:function(event,player){ + return player.countCards('h')<4; + }, + init:function(player){ + player.storage.guozaix2=0; + }, + content:function(){ + var num=4-player.countCards('h'); + player.draw(num); + player.addSkill('guozaix2'); + player.storage.guozaix2+=num; + game.addVideo('storage',player,['guozaix2',player.storage.guozaix2]); + }, + ai:{ + order:1, + result:{ + player:1 + } + } + }, + guozaix2:{ + mark:true, + intro:{ + content:'结束阶段需弃置&张牌' + }, + trigger:{player:'phaseUseEnd'}, + forced:true, + content:function(){ + player.chooseToDiscard('he',true,player.storage.guozaix2); + player.storage.guozaix2=0; + player.removeSkill('guozaix2'); + } + }, + hanshuang:{ + trigger:{source:'damageEnd'}, + forced:true, + alter:true, + filter:function(event,player){ + return event.card&&get.color(event.card)=='black'&& + !event.player.isTurnedOver()&&event.player.isAlive(); + }, + content:function(){ + trigger.player.turnOver(); + if(get.is.altered('hanshuang')) trigger.player.draw(); + player.loseHp(); + }, + ai:{ + threaten:1.5, + effect:{ + player:function(card,player,target,current){ + if(get.color(card)=='black'&&get.tag(card,'damage')){ + return [1,0,1,-2]; + } + } + } + } + }, + bingshi:{ + global:'bingshi2' + }, + bingshi2:{ + trigger:{global:'dieAfter'}, + forced:true, + globalFixed:true, + filter:function(event,player){ + return event.player.hasSkill('bingshi')&&event.player.isDead(); + }, + content:function(){ + trigger.player.line(player,'thunder'); + player.damage('nosource','thunder').animate=false; + player.$damage(trigger.player); + if(lib.config.animation&&!lib.config.low_performance){ + player.$thunder(); + } + if(!event.parent.parent.bingshi_logv){ + event.parent.parent.bingshi_logv=true; + game.logv(trigger.player,'bingshi',game.filterPlayer(),event.parent.parent); + } + } + }, + huanwu:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return !target.storage.huanwu; + }, + content:function(){ + target.gainMaxHp(); + target.recover(); + target.draw(2); + target.storage.huanwu=true; + target.mark('huanwu',{ + name:'唤雾', + content:'已发动' + }); + game.addVideo('mark',target,{ + name:'唤雾', + content:'已发动', + id:'huanwu' + }); + }, + ai:{ + threaten:1.2, + result:{ + target:function(player,target){ + return 1/target.hp; + } + }, + order:10, + expose:0.3 + } + }, + fengnu:{ + mod:{ + cardUsable:function(card){ + if(get.info(card)&&get.info(card).forceUsable) return; + return Infinity; + }, + targetInRange:function(){ + if(!get.is.altered('fengnu')) return true; + } + }, + alter:true, + trigger:{player:'useCard'}, + filter:function(event,player){ + if(_status.currentPhase!=player) return false; + return get.cardCount(event.card,player)>1; + }, + forced:true, + usable:3, + content:function(){ + player.draw(); + } + }, + shengdun:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return !player.hujia; + }, + content:function(){ + player.changeHujia(); + player.update(); + }, + }, + shengdun_old:{ + trigger:{player:'phaseBegin'}, + forced:true, + silent:true, + popup:false, + priority:10, + init2:function(player){ + player.markSkill('shengdun'); + }, + content:function(){ + if(player.storage.shengdun){ + player.markSkill('shengdun'); + } + player.storage.shengdun=false; + }, + intro:{ + content:'未发动' + }, + group:'shengdun2' + }, + shengdun_old2:{ + trigger:{player:'damageBegin'}, + forced:true, + filter:function(event,player){ + return event.num>0&&!player.storage.shengdun; + }, + content:function(){ + trigger.num--; + player.storage.shengdun=true; + player.unmarkSkill('shengdun'); + } + }, + jingmeng:{ + trigger:{player:'useCard'}, + frequent:true, + filter:function(event,player){ + return _status.currentPhase==player&&get.cardCount(true,player)==1; + }, + content:function(){ + var type=get.type(trigger.card); + var card=get.cardPile(function(card){ + return get.type(card)==type; + }); + if(card){ + player.gain(card,'gain2','log'); + } + }, + ai:{ + threaten:1.1 + } + }, + kuixin_old:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + var nh=player.countCards('h'); + var nm=1; + return game.hasPlayer(function(current){ + if(current!=player&&Math.abs(current.countCards('h')-nh)<=nm){ + return true; + } + }); + }, + content:function(){ + 'step 0' + var nh=player.countCards('h'); + var nm=1; + var check=true; + if(player.countCards('h','tao')){ + check=false; + } + else if(player.countCards('h','shan')&&player.countCards('h','wuxie')){ + check=false; + } + player.chooseTarget(get.prompt('kuixin'),function(card,player,target){ + return target!=player&&Math.abs(target.countCards('h')-nh)<=nm; + }).ai=function(target){ + if(!check) return 0; + if(get.attitude(player,target)<0){ + return target.countCards('h')-nh; + } + return 0; + }; + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('kuixin',result.targets); + var cards0=target.getCards('h'); + var cards1=player.getCards('h'); + target.gain(cards1,player); + player.gain(cards0,target); + target.$give(cards0.length,player); + player.$give(cards1.length,target); + } + }, + ai:{ + expose:0.2, + threaten:1.5 + } + }, + hswuji:{ + trigger:{player:'phaseUseEnd'}, + frequent:true, + filter:function(event,player){ + return get.cardCount(true,player)>0; + }, + content:function(){ + player.draw(get.cardCount(true,player)); + }, + ai:{ + threaten:1.3 + } + }, + bingshuang:{ + trigger:{source:'damageEnd'}, + filter:function(event,player){ + return event.card&&get.type(event.card)=='trick'&& + event.player.isAlive()&&!event.player.isTurnedOver(); + }, + check:function(event,player){ + if(event.player.isTurnedOver()){ + return get.attitude(player,event.player)>0; + } + return get.attitude(player,event.player)<=0; + }, + logTarget:'player', + content:function(){ + trigger.player.draw(2); + trigger.player.turnOver(); + } + }, + yanshu:{ + trigger:{player:'discardAfter'}, + frequent:true, + usable:1, + filter:function(event,player){ + if(!event.cards) return false; + for(var i=0;i0; + }, + content:function(){ + trigger.player.recover(); + player.addTempSkill('shengyan2','phaseAfter'); + }, + ai:{ + expose:0.2 + } + }, + shengyan2:{}, + liechao:{ + enable:'phaseUse', + usable:1, + alter:true, + filter:function(event,player){ + return !player.isTurnedOver()&&player.countCards('h')<=player.hp; + }, + content:function(){ + player.draw(get.is.altered('liechao')?3:4); + player.turnOver(); + player.skip('phaseDiscard'); + }, + ai:{ + order:10, + result:{ + player:1 + } + } + }, + qingliu:{ + trigger:{player:'damageBefore'}, + filter:function(event){ + return event.nature=='fire'; + }, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'fireDamage')) return 0; + } + } + } + }, + zhongjia:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event){ + return event.num>0; + }, + content:function(){ + player.changeHujia(); + }, + ai:{ + nohujia:true, + skillTagFilter:function(player){ + return player.hp>player.countCards('h'); + }, + threaten:function(player,target){ + if(!target.hujia) return 0.8; + }, + effect:{ + target:function(card,player){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-1]; + return 0.8; + } + } + } + } + }, + dunji:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.hujia?true:false; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + selectTarget:function(){ + return [1,_status.event.player.hujia]; + }, + contentBefore:function(){ + player.changeHujia(-player.hujia); + }, + content:function(){ + target.damage(); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + var eff=get.damageEffect(target,player,target)+0.5; + if(eff>0&&eff<=0.5) return 0; + return eff; + } + } + } + }, + fengxing:{ + trigger:{player:'loseEnd'}, + direct:true, + filter:function(event,player){ + return _status.currentPhase!=player&&!player.hasSkill('fengxing2')&&player.countCards('he')>0; + }, + content:function(){ + 'step 0' + if(!event.isMine()) game.delay(0.5); + 'step 1' + player.addTempSkill('fengxing2','phaseAfter'); + player.chooseToDiscard('he',get.prompt('fengxing')).set('ai',function(card){ + return 7-get.value(card); + }).logSkill='fengxing'; + 'step 2' + if(result.bool){ + player.draw(2); + } + }, + ai:{ + threaten:0.6 + } + }, + fengxing2:{}, + fengxian:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.countCards('h')>0; + }, + selectTarget:-1, + content:function(){ + target.chooseToDiscard(true); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + var nh=target.countCards('h'); + switch(nh){ + case 0:return 0; + case 1:return -1.5; + case 2:return -1.3; + case 3:return -1; + default:return -0.8; + } + } + } + } + }, + qiaodong:{ + enable:['chooseToRespond'], + filterCard:{type:'equip'}, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + viewAs:{name:'shan'}, + position:'he', + prompt:'将一张装备牌当闪使用或打出', + check:function(){return 1}, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(!player.countCards('he',{type:'equip'})) return false; + } + } + }, + hsmengjing_mengye:{ + trigger:{player:'phaseEnd'}, + forced:true, + priority:-1, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + player.discard(player.getCards('he')); + player.removeSkill('hsmengjing_mengye'); + }, + mark:'image', + intro:{ + content:'结束阶段,弃置所有牌' + } + }, + zhanhou:{ + enable:'phaseUse', + filterCard:{subtype:'equip2'}, + position:'he', + filter:function(event,player){ + return player.countCards('he',{subtype:'equip2'})>0; + }, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + player.changeHujia(); + }, + ai:{ + order:9.5, + result:{ + player:1 + } + }, + // mod:{ + // globalFrom:function(from,to,distance){ + // return distance-from.hujia; + // } + // }, + }, + shijie:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h'); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('shijie'),function(card,player,target){ + return player!=target&&target.countCards('h')>0; + }).ai=function(target){ + return 11-get.attitude(player,target); + }; + 'step 1' + if(result.bool){ + player.logSkill('shijie',result.targets); + var target=result.targets[0]; + var card=target.getCards('h').randomGet() + player.gain(card,target); + event.target=target; + target.$giveAuto(card,player); + event.target.draw(); + } + }, + ai:{ + expose:0.1 + } + }, + shengguang:{ + enable:'phaseUse', + filterCard:{color:'red'}, + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0; + }, + position:'he', + usable:1, + check:function(card){ + return 9-get.value(card) + }, + filterTarget:function(card,player,target){ + if(player.storage.anying) return true; + if(target.hp>=target.maxHp) return false; + return true; + }, + content:function(){ + if(player.storage.anying){ + target.loseHp(); + } + else{ + target.recover(); + } + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(player.storage.anying) return -1; + if(target.hp==1) return 5; + if(player==target&&player.countCards('h')>player.hp) return 5; + return 2; + } + }, + threaten:2, + expose:0.2 + } + }, + xinci:{ + enable:'phaseUse', + filterCard:{color:'black'}, + filter:function(event,player){ + return player.countCards('he',{color:'black'})>0; + }, + position:'he', + usable:1, + mark:true, + intro:{ + content:'已进入暗影形态' + }, + check:function(card){ + return 9-get.value(card) + }, + filterTarget:true, + content:function(){ + target.loseHp(); + }, + ai:{ + order:9, + result:{ + target:-1 + }, + threaten:2, + expose:0.2 + } + }, + anying:{ + unique:true, + enable:'phaseUse', + skillAnimation:'epic', + animationColor:'thunder', + derivation:'xinci', + filter:function(event,player){ + return !player.storage.anying&&player.countCards('he',{color:'black'})>1; + }, + filterCard:{color:'black'}, + position:'he', + check:function(card){ + return 5-get.value(card); + }, + content:function(){ + player.storage.anying=true; + player.awakenSkill('anying'); + player.removeSkill('shengguang'); + player.addSkill('xinci'); + }, + ai:{ + order:1, + result:{ + player:function(player){ + if(player.hasUnknown()) return 0; + return !game.hasPlayer(function(current){ + return get.attitude(player,current)>0&¤t.isDamaged()&¤t.hp<=2; + }); + } + } + } + }, + bianxing:{ + trigger:{global:'useCard'}, + filter:function(event,player){ + if(player.hasSkill('bianxing2')) return false; + if(event.player==player) return false; + if(_status.currentPhase!=event.player) return false; + if(!event.targets) return false; + if(event.targets.length!=1) return false; + if(event.targets[0]==event.player) return false; + var hs=player.getCards('h'); + for(var i=0;i=0) return 0; + if(card.name=='tao'||card.name=='caoyao'){ + if(trigger.targets[0].hp==trigger.targets[0].maxHp) return 0; + } + if(eff>=0) return 0; + return get.effect(trigger.targets[0],card,trigger.player,player); + }; + 'step 1' + if(result.bool){ + var card=result.cards[0]; + player.lose(result.cards); + event.cards=result.cards; + player.logSkill('bianxing',trigger.player); + game.log(player,'将',trigger.card,'变为',result.cards); + game.delay(0.5); + trigger.untrigger(); + trigger.card=card; + trigger.cards=[card]; + player.addTempSkill('bianxing2','phaseAfter'); + } + else{ + event.finish(); + } + 'step 2' + player.$throw(event.cards); + game.delay(); + 'step 3' + // player.draw(); + 'step 4' + trigger.trigger('useCard'); + }, + ai:{ + expose:0.2, + threaten:1.8 + } + }, + bingjia:{ + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('bingjia2'); + }, + filterCard:true, + check:function(card){ + return 6-get.value(card); + }, + discard:false, + prepare:function(cards,player){ + player.$give(1,player,false); + }, + content:function(){ + player.storage.bingjia=cards[0]; + player.addSkill('bingjia2'); + game.addVideo('storage',player,['bingjia',get.cardInfo(cards[0]),'card']); + }, + ai:{ + order:1, + result:{ + player:1 + } + } + }, + bingjia2:{ + mark:true, + trigger:{target:'useCardToBegin'}, + forced:true, + filter:function(event,player){ + return event.player!=player&&get.suit(event.card)==get.suit(player.storage.bingjia); + }, + content:function(){ + 'step 0' + player.showCards([player.storage.bingjia],get.translation(player)+'发动了【冰甲】'); + player.removeSkill('bingjia2'); + game.addVideo('storage',player,['bingjia',null]); + 'step 1' + ui.discardPile.appendChild(player.storage.bingjia); + delete player.storage.bingjia; + player.changeHujia(); + player.addTempSkill('bingjia3','phaseAfter'); + }, + intro:{ + mark:function(dialog,content,player){ + if(player==game.me||player.isUnderControl()){ + dialog.add([player.storage.bingjia]); + } + else{ + return '已发动冰甲'; + } + }, + content:function(content,player){ + if(player==game.me||player.isUnderControl()){ + return get.translation(player.storage.bingjia); + } + return '已发动冰甲'; + } + } + }, + bingjia3:{ + trigger:{player:'damageBefore'}, + mark:true, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + nothunder:true, + nodamage:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')) return [0,0]; + } + }, + }, + intro:{ + content:'防止所有伤害' + } + }, + bianxing2:{}, + zuzhou:{ + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + if(!player.countCards('h',{suit:'spade'})) return false; + return !game.hasPlayer(function(current){ + return current.hasJudge('shandian'); + }); + }, + forced:true, + check:function(){ + return false; + }, + content:function(){ + 'step 0' + var card=get.cardPile('shandian',true); + if(card){ + player.addJudge(card); + player.$draw(card); + game.delay(); + } + else{ + event.finish(); + } + 'step 1' + game.delay(); + }, + ai:{ + threaten:1.5 + } + }, + mdzhoufu:{ + enable:'phaseUse', + filterCard:{color:'black'}, + filter:function(event,player){ + return player.countCards('h',{color:'black'})>0; + }, + filterTarget:function(card,player,target){ + return player!=target&&!target.hasSkill('mdzhoufu2'); + }, + prepare:'throw', + discard:false, + content:function(){ + target.$gain2(cards); + target.storage.mdzhoufu2=cards[0]; + target.addSkill('mdzhoufu2'); + target.storage.mdzhoufu3=player; + game.addVideo('storage',target,['mdzhoufu2',get.cardInfo(cards[0]),'card']); + ui.special.appendChild(cards[0]); + }, + check:function(card){ + if(get.suit(card)=='spade'&&card.number>=2&&card.number<=9){ + return 6-get.value(card); + } + return -1; + }, + ai:{ + tag:{ + rejudge:0.1, + }, + threaten:1.5, + expose:0.1, + order:10, + result:{ + target:-1 + } + } + }, + mdzhoufu2:{ + trigger:{player:'judge'}, + forced:true, + priority:10, + mark:'card', + content:function(){ + "step 0" + ui.discardPile.appendChild(player.storage.mdzhoufu2); + player.$throw(player.storage.mdzhoufu2); + if(player.storage.mdzhoufu2.clone){ + player.storage.mdzhoufu2.clone.classList.add('thrownhighlight'); + game.addVideo('highlightnode',player,get.cardInfo(player.storage.mdzhoufu2)); + } + if(player.storage.mdzhoufu3.isAlive()){ + // player.storage.mdzhoufu3.draw(); + player.storage.mdzhoufu3.gain(player.judging[0]); + player.storage.mdzhoufu3.$gain2(player.judging[0]); + } + else{ + ui.discardPile.appendChild(player.judging[0]); + game.delay(1.5); + } + player.removeSkill('mdzhoufu2'); + "step 1" + player.judging[0]=player.storage.mdzhoufu2; + trigger.position.appendChild(player.storage.mdzhoufu2); + // trigger.untrigger(); + game.log(player,'的判定牌改为',player.storage.mdzhoufu2); + delete player.storage.mdzhoufu2; + delete player.storage.mdzhoufu3; + }, + intro:{ + content:'card' + }, + }, + zuzhou_old:{ + trigger:{player:'damageEnd',source:'damageEnd'}, + check:function(event,player){ + var target=(player==event.player)?event.source:event.player; + return get.attitude(player,target)<0; + }, + filter:function(event,player){ + var target=(player==event.player)?event.source:event.player; + return target.isAlive(); + }, + prompt:function(event,player){ + var target=(player==event.player)?event.source:event.player; + return get.prompt('zuzhou',target); + }, + content:function(){ + "step 0" + event.target=(player==trigger.player)?trigger.source:trigger.player; + event.target.judge(function(card){ + return get.color(card)=='black'?-1:0; + }); + "step 1" + if(result.color=='black'){ + event.target.loseHp(); + } + }, + ai:{ + expose:0.1, + threaten:1.3 + } + }, + xianzhi:{ + trigger:{global:'judgeBegin'}, + frequent:true, + filter:function(){ + return ui.cardPile.childNodes.length>1; + }, + check:function(){ + return false; + }, + content:function(){ + 'step 0' + var str=''; + if(trigger.card) str=get.translation(trigger.card.viewAs||trigger.card.name); + else if(trigger.skill) str=get.translation(trigger.skill); + else str=get.translation(trigger.parent.name); - var cards=[ui.cardPile.childNodes[0],ui.cardPile.childNodes[1]]; - var att=get.attitude(player,trigger.player); - var delta=trigger.judge(ui.cardPile.childNodes[1])-trigger.judge(ui.cardPile.childNodes[0]); - player.chooseControl('调换顺序','cancel2', - ui.create.dialog('先知:'+get.translation(trigger.player)+'的'+str+'判定',cards,'hidden')).ai=function(){ - if(att*delta>0) return '调换顺序'; - else return 'cancel2'; - }; - 'step 1' - if(result.control=='调换顺序'){ - var card=ui.cardPile.firstChild; - ui.cardPile.removeChild(card); - ui.cardPile.insertBefore(card,ui.cardPile.firstChild.nextSibling); - game.log(player,'调换了牌堆顶两张牌的顺序'); - } - }, - ai:{ - expose:0.1, - tag:{ - rejudge:0.5 - } - } - }, - jingxiang:{ - trigger:{player:'chooseToRespondBegin'}, - direct:true, - usable:1, - alter:true, - filter:function(event,player){ - if(event.responded) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h'); - }); - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('jingxiang'),function(card,player,target){ - if(target==player) return false; - var nh=target.countCards('h'); - if(nh==0) return false; - if(get.is.altered('jingxiang')){ - return nh<=player.countCards('h'); - } - return true; - }).ai=function(target){ - return 1-get.attitude(player,target); - }; - "step 1" - if(result.bool){ - var target=result.targets[0]; - player.logSkill('jingxiang',target); - event.target=target; - var cards=target.getCards('h'); - player.chooseCardButton('选择'+get.translation(target)+'的一张卡手牌打出',cards).filterButton=function(button){ - return trigger.filterCard(button.link); - } - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - game.log(player,'使用了',event.target,'的手牌'); - event.target.$throw(result.links); - event.target.lose(result.links); - trigger.untrigger(); - trigger.animate=false; - trigger.responded=true; - result.buttons[0].link.remove(); - trigger.result={bool:true,card:result.buttons[0].link} - } - else{ - player.storage.counttrigger.jingxiang--; - } - }, - ai:{ - effect:{ - target:function(card){ - if(get.tag(card,'respondShan')) return 0.4; - if(get.tag(card,'respondSha')) return 0.4; - } - } - }, - }, - wlianji:{ - trigger:{player:'phaseEnd'}, - frequent:true, - filter:function(event,player){ - return get.cardCount(true,player)>player.hp; - }, - content:function(){ - player.draw(2); - }, - init:function(player){player.storage.jingce=true}, - intro:{ - content:function(storage,player){ - if(_status.currentPhase==player) return '已使用'+get.cardCount(true,player)+'张牌'; - } - } - }, - mengun:{ - trigger:{global:'useCardToBefore'}, - priority:12, - filter:function(event,player){ - if(event.player==player) return false; - if(_status.currentPhase!=event.player) return false; - if(event.player.hasSkill('mengun2')) return false; - if(get.itemtype(event.card)!='card') return false; - if(!player.countCards('h',{suit:get.suit(event.card)})) return false; - return get.type(event.card)=='basic'; - }, - direct:true, - content:function(){ - "step 0" - var val=get.value(trigger.card); - var suit=get.suit(trigger.card); - var eff=get.effect(trigger.target,trigger.card,trigger.player,player); - var next=player.chooseToDiscard('是否对'+get.translation(trigger.player)+'使用的'+get.translation(trigger.card)+'发动【闷棍】?',function(card){ - return get.suit(card)==suit; - }); - next.logSkill=['mengun',trigger.player]; - next.ai=function(card){ - if(eff>=0) return 0; - return Math.min(8,1+val)-get.value(card); - } - "step 1" - if(result.bool){ - game.log(trigger.player,'收回了',trigger.cards); - trigger.untrigger(); - trigger.finish(); - game.delay(); - } - else{ - event.finish(); - } - "step 2" - trigger.player.$gain2(trigger.cards); - trigger.player.gain(trigger.cards); - trigger.player.storage.mengun2=trigger.cards[0]; - game.addVideo('storage',player,['mengun2',get.cardInfo(trigger.cards[0]),'card']); - trigger.player.addTempSkill('mengun2','phaseEnd'); - }, - ai:{ - expose:0.2 - } - }, - mengun2:{ - mark:'card', - mod:{ - cardEnabled:function(card,player){ - if(card==player.storage.mengun2) return false; - }, - }, - intro:{ - content:'card', - onunmark:function(storage,player){ - delete player.storage.mengun2; - } - }, - }, - jianren:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.getEquip(1)?true:false; - }, - filterCard:function(card,player){ - return card==player.getEquip(1); - }, - position:'e', - filterTarget:function(card,player,target){ - return target!=player; - }, - selectCard:-1, - selectTarget:-1, - content:function(){ - target.damage(); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target); - } - } - } - }, - jihuo:{ - trigger:{player:'phaseAfter'}, - filter:function(event,player){ - return player.countCards('h')>0&&event.skill!='jihuo'; - }, - direct:true, - priority:-50, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('jihuo')); - next.ai=get.unuseful2; - next.logSkill='jihuo'; - "step 1" - if(result.bool){ - player.insertPhase(); - } - }, - ai:{ - threaten:1.2 - } - }, - tzhenji:{ - trigger:{player:'discardAfter'}, - direct:true, - filter:function(event,player){ - if(player.hasSkill('tzhenji2')){ - return false; - } - if(event.cards){ - for(var i=0;i0; - return get.damageEffect(target,player,player,'thunder')-(bool?1:0); - }; - "step 1" - if(result.bool){ - game.delay(0.5); - var target=result.targets[0]; - player.logSkill('tzhenji',target,'thunder'); - var cs=target.getCards('he'); - if(cs.length){ - target.discard(cs.randomGet()); - } - target.damage('thunder'); - player.addTempSkill('tzhenji2','phaseAfter'); - } - }, - ai:{ - threaten:1.2, - expose:0.3, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'loseCard')&&target.countCards('he')){ - return 0.7; - } - } - }, - } - }, - tzhenji2:{}, - tzhenji_old:{ - trigger:{player:['useCard','respondEnd']}, - filter:function(event){ - return get.suit(event.card)=='spade'; - }, - direct:true, - content:function(){ - "step 0"; - player.chooseTarget(get.prompt('tzhenji_old')).ai=function(target){ - return get.damageEffect(target,player,player,'thunder')-1; - }; - "step 1" - if(result.bool){ - player.logSkill('tzhenji',result.targets,'thunder'); - event.target=result.targets[0]; - event.target.judge(); - } - else{ - event.finish(); - } - "step 2" - if(result.color=='red'){ - event.target.damage('fire'); - } - else{ - event.target.damage('thunder'); - var cs=event.target.getCards('he'); - if(cs.length){ - event.target.discard(cs.randomGet()); - } - cs=player.getCards('he'); - if(cs.length){ - player.discard(cs.randomGet()); - } - } - }, - ai:{ - expose:0.2, - threaten:1.2, - effect_old:{ - target:function(card,player,target){ - if(get.tag(card,'respondShan')){ - var hastarget=game.hasPlayer(function(current){ - return get.attitude(player,current)<0; - }); - var ns=target.countCards('h','shan'); - var nh=target.countCards('h'); - if(ns>1){ - return [0,hastarget?1:0]; - } - if(ns&&nh>=2){ - return [0,0]; - } - if(nh>3){ - return [0,0]; - } - if(nh==0){ - return 1.5; - } - return [1,0.05]; - } - } - } - } - }, - tuteng_s:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - filter:function(event,player){ - var rand=['tuteng1','tuteng2','tuteng3','tuteng4']; - for(var i=0;i=3){ - player.removeSkill(rand2.randomGet()); - } - player.addSkill(rand.randomGet('tuteng1','tuteng3')); - }, - ai:{ - threaten:2 - } - }, - tuteng:{ - enable:'phaseUse', - usable:1, - unique:true, - direct:true, - delay:0, - init:function(){ - for(var i=1;i<=8;i++){ - lib.translate['tuteng'+i+'_info']=lib.skill['tuteng'+i].intro.content; - } - }, - position:'he', - filter:function(event,player){ - var rand=['tuteng1','tuteng2','tuteng3','tuteng4']; - for(var i=0;i1||rand2.length>=4)){ - var dialog=ui.create.dialog(); - for(var i=0;i=4){ - dialog.add('替换一个已有图腾'); - dialog.add([rand2x,'vcard']); - player.chooseButton(dialog,2,true).filterButton=function(button){ - if(ui.selected.buttons.length){ - var current=ui.selected.buttons[0].name; - if(rand.contains(current)){ - return rand2.contains(button.name); - } - else{ - return rand.contains(button.name); - } - } - return true; - }; - } - else{ - player.chooseButton(dialog,true); - } - for(var i=0;i1){ - rand.remove('tuteng1'); - } - player.addSkill(rand.randomGet()); - } - // if(rand2.length>=3){ - // player.removeSkill(rand2.randomGet()); - // } - game.delay(); - event.finish(); - } - } - else{ - event.finish(); - } - 'step 1' - if(result.buttons.length==1){ - player.addSkill(result.buttons[0].name); - } - else if(result.buttons.length==2){ - var skill1=result.buttons[0].name; - var skill2=result.buttons[1].name; - if(player.hasSkill(skill1)){ - player.removeSkill(skill1); - player.addSkill(skill2); - } - else{ - player.removeSkill(skill2); - player.addSkill(skill1); - } - } - }, - ai:{ - order:11, - result:{ - player:1 - }, - effect:function(card,player){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return; - return 1.2; - } - }, - threaten:2 - }, - group:'tuteng_lose' - }, - zuling:{ - skillAnimation:'epic', - animationColor:'thunder', - trigger:{player:'phaseBegin'}, - forced:true, - unique:true, - filter:function(event,player){ - if(!player.storage.tuteng_awake){ - var rand=['tuteng1','tuteng2','tuteng3','tuteng4', - 'tuteng5','tuteng6','tuteng7','tuteng8']; - var num=0; - for(var i=0;i=2){ - return true; - } - } - } - return false; - }, - content:function(){ - player.storage.tuteng_awake=true; - player.loseMaxHp(); - player.awakenSkill('zuling'); - } - }, - tuteng_h:{ - mod:{ - maxHandcard:function(player,num){ - return num-1; - } - } - }, - tuteng_lose:{ - trigger:{player:'damageEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - var tuteng=['tuteng1','tuteng2','tuteng3','tuteng4', - 'tuteng5','tuteng6','tuteng7','tuteng8']; - for(var i=0;i0; - }, - content:function(){ - trigger.num--; - player.removeSkill('tuteng3'); - }, - }, - tuteng4:{ - mark:'image', - nopop:true, - intro:{ - content:'在你的回合内,你的锦囊牌造成的首次伤害+1' - }, - trigger:{source:'damageBegin'}, - forced:true, - usable:1, - filter:function(event,player){ - return _status.currentPhase==player&&event.card&&get.type(event.card)=='trick'&&event.notLink(); - }, - content:function(){ - trigger.num++; - } - }, - tuteng5:{ - mark:'image', - nopop:true, - intro:{ - content:'结束阶段,你摸一张牌' - }, - trigger:{player:'phaseEnd'}, - forced:true, - content:function(){ - player.draw(); - } - }, - tuteng6:{ - mark:'image', - nopop:true, - intro:{ - content:'在你的回合内,你的杀造成的首次伤害+1' - }, - trigger:{source:'damageBegin'}, - forced:true, - filter:function(event,player){ - return _status.currentPhase==player&&event.card&&event.card.name=='sha'&&event.notLink(); - }, - usable:1, - content:function(){ - trigger.num++; - } - }, - tuteng7:{ - mark:'image', - nopop:true, - intro:{ - content:'结束阶段,你令一名其他角色回复一点体力' - }, - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.isDamaged(); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget('活力图腾:令一名其他角色回复一点体力',function(card,player,target){ - return target!=player&&target.hp=player.hp) return -1; - if(player.hp<=2){ - if(player.hp==2&&nh==0) return 1; - return -1; - } - return 1; - } - }, - effect:{ - target:function(card){ - if(get.tag(card,'damage')||get.tag(card,'loseHp')){ - return 1.5; - } - } - }, - threaten:1.2 - } - }, - fenliu2:{ - mod:{ - maxHandcard:function(player,num){ - return num+1; - } - } - }, - hongxi:{ - trigger:{global:'dieAfter'}, - filter:function(event,player){ - return player.hp0; - }, - content:function(){ - var cards=[]; - var hs=target.getCards('h'); - var es=target.getCards('e'); - if(hs.length) cards.push(hs.randomGet()); - if(es.length) cards.push(es.randomGet()); - target.discard(cards); - }, - ai:{ - order:8, - useful:3, - value:6, - result:{ - target:function(player,target){ - var num=0; - if(target.countCards('h')) num--; - if(target.countCards('e')) num--; - return num; - }, - }, - } - }, - hsqingyu_zhanfang:{ - type:'hsqingyu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_aya', - filterTarget:true, - content:function(){ - target.gainMaxHp(); - target.draw(); - }, - ai:{ - order:5, - useful:3, - value:4, - result:{ - target:function(player,target){ - if(target.hp==target.maxHp){ - if(target.maxHp<3) return 2; - if(target.maxHp==3) return 1.5; - return 1.2; - } - return 1; - }, - }, - } - }, - hsqingyu_hufu:{ - type:'hsqingyu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_aya', - filterTarget:true, - content:function(){ - target.changeHujia(); - }, - ai:{ - order:5, - useful:3, - value:6, - result:{ - target:function(player,target){ - return 2/Math.max(1,Math.sqrt(target.hp)); - }, - }, - } - }, - hsqingyu_shandian:{ - type:'hsqingyu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_aya', - filterTarget:true, - content:function(){ - target.damage('thunder'); - }, - ai:{ - order:5, - result:{ - target:-1, - }, - useful:5, - value:8, - tag:{ - damage:1, - thunderDamage:1, - natureDamage:1, - } - } - }, - hsqingyu_zhao:{ - type:'equip', - subtype:'equip1', - distance:{attackFrom:-1}, - fullimage:true, - vanish:true, - derivation:'hs_aya', - onEquip:function(){ - player.draw(); - }, - ai:{ - order:9, - useful:5, - value:4 - } - }, - hsdusu_xueji:{ - type:'hsdusu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_xialikeer', - filterTarget:function(card,player,target){ - return target.countCards('e')>0; - }, - content:function(){ - target.discard(target.getCards('e').randomGets(2)); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - if(target.hasSkillTag('noe')) return 0; - if(target.countCards('e')>1) return -1.5; - return -1; - }, - }, - value:5, - } - }, - hsdusu_kuyecao:{ - type:'hsdusu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_xialikeer', - filterTarget:function(card,player,target){ - return !target.hasSkill('qianxing'); - }, - content:function(){ - target.addTempSkill('qianxing',{player:'phaseBegin'}); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(player!=target&&get.distance(player,target,'absolute')<=1) return 0; - var num=1; - if(target==player){ - num=1.5; - } - if(target.hp==1) return 2*num; - if(target.hp==2&&target.countCards('h')<=2) return 1.2*num; - return num; - } - }, - value:5, - } - }, - hsdusu_huangxuecao:{ - type:'hsdusu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_xialikeer', - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - modTarget:true, - content:function(){ - target.draw(2); - }, - ai:{ - order:9, - result:{ - target:1, - }, - value:10, - } - }, - hsdusu_huoyanhua:{ - type:'hsdusu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_xialikeer', - range:{attack:1}, - filterTarget:true, - content:function(){ - target.damage('fire'); - }, - ai:{ - order:5, - result:{ - target:-1, - }, - useful:5, - value:8, - tag:{ - damage:1, - fireDamage:1, - natureDamage:1, - } - } - }, - hsdusu_shinancao:{ - type:'hsdusu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_xialikeer', - filterTarget:function(card,player,target){ - return !target.hasSkill('hsdusu_shinancao'); - }, - content:function(){ - target.addSkill('hsdusu_shinancao'); - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(target.hp>1){ - if(target.countCards('h')>2) return 1; - return 0.5; - } - return 0.2; - }, - }, - value:5, - } - }, - hsbaowu_cangbaotu:{ - type:'hsbaowu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_yelise', - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - content:function(){ - target.addSkill('hsbaowu_cangbaotu'); - target.draw(); - }, - ai:{ - order:10, - result:{ - player:10 - }, - useful:10, - value:10, - } - }, - hsbaowu_huangjinyuanhou:{ - type:'hsbaowu', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_yelise', - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - content:function(){ - player.recover(); - player.draw(3); - // var hs=target.getCards('h'); - // target.discard(hs); - // var cs=[]; - // for(var i=0;i1) return 1; - if(player.hp==1) return 1; - return 0; - } - }, - useful:10, - value:10, - } - }, - hsshenqi_nengliangzhiguang:{ - type:'hsshenqi', - fullimage:true, - vanish:true, - enable:function(card,player){ - return !player.isTurnedOver(); - }, - derivation:'hs_lafamu', - filterTarget:true, - content:function(){ - target.gainMaxHp(); - target.recover(); - target.draw(4); - }, - contentAfter:function(){ - if(!player.isTurnedOver()){ - player.turnOver(); - } - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - if(target.hp<=1) return 2; - if(target.countCards('h')0; - }, - selectTarget:-1, - content:function(){ - if(target.countCards('hej')) player.gainPlayerCard(target,'hej',true,Math.ceil(Math.random()*2)); - }, - contentAfter:function(){ - if(!player.isTurnedOver()){ - player.turnOver(); - } - }, - ai:{ - order:9.5, - result:{ - player:1 - }, - tag:{ - multitarget:1, - multineg:1, - }, - useful:5, - value:10, - } - }, - hsmengjing_feicuiyoulong:{ - type:'hsmengjing', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_ysera', - filterTarget:true, - content:function(){ - target.damage(); - }, - ai:{ - order:5, - result:{ - target:-1 - }, - tag:{ - damage:1 - }, - useful:5, - value:10, - } - }, - hsmengjing_suxing:{ - type:'hsmengjing', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_ysera', - filterTarget:function(card,player,target){ - return player!=target; - }, - selectTarget:-1, - content:function(){ - target.loseHp(); - var he=target.getCards('he'); - if(he.length){ - target.discard(he.randomGets(2)); - } - }, - ai:{ - result:{ - target:-1, - }, - order:6, - useful:5, - value:10, - } - }, - hsmengjing_mengye:{ - type:'hsmengjing', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_ysera', - filterTarget:true, - content:function(){ - target.draw(); - target.addSkill('hsmengjing_mengye'); - }, - ai:{ - order:1, - useful:5, - value:10, - result:{ - target:function(player,target){ - if(target.hasSkill('hsmengjing_mengye')) return 0.5; - return -target.countCards('he'); - } - } - } - }, - hsmengjing_mengjing:{ - type:'hsmengjing', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_ysera', - filterTarget:function(card,player,target){ - return !target.hasJudge('lebu')||target.countCards('e')>0; - }, - content:function(){ - 'step 0' - var es=target.getCards('e'); - if(es.length){ - target.gain(es,'gain2'); - } - 'step 1' - if(!target.hasJudge('lebu')){ - target.addJudge(game.createCard('lebu')); - } - }, - ai:{ - order:2, - useful:5, - value:10, - result:{ - target:function(player,target){ - var num=target.hp-target.countCards('he')-2; - if(num>-1) return -1; - if(target.hp<3) num--; - if(target.hp<2) num--; - if(target.hp<1) num--; - return num; - } - } - } - }, - hsmengjing_huanxiaojiemei:{ - type:'hsmengjing', - fullimage:true, - vanish:true, - enable:true, - derivation:'hs_ysera', - filterTarget:function(card,player,target){ - return target.hp0) return '调换顺序'; + else return 'cancel2'; + }; + 'step 1' + if(result.control=='调换顺序'){ + var card=ui.cardPile.firstChild; + ui.cardPile.removeChild(card); + ui.cardPile.insertBefore(card,ui.cardPile.firstChild.nextSibling); + game.log(player,'调换了牌堆顶两张牌的顺序'); + } + }, + ai:{ + expose:0.1, + tag:{ + rejudge:0.5 + } + } + }, + jingxiang:{ + trigger:{player:'chooseToRespondBegin'}, + direct:true, + usable:1, + alter:true, + filter:function(event,player){ + if(event.responded) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h'); + }); + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('jingxiang'),function(card,player,target){ + if(target==player) return false; + var nh=target.countCards('h'); + if(nh==0) return false; + if(get.is.altered('jingxiang')){ + return nh<=player.countCards('h'); + } + return true; + }).ai=function(target){ + return 1-get.attitude(player,target); + }; + "step 1" + if(result.bool){ + var target=result.targets[0]; + player.logSkill('jingxiang',target); + event.target=target; + var cards=target.getCards('h'); + player.chooseCardButton('选择'+get.translation(target)+'的一张卡手牌打出',cards).filterButton=function(button){ + return trigger.filterCard(button.link); + } + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + game.log(player,'使用了',event.target,'的手牌'); + event.target.$throw(result.links); + event.target.lose(result.links); + trigger.untrigger(); + trigger.animate=false; + trigger.responded=true; + result.buttons[0].link.remove(); + trigger.result={bool:true,card:result.buttons[0].link} + } + else{ + player.storage.counttrigger.jingxiang--; + } + }, + ai:{ + effect:{ + target:function(card){ + if(get.tag(card,'respondShan')) return 0.4; + if(get.tag(card,'respondSha')) return 0.4; + } + } + }, + }, + wlianji:{ + trigger:{player:'phaseEnd'}, + frequent:true, + filter:function(event,player){ + return get.cardCount(true,player)>player.hp; + }, + content:function(){ + player.draw(2); + }, + init:function(player){player.storage.jingce=true}, + intro:{ + content:function(storage,player){ + if(_status.currentPhase==player) return '已使用'+get.cardCount(true,player)+'张牌'; + } + } + }, + mengun:{ + trigger:{global:'useCardToBefore'}, + priority:12, + filter:function(event,player){ + if(event.player==player) return false; + if(_status.currentPhase!=event.player) return false; + if(event.player.hasSkill('mengun2')) return false; + if(get.itemtype(event.card)!='card') return false; + if(!player.countCards('h',{suit:get.suit(event.card)})) return false; + return get.type(event.card)=='basic'; + }, + direct:true, + content:function(){ + "step 0" + var val=get.value(trigger.card); + var suit=get.suit(trigger.card); + var eff=get.effect(trigger.target,trigger.card,trigger.player,player); + var next=player.chooseToDiscard('是否对'+get.translation(trigger.player)+'使用的'+get.translation(trigger.card)+'发动【闷棍】?',function(card){ + return get.suit(card)==suit; + }); + next.logSkill=['mengun',trigger.player]; + next.ai=function(card){ + if(eff>=0) return 0; + return Math.min(8,1+val)-get.value(card); + } + "step 1" + if(result.bool){ + game.log(trigger.player,'收回了',trigger.cards); + trigger.untrigger(); + trigger.finish(); + game.delay(); + } + else{ + event.finish(); + } + "step 2" + trigger.player.$gain2(trigger.cards); + trigger.player.gain(trigger.cards); + trigger.player.storage.mengun2=trigger.cards[0]; + game.addVideo('storage',player,['mengun2',get.cardInfo(trigger.cards[0]),'card']); + trigger.player.addTempSkill('mengun2','phaseEnd'); + }, + ai:{ + expose:0.2 + } + }, + mengun2:{ + mark:'card', + mod:{ + cardEnabled:function(card,player){ + if(card==player.storage.mengun2) return false; + }, + }, + intro:{ + content:'card', + onunmark:function(storage,player){ + delete player.storage.mengun2; + } + }, + }, + jianren:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.getEquip(1)?true:false; + }, + filterCard:function(card,player){ + return card==player.getEquip(1); + }, + position:'e', + filterTarget:function(card,player,target){ + return target!=player; + }, + selectCard:-1, + selectTarget:-1, + content:function(){ + target.damage(); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target); + } + } + } + }, + jihuo:{ + trigger:{player:'phaseAfter'}, + filter:function(event,player){ + return player.countCards('h')>0&&event.skill!='jihuo'; + }, + direct:true, + priority:-50, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('jihuo')); + next.ai=get.unuseful2; + next.logSkill='jihuo'; + "step 1" + if(result.bool){ + player.insertPhase(); + } + }, + ai:{ + threaten:1.2 + } + }, + tzhenji:{ + trigger:{player:'discardAfter'}, + direct:true, + filter:function(event,player){ + if(player.hasSkill('tzhenji2')){ + return false; + } + if(event.cards){ + for(var i=0;i0; + return get.damageEffect(target,player,player,'thunder')-(bool?1:0); + }; + "step 1" + if(result.bool){ + game.delay(0.5); + var target=result.targets[0]; + player.logSkill('tzhenji',target,'thunder'); + var cs=target.getCards('he'); + if(cs.length){ + target.discard(cs.randomGet()); + } + target.damage('thunder'); + player.addTempSkill('tzhenji2','phaseAfter'); + } + }, + ai:{ + threaten:1.2, + expose:0.3, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'loseCard')&&target.countCards('he')){ + return 0.7; + } + } + }, + } + }, + tzhenji2:{}, + tzhenji_old:{ + trigger:{player:['useCard','respondEnd']}, + filter:function(event){ + return get.suit(event.card)=='spade'; + }, + direct:true, + content:function(){ + "step 0"; + player.chooseTarget(get.prompt('tzhenji_old')).ai=function(target){ + return get.damageEffect(target,player,player,'thunder')-1; + }; + "step 1" + if(result.bool){ + player.logSkill('tzhenji',result.targets,'thunder'); + event.target=result.targets[0]; + event.target.judge(); + } + else{ + event.finish(); + } + "step 2" + if(result.color=='red'){ + event.target.damage('fire'); + } + else{ + event.target.damage('thunder'); + var cs=event.target.getCards('he'); + if(cs.length){ + event.target.discard(cs.randomGet()); + } + cs=player.getCards('he'); + if(cs.length){ + player.discard(cs.randomGet()); + } + } + }, + ai:{ + expose:0.2, + threaten:1.2, + effect_old:{ + target:function(card,player,target){ + if(get.tag(card,'respondShan')){ + var hastarget=game.hasPlayer(function(current){ + return get.attitude(player,current)<0; + }); + var ns=target.countCards('h','shan'); + var nh=target.countCards('h'); + if(ns>1){ + return [0,hastarget?1:0]; + } + if(ns&&nh>=2){ + return [0,0]; + } + if(nh>3){ + return [0,0]; + } + if(nh==0){ + return 1.5; + } + return [1,0.05]; + } + } + } + } + }, + tuteng_s:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + filter:function(event,player){ + var rand=['tuteng1','tuteng2','tuteng3','tuteng4']; + for(var i=0;i=3){ + player.removeSkill(rand2.randomGet()); + } + player.addSkill(rand.randomGet('tuteng1','tuteng3')); + }, + ai:{ + threaten:2 + } + }, + tuteng:{ + enable:'phaseUse', + usable:1, + unique:true, + direct:true, + delay:0, + init:function(){ + for(var i=1;i<=8;i++){ + lib.translate['tuteng'+i+'_info']=lib.skill['tuteng'+i].intro.content; + } + }, + position:'he', + filter:function(event,player){ + var rand=['tuteng1','tuteng2','tuteng3','tuteng4']; + for(var i=0;i1||rand2.length>=4)){ + var dialog=ui.create.dialog(); + for(var i=0;i=4){ + dialog.add('替换一个已有图腾'); + dialog.add([rand2x,'vcard']); + player.chooseButton(dialog,2,true).filterButton=function(button){ + if(ui.selected.buttons.length){ + var current=ui.selected.buttons[0].name; + if(rand.contains(current)){ + return rand2.contains(button.name); + } + else{ + return rand.contains(button.name); + } + } + return true; + }; + } + else{ + player.chooseButton(dialog,true); + } + for(var i=0;i1){ + rand.remove('tuteng1'); + } + player.addSkill(rand.randomGet()); + } + // if(rand2.length>=3){ + // player.removeSkill(rand2.randomGet()); + // } + game.delay(); + event.finish(); + } + } + else{ + event.finish(); + } + 'step 1' + if(result.buttons.length==1){ + player.addSkill(result.buttons[0].name); + } + else if(result.buttons.length==2){ + var skill1=result.buttons[0].name; + var skill2=result.buttons[1].name; + if(player.hasSkill(skill1)){ + player.removeSkill(skill1); + player.addSkill(skill2); + } + else{ + player.removeSkill(skill2); + player.addSkill(skill1); + } + } + }, + ai:{ + order:11, + result:{ + player:1 + }, + effect:function(card,player){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return; + return 1.2; + } + }, + threaten:2 + }, + group:'tuteng_lose' + }, + zuling:{ + skillAnimation:'epic', + animationColor:'thunder', + trigger:{player:'phaseBegin'}, + forced:true, + unique:true, + filter:function(event,player){ + if(!player.storage.tuteng_awake){ + var rand=['tuteng1','tuteng2','tuteng3','tuteng4', + 'tuteng5','tuteng6','tuteng7','tuteng8']; + var num=0; + for(var i=0;i=2){ + return true; + } + } + } + return false; + }, + content:function(){ + player.storage.tuteng_awake=true; + player.loseMaxHp(); + player.awakenSkill('zuling'); + } + }, + tuteng_h:{ + mod:{ + maxHandcard:function(player,num){ + return num-1; + } + } + }, + tuteng_lose:{ + trigger:{player:'damageEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + var tuteng=['tuteng1','tuteng2','tuteng3','tuteng4', + 'tuteng5','tuteng6','tuteng7','tuteng8']; + for(var i=0;i0; + }, + content:function(){ + trigger.num--; + player.removeSkill('tuteng3'); + }, + }, + tuteng4:{ + mark:'image', + nopop:true, + intro:{ + content:'在你的回合内,你的锦囊牌造成的首次伤害+1' + }, + trigger:{source:'damageBegin'}, + forced:true, + usable:1, + filter:function(event,player){ + return _status.currentPhase==player&&event.card&&get.type(event.card)=='trick'&&event.notLink(); + }, + content:function(){ + trigger.num++; + } + }, + tuteng5:{ + mark:'image', + nopop:true, + intro:{ + content:'结束阶段,你摸一张牌' + }, + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + player.draw(); + } + }, + tuteng6:{ + mark:'image', + nopop:true, + intro:{ + content:'在你的回合内,你的杀造成的首次伤害+1' + }, + trigger:{source:'damageBegin'}, + forced:true, + filter:function(event,player){ + return _status.currentPhase==player&&event.card&&event.card.name=='sha'&&event.notLink(); + }, + usable:1, + content:function(){ + trigger.num++; + } + }, + tuteng7:{ + mark:'image', + nopop:true, + intro:{ + content:'结束阶段,你令一名其他角色回复一点体力' + }, + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.isDamaged(); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget('活力图腾:令一名其他角色回复一点体力',function(card,player,target){ + return target!=player&&target.hp=player.hp) return -1; + if(player.hp<=2){ + if(player.hp==2&&nh==0) return 1; + return -1; + } + return 1; + } + }, + effect:{ + target:function(card){ + if(get.tag(card,'damage')||get.tag(card,'loseHp')){ + return 1.5; + } + } + }, + threaten:1.2 + } + }, + fenliu2:{ + mod:{ + maxHandcard:function(player,num){ + return num+1; + } + } + }, + hongxi:{ + trigger:{global:'dieAfter'}, + filter:function(event,player){ + return player.hp0; + }, + content:function(){ + var cards=[]; + var hs=target.getCards('h'); + var es=target.getCards('e'); + if(hs.length) cards.push(hs.randomGet()); + if(es.length) cards.push(es.randomGet()); + target.discard(cards); + }, + ai:{ + order:8, + useful:3, + value:6, + result:{ + target:function(player,target){ + var num=0; + if(target.countCards('h')) num--; + if(target.countCards('e')) num--; + return num; + }, + }, + } + }, + hsqingyu_zhanfang:{ + type:'hsqingyu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_aya', + filterTarget:true, + content:function(){ + target.gainMaxHp(); + target.draw(); + }, + ai:{ + order:5, + useful:3, + value:4, + result:{ + target:function(player,target){ + if(target.hp==target.maxHp){ + if(target.maxHp<3) return 2; + if(target.maxHp==3) return 1.5; + return 1.2; + } + return 1; + }, + }, + } + }, + hsqingyu_hufu:{ + type:'hsqingyu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_aya', + filterTarget:true, + content:function(){ + target.changeHujia(); + }, + ai:{ + order:5, + useful:3, + value:6, + result:{ + target:function(player,target){ + return 2/Math.max(1,Math.sqrt(target.hp)); + }, + }, + } + }, + hsqingyu_shandian:{ + type:'hsqingyu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_aya', + filterTarget:true, + content:function(){ + target.damage('thunder'); + }, + ai:{ + order:5, + result:{ + target:-1, + }, + useful:5, + value:8, + tag:{ + damage:1, + thunderDamage:1, + natureDamage:1, + } + } + }, + hsqingyu_zhao:{ + type:'equip', + subtype:'equip1', + distance:{attackFrom:-1}, + fullimage:true, + vanish:true, + derivation:'hs_aya', + onEquip:function(){ + player.draw(); + }, + ai:{ + order:9, + useful:5, + value:4 + } + }, + hsdusu_xueji:{ + type:'hsdusu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_xialikeer', + filterTarget:function(card,player,target){ + return target.countCards('e')>0; + }, + content:function(){ + target.discard(target.getCards('e').randomGets(2)); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noe')) return 0; + if(target.countCards('e')>1) return -1.5; + return -1; + }, + }, + value:5, + } + }, + hsdusu_kuyecao:{ + type:'hsdusu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_xialikeer', + filterTarget:function(card,player,target){ + return !target.hasSkill('qianxing'); + }, + content:function(){ + target.addTempSkill('qianxing',{player:'phaseBegin'}); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(player!=target&&get.distance(player,target,'absolute')<=1) return 0; + var num=1; + if(target==player){ + num=1.5; + } + if(target.hp==1) return 2*num; + if(target.hp==2&&target.countCards('h')<=2) return 1.2*num; + return num; + } + }, + value:5, + } + }, + hsdusu_huangxuecao:{ + type:'hsdusu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_xialikeer', + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + modTarget:true, + content:function(){ + target.draw(2); + }, + ai:{ + order:9, + result:{ + target:1, + }, + value:10, + } + }, + hsdusu_huoyanhua:{ + type:'hsdusu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_xialikeer', + range:{attack:1}, + filterTarget:true, + content:function(){ + target.damage('fire'); + }, + ai:{ + order:5, + result:{ + target:-1, + }, + useful:5, + value:8, + tag:{ + damage:1, + fireDamage:1, + natureDamage:1, + } + } + }, + hsdusu_shinancao:{ + type:'hsdusu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_xialikeer', + filterTarget:function(card,player,target){ + return !target.hasSkill('hsdusu_shinancao'); + }, + content:function(){ + target.addSkill('hsdusu_shinancao'); + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(target.hp>1){ + if(target.countCards('h')>2) return 1; + return 0.5; + } + return 0.2; + }, + }, + value:5, + } + }, + hsbaowu_cangbaotu:{ + type:'hsbaowu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_yelise', + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + target.addSkill('hsbaowu_cangbaotu'); + target.draw(); + }, + ai:{ + order:10, + result:{ + player:10 + }, + useful:10, + value:10, + } + }, + hsbaowu_huangjinyuanhou:{ + type:'hsbaowu', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_yelise', + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + player.recover(); + player.draw(3); + // var hs=target.getCards('h'); + // target.discard(hs); + // var cs=[]; + // for(var i=0;i1) return 1; + if(player.hp==1) return 1; + return 0; + } + }, + useful:10, + value:10, + } + }, + hsshenqi_nengliangzhiguang:{ + type:'hsshenqi', + fullimage:true, + vanish:true, + enable:function(card,player){ + return !player.isTurnedOver(); + }, + derivation:'hs_lafamu', + filterTarget:true, + content:function(){ + target.gainMaxHp(); + target.recover(); + target.draw(4); + }, + contentAfter:function(){ + if(!player.isTurnedOver()){ + player.turnOver(); + } + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(target.hp<=1) return 2; + if(target.countCards('h')0; + }, + selectTarget:-1, + content:function(){ + if(target.countCards('hej')) player.gainPlayerCard(target,'hej',true,Math.ceil(Math.random()*2)); + }, + contentAfter:function(){ + if(!player.isTurnedOver()){ + player.turnOver(); + } + }, + ai:{ + order:9.5, + result:{ + player:1 + }, + tag:{ + multitarget:1, + multineg:1, + }, + useful:5, + value:10, + } + }, + hsmengjing_feicuiyoulong:{ + type:'hsmengjing', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_ysera', + filterTarget:true, + content:function(){ + target.damage(); + }, + ai:{ + order:5, + result:{ + target:-1 + }, + tag:{ + damage:1 + }, + useful:5, + value:10, + } + }, + hsmengjing_suxing:{ + type:'hsmengjing', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_ysera', + filterTarget:function(card,player,target){ + return player!=target; + }, + selectTarget:-1, + content:function(){ + target.loseHp(); + var he=target.getCards('he'); + if(he.length){ + target.discard(he.randomGets(2)); + } + }, + ai:{ + result:{ + target:-1, + }, + order:6, + useful:5, + value:10, + } + }, + hsmengjing_mengye:{ + type:'hsmengjing', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_ysera', + filterTarget:true, + content:function(){ + target.draw(); + target.addSkill('hsmengjing_mengye'); + }, + ai:{ + order:1, + useful:5, + value:10, + result:{ + target:function(player,target){ + if(target.hasSkill('hsmengjing_mengye')) return 0.5; + return -target.countCards('he'); + } + } + } + }, + hsmengjing_mengjing:{ + type:'hsmengjing', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_ysera', + filterTarget:function(card,player,target){ + return !target.hasJudge('lebu')||target.countCards('e')>0; + }, + content:function(){ + 'step 0' + var es=target.getCards('e'); + if(es.length){ + target.gain(es,'gain2'); + } + 'step 1' + if(!target.hasJudge('lebu')){ + target.addJudge(game.createCard('lebu')); + } + }, + ai:{ + order:2, + useful:5, + value:10, + result:{ + target:function(player,target){ + var num=target.hp-target.countCards('he')-2; + if(num>-1) return -1; + if(target.hp<3) num--; + if(target.hp<2) num--; + if(target.hp<1) num--; + return num; + } + } + } + }, + hsmengjing_huanxiaojiemei:{ + type:'hsmengjing', + fullimage:true, + vanish:true, + enable:true, + derivation:'hs_ysera', + filterTarget:function(card,player,target){ + return target.hp=6){ - return player.hp<=2; - } - return player.hp<=1; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('konghun'),function(card,player,target){ - return player!=target; - },[1,Math.min(4,Math.floor((game.players.length-1)/2))]).ai=function(target){ - return get.damageEffect(target,player,player,'thunder')+1; - } - "step 1" - if(result.bool){ - event.targets=result.targets.slice(0); - player.logSkill('konghun',event.targets,'thunder'); - event.targets.sort(lib.sort.seat); - event.num=0; - } - else{ - event.finish(); - } - "step 2" - if(event.num0&&event.player!=player&&event.player.hp=6){ + return player.hp<=2; + } + return player.hp<=1; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('konghun'),function(card,player,target){ + return player!=target; + },[1,Math.min(4,Math.floor((game.players.length-1)/2))]).ai=function(target){ + return get.damageEffect(target,player,player,'thunder')+1; + } + "step 1" + if(result.bool){ + event.targets=result.targets.slice(0); + player.logSkill('konghun',event.targets,'thunder'); + event.targets.sort(lib.sort.seat); + event.num=0; + } + else{ + event.finish(); + } + "step 2" + if(event.num0&&event.player!=player&&event.player.hp1||event.targets[0]!=player); - }, - silent:true, - forced:true, - popup:false, - content:function(){ - player.addTempSkill('huodi3','phaseAfter'); - } - }, - huodi3:{}, - jingfan:{ - trigger:{player:'phaseUseEnd'}, - unique:true, - direct:true, - content:function(){ - "step 0" - var num=get.cardCount(true,player)-player.countCards('h'); - event.num=num; - if(num>0){ - player.draw(num); - } - "step 1" - if(event.num>0){ - player.chooseTarget('选择至多'+get.cnNumber(event.num)+'名角色令其进攻距离+1',[1,event.num],function(card,player,target){ - return player!=target; - }).ai=function(target){ - return get.attitude(player,target); - } - } - else{ - event.finish(); - } - "step 2" - if(result.bool&&result.targets){ - player.logSkill('jingfan',result.targets); - for(var i=0;i0; - }, - filter:function(event,player){ - if(event.num<=1) return false; - return true; - }, - priority:-11, - content:function(){ - trigger.num=1; - if(trigger.source){ - trigger.source.addTempSkill('chiying2','damageAfter'); - } - } - }, - chiying2:{ - trigger:{source:'damageEnd'}, - forced:true, - popup:false, - content:function(){ - player.draw(); - } - }, - juechen:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return event.card.name=='sha'; - }, - direct:true, - content:function(){ - "step 0" - game.delay(0.5); - player.chooseTarget(get.prompt('juechen'),function(card,player,target){ - return player!=target&&!trigger.targets.contains(target)&&target.countCards('he')>0; - }).ai=function(target){ - return -get.attitude(player,target); - } - "step 1" - if(result.bool){ - player.logSkill('juechen',result.targets); - player.discardPlayerCard(true,result.targets[0],'he'); - } - } - }, - lingfeng:{ - trigger:{player:'phaseDrawBefore'}, - check:function(event,player){ - for(var i=0;i0; - }).ai=function(target){ - return -get.attitude(player,target); - } - } - "step 2" - if(result.bool&&result.targets&&result.targets.length){ - player.discardPlayerCard(result.targets[0],'he',true); - } - "step 3" - player.gain(event.cards); - player.$draw(event.cards); - game.delay(); - }, - ai:{ - threaten:1.1 - } - }, - biantian4:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - content:function(){ - for(var i=0;i1||event.targets[0]!=player); + }, + silent:true, + forced:true, + popup:false, + content:function(){ + player.addTempSkill('huodi3','phaseAfter'); + } + }, + huodi3:{}, + jingfan:{ + trigger:{player:'phaseUseEnd'}, + unique:true, + direct:true, + content:function(){ + "step 0" + var num=get.cardCount(true,player)-player.countCards('h'); + event.num=num; + if(num>0){ + player.draw(num); + } + "step 1" + if(event.num>0){ + player.chooseTarget('选择至多'+get.cnNumber(event.num)+'名角色令其进攻距离+1',[1,event.num],function(card,player,target){ + return player!=target; + }).ai=function(target){ + return get.attitude(player,target); + } + } + else{ + event.finish(); + } + "step 2" + if(result.bool&&result.targets){ + player.logSkill('jingfan',result.targets); + for(var i=0;i0; + }, + filter:function(event,player){ + if(event.num<=1) return false; + return true; + }, + priority:-11, + content:function(){ + trigger.num=1; + if(trigger.source){ + trigger.source.addTempSkill('chiying2','damageAfter'); + } + } + }, + chiying2:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + content:function(){ + player.draw(); + } + }, + juechen:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return event.card.name=='sha'; + }, + direct:true, + content:function(){ + "step 0" + game.delay(0.5); + player.chooseTarget(get.prompt('juechen'),function(card,player,target){ + return player!=target&&!trigger.targets.contains(target)&&target.countCards('he')>0; + }).ai=function(target){ + return -get.attitude(player,target); + } + "step 1" + if(result.bool){ + player.logSkill('juechen',result.targets); + player.discardPlayerCard(true,result.targets[0],'he'); + } + } + }, + lingfeng:{ + trigger:{player:'phaseDrawBefore'}, + check:function(event,player){ + for(var i=0;i0; + }).ai=function(target){ + return -get.attitude(player,target); + } + } + "step 2" + if(result.bool&&result.targets&&result.targets.length){ + player.discardPlayerCard(result.targets[0],'he',true); + } + "step 3" + player.gain(event.cards); + player.$draw(event.cards); + game.delay(); + }, + ai:{ + threaten:1.1 + } + }, + biantian4:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + for(var i=0;i0; - }, - content:function(){ - "step 0" - player.choosePlayerCard(trigger.player,get.prompt('jingmiao',trigger.player),'he'); - "step 1" - if(result.bool){ - player.logSkill('jingmiao',trigger.player); - trigger.player.discard(result.links); - } - }, - ai:{ - expose:0.2 - } - }, - zhinang:{ - trigger:{player:'phaseBegin'}, - frequent:true, - content:function(){ - "step 0" - event.cards=get.cards(3); - event.cards2=[]; - for(var i=0;iplayer.hp){ - if(target==player) return Math.max(1,att-2); - } - if(target==player) return att+5; - return att; - } - } - "step 2" - if(result&&result.targets&&result.targets.length){ - event.target=result.targets[0]; - } - if(event.cards2.length){ - event.target.gain(event.cards2,'gain2'); - } - }, - ai:{ - threaten:1.3 - } - }, - tianyu:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - for(var i=0;i0; + }, + content:function(){ + "step 0" + player.choosePlayerCard(trigger.player,get.prompt('jingmiao',trigger.player),'he'); + "step 1" + if(result.bool){ + player.logSkill('jingmiao',trigger.player); + trigger.player.discard(result.links); + } + }, + ai:{ + expose:0.2 + } + }, + zhinang:{ + trigger:{player:'phaseBegin'}, + frequent:true, + content:function(){ + "step 0" + event.cards=get.cards(3); + event.cards2=[]; + for(var i=0;iplayer.hp){ + if(target==player) return Math.max(1,att-2); + } + if(target==player) return att+5; + return att; + } + } + "step 2" + if(result&&result.targets&&result.targets.length){ + event.target=result.targets[0]; + } + if(event.cards2.length){ + event.target.gain(event.cards2,'gain2'); + } + }, + ai:{ + threaten:1.3 + } + }, + tianyu:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + for(var i=0;i0; + })){ + if(card.name=='sha'){ + if(card.nature=='fire') return 2.95; + else if(card.nature=='fire') return 2.92; + else return 2.9; + } + else if(card.name=='tao'){ + return 4; + } + } + return 0; + }, + backup:function(links,player){ + return { + filterCard:function(){return false}, + viewAs:{name:links[0][2],nature:links[0][3]}, + selectCard:-1, + popname:true, + log:false, + precontent:function(){ + 'step 0' + player.chooseTarget('选择交换手牌的目标',function(card,player,target){ + return target.countCards('h')0&¤t.countCards('h')player.hp){ + var cards=get.cards(player.maxHp-player.hp); + event.cards=cards; + var dialog=ui.create.dialog('选择获得卡牌的目标',cards,'hidden'); + dialog.classList.add('noselect'); + player.chooseTarget(true,dialog).ai=function(target){ + return get.attitude(player,target)/Math.sqrt(1+target.countCards('h')); + } + } + else{ + event.finish(); + } + 'step 2' + player.line(result.targets); + result.targets[0].gain(event.cards,'draw'); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'recover')&&target.hp==target.maxHp-1) return [0,0]; + if(target.hasFriend()){ + if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp==target.maxHp) return [0,1]; + } + } + }, + threaten:function(player,target){ + if(target.hp==1) return 3; + if(target.hp==2) return 2; + return 1; + }, + } + }, + shiyong:{ + audio:2, + trigger:{player:'damageEnd'}, + forced:true, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&(get.color(event.card)=='red'||event.player.hasSkill('jiu')); + }, + content:function(){ + player.loseMaxHp(); + } + }, + oldqianxi:{ + trigger:{source:'damageBefore'}, + check:function(event,player){ + var att=get.attitude(player,event.player); + if(event.player.hp==event.player.maxHp) return att<0; + if(event.player.hp==event.player.maxHp-1&& + (event.player.maxHp<=3||event.player.hasSkillTag('maixie'))) return att<0; + return att>0; + }, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&get.distance(player,event.player)<=1; + }, + logTarget:'player', + content:function(){ + 'step 0' + player.judge(function(card){ + return get.suit(card)!='heart'?1:-1; + }); + 'step 1' + if(result.bool){ + trigger.untrigger(); + trigger.finish(); + trigger.player.loseMaxHp(true); + } + } + }, + oldxuanfeng:{ + audio:'xuanfeng', + trigger:{player:'loseEnd'}, + direct:true, + filter:function(event,player){ + for(var i=0;i0; - })){ - if(card.name=='sha'){ - if(card.nature=='fire') return 2.95; - else if(card.nature=='fire') return 2.92; - else return 2.9; - } - else if(card.name=='tao'){ - return 4; - } + content:function(){ + "step 0" + player.chooseTarget(get.prompt('xuanfeng'),function(card,player,target){ + if(target==player) return false; + return get.distance(player,target)<=1||player.canUse('sha',target,false); + }).set('ai',function(target){ + if(get.distance(player,target)<=1){ + return get.damageEffect(target,player,player)*2; + } + else{ + return get.effect(target,{name:'sha'},player,player); + } + }); + "step 1" + if(result.bool){ + player.logSkill('xuanfeng',result.targets); + var target=result.targets[0]; + var distance=get.distance(player,target); + if(distance<=1&&player.canUse('sha',target,false)){ + player.chooseControl('出杀','造成伤害').ai=function(){ + return '造成伤害'; + } + event.target=target; + } + else if(distance<=1){ + target.damage(); + event.finish(); + } + else{ + player.useCard({name:'sha'},target,false).animate=false; + game.delay(); + event.finish(); + } } - return 0; - }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - viewAs:{name:links[0][2],nature:links[0][3]}, - selectCard:-1, - popname:true, - log:false, - precontent:function(){ - 'step 0' - player.chooseTarget('选择交换手牌的目标',function(card,player,target){ - return target.countCards('h')0&¤t.countCards('h')player.hp){ - var cards=get.cards(player.maxHp-player.hp); - event.cards=cards; - var dialog=ui.create.dialog('选择获得卡牌的目标',cards,'hidden'); - dialog.classList.add('noselect'); - player.chooseTarget(true,dialog).ai=function(target){ - return get.attitude(player,target)/Math.sqrt(1+target.countCards('h')); - } - } - else{ - event.finish(); - } - 'step 2' - player.line(result.targets); - result.targets[0].gain(event.cards,'draw'); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'recover')&&target.hp==target.maxHp-1) return [0,0]; - if(target.hasFriend()){ - if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp==target.maxHp) return [0,1]; - } - } - }, - threaten:function(player,target){ - if(target.hp==1) return 3; - if(target.hp==2) return 2; - return 1; - }, - } - }, - shiyong:{ - audio:2, - trigger:{player:'damageEnd'}, - forced:true, - check:function(){ - return false; - }, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&(get.color(event.card)=='red'||event.player.hasSkill('jiu')); - }, - content:function(){ - player.loseMaxHp(); - } - }, - oldqianxi:{ - trigger:{source:'damageBefore'}, - check:function(event,player){ - var att=get.attitude(player,event.player); - if(event.player.hp==event.player.maxHp) return att<0; - if(event.player.hp==event.player.maxHp-1&& - (event.player.maxHp<=3||event.player.hasSkillTag('maixie'))) return att<0; - return att>0; - }, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&get.distance(player,event.player)<=1; - }, - logTarget:'player', - content:function(){ - 'step 0' - player.judge(function(card){ - return get.suit(card)!='heart'?1:-1; - }); - 'step 1' - if(result.bool){ - trigger.untrigger(); - trigger.finish(); - trigger.player.loseMaxHp(true); - } - } - }, - oldxuanfeng:{ - audio:'xuanfeng', - trigger:{player:'loseEnd'}, - direct:true, - filter:function(event,player){ - for(var i=0;i0){ - return [0,num]; - } - if(target.hp==1&&!target.hasShan()) return; - return [1,num]; - } - } - } - } - }, - qianggu:{ - enable:'phaseUse', - usable:1, - filterCard:true, - selectCard:2, - position:'he', - check:function(card){ - return 8-get.value(card); - }, - filter:function(event,player){ - return player.countCards('he')>=2; - }, - content:function(){ - player.changeHujia(2); - player.addTempSkill('qianggu2',{player:'phaseBegin'}); - }, - ai:{ - result:{ - player:1 + ow_heiying:['female','wei',3,['qinru','yinshen','maichong']], + ow_orisa:['female','wu',4,['qianggu','woliu']], + }, + characterIntro:{ + ow_orisa:'奥丽莎是用在努巴尼昙花一现的OR15防御机器人的零件组装而成的,她是这座城市的新一代守护者,但依然有很大的成长空间', + ow_liekong:'莉娜·奥克斯顿(代号:“猎空”)是守望先锋原型机试飞计划的最年轻成员。但在第一次试飞过程中,原型机的传送阵列出现故障,包括飞行员在内完全失踪。莉娜在几个月后再次出现,不过她身上的分子却无法和时间流同步。这种被称为“时间解离”的症状使她彻底变成了一个“活生生”的幽灵,时隐时现。直到一位名叫温斯顿的科学家设计出了“时间加速器”,一台可以让“猎空”维持在当前时间的装置。不仅如此,这一装置还让“猎空”有能力控制她自己的时间流,使她可以任意加速或减慢时间。有了这一全新的能力,她成了守望先锋最强大的特工之一。守望先锋解散后,“猎空”依旧选择为了正义而战,守护无辜。', + ow_sishen:'关于这个黑袍恐怖分子的传闻并不多,只知道大家都称他为“死神”。虽然没人知道他的真实身份和动机,但有一点是可以肯定的,他的出现意味着死亡。“死神”是一名极其不稳定、残暴、冷酷的雇佣兵,在世界各地犯下多起恐怖袭击案件。在过去的数十年间,他参与了许多武装冲突,但其本人却不属于任何组织。在多年的追踪后,“死神”神秘的面纱终于被慢慢揭开。据信,“死神”正在追杀前守望先锋特工并系统地逐一消灭。', + ow_tianshi:'齐格勒是瑞士一家顶尖医院的手术部门负责人。正是她在医学领域的成就,引起了守望先锋的注意。由于齐格勒的双亲都被战争夺走了生命,因此她从一开始就极其反对该组织通过军事手段进行维和。但最终,她意识到守望先锋给她提供了一个可以拯救更多人生命的机会。作为守望先锋医学研究部门的负责人,安吉拉致力于更好地在前线治疗受到致命伤的病员。尽管她对守望先锋做出了巨大的贡献,但齐格勒博士经常质疑她的上司以及守望先锋的长远目标。而当守望先锋解散之后,齐格勒博士便致力于帮助那些受战争波及的受难者。', + ow_falaozhiying:'本名法芮尔,来自一个军功卓越的军人世家,贡献与荣耀就是她最高的追求。在加入埃及军队后,她的坚韧和在战术上的天赋使她很快就晋升为了一名军官。作为一名果敢的领袖,任何在她手下服役的士兵都对她抱有绝对的忠诚。有了所有这些卓越的表现,法芮尔自然成了守望先锋最青睐的一名候选人。但在她正式加入之前,守望先锋就解散了。当她带着所有的荣誉退役后,法芮尔加入了一家名为“海力士国际安保”的私人安保公司,该公司的最重要的一笔订单就是负责保护吉萨高原地下的人工智能研究设施。尽管她对守望先锋的解散感到无比的遗憾,但她依旧梦想着能为正义而战并改变这个残破的世界。', + ow_zhixuzhiguang:'当被认为是为数不多可以成为光子建筑师的人才之后,年轻的塞特娅·法斯瓦尼离开了贫穷的家乡,成为了费斯卡光子建筑师学院的一员。她很快就成为了乌托邦最顶尖的光子建筑师。但费斯卡集团在塞特娅身上还是看到了更广阔的发展潜力。费斯卡集团称其为“秩序之光”,为了集团的利益和扩大在其他国家的影响力,将其派遣到全球执行秘密任务。虽然“秩序之光”相信她的所作所为是为了实现人性之“大善”,但有时候她也会怀疑她所希望实现的控制和秩序,是否真的是人类最需要的。', + ow_luxiao:'卢西奥•科雷亚•多斯桑托斯在里约热内卢长大。“智能危机”结束后,由于经济的一蹶不振导致这里变成了一个贫穷拥挤的贫民区。他想找到一个办法激发周围人的信心与活力:音乐。他开始在街边、社区派对进行表演,随着年龄的增长便开始了一系列传奇的地下演出。但当多国集团费斯卡集团计划重建城市的大部分地区时,卢西奥所在的社区陷入了混乱,人们失去了自由。卢西奥绝对不会容忍这一切。他偷走了费斯卡用来压迫人民的音波技术,反过来将人们团结在一起。最终,在一场暴动中,他们将费斯卡集团赶出了家园。卢西奥的领导能力让他在一夜之间成为了明星和社会正能量的象征。他的音乐在人们心中的地位如火箭般蹿升。随着影响力的不断扩大,卢西奥意识到他有机会可以改变这个世界,让这个世界变得更美好。', + ow_shibing:'被全球通缉的独行侠“士兵:76”独自一人发动了一场旨在查出守望先锋解散真相的战争。“士兵:76”在全球一系列针对金融机构、秘密集团和守望先锋基地的袭击活动中被曝光。尽管外界至今不清楚他的动机是什么,但有人认为他曾是一位守望先锋特工,决心查出守望先锋垮台的幕后黑手。', + ow_yuanshi:'岛田忍者家族大名最年轻的儿子,但对家族的非法生意毫无兴趣,被视为一个危险的累赘。在家族大名意外死亡后,他与哥哥半藏的矛盾激化,最终导致了一场生死对决,源氏也因此差点送命。后来被守望先锋救下,并被改造成机械忍者以摧毁他父亲的邪恶帝国。在完成任务后,源氏因无法接受自己的机械身躯,离开了守户先锋,并游历世界希望能找到自己存在的意义。数年之后,他遇到了智械僧侣禅雅塔,并且在这位僧侣的引导下,源氏体内的人类和机械体验终于融合在了一起。他开始明白,尽管他有一副机械身躯,但他的人类灵魂是完整的,他渐渐意识到自己的新形态是给予自己的恩赐和力量。', + ow_chanyata:'在“智能危机”结束之后,一群被放逐的智能机器人感受到了被其称为“灵魂觉醒”的升华之道,他们渐渐相信他们和人类一样,同样拥有灵魂。由神秘僧侣泰哈撒·孟达塔带领的这些僧侣开始寻找让人类和机器人重回曾经的和谐相处之道。他们最终被世人所接纳,并得到了全球数百万人的支持。但其中一位僧侣,禅雅塔并不赞同这一新道路。他认为要解决人类和机器人之间根深蒂固的问题,不能依靠循循善诱,而必须通过个体联系和互动。最终,他选择离开寺庙,游走世界,帮助那些他所遇到的人摆脱凡尘。但如果有必要,他也会为了保护无辜而拿起武器,无论人类还是机器人。', + ow_dva:'D.Va曾是一名职业玩家,而现在则利用自己的技巧驾驶一台尖端机甲保卫国家。随着智能机械不断进化,它最终干扰了MEKA的无人机控制网络,迫使军方派驾驶员驾驶这些机甲。由于难以找到合适的候选人,政府开始向那些拥有足以操控机甲尖端武器系统的必要反应和本能的国内职业玩家寻求帮助,其中就包括顶尖玩家之一的“D.Va”宋哈娜。作为一名为了获胜不惜一切代价的精英玩家,D.Va从来都不会对对手表现出丝毫的仁慈。D.Va将这次新任务视为一款全新的游戏,无所畏惧地和其他MEKA机甲冲向战场,随时准备保卫自己的国家。最近,她开始向她的粉丝直播战斗行动,而这也让她成为了世界巨星。', + ow_mei:'守望先锋为了查明全球不断升级的怪异气候现象的真正原因,在世界各个位置建立了一系列生态监测站。周美灵就是这一长久项目的成员之一。当她来到该项目的南极洲监控站时,一场突如其来的极地风暴摧毁了大部分设施并将这里与外界隔绝了开来。随着补给物资的不断消耗,科学家们进入了急冻状态希望能够撑到救援队抵达的那一天。但救援并没有抵达。几年后,当这些科学家的急冻舱最终被发现时,美是唯一的幸存者。此时,守望先锋已经解散,所有的生态监测站也都已经被废弃,他们之前收集的研究数据全部丢失。美最终决定独自继续她的工作。她带上了一台可穿戴式气候控制装置,游历世界,希望能够重新建立起生态监测网络,查出威胁着这个星球生态系统的真正原因。', + ow_ana:'守望先锋的创始成员之一,世界公认的顶级狙击手。智械危机结束后,安娜被晋升为了上尉。尽管身居要职,但已年过半百的安娜拒绝离开战场,依然亲临前线。直至在一次人质解救行动中,遭遇了一个叫做“黑百合”的黑爪特工,所有人都认为安娜死在了那场战斗中。但事实上,安娜活了下来,身受重伤并且失去了自己的右眼。在恢复期间,她感受到了战斗中生命的不可承受之重,因此决定就此隐居。然而随着时间一天天过去,看着自己家乡遭到的威胁愈演愈烈,她突然意识到自己依然有责任保护身边的亲人。在“征用”了守望先锋军械库中的装备后,安娜重新回到了这个世界,为了一个更安全、稳定的和平世界而战。', + ow_heibaihe:'“黑百合”在成为如今的杀手之前,曾与对抗恐怖组织“黑爪”的守望先锋探员杰哈·拉克瓦结婚。在多次刺杀杰哈无果之后,黑爪决定将目标转向他的妻子,艾米丽。黑爪特工绑架了艾米丽并对其进行了一项高强度神经重构计划。他们击垮了她的意志,抑制了其本身的人性,将其变成了一个潜伏特工。她最终被守望先锋探员找到并在确认无致命伤之后重新过上了以前的生活。两周之后,她杀死了睡梦中的杰哈,并回归了黑爪。', + ow_maikelei:'曾是美国西南部因非法军火交易而臭名昭著的“死局”帮中,最令人胆寒的一员,后被守望先锋逮捕。由于其枪法精湛且足智多谋,守望先锋给了他两个选择:在最高安全级别的监狱中度过余生,或加入守望先锋的秘密行动部队“暗影守望”。他选择了后者。尽管一开始他对守望先锋的理念嗤之以鼻,但他逐渐相信可以通过扫除世上的不公,来弥补自己过去犯下的罪行。后来,暗影守望内部出现了异样的气氛:废除守望先锋,独掌大权。麦克雷由于不想参与其中,于是便独自离开,销声匿迹。多年之后,他以雇佣兵的身份再次出现。尽管许多大小团体都想拉拢他,但他只为自己眼中的正义而战。', + ow_kuangshu:'由于澳大利亚智能中枢核心在遭到攻击后发生爆炸,这片地区现在变成了寸草不生的辐射荒地。但即便如此,还是有一群自称为“拾荒者”的人类生存了下来。他们在残骸中寻找一切还可利用的东西,渐渐形成了一个野蛮、危险的团体。“狂鼠”就是其中的一员。和其他人一样,他也受到了辐射,因此变成了一个痴迷于危险炸弹的疯子。当他在中枢废墟中发掘出一个极其珍贵的宝藏后,全世界都知道了这个疯子的名号。尽管几乎没人知道他到底发现了什么,但他身后总有数不清的赏金猎人、黑帮和投机分子想要杀掉他,直到他与“拾荒者”打手“路霸”达到了一个协议:只要今后找到的宝贝五五分成,“路霸”就会是“狂鼠”的私人保镖。', + ow_tuobiang:'托比昂是一个极其不信任智械的天才工程师,但他的同行都认为这只是他杞人忧天而已。但托比昂最担心的事情最终还是发生了,一场机器人对抗其人类发明者的“智能危机”在全球范围内爆发。由于其在工程学方面的天才造诣,守望先锋向他伸出了橄榄枝,并将其纳入了最早的守望先锋攻击部队,而他也证明了自己在终结这场危机中的关键价值。但在守望先锋解散后,托比昂设计出的许多武器被偷走并被藏在世界各地。出于对自己作品的责任心,托比昂便发誓不能让这些武器落入敌手,危害无辜的世人。', + ow_baolei:'“堡垒”系列在设计之初是被用于维和目的的,这一系列的机器单位拥有能够快速在突击和攻城模式之间转换的独特能力。但在“智能危机”期间,该系列却被用来对抗其人类发明者,成为了机器人叛军的中坚力量。随着后来危机的解除,几乎所有的“堡垒”系列机器人都被销毁或拆解。直到今天,“堡垒”依旧是当年那场可怕战争的代名词。但是有一台独特的“堡垒”机器人,在那场战争的决战中严重受损,因此被遗忘了数十年。直到有一天,它被意外地重新激活,它的战斗程序几乎全部受损,取而代之的是对自然世界及其住民的强烈好奇。好奇的“堡垒”于是在这个被战火蹂躏过的世界上,开始了探索和寻找自我价值的旅途。', + ow_banzang:'岛田家据传已有数百年的历史。以忍者为主要成员的岛田家,经过多年的发展,已经建立起一个以军火和非法物资交易为主的庞大黑道帝国。作为大名的长子,半藏注定要继承他的父亲统治岛田帝国。父亲过世后,家族长老就建议半藏帮助他那刚愎自用的弟弟源氏,以便两人携手管理岛田帝国。在遭到源氏拒绝后,半藏被迫亲手了结了自己的弟弟。半藏因此深受打击,他拒绝继承父亲的遗产并最终抛弃了自己的家族和所有辛苦换来的成果。现在,半藏四海为家,不断磨练着自己作为一名武士的技巧,希望终有一天能挽回自己的名誉并真正放下自己的过去。', + ow_laiyinhate:'莱因哈特•威尔海姆的行事作风就像一个属于过去的勇士,时刻铭记着骑士的信条:无畏、公正、勇敢。莱因哈特独特的道德观和舍小为大的信念,深得其上级的喜爱。他有话直说,因此成为了守望先锋最坚定的拥护者,同时在有必要时,也是守望先锋最刻薄的批评者,时刻提醒着其他人,守望先锋是一支正义之师。莱因哈特一直服役到将近六十岁,因此不得不面临强制退役。而守望先锋又深陷腐败和煽动叛乱之嫌的泥沼,莱因哈特只能眼睁睁地看着自己守护了一生的信念被吞噬。尽管守望先锋最终解散,但莱因哈特绝不会在世界陷入混乱之时袖手旁观。他再一次穿上了十字军战甲,立誓为正义而战,像曾经的白银骑士那样守护欧罗巴大陆无辜的人民,坚信光明的未来必将到来。', + ow_luba:'“路霸”马可曾是众多居住在澳洲内陆的居民之一。在智能危机爆发后,政府作出了一个极具争议的决定,将这里送给了差点摧毁整个国家的智能机器人,以求达成永久的和平协定。这一决定直接导致马可和大批居民被迫离开,因失去家园而怒不可遏的马可和其他人开始了一场暴力起义,最终,引发了一场大爆炸,导致周围数公里地区全部遭到辐射,只留下了变形的金属和残骸。为了在这种环境下生存下来,他戴上了面具、骑着破烂摩托开上了通往澳洲内陆的残破高速公路。一路上,他的人性一点一点地被消磨,马可最终消失了,而“路霸”就此诞生。', + ow_wensidun:'在“地平线”月球殖民地的居民中,有一群经过基因改造的大猩猩。其中一只大猩猩在接受了哈罗德·温斯顿博士团队的基因改造后,显示出了极快的脑部发育迹象,博士本人也将人类科学和创造力教给了这只猩猩。但当其他大猩猩发动叛乱,杀死了所有科学家并占领殖民地后,他的生活便再也回不到过去了。出于对哈罗德博士的爱戴,这只大猩猩决定继承他的姓氏:温斯顿,并设计出了一枚临时火箭逃往了地球。他找到了新家:守望先锋 —— 这是一个代表着他所憧憬的所有人性的组织。温斯顿终于有机会实现哈罗德博士生前不断教导他的英雄理念。但随着后来守望先锋的解散,温斯顿也隐居了起来,再一次与他报以厚望的世界失去联系,但他却从未放弃对英雄最终回归的期望。', + ow_zhaliya:'亚历山德拉·查莉娅诺娃是世界上最强壮的女运动员之一。然而就在世锦赛前夕,一直处于休眠状态的西伯利亚机器人控制中枢再度发动攻击,战火再次蔓延到了她的家乡。早已名利双收的亚历山德拉,毅然抛弃了一切,立即回到家乡加入了当地的防御部队。', + ow_heiying:'作为全世界最臭名昭著的黑客,“黑影”利用信息与情报操控权贵。早在她称自己为“黑影”之前,░░░░░░是千千万万在智械危机后变成孤儿的儿童之一。在家乡大部分基础设施都被摧毁的情况下,她依靠自己在黑客以及计算机方面的天赋活了下来。在黑客领域的一连串的胜利让░░░░░░对自己的实力过度自信,最终她在毫无防备的情况下,陷入了一张覆盖全球的阴谋网——并且也因此被人盯上了。由于自己的安全面临严重威胁,░░░░░░不得不删除关于自己的全部信息,从此销声匿迹。后来,她以“黑影”的身份再度出现,经过改造的她决心查出那张阴谋网背后的真相。', + }, + skill:{ + woliu:{ + trigger:{player:'phaseEnd'}, + direct:true, + unique:true, + forceunique:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('woliu'),lib.filter.notMe,[1,2]).ai=function(target){ + if(get.attitude(player,target)<0){ + return get.effect(target,{name:'sha'},player,player); + } + return 0; + } + 'step 1' + if(result.bool){ + player.logSkill('woliu',result.targets); + var list=[player].concat(result.targets); + for(var i=0;i0){ + return [0,num]; + } + if(target.hp==1&&!target.hasShan()) return; + return [1,num]; + } + } + } + } + }, + qianggu:{ + enable:'phaseUse', + usable:1, + filterCard:true, + selectCard:2, + position:'he', + check:function(card){ + return 8-get.value(card); }, - order:2.5 - } - }, - qianggu2:{ - trigger:{target:'useCardToBefore'}, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'; - }, - mark:true, - intro:{ - content:'其他角色对你使用杀时需要弃置一张基本牌,否则杀对你无效' - }, - content:function(){ - "step 0" - var eff; - if(player.hasSkill('woliu2')){ - eff=-get.attitude(trigger.player,player); - } - else{ - eff=get.effect(player,trigger.card,trigger.player,trigger.player); - } - trigger.player.chooseToDiscard('享乐:弃置一张基本牌,否则杀对'+get.translation(player)+'无效',function(card){ - return get.type(card)=='basic'; - }).set('ai',function(card){ - if(_status.event.eff>0){ - return 10-get.value(card); - } - return 0; - }).set('eff',eff); - "step 1" - if(result.bool==false){ - trigger.finish(); - trigger.untrigger(); + filter:function(event,player){ + return player.countCards('he')>=2; + }, + content:function(){ + player.changeHujia(2); + player.addTempSkill('qianggu2',{player:'phaseBegin'}); + }, + ai:{ + result:{ + player:1 + }, + order:2.5 } }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'){ - if(_status.event.name=='qianggu2') return; - if(get.attitude(player,target)>0) return; - var bs=player.getCards('h',{type:'basic'}); - if(bs.length<2) return 0; - if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; - if(bs.length<=3&&player.countCards('h','sha')<=1){ - for(var i=0;i0){ + return 10-get.value(card); + } + return 0; + }).set('eff',eff); + "step 1" + if(result.bool==false){ + trigger.finish(); + trigger.untrigger(); + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'){ + if(_status.event.name=='qianggu2') return; + if(get.attitude(player,target)>0) return; + var bs=player.getCards('h',{type:'basic'}); + if(bs.length<2) return 0; + if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; + if(bs.length<=3&&player.countCards('h','sha')<=1){ + for(var i=0;i0; - }, - filterCard:true, - usable:1, - viewAs:{name:'jingleishan',nature:'thunder'}, - check:function(card){ - return 8-get.value(card) - }, - ai:{ - order:8, - expose:0.2, - threaten:1.2 - }, - mod:{ - playerEnabled:function(card,player,target){ - if(_status.event.skill=='dianji'&&get.distance(player,target)>2) return false; - } - } - }, - feitiao:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - var next=player.chooseCardTarget({ - prompt:get.prompt('feitiao'), - position:'he', - filterCard:true, - ai1:function(card){ - return 7-get.value(card); - }, - ai2:function(target){ - var att=get.attitude(player,target); - if(att>=0) return 0; - if(!target.countCards('he')) return -0.01; - var dist=get.distance(player,target); - if(dist>2){ - att-=2; - } - else if(dist==2){ - att--; - } - return -att; - }, - filterTarget:function(card,player,target){ - return player!=target; - } - }); - 'step 1' - if(result.bool){ - player.discard(result.cards); - var target=result.targets[0]; - player.logSkill('feitiao',target); - player.storage.feitiao2=target; - player.addTempSkill('feitiao2','phaseAfter'); - target.randomDiscard(); - } + }, + dianji:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + usable:1, + viewAs:{name:'jingleishan',nature:'thunder'}, + check:function(card){ + return 8-get.value(card) + }, + ai:{ + order:8, + expose:0.2, + threaten:1.2 + }, + mod:{ + playerEnabled:function(card,player,target){ + if(_status.event.skill=='dianji'&&get.distance(player,target)>2) return false; + } + } + }, + feitiao:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + var next=player.chooseCardTarget({ + prompt:get.prompt('feitiao'), + position:'he', + filterCard:true, + ai1:function(card){ + return 7-get.value(card); + }, + ai2:function(target){ + var att=get.attitude(player,target); + if(att>=0) return 0; + if(!target.countCards('he')) return -0.01; + var dist=get.distance(player,target); + if(dist>2){ + att-=2; + } + else if(dist==2){ + att--; + } + return -att; + }, + filterTarget:function(card,player,target){ + return player!=target; + } + }); + 'step 1' + if(result.bool){ + player.discard(result.cards); + var target=result.targets[0]; + player.logSkill('feitiao',target); + player.storage.feitiao2=target; + player.addTempSkill('feitiao2','phaseAfter'); + target.randomDiscard(); + } - } - }, - feitiao2:{ - mod:{ - globalFrom:function(from,to){ - if(to==from.storage.feitiao2) return -Infinity; - } - }, - mark:'character', - intro:{ - content:'与$的距离视为1直到回合结束' - }, - onremove:true - }, - zhencha:{ - init:function(player){ - player.storage.zhencha=true; - }, - mark:true, - intro:{ - content:function(storage,player){ - if(storage){ - return '每当你使用一张杀,你摸一张牌或回复一点体力'; - } - else if(player.hasSkill('bshaowei')&&player.storage.bshaowei){ - return '你的杀无视距离和防具、无数量限制且不可闪避;你不能闪避杀'; - } - else{ - return '无额外技能'; - } - } - }, - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - if(player.hasSkill('zhencha2')) return false; - return !player.storage.zhencha; - }, - content:function(){ - player.storage.bshaowei=false; - player.storage.zhencha=true; - if(player.marks.zhencha){ - player.marks.zhencha.firstChild.innerHTML='侦'; - } - player.addTempSkill('zhencha2','phaseAfter'); - }, - subSkill:{ - sha:{ - trigger:{player:'shaBegin'}, - direct:true, - filter:function(event,player){ - return player.storage.zhencha&&event.card&&event.card.name=='sha'; - }, - content:function(){ - player.chooseDrawRecover(get.prompt('zhencha')).logSkill='zhencha'; - } - } - }, - group:'zhencha_sha' - }, - bshaowei:{ - init:function(player){ - player.storage.bshaowei=false; - }, - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - if(player.hasSkill('zhencha2')) return false; - return !player.storage.bshaowei; - }, - check:function(event,player){ - if(!player.hasShan()) return true; - if(!player.hasSha()) return false; - return Math.random()<0.5; - }, - content:function(){ - player.storage.bshaowei=true; - player.storage.zhencha=false; - if(player.marks.zhencha){ - player.marks.zhencha.firstChild.innerHTML='哨'; - } - player.addTempSkill('zhencha2','phaseAfter'); - }, - subSkill:{ - sha:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(card.name=='sha'&&player.storage.bshaowei) return true; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha'&&player.storage.bshaowei) return Infinity; - } - }, - trigger:{target:'shaBegin',player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.bshaowei; - }, - check:function(){ - return false; - }, - content:function(){ - trigger.directHit=true; - }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(!player.storage.bshaowei) return false; - if(arg&&arg.name=='sha') return true; - return false; - } - } - } - }, - group:'bshaowei_sha', - ai:{ - threaten:function(player,target){ - if(target.storage.bshaowei) return 1.7; - return 1; - } - } - }, - zhencha2:{}, - pingzhang:{ - trigger:{global:'damageBegin'}, - alter:true, - intro:{ - content:function(storage,player){ - if(player.hasSkill('pingzhang2')){ - if(player.hasSkill('pingzhang3')){ - return '已对自已和其他角色发动屏障'; - } - else{ - return '已对自已发动屏障'; - } - } - else{ - return '已对其他角色发动屏障'; - } - }, - markcount:function(storage,player){ - if(player.hasSkill('pingzhang2')&&player.hasSkill('pingzhang3')){ - return 2; - } - return 1; - } - }, - filter:function(event,player){ - if(event.num<=0) return false; - var position=get.is.altered('pingzhang')?'h':'he'; - if(event.player==player){ - if(player.hasSkill('pingzhang2')) return false; - return player.countCards(position,{suit:'heart'}); - } - else{ - if(player.hasSkill('pingzhang3')) return false; - return player.countCards(position,{suit:'spade'}); - } - }, - direct:true, - content:function(){ - 'step 0' - var position=get.is.altered('pingzhang')?'h':'he'; - var suit=(player==trigger.player)?'heart':'spade'; - var next=player.chooseToDiscard(position,{suit:suit},get.prompt('pingzhang',trigger.player)); - next.ai=function(card){ - if(get.damageEffect(trigger.player,trigger.source,player)<0){ - return 8-get.value(card); - } - return 0; - } - next.logSkill=['pingzhang',trigger.player]; - 'step 1' - if(result.bool){ - trigger.num--; - if(player==trigger.player){ - player.addSkill('pingzhang2'); - } - else{ - player.addSkill('pingzhang3'); - } - player.markSkill('pingzhang'); - } - }, - group:['pingzhang_count'], - subSkill:{ - count:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.pingzhang=0; - if(player.hasSkill('pingzhang2')){ - player.storage.pingzhang++; - player.removeSkill('pingzhang2'); - } - if(player.hasSkill('pingzhang3')){ - player.storage.pingzhang++; - player.removeSkill('pingzhang3'); - } - player.unmarkSkill('pingzhang'); - } - } - }, - ai:{ - expose:0.2, - threaten:1.5 - } - }, - pingzhang2:{}, - pingzhang3:{}, - liyong:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.pingzhang>0; - }, - content:function(){ - trigger.num+=player.storage.pingzhang; - } - }, - liangou:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player; - }, - filterCard:true, - position:'he', - check:function(card){ - return 5-get.value(card); - }, - content:function(){ - 'step 0' - player.judge(function(card){ - return get.suit(card)!='heart'?1:-1; - }); - 'step 1' - if(result.bool){ - target.addTempSkill('liangou2','phaseAfter'); - target.storage.liangou2=player; - } - }, - ai:{ - order:10, - expose:0.2, - result:{ - target:function(player,target){ - if(get.damageEffect(target,player,target)<0&&player.hasCard(function(card){ - return get.tag(card,'damage')?true:false; - })){ - return -1; - } - return 0; - } - } - } - }, - liangou2:{ - mod:{ - // cardEnabled:function(card,player){ - // return false; - // }, - // cardUsable:function(card,player){ - // return false; - // }, - // cardRespondable:function(card,player){ - // return false; - // }, - // cardSavable:function(card,player){ - // return false; - // }, - globalTo:function(from,to){ - if(from==to.storage.liangou2) return -Infinity; - } + } + }, + feitiao2:{ + mod:{ + globalFrom:function(from,to){ + if(to==from.storage.feitiao2) return -Infinity; + } + }, + mark:'character', + intro:{ + content:'与$的距离视为1直到回合结束' + }, + onremove:true + }, + zhencha:{ + init:function(player){ + player.storage.zhencha=true; + }, + mark:true, + intro:{ + content:function(storage,player){ + if(storage){ + return '每当你使用一张杀,你摸一张牌或回复一点体力'; + } + else if(player.hasSkill('bshaowei')&&player.storage.bshaowei){ + return '你的杀无视距离和防具、无数量限制且不可闪避;你不能闪避杀'; + } + else{ + return '无额外技能'; + } + } + }, + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + if(player.hasSkill('zhencha2')) return false; + return !player.storage.zhencha; + }, + content:function(){ + player.storage.bshaowei=false; + player.storage.zhencha=true; + if(player.marks.zhencha){ + player.marks.zhencha.firstChild.innerHTML='侦'; + } + player.addTempSkill('zhencha2','phaseAfter'); + }, + subSkill:{ + sha:{ + trigger:{player:'shaBegin'}, + direct:true, + filter:function(event,player){ + return player.storage.zhencha&&event.card&&event.card.name=='sha'; + }, + content:function(){ + player.chooseDrawRecover(get.prompt('zhencha')).logSkill='zhencha'; + } + } + }, + group:'zhencha_sha' + }, + bshaowei:{ + init:function(player){ + player.storage.bshaowei=false; + }, + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + if(player.hasSkill('zhencha2')) return false; + return !player.storage.bshaowei; + }, + check:function(event,player){ + if(!player.hasShan()) return true; + if(!player.hasSha()) return false; + return Math.random()<0.5; + }, + content:function(){ + player.storage.bshaowei=true; + player.storage.zhencha=false; + if(player.marks.zhencha){ + player.marks.zhencha.firstChild.innerHTML='哨'; + } + player.addTempSkill('zhencha2','phaseAfter'); + }, + subSkill:{ + sha:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(card.name=='sha'&&player.storage.bshaowei) return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha'&&player.storage.bshaowei) return Infinity; + } + }, + trigger:{target:'shaBegin',player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.bshaowei; + }, + check:function(){ + return false; + }, + content:function(){ + trigger.directHit=true; + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(!player.storage.bshaowei) return false; + if(arg&&arg.name=='sha') return true; + return false; + } + } + } + }, + group:'bshaowei_sha', + ai:{ + threaten:function(player,target){ + if(target.storage.bshaowei) return 1.7; + return 1; + } + } + }, + zhencha2:{}, + pingzhang:{ + trigger:{global:'damageBegin'}, + alter:true, + intro:{ + content:function(storage,player){ + if(player.hasSkill('pingzhang2')){ + if(player.hasSkill('pingzhang3')){ + return '已对自已和其他角色发动屏障'; + } + else{ + return '已对自已发动屏障'; + } + } + else{ + return '已对其他角色发动屏障'; + } + }, + markcount:function(storage,player){ + if(player.hasSkill('pingzhang2')&&player.hasSkill('pingzhang3')){ + return 2; + } + return 1; + } + }, + filter:function(event,player){ + if(event.num<=0) return false; + var position=get.is.altered('pingzhang')?'h':'he'; + if(event.player==player){ + if(player.hasSkill('pingzhang2')) return false; + return player.countCards(position,{suit:'heart'}); + } + else{ + if(player.hasSkill('pingzhang3')) return false; + return player.countCards(position,{suit:'spade'}); + } + }, + direct:true, + content:function(){ + 'step 0' + var position=get.is.altered('pingzhang')?'h':'he'; + var suit=(player==trigger.player)?'heart':'spade'; + var next=player.chooseToDiscard(position,{suit:suit},get.prompt('pingzhang',trigger.player)); + next.ai=function(card){ + if(get.damageEffect(trigger.player,trigger.source,player)<0){ + return 8-get.value(card); + } + return 0; + } + next.logSkill=['pingzhang',trigger.player]; + 'step 1' + if(result.bool){ + trigger.num--; + if(player==trigger.player){ + player.addSkill('pingzhang2'); + } + else{ + player.addSkill('pingzhang3'); + } + player.markSkill('pingzhang'); + } + }, + group:['pingzhang_count'], + subSkill:{ + count:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.pingzhang=0; + if(player.hasSkill('pingzhang2')){ + player.storage.pingzhang++; + player.removeSkill('pingzhang2'); + } + if(player.hasSkill('pingzhang3')){ + player.storage.pingzhang++; + player.removeSkill('pingzhang3'); + } + player.unmarkSkill('pingzhang'); + } + } + }, + ai:{ + expose:0.2, + threaten:1.5 + } + }, + pingzhang2:{}, + pingzhang3:{}, + liyong:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.pingzhang>0; + }, + content:function(){ + trigger.num+=player.storage.pingzhang; + } + }, + liangou:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player; + }, + filterCard:true, + position:'he', + check:function(card){ + return 5-get.value(card); + }, + content:function(){ + 'step 0' + player.judge(function(card){ + return get.suit(card)!='heart'?1:-1; + }); + 'step 1' + if(result.bool){ + target.addTempSkill('liangou2','phaseAfter'); + target.storage.liangou2=player; + } + }, + ai:{ + order:10, + expose:0.2, + result:{ + target:function(player,target){ + if(get.damageEffect(target,player,target)<0&&player.hasCard(function(card){ + return get.tag(card,'damage')?true:false; + })){ + return -1; + } + return 0; + } + } + } + }, + liangou2:{ + mod:{ + // cardEnabled:function(card,player){ + // return false; + // }, + // cardUsable:function(card,player){ + // return false; + // }, + // cardRespondable:function(card,player){ + // return false; + // }, + // cardSavable:function(card,player){ + // return false; + // }, + globalTo:function(from,to){ + if(from==to.storage.liangou2) return -Infinity; + } + }, + onremove:true, + trigger:{player:'damageBegin'}, + usable:1, + forced:true, + popup:false, + content:function(){ + trigger.num++; + }, + // ai:{ + // effect:{ + // target:function(card,player,target){ + // if(get.tag(card,'damage')) return [1,-2]; + // if(get.tag(card,'respond')) return [1,-1]; + // } + // } + // } + }, + xiyang:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + return !player.isTurnedOver()&&player.isDamaged(); + }, + check:function(event,player){ + return player.hp<=1; + }, + content:function(){ + 'step 0' + player.turnOver(); + 'step 1' + player.recover(2); + } + }, + qinru:{ + trigger:{player:'useCardToBegin'}, + filter:function(event,player){ + return event.target!=player&&event.targets&& + event.targets.length==1&&!event.target.hasSkill('fengyin'); + }, + logTarget:'target', + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + intro:{ + content:'players' + }, + content:function(){ + 'step 0' + trigger.target.judge(function(card){ + return get.suit(card)=='heart'?0:-1; + }); + 'step 1' + if(result.suit!='heart'){ + var target=trigger.target; + if(!player.storage.qinru){ + player.storage.qinru=[]; + } + for(var i=0;i2){ + player.storage.qinru.shift(); + } + target.addTempSkill('fengyin',{player:'phaseAfter'}); + player.markSkill('qinru'); + } + }, + ai:{ + expose:0.2, + threaten:1.3, + } + }, + yinshen:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('yinshen'),'he',{type:'equip'}); + next.logSkill='yinshen'; + next.ai=function(card){ + if(player.hp==1) return 8-get.value(card); + if(player.isZhu) return 7-get.value(card); + if(player.hp==2) return 6-get.value(card); + return 5-get.value(card); + }; + "step 1" + if(result.bool){ + player.addTempSkill('qianxing',{player:'phaseBegin'}); + } + }, }, - onremove:true, - trigger:{player:'damageBegin'}, - usable:1, - forced:true, - popup:false, - content:function(){ - trigger.num++; - }, - // ai:{ - // effect:{ - // target:function(card,player,target){ - // if(get.tag(card,'damage')) return [1,-2]; - // if(get.tag(card,'respond')) return [1,-1]; - // } - // } - // } - }, - xiyang:{ - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - return !player.isTurnedOver()&&player.isDamaged(); - }, - check:function(event,player){ - return player.hp<=1; - }, - content:function(){ - 'step 0' - player.turnOver(); - 'step 1' - player.recover(2); - } - }, - qinru:{ - trigger:{player:'useCardToBegin'}, - filter:function(event,player){ - return event.target!=player&&event.targets&& - event.targets.length==1&&!event.target.hasSkill('fengyin'); - }, - logTarget:'target', - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - intro:{ - content:'players' - }, - content:function(){ - 'step 0' - trigger.target.judge(function(card){ - return get.suit(card)=='heart'?0:-1; - }); - 'step 1' - if(result.suit!='heart'){ - var target=trigger.target; - if(!player.storage.qinru){ - player.storage.qinru=[]; - } - for(var i=0;i2){ - player.storage.qinru.shift(); - } - target.addTempSkill('fengyin',{player:'phaseAfter'}); - player.markSkill('qinru'); - } - }, - ai:{ - expose:0.2, - threaten:1.3, - } - }, - yinshen:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('yinshen'),'he',{type:'equip'}); - next.logSkill='yinshen'; - next.ai=function(card){ - if(player.hp==1) return 8-get.value(card); - if(player.isZhu) return 7-get.value(card); - if(player.hp==2) return 6-get.value(card); - return 5-get.value(card); - }; - "step 1" - if(result.bool){ - player.addTempSkill('qianxing',{player:'phaseBegin'}); - } - }, - }, - maichong:{ - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - if(player.storage.qinru){ - for(var i=0;i0; - }, - filterTarget:function(card,player,target){ - return !target.hujia; - }, - filterCard:true, - position:'he', - check:function(card){ - var player=_status.event.player; - if(game.hasPlayer(function(current){ - return current.hp==1&&get.attitude(player,current)>2; - })){ - return 7-get.value(card); - } - return 5-get.value(card); - }, - content:function(){ - player.changeHujia(-1); - target.changeHujia(); - }, - ai:{ - order:5, - expose:0.2, - return:{ - target:function(player,target){ - return 1/Math.max(1,target.hp); - } - } - } - }, - maoding:{ - trigger:{player:'damageEnd',source:'damageEnd'}, - frequent:true, - filter:function(event,player){ - if(get.is.altered('maoding')&&event.source!=player) return false; - return true; - }, - alter:true, - content:function(){ - player.gain(game.createCard(get.typeCard('hslingjian').randomGet()),'gain2'); - }, - group:'maoding2', - ai:{ - threaten:1.5 - } - }, - maoding2:{ - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h',{type:'hslingjian'})>1; - }, - filterCard:{type:'hslingjian'}, - filterTarget:function(card,player,target){ - return !target.hujia; - }, - selectCard:2, - // usable:1, - content:function(){ - target.changeHujia(); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - return 2/Math.max(1,Math.sqrt(target.hp)); + maichong:{ + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + if(player.storage.qinru){ + for(var i=0;i0; + }, + filterTarget:function(card,player,target){ + return !target.hujia; + }, + filterCard:true, + position:'he', + check:function(card){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return current.hp==1&&get.attitude(player,current)>2; + })){ + return 7-get.value(card); + } + return 5-get.value(card); + }, + content:function(){ + player.changeHujia(-1); + target.changeHujia(); + }, + ai:{ + order:5, + expose:0.2, + return:{ + target:function(player,target){ + return 1/Math.max(1,target.hp); + } + } + } + }, + maoding:{ + trigger:{player:'damageEnd',source:'damageEnd'}, + frequent:true, + filter:function(event,player){ + if(get.is.altered('maoding')&&event.source!=player) return false; + return true; + }, + alter:true, + content:function(){ + player.gain(game.createCard(get.typeCard('hslingjian').randomGet()),'gain2'); + }, + group:'maoding2', + ai:{ + threaten:1.5 + } + }, + maoding2:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h',{type:'hslingjian'})>1; + }, + filterCard:{type:'hslingjian'}, + filterTarget:function(card,player,target){ + return !target.hujia; + }, + selectCard:2, + // usable:1, + content:function(){ + target.changeHujia(); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + return 2/Math.max(1,Math.sqrt(target.hp)); + }, }, + } + }, + paotai:{ + enable:'phaseUse', + intro:{ + content:function(storage){ + var num; + switch(storage){ + case 1:num=30;break; + case 2:num=60;break; + case 3:num=100;break; + } + return '结束阶段,有'+num+'%机率对一名随机敌人造成一点火焰伤害'; + } + }, + init:function(player){ + player.storage.paotai=0; + }, + filter:function(event,player){ + return player.countCards('h','sha')>0&&player.storage.paotai<3; + }, + filterCard:{name:'sha'}, + content:function(){ + player.storage.paotai++; + player.markSkill('paotai'); + }, + ai:{ + order:5, + threaten:1.5, + result:{ + player:1 + } + }, + group:['paotai2','paotai3'] + }, + paotai2:{ + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + var num=0; + switch(player.storage.paotai){ + case 1:num=30;break; + case 2:num=60;break; + case 3:num=100;break; + } + return 100*Math.random()0&&event.num>0; + }, + content:function(){ + player.storage.paotai-=trigger.num; + if(player.storage.paotai<=0){ + player.storage.paotai=0; + player.unmarkSkill('paotai'); + } + else{ + player.updateMarks(); + } + } + }, + bfengshi:{ + trigger:{player:'shaBegin'}, + forced:true, + alter:true, + check:function(event,player){ + return get.attitude(player,event.target)<=0; }, - } - }, - paotai:{ - enable:'phaseUse', - intro:{ - content:function(storage){ - var num; - switch(storage){ - case 1:num=30;break; - case 2:num=60;break; - case 3:num=100;break; - } - return '结束阶段,有'+num+'%机率对一名随机敌人造成一点火焰伤害'; - } - }, - init:function(player){ - player.storage.paotai=0; - }, - filter:function(event,player){ - return player.countCards('h','sha')>0&&player.storage.paotai<3; - }, - filterCard:{name:'sha'}, - content:function(){ - player.storage.paotai++; - player.markSkill('paotai'); - }, - ai:{ - order:5, - threaten:1.5, - result:{ - player:1 - } - }, - group:['paotai2','paotai3'] - }, - paotai2:{ - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - var num=0; - switch(player.storage.paotai){ - case 1:num=30;break; - case 2:num=60;break; - case 3:num=100;break; - } - return 100*Math.random()0&&event.num>0; - }, - content:function(){ - player.storage.paotai-=trigger.num; - if(player.storage.paotai<=0){ - player.storage.paotai=0; - player.unmarkSkill('paotai'); - } - else{ - player.updateMarks(); - } - } - }, - bfengshi:{ - trigger:{player:'shaBegin'}, - forced:true, - alter:true, - check:function(event,player){ - return get.attitude(player,event.target)<=0; - }, - filter:function(event,player){ - var num=0.2; - if(get.is.altered('bfengshi')) num=0.15; - return Math.random()0; - }, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - 'step 0' - var targets=player.getEnemies(function(target){ - return target.countCards('he')>0; - }); - if(targets.length){ - event.targets=targets.randomGets(3); - event.targets.sort(lib.sort.seat); - player.line(event.targets,'green'); - if(lib.config.mode=='identity'||lib.config.mode=='guozhan'){ - for(var i=0;i=1; - }, - filterTarget:function(card,player,target){ - return target!=player; - }, - filterCard:true, - selectCard:-1, - discard:false, - prepare:'give', - content:function(){ - target.gain(cards); - if(!get.is.altered('aqianghua')) target.changeHujia(); - target.addSkill('aqianghua2'); - }, - ai:{ - threaten:1.5, - order:2.1, - result:{ - target:function(player,target){ - if(get.attitude(player,target)<3) return 0; - if(target.hasJudge('lebu')) return 0; - if(target.hasSkill('aqianghua2')) return 0.1; - return 1; - } - } - } - }, - aqianghua2:{ - trigger:{source:'damageBegin'}, - forced:true, - content:function(){ - trigger.num++; - player.unmarkSkill('aqianghua2'); - player.removeSkill('aqianghua2'); - }, - mark:true, - intro:{ - content:'下一次造成的伤害+1' - } - }, - shihuo:{ - trigger:{global:'damageEnd'}, - forced:true, - filter:function(event){ - return event.nature=='fire'; - }, - content:function(){ - player.draw(); - } - }, - shoujia:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - check:function(card){ - return 6-get.value(card); - }, - discard:false, - prepare:'give2', - filterTarget:function(card,player,target){ - return target!=player&&!target.hasSkill('shoujia2'); - }, - content:function(){ - target.storage.shoujia=cards[0]; - target.storage.shoujia2=player; - target.addSkill('shoujia2'); - target.syncStorage('shoujia'); - }, - ai:{ - order:1, - expose:0.2, - threaten:1.4, - result:{ - target:-1 - } - } - }, - shoujia2:{ - mark:true, - trigger:{player:'useCardToBegin'}, - forced:true, - filter:function(event,player){ - return get.suit(event.card)==get.suit(player.storage.shoujia)&&event.target&&event.target!=player; - }, - content:function(){ - 'step 0' - player.showCards([player.storage.shoujia],get.translation(player)+'发动了【兽夹】'); - 'step 1' - ui.discardPile.appendChild(player.storage.shoujia); - delete player.storage.shoujia; - delete player.storage.shoujia2; - player.removeSkill('shoujia2'); - game.addVideo('storage',player,['shoujia',null]); - game.addVideo('storage',player,['shoujia2',null]); - player.turnOver(true); - }, - intro:{ - mark:function(dialog,content,player){ - if(player.storage.shoujia2&&player.storage.shoujia2.isUnderControl(true)){ - dialog.add([player.storage.shoujia]); - } - else{ - return '已成为'+get.translation(player.storage.shoujia2)+'的兽夹目标'; - } + filter:function(event,player){ + var num=0.2; + if(get.is.altered('bfengshi')) num=0.15; + return Math.random()=0; - }, - filter:function(event,player){ - if(event.card.name!='sha') return false; - return game.hasPlayer(function(current){ - return (event.targets.contains(current)==false&¤t!=player&& - lib.filter.targetEnabled(event.card,player,current)); - }); - }, - content:function(){ - var list=game.filterPlayer(function(current){ - return (trigger.targets.contains(current)==false&¤t!=player&& - lib.filter.targetEnabled(trigger.card,player,current)); - }); - if(list.length){ - var list2=[]; - for(var i=0;iplayer.countCards('h')&&!player.skipList.contains('phaseUse')&&!player.skipList.contains('phaseDiscard'); - }, - check:function(event,player){ - var nh=player.countCards('h'); - if(Math.min(5,player.hp)-nh>=2) return true; - return false; - }, - content:function(){ - var num=Math.min(5,player.hp)-player.countCards('h'); - var cards=[]; - while(num--){ - cards.push(game.createCard('sha')); - } - player.gain(cards,'gain2'); - player.skip('phaseUse'); - player.skip('phaseDiscard'); - } - }, - shanguang:{ - enable:'phaseUse', - usable:1, - filterCard:{suit:'diamond'}, - position:'he', - filter:function(event,player){ - return player.countCards('he',{suit:'diamond'})>0; - }, - filterTarget:function(card,player,target){ - return target!=player&&get.distance(player,target,'attack')<=1; - }, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - target.addTempSkill('shanguang2','phaseAfter'); - }, - ai:{ - order:7.9, - result:{ - target:function(player,target){ - var nh=target.countCards('h'); - if(get.attitude(player,target)<0&&nh>=3&& - player.canUse('sha',target)&&player.countCards('h','sha')&& - get.effect(target,{name:'sha'},player,player)>0){ - return -nh-5; - } - return -nh; - } - } - } - }, - shanguang2:{ - mod:{ - cardEnabled:function(){ - return false; + content:function(){ + trigger.directHit=true; }, - cardUsable:function(){ - return false; + mod:{ + attackFrom:function(from,to,distance){ + return distance-get.cardCount(true,from); + } + }, + group:'bfengshi2' + }, + bfengshi2:{ + trigger:{source:'damageBegin'}, + forced:true, + check:function(event,player){ + return get.attitude(player,event.target)<=0; }, - cardRespondable:function(){ - return false; + filter:function(event,player){ + var num=0.2; + if(get.is.altered('bfengshi')) num=0.15; + return event.card&&event.card.name=='sha'&&Math.random()0; + }, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + 'step 0' + var targets=player.getEnemies(function(target){ + return target.countCards('he')>0; + }); + if(targets.length){ + event.targets=targets.randomGets(3); + event.targets.sort(lib.sort.seat); + player.line(event.targets,'green'); + if(lib.config.mode=='identity'||lib.config.mode=='guozhan'){ + for(var i=0;i=1; + }, + filterTarget:function(card,player,target){ + return target!=player; + }, + filterCard:true, + selectCard:-1, + discard:false, + prepare:'give', + content:function(){ + target.gain(cards); + if(!get.is.altered('aqianghua')) target.changeHujia(); + target.addSkill('aqianghua2'); + }, + ai:{ + threaten:1.5, + order:2.1, + result:{ + target:function(player,target){ + if(get.attitude(player,target)<3) return 0; + if(target.hasJudge('lebu')) return 0; + if(target.hasSkill('aqianghua2')) return 0.1; + return 1; + } + } + } + }, + aqianghua2:{ + trigger:{source:'damageBegin'}, + forced:true, + content:function(){ + trigger.num++; + player.unmarkSkill('aqianghua2'); + player.removeSkill('aqianghua2'); + }, + mark:true, + intro:{ + content:'下一次造成的伤害+1' + } + }, + shihuo:{ + trigger:{global:'damageEnd'}, + forced:true, + filter:function(event){ + return event.nature=='fire'; + }, + content:function(){ + player.draw(); + } + }, + shoujia:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; }, - cardSavable:function(){ - return false; - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')||get.tag(card,'respondSha')){ - if(current<0) return 1.5; - } - } - } - } - }, - baoxue:{ - enable:'phaseUse', - init:function(player){ - player.storage.baoxue=false; - }, - intro:{ - content:'limited' - }, - mark:true, - unique:true, - skillAnimation:true, - animationColor:'water', - line:'thunder', - filter:function(event,player){ - return !player.storage.baoxue&&player.countCards('he',{color:'black'})>0; - }, - filterTarget:function(card,player,target){ - return target!=player; - }, - selectTarget:function(){ - return [1,_status.event.player.countCards('he',{color:'black'})]; - }, - alter:true, - delay:false, - contentBefore:function(){ - 'step 0' - game.delayx(); - 'step 1' - player.storage.baoxue=true; - player.awakenSkill('baoxue'); - player.showHandcards(); - player.discard(player.getCards('he',{color:'black'})); - }, - content:function(){ - 'step 0' - if(!get.is.altered('baoxue')){ - var he=target.getCards('he'); - if(he.length){ - target.discard(he.randomGet()); - } - } - 'step 1' - target.turnOver(true); - }, - contentAfter:function(){ - if(get.is.altered('baoxue')){ - player.turnOver(true); - } - }, - ai:{ - order:function(skill,player){ - var num=game.countPlayer(function(current){ - return get.attitude(player,current)<0; - }); - var nh=player.countCards('he',{color:'black'}); - if(nh==1&&num>1) return 0; - if(nh>num) return 1; - return 11; - }, - result:{ - target:function(player,target){ - if(player.hasUnknown()) return 0; - return -1; - } - } - } - }, - mianzhen:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterTarget:function(card,player,target){ - return target!=player&&!target.hasSkill('mianzhen2'); - }, - filterCard:true, - position:'he', - check:function(card){ - return 8-get.value(card); - }, - content:function(){ - 'step 0' - target.chooseToRespond({name:'shan'}); - 'step 1' - if(!result.bool) target.addSkill('mianzhen2'); - }, - ai:{ - order:2.2, - result:{ - target:function(player,target){ - return Math.min(-0.1,-1-target.countCards('h')+Math.sqrt(target.hp)/2); - } - } - } - }, - mianzhen2:{ - mark:true, - intro:{ - content:'不能使用或打出手牌直到受到伤害或下一回合结束' - }, - trigger:{player:['damageEnd','phaseEnd']}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('mianzhen2'); - }, - mod:{ - cardEnabled:function(){ - return false; - }, - cardUsable:function(){ - return false; - }, - cardRespondable:function(){ - return false; - }, - cardSavable:function(){ - return false; - } - }, - ai:{ - threaten:0.6 - } - }, - zhiyuan:{ - trigger:{source:'damageBefore'}, - check:function(event,player){ - player.disableSkill('tmp','zhiyuan'); - var eff=get.damageEffect(event.player,player,player); - var att=get.attitude(player,event.player); - var bool=false; - if(att>0){ - if(eff<=0||event.player.hp0; - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - trigger.player.recover(trigger.num); - }, - ai:{ - effect:{ - player:function(card,player,target){ - if(get.tag(card,'damage')&&get.attitude(player,target)>0){ - if(target.hp==target.maxHp) return [0,0,0,0]; - return [0,0,0,1]; - } - } - } - } - }, - duwen:{ - trigger:{source:'damageBegin'}, - check:function(event,player){ - return get.attitude(player,event.player)<=0; - }, - forced:true, - filter:function(event,player){ - return player.countCards('h')==event.player.countCards('h')&&event.notLink(); - }, - content:function(){ - trigger.num++; - }, - ai:{ - threaten:1.5 - }, - }, - duwen2:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.hp==event.player.hp&&event.notLink(); - }, - content:function(){ - player.draw(2); - } - }, - juji:{ - enable:'phaseUse', - usable:1, - position:'he', - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterCard:function(card){ - var suit=get.suit(card); - for(var i=0;i0; - }, - check:function(card){ - if(ui.selected.cards.length>1) return 0; - return 5-get.value(card); - }, - selectCard:[1,4], - content:function(){ - var suits=[]; - for(var i=0;inum){ - min.length=0; - min.push(players[i]); - num=eff; - } - } - } - for(var i=0;i0) return 0; - if(min[i].countCards('h')<=1&&get.distance(player,min[i],'attack')<=1) return 0; - } - if(min.contains(target)) return -1; - return 0; - } - } - }, - }, - juji2:{ - ai:{ - effect:{ - player:function(card,player,target){ - if(card.name=='sha'&&target==player.storage.juji2) return [1,0,1,-1]; - } - } - }, - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - content:function(){ - player.unmarkSkill('juji2'); - player.removeSkill('juji2'); - delete player.storage.juji2; - }, - group:'juji3' - }, - juji3:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return event.target==player.storage.juji2; - }, - content:function(){ - trigger.directHit=true; - }, - mod:{ - globalFrom:function(from,to){ - if(to==from.storage.juji2) return -Infinity; - } - } - }, - dulei:{ - enable:'phaseUse', - filter:function(event,player){ - return !player.hasSkill('dulei2'); - }, - filterCard:true, - check:function(card){ - return 6-get.value(card); - }, - discard:false, - prepare:function(cards,player){ - player.$give(1,player,false); - }, - content:function(){ - player.storage.dulei=cards[0]; - player.addSkill('dulei2'); - player.syncStorage('dulei'); - }, - ai:{ - order:1, - result:{ - player:1 - } - } - }, - dulei2:{ - mark:true, - trigger:{target:'useCardToBegin'}, - forced:true, - filter:function(event,player){ - return event.player!=player&&get.suit(event.card)==get.suit(player.storage.dulei); - }, - content:function(){ - 'step 0' - player.showCards([player.storage.dulei],get.translation(player)+'发动了【诡雷】'); - 'step 1' - ui.discardPile.appendChild(player.storage.dulei); - delete player.storage.dulei; - player.removeSkill('dulei2'); - game.addVideo('storage',player,['dulei',null]); - trigger.player.loseHp(); - 'step 2' - var he=trigger.player.getCards('he'); - if(he.length){ - trigger.player.discard(he.randomGet()); - } - }, - intro:{ - mark:function(dialog,content,player){ - if(player==game.me||player.isUnderControl()){ - dialog.add([player.storage.dulei]); - } - else{ - return '已发动诡雷'; - } - }, - content:function(content,player){ - if(player==game.me||player.isUnderControl()){ - return get.translation(player.storage.dulei); - } - return '已发动诡雷'; - } - } - }, - juji_old:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return get.distance(event.target,player,'attack')>1; - }, - content:function(){ - trigger.directHit=true; - }, - group:'juji2' - }, - juji2_old:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - target.addTempSkill('juji3',{player:'phaseEnd'}); - if(!target.storage.juji3){ - target.storage.juji3=[]; - } - target.storage.juji3.push(player); - }, - mod:{ - targetInRange:function(card,player,target){ - if(target.hasSkill('juji3')&&Array.isArray(target.storage.juji3)&&target.storage.juji3.contains(player)){ - return true; - } - } - } - }, - juji3_old:{ - mark:true, - intro:{ - nocount:true, - content:function(storage){ - return '对'+get.translation(storage)+'使用卡牌无视距离'; - } - }, - mod:{ - targetInRange:function(card,player,target){ - if(Array.isArray(player.storage.juji3)&&player.storage.juji3.contains(target)){ - return true; - } - } - } - }, - zhuagou:{ - enable:'phaseUse', - usable:1, - changeSeat:true, - filterTarget:function(card,player,target){ - return player!=target&&player.next!=target; - }, - filterCard:true, - check:function(card){ - return 4-get.value(card); - }, - content:function(){ - while(player.next!=target){ - game.swapSeat(player,player.next); - } - }, - ai:{ - order:5, - result:{ - player:function(player,target){ - var att=get.attitude(player,target); - if(target==player.previous&&att>0) return 1; - if(target==player.next.next&&get.attitude(player,player.next)<0) return 1; - return 0; - } - } - } - }, - bingqiang:{ - enable:'phaseUse', - position:'he', - filterCard:function(card){ - var color=get.color(card); - for(var i=0;imax){ - max=num; - } - if(num-min){ - if(get.color(card)=='red') return 5-get.value(card); - } - else{ - if(get.color(card)=='black') return 5-get.value(card); - } - return 0; - }, - changeTarget:function(player,targets){ - var target=targets[0]; - var add=game.filterPlayer(function(player){ - return get.distance(target,player,'pure')==1; - }); - for(var i=0;i0; - }, - content:function(){ - for(var i=0;i0; - }, - content:function(){ - 'step 0' - var goon=false; - var goon2=false; - var att=get.attitude(player,trigger.player); - if(att>0){ - if(trigger.player.hp==1) goon=true; - } - else{ - if(Math.random()<0.5) goon=true; - } - if(Math.random()<0.3) goon2=true; - player.chooseToDiscard([1,player.countCards('h')],'he',get.prompt('bingqiang',trigger.player)).set('logSkill',['bingqiang',trigger.player]).ai=function(card){ - if(ui.selected.cards.length) return 0; - if(goon) return 6-get.value(card); - if(goon2) return 4-get.value(card); - return 0; - } - 'step 1' - if(result.bool){ - var num=result.cards.length; - event.num=num; - player.chooseControl('选项一','选项二','选项三','选项四',function(){ - if(get.attitude(player,trigger.player)>0){ - if(Math.random()<0.7) return '选项一'; - return '选项三'; - } - else{ - if(Math.random()<0.7) return '选项四'; - return '选项二'; - } - return ''; - }).set('prompt','冰墙

选项一:防御距离+'+num+ - '

选项二:防御距离-'+num+ - '

选项三:进攻距离+'+num+ - '

选项四:进攻距离-'+num+'
'); - } - else{ - event.finish(); - } - 'step 2' - switch(result.control){ - case '选项一':{ - trigger.player.storage.bingqiang2=event.num; - trigger.player.addTempSkill('bingqiang2',{player:'phaseBegin'}); - break; - } - case '选项二':{ - trigger.player.storage.bingqiang3=event.num; - trigger.player.addTempSkill('bingqiang3',{player:'phaseBegin'}); - break; - } - case '选项三':{ - trigger.player.storage.bingqiang4=event.num; - trigger.player.addTempSkill('bingqiang4',{player:'phaseBegin'}); - break; - } - case '选项四':{ - trigger.player.storage.bingqiang5=event.num; - trigger.player.addTempSkill('bingqiang5',{player:'phaseBegin'}); - break; - } - } - }, - ai:{ - expose:0.1 - } - }, - bingqiang2:{ - mark:true, - intro:{ - content:'防御距离+#' - }, - mod:{ - globalTo:function(from,to,distance){ - if(typeof to.storage.bingqiang2=='number') return distance+to.storage.bingqiang2; - }, - } - }, - bingqiang3:{ - mark:true, - intro:{ - content:'防御距离-#' - }, - mod:{ - globalTo:function(from,to,distance){ - if(typeof to.storage.bingqiang3=='number') return distance-to.storage.bingqiang3; - }, - } - }, - bingqiang4:{ - mark:true, - intro:{ - content:'进攻距离+#' - }, - mod:{ - globalFrom:function(from,to,distance){ - if(typeof from.storage.bingqiang4=='number') return distance-from.storage.bingqiang4; - } - } - }, - bingqiang5:{ - mark:true, - intro:{ - content:'进攻距离-#' - }, - mod:{ - globalFrom:function(from,to,distance){ - if(typeof from.storage.bingqiang5=='number') return distance+from.storage.bingqiang5; - } - } - }, - shuangqiang:{ - trigger:{source:'damageBegin'}, - check:function(event,player){ - var att=get.attitude(player,event.player); - if(event.player.hp==1) return att>0; - return att<=0; - }, - logTarget:'player', - filter:function(event,player){ - return !event.player.isTurnedOver()&&event.num>0; - }, - content:function(){ - trigger.num--; - trigger.player.draw(); - trigger.player.turnOver(); - } - }, - jidong:{ - trigger:{global:'phaseEnd'}, - filter:function(event,player){ - return player.hp==1&&!player.isTurnedOver(); - }, - alter:true, - content:function(){ - 'step 0' - player.turnOver(); - player.recover(2); - 'step 1' - if(player.isTurnedOver()&&!get.is.altered('jidong')){ - player.addTempSkill('jidong2',{player:'turnOverAfter'}); - } - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 2; - return 1; - } - } - }, - jidong2:{ - trigger:{player:'damageBefore'}, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - nofire:true, - nothunder:true, - nodamage:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'damage')) return [0,0]; - } - }, - }, - mod:{ - targetEnabled:function(card,player,target){ - if(player!=target) return false; - } - } - }, - chongzhuang:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event,player){ - return player.storage.jijia<=0&&event.num>0; - }, - popup:false, - unique:true, - content:function(){ - player.storage.jijia2+=trigger.num; - if(player.storage.jijia2>=4){ - player.storage.jijia=4; - player.storage.jijia2=0; - player.markSkill('jijia'); - if(lib.config.skill_animation){ - player.logSkill('chongzhuang'); - player.$skill('重装') - } - } - } - }, - tuijin:{ - enable:'phaseUse', - usable:1, - unique:true, - filter:function(event,player){ - if(player.storage.jijia>0){ - return game.hasPlayer(function(current){ - return get.distance(player,current)>1 - }); - } - return false; - }, - filterTarget:function(card,player,target){ - return target!=player&&get.distance(player,target)>1; - }, - content:function(){ - player.storage.tuijin2=target; - player.addTempSkill('tuijin2','phaseAfter'); - }, - ai:{ - order:11, - result:{ - target:function(player,target){ - if(get.attitude(player,target)<0){ - if(get.distance(player,target)>2) return -1.5; - return -1; - } - return 0.3; - } - } - } - }, - tuijin2:{ - mod:{ - globalFrom:function(from,to){ - if(to==from.storage.feitiao2) return -Infinity; - } - }, - mark:'character', - intro:{ - content:'与$的距离视为1直到回合结束' - }, - onremove:true - }, - jijia:{ - mark:true, - unique:true, - init:function(player){ - player.storage.jijia=4; - player.storage.jijia2=0; - }, - intro:{ - content:'机甲体力值:#' - }, - mod:{ - maxHandcard:function(player,num){ - if(player.storage.jijia>0){ - return num+player.storage.jijia; - } - } - }, - trigger:{player:'changeHp'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.jijia>0&&event.parent.name=='damage'&&event.num<0; - }, - content:function(){ - player.hp-=trigger.num; - player.update(); - player.storage.jijia+=trigger.num; - if(player.storage.jijia<=0){ - player.unmarkSkill('jijia'); - } - else{ - player.updateMarks(); - } - }, - ai:{ - threaten:function(player,target){ - if(target.storage.jijia<=0) return 2; - return 1; - } - } - }, - zihui:{ - enable:'phaseUse', - filter:function(event,player){ - return player.storage.jijia>0; - }, - filterTarget:function(card,player,target){ - return target!=player&&get.distance(player,target)<=2; - }, - unique:true, - selectTarget:-1, - skillAnimation:true, - animationColor:'fire', - line:'fire', - alter:true, - content:function(){ - 'step 0' - var num=player.storage.jijia; - if(get.is.altered('zihui')){ - num=Math.max(1,Math.min(num,target.countCards('he'))); - } - target.chooseToDiscard(num,'he','弃置'+get.cnNumber(num)+'张牌,或受到2点火焰伤害').ai=function(card){ - if(target.hasSkillTag('nofire')) return 0; - if(get.type(card)!='basic') return 11-get.value(card); - if(target.hp>4) return 7-get.value(card); - if(target.hp==4&&num>=3) return 7-get.value(card); - if(target.hp==3&&num>=4) return 7-get.value(card); - if(num>1) return 8-get.value(card); - return 10-get.value(card); - }; - 'step 1' - if(!result.bool){ - target.damage(2,'fire'); - } - if(target==targets[targets.length-1]){ - player.storage.jijia=0; - player.unmarkSkill('jijia'); - } - }, - ai:{ - order:2, - result:{ - player:function(player){ - var num=0; - var players=game.filterPlayer(); - for(var i=0;i2) continue; - var nh=players[i].countCards('h'); - var att=get.attitude(player,players[i]); - if(nh0){ - if(players[i].hp<=2){ - num-=2; - } - else{ - num-=1.5; - } - } - } - else if(nh==player.storage.jijia){ - if(att<0){ - num+=0.5; - } - else if(att>0){ - num-=0.5; - } - } - } - if(num>=2) return 1; - return 0; - } - } - } - }, - xiandan:{ - trigger:{player:'shaBegin'}, - direct:true, - content:function(){ - "step 0" - var dis=trigger.target.countCards('h','shan')||trigger.target.getEquip('bagua')||trigger.target.countCards('h')>2; - var next=player.chooseToDiscard(get.prompt('xiandan')); - next.ai=function(card){ - if(dis) return 7-get.value(card); - return 0; - } - next.logSkill='xiandan'; - "step 1" - if(result.bool){ - if(get.color(result.cards[0])=='red'){ - trigger.directHit=true; - } - else{ - player.addTempSkill('xiandan2','shaAfter'); - } - } - } - }, - xiandan2:{ - trigger:{source:'damageBegin'}, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.notLink(); - }, - forced:true, - popup:false, - content:function(){ - trigger.num++; - } - }, - shouge:{ - trigger:{source:'dieAfter'}, - frequent:true, - content:function(){ - player.gain(game.createCard('zhiliaobo'),'gain2'); - } - }, - tuji:{ - mod:{ - globalFrom:function(from,to,distance){ - if(_status.currentPhase==from){ - return distance-get.cardCount(true,from); - } - }, - }, - }, - mujing:{ - enable:['chooseToRespond','chooseToUse'], - filterCard:function(card){ - return get.color(card)=='black'; - }, - position:'he', - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; - }, - prompt:'将一张黑色牌当杀使用或打出', - check:function(card){return 4-get.value(card)}, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; - }, - respondSha:true, - }, - group:'mujing2' - }, - mujing2:{ - trigger:{player:'shaMiss'}, - forced:true, - popup:false, - filter:function(event){ - return !event.parent._mujinged; - }, - content:function(){ - trigger.parent._mujinged=true; - player.getStat().card.sha--; - } - }, - lichang:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('lichang'),'he',{color:'red'}); - next.logSkill='lichang'; - next.ai=function(card){ + filterCard:true, + check:function(card){ return 6-get.value(card); - }; - "step 1" - if(result.bool){ - player.addSkill('lichang2'); - } - }, - }, - lichang2:{ - trigger:{player:'phaseBegin'}, - direct:true, - mark:true, - intro:{ - content:'下个准备阶段令一名距离1以内的角色回复一点体力或摸两张牌' - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('lichang'),function(card,player,target){ - return get.distance(player,target)<=1; - }).ai=function(target){ - var att=get.attitude(player,target); - if(att>0){ - if(target.hp==1&&target.maxHp>1) return att*2; - } - return att; - }; - player.removeSkill('lichang2'); - 'step 1' - if(result.bool){ - player.logSkill('lichang',result.targets); - result.targets[0].chooseDrawRecover(2,true); - } - } - }, - mujing_old:{ - trigger:{player:'useCardToBegin'}, - filter:function(event,player){ - return event.target&&event.target!=player&&get.distance(event.target,player,'attack')>1; - }, - direct:true, - content:function(){ - 'step 0' - player.discardPlayerCard(get.prompt('mujing'),trigger.target).logSkill=['mujing']; - 'step 1' - if(result.bool&&player.countCards('h')<=trigger.target.countCards('h')){ - player.draw(); - } - } - }, - zhanlong:{ - trigger:{player:'phaseBegin'}, - unique:true, - mark:true, - skillAnimation:true, - init:function(player){ - player.storage.zhanlong=false; - }, - check:function(event,player){ - if(player.hasJudge('lebu')) return false; - return true; - }, - filter:function(event,player){ - if(player.storage.zhanlong) return false; - if(player.countCards('he')==0) return false; - if(player.hp!=1) return false; - return true; - }, - content:function(){ - 'step 0' - player.discard(player.getCards('he')); - 'step 1' - player.addTempSkill('zhanlong2','phaseAfter'); - player.awakenSkill('zhanlong'); - player.storage.zhanlong=true; - var cards=[]; - for(var i=0;i<3;i++){ - cards.push(game.createCard('sha')); - } - player.gain(cards,'gain2'); - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 3; - return 1; }, - effect:{ - target:function(card,player,target){ - if(!target.hasFriend()) return; - if(get.tag(card,'damage')==1&&target.hp==2&&target.countCards('he')&& - !target.isTurnedOver()&&_status.currentPhase!=target){ - if(get.distance(_status.currentPhase,target,'absolute')<=2) return [0.5,1]; - return 0.8; - } + discard:false, + prepare:'give2', + filterTarget:function(card,player,target){ + return target!=player&&!target.hasSkill('shoujia2'); + }, + content:function(){ + target.storage.shoujia=cards[0]; + target.storage.shoujia2=player; + target.addSkill('shoujia2'); + target.syncStorage('shoujia'); + }, + ai:{ + order:1, + expose:0.2, + threaten:1.4, + result:{ + target:-1 } } - }, - intro:{ - content:'limited' - } - }, - zhanlong2:{ - mod:{ - cardUsable:function(card){ - if(card.name=='sha') return Infinity; - } - } - }, - feiren:{ - trigger:{source:'damageBegin'}, - forced:true, - alter:true, - filter:function(event,player){ - return !get.is.altered('feiren')&&event.card&&event.card.name=='sha'&&get.suit(event.card)=='spade'&&event.notLink(); }, - content:function(){ - trigger.num++; + shoujia2:{ + mark:true, + trigger:{player:'useCardToBegin'}, + forced:true, + filter:function(event,player){ + return get.suit(event.card)==get.suit(player.storage.shoujia)&&event.target&&event.target!=player; + }, + content:function(){ + 'step 0' + player.showCards([player.storage.shoujia],get.translation(player)+'发动了【兽夹】'); + 'step 1' + ui.discardPile.appendChild(player.storage.shoujia); + delete player.storage.shoujia; + delete player.storage.shoujia2; + player.removeSkill('shoujia2'); + game.addVideo('storage',player,['shoujia',null]); + game.addVideo('storage',player,['shoujia2',null]); + player.turnOver(true); + }, + intro:{ + mark:function(dialog,content,player){ + if(player.storage.shoujia2&&player.storage.shoujia2.isUnderControl(true)){ + dialog.add([player.storage.shoujia]); + } + else{ + return '已成为'+get.translation(player.storage.shoujia2)+'的兽夹目标'; + } + }, + content:function(content,player){ + if(player.storage.shoujia2&&player.storage.shoujia2.isUnderControl(true)){ + return get.translation(player.storage.shoujia); + } + return '已成为'+get.translation(player.storage.shoujia2)+'的兽夹目标'; + } + }, + group:'shoujia3' }, - mod:{ - targetInRange:function(card){ - if(card.name=='sha') return true; - }, - selectTarget:function(card,player,range){ - if(card.name=='sha'&&range[1]!=-1&&get.suit(card)=='club'){ - range[1]++; - } - }, - }, - ai:{ - threaten:1.4 - } - }, - feiren3:{ - trigger:{player:'useCardAfter'}, - filter:function(event,player){ - if(event.parent.name=='feiren2') return false; - if(event.card.name!='sha') return false; - if(get.suit(event.card)!='spade') return false; - var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); - for(var i=0;i=0; + }, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return (event.targets.contains(current)==false&¤t!=player&& + lib.filter.targetEnabled(event.card,player,current)); + }); + }, + content:function(){ + var list=game.filterPlayer(function(current){ + return (trigger.targets.contains(current)==false&¤t!=player&& + lib.filter.targetEnabled(trigger.card,player,current)); + }); + if(list.length){ + var list2=[]; + for(var i=0;iplayer.countCards('h')&&!player.skipList.contains('phaseUse')&&!player.skipList.contains('phaseDiscard'); + }, + check:function(event,player){ + var nh=player.countCards('h'); + if(Math.min(5,player.hp)-nh>=2) return true; + return false; + }, + content:function(){ + var num=Math.min(5,player.hp)-player.countCards('h'); + var cards=[]; + while(num--){ + cards.push(game.createCard('sha')); + } + player.gain(cards,'gain2'); + player.skip('phaseUse'); + player.skip('phaseDiscard'); + } + }, + shanguang:{ + enable:'phaseUse', + usable:1, + filterCard:{suit:'diamond'}, + position:'he', + filter:function(event,player){ + return player.countCards('he',{suit:'diamond'})>0; + }, + filterTarget:function(card,player,target){ + return target!=player&&get.distance(player,target,'attack')<=1; + }, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + target.addTempSkill('shanguang2','phaseAfter'); + }, + ai:{ + order:7.9, + result:{ + target:function(player,target){ + var nh=target.countCards('h'); + if(get.attitude(player,target)<0&&nh>=3&& + player.canUse('sha',target)&&player.countCards('h','sha')&& + get.effect(target,{name:'sha'},player,player)>0){ + return -nh-5; + } + return -nh; + } + } + } + }, + shanguang2:{ + mod:{ + cardEnabled:function(){ + return false; + }, + cardUsable:function(){ + return false; + }, + cardRespondable:function(){ + return false; + }, + cardSavable:function(){ return false; } - } - return true; - }, - content:function(){ - var card=game.createCard(trigger.card.name,trigger.card.suit,trigger.card.number,trigger.card.nature); - player.useCard(card,trigger.targets); - }, - ai:{ - threaten:1.3 - }, - }, - xie:{ - enable:'phaseUse', - unique:true, - filterTarget:function(card,player,target){ - return target!=player&&!target.hasSkill('xie2'); - }, - filter:function(event,player){ - return player.countCards('h',{suit:'heart'}); - }, - filterCard:{suit:'heart'}, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - var current=game.findPlayer(function(player){ - return player.hasSkill('xie2'); - }); - if(current){ - current.removeSkill('xie2'); - } - target.addSkill('xie2'); - target.storage.xie='now'; - target.storage.xie2=player; - }, - ai:{ - expose:0.2, - order:9.1, - threaten:2, - result:{ - target:function(player,target){ - var current=game.findPlayer(function(player){ - return player.hasSkill('xie2'); - }); - if(current&&get.recoverEffect(current,player,player)>0){ - return 0; - } - return get.recoverEffect(target,player,target); - } - } - } - }, - xie2:{ - mark:true, - trigger:{global:'phaseEnd'}, - forced:true, - filter:function(event,player){ - if(player.storage.xie=='now'){ - return event.player==player; - } - var num=game.phaseNumber-player.storage.xie; - return num&&num%6==0; - }, - content:function(){ - if(player.storage.xie=='now'){ - player.storage.xie=game.phaseNumber; - } - player.recover(); - }, - intro:{ - content:function(storage,player){ - var str='每隔六回合回复一点体力,直到'+get.translation(storage)+'死亡'; - if(typeof player.storage.xie=='number'){ - var num=game.phaseNumber-player.storage.xie; - num=num%6; - if(num==0){ - str+='(下次生效于本回合)' - } - else{ - str+='(下次生效于'+(6-num)+'回合后)' - } - } - return str; - }, - onunmark:function(storage,player){ - delete player.storage.xie; - delete player.storage.xie2; - } - }, - group:['xie3','xie4'] - }, - xie3:{ - trigger:{global:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - var num=game.phaseNumber-player.storage.xie; - num=num%6; - if(num){ - num=6-num; - } - player.storage.xie2_markcount=num; - player.updateMarks(); - } - }, - xie4:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.player==player.storage.xie2; - }, - content:function(){ - game.log(player,'解除了','【谐】'); - player.removeSkill('xie2'); - } - }, - luan:{ - enable:'phaseUse', - unique:true, - filterTarget:function(card,player,target){ - return target!=player&&!target.hasSkill('luan2'); - }, - filter:function(event,player){ - return player.countCards('h',{suit:'spade'}); - }, - filterCard:{suit:'spade'}, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - var current=game.findPlayer(function(player){ - return player.hasSkill('luan2'); - }); - if(current){ - current.removeSkill('luan2'); - } - target.addSkill('luan2'); - // target.storage.luan='now'; - target.storage.luan2=player; - }, - ai:{ - expose:0.2, - order:9.1, - threaten:2, - result:{ - target:function(player,target){ - var current=game.findPlayer(function(player){ - return player.hasSkill('luan2'); - }); - if(current&&get.attitude(player,current)<0){ - return 0; - } - if(target.hp==1) return 0.5; - return -1; - } - } - } - }, - luan2:{ - mark:true, - intro:{ - content:'受到的伤害后流失一点体力,直到首次进入濒死状态' - }, - trigger:{player:'damageEnd'}, - forced:true, - content:function(){ - player.loseHp(); - }, - ai:{ - threaten:1.2 - }, - group:['luan3','luan4'] - }, - luan3:{ - trigger:{player:'dyingAfter'}, - forced:true, - popup:false, - content:function(){ - game.log(player,'解除了','【乱】'); - player.removeSkill('luan2'); - } - }, - luan2_old:{ - mark:true, - trigger:{global:'phaseEnd'}, - forced:true, - filter:function(event,player){ - if(player.storage.luan=='now'){ - return event.player==player; - } - var num=game.phaseNumber-player.storage.luan; - return num&&num%6==0; - }, - content:function(){ - if(player.storage.luan=='now'){ - player.storage.luan=game.phaseNumber; - } - player.loseHp(); - }, - intro:{ - content:function(storage,player){ - var str='每隔六回合失去一点体力,直到'+get.translation(storage)+'死亡'; - if(typeof player.storage.luan=='number'){ - var num=game.phaseNumber-player.storage.luan; - num=num%6; - if(num==0){ - str+='(下次生效于本回合)' - } - else{ - str+='(下次生效于'+(6-num)+'回合后)' - } - } - return str; - }, - onunmark:function(storage,player){ - delete player.storage.luan; - delete player.storage.luan2; - } - }, - group:['luan3','luan4'] - }, - luan3_old:{ - trigger:{global:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - var num=game.phaseNumber-player.storage.luan; - num=num%6; - if(num){ - num=6-num; - } - player.storage.luan2_markcount=num; - player.updateMarks(); - } - }, - luan4:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.player==player.storage.luan2; - }, - content:function(){ - game.log(player,'解除了','【乱】'); - player.removeSkill('luan2'); - } - }, - sheng:{ - enable:'phaseUse', - unique:true, - mark:true, - skillAnimation:true, - animationColor:'metal', - init:function(player){ - player.storage.sheng=false; - }, - filter:function(event,player){ - if(player.storage.sheng) return false; - return true; - }, - filterTarget:function(card,player,target){ - return target.isDamaged(); - }, - selectTarget:[1,Infinity], - contentBefore:function(){ - player.turnOver(); - player.addSkill('sheng2'); - player.awakenSkill('sheng'); - player.storage.sheng=true; - }, - content:function(){ - target.recover(); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - var eff=get.recoverEffect(target,player,target); - if(player.hp==1) return eff; - if(player.hasUnknown()) return 0; - var num1=0,num2=0,num3=0,players=game.filterPlayer(); - for(var i=0;i0){ - num1++; - if(players[i].isDamaged()){ - num2++; - if(players[i].hp<=1){ - num3++; - } - } - } - } - if(num1==num2) return eff; - if(num2==num1-1&&num3) return eff; - if(num3>=2) return eff; - return 0; - } }, - }, - intro:{ - content:'limited' - } - }, - sheng2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('sheng2'); - }, - mod:{ - targetEnabled:function(card,player,target){ - if(player!=target) return false; - } - } - }, - yihun:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{color:'black'})>0&&!player.hasSkill('yihun2'); - }, - content:function(){ - 'step 0' - var next=player.chooseCardTarget({ - prompt:get.prompt('yihun'), - position:'he', - filterCard:function(card,player){ - return get.color(card)=='black'&&lib.filter.cardDiscardable(card,player); - }, - ai1:function(card){ - return 7-get.value(card); - }, - ai2:function(target){ - var att=-get.attitude(player,target); - if(target==player.next){ - att/=10; - } - if(target==player.next.next){ - att/=2; - } - return att; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - }); - 'step 1' - if(result.bool){ - player.discard(result.cards); - player.logSkill('yihun',result.targets); - player.addSkill('yihun2'); - var target=result.targets[0] - player.storage.yihun2=target; - if(target&&(get.mode()!='guozhan')||!target.isUnseen()){ - player.markSkillCharacter('yihun2',target,'移魂','在'+get.translation(target)+'的下一准备阶段视为对其使用一张杀'); - } - } - }, - }, - yihun2:{ - trigger:{global:['phaseBegin','dieAfter']}, - forced:true, - filter:function(event,player){ - return event.player==player.storage.yihun2; - }, - content:function(){ - if(player.storage.yihun2.isIn()){ - player.useCard({name:'sha'},player.storage.yihun2); - } - player.removeSkill('yihun2'); - delete player.storage.yihun2; - }, - mod:{ - targetEnabled:function(){ - return false; + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')||get.tag(card,'respondSha')){ + if(current<0) return 1.5; + } + } + } + } + }, + baoxue:{ + enable:'phaseUse', + init:function(player){ + player.storage.baoxue=false; + }, + intro:{ + content:'limited' + }, + mark:true, + unique:true, + skillAnimation:true, + animationColor:'water', + line:'thunder', + filter:function(event,player){ + return !player.storage.baoxue&&player.countCards('he',{color:'black'})>0; + }, + filterTarget:function(card,player,target){ + return target!=player; + }, + selectTarget:function(){ + return [1,_status.event.player.countCards('he',{color:'black'})]; + }, + alter:true, + delay:false, + contentBefore:function(){ + 'step 0' + game.delayx(); + 'step 1' + player.storage.baoxue=true; + player.awakenSkill('baoxue'); + player.showHandcards(); + player.discard(player.getCards('he',{color:'black'})); + }, + content:function(){ + 'step 0' + if(!get.is.altered('baoxue')){ + var he=target.getCards('he'); + if(he.length){ + target.discard(he.randomGet()); + } + } + 'step 1' + target.turnOver(true); + }, + contentAfter:function(){ + if(get.is.altered('baoxue')){ + player.turnOver(true); + } + }, + ai:{ + order:function(skill,player){ + var num=game.countPlayer(function(current){ + return get.attitude(player,current)<0; + }); + var nh=player.countCards('he',{color:'black'}); + if(nh==1&&num>1) return 0; + if(nh>num) return 1; + return 11; + }, + result:{ + target:function(player,target){ + if(player.hasUnknown()) return 0; + return -1; + } + } + } + }, + mianzhen:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterTarget:function(card,player,target){ + return target!=player&&!target.hasSkill('mianzhen2'); + }, + filterCard:true, + position:'he', + check:function(card){ + return 8-get.value(card); + }, + content:function(){ + 'step 0' + target.chooseToRespond({name:'shan'}); + 'step 1' + if(!result.bool) target.addSkill('mianzhen2'); + }, + ai:{ + order:2.2, + result:{ + target:function(player,target){ + return Math.min(-0.1,-1-target.countCards('h')+Math.sqrt(target.hp)/2); + } + } + } + }, + mianzhen2:{ + mark:true, + intro:{ + content:'不能使用或打出手牌直到受到伤害或下一回合结束' + }, + trigger:{player:['damageEnd','phaseEnd']}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('mianzhen2'); }, - cardEnabled:function(card,player){ - return false; + mod:{ + cardEnabled:function(){ + return false; + }, + cardUsable:function(){ + return false; + }, + cardRespondable:function(){ + return false; + }, + cardSavable:function(){ + return false; + } }, - } - }, - huoyu:{ - enable:'phaseUse', - unique:true, - mark:true, - skillAnimation:true, - animationColor:'fire', - init:function(player){ - player.storage.huoyu=false; - }, - filter:function(event,player){ - if(player.storage.huoyu) return false; - if(player.countCards('he',{color:'red'})<2) return false; - return true; - }, - filterTarget:function(card,player,target){ - return player.canUse('chiyuxi',target); - }, - filterCard:{color:'red'}, - selectCard:2, - position:'he', - check:function(card){ - return 7-get.value(card); - }, - selectTarget:-1, - multitarget:true, - multiline:true, - line:'fire', - content:function(){ - 'step 0' - targets.sort(lib.sort.seat); - player.awakenSkill('huoyu'); - player.storage.huoyu=true; - player.useCard({name:'chiyuxi'},targets).animate=false; - 'step 1' - player.useCard({name:'chiyuxi'},targets).animate=false; - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - if(player.hasUnknown()) return 0; - return get.effect(target,{name:'chiyuxi'},player,target); - } + ai:{ + threaten:0.6 + } + }, + zhiyuan:{ + trigger:{source:'damageBefore'}, + check:function(event,player){ + player.disableSkill('tmp','zhiyuan'); + var eff=get.damageEffect(event.player,player,player); + var att=get.attitude(player,event.player); + var bool=false; + if(att>0){ + if(eff<=0||event.player.hp0; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + trigger.player.recover(trigger.num); + }, + ai:{ + effect:{ + player:function(card,player,target){ + if(get.tag(card,'damage')&&get.attitude(player,target)>0){ + if(target.hp==target.maxHp) return [0,0,0,0]; + return [0,0,0,1]; + } + } + } + } + }, + duwen:{ + trigger:{source:'damageBegin'}, + check:function(event,player){ + return get.attitude(player,event.player)<=0; }, - }, - intro:{ - content:'limited' - } - }, - feidan:{ - trigger:{source:'damageAfter'}, - direct:true, - filter:function(event,player){ - if(player.countCards('he')==0) return false; - if(!event.card) return false; - if(event.card.name!='sha') return false; - return game.hasPlayer(function(current){ - return current!=event.player&&get.distance(event.player,current)<=1 - }); - }, - content:function(){ - "step 0" - var eff=0; - var targets=game.filterPlayer(function(current){ - if(current!=trigger.player&&get.distance(trigger.player,current)<=1){ - eff+=get.damageEffect(current,player,player); - return true; - } - }); - event.targets=targets; - player.chooseToDiscard(get.prompt('feidan',targets)).set('ai',function(card){ - if(eff>0) return 7-get.value(card); - return 0; - }).set('logSkill',['feidan',targets]); - "step 1" - if(result.bool){ - event.targets.sort(lib.sort.seat); - } - else{ - event.finish(); - } - "step 2" - if(event.targets.length){ - event.targets.shift().damage(); - event.redo(); - } - }, - mod:{ - targetInRange:function(card,player,target){ - if(card.name=='sha'){ - if(get.distance(player,target)<=1) return false; - return true; - } - } - } - }, - yuedong:{ - trigger:{player:'phaseUseEnd'}, - direct:true, - content:function(){ - 'step 0' - var num=1+player.storage.yuedong_num; - player.chooseTarget(get.prompt('yuedong'),[1,num],function(card,player,target){ - if(player.storage.yuedong_recover){ - return target.hp1) return att/5; - if(num2==1){ - if(num>1) return att/3; - return att/4; - } - return att; - } - return att; - }); - 'step 1' - if(result.bool){ - player.logSkill('yuedong',result.targets); - var eff=1+player.storage.yuedong_eff; - if(player.storage.yuedong_recover){ - result.targets.sort(lib.sort.seat); - for(var i=0;i1&&!player.storage.yuedong_recover; - }, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - player.storage.yuedong_recover=true; - }, - ai:{ - order:10.2, - result:{ - player:function(player){ - var num1=0,num2=0,players=game.filterPlayer(); - for(var i=0;i0){ - num2++; - if(players[i].hp<=2&&players[i].maxHp>2){ - num1++; - if(players[i].hp==1){ - num1++; - } - } - } - } - if(num1>=3){ - return 1; - } - return 0; - } - } - } - }, - kuoyin:{ - enable:'phaseUse', - filterCard:true, - selectCard:function(){ - if(get.is.altered('kuoyin')) return 1; - if(_status.event.player.storage.yuedong_eff) return 1; - if(_status.event.player.storage.yuedong_num) return 2; - return [1,2]; - }, - position:'he', - alter:true, - filter:function(event,player){ - if(get.is.altered('kuoyin')&&player.storage.yuedong_num) return false; - if(player.storage.yuedong_eff&&player.storage.yuedong_num) return false; - return player.countCards('he')>0; - }, - check:function(card){ - var player=_status.event.player; - var num1=0,num2=0,players=game.filterPlayer(); - for(var i=0;i0){ - num2++; - if(players[i].hp<=2&&players[i].maxHp>2){ - num1++; - } - } - } - if(player.storage.yuedong_recover){ - if(num1>1&&!player.storage.yuedong_num){ - if(ui.selected.cards.length) return 0; - return 7-get.value(card); - } - return 0; - } - else{ - if(num2>1&&!player.storage.yuedong_num){ - if(ui.selected.cards.length) return 0; - return 7-get.value(card); - } - if(num2>2){ - return 6-get.value(card); - } - return 5-get.value(card); - } - }, - content:function(){ - if(cards.length==1){ - player.storage.yuedong_num+=2; - } - else{ - player.storage.yuedong_eff++; - } - }, - ai:{ - threaten:1.6, - order:10.1, - result:{ - player:1 - } - }, - group:'kuoyin2' - }, - kuoyin2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.yuedong_recover=false; - player.storage.yuedong_num=0; - player.storage.yuedong_eff=0; - } - }, - guangshu:{ - enable:'phaseUse', - check:function(card){ - var player=_status.event.player; - var suit=get.suit(card); - if(suit=='heart'){ - if(game.hasPlayer(function(current){ - return current.hp==1&&get.attitude(player,current)>0 - })); - } - else if(suit=='spade'){ - return 7-get.value(card); - } - return 6-get.value(card); - }, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterTarget:function(card,player,target){ - return !target.hasSkill('guangshu_heart')&& - !target.hasSkill('guangshu_spade')&& - !target.hasSkill('guangshu_club')&& - !target.hasSkill('guangshu_diamond'); - }, - filterCard:true, - position:'he', - content:function(){ - target.addSkill('guangshu_'+get.suit(cards[0])); - }, - ai:{ - expose:0.2, - threaten:1.6, - order:5, - result:{ - target:function(player,target){ - if(!ui.selected.cards.length) return 0; - switch(get.suit(ui.selected.cards[0])){ - case 'heart':if(target.hp==1) return 1;return 0.1; - case 'diamond':return 1+Math.sqrt(target.countCards('h')); - case 'club':return -target.countCards('h')-Math.sqrt(target.countCards('h','sha')); - case 'spade':return get.damageEffect(target,player,target,'thunder'); - default:return 0; - } - } - } - } - }, - guangshu_diamond:{ - mark:true, - intro:{ - content:'下次造成伤害时摸两张牌' - }, - trigger:{source:'damageEnd'}, - forced:true, - content:function(){ - player.draw(2); - player.removeSkill('guangshu_diamond'); - } - }, - guangshu_heart:{ - mark:true, - intro:{ - content:'下次受到伤害时回复一点体力' - }, - trigger:{player:'damageEnd'}, - priority:6, - forced:true, - content:function(){ - player.recover(); - player.removeSkill('guangshu_heart'); - } - }, - guangshu_club:{ - mark:true, - intro:{ - content:'无法使用杀直到下一回合结束' - }, - trigger:{player:'phaseEnd'}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('guangshu_club'); - }, - mod:{ - cardEnabled:function(card){ - if(card.name=='sha') return false; - } - } - }, - guangshu_spade:{ - mark:true, - intro:{ - content:'下个结束阶段受到一点无来源的雷电伤害' - }, - trigger:{player:'phaseEnd'}, - forced:true, - content:function(){ - player.damage('thunder','nosource'); - player.removeSkill('guangshu_spade'); - } - }, - ziyu:{ - trigger:{global:'phaseEnd'}, - direct:true, - filter:function(event,player){ - if(get.is.altered('ziyu')) return game.phaseNumber%6==0; - return game.phaseNumber%4==0; - }, - alter:true, - content:function(){ - player.chooseDrawRecover(get.prompt('ziyu')).logSkill='ziyu'; - } - }, - shouhu:{ - mod:{ - cardEnabled:function(card){ - if(card.name=='sha') return false; - }, - }, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h','sha')>0; - }, - filterTarget:function(card,player,target){ - return target.hpplayer.hp&&player.countCards('h','lebu')==0)||get.distance(player,event.player)>1); - }, - alter:true, - intro:{ - content:function(storage,player){ - var str=''; - if(player.storage.shanxian_h.length){ - if(player.isUnderControl(true)){ - str+='手牌区:'+get.translation(player.storage.shanxian_h); - } - else{ - str+='手牌区:'+(player.storage.shanxian_h.length)+'张牌'; - } - } - if(player.storage.shanxian_e.length){ - if(str.length) str+='、'; - if(player.isUnderControl(true)){ - str+='装备区:'+get.translation(player.storage.shanxian_e); - } - else{ - str+='装备区:'+(player.storage.shanxian_e.length)+'张牌'; - } - } - return str; - }, - mark:function(dialog,content,player){ - if(player.storage.shanxian_h.length){ - if(player.isUnderControl(true)){ - dialog.add('
手牌区
'); - dialog.addSmall(player.storage.shanxian_h); - } - else{ - dialog.add('
手牌区:'+player.storage.shanxian_h.length+'张牌
'); - } - } - if(player.storage.shanxian_e.length){ - if(player.isUnderControl(true)){ - dialog.add('
装备区
'); - dialog.addSmall(player.storage.shanxian_e); - } - else{ - dialog.add('
装备区:'+player.storage.shanxian_e.length+'张牌
'); - } - } + forced:true, + filter:function(event,player){ + return player.countCards('h')==event.player.countCards('h')&&event.notLink(); }, - }, - logTarget:'player', - content:function(){ - "step 0" - if(!get.is.altered('shanxian')){ - player.draw(false); - player.$draw(); - } - "step 1" - player.storage.shanxian_h=player.getCards('h'); - player.storage.shanxian_e=player.getCards('e'); - player.storage.shanxian_n=1; - player.syncStorage('shanxian_e'); - player.phase('shanxian'); - player.storage.shanxian=trigger.player; - player.removeSkill('shanxian2'); - player.markSkill('shanxian'); - "step 2" - player.turnOver(true); - delete player.storage.shanxian; - }, - mod:{ - targetInRange:function(card,player,target,now){ - if(target==player.storage.shanxian) return true; + content:function(){ + trigger.num++; }, - }, - ai:{ - expose:0.1, - effect:{ - target:function(card){ - if(card.name=='guiyoujie') return [0,0]; + ai:{ + threaten:1.5 + }, + }, + duwen2:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&player.hp==event.player.hp&&event.notLink(); + }, + content:function(){ + player.draw(2); + } + }, + juji:{ + enable:'phaseUse', + usable:1, + position:'he', + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:function(card){ + var suit=get.suit(card); + for(var i=0;i0; + }, + check:function(card){ + if(ui.selected.cards.length>1) return 0; + return 5-get.value(card); + }, + selectCard:[1,4], + content:function(){ + var suits=[]; + for(var i=0;inum){ + min.length=0; + min.push(players[i]); + num=eff; + } + } + } + for(var i=0;i0) return 0; + if(min[i].countCards('h')<=1&&get.distance(player,min[i],'attack')<=1) return 0; + } + if(min.contains(target)) return -1; + return 0; + } + } + }, + }, + juji2:{ + ai:{ + effect:{ + player:function(card,player,target){ + if(card.name=='sha'&&target==player.storage.juji2) return [1,0,1,-1]; + } + } + }, + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + content:function(){ + player.unmarkSkill('juji2'); + player.removeSkill('juji2'); + delete player.storage.juji2; + }, + group:'juji3' + }, + juji3:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return event.target==player.storage.juji2; + }, + content:function(){ + trigger.directHit=true; + }, + mod:{ + globalFrom:function(from,to){ + if(to==from.storage.juji2) return -Infinity; + } + } + }, + dulei:{ + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('dulei2'); + }, + filterCard:true, + check:function(card){ + return 6-get.value(card); + }, + discard:false, + prepare:function(cards,player){ + player.$give(1,player,false); + }, + content:function(){ + player.storage.dulei=cards[0]; + player.addSkill('dulei2'); + player.syncStorage('dulei'); + }, + ai:{ + order:1, + result:{ + player:1 } } - } - }, - shanxian2:{ - trigger:{player:['gainBegin','loseBegin']}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('shanxian2'); - } - }, - shanhui:{ - unique:true, - trigger:{player:'damageEnd',source:'damageEnd'}, - filter:function(event,player){ - return player.storage.shanxian_h&&player.storage.shanxian_e&& - player.storage.shanxian_n>0&&!player.hasSkill('shanxian2'); - }, - check:function(event,player){ - var n1=player.countCards('he'); - var n2=player.storage.shanxian_h.length+player.storage.shanxian_e.length; - if(n1player.storage.shanxian_h.length+player.storage.shanxian_e.length){ - player.recover(); - } - player.storage.shanxian_n--; - if(player.storage.shanxian_n<=0){ - delete player.storage.shanxian_h; - delete player.storage.shanxian_e; - delete player.storage.shanxian_n; - player.unmarkSkill('shanxian'); - } - else{ - player.addSkill('shanxian2'); - } - } - } - }, - translate:{ - woliu:'涡流', - woliu2:'涡流', - woliu_info:'结束阶段,你可以选择至多两名角色,当你或目标中的任意一名角色成为杀的目标时,其余角色也将被追加为目标,直到你死亡或下一回合开始', - qianggu:'强固', - qianggu_info:'出牌阶段限一次,你可以弃置两张牌并获得两点护甲,若如此做,直到你的下个回合开始,其他角色对你使用杀时需要弃置一张基本牌,否则杀对你无效', - qianggu2:'强固', - qianggu2_bg:'固', - qianggu2_info:'其他角色对你使用杀时需要弃置一张基本牌,否则杀对你无效', - pingzhang:'屏障', - pingzhang_info:'每轮各限一次,当你受到伤害时,你可以弃置一张红桃牌令伤害-1;当一名其他角色受到伤害时,你可以弃置一张黑桃牌令伤害-1', - pingzhang_info_alter:'每轮各限一次,当你受到伤害时,你可以弃置一张红桃手牌令伤害-1;当一名其他角色受到伤害时,你可以弃置一张黑桃手牌令伤害-1', - liyong:'力涌', - liyong_info:'锁定技,你摸牌阶段摸牌数+X,X为你上一轮发动屏障的次数', - dianji:'电击', - dianji_info:'出牌阶段限一次,你可以将一张手牌当作惊雷闪对距离2以内的角色使用', - feitiao:'飞跳', - feitiao2:'飞跳', - feitiao_info:'出牌阶段开始时,你可以弃置一张牌并指定一名角色,你与该角色的距离视为1直到回合结束,然后该角色随机弃置一张牌', - bshaowei:'哨卫', - bshaowei_info:'结束阶段,你可以切换至哨卫模式。当处于此模式时,你的杀无视距离和防具、无数量限制且不可闪避;你不能闪避杀', - zhencha:'侦查', - zhencha_info:'结束阶段,你可以切换至侦查模式。当处于此模式时,每当你使用一张杀,你摸一张牌或回复一点体力', - liangou:'链钩', - liangou_info:'出牌阶段限一次,你可以弃置一张牌,指定一名其他角色并进行一次判定,若结果不为红桃,该角色与你距离为1且受到的首次伤害+1直到回合结束', - xiyang:'吸氧', - xiyang_info:'结束阶段,若你武将牌正面朝上,你可以翻面并回复两点体力', - qinru:'侵入', - qinru_info:'每当你使用卡牌指定惟一目标时,你可以令目标进行一次判定,若结果不为红桃,该角色的非锁定技失效直到其下一回合结束', - yinshen:'隐身', - yinshen_info:'结束阶段,你可以弃置一张装备牌并获得潜行直到下一回合开始', - maichong:'脉冲', - maichong_info:'准备阶段,你可以令最近两名被你侵入的角色各随机弃置一张牌,若弃置的牌中有非基本牌,你摸一张牌', - maichong_info_alter:'准备阶段,你可以令最近两名被你侵入的角色各随机弃置一张牌', - lichang:'力场', - lichang2:'力场', - lichang_info:'结束阶段,你可以弃置一张红色牌,若如此做,你可以在下个准备阶段令一名距离1以内的角色回复一点体力或摸两张牌', - mengji:'猛击', - mengji_info:'锁定技,若你已发动重盾,当你没有护甲时,你的杀造成的伤害+1', - zhongdun:'重盾', - zhongdun_info:'游戏开始时,你获得8点护甲;出牌阶段限一次,你可以弃置一张牌并将一点护甲分给一名没有护甲的其他角色', - zhongdun_info_alter:'游戏开始时,你获得6点护甲;出牌阶段限一次,你可以弃置一张牌并将一点护甲分给一名没有护甲的其他角色', - paotai:'炮台', - paotai2:'炮台', - paotai_info:'出牌阶段,你可以弃置一张杀布置或升级一个炮台(最高3级);结束阶段,炮台有一定机率对一名随机敌人造成一点火焰伤害;每当你受到一点伤害,炮台降低一级', - maoding:'铆钉', - maoding2:'铆钉', - maoding_info:'每当你造成或受到一次伤害,你可以获得一个零件;出牌阶段,你可以弃置两张零件牌令一名没有护甲的角色获得一点护甲', - maoding_info_alter:'每当你造成一次伤害,你可以获得一个零件;出牌阶段,你可以弃置两张零件牌令一名没有护甲的角色获得一点护甲', - bfengshi:'风矢', - bfengshi2:'风矢', - bfengshi_info:'锁定技,在一合内每当你使用一张牌,你的攻击范围+1;你的杀增加20%的概率强制命中;你的杀造成伤害后增加20%的概率令伤害+1', - bfengshi_info_alter:'锁定技,在一合内每当你使用一张牌,你的攻击范围+1;你的杀增加15%的概率强制命中;你的杀造成伤害后增加15%的概率令伤害+1', - yinbo:'音波', - yinbo_info:'出牌阶段限一次,你可以弃置一张黑桃牌,然后随机弃置三名敌人各一张牌', - liudan:'榴弹', - liudan_info:'每当你使用一张杀,你可以令所有不是此杀目标的其他角色有50%概率成为此杀的额外目标', - shoujia:'兽夹', - shoujia2:'兽夹', - shoujia3:'兽夹', - shoujia_info:'出牌阶段限一次,你可以将一张牌背面朝上置于一名其他角色的武将牌上,当该角色使用一张与此牌花色相同的牌指定其他角色为目标时,移去此牌,该角色将武将牌翻至背面;当你受到伤害时,移去此牌', - shihuo:'嗜火', - shihuo_info:'锁定技,每当一名角色受到火焰伤害,你摸一张牌', - shanguang:'闪光', - shanguang_info:'出牌阶段限一次,你可以弃置一张方片牌令攻击范围内的一名其他角色本回合内不能使用或打出卡牌', - tiandan:'填弹', - tiandan_info:'摸牌阶段开始时,你可以跳过出牌和弃牌阶段,然后获得若干张杀直到你的手牌数等于你的体值(最多为5)', - shenqiang:'神枪', - shenqiang_info:'锁定技,每当你在出牌阶段使用杀造成伤害,本阶段内出杀次数上限+1', - mianzhen:'眠针', - mianzhen2:'眠针', - mianzhen_info:'出牌阶段限一次,你可以弃置一张牌并令一名其他角色打出一张闪,否则该角色不能使用或打出卡牌直到其受到伤害或下一回合结束', - aqianghua:'强化', - aqianghua2:'强化', - aqianghua_info:'出牌阶段限一次,你可以将你的全部手牌(至少一张)交给一名其他角色,该角色获得一点护甲且下一次造成的伤害+1', - aqianghua_info_alter:'出牌阶段限一次,你可以将你的全部手牌(至少一张)交给一名其他角色,该角色下一次造成的伤害+1', - zhiyuan:'支援', - zhiyuan_info:'每当你即将造成伤害,你可以防止此伤害,改为令目标回复等量的体力', - juji:'狙击', - juji2:'狙击', - juji3:'狙击', - juji_info:'出牌阶段限一次,你可以弃置任意张花色不同的牌并指定一名有手牌的其他角色,若该角色的手牌中含有与你弃置的牌花色相同的牌,则本回合内你与其距离为1且该角色不能闪避你的杀', - duwen:'毒吻', - duwen2:'毒吻', - duwen_info:'锁定技,当你造成伤害时,若你的手牌数与受伤害角色相等,此伤害+1', - zhuagou:'抓钩', - zhuagou_info:'出牌阶段限一次,你可以弃置一张手牌并将你的座位移到任意位置', - dulei:'诡雷', - dulei2:'诡雷', - dulei_info:'出牌阶段,若你武将牌上没有牌,你可以将一张牌背面朝上置于你的武将牌上,当一名角色使用与该牌花色相同的牌指定你为目标时,你展示并移去此牌,然后该角色失去一点体力并随机弃置一张牌', - shuangqiang:'霜枪', - shuangqiang_info:'每当你对一名未翻面的角色造成伤害,你可以令伤害-1,然后令受伤害角色翻面', - baoxue:'暴雪', - baoxue_info:'限定技,出牌阶段,你可以展示并弃置你的所有黑色牌,然后令至多X名其他角色随机弃置一张牌并将武将牌翻至背面,X为你的弃牌数', - baoxue_info_alter:'限定技,出牌阶段,你可以展示并弃置你的所有黑色牌,并选择等量其他角色将武将牌翻至背面,结算后你将武将牌翻至背面', - bingqiang:'冰墙', - bingqiang2:'冰墙', - bingqiang2_bg:'墙', - bingqiang3:'冰墙', - bingqiang3_bg:'墙', - bingqiang4:'冰墙', - bingqiang4_bg:'墙', - bingqiang5:'冰墙', - bingqiang5_bg:'障', - bingqiang_info:'出牌阶段,你可以弃置X张红色牌令一名角色和其相邻角色的防御离+X,或弃置X张黑色牌令一名角色和其相邻角色的进攻离-X,效果持续到你的下个回合开始', - jidong:'急冻', - jidong_info:'在一名角色的结束阶段,若你的体力值为1,你可以翻面并回复两点体力,在你的武将牌翻至正面前,你防止所有伤害,也不能成为其他角色卡牌的目标', - jidong_info_alter:'在一名角色的结束阶段,若你的体力值为1,你可以翻面并回复两点体力', - jijia:'机甲', - jijia_info:'锁定技,游戏开始时,你获得一个体力为4的机甲;你的手牌上限为你和机甲的体力之和;你受到的伤害由机甲承担', - zihui:'自毁', - zihui_info:'出牌阶段,你可以令距离2以内的所有其他角色选择一项:弃置数量等同你机甲体力值的牌,或受到2点火焰伤害,并在结算完毕后摧毁你的机甲', - zihui_info_alter:'出牌阶段,你可以令距离2以内的所有其他角色选择一项:1. 弃置数量等同你机甲体力值的牌(不足则全弃,至少弃1张);2. 或受到2点火焰伤害,并在结算完毕后摧毁你的机甲', - tuijin:'推进', - tuijin2:'推进', - tuijin_info:'出牌阶段限一次,若你有机甲,你可以指定一名角色,本回合内视为与其距离为1', - chongzhuang:'重装', - chongzhuang_info:'在你失去机甲后,当你累计造成了4点伤害时,你重新获得机甲', - shouge:'收割', - shouge_info:'每当你杀死一名角色,你可以获得一张治疗波', - tuji:'突击', - tuji_info:'锁定技,在你的回合内,每当你使用一张牌,你的进攻距离+1', - mujing:'目镜', - mujing2:'目镜', - mujing_info:'你可以将一张黑色牌当作杀使用或打出;当你的杀被闪避后,此杀不计入出杀次数', - mujing_old_info:'每当你对攻击范围不含你的角色使用一张牌,你可以弃置目标一张牌;若你的手牌数不多于目标,你摸一张牌', - feiren:'飞刃', - feiren2:'飞刃', - feiren_info:'你的杀无视距离;你的黑桃杀造成的伤害+1,梅花杀可以额外指定一个目标', - feiren_info_alter:'你的杀无视距离;你的梅花杀可以额外指定一个目标', - zhanlong:'斩龙', - zhanlong_info:'限定技,准备阶段,若你体力值为1,你可以弃置所有牌(至少一张),然后将三张杀置入你的手牌,若如此做,你本回合使用杀无次数限制', - xie:'谐', - xie2:'谐', - xie_info:'出牌阶段,你可以弃置一张红桃手牌并指定一名角色,该角色自其下一回合开始每隔六回合回复一点体力,直到你死亡。同一时间只能对一人发动', - luan:'乱', - luan2:'乱', - luan_old_info:'出牌阶段,你可以弃置一张黑桃手牌并指定一名角色,该角色自其下一回合开始每隔六回合失去一点体力,直到你死亡。同一时间只能对一人发动', - luan_info:'出牌阶段,你可以弃置一张黑桃手牌并指定一名角色,该角色受到伤害后流失一点体力,直到你死亡或其首次进入濒死状态。同一时间只能对一人发动', - sheng:'圣', - sheng_info:'限定技,出牌阶段,你可以将你的武将牌翻面,然后令任意名角色回复一点体力,若如此做,你不能成为其他角色的卡牌目标直到下一回合开始', - xiandan:'霰弹', - xiandan_info:'每当你使用一张杀,你可以弃置一张红色牌令此杀不可闪避,或弃置一张黑色牌令此杀伤害+1', - yihun:'移魂', - yihun_info:'结束阶段,你可以弃置一张黑色牌并指定一名其他角色,你在该角色下一准备阶段视为对其使用一张杀;在此之前,你不能使用卡牌,也不能成为卡牌的目标', - feidan:'飞弹', - feidan_info:'你的杀只能对距离1以外的角色使用;每当你使用杀造成伤害后,你可以弃置一张牌对距离目标1以内的其他角色各造成一点伤害', - huoyu:'火雨', - huoyu_info:'限定技,出牌阶段,你可以弃置两张红色牌,视为使用两张炽羽袭', - yuedong:'乐动', - yuedong_info:'出牌阶段结束时,你可以令一名角色摸一张牌', - kuoyin:'扩音', - kuoyin_info:'出牌阶段,你可以弃置一张牌令本回合乐动的目标数改为3,或弃置两张牌令本回合乐动的摸牌量改为2', - kuoyin_info_alter:'出牌阶段,你可以弃置一张牌令本回合乐动的目标数改为3', - huhuan:'互换', - huhuan_info:'出牌阶段,你可以弃置两张牌令本回合乐动的摸牌效果改为回复等量体力', - guangshu:'光枢', - guangshu_heart:'光盾', - guangshu_spade:'光塔', - guangshu_club:'光井', - guangshu_diamond:'光流', - guangshu_info:'出牌阶段,你可以弃置一张牌,并指定一名角色,根据弃置牌的花色执行如下效果:♥该角色下次受到伤害时回复一点体力;♦︎该角色下次造成伤害时摸两张牌;♣该角色无法使用杀直到下一回合结束;♠该角色于下个结束阶段受到一点无来源的雷电伤害', - ziyu:'自愈', - ziyu_info:'在一名角色的结束阶段,你可以回复一点体力或摸一张牌,每隔四回合发动一次', - ziyu_info_alter:'在一名角色的结束阶段,你可以回复一点体力或摸一张牌,每隔六回合发动一次', - shouhu:'守护', - shouhu_info:'你不能使用杀;出牌阶段,你可以弃置一张杀令一名其他角色回复一点体力', - shanxian:'闪现', - shanxian_info:'在一名其他角色的回合开始前,若你的武将牌正面朝上,你可以摸一张牌并进行一个额外回合,并在回合结束后将武将牌翻至背面。若如此做,你对其使用卡牌无视距离直到回合结束。', - shanxian_info_alter:'在一名其他角色的回合开始前,若你的武将牌正面朝上,你可以进行一个额外回合,并在回合结束后将武将牌翻至背面。若如此做,你对其使用卡牌无视距离直到回合结束。', - shanhui:'闪回', - shanhui_info:'当你造成或受到伤害后,你可以将你的牌重置为上次发动闪现时的状态,若你的牌数因此而减少,你回复一点体力', - ow_liekong:'猎空', - ow_sishen:'死神', - ow_tianshi:'天使', - ow_falaozhiying:'法老之鹰', - ow_zhixuzhiguang:'秩序之光', - ow_luxiao:'卢西奥', - ow_shibing:'士兵76', - ow_yuanshi:'源氏', - ow_chanyata:'禅雅塔', - ow_dva:'DVA', - ow_mei:'小美', - ow_heibaihe:'黑百合', - ow_ana:'安娜', - ow_baolei:'堡垒', - ow_maikelei:'麦克雷', - ow_banzang:'半藏', - ow_kuangshu:'狂鼠', - ow_tuobiang:'托比昂', - ow_laiyinhate:'莱因哈特', - ow_luba:'路霸', - ow_wensidun:'温斯顿', - ow_zhaliya:'查莉娅', - ow_heiying:'黑影', - ow_orisa:'奥丽莎', - } + }, + dulei2:{ + mark:true, + trigger:{target:'useCardToBegin'}, + forced:true, + filter:function(event,player){ + return event.player!=player&&get.suit(event.card)==get.suit(player.storage.dulei); + }, + content:function(){ + 'step 0' + player.showCards([player.storage.dulei],get.translation(player)+'发动了【诡雷】'); + 'step 1' + ui.discardPile.appendChild(player.storage.dulei); + delete player.storage.dulei; + player.removeSkill('dulei2'); + game.addVideo('storage',player,['dulei',null]); + trigger.player.loseHp(); + 'step 2' + var he=trigger.player.getCards('he'); + if(he.length){ + trigger.player.discard(he.randomGet()); + } + }, + intro:{ + mark:function(dialog,content,player){ + if(player==game.me||player.isUnderControl()){ + dialog.add([player.storage.dulei]); + } + else{ + return '已发动诡雷'; + } + }, + content:function(content,player){ + if(player==game.me||player.isUnderControl()){ + return get.translation(player.storage.dulei); + } + return '已发动诡雷'; + } + } + }, + juji_old:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return get.distance(event.target,player,'attack')>1; + }, + content:function(){ + trigger.directHit=true; + }, + group:'juji2' + }, + juji2_old:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + target.addTempSkill('juji3',{player:'phaseEnd'}); + if(!target.storage.juji3){ + target.storage.juji3=[]; + } + target.storage.juji3.push(player); + }, + mod:{ + targetInRange:function(card,player,target){ + if(target.hasSkill('juji3')&&Array.isArray(target.storage.juji3)&&target.storage.juji3.contains(player)){ + return true; + } + } + } + }, + juji3_old:{ + mark:true, + intro:{ + nocount:true, + content:function(storage){ + return '对'+get.translation(storage)+'使用卡牌无视距离'; + } + }, + mod:{ + targetInRange:function(card,player,target){ + if(Array.isArray(player.storage.juji3)&&player.storage.juji3.contains(target)){ + return true; + } + } + } + }, + zhuagou:{ + enable:'phaseUse', + usable:1, + changeSeat:true, + filterTarget:function(card,player,target){ + return player!=target&&player.next!=target; + }, + filterCard:true, + check:function(card){ + return 4-get.value(card); + }, + content:function(){ + while(player.next!=target){ + game.swapSeat(player,player.next); + } + }, + ai:{ + order:5, + result:{ + player:function(player,target){ + var att=get.attitude(player,target); + if(target==player.previous&&att>0) return 1; + if(target==player.next.next&&get.attitude(player,player.next)<0) return 1; + return 0; + } + } + } + }, + bingqiang:{ + enable:'phaseUse', + position:'he', + filterCard:function(card){ + var color=get.color(card); + for(var i=0;imax){ + max=num; + } + if(num-min){ + if(get.color(card)=='red') return 5-get.value(card); + } + else{ + if(get.color(card)=='black') return 5-get.value(card); + } + return 0; + }, + changeTarget:function(player,targets){ + var target=targets[0]; + var add=game.filterPlayer(function(player){ + return get.distance(target,player,'pure')==1; + }); + for(var i=0;i0; + }, + content:function(){ + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var goon=false; + var goon2=false; + var att=get.attitude(player,trigger.player); + if(att>0){ + if(trigger.player.hp==1) goon=true; + } + else{ + if(Math.random()<0.5) goon=true; + } + if(Math.random()<0.3) goon2=true; + player.chooseToDiscard([1,player.countCards('h')],'he',get.prompt('bingqiang',trigger.player)).set('logSkill',['bingqiang',trigger.player]).ai=function(card){ + if(ui.selected.cards.length) return 0; + if(goon) return 6-get.value(card); + if(goon2) return 4-get.value(card); + return 0; + } + 'step 1' + if(result.bool){ + var num=result.cards.length; + event.num=num; + player.chooseControl('选项一','选项二','选项三','选项四',function(){ + if(get.attitude(player,trigger.player)>0){ + if(Math.random()<0.7) return '选项一'; + return '选项三'; + } + else{ + if(Math.random()<0.7) return '选项四'; + return '选项二'; + } + return ''; + }).set('prompt','冰墙

选项一:防御距离+'+num+ + '

选项二:防御距离-'+num+ + '

选项三:进攻距离+'+num+ + '

选项四:进攻距离-'+num+'
'); + } + else{ + event.finish(); + } + 'step 2' + switch(result.control){ + case '选项一':{ + trigger.player.storage.bingqiang2=event.num; + trigger.player.addTempSkill('bingqiang2',{player:'phaseBegin'}); + break; + } + case '选项二':{ + trigger.player.storage.bingqiang3=event.num; + trigger.player.addTempSkill('bingqiang3',{player:'phaseBegin'}); + break; + } + case '选项三':{ + trigger.player.storage.bingqiang4=event.num; + trigger.player.addTempSkill('bingqiang4',{player:'phaseBegin'}); + break; + } + case '选项四':{ + trigger.player.storage.bingqiang5=event.num; + trigger.player.addTempSkill('bingqiang5',{player:'phaseBegin'}); + break; + } + } + }, + ai:{ + expose:0.1 + } + }, + bingqiang2:{ + mark:true, + intro:{ + content:'防御距离+#' + }, + mod:{ + globalTo:function(from,to,distance){ + if(typeof to.storage.bingqiang2=='number') return distance+to.storage.bingqiang2; + }, + } + }, + bingqiang3:{ + mark:true, + intro:{ + content:'防御距离-#' + }, + mod:{ + globalTo:function(from,to,distance){ + if(typeof to.storage.bingqiang3=='number') return distance-to.storage.bingqiang3; + }, + } + }, + bingqiang4:{ + mark:true, + intro:{ + content:'进攻距离+#' + }, + mod:{ + globalFrom:function(from,to,distance){ + if(typeof from.storage.bingqiang4=='number') return distance-from.storage.bingqiang4; + } + } + }, + bingqiang5:{ + mark:true, + intro:{ + content:'进攻距离-#' + }, + mod:{ + globalFrom:function(from,to,distance){ + if(typeof from.storage.bingqiang5=='number') return distance+from.storage.bingqiang5; + } + } + }, + shuangqiang:{ + trigger:{source:'damageBegin'}, + check:function(event,player){ + var att=get.attitude(player,event.player); + if(event.player.hp==1) return att>0; + return att<=0; + }, + logTarget:'player', + filter:function(event,player){ + return !event.player.isTurnedOver()&&event.num>0; + }, + content:function(){ + trigger.num--; + trigger.player.draw(); + trigger.player.turnOver(); + } + }, + jidong:{ + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + return player.hp==1&&!player.isTurnedOver(); + }, + alter:true, + content:function(){ + 'step 0' + player.turnOver(); + player.recover(2); + 'step 1' + if(player.isTurnedOver()&&!get.is.altered('jidong')){ + player.addTempSkill('jidong2',{player:'turnOverAfter'}); + } + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 2; + return 1; + } + } + }, + jidong2:{ + trigger:{player:'damageBefore'}, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + nothunder:true, + nodamage:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')) return [0,0]; + } + }, + }, + mod:{ + targetEnabled:function(card,player,target){ + if(player!=target) return false; + } + } + }, + chongzhuang:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return player.storage.jijia<=0&&event.num>0; + }, + popup:false, + unique:true, + content:function(){ + player.storage.jijia2+=trigger.num; + if(player.storage.jijia2>=4){ + player.storage.jijia=4; + player.storage.jijia2=0; + player.markSkill('jijia'); + if(lib.config.skill_animation){ + player.logSkill('chongzhuang'); + player.$skill('重装') + } + } + } + }, + tuijin:{ + enable:'phaseUse', + usable:1, + unique:true, + filter:function(event,player){ + if(player.storage.jijia>0){ + return game.hasPlayer(function(current){ + return get.distance(player,current)>1 + }); + } + return false; + }, + filterTarget:function(card,player,target){ + return target!=player&&get.distance(player,target)>1; + }, + content:function(){ + player.storage.tuijin2=target; + player.addTempSkill('tuijin2','phaseAfter'); + }, + ai:{ + order:11, + result:{ + target:function(player,target){ + if(get.attitude(player,target)<0){ + if(get.distance(player,target)>2) return -1.5; + return -1; + } + return 0.3; + } + } + } + }, + tuijin2:{ + mod:{ + globalFrom:function(from,to){ + if(to==from.storage.feitiao2) return -Infinity; + } + }, + mark:'character', + intro:{ + content:'与$的距离视为1直到回合结束' + }, + onremove:true + }, + jijia:{ + mark:true, + unique:true, + init:function(player){ + player.storage.jijia=4; + player.storage.jijia2=0; + }, + intro:{ + content:'机甲体力值:#' + }, + mod:{ + maxHandcard:function(player,num){ + if(player.storage.jijia>0){ + return num+player.storage.jijia; + } + } + }, + trigger:{player:'changeHp'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.jijia>0&&event.parent.name=='damage'&&event.num<0; + }, + content:function(){ + player.hp-=trigger.num; + player.update(); + player.storage.jijia+=trigger.num; + if(player.storage.jijia<=0){ + player.unmarkSkill('jijia'); + } + else{ + player.updateMarks(); + } + }, + ai:{ + threaten:function(player,target){ + if(target.storage.jijia<=0) return 2; + return 1; + } + } + }, + zihui:{ + enable:'phaseUse', + filter:function(event,player){ + return player.storage.jijia>0; + }, + filterTarget:function(card,player,target){ + return target!=player&&get.distance(player,target)<=2; + }, + unique:true, + selectTarget:-1, + skillAnimation:true, + animationColor:'fire', + line:'fire', + alter:true, + content:function(){ + 'step 0' + var num=player.storage.jijia; + if(get.is.altered('zihui')){ + num=Math.max(1,Math.min(num,target.countCards('he'))); + } + target.chooseToDiscard(num,'he','弃置'+get.cnNumber(num)+'张牌,或受到2点火焰伤害').ai=function(card){ + if(target.hasSkillTag('nofire')) return 0; + if(get.type(card)!='basic') return 11-get.value(card); + if(target.hp>4) return 7-get.value(card); + if(target.hp==4&&num>=3) return 7-get.value(card); + if(target.hp==3&&num>=4) return 7-get.value(card); + if(num>1) return 8-get.value(card); + return 10-get.value(card); + }; + 'step 1' + if(!result.bool){ + target.damage(2,'fire'); + } + if(target==targets[targets.length-1]){ + player.storage.jijia=0; + player.unmarkSkill('jijia'); + } + }, + ai:{ + order:2, + result:{ + player:function(player){ + var num=0; + var players=game.filterPlayer(); + for(var i=0;i2) continue; + var nh=players[i].countCards('h'); + var att=get.attitude(player,players[i]); + if(nh0){ + if(players[i].hp<=2){ + num-=2; + } + else{ + num-=1.5; + } + } + } + else if(nh==player.storage.jijia){ + if(att<0){ + num+=0.5; + } + else if(att>0){ + num-=0.5; + } + } + } + if(num>=2) return 1; + return 0; + } + } + } + }, + xiandan:{ + trigger:{player:'shaBegin'}, + direct:true, + content:function(){ + "step 0" + var dis=trigger.target.countCards('h','shan')||trigger.target.getEquip('bagua')||trigger.target.countCards('h')>2; + var next=player.chooseToDiscard(get.prompt('xiandan')); + next.ai=function(card){ + if(dis) return 7-get.value(card); + return 0; + } + next.logSkill='xiandan'; + "step 1" + if(result.bool){ + if(get.color(result.cards[0])=='red'){ + trigger.directHit=true; + } + else{ + player.addTempSkill('xiandan2','shaAfter'); + } + } + } + }, + xiandan2:{ + trigger:{source:'damageBegin'}, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.notLink(); + }, + forced:true, + popup:false, + content:function(){ + trigger.num++; + } + }, + shouge:{ + trigger:{source:'dieAfter'}, + frequent:true, + content:function(){ + player.gain(game.createCard('zhiliaobo'),'gain2'); + } + }, + tuji:{ + mod:{ + globalFrom:function(from,to,distance){ + if(_status.currentPhase==from){ + return distance-get.cardCount(true,from); + } + }, + }, + }, + mujing:{ + enable:['chooseToRespond','chooseToUse'], + filterCard:function(card){ + return get.color(card)=='black'; + }, + position:'he', + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.countCards('he',{color:'black'})) return false; + }, + prompt:'将一张黑色牌当杀使用或打出', + check:function(card){return 4-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('he',{color:'black'})) return false; + }, + respondSha:true, + }, + group:'mujing2' + }, + mujing2:{ + trigger:{player:'shaMiss'}, + forced:true, + popup:false, + filter:function(event){ + return !event.parent._mujinged; + }, + content:function(){ + trigger.parent._mujinged=true; + player.getStat().card.sha--; + } + }, + lichang:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('lichang'),'he',{color:'red'}); + next.logSkill='lichang'; + next.ai=function(card){ + return 6-get.value(card); + }; + "step 1" + if(result.bool){ + player.addSkill('lichang2'); + } + }, + }, + lichang2:{ + trigger:{player:'phaseBegin'}, + direct:true, + mark:true, + intro:{ + content:'下个准备阶段令一名距离1以内的角色回复一点体力或摸两张牌' + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('lichang'),function(card,player,target){ + return get.distance(player,target)<=1; + }).ai=function(target){ + var att=get.attitude(player,target); + if(att>0){ + if(target.hp==1&&target.maxHp>1) return att*2; + } + return att; + }; + player.removeSkill('lichang2'); + 'step 1' + if(result.bool){ + player.logSkill('lichang',result.targets); + result.targets[0].chooseDrawRecover(2,true); + } + } + }, + mujing_old:{ + trigger:{player:'useCardToBegin'}, + filter:function(event,player){ + return event.target&&event.target!=player&&get.distance(event.target,player,'attack')>1; + }, + direct:true, + content:function(){ + 'step 0' + player.discardPlayerCard(get.prompt('mujing'),trigger.target).logSkill=['mujing']; + 'step 1' + if(result.bool&&player.countCards('h')<=trigger.target.countCards('h')){ + player.draw(); + } + } + }, + zhanlong:{ + trigger:{player:'phaseBegin'}, + unique:true, + mark:true, + skillAnimation:true, + init:function(player){ + player.storage.zhanlong=false; + }, + check:function(event,player){ + if(player.hasJudge('lebu')) return false; + return true; + }, + filter:function(event,player){ + if(player.storage.zhanlong) return false; + if(player.countCards('he')==0) return false; + if(player.hp!=1) return false; + return true; + }, + content:function(){ + 'step 0' + player.discard(player.getCards('he')); + 'step 1' + player.addTempSkill('zhanlong2','phaseAfter'); + player.awakenSkill('zhanlong'); + player.storage.zhanlong=true; + var cards=[]; + for(var i=0;i<3;i++){ + cards.push(game.createCard('sha')); + } + player.gain(cards,'gain2'); + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 3; + return 1; + }, + effect:{ + target:function(card,player,target){ + if(!target.hasFriend()) return; + if(get.tag(card,'damage')==1&&target.hp==2&&target.countCards('he')&& + !target.isTurnedOver()&&_status.currentPhase!=target){ + if(get.distance(_status.currentPhase,target,'absolute')<=2) return [0.5,1]; + return 0.8; + } + } + } + }, + intro:{ + content:'limited' + } + }, + zhanlong2:{ + mod:{ + cardUsable:function(card){ + if(card.name=='sha') return Infinity; + } + } + }, + feiren:{ + trigger:{source:'damageBegin'}, + forced:true, + alter:true, + filter:function(event,player){ + return !get.is.altered('feiren')&&event.card&&event.card.name=='sha'&&get.suit(event.card)=='spade'&&event.notLink(); + }, + content:function(){ + trigger.num++; + }, + mod:{ + targetInRange:function(card){ + if(card.name=='sha') return true; + }, + selectTarget:function(card,player,range){ + if(card.name=='sha'&&range[1]!=-1&&get.suit(card)=='club'){ + range[1]++; + } + }, + }, + ai:{ + threaten:1.4 + } + }, + feiren3:{ + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + if(event.parent.name=='feiren2') return false; + if(event.card.name!='sha') return false; + if(get.suit(event.card)!='spade') return false; + var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); + for(var i=0;i0){ + return 0; + } + return get.recoverEffect(target,player,target); + } + } + } + }, + xie2:{ + mark:true, + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + if(player.storage.xie=='now'){ + return event.player==player; + } + var num=game.phaseNumber-player.storage.xie; + return num&&num%6==0; + }, + content:function(){ + if(player.storage.xie=='now'){ + player.storage.xie=game.phaseNumber; + } + player.recover(); + }, + intro:{ + content:function(storage,player){ + var str='每隔六回合回复一点体力,直到'+get.translation(storage)+'死亡'; + if(typeof player.storage.xie=='number'){ + var num=game.phaseNumber-player.storage.xie; + num=num%6; + if(num==0){ + str+='(下次生效于本回合)' + } + else{ + str+='(下次生效于'+(6-num)+'回合后)' + } + } + return str; + }, + onunmark:function(storage,player){ + delete player.storage.xie; + delete player.storage.xie2; + } + }, + group:['xie3','xie4'] + }, + xie3:{ + trigger:{global:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + var num=game.phaseNumber-player.storage.xie; + num=num%6; + if(num){ + num=6-num; + } + player.storage.xie2_markcount=num; + player.updateMarks(); + } + }, + xie4:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.player==player.storage.xie2; + }, + content:function(){ + game.log(player,'解除了','【谐】'); + player.removeSkill('xie2'); + } + }, + luan:{ + enable:'phaseUse', + unique:true, + filterTarget:function(card,player,target){ + return target!=player&&!target.hasSkill('luan2'); + }, + filter:function(event,player){ + return player.countCards('h',{suit:'spade'}); + }, + filterCard:{suit:'spade'}, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + var current=game.findPlayer(function(player){ + return player.hasSkill('luan2'); + }); + if(current){ + current.removeSkill('luan2'); + } + target.addSkill('luan2'); + // target.storage.luan='now'; + target.storage.luan2=player; + }, + ai:{ + expose:0.2, + order:9.1, + threaten:2, + result:{ + target:function(player,target){ + var current=game.findPlayer(function(player){ + return player.hasSkill('luan2'); + }); + if(current&&get.attitude(player,current)<0){ + return 0; + } + if(target.hp==1) return 0.5; + return -1; + } + } + } + }, + luan2:{ + mark:true, + intro:{ + content:'受到的伤害后流失一点体力,直到首次进入濒死状态' + }, + trigger:{player:'damageEnd'}, + forced:true, + content:function(){ + player.loseHp(); + }, + ai:{ + threaten:1.2 + }, + group:['luan3','luan4'] + }, + luan3:{ + trigger:{player:'dyingAfter'}, + forced:true, + popup:false, + content:function(){ + game.log(player,'解除了','【乱】'); + player.removeSkill('luan2'); + } + }, + luan2_old:{ + mark:true, + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + if(player.storage.luan=='now'){ + return event.player==player; + } + var num=game.phaseNumber-player.storage.luan; + return num&&num%6==0; + }, + content:function(){ + if(player.storage.luan=='now'){ + player.storage.luan=game.phaseNumber; + } + player.loseHp(); + }, + intro:{ + content:function(storage,player){ + var str='每隔六回合失去一点体力,直到'+get.translation(storage)+'死亡'; + if(typeof player.storage.luan=='number'){ + var num=game.phaseNumber-player.storage.luan; + num=num%6; + if(num==0){ + str+='(下次生效于本回合)' + } + else{ + str+='(下次生效于'+(6-num)+'回合后)' + } + } + return str; + }, + onunmark:function(storage,player){ + delete player.storage.luan; + delete player.storage.luan2; + } + }, + group:['luan3','luan4'] + }, + luan3_old:{ + trigger:{global:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + var num=game.phaseNumber-player.storage.luan; + num=num%6; + if(num){ + num=6-num; + } + player.storage.luan2_markcount=num; + player.updateMarks(); + } + }, + luan4:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.player==player.storage.luan2; + }, + content:function(){ + game.log(player,'解除了','【乱】'); + player.removeSkill('luan2'); + } + }, + sheng:{ + enable:'phaseUse', + unique:true, + mark:true, + skillAnimation:true, + animationColor:'metal', + init:function(player){ + player.storage.sheng=false; + }, + filter:function(event,player){ + if(player.storage.sheng) return false; + return true; + }, + filterTarget:function(card,player,target){ + return target.isDamaged(); + }, + selectTarget:[1,Infinity], + contentBefore:function(){ + player.turnOver(); + player.addSkill('sheng2'); + player.awakenSkill('sheng'); + player.storage.sheng=true; + }, + content:function(){ + target.recover(); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + var eff=get.recoverEffect(target,player,target); + if(player.hp==1) return eff; + if(player.hasUnknown()) return 0; + var num1=0,num2=0,num3=0,players=game.filterPlayer(); + for(var i=0;i0){ + num1++; + if(players[i].isDamaged()){ + num2++; + if(players[i].hp<=1){ + num3++; + } + } + } + } + if(num1==num2) return eff; + if(num2==num1-1&&num3) return eff; + if(num3>=2) return eff; + return 0; + } + }, + }, + intro:{ + content:'limited' + } + }, + sheng2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('sheng2'); + }, + mod:{ + targetEnabled:function(card,player,target){ + if(player!=target) return false; + } + } + }, + yihun:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{color:'black'})>0&&!player.hasSkill('yihun2'); + }, + content:function(){ + 'step 0' + var next=player.chooseCardTarget({ + prompt:get.prompt('yihun'), + position:'he', + filterCard:function(card,player){ + return get.color(card)=='black'&&lib.filter.cardDiscardable(card,player); + }, + ai1:function(card){ + return 7-get.value(card); + }, + ai2:function(target){ + var att=-get.attitude(player,target); + if(target==player.next){ + att/=10; + } + if(target==player.next.next){ + att/=2; + } + return att; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + }); + 'step 1' + if(result.bool){ + player.discard(result.cards); + player.logSkill('yihun',result.targets); + player.addSkill('yihun2'); + var target=result.targets[0] + player.storage.yihun2=target; + if(target&&(get.mode()!='guozhan')||!target.isUnseen()){ + player.markSkillCharacter('yihun2',target,'移魂','在'+get.translation(target)+'的下一准备阶段视为对其使用一张杀'); + } + } + }, + }, + yihun2:{ + trigger:{global:['phaseBegin','dieAfter']}, + forced:true, + filter:function(event,player){ + return event.player==player.storage.yihun2; + }, + content:function(){ + if(player.storage.yihun2.isIn()){ + player.useCard({name:'sha'},player.storage.yihun2); + } + player.removeSkill('yihun2'); + delete player.storage.yihun2; + }, + mod:{ + targetEnabled:function(){ + return false; + }, + cardEnabled:function(card,player){ + return false; + }, + } + }, + huoyu:{ + enable:'phaseUse', + unique:true, + mark:true, + skillAnimation:true, + animationColor:'fire', + init:function(player){ + player.storage.huoyu=false; + }, + filter:function(event,player){ + if(player.storage.huoyu) return false; + if(player.countCards('he',{color:'red'})<2) return false; + return true; + }, + filterTarget:function(card,player,target){ + return player.canUse('chiyuxi',target); + }, + filterCard:{color:'red'}, + selectCard:2, + position:'he', + check:function(card){ + return 7-get.value(card); + }, + selectTarget:-1, + multitarget:true, + multiline:true, + line:'fire', + content:function(){ + 'step 0' + targets.sort(lib.sort.seat); + player.awakenSkill('huoyu'); + player.storage.huoyu=true; + player.useCard({name:'chiyuxi'},targets).animate=false; + 'step 1' + player.useCard({name:'chiyuxi'},targets).animate=false; + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(player.hasUnknown()) return 0; + return get.effect(target,{name:'chiyuxi'},player,target); + } + }, + }, + intro:{ + content:'limited' + } + }, + feidan:{ + trigger:{source:'damageAfter'}, + direct:true, + filter:function(event,player){ + if(player.countCards('he')==0) return false; + if(!event.card) return false; + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return current!=event.player&&get.distance(event.player,current)<=1 + }); + }, + content:function(){ + "step 0" + var eff=0; + var targets=game.filterPlayer(function(current){ + if(current!=trigger.player&&get.distance(trigger.player,current)<=1){ + eff+=get.damageEffect(current,player,player); + return true; + } + }); + event.targets=targets; + player.chooseToDiscard(get.prompt('feidan',targets)).set('ai',function(card){ + if(eff>0) return 7-get.value(card); + return 0; + }).set('logSkill',['feidan',targets]); + "step 1" + if(result.bool){ + event.targets.sort(lib.sort.seat); + } + else{ + event.finish(); + } + "step 2" + if(event.targets.length){ + event.targets.shift().damage(); + event.redo(); + } + }, + mod:{ + targetInRange:function(card,player,target){ + if(card.name=='sha'){ + if(get.distance(player,target)<=1) return false; + return true; + } + } + } + }, + yuedong:{ + trigger:{player:'phaseUseEnd'}, + direct:true, + content:function(){ + 'step 0' + var num=1+player.storage.yuedong_num; + player.chooseTarget(get.prompt('yuedong'),[1,num],function(card,player,target){ + if(player.storage.yuedong_recover){ + return target.hp1) return att/5; + if(num2==1){ + if(num>1) return att/3; + return att/4; + } + return att; + } + return att; + }); + 'step 1' + if(result.bool){ + player.logSkill('yuedong',result.targets); + var eff=1+player.storage.yuedong_eff; + if(player.storage.yuedong_recover){ + result.targets.sort(lib.sort.seat); + for(var i=0;i1&&!player.storage.yuedong_recover; + }, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + player.storage.yuedong_recover=true; + }, + ai:{ + order:10.2, + result:{ + player:function(player){ + var num1=0,num2=0,players=game.filterPlayer(); + for(var i=0;i0){ + num2++; + if(players[i].hp<=2&&players[i].maxHp>2){ + num1++; + if(players[i].hp==1){ + num1++; + } + } + } + } + if(num1>=3){ + return 1; + } + return 0; + } + } + } + }, + kuoyin:{ + enable:'phaseUse', + filterCard:true, + selectCard:function(){ + if(get.is.altered('kuoyin')) return 1; + if(_status.event.player.storage.yuedong_eff) return 1; + if(_status.event.player.storage.yuedong_num) return 2; + return [1,2]; + }, + position:'he', + alter:true, + filter:function(event,player){ + if(get.is.altered('kuoyin')&&player.storage.yuedong_num) return false; + if(player.storage.yuedong_eff&&player.storage.yuedong_num) return false; + return player.countCards('he')>0; + }, + check:function(card){ + var player=_status.event.player; + var num1=0,num2=0,players=game.filterPlayer(); + for(var i=0;i0){ + num2++; + if(players[i].hp<=2&&players[i].maxHp>2){ + num1++; + } + } + } + if(player.storage.yuedong_recover){ + if(num1>1&&!player.storage.yuedong_num){ + if(ui.selected.cards.length) return 0; + return 7-get.value(card); + } + return 0; + } + else{ + if(num2>1&&!player.storage.yuedong_num){ + if(ui.selected.cards.length) return 0; + return 7-get.value(card); + } + if(num2>2){ + return 6-get.value(card); + } + return 5-get.value(card); + } + }, + content:function(){ + if(cards.length==1){ + player.storage.yuedong_num+=2; + } + else{ + player.storage.yuedong_eff++; + } + }, + ai:{ + threaten:1.6, + order:10.1, + result:{ + player:1 + } + }, + group:'kuoyin2' + }, + kuoyin2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.yuedong_recover=false; + player.storage.yuedong_num=0; + player.storage.yuedong_eff=0; + } + }, + guangshu:{ + enable:'phaseUse', + check:function(card){ + var player=_status.event.player; + var suit=get.suit(card); + if(suit=='heart'){ + if(game.hasPlayer(function(current){ + return current.hp==1&&get.attitude(player,current)>0 + })); + } + else if(suit=='spade'){ + return 7-get.value(card); + } + return 6-get.value(card); + }, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterTarget:function(card,player,target){ + return !target.hasSkill('guangshu_heart')&& + !target.hasSkill('guangshu_spade')&& + !target.hasSkill('guangshu_club')&& + !target.hasSkill('guangshu_diamond'); + }, + filterCard:true, + position:'he', + content:function(){ + target.addSkill('guangshu_'+get.suit(cards[0])); + }, + ai:{ + expose:0.2, + threaten:1.6, + order:5, + result:{ + target:function(player,target){ + if(!ui.selected.cards.length) return 0; + switch(get.suit(ui.selected.cards[0])){ + case 'heart':if(target.hp==1) return 1;return 0.1; + case 'diamond':return 1+Math.sqrt(target.countCards('h')); + case 'club':return -target.countCards('h')-Math.sqrt(target.countCards('h','sha')); + case 'spade':return get.damageEffect(target,player,target,'thunder'); + default:return 0; + } + } + } + } + }, + guangshu_diamond:{ + mark:true, + intro:{ + content:'下次造成伤害时摸两张牌' + }, + trigger:{source:'damageEnd'}, + forced:true, + content:function(){ + player.draw(2); + player.removeSkill('guangshu_diamond'); + } + }, + guangshu_heart:{ + mark:true, + intro:{ + content:'下次受到伤害时回复一点体力' + }, + trigger:{player:'damageEnd'}, + priority:6, + forced:true, + content:function(){ + player.recover(); + player.removeSkill('guangshu_heart'); + } + }, + guangshu_club:{ + mark:true, + intro:{ + content:'无法使用杀直到下一回合结束' + }, + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('guangshu_club'); + }, + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; + } + } + }, + guangshu_spade:{ + mark:true, + intro:{ + content:'下个结束阶段受到一点无来源的雷电伤害' + }, + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + player.damage('thunder','nosource'); + player.removeSkill('guangshu_spade'); + } + }, + ziyu:{ + trigger:{global:'phaseEnd'}, + direct:true, + filter:function(event,player){ + if(get.is.altered('ziyu')) return game.phaseNumber%6==0; + return game.phaseNumber%4==0; + }, + alter:true, + content:function(){ + player.chooseDrawRecover(get.prompt('ziyu')).logSkill='ziyu'; + } + }, + shouhu:{ + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; + }, + }, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h','sha')>0; + }, + filterTarget:function(card,player,target){ + return target.hpplayer.hp&&player.countCards('h','lebu')==0)||get.distance(player,event.player)>1); + }, + alter:true, + intro:{ + content:function(storage,player){ + var str=''; + if(player.storage.shanxian_h.length){ + if(player.isUnderControl(true)){ + str+='手牌区:'+get.translation(player.storage.shanxian_h); + } + else{ + str+='手牌区:'+(player.storage.shanxian_h.length)+'张牌'; + } + } + if(player.storage.shanxian_e.length){ + if(str.length) str+='、'; + if(player.isUnderControl(true)){ + str+='装备区:'+get.translation(player.storage.shanxian_e); + } + else{ + str+='装备区:'+(player.storage.shanxian_e.length)+'张牌'; + } + } + return str; + }, + mark:function(dialog,content,player){ + if(player.storage.shanxian_h.length){ + if(player.isUnderControl(true)){ + dialog.add('
手牌区
'); + dialog.addSmall(player.storage.shanxian_h); + } + else{ + dialog.add('
手牌区:'+player.storage.shanxian_h.length+'张牌
'); + } + } + if(player.storage.shanxian_e.length){ + if(player.isUnderControl(true)){ + dialog.add('
装备区
'); + dialog.addSmall(player.storage.shanxian_e); + } + else{ + dialog.add('
装备区:'+player.storage.shanxian_e.length+'张牌
'); + } + } + }, + }, + logTarget:'player', + content:function(){ + "step 0" + if(!get.is.altered('shanxian')){ + player.draw(false); + player.$draw(); + } + "step 1" + player.storage.shanxian_h=player.getCards('h'); + player.storage.shanxian_e=player.getCards('e'); + player.storage.shanxian_n=1; + player.syncStorage('shanxian_e'); + player.phase('shanxian'); + player.storage.shanxian=trigger.player; + player.removeSkill('shanxian2'); + player.markSkill('shanxian'); + "step 2" + player.turnOver(true); + delete player.storage.shanxian; + }, + mod:{ + targetInRange:function(card,player,target,now){ + if(target==player.storage.shanxian) return true; + }, + }, + ai:{ + expose:0.1, + effect:{ + target:function(card){ + if(card.name=='guiyoujie') return [0,0]; + } + } + } + }, + shanxian2:{ + trigger:{player:['gainBegin','loseBegin']}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('shanxian2'); + } + }, + shanhui:{ + unique:true, + trigger:{player:'damageEnd',source:'damageEnd'}, + filter:function(event,player){ + return player.storage.shanxian_h&&player.storage.shanxian_e&& + player.storage.shanxian_n>0&&!player.hasSkill('shanxian2'); + }, + check:function(event,player){ + var n1=player.countCards('he'); + var n2=player.storage.shanxian_h.length+player.storage.shanxian_e.length; + if(n1player.storage.shanxian_h.length+player.storage.shanxian_e.length){ + player.recover(); + } + player.storage.shanxian_n--; + if(player.storage.shanxian_n<=0){ + delete player.storage.shanxian_h; + delete player.storage.shanxian_e; + delete player.storage.shanxian_n; + player.unmarkSkill('shanxian'); + } + else{ + player.addSkill('shanxian2'); + } + } + } + }, + translate:{ + woliu:'涡流', + woliu2:'涡流', + woliu_info:'结束阶段,你可以选择至多两名角色,当你或目标中的任意一名角色成为杀的目标时,其余角色也将被追加为目标,直到你死亡或下一回合开始', + qianggu:'强固', + qianggu_info:'出牌阶段限一次,你可以弃置两张牌并获得两点护甲,若如此做,直到你的下个回合开始,其他角色对你使用杀时需要弃置一张基本牌,否则杀对你无效', + qianggu2:'强固', + qianggu2_bg:'固', + qianggu2_info:'其他角色对你使用杀时需要弃置一张基本牌,否则杀对你无效', + pingzhang:'屏障', + pingzhang_info:'每轮各限一次,当你受到伤害时,你可以弃置一张红桃牌令伤害-1;当一名其他角色受到伤害时,你可以弃置一张黑桃牌令伤害-1', + pingzhang_info_alter:'每轮各限一次,当你受到伤害时,你可以弃置一张红桃手牌令伤害-1;当一名其他角色受到伤害时,你可以弃置一张黑桃手牌令伤害-1', + liyong:'力涌', + liyong_info:'锁定技,你摸牌阶段摸牌数+X,X为你上一轮发动屏障的次数', + dianji:'电击', + dianji_info:'出牌阶段限一次,你可以将一张手牌当作惊雷闪对距离2以内的角色使用', + feitiao:'飞跳', + feitiao2:'飞跳', + feitiao_info:'出牌阶段开始时,你可以弃置一张牌并指定一名角色,你与该角色的距离视为1直到回合结束,然后该角色随机弃置一张牌', + bshaowei:'哨卫', + bshaowei_info:'结束阶段,你可以切换至哨卫模式。当处于此模式时,你的杀无视距离和防具、无数量限制且不可闪避;你不能闪避杀', + zhencha:'侦查', + zhencha_info:'结束阶段,你可以切换至侦查模式。当处于此模式时,每当你使用一张杀,你摸一张牌或回复一点体力', + liangou:'链钩', + liangou_info:'出牌阶段限一次,你可以弃置一张牌,指定一名其他角色并进行一次判定,若结果不为红桃,该角色与你距离为1且受到的首次伤害+1直到回合结束', + xiyang:'吸氧', + xiyang_info:'结束阶段,若你武将牌正面朝上,你可以翻面并回复两点体力', + qinru:'侵入', + qinru_info:'每当你使用卡牌指定惟一目标时,你可以令目标进行一次判定,若结果不为红桃,该角色的非锁定技失效直到其下一回合结束', + yinshen:'隐身', + yinshen_info:'结束阶段,你可以弃置一张装备牌并获得潜行直到下一回合开始', + maichong:'脉冲', + maichong_info:'准备阶段,你可以令最近两名被你侵入的角色各随机弃置一张牌,若弃置的牌中有非基本牌,你摸一张牌', + maichong_info_alter:'准备阶段,你可以令最近两名被你侵入的角色各随机弃置一张牌', + lichang:'力场', + lichang2:'力场', + lichang_info:'结束阶段,你可以弃置一张红色牌,若如此做,你可以在下个准备阶段令一名距离1以内的角色回复一点体力或摸两张牌', + mengji:'猛击', + mengji_info:'锁定技,若你已发动重盾,当你没有护甲时,你的杀造成的伤害+1', + zhongdun:'重盾', + zhongdun_info:'游戏开始时,你获得8点护甲;出牌阶段限一次,你可以弃置一张牌并将一点护甲分给一名没有护甲的其他角色', + zhongdun_info_alter:'游戏开始时,你获得6点护甲;出牌阶段限一次,你可以弃置一张牌并将一点护甲分给一名没有护甲的其他角色', + paotai:'炮台', + paotai2:'炮台', + paotai_info:'出牌阶段,你可以弃置一张杀布置或升级一个炮台(最高3级);结束阶段,炮台有一定机率对一名随机敌人造成一点火焰伤害;每当你受到一点伤害,炮台降低一级', + maoding:'铆钉', + maoding2:'铆钉', + maoding_info:'每当你造成或受到一次伤害,你可以获得一个零件;出牌阶段,你可以弃置两张零件牌令一名没有护甲的角色获得一点护甲', + maoding_info_alter:'每当你造成一次伤害,你可以获得一个零件;出牌阶段,你可以弃置两张零件牌令一名没有护甲的角色获得一点护甲', + bfengshi:'风矢', + bfengshi2:'风矢', + bfengshi_info:'锁定技,在一合内每当你使用一张牌,你的攻击范围+1;你的杀增加20%的概率强制命中;你的杀造成伤害后增加20%的概率令伤害+1', + bfengshi_info_alter:'锁定技,在一合内每当你使用一张牌,你的攻击范围+1;你的杀增加15%的概率强制命中;你的杀造成伤害后增加15%的概率令伤害+1', + yinbo:'音波', + yinbo_info:'出牌阶段限一次,你可以弃置一张黑桃牌,然后随机弃置三名敌人各一张牌', + liudan:'榴弹', + liudan_info:'每当你使用一张杀,你可以令所有不是此杀目标的其他角色有50%概率成为此杀的额外目标', + shoujia:'兽夹', + shoujia2:'兽夹', + shoujia3:'兽夹', + shoujia_info:'出牌阶段限一次,你可以将一张牌背面朝上置于一名其他角色的武将牌上,当该角色使用一张与此牌花色相同的牌指定其他角色为目标时,移去此牌,该角色将武将牌翻至背面;当你受到伤害时,移去此牌', + shihuo:'嗜火', + shihuo_info:'锁定技,每当一名角色受到火焰伤害,你摸一张牌', + shanguang:'闪光', + shanguang_info:'出牌阶段限一次,你可以弃置一张方片牌令攻击范围内的一名其他角色本回合内不能使用或打出卡牌', + tiandan:'填弹', + tiandan_info:'摸牌阶段开始时,你可以跳过出牌和弃牌阶段,然后获得若干张杀直到你的手牌数等于你的体值(最多为5)', + shenqiang:'神枪', + shenqiang_info:'锁定技,每当你在出牌阶段使用杀造成伤害,本阶段内出杀次数上限+1', + mianzhen:'眠针', + mianzhen2:'眠针', + mianzhen_info:'出牌阶段限一次,你可以弃置一张牌并令一名其他角色打出一张闪,否则该角色不能使用或打出卡牌直到其受到伤害或下一回合结束', + aqianghua:'强化', + aqianghua2:'强化', + aqianghua_info:'出牌阶段限一次,你可以将你的全部手牌(至少一张)交给一名其他角色,该角色获得一点护甲且下一次造成的伤害+1', + aqianghua_info_alter:'出牌阶段限一次,你可以将你的全部手牌(至少一张)交给一名其他角色,该角色下一次造成的伤害+1', + zhiyuan:'支援', + zhiyuan_info:'每当你即将造成伤害,你可以防止此伤害,改为令目标回复等量的体力', + juji:'狙击', + juji2:'狙击', + juji3:'狙击', + juji_info:'出牌阶段限一次,你可以弃置任意张花色不同的牌并指定一名有手牌的其他角色,若该角色的手牌中含有与你弃置的牌花色相同的牌,则本回合内你与其距离为1且该角色不能闪避你的杀', + duwen:'毒吻', + duwen2:'毒吻', + duwen_info:'锁定技,当你造成伤害时,若你的手牌数与受伤害角色相等,此伤害+1', + zhuagou:'抓钩', + zhuagou_info:'出牌阶段限一次,你可以弃置一张手牌并将你的座位移到任意位置', + dulei:'诡雷', + dulei2:'诡雷', + dulei_info:'出牌阶段,若你武将牌上没有牌,你可以将一张牌背面朝上置于你的武将牌上,当一名角色使用与该牌花色相同的牌指定你为目标时,你展示并移去此牌,然后该角色失去一点体力并随机弃置一张牌', + shuangqiang:'霜枪', + shuangqiang_info:'每当你对一名未翻面的角色造成伤害,你可以令伤害-1,然后令受伤害角色翻面', + baoxue:'暴雪', + baoxue_info:'限定技,出牌阶段,你可以展示并弃置你的所有黑色牌,然后令至多X名其他角色随机弃置一张牌并将武将牌翻至背面,X为你的弃牌数', + baoxue_info_alter:'限定技,出牌阶段,你可以展示并弃置你的所有黑色牌,并选择等量其他角色将武将牌翻至背面,结算后你将武将牌翻至背面', + bingqiang:'冰墙', + bingqiang2:'冰墙', + bingqiang2_bg:'墙', + bingqiang3:'冰墙', + bingqiang3_bg:'墙', + bingqiang4:'冰墙', + bingqiang4_bg:'墙', + bingqiang5:'冰墙', + bingqiang5_bg:'障', + bingqiang_info:'出牌阶段,你可以弃置X张红色牌令一名角色和其相邻角色的防御离+X,或弃置X张黑色牌令一名角色和其相邻角色的进攻离-X,效果持续到你的下个回合开始', + jidong:'急冻', + jidong_info:'在一名角色的结束阶段,若你的体力值为1,你可以翻面并回复两点体力,在你的武将牌翻至正面前,你防止所有伤害,也不能成为其他角色卡牌的目标', + jidong_info_alter:'在一名角色的结束阶段,若你的体力值为1,你可以翻面并回复两点体力', + jijia:'机甲', + jijia_info:'锁定技,游戏开始时,你获得一个体力为4的机甲;你的手牌上限为你和机甲的体力之和;你受到的伤害由机甲承担', + zihui:'自毁', + zihui_info:'出牌阶段,你可以令距离2以内的所有其他角色选择一项:弃置数量等同你机甲体力值的牌,或受到2点火焰伤害,并在结算完毕后摧毁你的机甲', + zihui_info_alter:'出牌阶段,你可以令距离2以内的所有其他角色选择一项:1. 弃置数量等同你机甲体力值的牌(不足则全弃,至少弃1张);2. 或受到2点火焰伤害,并在结算完毕后摧毁你的机甲', + tuijin:'推进', + tuijin2:'推进', + tuijin_info:'出牌阶段限一次,若你有机甲,你可以指定一名角色,本回合内视为与其距离为1', + chongzhuang:'重装', + chongzhuang_info:'在你失去机甲后,当你累计造成了4点伤害时,你重新获得机甲', + shouge:'收割', + shouge_info:'每当你杀死一名角色,你可以获得一张治疗波', + tuji:'突击', + tuji_info:'锁定技,在你的回合内,每当你使用一张牌,你的进攻距离+1', + mujing:'目镜', + mujing2:'目镜', + mujing_info:'你可以将一张黑色牌当作杀使用或打出;当你的杀被闪避后,此杀不计入出杀次数', + mujing_old_info:'每当你对攻击范围不含你的角色使用一张牌,你可以弃置目标一张牌;若你的手牌数不多于目标,你摸一张牌', + feiren:'飞刃', + feiren2:'飞刃', + feiren_info:'你的杀无视距离;你的黑桃杀造成的伤害+1,梅花杀可以额外指定一个目标', + feiren_info_alter:'你的杀无视距离;你的梅花杀可以额外指定一个目标', + zhanlong:'斩龙', + zhanlong_info:'限定技,准备阶段,若你体力值为1,你可以弃置所有牌(至少一张),然后将三张杀置入你的手牌,若如此做,你本回合使用杀无次数限制', + xie:'谐', + xie2:'谐', + xie_info:'出牌阶段,你可以弃置一张红桃手牌并指定一名角色,该角色自其下一回合开始每隔六回合回复一点体力,直到你死亡。同一时间只能对一人发动', + luan:'乱', + luan2:'乱', + luan_old_info:'出牌阶段,你可以弃置一张黑桃手牌并指定一名角色,该角色自其下一回合开始每隔六回合失去一点体力,直到你死亡。同一时间只能对一人发动', + luan_info:'出牌阶段,你可以弃置一张黑桃手牌并指定一名角色,该角色受到伤害后流失一点体力,直到你死亡或其首次进入濒死状态。同一时间只能对一人发动', + sheng:'圣', + sheng_info:'限定技,出牌阶段,你可以将你的武将牌翻面,然后令任意名角色回复一点体力,若如此做,你不能成为其他角色的卡牌目标直到下一回合开始', + xiandan:'霰弹', + xiandan_info:'每当你使用一张杀,你可以弃置一张红色牌令此杀不可闪避,或弃置一张黑色牌令此杀伤害+1', + yihun:'移魂', + yihun_info:'结束阶段,你可以弃置一张黑色牌并指定一名其他角色,你在该角色下一准备阶段视为对其使用一张杀;在此之前,你不能使用卡牌,也不能成为卡牌的目标', + feidan:'飞弹', + feidan_info:'你的杀只能对距离1以外的角色使用;每当你使用杀造成伤害后,你可以弃置一张牌对距离目标1以内的其他角色各造成一点伤害', + huoyu:'火雨', + huoyu_info:'限定技,出牌阶段,你可以弃置两张红色牌,视为使用两张炽羽袭', + yuedong:'乐动', + yuedong_info:'出牌阶段结束时,你可以令一名角色摸一张牌', + kuoyin:'扩音', + kuoyin_info:'出牌阶段,你可以弃置一张牌令本回合乐动的目标数改为3,或弃置两张牌令本回合乐动的摸牌量改为2', + kuoyin_info_alter:'出牌阶段,你可以弃置一张牌令本回合乐动的目标数改为3', + huhuan:'互换', + huhuan_info:'出牌阶段,你可以弃置两张牌令本回合乐动的摸牌效果改为回复等量体力', + guangshu:'光枢', + guangshu_heart:'光盾', + guangshu_spade:'光塔', + guangshu_club:'光井', + guangshu_diamond:'光流', + guangshu_info:'出牌阶段,你可以弃置一张牌,并指定一名角色,根据弃置牌的花色执行如下效果:♥该角色下次受到伤害时回复一点体力;♦︎该角色下次造成伤害时摸两张牌;♣该角色无法使用杀直到下一回合结束;♠该角色于下个结束阶段受到一点无来源的雷电伤害', + ziyu:'自愈', + ziyu_info:'在一名角色的结束阶段,你可以回复一点体力或摸一张牌,每隔四回合发动一次', + ziyu_info_alter:'在一名角色的结束阶段,你可以回复一点体力或摸一张牌,每隔六回合发动一次', + shouhu:'守护', + shouhu_info:'你不能使用杀;出牌阶段,你可以弃置一张杀令一名其他角色回复一点体力', + shanxian:'闪现', + shanxian_info:'在一名其他角色的回合开始前,若你的武将牌正面朝上,你可以摸一张牌并进行一个额外回合,并在回合结束后将武将牌翻至背面。若如此做,你对其使用卡牌无视距离直到回合结束。', + shanxian_info_alter:'在一名其他角色的回合开始前,若你的武将牌正面朝上,你可以进行一个额外回合,并在回合结束后将武将牌翻至背面。若如此做,你对其使用卡牌无视距离直到回合结束。', + shanhui:'闪回', + shanhui_info:'当你造成或受到伤害后,你可以将你的牌重置为上次发动闪现时的状态,若你的牌数因此而减少,你回复一点体力', + ow_liekong:'猎空', + ow_sishen:'死神', + ow_tianshi:'天使', + ow_falaozhiying:'法老之鹰', + ow_zhixuzhiguang:'秩序之光', + ow_luxiao:'卢西奥', + ow_shibing:'士兵76', + ow_yuanshi:'源氏', + ow_chanyata:'禅雅塔', + ow_dva:'DVA', + ow_mei:'小美', + ow_heibaihe:'黑百合', + ow_ana:'安娜', + ow_baolei:'堡垒', + ow_maikelei:'麦克雷', + ow_banzang:'半藏', + ow_kuangshu:'狂鼠', + ow_tuobiang:'托比昂', + ow_laiyinhate:'莱因哈特', + ow_luba:'路霸', + ow_wensidun:'温斯顿', + ow_zhaliya:'查莉娅', + ow_heiying:'黑影', + ow_orisa:'奥丽莎', + } + }; }); diff --git a/character/refresh.js b/character/refresh.js index f372f4e66..f0f6e6ad2 100644 --- a/character/refresh.js +++ b/character/refresh.js @@ -1,957 +1,971 @@ 'use strict'; -game.import('character',{ - name:'refresh', - connect:true, - character:{ - re_caocao:['male','wei',4,['hujia','rejianxiong'],['zhu']], - re_simayi:['male','wei',3,['refankui','reguicai']], - re_guojia:['male','wei',3,['tiandu','reyiji']], - re_lidian:['male','wei',3,['xunxun','wangxi']], - re_zhangliao:['male','wei',4,['retuxi']], - re_xuzhu:['male','wei',4,['reluoyi']], - re_xiahoudun:['male','wei',4,['reganglie','qingjian']], - re_zhangfei:['male','shu',4,['paoxiao','retishen']], - re_zhaoyun:['male','shu',4,['longdan','reyajiao']], - re_guanyu:['male','shu',4,['wusheng','yijue']], - re_machao:['male','shu',4,['mashu','retieji']], - re_xushu:['male','shu',4,['zhuhai','qianxin']], - re_zhouyu:['male','wu',3,['reyingzi','refanjian']], - re_lvmeng:['male','wu',4,['keji','qinxue']], - re_ganning:['male','wu',4,['qixi','fenwei']], - re_luxun:['male','wu',3,['reqianxun','relianying']], - re_daqiao:['female','wu',3,['reguose','liuli']], - re_huanggai:['male','wu',4,['rekurou','zhaxiang']], - re_lvbu:['male','qun',5,['wushuang','liyu']], - re_gongsunzan:['male','qun',4,['qiaomeng','reyicong']], - re_huatuo:['male','qun',3,['chulao','jijiu']], - re_liubei:['male','shu',4,['rerende','jijiang'],['zhu']], - }, - characterIntro:{ - re_gongsunzan:'群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。', - re_lidian:'字曼成,曹操麾下将领。李典深明大义,不与人争功,崇尚学习与高贵儒雅,尊重博学之士,在军中被称为长者。李典有长者之风,官至破虏将军,三十六岁去世。魏文帝曹丕继位后追谥号为愍侯。', - }, - skill:{ - rerende:{ - audio:2, - group:['rerende1'], - enable:'phaseUse', - filterCard:true, - selectCard:[1,Infinity], - discard:false, - prepare:'give2', - filterTarget:function(card,player,target){ - if(player.storage.rerende2&&player.storage.rerende2.contains(target)) return false; - return player!=target; - }, - onremove:['rerende','rerende2'], - check:function(card){ - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; - if(!ui.selected.cards.length&&card.name=='du') return 20; - var player=get.owner(card); - if(ui.selected.cards.length>=Math.max(2,player.countCards('h')-player.hp)) return 0; - if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ - var players=game.filterPlayer(); - for(var i=0;i=3&& - get.attitude(players[i],player)>=3){ - return 11-get.value(card); - } - } - if(player.countCards('h')>player.hp) return 10-get.value(card); - if(player.countCards('h')>2) return 6-get.value(card); - return -1; - } - return 10-get.value(card); - }, - content:function(){ - 'step 0' - if(!Array.isArray(player.storage.rerende2)){ - player.storage.rerende2=[]; - } - player.storage.rerende2.push(target); - target.gain(cards,player); - if(typeof player.storage.rerende!='number'){ - player.storage.rerende=0; - } - if(player.storage.rerende>=0){ - player.storage.rerende+=cards.length; - if(player.storage.rerende>=2){ - var list=[]; - if(lib.filter.cardUsable({name:'sha'},player,event.getParent('chooseToUse'))){ - if(game.hasPlayer(function(current){ - return player.canUse('sha',current); - })){ - list.push(['基本','','sha']); - list.push(['基本','','sha','fire']); - list.push(['基本','','sha','thunder']); +game.import('character',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'refresh', + connect:true, + character:{ + re_caocao:['male','wei',4,['hujia','rejianxiong'],['zhu']], + re_simayi:['male','wei',3,['refankui','reguicai']], + re_guojia:['male','wei',3,['tiandu','reyiji']], + re_lidian:['male','wei',3,['xunxun','wangxi']], + re_zhangliao:['male','wei',4,['retuxi']], + re_xuzhu:['male','wei',4,['reluoyi']], + re_xiahoudun:['male','wei',4,['reganglie','qingjian']], + re_zhangfei:['male','shu',4,['paoxiao','retishen']], + re_zhaoyun:['male','shu',4,['longdan','reyajiao']], + re_guanyu:['male','shu',4,['wusheng','yijue']], + re_machao:['male','shu',4,['mashu','retieji']], + re_xushu:['male','shu',4,['zhuhai','qianxin']], + re_zhouyu:['male','wu',3,['reyingzi','refanjian']], + re_lvmeng:['male','wu',4,['keji','qinxue']], + re_ganning:['male','wu',4,['qixi','fenwei']], + re_luxun:['male','wu',3,['reqianxun','relianying']], + re_daqiao:['female','wu',3,['reguose','liuli']], + re_huanggai:['male','wu',4,['rekurou','zhaxiang']], + re_lvbu:['male','qun',5,['wushuang','liyu']], + re_gongsunzan:['male','qun',4,['qiaomeng','reyicong']], + re_huatuo:['male','qun',3,['chulao','jijiu']], + re_liubei:['male','shu',4,['rerende','jijiang'],['zhu']], + }, + characterIntro:{ + re_gongsunzan:'群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。', + re_lidian:'字曼成,曹操麾下将领。李典深明大义,不与人争功,崇尚学习与高贵儒雅,尊重博学之士,在军中被称为长者。李典有长者之风,官至破虏将军,三十六岁去世。魏文帝曹丕继位后追谥号为愍侯。', + }, + skill:{ + rerende:{ + audio:2, + group:['rerende1'], + enable:'phaseUse', + filterCard:true, + selectCard:[1,Infinity], + discard:false, + prepare:'give2', + filterTarget:function(card,player,target){ + if(player.storage.rerende2&&player.storage.rerende2.contains(target)) return false; + return player!=target; + }, + onremove:['rerende','rerende2'], + check:function(card){ + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; + if(!ui.selected.cards.length&&card.name=='du') return 20; + var player=get.owner(card); + if(ui.selected.cards.length>=Math.max(2,player.countCards('h')-player.hp)) return 0; + if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ + var players=game.filterPlayer(); + for(var i=0;i=3&& + get.attitude(players[i],player)>=3){ + return 11-get.value(card); } } - if(player.canUse('tao',player,true,true)){ - list.push(['基本','','tao']); - } - if(player.canUse('jiu',player,true,true)){ - list.push(['基本','','jiu']); - } - if(list.length){ - player.chooseButton(['是否视为使用一张基本牌?',[list,'vcard']]).set('ai',function(button){ - var player=_status.event.player; - var card={name:button.link[2],nature:button.link[3]}; - if(card.name=='tao'){ - if(player.hp==1||(player.hp==2&&!player.hasShan())||player.needsToDiscard()){ - return 5; - } - return 1; + if(player.countCards('h')>player.hp) return 10-get.value(card); + if(player.countCards('h')>2) return 6-get.value(card); + return -1; + } + return 10-get.value(card); + }, + content:function(){ + 'step 0' + if(!Array.isArray(player.storage.rerende2)){ + player.storage.rerende2=[]; + } + player.storage.rerende2.push(target); + target.gain(cards,player); + if(typeof player.storage.rerende!='number'){ + player.storage.rerende=0; + } + if(player.storage.rerende>=0){ + player.storage.rerende+=cards.length; + if(player.storage.rerende>=2){ + var list=[]; + if(lib.filter.cardUsable({name:'sha'},player,event.getParent('chooseToUse'))){ + if(game.hasPlayer(function(current){ + return player.canUse('sha',current); + })){ + list.push(['基本','','sha']); + list.push(['基本','','sha','fire']); + list.push(['基本','','sha','thunder']); } - if(card.name=='sha'){ - if(game.hasPlayer(function(current){ - return player.canUse(card,current)&&get.effect(current,card,player,player)>0 - })){ - if(card.nature=='fire') return 2.95; - if(card.nature=='thunder') return 2.92; - return 2.9; + } + if(player.canUse('tao',player,true,true)){ + list.push(['基本','','tao']); + } + if(player.canUse('jiu',player,true,true)){ + list.push(['基本','','jiu']); + } + if(list.length){ + player.chooseButton(['是否视为使用一张基本牌?',[list,'vcard']]).set('ai',function(button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3]}; + if(card.name=='tao'){ + if(player.hp==1||(player.hp==2&&!player.hasShan())||player.needsToDiscard()){ + return 5; + } + return 1; + } + if(card.name=='sha'){ + if(game.hasPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0 + })){ + if(card.nature=='fire') return 2.95; + if(card.nature=='thunder') return 2.92; + return 2.9; + } + return 0; + } + if(card.name=='jiu'){ + return 0.5; } return 0; - } - if(card.name=='jiu'){ - return 0.5; - } - return 0; - }); + }); + } + else{ + event.finish(); + } + player.storage.rerende=-1; } else{ event.finish(); } - player.storage.rerende=-1; } else{ event.finish(); } - } - else{ - event.finish(); - } - 'step 1' - if(result&&result.bool&&result.links[0]){ - var card={name:result.links[0][2],nature:result.links[0][3]}; - if(card.name=='sha'){ - event.fakecard=card; - player.chooseTarget(function(card,player,target){ - return player.canUse(_status.event.fakecard,target,true,true); - },true,'选择出杀目标').set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,_status.event.fakecard,player,player); - }).set('fakecard',card); + 'step 1' + if(result&&result.bool&&result.links[0]){ + var card={name:result.links[0][2],nature:result.links[0][3]}; + if(card.name=='sha'){ + event.fakecard=card; + player.chooseTarget(function(card,player,target){ + return player.canUse(_status.event.fakecard,target,true,true); + },true,'选择出杀目标').set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,_status.event.fakecard,player,player); + }).set('fakecard',card); + } + else{ + player.useCard(card,player); + event.finish(); + } } else{ - player.useCard(card,player); event.finish(); } - } - else{ - event.finish(); - } - 'step 2' - if(result.bool&&result.targets&&result.targets.length){ - player.useCard(event.fakecard,result.targets); - } - }, - ai:{ - order:function(skill,player){ - if(player.hp1){ - return 10; - } - return 4; - }, - result:{ - target:function(player,target){ - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return -10; - } - if(target.hasJudge('lebu')) return 0; - var nh=target.countCards('h'); - var np=player.countCards('h'); - if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ - if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; - } - return Math.max(1,5-nh); + 'step 2' + if(result.bool&&result.targets&&result.targets.length){ + player.useCard(event.fakecard,result.targets); } }, - effect:{ - target:function(card,player,target){ - if(player==target&&get.type(card)=='equip'){ - if(player.countCards('e',{subtype:get.subtype(card)})){ - if(game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)>0; - })){ - return 0; + ai:{ + order:function(skill,player){ + if(player.hp1){ + return 10; + } + return 4; + }, + result:{ + target:function(player,target){ + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return -10; + } + if(target.hasJudge('lebu')) return 0; + var nh=target.countCards('h'); + var np=player.countCards('h'); + if(player.hp==player.maxHp||player.storage.rerende<0||player.countCards('h')<=1){ + if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; + } + return Math.max(1,5-nh); + } + }, + effect:{ + target:function(card,player,target){ + if(player==target&&get.type(card)=='equip'){ + if(player.countCards('e',{subtype:get.subtype(card)})){ + if(game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0; + })){ + return 0; + } } } } - } + }, + threaten:0.8 + } + }, + rerende1:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.rerende=0; + player.storage.rerende2=[]; + } + }, + liyu:{ + audio:2, + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.player.isAlive()&&event.player.countCards('he')>0; }, - threaten:0.8 - } - }, - rerende1:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.rerende=0; - player.storage.rerende2=[]; - } - }, - liyu:{ - audio:2, - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.player.isAlive()&&event.player.countCards('he')>0; - }, - check:function(){ - return false; - }, - content:function(){ - 'step 0' - trigger.player.chooseTarget(function(card,player,target){ - var evt=_status.event.getParent(); - return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; - },get.prompt('liyu')).set('ai',function(target){ - var evt=_status.event.getParent(); - return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; - }); - 'step 1' - if(result.bool){ - player.gainPlayerCard(trigger.player,'he',true); - event.target=result.targets[0]; - trigger.player.line(player,'green'); - } - else{ - event.finish(); - } - 'step 2' - if(event.target){ - player.useCard({name:'juedou'},event.target,'noai'); - } - } - }, - reqicai:{ - trigger:{player:'equipEnd'}, - frequent:true, - content:function(){ - player.draw(); - }, - mod:{ - targetInRange:function(card,player,target,now){ - var type=get.type(card); - if(type=='trick'||type=='delay') return true; - } - }, - }, - rejizhi:{ - audio:2, - usable:3, - trigger:{player:'useCard'}, - frequent:true, - filter:function(event){ - var type=get.type(event.card,'trick'); - return (type=='trick'||type=='equip')&&event.cards[0]&&event.cards[0]==event.card; - }, - content:function(){ - "step 0" - var cards=get.cards(); - player.gain(cards,'gain2','log'); - if(get.type(cards[0])!='basic'){ - event.finish(); - } - "step 1" - player.chooseToDiscard('h',true); - }, - ai:{ - threaten:1.4 - } - }, - retuxi:{ - audio:2, - trigger:{player:'phaseDrawBefore'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('retuxi'),[1,2],function(card,player,target){ - return target.countCards('h')>0&&player!=target&&target.countCards('h')>=player.countCards('h'); - },function(target){ - var att=get.attitude(_status.event.player,target); - if(target.hasSkill('tuntian')) return att/10; - return 1-att; - }); - "step 1" - if(result.bool){ - player.logSkill('retuxi',result.targets); - player.gainMultiple(result.targets); - trigger.num-=result.targets.length; - } - else{ - event.finish(); - } - "step 2" - if(trigger.num<=0) game.delay(); - }, - ai:{ - threaten:1.6, - expose:0.2 - } - }, - reguicai:{ - audio:2, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'he').set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result-get.value(card)/2; + check:function(){ + return false; + }, + content:function(){ + 'step 0' + trigger.player.chooseTarget(function(card,player,target){ + var evt=_status.event.getParent(); + return evt.player.canUse({name:'juedou'},target)&&target!=_status.event.player; + },get.prompt('liyu')).set('ai',function(target){ + var evt=_status.event.getParent(); + return get.effect(target,{name:'juedou'},evt.player,_status.event.player)-2; + }); + 'step 1' + if(result.bool){ + player.gainPlayerCard(trigger.player,'he',true); + event.target=result.targets[0]; + trigger.player.line(player,'green'); } else{ - return -result-get.value(card)/2; + event.finish(); } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.logSkill('reguicai'); - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - ui.discardPile.appendChild(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - if(!get.owner(result.cards[0],'judge')){ - trigger.position.appendChild(result.cards[0]); - } - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, - ai:{ - tag:{ - rejudge:1, - } - } - }, - refankui:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return (event.source&&event.source.countCards('he')&&event.num>0&&event.source!=player); - }, - content:function(){ - player.gainPlayerCard([1,trigger.num],get.prompt('fankui',trigger.source),trigger.source,get.buttonValue,'he').set('logSkill',['refankui',trigger.source]); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player.countCards('he')>1&&get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-1.5]; - if(get.attitude(target,player)<0) return [1,1]; - } + 'step 2' + if(event.target){ + player.useCard({name:'juedou'},event.target,'noai'); } } - } - }, - reluoyi:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - check:function(event,player){ - if(player.countCards('h','sha')) return true; - return Math.random()<0.5; }, - content:function(){ - "step 0" - player.addTempSkill('reluoyi2',{player:'phaseBefore'}); - trigger.untrigger(); - trigger.finish(); - "step 1" - event.cards=get.cards(3); - player.showCards(event.cards,'裸衣'); - "step 2" - for(var i=0;i0); - }, - check:function(event,player){ - return (get.attitude(player,event.source)<=0); - }, - logTarget:'source', - content:function(){ - "step 0" - event.num=trigger.num; - "step 1" - player.judge(function(card){ - if(get.color(card)=='red') return 2; - return 1; - }) - "step 2" - if(result.judge==1&&trigger.source.countCards('he')){ - player.discardPlayerCard(trigger.source,'he',true); - } - else{ - if(result.judge==2){ - trigger.source.damage(); + rejizhi:{ + audio:2, + usable:3, + trigger:{player:'useCard'}, + frequent:true, + filter:function(event){ + var type=get.type(event.card,'trick'); + return (type=='trick'||type=='equip')&&event.cards[0]&&event.cards[0]==event.card; + }, + content:function(){ + "step 0" + var cards=get.cards(); + player.gain(cards,'gain2','log'); + if(get.type(cards[0])!='basic'){ + event.finish(); } - } - event.num--; - if(event.num>0){ - player.chooseBool('是否继续发动?'); - } - else{ - event.finish(); - } - "step 3" - if(result.bool){ - event.goto(1); + "step 1" + player.chooseToDiscard('h',true); + }, + ai:{ + threaten:1.4 } }, - ai:{ - expose:0.4 - } - }, - qinxue:{ - skillAnimation:true, - audio:2, - unique:true, - derivation:'gongxin', - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - if(player.storage.qinxue) return false; - if(player.countCards('h')>=player.hp+3) return true; - if(player.countCards('h')>=player.hp+2&&game.players.length+game.dead.length>=7) return true; - return false; - }, - content:function(){ - player.storage.qinxue=true; - player.loseMaxHp(); - player.addSkill('gongxin'); - player.awakenSkill('qinxue'); - } - }, - qingjian:{ - audio:2, - unique:true, - trigger:{player:'gainAfter'}, - direct:true, - usable:4, - filter:function(event,player){ - if(event.parent.parent.name=='phaseDraw') return false; - return event.cards&&event.cards.length>0 - }, - content:function(){ - "step 0" - event.cards=trigger.cards.slice(0); - "step 1" - player.chooseCardTarget({ - filterCard:function(card){ - return _status.event.getParent().cards.contains(card); - }, - selectCard:[1,event.cards.length], - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ + retuxi:{ + audio:2, + trigger:{player:'phaseDrawBefore'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('retuxi'),[1,2],function(card,player,target){ + return target.countCards('h')>0&&player!=target&&target.countCards('h')>=player.countCards('h'); + },function(target){ var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return 1-att; - } - if(target.countCards('h')>_status.event.player.countCards('h')) return 0; - return att-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 2" - if(result.bool){ - player.storage.qingjian++; - player.logSkill('qingjian',result.targets); - result.targets[0].gain(result.cards,player); - player.$give(result.cards.length,result.targets[0]); - for(var i=0;i0; + }, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'he').set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result-get.value(card)/2; + } + else{ + return -result-get.value(card)/2; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.logSkill('reguicai'); + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + ui.discardPile.appendChild(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + if(!get.owner(result.cards[0],'judge')){ + trigger.position.appendChild(result.cards[0]); + } + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, + ai:{ + tag:{ + rejudge:1, + } } - } - }, - refanjian:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; }, - filterTarget:function(card,player,target){ - return player!=target; - }, - filterCard:true, - check:function(card){ - return 8-get.value(card); - }, - discard:false, - prepare:'give', - content:function(){ - "step 0" - target.storage.refanjian=cards[0]; - target.gain(cards[0],player); - "step 1" - target.chooseControl('refanjian_card','refanjian_hp').ai=function(event,player){ - var cards=player.getCards('he',{suit:get.suit(player.storage.refanjian)}); - if(cards.length==1) return 0; - if(cards.length>=2){ - for(var i=0;i0&&event.source!=player); + }, + content:function(){ + player.gainPlayerCard([1,trigger.num],get.prompt('fankui',trigger.source),trigger.source,get.buttonValue,'he').set('logSkill',['refankui',trigger.source]); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player.countCards('he')>1&&get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-1.5]; + if(get.attitude(target,player)<0) return [1,1]; + } } } - if(player.hp==1) return 0; + } + }, + reluoyi:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + check:function(event,player){ + if(player.countCards('h','sha')) return true; + return Math.random()<0.5; + }, + content:function(){ + "step 0" + player.addTempSkill('reluoyi2',{player:'phaseBefore'}); + trigger.untrigger(); + trigger.finish(); + "step 1" + event.cards=get.cards(3); + player.showCards(event.cards,'裸衣'); + "step 2" for(var i=0;i=8) return 1; + if(get.type(cards[i])!='basic'&&cards[i].name!='juedou'&& + (get.type(cards[i])!='equip'||get.subtype(cards[i])!='equip1')){ + ui.discardPile.appendChild(cards[i]); + cards.splice(i--,1); + } } - if(cards.length>2&&player.hp>2) return 1; - if(cards.length>3) return 1; - return 0; + player.gain(cards,'gain2'); } - "step 2" - if(result.control=='refanjian_card'){ - target.showHandcards(); - } - else{ - target.loseHp(); - event.finish(); - } - "step 3" - target.discard(target.getCards('he',{suit:get.suit(target.storage.refanjian)})) - delete target.storage.refanjian; }, - ai:{ - order:9, - result:{ - target:function(player,target){ - return -target.countCards('he')-(player.countCards('h','du')?1:0); + reluoyi2:{ + trigger:{source:'damageBegin'}, + filter:function(event){ + return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); + }, + forced:true, + content:function(){ + trigger.num++; + } + }, + reganglie:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return (event.source!=undefined&&event.num>0); + }, + check:function(event,player){ + return (get.attitude(player,event.source)<=0); + }, + logTarget:'source', + content:function(){ + "step 0" + event.num=trigger.num; + "step 1" + player.judge(function(card){ + if(get.color(card)=='red') return 2; + return 1; + }) + "step 2" + if(result.judge==1&&trigger.source.countCards('he')){ + player.discardPlayerCard(trigger.source,'he',true); + } + else{ + if(result.judge==2){ + trigger.source.damage(); + } + } + event.num--; + if(event.num>0){ + player.chooseBool('是否继续发动?'); + } + else{ + event.finish(); + } + "step 3" + if(result.bool){ + event.goto(1); } }, - threaten:2, - } - }, - reqianxun:{ - init:function(player){ - player.storage.reqianxun2=[]; - }, - audio:2, - trigger:{target:'useCardToBegin',player:'judgeBefore'}, - filter:function(event,player){ - if(player.countCards('h')==0) return false; - if(event.parent.name=='phaseJudge'){ - if(lib.skill.reqianxun.trigger.player=='judgeBefore'){ - return true; - } - return event.result&&event.result.judge!=0; + ai:{ + expose:0.4 } - if(event.name=='judge') return false; - if(event.targets&&event.targets.length>1) return false; - if(event.card&&get.type(event.card)=='trick'&&event.player!=player) return true; }, - content:function(){ - player.storage.reqianxun2=player.storage.reqianxun2.concat(player.getCards('h')); - game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']); - player.lose(player.getCards('h'),ui.special); - player.addSkill('reqianxun2'); + qinxue:{ + skillAnimation:true, + audio:2, + unique:true, + derivation:'gongxin', + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + if(player.storage.qinxue) return false; + if(player.countCards('h')>=player.hp+3) return true; + if(player.countCards('h')>=player.hp+2&&game.players.length+game.dead.length>=7) return true; + return false; + }, + content:function(){ + player.storage.qinxue=true; + player.loseMaxHp(); + player.addSkill('gongxin'); + player.awakenSkill('qinxue'); + } }, - ai:{ - effect:function(card,player,target){ - if(!target.hasFriend()) return; - var type=get.type(card); - var nh=target.countCards(); - if(type=='trick'){ - if(!get.tag(card,'multitarget')||get.info(card).singleCard){ - if(get.tag(card,'damage')){ - if(nh<3||target.hp<=2) return 0.8; + qingjian:{ + audio:2, + unique:true, + trigger:{player:'gainAfter'}, + direct:true, + usable:4, + filter:function(event,player){ + if(event.parent.parent.name=='phaseDraw') return false; + return event.cards&&event.cards.length>0 + }, + content:function(){ + "step 0" + event.cards=trigger.cards.slice(0); + "step 1" + player.chooseCardTarget({ + filterCard:function(card){ + return _status.event.getParent().cards.contains(card); + }, + selectCard:[1,event.cards.length], + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + if(ui.selected.cards.length>0) return -1; + if(card.name=='du') return 20; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return 1-att; } - return [1,nh]; + if(target.countCards('h')>_status.event.player.countCards('h')) return 0; + return att-4; + }, + prompt:'请选择要送人的卡牌' + }); + "step 2" + if(result.bool){ + player.storage.qingjian++; + player.logSkill('qingjian',result.targets); + result.targets[0].gain(result.cards,player); + player.$give(result.cards.length,result.targets[0]); + for(var i=0;i0; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + filterCard:true, + check:function(card){ + return 8-get.value(card); + }, + discard:false, + prepare:'give', + content:function(){ + "step 0" + target.storage.refanjian=cards[0]; + target.gain(cards[0],player); + "step 1" + target.chooseControl('refanjian_card','refanjian_hp').ai=function(event,player){ + var cards=player.getCards('he',{suit:get.suit(player.storage.refanjian)}); + if(cards.length==1) return 0; + if(cards.length>=2){ + for(var i=0;i=8) return 1; + } + if(cards.length>2&&player.hp>2) return 1; + if(cards.length>3) return 1; + return 0; + } + "step 2" + if(result.control=='refanjian_card'){ + target.showHandcards(); + } + else{ + target.loseHp(); + event.finish(); + } + "step 3" + target.discard(target.getCards('he',{suit:get.suit(target.storage.refanjian)})) + delete target.storage.refanjian; + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + return -target.countCards('he')-(player.countCards('h','du')?1:0); + } + }, + threaten:2, + } + }, + reqianxun:{ + init:function(player){ + player.storage.reqianxun2=[]; + }, + audio:2, + trigger:{target:'useCardToBegin',player:'judgeBefore'}, + filter:function(event,player){ + if(player.countCards('h')==0) return false; + if(event.parent.name=='phaseJudge'){ + if(lib.skill.reqianxun.trigger.player=='judgeBefore'){ + return true; + } + return event.result&&event.result.judge!=0; + } + if(event.name=='judge') return false; + if(event.targets&&event.targets.length>1) return false; + if(event.card&&get.type(event.card)=='trick'&&event.player!=player) return true; + }, + content:function(){ + player.storage.reqianxun2=player.storage.reqianxun2.concat(player.getCards('h')); + game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']); + player.lose(player.getCards('h'),ui.special); + player.addSkill('reqianxun2'); + }, + ai:{ + effect:function(card,player,target){ + if(!target.hasFriend()) return; + var type=get.type(card); + var nh=target.countCards(); + if(type=='trick'){ + if(!get.tag(card,'multitarget')||get.info(card).singleCard){ + if(get.tag(card,'damage')){ + if(nh<3||target.hp<=2) return 0.8; + } + return [1,nh]; + } + } + else if(type=='delay'){ + return [0.5,0.5]; + } + }, + } + }, + reqianxun2:{ + trigger:{global:'phaseAfter'}, + forced:true, + audio:false, + content:function(){ + player.gain(player.storage.reqianxun2); + player.removeSkill('reqianxun2'); + player.storage.reqianxun2=[]; + game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']); + }, + mark:true, + intro:{ + content:'cardCount' + } + }, + relianying:{ + audio:2, + trigger:{player:'loseEnd'}, + direct:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + for(var i=0;i0){ + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }).set('du',event.card.name=='du'); + } + else{ + player.chooseBool('是否弃置'+get.translation(event.card)+'?'); + event.disbool=true; + } + game.delay(2); + "step 1" + if(event.disbool){ + if(!result.bool){ + game.log(player,'展示了',event.card); + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); } - if(att>0){ - return att+Math.max(0,5-target.countCards('h')); + else{ + game.log(player,'展示并弃掉了',event.card); + ui.discardPile.appendChild(event.card); } - return att; - }).set('du',event.card.name=='du'); - } - else{ - player.chooseBool('是否弃置'+get.translation(event.card)+'?'); - event.disbool=true; - } - game.delay(2); - "step 1" - if(event.disbool){ - if(!result.bool){ - game.log(player,'展示了',event.card); - ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(card){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.delete(); + } + },event.card); + } + else if(result.targets){ + player.line(result.targets,'green'); + result.targets[0].gain(event.card,'log'); + event.node.moveDelete(result.targets[0]); + game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]); + game.broadcast(function(card,target){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.moveDelete(target); + } + },event.card,result.targets[0]); } else{ game.log(player,'展示并弃掉了',event.card); ui.discardPile.appendChild(event.card); + game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(card){ + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.delete(); + } + },event.card); } - game.addVideo('deletenode',player,[get.cardInfo(event.node)]); - event.node.delete(); - game.broadcast(function(card){ - ui.arena.classList.remove('thrownhighlight'); - if(card.clone){ - card.clone.delete(); + game.addVideo('thrownhighlight2'); + ui.arena.classList.remove('thrownhighlight'); + }, + ai:{ + effect:{ + target:function(card,player){ + if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; } - },event.card); - } - else if(result.targets){ - player.line(result.targets,'green'); - result.targets[0].gain(event.card,'log'); - event.node.moveDelete(result.targets[0]); - game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]); - game.broadcast(function(card,target){ - ui.arena.classList.remove('thrownhighlight'); - if(card.clone){ - card.clone.moveDelete(target); - } - },event.card,result.targets[0]); - } - else{ - game.log(player,'展示并弃掉了',event.card); - ui.discardPile.appendChild(event.card); - game.addVideo('deletenode',player,[get.cardInfo(event.node)]); - event.node.delete(); - game.broadcast(function(card){ - ui.arena.classList.remove('thrownhighlight'); - if(card.clone){ - card.clone.delete(); - } - },event.card); - } - game.addVideo('thrownhighlight2'); - ui.arena.classList.remove('thrownhighlight'); - }, - ai:{ - effect:{ - target:function(card,player){ - if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; } } - } - }, - rejianxiong:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - "step 0" - if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0])=='d'){ - player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').set('prompt',get.prompt('rejianxiong')).ai=function(){ - var trigger=_status.event.getTrigger(); - if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0; - return 1; - }; - } - else{ - player.chooseControl('rejianxiong_mopai','cancel2').set('prompt',get.prompt('rejianxiong')); - } - "step 1" - if(result.control=='rejianxiong_napai'){ - player.logSkill('rejianxiong'); - player.gain(trigger.cards); - player.$gain2(trigger.cards); - } - else if(result.control=='rejianxiong_mopai'){ - player.logSkill('rejianxiong'); - player.draw(); - } }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return [1,-1]; - if(get.tag(card,'damage')&&player!=target) return [1,0.6]; - } - } - } - }, - reyiji:{ - audio:2, - trigger:{player:'damageEnd'}, - frequent:true, - filter:function(event){ - return (event.num>0) - }, - content:function(){ - "step 0" - event.num=1; - event.count=1; - "step 1" - player.gain(get.cards(2)); - player.$draw(2); - "step 2" - player.chooseCardTarget({ - filterCard:true, - selectCard:[1,2], - filterTarget:function(card,player,target){ - return player!=target&&target!=event.temp; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return 1-att; - } - return att-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 3" - if(result.bool){ - player.lose(result.cards,ui.special); - if(result.targets[0].hasSkill('reyiji2')){ - result.targets[0].storage.reyiji2=result.targets[0].storage.reyiji2.concat(result.cards); + rejianxiong:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + "step 0" + if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0])=='d'){ + player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').set('prompt',get.prompt('rejianxiong')).ai=function(){ + var trigger=_status.event.getTrigger(); + if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0; + return 1; + }; } else{ - result.targets[0].addSkill('reyiji2'); - result.targets[0].storage.reyiji2=result.cards; + player.chooseControl('rejianxiong_mopai','cancel2').set('prompt',get.prompt('rejianxiong')); } - player.$give(result.cards.length,result.targets[0]); - player.line(result.targets,'green'); - game.addVideo('storage',result.targets[0],['reyiji2',get.cardsInfo(result.targets[0].storage.reyiji2),'cards']); - if(num==1){ - event.temp=result.targets[0]; - event.num++; - event.goto(2); + "step 1" + if(result.control=='rejianxiong_napai'){ + player.logSkill('rejianxiong'); + player.gain(trigger.cards); + player.$gain2(trigger.cards); + } + else if(result.control=='rejianxiong_mopai'){ + player.logSkill('rejianxiong'); + player.draw(); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return [1,-1]; + if(get.tag(card,'damage')&&player!=target) return [1,0.6]; + } + } + } + }, + reyiji:{ + audio:2, + trigger:{player:'damageEnd'}, + frequent:true, + filter:function(event){ + return (event.num>0) + }, + content:function(){ + "step 0" + event.num=1; + event.count=1; + "step 1" + player.gain(get.cards(2)); + player.$draw(2); + "step 2" + player.chooseCardTarget({ + filterCard:true, + selectCard:[1,2], + filterTarget:function(card,player,target){ + return player!=target&&target!=event.temp; + }, + ai1:function(card){ + if(ui.selected.cards.length>0) return -1; + if(card.name=='du') return 20; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return 1-att; + } + return att-4; + }, + prompt:'请选择要送人的卡牌' + }); + "step 3" + if(result.bool){ + player.lose(result.cards,ui.special); + if(result.targets[0].hasSkill('reyiji2')){ + result.targets[0].storage.reyiji2=result.targets[0].storage.reyiji2.concat(result.cards); + } + else{ + result.targets[0].addSkill('reyiji2'); + result.targets[0].storage.reyiji2=result.cards; + } + player.$give(result.cards.length,result.targets[0]); + player.line(result.targets,'green'); + game.addVideo('storage',result.targets[0],['reyiji2',get.cardsInfo(result.targets[0].storage.reyiji2),'cards']); + if(num==1){ + event.temp=result.targets[0]; + event.num++; + event.goto(2); + } + else if(event.count=4) return [1,get.tag(card,'damage')*2]; - if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; - } - } }, - threaten:0.6 - } - }, - reyiji2:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - mark:true, - popup:'遗计拿牌', - audio:false, - content:function(){ - player.$draw(player.storage.reyiji2.length); - player.gain(player.storage.reyiji2); - delete player.storage.reyiji2; - player.removeSkill('reyiji2'); - game.delay(); - }, - intro:{ - content:'cardCount' - } - }, - yijue:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(target).set('small',true); - "step 1" - if(result.bool){ - if(!target.hasSkill('fengyin')){ - target.addTempSkill('fengyin','phaseAfter'); - } - target.addTempSkill('yijue2','phaseAfter'); - event.finish(); - } - else if(target.hp0; - }; - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - target.recover(); - } - }, - ai:{ - result:{ - target:function(player,target){ - var hs=player.getCards('h'); - if(hs.length<3) return 0; - var bool=false; - for(var i=0;i=9&&get.value(hs[i])<7){ - bool=true; - break; + ai:{ + maixie:true, + maixie_hp:true, + result:{ + effect:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(player.hp>=4) return [1,get.tag(card,'damage')*2]; + if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; } } - if(!bool) return 0; - if(target.countCards('h')>target.hp+1&&get.recoverEffect(target)>0){ - return 1; + }, + threaten:0.6 + } + }, + reyiji2:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + mark:true, + popup:'遗计拿牌', + audio:false, + content:function(){ + player.$draw(player.storage.reyiji2.length); + player.gain(player.storage.reyiji2); + delete player.storage.reyiji2; + player.removeSkill('reyiji2'); + game.delay(); + }, + intro:{ + content:'cardCount' + } + }, + yijue:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(target).set('small',true); + "step 1" + if(result.bool){ + if(!target.hasSkill('fengyin')){ + target.addTempSkill('fengyin','phaseAfter'); } - if(player.canUse('sha',target)&&(player.countCards('h','sha')||player.countCards('he',{color:'red'}))){ - return -2; - } - return -0.5; + target.addTempSkill('yijue2','phaseAfter'); + event.finish(); + } + else if(target.hp0; + }; + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + target.recover(); } }, - order:9, - } - }, - yijue2:{ - mark:true, - mod:{ - cardEnabled:function(){ - return false; - }, - cardUsable:function(){ - return false; - }, - cardRespondable:function(){ - return false; - }, - cardSavable:function(){ - return false; + ai:{ + result:{ + target:function(player,target){ + var hs=player.getCards('h'); + if(hs.length<3) return 0; + var bool=false; + for(var i=0;i=9&&get.value(hs[i])<7){ + bool=true; + break; + } + } + if(!bool) return 0; + if(target.countCards('h')>target.hp+1&&get.recoverEffect(target)>0){ + return 1; + } + if(player.canUse('sha',target)&&(player.countCards('h','sha')||player.countCards('he',{color:'red'}))){ + return -2; + } + return -0.5; + } + }, + order:9, } }, - intro:{ - content:'不能使用或打出卡牌' - } - }, - retieji:{ - audio:2, - trigger:{player:'shaBegin'}, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - logTarget:'target', - content:function(){ - "step 0" - player.judge(function(){return 0}); - if(!trigger.target.hasSkill('fengyin')){ - trigger.target.addTempSkill('fengyin','phaseAfter'); + yijue2:{ + mark:true, + mod:{ + cardEnabled:function(){ + return false; + }, + cardUsable:function(){ + return false; + }, + cardRespondable:function(){ + return false; + }, + cardSavable:function(){ + return false; + } + }, + intro:{ + content:'不能使用或打出卡牌' } - "step 1" - var suit=get.suit(result.card); - var target=trigger.target; - var num=target.countCards('h','shan'); - target.chooseToDiscard('请弃置一张'+get.translation(suit)+'牌,否则不能使用闪抵消此杀','he',function(card){ - return get.suit(card)==_status.event.suit; - }).set('ai',function(card){ - var num=_status.event.num; - if(num==0) return 0; - if(card.name=='shan') return num>1?2:0; + }, + retieji:{ + audio:2, + trigger:{player:'shaBegin'}, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + logTarget:'target', + content:function(){ + "step 0" + player.judge(function(){return 0}); + if(!trigger.target.hasSkill('fengyin')){ + trigger.target.addTempSkill('fengyin','phaseAfter'); + } + "step 1" + var suit=get.suit(result.card); + var target=trigger.target; + var num=target.countCards('h','shan'); + target.chooseToDiscard('请弃置一张'+get.translation(suit)+'牌,否则不能使用闪抵消此杀','he',function(card){ + return get.suit(card)==_status.event.suit; + }).set('ai',function(card){ + var num=_status.event.num; + if(num==0) return 0; + if(card.name=='shan') return num>1?2:0; + return 8-get.value(card); + }).set('num',num).set('suit',suit); + "step 2" + if(!result.bool){ + trigger.directHit=true; + } + } + }, + reyicong:{ + mod:{ + globalFrom:function(from,to,current){ + if(from.hp>2) return current-1; + }, + globalTo:function(from,to,current){ + if(to.hp<=2) return current+1; + }, + }, + ai:{ + threaten:0.8 + } + }, + qiaomeng:{ + audio:2, + trigger:{source:'damageEnd'}, + direct:true, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.cards&& + get.color(event.cards)=='black'&&event.player.countCards('e'); + }, + content:function(){ + "step 0" + player.choosePlayerCard('e',trigger.player); + "step 1" + if(result.bool){ + player.logSkill('qiaomeng'); + trigger.player.discard(result.links[0]); + event.card=result.links[0]; + } + else{ + event.finish(); + } + "step 2" + if(get.position(card)=='d'){ + if(get.subtype(card)=='equip3'||get.subtype(card)=='equip4'){ + player.gain(card,trigger.player); + player.$gain2(card); + } + } + } + }, + rekurou:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:true, + check:function(card){ return 8-get.value(card); - }).set('num',num).set('suit',suit); - "step 2" - if(!result.bool){ + }, + position:'he', + content:function(){ + player.loseHp(); + }, + ai:{ + order:8, + result:{ + player:function(player){ + if(player.hp<=2) return player.countCards('h')==0?1:0; + if(player.countCards('h',{name:'sha',color:'red'})) return 1; + return player.countCards('h')<=player.hp?1:0; + } + }, + effect:function(card,player){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,1]; + return 1.2; + } + if(get.tag(card,'loseHp')){ + if(player.hp<=1) return; + return [0,0]; + } + } + } + }, + zhaxiang:{ + trigger:{player:'loseHpEnd'}, + forced:true, + audio:2, + content:function(){ + player.draw(3); + if(_status.currentPhase==player){ + player.addTempSkill('zhaxiang2',{player:'phaseAfter'}); + } + else{ + game.trySkillAudio('zhaxiang',player); + } + } + }, + zhaxiang2:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(card.name=='sha'&&get.color(card)=='red') return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + } + }, + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return event.card&&get.color(event.card)=='red'; + }, + content:function(){ trigger.directHit=true; } - } - }, - reyicong:{ - mod:{ - globalFrom:function(from,to,current){ - if(from.hp>2) return current-1; + }, + zhuhai:{ + trigger:{global:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return event.player.isAlive()&&event.player.getStat('damage')&& + lib.filter.targetEnabled({name:'sha'},player,event.player)&&player.hasSha(); }, - globalTo:function(from,to,current){ - if(to.hp<=2) return current+1; + content:function(){ + player.chooseToUse({name:'sha'},'诛害:是否对'+get.translation(trigger.player)+'使用一张杀?', + trigger.player,-1).set('logSkill','zhuhai'); + } + }, + qianxin:{ + skillAnimation:true, + audio:2, + unique:true, + trigger:{source:'damageAfter'}, + forced:true, + derivation:'jianyan', + filter:function(event,player){ + return player.hp2) return 'trick'; + return 'red'; + }); + "step 1" + var num=20; + var card; + event.cards=[]; + while(num--){ + card=get.cards(0); + event.cards.push(card); + if(get.color(card)==result.control) break; + else if(get.type(card,'trick')==result.control) break; } - if(get.tag(card,'loseHp')){ - if(player.hp<=1) return; - return [0,0]; + event.card=card; + player.showCards(event.cards); + player.chooseTarget(true,'选择一名男性角色送出'+get.translation(event.card),function(card,player,target){ + return target.sex=='male'; + }); + "step 2" + player.line(result.targets,'green'); + result.targets[0].$gain2(event.card); + for(var i=0;i2) return 'trick'; - return 'red'; - }); - "step 1" - var num=20; - var card; - event.cards=[]; - while(num--){ - card=get.cards(0); - event.cards.push(card); - if(get.color(card)==result.control) break; - else if(get.type(card,'trick')==result.control) break; - } - event.card=card; - player.showCards(event.cards); - player.chooseTarget(true,'选择一名男性角色送出'+get.translation(event.card),function(card,player,target){ - return target.sex=='male'; - }); - "step 2" - player.line(result.targets,'green'); - result.targets[0].$gain2(event.card); - for(var i=0;i0; - }, - prepare:'throw', - position:'he', - filterCard:{suit:'diamond'}, - filterTarget:function(card,player,target){ - if(player==target) return false; - if(target.hasJudge('lebu')) return true; - return lib.filter.targetEnabled({name:'lebu'},player,target); - }, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - if(target.hasJudge('lebu')){ - target.discard(target.getJudge('lebu')); + ai:{ + order:9, + result:{ + player:2 + }, + threaten:1.2 } - else{ - var next=player.useCard({name:'lebu'},target,cards); - next.animate=false; - next.audio=false; - } - player.draw(); }, - ai:{ - result:{ - target:function(player,target){ - if(target.hasJudge('lebu')) return -get.effect(target,{name:'lebu'},player,target); - return get.effect(target,{name:'lebu'},player,target); + reguose:{ + audio:1, + enable:'phaseUse', + usable:1, + discard:false, + filter:function(event,player){ + return player.countCards('he',{suit:'diamond'})>0; + }, + prepare:'throw', + position:'he', + filterCard:{suit:'diamond'}, + filterTarget:function(card,player,target){ + if(player==target) return false; + if(target.hasJudge('lebu')) return true; + return lib.filter.targetEnabled({name:'lebu'},player,target); + }, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + if(target.hasJudge('lebu')){ + target.discard(target.getJudge('lebu')); + } + else{ + var next=player.useCard({name:'lebu'},target,cards); + next.animate=false; + next.audio=false; + } + player.draw(); + }, + ai:{ + result:{ + target:function(player,target){ + if(target.hasJudge('lebu')) return -get.effect(target,{name:'lebu'},player,target); + return get.effect(target,{name:'lebu'},player,target); + } + }, + order:9, + } + }, + fenwei:{ + skillAnimation:true, + audio:2, + unique:true, + mark:true, + trigger:{global:'useCard'}, + priority:5, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(get.info(event.card).multitarget) return false; + if(event.targets.length<2) return false; + if(player.storage.fenwei) return false; + return true; + }, + init:function(player){ + player.storage.fenwei=false; + }, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('fenwei'), + [1,trigger.targets.length],function(card,player,target){ + return _status.event.getTrigger().targets.contains(target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + if(game.phaseNumber>game.players.length*2&&trigger.targets.length>=game.players.length-1){ + return -get.effect(target,trigger.card,trigger.player,_status.event.player); + } + return -1; + }); + "step 1" + if(result.bool){ + player.awakenSkill('fenwei'); + player.logSkill('fenwei',result.targets); + player.storage.fenwei=true; + for(var i=0;i0; + }, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + position:'he', + selectTarget:[1,Infinity], + check:function(card){ + if(get.suit(card)=='spade') return 8-get.value(card); + return 5-get.value(card); + }, + content:function(){ + "step 0" + if(num==0&&get.suit(cards[0])=='spade') player.draw(); + player.choosePlayerCard(targets[num],'he',true); + "step 1" + if(result.bool){ + if(result.links.length) targets[num].discard(result.links[0]); + if(get.suit(result.links[0])=='spade') targets[num].draw(); + } + }, + ai:{ + result:{ + target:-1 + }, + threaten:1.2, + order:3 + } }, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('fenwei'), - [1,trigger.targets.length],function(card,player,target){ - return _status.event.getTrigger().targets.contains(target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - if(game.phaseNumber>game.players.length*2&&trigger.targets.length>=game.players.length-1){ - return -get.effect(target,trigger.card,trigger.player,_status.event.player); - } - return -1; - }); - "step 1" - if(result.bool){ - player.awakenSkill('fenwei'); - player.logSkill('fenwei',result.targets); - player.storage.fenwei=true; - for(var i=0;i-3; + return get.attitude(player,event.player)>-3; + }, + logTarget:function(event,player){ + if(event.player==player) return event.source; + return event.player; + }, + content:function(){ + "step 0" + game.asyncDraw([trigger.player,trigger.source],trigger.num); + "step 1" game.delay(); } - }, - intro:{ - content:'limited' } }, - chulao:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - if(player==target) return false; - if(target.group=='unknown') return false; - for(var i=0;i0; - }, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterCard:true, - position:'he', - selectTarget:[1,Infinity], - check:function(card){ - if(get.suit(card)=='spade') return 8-get.value(card); - return 5-get.value(card); - }, - content:function(){ - "step 0" - if(num==0&&get.suit(cards[0])=='spade') player.draw(); - player.choosePlayerCard(targets[num],'he',true); - "step 1" - if(result.bool){ - if(result.links.length) targets[num].discard(result.links[0]); - if(get.suit(result.links[0])=='spade') targets[num].draw(); - } - }, - ai:{ - result:{ - target:-1 - }, - threaten:1.2, - order:3 - } + translate:{ + re_zhangliao:'界张辽', + re_huangyueying:'新黄月英', + re_simayi:'界司马懿', + re_xuzhu:'界许褚', + re_xiahoudun:'界夏侯惇', + re_lvmeng:'界吕蒙', + re_zhouyu:'界周瑜', + re_luxun:'界陆逊', + re_zhaoyun:'界赵云', + re_guanyu:'界关羽', + re_zhangfei:'界张飞', + re_machao:'界马超', + re_caocao:'界曹操', + re_guojia:'界郭嘉', + re_lvbu:'界吕布', + re_xushu:'界徐庶', + re_huanggai:'界黄盖', + re_gongsunzan:'界公孙瓒', + re_daqiao:'界大乔', + re_ganning:'界甘宁', + re_huatuo:'界华佗', + re_lidian:'李典', + re_liubei:'界刘备', + qinxue:'勤学', + retuxi:'突袭', + reluoyi:'裸衣', + reluoyi2:'裸衣', + reganglie:'刚烈', + qingjian:'清俭', + reyingzi:'英姿', + refanjian:'反间', + refanjian_card:'弃牌', + refanjian_hp:'流失体力', + reqianxun:'谦逊', + reqianxun2:'谦逊', + relianying:'连营', + retishen:'替身', + retishen2:'替身', + reyajiao:'涯角', + rejianxiong:'奸雄', + rejianxiong_mopai:'摸牌', + rejianxiong_napai:'拿牌', + reyiji:'遗计', + reyiji2:'遗计', + yijue:'义绝', + yijue2:'义绝', + retieji:'铁骑', + refankui:'反馈', + reyicong:'义从', + qiaomeng:'趫猛', + rekurou:'苦肉', + zhaxiang:'诈降', + zhaxiang2:'诈降', + zhuhai:'诛害', + qianxin:'潜心', + jianyan:'荐言', + reguicai:'鬼才', + xunxun:'恂恂', + wangxi:'忘隙', + reguose:'国色', + fenwei:'奋威', + chulao:'除疠', + rejizhi:'集智', + liyu:'利驭', + rerende:'仁德', + rerende_info:'出牌阶段,你可以将至少一张手牌交给其他角色,然后你于此阶段内不能再以此法交给该角色牌;若你于此阶段内给出的牌首次达到两张,你可以视为使用一张基本牌', + liyu_info:'当你使用【杀】对一名其他角色造成伤害后,该角色可令你获得其一张牌,若如此做,则视为你对其选择的另一名角色使用一张【决斗】', + rejizhi_info:'当你使用一张装备牌或锦囊牌时,你可以摸一张牌并展示之,若此牌是基本牌,你须弃置一张手牌,每回合限3次', + xunxun_info:'摸牌阶段,你可以改为观看牌堆顶的四张牌,然后获得其中的两张牌,将其余的牌以任意顺序置于牌堆底。', + wangxi_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。', + reguose_info:'出牌阶段限一次,你可以选择一项:将一张方片花色牌当做【乐不思蜀】使用;或弃置一张方片花色牌并弃置场上的一张【乐不思蜀】。选择完成后,你摸一张牌。', + fenwei_info:'限定技,当一名角色使用的锦囊牌指定了至少两名角色为目标时,你可以令此牌对其中任意名角色无效。', + chulao_info:'出牌阶段限一次,若你有牌,你可以选择任意名势力各不相同的其他角色,你弃置你和这些角色的各一张牌。然后以此法弃置黑桃牌的角色各摸一张牌。', + reguicai_info:'在任意角色的判定牌生效前,你可以打出一张牌代替之', + zhuhai_info:'一名其他角色的结束阶段开始时,若该角色本回合造成过伤害,你可以对其使用一张【杀】。', + qianxin_info:'觉醒技,当你造成一次伤害后,若你已受伤,你须减1点体力上限,并获得技能“荐言”。', + jianyan_info:'出牌阶段限一次,你可以声明一种牌的类别或颜色,然后连续亮出牌堆顶的牌,直到亮出符合你声明的牌为止,选择一名男性角色,该角色获得此牌', + rekurou_info:'出牌阶段限一次,你可以弃置一张牌,然后失去1点体力。', + zhaxiang_info:'锁定技 每当你失去1点体力后,你摸三张牌。然后若此时是你的出牌阶段,则直到回合结束,你使用红色【杀】无距离限制且不能被【闪】响应,你可以额外使用一张【杀】。', + qiaomeng_info:'每当你使用黑色【杀】对一名角色造成伤害后,你可以弃置该角色装备区里的一张牌,若此牌是坐骑牌,你于此牌置入弃牌堆时获得之。', + reyicong_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1', + refankui_info:'每当你受到1点伤害后,你可以获得伤害来源的一张牌。', + retieji_info:'当你使用【杀】指定一名角色为目标后,你可以进行一次判定并令该角色的非锁定技失效直到回合结束,除非该角色弃置一张与判定结果花色相同的牌,否则不能使用【闪】抵消此【杀】。', + yijue_info:'出牌阶段限一次,你可以与一名其他角色拼点,若你赢,则直到回合结束,该角色不能使用或打出手牌且其非锁定技失效,若你没赢,你可令该角色回复一点体力。', + reyiji_info:'每当你受到1点伤害后,你可以摸两张牌。然后你可以在至多两名角色的武将牌旁边分别扣置至多两张手牌,这些角色的下个摸牌阶段开始时,该角色获得其武将牌旁的这些牌。', + rejianxiong_info:'每当你受到伤害后,你可以选择一项:摸一张牌,或获得对你造成伤害的牌。', + reyajiao_info:'每当你于回合外使用或打出一张手牌时,你可以亮出牌堆顶的一张牌,若此牌与你此次使用或打出的牌类别相同,你可以将之交给任意一名角色;若不同则你可以将之置入弃牌堆。', + retishen_info:'限定技,准备阶段开始时,你可以将体力回复至等同于你上回合结束时的体力值,然后你每以此法回复1点体力,便摸一张牌。', + reqianxun_info:'每当一张延时类锦囊牌或其他角色使用的普通锦囊牌生效时,若你是此牌的唯一目标,你可以将所有手牌置于你的武将牌上,若如此做,此回合结束时,你获得你武将牌上的所有牌。', + relianying_info:'当你失去最后的手牌时,你可以令至多X名角色各摸一张牌(X为你此次失去的手牌数)。', + reyingzi_info:'锁定技,摸牌阶段摸牌时,你额外摸一张牌;你的手牌上限不会因体力值的减少而减少。', + refanjian_info:'出牌阶段限一次,你可以展示一张手牌并将此牌交给一名其他角色。然后该角色选择一项:展示其手牌并弃置所有与此牌花色相同的牌,或失去一点体力。', + qingjian_info:'每当你于摸牌阶段外获得牌时,你可以将其中任意牌以任意顺序交给其他角色,每回合最多发动四次', + qinxue_info:'觉醒技,准备阶段开始时,若你的手牌数比体力值多3(人数不少于7时改为2)或更多,你须减一点体力上限并获得技能【攻心】', + retuxi_info:'摸牌阶段摸牌时,你可以少摸任意张牌,然后选择等量的手牌数大于或等于你的其他角色,获得这些角色的各一张手牌。', + reluoyi_info:'你可以跳过摸牌阶段,然后展示牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。', + reganglie_info:'每当你受到1点伤害后,可进行一次判定,若结果为红色,你对伤害来源造成1点伤害,若结果为黑色,你弃置其一张牌。' }, - xunxun:{ - audio:2, - trigger:{player:'phaseDrawBefore'}, - check:function(event,player){ - return !player.hasSkill('reyiji2'); - }, - content:function(){ - "step 0" - trigger.untrigger(); - trigger.finish(); - event.cards=get.cards(4); - player.chooseCardButton(event.cards,2,'选择获得两张牌').set('ai',get.buttonValue); - "step 1" - if(result.bool){ - var choice=[]; - for(var i=0;i-3; - return get.attitude(player,event.player)>-3; - }, - logTarget:function(event,player){ - if(event.player==player) return event.source; - return event.player; - }, - content:function(){ - "step 0" - game.asyncDraw([trigger.player,trigger.source],trigger.num); - "step 1" - game.delay(); - } - } - }, - translate:{ - re_zhangliao:'界张辽', - re_huangyueying:'新黄月英', - re_simayi:'界司马懿', - re_xuzhu:'界许褚', - re_xiahoudun:'界夏侯惇', - re_lvmeng:'界吕蒙', - re_zhouyu:'界周瑜', - re_luxun:'界陆逊', - re_zhaoyun:'界赵云', - re_guanyu:'界关羽', - re_zhangfei:'界张飞', - re_machao:'界马超', - re_caocao:'界曹操', - re_guojia:'界郭嘉', - re_lvbu:'界吕布', - re_xushu:'界徐庶', - re_huanggai:'界黄盖', - re_gongsunzan:'界公孙瓒', - re_daqiao:'界大乔', - re_ganning:'界甘宁', - re_huatuo:'界华佗', - re_lidian:'李典', - re_liubei:'界刘备', - qinxue:'勤学', - retuxi:'突袭', - reluoyi:'裸衣', - reluoyi2:'裸衣', - reganglie:'刚烈', - qingjian:'清俭', - reyingzi:'英姿', - refanjian:'反间', - refanjian_card:'弃牌', - refanjian_hp:'流失体力', - reqianxun:'谦逊', - reqianxun2:'谦逊', - relianying:'连营', - retishen:'替身', - retishen2:'替身', - reyajiao:'涯角', - rejianxiong:'奸雄', - rejianxiong_mopai:'摸牌', - rejianxiong_napai:'拿牌', - reyiji:'遗计', - reyiji2:'遗计', - yijue:'义绝', - yijue2:'义绝', - retieji:'铁骑', - refankui:'反馈', - reyicong:'义从', - qiaomeng:'趫猛', - rekurou:'苦肉', - zhaxiang:'诈降', - zhaxiang2:'诈降', - zhuhai:'诛害', - qianxin:'潜心', - jianyan:'荐言', - reguicai:'鬼才', - xunxun:'恂恂', - wangxi:'忘隙', - reguose:'国色', - fenwei:'奋威', - chulao:'除疠', - rejizhi:'集智', - liyu:'利驭', - rerende:'仁德', - rerende_info:'出牌阶段,你可以将至少一张手牌交给其他角色,然后你于此阶段内不能再以此法交给该角色牌;若你于此阶段内给出的牌首次达到两张,你可以视为使用一张基本牌', - liyu_info:'当你使用【杀】对一名其他角色造成伤害后,该角色可令你获得其一张牌,若如此做,则视为你对其选择的另一名角色使用一张【决斗】', - rejizhi_info:'当你使用一张装备牌或锦囊牌时,你可以摸一张牌并展示之,若此牌是基本牌,你须弃置一张手牌,每回合限3次', - xunxun_info:'摸牌阶段,你可以改为观看牌堆顶的四张牌,然后获得其中的两张牌,将其余的牌以任意顺序置于牌堆底。', - wangxi_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。', - reguose_info:'出牌阶段限一次,你可以选择一项:将一张方片花色牌当做【乐不思蜀】使用;或弃置一张方片花色牌并弃置场上的一张【乐不思蜀】。选择完成后,你摸一张牌。', - fenwei_info:'限定技,当一名角色使用的锦囊牌指定了至少两名角色为目标时,你可以令此牌对其中任意名角色无效。', - chulao_info:'出牌阶段限一次,若你有牌,你可以选择任意名势力各不相同的其他角色,你弃置你和这些角色的各一张牌。然后以此法弃置黑桃牌的角色各摸一张牌。', - reguicai_info:'在任意角色的判定牌生效前,你可以打出一张牌代替之', - zhuhai_info:'一名其他角色的结束阶段开始时,若该角色本回合造成过伤害,你可以对其使用一张【杀】。', - qianxin_info:'觉醒技,当你造成一次伤害后,若你已受伤,你须减1点体力上限,并获得技能“荐言”。', - jianyan_info:'出牌阶段限一次,你可以声明一种牌的类别或颜色,然后连续亮出牌堆顶的牌,直到亮出符合你声明的牌为止,选择一名男性角色,该角色获得此牌', - rekurou_info:'出牌阶段限一次,你可以弃置一张牌,然后失去1点体力。', - zhaxiang_info:'锁定技 每当你失去1点体力后,你摸三张牌。然后若此时是你的出牌阶段,则直到回合结束,你使用红色【杀】无距离限制且不能被【闪】响应,你可以额外使用一张【杀】。', - qiaomeng_info:'每当你使用黑色【杀】对一名角色造成伤害后,你可以弃置该角色装备区里的一张牌,若此牌是坐骑牌,你于此牌置入弃牌堆时获得之。', - reyicong_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1', - refankui_info:'每当你受到1点伤害后,你可以获得伤害来源的一张牌。', - retieji_info:'当你使用【杀】指定一名角色为目标后,你可以进行一次判定并令该角色的非锁定技失效直到回合结束,除非该角色弃置一张与判定结果花色相同的牌,否则不能使用【闪】抵消此【杀】。', - yijue_info:'出牌阶段限一次,你可以与一名其他角色拼点,若你赢,则直到回合结束,该角色不能使用或打出手牌且其非锁定技失效,若你没赢,你可令该角色回复一点体力。', - reyiji_info:'每当你受到1点伤害后,你可以摸两张牌。然后你可以在至多两名角色的武将牌旁边分别扣置至多两张手牌,这些角色的下个摸牌阶段开始时,该角色获得其武将牌旁的这些牌。', - rejianxiong_info:'每当你受到伤害后,你可以选择一项:摸一张牌,或获得对你造成伤害的牌。', - reyajiao_info:'每当你于回合外使用或打出一张手牌时,你可以亮出牌堆顶的一张牌,若此牌与你此次使用或打出的牌类别相同,你可以将之交给任意一名角色;若不同则你可以将之置入弃牌堆。', - retishen_info:'限定技,准备阶段开始时,你可以将体力回复至等同于你上回合结束时的体力值,然后你每以此法回复1点体力,便摸一张牌。', - reqianxun_info:'每当一张延时类锦囊牌或其他角色使用的普通锦囊牌生效时,若你是此牌的唯一目标,你可以将所有手牌置于你的武将牌上,若如此做,此回合结束时,你获得你武将牌上的所有牌。', - relianying_info:'当你失去最后的手牌时,你可以令至多X名角色各摸一张牌(X为你此次失去的手牌数)。', - reyingzi_info:'锁定技,摸牌阶段摸牌时,你额外摸一张牌;你的手牌上限不会因体力值的减少而减少。', - refanjian_info:'出牌阶段限一次,你可以展示一张手牌并将此牌交给一名其他角色。然后该角色选择一项:展示其手牌并弃置所有与此牌花色相同的牌,或失去一点体力。', - qingjian_info:'每当你于摸牌阶段外获得牌时,你可以将其中任意牌以任意顺序交给其他角色,每回合最多发动四次', - qinxue_info:'觉醒技,准备阶段开始时,若你的手牌数比体力值多3(人数不少于7时改为2)或更多,你须减一点体力上限并获得技能【攻心】', - retuxi_info:'摸牌阶段摸牌时,你可以少摸任意张牌,然后选择等量的手牌数大于或等于你的其他角色,获得这些角色的各一张手牌。', - reluoyi_info:'你可以跳过摸牌阶段,然后展示牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。', - reganglie_info:'每当你受到1点伤害后,可进行一次判定,若结果为红色,你对伤害来源造成1点伤害,若结果为黑色,你弃置其一张牌。' - }, + }; }); diff --git a/character/shenhua.js b/character/shenhua.js index 2ce1bbe61..0d99a8378 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1,4365 +1,4373 @@ 'use strict'; -game.import('character',{ - name:'shenhua', - connect:true, - character:{ - xiahouyuan:['male','wei',4,['xinshensu']], - caoren:['male','wei',4,['jushou','jiewei']], - huangzhong:['male','shu',4,['xinliegong']], - weiyan:['male','shu',4,['xinkuanggu','qimou']], - xiaoqiao:['female','wu',3,['xintianxiang','hongyan']], - zhoutai:['male','wu',4,['buqu','fenji']], - sp_zhangjiao:['male','qun',3,['releiji','guidao','huangtian'],['zhu']], - // yuji:['male','qun',3,['guhuo']], - // xin_yuji:['male','qun',3,['guhuo']], +game.import('character',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'shenhua', + connect:true, + character:{ + xiahouyuan:['male','wei',4,['xinshensu']], + caoren:['male','wei',4,['jushou','jiewei']], + huangzhong:['male','shu',4,['xinliegong']], + weiyan:['male','shu',4,['xinkuanggu','qimou']], + xiaoqiao:['female','wu',3,['xintianxiang','hongyan']], + zhoutai:['male','wu',4,['buqu','fenji']], + sp_zhangjiao:['male','qun',3,['releiji','guidao','huangtian'],['zhu']], + // yuji:['male','qun',3,['guhuo']], + // xin_yuji:['male','qun',3,['guhuo']], - sp_zhugeliang:['male','shu',3,['huoji','bazhen','kanpo']], - pangtong:['male','shu',3,['xinlianhuan','niepan']], - xunyu:['male','wei',3,['quhu','jieming']], - dianwei:['male','wei',4,['xinqiangxi']], - taishici:['male','wu',4,['tianyi']], - yanwen:['male','qun',4,['shuangxiong']], - re_yuanshao:['male','qun',4,['reluanji','xueyi'],['zhu']], - pangde:['male','qun',4,['mashu','jianchu']], + sp_zhugeliang:['male','shu',3,['huoji','bazhen','kanpo']], + pangtong:['male','shu',3,['xinlianhuan','niepan']], + xunyu:['male','wei',3,['quhu','jieming']], + dianwei:['male','wei',4,['xinqiangxi']], + taishici:['male','wu',4,['tianyi']], + yanwen:['male','qun',4,['shuangxiong']], + re_yuanshao:['male','qun',4,['reluanji','xueyi'],['zhu']], + pangde:['male','qun',4,['mashu','jianchu']], - menghuo:['male','shu',4,['huoshou','zaiqi']], - zhurong:['female','shu',4,['juxiang','lieren']], - caopi:['male','wei',3,['xingshang','fangzhu','songwei'],['zhu']], - xuhuang:['male','wei',4,['duanliang']], - re_lusu:['male','wu',3,['haoshi','redimeng']], - sunjian:['male','wu',4,['yinghun']], - dongzhuo:['male','qun',8,['jiuchi','roulin','benghuai','baonue'],['zhu']], - jiaxu:['male','qun',3,['luanwu','wansha','weimu']], + menghuo:['male','shu',4,['huoshou','zaiqi']], + zhurong:['female','shu',4,['juxiang','lieren']], + caopi:['male','wei',3,['xingshang','fangzhu','songwei'],['zhu']], + xuhuang:['male','wei',4,['duanliang']], + re_lusu:['male','wu',3,['haoshi','redimeng']], + sunjian:['male','wu',4,['yinghun']], + dongzhuo:['male','qun',8,['jiuchi','roulin','benghuai','baonue'],['zhu']], + jiaxu:['male','qun',3,['luanwu','wansha','weimu']], - jiangwei:['male','shu',4,['tiaoxin','zhiji']], - liushan:['male','shu',3,['xiangle','fangquan','ruoyu'],['zhu']], - zhanghe:['male','wei',4,['qiaobian']], - dengai:['male','wei',4,['tuntian','zaoxian']], - sunce:['male','wu',4,['jiang','hunzi','zhiba'],['zhu']], - zhangzhang:['male','wu',3,['zhijian','guzheng']], - caiwenji:['female','qun',3,['beige','duanchang']], - zuoci:['male','qun',3,['huashen','xinsheng']], - }, - perfectPair:{ - yuanshao:['yanwen'], - menghuo:['zhurong'], - sp_zhugeliang:['pangtong'], - sunce:['zhouyu','taishici','daqiao'] - }, - characterIntro:{ - huangzhong:'字汉升,今河南南阳人。汉末三国时期蜀汉名将。本为刘表部下中郎将,后归刘备,并助刘备攻益州刘璋,在定军山一战中阵斩曹操部下名将夏侯渊。备称汉中王后改封后将军,赐关内侯。', - weiyan:'字文长,义阳人。三国时期蜀汉名将,诸葛亮死后,魏延因被陷害谋反而遭杨仪一党所杀。', - xiahouyuan:'字妙才,沛国谯人。东汉末年曹操部下名将,夏侯惇之族弟,八虎骑之一。群雄征讨董卓时随曹操一同起兵,后征战四方,屡立功勋。在平定马超叛乱后负责西北防线的镇守。公元219年刘备攻打汉中,被刘备部将黄忠所杀。', - caoren:'字子孝,沛国谯人,曹操的从弟。三国时期曹魏名将,官至大司马。谥曰忠侯。', - xiaoqiao:'庐江皖县人也。父桥国老德尊于时。小乔国色流离,资貌绝伦。建安三年,周瑜协策攻皖,拔之。娶小乔为妻。后人谓英雄美女,天作之合。', - zhoutai:'字幼平,九江下蔡人,三国时期吴国武将。早年与蒋钦随孙策左右,立过数次战功。孙策讨伐六县山贼时,周泰胆气绝伦,保卫孙权,勇战退敌,身受十二处伤。有诗云:三番救主出重围,忠勇如公世所稀。遍体疮痍犹痛饮,血痕残酒满征衣。', - yuji:'自号太平道人,琅琊人,在吴郡、会稽一带为百姓治病,甚得人心。孙策怒之,以惑人心为由斩之,后策常受吉咒而亡。', - zhangjiao:'乱世的开始,黄巾起义军首领,太平道创始人。张角早年信奉黄老学说,对在汉代十分流行的谶纬之学也深有研究,对民间医术 、巫术也很熟悉。', - dianwei:'己吾城村人。东汉末年曹魏猛将。擅使大双戟,为人壮猛任侠,曾为乡人刘氏报仇,杀人出市,人莫敢近。相貌魁梧,膂力过人。建安二年(197),张绣背叛曹操,典韦为保护曹操而独挡叛军,击杀多人,但最终因寡不敌众而战死。', - xunyu:'荀彧,字文若,颍川颍阴(今河南许昌)人。东汉末年曹操帐下首席谋臣,杰出的战略家。自小被世人称作“王佐之才”。', - pangtong:'庞统,字士元,襄阳(治今湖北襄阳)人。三国时刘备帐下谋士,官拜军师中郎将。才智与诸葛亮齐名,人称“凤雏”。在进围雒县时,统率众攻城,不幸被流矢击中去世,时年三十六岁。追赐统为关内侯,谥曰靖侯。庞统死后,葬于落凤庞统墓坡。', - sp_zhugeliang:'字孔明,号卧龙居士,琅琊阳都人。刘备曾“三顾茅庐”得见卧龙。卧龙以一篇《隆中对》分析天下形势,提出先取荆州,再取益州成鼎足之势的说法。《三国演义》中的诸葛亮善用“火攻”,曾用火攻战术赢得多场战役,如“火烧赤壁”、“火烧博望坡”、“火烧藤甲兵”等。', - taishici:'太史慈,字子义,东莱黄县(今山东龙口东黄城集)人。东汉末年武将,守言应诺,恪遵信义,始终如一,弭息诽论。官至建昌都尉。弓马熟练,箭法精良。原为刘繇部下,后被孙策收降,于赤壁之战前病逝,死时才四十一岁。', - pangde:'字令明,东汉末年雍州南安郡狟道县(今甘肃天水市武山县四门镇)人。曹操部下重要将领。官至立义将军,拜关门亭侯。谥曰壮侯。有一子庞会。', - yanwen:'东汉末年河北袁绍部下武将,素有威名。颜良与文丑一起作为袁绍军队的勇将而闻名。建安四年(199),袁绍以颜良、文丑为将,率精卒十万,准备攻许都;次年,兵进黎阳,遣颜良攻白马。终均亡于关羽刀下。', - yuanshao:'字本初,汉族,汝南汝阳人,出身名门望族,自曾祖父起四代有五人位居三公,自己也居三公之上,其家族也因此有“四世三公”之称。曾于初平元年被推举为反董卓联合军的盟主,联军瓦解后,在汉末群雄割据的过程中,袁绍先占据冀州,又先后夺青、并二州,并于建安四年击败了割据幽州的军阀公孙瓒,势力达到顶点;但在建安五年的官渡之战中败于曹操。在平定冀州叛乱之后,于建安七年病死。', - xuhuang:'字公明,河东杨人。三国时期曹魏名将,本为杨奉帐下骑都尉,杨奉被曹操击败后转投曹操,在曹操手下多立功勋,参与官渡、赤壁、关中征伐、汉中征伐等几次重大战役。', - caopi:'字子桓,三国时期著名的政治家、文学家,曹魏的开国皇帝,公元220-226年在位。沛国谯人,魏武帝曹操与武宣卞皇后的长子。去世后庙号高祖,谥为文皇帝,葬于首阳陵。', - sunjian:'字文台,汉族,吴郡富春人。东汉末期地方军阀,著名将领。史书说他“容貌不凡,性阔达,好奇节”,是大军事家孙武的后裔。汉末群雄之一,三国中吴国的奠基人。孙权建国后,追谥孙坚为武烈皇帝。', - dongzhuo:'字仲颖,陇西临洮人。东汉末年少帝、献帝时权臣,西凉军阀。官至太师、郿侯。其为人残忍嗜杀,倒行逆施,招致群雄联合讨伐,但联合军在董卓迁都长安不久后瓦解。后被其亲信吕布所杀。', - zhurong:'据传为火神祝融氏后裔,南蛮王孟获之妻。武艺超群,善使飞刀,是《三国演义》中写到的唯一真正上过战场的女性。曾与孟获一起抵抗蜀军,在诸葛亮七擒七纵孟获之后,随孟获投降蜀汉。', - menghuo:'中国三国时期南中少数族首领。系东汉末益州建宁郡( 今云南晋宁东 )大姓,身材肥硕。生卒年不详。官至御史中丞。曾被诸葛亮七擒七纵,传为佳话。', - jiaxu:'字文和,武威姑臧人。三国时期魏国著名谋士。曾先后担任三国军阀李傕、张绣、曹操的谋士。官至魏国太尉,谥曰肃侯。', - lusu:'字子敬,汉族,临淮东城人,中国东汉末年东吴的著名军事统帅。他曾为孙权提出鼎足江东的战略规划,因此得到孙权的赏识,于周瑜死后代替周瑜领兵,守陆口。曾单刀赴会关羽于荆州。', - zhanghe:'字儁乂,河间鄚人。三国时期魏国名将。官渡之战时,本为袁绍部将的张郃投降了曹操,并在曹操帐下多立功勋,于曹魏建立后加封为征西车骑将军。诸葛亮六出祁山之间,张郃多次抵御蜀军的进攻,于公元231年在木门道被诸葛亮设伏射死。后谥曰壮侯。为曹魏“五子良将”之一。', - dengai:'字士载,义阳棘阳人。三国时期魏国杰出的军事家、将领。公元263年他与钟会分别率军攻打蜀汉,最后他率先进入成都,使得蜀汉灭亡。后因遭到钟会的污蔑和陷害,被司马昭猜忌而被收押,最后与其子邓忠一起被卫瓘派遣的武将田续所杀害。', - jiangwei:'字伯约,天水冀人。三国时期蜀汉著名将领、军事统帅。原为曹魏天水郡的中郎将,后降蜀汉,官至凉州刺史、大将军。诸葛亮去世后继承诸葛亮的遗志,继续率领蜀汉军队北伐曹魏,与曹魏名将陈泰、郭淮、邓艾等多次交手。', - liushan:'蜀汉后主,字公嗣。小名阿斗。刘备之子,母亲是昭烈皇后甘氏。三国时期蜀汉第二位皇帝,公元223-263年在位。公元263年蜀汉被曹魏所灭,刘禅投降曹魏,被封为安乐公。', - sunce:'字伯符,吴郡富春人。孙坚长子,孙权长兄。东汉末年割据江东一带的军阀,汉末群雄之一,三国时期吴国的奠基者。三国演义中绰号“小霸王”,统一江东。在一次狩猎中为刺客所伤,不久后身亡,年仅二十六岁。其弟孙权接掌孙策势力,并于称帝后,追谥孙策为长沙桓王。', - zhangzhang:'张昭,字子布,彭城人,三国时期吴国重臣,善丹青。拜辅吴将军,班亚三司,改封娄侯。年八十一卒,谥曰文侯。张纮,字子纲,广陵人。东吴谋士,和张昭一起合称“二张”。孙策平定江东时亲自登门邀请,张纮遂出仕为官。张纮后来建议孙权迁都秣陵,孙权正在准备时张纮病逝,其年六十岁。孙权为之流涕。', - zuoci:'左慈,字元放,东汉末方士,汉族,庐江(今安徽庐江西南)人。在道教历史上,东汉时期的丹鼎派道术是从他一脉相传。', - caiwenji:'名琰,原字昭姬,晋时避司马昭讳,改字文姬,东汉末年陈留圉(今河南开封杞县)人,东汉大文学家蔡邕的女儿,是中国历史上著名的才女和文学家,精于天文数理,既博学能文,又善诗赋,兼长辩才与音律。代表作有《胡笳十八拍》、《悲愤诗》等 。', - }, - skill:{ - jianchu:{ - trigger:{player:'shaBegin'}, - filter:function(event){ - return event.target.countCards('he')>0; - }, - direct:true, - content:function(){ - 'step 0' - player.discardPlayerCard(trigger.target,get.prompt('jianchu',trigger.target)).set('ai',function(button){ - if(!_status.event.att) return 0; - if(get.position(button.link)=='e') return get.value(button.link); - return 1; - }).set('logSkill',['jianchu',trigger.target]).set('att',get.attitude(player,trigger.target)<=0); - 'step 1' - if(result.bool&&result.links&&result.links.length){ - if(get.type(result.links[0])=='equip'){ - trigger.directHit=true; - } - else if(trigger.cards){ - trigger.target.gain(trigger.cards,'gain2','log'); - } - } - } - }, - redimeng:{ - audio:'dimeng', - enable:'phaseUse', - usable:1, - position:'he', - filterCard:function(){ - if(ui.selected.targets.length==2) return false; - return true; - }, - selectCard:[0,Infinity], - selectTarget:2, - complexCard:true, - filterTarget:function(card,player,target){ - if(player==target) return false; - if(ui.selected.targets.length==0) return true; - return (Math.abs(ui.selected.targets[0].countCards('h')-target.countCards('h'))== - ui.selected.cards.length); - }, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - var cards=targets[0].getCards('h').concat(targets[1].getCards('h')); - var dialog=ui.create.dialog('缔盟',true); - if(player.isUnderControl(true)||targets[0].isUnderControl(true)||targets[1].isUnderControl(true)){ - dialog.add(cards); - dialog.seeing=true; - } - else{ - dialog.add([cards,'blank']); - } - _status.dieClose.push(dialog); - dialog.videoId=lib.status.videoId++; - game.addVideo('cardDialog',null,['缔盟',get.cardsInfo(cards),dialog.videoId]); - game.broadcast(function(cards,id,player,targets){ - var dialog=ui.create.dialog('缔盟',true); - if(player.isUnderControl(true)||targets[0].isUnderControl(true)||targets[1].isUnderControl(true)){ - dialog.add(cards); - dialog.seeing=true; - } - else{ - dialog.add([cards,'blank']); - } - _status.dieClose.push(dialog); - dialog.videoId=id; - },cards,dialog.videoId,player,targets); + jiangwei:['male','shu',4,['tiaoxin','zhiji']], + liushan:['male','shu',3,['xiangle','fangquan','ruoyu'],['zhu']], + zhanghe:['male','wei',4,['qiaobian']], + dengai:['male','wei',4,['tuntian','zaoxian']], + sunce:['male','wu',4,['jiang','hunzi','zhiba'],['zhu']], + zhangzhang:['male','wu',3,['zhijian','guzheng']], + caiwenji:['female','qun',3,['beige','duanchang']], + zuoci:['male','qun',3,['huashen','xinsheng']], + }, + perfectPair:{ + yuanshao:['yanwen'], + menghuo:['zhurong'], + sp_zhugeliang:['pangtong'], + sunce:['zhouyu','taishici','daqiao'] + }, + characterIntro:{ + huangzhong:'字汉升,今河南南阳人。汉末三国时期蜀汉名将。本为刘表部下中郎将,后归刘备,并助刘备攻益州刘璋,在定军山一战中阵斩曹操部下名将夏侯渊。备称汉中王后改封后将军,赐关内侯。', + weiyan:'字文长,义阳人。三国时期蜀汉名将,诸葛亮死后,魏延因被陷害谋反而遭杨仪一党所杀。', + xiahouyuan:'字妙才,沛国谯人。东汉末年曹操部下名将,夏侯惇之族弟,八虎骑之一。群雄征讨董卓时随曹操一同起兵,后征战四方,屡立功勋。在平定马超叛乱后负责西北防线的镇守。公元219年刘备攻打汉中,被刘备部将黄忠所杀。', + caoren:'字子孝,沛国谯人,曹操的从弟。三国时期曹魏名将,官至大司马。谥曰忠侯。', + xiaoqiao:'庐江皖县人也。父桥国老德尊于时。小乔国色流离,资貌绝伦。建安三年,周瑜协策攻皖,拔之。娶小乔为妻。后人谓英雄美女,天作之合。', + zhoutai:'字幼平,九江下蔡人,三国时期吴国武将。早年与蒋钦随孙策左右,立过数次战功。孙策讨伐六县山贼时,周泰胆气绝伦,保卫孙权,勇战退敌,身受十二处伤。有诗云:三番救主出重围,忠勇如公世所稀。遍体疮痍犹痛饮,血痕残酒满征衣。', + yuji:'自号太平道人,琅琊人,在吴郡、会稽一带为百姓治病,甚得人心。孙策怒之,以惑人心为由斩之,后策常受吉咒而亡。', + zhangjiao:'乱世的开始,黄巾起义军首领,太平道创始人。张角早年信奉黄老学说,对在汉代十分流行的谶纬之学也深有研究,对民间医术 、巫术也很熟悉。', + dianwei:'己吾城村人。东汉末年曹魏猛将。擅使大双戟,为人壮猛任侠,曾为乡人刘氏报仇,杀人出市,人莫敢近。相貌魁梧,膂力过人。建安二年(197),张绣背叛曹操,典韦为保护曹操而独挡叛军,击杀多人,但最终因寡不敌众而战死。', + xunyu:'荀彧,字文若,颍川颍阴(今河南许昌)人。东汉末年曹操帐下首席谋臣,杰出的战略家。自小被世人称作“王佐之才”。', + pangtong:'庞统,字士元,襄阳(治今湖北襄阳)人。三国时刘备帐下谋士,官拜军师中郎将。才智与诸葛亮齐名,人称“凤雏”。在进围雒县时,统率众攻城,不幸被流矢击中去世,时年三十六岁。追赐统为关内侯,谥曰靖侯。庞统死后,葬于落凤庞统墓坡。', + sp_zhugeliang:'字孔明,号卧龙居士,琅琊阳都人。刘备曾“三顾茅庐”得见卧龙。卧龙以一篇《隆中对》分析天下形势,提出先取荆州,再取益州成鼎足之势的说法。《三国演义》中的诸葛亮善用“火攻”,曾用火攻战术赢得多场战役,如“火烧赤壁”、“火烧博望坡”、“火烧藤甲兵”等。', + taishici:'太史慈,字子义,东莱黄县(今山东龙口东黄城集)人。东汉末年武将,守言应诺,恪遵信义,始终如一,弭息诽论。官至建昌都尉。弓马熟练,箭法精良。原为刘繇部下,后被孙策收降,于赤壁之战前病逝,死时才四十一岁。', + pangde:'字令明,东汉末年雍州南安郡狟道县(今甘肃天水市武山县四门镇)人。曹操部下重要将领。官至立义将军,拜关门亭侯。谥曰壮侯。有一子庞会。', + yanwen:'东汉末年河北袁绍部下武将,素有威名。颜良与文丑一起作为袁绍军队的勇将而闻名。建安四年(199),袁绍以颜良、文丑为将,率精卒十万,准备攻许都;次年,兵进黎阳,遣颜良攻白马。终均亡于关羽刀下。', + yuanshao:'字本初,汉族,汝南汝阳人,出身名门望族,自曾祖父起四代有五人位居三公,自己也居三公之上,其家族也因此有“四世三公”之称。曾于初平元年被推举为反董卓联合军的盟主,联军瓦解后,在汉末群雄割据的过程中,袁绍先占据冀州,又先后夺青、并二州,并于建安四年击败了割据幽州的军阀公孙瓒,势力达到顶点;但在建安五年的官渡之战中败于曹操。在平定冀州叛乱之后,于建安七年病死。', + xuhuang:'字公明,河东杨人。三国时期曹魏名将,本为杨奉帐下骑都尉,杨奉被曹操击败后转投曹操,在曹操手下多立功勋,参与官渡、赤壁、关中征伐、汉中征伐等几次重大战役。', + caopi:'字子桓,三国时期著名的政治家、文学家,曹魏的开国皇帝,公元220-226年在位。沛国谯人,魏武帝曹操与武宣卞皇后的长子。去世后庙号高祖,谥为文皇帝,葬于首阳陵。', + sunjian:'字文台,汉族,吴郡富春人。东汉末期地方军阀,著名将领。史书说他“容貌不凡,性阔达,好奇节”,是大军事家孙武的后裔。汉末群雄之一,三国中吴国的奠基人。孙权建国后,追谥孙坚为武烈皇帝。', + dongzhuo:'字仲颖,陇西临洮人。东汉末年少帝、献帝时权臣,西凉军阀。官至太师、郿侯。其为人残忍嗜杀,倒行逆施,招致群雄联合讨伐,但联合军在董卓迁都长安不久后瓦解。后被其亲信吕布所杀。', + zhurong:'据传为火神祝融氏后裔,南蛮王孟获之妻。武艺超群,善使飞刀,是《三国演义》中写到的唯一真正上过战场的女性。曾与孟获一起抵抗蜀军,在诸葛亮七擒七纵孟获之后,随孟获投降蜀汉。', + menghuo:'中国三国时期南中少数族首领。系东汉末益州建宁郡( 今云南晋宁东 )大姓,身材肥硕。生卒年不详。官至御史中丞。曾被诸葛亮七擒七纵,传为佳话。', + jiaxu:'字文和,武威姑臧人。三国时期魏国著名谋士。曾先后担任三国军阀李傕、张绣、曹操的谋士。官至魏国太尉,谥曰肃侯。', + lusu:'字子敬,汉族,临淮东城人,中国东汉末年东吴的著名军事统帅。他曾为孙权提出鼎足江东的战略规划,因此得到孙权的赏识,于周瑜死后代替周瑜领兵,守陆口。曾单刀赴会关羽于荆州。', + zhanghe:'字儁乂,河间鄚人。三国时期魏国名将。官渡之战时,本为袁绍部将的张郃投降了曹操,并在曹操帐下多立功勋,于曹魏建立后加封为征西车骑将军。诸葛亮六出祁山之间,张郃多次抵御蜀军的进攻,于公元231年在木门道被诸葛亮设伏射死。后谥曰壮侯。为曹魏“五子良将”之一。', + dengai:'字士载,义阳棘阳人。三国时期魏国杰出的军事家、将领。公元263年他与钟会分别率军攻打蜀汉,最后他率先进入成都,使得蜀汉灭亡。后因遭到钟会的污蔑和陷害,被司马昭猜忌而被收押,最后与其子邓忠一起被卫瓘派遣的武将田续所杀害。', + jiangwei:'字伯约,天水冀人。三国时期蜀汉著名将领、军事统帅。原为曹魏天水郡的中郎将,后降蜀汉,官至凉州刺史、大将军。诸葛亮去世后继承诸葛亮的遗志,继续率领蜀汉军队北伐曹魏,与曹魏名将陈泰、郭淮、邓艾等多次交手。', + liushan:'蜀汉后主,字公嗣。小名阿斗。刘备之子,母亲是昭烈皇后甘氏。三国时期蜀汉第二位皇帝,公元223-263年在位。公元263年蜀汉被曹魏所灭,刘禅投降曹魏,被封为安乐公。', + sunce:'字伯符,吴郡富春人。孙坚长子,孙权长兄。东汉末年割据江东一带的军阀,汉末群雄之一,三国时期吴国的奠基者。三国演义中绰号“小霸王”,统一江东。在一次狩猎中为刺客所伤,不久后身亡,年仅二十六岁。其弟孙权接掌孙策势力,并于称帝后,追谥孙策为长沙桓王。', + zhangzhang:'张昭,字子布,彭城人,三国时期吴国重臣,善丹青。拜辅吴将军,班亚三司,改封娄侯。年八十一卒,谥曰文侯。张纮,字子纲,广陵人。东吴谋士,和张昭一起合称“二张”。孙策平定江东时亲自登门邀请,张纮遂出仕为官。张纮后来建议孙权迁都秣陵,孙权正在准备时张纮病逝,其年六十岁。孙权为之流涕。', + zuoci:'左慈,字元放,东汉末方士,汉族,庐江(今安徽庐江西南)人。在道教历史上,东汉时期的丹鼎派道术是从他一脉相传。', + caiwenji:'名琰,原字昭姬,晋时避司马昭讳,改字文姬,东汉末年陈留圉(今河南开封杞县)人,东汉大文学家蔡邕的女儿,是中国历史上著名的才女和文学家,精于天文数理,既博学能文,又善诗赋,兼长辩才与音律。代表作有《胡笳十八拍》、《悲愤诗》等 。', + }, + skill:{ + jianchu:{ + trigger:{player:'shaBegin'}, + filter:function(event){ + return event.target.countCards('he')>0; + }, + direct:true, + content:function(){ + 'step 0' + player.discardPlayerCard(trigger.target,get.prompt('jianchu',trigger.target)).set('ai',function(button){ + if(!_status.event.att) return 0; + if(get.position(button.link)=='e') return get.value(button.link); + return 1; + }).set('logSkill',['jianchu',trigger.target]).set('att',get.attitude(player,trigger.target)<=0); + 'step 1' + if(result.bool&&result.links&&result.links.length){ + if(get.type(result.links[0])=='equip'){ + trigger.directHit=true; + } + else if(trigger.cards){ + trigger.target.gain(trigger.cards,'gain2','log'); + } + } + } + }, + redimeng:{ + audio:'dimeng', + enable:'phaseUse', + usable:1, + position:'he', + filterCard:function(){ + if(ui.selected.targets.length==2) return false; + return true; + }, + selectCard:[0,Infinity], + selectTarget:2, + complexCard:true, + filterTarget:function(card,player,target){ + if(player==target) return false; + if(ui.selected.targets.length==0) return true; + return (Math.abs(ui.selected.targets[0].countCards('h')-target.countCards('h'))== + ui.selected.cards.length); + }, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + var cards=targets[0].getCards('h').concat(targets[1].getCards('h')); + var dialog=ui.create.dialog('缔盟',true); + if(player.isUnderControl(true)||targets[0].isUnderControl(true)||targets[1].isUnderControl(true)){ + dialog.add(cards); + dialog.seeing=true; + } + else{ + dialog.add([cards,'blank']); + } + _status.dieClose.push(dialog); + dialog.videoId=lib.status.videoId++; + game.addVideo('cardDialog',null,['缔盟',get.cardsInfo(cards),dialog.videoId]); + game.broadcast(function(cards,id,player,targets){ + var dialog=ui.create.dialog('缔盟',true); + if(player.isUnderControl(true)||targets[0].isUnderControl(true)||targets[1].isUnderControl(true)){ + dialog.add(cards); + dialog.seeing=true; + } + else{ + dialog.add([cards,'blank']); + } + _status.dieClose.push(dialog); + dialog.videoId=id; + },cards,dialog.videoId,player,targets); - event.current=targets[0]; - event.dialog=dialog; - event.num1=0; - event.num2=0; - game.delay(); - 'step 1' - if(event.dialog.buttons.length>1){ - var next=event.current.chooseButton(true,function(button){ - return get.value(button.link,_status.event.player); - }); - next.set('dialog',event.dialog.videoId); - next.set('closeDialog',false); - next.set('dialogdisplay',true); - } - else{ - event.directButton=event.dialog.buttons[0]; - } - 'step 2' - var dialog=event.dialog; - var card; - if(event.directButton){ - card=event.directButton.link; - } - else{ - card=result.links[0]; - } - for(var i=0;i3; - }); - var player=_status.event.player; - var num=player.countCards('he',function(card){ - return get.value(card)<7; - }); - var count=null; - var from,nh; - if(list.length==0) return null; - list.sort(function(a,b){ - return a.countCards('h')-b.countCards('h'); - }); - if(type==1) return list[0]; - from=list[0]; - nh=from.countCards('h'); + event.current=targets[0]; + event.dialog=dialog; + event.num1=0; + event.num2=0; + game.delay(); + 'step 1' + if(event.dialog.buttons.length>1){ + var next=event.current.chooseButton(true,function(button){ + return get.value(button.link,_status.event.player); + }); + next.set('dialog',event.dialog.videoId); + next.set('closeDialog',false); + next.set('dialogdisplay',true); + } + else{ + event.directButton=event.dialog.buttons[0]; + } + 'step 2' + var dialog=event.dialog; + var card; + if(event.directButton){ + card=event.directButton.link; + } + else{ + card=result.links[0]; + } + for(var i=0;i3; + }); + var player=_status.event.player; + var num=player.countCards('he',function(card){ + return get.value(card)<7; + }); + var count=null; + var from,nh; + if(list.length==0) return null; + list.sort(function(a,b){ + return a.countCards('h')-b.countCards('h'); + }); + if(type==1) return list[0]; + from=list[0]; + nh=from.countCards('h'); - list=game.filterPlayer(function(current){ - return current!=player&&get.attitude(player,current)<1; - }); - if(list.length==0) return null; - list.sort(function(a,b){ - return b.countCards('h')-a.countCards('h'); - }); - for(var i=0;i0; - }, - filterCard:{suit:'club'}, - viewAs:{name:'tiesuo'}, - prompt:'将一张梅花牌当铁锁连环使用', - check:function(card){return 6-get.value(card)}, - ai:{ - order:7.5, - result:{ - target:function(player,target){ - if(ui.selected.targets.length) return 0; - if(target.isLinked()) return 1; - return -1; - } - } - } - }, - lianhuan4:{ - trigger:{player:'useCard'}, - filter:function(event){ - return event.skill=='lianhuan3'&&event.targets.length==1; - }, - forced:true, - popup:false, - content:function(){ - player.draw(); - } - }, - reluanji:{ - audio:'luanji', - enable:'phaseUse', - viewAs:{name:'wanjian'}, - filterCard:function(card,player){ - if(!player.storage.reluanji) return true; - return !player.storage.reluanji.contains(get.suit(card)); - }, - selectCard:2, - check:function(card){ - return 6-get.value(card); - }, - ai:{ - basic:{ - order:10 - } - }, - group:['reluanji_count','reluanji_reset','reluanji_respond'], - subSkill:{ - reset:{ - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return player.storage.reluanji?true:false; - }, - content:function(){ - delete player.storage.reluanji; - } - }, - count:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - silent:true, - filter:function(event){ - return event.skill=='reluanji'; - }, - content:function(){ - if(!player.storage.reluanji){ - player.storage.reluanji=[]; - } - for(var i=0;i=4&&shas.length>=3){ - num=3; - } - else if(player.hp>=3&&shas.length>=2){ - num=2; - } - else{ - num=1 - } - player.awakenSkill('qimou'); - player.storage.qimou=true; - player.chooseControl('一','二','三','四','五','六',function(){ - return get.cnNumber(_status.event.goon,true); - }).set('prompt','失去任意点体力').set('goon',num); - 'step 1' - var num; - switch(result.control){ - case '一':num=1;break; - case '二':num=2;break; - case '三':num=3;break; - case '四':num=4;break; - case '五':num=5;break; - case '六':num=6;break; - } - player.storage.qimou2=num; - player.loseHp(num); - player.addTempSkill('qimou2','phaseAfter'); - }, - ai:{ - order:2, - result:{ - player:function(player){ - if(player.hp==1) return 0; - var shas=player.getCards('h','sha'); - if(!shas.length) return 0; - var card=shas[0]; - if(!lib.filter.cardEnabled(card,player)) return 0; - if(lib.filter.cardUsable(card,player)) return 0; - var mindist; - if(player.hp>=4&&shas.length>=3){ - mindist=4; - } - else if(player.hp>=3&&shas.length>=2){ - mindist=3; - } - else{ - mindist=2; - } - if(game.hasPlayer(function(current){ - return (current.hp<=mindist-1&& - get.distance(player,current,'attack')<=mindist&& - player.canUse(card,current,false)&& - get.effect(current,card,player,player)>0); - })){ - return 1; - } - return 0; - } - } - } - }, - qimou2:{ - onremove:true, - mod:{ - cardUsable:function(card,player,num){ - if(typeof player.storage.qimou2=='number'&&card.name=='sha'){ - return num+player.storage.qimou2; - } - }, - globalFrom:function(from,to,distance){ - if(typeof from.storage.qimou2=='number'){ - return distance-from.storage.qimou2; - } - } - } - }, - xinkuanggu:{ - trigger:{source:'damageEnd'}, - filter:function(event,player){ - return get.distance(player,event.player)<=1&&event.num>0; - }, - direct:true, - audio:'kuanggu', - content:function(){ - 'step 0' - event.num=trigger.num; - 'step 1' - player.chooseDrawRecover(get.prompt('xinkuanggu')).set('logSkill','xinkuanggu'); - 'step 2' - if(result.control!='cancel2'){ - event.num--; - if(event.num>0){ - event.goto(1); - } - } - } - }, - xinliegong:{ - mod:{ - targetInRange:function(card,player,target){ - if(card.name=='sha'&&card.number){ - if(get.distance(player,target)<=card.number) return true; - } - } - }, - audio:'liegong', - trigger:{player:'shaBegin'}, - logTarget:'target', - check:function(event,player){ - return get.attitude(player,event.target)<=0; - }, - filter:function(event,player){ - if(event.target.countCards('h')<=player.countCards('h')) return true; - if(event.target.hp<=player.hp) return true; - return false; - }, - content:function(){ - if(trigger.target.countCards('h')<=player.countCards('h')) trigger.directHit=true; - if(trigger.target.hp>=player.hp) player.addTempSkill('xinliegong2','shaAfter'); - }, - ai:{ - threaten:0.5 - } - }, - xinliegong2:{ - trigger:{source:'damageBegin'}, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.notLink(); - }, - forced:true, - audio:false, - content:function(){ - trigger.num++; - } - }, - tiaoxin:{ - audio:4, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target.canUse({name:'sha'},player)&&target.countCards('he'); - }, - content:function(){ - "step 0" - target.chooseToUse({name:'sha'},player,-1,'挑衅:对'+get.translation(player)+'使用一张杀,或令其弃置你的一张牌').set('targetRequired',true); - "step 1" - if(result.bool==false&&target.countCards('he')>0){ - player.discardPlayerCard(target,'he',true); - } - else{ - event.finish(); - } - }, - ai:{ - order:4, - expose:0.2, - result:{ - target:-1, - player:function(player,target){ - if(target.countCards('h')==0) return 0; - if(target.countCards('h')==1) return -0.1; - if(player.hp<=2) return -2; - if(player.countCards('h','shan')==0) return -1; - return -0.5; - } - }, - threaten:1.1 - } - }, - zhiji:{ - skillAnimation:true, - audio:2, - unique:true, - priority:-10, - derivation:'guanxing', - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - if(player.storage.zhiji) return false; - return player.countCards('h')==0; - }, - content:function(){ - "step 0" - player.awakenSkill('zhiji'); - player.chooseControl('zhiji_recover','zhiji_draw',function(event,player){ - if(player.hp>=2) return 'zhiji_draw'; - return 'zhiji_recover'; - }); - "step 1" - if(result.control=='zhiji_draw'){ - player.draw(2); - } - else{ - player.recover(); - } - "step 2" - player.loseMaxHp(); - player.storage.zhiji=true; - if(player.hp>player.maxHp) player.hp=player.maxHp; - player.update(); - player.addSkill('guanxing'); - game.createTrigger('phaseBegin','guanxing',player,trigger); - } - }, - xiangle:{ - audio:2, - trigger:{target:'useCardToBefore'}, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'; - }, - content:function(){ - "step 0" - var eff=get.effect(player,trigger.card,trigger.player,trigger.player); - trigger.player.chooseToDiscard('享乐:弃置一张基本牌,否则杀对'+get.translation(player)+'无效',function(card){ - return get.type(card)=='basic'; - }).set('ai',function(card){ - if(_status.event.eff>0){ - return 10-get.value(card); - } - return 0; - }).set('eff',eff); - "step 1" - if(result.bool==false){ - trigger.finish(); - trigger.untrigger(); - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'){ - if(_status.event.name=='xiangle') return; - var bs=player.getCards('h',{type:'basic'}); - if(bs.length<2) return 0; - if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; - if(bs.length<=3&&player.countCards('h','sha')<=1){ - for(var i=0;i0&&!player.hasSkill('fangquan3'); - }, - direct:true, - content:function(){ - "step 0" - var fang=player.hp>=2&&player.countCards('h')<=player.hp+1; - player.chooseTarget(get.prompt('fangquan'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - if(!_status.event.fang) return -1; - if(target.hasJudge('lebu')) return -1; - return get.attitude(player,target)-4; - }).set('fang',fang); - "step 1" - if(result.bool){ - player.logSkill('fangquan',result.targets); - trigger.untrigger(); - trigger.finish(); - player.addSkill('fangquan2'); - player.storage.fangquan=result.targets[0]; - } - } - }, - fangquan2:{ - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - audio:false, - priority:-50, - content:function(){ - "step 0" - player.chooseToDiscard(true); - "step 1" - var target=player.storage.fangquan; - target.markSkillCharacter('fangquan',player,'放权','进行一个额外回合'); - target.insertPhase(); - target.addSkill('fangquan3'); - player.removeSkill('fangquan2'); - delete player.storage.fangquan; - } - }, - fangquan3:{ - trigger:{player:['phaseAfter','phaseCancelled']}, - forced:true, - popup:false, - audio:false, - content:function(){ - player.unmarkSkill('fangquan'); - player.removeSkill('fangquan3'); - } - }, - ruoyu:{ - skillAnimation:true, - audio:2, - unique:true, - zhuSkill:true, - keepSkill:true, - derivation:'jijiang', - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - if(!player.hasZhuSkill('ruoyu'))return false; - if(player.storage.ruoyu) return false; - return player.isLowestHp(); - }, - content:function(){ - player.storage.ruoyu=true; - player.maxHp++; - player.update(); - player.recover(); - if(player.hasSkill('ruoyu')){ - player.addSkill('jijiang'); - } - else{ - player.addAdditionalSkill('ruoyu','jijiang'); - } - if(!player.isZhu){ - player.storage.zhuSkill_ruoyu=['jijiang']; - } - else{ - event.trigger('zhuUpdate'); - } - player.awakenSkill('ruoyu'); - } - }, - qiaobian:{ - audio:2, - group:['qiaobian1','qiaobian2','qiaobian3','qiaobian4'], - ai:{ - threaten:3 - } - }, - qiaobian1:{ - audio:2, - trigger:{player:'phaseJudgeBefore'}, - filter:function(event,player){ - return player.countCards('h')>0; - }, - direct:true, - frequent:true, - content:function(){ - "step 0" - if(player.countCards('j')==0&&(!event.isMine()||!lib.config.autoskilllist.contains('qiaobian1'))){ - event.finish(); - } - else{ - var next=player.chooseToDiscard('是否发动巧变跳过判定阶段?'); - next.set('ai',get.unuseful2); - next.set('logSkill','qiaobian'); - } - "step 1" - if(result.bool){ - trigger.untrigger(); - trigger.finish(); - } - } - }, - qiaobian2:{ - audio:2, - trigger:{player:'phaseDrawBefore'}, - filter:function(event,player){ - return player.countCards('h')>0; - }, - direct:true, - content:function(){ - "step 0" - var check,i,num=0,num2=0,players=game.filterPlayer(); - for(i=0;i=2&&num2>0); + list=game.filterPlayer(function(current){ + return current!=player&&get.attitude(player,current)<1; + }); + if(list.length==0) return null; + list.sort(function(a,b){ + return b.countCards('h')-a.countCards('h'); + }); + for(var i=0;i0; + }, + filterCard:{suit:'club'}, + viewAs:{name:'tiesuo'}, + prompt:'将一张梅花牌当铁锁连环使用', + check:function(card){return 6-get.value(card)}, + ai:{ + order:7.5, + result:{ + target:function(player,target){ + if(ui.selected.targets.length) return 0; + if(target.isLinked()) return 1; + return -1; + } + } + } + }, + lianhuan4:{ + trigger:{player:'useCard'}, + filter:function(event){ + return event.skill=='lianhuan3'&&event.targets.length==1; + }, + forced:true, + popup:false, + content:function(){ + player.draw(); + } + }, + reluanji:{ + audio:'luanji', + enable:'phaseUse', + viewAs:{name:'wanjian'}, + filterCard:function(card,player){ + if(!player.storage.reluanji) return true; + return !player.storage.reluanji.contains(get.suit(card)); + }, + selectCard:2, + check:function(card){ + return 6-get.value(card); + }, + ai:{ + basic:{ + order:10 + } + }, + group:['reluanji_count','reluanji_reset','reluanji_respond'], + subSkill:{ + reset:{ + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return player.storage.reluanji?true:false; + }, + content:function(){ + delete player.storage.reluanji; + } + }, + count:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + silent:true, + filter:function(event){ + return event.skill=='reluanji'; + }, + content:function(){ + if(!player.storage.reluanji){ + player.storage.reluanji=[]; + } + for(var i=0;i=4&&shas.length>=3){ + num=3; + } + else if(player.hp>=3&&shas.length>=2){ + num=2; + } + else{ + num=1 + } + player.awakenSkill('qimou'); + player.storage.qimou=true; + player.chooseControl('一','二','三','四','五','六',function(){ + return get.cnNumber(_status.event.goon,true); + }).set('prompt','失去任意点体力').set('goon',num); + 'step 1' + var num; + switch(result.control){ + case '一':num=1;break; + case '二':num=2;break; + case '三':num=3;break; + case '四':num=4;break; + case '五':num=5;break; + case '六':num=6;break; + } + player.storage.qimou2=num; + player.loseHp(num); + player.addTempSkill('qimou2','phaseAfter'); + }, + ai:{ + order:2, + result:{ + player:function(player){ + if(player.hp==1) return 0; + var shas=player.getCards('h','sha'); + if(!shas.length) return 0; + var card=shas[0]; + if(!lib.filter.cardEnabled(card,player)) return 0; + if(lib.filter.cardUsable(card,player)) return 0; + var mindist; + if(player.hp>=4&&shas.length>=3){ + mindist=4; + } + else if(player.hp>=3&&shas.length>=2){ + mindist=3; + } + else{ + mindist=2; + } + if(game.hasPlayer(function(current){ + return (current.hp<=mindist-1&& + get.distance(player,current,'attack')<=mindist&& + player.canUse(card,current,false)&& + get.effect(current,card,player,player)>0); + })){ + return 1; + } + return 0; + } + } + } + }, + qimou2:{ + onremove:true, + mod:{ + cardUsable:function(card,player,num){ + if(typeof player.storage.qimou2=='number'&&card.name=='sha'){ + return num+player.storage.qimou2; + } + }, + globalFrom:function(from,to,distance){ + if(typeof from.storage.qimou2=='number'){ + return distance-from.storage.qimou2; + } + } + } + }, + xinkuanggu:{ + trigger:{source:'damageEnd'}, + filter:function(event,player){ + return get.distance(player,event.player)<=1&&event.num>0; + }, + direct:true, + audio:'kuanggu', + content:function(){ + 'step 0' + event.num=trigger.num; + 'step 1' + player.chooseDrawRecover(get.prompt('xinkuanggu')).set('logSkill','xinkuanggu'); + 'step 2' + if(result.control!='cancel2'){ + event.num--; + if(event.num>0){ + event.goto(1); + } + } + } + }, + xinliegong:{ + mod:{ + targetInRange:function(card,player,target){ + if(card.name=='sha'&&card.number){ + if(get.distance(player,target)<=card.number) return true; + } + } + }, + audio:'liegong', + trigger:{player:'shaBegin'}, + logTarget:'target', + check:function(event,player){ + return get.attitude(player,event.target)<=0; + }, + filter:function(event,player){ + if(event.target.countCards('h')<=player.countCards('h')) return true; + if(event.target.hp<=player.hp) return true; + return false; + }, + content:function(){ + if(trigger.target.countCards('h')<=player.countCards('h')) trigger.directHit=true; + if(trigger.target.hp>=player.hp) player.addTempSkill('xinliegong2','shaAfter'); + }, + ai:{ + threaten:0.5 + } + }, + xinliegong2:{ + trigger:{source:'damageBegin'}, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.notLink(); + }, + forced:true, + audio:false, + content:function(){ + trigger.num++; + } + }, + tiaoxin:{ + audio:4, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.canUse({name:'sha'},player)&&target.countCards('he'); + }, + content:function(){ + "step 0" + target.chooseToUse({name:'sha'},player,-1,'挑衅:对'+get.translation(player)+'使用一张杀,或令其弃置你的一张牌').set('targetRequired',true); + "step 1" + if(result.bool==false&&target.countCards('he')>0){ + player.discardPlayerCard(target,'he',true); + } + else{ + event.finish(); + } + }, + ai:{ + order:4, + expose:0.2, + result:{ + target:-1, + player:function(player,target){ + if(target.countCards('h')==0) return 0; + if(target.countCards('h')==1) return -0.1; + if(player.hp<=2) return -2; + if(player.countCards('h','shan')==0) return -1; + return -0.5; + } + }, + threaten:1.1 + } + }, + zhiji:{ + skillAnimation:true, + audio:2, + unique:true, + priority:-10, + derivation:'guanxing', + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + if(player.storage.zhiji) return false; + return player.countCards('h')==0; + }, + content:function(){ + "step 0" + player.awakenSkill('zhiji'); + player.chooseControl('zhiji_recover','zhiji_draw',function(event,player){ + if(player.hp>=2) return 'zhiji_draw'; + return 'zhiji_recover'; + }); + "step 1" + if(result.control=='zhiji_draw'){ + player.draw(2); + } + else{ + player.recover(); + } + "step 2" + player.loseMaxHp(); + player.storage.zhiji=true; + if(player.hp>player.maxHp) player.hp=player.maxHp; + player.update(); + player.addSkill('guanxing'); + game.createTrigger('phaseBegin','guanxing',player,trigger); + } + }, + xiangle:{ + audio:2, + trigger:{target:'useCardToBefore'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'; + }, + content:function(){ + "step 0" + var eff=get.effect(player,trigger.card,trigger.player,trigger.player); + trigger.player.chooseToDiscard('享乐:弃置一张基本牌,否则杀对'+get.translation(player)+'无效',function(card){ + return get.type(card)=='basic'; + }).set('ai',function(card){ + if(_status.event.eff>0){ + return 10-get.value(card); + } + return 0; + }).set('eff',eff); + "step 1" + if(result.bool==false){ + trigger.finish(); + trigger.untrigger(); + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'){ + if(_status.event.name=='xiangle') return; + var bs=player.getCards('h',{type:'basic'}); + if(bs.length<2) return 0; + if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; + if(bs.length<=3&&player.countCards('h','sha')<=1){ + for(var i=0;i0&&!player.hasSkill('fangquan3'); + }, + direct:true, + content:function(){ + "step 0" + var fang=player.hp>=2&&player.countCards('h')<=player.hp+1; + player.chooseTarget(get.prompt('fangquan'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + if(!_status.event.fang) return -1; + if(target.hasJudge('lebu')) return -1; + return get.attitude(player,target)-4; + }).set('fang',fang); + "step 1" + if(result.bool){ + player.logSkill('fangquan',result.targets); + trigger.untrigger(); + trigger.finish(); + player.addSkill('fangquan2'); + player.storage.fangquan=result.targets[0]; + } + } + }, + fangquan2:{ + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + audio:false, + priority:-50, + content:function(){ + "step 0" + player.chooseToDiscard(true); + "step 1" + var target=player.storage.fangquan; + target.markSkillCharacter('fangquan',player,'放权','进行一个额外回合'); + target.insertPhase(); + target.addSkill('fangquan3'); + player.removeSkill('fangquan2'); + delete player.storage.fangquan; + } + }, + fangquan3:{ + trigger:{player:['phaseAfter','phaseCancelled']}, + forced:true, + popup:false, + audio:false, + content:function(){ + player.unmarkSkill('fangquan'); + player.removeSkill('fangquan3'); + } + }, + ruoyu:{ + skillAnimation:true, + audio:2, + unique:true, + zhuSkill:true, + keepSkill:true, + derivation:'jijiang', + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + if(!player.hasZhuSkill('ruoyu'))return false; + if(player.storage.ruoyu) return false; + return player.isLowestHp(); + }, + content:function(){ + player.storage.ruoyu=true; + player.maxHp++; + player.update(); + player.recover(); + if(player.hasSkill('ruoyu')){ + player.addSkill('jijiang'); + } + else{ + player.addAdditionalSkill('ruoyu','jijiang'); + } + if(!player.isZhu){ + player.storage.zhuSkill_ruoyu=['jijiang']; + } + else{ + event.trigger('zhuUpdate'); + } + player.awakenSkill('ruoyu'); + } + }, + qiaobian:{ + audio:2, + group:['qiaobian1','qiaobian2','qiaobian3','qiaobian4'], + ai:{ + threaten:3 + } + }, + qiaobian1:{ + audio:2, + trigger:{player:'phaseJudgeBefore'}, + filter:function(event,player){ + return player.countCards('h')>0; + }, + direct:true, + frequent:true, + content:function(){ + "step 0" + if(player.countCards('j')==0&&(!event.isMine()||!lib.config.autoskilllist.contains('qiaobian1'))){ + event.finish(); + } + else{ + var next=player.chooseToDiscard('是否发动巧变跳过判定阶段?'); + next.set('ai',get.unuseful2); + next.set('logSkill','qiaobian'); + } + "step 1" + if(result.bool){ + trigger.untrigger(); + trigger.finish(); + } + } + }, + qiaobian2:{ + audio:2, + trigger:{player:'phaseDrawBefore'}, + filter:function(event,player){ + return player.countCards('h')>0; + }, + direct:true, + content:function(){ + "step 0" + var check,i,num=0,num2=0,players=game.filterPlayer(); + for(i=0;i=2&&num2>0); - player.chooseCardTarget({ - ai1:function(card){ - var evt=_status.event; - if(!evt.check) return 0; - return 6-get.useful(card); - }, - ai2:function(target){ - var evt=_status.event; - if(!evt.check) return 0; - return 1-get.attitude(evt.player,target); - }, - filterTarget:function(card,player,target){ - return target.countCards('h')>0; - }, - selectTarget:[0,2], - filterCard:lib.filter.cardDiscardable, - prompt:'是否发动巧变跳过摸牌阶段?', - check:check, - target:target - }); - "step 1" - if(result.bool){ - player.logSkill('qiaobian',result.targets); - player.discard(result.cards); - event.targets=result.targets; - } - else{ - event.finish(); - } - "step 2" - player.gainMultiple(event.targets); - trigger.finish(); - trigger.untrigger(); - "step 3" - game.delay(); - }, - ai:{ - expose:0.2 - } - }, - qiaobian3:{ - audio:2, - trigger:{player:'phaseUseBefore'}, - filter:function(event,player){ - return player.countCards('h')>0; - }, - direct:true, - content:function(){ - "step 0" - var check=game.hasPlayer(function(current){ - return get.attitude(player,current)>0&¤t.countCards('j'); - }); - if(!check){ - if(player.countCards('h')>player.hp+1){ - check=false; - } - else if(player.countCards('h',{name:['wuzhong']})){ - check=false; - } - else{ - check=true; - } - } - player.chooseCardTarget({ - ai1:function(card){ - if(!_status.event.check) return 0; - return 7-get.useful(card); - }, - ai2:function(target){ - if(!_status.event.check) return 0; - var player=_status.event.player; - if(ui.selected.targets.length==0){ - if(target.countCards('j')&&get.attitude(player,target)>0) return 10; - if(get.attitude(player,target)<0){ - var players=game.filterPlayer(); - for(var i=0;i0){ - if((target.getEquip(1)&&!players[i].getEquip(1))|| - (target.getEquip(2)&&!players[i].getEquip(2))|| - (target.getEquip(3)&&!players[i].getEquip(3))|| - (target.getEquip(4)&&!players[i].getEquip(4))|| - (target.getEquip(5)&&!players[i].getEquip(5))) return -get.attitude(player,target); - } - } - } - return 0; - } - return -get.attitude(player,target)*get.attitude(player,ui.selected.targets[0]); - }, - multitarget:true, - filterTarget:function(card,player,target){ - if(ui.selected.targets.length){ - var from=ui.selected.targets[0]; - var judges=from.getCards('j'); - for(var i=0;i0; - } - }, - selectTarget:2, - filterCard:lib.filter.cardDiscardable, - prompt:'是否发动巧变跳过出牌阶段?', - targetprompt:['被移走','移动目标'], - check:check, - target:target - }); - "step 1" - if(!result.bool){ - event.finish(); - return; - } - trigger.untrigger(); - trigger.finish(); - player.discard(result.cards); - player.logSkill('qiaobian',result.targets,false); - player.line2(result.targets); - event.targets=result.targets; - "step 2" - game.delay(); - "step 3" - if(targets.length==2){ - player.choosePlayerCard('ej',function(button){ - var player=_status.event.player; - var targets0=_status.event.targets0; - var targets1=_status.event.targets1; - if(get.attitude(player,targets0)>get.attitude(player,targets1)){ - return get.position(button.link)=='j'?10:0; - } - else{ - if(get.position(button.link)=='j') return -10; - return get.equipValue(button.link); - } - },targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){ - var targets1=_status.event.targets1; - if(get.position(button.link)=='j'){ - return !targets1.hasJudge(button.link.viewAs||button.link.name); - } - else{ - return !targets1.countCards('e',{subtype:get.subtype(button.link)}); - } - }); - } - else{ - event.finish(); - } - "step 4" - if(result.bool&&result.links.length){ - var link=result.links[0]; - if(get.position(link)=='e'){ - event.targets[1].equip(link); - } - else if(link.viewAs){ - event.targets[1].addJudge({name:link.viewAs},[link]); - } - else{ - event.targets[1].addJudge(link); - } - event.targets[0].$give(link,event.targets[1]) - game.delay(); - } - }, - ai:{ - expose:0.2 - } - }, - qiaobian4:{ - audio:2, - trigger:{player:'phaseDiscardBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - var discard=player.countCards('h')>player.hp; - var next=player.chooseToDiscard('是否发动巧变跳过弃牌阶段?'); - next.logSkill='qiaobian'; - next.ai=function(card){ - if(discard){ - return 100-get.useful(card); - } - else{ - return -1; - } - }; - "step 1" - if(result.bool){ - trigger.untrigger(); - trigger.finish(); - } - } - }, - tuntian:{ - audio:2, - trigger:{player:'loseEnd'}, - frequent:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - for(var i=0;i0&&card.name=='juedou') return; - if(get.tag(card,'damage')&&target.hasSkillTag('maixie')) return; - if(target.countCards('h')==0) return 2; - if(target.hasSkill('ziliang')) return 0.7; - if(get.mode()=='guozhan') return 0.5; - return [0.5,Math.max(target.countCards('h')/4,target.countCards('h','sha')+target.countCards('h','shan'))]; - } - } - }, - threaten:function(player,target){ - if(target.countCards('h')==0) return 2; - return 0.5; - } - } - }, - zaoxian:{ - skillAnimation:true, - audio:2, - unique:true, - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - if(player.storage.tuntian) return player.storage.tuntian.length>=3&&!player.storage.zaoxian; - }, - derivation:'jixi', - content:function(){ - player.loseMaxHp(); - player.addSkill('jixi'); - player.storage.zaoxian=true; - player.awakenSkill('zaoxian'); - } - }, - jixi:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.storage.tuntian.length>0; - }, - chooseButton:{ - dialog:function(event,player){ - return ui.create.dialog('急袭',player.storage.tuntian,'hidden'); - }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - selectCard:-1, - viewAs:{name:'shunshou'}, - cards:links, - onuse:function(result,player){ - result.cards=lib.skill[result.skill].cards; - var card=result.cards[0]; - player.storage.tuntian.remove(card); - player.syncStorage('tuntian'); - if(!player.storage.tuntian.length){ - player.unmarkSkill('tuntian'); - } - else{ - player.markSkill('tuntian'); - } - player.logSkill('jixi',result.targets); - } - } - }, - prompt:function(links,player){ - return '选择急袭的目标'; - } - }, - ai:{ - order:10, - result:{ - player:function(player){ - return player.storage.tuntian.length-1; - } - } - } - }, - jiang:{ - audio:2, - trigger:{player:['shaBefore','juedouBefore'],target:['shaBefore','juedouBefore']}, - filter:function(event,player){ - if(event.card.name=='juedou') return true; - return get.color(event.card)=='red'; - }, - frequent:true, - content:function(){ - player.draw(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(card.name=='sha'&&get.color(card)=='red') return [1,0.6]; - }, - player:function(card,player,target){ - if(card.name=='sha'&&get.color(card)=='red') return [1,1]; - } - } - } - }, - hunzi:{ - skillAnimation:true, - audio:2, - derivation:['reyingzi','yinghun'], - unique:true, - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - return player.hp==1&&!player.storage.hunzi; - }, - forced:true, - priority:3, - content:function(){ - player.loseMaxHp(); - player.addSkill('reyingzi'); - player.addSkill('yinghun'); - player.awakenSkill('hunzi'); - player.storage.hunzi=true; - game.createTrigger('phaseBegin','yinghun',player,trigger); - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 2; - return 0.5; - }, - maixie:true, - effect:{ - target:function(card,player,target){ - if(!target.hasFriend()) return; - if(get.tag(card,'damage')==1&&target.hp==2&&!target.isTurnedOver()&& - _status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1]; - } - } - } - }, - zhiba:{ - unique:true, - global:'zhiba2', - zhuSkill:true, - }, - zhiba2:{ - audio:2, - forceaudio:true, - enable:'phaseUse', - filter:function(event,player){ - if(player.group!='wu'||player.countCards('h')==0) return false; - return game.hasPlayer(function(target){ - return target!=player&&target.hasZhuSkill('zhiba',player)&&target.countCards('h')>0; - }); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.hasZhuSkill('zhiba',player)&&target.countCards('h')>0; - }, - usable:1, - content:function(){ - "step 0" - if(target.storage.hunzi){ - target.chooseControl('拒绝','不拒绝').set('prompt','是否拒绝制霸拼点?').set('choice',get.attitude(target,player)<=0); - } - else{ - event.forced=true; - } - "step 1" - if(!event.forced&&result.control=='拒绝'){ - game.log(target,'拒绝了拼点'); - target.chat('拒绝'); - event.finish(); - return; - } - player.chooseToCompare(target,function(card){ - if(card.name=='du') return 20; - var player=get.owner(card); - var target=_status.event.getParent().target; - if(player!=target&&get.attitude(player,target)>0){ - return -get.number(card); - } - return get.number(card); - }).set('preserve','lose'); - "step 2" - if(result.bool==false){ - target.gain([result.player,result.target]); - target.$gain2([result.player,result.target]); - } - }, - ai:{ - basic:{ - order:1 - }, - expose:0.2, - result:{ - target:function(player,target){ - if(player.countCards('h','du')&&get.attitude(player,target)<0) return -1; - if(player.countCards('h')<=player.hp) return 0; - var maxnum=0; - var cards2=target.getCards('h'); - for(var i=0;imaxnum){ - maxnum=cards2[i].number; - } - } - if(maxnum>10) maxnum=10; - if(maxnum<5&&cards2.length>1) maxnum=5; - var cards=player.getCards('h'); - for(var i=0;i0; - }, - filterCard:function(card){ - return get.type(card)=='equip'; - }, - check:function(card){ - var player=_status.currentPhase; - if(player.countCards('he',{subtype:get.subtype(card)})>1){ - return 11-get.equipValue(card); - } - return 6-get.value(card); - }, - filterTarget:function(card,player,target){ - if(target.isMin()) return false; - return player!=target&&!target.getEquip(card); - }, - content:function(){ - target.equip(cards[0]); - player.draw(); - }, - discard:false, - prepare:function(cards,player,targets){ - player.$give(cards,targets[0],false); - }, - ai:{ - basic:{ - order:10 - }, - result:{ - target:3, - }, - threaten:1.3 - } - }, - guzheng:{ - audio:2, - unique:true, - gainable:true, - trigger:{global:'discardAfter'}, - filter:function(event,player){ - if(event.player!=player&&event.player.classList.contains('dead')==false&& - event.cards&&event.cards.length&&event.getParent(2).name=='phaseDiscard'){ - for(var i=0;i0){ - if(du&&num<=3){ - return false; - } - return true; - } - if(du) return true; - return num>2; - }, - direct:true, - content:function(){ - "step 0" - event.cards=trigger.cards.slice(0); - for(var i=0;i0&&att2<=0; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he',get.prompt('beige')); - var check=lib.skill.beige.checkx(trigger,player); - next.set('ai',function(card){ - if(_status.event.goon) return 8-get.value(card); - return 0; - }); - next.set('logSkill','beige'); - next.set('goon',check); - "step 1" - if(result.bool){ - trigger.player.judge(); - } - else{ - event.finish(); - } - "step 2" - switch(get.suit(result.card)){ - case 'heart':trigger.player.recover();break; - case 'diamond':trigger.player.draw(2);break; - case 'club':trigger.source.chooseToDiscard('he',2,true);break; - case 'spade':trigger.source.turnOver();break; - } - }, - ai:{ - expose:0.3 - } - }, - duanchang:{ - audio:4, - forbid:['boss'], - trigger:{player:'dieBegin'}, - forced:true, - filter:function(event){ - return event.source&&event.source.isIn(); - }, - content:function(){ - trigger.source.clearSkills(); - }, - logTarget:'source', - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 0.2; - return 1.5; - }, - effect:{ - target:function(card,player,target,current){ - if(!target.hasFriend()) return; - if(target.hp<=1&&get.tag(card,'damage')) return [1,0,0,-2]; - } - } - } - }, - huashen:{ - unique:true, - forbid:['guozhan'], - init:function(player){ - player.storage.huashen={ - list:[], - owned:{}, - player:player, - } - }, - get:function(player,num){ - if(typeof num!='number') num=1; - while(num--){ - var name=player.storage.huashen.list.randomRemove(); - var skills=lib.character[name][3].slice(0); - for(var i=0;i
【'+get.translation(skill)+ - '】
'+lib.translate[skill+'_info']+'
'); - } - } - }, - mark:true - }, - huashen1:{ - trigger:{global:['gameStart','phaseBefore']}, - forced:true, - popup:false, - priority:10, - filter:function(event,player){ - return !player.storage.huasheninited; - }, - content:function(){ - for(var i in lib.character){ - if(i.indexOf('stone_')==0) continue; - var add=false; - for(var j=0;j0; + }, + selectTarget:[0,2], + filterCard:lib.filter.cardDiscardable, + prompt:'是否发动巧变跳过摸牌阶段?', + check:check, + target:target + }); + "step 1" + if(result.bool){ + player.logSkill('qiaobian',result.targets); + player.discard(result.cards); + event.targets=result.targets; + } + else{ + event.finish(); + } + "step 2" + player.gainMultiple(event.targets); + trigger.finish(); + trigger.untrigger(); + "step 3" + game.delay(); + }, + ai:{ + expose:0.2 + } + }, + qiaobian3:{ + audio:2, + trigger:{player:'phaseUseBefore'}, + filter:function(event,player){ + return player.countCards('h')>0; + }, + direct:true, + content:function(){ + "step 0" + var check=game.hasPlayer(function(current){ + return get.attitude(player,current)>0&¤t.countCards('j'); + }); + if(!check){ + if(player.countCards('h')>player.hp+1){ + check=false; + } + else if(player.countCards('h',{name:['wuzhong']})){ + check=false; + } + else{ + check=true; + } + } + player.chooseCardTarget({ + ai1:function(card){ + if(!_status.event.check) return 0; + return 7-get.useful(card); + }, + ai2:function(target){ + if(!_status.event.check) return 0; + var player=_status.event.player; + if(ui.selected.targets.length==0){ + if(target.countCards('j')&&get.attitude(player,target)>0) return 10; + if(get.attitude(player,target)<0){ + var players=game.filterPlayer(); + for(var i=0;i0){ + if((target.getEquip(1)&&!players[i].getEquip(1))|| + (target.getEquip(2)&&!players[i].getEquip(2))|| + (target.getEquip(3)&&!players[i].getEquip(3))|| + (target.getEquip(4)&&!players[i].getEquip(4))|| + (target.getEquip(5)&&!players[i].getEquip(5))) return -get.attitude(player,target); + } + } + } + return 0; + } + return -get.attitude(player,target)*get.attitude(player,ui.selected.targets[0]); + }, + multitarget:true, + filterTarget:function(card,player,target){ + if(ui.selected.targets.length){ + var from=ui.selected.targets[0]; + var judges=from.getCards('j'); + for(var i=0;i0; + } + }, + selectTarget:2, + filterCard:lib.filter.cardDiscardable, + prompt:'是否发动巧变跳过出牌阶段?', + targetprompt:['被移走','移动目标'], + check:check, + target:target + }); + "step 1" + if(!result.bool){ + event.finish(); + return; + } + trigger.untrigger(); + trigger.finish(); + player.discard(result.cards); + player.logSkill('qiaobian',result.targets,false); + player.line2(result.targets); + event.targets=result.targets; + "step 2" + game.delay(); + "step 3" + if(targets.length==2){ + player.choosePlayerCard('ej',function(button){ + var player=_status.event.player; + var targets0=_status.event.targets0; + var targets1=_status.event.targets1; + if(get.attitude(player,targets0)>get.attitude(player,targets1)){ + return get.position(button.link)=='j'?10:0; + } + else{ + if(get.position(button.link)=='j') return -10; + return get.equipValue(button.link); + } + },targets[0]).set('targets0',targets[0]).set('targets1',targets[1]).set('filterButton',function(button){ + var targets1=_status.event.targets1; + if(get.position(button.link)=='j'){ + return !targets1.hasJudge(button.link.viewAs||button.link.name); + } + else{ + return !targets1.countCards('e',{subtype:get.subtype(button.link)}); + } + }); + } + else{ + event.finish(); + } + "step 4" + if(result.bool&&result.links.length){ + var link=result.links[0]; + if(get.position(link)=='e'){ + event.targets[1].equip(link); + } + else if(link.viewAs){ + event.targets[1].addJudge({name:link.viewAs},[link]); + } + else{ + event.targets[1].addJudge(link); + } + event.targets[0].$give(link,event.targets[1]) + game.delay(); + } + }, + ai:{ + expose:0.2 + } + }, + qiaobian4:{ + audio:2, + trigger:{player:'phaseDiscardBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + var discard=player.countCards('h')>player.hp; + var next=player.chooseToDiscard('是否发动巧变跳过弃牌阶段?'); + next.logSkill='qiaobian'; + next.ai=function(card){ + if(discard){ + return 100-get.useful(card); + } + else{ + return -1; + } + }; + "step 1" + if(result.bool){ + trigger.untrigger(); + trigger.finish(); + } + } + }, + tuntian:{ + audio:2, + trigger:{player:'loseEnd'}, + frequent:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + for(var i=0;i0&&card.name=='juedou') return; + if(get.tag(card,'damage')&&target.hasSkillTag('maixie')) return; + if(target.countCards('h')==0) return 2; + if(target.hasSkill('ziliang')) return 0.7; + if(get.mode()=='guozhan') return 0.5; + return [0.5,Math.max(target.countCards('h')/4,target.countCards('h','sha')+target.countCards('h','shan'))]; + } + } + }, + threaten:function(player,target){ + if(target.countCards('h')==0) return 2; + return 0.5; + } + } + }, + zaoxian:{ + skillAnimation:true, + audio:2, + unique:true, + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + if(player.storage.tuntian) return player.storage.tuntian.length>=3&&!player.storage.zaoxian; + }, + derivation:'jixi', + content:function(){ + player.loseMaxHp(); + player.addSkill('jixi'); + player.storage.zaoxian=true; + player.awakenSkill('zaoxian'); + } + }, + jixi:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.storage.tuntian.length>0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('急袭',player.storage.tuntian,'hidden'); + }, + backup:function(links,player){ + return { + filterCard:function(){return false}, + selectCard:-1, + viewAs:{name:'shunshou'}, + cards:links, + onuse:function(result,player){ + result.cards=lib.skill[result.skill].cards; + var card=result.cards[0]; + player.storage.tuntian.remove(card); + player.syncStorage('tuntian'); + if(!player.storage.tuntian.length){ + player.unmarkSkill('tuntian'); + } + else{ + player.markSkill('tuntian'); + } + player.logSkill('jixi',result.targets); + } + } + }, + prompt:function(links,player){ + return '选择急袭的目标'; + } + }, + ai:{ + order:10, + result:{ + player:function(player){ + return player.storage.tuntian.length-1; + } + } + } + }, + jiang:{ + audio:2, + trigger:{player:['shaBefore','juedouBefore'],target:['shaBefore','juedouBefore']}, + filter:function(event,player){ + if(event.card.name=='juedou') return true; + return get.color(event.card)=='red'; + }, + frequent:true, + content:function(){ + player.draw(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(card.name=='sha'&&get.color(card)=='red') return [1,0.6]; + }, + player:function(card,player,target){ + if(card.name=='sha'&&get.color(card)=='red') return [1,1]; + } + } + } + }, + hunzi:{ + skillAnimation:true, + audio:2, + derivation:['reyingzi','yinghun'], + unique:true, + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + return player.hp==1&&!player.storage.hunzi; + }, + forced:true, + priority:3, + content:function(){ + player.loseMaxHp(); + player.addSkill('reyingzi'); + player.addSkill('yinghun'); + player.awakenSkill('hunzi'); + player.storage.hunzi=true; + game.createTrigger('phaseBegin','yinghun',player,trigger); + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 2; + return 0.5; + }, + maixie:true, + effect:{ + target:function(card,player,target){ + if(!target.hasFriend()) return; + if(get.tag(card,'damage')==1&&target.hp==2&&!target.isTurnedOver()&& + _status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1]; + } + } + } + }, + zhiba:{ + unique:true, + global:'zhiba2', + zhuSkill:true, + }, + zhiba2:{ + audio:2, + forceaudio:true, + enable:'phaseUse', + filter:function(event,player){ + if(player.group!='wu'||player.countCards('h')==0) return false; + return game.hasPlayer(function(target){ + return target!=player&&target.hasZhuSkill('zhiba',player)&&target.countCards('h')>0; + }); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.hasZhuSkill('zhiba',player)&&target.countCards('h')>0; + }, + usable:1, + content:function(){ + "step 0" + if(target.storage.hunzi){ + target.chooseControl('拒绝','不拒绝').set('prompt','是否拒绝制霸拼点?').set('choice',get.attitude(target,player)<=0); + } + else{ + event.forced=true; + } + "step 1" + if(!event.forced&&result.control=='拒绝'){ + game.log(target,'拒绝了拼点'); + target.chat('拒绝'); + event.finish(); + return; + } + player.chooseToCompare(target,function(card){ + if(card.name=='du') return 20; + var player=get.owner(card); + var target=_status.event.getParent().target; + if(player!=target&&get.attitude(player,target)>0){ + return -get.number(card); + } + return get.number(card); + }).set('preserve','lose'); + "step 2" + if(result.bool==false){ + target.gain([result.player,result.target]); + target.$gain2([result.player,result.target]); + } + }, + ai:{ + basic:{ + order:1 + }, + expose:0.2, + result:{ + target:function(player,target){ + if(player.countCards('h','du')&&get.attitude(player,target)<0) return -1; + if(player.countCards('h')<=player.hp) return 0; + var maxnum=0; + var cards2=target.getCards('h'); + for(var i=0;imaxnum){ + maxnum=cards2[i].number; + } + } + if(maxnum>10) maxnum=10; + if(maxnum<5&&cards2.length>1) maxnum=5; + var cards=player.getCards('h'); + for(var i=0;i0; + }, + filterCard:function(card){ + return get.type(card)=='equip'; + }, + check:function(card){ + var player=_status.currentPhase; + if(player.countCards('he',{subtype:get.subtype(card)})>1){ + return 11-get.equipValue(card); + } + return 6-get.value(card); + }, + filterTarget:function(card,player,target){ + if(target.isMin()) return false; + return player!=target&&!target.getEquip(card); + }, + content:function(){ + target.equip(cards[0]); + player.draw(); + }, + discard:false, + prepare:function(cards,player,targets){ + player.$give(cards,targets[0],false); + }, + ai:{ + basic:{ + order:10 + }, + result:{ + target:3, + }, + threaten:1.3 + } + }, + guzheng:{ + audio:2, + unique:true, + gainable:true, + trigger:{global:'discardAfter'}, + filter:function(event,player){ + if(event.player!=player&&event.player.classList.contains('dead')==false&& + event.cards&&event.cards.length&&event.getParent(2).name=='phaseDiscard'){ + for(var i=0;i0){ + if(du&&num<=3){ + return false; + } + return true; + } + if(du) return true; + return num>2; + }, + direct:true, + content:function(){ + "step 0" + event.cards=trigger.cards.slice(0); + for(var i=0;i0&&att2<=0; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he',get.prompt('beige')); + var check=lib.skill.beige.checkx(trigger,player); + next.set('ai',function(card){ + if(_status.event.goon) return 8-get.value(card); + return 0; + }); + next.set('logSkill','beige'); + next.set('goon',check); + "step 1" + if(result.bool){ + trigger.player.judge(); + } + else{ + event.finish(); + } + "step 2" + switch(get.suit(result.card)){ + case 'heart':trigger.player.recover();break; + case 'diamond':trigger.player.draw(2);break; + case 'club':trigger.source.chooseToDiscard('he',2,true);break; + case 'spade':trigger.source.turnOver();break; + } + }, + ai:{ + expose:0.3 + } + }, + duanchang:{ + audio:4, + forbid:['boss'], + trigger:{player:'dieBegin'}, + forced:true, + filter:function(event){ + return event.source&&event.source.isIn(); + }, + content:function(){ + trigger.source.clearSkills(); + }, + logTarget:'source', + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 0.2; + return 1.5; + }, + effect:{ + target:function(card,player,target,current){ + if(!target.hasFriend()) return; + if(target.hp<=1&&get.tag(card,'damage')) return [1,0,0,-2]; + } + } + } + }, + huashen:{ + unique:true, + forbid:['guozhan'], + init:function(player){ + player.storage.huashen={ + list:[], + owned:{}, + player:player, + } + }, + get:function(player,num){ + if(typeof num!='number') num=1; + while(num--){ + var name=player.storage.huashen.list.randomRemove(); + var skills=lib.character[name][3].slice(0); + for(var i=0;i
【'+get.translation(skill)+ + '】
'+lib.translate[skill+'_info']+'
'); + } + } + }, + mark:true + }, + huashen1:{ + trigger:{global:['gameStart','phaseBefore']}, + forced:true, + popup:false, + priority:10, + filter:function(event,player){ + return !player.storage.huasheninited; + }, + content:function(){ + for(var i in lib.character){ + if(i.indexOf('stone_')==0) continue; + var add=false; + for(var j=0;j0; - }, - content:function(){ - for(var i=0;i=2; - } - return true; - }, - content:function(){ - "step 0" - trigger.untrigger(); - trigger.finish(); - event.cards=get.cards(player.maxHp-player.hp); - player.showCards(event.cards); - "step 1" - var num=0; - for(var i=0;i1; - }, - priority:5, - content:function(){ - "step 0" - player.chooseToCompare(trigger.player); - "step 1" - if(result.bool&&trigger.player.countCards('he')){ - player.gainPlayerCard(trigger.player,true,'he'); - } - } - }, - xingshang:{ - audio:2, - unique:true, - gainable:true, - trigger:{global:'dieEnd'}, - priority:5, - filter:function(event){ - return event.playerCards&&event.playerCards.length>0 - }, - check:function(event){ - for(var i=0;i0){ - if(target.classList.contains('turnedover')) return 1000-target.countCards('h'); - if(player.maxHp-player.hp<3) return -1; - return 100-target.countCards('h'); - } - else{ - if(target.classList.contains('turnedover')) return -1; - if(player.maxHp-player.hp>=3) return -1; - return 1+target.countCards('h'); - } - } - "step 1" - if(result.bool){ - player.logSkill('fangzhu',result.targets); - result.targets[0].draw(player.maxHp-player.hp); - result.targets[0].turnOver(); - } - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(target.hp<=1) return; - if(!target.hasFriend()) return; - var hastarget=false; - var turnfriend=false; - var players=game.filterPlayer(); - for(var i=0;i0&&players[i].isTurnedOver()){ - hastarget=true; - turnfriend=true; - } - } - if(get.attitude(player,target)>0&&!hastarget) return; - if(turnfriend||target.hp==target.maxHp) return [0.5,1]; - if(target.hp>1) return [1,0.5]; - } - } - } - } - }, - songwei:{ - unique:true, - global:'songwei2', - zhuSkill:true, - }, - songwei2:{ - audio:2, - forceaudio:true, - trigger:{player:'judgeEnd'}, - filter:function(event,player){ - if(player.group!='wei') return false; - if(get.color(event.result.card)!='black') return false; - return game.hasPlayer(function(target){ - return player!=target&&target.hasZhuSkill('songwei',player); - }); - }, - direct:true, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current!=player&¤t.hasZhuSkill('songwei',player); - }); - event.list=list; - 'step 1' - if(event.list.length){ - var current=event.list.shift(); - event.current=current; - player.chooseBool(get.prompt('songwei',current)).set('choice',get.attitude(player,current)>0); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - player.logSkill('songwei',event.current); - event.current.draw(); - } - event.goto(1); - } - }, - duanliang:{ - group:['duanliang1','duanliang2'], - ai:{ - threaten:1.2 - } - }, - duanliang1:{ - audio:2, - enable:'chooseToUse', - filterCard:function(card){ - if(get.type(card)!='basic'&&get.type(card)!='equip') return false; - return get.color(card)=='black'; - }, - filter:function(event,player){ - return player.countCards('he',{type:['basic','equip'],color:'black'}) - }, - position:'he', - viewAs:{name:'bingliang'}, - prompt:'将一黑色的基本牌或装备牌当兵粮寸断使用', - check:function(card){return 6-get.value(card)}, - ai:{ - order:9 - } - }, - duanliang2:{ - mod:{ - targetInRange:function(card,player,target){ - if(card.name=='bingliang'){ - if(get.distance(player,target)<=2) return true; - } - } - } - }, - haoshi:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - threaten:1.4, - check:function(event,player){ - if(player.countCards('h')<=1) return true; - var min=[]; - var temp=player.next.countCards('h'); - var players=game.filterPlayer(); - for(var i=0;i0) return true; - } - return false; - }, - content:function(){ - trigger.num+=2; - player.addSkill('haoshi2'); - }, - ai:{ - threaten:2, - ai:{ - noh:true, - skillTagFilter:function(player,tag){ - if(tag=='noh'){ - if(player.countCards('h')!=2) return false; - } - } - } - } - }, - haoshi2:{ - trigger:{player:'phaseDrawEnd'}, - forced:true, - popup:false, - audio:false, - content:function(){ - "step 0" - player.removeSkill('haoshi2'); - if(player.countCards('h')<=5){ - event.finish(); - return; - } - player.chooseCardTarget({ - selectCard:Math.floor(player.countCards('h')/2), - filterTarget:function(card,player,target){ - return target.isFewestHandcard(); - }, - forced:true, - ai2:function(target){ - return get.attitude(_status.event.player,target); - } - }); - "step 1" - if(result.targets&&result.targets[0]){ - result.targets[0].gain(result.cards,player); - player.$give(result.cards.length,result.targets[0]); - } - } - }, - dimeng:{ - audio:2, - enable:'phaseUse', - usable:1, - position:'he', - filterCard:function(){ - if(ui.selected.targets.length==2) return false; - return true; - }, - selectCard:[0,Infinity], - selectTarget:2, - complexCard:true, - filterTarget:function(card,player,target){ - if(player==target) return false; - if(ui.selected.targets.length==0) return true; - return (Math.abs(ui.selected.targets[0].countCards('h')-target.countCards('h'))== - ui.selected.cards.length); - }, - multitarget:true, - multiline:true, - content:function(){ - targets[0].swapHandcards(targets[1]); - }, - check:function(card){ - var list=[],player=_status.event.player; - var num=player.countCards('he'); - var count; - var players=game.filterPlayer(); - for(var i=0;i3) list.push(players[i]); - } - list.sort(function(a,b){ - return a.countCards('h')-b.countCards('h'); - }); - if(list.length==0) return -1; - var from=list[0]; - list.length=0; + if(event.triggername=='phaseBegin'){ + (function(){ + var skills=[link]; + var list=[]; + game.expandSkills(skills); + var triggerevent=event._trigger; + var name='phaseBegin'; + for(i=0;i0; + }, + content:function(){ + for(var i=0;i=2; + } + return true; + }, + content:function(){ + "step 0" + trigger.untrigger(); + trigger.finish(); + event.cards=get.cards(player.maxHp-player.hp); + player.showCards(event.cards); + "step 1" + var num=0; + for(var i=0;i1; + }, + priority:5, + content:function(){ + "step 0" + player.chooseToCompare(trigger.player); + "step 1" + if(result.bool&&trigger.player.countCards('he')){ + player.gainPlayerCard(trigger.player,true,'he'); + } + } + }, + xingshang:{ + audio:2, + unique:true, + gainable:true, + trigger:{global:'dieEnd'}, + priority:5, + filter:function(event){ + return event.playerCards&&event.playerCards.length>0 + }, + check:function(event){ + for(var i=0;i0){ + if(target.classList.contains('turnedover')) return 1000-target.countCards('h'); + if(player.maxHp-player.hp<3) return -1; + return 100-target.countCards('h'); + } + else{ + if(target.classList.contains('turnedover')) return -1; + if(player.maxHp-player.hp>=3) return -1; + return 1+target.countCards('h'); + } + } + "step 1" + if(result.bool){ + player.logSkill('fangzhu',result.targets); + result.targets[0].draw(player.maxHp-player.hp); + result.targets[0].turnOver(); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(target.hp<=1) return; + if(!target.hasFriend()) return; + var hastarget=false; + var turnfriend=false; + var players=game.filterPlayer(); + for(var i=0;i0&&players[i].isTurnedOver()){ + hastarget=true; + turnfriend=true; + } + } + if(get.attitude(player,target)>0&&!hastarget) return; + if(turnfriend||target.hp==target.maxHp) return [0.5,1]; + if(target.hp>1) return [1,0.5]; + } + } + } + } + }, + songwei:{ + unique:true, + global:'songwei2', + zhuSkill:true, + }, + songwei2:{ + audio:2, + forceaudio:true, + trigger:{player:'judgeEnd'}, + filter:function(event,player){ + if(player.group!='wei') return false; + if(get.color(event.result.card)!='black') return false; + return game.hasPlayer(function(target){ + return player!=target&&target.hasZhuSkill('songwei',player); + }); + }, + direct:true, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current!=player&¤t.hasZhuSkill('songwei',player); + }); + event.list=list; + 'step 1' + if(event.list.length){ + var current=event.list.shift(); + event.current=current; + player.chooseBool(get.prompt('songwei',current)).set('choice',get.attitude(player,current)>0); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.logSkill('songwei',event.current); + event.current.draw(); + } + event.goto(1); + } + }, + duanliang:{ + group:['duanliang1','duanliang2'], + ai:{ + threaten:1.2 + } + }, + duanliang1:{ + audio:2, + enable:'chooseToUse', + filterCard:function(card){ + if(get.type(card)!='basic'&&get.type(card)!='equip') return false; + return get.color(card)=='black'; + }, + filter:function(event,player){ + return player.countCards('he',{type:['basic','equip'],color:'black'}) + }, + position:'he', + viewAs:{name:'bingliang'}, + prompt:'将一黑色的基本牌或装备牌当兵粮寸断使用', + check:function(card){return 6-get.value(card)}, + ai:{ + order:9 + } + }, + duanliang2:{ + mod:{ + targetInRange:function(card,player,target){ + if(card.name=='bingliang'){ + if(get.distance(player,target)<=2) return true; + } + } + } + }, + haoshi:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + threaten:1.4, + check:function(event,player){ + if(player.countCards('h')<=1) return true; + var min=[]; + var temp=player.next.countCards('h'); + var players=game.filterPlayer(); + for(var i=0;i0) return true; + } + return false; + }, + content:function(){ + trigger.num+=2; + player.addSkill('haoshi2'); + }, + ai:{ + threaten:2, + ai:{ + noh:true, + skillTagFilter:function(player,tag){ + if(tag=='noh'){ + if(player.countCards('h')!=2) return false; + } + } + } + } + }, + haoshi2:{ + trigger:{player:'phaseDrawEnd'}, + forced:true, + popup:false, + audio:false, + content:function(){ + "step 0" + player.removeSkill('haoshi2'); + if(player.countCards('h')<=5){ + event.finish(); + return; + } + player.chooseCardTarget({ + selectCard:Math.floor(player.countCards('h')/2), + filterTarget:function(card,player,target){ + return target.isFewestHandcard(); + }, + forced:true, + ai2:function(target){ + return get.attitude(_status.event.player,target); + } + }); + "step 1" + if(result.targets&&result.targets[0]){ + result.targets[0].gain(result.cards,player); + player.$give(result.cards.length,result.targets[0]); + } + } + }, + dimeng:{ + audio:2, + enable:'phaseUse', + usable:1, + position:'he', + filterCard:function(){ + if(ui.selected.targets.length==2) return false; + return true; + }, + selectCard:[0,Infinity], + selectTarget:2, + complexCard:true, + filterTarget:function(card,player,target){ + if(player==target) return false; + if(ui.selected.targets.length==0) return true; + return (Math.abs(ui.selected.targets[0].countCards('h')-target.countCards('h'))== + ui.selected.cards.length); + }, + multitarget:true, + multiline:true, + content:function(){ + targets[0].swapHandcards(targets[1]); + }, + check:function(card){ + var list=[],player=_status.event.player; + var num=player.countCards('he'); + var count; + var players=game.filterPlayer(); + for(var i=0;i3) list.push(players[i]); + } + list.sort(function(a,b){ + return a.countCards('h')-b.countCards('h'); + }); + if(list.length==0) return -1; + var from=list[0]; + list.length=0; - for(var i=0;i=list[0].countCards('h')) return -1; - for(var i=0;i=2) return -1; - if(ui.selected.cards.length3) list.push(players[i]); - } - list.sort(function(a,b){ - return a.countCards('h')-b.countCards('h'); - }); - if(target==list[0]) return get.attitude(player,target); - return -get.attitude(player,target); - } - else{ - var from=ui.selected.targets[0]; - for(var i=0;i=list[0].countCards('h')) return -get.attitude(player,target); - for(var i=0;i=2) return -get.attitude(player,target); - if(target==list[i]) return get.attitude(player,target); - return -get.attitude(player,target); - } - } - } - } - } - } - }, - yinghun:{ - audio:2, - audioname:['sunce'], - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - return player.hp0){ - return 10+get.attitude(_status.event.player,target); - } - if(player.maxHp-player.hp==1){ - return -1; - } - return 1; - }); - "step 1" - if(result.bool){ - event.num=player.maxHp-player.hp; - if(player.countCards('e')>=player.hp){ - event.num=player.maxHp; - } - player.logSkill('yinghun',result.targets); - event.target=result.targets[0]; - if(event.num==1){ - event.directcontrol=true; - } - else{ - var str1='摸'+get.cnNumber(event.num,true)+'弃一'; - var str2='摸一弃'+get.cnNumber(event.num,true); - player.chooseControl(str1,str2,function(event,player){ - return _status.event.choice; - }).set('choice',get.attitude(player,event.target)>0?str1:str2); - event.str=str1; - } - } - else{ - event.finish(); - } - "step 2" - if(event.directcontrol||result.control==event.str){ - event.target.draw(event.num); - event.target.chooseToDiscard(true,'he'); - } - else{ - event.target.draw(); - event.target.chooseToDiscard(event.num,true,'he'); - } - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1||target.countCards('e')>=target.hp) return 2; - if(target.hp==target.maxHp) return 0.5; - if(target.hp==2) return 1.5; - return 0.5; - }, - maixie:true, - effect:{ - target:function(card,player,target){ - if(target.maxHp<=3) return; - if(get.tag(card,'damage')){ - if(target.hp==target.maxHp) return [0,1]; - } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - gzyinghun:{ - audio:'yinghun', - audioname:['sunce'], - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - return player.hp0){ - return 10+get.attitude(_status.event.player,target); - } - if(player.maxHp-player.hp==1){ - return -1; - } - return 1; - }); - "step 1" - if(result.bool){ - event.num=player.maxHp-player.hp; - player.logSkill(event.name,result.targets); - event.target=result.targets[0]; - if(event.num==1){ - event.directcontrol=true; - } - else{ - var str1='摸'+get.cnNumber(event.num,true)+'弃一'; - var str2='摸一弃'+get.cnNumber(event.num,true); - player.chooseControl(str1,str2,function(event,player){ - return _status.event.choice; - }).set('choice',get.attitude(player,event.target)>0?str1:str2); - event.str=str1; - } - } - else{ - event.finish(); - } - "step 2" - if(event.directcontrol||result.control==event.str){ - event.target.draw(event.num); - event.target.chooseToDiscard(true,'he'); - } - else{ - event.target.draw(); - event.target.chooseToDiscard(event.num,true,'he'); - } - }, - ai:{ - threaten:function(player,target){ - if(target.hp==target.maxHp) return 0.5; - if(target.hp==1) return 2; - if(target.hp==2) return 1.5; - return 0.5; - }, - maixie:true, - effect:{ - target:function(card,player,target){ - if(target.maxHp<=3) return; - if(get.tag(card,'damage')){ - if(target.hp==target.maxHp) return [0,1]; - } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - jiuchi:{ - audio:2, - enable:'chooseToUse', - filterCard:function(card){ - return get.suit(card)=='spade'; - }, - viewAs:{name:'jiu'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{suit:'spade'})) return false; - }, - prompt:'将一张黑桃手牌当酒使用', - check:function(card){ - if(_status.event.type=='dying') return 1; - return 4-get.value(card); - }, - ai:{ - skillTagFilter:function(player){ - return player.countCards('h',{suit:'spade'})>0&&player.hp<=0; - }, - threaten:1.5, - save:true, - } - }, - roulin:{ - audio:2, - trigger:{player:'shaBegin',target:'shaBegin'}, - forced:true, - filter:function(event,player){ - if(event.directHit) return false; - if(player==event.player){ - return event.target.sex=='female'; - } - return event.player.sex=='female'; - }, - check:function(event,player){ - return player==event.player; - }, - content:function(){ - "step 0" - var next=trigger.target.chooseToRespond({name:'shan'}); - next.autochoose=lib.filter.autoRespondShan; - next.ai=function(card){ - if(trigger.target.countCards('h','shan')>1){ - return get.unuseful2(card); - } - return -1; - }; - "step 1" - if(result.bool==false){ - trigger.untrigger(); - trigger.directHit=true; - } - } - }, - benghuai:{ - audio:4, - trigger:{player:'phaseEnd'}, - forced:true, - check:function(){ - return false; - }, - filter:function(event,player){ - return !player.isLowestHp(); - }, - content:function(){ - "step 0" - player.chooseControl('baonue_hp','baonue_maxHp',function(event,player){ - if(player.hp==player.maxHp) return 'baonue_hp'; - if(player.hp0); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - player.logSkill('baonue',event.current); - player.judge(function(card){ - if(get.suit(card)=='spade') return 4; - return 0; - }); - } - else{ - event.goto(1); - } - 'step 3' - if(result.suit=='spade'){ - event.current.recover(); - } - event.goto(1); - } - }, - luanwu:{ - audio:2, - unique:true, - enable:'phaseUse', - filter:function(event,player){ - return !player.storage.luanwu; - }, - init:function(player){ - player.storage.luanwu=false; - }, - mark:true, - intro:{ - content:'limited' - }, - skillAnimation:'epic', - animationColor:'thunder', - filterTarget:function(card,player,target){ - return target!=player; - }, - selectTarget:-1, - multitarget:true, - multiline:true, - content:function(){ - "step 0" - player.unmarkSkill('luanwu') - player.storage.luanwu=true; - event.current=player.next; - "step 1" - event.current.animate('target'); - event.current.chooseToUse('乱舞:使用一张杀或流失一点体力',{name:'sha'},function(card,player,target){ - if(player==target) return false; - if(!player.canUse('sha',target)) return false; - if(get.distance(player,target)<=1) return true; - if(game.hasPlayer(function(current){ - return current!=player&&get.distance(player,current)0) att=1; - if(att<0) att=-1; - if(players[i]!=player&&players[i].hp<=3){ - if(players[i].countCards('h')==0) num+=att/players[i].hp; - else if(players[i].countCards('h')==1) num+=att/2/players[i].hp; - else if(players[i].countCards('h')==2) num+=att/4/players[i].hp; - } - if(players[i].hp==1) num+=att*1.5; - } - if(player.hp==1){ - return -num; - } - if(player.hp==2){ - return -game.players.length/4-num; - } - return -game.players.length/3-num; - } - } - } - }, - wansha:{ - locked:true, - global:'wansha2' - }, - wansha2:{ - mod:{ - cardSavable:function(card,player){ - if(!_status.currentPhase) return; - if(_status.currentPhase.hasSkill('wansha')&&_status.currentPhase!=player){ - if(card.name=='tao'&&_status.event.dying!=player) return false; - } - } - } - }, - weimu:{ - mod:{ - targetEnabled:function(card){ - if((get.type(card)=='trick'||get.type(card)=='delay')&& - get.color(card)=='black') return false; - } - } - }, - huoji:{ - audio:2, - enable:'chooseToUse', - filterCard:function(card){ - return get.color(card)=='red'; - }, - viewAs:{name:'huogong',nature:'fire'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{color:'red'})) return false; - }, - prompt:'将一张红色牌当火攻使用', - check:function(card){ - var player=_status.currentPhase; - if(player.countCards('h')>player.hp){ - return 6-get.value(card); - } - return 4-get.value(card) - } - }, - bazhen:{ - audio:2, - inherit:'bagua_skill', - filter:function(event,player){ - if(!lib.skill.bagua_skill.filter(event,player)) return false; - if(player.getEquip(2)) return false; - return true; - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player==target&&get.subtype(card)=='equip2'){ - if(get.equipValue(card)<=7.5) return 0; - } - if(target.getEquip(2)) return; - return lib.skill.bagua_skill.ai.effect.target.apply(this,arguments); - } - } - } - }, - kanpo:{ - audio:2, - enable:'chooseToUse', - filterCard:function(card){ - return get.color(card)=='black'; - }, - viewAsFilter:function(player){ - return player.countCards('h',{color:'black'})>0; - }, - viewAs:{name:'wuxie'}, - prompt:'将一张黑色手牌当无懈可击使用', - check:function(card){return 8-get.value(card)}, - threaten:1.2 - }, - lianhuan:{ - group:['lianhuan1','lianhuan2'] - }, - lianhuan1:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h',{suit:'club'})>0; - }, - filterCard:function(card){ - return get.suit(card)=='club'; - }, - viewAs:{name:'tiesuo'}, - prompt:'将一张梅花牌当铁锁连环使用', - check:function(card){return 4-get.value(card)} - }, - lianhuan2:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h',{suit:'club'})>0; - }, - filterCard:function(card){ - return get.suit(card)=='club'; - }, - check:function(card){ - return 5-get.useful(card); - }, - content:function(){ - player.draw(); - }, - discard:false, - prompt:'将一张梅花牌置入弃牌堆并摸一张牌', - delay:0.5, - prepare:function(cards,player){ - player.$throw(cards,1000); - }, - ai:{ - basic:{ - order:1 - }, - result:{ - player:1, - }, - } - }, - niepan:{ - audio:2, - unique:true, - enable:'chooseToUse', - mark:true, - skillAnimation:true, - animationStr:'涅盘', - animationColor:'fire', - init:function(player){ - player.storage.niepan=false; - }, - filter:function(event,player){ - if(player.storage.niepan) return false; - if(event.type=='dying'){ - if(player!=event.dying) return false; - return true; - } - else if(event.parent.name=='phaseUse'){ - return true; - } - return false; - }, - content:function(){ - 'step 0' - player.hp=Math.min(3,player.maxHp); - player.discard(player.getCards('hej')); - player.draw(3); - player.awakenSkill('niepan'); - player.storage.niepan=true; - 'step 1' - player.link(false); - 'step 2' - player.turnOver(false); - }, - ai:{ - order:1, - skillTagFilter:function(player){ - if(player.storage.niepan) return false; - if(player.hp>0) return false; - }, - save:true, - result:{ - player:function(player){ - if(player.hp==0) return 10; - if(player.hp<=2&&player.countCards('he')<=1) return 10; - return 0; - } - }, - threaten:function(player,target){ - if(!target.storage.niepan) return 0.6; - } - }, - intro:{ - content:'limited' - } - }, - oldniepan:{ - audio:'niepan', - unique:true, - enable:'chooseToUse', - mark:true, - skillAnimation:true, - animationStr:'涅盘', - animationColor:'fire', - init:function(player){ - player.storage.oldniepan=false; - }, - filter:function(event,player){ - if(player.storage.oldniepan) return false; - if(event.type=='dying'){ - if(player!=event.dying) return false; - return true; - } - return false; - }, - content:function(){ - 'step 0' - player.hp=Math.min(3,player.maxHp); - player.discard(player.getCards('hej')); - player.draw(3); - player.awakenSkill('oldniepan'); - player.storage.oldniepan=true; - 'step 1' - player.link(false); - 'step 2' - player.turnOver(false); - }, - ai:{ - order:1, - skillTagFilter:function(player){ - if(player.storage.oldniepan) return false; - if(player.hp>0) return false; - }, - save:true, - result:{ - player:function(player){ - if(player.hp==0) return 10; - if(player.hp<=2&&player.countCards('he')<=1) return 10; - return 0; - } - }, - threaten:function(player,target){ - if(!target.storage.oldniepan) return 0.6; - } - }, - intro:{ - content:'limited' - } - }, - quhu:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - if(player.countCards('h')==0) return false; - return game.hasPlayer(function(current){ - return current.hp>player.hp&¤t.countCards('h'); - }); - }, - filterTarget:function(card,player,target){ - return target.hp>player.hp&&target.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(target); - "step 1" - if(result.bool){ - if(game.hasPlayer(function(player){ - return player!=target&&get.distance(target,player,'attack')<=1; - })){ - player.chooseTarget(function(card,player,target){ - var source=_status.event.source; - return target!=source&&get.distance(source,target,'attack')<=1; - },true).set('ai',function(target){ - return get.damageEffect(target,_status.event.source,player); - }).set('source',target); - } - else{ - event.finish(); - } - } - else{ - player.damage(target); - event.finish(); - } - "step 2" - if(result.bool&&result.targets&&result.targets.length){ - target.line(result.targets[0],'green'); - result.targets[0].damage(target); - } - }, - ai:{ - order:0.5, - result:{ - target:function(player,target){ - var att=get.attitude(player,target); - var oc=(target.countCards('h')==1); - if(att>0&&oc) return 0; - var players=game.filterPlayer(); - for(var i=0;i0){ - return att>0?att/2:att-(oc?5:0); - } - } - } - return 0; - }, - player:function(player,target){ - if(target.hasSkillTag('jueqing')) return -10; - var mn=1; - var hs=player.getCards('h'); - for(var i=0;i2){ - max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max); - } - } - switch(max){ - case 0:return mn==13?0:-20; - case 1:return mn>=12?0:-15; - case 2:return 0; - case 3:return 1; - default:return max; - } - } - }, - expose:0.2 - } - }, - jieming:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('jieming'),[1,trigger.num],function(card,player,target){ - return target.countCards('h')2){ - return Math.min(5,target.maxHp)-target.countCards('h'); - } - return att/3; - }); - "step 1" - if(result.bool){ - player.logSkill('jieming',result.targets); - for(var i=0;i1){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - var max=0; - var players=game.filterPlayer(); - for(var i=0;i0){ - max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max); - } - } - switch(max){ - case 0:return 2; - case 1:return 1.5; - case 2:return [1,2]; - default:return [0,max]; - } - } - if((card.name=='tao'||card.name=='caoyao')&& - target.hp>1&&target.countCards('h')<=target.hp) return [0,0]; - } - }, - } - }, - qiangxi:{ - audio:2, - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return get.subtype(card)=='equip1'; - }, - selectCard:[0,1], - filterTarget:function(card,player,target){ - if(player==target) return false; - return get.distance(player,target,'attack')<=1; - }, - content:function(){ - "step 0" - if(cards.length==0){ - player.loseHp(); - } - "step 1" - target.damage(); - }, - check:function(card){ - return 10-get.value(card); - }, - position:'he', - ai:{ - order:8, - result:{ - player:function(player,target){ - if(player.getEquip(1)) return 0; - if(player.hp>=target.hp) return -0.9; - if(player.hp<=2) return -10; - return -2; - }, - target:function(player,target){ - if(!player.getEquip(1)){ - if(player.hp<2) return 0; - if(player.hp==2&&target.hp>=2) return 0; - if(target.hp>player.hp) return 0; - } - return get.damageEffect(target,player); - } - } - }, - threaten:1.3 - }, - xinqiangxi:{ - audio:'qiangxi', - enable:'phaseUse', - filter:function(event,player){ - if(player.hasSkill('xinqiangxi2')){ - return !player.hasSkill('xinqiangxi3'); - } - else if(player.hasSkill('xinqiangxi3')){ - return !player.hasSkill('xinqiangxi2')&&player.countCards('he',{type:'equip'})>0; - } - else{ - return true; - } - }, - filterCard:function(card){ - var player=_status.event.player; - if(player.hasSkill('xinqiangxi2')) return false; - return get.type(card)=='equip'; - }, - selectCard:function(){ - var player=_status.event.player; - if(player.hasSkill('xinqiangxi2')) return -1; - if(player.hasSkill('xinqiangxi3')) return [1,1]; - return [0,1]; - }, - filterTarget:function(card,player,target){ - if(player==target) return false; - return get.distance(player,target,'attack')<=1; - }, - content:function(){ - "step 0" - if(cards.length==0){ - player.loseHp(); - player.addTempSkill('xinqiangxi3','phaseAfter'); - } - else{ - player.addTempSkill('xinqiangxi2','phaseAfter'); - } - "step 1" - target.damage(); - }, - check:function(card){ - return 10-get.value(card); - }, - position:'he', - ai:{ - order:8.5, - result:{ - target:function(player,target){ - if(player.hasSkill('xinqiangxi2')||!player.countCards('he',{type:'equip'})){ - if(player.hp<2) return 0; - if(target.hp>=player.hp) return 0; - } - return get.damageEffect(target,player); - } - } - }, - threaten:1.5 - }, - xinqiangxi2:{}, - xinqiangxi3:{}, - tianyi:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h')>0; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(target); - "step 1" - if(result.bool){ - player.addTempSkill('tianyi2','phaseAfter'); - } - else{ - player.addTempSkill('tianyi3','phaseAfter'); - } - }, - ai:{ - order:function(name,player){ - var cards=player.getCards('h'); - if(player.countCards('h','sha')==0){ - return 1; - } - for(var i=0;i11&&get.value(cards[i])<7){ - return 9; - } - } - return get.order({name:'sha'})-1; - }, - result:{ - player:function(player){ - if(player.countCards('h','sha')>0) return 0.6; - var num=player.countCards('h'); - if(num>player.hp) return 0; - if(num==1) return -2; - if(num==2) return -1; - return -0.7; - }, - target:function(player,target){ - var num=target.countCards('h'); - if(num==1) return -1; - if(num==2) return -0.7; - return -0.5 - }, - }, - threaten:1.3 - } - }, - tianyi2:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(card.name=='sha') return true; - }, - selectTarget:function(card,player,range){ - if(card.name=='sha'&&range[1]!=-1) range[1]++; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; - } - }, - }, - tianyi3:{ - mod:{ - cardEnabled:function(card){if(card.name=='sha') return false} - } - }, - shuangxiong:{ - audio:true, - trigger:{player:'phaseDrawBefore'}, - check:function(event,player){ - if(player.countCards('h')>player.hp) return true; - if(player.countCards('h')>3) return true; - return false; - }, - content:function(){ - "step 0" - player.judge(ui.special); - "step 1" - player.gain(result.card); - player.$gain2(result.card); - player.addTempSkill('shuangxiong2','phaseAfter'); - player.storage.shuangxiong=get.color(result.card); - trigger.untrigger(); - trigger.finish(); - } - }, - shuangxiong2:{ - audio:true, - enable:'phaseUse', - viewAs:{name:'juedou'}, - filterCard:function(card,player){ - return get.color(card)!=player.storage.shuangxiong; - }, - check:function(card){ - return 6-get.value(card); - }, - ai:{ - basic:{ - order:10 - } - } - }, - luanji:{ - audio:2, - enable:'phaseUse', - viewAs:{name:'wanjian'}, - filterCard:function(card,player){ - if(ui.selected.cards.length){ - return get.suit(card)==get.suit(ui.selected.cards[0]); - } - var cards=player.getCards('h'); - for(var i=0;i0; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - content:function(){ - player.discardPlayerCard('he',trigger.target,true); - } - }, - jiewei:{ - trigger:{player:'turnOverEnd'}, - direct:true, - audio:2, - content:function(){ - 'step 0' - player.chooseToUse(function(card){ - if(!lib.filter.cardEnabled(card,_status.event.player,_status.event)){ - return false; - } - var type=get.type(card,'trick'); - return type=='trick'||type=='equip'; - },'是否使用一张锦囊牌或装备牌?').set('logSkill','jiewei'); - 'step 1' - if(result.bool){ - var type=get.type(result.card||result.cards[0]); - if(game.hasPlayer(function(current){ - if(type=='equip'){ - return current.countCards('e'); - } - else{ - return current.countCards('j'); - } - })){ - var next=player.chooseTarget('是否弃置场上的一张'+get.translation(type)+'牌?',function(card,player,target){ - if(_status.event.type=='equip'){ - return target.countCards('e')>0; - } - else{ - return target.countCards('j')>0; - } - }); - next.set('ai',function(target){ - if(type=='equip'){ - return -get.attitude(player,target); - } - else{ - return get.attitude(player,target); - } - }); - next.set('type',type); - event.type=type; - } - else{ - event.finish(); - } - } - else{ - event.finish(); - } - 'step 2' - if(event.type&&result.bool&&result.targets&&result.targets.length){ - player.line(result.targets,'green'); - if(event.type=='equip'){ - player.discardPlayerCard(result.targets[0],'e',true); - } - else{ - player.discardPlayerCard(result.targets[0],'j',true); - } - } - } - }, - releiji:{ - audio:2, - audioname:['boss_qinglong'], - trigger:{player:'respond'}, - filter:function(event,player){ - return event.card.name=='shan'; - }, - direct:true, - content:function(){ - "step 0"; - player.chooseTarget(get.prompt('releiji')).ai=function(target){ - if(target.hasSkill('hongyan')) return 0; - return get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); - }; - "step 1" - if(result.bool){ - player.logSkill('releiji',result.targets,'thunder'); - event.target=result.targets[0]; - event.target.judge(function(card){ - var suit=get.suit(card); - if(suit=='spade') return -4; - if(suit=='club') return -2; - return 0; - }); - } - else{ - event.finish(); - } - "step 2" - if(result.suit=='club'){ - event.target.damage('thunder'); - player.recover(); - } - else if(result.suit=='spade'){ - event.target.damage(2,'thunder'); - } - }, - ai:{ - useShan:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')){ - var hastarget=game.hasPlayer(function(current){ - return get.attitude(target,current)<0; - }); - var be=target.countCards('e',{color:'black'}); - if(target.countCards('h','shan')&&be){ - if(!target.hasSkill('guidao')) return 0; - return [0,hastarget?target.countCards('he')/2:0]; - } - if(target.countCards('h','shan')&&target.countCards('h')>2){ - if(!target.hasSkill('guidao')) return 0; - return [0,hastarget?target.countCards('h')/4:0]; - } - if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){ - return [0,0]; - } - if(target.countCards('h')==0){ - return [1.5,0]; - } - if(target.countCards('h')==1&&!be){ - return [1.2,0]; - } - if(!target.hasSkill('guidao')) return [1,0.05]; - return [1,Math.min(0.5,(target.countCards('h')+be)/4)]; - } - } - } - } - }, - shensu:{ - group:['shensu1','shensu2'] - }, - xinshensu:{ - group:['shensu1','shensu2','shensu4'] - }, - shensu1:{ - audio:2, - trigger:{player:'phaseBegin'}, - direct:true, - content:function(){ - "step 0" - var check= player.countCards('h')>2; - player.chooseTarget(get.prompt('shensu'),function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target,false); - }).set('check',check).set('ai',function(target){ - if(!_status.event.check) return 0; - return get.effect(target,{name:'sha'},_status.event.player); - }); - "step 1" - if(result.bool){ - player.logSkill('shensu1',result.targets); - player.useCard({name:'sha'},result.targets[0],false); - player.skip('phaseJudge'); - player.skip('phaseDraw'); - } - } - }, - shensu2:{ - audio:2, - trigger:{player:'phaseUseBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - content:function(){ - "step 0" - var check=player.needsToDiscard(); - player.chooseCardTarget({ - prompt:get.prompt('shensu'), - filterCard:function(card,player){ - return get.type(card)=='equip'&&lib.filter.cardDiscardable(card,player) - }, - position:'he', - filterTarget:function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target,false); - }, - ai1:function(card){ - if(_status.event.check) return 0; - return 6-get.value(card); - }, - ai2:function(target){ - if(_status.event.check) return 0; - return get.effect(target,{name:'sha'},_status.event.player); - }, - check:check - }); - "step 1" - if(result.bool){ - player.logSkill('shensu2',result.targets); - player.discard(result.cards[0]); - player.useCard({name:'sha'},result.targets[0]); - trigger.untrigger(); - trigger.finish(); - } - } - }, - shensu4:{ - audio:'shensu1', - trigger:{player:'phaseDiscardBefore'}, - direct:true, - content:function(){ - "step 0" - var check=player.needsToDiscard()||player.isTurnedOver(); - player.chooseTarget(get.prompt('shensu'),function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target,false); - }).set('check',check).set('ai',function(target){ - if(!_status.event.check) return 0; - return get.effect(target,{name:'sha'},_status.event.player); - }); - "step 1" - if(result.bool){ - player.logSkill('shensu4',result.targets); - player.turnOver(); - player.useCard({name:'sha'},result.targets[0],false); - trigger.untrigger(); - trigger.finish(); - } - } - }, - jushou:{ - audio:true, - trigger:{player:'phaseEnd'}, - content:function(){ - player.draw(3); - player.turnOver(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(card.name=='guiyoujie') return [0,1]; - } - } - }, - }, - liegong:{ - audio:2, - trigger:{player:'shaBegin'}, - check:function(event,player){ - return get.attitude(player,event.target)<=0; - }, - logTarget:'target', - filter:function(event,player){ - var length=event.target.countCards('h'); - return (length>=player.hp||length<=player.getAttackRange()); - }, - content:function(){ - trigger.directHit=true; - }, - mod:{ - attackFrom:function(from,to,distance){ - if(get.zhu(from,'shouyue')) return distance-1; - } - } - }, - kuanggu:{ - audio:2, - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event,player){ - return get.distance(player,event.player)<=1&&player.isDamaged(); - }, - content:function(){ - player.recover(trigger.num); - } - }, - tianxiang:{ - audio:2, - trigger:{player:'damageBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('h',{suit:'heart'})>0&&event.num>0; - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - filterCard:function(card,player){ - return get.suit(card)=='heart'&&lib.filter.cardDiscardable(card,player); - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - return 10-get.value(card); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - var trigger=_status.event.getTrigger(); - var da=0; - if(_status.event.player.hp==1){ - da=10; - } - if(trigger.num>1){ - if(target.maxHp>5&&target.hp>1) return -att/10+da; - return -att+da; - } - var eff=get.damageEffect(target,trigger.source,target,trigger.nature); - if(att==0) return 0.1+da; - if(eff>=0&&trigger.num==1){ - return att+da; - } - if(target.hp==target.maxHp) return -att+da; - if(target.hp==1){ - if(target.maxHp<=4&&!target.hasSkillTag('maixie')){ - if(target.maxHp<=3){ - return -att+da; - } - return -att/2+da; - } - return da; - } - if(target.hp==target.maxHp-1){ - if(target.hp>2||target.hasSkillTag('maixie')) return att/5+da; - if(att>0) return 0.02+da; - return 0.05+da; - } - return att/2+da; - }, - prompt:get.prompt('tianxiang') - }); - "step 1" - if(result.bool){ - player.logSkill(event.name,result.targets); - trigger.untrigger(); - trigger.player=result.targets[0]; - trigger.player.addSkill('tianxiang2'); - player.discard(result.cards[0]); - } - else{ - event.finish(); - } - "step 2" - trigger.trigger('damageBefore'); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return; - if(get.tag(card,'damage')&&target.countCards('h')>1) return 0.7; - } - }, - threaten:function(player,target){ - if(target.countCards('h')==0) return 2; - } - } - }, - tianxiang2:{ - trigger:{player:['damageAfter','damageCancelled','damageZero']}, - forced:true, - popup:false, - audio:false, - content:function(){ - if(player.hp0&&event.num>0&&!player.hasSkill('xintianxiang3'); - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - filterCard:function(card,player){ - return get.suit(card)=='heart'&&lib.filter.cardDiscardable(card,player); - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - position:'he', - ai1:function(card){ - return 10-get.value(card); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - var trigger=_status.event.getTrigger(); - var da=0; - if(_status.event.player.hp==1){ - da=10; - } - if(trigger.num>1){ - if(target.maxHp>5&&target.hp>1) return -att/10+da; - return -att+da; - } - var eff=get.damageEffect(target,trigger.source,target,trigger.nature); - if(att==0) return 0.1+da; - if(eff>=0&&trigger.num==1){ - return att+da; - } - if(target.hp==target.maxHp) return -att+da; - if(target.hp==1){ - if(target.maxHp<=4&&!target.hasSkillTag('maixie')){ - if(target.maxHp<=3){ - return -att+da; - } - return -att/2+da; - } - return da; - } - if(target.hp==target.maxHp-1){ - if(target.hp>2||target.hasSkillTag('maixie')) return att/5+da; - if(att>0) return 0.02+da; - return 0.05+da; - } - return att/2+da; - }, - prompt:get.prompt('tianxiang') - }); - "step 1" - if(result.bool){ - player.logSkill(event.name,result.targets); - trigger.untrigger(); - trigger.player=result.targets[0]; - trigger.player.addSkill('xintianxiang2'); - trigger.player.storage.xintianxiang=player; - player.discard(result.cards[0]); - } - else{ - event.finish(); - } - "step 2" - trigger.trigger('damageBefore'); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return; - if(get.tag(card,'damage')&&target.countCards('he')>1) return 0.7; - } - }, - } - }, - xintianxiang2:{ - trigger:{player:['damageAfter','damageCancelled','damageZero']}, - forced:true, - popup:false, - audio:false, - content:function(){ - 'step 0' - var source=player.storage.xintianxiang; - if(source.isDead()){ - event.finish(); - return; - } - var num=player.maxHp-player.hp||0; - var str1='令'+get.translation(player)+'摸'+get.cnNumber(num)+'张牌'; - var str2='令'+get.translation(player)+'防止造成和受到的所有伤害且天香失效直到你下一回合开始'; - var att=get.attitude(source,player); - var choice='选项一'; - if(att<0){ - if(num>=2){ - choice='选项二'; - } - } - else if(att>0){ - if(num<2&&!player.hasSkillTag('maixie')){ - choice='选项二'; - } - } - source.chooseControl(function(){ - return _status.event.choice; - }).set('choiceList',[str1,str2]).set('choice',choice); - 'step 1' - if(result.control=='选项一'){ - if(player.isDamaged()){ - player.draw(player.maxHp-player.hp); - } - } - else{ - player.storage.xintianxiang.addSkill('xintianxiang3'); - player.storage.xintianxiang.storage.xintianxiang3=player; - player.addSkill('xintianxiang4'); - } - player.removeSkill('xintianxiang2'); - delete player.storage.xintianxiang; - } - }, - xintianxiang3:{ - trigger:{player:['phaseBegin','dieBegin']}, - forced:true, - popup:false, - silent:true, - content:function(){ - if(player.storage.xintianxiang3){ - player.storage.xintianxiang3.removeSkill('xintianxiang4'); - delete player.storage.xintianxiang3; - } - player.removeSkill('xintianxiang3'); - } - }, - xintianxiang4:{ - trigger:{source:'damageBefore',player:'damageBefore'}, - forced:true, - mark:true, - intro:{ - content:'防止造成和受到的一切伤害' - }, - priority:15, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - nofire:true, - nothunder:true, - nodamage:true, - notrick:true, - notricksource:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'damage')){ - return 'zeroplayertarget'; - } - }, - player:function(card,player,target,current){ - if(get.tag(card,'damage')){ - return 'zeroplayertarget'; - } - } - } - } - }, - hongyan:{ - mod:{ - suit:function(card,suit){ - if(suit=='spade') return 'heart'; - } - } - }, - gzbuqu:{ - audio:'buqu', - trigger:{player:'changeHp'}, - filter:function(event,player){ - return player.hp<=0&&event.num<0; - }, - init:function(player){ - player.storage.gzbuqu=[]; - }, - priority:-15, - intro:{ - content:'cards' - }, - group:'gzbuqu_recover', - locked:true, - frequent:true, - ondisable:true, - onremove:function(player){ - if(player.storage.gzbuqu.length){ - delete player.nodying; - player.hp=1-player.storage.gzbuqu.length; - game.log(player,'移去了不屈牌',player.storage.gzbuqu); - while(player.storage.gzbuqu.length){ - ui.discardPile.appendChild(player.storage.gzbuqu.shift()); - } - player.unmarkSkill('gzbuqu'); - player.dying({}); - } - }, - process:function(player){ - delete player.nodying; - player.markSkill('gzbuqu'); - player.syncStorage('gzbuqu'); - var nums=[]; - var cards=player.storage.gzbuqu; - for(var i=0;i0&&event.num>0; - }, - forced:true, - popup:false, - content:function(){ - 'step 0' - if(player.hp>=player.storage.gzbuqu.length){ - player.hp-=player.storage.gzbuqu.length-1; - player.update(); - while(player.storage.gzbuqu.length){ - ui.discardPile.appendChild(player.storage.gzbuqu.shift()); - } - player.unmarkSkill('gzbuqu'); - delete player.nodying; - event.finish(); - } - else{ - player.chooseCardButton('移去'+get.cnNumber(player.hp)+'张不屈牌',true,player.hp,player.storage.gzbuqu).set('ai',function(button){ - var buttons=get.selectableButtons(); - for(var i=0;i0&&player.hp<=0}, - content:function(){ - "step 0" - event.card=get.cards()[0]; - if(player.storage.buqu==undefined) player.storage.buqu=[]; - player.storage.buqu.push(event.card); - player.syncStorage('buqu'); - player.showCards(player.storage.buqu,'不屈') - player.markSkill('buqu'); - "step 1" - for(var i=0;i2; - }, - content:function(){ - "step 0" - player.line(trigger.player,'green'); - player.loseHp(); - "step 1" - trigger.player.draw(2); - }, - }, - leiji:{ - audio:2, - trigger:{player:'respond'}, - filter:function(event,player){ - return event.card.name=='shan'; - }, - direct:true, - content:function(){ - "step 0"; - player.chooseTarget(get.prompt('leiji')).ai=function(target){ - if(target.hasSkill('hongyan')) return 0; - return get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); - }; - "step 1" - if(result.bool){ - player.logSkill('leiji',result.targets,'thunder'); - event.target=result.targets[0]; - event.target.judge(function(card){ - if(get.suit(card)=='spade') return -4; - return 0; - }); - } - else{ - event.finish(); - } - "step 2" - if(result.bool==false){ - event.target.damage(2,'thunder'); - } - }, - ai:{ - mingzhi:false, - useShan:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')){ - var hastarget=game.hasPlayer(function(current){ - return get.attitude(target,current)<0; - }); - if(target.countCards('h','shan')&&target.countCards('e',{suit:'spade'})){ - return [0,hastarget?target.countCards('he')/2:0]; - } - if(target.countCards('h','shan')){ - return [1,hastarget?target.countCards('he')/2:0]; - } - return [1,target.countCards('h')/4]; - } - } - } - } - }, - guidao:{ - audio:2, - trigger:{global:'judge'}, - filter:function(event,player){ - return player.countCards('he',{color:'black'})>0; - }, - direct:true, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('guidao'),'he',function(card){ - return get.color(card)=='black'; - }).set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result; - } - else{ - return -result; - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.logSkill('guidao'); - player.$gain2(trigger.player.judging[0]); - player.gain(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - if(!get.owner(result.cards[0],'judge')){ - trigger.position.appendChild(result.cards[0]); - } - game.log(trigger.player,'的判定牌改为',result.cards[0]); - } - "step 3" - game.delay(2); - }, - ai:{ - tag:{ - rejudge:1 - } - } - }, - guhuo:{ - enable:'phaseUse', - usable:1, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0 - }, - chooseButton:{ - dialog:function(){ - var list=['sha','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; - for(var i=0;i=3&&player.hp>=3) return 0; - for(var i=0;i=list[0].countCards('h')) return -1; + for(var i=0;i=2) return -1; + if(ui.selected.cards.length3) list.push(players[i]); + } + list.sort(function(a,b){ + return a.countCards('h')-b.countCards('h'); + }); + if(target==list[0]) return get.attitude(player,target); + return -get.attitude(player,target); + } + else{ + var from=ui.selected.targets[0]; + for(var i=0;i=list[0].countCards('h')) return -get.attitude(player,target); + for(var i=0;i=2) return -get.attitude(player,target); + if(target==list[i]) return get.attitude(player,target); + return -get.attitude(player,target); + } + } + } + } + } + } + }, + yinghun:{ + audio:2, + audioname:['sunce'], + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + return player.hp0){ + return 10+get.attitude(_status.event.player,target); + } + if(player.maxHp-player.hp==1){ + return -1; + } + return 1; + }); + "step 1" + if(result.bool){ + event.num=player.maxHp-player.hp; + if(player.countCards('e')>=player.hp){ + event.num=player.maxHp; + } + player.logSkill('yinghun',result.targets); + event.target=result.targets[0]; + if(event.num==1){ + event.directcontrol=true; + } + else{ + var str1='摸'+get.cnNumber(event.num,true)+'弃一'; + var str2='摸一弃'+get.cnNumber(event.num,true); + player.chooseControl(str1,str2,function(event,player){ + return _status.event.choice; + }).set('choice',get.attitude(player,event.target)>0?str1:str2); + event.str=str1; + } + } + else{ + event.finish(); + } + "step 2" + if(event.directcontrol||result.control==event.str){ + event.target.draw(event.num); + event.target.chooseToDiscard(true,'he'); + } + else{ + event.target.draw(); + event.target.chooseToDiscard(event.num,true,'he'); + } + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1||target.countCards('e')>=target.hp) return 2; + if(target.hp==target.maxHp) return 0.5; + if(target.hp==2) return 1.5; + return 0.5; + }, + maixie:true, + effect:{ + target:function(card,player,target){ + if(target.maxHp<=3) return; + if(get.tag(card,'damage')){ + if(target.hp==target.maxHp) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + gzyinghun:{ + audio:'yinghun', + audioname:['sunce'], + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + return player.hp0){ + return 10+get.attitude(_status.event.player,target); + } + if(player.maxHp-player.hp==1){ + return -1; + } + return 1; + }); + "step 1" + if(result.bool){ + event.num=player.maxHp-player.hp; + player.logSkill(event.name,result.targets); + event.target=result.targets[0]; + if(event.num==1){ + event.directcontrol=true; + } + else{ + var str1='摸'+get.cnNumber(event.num,true)+'弃一'; + var str2='摸一弃'+get.cnNumber(event.num,true); + player.chooseControl(str1,str2,function(event,player){ + return _status.event.choice; + }).set('choice',get.attitude(player,event.target)>0?str1:str2); + event.str=str1; + } + } + else{ + event.finish(); + } + "step 2" + if(event.directcontrol||result.control==event.str){ + event.target.draw(event.num); + event.target.chooseToDiscard(true,'he'); + } + else{ + event.target.draw(); + event.target.chooseToDiscard(event.num,true,'he'); + } + }, + ai:{ + threaten:function(player,target){ + if(target.hp==target.maxHp) return 0.5; + if(target.hp==1) return 2; + if(target.hp==2) return 1.5; + return 0.5; + }, + maixie:true, + effect:{ + target:function(card,player,target){ + if(target.maxHp<=3) return; + if(get.tag(card,'damage')){ + if(target.hp==target.maxHp) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + jiuchi:{ + audio:2, + enable:'chooseToUse', + filterCard:function(card){ + return get.suit(card)=='spade'; + }, + viewAs:{name:'jiu'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{suit:'spade'})) return false; + }, + prompt:'将一张黑桃手牌当酒使用', + check:function(card){ + if(_status.event.type=='dying') return 1; + return 4-get.value(card); + }, + ai:{ + skillTagFilter:function(player){ + return player.countCards('h',{suit:'spade'})>0&&player.hp<=0; + }, + threaten:1.5, + save:true, + } + }, + roulin:{ + audio:2, + trigger:{player:'shaBegin',target:'shaBegin'}, + forced:true, + filter:function(event,player){ + if(event.directHit) return false; + if(player==event.player){ + return event.target.sex=='female'; + } + return event.player.sex=='female'; + }, + check:function(event,player){ + return player==event.player; + }, + content:function(){ + "step 0" + var next=trigger.target.chooseToRespond({name:'shan'}); + next.autochoose=lib.filter.autoRespondShan; + next.ai=function(card){ + if(trigger.target.countCards('h','shan')>1){ + return get.unuseful2(card); + } + return -1; + }; + "step 1" + if(result.bool==false){ + trigger.untrigger(); + trigger.directHit=true; + } + } + }, + benghuai:{ + audio:4, + trigger:{player:'phaseEnd'}, + forced:true, + check:function(){ + return false; + }, + filter:function(event,player){ + return !player.isLowestHp(); + }, + content:function(){ + "step 0" + player.chooseControl('baonue_hp','baonue_maxHp',function(event,player){ + if(player.hp==player.maxHp) return 'baonue_hp'; + if(player.hp0); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.logSkill('baonue',event.current); + player.judge(function(card){ + if(get.suit(card)=='spade') return 4; + return 0; + }); + } + else{ + event.goto(1); + } + 'step 3' + if(result.suit=='spade'){ + event.current.recover(); + } + event.goto(1); + } + }, + luanwu:{ + audio:2, + unique:true, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.luanwu; + }, + init:function(player){ + player.storage.luanwu=false; + }, + mark:true, + intro:{ + content:'limited' + }, + skillAnimation:'epic', + animationColor:'thunder', + filterTarget:function(card,player,target){ + return target!=player; + }, + selectTarget:-1, + multitarget:true, + multiline:true, + content:function(){ + "step 0" + player.unmarkSkill('luanwu') + player.storage.luanwu=true; + event.current=player.next; + "step 1" + event.current.animate('target'); + event.current.chooseToUse('乱舞:使用一张杀或流失一点体力',{name:'sha'},function(card,player,target){ + if(player==target) return false; + if(!player.canUse('sha',target)) return false; + if(get.distance(player,target)<=1) return true; + if(game.hasPlayer(function(current){ + return current!=player&&get.distance(player,current)0) att=1; + if(att<0) att=-1; + if(players[i]!=player&&players[i].hp<=3){ + if(players[i].countCards('h')==0) num+=att/players[i].hp; + else if(players[i].countCards('h')==1) num+=att/2/players[i].hp; + else if(players[i].countCards('h')==2) num+=att/4/players[i].hp; + } + if(players[i].hp==1) num+=att*1.5; + } + if(player.hp==1){ + return -num; + } + if(player.hp==2){ + return -game.players.length/4-num; + } + return -game.players.length/3-num; + } + } + } + }, + wansha:{ + locked:true, + global:'wansha2' + }, + wansha2:{ + mod:{ + cardSavable:function(card,player){ + if(!_status.currentPhase) return; + if(_status.currentPhase.hasSkill('wansha')&&_status.currentPhase!=player){ + if(card.name=='tao'&&_status.event.dying!=player) return false; + } + } + } + }, + weimu:{ + mod:{ + targetEnabled:function(card){ + if((get.type(card)=='trick'||get.type(card)=='delay')&& + get.color(card)=='black') return false; + } + } + }, + huoji:{ + audio:2, + enable:'chooseToUse', + filterCard:function(card){ + return get.color(card)=='red'; + }, + viewAs:{name:'huogong',nature:'fire'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{color:'red'})) return false; + }, + prompt:'将一张红色牌当火攻使用', + check:function(card){ + var player=_status.currentPhase; + if(player.countCards('h')>player.hp){ + return 6-get.value(card); + } + return 4-get.value(card) + } + }, + bazhen:{ + audio:2, + inherit:'bagua_skill', + filter:function(event,player){ + if(!lib.skill.bagua_skill.filter(event,player)) return false; + if(player.getEquip(2)) return false; + return true; + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player==target&&get.subtype(card)=='equip2'){ + if(get.equipValue(card)<=7.5) return 0; + } + if(target.getEquip(2)) return; + return lib.skill.bagua_skill.ai.effect.target.apply(this,arguments); + } + } + } + }, + kanpo:{ + audio:2, + enable:'chooseToUse', + filterCard:function(card){ + return get.color(card)=='black'; + }, + viewAsFilter:function(player){ + return player.countCards('h',{color:'black'})>0; + }, + viewAs:{name:'wuxie'}, + prompt:'将一张黑色手牌当无懈可击使用', + check:function(card){return 8-get.value(card)}, + threaten:1.2 + }, + lianhuan:{ + group:['lianhuan1','lianhuan2'] + }, + lianhuan1:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h',{suit:'club'})>0; + }, + filterCard:function(card){ + return get.suit(card)=='club'; + }, + viewAs:{name:'tiesuo'}, + prompt:'将一张梅花牌当铁锁连环使用', + check:function(card){return 4-get.value(card)} + }, + lianhuan2:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h',{suit:'club'})>0; + }, + filterCard:function(card){ + return get.suit(card)=='club'; + }, + check:function(card){ + return 5-get.useful(card); + }, + content:function(){ + player.draw(); + }, + discard:false, + prompt:'将一张梅花牌置入弃牌堆并摸一张牌', + delay:0.5, + prepare:function(cards,player){ + player.$throw(cards,1000); + }, + ai:{ + basic:{ + order:1 + }, + result:{ + player:1, + }, + } + }, + niepan:{ + audio:2, + unique:true, + enable:'chooseToUse', + mark:true, + skillAnimation:true, + animationStr:'涅盘', + animationColor:'fire', + init:function(player){ + player.storage.niepan=false; + }, + filter:function(event,player){ + if(player.storage.niepan) return false; + if(event.type=='dying'){ + if(player!=event.dying) return false; + return true; + } + else if(event.parent.name=='phaseUse'){ + return true; + } + return false; + }, + content:function(){ + 'step 0' + player.hp=Math.min(3,player.maxHp); + player.discard(player.getCards('hej')); + player.draw(3); + player.awakenSkill('niepan'); + player.storage.niepan=true; + 'step 1' + player.link(false); + 'step 2' + player.turnOver(false); + }, + ai:{ + order:1, + skillTagFilter:function(player){ + if(player.storage.niepan) return false; + if(player.hp>0) return false; + }, + save:true, + result:{ + player:function(player){ + if(player.hp==0) return 10; + if(player.hp<=2&&player.countCards('he')<=1) return 10; + return 0; + } + }, + threaten:function(player,target){ + if(!target.storage.niepan) return 0.6; + } + }, + intro:{ + content:'limited' + } + }, + oldniepan:{ + audio:'niepan', + unique:true, + enable:'chooseToUse', + mark:true, + skillAnimation:true, + animationStr:'涅盘', + animationColor:'fire', + init:function(player){ + player.storage.oldniepan=false; + }, + filter:function(event,player){ + if(player.storage.oldniepan) return false; + if(event.type=='dying'){ + if(player!=event.dying) return false; + return true; + } + return false; + }, + content:function(){ + 'step 0' + player.hp=Math.min(3,player.maxHp); + player.discard(player.getCards('hej')); + player.draw(3); + player.awakenSkill('oldniepan'); + player.storage.oldniepan=true; + 'step 1' + player.link(false); + 'step 2' + player.turnOver(false); + }, + ai:{ + order:1, + skillTagFilter:function(player){ + if(player.storage.oldniepan) return false; + if(player.hp>0) return false; + }, + save:true, + result:{ + player:function(player){ + if(player.hp==0) return 10; + if(player.hp<=2&&player.countCards('he')<=1) return 10; + return 0; + } + }, + threaten:function(player,target){ + if(!target.storage.oldniepan) return 0.6; + } + }, + intro:{ + content:'limited' + } + }, + quhu:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + if(player.countCards('h')==0) return false; + return game.hasPlayer(function(current){ + return current.hp>player.hp&¤t.countCards('h'); + }); + }, + filterTarget:function(card,player,target){ + return target.hp>player.hp&&target.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(target); + "step 1" + if(result.bool){ + if(game.hasPlayer(function(player){ + return player!=target&&get.distance(target,player,'attack')<=1; + })){ + player.chooseTarget(function(card,player,target){ + var source=_status.event.source; + return target!=source&&get.distance(source,target,'attack')<=1; + },true).set('ai',function(target){ + return get.damageEffect(target,_status.event.source,player); + }).set('source',target); + } + else{ + event.finish(); + } + } + else{ + player.damage(target); + event.finish(); + } + "step 2" + if(result.bool&&result.targets&&result.targets.length){ + target.line(result.targets[0],'green'); + result.targets[0].damage(target); + } + }, + ai:{ + order:0.5, + result:{ + target:function(player,target){ + var att=get.attitude(player,target); + var oc=(target.countCards('h')==1); + if(att>0&&oc) return 0; + var players=game.filterPlayer(); + for(var i=0;i0){ + return att>0?att/2:att-(oc?5:0); + } + } + } + return 0; + }, + player:function(player,target){ + if(target.hasSkillTag('jueqing')) return -10; + var mn=1; + var hs=player.getCards('h'); + for(var i=0;i2){ + max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max); + } + } + switch(max){ + case 0:return mn==13?0:-20; + case 1:return mn>=12?0:-15; + case 2:return 0; + case 3:return 1; + default:return max; + } + } + }, + expose:0.2 + } + }, + jieming:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('jieming'),[1,trigger.num],function(card,player,target){ + return target.countCards('h')2){ + return Math.min(5,target.maxHp)-target.countCards('h'); + } + return att/3; + }); + "step 1" + if(result.bool){ + player.logSkill('jieming',result.targets); + for(var i=0;i1){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + var max=0; + var players=game.filterPlayer(); + for(var i=0;i0){ + max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max); + } + } + switch(max){ + case 0:return 2; + case 1:return 1.5; + case 2:return [1,2]; + default:return [0,max]; + } + } + if((card.name=='tao'||card.name=='caoyao')&& + target.hp>1&&target.countCards('h')<=target.hp) return [0,0]; + } + }, + } + }, + qiangxi:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return get.subtype(card)=='equip1'; + }, + selectCard:[0,1], + filterTarget:function(card,player,target){ + if(player==target) return false; + return get.distance(player,target,'attack')<=1; + }, + content:function(){ + "step 0" + if(cards.length==0){ + player.loseHp(); + } + "step 1" + target.damage(); + }, + check:function(card){ + return 10-get.value(card); + }, + position:'he', + ai:{ + order:8, + result:{ + player:function(player,target){ + if(player.getEquip(1)) return 0; + if(player.hp>=target.hp) return -0.9; + if(player.hp<=2) return -10; + return -2; + }, + target:function(player,target){ + if(!player.getEquip(1)){ + if(player.hp<2) return 0; + if(player.hp==2&&target.hp>=2) return 0; + if(target.hp>player.hp) return 0; + } + return get.damageEffect(target,player); + } + } + }, + threaten:1.3 + }, + xinqiangxi:{ + audio:'qiangxi', + enable:'phaseUse', + filter:function(event,player){ + if(player.hasSkill('xinqiangxi2')){ + return !player.hasSkill('xinqiangxi3'); + } + else if(player.hasSkill('xinqiangxi3')){ + return !player.hasSkill('xinqiangxi2')&&player.countCards('he',{type:'equip'})>0; + } + else{ + return true; + } + }, + filterCard:function(card){ + var player=_status.event.player; + if(player.hasSkill('xinqiangxi2')) return false; + return get.type(card)=='equip'; + }, + selectCard:function(){ + var player=_status.event.player; + if(player.hasSkill('xinqiangxi2')) return -1; + if(player.hasSkill('xinqiangxi3')) return [1,1]; + return [0,1]; + }, + filterTarget:function(card,player,target){ + if(player==target) return false; + return get.distance(player,target,'attack')<=1; + }, + content:function(){ + "step 0" + if(cards.length==0){ + player.loseHp(); + player.addTempSkill('xinqiangxi3','phaseAfter'); + } + else{ + player.addTempSkill('xinqiangxi2','phaseAfter'); + } + "step 1" + target.damage(); + }, + check:function(card){ + return 10-get.value(card); + }, + position:'he', + ai:{ + order:8.5, + result:{ + target:function(player,target){ + if(player.hasSkill('xinqiangxi2')||!player.countCards('he',{type:'equip'})){ + if(player.hp<2) return 0; + if(target.hp>=player.hp) return 0; + } + return get.damageEffect(target,player); + } + } + }, + threaten:1.5 + }, + xinqiangxi2:{}, + xinqiangxi3:{}, + tianyi:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h')>0; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(target); + "step 1" + if(result.bool){ + player.addTempSkill('tianyi2','phaseAfter'); + } + else{ + player.addTempSkill('tianyi3','phaseAfter'); + } + }, + ai:{ + order:function(name,player){ + var cards=player.getCards('h'); + if(player.countCards('h','sha')==0){ + return 1; + } + for(var i=0;i11&&get.value(cards[i])<7){ + return 9; + } + } + return get.order({name:'sha'})-1; + }, + result:{ + player:function(player){ + if(player.countCards('h','sha')>0) return 0.6; + var num=player.countCards('h'); + if(num>player.hp) return 0; + if(num==1) return -2; + if(num==2) return -1; + return -0.7; + }, + target:function(player,target){ + var num=target.countCards('h'); + if(num==1) return -1; + if(num==2) return -0.7; + return -0.5 + }, + }, + threaten:1.3 + } + }, + tianyi2:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(card.name=='sha') return true; + }, + selectTarget:function(card,player,range){ + if(card.name=='sha'&&range[1]!=-1) range[1]++; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + } + }, + }, + tianyi3:{ + mod:{ + cardEnabled:function(card){if(card.name=='sha') return false} + } + }, + shuangxiong:{ + audio:true, + trigger:{player:'phaseDrawBefore'}, + check:function(event,player){ + if(player.countCards('h')>player.hp) return true; + if(player.countCards('h')>3) return true; + return false; + }, + content:function(){ + "step 0" + player.judge(ui.special); + "step 1" + player.gain(result.card); + player.$gain2(result.card); + player.addTempSkill('shuangxiong2','phaseAfter'); + player.storage.shuangxiong=get.color(result.card); + trigger.untrigger(); + trigger.finish(); + } + }, + shuangxiong2:{ + audio:true, + enable:'phaseUse', + viewAs:{name:'juedou'}, + filterCard:function(card,player){ + return get.color(card)!=player.storage.shuangxiong; + }, + check:function(card){ + return 6-get.value(card); + }, + ai:{ + basic:{ + order:10 + } + } + }, + luanji:{ + audio:2, + enable:'phaseUse', + viewAs:{name:'wanjian'}, + filterCard:function(card,player){ + if(ui.selected.cards.length){ + return get.suit(card)==get.suit(ui.selected.cards[0]); + } + var cards=player.getCards('h'); + for(var i=0;i0; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + content:function(){ + player.discardPlayerCard('he',trigger.target,true); + } + }, + jiewei:{ + trigger:{player:'turnOverEnd'}, + direct:true, + audio:2, + content:function(){ + 'step 0' + player.chooseToUse(function(card){ + if(!lib.filter.cardEnabled(card,_status.event.player,_status.event)){ + return false; + } + var type=get.type(card,'trick'); + return type=='trick'||type=='equip'; + },'是否使用一张锦囊牌或装备牌?').set('logSkill','jiewei'); + 'step 1' + if(result.bool){ + var type=get.type(result.card||result.cards[0]); + if(game.hasPlayer(function(current){ + if(type=='equip'){ + return current.countCards('e'); + } + else{ + return current.countCards('j'); + } + })){ + var next=player.chooseTarget('是否弃置场上的一张'+get.translation(type)+'牌?',function(card,player,target){ + if(_status.event.type=='equip'){ + return target.countCards('e')>0; + } + else{ + return target.countCards('j')>0; + } + }); + next.set('ai',function(target){ + if(type=='equip'){ + return -get.attitude(player,target); + } + else{ + return get.attitude(player,target); + } + }); + next.set('type',type); + event.type=type; + } + else{ + event.finish(); + } + } + else{ + event.finish(); + } + 'step 2' + if(event.type&&result.bool&&result.targets&&result.targets.length){ + player.line(result.targets,'green'); + if(event.type=='equip'){ + player.discardPlayerCard(result.targets[0],'e',true); + } + else{ + player.discardPlayerCard(result.targets[0],'j',true); + } + } + } + }, + releiji:{ + audio:2, + audioname:['boss_qinglong'], + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'; + }, + direct:true, + content:function(){ + "step 0"; + player.chooseTarget(get.prompt('releiji')).ai=function(target){ + if(target.hasSkill('hongyan')) return 0; + return get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); + }; + "step 1" + if(result.bool){ + player.logSkill('releiji',result.targets,'thunder'); + event.target=result.targets[0]; + event.target.judge(function(card){ + var suit=get.suit(card); + if(suit=='spade') return -4; + if(suit=='club') return -2; + return 0; + }); + } + else{ + event.finish(); + } + "step 2" + if(result.suit=='club'){ + event.target.damage('thunder'); + player.recover(); + } + else if(result.suit=='spade'){ + event.target.damage(2,'thunder'); + } + }, + ai:{ + useShan:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')){ + var hastarget=game.hasPlayer(function(current){ + return get.attitude(target,current)<0; + }); + var be=target.countCards('e',{color:'black'}); + if(target.countCards('h','shan')&&be){ + if(!target.hasSkill('guidao')) return 0; + return [0,hastarget?target.countCards('he')/2:0]; + } + if(target.countCards('h','shan')&&target.countCards('h')>2){ + if(!target.hasSkill('guidao')) return 0; + return [0,hastarget?target.countCards('h')/4:0]; + } + if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){ + return [0,0]; + } + if(target.countCards('h')==0){ + return [1.5,0]; + } + if(target.countCards('h')==1&&!be){ + return [1.2,0]; + } + if(!target.hasSkill('guidao')) return [1,0.05]; + return [1,Math.min(0.5,(target.countCards('h')+be)/4)]; + } + } + } + } + }, + shensu:{ + group:['shensu1','shensu2'] + }, + xinshensu:{ + group:['shensu1','shensu2','shensu4'] + }, + shensu1:{ + audio:2, + trigger:{player:'phaseBegin'}, + direct:true, + content:function(){ + "step 0" + var check= player.countCards('h')>2; + player.chooseTarget(get.prompt('shensu'),function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target,false); + }).set('check',check).set('ai',function(target){ + if(!_status.event.check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); + }); + "step 1" + if(result.bool){ + player.logSkill('shensu1',result.targets); + player.useCard({name:'sha'},result.targets[0],false); + player.skip('phaseJudge'); + player.skip('phaseDraw'); + } + } + }, + shensu2:{ + audio:2, + trigger:{player:'phaseUseBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + content:function(){ + "step 0" + var check=player.needsToDiscard(); + player.chooseCardTarget({ + prompt:get.prompt('shensu'), + filterCard:function(card,player){ + return get.type(card)=='equip'&&lib.filter.cardDiscardable(card,player) + }, + position:'he', + filterTarget:function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target,false); + }, + ai1:function(card){ + if(_status.event.check) return 0; + return 6-get.value(card); + }, + ai2:function(target){ + if(_status.event.check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); + }, + check:check + }); + "step 1" + if(result.bool){ + player.logSkill('shensu2',result.targets); + player.discard(result.cards[0]); + player.useCard({name:'sha'},result.targets[0]); + trigger.untrigger(); + trigger.finish(); + } + } + }, + shensu4:{ + audio:'shensu1', + trigger:{player:'phaseDiscardBefore'}, + direct:true, + content:function(){ + "step 0" + var check=player.needsToDiscard()||player.isTurnedOver(); + player.chooseTarget(get.prompt('shensu'),function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target,false); + }).set('check',check).set('ai',function(target){ + if(!_status.event.check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); + }); + "step 1" + if(result.bool){ + player.logSkill('shensu4',result.targets); + player.turnOver(); + player.useCard({name:'sha'},result.targets[0],false); + trigger.untrigger(); + trigger.finish(); + } + } + }, + jushou:{ + audio:true, + trigger:{player:'phaseEnd'}, + content:function(){ + player.draw(3); + player.turnOver(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(card.name=='guiyoujie') return [0,1]; + } + } + }, + }, + liegong:{ + audio:2, + trigger:{player:'shaBegin'}, + check:function(event,player){ + return get.attitude(player,event.target)<=0; + }, + logTarget:'target', + filter:function(event,player){ + var length=event.target.countCards('h'); + return (length>=player.hp||length<=player.getAttackRange()); + }, + content:function(){ + trigger.directHit=true; + }, + mod:{ + attackFrom:function(from,to,distance){ + if(get.zhu(from,'shouyue')) return distance-1; + } + } + }, + kuanggu:{ + audio:2, + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return get.distance(player,event.player)<=1&&player.isDamaged(); + }, + content:function(){ + player.recover(trigger.num); + } + }, + tianxiang:{ + audio:2, + trigger:{player:'damageBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('h',{suit:'heart'})>0&&event.num>0; + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + filterCard:function(card,player){ + return get.suit(card)=='heart'&&lib.filter.cardDiscardable(card,player); + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + return 10-get.value(card); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + var trigger=_status.event.getTrigger(); + var da=0; + if(_status.event.player.hp==1){ + da=10; + } + if(trigger.num>1){ + if(target.maxHp>5&&target.hp>1) return -att/10+da; + return -att+da; + } + var eff=get.damageEffect(target,trigger.source,target,trigger.nature); + if(att==0) return 0.1+da; + if(eff>=0&&trigger.num==1){ + return att+da; + } + if(target.hp==target.maxHp) return -att+da; + if(target.hp==1){ + if(target.maxHp<=4&&!target.hasSkillTag('maixie')){ + if(target.maxHp<=3){ + return -att+da; + } + return -att/2+da; + } + return da; + } + if(target.hp==target.maxHp-1){ + if(target.hp>2||target.hasSkillTag('maixie')) return att/5+da; + if(att>0) return 0.02+da; + return 0.05+da; + } + return att/2+da; + }, + prompt:get.prompt('tianxiang') + }); + "step 1" + if(result.bool){ + player.logSkill(event.name,result.targets); + trigger.untrigger(); + trigger.player=result.targets[0]; + trigger.player.addSkill('tianxiang2'); + player.discard(result.cards[0]); + } + else{ + event.finish(); + } + "step 2" + trigger.trigger('damageBefore'); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return; + if(get.tag(card,'damage')&&target.countCards('h')>1) return 0.7; + } + }, + threaten:function(player,target){ + if(target.countCards('h')==0) return 2; + } + } + }, + tianxiang2:{ + trigger:{player:['damageAfter','damageCancelled','damageZero']}, + forced:true, + popup:false, + audio:false, + content:function(){ + if(player.hp0&&event.num>0&&!player.hasSkill('xintianxiang3'); + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + filterCard:function(card,player){ + return get.suit(card)=='heart'&&lib.filter.cardDiscardable(card,player); + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + position:'he', + ai1:function(card){ + return 10-get.value(card); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + var trigger=_status.event.getTrigger(); + var da=0; + if(_status.event.player.hp==1){ + da=10; + } + if(trigger.num>1){ + if(target.maxHp>5&&target.hp>1) return -att/10+da; + return -att+da; + } + var eff=get.damageEffect(target,trigger.source,target,trigger.nature); + if(att==0) return 0.1+da; + if(eff>=0&&trigger.num==1){ + return att+da; + } + if(target.hp==target.maxHp) return -att+da; + if(target.hp==1){ + if(target.maxHp<=4&&!target.hasSkillTag('maixie')){ + if(target.maxHp<=3){ + return -att+da; + } + return -att/2+da; + } + return da; + } + if(target.hp==target.maxHp-1){ + if(target.hp>2||target.hasSkillTag('maixie')) return att/5+da; + if(att>0) return 0.02+da; + return 0.05+da; + } + return att/2+da; + }, + prompt:get.prompt('tianxiang') + }); + "step 1" + if(result.bool){ + player.logSkill(event.name,result.targets); + trigger.untrigger(); + trigger.player=result.targets[0]; + trigger.player.addSkill('xintianxiang2'); + trigger.player.storage.xintianxiang=player; + player.discard(result.cards[0]); + } + else{ + event.finish(); + } + "step 2" + trigger.trigger('damageBefore'); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return; + if(get.tag(card,'damage')&&target.countCards('he')>1) return 0.7; + } + }, + } + }, + xintianxiang2:{ + trigger:{player:['damageAfter','damageCancelled','damageZero']}, + forced:true, + popup:false, + audio:false, + content:function(){ + 'step 0' + var source=player.storage.xintianxiang; + if(source.isDead()){ + event.finish(); + return; + } + var num=player.maxHp-player.hp||0; + var str1='令'+get.translation(player)+'摸'+get.cnNumber(num)+'张牌'; + var str2='令'+get.translation(player)+'防止造成和受到的所有伤害且天香失效直到你下一回合开始'; + var att=get.attitude(source,player); + var choice='选项一'; + if(att<0){ + if(num>=2){ + choice='选项二'; + } + } + else if(att>0){ + if(num<2&&!player.hasSkillTag('maixie')){ + choice='选项二'; + } + } + source.chooseControl(function(){ + return _status.event.choice; + }).set('choiceList',[str1,str2]).set('choice',choice); + 'step 1' + if(result.control=='选项一'){ + if(player.isDamaged()){ + player.draw(player.maxHp-player.hp); + } + } + else{ + player.storage.xintianxiang.addSkill('xintianxiang3'); + player.storage.xintianxiang.storage.xintianxiang3=player; + player.addSkill('xintianxiang4'); + } + player.removeSkill('xintianxiang2'); + delete player.storage.xintianxiang; + } + }, + xintianxiang3:{ + trigger:{player:['phaseBegin','dieBegin']}, + forced:true, + popup:false, + silent:true, + content:function(){ + if(player.storage.xintianxiang3){ + player.storage.xintianxiang3.removeSkill('xintianxiang4'); + delete player.storage.xintianxiang3; + } + player.removeSkill('xintianxiang3'); + } + }, + xintianxiang4:{ + trigger:{source:'damageBefore',player:'damageBefore'}, + forced:true, + mark:true, + intro:{ + content:'防止造成和受到的一切伤害' + }, + priority:15, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + nothunder:true, + nodamage:true, + notrick:true, + notricksource:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')){ + return 'zeroplayertarget'; + } + }, + player:function(card,player,target,current){ + if(get.tag(card,'damage')){ + return 'zeroplayertarget'; + } + } + } + } + }, + hongyan:{ + mod:{ + suit:function(card,suit){ + if(suit=='spade') return 'heart'; + } + } + }, + gzbuqu:{ + audio:'buqu', + trigger:{player:'changeHp'}, + filter:function(event,player){ + return player.hp<=0&&event.num<0; + }, + init:function(player){ + player.storage.gzbuqu=[]; + }, + priority:-15, + intro:{ + content:'cards' + }, + group:'gzbuqu_recover', + locked:true, + frequent:true, + ondisable:true, + onremove:function(player){ + if(player.storage.gzbuqu.length){ + delete player.nodying; + player.hp=1-player.storage.gzbuqu.length; + game.log(player,'移去了不屈牌',player.storage.gzbuqu); + while(player.storage.gzbuqu.length){ + ui.discardPile.appendChild(player.storage.gzbuqu.shift()); + } + player.unmarkSkill('gzbuqu'); + player.dying({}); + } + }, + process:function(player){ + delete player.nodying; + player.markSkill('gzbuqu'); + player.syncStorage('gzbuqu'); + var nums=[]; + var cards=player.storage.gzbuqu; + for(var i=0;i0&&event.num>0; + }, + forced:true, + popup:false, + content:function(){ + 'step 0' + if(player.hp>=player.storage.gzbuqu.length){ + player.hp-=player.storage.gzbuqu.length-1; + player.update(); + while(player.storage.gzbuqu.length){ + ui.discardPile.appendChild(player.storage.gzbuqu.shift()); + } + player.unmarkSkill('gzbuqu'); + delete player.nodying; + event.finish(); + } + else{ + player.chooseCardButton('移去'+get.cnNumber(player.hp)+'张不屈牌',true,player.hp,player.storage.gzbuqu).set('ai',function(button){ + var buttons=get.selectableButtons(); + for(var i=0;i0&&player.hp<=0}, + content:function(){ + "step 0" + event.card=get.cards()[0]; + if(player.storage.buqu==undefined) player.storage.buqu=[]; + player.storage.buqu.push(event.card); + player.syncStorage('buqu'); + player.showCards(player.storage.buqu,'不屈') + player.markSkill('buqu'); + "step 1" + for(var i=0;i2; + }, + content:function(){ + "step 0" + player.line(trigger.player,'green'); + player.loseHp(); + "step 1" + trigger.player.draw(2); + }, + }, + leiji:{ + audio:2, + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'; + }, + direct:true, + content:function(){ + "step 0"; + player.chooseTarget(get.prompt('leiji')).ai=function(target){ + if(target.hasSkill('hongyan')) return 0; + return get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); + }; + "step 1" + if(result.bool){ + player.logSkill('leiji',result.targets,'thunder'); + event.target=result.targets[0]; + event.target.judge(function(card){ + if(get.suit(card)=='spade') return -4; + return 0; + }); + } + else{ + event.finish(); + } + "step 2" + if(result.bool==false){ + event.target.damage(2,'thunder'); + } + }, + ai:{ + mingzhi:false, + useShan:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')){ + var hastarget=game.hasPlayer(function(current){ + return get.attitude(target,current)<0; + }); + if(target.countCards('h','shan')&&target.countCards('e',{suit:'spade'})){ + return [0,hastarget?target.countCards('he')/2:0]; + } + if(target.countCards('h','shan')){ + return [1,hastarget?target.countCards('he')/2:0]; + } + return [1,target.countCards('h')/4]; + } + } + } + } + }, + guidao:{ + audio:2, + trigger:{global:'judge'}, + filter:function(event,player){ + return player.countCards('he',{color:'black'})>0; + }, + direct:true, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('guidao'),'he',function(card){ + return get.color(card)=='black'; + }).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result; + } + else{ + return -result; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.logSkill('guidao'); + player.$gain2(trigger.player.judging[0]); + player.gain(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + if(!get.owner(result.cards[0],'judge')){ + trigger.position.appendChild(result.cards[0]); + } + game.log(trigger.player,'的判定牌改为',result.cards[0]); + } + "step 3" + game.delay(2); + }, + ai:{ + tag:{ + rejudge:1 + } + } + }, + guhuo:{ + enable:'phaseUse', + usable:1, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0 + }, + chooseButton:{ + dialog:function(){ + var list=['sha','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; + for(var i=0;i=3&&player.hp>=3) return 0; + for(var i=0;i=num) return false; - return true; - }, - filterTarget:function(card,player,target){ - return target.countCards('h')&&target!=player; - }, - ai:{ - order:2.8, - result:{ - target:function(player,target){ - if(get.attitude(player,target)<0&&player.hasCard(function(card){ - return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; - })){ - return get.effect(target,{name:'sha'},player,target); - } - else{ - return 0; - } - } - } - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool){ - player.chooseControl(function(){ - return 1; - }).set('choiceList',[ - '令'+get.translation(target)+'不能使用或打出手牌直到回合结束', - '视为对'+get.translation(target)+'使用一张杀(不计入次数限制)' - ]); - } - else{ - var evt=_status.event.getParent('phaseUse'); - if(evt&&evt.name=='phaseUse'){ - evt.skipped=true; - } - event.finish(); - } - 'step 2' - if(result.control=='选项一'){ - target.addTempSkill('fenyue2','phaseAfter'); - } - else{ - player.useCard({name:'sha'},target,false); - } - } - }, - fenyue2:{ - mark:true, - mod:{ - cardEnabled:function(){ - return false; - }, - cardUsable:function(){ - return false; - }, - cardRespondable:function(){ - return false; - }, - cardSavable:function(){ - return false; - } - }, - intro:{ - content:'不能使用或打出卡牌' - } - }, - zhuoshui:{ - audio:'huoshui', - trigger:{player:'phaseBegin'}, - forced:true, - content:function(){ - game.countPlayer(function(current){ - if(current!=player&&!current.hasSkill('fengyin')){ - player.line(current,'green'); - current.addTempSkill('fengyin','phaseAfter'); - } - }); - } - }, - zqingcheng:{ - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('he',{type:'equip'}); - }, - filterCard:{type:'equip'}, - position:'he', - filterTarget:function(card,player,target){ - return target!=player; - }, - check:function(card){ - var player=_status.event.player; - if(game.hasPlayer(function(current){ - return get.attitude(player,current)>2&¤t.isTurnedOver(); - })){ - return 10-get.value(card,player); - } - return 6-get.value(card,player); - }, - content:function(){ - 'step 0' - target.turnOver(); - 'step 1' - target.draw(2); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(target.isTurnedOver()) return 2; - return -0.5; - } - } - } - }, - zfengshi:{ - audio:'fengshi', - trigger:{player:'shaBegin'}, - filter:function(event,player){ - return event.target.countCards('e'); - }, - logTarget:'target', - check:function(event,player){ - if(event.target.hasSkillTag('noe')) return false; - return get.attitude(player,event.target)<0; - }, - content:function(){ - trigger.target.chooseToDiscard('e',true); - } - }, - chuanxin:{ - trigger:{source:'damageBefore'}, - filter:function(event,player){ - if(event.card&&(event.card.name=='sha'||event.card.name=='juedou')){ - if(get.mode()=='guozhan'){ - return (event.player.identity!='qun'||player.identity=='ye')&& - !event.player.isUnseen()&&event.player.hasViceCharacter(); - } - else{ - var info=lib.character[event.player.name]; - if(!info) return false; - var skills=event.player.getSkills(); - for(var i=0;i=2) return 1; - return 0; - }).set('choiceList',['弃置装备区内的所有牌并失去一点体力',get.mode()=='guozhan'?'移除副将牌':'随机移除武将牌上的一个技能']); - } - else{ - event._result={index:1}; - } - 'step 1' - if(result.index==1){ - if(get.mode()!='guozhan'){ - var info=lib.character[trigger.player.name]; - var skills=trigger.player.getSkills(); - var list=[]; - for(var i=0;i0; - }, - logTarget:'source', - content:function(){ - var source=trigger.source; - if(source.hasSkill('hengjiang2')){ - source.storage.hengjiang2+=trigger.num; - source.updateMarks(); - } - else{ - source.storage.hengjiang3=player; - source.storage.hengjiang2=trigger.num; - source.addTempSkill('hengjiang2','phaseAfter'); - } - } - }, - hengjiang2:{ - mark:true, - intro:{ - content:'手牌上限-#' - }, - mod:{ - maxHandcard:function(player,num){ - return num-player.storage.hengjiang2; - } - }, - onremove:function(player){ - delete player.storage.hengjiang2; - delete player.storage.hengjiang3; - }, - trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ - return player.storage.hengjiang3.isIn()&&(!event.cards||event.cards.length==0); - }, - forced:true, - popup:false, - content:function(){ - player.storage.hengjiang3.draw(); - } - }, - shuangren:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - priority:15, - content:function(){ - 'step 0' - var goon; - if(player.needsToDiscard()>1){ - goon=player.hasCard(function(card){ - return card.number>10&&get.value(card)<=5; - }); - } - else{ - goon=player.hasCard(function(card){ - return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; - }); - } - player.chooseTarget(get.prompt('shuangren'),function(card,player,target){ - return target!=player&&target.countCards('h'); - }).set('ai',function(target){ - var player=_status.event.player; - if(_status.event.goon&&get.attitude(player,target)<0){ - return get.effect(target,{name:'sha'},player,player); - } - return 0; - }).set('goon',goon); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('shuangren',target); - player.chooseToCompare(target); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - var target=event.target; - if(target.identity!='ye'&&target.identity!='unknown'&&game.hasPlayer(function(current){ - if(!player.canUse('sha',current,false)) return false; - if(target==current) return false; - if(get.mode()=='guozhan'){ - return target.identity==current.identity; - } - return true; - })){ - var str='对一名'; - if(get.mode()=='guozhan'){ - str+=get.translation(target.identity)+'势力的'; - } - player.chooseTarget(str+'角色使用一张杀',true,function(card,player,target){ - if(!player.canUse('sha',target,false)) return false; - if(get.mode()=='guozhan'){ - return target.identity==_status.event.identity; - } - return true; - }).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'sha'},player,player); - }).set('identity',target.identity); - } - else{ - player.useCard({name:'sha'},target,false); - event.finish(); - } - } - else{ - trigger.finish(); - trigger.untrigger(); - event.finish(); - } - 'step 3' - if(result.bool&&result.targets&&result.targets.length){ - player.useCard({name:'sha'},result.targets[0],false); - } - } - }, - kuanshi:{ - trigger:{player:'phaseEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('kuanshi')).set('ai',function(target){ - if(get.attitude(_status.event.player,target)>0){ - return 1/Math.sqrt(target.hp+1); - } - return 0; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('kuanshi',target); - target.storage.kuanshi2=player; - target.addSkill('kuanshi2'); - } - } - }, - kuanshi2:{ - mark:'character', - intro:{ - content:'下一次受到超过1点的伤害时,防止此伤害,然后$跳过下个回合的摸牌阶段' - }, - trigger:{player:'damageBegin'}, - forced:true, - filter:function(event,player){ - return event.num>1; - }, - priority:-11, - content:function(){ - trigger.untrigger(); - trigger.finish(); - player.storage.kuanshi2.skip('phaseDraw'); - player.removeSkill('kuanshi2'); - }, - group:'kuanshi2_remove', - onremove:true, - subSkill:{ - remove:{ - trigger:{global:['phaseBegin','dieAfter']}, - forced:true, - popup:false, - filter:function(event,player){ - return event.player==player.storage.kuanshi2; - }, - content:function(){ - player.removeSkill('kuanshi2'); - } - } - } - }, - xiashu:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - 'step 0' - var maxval=0; - var hs=player.getCards('h'); - for(var i=0;i0) return 0.1; - if(maxval>=8) return 0; - if(att==0) return 0.2; - if(dh>=3) return dh; - if(dh==2){ - if(maxval<=7) return dh; - } - if(maxval<=6) return dh; - return 0; + huangfusong:['male','qun',4,['fenyue']], + }, + characterIntro:{ + huangfusong:'字义真。安定郡朝那县(今宁夏彭阳)人。于黄巾起义时,以中郎将身份讨伐黄巾,用火攻大破张梁、张宝。[45] 后接替董卓进攻张梁,连胜七阵。掘张角墓,拜左车骑将军、冀州牧,因拒绝贿赂宦官而被免职。[46] 董卓死,王允命其与吕布等共至郿坞抄籍董卓家产、人口,皇甫嵩将坞中所藏良家子女,尽行释放。', + zangba:'其父臧戒,有二子臧艾与臧舜。年少时曾召集数人将获罪的父亲救出,此后四处流亡。后来成为陶谦麾下的骑都尉,负责募兵抵抗黄巾军。与孙观、尹礼等人拥兵驻屯于开阳,自成一股独立势力,后跟随吕布。吕布战败后,投降了曹操。后与袁绍、孙权等的战役里战功赫赫,官至镇东将军。', + zhangren:'刘璋的属下,以忠勇著称。刘备入蜀时,张任曾劝刘璋提防刘备,但刘璋没有听从。魏延舞剑想趁机除掉刘璋时,张任出面对舞,解救刘璋。后在刘备进攻时于落凤坡射死了庞统。', + jiling:'东汉末年袁术帐下将领,勇猛非常,曾奉命率军攻打小沛的刘备,在吕布辕门射戟的调停下撤兵。', + zoushi:'军阀张济之妻,张绣之婶。张绣降曹后,邹氏遂被曹操霸占。贾诩献计趁机诛杀曹操,险些得手。曹操在损失爱将典韦、侄子曹安民和长子曹昂后方才逃出生天。', + ganfuren:'刘备起兵后,于沛城娶甘氏为妾。后来,甘夫人随刘备到荆州,生了阿斗(也就是后主刘禅)。223年四月,刘备病死于白帝城,追谥甘夫人为“昭烈皇后”。', + jiangfei:'蒋琬,蜀四英之一。初随刘备入蜀,诸葛亮卒后封大将军,辅佐刘禅,主持朝政,统兵御魏。采取闭关息民政策,国力大增。官至大司马,安阳亭侯,谥号恭侯。费祎,蜀国著名政治家和武将,官至大将军。在一次回途的筵会中,被降将郭修刺杀而亡,谥号敬侯。', + mifuren:'刘备夫人。徐州别驾糜竺之妹。长坂兵败,她怀抱年仅两岁的刘禅在乱军中走散,被赵云发现;但麋夫人因为赵云只有一匹马,不肯上马,在将阿斗托付给赵云后投井而亡。', + chendong:'陈武,东吴将领,孙策攻打刘繇,陈武前来相助,孙策非常喜爱陈武,拜为校尉,使作先锋。陈武以十数骑兵力杀敌五十余人。后于赤壁等战役屡立功勋。董袭献上严白虎的人头来降孙策。赤壁之战,董袭受周瑜命,分兵去汉阳,合肥会战时接应太史慈,逍遥津支援孙权。濡须口之战时,董袭在船上督战,船覆董袭坚守殉职。', + jiangqing:'擅长弓术。与周泰原为活跃于长江一带的江贼,孙策脱离袁术下江东自立门户时,和周泰一起率众投靠。 孙策攻刘繇,并引出城中麾下的陈横、薛礼、张英三名将领,陈横后被蒋钦一箭射杀,后与韩当等将乘舟过江,乱箭射杀敌军。曾在赤壁之战与周泰,还有擅使长枪的韩当率领水军在三江口踏江破敌。', + kongrong:'字文举,鲁国人,东汉文学家,“建安七子”之首。献帝即位后任北军中侯、虎贲中郎将、北海相,时称孔北海后因触怒曹操,为曹操所杀。能诗善文。', + mateng:'字寿成,扶风茂陵人,东汉末年征西将军,割据西凉一带的军阀,伏波将军马援的后代,官至卫尉,封爵槐里乡侯。因其子马超谋反,而被杀,夷灭三族。', + tianfeng:'字元皓。东汉末年大军阀袁绍部下重要谋士。为人刚直不阿,曾多次向袁绍进言而不被采纳。后因谏阻袁绍征伐曹操而被袁绍下令监禁,并于官渡之战后,被袁绍杀害。', + caochun:'字子和,沛国谯(今安徽亳州)人。东汉末年曹操麾下将领,曹仁之弟。曹纯是曹操部下精锐部队“虎豹骑”的统领者之一,因在平定北方的战役中颇有功绩,被加封为高陵亭侯。死后谥曰威侯。曹纯擅战,甚得人心,为人重纲纪,不失理智,好学问,敬爱学士,闻名天下。', + hanba:'中国古代神话传说中引起旱灾的怪物。《诗·大雅·云汉》:“旱魃为虐,如惔如焚。”', + cuiyan:'字季珪,清河东武城(今河北省清河县)人。东汉末年名士,司空崔林的从兄,曹操帐下谋士。崔琰相貌俊美,很有威望,曹操对他也很敬畏。建安二十一年(216年),崔琰在给杨训的书信中写道“时乎时乎,会当有变时”,曹操认为此句有不逊之意,因而将崔琰下狱,不久崔琰即被曹操赐死。', + lifeng:'南阳(治今河南南阳)人,三国时期蜀汉大臣李严之子。230年,李严迁为骠骑将军,率军前往汉中,诸葛亮上表推举李丰为江州都督督军,以代替李严管理后方事务。李严去世后,李丰在蜀汉官至朱提太守。', + sunru:'孙茹,孙坚之妹,其名载于《江浙通志》中。儿子徐琨亦为孙吴早期名将,当初母子二人随军跟从孙策渡长江时,因为暂时没足够的船,孙策感到苦恼打算暂时驻军江边。孙茹夫人献计以芦苇为筏,孙策大喜。吴军遂以神不知鬼不觉的速度过长江击破刘繇部将张英,立下平江东第一功。', + lingcao:'东汉末年将领,吴郡余杭(今浙江余杭)人,凌统之父。早年跟随孙策转战江东。孙权统军后,凌操随其征伐黄祖,被甘宁射杀。《吴书》载:甘宁以善射,将兵在后,射杀校尉凌操', + zhugeguo:'诸葛果,为《历代神仙通鉴》中诸葛亮女儿的名字,《历代神仙通鉴》记录从上古到明代的神仙历史,因此诸葛果不见于任何史书。成都西南有朝真观,即乘烟观。相传,诸葛果在这里修行后成仙升天。', + zhuling:'朱灵(生卒年不详),字文博,冀州清河国人,三国时期曹魏名将。官至后将军,封为高唐侯,谥号威侯。初为袁绍部将,后归顺曹操,随曹操征伐四方,屡建战功。', + liuzan:'字正明,会稽长山人人,曾任左护军,有两子:留略、留平。少为会稽郡吏,曾参与镇压黄巾起义,后被东吴大将凌统所引用,任屯骑校尉。吴五凤二年(公元255年)留赞任左护军,随孙峻征淮南,因病撤军,被魏将蒋班围困于道,力战而死,时年73岁。', + re_yuanshu:'字公路,汝南汝阳人,袁绍之弟。初为虎贲中郎将。董卓进京后以袁术为后将军,袁术因畏祸而出奔南阳。初平元年与袁绍、曹操等同时起兵,共讨董卓。后与袁绍对立,被袁绍、曹操击败,率馀众奔九江,割据扬州。建安二年称帝,建号仲氏。', + fuwan:'伏完(?-209),琅邪东武(今属山东)人,东汉末大臣,汉献帝伏皇后之父。历官辅国将军、中散大夫、屯骑校尉。', + liuxie:'字伯和,又字合。汉族,祖籍沛县,生于洛阳。汉灵帝第三子,被董卓迎立为帝。董卓被王允和吕布诛杀后,董卓部将李傕等攻入长安,再次挟持了他,后来逃出长安。公元196年,曹操控制了刘协,并迁都许昌,“挟天子以令诸侯”。公元220年,曹操病死,刘协被曹丕控制,随后被迫禅让于曹丕。', + yuanshu:'字公路,汝南汝阳人,袁绍之弟。初为虎贲中郎将。董卓进京后以袁术为后将军,袁术因畏祸而出奔南阳。初平元年与袁绍、曹操等同时起兵,共讨董卓。后与袁绍对立,被袁绍、曹操击败,率馀众奔九江,割据扬州。建安二年称帝,建号仲氏。', + gongsunzan:'字伯珪,汉族,号“白马义从”。辽西令支人。东汉末年献帝年间占据幽州一带的军阀,汉末群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。', + caohong:'字子廉,沛国谯(今安徽亳县)人,曹操从弟,曾献马并救护曹操。后多随军征伐,平兖州、征刘表、讨祝臂。曹丕即位时封曹洪为骠骑将军。曹叡即位,拜曹洪为后将军,更封乐城侯,后复拜为骠骑将军。曹洪逝世,追谥曰恭侯。', + guanyinping:'河东解县(今山西运城)人,美髯公关羽之女。因在关羽的四个子女中排行第三,故又被称作“关三小姐”、“关氏三姐”或“关羽三小姐”。传说她是赵云的弟子、并随同诸葛亮平定南蛮。', + xiahouba:'夏侯渊次子。本为曹魏武将,后因司马懿诛曹爽一族,夏侯霸身为曹氏宗室而心怀不安,遂投降蜀汉。后随蜀将姜维北伐,官至车骑将军。', + daxiaoqiao:'大乔,庐江皖县人,为乔公长女,孙策之妻,容貌国色流离。小乔为大乔之妹,周瑜之妻,资貌绝伦。两人合称“二乔”。', + yuejin:'字文谦,魏“五子良将”之一。容貌短小,以胆烈跟从曹操,南征北讨,战功无数。从击袁绍于官渡,奋勇力战,斩袁绍部将淳于琼。又从击袁绍子谭、尚于黎阳,斩其大将严敬。从平荆州,留屯襄阳,进击关羽、苏非等人,击退其众,南郡诸郡的山谷蛮夷都前往乐进处投降。后来从曹操征孙权,假进节。曹操回师后,留乐进与张辽、李典屯于合肥。又以乐进数有军功,迁右将军。建安二十三年逝世,谥曰威侯。', + caoang:'字子修,曹操的长子,由于性情谦和且聪慧所以深得曹操喜爱。曹操征讨张绣时,羞辱张绣之婶邹氏,被张绣突然袭击。曹昂为保护曹操撤退,与典韦一起战死在宛城。', + zhugejin:'字子瑜,吴国大臣,诸葛亮之兄,诸葛恪之父。经鲁肃推荐,为东吴效力。胸怀宽广,温厚诚信,得到孙权的深深信赖,努力缓和蜀汉与东吴的关系。建安二十五年(220年)吕蒙病逝,诸葛瑾代吕蒙领南郡太守,驻守公安。孙权称帝后,诸葛瑾官至大将军,领豫州牧。', + zhangxingcai:'蜀名将张飞与夏侯氏所生之女,刘禅的妻子,史上称为“敬哀皇后”。', + zumao:'字大荣,吴郡富春人,使用双刀。孙坚在汜水关被华雄击败,祖茂为保护主公而主动提出与孙坚交换头盔,孙坚因此得脱。祖茂将孙坚的赤帻挂在柱子上,准备以此引诱华雄,趁机偷袭,却反被华雄所杀。', + dingfeng:'吴国将领。年少时以骁勇为小将,经常奋勇杀敌,屡立功勋,此后又于东兴之战中“雪中奋短兵”,大破侵犯东吴的魏军。吴景帝孙休在位时,丁奉设计除掉了东吴的权臣孙綝,被拜为大将军,后为右大司马、左军师。', + panfeng:'冀州牧韩馥部下的上将。当十八路诸侯讨伐董卓之时,他奉韩馥之命前往汜水关前挑战董卓部下大将华雄,不敌被斩。', + maliang:'字季常,因眉毛中有白毛,人称白眉马良,马谡的兄长。马良在兄弟五人中名声最佳,因此有“马氏五常,白眉最良”的说法。', + zhugedan:'字公休,曹魏后期的重要将领,诸葛亮的族弟。曾与司马师一同平定毌丘俭、文钦的叛乱。之后因与被诛的夏侯玄、邓飏交厚,且见到王淩、毌丘俭等人的覆灭而心不自安,于甘露二年起兵,并得到东吴的支援,但于次年被镇压,被大将军司马胡奋所斩。', + hetaihou:'大将军何进的妹妹,汉灵帝刘宏第二任皇后,汉少帝刘辩的生母。何氏出身于屠户家庭,后选入掖庭,得到汉灵帝临幸,生下皇子刘辩,并受封贵人。光和三年(180年),立为皇后。中平六年(189年),汉灵帝去世,刘辩继位,尊何氏为皇太后。董卓进京,废黜刘辩,不久毒杀刘辩及何氏。', + sunluyu:'又名小虎,孙权与步练师之女。吴后期,孙鲁班诬陷孙鲁育参与谋反,于是孙峻杀害了孙鲁育。', + wenpin:'本为刘表大将,刘表死后,跟随刘琮投降曹操。后曹操令其镇守江夏,多次阻止了关羽和孙权的进攻,为曹操倚为屏障的大将之一。', + zhanglu:'汉宁太守,继父祖之后传播五斗米教。刘璋杀张鲁之母,二人因此结仇,多次交战。刘备攻益州时,刘璋向张鲁求援。张鲁派马超前往,但马超投降刘备。张鲁后见曹操自封魏王,想要自立为汉宁王,为谋士阎圃劝免。后曹操讨汉中,张鲁败,众人劝其烧粮仓,张鲁认为这是国家之物,未听从,为曹操所称赞。后投降曹操,任镇南将军。', + mayunlu:'马腾之女,马超之妹,赵云之妻。父亲令其自幼习武,枪术非凡,寻常男子也是难以匹敌。', + tadun:'东汉末年辽西乌桓(亦称乌丸)的首领,乌桓大人丘力居的从子,总摄三王部。曾出兵协助袁绍,击破公孙瓒。此后受袁绍假传朝廷诏命,与三王难楼、苏仆延、乌延等人同受单于称号及印绶。后难楼、苏仆延率其部众奉立楼班为单于,蹋顿于是退位为王。袁绍死后,收到被曹操击败的袁尚的求助,纠集逃亡至乌桓的幽州、冀州官吏百姓,企图夺回河北。东汉建安十二年,曹操亲征乌桓。八月,乌桓、袁氏部队于柳城白狼山为曹军所败,蹋顿在此战中被曹操的先锋张辽所斩杀。 ', + yanbaihu:'吴郡乌程县人,原名“严虎”,别号“白虎”,东汉末年盘据吴郡一带山贼出身的地方豪帅。献帝初拥兵万人自固。孙策受袁术使渡江,攻破白虎等。白虎奔余杭,投靠许昭。建安二年,再度被孙策击败,至此不知亡佚何处。', + simalang:'字伯达,“司马八达”之一。曹操任司空后,司马朗被辟为司空属官,又历任成皋令、堂阳长、元城令、丞相主簿、兖州刺史等职,所在皆有政绩,深受百姓爱戴。后司马朗与夏侯惇、臧霸等征讨吴国,到达居巢。军队中流行瘟疫,司马朗亲自去视察,派送医药,因此染病去世。', + wangji:'字伯舆,东莱曲城人。三国时期魏国将领。王基文武兼备,才高于世,德溥于时,深得司马懿、司马师、司马昭的器重,尤其在南征毋丘俭,文钦之乱,东征诸葛诞之叛大规模军事活动中,王基与司马师、司马昭结下了深厚的军友情谊。魏景元二年王基去世,追赠司空,谥号为景侯。', + buzhi:'吴重臣,最初避难江东,于孙权统事后,被召为主记。后游历吴地,又任海盐县长,还任东曹掾,出领鄱阳太守。建安十五年,转交州刺史、立武中郎将,率军接管往交州,追拜使持节、征南中郎将。次年,以平定交州功,加平戎将军,封广信侯。后迁右将军、左护军,改封临湘侯。孙权称帝后,拜骠骑将军,领冀州牧,后因冀州分与蜀汉而解牧职。又都督西陵。赤乌九年,代陆逊为丞相。', + litong:'字文达,小字万亿。江夏平春(今河南信阳)人,汝南太守。早年以游侠闻名于江汝,在率众补充曹操兵源有功拜为阳安都尉,其间不因私而忘公,不因其妻子的求请而过问执法者。后来在曹操讨伐马超时出阵挑战,死于马超枪下。', + mizhu:'原为徐州富商,后被徐州牧陶谦辟为别驾从事。陶谦病死后,奉其遗命迎接刘备。与其弟麋芳拒绝曹操的任命而跟随刘备,在刘备最潦倒之时给予刘备很大的帮助,使他重新振作。214年(建安十九年),刘备入主益州后,拜麋竺为安汉将军,地位在诸葛亮之上,为刘备手下众臣之最。吕蒙袭取荆州,麋芳举城投降,导致关羽兵败身亡,麋竺面缚请罪,刘备劝慰麋竺,对他待遇如初。', + dongbai:'东汉末年县君,陇西临洮(今甘肃省岷县)人,董卓之孙女。董卓当权时,遍封其宗族,其中孙女董白尚未及笄,被封为渭阳君。', + zhaoxiang:'赵云与马云騄之女,赵统赵广之妹,关平之妻。', + heqi:'早年在平定山越的战争中立有大功,又讨平叛乱无数,身经百战,所向披靡,深受孙权器重。后来在与魏国的多次边境争斗中也屡立战功,官至后将军,并领徐州牧。', + dongyun:'大汉重臣,掌军中郎将董和之子。东汉末年,其父董和事刘璋为益州太守,刘备立太子时,允被选为洗马,后为黄门侍郎,延熙六年(公元243年)加辅国将军,延熙七年(公元244年)以侍中守尚书令,任大将军费祎的副手。', + mazhong:'本名狐笃,字德信,巴西阆中人,初次出场时随丞相诸葛亮南征孟获,诸葛亮遣马忠与赵云两路夹攻,大败蛮将阿会喃。孟获派弟孟优赴汉军处假投降,欲内应外合,诸葛亮将计就计,埋伏擒获孟获和诸洞酋长,马忠亦于此战立下战功。后诸葛亮北伐时亦数次出阵,立下汗马功劳。', + kanze:'孙权谋士,在孙权广纳贤才之时与严畯等来到江东,甚为孙权礼遇。第一个识破周瑜打黄盖是苦肉计,后欣然向曹操献诈降书,被曹操识破后面不改色,哈哈大笑,一番妙言让曹操相信了诈降书,是苦肉计中的关键人物。后劝孙权不要设局请关羽。在刘备御驾亲征东吴时,向孙权举荐陆逊为都督,间接上挽救了东吴的命运。', + lingju:'相传为吕布与貂蝉的女儿,被汉献帝掳走并训练为死士,被秘密送入宫中接近曹操,成为其“忘年红颜知己”。外表是柔弱的女子,实际上身怀致命的杀人绝技,等待时机给予曹操致命一击。', + yangxiu:'字德祖,今陕西华阴人,是东汉末年的文学家。杨修学问渊博,极聪慧,任丞相府主簿。史载,“是时,军国多事,修总知外内,事皆称意”。', + chenlin:'陈琳(?-217年),字孔璋,广陵射阳(今江苏宝应)人。东汉末年著名文学家,“建安七子”之一。', + zhugeke:'字元逊,琅邪阳都(今山东沂南)人。三国时期吴臣,蜀丞相诸葛亮之侄,吴大将军诸葛瑾长子,从小就以神童著称,深受孙权赏识。', + zhangbao:'东汉末年黄巾起义的首领之一,张角之弟,张梁之兄。中平元年(184)随兄张角起义,号称“地公将军”。', + chengyu:'字仲德,本名程立,因梦中於泰山捧日,更名程昱。荀彧投曹操时向其举荐程昱。他参与了攻打吕布、袁绍、刘备、孙权的大部份战事,一直出谋献策,表现出众。', + sunhao:'孙权之孙,孙和之子,东吴的末代君主。在位初期虽施行过明政,但不久即沉溺酒色,专于杀戮,变得昏庸暴虐,嗜用挖眼、剥皮等酷刑。280年,吴国被西晋所灭,孙皓投降西晋,被封为归命侯。', + wutugu:'南蛮乌戈国主,身长丈二(约合现在2.77米),不食五谷,以生蛇恶兽为饭。身有鳞甲,刀箭不能侵。兀突骨乘骑巨象,头戴日月狼须帽,身披金珠缨络,两肋下露出生鳞甲,眼目中微有光芒。', + shixie:'割据交州(今越南)一带的军阀,年少时师事刘陶,经逐渐升迁任交趾太守。后被朝廷加职绥南中郎将,迁安远将军,封龙度亭侯。在步骘接管交州时积极配合,归附孙权,被孙权加为左将军;此后又因诱降益州豪族雍闿而迁任卫将军,进封龙编侯。任交趾太守四十年。', + guansuo:'关羽的三子。自荆州失陷后,逃难在鲍家庄养病,伤势痊愈之后入蜀,逢丞相诸葛亮南征,拜之为前部先锋,一同南征。', + wanglang:'字景兴,汉末三国经学家,曹魏初期重臣。曾任会稽太守举兵抵抗孙策,后为曹操所征,被拜为谏议大夫等职。曹丕建立魏国后任命为司空。小说《三国演义》中他在阵前与诸葛亮饶舌比拼,最终被诸葛亮言词所驳倒,一时气愤坠马身亡。', + zhangliang:'东汉末年黄巾起义首领之一,张角的三弟。中平元年(184)随兄起义,号称“人公将军”。遭到朝廷所派左中郎将皇甫嵩进攻时,他率军在广宗(今河北威县)进行反击。后因警戒疏忽,遭到汉军夜袭,兵败身亡。', + }, + perfectPair:{ + yuejin:['re_lidian'], + zhugejin:['zhugeke'], + guanyinping:['guanyu'], + zhangxingcai:['liushan'], + fuwan:['fuhuanghou'], + sunshangxiang:['liubei'], + caoang:['caocao'], + zhangbao:['zhangliang','zhangjiao'], + zhangliang:['zhangjiao'], + maliang:['masu'], + lingcao:['lingtong'], + lingju:['diaochan','lvbu'], + jiangqing:['zhoutai'], + dingfeng:['xusheng'], + caohong:['caoren'], + daxiaoqiao:['zhouyu','sunce'], + cuiyan:['caocao'], + guansuo:['guanyu'], + mateng:['machao','madai','mayunlu'], + chengpu:['zhouyu'], + hanba:['swd_muyun'], + dongbai:['dongzhuo'] + }, + skill:{ + fenyue:{ + enable:'phaseUse', + filter:function(event,player){ + if(!player.countCards('h')) return false; + var num; + if(get.mode()=='identity'){ + num=game.countPlayer(function(current){ + return current.identity=='zhong'||current.identity=='mingzhong'; + }); + } + else{ + num=1; + } + if(player.getStat().skill.fenyue>=num) return false; + return true; + }, + filterTarget:function(card,player,target){ + return target.countCards('h')&&target!=player; + }, + ai:{ + order:2.8, + result:{ + target:function(player,target){ + if(get.attitude(player,target)<0&&player.hasCard(function(card){ + return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; + })){ + return get.effect(target,{name:'sha'},player,target); + } + else{ + return 0; + } + } + } + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool){ + player.chooseControl(function(){ + return 1; + }).set('choiceList',[ + '令'+get.translation(target)+'不能使用或打出手牌直到回合结束', + '视为对'+get.translation(target)+'使用一张杀(不计入次数限制)' + ]); + } + else{ + var evt=_status.event.getParent('phaseUse'); + if(evt&&evt.name=='phaseUse'){ + evt.skipped=true; + } + event.finish(); + } + 'step 2' + if(result.control=='选项一'){ + target.addTempSkill('fenyue2','phaseAfter'); + } + else{ + player.useCard({name:'sha'},target,false); + } + } + }, + fenyue2:{ + mark:true, + mod:{ + cardEnabled:function(){ + return false; + }, + cardUsable:function(){ + return false; + }, + cardRespondable:function(){ + return false; + }, + cardSavable:function(){ + return false; + } + }, + intro:{ + content:'不能使用或打出卡牌' + } + }, + zhuoshui:{ + audio:'huoshui', + trigger:{player:'phaseBegin'}, + forced:true, + content:function(){ + game.countPlayer(function(current){ + if(current!=player&&!current.hasSkill('fengyin')){ + player.line(current,'green'); + current.addTempSkill('fengyin','phaseAfter'); + } + }); + } + }, + zqingcheng:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',{type:'equip'}); + }, + filterCard:{type:'equip'}, + position:'he', + filterTarget:function(card,player,target){ + return target!=player; + }, + check:function(card){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return get.attitude(player,current)>2&¤t.isTurnedOver(); + })){ + return 10-get.value(card,player); + } + return 6-get.value(card,player); + }, + content:function(){ + 'step 0' + target.turnOver(); + 'step 1' + target.draw(2); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(target.isTurnedOver()) return 2; + return -0.5; + } + } + } + }, + zfengshi:{ + audio:'fengshi', + trigger:{player:'shaBegin'}, + filter:function(event,player){ + return event.target.countCards('e'); + }, + logTarget:'target', + check:function(event,player){ + if(event.target.hasSkillTag('noe')) return false; + return get.attitude(player,event.target)<0; + }, + content:function(){ + trigger.target.chooseToDiscard('e',true); + } + }, + chuanxin:{ + trigger:{source:'damageBefore'}, + filter:function(event,player){ + if(event.card&&(event.card.name=='sha'||event.card.name=='juedou')){ + if(get.mode()=='guozhan'){ + return (event.player.identity!='qun'||player.identity=='ye')&& + !event.player.isUnseen()&&event.player.hasViceCharacter(); + } + else{ + var info=lib.character[event.player.name]; + if(!info) return false; + var skills=event.player.getSkills(); + for(var i=0;i=2) return 1; + return 0; + }).set('choiceList',['弃置装备区内的所有牌并失去一点体力',get.mode()=='guozhan'?'移除副将牌':'随机移除武将牌上的一个技能']); + } + else{ + event._result={index:1}; + } + 'step 1' + if(result.index==1){ + if(get.mode()!='guozhan'){ + var info=lib.character[trigger.player.name]; + var skills=trigger.player.getSkills(); + var list=[]; + for(var i=0;i0; + }, + logTarget:'source', + content:function(){ + var source=trigger.source; + if(source.hasSkill('hengjiang2')){ + source.storage.hengjiang2+=trigger.num; + source.updateMarks(); + } + else{ + source.storage.hengjiang3=player; + source.storage.hengjiang2=trigger.num; + source.addTempSkill('hengjiang2','phaseAfter'); + } + } + }, + hengjiang2:{ + mark:true, + intro:{ + content:'手牌上限-#' + }, + mod:{ + maxHandcard:function(player,num){ + return num-player.storage.hengjiang2; + } + }, + onremove:function(player){ + delete player.storage.hengjiang2; + delete player.storage.hengjiang3; + }, + trigger:{player:'phaseDiscardEnd'}, + filter:function(event,player){ + return player.storage.hengjiang3.isIn()&&(!event.cards||event.cards.length==0); + }, + forced:true, + popup:false, + content:function(){ + player.storage.hengjiang3.draw(); + } + }, + shuangren:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + priority:15, + content:function(){ + 'step 0' + var goon; + if(player.needsToDiscard()>1){ + goon=player.hasCard(function(card){ + return card.number>10&&get.value(card)<=5; + }); + } + else{ + goon=player.hasCard(function(card){ + return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; + }); + } + player.chooseTarget(get.prompt('shuangren'),function(card,player,target){ + return target!=player&&target.countCards('h'); + }).set('ai',function(target){ + var player=_status.event.player; + if(_status.event.goon&&get.attitude(player,target)<0){ + return get.effect(target,{name:'sha'},player,player); + } + return 0; + }).set('goon',goon); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('shuangren',target); + player.chooseToCompare(target); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + var target=event.target; + if(target.identity!='ye'&&target.identity!='unknown'&&game.hasPlayer(function(current){ + if(!player.canUse('sha',current,false)) return false; + if(target==current) return false; + if(get.mode()=='guozhan'){ + return target.identity==current.identity; + } + return true; + })){ + var str='对一名'; + if(get.mode()=='guozhan'){ + str+=get.translation(target.identity)+'势力的'; + } + player.chooseTarget(str+'角色使用一张杀',true,function(card,player,target){ + if(!player.canUse('sha',target,false)) return false; + if(get.mode()=='guozhan'){ + return target.identity==_status.event.identity; + } + return true; + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }).set('identity',target.identity); + } + else{ + player.useCard({name:'sha'},target,false); + event.finish(); + } + } + else{ + trigger.finish(); + trigger.untrigger(); + event.finish(); + } + 'step 3' + if(result.bool&&result.targets&&result.targets.length){ + player.useCard({name:'sha'},result.targets[0],false); + } + } + }, + kuanshi:{ + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('kuanshi')).set('ai',function(target){ + if(get.attitude(_status.event.player,target)>0){ + return 1/Math.sqrt(target.hp+1); + } + return 0; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('kuanshi',target); + target.storage.kuanshi2=player; + target.addSkill('kuanshi2'); + } + } + }, + kuanshi2:{ + mark:'character', + intro:{ + content:'下一次受到超过1点的伤害时,防止此伤害,然后$跳过下个回合的摸牌阶段' + }, + trigger:{player:'damageBegin'}, + forced:true, + filter:function(event,player){ + return event.num>1; + }, + priority:-11, + content:function(){ + trigger.untrigger(); + trigger.finish(); + player.storage.kuanshi2.skip('phaseDraw'); + player.removeSkill('kuanshi2'); + }, + group:'kuanshi2_remove', + onremove:true, + subSkill:{ + remove:{ + trigger:{global:['phaseBegin','dieAfter']}, + forced:true, + popup:false, + filter:function(event,player){ + return event.player==player.storage.kuanshi2; + }, + content:function(){ + player.removeSkill('kuanshi2'); + } + } + } + }, + xiashu:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + var maxval=0; + var hs=player.getCards('h'); + for(var i=0;i0) return 0.1; + if(maxval>=8) return 0; + if(att==0) return 0.2; + if(dh>=3) return dh; + if(dh==2){ + if(maxval<=7) return dh; + } + if(maxval<=6) return dh; + return 0; - }).set('maxval',maxval); - 'step 1' - if(result.bool){ - player.logSkill('xiashu',result.targets); - event.target=result.targets[0]; - var hs=player.getCards('h'); - event.target.gain(hs,player); - player.$give(hs.length,event.target); - } - else{ - event.finish(); - } - 'step 2' - var hs=event.target.getCards('h'); - if(!hs.length){ - event.finish(); - return; - } - hs.sort(function(a,b){ - return get.value(b,player,'raw')-get.value(a,player,'raw'); - }); - event.target.chooseCard([1,hs.length],'展示至少一张手牌',true).set('ai',function(card){ - var rand=_status.event.rand; - var list=_status.event.list; - if(_status.event.att){ - if(ui.selected.cards.length>=Math.ceil(list.length/2)) return 0; - var value=get.value(card); - if(_status.event.getParent().player.isHealthy()){ - value+=(get.tag(card,'damage')?1.5:0)+(get.tag(card,'draw'?2:0)); - } - return value; - } - if(ui.selected.cards.length>=Math.floor(list.length/2)) return 0; - return (list.indexOf(card)%2==rand)?1:0; - }).set('rand',(Math.random()<0.6)?1:0).set('list',hs).set('att',get.attitude(event.target,player)>0); - 'step 3' - event.target.showCards(result.cards); - event.cards1=result.cards; - event.cards2=event.target.getCards('h',function(card){ - return !event.cards1.contains(card); - }); - 'step 4' - var choice; - var num1=event.cards1.length; - var num2=event.cards2.length; - if(get.attitude(event.target,player)>0&&num1>=num2){ - choice=0; - } - else if(num1==num2){ - choice=(Math.random()<0.45)?0:1; - } - else if(num1>num2){ - if(num1-num2==1){ - choice=(Math.random()<0.6)?0:1; - } - else{ - choice=0; - } - } - else{ - if(num2-num1==1){ - choice=(Math.random()<0.6)?1:0; - } - else{ - choice=1; - } - } - player.chooseControl(function(event,player){ - return _status.event.choice; - }).set('choiceList',['获得'+get.translation(event.target)+'展示的牌', - '获得'+get.translation(event.target)+'未展示的牌']).set('choice',choice); - 'step 5' - if(result.index==0){ - player.gain(event.cards1,target); - target.$give(event.cards1,player); - } - else{ - player.gain(event.cards2,target); - target.$giveAuto(event.cards2,player); - } - }, - ai:{ - expose:0.1 - } - }, - sheyan:{ - trigger:{global:'useCard'}, - filter:function(event,player){ - if(!event.targets||!event.targets.contains(player)) return false; - var info=get.info(event.card); - if(info.type!='trick') return false; - if(info.multitarget) return false; - return game.hasPlayer(function(current){ - return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,event.player,current); - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('sheyan'),function(card,player,target){ - return !trigger.targets.contains(target)&&lib.filter.targetEnabled2(trigger.card,trigger.player,target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - return get.effect(target,trigger.card,trigger.player,player); - }); - 'step 1' - if(result.bool){ - if(!event.isMine()) game.delay(0.5); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - player.logSkill('sheyan',event.target); - trigger.targets.push(event.target); - }, - ai:{ - expose:0.2 - } - }, - bingzheng:{ - trigger:{player:'phaseUseEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('bingzheng'),function(card,player,target){ - return target.countCards('h')!=target.hp; - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - var nh=target.countCards('h'); - if(att>0){ - if(nh==target.hp-1){ - if(player==target) return att+1; - return att+2; - } - if(player==target&&player.needsToDiscard()) return att/3; - return att; - } - else{ - if(nh==target.hp+1) return -att; - if(nh==0) return 0; - return -att/2; - } - }); - 'step 1' - if(result.bool){ - player.logSkill('bingzheng',result.targets); - event.target=result.targets[0]; - if(event.target.countCards('h')){ - player.chooseControl(function(event,player){ - var target=event.target; - if(get.attitude(player,target)<0) return 1; - if(target.countCards('h')==target.hp+1) return 1; - return 0; - }).set('choiceList',['令'+get.translation(event.target)+'摸一张牌', - '令'+get.translation(event.target)+'弃置一张手牌']); - } - else{ - event.directfalse=true; - } - } - else{ - event.finish(); - } - 'step 2' - if(event.directfalse||result.index==0){ - event.target.draw(); - } - else{ - event.target.chooseToDiscard('h',true); - } - 'step 3' - if(event.target.countCards('h')==event.target.hp){ - player.draw(); - if(event.target==player){ - event.finish(); - return; - } - var next=player.chooseCard('是否交给'+get.translation(event.target)+'一张牌?','he'); - next.set('ai',function(card){ - if(get.position(card)!='h') return 0; - if(_status.event.shan){ - return card.name=='shan'?1:0; - } - if(_status.event.goon){ - return 10-get.value(card); - } - return -get.value(card,_status.event.player,'raw'); - }); - if(get.attitude(player,event.target)>1&& - player.countCards('h','shan')>1&&player.countCards('h')>event.target.countCards('h')){ - next.set('shan',true); - } - if(get.attitude(player,event.target)>0&&player.needsToDiscard()){ - next.set('goon',true); - } - } - else{ - event.finish(); - } - 'step 4' - if(result.bool){ - event.target.gain(result.cards,player); - player.$giveAuto(result.cards,event.target); - } - }, - ai:{ - expose:0.2, - threaten:1.4 - } - }, - fuman:{ - enable:'phaseUse', - filterTarget:function(card,player,target){ - return !target.hasSkill('fuman2')&&target!=player; - }, - filter:function(event,player){ - return player.countCards('h','sha'); - }, - discard:false, - prepare:'give', - filterCard:{name:'sha'}, - content:function(){ - target.gain(cards,player); - target.storage.fuman3=cards[0]; - target.storage.fuman2=player; - target.addTempSkill('fuman2',{player:'phaseAfter'}); - }, - check:function(card){ - return 6-get.value(card); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(!target.hasSha()) return 1.2; - return 1; - } - } - } - }, - fuman2:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.card==player.storage.fuman3&&player.storage.fuman2.isIn(); - }, - mark:true, - intro:{ - content:'下个回合结束之前使用“抚蛮”牌时,令$一张牌' - }, - content:function(){ - 'step 0' - game.delay(0.5); - 'step 1' - player.line(player.storage.fuman2,'green'); - player.storage.fuman2.draw(); - player.storage.fuman2.logSkill('fuman'); - }, - onremove:function(player){ - delete player.storage.fuman2; - delete player.storage.fuman3; - }, - ai:{ - effect:{ - player:function(card,player,target,current){ - if(card.name=='sha'&&card!=player.storage.fuman3&& - player.storage.fuman2.isIn()&&get.attitude(player,player.storage.fuman2)>0){ - return 'zeroplayertarget'; - } - } - } - } - }, - qizhou:{ - trigger:{player:['phaseBefore','equipAfter','loseAfter']}, - forced:true, - popup:false, - derivation:['mashu','reyingzi','duanbing','fenwei'], - filter:function(event,player){ - if(player.equiping) return false; - var suits=[]; - var es=player.getCards('e'); - for(var i=0;i0; - } - }, - content:function(){ - var suits=[]; - var es=player.getCards('e'); - for(var i=0;i0; - } - if(player.hasSha()&&geteff(target)){ - var num=game.countPlayer(function(current){ - return current!=player&&get.distance(player,current)<=1&&geteff(current); - }); - if(num==0){ - if(game.hasPlayer(function(current){ - return player.canUse('sha',current)&&geteff(current)&¤t!=target; - })){ - return 1; - } - } - else if(num==1){ - return 1; - } - } - return 0; - } - } - } - }, - fenxun2:{ - mark:'character', - onremove:true, - intro:{ - content:'到$的距离视为1' - }, - mod:{ - globalFrom:function(from,to){ - if(to==from.storage.fenxun2){ - return -Infinity; - } - } - } - }, - duanbing:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - if(event.card.name!='sha') return false; - return game.hasPlayer(function(current){ - return !event.targets.contains(current)&&get.distance(player,current)<=1&&player.canUse('sha',current); - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('duanbing'),function(card,player,target){ - return !_status.event.source.contains(target)&&get.distance(player,target)<=1&&player.canUse('sha',target); - }).set('source',trigger.targets).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'sha'},player,player); - }); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!_status.connectMode) game.delay(0.5); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - player.logSkill('duanbing',event.target); - trigger.targets.push(event.target); - }, - ai:{ - effect:{ - player:function(card,player,target){ - if(card.name=='sha'){ - if(player._duanbingtmp) return; - player._duanbingtmp=true; - if(get.effect(target,{name:'sha'},player,player)<=0){ - delete player._duanbingtmp; - return; - } - if(game.hasPlayer(function(current){ - return current!=target&&get.distance(player,current)<=1&& - player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)>0; - })){ - delete player._duanbingtmp; - return [1,1]; - } - delete player._duanbingtmp; - } - } - } - } - }, - fuhan:{ - trigger:{player:'phaseBefore'}, - unique:true, - skillAnimation:true, - forceunique:true, - filter:function(event,player){ - return player.storage.fanghun>0; - }, - prompt:function(event,player){ - var num=player.storage.fanghun2; - var mode=get.mode(); - if(mode!='chess'&&mode!='tafang'&&mode!='stone'){ - num=Math.min(num,game.players.length+game.dead.length); - } - return get.prompt('fuhan')+'(体力上限:'+num+')'; - }, - check:function(event,player){ - var num=player.storage.fanghun2; - if(num==1) return false; - if(player.hp<=1) return true; - if(num==2) return false; - if(num==3) return player.hp<3&&player.isLowestHp(); - return true; - }, - content:function(){ - 'step 0' - var list=[]; - if(_status.connectMode){ - list=get.charactersOL(function(i){ - return lib.character[i][1]!='shu'; - }); - } - else{ - for(var i in lib.character){ - if(!lib.filter.characterDisabled(i)&&lib.character[i][1]=='shu'){ - list.push(i); - } - } - } - var players=game.players.concat(game.dead); - for(var i=0;i=3; - }, - skillAnimation:true, - unique:true, - content:function(){ - 'step 0' - player.awakenSkill('yjixi'); - player.gainMaxHp(); - player.recover(); - 'step 1' - var str='摸两张牌'; - var mode=get.mode(); - var choice='选项一'; - if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ - var list=[]; - var zhu=get.zhu(player); - if(zhu&&zhu!=player&&zhu.skills){ - for(var i=0;i=6) return 0; - return 20-num; - } - else{ - if(_status.event.player.needsToDiscard()){ - return 7-num; - } - } - return 0; - }, - discard:false, - prepare:'give', - content:function(){ - 'step 0' - target.gain(cards,player); - if(get.color(cards[0])=='black'){ - target.chooseToDiscard(2,'he','弃置两张牌,或令'+get.translation(player)+'摸两张牌').set('ai',function(card){ - if(_status.event.goon) return 7-get.value(card); - return 0; - }).set('goon',get.attitude(target,player)<0); - } - else{ - event.finish(); - } - 'step 1' - if(!result.bool){ - player.draw(2); - } - }, - ai:{ - order:8, - expose:0.2, - result:{ - target:function(player,target){ - if(ui.selected.cards.length&&get.color(ui.selected.cards[0])=='red'){ - if(target.countCards('h')0; - }, - content:function(){ - 'step 0' - player.draw(player.storage.shanjia); - 'step 1' - player.chooseToDiscard('he',player.storage.shanjia,true); - 'step 2' - var useCard=false; - if(result.bool&&result.cards){ - for(var i=0;i0) - })){ - return 6-get.value(card); - } - } - return 0; - }, - content:function(){ - player.loseHp(); - switch(get.type(cards[0],'trick')){ - case 'basic':player.addTempSkill('zhanyi_basic','phaseAfter');break; - case 'equip':player.addTempSkill('zhanyi_equip','phaseAfter');break; - case 'trick':player.addTempSkill('zhanyi_trick','phaseAfter');player.draw(2);break; - } - }, - ai:{ - order:9.1, - result:{ - player:1 - } - } - }, - zhanyi_basic:{ - group:['zhanyi_basic_sha','zhanyi_basic_jiu','zhanyi_basic_tao'] - }, - zhanyi_basic_tao:{ - enable:'chooseToUse', - filterCard:{type:'basic'}, - viewAs:{name:'tao'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - prompt:'将一张基本牌当桃使用', - check:function(card){ - return 8-get.value(card); - }, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - save:true, - } - }, - zhanyi_basic_sha:{ - enable:'chooseToUse', - filterCard:{type:'basic'}, - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - prompt:'将一张基本牌当杀使用', - check:function(card){return 4-get.value(card)}, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - respondSha:true, - } - }, - zhanyi_basic_jiu:{ - enable:'chooseToUse', - filterCard:{type:'basic'}, - viewAs:{name:'jiu'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{type:'basic'})) return false; - }, - prompt:'将一张基本牌当酒使用', - check:function(card){ - if(_status.event.type=='dying') return 1; - return 4-get.value(card); - }, - ai:{ - skillTagFilter:function(player){ - return player.countCards('h',{type:'basic'})>0&&player.hp<=0; - }, - save:true, - } - }, - zhanyi_equip:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return event.target.countCards('he')>0; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - content:function(){ - trigger.target.chooseToDiscard('he',true,2); - } - }, - zhanyi_trick:{ - mod:{ - targetInRange:function(){ - return true; - } - } - }, - shichou:{ - skillAnimation:true, - unique:true, - enable:'phaseUse', - zhuSkill:true, - filter:function(event,player){ - if(!player.hasZhuSkill('shichou'))return false; - if(player.countCards('he')<2) return false; - return !player.storage.shichou; - }, - selectCard:2, - init:function(player){ - if(player.hasZhuSkill('shichou')){ - player.markSkill('shichou'); - player.storage.shichou=false; - } - }, - filterTarget:function(card,player,target){ - return target.group=='shu'&&target!=player; - }, - filterCard:true, - position:'he', - check:function(card){ - return 7-get.value(card); - }, - discard:false, - prepare:'give', - content:function(){ - player.storage.shichou=true; - player.awakenSkill('shichou'); - target.gain(cards,player); - player.storage.shichou_target=target; - player.addSkill('shichou2'); - target.markSkillCharacter('shichou',player,'誓仇','代替'+get.translation(player)+'承受伤害直到首次进入濒死状态'); - }, - intro:{ - content:'limited' - }, - ai:{ - order:7, - result:{ - player:function(player,target){ - if(player.hasUnknown()) return 0; - var att=get.attitude(player,target); - if(att<=0){ - if(target.hp==1) return (10-att)/2; - return 10-att; - } - else{ - if(target.hp==1) return 0; - return (10-att)/4; - } - }, - } - } - }, - shichou2:{ - group:'shichou3', - trigger:{player:'damageBefore'}, - forced:true, - popup:false, - content:function(){ - trigger.untrigger(); - trigger.player=player.storage.shichou_target; - trigger.player.addSkill('shichou4'); - trigger.trigger('damageBefore'); - player.logSkill('shichou2',player.storage.shichou_target); - game.delay(0.5); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(get.attitude(player,target)>0) return [0,0]; - var eff=get.damageEffect(target.storage.shichou_target,player,target); - if(eff>0){ - return [0,1]; - } - else if(eff<0){ - return [0,-2]; - } - else{ - return [0,0]; - } - } - } - } - } - }, - shichou3:{ - trigger:{global:['dying','dieBegin']}, - forced:true, - popup:false, - priority:10, - filter:function(event,player){ - return event.player==player.storage.shichou_target; - }, - content:function(){ - trigger.player.unmarkSkill('shichou'); - delete player.storage.shichou_target; - player.removeSkill('shichou2'); - } - }, - shichou4:{ - trigger:{player:['damageAfter','damageCancelled']}, - forced:true, - popup:false, - audio:false, - content:function(){ - if(event.triggername=='damageAfter'&&trigger.num){ - player.draw(trigger.num); - } - player.removeSkill('shichou4'); - } - }, - zhaolie:{ - trigger:{player:'phaseDrawBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('zhaolie'),function(card,player,target){ - return target!=player&&get.distance(player,target,'attack')<=1; - }).set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0) return 0; - return get.damageEffect(target,player,player); - }); - 'step 1' - if(result.bool){ - trigger.num--; - player.storage.zhaolie=result.targets[0]; - player.logSkill('zhaolie',result.targets); - player.addTempSkill('zhaolie2','phaseDrawAfter'); - } - } - }, - zhaolie2:{ - trigger:{player:'phaseDrawEnd'}, - forced:true, - popup:false, - content:function(){ - 'step 0' - event.cards=get.cards(3); - player.showCards(event.cards); - 'step 1' - event.basic=[]; - event.nonbasic=[]; - for(var i=0;i1?0:7-get.value(card); - case 2:return 8-get.value(card); - case 3:return 10-get.value(card); - default:return 0; - } - }).set('num',num); - } - 'step 2' - var num=event.nonbasic.length; - var undone=false; - if(num==0){ - if(event.basic.length){ - result.targets[0].gain(event.basic,'gain2','log'); - } - } - else{ - if(result.bool){ - if(event.basic.length){ - player.gain(event.basic,'gain2','log'); - } - } - else{ - player.storage.zhaolie.damage(num); - if(event.basic.length){ - undone=true; - } - } - } - if(!undone){ - delete player.storage.zhaolie; - event.finish(); - } - 'step 3' - if(player.storage.zhaolie.isAlive()){ - player.storage.zhaolie.gain(event.basic,'gain2','log'); - } - else{ - for(var i=0;i=num) return false; - return true; - }, - filterTarget:function(card,player,target){ - return target.countCards('e')>0; - }, - content:function(){ - 'step 0' - target.draw(); - 'step 1' - var goon=get.damageEffect(target,player,target)>=0; - if(!goon&&target.hp>=4&&get.attitude(player,target)<0){ - var es=target.getCards('e'); - for(var i=0;i=8){ - goon=true;break; - } - } - } - target.chooseControl(function(){ - if(_status.event.goon) return '选项二'; - return '选项一'; - }).set('goon',goon).set('prompt','定叛').set('choiceList',['令'+get.translation(player)+'弃置你装备区里的一张牌','获得你装备区内的所有牌并受到一点伤害']); - 'step 2' - if(result.control=='选项一'){ - player.discardPlayerCard(target,true,'e'); - event.finish(); - } - else{ - target.gain(target.getCards('e'),'gain2'); - } - 'step 3' - game.delay(0.5); - target.damage(); - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(get.damageEffect(target,player,target)>=0) return 2; - var att=get.attitude(player,target); - if(att==0) return 0; - var es=target.getCards('e'); - for(var i=0;i0){ - return 1; - } - } - else if(val>=7){ - if(att<0){ - return -1; - } - } - } - return 0; - } - } - } - }, - hongde:{ - trigger:{player:['gainEnd','loseEnd']}, - direct:true, - filter:function(event,player){ - return event.cards&&event.cards.length>1; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('hongde'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - return get.attitude(player,target); - }); - 'step 1' - if(result.bool){ - player.logSkill('hongde',result.targets); - result.targets[0].draw(); - } - } - }, - ziyuan:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - var num=0; - for(var i=0;i0); - })){ - return 10; - } - return 1; - }, - result:{ - player:function(player,target){ - var eff=get.recoverEffect(target,player,player); - if(eff<0) return 0; - if(eff>0){ - if(target.hp==1) return 3; - return 2; - } - if(player.needsToDiscard()) return 1; - return 0; - } - }, - threaten:1.3 - } - }, - jugu:{ - mod:{ - maxHandcard:function(player,num){ - return num+player.maxHp; - } - }, - trigger:{global:'gameStart'}, - forced:true, - content:function(){ - player.draw(player.maxHp,false); - player.$draw(player.maxHp); - } - }, - tuifeng:{ - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - init:function(player){ - player.storage.tuifeng=[]; - }, - content:function(){ - 'step 0' - player.chooseCard(get.prompt('tuifeng'),'he',[1,trigger.num]).set('ai',function(card){ - if(card.name=='du') return 20; - return 7-get.useful(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('tuifeng'); - player.lose(result.cards,ui.special); - player.$give(result.cards,player); - for(var i=0;i0; - }, - content:function(){ - player.draw(2*player.storage.tuifeng.length); - player.addTempSkill('tuifeng3','phaseAfter'); - player.$throw(player.storage.tuifeng.slice(0),1000); - player.storage.tuifeng3=player.storage.tuifeng.length; - while(player.storage.tuifeng.length){ - ui.discardPile.appendChild(player.storage.tuifeng.shift()); - } - player.unmarkSkill('tuifeng') - } - }, - tuifeng3:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'&&player.storage.tuifeng3) return num+player.storage.tuifeng3; - } - }, - onremove:true - }, - weidi:{ - trigger:{global:['gameStart','zhuUpdate']}, - forced:true, - popup:false, - filter:function(event,player){ - var mode=get.mode(); - return (mode=='identity'||(mode=='versus'&&_status.mode=='four')); - }, - content:function(){ - var list=[]; - var zhu=get.zhu(player); - if(zhu&&zhu!=player&&zhu.skills){ - for(var i=0;i0; - }, - init:function(player){ - player.storage.jianshu=false; - }, - filterTarget:function(card,player,target){ - if(ui.selected.targets.length){ - return target.countCards('h')>0&&target.distanceTo(ui.selected.targets[0])<=1; - } - return true; - }, - filterCard:{color:'black'}, - mark:true, - discard:false, - delay:0, - check:function(card){return 6-get.value(card);}, - selectTarget:2, - multitarget:true, - content:function(){ - 'step 0' - player.$give(cards,targets[0]); - player.awakenSkill('jianshu'); - player.storage.jianshu=true; - targets[0].gain(cards,player); - 'step 1' - targets[0].chooseToCompare(targets[1]); - 'step 2' - if(result.bool){ - targets[0].chooseToDiscard('he',2,true); - targets[1].loseHp(); - } - else{ - targets[1].chooseToDiscard('he',2,true); - targets[0].loseHp(); - } - }, - intro:{ - content:'limited' - }, - ai:{ - expose:0.4, - order:4, - result:{ - target:function(player,target){ - if(player.hasUnknown()) return 0; - if(ui.selected.targets.length) return -1; - return -0.5; - } - } - } - }, - yongdi:{ - unique:true, - trigger:{player:'damageEnd'}, - animationColor:'fire', - skillAnimation:'legend', - filter:function(event,player){ - return !player.storage.yongdi; - }, - init:function(player){ - player.storage.yongdi=false; - }, - mark:true, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('yongdi'),function(card,player,target){ - return target.sex=='male'&&target!=player; - }).set('ai',function(target){ - if(!_status.event.goon) return 0; - var player=_status.event.player; - var att=get.attitude(player,target); - if(att<=1) return 0; - var mode=get.mode(); - if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ - if(target.name&&lib.character[target.name]){ - for(var i=0;i0; - }, - selectTarget:[1,3], - filter:function(event,player){ - return player.countCards('h')>0; - }, - multitarget:true, - multiline:true, - content:function(){ - player.chooseToCompare(targets).callback=lib.skill.gushe.callback; - }, - init:function(player){ - player.storage.gushe=0; - }, - intro:{ - name:'饶舌', - content:'mark' - }, - chat:['粗鄙之语','天地不容','谄谀之臣','皓首匹夫,苍髯老贼','二臣贼子','断脊之犬','我从未见过有如此厚顔无耻之人!'], - callback:function(){ - 'step 0' - if(event.num1>event.num2){ - target.chooseToDiscard('he','弃置一张牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){ - if(_status.event.goon) return 6-get.value(card); - return 0; - }).set('goon',get.attitude(target,player)<0); - } - else{ - target.chat(lib.skill.gushe.chat[player.storage.gushe]); - game.delay(); - player.storage.gushe++; - player.markSkill('gushe'); - if(player.storage.gushe>=7){ - player.die(); - } - else{ - // player.chooseToDiscard('弃置一张牌,或摸一张牌').set('ai',function(){return -1;}); - event.finish(); - } - } - 'step 1' - if(!result.bool){ - player.draw(); - } - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - var num=game.countPlayer(function(current){ - return get.attitude(player,current)<0&¤t!=player&¤t.countCards('h'); - }); - if(num>3) num=3; - var hs=player.getCards('h'); - for(var i=0;i5&&player.storage.gushe+num<=6) return -1; - } - } - } - return 0; - }, - } - } - }, - jici:{ - trigger:{player:'compare'}, - filter:function(event,player){ - return event.getParent().name=='gushe'&&!event.iwhile&&event.num1<=player.storage.gushe; - }, - content:function(){ - if(trigger.num10; - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - filterCard:{name:'sha'}, - content:function(){ - 'step 0' - target.chooseToDiscard('he',true); - 'step 1' - if(target.hp>=player.hp&&result.bool&&result.cards[0].name!='sha'){ - player.useCard({name:'juedou'},target); - } - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(get.effect(target,{name:'juedou'},player,player)<=0){ - return 0; - } - if(target.hpplayer.hp) return -0.1; - return 0; - } - var hs1=target.getCards('h','sha'); - var hs2=player.getCards('h','sha'); - if(hs1.length>hs2.length){ - return 0; - } - var hsx=target.getCards('h'); - if(hsx.length>2&&hs2.length<=1&&hsx[0].number<6){ - return 0; - } - if(hsx.length>3&&hs2.length<=1){ - return 0; - } - if(hs1.length>hs2.length-1&&hs1.length>0&&(hs2.length<=1||hs1[0].number>hs2[0].number)){ - return 0; - } - return -1; - } - } - } - }, - shefu:{ - trigger:{player:'phaseEnd'}, - direct:true, - audio:2, - init:function(player){ - player.storage.shefu=[]; - player.storage.shefu2=[]; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - intro:{ - content:'cards', - mark:function(dialog,content,player){ - if(content&&content.length){ - dialog.addAuto(content); - if(player.isUnderControl(true)){ - var str=''; - for(var i=0;i'+str+'') - } - } - }, - }, - content:function(){ - 'step 0' - var list1=[],list2=[],list3=[]; - for(var i=0;i=5) return false; - if(nh2>nh2&&event.source.isDead()) return false; - return true; - }, - direct:true, - content:function(){ - "step 0" - var num1=player.countCards('h'); - var num2=trigger.source.countCards('h'); - if(num1>num2){ - var next=player.chooseToDiscard([num2+1,num1],'贲育:是否弃置至少'+(num2+1)+'张手牌,并对'+get.translation(trigger.source)+'造成一点伤害?'); - next.logSkill=['benyu',trigger.source]; - next.set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - if(ui.selected.cards.length>=_status.event.num){ - return -1; - } - if(get.damageEffect(trigger.source,player,player)>0&&_status.event.num<=2){ - return 8-get.value(card); - } - return -1; - }); - next.set('num',num2+1); - } - else{ - event.draw=true; - event.num=Math.min(num2,5)-num1; - player.chooseBool(get.prompt('benyu')); - } - "step 1" - if(result.bool){ - if(event.draw){ - player.logSkill('benyu',trigger.source); - player.draw(event.num); - } - else{ - trigger.source.damage(player); - } - } - }, - }, - jili:{ - trigger:{global:'useCard'}, - forced:true, - check:function(event,player){ - return get.effect(player,event.card,event.player,player)>0; - }, - filter:function(event,player){ - if(get.color(event.card)!='red') return false; - if(!event.targets) return false; - if(event.player==player) return false; - if(event.targets.contains(player)) return false; - if(get.info(event.card).multitarget) return false; - var type=get.type(event.card); - if(type!='basic'&&type!='trick') return false; - if(lib.filter.targetEnabled2(event.card,event.player,player)){ - for(var i=0;i0&&event.player!=player&&!player.hasSkill('zhidao2'); - }, - forced:true, - content:function(){ - var num=0; - if(trigger.player.countCards('h')) num++; - if(trigger.player.countCards('e')) num++; - if(trigger.player.countCards('j')) num++; - if(num){ - player.gainPlayerCard(trigger.player,num,'hej',true).set('filterButton',function(button){ - for(var i=0;i0; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('qizhi'),function(card,player,target){ - return !_status.event.getTrigger().targets.contains(target)&&target.countCards('he')>0; - }).set('ai',function(target){ - var player=_status.event.player; - if(target==player) return 2; - if(get.attitude(player,target)<=0){ - return 1 - } - return 0.5; - }); - 'step 1' - if(result.bool){ - player.storage.qizhi++; - if(!event.isMine()&&!_status.connectMode) game.delay(); - player.logSkill('qizhi',result.targets); - player.discardPlayerCard(result.targets[0],true,'he'); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - event.target.draw(); - }, - group:'qizhi2' - }, - qizhi2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.qizhi=0; - } - }, - jinqu:{ - trigger:{player:'phaseEnd'}, - check:function(event,player){ - return player.storage.qizhi>=player.countCards('h'); - }, - prompt:function(event,player){ - if(typeof player.storage.qizhi!='number'){ - '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(0)+'张?'; - } - return '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(player.storage.qizhi)+'张?'; - }, - content:function(){ - 'step 0' - player.draw(2); - 'step 1' - if(typeof player.storage.qizhi!='number'){ - player.storage.qizhi=0; - } - var dh=player.countCards('h')-player.storage.qizhi; - if(dh>0){ - player.chooseToDiscard(dh,true); - } - } - }, - mouduan:{ - init2:function(player){ - game.broadcastAll(function(player){ - player._mouduan_mark=player.mark('武',{ - content:'拥有技能【激昂】、【谦逊】' - }); - },player); - player.addAdditionalSkill('mouduan',['jiang','qianxun']); - }, - onremove:function(player){ - game.broadcastAll(function(player){ - if(player._mouduan_mark){ - player._mouduan_mark.delete(); - delete player._mouduan_mark; - } - },player); - player.removeAdditionalSkill('mouduan'); - }, - trigger:{player:'loseEnd'}, - forced:true, - filter:function(event,player){ - return player._mouduan_mark&&player._mouduan_mark.name=='武'&&player.countCards('h')<=2; - }, - content:function(){ - game.broadcastAll(function(player){ - if(!player._mouduan_mark) return; - player._mouduan_mark.name='文'; - player._mouduan_mark.skill='文'; - player._mouduan_mark.firstChild.innerHTML='文'; - player._mouduan_mark.info.content='拥有技能【英姿】、【克己】'; - },player); - player.addAdditionalSkill('mouduan',['yingzi','keji']); - }, - group:'mouduan2' - }, - mouduan2:{ - trigger:{global:'phaseBegin'}, - priority:5, - filter:function(event,player){ - return player._mouduan_mark&&player._mouduan_mark.name=='文'&&player.countCards('h')>2; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseToDiscard('he','谋断:是否弃置一张牌将标记变为“武”?').ai=function(){ - return -1; - } - 'step 1' - if(result.bool&&player.countCards('h')>2){ - game.broadcastAll(function(player){ - if(!player._mouduan_mark) return; - player._mouduan_mark.name='武'; - player._mouduan_mark.skill='武'; - player._mouduan_mark.firstChild.innerHTML='武'; - player._mouduan_mark.info.content='拥有技能【激昂】、【谦逊】'; - },player); - player.addAdditionalSkill('mouduan',['jiang','qianxun']); - } - } - }, - tanhu:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool){ - target.addTempSkill('tanhu2','phaseAfter'); - } - }, - ai:{ - result:{ - target:function(player,target){ - var hs=player.getCards('h'); - if(hs.length<3) return 0; - var bool=false; - for(var i=0;i=9&&get.value(hs[i])<7){ - bool=true; - break; - } - } - if(!bool) return 0; - return -1; - } - }, - order:9, - }, - group:'tanhu3' - }, - tanhu2:{ - mark:true, - intro:{ - content:'已成为探虎目标' - } - }, - tanhu3:{ - mod:{ - globalFrom:function(from,to){ - if(to.hasSkill('tanhu2')) return -Infinity; - } - }, - trigger:{player:'useCardToBegin'}, - frequent:true, - filter:function(event){ - return get.type(event.card)=='trick'&&event.target&&event.target.hasSkill('tanhu2'); - }, - content:function(){ - player.draw(); - } - }, - jiqiao:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - content:function(){ - 'step 0' - player.chooseToDiscard(get.prompt('jiqiao'),[1,player.countCards('he',{type:'equip'})],'he',function(card){ - return get.type(card)=='equip'; - }).set('ai',function(card){ - if(card.name=='bagua') return 10; - return 7-get.value(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('jiqiao'); - event.cards=get.cards(3*result.cards.length); - player.showCards(event.cards); - } - else{ - event.finish(); - } - 'step 2' - var gained=[]; - for(var i=0;i=2&&he<=3){ - return '弃牌'; - } - if(player.maxHp-player.hp>=3&&he<=5){ - return '弃牌'; - } - if(player.maxHp-player.hp>3){ - return '弃牌'; - } - return '出杀'; - } - return '出杀'; - }).set('prompt','弃置'+get.translation(trigger.player)+get.cnNumber(player.maxHp-player.hp)+'张牌,或对任意一名角色使用一张杀'); - 'step 1' - if(result.control=='弃牌'){ - player.line(trigger.player,'green'); - if(player.hp1) return false; - if(!event.target) return false; - if(event.target.hp>=player.hp) return false; + }).set('maxval',maxval); + 'step 1' + if(result.bool){ + player.logSkill('xiashu',result.targets); + event.target=result.targets[0]; + var hs=player.getCards('h'); + event.target.gain(hs,player); + player.$give(hs.length,event.target); + } + else{ + event.finish(); + } + 'step 2' + var hs=event.target.getCards('h'); + if(!hs.length){ + event.finish(); + return; + } + hs.sort(function(a,b){ + return get.value(b,player,'raw')-get.value(a,player,'raw'); + }); + event.target.chooseCard([1,hs.length],'展示至少一张手牌',true).set('ai',function(card){ + var rand=_status.event.rand; + var list=_status.event.list; + if(_status.event.att){ + if(ui.selected.cards.length>=Math.ceil(list.length/2)) return 0; + var value=get.value(card); + if(_status.event.getParent().player.isHealthy()){ + value+=(get.tag(card,'damage')?1.5:0)+(get.tag(card,'draw'?2:0)); + } + return value; + } + if(ui.selected.cards.length>=Math.floor(list.length/2)) return 0; + return (list.indexOf(card)%2==rand)?1:0; + }).set('rand',(Math.random()<0.6)?1:0).set('list',hs).set('att',get.attitude(event.target,player)>0); + 'step 3' + event.target.showCards(result.cards); + event.cards1=result.cards; + event.cards2=event.target.getCards('h',function(card){ + return !event.cards1.contains(card); + }); + 'step 4' + var choice; + var num1=event.cards1.length; + var num2=event.cards2.length; + if(get.attitude(event.target,player)>0&&num1>=num2){ + choice=0; + } + else if(num1==num2){ + choice=(Math.random()<0.45)?0:1; + } + else if(num1>num2){ + if(num1-num2==1){ + choice=(Math.random()<0.6)?0:1; + } + else{ + choice=0; + } + } + else{ + if(num2-num1==1){ + choice=(Math.random()<0.6)?1:0; + } + else{ + choice=1; + } + } + player.chooseControl(function(event,player){ + return _status.event.choice; + }).set('choiceList',['获得'+get.translation(event.target)+'展示的牌', + '获得'+get.translation(event.target)+'未展示的牌']).set('choice',choice); + 'step 5' + if(result.index==0){ + player.gain(event.cards1,target); + target.$give(event.cards1,player); + } + else{ + player.gain(event.cards2,target); + target.$giveAuto(event.cards2,player); + } + }, + ai:{ + expose:0.1 + } + }, + sheyan:{ + trigger:{global:'useCard'}, + filter:function(event,player){ + if(!event.targets||!event.targets.contains(player)) return false; + var info=get.info(event.card); + if(info.type!='trick') return false; + if(info.multitarget) return false; + return game.hasPlayer(function(current){ + return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,event.player,current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('sheyan'),function(card,player,target){ + return !trigger.targets.contains(target)&&lib.filter.targetEnabled2(trigger.card,trigger.player,target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + return get.effect(target,trigger.card,trigger.player,player); + }); + 'step 1' + if(result.bool){ + if(!event.isMine()) game.delay(0.5); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + player.logSkill('sheyan',event.target); + trigger.targets.push(event.target); + }, + ai:{ + expose:0.2 + } + }, + bingzheng:{ + trigger:{player:'phaseUseEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('bingzheng'),function(card,player,target){ + return target.countCards('h')!=target.hp; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + var nh=target.countCards('h'); + if(att>0){ + if(nh==target.hp-1){ + if(player==target) return att+1; + return att+2; + } + if(player==target&&player.needsToDiscard()) return att/3; + return att; + } + else{ + if(nh==target.hp+1) return -att; + if(nh==0) return 0; + return -att/2; + } + }); + 'step 1' + if(result.bool){ + player.logSkill('bingzheng',result.targets); + event.target=result.targets[0]; + if(event.target.countCards('h')){ + player.chooseControl(function(event,player){ + var target=event.target; + if(get.attitude(player,target)<0) return 1; + if(target.countCards('h')==target.hp+1) return 1; + return 0; + }).set('choiceList',['令'+get.translation(event.target)+'摸一张牌', + '令'+get.translation(event.target)+'弃置一张手牌']); + } + else{ + event.directfalse=true; + } + } + else{ + event.finish(); + } + 'step 2' + if(event.directfalse||result.index==0){ + event.target.draw(); + } + else{ + event.target.chooseToDiscard('h',true); + } + 'step 3' + if(event.target.countCards('h')==event.target.hp){ + player.draw(); + if(event.target==player){ + event.finish(); + return; + } + var next=player.chooseCard('是否交给'+get.translation(event.target)+'一张牌?','he'); + next.set('ai',function(card){ + if(get.position(card)!='h') return 0; + if(_status.event.shan){ + return card.name=='shan'?1:0; + } + if(_status.event.goon){ + return 10-get.value(card); + } + return -get.value(card,_status.event.player,'raw'); + }); + if(get.attitude(player,event.target)>1&& + player.countCards('h','shan')>1&&player.countCards('h')>event.target.countCards('h')){ + next.set('shan',true); + } + if(get.attitude(player,event.target)>0&&player.needsToDiscard()){ + next.set('goon',true); + } + } + else{ + event.finish(); + } + 'step 4' + if(result.bool){ + event.target.gain(result.cards,player); + player.$giveAuto(result.cards,event.target); + } + }, + ai:{ + expose:0.2, + threaten:1.4 + } + }, + fuman:{ + enable:'phaseUse', + filterTarget:function(card,player,target){ + return !target.hasSkill('fuman2')&&target!=player; + }, + filter:function(event,player){ + return player.countCards('h','sha'); + }, + discard:false, + prepare:'give', + filterCard:{name:'sha'}, + content:function(){ + target.gain(cards,player); + target.storage.fuman3=cards[0]; + target.storage.fuman2=player; + target.addTempSkill('fuman2',{player:'phaseAfter'}); + }, + check:function(card){ + return 6-get.value(card); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(!target.hasSha()) return 1.2; + return 1; + } + } + } + }, + fuman2:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card==player.storage.fuman3&&player.storage.fuman2.isIn(); + }, + mark:true, + intro:{ + content:'下个回合结束之前使用“抚蛮”牌时,令$一张牌' + }, + content:function(){ + 'step 0' + game.delay(0.5); + 'step 1' + player.line(player.storage.fuman2,'green'); + player.storage.fuman2.draw(); + player.storage.fuman2.logSkill('fuman'); + }, + onremove:function(player){ + delete player.storage.fuman2; + delete player.storage.fuman3; + }, + ai:{ + effect:{ + player:function(card,player,target,current){ + if(card.name=='sha'&&card!=player.storage.fuman3&& + player.storage.fuman2.isIn()&&get.attitude(player,player.storage.fuman2)>0){ + return 'zeroplayertarget'; + } + } + } + } + }, + qizhou:{ + trigger:{player:['phaseBefore','equipAfter','loseAfter']}, + forced:true, + popup:false, + derivation:['mashu','reyingzi','duanbing','fenwei'], + filter:function(event,player){ + if(player.equiping) return false; + var suits=[]; + var es=player.getCards('e'); + for(var i=0;i0; + } + }, + content:function(){ + var suits=[]; + var es=player.getCards('e'); + for(var i=0;i0; + } + if(player.hasSha()&&geteff(target)){ + var num=game.countPlayer(function(current){ + return current!=player&&get.distance(player,current)<=1&&geteff(current); + }); + if(num==0){ + if(game.hasPlayer(function(current){ + return player.canUse('sha',current)&&geteff(current)&¤t!=target; + })){ + return 1; + } + } + else if(num==1){ + return 1; + } + } + return 0; + } + } + } + }, + fenxun2:{ + mark:'character', + onremove:true, + intro:{ + content:'到$的距离视为1' + }, + mod:{ + globalFrom:function(from,to){ + if(to==from.storage.fenxun2){ + return -Infinity; + } + } + } + }, + duanbing:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return !event.targets.contains(current)&&get.distance(player,current)<=1&&player.canUse('sha',current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('duanbing'),function(card,player,target){ + return !_status.event.source.contains(target)&&get.distance(player,target)<=1&&player.canUse('sha',target); + }).set('source',trigger.targets).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!_status.connectMode) game.delay(0.5); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + player.logSkill('duanbing',event.target); + trigger.targets.push(event.target); + }, + ai:{ + effect:{ + player:function(card,player,target){ + if(card.name=='sha'){ + if(player._duanbingtmp) return; + player._duanbingtmp=true; + if(get.effect(target,{name:'sha'},player,player)<=0){ + delete player._duanbingtmp; + return; + } + if(game.hasPlayer(function(current){ + return current!=target&&get.distance(player,current)<=1&& + player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)>0; + })){ + delete player._duanbingtmp; + return [1,1]; + } + delete player._duanbingtmp; + } + } + } + } + }, + fuhan:{ + trigger:{player:'phaseBefore'}, + unique:true, + skillAnimation:true, + forceunique:true, + filter:function(event,player){ + return player.storage.fanghun>0; + }, + prompt:function(event,player){ + var num=player.storage.fanghun2; + var mode=get.mode(); + if(mode!='chess'&&mode!='tafang'&&mode!='stone'){ + num=Math.min(num,game.players.length+game.dead.length); + } + return get.prompt('fuhan')+'(体力上限:'+num+')'; + }, + check:function(event,player){ + var num=player.storage.fanghun2; + if(num==1) return false; + if(player.hp<=1) return true; + if(num==2) return false; + if(num==3) return player.hp<3&&player.isLowestHp(); + return true; + }, + content:function(){ + 'step 0' + var list=[]; + if(_status.connectMode){ + list=get.charactersOL(function(i){ + return lib.character[i][1]!='shu'; + }); + } + else{ + for(var i in lib.character){ + if(!lib.filter.characterDisabled(i)&&lib.character[i][1]=='shu'){ + list.push(i); + } + } + } + var players=game.players.concat(game.dead); + for(var i=0;i=3; + }, + skillAnimation:true, + unique:true, + content:function(){ + 'step 0' + player.awakenSkill('yjixi'); + player.gainMaxHp(); + player.recover(); + 'step 1' + var str='摸两张牌'; + var mode=get.mode(); + var choice='选项一'; + if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ + var list=[]; + var zhu=get.zhu(player); + if(zhu&&zhu!=player&&zhu.skills){ + for(var i=0;i=6) return 0; + return 20-num; + } + else{ + if(_status.event.player.needsToDiscard()){ + return 7-num; + } + } + return 0; + }, + discard:false, + prepare:'give', + content:function(){ + 'step 0' + target.gain(cards,player); + if(get.color(cards[0])=='black'){ + target.chooseToDiscard(2,'he','弃置两张牌,或令'+get.translation(player)+'摸两张牌').set('ai',function(card){ + if(_status.event.goon) return 7-get.value(card); + return 0; + }).set('goon',get.attitude(target,player)<0); + } + else{ + event.finish(); + } + 'step 1' + if(!result.bool){ + player.draw(2); + } + }, + ai:{ + order:8, + expose:0.2, + result:{ + target:function(player,target){ + if(ui.selected.cards.length&&get.color(ui.selected.cards[0])=='red'){ + if(target.countCards('h')0; + }, + content:function(){ + 'step 0' + player.draw(player.storage.shanjia); + 'step 1' + player.chooseToDiscard('he',player.storage.shanjia,true); + 'step 2' + var useCard=false; + if(result.bool&&result.cards){ + for(var i=0;i0) + })){ + return 6-get.value(card); + } + } + return 0; + }, + content:function(){ + player.loseHp(); + switch(get.type(cards[0],'trick')){ + case 'basic':player.addTempSkill('zhanyi_basic','phaseAfter');break; + case 'equip':player.addTempSkill('zhanyi_equip','phaseAfter');break; + case 'trick':player.addTempSkill('zhanyi_trick','phaseAfter');player.draw(2);break; + } + }, + ai:{ + order:9.1, + result:{ + player:1 + } + } + }, + zhanyi_basic:{ + group:['zhanyi_basic_sha','zhanyi_basic_jiu','zhanyi_basic_tao'] + }, + zhanyi_basic_tao:{ + enable:'chooseToUse', + filterCard:{type:'basic'}, + viewAs:{name:'tao'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + prompt:'将一张基本牌当桃使用', + check:function(card){ + return 8-get.value(card); + }, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + save:true, + } + }, + zhanyi_basic_sha:{ + enable:'chooseToUse', + filterCard:{type:'basic'}, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + prompt:'将一张基本牌当杀使用', + check:function(card){return 4-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + respondSha:true, + } + }, + zhanyi_basic_jiu:{ + enable:'chooseToUse', + filterCard:{type:'basic'}, + viewAs:{name:'jiu'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{type:'basic'})) return false; + }, + prompt:'将一张基本牌当酒使用', + check:function(card){ + if(_status.event.type=='dying') return 1; + return 4-get.value(card); + }, + ai:{ + skillTagFilter:function(player){ + return player.countCards('h',{type:'basic'})>0&&player.hp<=0; + }, + save:true, + } + }, + zhanyi_equip:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return event.target.countCards('he')>0; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + content:function(){ + trigger.target.chooseToDiscard('he',true,2); + } + }, + zhanyi_trick:{ + mod:{ + targetInRange:function(){ + return true; + } + } + }, + shichou:{ + skillAnimation:true, + unique:true, + enable:'phaseUse', + zhuSkill:true, + filter:function(event,player){ + if(!player.hasZhuSkill('shichou'))return false; + if(player.countCards('he')<2) return false; + return !player.storage.shichou; + }, + selectCard:2, + init:function(player){ + if(player.hasZhuSkill('shichou')){ + player.markSkill('shichou'); + player.storage.shichou=false; + } + }, + filterTarget:function(card,player,target){ + return target.group=='shu'&&target!=player; + }, + filterCard:true, + position:'he', + check:function(card){ + return 7-get.value(card); + }, + discard:false, + prepare:'give', + content:function(){ + player.storage.shichou=true; + player.awakenSkill('shichou'); + target.gain(cards,player); + player.storage.shichou_target=target; + player.addSkill('shichou2'); + target.markSkillCharacter('shichou',player,'誓仇','代替'+get.translation(player)+'承受伤害直到首次进入濒死状态'); + }, + intro:{ + content:'limited' + }, + ai:{ + order:7, + result:{ + player:function(player,target){ + if(player.hasUnknown()) return 0; + var att=get.attitude(player,target); + if(att<=0){ + if(target.hp==1) return (10-att)/2; + return 10-att; + } + else{ + if(target.hp==1) return 0; + return (10-att)/4; + } + }, + } + } + }, + shichou2:{ + group:'shichou3', + trigger:{player:'damageBefore'}, + forced:true, + popup:false, + content:function(){ + trigger.untrigger(); + trigger.player=player.storage.shichou_target; + trigger.player.addSkill('shichou4'); + trigger.trigger('damageBefore'); + player.logSkill('shichou2',player.storage.shichou_target); + game.delay(0.5); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(get.attitude(player,target)>0) return [0,0]; + var eff=get.damageEffect(target.storage.shichou_target,player,target); + if(eff>0){ + return [0,1]; + } + else if(eff<0){ + return [0,-2]; + } + else{ + return [0,0]; + } + } + } + } + } + }, + shichou3:{ + trigger:{global:['dying','dieBegin']}, + forced:true, + popup:false, + priority:10, + filter:function(event,player){ + return event.player==player.storage.shichou_target; + }, + content:function(){ + trigger.player.unmarkSkill('shichou'); + delete player.storage.shichou_target; + player.removeSkill('shichou2'); + } + }, + shichou4:{ + trigger:{player:['damageAfter','damageCancelled']}, + forced:true, + popup:false, + audio:false, + content:function(){ + if(event.triggername=='damageAfter'&&trigger.num){ + player.draw(trigger.num); + } + player.removeSkill('shichou4'); + } + }, + zhaolie:{ + trigger:{player:'phaseDrawBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('zhaolie'),function(card,player,target){ + return target!=player&&get.distance(player,target,'attack')<=1; + }).set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0) return 0; + return get.damageEffect(target,player,player); + }); + 'step 1' + if(result.bool){ + trigger.num--; + player.storage.zhaolie=result.targets[0]; + player.logSkill('zhaolie',result.targets); + player.addTempSkill('zhaolie2','phaseDrawAfter'); + } + } + }, + zhaolie2:{ + trigger:{player:'phaseDrawEnd'}, + forced:true, + popup:false, + content:function(){ + 'step 0' + event.cards=get.cards(3); + player.showCards(event.cards); + 'step 1' + event.basic=[]; + event.nonbasic=[]; + for(var i=0;i1?0:7-get.value(card); + case 2:return 8-get.value(card); + case 3:return 10-get.value(card); + default:return 0; + } + }).set('num',num); + } + 'step 2' + var num=event.nonbasic.length; + var undone=false; + if(num==0){ + if(event.basic.length){ + result.targets[0].gain(event.basic,'gain2','log'); + } + } + else{ + if(result.bool){ + if(event.basic.length){ + player.gain(event.basic,'gain2','log'); + } + } + else{ + player.storage.zhaolie.damage(num); + if(event.basic.length){ + undone=true; + } + } + } + if(!undone){ + delete player.storage.zhaolie; + event.finish(); + } + 'step 3' + if(player.storage.zhaolie.isAlive()){ + player.storage.zhaolie.gain(event.basic,'gain2','log'); + } + else{ + for(var i=0;i=num) return false; + return true; + }, + filterTarget:function(card,player,target){ + return target.countCards('e')>0; + }, + content:function(){ + 'step 0' + target.draw(); + 'step 1' + var goon=get.damageEffect(target,player,target)>=0; + if(!goon&&target.hp>=4&&get.attitude(player,target)<0){ + var es=target.getCards('e'); + for(var i=0;i=8){ + goon=true;break; + } + } + } + target.chooseControl(function(){ + if(_status.event.goon) return '选项二'; + return '选项一'; + }).set('goon',goon).set('prompt','定叛').set('choiceList',['令'+get.translation(player)+'弃置你装备区里的一张牌','获得你装备区内的所有牌并受到一点伤害']); + 'step 2' + if(result.control=='选项一'){ + player.discardPlayerCard(target,true,'e'); + event.finish(); + } + else{ + target.gain(target.getCards('e'),'gain2'); + } + 'step 3' + game.delay(0.5); + target.damage(); + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(get.damageEffect(target,player,target)>=0) return 2; + var att=get.attitude(player,target); + if(att==0) return 0; + var es=target.getCards('e'); + for(var i=0;i0){ + return 1; + } + } + else if(val>=7){ + if(att<0){ + return -1; + } + } + } + return 0; + } + } + } + }, + hongde:{ + trigger:{player:['gainEnd','loseEnd']}, + direct:true, + filter:function(event,player){ + return event.cards&&event.cards.length>1; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('hongde'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + return get.attitude(player,target); + }); + 'step 1' + if(result.bool){ + player.logSkill('hongde',result.targets); + result.targets[0].draw(); + } + } + }, + ziyuan:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + var num=0; + for(var i=0;i0); + })){ + return 10; + } + return 1; + }, + result:{ + player:function(player,target){ + var eff=get.recoverEffect(target,player,player); + if(eff<0) return 0; + if(eff>0){ + if(target.hp==1) return 3; + return 2; + } + if(player.needsToDiscard()) return 1; + return 0; + } + }, + threaten:1.3 + } + }, + jugu:{ + mod:{ + maxHandcard:function(player,num){ + return num+player.maxHp; + } + }, + trigger:{global:'gameStart'}, + forced:true, + content:function(){ + player.draw(player.maxHp,false); + player.$draw(player.maxHp); + } + }, + tuifeng:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + init:function(player){ + player.storage.tuifeng=[]; + }, + content:function(){ + 'step 0' + player.chooseCard(get.prompt('tuifeng'),'he',[1,trigger.num]).set('ai',function(card){ + if(card.name=='du') return 20; + return 7-get.useful(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('tuifeng'); + player.lose(result.cards,ui.special); + player.$give(result.cards,player); + for(var i=0;i0; + }, + content:function(){ + player.draw(2*player.storage.tuifeng.length); + player.addTempSkill('tuifeng3','phaseAfter'); + player.$throw(player.storage.tuifeng.slice(0),1000); + player.storage.tuifeng3=player.storage.tuifeng.length; + while(player.storage.tuifeng.length){ + ui.discardPile.appendChild(player.storage.tuifeng.shift()); + } + player.unmarkSkill('tuifeng') + } + }, + tuifeng3:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'&&player.storage.tuifeng3) return num+player.storage.tuifeng3; + } + }, + onremove:true + }, + weidi:{ + trigger:{global:['gameStart','zhuUpdate']}, + forced:true, + popup:false, + filter:function(event,player){ + var mode=get.mode(); + return (mode=='identity'||(mode=='versus'&&_status.mode=='four')); + }, + content:function(){ + var list=[]; + var zhu=get.zhu(player); + if(zhu&&zhu!=player&&zhu.skills){ + for(var i=0;i0; + }, + init:function(player){ + player.storage.jianshu=false; + }, + filterTarget:function(card,player,target){ + if(ui.selected.targets.length){ + return target.countCards('h')>0&&target.distanceTo(ui.selected.targets[0])<=1; + } + return true; + }, + filterCard:{color:'black'}, + mark:true, + discard:false, + delay:0, + check:function(card){return 6-get.value(card);}, + selectTarget:2, + multitarget:true, + content:function(){ + 'step 0' + player.$give(cards,targets[0]); + player.awakenSkill('jianshu'); + player.storage.jianshu=true; + targets[0].gain(cards,player); + 'step 1' + targets[0].chooseToCompare(targets[1]); + 'step 2' + if(result.bool){ + targets[0].chooseToDiscard('he',2,true); + targets[1].loseHp(); + } + else{ + targets[1].chooseToDiscard('he',2,true); + targets[0].loseHp(); + } + }, + intro:{ + content:'limited' + }, + ai:{ + expose:0.4, + order:4, + result:{ + target:function(player,target){ + if(player.hasUnknown()) return 0; + if(ui.selected.targets.length) return -1; + return -0.5; + } + } + } + }, + yongdi:{ + unique:true, + trigger:{player:'damageEnd'}, + animationColor:'fire', + skillAnimation:'legend', + filter:function(event,player){ + return !player.storage.yongdi; + }, + init:function(player){ + player.storage.yongdi=false; + }, + mark:true, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('yongdi'),function(card,player,target){ + return target.sex=='male'&&target!=player; + }).set('ai',function(target){ + if(!_status.event.goon) return 0; + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<=1) return 0; + var mode=get.mode(); + if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ + if(target.name&&lib.character[target.name]){ + for(var i=0;i0; + }, + selectTarget:[1,3], + filter:function(event,player){ + return player.countCards('h')>0; + }, + multitarget:true, + multiline:true, + content:function(){ + player.chooseToCompare(targets).callback=lib.skill.gushe.callback; + }, + init:function(player){ + player.storage.gushe=0; + }, + intro:{ + name:'饶舌', + content:'mark' + }, + chat:['粗鄙之语','天地不容','谄谀之臣','皓首匹夫,苍髯老贼','二臣贼子','断脊之犬','我从未见过有如此厚顔无耻之人!'], + callback:function(){ + 'step 0' + if(event.num1>event.num2){ + target.chooseToDiscard('he','弃置一张牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){ + if(_status.event.goon) return 6-get.value(card); + return 0; + }).set('goon',get.attitude(target,player)<0); + } + else{ + target.chat(lib.skill.gushe.chat[player.storage.gushe]); + game.delay(); + player.storage.gushe++; + player.markSkill('gushe'); + if(player.storage.gushe>=7){ + player.die(); + } + else{ + // player.chooseToDiscard('弃置一张牌,或摸一张牌').set('ai',function(){return -1;}); + event.finish(); + } + } + 'step 1' + if(!result.bool){ + player.draw(); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + var num=game.countPlayer(function(current){ + return get.attitude(player,current)<0&¤t!=player&¤t.countCards('h'); + }); + if(num>3) num=3; + var hs=player.getCards('h'); + for(var i=0;i5&&player.storage.gushe+num<=6) return -1; + } + } + } + return 0; + }, + } + } + }, + jici:{ + trigger:{player:'compare'}, + filter:function(event,player){ + return event.getParent().name=='gushe'&&!event.iwhile&&event.num1<=player.storage.gushe; + }, + content:function(){ + if(trigger.num10; + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + filterCard:{name:'sha'}, + content:function(){ + 'step 0' + target.chooseToDiscard('he',true); + 'step 1' + if(target.hp>=player.hp&&result.bool&&result.cards[0].name!='sha'){ + player.useCard({name:'juedou'},target); + } + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(get.effect(target,{name:'juedou'},player,player)<=0){ + return 0; + } + if(target.hpplayer.hp) return -0.1; + return 0; + } + var hs1=target.getCards('h','sha'); + var hs2=player.getCards('h','sha'); + if(hs1.length>hs2.length){ + return 0; + } + var hsx=target.getCards('h'); + if(hsx.length>2&&hs2.length<=1&&hsx[0].number<6){ + return 0; + } + if(hsx.length>3&&hs2.length<=1){ + return 0; + } + if(hs1.length>hs2.length-1&&hs1.length>0&&(hs2.length<=1||hs1[0].number>hs2[0].number)){ + return 0; + } + return -1; + } + } + } + }, + shefu:{ + trigger:{player:'phaseEnd'}, + direct:true, + audio:2, + init:function(player){ + player.storage.shefu=[]; + player.storage.shefu2=[]; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + intro:{ + content:'cards', + mark:function(dialog,content,player){ + if(content&&content.length){ + dialog.addAuto(content); + if(player.isUnderControl(true)){ + var str=''; + for(var i=0;i'+str+'') + } + } + }, + }, + content:function(){ + 'step 0' + var list1=[],list2=[],list3=[]; + for(var i=0;i=5) return false; + if(nh2>nh2&&event.source.isDead()) return false; + return true; + }, + direct:true, + content:function(){ + "step 0" + var num1=player.countCards('h'); + var num2=trigger.source.countCards('h'); + if(num1>num2){ + var next=player.chooseToDiscard([num2+1,num1],'贲育:是否弃置至少'+(num2+1)+'张手牌,并对'+get.translation(trigger.source)+'造成一点伤害?'); + next.logSkill=['benyu',trigger.source]; + next.set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + if(ui.selected.cards.length>=_status.event.num){ + return -1; + } + if(get.damageEffect(trigger.source,player,player)>0&&_status.event.num<=2){ + return 8-get.value(card); + } + return -1; + }); + next.set('num',num2+1); + } + else{ + event.draw=true; + event.num=Math.min(num2,5)-num1; + player.chooseBool(get.prompt('benyu')); + } + "step 1" + if(result.bool){ + if(event.draw){ + player.logSkill('benyu',trigger.source); + player.draw(event.num); + } + else{ + trigger.source.damage(player); + } + } + }, + }, + jili:{ + trigger:{global:'useCard'}, + forced:true, + check:function(event,player){ + return get.effect(player,event.card,event.player,player)>0; + }, + filter:function(event,player){ + if(get.color(event.card)!='red') return false; + if(!event.targets) return false; + if(event.player==player) return false; + if(event.targets.contains(player)) return false; + if(get.info(event.card).multitarget) return false; + var type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + if(lib.filter.targetEnabled2(event.card,event.player,player)){ + for(var i=0;i0&&event.player!=player&&!player.hasSkill('zhidao2'); + }, + forced:true, + content:function(){ + var num=0; + if(trigger.player.countCards('h')) num++; + if(trigger.player.countCards('e')) num++; + if(trigger.player.countCards('j')) num++; + if(num){ + player.gainPlayerCard(trigger.player,num,'hej',true).set('filterButton',function(button){ + for(var i=0;i0; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('qizhi'),function(card,player,target){ + return !_status.event.getTrigger().targets.contains(target)&&target.countCards('he')>0; + }).set('ai',function(target){ + var player=_status.event.player; + if(target==player) return 2; + if(get.attitude(player,target)<=0){ + return 1 + } + return 0.5; + }); + 'step 1' + if(result.bool){ + player.storage.qizhi++; + if(!event.isMine()&&!_status.connectMode) game.delay(); + player.logSkill('qizhi',result.targets); + player.discardPlayerCard(result.targets[0],true,'he'); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + event.target.draw(); + }, + group:'qizhi2' + }, + qizhi2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.qizhi=0; + } + }, + jinqu:{ + trigger:{player:'phaseEnd'}, + check:function(event,player){ + return player.storage.qizhi>=player.countCards('h'); + }, + prompt:function(event,player){ + if(typeof player.storage.qizhi!='number'){ + '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(0)+'张?'; + } + return '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(player.storage.qizhi)+'张?'; + }, + content:function(){ + 'step 0' + player.draw(2); + 'step 1' + if(typeof player.storage.qizhi!='number'){ + player.storage.qizhi=0; + } + var dh=player.countCards('h')-player.storage.qizhi; + if(dh>0){ + player.chooseToDiscard(dh,true); + } + } + }, + mouduan:{ + init2:function(player){ + game.broadcastAll(function(player){ + player._mouduan_mark=player.mark('武',{ + content:'拥有技能【激昂】、【谦逊】' + }); + },player); + player.addAdditionalSkill('mouduan',['jiang','qianxun']); + }, + onremove:function(player){ + game.broadcastAll(function(player){ + if(player._mouduan_mark){ + player._mouduan_mark.delete(); + delete player._mouduan_mark; + } + },player); + player.removeAdditionalSkill('mouduan'); + }, + trigger:{player:'loseEnd'}, + forced:true, + filter:function(event,player){ + return player._mouduan_mark&&player._mouduan_mark.name=='武'&&player.countCards('h')<=2; + }, + content:function(){ + game.broadcastAll(function(player){ + if(!player._mouduan_mark) return; + player._mouduan_mark.name='文'; + player._mouduan_mark.skill='文'; + player._mouduan_mark.firstChild.innerHTML='文'; + player._mouduan_mark.info.content='拥有技能【英姿】、【克己】'; + },player); + player.addAdditionalSkill('mouduan',['yingzi','keji']); + }, + group:'mouduan2' + }, + mouduan2:{ + trigger:{global:'phaseBegin'}, + priority:5, + filter:function(event,player){ + return player._mouduan_mark&&player._mouduan_mark.name=='文'&&player.countCards('h')>2; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseToDiscard('he','谋断:是否弃置一张牌将标记变为“武”?').ai=function(){ + return -1; + } + 'step 1' + if(result.bool&&player.countCards('h')>2){ + game.broadcastAll(function(player){ + if(!player._mouduan_mark) return; + player._mouduan_mark.name='武'; + player._mouduan_mark.skill='武'; + player._mouduan_mark.firstChild.innerHTML='武'; + player._mouduan_mark.info.content='拥有技能【激昂】、【谦逊】'; + },player); + player.addAdditionalSkill('mouduan',['jiang','qianxun']); + } + } + }, + tanhu:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool){ + target.addTempSkill('tanhu2','phaseAfter'); + } + }, + ai:{ + result:{ + target:function(player,target){ + var hs=player.getCards('h'); + if(hs.length<3) return 0; + var bool=false; + for(var i=0;i=9&&get.value(hs[i])<7){ + bool=true; + break; + } + } + if(!bool) return 0; + return -1; + } + }, + order:9, + }, + group:'tanhu3' + }, + tanhu2:{ + mark:true, + intro:{ + content:'已成为探虎目标' + } + }, + tanhu3:{ + mod:{ + globalFrom:function(from,to){ + if(to.hasSkill('tanhu2')) return -Infinity; + } + }, + trigger:{player:'useCardToBegin'}, + frequent:true, + filter:function(event){ + return get.type(event.card)=='trick'&&event.target&&event.target.hasSkill('tanhu2'); + }, + content:function(){ + player.draw(); + } + }, + jiqiao:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + content:function(){ + 'step 0' + player.chooseToDiscard(get.prompt('jiqiao'),[1,player.countCards('he',{type:'equip'})],'he',function(card){ + return get.type(card)=='equip'; + }).set('ai',function(card){ + if(card.name=='bagua') return 10; + return 7-get.value(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('jiqiao'); + event.cards=get.cards(3*result.cards.length); + player.showCards(event.cards); + } + else{ + event.finish(); + } + 'step 2' + var gained=[]; + for(var i=0;i=2&&he<=3){ + return '弃牌'; + } + if(player.maxHp-player.hp>=3&&he<=5){ + return '弃牌'; + } + if(player.maxHp-player.hp>3){ + return '弃牌'; + } + return '出杀'; + } + return '出杀'; + }).set('prompt','弃置'+get.translation(trigger.player)+get.cnNumber(player.maxHp-player.hp)+'张牌,或对任意一名角色使用一张杀'); + 'step 1' + if(result.control=='弃牌'){ + player.line(trigger.player,'green'); + if(player.hp1) return false; + if(!event.target) return false; + if(event.target.hp>=player.hp) return false; - var card=event.card; - if(card.name=='sha') return true; - if(get.color(card)=='black'&&get.type(card)=='trick') return true; - return false; - }, - content:function(){ - "step 0" - var save=false; - if(get.attitude(player,trigger.target)>2){ - if(trigger.card.name=='sha'){ - if(player.countCards('h','shan')||player.getEquip(2)|| - trigger.target.hp==1||player.hp>trigger.target.hp+1){ - if(!trigger.target.countCards('h','shan')||trigger.target.countCards('h')0; - }, - content:function(){ - 'step 0' - player.chooseToCompare(target).set('preserve','win'); - 'step 1' - if(result.bool&&result.target){ - event.type=true; - event.card=result.target; - player.chooseTarget('将'+get.translation(result.target)+'交给一名角色',function(card,player,target){ - return target.hp<=player.hp; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.du) return -att; - return att; - }).set('du',event.card.name=='du'); - target.addTempSkill('dahe2','phaseAfter'); - } - else{ - event.type=false; - if(player.countCards('h')){ - player.showHandcards(); - player.chooseToDiscard('h',true); - } - } - 'step 2' - if(event.type){ - if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(event.card,'gain2'); - } - } - }, - ai:{ - result:{ - target:function(player,target){ - var hs=player.getCards('h'); - if(hs.length<3) return 0; - var bool=false; - for(var i=0;i=9&&get.value(hs[i])<7){ - bool=true; - break; - } - } - if(!bool) return 0; - if(player.canUse('sha',target)&&(player.countCards('h','sha'))){ - return -2; - } - return -0.5; - } - }, - order:9, - } - }, - dahe2:{ - mark:true, - intro:{ - content:'非红桃闪无效' - }, - mod:{ - cardRespondable:function(card,player){ - if(card.name=='shan'&&get.suit(card)!='heart') return false; - }, - } - }, - xunzhi:{ - trigger:{player:'phaseBegin'}, - init:function(player){ - player.storage.xunzhi=0; - }, - filter:function(event,player){ - var previous=player.getPrevious(); - var next=player.getNext(); - if(previous&&next){ - return player.hp!=previous.hp&&player.hp!=next.hp; - } - return false; - }, - check:function(event,player){ - return player.hp>=3&&player.countCards('h')>player.hp+1+player.storage.xunzhi; - }, - content:function(){ - player.loseHp(); - player.storage.xunzhi+=2; - }, - mark:true, - intro:{ - content:function(storage,player){ - return '手牌上限+'+player.storage.xunzhi; - } - }, - mod:{ - maxHandcard:function(player,num){ - if(typeof player.storage.xunzhi=='number'){ - return num+player.storage.xunzhi; - } - } - } - }, - yawang:{ - trigger:{player:'phaseDrawBefore'}, - forced:true, - check:function(event,player){ - var num=game.countPlayer(function(target){ - return target.hp==player.hp; - }); - if(!player.hasSkill('xunzhi2')){ - var nh=player.countCards('h'); - if(nh>5) return false; - if(num==3&&nh>3) return false; - } - return num>=3; - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - var num=game.countPlayer(function(target){ - return target.hp==player.hp; - }); - if(num){ - player.draw(num); - } - player.storage.yawang=num; - player.addTempSkill('yawang2','phaseAfter'); - } - }, - yawang2:{ - mod:{ - cardEnabled:function(card,player){ - if(_status.currentPhase!=player) return; - if(get.cardCount(true,player)>=player.storage.yawang) return false; - } - } - }, - junwei:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.storage.yinling&&player.storage.yinling.length>=3; - }, - content:function(){ - 'step 0' - if(player.storage.yinling.length>3){ - player.chooseButton(3,[get.prompt('junwei'),'hidden',player.storage.yinling]).set('ai',function(button){ - return 1; - }); - } - else{ - player.chooseBool().set('createDialog',[get.prompt('junwei'),'hidden',player.storage.yinling]).set('dialogselectx',true); - event.cards=player.storage.yinling.slice(0); - } - 'step 1' - if(result.bool){ - var cards=event.cards||result.links; - for(var i=0;i1) return 1; - if(_status.event.player.hp>=3) return 0; - return 1; - }).set('nshan',nshan); - } - } - else{ - event.finish(); - } - 'step 3' - if(!event.directfalse&&result.bool) game.delay(); - ui.clear(); - 'step 4' - if(!event.directfalse&&result.bool){ - event.cards=result.cards; - event.target.$throw(result.cards); - player.chooseTarget('将闪交给一名角色',true,function(card,player,target){ - return target!=_status.event.getParent().target; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target)/(target.countCards('h','shan')+1); - }); - } - else{ - event.target.loseHp(); - delete event.cards; - } - 'step 5' - if(event.cards){ - player.line(result.targets,'green'); - result.targets[0].gain(event.cards,'gain2'); - game.log(player,'将',event.cards,'交给',result.targets[0]); - event.finish(); - } - else{ - if(event.target.countCards('e')){ - player.choosePlayerCard('e','将'+get.translation(event.target)+'的一张装备牌移出游戏',true,event.target); - } - else{ - event.finish(); - } - } - 'step 6' - if(result.bool){ - var card=result.links[0]; - if(event.target.storage.junwei2){ - event.target.storage.junwei2.push(card); - event.target.markSkill('junwei2'); - } - else{ - event.target.storage.junwei2=[card]; - } - event.target.lose(card,ui.special); - event.target.addSkill('junwei2'); - event.target.syncStorage('junwei2'); - } - } - }, - junwei2:{ - mark:true, - intro:{ - content:'cards' - }, - trigger:{player:'phaseEnd'}, - forced:true, - content:function(){ - 'step 0' - if(player.storage.junwei2.length){ - var card=player.storage.junwei2.shift(); - player.equip(card); - event.redo(); - } - 'step 1' - player.removeSkill('junwei2'); - delete player.storage.junwei2; - } - }, - yinling:{ - enable:'phaseUse', - filterCard:{color:'black'}, - position:'he', - intro:{ - content:'cards', - onunmark:'throw' - }, - filter:function(event,player){ - return player.countCards('he',{color:'black'})>0&&player.storage.yinling.length<4; - }, - filterTarget:function(card,player,target){ - return target.countCards('he')>0&&target!=player; - }, - init:function(player){ - player.storage.yinling=[]; - }, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - 'step 0' - player.choosePlayerCard('hej',target,true); - 'step 1' - if(result.bool&&result.links&&result.links.length){ - target.$give(result.links,player); - target.lose(result.links,ui.special); - player.storage.yinling.push(result.links[0]); - player.markSkill('yinling'); - player.syncStorage('yinling'); - } - }, - ai:{ - order:10.1, - expose:0.1, - result:{ - target:function(player,target){ - if(target.hasSkill('tuntian')) return 0; - var es=target.getCards('e'); - var nh=target.countCards('h'); - var noe=(es.length==0||target.hasSkillTag('noe')); - var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ - return -1.5; - } - return 2; - } - return -1.5; - }, - }, - } - }, - yanxiao:{ - enable:'phaseUse', - filterCard:{suit:'diamond'}, - filterTarget:true, - check:function(card){ - return 7-get.value(card); - }, - position:'he', - filter:function(event,player){ - return player.countCards('he',{suit:'diamond'})>0; - }, - discard:false, - prepare:'give', - content:function(){ - if(target.hasSkill('yanxiao2')&&target.storage.yanxiao2){ - target.storage.yanxiao2.push(cards[0]); - target.syncStorage('yanxiao2'); - target.markSkill('yanxiao2'); - } - else{ - target.storage.yanxiao2=cards.slice(0); - target.syncStorage('yanxiao2'); - target.addSkill('yanxiao2'); - } - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(target.storage.yanxiao2&&target.storage.yanxiao2.length) return 0; - if(target.countCards('j')) return 1; - return 0; - } - } - } - }, - yanxiao2:{ - mark:true, - intro:{ - content:'cards' - }, - trigger:{player:'phaseJudgeBegin'}, - forced:true, - content:function(){ - var cards=player.storage.yanxiao2.concat(player.getCards('j')); - player.gain(cards,'gain2','log'); - delete player.storage.yanxiao2; - player.removeSkill('yanxiao2'); - }, - ai:{ - effect:{ - target:function(card){ - if(get.type(card)=='delay') return [0,0.1]; - } - } - } - }, - anxian:{ - group:['anxian_source','anxian_target'], - subSkill:{ - source:{ - trigger:{source:'damageBefore'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'; - }, - check:function(event,player){ - if(get.damageEffect(event.player,player,player)<=0) return true; - return false; - }, - content:function(){ - 'step 0' - if(trigger.player.countCards('h')){ - trigger.player.chooseToDiscard(true); - } - 'step 1' - player.draw(); - trigger.untrigger(); - trigger.finish(); - } - }, - target:{ - trigger:{target:'shaBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('h'); - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('anxian')); - next.set('ai',function(card){ - var player=_status.event.player; - var trigger=_status.event.getTrigger(); - if(get.attitude(player,trigger.player)>0){ - return 9-get.value(card); - } - if(player.countCards('h',{name:'shan'})) return -1; - return 7-get.value(card); - }); - next.logSkill='anxian'; - "step 1" - if(result.bool){ - trigger.player.draw(); - trigger.untrigger(); - trigger.finish(); - } - }, - } - } - }, - luoyan_tianxiang:{ - inherit:'tianxiang', - filter:function(event,player){ - if(!player.storage.xingwu||!player.storage.xingwu.length) return false; - if(player.hasSkill('tianxiang')) return false; - return lib.skill.tianxiang.filter(event,player); - }, - }, - luoyan_liuli:{ - inherit:'liuli', - filter:function(event,player){ - if(!player.storage.xingwu||!player.storage.xingwu.length) return false; - if(player.hasSkill('liuli')) return false; - return lib.skill.liuli.filter(event,player); - }, - }, - luoyan:{ - group:['luoyan_tianxiang','luoyan_liuli'], - }, - xingwu:{ - audio:2, - group:['xingwu_color','xingwu_color2'], - subSkill:{ - color:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.xingwu_color=['black','red']; - } - }, - color2:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return Array.isArray(player.storage.xingwu_color)&&_status.currentPhase==player; - }, - content:function(){ - player.storage.xingwu_color.remove(get.color(trigger.card)); - } - } - }, - trigger:{player:'phaseDiscardBegin'}, - direct:true, - filter:function(event,player){ - if(!player.storage.xingwu_color) return false; - var length=player.storage.xingwu_color.length; - if(length==0) return false; - var hs=player.getCards('h'); - if(hs.length==0) return false; - if(length==2) return true; - var color=player.storage.xingwu_color[0]; - for(var i=0;i0&& - get.attitude(player,current)<0) - })) return 0; - } - return 7-get.value(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('xingwu'); - if(player.storage.xingwu.length<2){ - player.$give(result.cards,player); - } - player.lose(result.cards,ui.special); - player.storage.xingwu=player.storage.xingwu.concat(result.cards); - player.markSkill('xingwu'); - player.syncStorage('xingwu'); - } - else{ - event.finish(); - } - 'step 2' - if(player.storage.xingwu.length==3){ - player.$throw(player.storage.xingwu); - while(player.storage.xingwu.length){ - ui.discardPile.appendChild(player.storage.xingwu.shift()); - } - player.unmarkSkill('xingwu'); - player.chooseTarget(function(card,player,target){ - return target!=player&&target.sex=='male'; - },'对一名男性角色造成两点伤害并弃置其装备区内的牌').set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0) return -1; - return get.damageEffect(target,player,player)+target.countCards('e')/2; - }); - } - else{ - event.finish(); - } - 'step 3' - if(result.bool){ - var target=result.targets[0]; - target.damage(2); - event.target=target; - player.line(target,'green'); - } - else{ - event.finish(); - } - 'step 4' - if(event.target&&event.target.isAlive()){ - var es=event.target.getCards('e'); - if(es.length){ - event.target.discard(es); - } - } - }, - ai:{ - threaten:1.5 - } - }, - yinbing:{ - trigger:{player:'phaseEnd'}, - direct:true, - audio:2, - init:function(player){ - player.storage.yinbing=[]; - }, - filter:function(event,player){ - return player.countCards('he',{type:'basic'})0&& - (event.card.name=='sha'||event.card.name=='juedou'); - }, - content:function(){ - 'step 0' - player.chooseCardButton('移去一张引兵牌',true,player.storage.yinbing); - 'step 1' - var card=result.links[0]; - player.storage.yinbing.remove(card); - ui.discardPile.appendChild(card); - player.$throw(card); - game.log(player,'将',card,'置入弃牌堆'); - player.syncStorage('yinbing'); - if(player.storage.yinbing.length==0){ - player.unmarkSkill('yinbing'); - } - } - } - }, - group:'yinbing_discard' - }, - juedi:{ - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - return player.storage.yinbing&&player.storage.yinbing.length>0; - }, - forced:true, - audio:2, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('juedi'),true,function(card,player,target){ - return player.hp>=target.hp; - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(att<2) return att-10; - var num=att/10; - if(target==player){ - num+=player.maxHp-player.countCards('h')+0.5; - } - else{ - num+=_status.event.n2*2; - if(target.isDamaged()){ - if(target.hp==1){ - num+=3; - } - else if(target.hp==2){ - num+=2; - } - else{ - num+=0.5; - } - } - } - if(target.hasJudge('lebu')){ - num/=2; - } - return num; - }).set('n2',player.storage.yinbing.length); - 'step 1' - if(result.bool){ - player.line(result.targets[0],'green'); - if(result.targets[0]==player){ - player.$throw(player.storage.yinbing,1000); - var num=player.maxHp-player.countCards('h'); - if(num>0) player.draw(num); - while(player.storage.yinbing.length){ - ui.discardPile.appendChild(player.storage.yinbing.shift()); - } - player.syncStorage('yinbing'); - player.unmarkSkill('yinbing'); - } - else{ - var target=result.targets[0]; - target.recover(); - target.gain(player.storage.yinbing.slice(0),'gain2','log'); - target.draw(player.storage.yinbing.length); - player.storage.yinbing.length=0; - } - player.syncStorage('yinbing'); - player.unmarkSkill('yinbing'); - } - } - }, - meibu:{ - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - return event.player!=player&&get.distance(event.player,player,'attack')>1; - }, - logTarget:'player', - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return false; - var e2=player.getEquip(2); - if(e2){ - if(e2.name=='tengjia') return true; - if(e2.name=='bagua') return true; - } - return player.countCards('h','shan')>0; - }, - content:function(){ - var target=trigger.player; - target.addTempSkill('meibu_viewas','phaseAfter'); - target.addTempSkill('meibu_range','phaseAfter'); - target.storage.meibu=player; - target.markSkillCharacter('meibu',player,'魅步','锦囊牌均视为杀且'+get.translation(player)+'视为在攻击范围内'); - }, - ai:{ - expose:0.2 - }, - subSkill:{ - range:{ - mod:{ - targetInRange:function(card,player,target){ - if(card.name=='sha'&&target==player.storage.meibu){ - return true; - } - } - }, - onremove:function(player){ - game.broadcast(function(player){ - if(player.marks.meibu){ - player.marks.meibu.delete(); - delete player.marks.meibu; - } - },player); - if(player.marks.meibu){ - player.marks.meibu.delete(); - delete player.marks.meibu; - game.addVideo('unmark',player,'meibu'); - } - }, - trigger:{player:'useCard'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='meibu_viewas' - }, - content:function(){ - player.removeSkill('meibu_viewas'); - game.broadcastAll(function(player){ - if(player.marks.meibu&&player.marks.meibu.info){ - player.marks.meibu.info.content=player.marks.meibu.info.content.slice(8); - } - },player); - } - }, - viewas:{ - mod:{ - cardEnabled:function(card,player){ - if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; - }, - cardUsable:function(card,player){ - if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; - }, - cardRespondable:function(card,player){ - if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; - }, - cardSavable:function(card,player){ - if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; - }, - }, - enable:['chooseToUse','chooseToRespond'], - filterCard:function(card){ - return get.type(card,'trick')=='trick'; - }, - viewAs:{name:'sha'}, - check:function(){return 1}, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondSha')&¤t<0) return 0.8 - } - }, - respondSha:true, - order:4, - useful:-1, - value:-1 - } - } - } - }, - mumu:{ - enable:'phaseUse', - usable:1, - filterCard:function(card,player,target){ - return card.name=='sha'||(get.type(card,'trick')=='trick'&&get.color(card)=='black'); - }, - check:function(card){ - return 7-get.value(card); - }, - filterTarget:function(card,player,target){ - if(target==player) return false; - return target.getEquip(1)||target.getEquip(2); - }, - content:function(){ - 'step 0' - var e1=target.getEquip(1); - var e2=target.getEquip(2); - event.e1=e1; - event.e2=e2; - if(e1&&e2){ - player.chooseControl('武器牌','防具牌').set('ai',function(){ - if(_status.event.player.getEquip(2)){ - return '武器牌'; - } - return '防具牌'; - }); - } - else if(e1){ - event.choice='武器牌'; - } - else{ - event.choice='防具牌'; - } - 'step 1' - var choice=event.choice||result.control; - if(choice=='武器牌'){ - if(event.e1){ - target.discard(event.e1); - } - player.draw(); - } - else{ - if(event.e2){ - player.equip(event.e2); - target.$give(event.e2,player); - } - } - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(target.getEquip(2)&&!player.getEquip(2)){ - return -2; - } - return -1; - } - } - } - }, - fentian:{ - audio:2, - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - if(player.countCards('h')>=player.hp) return false; - return game.hasPlayer(function(current){ - return player!=current&&get.distance(player,current,'attack')<=1&¤t.countCards('he'); - }); - }, - intro:{ - content:'cards', - }, - init:function(player){ - player.storage.fentian=[]; - }, - content:function(){ - 'step 0' - player.chooseTarget('焚天:选择一名攻击范围内的角色,将其一张牌置于你的武将牌上',true,function(card,player,target){ - return player!=target&&get.distance(player,target,'attack')<=1&&target.countCards('he')>0; - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target) - }); - 'step 1' - if(result.bool){ - player.logSkill('fentian',result.targets); - event.target=result.targets[0]; - player.choosePlayerCard(result.targets[0],'he',true); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - event.target.$give(result.links,player); - event.target.lose(result.links,ui.special); - player.storage.fentian=player.storage.fentian.concat(result.links); - player.syncStorage('fentian'); - setTimeout(function(){ - player.markSkill('fentian'); - },700); - } - }, - mod:{ - attackFrom:function(from,to,distance){ - return distance-from.storage.fentian.length; - } - } - }, - zhiri:{ - trigger:{player:'phaseBegin'}, - forced:true, - unique:true, - audio:2, - skillAnimation:true, - animationColor:'fire', - derivation:'xintan', - filter:function(event,player){ - return player.storage.fentian&&player.storage.fentian.length>=3&&!player.storage.zhiri; - }, - content:function(){ - player.loseMaxHp(); - player.addSkill('xintan'); - player.storage.zhiri=true; - player.awakenSkill('zhiri'); - } - }, - xintan:{ - enable:'phaseUse', - usable:1, - audio:2, - unique:true, - filter:function(event,player){ - return player.storage.fentian&&player.storage.fentian.length>=2; - }, - filterTarget:true, - prompt:'移去两张“焚”并令一名角色失去一点体力', - content:function(){ - 'step 0' - player.chooseCardButton(2,'移去两张“焚”并令'+get.translation(target)+'失去一点体力',player.storage.fentian,true); - 'step 1' - if(result.bool){ - player.$throw(result.links); - for(var i=0;iplayer.hp; - }, - content:function(){ - player.storage.danji=true; - player.loseMaxHp(); - player.addSkill('mashu'); - player.addSkill('nuzhan'); - player.awakenSkill('danji'); - } - }, - nuzhan:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.cards&& - event.cards.length==1&&get.type(event.cards[0],'trick')=='trick'; - }, - forced:true, - content:function(){ - if(player.stat[player.stat.length-1].card.sha>0){ - player.stat[player.stat.length-1].card.sha--; - } - }, - group:'nuzhan2' - }, - nuzhan2:{ - trigger:{source:'damageBegin'}, - forced:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.cards&& - event.cards.length==1&&get.type(event.cards[0])=='equip'; - }, - content:function(){ - trigger.num++; - } - }, - tunchu:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - check:function(event,player){ - return player.countCards('h')-player.countCards('h',{type:'equip'})+2<=player.hp; - }, - content:function(){ - trigger.num+=2; - player.addTempSkill('tunchu_choose','phaseDrawAfter'); - }, - init:function(player){ - player.storage.tunchu=[]; - }, - intro:{ - content:'cards' - }, - group:'tunchu_disable', - subSkill:{ - choose:{ - trigger:{player:'phaseDrawEnd'}, - forced:true, - popup:false, - content:function(){ - 'step 0' - player.removeSkill('tunchu_choose'); - if(player.countCards('h')){ - player.chooseCard('h',true); - } - else{ - event.finish(); - } - 'step 1' - player.lose(result.cards,ui.special); - player.storage.tunchu=player.storage.tunchu.concat(result.cards); - player.markSkill('tunchu'); - player.syncStorage('tunchu'); - } - }, - disable:{ - mod:{ - cardEnabled:function(card,player){ - if(player.storage.tunchu&&player.storage.tunchu.length&& - (card.name=='sha'||card.name=='juedou')){ - return false; - } - }, - cardUsable:function(card,player){ - if(player.storage.tunchu&&player.storage.tunchu.length&& - (card.name=='sha'||card.name=='juedou')){ - return false; - } - }, - } - } - } - }, - shuliang:{ - audio:2, - trigger:{global:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.storage.tunchu&&player.storage.tunchu.length>0&&event.player.countCards('h')==0&&event.player.isAlive(); - }, - content:function(){ - 'step 0' - var goon=(get.attitude(player,trigger.player)>0); - player.chooseCardButton(get.prompt('shuliang',trigger.player),player.storage.tunchu).set('ai',function(){ - if(_status.event.goon) return 1; - return 0; - }).set('goon',goon); - 'step 1' - if(result.bool){ - player.logSkill('shuliang',trigger.player); - player.storage.tunchu.remove(result.links[0]); - player.$throw(result.links); - ui.discardPile.appendChild(result.links[0]); - player.syncStorage('tunchu'); - if(player.storage.tunchu.length==0){ - player.unmarkSkill('tunchu'); - } - trigger.player.draw(2); - } - } - }, - jieyuan:{ - group:['jieyuan_more','jieyuan_less'], - subSkill:{ - more:{ - audio:true, - trigger:{source:'damageBegin'}, - direct:true, - filter:function(event,player){ - if(!player.countCards('h',{color:'black'})) return false; - return event.player.hp>=player.hp&&player!=event.player; - }, - content:function(){ - 'step 0' - var goon=(get.attitude(player,trigger.player)<0); - var next=player.chooseToDiscard(get.prompt('jieyuan',trigger.player),{color:'black'}); - next.set('ai',function(card){ - if(_status.event.goon){ - return 8-get.value(card); - } - return 0; - }); - next.set('goon',goon); - next.logSkill=['jieyuan_more',trigger.player]; - 'step 1' - if(result.bool){ - trigger.num++; - } - } - }, - less:{ - audio:true, - trigger:{player:'damageBegin'}, - filter:function(event,player){ - if(!player.countCards('h',{color:'red'})) return false; - return event.source&&event.source.hp>=player.hp&&player!=event.source; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('竭缘:是否弃置一张红色手牌令伤害-1?',{color:'red'}); - next.set('ai',function(card){ - var player=_status.event.player; - if(player.hp==1||_status.event.getTrigger().num>1){ - return 9-get.value(card); - } - if(player.hp==2){ - return 8-get.value(card); - } - return 7-get.value(card); - }); - next.logSkill='jieyuan_less'; - "step 1" - if(result.bool){ - game.delay(); - trigger.num--; - } - } - } - }, - ai:{ - expose:0.2, - threaten:1.5 - } - }, - fenxin:{ - mode:['identity'], - trigger:{source:'dieBegin'}, - init:function(player){ - player.storage.fenxin=false; - }, - intro:{ - content:'limited' - }, - skillAnimation:'epic', - audio:2, - mark:true, - filter:function(event,player){ - if(player.storage.fenxin) return false; - return event.player.identity!='zhu'&&player.identity!='zhu'&& - player.identity!='mingzhong'&&event.player.identity!='mingzhong'; - }, - check:function(event,player){ - if(player.identity==event.player.identity) return Math.random()<0.5; - var stat=get.situation(); - switch(player.identity){ - case 'fan': - if(stat<0) return false; - if(stat==0) return Math.random()<0.6; - return true; - case 'zhong': - if(stat>0) return false; - if(stat==0) return Math.random()<0.6; - return true; - case 'nei': - if(event.player.identity=='fan'&&stat<0) return true; - if(event.player.identity=='zhong'&&stat>0) return true; - if(stat==0) return Math.random()<0.7; - return false; - } - }, - prompt:function(event,player){ - return '焚心:是否与'+get.translation(event.player)+'交换身份?'; - }, - content:function(){ - game.broadcastAll(function(player,target,shown){ - var identity=player.identity; - player.identity=target.identity; - if(shown||player==game.me){ - player.setIdentity(); - } - target.identity=identity; - },player,trigger.player,trigger.player.identityShown); - player.line(trigger.player,'green'); - player.storage.fenxin=true; - player.awakenSkill('fenxin'); - } - }, - qingyi:{ - group:['qingyi1','qingyi2'] - }, - qingyi1:{ - audio:true, - trigger:{player:'phaseBegin'}, - direct:true, - content:function(){ - "step 0" - player.addSkill('qingyi3'); - var check= player.countCards('h')>2; - player.chooseTarget(get.prompt('qingyi'),function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target); - }).ai=function(target){ - if(!check) return 0; - return get.effect(target,{name:'sha'},_status.event.player); - } - "step 1" - if(result.bool){ - player.logSkill('qingyi1',result.targets); - player.useCard({name:'sha'},result.targets[0],false); - player.skip('phaseJudge'); - player.skip('phaseDraw'); - } - player.removeSkill('qingyi3'); - } - }, - qingyi2:{ - audio:true, - trigger:{player:'phaseUseBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - content:function(){ - "step 0" - player.addSkill('qingyi3'); - var check=player.countCards('h')<=player.hp; - player.chooseCardTarget({ - prompt:get.prompt('qingyi'), - filterCard:function(card,player){ - return get.type(card)=='equip'&&lib.filter.cardDiscardable(card,player); - }, - position:'he', - filterTarget:function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target); - }, - ai1:function(card){ - if(!_status.event.check) return 0; - return 6-get.value(card); - }, - ai2:function(target){ - if(!_status.event.check) return 0; - return get.effect(target,{name:'sha'},_status.event.player); - }, - check:check - }); - "step 1" - if(result.bool){ - player.logSkill('qingyi2',result.targets); - player.discard(result.cards[0]); - player.useCard({name:'sha'},result.targets[0]); - trigger.untrigger(); - trigger.finish(); - } - player.removeSkill('qingyi3'); - } - }, - qingyi3:{ - mod:{ - targetInRange:function(card,player,target,now){ - return true; - } - }, - }, - shixin:{ - audio:2, - trigger:{player:'damageBefore'}, - filter:function(event){ - return event.nature=='fire'; - }, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - nofire:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'fireDamage')) return 0; - } - } - } - }, - fenyin:{ - audio:2, - trigger:{player:'useCard'}, - frequent:true, - usable:3, - filter:function(event,player){ - if(!event.cards||event.cards.length!=1) return false; - if(_status.currentPhase!=player) return false; - if(!player.storage.fenyin) return false; - return get.color(player.storage.fenyin)!=get.color(event.cards[0]); - }, - content:function(){ - player.draw(); - }, - intro:{ - content:'card' - }, - group:['fenyin2','fenyin3'] - }, - fenyin3:{ - trigger:{player:'useCard'}, - priority:-1, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - if(!event.cards||event.cards.length!=1) return false; - if(_status.currentPhase!=player) return false; - return true; - }, - content:function(){ - player.storage.fenyin=trigger.cards[0]; - } - }, - fenyin2:{ - trigger:{player:'phaseBefore'}, - forced:true, - silent:true, - popup:false, - priority:10, - content:function(){ - player.storage.fenyin=null; - } - }, - dujin:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - frequent:true, - content:function(){ - trigger.num+=1+Math.floor(player.countCards('e')/2); - } - }, - qirang:{ - audio:2, - trigger:{player:'equipEnd'}, - frequent:true, - content:function(){ - player.gain(get.cardPile(function(card){ - return get.type(card,'trick')=='trick'; - }),'gain2'); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='equip') return [1,3]; - } - }, - threaten:1.3 - } - }, - yuhua:{ - trigger:{player:'phaseDiscardBegin'}, - forced:true, - audio:2, - filter:function(event,player){ - return event.parent.name=='phaseDiscard'&&player.countCards('h',{type:'basic'})0){ - var att1=get.attitude(target,player); - var att2=get.attitude(target,trigger.player); - var att3=get.attitude(player,target); - if(att3<0) return 0; - return att1/2+att2+att3; - } - else{ - return 0; - // return get.attitude(player,target); - } - }); - 'step 1' - if(result.bool){ - player.addTempSkill('chenqing2',{player:'phaseBegin'}); - event.target=result.targets[0]; - event.target.draw(4); - player.logSkill('chenqing',event.target); - } - else{ - event.finish(); - } - 'step 2' - var target=event.target; - var tosave=trigger.player; - var att=get.attitude(target,tosave); - var hastao=target.countCards('h','tao'); - target.chooseToDiscard(4,true,'he').set('ai',function(card){ - var hastao=_status.event.hastao; - var att=_status.event.att; - if(!hastao&&att>0){ - var suit=get.suit(card); - for(var i=0;i0&&player.countCards('h')>0; - }, - content:function(){ - if(player.storage.mozhi.length&&player.countCards('h')){ - var card=player.storage.mozhi.shift(); - card={name:card.name,nature:card.nature,suit:card.suit,number:card.number}; - if(lib.filter.cardEnabled(card)){ - if(game.hasPlayer(function(current){ - return player.canUse(card,current); - })){ - lib.skill.mozhix.viewAs=card; - var next=player.chooseToUse(); - if(next.isOnline()){ - player.send(function(card){ - lib.skill.mozhix.viewAs=card; - },card) - } - next.logSkill='mozhi'; - next.set('openskilldialog','默识:将一张手牌当'+get.translation(card)+'使用'); - next.set('norestore',true); - next.set('_backupevent','mozhix'); - next.backup('mozhix'); - } - } - event.redo(); - } - }, - group:['mozhi2','mozhi3'] - }, - mozhix:{ - filterCard:true, - selectCard:1, - popname:true, - }, - mozhi2:{ - trigger:{player:'phaseAfter'}, - forced:true, - silent:true, - popup:false, - content:function(){ - player.storage.mozhi.length=0; - player.unmarkSkill('mozhi'); - } - }, - mozhi3:{ - trigger:{player:'useCard'}, - forced:true, - silent:true, - popup:false, - filter:function(event,player){ - if(_status.currentPhase!=player) return false; - if(event.parent.parent.name!='phaseUse') return false; - var type=get.type(event.card); - return player.storage.mozhi.length<2&&(type=='basic'||type=='trick'); - }, - content:function(){ - player.storage.mozhi.add(trigger.card); - if(player.hasSkill('mozhi')) player.markSkill('mozhi'); - } - }, - chenqing2:{}, - ranshang:{ - audio:2, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.nature=='fire'; - }, - init:function(player){ - player.storage.ranshang=0; - }, - forced:true, - check:function(){ - return false; - }, - content:function(){ - if(player.storage.ranshang){ - player.storage.ranshang++; - } - else{ - player.storage.ranshang=1; - } - player.markSkill('ranshang'); - game.addVideo('storage',player,['ranshang',player.storage.ranshang]); - }, - intro:{ - content:'mark' - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'){ - if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2; - } - if(get.tag(card,'fireDamage')&¤t<0) return 2; - } - } - }, - group:'ranshang2' - }, - ranshang2:{ - audio:2, - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player.storage.ranshang>0; - }, - content:function(){ - player.loseHp(player.storage.ranshang); - } - }, - hanyong:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return player.storage.hanyong>player.hp&&event.card&& - (event.card.name=='nanman'||event.card.name=='wanjian'); - }, - content:function(){ - player.addTempSkill('hanyong3','useCardAfter'); - }, - init:function(player){ - player.storage.hanyong=0; - }, - group:'hanyong2' - }, - hanyong2:{ - audio:false, - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.hanyong++; - } - }, - hanyong3:{ - audio:false, - trigger:{source:'damageBegin'}, - forced:true, - filter:function(event,player){ - return event.card&&(event.card.name=='nanman'||event.card.name=='wanjian'); - }, - content:function(){ - trigger.num++; - } - }, - yishe:{ - trigger:{player:'phaseEnd'}, - init:function(player){ - player.storage.yishe=[]; - }, - filter:function(event,player){ - return !player.storage.yishe||!player.storage.yishe.length; - }, - intro:{ - content:'cards' - }, - content:function(){ - 'step 0' - player.draw(2); - player.chooseCard(2,'he',true,'选择两张牌作为“米”'); - 'step 1' - player.storage.yishe=result.cards; - player.lose(result.cards,ui.special); - player.syncStorage('yishe'); - player.markSkill('yishe'); - } - }, - bushi:{ - trigger:{player:'damageEnd',source:'damageEnd'}, - filter:function(event,player){ - return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); - }, - direct:true, - content:function(){ - 'step 0' - trigger.player.chooseCardButton('选择获得一张“米”',player.storage.yishe); - 'step 1' - if(result.bool){ - player.logSkill('bushi'); - trigger.player.gain(result.links[0],'draw2','log'); - player.storage.yishe.remove(result.links[0]); - player.syncStorage('yishe'); - if(player.storage.yishe.length==0){ - player.recover(); - player.unmarkSkill('yishe'); - } - else{ - player.markSkill('yishe'); - } - } - } - }, - midao:{ - unique:true, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); - }, - content:function(){ - "step 0" - var list=player.storage.yishe; - player.chooseButton([get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+get.translation(trigger.player.judging[0])+ - ','+get.prompt('midao'),list,'hidden'],function(button){ - var card=button.link; - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - return result*attitude; - }).set('judging',trigger.player.judging); - "step 1" - if(result.bool){ - player.logSkill('midao',trigger.player); - var card=result.links[0]; - player.storage.yishe.remove(card); - player.syncStorage('yishe'); - if(player.storage.yishe.length==0){ - player.recover(); - player.unmarkSkill('yishe'); - } - else{ - player.markSkill('yishe'); - } + var card=event.card; + if(card.name=='sha') return true; + if(get.color(card)=='black'&&get.type(card)=='trick') return true; + return false; + }, + content:function(){ + "step 0" + var save=false; + if(get.attitude(player,trigger.target)>2){ + if(trigger.card.name=='sha'){ + if(player.countCards('h','shan')||player.getEquip(2)|| + trigger.target.hp==1||player.hp>trigger.target.hp+1){ + if(!trigger.target.countCards('h','shan')||trigger.target.countCards('h')0; + }, + content:function(){ + 'step 0' + player.chooseToCompare(target).set('preserve','win'); + 'step 1' + if(result.bool&&result.target){ + event.type=true; + event.card=result.target; + player.chooseTarget('将'+get.translation(result.target)+'交给一名角色',function(card,player,target){ + return target.hp<=player.hp; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.du) return -att; + return att; + }).set('du',event.card.name=='du'); + target.addTempSkill('dahe2','phaseAfter'); + } + else{ + event.type=false; + if(player.countCards('h')){ + player.showHandcards(); + player.chooseToDiscard('h',true); + } + } + 'step 2' + if(event.type){ + if(result.bool){ + player.line(result.targets,'green'); + result.targets[0].gain(event.card,'gain2'); + } + } + }, + ai:{ + result:{ + target:function(player,target){ + var hs=player.getCards('h'); + if(hs.length<3) return 0; + var bool=false; + for(var i=0;i=9&&get.value(hs[i])<7){ + bool=true; + break; + } + } + if(!bool) return 0; + if(player.canUse('sha',target)&&(player.countCards('h','sha'))){ + return -2; + } + return -0.5; + } + }, + order:9, + } + }, + dahe2:{ + mark:true, + intro:{ + content:'非红桃闪无效' + }, + mod:{ + cardRespondable:function(card,player){ + if(card.name=='shan'&&get.suit(card)!='heart') return false; + }, + } + }, + xunzhi:{ + trigger:{player:'phaseBegin'}, + init:function(player){ + player.storage.xunzhi=0; + }, + filter:function(event,player){ + var previous=player.getPrevious(); + var next=player.getNext(); + if(previous&&next){ + return player.hp!=previous.hp&&player.hp!=next.hp; + } + return false; + }, + check:function(event,player){ + return player.hp>=3&&player.countCards('h')>player.hp+1+player.storage.xunzhi; + }, + content:function(){ + player.loseHp(); + player.storage.xunzhi+=2; + }, + mark:true, + intro:{ + content:function(storage,player){ + return '手牌上限+'+player.storage.xunzhi; + } + }, + mod:{ + maxHandcard:function(player,num){ + if(typeof player.storage.xunzhi=='number'){ + return num+player.storage.xunzhi; + } + } + } + }, + yawang:{ + trigger:{player:'phaseDrawBefore'}, + forced:true, + check:function(event,player){ + var num=game.countPlayer(function(target){ + return target.hp==player.hp; + }); + if(!player.hasSkill('xunzhi2')){ + var nh=player.countCards('h'); + if(nh>5) return false; + if(num==3&&nh>3) return false; + } + return num>=3; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + var num=game.countPlayer(function(target){ + return target.hp==player.hp; + }); + if(num){ + player.draw(num); + } + player.storage.yawang=num; + player.addTempSkill('yawang2','phaseAfter'); + } + }, + yawang2:{ + mod:{ + cardEnabled:function(card,player){ + if(_status.currentPhase!=player) return; + if(get.cardCount(true,player)>=player.storage.yawang) return false; + } + } + }, + junwei:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.storage.yinling&&player.storage.yinling.length>=3; + }, + content:function(){ + 'step 0' + if(player.storage.yinling.length>3){ + player.chooseButton(3,[get.prompt('junwei'),'hidden',player.storage.yinling]).set('ai',function(button){ + return 1; + }); + } + else{ + player.chooseBool().set('createDialog',[get.prompt('junwei'),'hidden',player.storage.yinling]).set('dialogselectx',true); + event.cards=player.storage.yinling.slice(0); + } + 'step 1' + if(result.bool){ + var cards=event.cards||result.links; + for(var i=0;i1) return 1; + if(_status.event.player.hp>=3) return 0; + return 1; + }).set('nshan',nshan); + } + } + else{ + event.finish(); + } + 'step 3' + if(!event.directfalse&&result.bool) game.delay(); + ui.clear(); + 'step 4' + if(!event.directfalse&&result.bool){ + event.cards=result.cards; + event.target.$throw(result.cards); + player.chooseTarget('将闪交给一名角色',true,function(card,player,target){ + return target!=_status.event.getParent().target; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target)/(target.countCards('h','shan')+1); + }); + } + else{ + event.target.loseHp(); + delete event.cards; + } + 'step 5' + if(event.cards){ + player.line(result.targets,'green'); + result.targets[0].gain(event.cards,'gain2'); + game.log(player,'将',event.cards,'交给',result.targets[0]); + event.finish(); + } + else{ + if(event.target.countCards('e')){ + player.choosePlayerCard('e','将'+get.translation(event.target)+'的一张装备牌移出游戏',true,event.target); + } + else{ + event.finish(); + } + } + 'step 6' + if(result.bool){ + var card=result.links[0]; + if(event.target.storage.junwei2){ + event.target.storage.junwei2.push(card); + event.target.markSkill('junwei2'); + } + else{ + event.target.storage.junwei2=[card]; + } + event.target.lose(card,ui.special); + event.target.addSkill('junwei2'); + event.target.syncStorage('junwei2'); + } + } + }, + junwei2:{ + mark:true, + intro:{ + content:'cards' + }, + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + 'step 0' + if(player.storage.junwei2.length){ + var card=player.storage.junwei2.shift(); + player.equip(card); + event.redo(); + } + 'step 1' + player.removeSkill('junwei2'); + delete player.storage.junwei2; + } + }, + yinling:{ + enable:'phaseUse', + filterCard:{color:'black'}, + position:'he', + intro:{ + content:'cards', + onunmark:'throw' + }, + filter:function(event,player){ + return player.countCards('he',{color:'black'})>0&&player.storage.yinling.length<4; + }, + filterTarget:function(card,player,target){ + return target.countCards('he')>0&&target!=player; + }, + init:function(player){ + player.storage.yinling=[]; + }, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + 'step 0' + player.choosePlayerCard('hej',target,true); + 'step 1' + if(result.bool&&result.links&&result.links.length){ + target.$give(result.links,player); + target.lose(result.links,ui.special); + player.storage.yinling.push(result.links[0]); + player.markSkill('yinling'); + player.syncStorage('yinling'); + } + }, + ai:{ + order:10.1, + expose:0.1, + result:{ + target:function(player,target){ + if(target.hasSkill('tuntian')) return 0; + var es=target.getCards('e'); + var nh=target.countCards('h'); + var noe=(es.length==0||target.hasSkillTag('noe')); + var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp=0){ + return -1.5; + } + return 2; + } + return -1.5; + }, + }, + } + }, + yanxiao:{ + enable:'phaseUse', + filterCard:{suit:'diamond'}, + filterTarget:true, + check:function(card){ + return 7-get.value(card); + }, + position:'he', + filter:function(event,player){ + return player.countCards('he',{suit:'diamond'})>0; + }, + discard:false, + prepare:'give', + content:function(){ + if(target.hasSkill('yanxiao2')&&target.storage.yanxiao2){ + target.storage.yanxiao2.push(cards[0]); + target.syncStorage('yanxiao2'); + target.markSkill('yanxiao2'); + } + else{ + target.storage.yanxiao2=cards.slice(0); + target.syncStorage('yanxiao2'); + target.addSkill('yanxiao2'); + } + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(target.storage.yanxiao2&&target.storage.yanxiao2.length) return 0; + if(target.countCards('j')) return 1; + return 0; + } + } + } + }, + yanxiao2:{ + mark:true, + intro:{ + content:'cards' + }, + trigger:{player:'phaseJudgeBegin'}, + forced:true, + content:function(){ + var cards=player.storage.yanxiao2.concat(player.getCards('j')); + player.gain(cards,'gain2','log'); + delete player.storage.yanxiao2; + player.removeSkill('yanxiao2'); + }, + ai:{ + effect:{ + target:function(card){ + if(get.type(card)=='delay') return [0,0.1]; + } + } + } + }, + anxian:{ + group:['anxian_source','anxian_target'], + subSkill:{ + source:{ + trigger:{source:'damageBefore'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'; + }, + check:function(event,player){ + if(get.damageEffect(event.player,player,player)<=0) return true; + return false; + }, + content:function(){ + 'step 0' + if(trigger.player.countCards('h')){ + trigger.player.chooseToDiscard(true); + } + 'step 1' + player.draw(); + trigger.untrigger(); + trigger.finish(); + } + }, + target:{ + trigger:{target:'shaBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('h'); + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('anxian')); + next.set('ai',function(card){ + var player=_status.event.player; + var trigger=_status.event.getTrigger(); + if(get.attitude(player,trigger.player)>0){ + return 9-get.value(card); + } + if(player.countCards('h',{name:'shan'})) return -1; + return 7-get.value(card); + }); + next.logSkill='anxian'; + "step 1" + if(result.bool){ + trigger.player.draw(); + trigger.untrigger(); + trigger.finish(); + } + }, + } + } + }, + luoyan_tianxiang:{ + inherit:'tianxiang', + filter:function(event,player){ + if(!player.storage.xingwu||!player.storage.xingwu.length) return false; + if(player.hasSkill('tianxiang')) return false; + return lib.skill.tianxiang.filter(event,player); + }, + }, + luoyan_liuli:{ + inherit:'liuli', + filter:function(event,player){ + if(!player.storage.xingwu||!player.storage.xingwu.length) return false; + if(player.hasSkill('liuli')) return false; + return lib.skill.liuli.filter(event,player); + }, + }, + luoyan:{ + group:['luoyan_tianxiang','luoyan_liuli'], + }, + xingwu:{ + audio:2, + group:['xingwu_color','xingwu_color2'], + subSkill:{ + color:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.xingwu_color=['black','red']; + } + }, + color2:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return Array.isArray(player.storage.xingwu_color)&&_status.currentPhase==player; + }, + content:function(){ + player.storage.xingwu_color.remove(get.color(trigger.card)); + } + } + }, + trigger:{player:'phaseDiscardBegin'}, + direct:true, + filter:function(event,player){ + if(!player.storage.xingwu_color) return false; + var length=player.storage.xingwu_color.length; + if(length==0) return false; + var hs=player.getCards('h'); + if(hs.length==0) return false; + if(length==2) return true; + var color=player.storage.xingwu_color[0]; + for(var i=0;i0&& + get.attitude(player,current)<0) + })) return 0; + } + return 7-get.value(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('xingwu'); + if(player.storage.xingwu.length<2){ + player.$give(result.cards,player); + } + player.lose(result.cards,ui.special); + player.storage.xingwu=player.storage.xingwu.concat(result.cards); + player.markSkill('xingwu'); + player.syncStorage('xingwu'); + } + else{ + event.finish(); + } + 'step 2' + if(player.storage.xingwu.length==3){ + player.$throw(player.storage.xingwu); + while(player.storage.xingwu.length){ + ui.discardPile.appendChild(player.storage.xingwu.shift()); + } + player.unmarkSkill('xingwu'); + player.chooseTarget(function(card,player,target){ + return target!=player&&target.sex=='male'; + },'对一名男性角色造成两点伤害并弃置其装备区内的牌').set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0) return -1; + return get.damageEffect(target,player,player)+target.countCards('e')/2; + }); + } + else{ + event.finish(); + } + 'step 3' + if(result.bool){ + var target=result.targets[0]; + target.damage(2); + event.target=target; + player.line(target,'green'); + } + else{ + event.finish(); + } + 'step 4' + if(event.target&&event.target.isAlive()){ + var es=event.target.getCards('e'); + if(es.length){ + event.target.discard(es); + } + } + }, + ai:{ + threaten:1.5 + } + }, + yinbing:{ + trigger:{player:'phaseEnd'}, + direct:true, + audio:2, + init:function(player){ + player.storage.yinbing=[]; + }, + filter:function(event,player){ + return player.countCards('he',{type:'basic'})0&& + (event.card.name=='sha'||event.card.name=='juedou'); + }, + content:function(){ + 'step 0' + player.chooseCardButton('移去一张引兵牌',true,player.storage.yinbing); + 'step 1' + var card=result.links[0]; + player.storage.yinbing.remove(card); + ui.discardPile.appendChild(card); + player.$throw(card); + game.log(player,'将',card,'置入弃牌堆'); + player.syncStorage('yinbing'); + if(player.storage.yinbing.length==0){ + player.unmarkSkill('yinbing'); + } + } + } + }, + group:'yinbing_discard' + }, + juedi:{ + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + return player.storage.yinbing&&player.storage.yinbing.length>0; + }, + forced:true, + audio:2, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('juedi'),true,function(card,player,target){ + return player.hp>=target.hp; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<2) return att-10; + var num=att/10; + if(target==player){ + num+=player.maxHp-player.countCards('h')+0.5; + } + else{ + num+=_status.event.n2*2; + if(target.isDamaged()){ + if(target.hp==1){ + num+=3; + } + else if(target.hp==2){ + num+=2; + } + else{ + num+=0.5; + } + } + } + if(target.hasJudge('lebu')){ + num/=2; + } + return num; + }).set('n2',player.storage.yinbing.length); + 'step 1' + if(result.bool){ + player.line(result.targets[0],'green'); + if(result.targets[0]==player){ + player.$throw(player.storage.yinbing,1000); + var num=player.maxHp-player.countCards('h'); + if(num>0) player.draw(num); + while(player.storage.yinbing.length){ + ui.discardPile.appendChild(player.storage.yinbing.shift()); + } + player.syncStorage('yinbing'); + player.unmarkSkill('yinbing'); + } + else{ + var target=result.targets[0]; + target.recover(); + target.gain(player.storage.yinbing.slice(0),'gain2','log'); + target.draw(player.storage.yinbing.length); + player.storage.yinbing.length=0; + } + player.syncStorage('yinbing'); + player.unmarkSkill('yinbing'); + } + } + }, + meibu:{ + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return event.player!=player&&get.distance(event.player,player,'attack')>1; + }, + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return false; + var e2=player.getEquip(2); + if(e2){ + if(e2.name=='tengjia') return true; + if(e2.name=='bagua') return true; + } + return player.countCards('h','shan')>0; + }, + content:function(){ + var target=trigger.player; + target.addTempSkill('meibu_viewas','phaseAfter'); + target.addTempSkill('meibu_range','phaseAfter'); + target.storage.meibu=player; + target.markSkillCharacter('meibu',player,'魅步','锦囊牌均视为杀且'+get.translation(player)+'视为在攻击范围内'); + }, + ai:{ + expose:0.2 + }, + subSkill:{ + range:{ + mod:{ + targetInRange:function(card,player,target){ + if(card.name=='sha'&&target==player.storage.meibu){ + return true; + } + } + }, + onremove:function(player){ + game.broadcast(function(player){ + if(player.marks.meibu){ + player.marks.meibu.delete(); + delete player.marks.meibu; + } + },player); + if(player.marks.meibu){ + player.marks.meibu.delete(); + delete player.marks.meibu; + game.addVideo('unmark',player,'meibu'); + } + }, + trigger:{player:'useCard'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='meibu_viewas' + }, + content:function(){ + player.removeSkill('meibu_viewas'); + game.broadcastAll(function(player){ + if(player.marks.meibu&&player.marks.meibu.info){ + player.marks.meibu.info.content=player.marks.meibu.info.content.slice(8); + } + },player); + } + }, + viewas:{ + mod:{ + cardEnabled:function(card,player){ + if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; + }, + cardUsable:function(card,player){ + if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; + }, + cardRespondable:function(card,player){ + if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; + }, + cardSavable:function(card,player){ + if(card.name!='sha'&&get.type(card,'trick')=='trick') return false; + }, + }, + enable:['chooseToUse','chooseToRespond'], + filterCard:function(card){ + return get.type(card,'trick')=='trick'; + }, + viewAs:{name:'sha'}, + check:function(){return 1}, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondSha')&¤t<0) return 0.8 + } + }, + respondSha:true, + order:4, + useful:-1, + value:-1 + } + } + } + }, + mumu:{ + enable:'phaseUse', + usable:1, + filterCard:function(card,player,target){ + return card.name=='sha'||(get.type(card,'trick')=='trick'&&get.color(card)=='black'); + }, + check:function(card){ + return 7-get.value(card); + }, + filterTarget:function(card,player,target){ + if(target==player) return false; + return target.getEquip(1)||target.getEquip(2); + }, + content:function(){ + 'step 0' + var e1=target.getEquip(1); + var e2=target.getEquip(2); + event.e1=e1; + event.e2=e2; + if(e1&&e2){ + player.chooseControl('武器牌','防具牌').set('ai',function(){ + if(_status.event.player.getEquip(2)){ + return '武器牌'; + } + return '防具牌'; + }); + } + else if(e1){ + event.choice='武器牌'; + } + else{ + event.choice='防具牌'; + } + 'step 1' + var choice=event.choice||result.control; + if(choice=='武器牌'){ + if(event.e1){ + target.discard(event.e1); + } + player.draw(); + } + else{ + if(event.e2){ + player.equip(event.e2); + target.$give(event.e2,player); + } + } + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(target.getEquip(2)&&!player.getEquip(2)){ + return -2; + } + return -1; + } + } + } + }, + fentian:{ + audio:2, + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + if(player.countCards('h')>=player.hp) return false; + return game.hasPlayer(function(current){ + return player!=current&&get.distance(player,current,'attack')<=1&¤t.countCards('he'); + }); + }, + intro:{ + content:'cards', + }, + init:function(player){ + player.storage.fentian=[]; + }, + content:function(){ + 'step 0' + player.chooseTarget('焚天:选择一名攻击范围内的角色,将其一张牌置于你的武将牌上',true,function(card,player,target){ + return player!=target&&get.distance(player,target,'attack')<=1&&target.countCards('he')>0; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target) + }); + 'step 1' + if(result.bool){ + player.logSkill('fentian',result.targets); + event.target=result.targets[0]; + player.choosePlayerCard(result.targets[0],'he',true); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + event.target.$give(result.links,player); + event.target.lose(result.links,ui.special); + player.storage.fentian=player.storage.fentian.concat(result.links); + player.syncStorage('fentian'); + setTimeout(function(){ + player.markSkill('fentian'); + },700); + } + }, + mod:{ + attackFrom:function(from,to,distance){ + return distance-from.storage.fentian.length; + } + } + }, + zhiri:{ + trigger:{player:'phaseBegin'}, + forced:true, + unique:true, + audio:2, + skillAnimation:true, + animationColor:'fire', + derivation:'xintan', + filter:function(event,player){ + return player.storage.fentian&&player.storage.fentian.length>=3&&!player.storage.zhiri; + }, + content:function(){ + player.loseMaxHp(); + player.addSkill('xintan'); + player.storage.zhiri=true; + player.awakenSkill('zhiri'); + } + }, + xintan:{ + enable:'phaseUse', + usable:1, + audio:2, + unique:true, + filter:function(event,player){ + return player.storage.fentian&&player.storage.fentian.length>=2; + }, + filterTarget:true, + prompt:'移去两张“焚”并令一名角色失去一点体力', + content:function(){ + 'step 0' + player.chooseCardButton(2,'移去两张“焚”并令'+get.translation(target)+'失去一点体力',player.storage.fentian,true); + 'step 1' + if(result.bool){ + player.$throw(result.links); + for(var i=0;iplayer.hp; + }, + content:function(){ + player.storage.danji=true; + player.loseMaxHp(); + player.addSkill('mashu'); + player.addSkill('nuzhan'); + player.awakenSkill('danji'); + } + }, + nuzhan:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.cards&& + event.cards.length==1&&get.type(event.cards[0],'trick')=='trick'; + }, + forced:true, + content:function(){ + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; + } + }, + group:'nuzhan2' + }, + nuzhan2:{ + trigger:{source:'damageBegin'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.cards&& + event.cards.length==1&&get.type(event.cards[0])=='equip'; + }, + content:function(){ + trigger.num++; + } + }, + tunchu:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + check:function(event,player){ + return player.countCards('h')-player.countCards('h',{type:'equip'})+2<=player.hp; + }, + content:function(){ + trigger.num+=2; + player.addTempSkill('tunchu_choose','phaseDrawAfter'); + }, + init:function(player){ + player.storage.tunchu=[]; + }, + intro:{ + content:'cards' + }, + group:'tunchu_disable', + subSkill:{ + choose:{ + trigger:{player:'phaseDrawEnd'}, + forced:true, + popup:false, + content:function(){ + 'step 0' + player.removeSkill('tunchu_choose'); + if(player.countCards('h')){ + player.chooseCard('h',true); + } + else{ + event.finish(); + } + 'step 1' + player.lose(result.cards,ui.special); + player.storage.tunchu=player.storage.tunchu.concat(result.cards); + player.markSkill('tunchu'); + player.syncStorage('tunchu'); + } + }, + disable:{ + mod:{ + cardEnabled:function(card,player){ + if(player.storage.tunchu&&player.storage.tunchu.length&& + (card.name=='sha'||card.name=='juedou')){ + return false; + } + }, + cardUsable:function(card,player){ + if(player.storage.tunchu&&player.storage.tunchu.length&& + (card.name=='sha'||card.name=='juedou')){ + return false; + } + }, + } + } + } + }, + shuliang:{ + audio:2, + trigger:{global:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.storage.tunchu&&player.storage.tunchu.length>0&&event.player.countCards('h')==0&&event.player.isAlive(); + }, + content:function(){ + 'step 0' + var goon=(get.attitude(player,trigger.player)>0); + player.chooseCardButton(get.prompt('shuliang',trigger.player),player.storage.tunchu).set('ai',function(){ + if(_status.event.goon) return 1; + return 0; + }).set('goon',goon); + 'step 1' + if(result.bool){ + player.logSkill('shuliang',trigger.player); + player.storage.tunchu.remove(result.links[0]); + player.$throw(result.links); + ui.discardPile.appendChild(result.links[0]); + player.syncStorage('tunchu'); + if(player.storage.tunchu.length==0){ + player.unmarkSkill('tunchu'); + } + trigger.player.draw(2); + } + } + }, + jieyuan:{ + group:['jieyuan_more','jieyuan_less'], + subSkill:{ + more:{ + audio:true, + trigger:{source:'damageBegin'}, + direct:true, + filter:function(event,player){ + if(!player.countCards('h',{color:'black'})) return false; + return event.player.hp>=player.hp&&player!=event.player; + }, + content:function(){ + 'step 0' + var goon=(get.attitude(player,trigger.player)<0); + var next=player.chooseToDiscard(get.prompt('jieyuan',trigger.player),{color:'black'}); + next.set('ai',function(card){ + if(_status.event.goon){ + return 8-get.value(card); + } + return 0; + }); + next.set('goon',goon); + next.logSkill=['jieyuan_more',trigger.player]; + 'step 1' + if(result.bool){ + trigger.num++; + } + } + }, + less:{ + audio:true, + trigger:{player:'damageBegin'}, + filter:function(event,player){ + if(!player.countCards('h',{color:'red'})) return false; + return event.source&&event.source.hp>=player.hp&&player!=event.source; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('竭缘:是否弃置一张红色手牌令伤害-1?',{color:'red'}); + next.set('ai',function(card){ + var player=_status.event.player; + if(player.hp==1||_status.event.getTrigger().num>1){ + return 9-get.value(card); + } + if(player.hp==2){ + return 8-get.value(card); + } + return 7-get.value(card); + }); + next.logSkill='jieyuan_less'; + "step 1" + if(result.bool){ + game.delay(); + trigger.num--; + } + } + } + }, + ai:{ + expose:0.2, + threaten:1.5 + } + }, + fenxin:{ + mode:['identity'], + trigger:{source:'dieBegin'}, + init:function(player){ + player.storage.fenxin=false; + }, + intro:{ + content:'limited' + }, + skillAnimation:'epic', + audio:2, + mark:true, + filter:function(event,player){ + if(player.storage.fenxin) return false; + return event.player.identity!='zhu'&&player.identity!='zhu'&& + player.identity!='mingzhong'&&event.player.identity!='mingzhong'; + }, + check:function(event,player){ + if(player.identity==event.player.identity) return Math.random()<0.5; + var stat=get.situation(); + switch(player.identity){ + case 'fan': + if(stat<0) return false; + if(stat==0) return Math.random()<0.6; + return true; + case 'zhong': + if(stat>0) return false; + if(stat==0) return Math.random()<0.6; + return true; + case 'nei': + if(event.player.identity=='fan'&&stat<0) return true; + if(event.player.identity=='zhong'&&stat>0) return true; + if(stat==0) return Math.random()<0.7; + return false; + } + }, + prompt:function(event,player){ + return '焚心:是否与'+get.translation(event.player)+'交换身份?'; + }, + content:function(){ + game.broadcastAll(function(player,target,shown){ + var identity=player.identity; + player.identity=target.identity; + if(shown||player==game.me){ + player.setIdentity(); + } + target.identity=identity; + },player,trigger.player,trigger.player.identityShown); + player.line(trigger.player,'green'); + player.storage.fenxin=true; + player.awakenSkill('fenxin'); + } + }, + qingyi:{ + group:['qingyi1','qingyi2'] + }, + qingyi1:{ + audio:true, + trigger:{player:'phaseBegin'}, + direct:true, + content:function(){ + "step 0" + player.addSkill('qingyi3'); + var check= player.countCards('h')>2; + player.chooseTarget(get.prompt('qingyi'),function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target); + }).ai=function(target){ + if(!check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); + } + "step 1" + if(result.bool){ + player.logSkill('qingyi1',result.targets); + player.useCard({name:'sha'},result.targets[0],false); + player.skip('phaseJudge'); + player.skip('phaseDraw'); + } + player.removeSkill('qingyi3'); + } + }, + qingyi2:{ + audio:true, + trigger:{player:'phaseUseBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + content:function(){ + "step 0" + player.addSkill('qingyi3'); + var check=player.countCards('h')<=player.hp; + player.chooseCardTarget({ + prompt:get.prompt('qingyi'), + filterCard:function(card,player){ + return get.type(card)=='equip'&&lib.filter.cardDiscardable(card,player); + }, + position:'he', + filterTarget:function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target); + }, + ai1:function(card){ + if(!_status.event.check) return 0; + return 6-get.value(card); + }, + ai2:function(target){ + if(!_status.event.check) return 0; + return get.effect(target,{name:'sha'},_status.event.player); + }, + check:check + }); + "step 1" + if(result.bool){ + player.logSkill('qingyi2',result.targets); + player.discard(result.cards[0]); + player.useCard({name:'sha'},result.targets[0]); + trigger.untrigger(); + trigger.finish(); + } + player.removeSkill('qingyi3'); + } + }, + qingyi3:{ + mod:{ + targetInRange:function(card,player,target,now){ + return true; + } + }, + }, + shixin:{ + audio:2, + trigger:{player:'damageBefore'}, + filter:function(event){ + return event.nature=='fire'; + }, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'fireDamage')) return 0; + } + } + } + }, + fenyin:{ + audio:2, + trigger:{player:'useCard'}, + frequent:true, + usable:3, + filter:function(event,player){ + if(!event.cards||event.cards.length!=1) return false; + if(_status.currentPhase!=player) return false; + if(!player.storage.fenyin) return false; + return get.color(player.storage.fenyin)!=get.color(event.cards[0]); + }, + content:function(){ + player.draw(); + }, + intro:{ + content:'card' + }, + group:['fenyin2','fenyin3'] + }, + fenyin3:{ + trigger:{player:'useCard'}, + priority:-1, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + if(!event.cards||event.cards.length!=1) return false; + if(_status.currentPhase!=player) return false; + return true; + }, + content:function(){ + player.storage.fenyin=trigger.cards[0]; + } + }, + fenyin2:{ + trigger:{player:'phaseBefore'}, + forced:true, + silent:true, + popup:false, + priority:10, + content:function(){ + player.storage.fenyin=null; + } + }, + dujin:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + frequent:true, + content:function(){ + trigger.num+=1+Math.floor(player.countCards('e')/2); + } + }, + qirang:{ + audio:2, + trigger:{player:'equipEnd'}, + frequent:true, + content:function(){ + player.gain(get.cardPile(function(card){ + return get.type(card,'trick')=='trick'; + }),'gain2'); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip') return [1,3]; + } + }, + threaten:1.3 + } + }, + yuhua:{ + trigger:{player:'phaseDiscardBegin'}, + forced:true, + audio:2, + filter:function(event,player){ + return event.parent.name=='phaseDiscard'&&player.countCards('h',{type:'basic'})0){ + var att1=get.attitude(target,player); + var att2=get.attitude(target,trigger.player); + var att3=get.attitude(player,target); + if(att3<0) return 0; + return att1/2+att2+att3; + } + else{ + return 0; + // return get.attitude(player,target); + } + }); + 'step 1' + if(result.bool){ + player.addTempSkill('chenqing2',{player:'phaseBegin'}); + event.target=result.targets[0]; + event.target.draw(4); + player.logSkill('chenqing',event.target); + } + else{ + event.finish(); + } + 'step 2' + var target=event.target; + var tosave=trigger.player; + var att=get.attitude(target,tosave); + var hastao=target.countCards('h','tao'); + target.chooseToDiscard(4,true,'he').set('ai',function(card){ + var hastao=_status.event.hastao; + var att=_status.event.att; + if(!hastao&&att>0){ + var suit=get.suit(card); + for(var i=0;i0&&player.countCards('h')>0; + }, + content:function(){ + if(player.storage.mozhi.length&&player.countCards('h')){ + var card=player.storage.mozhi.shift(); + card={name:card.name,nature:card.nature,suit:card.suit,number:card.number}; + if(lib.filter.cardEnabled(card)){ + if(game.hasPlayer(function(current){ + return player.canUse(card,current); + })){ + lib.skill.mozhix.viewAs=card; + var next=player.chooseToUse(); + if(next.isOnline()){ + player.send(function(card){ + lib.skill.mozhix.viewAs=card; + },card) + } + next.logSkill='mozhi'; + next.set('openskilldialog','默识:将一张手牌当'+get.translation(card)+'使用'); + next.set('norestore',true); + next.set('_backupevent','mozhix'); + next.backup('mozhix'); + } + } + event.redo(); + } + }, + group:['mozhi2','mozhi3'] + }, + mozhix:{ + filterCard:true, + selectCard:1, + popname:true, + }, + mozhi2:{ + trigger:{player:'phaseAfter'}, + forced:true, + silent:true, + popup:false, + content:function(){ + player.storage.mozhi.length=0; + player.unmarkSkill('mozhi'); + } + }, + mozhi3:{ + trigger:{player:'useCard'}, + forced:true, + silent:true, + popup:false, + filter:function(event,player){ + if(_status.currentPhase!=player) return false; + if(event.parent.parent.name!='phaseUse') return false; + var type=get.type(event.card); + return player.storage.mozhi.length<2&&(type=='basic'||type=='trick'); + }, + content:function(){ + player.storage.mozhi.add(trigger.card); + if(player.hasSkill('mozhi')) player.markSkill('mozhi'); + } + }, + chenqing2:{}, + ranshang:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.nature=='fire'; + }, + init:function(player){ + player.storage.ranshang=0; + }, + forced:true, + check:function(){ + return false; + }, + content:function(){ + if(player.storage.ranshang){ + player.storage.ranshang++; + } + else{ + player.storage.ranshang=1; + } + player.markSkill('ranshang'); + game.addVideo('storage',player,['ranshang',player.storage.ranshang]); + }, + intro:{ + content:'mark' + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'){ + if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2; + } + if(get.tag(card,'fireDamage')&¤t<0) return 2; + } + } + }, + group:'ranshang2' + }, + ranshang2:{ + audio:2, + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player.storage.ranshang>0; + }, + content:function(){ + player.loseHp(player.storage.ranshang); + } + }, + hanyong:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return player.storage.hanyong>player.hp&&event.card&& + (event.card.name=='nanman'||event.card.name=='wanjian'); + }, + content:function(){ + player.addTempSkill('hanyong3','useCardAfter'); + }, + init:function(player){ + player.storage.hanyong=0; + }, + group:'hanyong2' + }, + hanyong2:{ + audio:false, + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.hanyong++; + } + }, + hanyong3:{ + audio:false, + trigger:{source:'damageBegin'}, + forced:true, + filter:function(event,player){ + return event.card&&(event.card.name=='nanman'||event.card.name=='wanjian'); + }, + content:function(){ + trigger.num++; + } + }, + yishe:{ + trigger:{player:'phaseEnd'}, + init:function(player){ + player.storage.yishe=[]; + }, + filter:function(event,player){ + return !player.storage.yishe||!player.storage.yishe.length; + }, + intro:{ + content:'cards' + }, + content:function(){ + 'step 0' + player.draw(2); + player.chooseCard(2,'he',true,'选择两张牌作为“米”'); + 'step 1' + player.storage.yishe=result.cards; + player.lose(result.cards,ui.special); + player.syncStorage('yishe'); + player.markSkill('yishe'); + } + }, + bushi:{ + trigger:{player:'damageEnd',source:'damageEnd'}, + filter:function(event,player){ + return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); + }, + direct:true, + content:function(){ + 'step 0' + trigger.player.chooseCardButton('选择获得一张“米”',player.storage.yishe); + 'step 1' + if(result.bool){ + player.logSkill('bushi'); + trigger.player.gain(result.links[0],'draw2','log'); + player.storage.yishe.remove(result.links[0]); + player.syncStorage('yishe'); + if(player.storage.yishe.length==0){ + player.recover(); + player.unmarkSkill('yishe'); + } + else{ + player.markSkill('yishe'); + } + } + } + }, + midao:{ + unique:true, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.storage.yishe&&player.storage.yishe.length&&event.player.isAlive(); + }, + content:function(){ + "step 0" + var list=player.storage.yishe; + player.chooseButton([get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+get.translation(trigger.player.judging[0])+ + ','+get.prompt('midao'),list,'hidden'],function(button){ + var card=button.link; + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + return result*attitude; + }).set('judging',trigger.player.judging); + "step 1" + if(result.bool){ + player.logSkill('midao',trigger.player); + var card=result.links[0]; + player.storage.yishe.remove(card); + player.syncStorage('yishe'); + if(player.storage.yishe.length==0){ + player.recover(); + player.unmarkSkill('yishe'); + } + else{ + player.markSkill('yishe'); + } - player.$throw(card); - game.broadcastAll(function(card){ - if(card.clone){ - card.clone.classList.add('thrownhighlight'); - } - },card); - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - trigger.player.judging[0]=card; - trigger.position.appendChild(card); - game.log(player,'的判定牌改为',card); - game.delay(2); - } - }, - ai:{ - tag:{ - rejudge:0.6 - } - } - }, - fengpo:{ - audio:2, - trigger:{player:['shaBegin','juedouBegin']}, - filter:function(event,player){ - if(player.hasSkill('fengpo3')) return false; - return event.target&&event.targets&&event.targets.length==1; - }, - direct:true, - content:function(){ - 'step 0' - player.addTempSkill('fengpo3','phaseAfter'); - player.chooseControl('draw_card','加伤害','cancel2').set('prompt',get.prompt('fengpo')); - 'step 1' - if(result.control&&result.control!='cancel2'){ - player.logSkill('fengpo'); - var nd=trigger.target.countCards('h',{suit:'diamond'}); - if(result.control=='draw_card'){ - player.draw(nd); - } - else{ - player.addTempSkill('fengpo2','useCardToAfter'); - player.storage.fengpo=nd; - } - } - } - }, - fengpo2:{ - trigger:{source:'damageBegin'}, - filter:function(event){ - return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); - }, - forced:true, - audio:false, - content:function(){ - if(typeof player.storage.fengpo=='number'){ - trigger.num+=player.storage.fengpo; - } - } - }, - fengpo3:{}, - biluan:{ - trigger:{player:'phaseDrawBefore'}, - mark:true, - unique:true, - intro:{ - content:function(storage){ - if(storage>0){ - return '防御距离+'+storage; - } - else if(storage<0){ - return '防御距离'+storage; - } - else{ - return '无距离变化'; - } - } - }, - init:function(player){ - player.storage.biluan=0; - }, - check:function(event,player){ - if(player.countCards('h')>player.hp) return true; - if(player.hasJudge('lebu')) return true; - var ng=[]; - var players=game.filterPlayer(); - for(var i=0;i1){ - nai++; - } - } - } - return nai>=2; - }, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&&get.distance(current,player)<=1; - }); - }, - content:function(){ - var ng=[]; - var players=game.filterPlayer(); - for(var i=0;i1; - }, - forced:true, - content:function(){ - 'step 0' - player.chooseTarget(function(card,player,target){ - return target==player||target==_status.event.getTrigger().player; - },true,'礼下:选择一个目标摸一张牌').set('ai',function(target){ - return player==target?1:0; - }); - 'step 1' - if(result.targets.length){ - result.targets[0].draw(); - player.line(result.targets[0],'green'); - } - player.storage.biluan--; - player.markSkill('biluan'); - game.addVideo('storage',player,['biluan',player.storage.biluan]); - } - }, - fuji:{ - trigger:{global:'damageBegin'}, - filter:function(event){ - return event.source&&event.nature=='thunder'; - }, - check:function(event,player){ - return get.attitude(player,event.source)>0&&get.attitude(player,event.player)<0; - }, - prompt:function(event){ - return get.translation(event.source)+'即将对'+get.translation(event.player)+'造成伤害,'+get.prompt('fuji'); - }, - content:function(){ - "step 0" - trigger.source.judge(ui.special); - "step 1" - if(result.color=='black'){ - result.card.goto(ui.discardPile); - trigger.num++; - } - else{ - trigger.source.gain(result.card); - trigger.source.$gain2(result.card); - } - } - }, - fulu:{ - enable:'chooseToUse', - filterCard:function(card){ - return card.name=='sha'&&!card.nature; - }, - viewAs:{name:'sha',nature:'thunder'}, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.1; - } - } - }, - guiming:{ - unique:true, - zhuSkill:true, - }, - canshi:{ - audio:2, - trigger:{player:'phaseDrawBefore'}, - check:function(event,player){ - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu') return true; - return current.isDamaged(); - }); - return num>3; - }, - prompt:function(event,player){ - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; - return current.isDamaged(); - }); - return '残蚀:是否改为摸'+get.cnNumber(num)+'张牌?'; - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - var num=game.countPlayer(function(current){ - if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; - return current.isDamaged(); - }); - if(num>0){ - player.draw(num); - } - player.addTempSkill('canshi2','phaseAfter'); - } - }, - canshi2:{ - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - if(player.countCards('he')==0) return false; - var type=get.type(event.card,'trick'); - return type=='basic'||type=='trick'; - }, - content:function(){ - game.delay(0.5); - player.chooseToDiscard(true,'he'); - } - }, - chouhai:{ - audio:2, - trigger:{player:'damageBegin'}, - forced:true, - check:function(){ - return false; - }, - filter:function(event,player){ - return player.countCards('h')==0; - }, - content:function(){ - trigger.num++; - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'damage')&&target.countCards('h')==0) return [1,-2]; - } - } - } - }, - kunfen:{ - audio:2, - trigger:{player:'phaseEnd'}, - direct:true, - content:function(){ - "step 0" - if(player.storage.kunfen|| - (lib.config.mode=='guozhan'&&player.hiddenSkills.contains('kunfen'))){ - if(!player.storage.kunfen){ - event.skillHidden=true; - } - player.chooseBool(get.prompt('kunfen')).set('ai',function(){ - var player=_status.event.player; - if(player.hp>3) return true; - if(player.hp==3&&player.countCards('h')<3) return true; - if(player.hp==2&&player.countCards('h')==0) return true; - return false; - }); - } - else{ - event.forced=true; - } - "step 1" - if(event.forced||result.bool){ - player.logSkill('kunfen'); - player.loseHp(); - } - else{ - event.finish(); - } - "step 2" - player.draw(2); - }, - ai:{ - threaten:1.5 - } - }, - fengliang:{ - skillAnimation:true, - unique:true, - audio:2, - derivation:'tiaoxin', - trigger:{player:'dying'}, - priority:10, - forced:true, - filter:function(event,player){ - return !player.storage.kunfen; - }, - content:function(){ - "step 0" - player.loseMaxHp(); - "step 1" - if(player.hp<2){ - player.recover(2-player.hp); - } - "step 2" - player.addSkill('tiaoxin'); - player.storage.kunfen=true; - player.awakenSkill('fengliang'); - }, - }, - zhuiji:{ - mod:{ - globalFrom:function(from,to){ - if(from.hp>to.hp) return -Infinity; - } - } - }, - cihuai:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h','sha')==0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('cihuai'),function(card,player,target){ - return player.canUse({name:'sha'},target); - }).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'sha'},player,player); - }); - "step 1" - if(result.bool){ - player.logSkill('cihuai'); - player.showHandcards(); - player.useCard({name:'sha'},result.targets); - } - }, - ai:{ - expose:0.2, - } - }, - jilei:{ - trigger:{player:'damageEnd'}, - priority:9, - audio:2, - direct:true, - filter:function(event){ - return event&&event.source; - }, - content:function(){ - 'step 0' - player.chooseControl('basic','trick','equip','cancel2',function(){ - var source=_status.event.source; - if(get.attitude(_status.event.player,source)>0) return 'cancel2'; - if(_status.currentPhase!=source) return 'trick'; - if(lib.filter.cardUsable({name:'sha'},source)&&source.countCards('h')>=2) return 'basic'; - return 'trick'; - }).set('prompt',get.prompt('jilei',trigger.source)).set('source',trigger.source); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('jilei',trigger.source); - player.popup(get.translation(result.control)+'牌'); - trigger.source.storage.jilei2=result.control; - trigger.source.addTempSkill('jilei2','phaseAfter'); - } - }, - ai:{ - threaten:0.7 - } - }, - jilei2:{ - unique:true, - intro:{ - content:function(storage){ - return '不能使用、打出或弃置'+get.translation(storage)+'牌'; - } - }, - mark:true, - onremove:true, - mod:{ - cardDiscardable:function(card,player){ - if(player.storage.jilei2==get.type(card,'trick')) return false; - }, - cardEnabled:function(card,player){ - if(player.storage.jilei2==get.type(card,'trick')) return false; - }, - cardUsable:function(card,player){ - if(player.storage.jilei2==get.type(card,'trick')) return false; - }, - cardRespondable:function(card,player){ - if(player.storage.jilei2==get.type(card,'trick')) return false; - }, - cardSavable:function(card,player){ - if(player.storage.jilei2==get.type(card,'trick')) return false; - }, - }, - }, - danlao:{ - priority:9, - audio:2, - filter:function(event,player){ - return event.player!=player&&get.type(event.card)=='trick'&&event.targets&&event.targets.length>1; - }, - check:function(event,player){ - return get.tag(event.card,'multineg')||get.effect(player,event.card,event.player,player)<=0; - }, - trigger:{target:'useCardToBefore'}, - content:function(){ - trigger.untrigger(); - trigger.finish(); - player.draw(); - }, - ai:{ - effect:{ - target:function(card){ - if(get.type(card)!='trick') return; - if(card.name=='tiesuo') return [0,0]; - if(card.name=='yihuajiemu') return [0,1]; - if(get.tag(card,'multineg')) return [0,2]; - } - } - } - }, - taichen:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player.canUse('sha',target); - }, - content:function(){ - "step 0" - player.loseHp(); - "step 1" - player.useCard({name:'sha'},target,false); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(player.hp>2&&player.hp>target.hp&&target.countCards('he')<4){ - return get.effect(target,{name:'sha'},player,target); - } - return 0; - } - } - } - }, - manjuan:{ - audio:true, - trigger:{global:'discardAfter'}, - filter:function(event,player){ - if(event.player==player) return false; - if(!player.countCards('he')) return false; - for(var i=0;imaxval){ - maxval=tempval; - } - } - maxval+=cards.length-1; - var next=player.chooseToDiscard('he',{suit:suits}); - next.set('ai',function(card){ - return _status.event.maxval-get.value(card); - }); - next.set('maxval',maxval); - next.set('dialog',[get.prompt(event.name),'hidden',cards]) - next.logSkill=event.name; - event.cards=cards; - } - "step 2" - if(result.bool){ - player.gain(event.cards,'gain2','log'); - } - }, - ai:{ - threaten:1.3 - } - }, - zuixiang:{ - skillAnimation:true, - audio:true, - unique:true, - mark:true, - trigger:{player:'phaseBegin'}, - priority:10, - filter:function(event,player){ - if(player.storage.zuixiang) return false; - return true; - }, - check:function(event,player){ - return player.countCards('h')0; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('协穆:是否弃置一张杀并摸两张牌?',{name:'sha'}); - next.set('ai',function(card){ - return 9-get.value(card); - }); - next.logSkill='xiemu'; - "step 1" - if(result.bool){ - player.draw(2); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.color(card)=='black'&&target.countCards('h')>0){ - return [1,0.5]; - } - } - } - } - }, - spmengjin:{ - trigger:{player:'shaBegin'}, - filter:function(event,player){ - return event.target.countCards('he')>0; - }, - direct:true, - content:function(){ - "step 0" - var att=get.attitude(player,trigger.target); - player.choosePlayerCard(get.prompt('spmengjin',trigger.target),'he',trigger.target).ai=function(button){ - var val=get.buttonValue(button); - if(att>0) return -val; - return val; - }; - "step 1" - if(result.bool){ - trigger.target.discard(result.links); - player.logSkill('spmengjin',trigger.target); - trigger.target.addTempSkill('mengjin2','shaAfter'); - } - }, - ai:{ - expose:0.2 - } - }, - fenxun_old:{ - audio:2, - trigger:{player:'shaBefore'}, - direct:true, - filter:function(event,player){ - return event.targets.length==1; - }, - position:'he', - content:function(){ - "step 0" - player.chooseCardTarget({ - filterCard:lib.filter.cardDiscardable, - filterTarget:function(card,player,target){ - var trigger=_status.event.getTrigger(); - return lib.filter.targetEnabled(trigger.card,player,target)&&target!=trigger.targets[0]; - }, - ai1:function(card){ - return 6-get.value(card); - }, - ai2:function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player); - }, - prompt:get.prompt('fenxun') - }); - "step 1" - if(result.bool){ - player.discard(result.cards); - trigger.targets.push(result.targets[0]); - player.logSkill('fenxun',result.targets); - } - } - }, - zhoufu:{ - audio:2, - enable:'phaseUse', - usable:1, - filterCard:true, - filterTarget:function(card,player,target){ - return player!=target&&!target.hasSkill('zhoufu2'); - }, - prepare:'throw', - discard:false, - content:function(){ - target.$gain2(cards); - target.storage.zhoufu2=cards[0]; - target.addSkill('zhoufu2'); - target.storage.zhoufu3=player; - ui.special.appendChild(cards[0]); - target.syncStorage('zhoufu2'); - }, - check:function(card){ - return 3-get.value(card) - }, - ai:{ - expose:0.1, - order:1, - result:{ - player:1 - } - } - }, - zhoufu2:{ - trigger:{player:'judge'}, - forced:true, - priority:10, - mark:'card', - content:function(){ - "step 0" - player.$throw(player.storage.zhoufu2); - game.broadcastAll(function(card){ - if(card.clone){ - card.clone.classList.add('thrownhighlight'); - } - },player.storage.zhoufu2); - if(player.judging[0].clone){ - player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([player.judging[0].clone])); - } - player.judging[0]=player.storage.zhoufu2; - trigger.position.appendChild(player.storage.zhoufu2); - game.log(player,'的判定牌改为',player.storage.zhoufu2); - game.delay(2); - "step 1" - if(player.storage.zhoufu3.isAlive()&&player.storage.zhoufu3.hasSkill('yingbin')){ - player.storage.zhoufu3.logSkill('yingbin'); - player.storage.zhoufu3.draw(2); - } - player.removeSkill('zhoufu2'); - delete player.storage.zhoufu2; - delete player.storage.zhoufu3; - }, - intro:{ - content:'card' - }, - group:'zhoufu3' - }, - zhoufu3:{ - trigger:{player:'phaseEnd'}, - forced:true, - content:function(){ - if(player.storage.zhoufu2){ - player.unmark(player.storage.zhoufu2.name); - if(player.storage.zhoufu3.isAlive()){ - player.storage.zhoufu3.gain(player.storage.zhoufu2); - player.$give(player.storage.zhoufu2,player.storage.zhoufu3); - game.delay(); - } - else{ - ui.discardPile.appendChild(player.storage.zhoufu2); - } - } - player.removeSkill('zhoufu2'); - delete player.storage.zhoufu2; - delete player.storage.zhoufu3; - }, - }, - yingbin:{ - audio:2, - }, - kuiwei:{ - audio:2, - trigger:{player:'phaseEnd'}, - check:function(event,player){ - if(player.isTurnedOver()) return true; - var num=game.countPlayer(function(current){ - return current.getEquip(1); - }); - return num>1; - }, - content:function(){ - "step 0" - player.turnOver(); - "step 1" - var num=game.countPlayer(function(current){ - return current.getEquip(1); - }); - player.draw(2+num); - player.addSkill('kuiwei2'); - }, - ai:{ - effect:{ - target:function(card){ - if(card.name=='guiyoujie') return [0,2]; - } - } - } - }, - kuiwei2:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - audio:false, - content:function(){ - var num=game.countPlayer(function(current){ - return current.getEquip(1); - }); - if(num>=player.countCards('he')){ - player.discard(player.getCards('he')); - } - else if(num){ - player.chooseToDiscard('he',num,true); - } - player.removeSkill('kuiwei2'); - } - }, - yanzheng:{ - enable:'chooseToUse', - audio:2, - filter:function(event,player){ - return player.hp0; - }, - viewAsFilter:function(player){ - return player.hp0; - }, - filterCard:true, - position:'e', - viewAs:{name:'wuxie'}, - prompt:'将一张装备区内的牌当无懈可击使用', - check:function(card){return 8-get.equipValue(card)}, - threaten:1.2 - }, - tongji:{ - global:'tongji_disable', - unique:true, - gainnable:true, - subSkill:{ - disable:{ - mod:{ - targetEnabled:function(card,player,target){ - if(player.hasSkill('tongji')) return; - if(card.name=='sha'){ - if(target.hasSkill('tongji')) return; - if(game.hasPlayer(function(current){ - return current.hasSkill('tongji')&¤t.hp=0; - }, - content:function(){ - "step 0" - player.draw(); - if(trigger.target!=player){ - player.chooseCard(true,'he','交给'+get.translation(trigger.target)+'一张牌').set('ai',function(card){ - if(get.position(card)=='e') return -1; - if(card.name=='shan') return 1; - if(get.type(card)=='equip') return 0.5; - return 0; - }); - } - else{ - event.finish(); - } - "step 1" - trigger.target.gain(result.cards,player); - player.$give(result.cards,trigger.target); - game.delay(); - event.card=result.cards[0]; - if(get.type(event.card)!='equip') event.finish(); - "step 2" - if(!trigger.target.isMin()){ - trigger.target.chooseBool('是否装备'+get.translation(event.card)+'?').set('ai',function(){ - var current=_status.event.player.getCards('e',{subtype:get.subtype(_status.event.card)}); - if(current&¤t.length){ - return get.equipValue(event.card)>get.equipValue(current[0]); - } - return true; - }).set('card',event.card); - } - else{ - event.finish(); - } - "step 3" - if(result.bool){ - trigger.target.equip(event.card); - } - }, - ai:{ - threaten:1.1 - } - }, - liangzhu:{ - audio:2, - trigger:{global:'recoverAfter'}, - direct:true, - filter:function(event,player){ - return _status.currentPhase==event.player; - }, - content:function(){ - 'step 0' - if(player==trigger.player){ - player.chooseControl('摸一张','摸两张','cancel2',function(){ - return '摸两张'; - }).set('prompt',get.prompt('liangzhu')); - event.single=true; - } - else{ - player.chooseTarget(get.prompt('liangzhu'),function(card,player,target){ - return target==_status.event.player||target==_status.event.target; - }).set('target',trigger.player).set('ai',function(target){ - var player=_status.event.player; - if(player==target) return 1; - return get.attitude(player,target)-1.5; - }); - } - 'step 1' - if(event.single){ - if(result.control!='cancel2'){ - player.logSkill('liangzhu',player); - if(result.control=='摸一张'){ - player.draw(); - } - else{ - player.draw(2); - player.storage.liangzhu=player; - } - } - } - else if(result.bool){ - var target=result.targets[0]; - player.logSkill('liangzhu',target); - if(target==player){ - target.draw(); - } - else{ - target.draw(2); - if(target.storage.liangzhu){ - target.storage.liangzhu.add(player); - } - else{ - target.storage.liangzhu=[player]; - } - } - } - }, - ai:{ - expose:0.1 - } - }, - fanxiang:{ - skillAnimation:true, - animationColor:'fire', - audio:2, - unique:true, - forceunique:true, - derivation:'xiaoji', - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - if(player.storage.fanxiang) return false; - return game.hasPlayer(function(current){ - return current.storage.liangzhu&¤t.storage.liangzhu.contains(player)&¤t.isDamaged(); - }); - }, - forced:true, - content:function(){ - player.storage.fanxiang=true; - player.gainMaxHp(); - player.recover(); - player.removeSkill('liangzhu'); - player.addSkill('xiaoji'); - player.awakenSkill('fanxiang'); - }, - }, - mingshi:{ - audio:2, - trigger:{player:'damageBegin'}, - direct:true, - filter:function(event,player){ - return event.source&&event.source.hp>player.hp; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('mingshi'),{color:'black'}); - next.set('ai',function(card){ - return 9-get.value(card); - }); - next.set('logSkill','mingshi'); - "step 1" - if(result.bool){ - trigger.num--; - } - }, - ai:{ - threaten:0.8 - } - }, - lirang:{ - audio:2, - trigger:{player:'discardAfter'}, - filter:function(event,player){ - for(var i=0;i1; - }); - } - player.chooseCardButton(get.prompt('lirang'),event.cards,[1,event.cards.length]).set('ai',function(button){ - if(!_status.event.goon||ui.selected.buttons.length) return 0; - if(button.link.name=='du') return 2; - return 1; - }).set('goon',goon); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - event.togive=result.links.slice(0); - player.chooseTarget('将'+get.translation(result.links)+'交给一名角色',true,function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.enemy){ - return -att; - } - else{ - if(att>2) return att/Math.sqrt(1+target.countCards('h')); - return att/Math.sqrt(1+target.countCards('h'))/5; - } - }).set('enemy',get.value(event.togive[0])<0); - } - else{ - for(var i=0;i0; - }, - content:function(){ - trigger.target.discardPlayerCard(player,true); - } - }, - shenxian:{ - audio:2, - trigger:{global:'discardAfter'}, - filter:function(event,player){ - if(event.player==player||_status.currentPhase==player) return false; - if(player.hasSkill('shenxian2')) return false; - for(var i=0;iplayer.storage.qiangwu) return Infinity; - } - }, - group:['qiangwu2','qiangwu3'] - }, - qiangwu2:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - delete player.storage.qiangwu; - } - }, - qiangwu3:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - if(_status.currentPhase==player&&event.card.name=='sha'&& - event.card.number>player.storage.qiangwu) return true; - return false; - }, - forced:true, - popup:false, - content:function(){ - if(player.stat[player.stat.length-1].card.sha>0){ - player.stat[player.stat.length-1].card.sha--; - } - }, - }, - zhendu:{ - audio:2, - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - return event.player!=player&&player.countCards('h')>0; - }, - direct:true, - content:function(){ - "step 0" - var nono=(Math.abs(get.attitude(player,trigger.player))<3); - if(get.damageEffect(trigger.player,player,player)<=0){ - nono=true - } - else if(trigger.player.hp>2){ - nono=true; - } - else if(trigger.player.hp>1&&player.countCards('h')<3){ - nono=true; - } - else if(trigger.player.canUse('sha',player)&&!player.countCards('h','shan')&&trigger.player.countCards('h')>=3){ - nono=true; - } - var next=player.chooseToDiscard(get.prompt('zhendu',trigger.player)); - next.set('ai',function(card){ - if(_status.event.nono) return -1; - return 7-get.useful(card); - }); - next.set('logSkill',['zhendu',trigger.player]); - next.set('nono',nono); - "step 1" - if(result.bool){ - trigger.player.damage(); - } - else{ - event.finish(); - } - "step 2" - trigger.player.useCard({name:'jiu'},trigger.player); - }, - ai:{ - threaten:2, - expose:0.3 - } - }, - qiluan:{ - trigger:{source:'dieAfter'}, - forced:true, - priority:-10, - silent:true, - popup:false, - filter:function(event){ - return _status.currentPhase!=event.player; - }, - content:function(){ - if(!player.storage.qiluan){ - player.storage.qiluan=1; - } - else{ - player.storage.qiluan++; - } - }, - group:['qiluan2','qiluan3'] - }, - qiluan2:{ - audio:2, - trigger:{global:'phaseAfter'}, - forced:true, - filter:function(event,player){ - return player.storage.qiluan?true:false; - }, - content:function(){ - if(get.mode()=='guozhan'){ - player.draw(3); - } - else{ - player.draw(3*player.storage.qiluan); - } - player.storage.qiluan=0; - } - }, - qiluan3:{ - trigger:{source:'dieAfter'}, - forced:true, - priority:-10, - filter:function(event){ - return _status.currentPhase==event.player; - }, - content:function(){ - var num=3; - if(player.storage.qiluan){ - num+=3*player.storage.qiluan; - player.storage.qiluan=0; - } - player.draw(num); - }, - }, - shangyi:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - content:function(){ - "step 0" - player.chooseCardButton(target,target.getCards('h')).set('filterButton',function(button){ - return get.color(button.link)=='black'; - }); - "step 1" - if(result.bool){ - target.discard(result.links[0]); - } - }, - ai:{ - order:11, - result:{ - target:function(player,target){ - return -target.countCards('h'); - } - }, - threaten:1.1 - }, - }, - shengxi:{ - trigger:{player:'phaseDiscardBegin'}, - frequent:true, - filter:function(event,player){ - return !player.getStat('damage'); - }, - content:function(){ - player.draw(2); - }, - audio:2, - audioname:['liushan'] - }, - shoucheng:{ - trigger:{global:'loseEnd'}, - audio:2, - check:function(event,player){ - return get.attitude(player,event.player)>0; - }, - filter:function(event,player){ - if(event.player.countCards('h')) return false; - if(_status.currentPhase==event.player) return false; - for(var i=0;i0){ - return true; - } - }); - return num>=2; - }, - content:function(){ - "step 0" - var targets=game.filterPlayer(); - targets.remove(player); - targets.sort(lib.sort.seat); - event.targets=targets; - event.num=0; - trigger.untrigger(); - trigger.finish(); - player.line(targets,'green'); - "step 1" - if(num
【勇决】
每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之,每回合限一次
'); - "step 1" - player.turnOver(); - }, - intro:{ - content:'limited' - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - if(target.isMin()) return 0; - if(player.hp>1){ - if(game.phaseNumber2) return 0; - if(get.attitude(player,target)<5) return 0; - } - if(get.attitude(player,target)<5) return 0; - if(target.hp==1&&target.maxHp>2) return 0.2; - if(target==game.me) return 1.2; - return 1; - } - }, - expose:0.5, - threaten:1.5 - } - }, - fenming:{ - audio:2, - trigger:{player:'phaseEnd'}, - check:function(event,player){ - var num=game.countPlayer(function(current){ - if(current.isLinked()&¤t.countCards('he')){ - return get.attitude(player,current); - } - }); - return num<0; - }, - filter:function(event,player){ - return player.isLinked(); - }, - content:function(){ - "step 0" - event.targets=game.filterPlayer(function(current){ - if(current.isLinked()&¤t.countCards('he')){ - return true; - } - }); - event.num=0; - event.targets.sort(lib.sort.seat); - "step 1" - if(event.num=0); - trigger.player.chooseToDiscard('he',{type:'equip'}).set('ai',function(card){ - if(_status.event.nono){ - return 0; - } - if(_status.event.player.hp==1) return 10-get.value(card); - return 9-get.value(card); - }).set('nono',nono); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.draw(); - } - else{ - trigger.player.damage(); - } - }, - ai:{ - expose:0.3, - threaten:1.3 - } - }, - suishi:{ - trigger:{global:'dying'}, - forced:true, - popup:false, - priority:6.5, - check:function(){ - return false; - }, - filter:function(event,player){ - return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source!=event.player; - }, - content:function(){ - 'step 0' - var str; - if(trigger.parent.source==player){ - str='随势:是否摸一张牌?'; - } - else{ - str='随势:是否令'+get.translation(player)+'摸一张牌?' - } - trigger.parent.source.chooseBool(str).set('ai',function(){ - return get.attitude(_status.event.player,_status.event.target)>0; - }).set('target',player); - 'step 1' - if(result.bool){ - player.logSkill('suishi'); - trigger.parent.source.line(player,'green'); - player.draw(); - } - }, - group:'suishi2' - }, - suishi2:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - check:function(){ - return false; - }, - filter:function(event,player){ - return event.player!=player&&event.source&&event.source!=player&&event.source!=event.player; - }, - content:function(){ - 'step 0' - var str; - if(trigger.source==player){ - str='随势:是否流失一点体力?'; - } - else{ - str='随势:是否令'+get.translation(player)+'流失一点体力?' - } - trigger.source.chooseBool(str).set('ai',function(){ - return get.attitude(_status.event.player,_status.event.target)<0; - }).set('target',player); - 'step 1' - if(result.bool){ - player.logSkill('suishi'); - trigger.source.line(player,'green'); - player.loseHp(); - } - }, - }, - sijian:{ - trigger:{player:'loseEnd'}, - direct:true, - audio:2, - filter:function(event,player){ - if(player.countCards('h')) return false; - for(var i=0;i0; - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool){ - player.logSkill('sijian',result.targets); - event.target=result.targets[0]; - player.discardPlayerCard(event.target,true); - } - else{ - event.finish(); - } - }, - ai:{ - expose:0.2, - } - }, - quji:{ - enable:'phaseUse', - usable:1, - position:'he', - filterCard:true, - selectCard:function(){ - var player=_status.event.player; - var num=game.countPlayer(function(current){ - return current.isDamaged(); - }); - return [1,Math.min(num,player.maxHp-player.hp)]; - }, - filterTarget:function(card,player,target){ - return target.hp=game.countPlayer(function(current){ - return get.attitude(player,current)>0&¤t.isDamaged(); - })){ - return -1; - } - if(get.color(card)=='black') return -1; - return 9-get.value(card); - }, - content:function(){ - "step 0" - target.recover(); - "step 1" - if(target==player){ - for(var i=0;i1) return false; - return game.hasPlayer(function(current){ - return current.hasSkill('junbing'); - }); - }, - check:function(event,player){ - var target=game.findPlayer(function(current){ - return current.hasSkill('junbing'); - }); - if(target){ - var num=target.countCards('h'); - var att=get.attitude(player,target); - if(num==0) return true; - if(num==1) return att>-1; - if(num==2) return att>0; - return att>1; - } - return false; - }, - content:function(){ - "step 0" - player.draw(); - if(player.hasSkill('junbing')){ - event.finish(); - } - else{ - event.target=game.findPlayer(function(current){ - return current.hasSkill('junbing'); - }); - } - "step 1" - var cards=player.getCards('h'); - target.gain(cards,player); - event.num=cards.length; - player.$give(event.num,target); - game.delay(); - "step 2" - target.chooseCard('选择还给'+get.translation(player)+'的牌',true,event.num); - game.delay(0.2); - "step 3" - player.gain(result.cards,target); - target.$give(result.cards.length,player); - game.delay(); - } - }, - junbing:{ - global:'junbing2', - unique:true, - forceunique:true - }, - xiongyi:{ - skillAnimation:true, - unique:true, - enable:'phaseUse', - audio:2, - mark:true, - filter:function(event,player){ - return !player.storage.xiongyi; - }, - init:function(player){ - player.storage.xiongyi=false; - }, - filterTarget:function(card,player,target){ - if(get.mode()=='guozhan'){ - if(player==target) return true; - if(player.identity=='ye') return false; - if(player.identity=='unknown'){ - if(_status.yeidentity.contains(player._group)){ - return false; - } - else if(get.zhu(player)||get.population(player._group)+1<=get.population()/2){ - return player._group==target.identity; - } - else{ - return false; - } - } - return player.identity==target.identity; - } - else{ - return true; - } - }, - multitarget:true, - multiline:true, - selectTarget:function(){ - if(get.mode()=='guozhan') return -1; - return [1,3]; - }, - content:function(){ - "step 0" - player.storage.xiongyi=true; - player.awakenSkill('xiongyi'); - game.asyncDraw(targets,3); - "step 1" - if(player.isDamaged()){ - if(get.mode()=='guozhan'){ - if(player.isMinor()){ - player.recover(); - } - } - else if(targets.length<=2){ - player.recover(); - } - } - }, - intro:{ - content:'limited' - }, - ai:{ - order:1, - result:{ - target:function(player){ - var num=player.countCards('h'); - if(player.hp==1) return 1; - if(player.hp==2&&num<=2) return 1; - if(player.hp==3&&num<=1) return 1; - if(game.phaseNumber2) return false; - var cards=player.getCards('h'); - if(cards.length3) return false; - for(var i=0;i7||get.tag(cards[i],'recover')>=1) return false; - } - return true; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - var cards=player.getCards('h'); - event.bool=cards.length>=player.hp; - player.discard(cards); - "step 1" - if(event.bool){ - player.recover(); - } - } - }, - wuji:{ - skillAnimation:true, - audio:2, - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player.getStat('damage')>=3&&!player.storage.wuji; - }, - content:function(){ - "step 0" - player.removeSkill('huxiao'); - player.gainMaxHp(); - "step 1" - player.recover(); - player.awakenSkill('wuji'); - player.storage.wuji=true; + player.$throw(card); + game.broadcastAll(function(card){ + if(card.clone){ + card.clone.classList.add('thrownhighlight'); + } + },card); + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + trigger.player.judging[0]=card; + trigger.position.appendChild(card); + game.log(player,'的判定牌改为',card); + game.delay(2); + } + }, + ai:{ + tag:{ + rejudge:0.6 + } + } + }, + fengpo:{ + audio:2, + trigger:{player:['shaBegin','juedouBegin']}, + filter:function(event,player){ + if(player.hasSkill('fengpo3')) return false; + return event.target&&event.targets&&event.targets.length==1; + }, + direct:true, + content:function(){ + 'step 0' + player.addTempSkill('fengpo3','phaseAfter'); + player.chooseControl('draw_card','加伤害','cancel2').set('prompt',get.prompt('fengpo')); + 'step 1' + if(result.control&&result.control!='cancel2'){ + player.logSkill('fengpo'); + var nd=trigger.target.countCards('h',{suit:'diamond'}); + if(result.control=='draw_card'){ + player.draw(nd); + } + else{ + player.addTempSkill('fengpo2','useCardToAfter'); + player.storage.fengpo=nd; + } + } + } + }, + fengpo2:{ + trigger:{source:'damageBegin'}, + filter:function(event){ + return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); + }, + forced:true, + audio:false, + content:function(){ + if(typeof player.storage.fengpo=='number'){ + trigger.num+=player.storage.fengpo; + } + } + }, + fengpo3:{}, + biluan:{ + trigger:{player:'phaseDrawBefore'}, + mark:true, + unique:true, + intro:{ + content:function(storage){ + if(storage>0){ + return '防御距离+'+storage; + } + else if(storage<0){ + return '防御距离'+storage; + } + else{ + return '无距离变化'; + } + } + }, + init:function(player){ + player.storage.biluan=0; + }, + check:function(event,player){ + if(player.countCards('h')>player.hp) return true; + if(player.hasJudge('lebu')) return true; + var ng=[]; + var players=game.filterPlayer(); + for(var i=0;i1){ + nai++; + } + } + } + return nai>=2; + }, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&&get.distance(current,player)<=1; + }); + }, + content:function(){ + var ng=[]; + var players=game.filterPlayer(); + for(var i=0;i1; + }, + forced:true, + content:function(){ + 'step 0' + player.chooseTarget(function(card,player,target){ + return target==player||target==_status.event.getTrigger().player; + },true,'礼下:选择一个目标摸一张牌').set('ai',function(target){ + return player==target?1:0; + }); + 'step 1' + if(result.targets.length){ + result.targets[0].draw(); + player.line(result.targets[0],'green'); + } + player.storage.biluan--; + player.markSkill('biluan'); + game.addVideo('storage',player,['biluan',player.storage.biluan]); + } + }, + fuji:{ + trigger:{global:'damageBegin'}, + filter:function(event){ + return event.source&&event.nature=='thunder'; + }, + check:function(event,player){ + return get.attitude(player,event.source)>0&&get.attitude(player,event.player)<0; + }, + prompt:function(event){ + return get.translation(event.source)+'即将对'+get.translation(event.player)+'造成伤害,'+get.prompt('fuji'); + }, + content:function(){ + "step 0" + trigger.source.judge(ui.special); + "step 1" + if(result.color=='black'){ + result.card.goto(ui.discardPile); + trigger.num++; + } + else{ + trigger.source.gain(result.card); + trigger.source.$gain2(result.card); + } + } + }, + fulu:{ + enable:'chooseToUse', + filterCard:function(card){ + return card.name=='sha'&&!card.nature; + }, + viewAs:{name:'sha',nature:'thunder'}, + ai:{ + order:function(){ + return get.order({name:'sha'})+0.1; + } + } + }, + guiming:{ + unique:true, + zhuSkill:true, + }, + canshi:{ + audio:2, + trigger:{player:'phaseDrawBefore'}, + check:function(event,player){ + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu') return true; + return current.isDamaged(); + }); + return num>3; + }, + prompt:function(event,player){ + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; + return current.isDamaged(); + }); + return '残蚀:是否改为摸'+get.cnNumber(num)+'张牌?'; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + var num=game.countPlayer(function(current){ + if(player.hasZhuSkill('guiming')&¤t.group=='wu'&¤t!=player) return true; + return current.isDamaged(); + }); + if(num>0){ + player.draw(num); + } + player.addTempSkill('canshi2','phaseAfter'); + } + }, + canshi2:{ + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + if(player.countCards('he')==0) return false; + var type=get.type(event.card,'trick'); + return type=='basic'||type=='trick'; + }, + content:function(){ + game.delay(0.5); + player.chooseToDiscard(true,'he'); + } + }, + chouhai:{ + audio:2, + trigger:{player:'damageBegin'}, + forced:true, + check:function(){ + return false; + }, + filter:function(event,player){ + return player.countCards('h')==0; + }, + content:function(){ + trigger.num++; + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')&&target.countCards('h')==0) return [1,-2]; + } + } + } + }, + kunfen:{ + audio:2, + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + "step 0" + if(player.storage.kunfen|| + (lib.config.mode=='guozhan'&&player.hiddenSkills.contains('kunfen'))){ + if(!player.storage.kunfen){ + event.skillHidden=true; + } + player.chooseBool(get.prompt('kunfen')).set('ai',function(){ + var player=_status.event.player; + if(player.hp>3) return true; + if(player.hp==3&&player.countCards('h')<3) return true; + if(player.hp==2&&player.countCards('h')==0) return true; + return false; + }); + } + else{ + event.forced=true; + } + "step 1" + if(event.forced||result.bool){ + player.logSkill('kunfen'); + player.loseHp(); + } + else{ + event.finish(); + } + "step 2" + player.draw(2); + }, + ai:{ + threaten:1.5 + } + }, + fengliang:{ + skillAnimation:true, + unique:true, + audio:2, + derivation:'tiaoxin', + trigger:{player:'dying'}, + priority:10, + forced:true, + filter:function(event,player){ + return !player.storage.kunfen; + }, + content:function(){ + "step 0" + player.loseMaxHp(); + "step 1" + if(player.hp<2){ + player.recover(2-player.hp); + } + "step 2" + player.addSkill('tiaoxin'); + player.storage.kunfen=true; + player.awakenSkill('fengliang'); + }, + }, + zhuiji:{ + mod:{ + globalFrom:function(from,to){ + if(from.hp>to.hp) return -Infinity; + } + } + }, + cihuai:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h','sha')==0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('cihuai'),function(card,player,target){ + return player.canUse({name:'sha'},target); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }); + "step 1" + if(result.bool){ + player.logSkill('cihuai'); + player.showHandcards(); + player.useCard({name:'sha'},result.targets); + } + }, + ai:{ + expose:0.2, + } + }, + jilei:{ + trigger:{player:'damageEnd'}, + priority:9, + audio:2, + direct:true, + filter:function(event){ + return event&&event.source; + }, + content:function(){ + 'step 0' + player.chooseControl('basic','trick','equip','cancel2',function(){ + var source=_status.event.source; + if(get.attitude(_status.event.player,source)>0) return 'cancel2'; + if(_status.currentPhase!=source) return 'trick'; + if(lib.filter.cardUsable({name:'sha'},source)&&source.countCards('h')>=2) return 'basic'; + return 'trick'; + }).set('prompt',get.prompt('jilei',trigger.source)).set('source',trigger.source); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('jilei',trigger.source); + player.popup(get.translation(result.control)+'牌'); + trigger.source.storage.jilei2=result.control; + trigger.source.addTempSkill('jilei2','phaseAfter'); + } + }, + ai:{ + threaten:0.7 + } + }, + jilei2:{ + unique:true, + intro:{ + content:function(storage){ + return '不能使用、打出或弃置'+get.translation(storage)+'牌'; + } + }, + mark:true, + onremove:true, + mod:{ + cardDiscardable:function(card,player){ + if(player.storage.jilei2==get.type(card,'trick')) return false; + }, + cardEnabled:function(card,player){ + if(player.storage.jilei2==get.type(card,'trick')) return false; + }, + cardUsable:function(card,player){ + if(player.storage.jilei2==get.type(card,'trick')) return false; + }, + cardRespondable:function(card,player){ + if(player.storage.jilei2==get.type(card,'trick')) return false; + }, + cardSavable:function(card,player){ + if(player.storage.jilei2==get.type(card,'trick')) return false; + }, + }, + }, + danlao:{ + priority:9, + audio:2, + filter:function(event,player){ + return event.player!=player&&get.type(event.card)=='trick'&&event.targets&&event.targets.length>1; + }, + check:function(event,player){ + return get.tag(event.card,'multineg')||get.effect(player,event.card,event.player,player)<=0; + }, + trigger:{target:'useCardToBefore'}, + content:function(){ + trigger.untrigger(); + trigger.finish(); + player.draw(); + }, + ai:{ + effect:{ + target:function(card){ + if(get.type(card)!='trick') return; + if(card.name=='tiesuo') return [0,0]; + if(card.name=='yihuajiemu') return [0,1]; + if(get.tag(card,'multineg')) return [0,2]; + } + } + } + }, + taichen:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player.canUse('sha',target); + }, + content:function(){ + "step 0" + player.loseHp(); + "step 1" + player.useCard({name:'sha'},target,false); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(player.hp>2&&player.hp>target.hp&&target.countCards('he')<4){ + return get.effect(target,{name:'sha'},player,target); + } + return 0; + } + } + } + }, + manjuan:{ + audio:true, + trigger:{global:'discardAfter'}, + filter:function(event,player){ + if(event.player==player) return false; + if(!player.countCards('he')) return false; + for(var i=0;imaxval){ + maxval=tempval; + } + } + maxval+=cards.length-1; + var next=player.chooseToDiscard('he',{suit:suits}); + next.set('ai',function(card){ + return _status.event.maxval-get.value(card); + }); + next.set('maxval',maxval); + next.set('dialog',[get.prompt(event.name),'hidden',cards]) + next.logSkill=event.name; + event.cards=cards; + } + "step 2" + if(result.bool){ + player.gain(event.cards,'gain2','log'); + } + }, + ai:{ + threaten:1.3 + } + }, + zuixiang:{ + skillAnimation:true, + audio:true, + unique:true, + mark:true, + trigger:{player:'phaseBegin'}, + priority:10, + filter:function(event,player){ + if(player.storage.zuixiang) return false; + return true; + }, + check:function(event,player){ + return player.countCards('h')0; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('协穆:是否弃置一张杀并摸两张牌?',{name:'sha'}); + next.set('ai',function(card){ + return 9-get.value(card); + }); + next.logSkill='xiemu'; + "step 1" + if(result.bool){ + player.draw(2); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.color(card)=='black'&&target.countCards('h')>0){ + return [1,0.5]; + } + } + } + } + }, + spmengjin:{ + trigger:{player:'shaBegin'}, + filter:function(event,player){ + return event.target.countCards('he')>0; + }, + direct:true, + content:function(){ + "step 0" + var att=get.attitude(player,trigger.target); + player.choosePlayerCard(get.prompt('spmengjin',trigger.target),'he',trigger.target).ai=function(button){ + var val=get.buttonValue(button); + if(att>0) return -val; + return val; + }; + "step 1" + if(result.bool){ + trigger.target.discard(result.links); + player.logSkill('spmengjin',trigger.target); + trigger.target.addTempSkill('mengjin2','shaAfter'); + } + }, + ai:{ + expose:0.2 + } + }, + fenxun_old:{ + audio:2, + trigger:{player:'shaBefore'}, + direct:true, + filter:function(event,player){ + return event.targets.length==1; + }, + position:'he', + content:function(){ + "step 0" + player.chooseCardTarget({ + filterCard:lib.filter.cardDiscardable, + filterTarget:function(card,player,target){ + var trigger=_status.event.getTrigger(); + return lib.filter.targetEnabled(trigger.card,player,target)&&target!=trigger.targets[0]; + }, + ai1:function(card){ + return 6-get.value(card); + }, + ai2:function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }, + prompt:get.prompt('fenxun') + }); + "step 1" + if(result.bool){ + player.discard(result.cards); + trigger.targets.push(result.targets[0]); + player.logSkill('fenxun',result.targets); + } + } + }, + zhoufu:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:true, + filterTarget:function(card,player,target){ + return player!=target&&!target.hasSkill('zhoufu2'); + }, + prepare:'throw', + discard:false, + content:function(){ + target.$gain2(cards); + target.storage.zhoufu2=cards[0]; + target.addSkill('zhoufu2'); + target.storage.zhoufu3=player; + ui.special.appendChild(cards[0]); + target.syncStorage('zhoufu2'); + }, + check:function(card){ + return 3-get.value(card) + }, + ai:{ + expose:0.1, + order:1, + result:{ + player:1 + } + } + }, + zhoufu2:{ + trigger:{player:'judge'}, + forced:true, + priority:10, + mark:'card', + content:function(){ + "step 0" + player.$throw(player.storage.zhoufu2); + game.broadcastAll(function(card){ + if(card.clone){ + card.clone.classList.add('thrownhighlight'); + } + },player.storage.zhoufu2); + if(player.judging[0].clone){ + player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([player.judging[0].clone])); + } + player.judging[0]=player.storage.zhoufu2; + trigger.position.appendChild(player.storage.zhoufu2); + game.log(player,'的判定牌改为',player.storage.zhoufu2); + game.delay(2); + "step 1" + if(player.storage.zhoufu3.isAlive()&&player.storage.zhoufu3.hasSkill('yingbin')){ + player.storage.zhoufu3.logSkill('yingbin'); + player.storage.zhoufu3.draw(2); + } + player.removeSkill('zhoufu2'); + delete player.storage.zhoufu2; + delete player.storage.zhoufu3; + }, + intro:{ + content:'card' + }, + group:'zhoufu3' + }, + zhoufu3:{ + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + if(player.storage.zhoufu2){ + player.unmark(player.storage.zhoufu2.name); + if(player.storage.zhoufu3.isAlive()){ + player.storage.zhoufu3.gain(player.storage.zhoufu2); + player.$give(player.storage.zhoufu2,player.storage.zhoufu3); + game.delay(); + } + else{ + ui.discardPile.appendChild(player.storage.zhoufu2); + } + } + player.removeSkill('zhoufu2'); + delete player.storage.zhoufu2; + delete player.storage.zhoufu3; + }, + }, + yingbin:{ + audio:2, + }, + kuiwei:{ + audio:2, + trigger:{player:'phaseEnd'}, + check:function(event,player){ + if(player.isTurnedOver()) return true; + var num=game.countPlayer(function(current){ + return current.getEquip(1); + }); + return num>1; + }, + content:function(){ + "step 0" + player.turnOver(); + "step 1" + var num=game.countPlayer(function(current){ + return current.getEquip(1); + }); + player.draw(2+num); + player.addSkill('kuiwei2'); + }, + ai:{ + effect:{ + target:function(card){ + if(card.name=='guiyoujie') return [0,2]; + } + } + } + }, + kuiwei2:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + audio:false, + content:function(){ + var num=game.countPlayer(function(current){ + return current.getEquip(1); + }); + if(num>=player.countCards('he')){ + player.discard(player.getCards('he')); + } + else if(num){ + player.chooseToDiscard('he',num,true); + } + player.removeSkill('kuiwei2'); + } + }, + yanzheng:{ + enable:'chooseToUse', + audio:2, + filter:function(event,player){ + return player.hp0; + }, + viewAsFilter:function(player){ + return player.hp0; + }, + filterCard:true, + position:'e', + viewAs:{name:'wuxie'}, + prompt:'将一张装备区内的牌当无懈可击使用', + check:function(card){return 8-get.equipValue(card)}, + threaten:1.2 + }, + tongji:{ + global:'tongji_disable', + unique:true, + gainnable:true, + subSkill:{ + disable:{ + mod:{ + targetEnabled:function(card,player,target){ + if(player.hasSkill('tongji')) return; + if(card.name=='sha'){ + if(target.hasSkill('tongji')) return; + if(game.hasPlayer(function(current){ + return current.hasSkill('tongji')&¤t.hp=0; + }, + content:function(){ + "step 0" + player.draw(); + if(trigger.target!=player){ + player.chooseCard(true,'he','交给'+get.translation(trigger.target)+'一张牌').set('ai',function(card){ + if(get.position(card)=='e') return -1; + if(card.name=='shan') return 1; + if(get.type(card)=='equip') return 0.5; + return 0; + }); + } + else{ + event.finish(); + } + "step 1" + trigger.target.gain(result.cards,player); + player.$give(result.cards,trigger.target); + game.delay(); + event.card=result.cards[0]; + if(get.type(event.card)!='equip') event.finish(); + "step 2" + if(!trigger.target.isMin()){ + trigger.target.chooseBool('是否装备'+get.translation(event.card)+'?').set('ai',function(){ + var current=_status.event.player.getCards('e',{subtype:get.subtype(_status.event.card)}); + if(current&¤t.length){ + return get.equipValue(event.card)>get.equipValue(current[0]); + } + return true; + }).set('card',event.card); + } + else{ + event.finish(); + } + "step 3" + if(result.bool){ + trigger.target.equip(event.card); + } + }, + ai:{ + threaten:1.1 + } + }, + liangzhu:{ + audio:2, + trigger:{global:'recoverAfter'}, + direct:true, + filter:function(event,player){ + return _status.currentPhase==event.player; + }, + content:function(){ + 'step 0' + if(player==trigger.player){ + player.chooseControl('摸一张','摸两张','cancel2',function(){ + return '摸两张'; + }).set('prompt',get.prompt('liangzhu')); + event.single=true; + } + else{ + player.chooseTarget(get.prompt('liangzhu'),function(card,player,target){ + return target==_status.event.player||target==_status.event.target; + }).set('target',trigger.player).set('ai',function(target){ + var player=_status.event.player; + if(player==target) return 1; + return get.attitude(player,target)-1.5; + }); + } + 'step 1' + if(event.single){ + if(result.control!='cancel2'){ + player.logSkill('liangzhu',player); + if(result.control=='摸一张'){ + player.draw(); + } + else{ + player.draw(2); + player.storage.liangzhu=player; + } + } + } + else if(result.bool){ + var target=result.targets[0]; + player.logSkill('liangzhu',target); + if(target==player){ + target.draw(); + } + else{ + target.draw(2); + if(target.storage.liangzhu){ + target.storage.liangzhu.add(player); + } + else{ + target.storage.liangzhu=[player]; + } + } + } + }, + ai:{ + expose:0.1 + } + }, + fanxiang:{ + skillAnimation:true, + animationColor:'fire', + audio:2, + unique:true, + forceunique:true, + derivation:'xiaoji', + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + if(player.storage.fanxiang) return false; + return game.hasPlayer(function(current){ + return current.storage.liangzhu&¤t.storage.liangzhu.contains(player)&¤t.isDamaged(); + }); + }, + forced:true, + content:function(){ + player.storage.fanxiang=true; + player.gainMaxHp(); + player.recover(); + player.removeSkill('liangzhu'); + player.addSkill('xiaoji'); + player.awakenSkill('fanxiang'); + }, + }, + mingshi:{ + audio:2, + trigger:{player:'damageBegin'}, + direct:true, + filter:function(event,player){ + return event.source&&event.source.hp>player.hp; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('mingshi'),{color:'black'}); + next.set('ai',function(card){ + return 9-get.value(card); + }); + next.set('logSkill','mingshi'); + "step 1" + if(result.bool){ + trigger.num--; + } + }, + ai:{ + threaten:0.8 + } + }, + lirang:{ + audio:2, + trigger:{player:'discardAfter'}, + filter:function(event,player){ + for(var i=0;i1; + }); + } + player.chooseCardButton(get.prompt('lirang'),event.cards,[1,event.cards.length]).set('ai',function(button){ + if(!_status.event.goon||ui.selected.buttons.length) return 0; + if(button.link.name=='du') return 2; + return 1; + }).set('goon',goon); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + event.togive=result.links.slice(0); + player.chooseTarget('将'+get.translation(result.links)+'交给一名角色',true,function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.enemy){ + return -att; + } + else{ + if(att>2) return att/Math.sqrt(1+target.countCards('h')); + return att/Math.sqrt(1+target.countCards('h'))/5; + } + }).set('enemy',get.value(event.togive[0])<0); + } + else{ + for(var i=0;i0; + }, + content:function(){ + trigger.target.discardPlayerCard(player,true); + } + }, + shenxian:{ + audio:2, + trigger:{global:'discardAfter'}, + filter:function(event,player){ + if(event.player==player||_status.currentPhase==player) return false; + if(player.hasSkill('shenxian2')) return false; + for(var i=0;iplayer.storage.qiangwu) return Infinity; + } + }, + group:['qiangwu2','qiangwu3'] + }, + qiangwu2:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + delete player.storage.qiangwu; + } + }, + qiangwu3:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + if(_status.currentPhase==player&&event.card.name=='sha'&& + event.card.number>player.storage.qiangwu) return true; + return false; + }, + forced:true, + popup:false, + content:function(){ + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; + } + }, + }, + zhendu:{ + audio:2, + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return event.player!=player&&player.countCards('h')>0; + }, + direct:true, + content:function(){ + "step 0" + var nono=(Math.abs(get.attitude(player,trigger.player))<3); + if(get.damageEffect(trigger.player,player,player)<=0){ + nono=true + } + else if(trigger.player.hp>2){ + nono=true; + } + else if(trigger.player.hp>1&&player.countCards('h')<3){ + nono=true; + } + else if(trigger.player.canUse('sha',player)&&!player.countCards('h','shan')&&trigger.player.countCards('h')>=3){ + nono=true; + } + var next=player.chooseToDiscard(get.prompt('zhendu',trigger.player)); + next.set('ai',function(card){ + if(_status.event.nono) return -1; + return 7-get.useful(card); + }); + next.set('logSkill',['zhendu',trigger.player]); + next.set('nono',nono); + "step 1" + if(result.bool){ + trigger.player.damage(); + } + else{ + event.finish(); + } + "step 2" + trigger.player.useCard({name:'jiu'},trigger.player); + }, + ai:{ + threaten:2, + expose:0.3 + } + }, + qiluan:{ + trigger:{source:'dieAfter'}, + forced:true, + priority:-10, + silent:true, + popup:false, + filter:function(event){ + return _status.currentPhase!=event.player; + }, + content:function(){ + if(!player.storage.qiluan){ + player.storage.qiluan=1; + } + else{ + player.storage.qiluan++; + } + }, + group:['qiluan2','qiluan3'] + }, + qiluan2:{ + audio:2, + trigger:{global:'phaseAfter'}, + forced:true, + filter:function(event,player){ + return player.storage.qiluan?true:false; + }, + content:function(){ + if(get.mode()=='guozhan'){ + player.draw(3); + } + else{ + player.draw(3*player.storage.qiluan); + } + player.storage.qiluan=0; + } + }, + qiluan3:{ + trigger:{source:'dieAfter'}, + forced:true, + priority:-10, + filter:function(event){ + return _status.currentPhase==event.player; + }, + content:function(){ + var num=3; + if(player.storage.qiluan){ + num+=3*player.storage.qiluan; + player.storage.qiluan=0; + } + player.draw(num); + }, + }, + shangyi:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + content:function(){ + "step 0" + player.chooseCardButton(target,target.getCards('h')).set('filterButton',function(button){ + return get.color(button.link)=='black'; + }); + "step 1" + if(result.bool){ + target.discard(result.links[0]); + } + }, + ai:{ + order:11, + result:{ + target:function(player,target){ + return -target.countCards('h'); + } + }, + threaten:1.1 + }, + }, + shengxi:{ + trigger:{player:'phaseDiscardBegin'}, + frequent:true, + filter:function(event,player){ + return !player.getStat('damage'); + }, + content:function(){ + player.draw(2); + }, + audio:2, + audioname:['liushan'] + }, + shoucheng:{ + trigger:{global:'loseEnd'}, + audio:2, + check:function(event,player){ + return get.attitude(player,event.player)>0; + }, + filter:function(event,player){ + if(event.player.countCards('h')) return false; + if(_status.currentPhase==event.player) return false; + for(var i=0;i0){ + return true; + } + }); + return num>=2; + }, + content:function(){ + "step 0" + var targets=game.filterPlayer(); + targets.remove(player); + targets.sort(lib.sort.seat); + event.targets=targets; + event.num=0; + trigger.untrigger(); + trigger.finish(); + player.line(targets,'green'); + "step 1" + if(num
【勇决】
每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之,每回合限一次
'); + "step 1" + player.turnOver(); + }, + intro:{ + content:'limited' + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + if(target.isMin()) return 0; + if(player.hp>1){ + if(game.phaseNumber2) return 0; + if(get.attitude(player,target)<5) return 0; + } + if(get.attitude(player,target)<5) return 0; + if(target.hp==1&&target.maxHp>2) return 0.2; + if(target==game.me) return 1.2; + return 1; + } + }, + expose:0.5, + threaten:1.5 + } + }, + fenming:{ + audio:2, + trigger:{player:'phaseEnd'}, + check:function(event,player){ + var num=game.countPlayer(function(current){ + if(current.isLinked()&¤t.countCards('he')){ + return get.attitude(player,current); + } + }); + return num<0; + }, + filter:function(event,player){ + return player.isLinked(); + }, + content:function(){ + "step 0" + event.targets=game.filterPlayer(function(current){ + if(current.isLinked()&¤t.countCards('he')){ + return true; + } + }); + event.num=0; + event.targets.sort(lib.sort.seat); + "step 1" + if(event.num=0); + trigger.player.chooseToDiscard('he',{type:'equip'}).set('ai',function(card){ + if(_status.event.nono){ + return 0; + } + if(_status.event.player.hp==1) return 10-get.value(card); + return 9-get.value(card); + }).set('nono',nono); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.draw(); + } + else{ + trigger.player.damage(); + } + }, + ai:{ + expose:0.3, + threaten:1.3 + } + }, + suishi:{ + trigger:{global:'dying'}, + forced:true, + popup:false, + priority:6.5, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source!=event.player; + }, + content:function(){ + 'step 0' + var str; + if(trigger.parent.source==player){ + str='随势:是否摸一张牌?'; + } + else{ + str='随势:是否令'+get.translation(player)+'摸一张牌?' + } + trigger.parent.source.chooseBool(str).set('ai',function(){ + return get.attitude(_status.event.player,_status.event.target)>0; + }).set('target',player); + 'step 1' + if(result.bool){ + player.logSkill('suishi'); + trigger.parent.source.line(player,'green'); + player.draw(); + } + }, + group:'suishi2' + }, + suishi2:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.player!=player&&event.source&&event.source!=player&&event.source!=event.player; + }, + content:function(){ + 'step 0' + var str; + if(trigger.source==player){ + str='随势:是否流失一点体力?'; + } + else{ + str='随势:是否令'+get.translation(player)+'流失一点体力?' + } + trigger.source.chooseBool(str).set('ai',function(){ + return get.attitude(_status.event.player,_status.event.target)<0; + }).set('target',player); + 'step 1' + if(result.bool){ + player.logSkill('suishi'); + trigger.source.line(player,'green'); + player.loseHp(); + } + }, + }, + sijian:{ + trigger:{player:'loseEnd'}, + direct:true, + audio:2, + filter:function(event,player){ + if(player.countCards('h')) return false; + for(var i=0;i0; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool){ + player.logSkill('sijian',result.targets); + event.target=result.targets[0]; + player.discardPlayerCard(event.target,true); + } + else{ + event.finish(); + } + }, + ai:{ + expose:0.2, + } + }, + quji:{ + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + selectCard:function(){ + var player=_status.event.player; + var num=game.countPlayer(function(current){ + return current.isDamaged(); + }); + return [1,Math.min(num,player.maxHp-player.hp)]; + }, + filterTarget:function(card,player,target){ + return target.hp=game.countPlayer(function(current){ + return get.attitude(player,current)>0&¤t.isDamaged(); + })){ + return -1; + } + if(get.color(card)=='black') return -1; + return 9-get.value(card); + }, + content:function(){ + "step 0" + target.recover(); + "step 1" + if(target==player){ + for(var i=0;i1) return false; + return game.hasPlayer(function(current){ + return current.hasSkill('junbing'); + }); + }, + check:function(event,player){ + var target=game.findPlayer(function(current){ + return current.hasSkill('junbing'); + }); + if(target){ + var num=target.countCards('h'); + var att=get.attitude(player,target); + if(num==0) return true; + if(num==1) return att>-1; + if(num==2) return att>0; + return att>1; + } + return false; + }, + content:function(){ + "step 0" + player.draw(); + if(player.hasSkill('junbing')){ + event.finish(); + } + else{ + event.target=game.findPlayer(function(current){ + return current.hasSkill('junbing'); + }); + } + "step 1" + var cards=player.getCards('h'); + target.gain(cards,player); + event.num=cards.length; + player.$give(event.num,target); + game.delay(); + "step 2" + target.chooseCard('选择还给'+get.translation(player)+'的牌',true,event.num); + game.delay(0.2); + "step 3" + player.gain(result.cards,target); + target.$give(result.cards.length,player); + game.delay(); + } + }, + junbing:{ + global:'junbing2', + unique:true, + forceunique:true + }, + xiongyi:{ + skillAnimation:true, + unique:true, + enable:'phaseUse', + audio:2, + mark:true, + filter:function(event,player){ + return !player.storage.xiongyi; + }, + init:function(player){ + player.storage.xiongyi=false; + }, + filterTarget:function(card,player,target){ + if(get.mode()=='guozhan'){ + if(player==target) return true; + if(player.identity=='ye') return false; + if(player.identity=='unknown'){ + if(_status.yeidentity.contains(player._group)){ + return false; + } + else if(get.zhu(player)||get.population(player._group)+1<=get.population()/2){ + return player._group==target.identity; + } + else{ + return false; + } + } + return player.identity==target.identity; + } + else{ + return true; + } + }, + multitarget:true, + multiline:true, + selectTarget:function(){ + if(get.mode()=='guozhan') return -1; + return [1,3]; + }, + content:function(){ + "step 0" + player.storage.xiongyi=true; + player.awakenSkill('xiongyi'); + game.asyncDraw(targets,3); + "step 1" + if(player.isDamaged()){ + if(get.mode()=='guozhan'){ + if(player.isMinor()){ + player.recover(); + } + } + else if(targets.length<=2){ + player.recover(); + } + } + }, + intro:{ + content:'limited' + }, + ai:{ + order:1, + result:{ + target:function(player){ + var num=player.countCards('h'); + if(player.hp==1) return 1; + if(player.hp==2&&num<=2) return 1; + if(player.hp==3&&num<=1) return 1; + if(game.phaseNumber2) return false; + var cards=player.getCards('h'); + if(cards.length3) return false; + for(var i=0;i7||get.tag(cards[i],'recover')>=1) return false; + } + return true; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + var cards=player.getCards('h'); + event.bool=cards.length>=player.hp; + player.discard(cards); + "step 1" + if(event.bool){ + player.recover(); + } + } + }, + wuji:{ + skillAnimation:true, + audio:2, + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player.getStat('damage')>=3&&!player.storage.wuji; + }, + content:function(){ + "step 0" + player.removeSkill('huxiao'); + player.gainMaxHp(); + "step 1" + player.recover(); + player.awakenSkill('wuji'); + player.storage.wuji=true; - var card=get.cardPile('qinglong','field'); - if(card){ - player.gain(card,'gain2','log'); - } - } - }, - xueji_old:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.hp0; - }, - filterTarget:function(card,player,target){ - return player!=target&&get.distance(player,target,'attack')<=1; - }, - selectTarget:function(){ - return [1,_status.event.player.maxHp-_status.event.player.hp]; - }, - position:'he', - filterCard:function(card){ - return get.color(card)=='red'; - }, - check:function(card){ - return 8-get.useful(card); - }, - content:function(){ - "step 0" - target.damage(); - "step 1" - target.draw(); - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - return get.damageEffect(target,player); - } - }, - threaten:function(player,target){ - if(target.hp==1) return 2; - if(target.hp==2) return 1.5; - return 0.5; - }, - maixie:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(target.hp==target.maxHp&&target.hasFriend()) return [0,1]; - } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - xueji:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0; - }, - filterTarget:true, - selectTarget:function(){ - var player=_status.event.player - return [1,Math.max(1,player.maxHp-player.hp)]; - }, - position:'he', - filterCard:{color:'red'}, - check:function(card){ - return 8-get.value(card); - }, - multitarget:true, - multiline:true, - line:'fire', - content:function(){ - 'step 0' - event.delay=false; - for(var i=0;i1; - })>=2); - } - if(get.is.versus()){ - event.versus=true; - player.chooseBool(get.prompt('hongyuan')); - } - else{ - player.chooseTarget(get.prompt('hongyuan'),[1,2],function(card,player,target){ - return player!=target; - },function(target){ - if(!_status.event.check) return 0; - return get.attitude(_status.event.player,target); - }).set('check',check); - } - "step 1" - if(result.bool){ - var targets; - if(event.versus){ - targets=game.filterPlayer(function(current){ - return current!=player&¤t.side==player.side; - }); - } - else{ - targets=result.targets; - } - player.logSkill('hongyuan',targets); - game.asyncDraw(targets); - trigger.num--; - } - }, - }, - huanshi:{ - audio:2, - trigger:{global:'judge'}, - filter:function(event,player){ - return player.countCards('he')>0; - }, - logTarget:'player', - check:function(event,player){ - if(get.attitude(player,event.player)<=0) return false; - var cards=player.getCards('he'); - var judge=event.judge(event.player.judging[0]); - for(var i=0;ijudge) return true; - } - return false; - }, - content:function(){ - "step 0" - var target=trigger.player; - player.line(target,'green'); - var judge=trigger.judge(target.judging[0]); - var attitude=get.attitude(target,player); - target.choosePlayerCard('请选择代替判定的牌','he','visible',true,player).set('ai',function(button){ - var card=button.link; - var judge=_status.event.judge; - var attitude=_status.event.attitude; - var result=trigger.judge(card)-judge; - var player=_status.event.player; - if(result>0){ - return 20+result; - } - if(result==0){ - if(_status.currentPhase==player) return 0; - if(attitude>=0){ - return get.color(card)=='red'?7:0-get.value(card); - } - else{ - return get.color(card)=='black'?10:0+get.value(card); - } - } - if(attitude>=0){ - return get.color(card)=='red'?0:-10+result; - } - else{ - return get.color(card)=='black'?0:-10+result; - } - }).set('judge',judge).set('attitude',attitude); - "step 1" - if(result.bool){ - event.card=result.links[0]; - player.respond(event.card,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - ui.discardPile.appendChild(trigger.player.judging[0]); - trigger.player.judging[0]=event.card; - if(!get.owner(event.card,'judge')){ - trigger.position.appendChild(event.card); - } - game.log(trigger.player,'的判定牌改为',event.card); - game.delay(2); - } - }, - ai:{ - tag:{ - rejudge:1, - } - } - }, - mingzhe:{ - audio:2, - trigger:{player:['useCardAfter','respondAfter','discardAfter']}, - frequent:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - if(event.cards){ - for(var i=0;i1){ - event.finish(); - } - "step 1" - player.addSkill('duwu2'); - player.loseHp(); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - return get.damageEffect(target,player); - } - }, - threaten:1.5, - expose:0.3 - } - }, - duwu2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - audio:false, - content:function(){ - player.removeSkill('duwu2'); - } - }, - yicong:{ - mod:{ - globalFrom:function(from,to,current){ - if(from.hp>2) return current-1; - }, - globalTo:function(from,to,current){ - if(to.hp<=2) return current+1; - }, - }, - ai:{ - threaten:0.8 - } - }, - yongsi:{ - group:['yongsi1','yongsi2'], - ai:{ - threaten:2.2 - } - }, - yongsi1:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - forced:true, - content:function(){ - var list=['wei','shu','wu','qun']; - var num=game.countPlayer(function(current){ - if(list.contains(current.group)){ - list.remove(current.group); - return true; - } - }); - trigger.num+=num; - } - }, - yongsi2:{ - audio:2, - trigger:{player:'phaseDiscardBegin'}, - forced:true, - content:function(){ - var list=['wei','shu','wu','qun']; - var num=game.countPlayer(function(current){ - if(list.contains(current.group)){ - list.remove(current.group); - return true; - } - }); - player.chooseToDiscard(num,'he',true); - } - }, - bifa:{ - trigger:{player:'phaseEnd'}, - direct:true, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - var players=game.filterPlayer(); - for(var i=0;itarget.hp){ - target.chooseToDiscard(2,'he',true); - } - else{ - target.draw(2); - } - target.storage.songci=true; - target.markSkill('songci'); - }, - intro:{ - content:'已发动' - }, - ai:{ - order:7, - threaten:1.5, - expose:0.2, - result:{ - target:function(player,target){ - if(target.countCards('h')target.hp){ - if(target.countCards('h')<=3) return -1; - } - } - } - } - }, - baobian:{ - trigger:{player:['phaseBefore','changeHp']}, - forced:true, - popup:false, - unique:true, - derivation:['tiaoxin','paoxiao','xinshensu'], - content:function(){ - player.removeAdditionalSkill('baobian'); - var list=[]; - if(player.hp<=3){ - list.push('tiaoxin'); - } - if(player.hp<=2){ - list.push('paoxiao'); - } - if(player.hp<=1){ - list.push('xinshensu'); - } - if(list.length){ - player.addAdditionalSkill('baobian',list); - } - }, - ai:{ - maixie:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(!target.hasFriend()) return; - if(target.hp>=4) return [0,1]; - } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - chongzhen:{ - group:['chongzhen1','chongzhen2'], - ai:{ - mingzhi:false, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')||get.tag(card,'respondSha')){ - if(get.attitude(target,player)<=0){ - if(current>0) return; - if(target.countCards('h')==0) return 1.6; - if(target.countCards('h')==1) return 1.2; - if(target.countCards('h')==2) return [0.8,0.2,0,-0.2]; - return [0.4,0.7,0,-0.7]; - } - } - }, - }, - } - }, - chongzhen1:{ - audio:2, - trigger:{player:'shaBefore'}, - filter:function(event,player){ - if(event.skill!='longdan_sha'&&event.skill!='fanghun_sha') return false; - return event.target.countCards('h')>0; - }, - logTarget:'target', - content:function(){ - var card=trigger.target.getCards('h').randomGet(); - player.gain(card,trigger.target); - trigger.target.$giveAuto(card,player); - game.delay(); - } - }, - chongzhen2:{ - audio:2, - trigger:{player:'respond'}, - filter:function(event,player){ - if(event.skill!='longdan_shan'&&event.skill!='longdan_sha'&& - event.skill!='fanghun_shan'&&event.skill!='fanghun_sha') return false; - return event.source&&event.source.countCards('h')>0; - }, - logTarget:'source', - content:function(){ - var card=trigger.source.getCards('h').randomGet(); - player.gain(card,trigger.source); - trigger.source.$giveAuto(card,player); - game.delay(); - } - }, - lihun:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.sex=='male'; - }, - filterCard:true, - position:'he', - content:function(){ - player.gain(target.getCards('h'),target); - target.$give(target.countCards('h'),player); - player.turnOver(); - player.addSkill('lihun2'); - player.storage.lihun=target; - }, - check:function(card){return 8-get.value(card)}, - ai:{ - order:10, - result:{ - player:function(player){ - if(player.classList.contains('turnedover')) return 10; - return 0; - }, - target:function(player,target){ - if(target.countCards('h')>target.hp) return target.hp-target.countCards('h'); - return 0; - } - }, - threaten:1.5, - effect:{ - target:function(card){ - if(card.name=='guiyoujie') return [0,2]; - } - } - }, - }, - lihun2:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - popup:false, - audio:false, - content:function(){ - "step 0" - player.removeSkill('lihun2'); - if(player.storage.lihun.classList.contains('dead')){ - event.finish(); - } - else{ - player.chooseCard('he',true,player.storage.lihun.hp); - } - "step 1" - player.storage.lihun.gain(result.cards,player); - player.$give(result.cards.length,player.storage.lihun); - } - }, - yuanhu:{ - audio:3, - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - filterCard:function(card){ - return get.type(card)=='equip'; - }, - position:'he', - filterTarget:function(card,player,target){ - return !target.getEquip(card); - }, - ai1:function(card){ - return 6-get.value(card); - }, - ai2:function(target){ - return get.attitude(_status.event.player,target)-3; - }, - prompt:get.prompt('yuanhu') - }); - "step 1" - if(result.bool){ - player.logSkill('yuanhu',result.targets); - var thisTarget=result.targets[0]; - var thisCard=result.cards[0]; - thisTarget.equip(thisCard); - event.target=thisTarget; - if(thisTarget!=player){ - player.$give(thisCard,thisTarget); - } - switch(get.subtype(thisCard)){ - case 'equip1':{ - if(!game.hasPlayer(function(current){ - return get.distance(thisTarget,current)<=1; - })){ - event.finish(); - return; - } - game.delay(); - player.chooseTarget(true,function(card,player,target){ - return get.distance(_status.event.thisTarget,target)<=1&&target.countCards('hej'); - }).set('ai',function(target){ - var attitude=get.attitude(_status.event.player,target); - if(attitude>0&&target.countCards('j')){ - return attitude*1.5; - } - return -attitude; - }).set('thisTarget',thisTarget); - return; - } - case 'equip2':{ - thisTarget.draw();event.finish(); - return; - } - default:{ - thisTarget.recover(); - event.finish(); - return; - } - } - } - else{ - event.finish(); - } - "step 2" - if(result.targets.length){ - player.discardPlayerCard(true,result.targets[0],'hej'); - } - }, - }, - tianming:{ - audio:2, - trigger:{target:'shaBegin'}, - check:function(event,player){ - var cards=player.getCards('h'); - if(cards.length<=2){ - for(var i=0;iplayers[1].hp&&players[0]!=player){ - players[0].chooseBool(get.prompt('tianming')); - event.player=players[0]; - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - player.chooseToDiscard(2,true,'he'); - player.draw(2); - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha') return [1,0.5]; - } - } - } - }, - mizhao:{ - enable:'phaseUse', - usable:1, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - selectCard:-1, - filterTarget:function(card,player,target){ - return player!=target; - }, - discard:false, - prepare:'give2', - ai:{ - order:1, - result:{ - player:0, - target:function(player,target){ - if(player.countCards('h')>1){ - return 1; - } - var players=game.filterPlayer(); - for(var i=0;i0){ - return eff-10; - } - return eff; - }).set('target1',event.target1); - "step 2" - if(result.targets.length){ - event.target2=result.targets[0]; - event.target1.line(event.target2); - event.target1.chooseToCompare(event.target2); - } - else{ - event.finish(); - } - "step 3" - if(result.bool){ - event.target1.useCard({name:'sha'},event.target2); - } - else{ - event.target2.useCard({name:'sha'},event.target1); - } - } - }, - gongao:{ - audio:2, - trigger:{global:'dieAfter'}, - forced:true, - unique:true, - content:function(){ - player.gainMaxHp(); - player.recover(); - }, - ai:{ - threaten:1.5 - } - }, - juyi:{ - skillAnimation:true, - audio:true, - derivation:['benghuai','weizhong'], - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - return player.maxHp>game.players.length&&player.hp0){ - player.draw(num); - } - player.addSkill('benghuai'); - player.addSkill('weizhong'); - player.storage.juyi=true; - player.awakenSkill('juyi'); - } - }, - weizhong:{ - audio:true, - trigger:{player:['gainMaxHpEnd','loseMaxHpEnd']}, - forced:true, - content:function(){ - player.draw(); - } - }, - chixin:{ - group:['chixin1','chixin2'], - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'){ - return num+20; - } - }, - }, - trigger:{player:'shaBefore'}, - forced:true, - popup:false, - check:function(event,player){ - return player.countCards('h','sha')>0; - }, - filter:function(event,player){ - return _status.currentPhase==player; - }, - content:function(){ - var target=trigger.target; - if(target.hasSkill('chixin3')){ - target.storage.chixin++; - } - else{ - target.storage.chixin=1; - target.addTempSkill('chixin3','phaseUseEnd'); - } - } - }, - chixin1:{ - enable:['chooseToRespond','chooseToUse'], - filterCard:{suit:'diamond'}, - position:'he', - viewAs:{name:'sha'}, - prompt:'将一张♦牌当杀使用或打出', - check:function(card){return 5-get.value(card)}, - ai:{ - respondSha:true, - } - }, - chixin2:{ - enable:['chooseToRespond'], - filterCard:{suit:'diamond'}, - viewAs:{name:'shan'}, - position:'he', - prompt:'将一张♦牌当闪打出', - check:function(card){return 5-get.value(card)}, - ai:{ - respondShan:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.8 - } - }, - } - }, - chixin3:{ - mod:{ - targetEnabled:function(card,player,target){ - if(card.name!='sha') return; - if(player==_status.currentPhase&&player.hasSkill('chixin')){ - var num=player.getCardUsable(card,true)-20; - var players=game.filterPlayer(); - for(var i=0;i1; - } - } - } - }, - suiren:{ - trigger:{player:'phaseBegin'}, - skillAnimation:true, - filter:function(event,player){ - return !player.storage.suiren; - }, - intro:{ - content:'limited', - }, - mark:true, - direct:true, - unique:true, - content:function(){ - "step 0" - var check=(player.hp==1||(player.hp==2&&player.countCards('h')<=1)); - player.chooseTarget(get.prompt('suiren')).set('ai',function(target){ - if(!_status.event.check) return 0; - return get.attitude(_status.event.player,target); - }).set('check',check); - "step 1" - if(result.bool){ - player.storage.suiren=true; - player.awakenSkill('suiren'); - player.logSkill('suiren',result.targets); - player.removeSkill('yicong'); - player.gainMaxHp(); - player.recover(); - result.targets[0].draw(3); - } - } - }, - kuangfu:{ - trigger:{source:'damageEnd'}, - direct:true, - audio:2, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.player.countCards('e'); - }, - content:function(){ - "step 0" - var neg=get.attitude(player,trigger.player)<=0; - player.choosePlayerCard('e',trigger.player).set('ai',function(button){ - if(_status.event.neg){ - return get.buttonValue(button); - } - return 0; - }).set('neg',neg); - "step 1" - if(result.bool){ - player.logSkill('kuangfu'); - trigger.player.$give(result.links,player); - game.delay(2); - player.equip(result.links[0]); - } - } - }, - }, - translate:{ - zhangren:'张任', - zoushi:'邹氏', - zangba:'臧霸', - jiling:'纪灵', - gz_sp_dongzhuo:'董卓', - gz_zhangjiao:'张角', - litong:'李通', - mizhu:'糜竺', - buzhi:'步骘', - chenlin:'陈琳', - yuanshu:'袁术', - re_yuanshu:'新袁术', - gongsunzan:'公孙瓒', - sp_diaochan:'sp貂蝉', - yangxiu:'杨修', - sp_zhaoyun:'sp赵云', - jsp_zhaoyun:'界sp赵云', - caohong:'曹洪', - liuxie:'刘协', - xiahouba:'夏侯霸', - zhugejin:'诸葛谨', - zhugeke:'诸葛恪', - guanyinping:'关银屏', - ganfuren:'甘夫人', - sunhao:'孙皓', - chengyu:'程昱', - simalang:'司马朗', - zhangliang:'张梁', - tianfeng:'田丰', - sp_pangtong:'sp庞统', - sp_jiaxu:'sp贾诩', - maliang:'马良', - sp_caoren:'sp曹仁', - yuejin:'乐进', - mifuren:'糜夫人', - sp_dongzhuo:'sp董卓', - chendong:'陈武董袭', - jiangfei:'蒋琬费祎', - jiangqing:'蒋钦', - hetaihou:'何太后', - dingfeng:'丁奉', - zhangxingcai:'张星彩', - caoang:'曹昂', - kongrong:'孔融', - fuwan:'伏完', - sp_pangde:'sp庞德', - sp_sunshangxiang:'孙尚香', - zhugedan:'诸葛诞', - sp_machao:'sp马超', - sp_jiangwei:'sp姜维', - zhangbao:'张宝', - yangxiou:'杨修', - shixie:'士燮', - mayunlu:'马云騄', - zhanglu:'张鲁', - wutugu:'兀突骨', - mateng:'马腾', - sp_caiwenji:'sp蔡文姬', - zhugeguo:'诸葛果', - liuzan:'留赞', - lingcao:'凌操', - sunru:'孙茹', - lingju:'灵雎', - lifeng:'李丰', - jsp_guanyu:'sp关羽', - zhuling:'朱灵', - sunluyu:'孙鲁育', - hanba:'旱魃', - panfeng:'潘凤', - zumao:'祖茂', - daxiaoqiao:'大小乔', - sp_daqiao:'sp大乔', - sp_ganning:'sp甘宁', - sp_zhangfei:'sp张飞', - sp_xiahoudun:'sp夏侯惇', - cuiyan:'崔琰', - wenpin:'文聘', - jsp_huangyueying:'sp黄月英', - sp_lvmeng:'sp吕蒙', - wangji:'王基', - guansuo:'关索', - tadun:'蹋顿', - yanbaihu:'严白虎', - wanglang:'王朗', - sp_liubei:'sp刘备', - caochun:'曹纯', - dongbai:'董白', - zhaoxiang:'赵襄', - heqi:'贺齐', - kanze:'阚泽', - dongyun:'董允', - mazhong:'马忠', - huangfusong:'皇甫嵩', + var card=get.cardPile('qinglong','field'); + if(card){ + player.gain(card,'gain2','log'); + } + } + }, + xueji_old:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.hp0; + }, + filterTarget:function(card,player,target){ + return player!=target&&get.distance(player,target,'attack')<=1; + }, + selectTarget:function(){ + return [1,_status.event.player.maxHp-_status.event.player.hp]; + }, + position:'he', + filterCard:function(card){ + return get.color(card)=='red'; + }, + check:function(card){ + return 8-get.useful(card); + }, + content:function(){ + "step 0" + target.damage(); + "step 1" + target.draw(); + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + return get.damageEffect(target,player); + } + }, + threaten:function(player,target){ + if(target.hp==1) return 2; + if(target.hp==2) return 1.5; + return 0.5; + }, + maixie:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(target.hp==target.maxHp&&target.hasFriend()) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + xueji:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0; + }, + filterTarget:true, + selectTarget:function(){ + var player=_status.event.player + return [1,Math.max(1,player.maxHp-player.hp)]; + }, + position:'he', + filterCard:{color:'red'}, + check:function(card){ + return 8-get.value(card); + }, + multitarget:true, + multiline:true, + line:'fire', + content:function(){ + 'step 0' + event.delay=false; + for(var i=0;i1; + })>=2); + } + if(get.is.versus()){ + event.versus=true; + player.chooseBool(get.prompt('hongyuan')); + } + else{ + player.chooseTarget(get.prompt('hongyuan'),[1,2],function(card,player,target){ + return player!=target; + },function(target){ + if(!_status.event.check) return 0; + return get.attitude(_status.event.player,target); + }).set('check',check); + } + "step 1" + if(result.bool){ + var targets; + if(event.versus){ + targets=game.filterPlayer(function(current){ + return current!=player&¤t.side==player.side; + }); + } + else{ + targets=result.targets; + } + player.logSkill('hongyuan',targets); + game.asyncDraw(targets); + trigger.num--; + } + }, + }, + huanshi:{ + audio:2, + trigger:{global:'judge'}, + filter:function(event,player){ + return player.countCards('he')>0; + }, + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)<=0) return false; + var cards=player.getCards('he'); + var judge=event.judge(event.player.judging[0]); + for(var i=0;ijudge) return true; + } + return false; + }, + content:function(){ + "step 0" + var target=trigger.player; + player.line(target,'green'); + var judge=trigger.judge(target.judging[0]); + var attitude=get.attitude(target,player); + target.choosePlayerCard('请选择代替判定的牌','he','visible',true,player).set('ai',function(button){ + var card=button.link; + var judge=_status.event.judge; + var attitude=_status.event.attitude; + var result=trigger.judge(card)-judge; + var player=_status.event.player; + if(result>0){ + return 20+result; + } + if(result==0){ + if(_status.currentPhase==player) return 0; + if(attitude>=0){ + return get.color(card)=='red'?7:0-get.value(card); + } + else{ + return get.color(card)=='black'?10:0+get.value(card); + } + } + if(attitude>=0){ + return get.color(card)=='red'?0:-10+result; + } + else{ + return get.color(card)=='black'?0:-10+result; + } + }).set('judge',judge).set('attitude',attitude); + "step 1" + if(result.bool){ + event.card=result.links[0]; + player.respond(event.card,'highlight'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + ui.discardPile.appendChild(trigger.player.judging[0]); + trigger.player.judging[0]=event.card; + if(!get.owner(event.card,'judge')){ + trigger.position.appendChild(event.card); + } + game.log(trigger.player,'的判定牌改为',event.card); + game.delay(2); + } + }, + ai:{ + tag:{ + rejudge:1, + } + } + }, + mingzhe:{ + audio:2, + trigger:{player:['useCardAfter','respondAfter','discardAfter']}, + frequent:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(event.cards){ + for(var i=0;i1){ + event.finish(); + } + "step 1" + player.addSkill('duwu2'); + player.loseHp(); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + return get.damageEffect(target,player); + } + }, + threaten:1.5, + expose:0.3 + } + }, + duwu2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + audio:false, + content:function(){ + player.removeSkill('duwu2'); + } + }, + yicong:{ + mod:{ + globalFrom:function(from,to,current){ + if(from.hp>2) return current-1; + }, + globalTo:function(from,to,current){ + if(to.hp<=2) return current+1; + }, + }, + ai:{ + threaten:0.8 + } + }, + yongsi:{ + group:['yongsi1','yongsi2'], + ai:{ + threaten:2.2 + } + }, + yongsi1:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + var list=['wei','shu','wu','qun']; + var num=game.countPlayer(function(current){ + if(list.contains(current.group)){ + list.remove(current.group); + return true; + } + }); + trigger.num+=num; + } + }, + yongsi2:{ + audio:2, + trigger:{player:'phaseDiscardBegin'}, + forced:true, + content:function(){ + var list=['wei','shu','wu','qun']; + var num=game.countPlayer(function(current){ + if(list.contains(current.group)){ + list.remove(current.group); + return true; + } + }); + player.chooseToDiscard(num,'he',true); + } + }, + bifa:{ + trigger:{player:'phaseEnd'}, + direct:true, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + var players=game.filterPlayer(); + for(var i=0;itarget.hp){ + target.chooseToDiscard(2,'he',true); + } + else{ + target.draw(2); + } + target.storage.songci=true; + target.markSkill('songci'); + }, + intro:{ + content:'已发动' + }, + ai:{ + order:7, + threaten:1.5, + expose:0.2, + result:{ + target:function(player,target){ + if(target.countCards('h')target.hp){ + if(target.countCards('h')<=3) return -1; + } + } + } + } + }, + baobian:{ + trigger:{player:['phaseBefore','changeHp']}, + forced:true, + popup:false, + unique:true, + derivation:['tiaoxin','paoxiao','xinshensu'], + content:function(){ + player.removeAdditionalSkill('baobian'); + var list=[]; + if(player.hp<=3){ + list.push('tiaoxin'); + } + if(player.hp<=2){ + list.push('paoxiao'); + } + if(player.hp<=1){ + list.push('xinshensu'); + } + if(list.length){ + player.addAdditionalSkill('baobian',list); + } + }, + ai:{ + maixie:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(!target.hasFriend()) return; + if(target.hp>=4) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + chongzhen:{ + group:['chongzhen1','chongzhen2'], + ai:{ + mingzhi:false, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')||get.tag(card,'respondSha')){ + if(get.attitude(target,player)<=0){ + if(current>0) return; + if(target.countCards('h')==0) return 1.6; + if(target.countCards('h')==1) return 1.2; + if(target.countCards('h')==2) return [0.8,0.2,0,-0.2]; + return [0.4,0.7,0,-0.7]; + } + } + }, + }, + } + }, + chongzhen1:{ + audio:2, + trigger:{player:'shaBefore'}, + filter:function(event,player){ + if(event.skill!='longdan_sha'&&event.skill!='fanghun_sha') return false; + return event.target.countCards('h')>0; + }, + logTarget:'target', + content:function(){ + var card=trigger.target.getCards('h').randomGet(); + player.gain(card,trigger.target); + trigger.target.$giveAuto(card,player); + game.delay(); + } + }, + chongzhen2:{ + audio:2, + trigger:{player:'respond'}, + filter:function(event,player){ + if(event.skill!='longdan_shan'&&event.skill!='longdan_sha'&& + event.skill!='fanghun_shan'&&event.skill!='fanghun_sha') return false; + return event.source&&event.source.countCards('h')>0; + }, + logTarget:'source', + content:function(){ + var card=trigger.source.getCards('h').randomGet(); + player.gain(card,trigger.source); + trigger.source.$giveAuto(card,player); + game.delay(); + } + }, + lihun:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.sex=='male'; + }, + filterCard:true, + position:'he', + content:function(){ + player.gain(target.getCards('h'),target); + target.$give(target.countCards('h'),player); + player.turnOver(); + player.addSkill('lihun2'); + player.storage.lihun=target; + }, + check:function(card){return 8-get.value(card)}, + ai:{ + order:10, + result:{ + player:function(player){ + if(player.classList.contains('turnedover')) return 10; + return 0; + }, + target:function(player,target){ + if(target.countCards('h')>target.hp) return target.hp-target.countCards('h'); + return 0; + } + }, + threaten:1.5, + effect:{ + target:function(card){ + if(card.name=='guiyoujie') return [0,2]; + } + } + }, + }, + lihun2:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + audio:false, + content:function(){ + "step 0" + player.removeSkill('lihun2'); + if(player.storage.lihun.classList.contains('dead')){ + event.finish(); + } + else{ + player.chooseCard('he',true,player.storage.lihun.hp); + } + "step 1" + player.storage.lihun.gain(result.cards,player); + player.$give(result.cards.length,player.storage.lihun); + } + }, + yuanhu:{ + audio:3, + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + filterCard:function(card){ + return get.type(card)=='equip'; + }, + position:'he', + filterTarget:function(card,player,target){ + return !target.getEquip(card); + }, + ai1:function(card){ + return 6-get.value(card); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target)-3; + }, + prompt:get.prompt('yuanhu') + }); + "step 1" + if(result.bool){ + player.logSkill('yuanhu',result.targets); + var thisTarget=result.targets[0]; + var thisCard=result.cards[0]; + thisTarget.equip(thisCard); + event.target=thisTarget; + if(thisTarget!=player){ + player.$give(thisCard,thisTarget); + } + switch(get.subtype(thisCard)){ + case 'equip1':{ + if(!game.hasPlayer(function(current){ + return get.distance(thisTarget,current)<=1; + })){ + event.finish(); + return; + } + game.delay(); + player.chooseTarget(true,function(card,player,target){ + return get.distance(_status.event.thisTarget,target)<=1&&target.countCards('hej'); + }).set('ai',function(target){ + var attitude=get.attitude(_status.event.player,target); + if(attitude>0&&target.countCards('j')){ + return attitude*1.5; + } + return -attitude; + }).set('thisTarget',thisTarget); + return; + } + case 'equip2':{ + thisTarget.draw();event.finish(); + return; + } + default:{ + thisTarget.recover(); + event.finish(); + return; + } + } + } + else{ + event.finish(); + } + "step 2" + if(result.targets.length){ + player.discardPlayerCard(true,result.targets[0],'hej'); + } + }, + }, + tianming:{ + audio:2, + trigger:{target:'shaBegin'}, + check:function(event,player){ + var cards=player.getCards('h'); + if(cards.length<=2){ + for(var i=0;iplayers[1].hp&&players[0]!=player){ + players[0].chooseBool(get.prompt('tianming')); + event.player=players[0]; + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + player.chooseToDiscard(2,true,'he'); + player.draw(2); + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha') return [1,0.5]; + } + } + } + }, + mizhao:{ + enable:'phaseUse', + usable:1, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + selectCard:-1, + filterTarget:function(card,player,target){ + return player!=target; + }, + discard:false, + prepare:'give2', + ai:{ + order:1, + result:{ + player:0, + target:function(player,target){ + if(player.countCards('h')>1){ + return 1; + } + var players=game.filterPlayer(); + for(var i=0;i0){ + return eff-10; + } + return eff; + }).set('target1',event.target1); + "step 2" + if(result.targets.length){ + event.target2=result.targets[0]; + event.target1.line(event.target2); + event.target1.chooseToCompare(event.target2); + } + else{ + event.finish(); + } + "step 3" + if(result.bool){ + event.target1.useCard({name:'sha'},event.target2); + } + else{ + event.target2.useCard({name:'sha'},event.target1); + } + } + }, + gongao:{ + audio:2, + trigger:{global:'dieAfter'}, + forced:true, + unique:true, + content:function(){ + player.gainMaxHp(); + player.recover(); + }, + ai:{ + threaten:1.5 + } + }, + juyi:{ + skillAnimation:true, + audio:true, + derivation:['benghuai','weizhong'], + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + return player.maxHp>game.players.length&&player.hp0){ + player.draw(num); + } + player.addSkill('benghuai'); + player.addSkill('weizhong'); + player.storage.juyi=true; + player.awakenSkill('juyi'); + } + }, + weizhong:{ + audio:true, + trigger:{player:['gainMaxHpEnd','loseMaxHpEnd']}, + forced:true, + content:function(){ + player.draw(); + } + }, + chixin:{ + group:['chixin1','chixin2'], + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'){ + return num+20; + } + }, + }, + trigger:{player:'shaBefore'}, + forced:true, + popup:false, + check:function(event,player){ + return player.countCards('h','sha')>0; + }, + filter:function(event,player){ + return _status.currentPhase==player; + }, + content:function(){ + var target=trigger.target; + if(target.hasSkill('chixin3')){ + target.storage.chixin++; + } + else{ + target.storage.chixin=1; + target.addTempSkill('chixin3','phaseUseEnd'); + } + } + }, + chixin1:{ + enable:['chooseToRespond','chooseToUse'], + filterCard:{suit:'diamond'}, + position:'he', + viewAs:{name:'sha'}, + prompt:'将一张♦牌当杀使用或打出', + check:function(card){return 5-get.value(card)}, + ai:{ + respondSha:true, + } + }, + chixin2:{ + enable:['chooseToRespond'], + filterCard:{suit:'diamond'}, + viewAs:{name:'shan'}, + position:'he', + prompt:'将一张♦牌当闪打出', + check:function(card){return 5-get.value(card)}, + ai:{ + respondShan:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.8 + } + }, + } + }, + chixin3:{ + mod:{ + targetEnabled:function(card,player,target){ + if(card.name!='sha') return; + if(player==_status.currentPhase&&player.hasSkill('chixin')){ + var num=player.getCardUsable(card,true)-20; + var players=game.filterPlayer(); + for(var i=0;i1; + } + } + } + }, + suiren:{ + trigger:{player:'phaseBegin'}, + skillAnimation:true, + filter:function(event,player){ + return !player.storage.suiren; + }, + intro:{ + content:'limited', + }, + mark:true, + direct:true, + unique:true, + content:function(){ + "step 0" + var check=(player.hp==1||(player.hp==2&&player.countCards('h')<=1)); + player.chooseTarget(get.prompt('suiren')).set('ai',function(target){ + if(!_status.event.check) return 0; + return get.attitude(_status.event.player,target); + }).set('check',check); + "step 1" + if(result.bool){ + player.storage.suiren=true; + player.awakenSkill('suiren'); + player.logSkill('suiren',result.targets); + player.removeSkill('yicong'); + player.gainMaxHp(); + player.recover(); + result.targets[0].draw(3); + } + } + }, + kuangfu:{ + trigger:{source:'damageEnd'}, + direct:true, + audio:2, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.player.countCards('e'); + }, + content:function(){ + "step 0" + var neg=get.attitude(player,trigger.player)<=0; + player.choosePlayerCard('e',trigger.player).set('ai',function(button){ + if(_status.event.neg){ + return get.buttonValue(button); + } + return 0; + }).set('neg',neg); + "step 1" + if(result.bool){ + player.logSkill('kuangfu'); + trigger.player.$give(result.links,player); + game.delay(2); + player.equip(result.links[0]); + } + } + }, + }, + translate:{ + zhangren:'张任', + zoushi:'邹氏', + zangba:'臧霸', + jiling:'纪灵', + gz_sp_dongzhuo:'董卓', + gz_zhangjiao:'张角', + litong:'李通', + mizhu:'糜竺', + buzhi:'步骘', + chenlin:'陈琳', + yuanshu:'袁术', + re_yuanshu:'新袁术', + gongsunzan:'公孙瓒', + sp_diaochan:'sp貂蝉', + yangxiu:'杨修', + sp_zhaoyun:'sp赵云', + jsp_zhaoyun:'界sp赵云', + caohong:'曹洪', + liuxie:'刘协', + xiahouba:'夏侯霸', + zhugejin:'诸葛谨', + zhugeke:'诸葛恪', + guanyinping:'关银屏', + ganfuren:'甘夫人', + sunhao:'孙皓', + chengyu:'程昱', + simalang:'司马朗', + zhangliang:'张梁', + tianfeng:'田丰', + sp_pangtong:'sp庞统', + sp_jiaxu:'sp贾诩', + maliang:'马良', + sp_caoren:'sp曹仁', + yuejin:'乐进', + mifuren:'糜夫人', + sp_dongzhuo:'sp董卓', + chendong:'陈武董袭', + jiangfei:'蒋琬费祎', + jiangqing:'蒋钦', + hetaihou:'何太后', + dingfeng:'丁奉', + zhangxingcai:'张星彩', + caoang:'曹昂', + kongrong:'孔融', + fuwan:'伏完', + sp_pangde:'sp庞德', + sp_sunshangxiang:'孙尚香', + zhugedan:'诸葛诞', + sp_machao:'sp马超', + sp_jiangwei:'sp姜维', + zhangbao:'张宝', + yangxiou:'杨修', + shixie:'士燮', + mayunlu:'马云騄', + zhanglu:'张鲁', + wutugu:'兀突骨', + mateng:'马腾', + sp_caiwenji:'sp蔡文姬', + zhugeguo:'诸葛果', + liuzan:'留赞', + lingcao:'凌操', + sunru:'孙茹', + lingju:'灵雎', + lifeng:'李丰', + jsp_guanyu:'sp关羽', + zhuling:'朱灵', + sunluyu:'孙鲁育', + hanba:'旱魃', + panfeng:'潘凤', + zumao:'祖茂', + daxiaoqiao:'大小乔', + sp_daqiao:'sp大乔', + sp_ganning:'sp甘宁', + sp_zhangfei:'sp张飞', + sp_xiahoudun:'sp夏侯惇', + cuiyan:'崔琰', + wenpin:'文聘', + jsp_huangyueying:'sp黄月英', + sp_lvmeng:'sp吕蒙', + wangji:'王基', + guansuo:'关索', + tadun:'蹋顿', + yanbaihu:'严白虎', + wanglang:'王朗', + sp_liubei:'sp刘备', + caochun:'曹纯', + dongbai:'董白', + zhaoxiang:'赵襄', + heqi:'贺齐', + kanze:'阚泽', + dongyun:'董允', + mazhong:'马忠', + huangfusong:'皇甫嵩', - fenyue:'奋钺', - fenyue2:'奋钺', - fenyue2_bg:'钺', - fenyue_info:'出牌阶段限X次,你可以与一名角色拼点,若你赢,你选择一项:1.其不能使用或打出手牌直到回合结束;2.视为你对其使用了【杀】(不计入次数限制)。若你没赢,你结束出牌阶段。(X为存活的忠臣数)', - zhuoshui:'祸水', - zhuoshui_info:'锁定技,准备阶段,你令所有其他角色的非锁定技失效直到回合结束', - zqingcheng:'倾城', - zqingcheng_info:'出牌阶段,你可以弃置一张装备牌,然后令一名角色翻面并摸两张牌', - zfengshi:'锋矢', - zfengshi_info:'你使用杀指定目标后,可以令目标弃置装备区内的一张牌', - chuanxin:'穿心', - chuanxin_info:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.随机移除主武将牌上的一个技能', - chuanxin_info_guozhan:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,若其与你势力不同且有副将,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.移除副将', - hengjiang:'横江', - hengjiang2:'横江', - hengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸一张牌', - shuangren:'双刃', - shuangren_info:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为任意一名角色使用一张【杀】(此【杀】不计入限制的次数);若你没赢,你结束出牌阶段', - shuangren_info_guozhan:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对其或与其势力相同的另一名角色使用一张【杀】(此【杀】不计入限制的次数);若你没赢,你结束出牌阶段', - xiashu:'下书', - xiashu_info:'出牌阶段开始时,你可以将所有手牌交给一名其他角色,然后该角色亮出任意数量的手牌(至少一张),令你选择一项:1.获得其亮出的手牌;2.获得其未亮出的手牌', - kuanshi:'宽释', - kuanshi2:'宽释', - kuanshi_info:'结束阶段,你可以选择一名角色。直到你的下回合开始,该角色下一次受到超过1点的伤害时,防止此伤害,然后你跳过下个回合的摸牌阶段', - bingzheng:'秉正', - bingzheng_info:'出牌阶段结束时,你可以令手牌数不等于体力值的一名角色弃置一张手牌或摸一张牌。然后若其手牌数等于体力值,你摸一张牌,且可以交给该角色一张牌', - sheyan:'舍宴', - sheyan_info:'当你成为一张普通锦囊牌的目标时(带有指向目标的锦囊除外),你可以令一名其他角色也成为此牌的目标', - fuman:'抚蛮', - fuman2:'抚蛮', - fuman_info:'出牌阶段,你可以将一张【杀】交给一名本回合未获得过“抚蛮”牌的其他角色,然后其于下个回合结束之前使用“抚蛮”牌时,你摸一张牌', - qizhou:'绮胄', - qizhou_info:'锁定技,你根据装备区里牌的花色数获得以下技能:1种或以上-马术;2种或以上-英姿;3种或以上-短兵;4种-奋威', - shanxi:'闪袭', - shanxi_info:'出牌阶段限一次,你可以弃置一张红色基本牌,然后弃置攻击范围内的一名其他角色的一张牌,若弃置的牌是【闪】,你观看其手牌,若弃置的不是【闪】,其观看你的手牌', - duanbing:'短兵', - duanbing_info:'你使用【杀】可以多选择一名距离为1的角色为目标', - fanghun:'芳魂', - fanghun_info:'当你使用【杀】造成伤害后,你获得1个“梅影”标记;你可以移去1个“梅影”标记来发动“龙胆”并摸一张牌', - fuhan:'扶汉', - fuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记,随机观看五名未登场的蜀势力角色,将武将牌替换为其中一名角色,并将体力上限数调整为本局游戏中移去“梅影”标记的数量(至多为游戏开始时的角色数),然后若你是体力值最低的角色,你回复1点体力', - yjixi:'觊玺', - yjixi_info:'觉醒技,结束阶段,若你连续三回合没有失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能“妄尊”或摸两张牌并获得当前主公的主公技', - xinyongsi:'庸肆', - xinyongsi1:'庸肆', - xinyongsi2:'庸肆', - xinyongsi_info:'锁定技,摸牌阶段,你令额定摸牌数为X(X为势力数);弃牌阶段开始时,你选择一项:1.弃置一张牌;2.失去1点体力', - xiehui:'黠慧', - xiehui2:'黠慧', - xiehui_info:'锁定技,你的黑色牌不占用手牌上限;其他角色获得你的黑色牌时,其不能使用、打出、弃置这些牌直到其体力值减少为止', - lianzhu:'连诛', - lianzhu_info:'出牌阶段限一次,你可以展示并交给一名其他角色一张牌,若该牌为黑色,其选择一项:1.你摸两张牌;2.弃置两张牌', - zhaolie:'昭烈', - zhaolie_info:'摸牌阶段摸牌时,你可以少摸一张,指定你攻击范围内的一名角色亮出牌堆顶上3张牌,将其中的非基本牌和【桃】置于弃牌堆,该角色进行二选一:你对其造成X点伤害,然后他获得这些基本牌;或他弃置X张牌,然后你获得这些基本牌。(X为其中非基本牌的数量)', - shichou:'誓仇', - shichou2:'誓仇', - shichou_info:'主公技,限定技,准备阶段,你可指定一名蜀国角色并交给其两张牌。本盘游戏中,每当你受到伤害时,改为该角色替你受到等量的伤害,然后摸等量的牌,直至该角色第一次进入濒死状态', - shanjia:'缮甲', - shanjia_info:'出牌阶段开始时,你可以先摸X张牌再弃置等量的牌,若你以此法弃置了装备区内的牌,视为你使用了一张无视距离的【杀】(X为你于本局游戏内使用过的装备牌数且最大为7)', - tuifeng:'推锋', - tuifeng2:'推锋', - tuifeng_info:'1.当你受到1点伤害后,你可以将一张牌置于武将牌上,称为“锋”。2.准备阶段开始时,若你的武将牌上有“锋”,你移去所有“锋”,摸2X张牌,然后你于此回合的出牌阶段内使用【杀】的次数上限+X(X为你此次移去的“锋”数)', - ziyuan:'资援', - ziyuan_info:'出牌阶段限一次,你可以将任意张点数之和为13的手牌交给一名其他角色,然后该角色回复1点体力', - jugu:'巨贾', - jugu_info:'锁定技,1.你的手牌上限+X。2.游戏开始时,你摸X张牌(X为你的体力上限)', - hongde:'弘德', - hongde_info:'当你一次获得或失去至少两张牌后,你可以令一名其他角色摸一张牌', - dingpan:'定叛', - dingpan_info:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害(X为场上存活的反贼数,非身份模式改为1)', - weidi:'伪帝', - weidi_info:'锁定技,你视为拥有当前主公的主公技', - juesi:'决死', - juesi_info:'出牌阶段,你可以弃置一张杀并选择你攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是杀且你的体力值不大于该角色,你视为对其使用决斗', - zhenlue:'缜略', - zhenlue_info:'锁定技,你使用的普通锦囊牌不能被无懈可击响应;你不能成为其他角色的延时类锦囊的目标', - jianshu:'间书', - jianshu_info:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择一名攻击范围内含有其的另一名其他角色,然后令这两名角色拼点,赢的角色弃置两张牌,没赢的角色失去一点体力', - yongdi:'拥嫡', - yongdi_info:'限定技,当你受到伤害后,你可令一名其他男性角色增加一点体力上限,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技', - gushe:'鼓舌', - gushe_bg:'舌', - gushe_info:'出牌阶段限一次,你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,若你赢,对方选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记(你有7个饶舌标记时,你死亡)', - jici:'激词', - jici_info:'当你发动“鼓舌”拼点的牌亮出后,若点数小于X,你可令点数+X;若点数等于X,你可令你本回合发动“鼓舌”的次数上限+1(X为你“饶舌”标记的数量)', - shefu:'设伏', - shefu_bg:'伏', - shefu_info:'结束阶段开始时,你可以将一张手牌移出游戏,称为"伏兵"。然后为"伏兵"记录一个基本牌或锦囊牌名称(须与其他"伏兵"记录的名称均不同)。你的回合外,当有其他角色使用与你记录的"伏兵"牌名相同的牌时,你可以令此牌无效,然后移去该"伏兵"', - benyu:'贲育', - benyu2:'贲育', - benyu_info:'每当你受到伤害后,若你的手牌数不大于伤害来源手牌数,你可以将手牌摸至与伤害来源手牌数相同(最多摸至5张);否则你可以弃置大于伤害来源手牌数的手牌,然后对其造成1点伤害', - zhidao:'雉盗', - zhidao_info:'锁定技,当你于你的回合内第一次对区域里有牌的其他角色造成伤害后,你获得其手牌、装备区和判定区里的各一张牌,然后直到回合结束,其他角色不能被选择为你使用牌的目标', - jili:'寄篱', - jili_info:'锁定技,当一名其他角色成为红色基本牌或红色普通锦囊牌的目标时,若其与你的距离为1且你既不是此牌的使用者也不是目标,你也成为此牌的目标', - luanzhan:'乱战', - luanzhan_info:'你使用【杀】或黑色普通锦囊牌可以额外选择X名角色为目标;当你使用【杀】或黑色普通锦囊牌指定目标后,若此牌的目标角色数小于X,则X减至0。(X为你于本局游戏内造成过伤害的次数)', - zhengnan:'征南', - zhengnan_info:'当其他角色死亡后,你可以摸三张牌。若如此做,你获得下列技能中的任意一个:“武圣”、 “当先”和“制蛮”', - xiefang:'撷芳', - xiefang_info:'锁定技,你的进攻距离+X(X为女性角色数)', - qizhi:'奇制', - qizhi_info:'当你于回合内使用基本牌或锦囊牌指定目标后,你可以弃置不是此牌目标的一名角色的一张牌。若如此做,其摸一张牌', - jinqu:'进趋', - jinqu_info:'结束阶段开始时,你可以摸两张牌,若如此做,你将手牌弃置至X张(X为你于此回合发动过“奇制”的次数)', - tanhu:'探虎', - tanhu2:'探虎', - tanhu3:'探虎', - tanhu_info:'出牌阶段限一次,你可以与一名其他角色拼点。若你赢,你获得以下技能直到回合结束:你与该角色的距离为1,你对该角色使用普通锦囊牌时可以摸一张牌', - mouduan:'谋断', - mouduan_info:'通常状态下,你拥有标记“武”并拥有技能“激昂”和“谦逊”。当你的手牌数为2张或以下时,你须将你的标记翻面为“文”,将该两项技能转化为“英姿”和“克己”。任一角色的回合开始前,你可弃一张牌将标记翻回', - jiqiao:'机巧', - jiqiao_info:'出牌阶段开始时,你可以弃置任意张装备牌,然后亮出牌堆顶三倍数量的牌,你获得其中的锦囊牌', - linglong:'玲珑', - linglong_info:'锁定技,若你的装备区没有防具牌,视为你装备着【八卦阵】;若你的装备区没有坐骑牌,你的手牌上限+1;若你的装备区没有宝物牌,你使用锦囊牌无距离限制', - fenyong:'愤勇', - fenyong2:'愤勇', - fenyong2_bg:'勇', - fenyong_info:'每当你受到一次伤害后,你可以获得一枚愤勇标记;当你有愤勇标记时,防止你受到的所有伤害', - xuehen:'雪恨', - xuehen_info:'每个角色的结束阶段开始时,若你有愤勇标记,你须弃置之,然后选择一项:1.弃置当前回合角色X张牌(X为你已损失的体力值);2.视为对一名任意角色使用一张【杀】', - zhenwei:'镇卫', - zhenwei2:'镇卫', - zhenwei_info:'当一名其他角色成为【杀】或黑色锦囊牌的目标时(使用者不是你),若该角色的体力值小于你且此牌的目标角色数为1,你可以弃置一张牌。若如此做,你选择一项:1、摸一张牌,然后将此【杀】或黑色锦囊牌转移给你;2、令此【杀】或黑色锦囊牌无效,然后将此【杀】或黑色锦囊牌置于使用者的武将牌旁,若如此做,当前回合结束后,使用者获得使用者武将牌旁的这些牌', - jie:'嫉恶', - jie_info:'锁定技,你使用的红色【杀】造成的伤害+1', - dahe:'大喝', - dahe2:'大喝', - dahe2_bg:'喝', - dahe_info:'出牌阶段,你可以与一名其他角色拼点。若你赢,该角色的非红心【闪】无效直到回合结束,你可将该角色拼点的牌交给场上一名体力不多于你的角色。若你没赢,你须展示手牌并选择一张弃置。每阶段限一次', - yinling:'银铃', - yinling_bg:'锦', - yinling_info:'出牌阶段,你可以弃置一张黑色牌并指定一名其他角色。若如此做,你获得其一张牌并置于你的武将牌上,称为“锦”(数量最多为四)', - junwei:'军威', - junwei2:'军威', - junwei_info:'结束阶段开始时,你可以移去三张“锦”,若如此做,你须指定一名角色并令其选择一项:1.亮出一张【闪】,然后由你交给任意一名角色。2.该角色失去1点体力,然后由你选择将其装备区的一张牌移出游戏。在该角色的回合结束后,将以此法移出游戏的装备牌移回原处', - yanxiao:'言笑', - yanxiao2:'言笑', - yanxiao_info:'出牌阶段,你可以将一张♦牌置于一名角色的武将牌上,武将牌上有“言笑”牌的角色下个判定阶段开始时,获得言笑牌及其判定区里的所有牌', - anxian:'安娴', - anxian_info:'每当你使用【杀】对目标角色造成伤害时,你可以防止此次伤害,令其弃置一张手牌,然后你摸一张牌;当你成为【杀】的目标时,你可以弃置一张手牌使之无效,然后该【杀】的使用者摸一张牌', - xingwu:'星舞', - xingwu_info:'弃牌阶段开始时,你可以将一张与你本回合使用的牌颜色均不同的手牌置于武将牌上:若你有至少三张“星舞”牌,你移去“星舞”牌并选择一名男性角色,该角色受到2点伤害并弃置其装备区的所有牌', - luoyan:'落雁', - luoyan_info:'锁定技。若你的武将牌上有“星舞牌”,你拥有“天香”和“流离”', - yinbing:'引兵', - yinbing_info:'结束阶段开始时,你可以将至少一张非基本牌置于武将牌上。每当你受到【杀】或【决斗】的伤害后,你移去一张“引兵牌”', - juedi:'绝地', - juedi_info:'锁定技,准备阶段,你选择一项:1.移去“引兵”牌,将手牌补至体力上限数;2.将“引兵”牌交给一名体力值不大于你的其他角色,其回复1点体力,摸等量的牌', - kuangfu:'狂斧', - kuangfu_info:'每当你使用杀造成伤害,可以将对方的一张装备牌移到你的装备区', - xintan:'心惔', - xintan_info:'出牌阶段限一次,你可以移去两张“焚”并选择一名角色,该角色失去一点体', - fentian:'焚天', - fentian_info:'锁定技,结束阶段开始时,若你的手牌数少于体力值,你须选择一名攻击范围内的角色,将其一张牌置于你的武将牌上,称为“焚”。锁定技,你的攻击范围+X(X为“焚”的数量)', - zhiri:'炙日', - zhiri_info:'觉醒技,准备阶段开始时,若“焚”数不小于3,你减1点体力上限,然后获得技能“心惔”', - meibu:'魅步', - meibu_info:'一名其他角色的出牌阶段开始时,若你不在其攻击范围内,你可以令该角色的锦囊牌均视为【杀】,直到该角色以此法使用了一张【杀】或回合结束。若如此做,则直到回合结束,视为你在其攻击范围内', - mumu:'穆穆', - mumu_info:'出牌阶段限一次,你可以弃置一张【杀】或黑色锦囊牌,然后选择一项:弃置场上一张武器牌,然后摸一张牌;或将场上的一张防具牌移动到你的装备区里(可替换原防具)', - zhanyi:'战意', - zhanyi_basic_sha:'战杀', - zhanyi_basic_jiu:'战酒', - zhanyi_basic_tao:'战桃', - zhanyi_info:'出牌阶段限一次,你可以弃置一张牌并失去1点体力,然后根据你弃置的牌获得以下效果直到回合结束:基本牌,你可以将一张基本牌当作杀、酒或桃使用;锦囊牌,摸两张牌且你使用的牌无距离限制;装备牌,你使用【杀】指定目标角色后,其弃置两张牌', - nuzhan:'怒斩', - nuzhan2:'怒斩', - nuzhan_info:'锁定技,你每当你使用由一张锦囊牌转化而来的【杀】时,你可以额外使用一张杀;锁定技,你使用的由一张装备牌转化而来的【杀】的伤害值基数+1', - danji:'单骑', - danji_info:'觉醒技,准备阶段开始时,若你的手牌数大于你的体力值,你减1点体力上限,然后获得“马术”和“怒斩”', - tunchu:'屯储', - tunchu_info:'摸牌阶段摸牌时,你可以额外摸两张牌,若如此做,将一张手牌置于你的武将上,称为“粮”,只要你的武将牌上有“粮”,你便不能使用【杀】和【决斗】', - shuliang:'输粮', - shuliang_info:'每当一名角色的结束阶段开始时,若其没有手牌,你可以移去一张“粮”,然后该角色摸两张牌', - jieyuan:'竭缘', - jieyuan_more:'竭缘', - jieyuan_less:'竭缘', - jieyuan_info:'当你对一名其他角色造成伤害时,若其体力值大于或等于你的体力值,你可弃置一张黑色手牌令此伤害+1;当你受到一名其他角色造成的伤害时,若其体力值大于或等于你的体力值,你可弃置一张红色手牌令此伤害-1。', - fenxin:'焚心', - fenxin_info:'限定技,当你杀死一名非主公角色时,在其翻开身份牌之前,你可以与该角色交换身份牌。(你的身份为主公时不能发动此技能)', - shixin:'释衅', - shixin_info:'锁定技,当你受到火属性伤害时,你防止此伤害', - qingyi:'轻逸', - qingyi1:'轻逸', - qingyi2:'轻逸', - qingyi_info:'你可以跳过摸牌阶段,或跳过出牌阶段并弃置一张装备牌,若如此则视为对任意一名使用一张【杀】', - dujin:'独进', - dujin_info:'摸牌阶段,你可以额外摸X+1张牌(X为你装备区里牌数的一半且向下取整)', - yuhua:'羽化', - yuhua_info:'锁定技,弃牌阶段内,你的非基本牌不计入手牌数,且你不能弃置你的非基本牌', - qirang:'祈禳', - qirang_info:'当有装备牌进入你的装备区时,你可以获得牌堆中的一张锦囊牌', - biluan:'避乱', - biluan_info:'摸牌阶段开始时,若有其他角色与你距离不大于1,则你可以放弃摸牌。若如此做,你的防御距离+X(X为势力数)', - lixia:'礼下', - lixia_info:'锁定技,其他角色结束阶段开始时,若你不在其攻击范围内,你摸一张牌或令其摸一张牌。若如此做,你的防御距离-1', - yishe:'义舍', - yishe_bg:'米', - yishe_info:'结束阶段开始时,若你的武将牌上没有牌,你可以摸两张牌。若如此做,你将两张牌置于武将牌上,称为“米”;当“米”移至其他区域后,若你的武将牌上没有“米”,你回复1点体力', - bushi:'布施', - midao:'米道', - bushi_info:'当你受到1点伤害后,或其他角色受到你造成的1点伤害后,受到伤害的角色可以获得一张“米”', - midao_info:'当一张判定牌生效前,你可以打出一张“米”代替之', - fengpo:'凤魄', - fengpo_info:'当你于出牌阶段内使用第一张【杀】或【决斗】指定目标后,若目标角色数为1,你可以选择一项:1.摸X张牌;2.此牌造成的伤害+X(X为其手牌中方牌的数量)', - chenqing:'陈情', - chenqing_info:'每轮限一次,当一名角色处于濒死状态时,你可以令另一名其他角色摸四张牌,然后弃置四张牌。若其以此法弃置的四张牌花色各不相同,则视为该角色对濒死的角色使用一张【桃】', - mozhi:'默识', - mozhi_info:'结束阶段开始时,你可以将一张手牌当你本回合出牌阶段使用的第一张基本或普通锦囊牌使用。然后,你可以将一张手牌当你本回合出牌阶段使用的第二张基本或普通锦囊牌使用', - ranshang:'燃殇', - ranshang2:'燃殇', - ranshang_info:'锁定技,当你受到1点火焰伤害后,你获得1枚“燃”标记;结束阶段开始时,你失去X点体力(X为“燃”标记的数量)', - hanyong:'悍勇', - hanyong_info:'当你使用【南蛮入侵】或【万箭齐发】时,若你的体力值小于游戏轮数,你可以令此牌造成的伤害+1', + fenyue:'奋钺', + fenyue2:'奋钺', + fenyue2_bg:'钺', + fenyue_info:'出牌阶段限X次,你可以与一名角色拼点,若你赢,你选择一项:1.其不能使用或打出手牌直到回合结束;2.视为你对其使用了【杀】(不计入次数限制)。若你没赢,你结束出牌阶段。(X为存活的忠臣数)', + zhuoshui:'祸水', + zhuoshui_info:'锁定技,准备阶段,你令所有其他角色的非锁定技失效直到回合结束', + zqingcheng:'倾城', + zqingcheng_info:'出牌阶段,你可以弃置一张装备牌,然后令一名角色翻面并摸两张牌', + zfengshi:'锋矢', + zfengshi_info:'你使用杀指定目标后,可以令目标弃置装备区内的一张牌', + chuanxin:'穿心', + chuanxin_info:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.随机移除主武将牌上的一个技能', + chuanxin_info_guozhan:'当你于出牌阶段内使用【杀】或【决斗】对目标角色造成伤害时,若其与你势力不同且有副将,你可以防止此伤害。若如此做,该角色选择一项:1.弃置装备区里的所有牌,若如此做,其失去1点体力;2.移除副将', + hengjiang:'横江', + hengjiang2:'横江', + hengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸一张牌', + shuangren:'双刃', + shuangren_info:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为任意一名角色使用一张【杀】(此【杀】不计入限制的次数);若你没赢,你结束出牌阶段', + shuangren_info_guozhan:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对其或与其势力相同的另一名角色使用一张【杀】(此【杀】不计入限制的次数);若你没赢,你结束出牌阶段', + xiashu:'下书', + xiashu_info:'出牌阶段开始时,你可以将所有手牌交给一名其他角色,然后该角色亮出任意数量的手牌(至少一张),令你选择一项:1.获得其亮出的手牌;2.获得其未亮出的手牌', + kuanshi:'宽释', + kuanshi2:'宽释', + kuanshi_info:'结束阶段,你可以选择一名角色。直到你的下回合开始,该角色下一次受到超过1点的伤害时,防止此伤害,然后你跳过下个回合的摸牌阶段', + bingzheng:'秉正', + bingzheng_info:'出牌阶段结束时,你可以令手牌数不等于体力值的一名角色弃置一张手牌或摸一张牌。然后若其手牌数等于体力值,你摸一张牌,且可以交给该角色一张牌', + sheyan:'舍宴', + sheyan_info:'当你成为一张普通锦囊牌的目标时(带有指向目标的锦囊除外),你可以令一名其他角色也成为此牌的目标', + fuman:'抚蛮', + fuman2:'抚蛮', + fuman_info:'出牌阶段,你可以将一张【杀】交给一名本回合未获得过“抚蛮”牌的其他角色,然后其于下个回合结束之前使用“抚蛮”牌时,你摸一张牌', + qizhou:'绮胄', + qizhou_info:'锁定技,你根据装备区里牌的花色数获得以下技能:1种或以上-马术;2种或以上-英姿;3种或以上-短兵;4种-奋威', + shanxi:'闪袭', + shanxi_info:'出牌阶段限一次,你可以弃置一张红色基本牌,然后弃置攻击范围内的一名其他角色的一张牌,若弃置的牌是【闪】,你观看其手牌,若弃置的不是【闪】,其观看你的手牌', + duanbing:'短兵', + duanbing_info:'你使用【杀】可以多选择一名距离为1的角色为目标', + fanghun:'芳魂', + fanghun_info:'当你使用【杀】造成伤害后,你获得1个“梅影”标记;你可以移去1个“梅影”标记来发动“龙胆”并摸一张牌', + fuhan:'扶汉', + fuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记,随机观看五名未登场的蜀势力角色,将武将牌替换为其中一名角色,并将体力上限数调整为本局游戏中移去“梅影”标记的数量(至多为游戏开始时的角色数),然后若你是体力值最低的角色,你回复1点体力', + yjixi:'觊玺', + yjixi_info:'觉醒技,结束阶段,若你连续三回合没有失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能“妄尊”或摸两张牌并获得当前主公的主公技', + xinyongsi:'庸肆', + xinyongsi1:'庸肆', + xinyongsi2:'庸肆', + xinyongsi_info:'锁定技,摸牌阶段,你令额定摸牌数为X(X为势力数);弃牌阶段开始时,你选择一项:1.弃置一张牌;2.失去1点体力', + xiehui:'黠慧', + xiehui2:'黠慧', + xiehui_info:'锁定技,你的黑色牌不占用手牌上限;其他角色获得你的黑色牌时,其不能使用、打出、弃置这些牌直到其体力值减少为止', + lianzhu:'连诛', + lianzhu_info:'出牌阶段限一次,你可以展示并交给一名其他角色一张牌,若该牌为黑色,其选择一项:1.你摸两张牌;2.弃置两张牌', + zhaolie:'昭烈', + zhaolie_info:'摸牌阶段摸牌时,你可以少摸一张,指定你攻击范围内的一名角色亮出牌堆顶上3张牌,将其中的非基本牌和【桃】置于弃牌堆,该角色进行二选一:你对其造成X点伤害,然后他获得这些基本牌;或他弃置X张牌,然后你获得这些基本牌。(X为其中非基本牌的数量)', + shichou:'誓仇', + shichou2:'誓仇', + shichou_info:'主公技,限定技,准备阶段,你可指定一名蜀国角色并交给其两张牌。本盘游戏中,每当你受到伤害时,改为该角色替你受到等量的伤害,然后摸等量的牌,直至该角色第一次进入濒死状态', + shanjia:'缮甲', + shanjia_info:'出牌阶段开始时,你可以先摸X张牌再弃置等量的牌,若你以此法弃置了装备区内的牌,视为你使用了一张无视距离的【杀】(X为你于本局游戏内使用过的装备牌数且最大为7)', + tuifeng:'推锋', + tuifeng2:'推锋', + tuifeng_info:'1.当你受到1点伤害后,你可以将一张牌置于武将牌上,称为“锋”。2.准备阶段开始时,若你的武将牌上有“锋”,你移去所有“锋”,摸2X张牌,然后你于此回合的出牌阶段内使用【杀】的次数上限+X(X为你此次移去的“锋”数)', + ziyuan:'资援', + ziyuan_info:'出牌阶段限一次,你可以将任意张点数之和为13的手牌交给一名其他角色,然后该角色回复1点体力', + jugu:'巨贾', + jugu_info:'锁定技,1.你的手牌上限+X。2.游戏开始时,你摸X张牌(X为你的体力上限)', + hongde:'弘德', + hongde_info:'当你一次获得或失去至少两张牌后,你可以令一名其他角色摸一张牌', + dingpan:'定叛', + dingpan_info:'出牌阶段限X次,你可以令一名装备区里有牌的角色摸一张牌,然后其选择一项:1.令你弃置其装备区里的一张牌;2.获得其装备区里的所有牌,若如此做,你对其造成1点伤害(X为场上存活的反贼数,非身份模式改为1)', + weidi:'伪帝', + weidi_info:'锁定技,你视为拥有当前主公的主公技', + juesi:'决死', + juesi_info:'出牌阶段,你可以弃置一张杀并选择你攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是杀且你的体力值不大于该角色,你视为对其使用决斗', + zhenlue:'缜略', + zhenlue_info:'锁定技,你使用的普通锦囊牌不能被无懈可击响应;你不能成为其他角色的延时类锦囊的目标', + jianshu:'间书', + jianshu_info:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择一名攻击范围内含有其的另一名其他角色,然后令这两名角色拼点,赢的角色弃置两张牌,没赢的角色失去一点体力', + yongdi:'拥嫡', + yongdi_info:'限定技,当你受到伤害后,你可令一名其他男性角色增加一点体力上限,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技', + gushe:'鼓舌', + gushe_bg:'舌', + gushe_info:'出牌阶段限一次,你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,若你赢,对方选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记(你有7个饶舌标记时,你死亡)', + jici:'激词', + jici_info:'当你发动“鼓舌”拼点的牌亮出后,若点数小于X,你可令点数+X;若点数等于X,你可令你本回合发动“鼓舌”的次数上限+1(X为你“饶舌”标记的数量)', + shefu:'设伏', + shefu_bg:'伏', + shefu_info:'结束阶段开始时,你可以将一张手牌移出游戏,称为"伏兵"。然后为"伏兵"记录一个基本牌或锦囊牌名称(须与其他"伏兵"记录的名称均不同)。你的回合外,当有其他角色使用与你记录的"伏兵"牌名相同的牌时,你可以令此牌无效,然后移去该"伏兵"', + benyu:'贲育', + benyu2:'贲育', + benyu_info:'每当你受到伤害后,若你的手牌数不大于伤害来源手牌数,你可以将手牌摸至与伤害来源手牌数相同(最多摸至5张);否则你可以弃置大于伤害来源手牌数的手牌,然后对其造成1点伤害', + zhidao:'雉盗', + zhidao_info:'锁定技,当你于你的回合内第一次对区域里有牌的其他角色造成伤害后,你获得其手牌、装备区和判定区里的各一张牌,然后直到回合结束,其他角色不能被选择为你使用牌的目标', + jili:'寄篱', + jili_info:'锁定技,当一名其他角色成为红色基本牌或红色普通锦囊牌的目标时,若其与你的距离为1且你既不是此牌的使用者也不是目标,你也成为此牌的目标', + luanzhan:'乱战', + luanzhan_info:'你使用【杀】或黑色普通锦囊牌可以额外选择X名角色为目标;当你使用【杀】或黑色普通锦囊牌指定目标后,若此牌的目标角色数小于X,则X减至0。(X为你于本局游戏内造成过伤害的次数)', + zhengnan:'征南', + zhengnan_info:'当其他角色死亡后,你可以摸三张牌。若如此做,你获得下列技能中的任意一个:“武圣”、 “当先”和“制蛮”', + xiefang:'撷芳', + xiefang_info:'锁定技,你的进攻距离+X(X为女性角色数)', + qizhi:'奇制', + qizhi_info:'当你于回合内使用基本牌或锦囊牌指定目标后,你可以弃置不是此牌目标的一名角色的一张牌。若如此做,其摸一张牌', + jinqu:'进趋', + jinqu_info:'结束阶段开始时,你可以摸两张牌,若如此做,你将手牌弃置至X张(X为你于此回合发动过“奇制”的次数)', + tanhu:'探虎', + tanhu2:'探虎', + tanhu3:'探虎', + tanhu_info:'出牌阶段限一次,你可以与一名其他角色拼点。若你赢,你获得以下技能直到回合结束:你与该角色的距离为1,你对该角色使用普通锦囊牌时可以摸一张牌', + mouduan:'谋断', + mouduan_info:'通常状态下,你拥有标记“武”并拥有技能“激昂”和“谦逊”。当你的手牌数为2张或以下时,你须将你的标记翻面为“文”,将该两项技能转化为“英姿”和“克己”。任一角色的回合开始前,你可弃一张牌将标记翻回', + jiqiao:'机巧', + jiqiao_info:'出牌阶段开始时,你可以弃置任意张装备牌,然后亮出牌堆顶三倍数量的牌,你获得其中的锦囊牌', + linglong:'玲珑', + linglong_info:'锁定技,若你的装备区没有防具牌,视为你装备着【八卦阵】;若你的装备区没有坐骑牌,你的手牌上限+1;若你的装备区没有宝物牌,你使用锦囊牌无距离限制', + fenyong:'愤勇', + fenyong2:'愤勇', + fenyong2_bg:'勇', + fenyong_info:'每当你受到一次伤害后,你可以获得一枚愤勇标记;当你有愤勇标记时,防止你受到的所有伤害', + xuehen:'雪恨', + xuehen_info:'每个角色的结束阶段开始时,若你有愤勇标记,你须弃置之,然后选择一项:1.弃置当前回合角色X张牌(X为你已损失的体力值);2.视为对一名任意角色使用一张【杀】', + zhenwei:'镇卫', + zhenwei2:'镇卫', + zhenwei_info:'当一名其他角色成为【杀】或黑色锦囊牌的目标时(使用者不是你),若该角色的体力值小于你且此牌的目标角色数为1,你可以弃置一张牌。若如此做,你选择一项:1、摸一张牌,然后将此【杀】或黑色锦囊牌转移给你;2、令此【杀】或黑色锦囊牌无效,然后将此【杀】或黑色锦囊牌置于使用者的武将牌旁,若如此做,当前回合结束后,使用者获得使用者武将牌旁的这些牌', + jie:'嫉恶', + jie_info:'锁定技,你使用的红色【杀】造成的伤害+1', + dahe:'大喝', + dahe2:'大喝', + dahe2_bg:'喝', + dahe_info:'出牌阶段,你可以与一名其他角色拼点。若你赢,该角色的非红心【闪】无效直到回合结束,你可将该角色拼点的牌交给场上一名体力不多于你的角色。若你没赢,你须展示手牌并选择一张弃置。每阶段限一次', + yinling:'银铃', + yinling_bg:'锦', + yinling_info:'出牌阶段,你可以弃置一张黑色牌并指定一名其他角色。若如此做,你获得其一张牌并置于你的武将牌上,称为“锦”(数量最多为四)', + junwei:'军威', + junwei2:'军威', + junwei_info:'结束阶段开始时,你可以移去三张“锦”,若如此做,你须指定一名角色并令其选择一项:1.亮出一张【闪】,然后由你交给任意一名角色。2.该角色失去1点体力,然后由你选择将其装备区的一张牌移出游戏。在该角色的回合结束后,将以此法移出游戏的装备牌移回原处', + yanxiao:'言笑', + yanxiao2:'言笑', + yanxiao_info:'出牌阶段,你可以将一张♦牌置于一名角色的武将牌上,武将牌上有“言笑”牌的角色下个判定阶段开始时,获得言笑牌及其判定区里的所有牌', + anxian:'安娴', + anxian_info:'每当你使用【杀】对目标角色造成伤害时,你可以防止此次伤害,令其弃置一张手牌,然后你摸一张牌;当你成为【杀】的目标时,你可以弃置一张手牌使之无效,然后该【杀】的使用者摸一张牌', + xingwu:'星舞', + xingwu_info:'弃牌阶段开始时,你可以将一张与你本回合使用的牌颜色均不同的手牌置于武将牌上:若你有至少三张“星舞”牌,你移去“星舞”牌并选择一名男性角色,该角色受到2点伤害并弃置其装备区的所有牌', + luoyan:'落雁', + luoyan_info:'锁定技。若你的武将牌上有“星舞牌”,你拥有“天香”和“流离”', + yinbing:'引兵', + yinbing_info:'结束阶段开始时,你可以将至少一张非基本牌置于武将牌上。每当你受到【杀】或【决斗】的伤害后,你移去一张“引兵牌”', + juedi:'绝地', + juedi_info:'锁定技,准备阶段,你选择一项:1.移去“引兵”牌,将手牌补至体力上限数;2.将“引兵”牌交给一名体力值不大于你的其他角色,其回复1点体力,摸等量的牌', + kuangfu:'狂斧', + kuangfu_info:'每当你使用杀造成伤害,可以将对方的一张装备牌移到你的装备区', + xintan:'心惔', + xintan_info:'出牌阶段限一次,你可以移去两张“焚”并选择一名角色,该角色失去一点体', + fentian:'焚天', + fentian_info:'锁定技,结束阶段开始时,若你的手牌数少于体力值,你须选择一名攻击范围内的角色,将其一张牌置于你的武将牌上,称为“焚”。锁定技,你的攻击范围+X(X为“焚”的数量)', + zhiri:'炙日', + zhiri_info:'觉醒技,准备阶段开始时,若“焚”数不小于3,你减1点体力上限,然后获得技能“心惔”', + meibu:'魅步', + meibu_info:'一名其他角色的出牌阶段开始时,若你不在其攻击范围内,你可以令该角色的锦囊牌均视为【杀】,直到该角色以此法使用了一张【杀】或回合结束。若如此做,则直到回合结束,视为你在其攻击范围内', + mumu:'穆穆', + mumu_info:'出牌阶段限一次,你可以弃置一张【杀】或黑色锦囊牌,然后选择一项:弃置场上一张武器牌,然后摸一张牌;或将场上的一张防具牌移动到你的装备区里(可替换原防具)', + zhanyi:'战意', + zhanyi_basic_sha:'战杀', + zhanyi_basic_jiu:'战酒', + zhanyi_basic_tao:'战桃', + zhanyi_info:'出牌阶段限一次,你可以弃置一张牌并失去1点体力,然后根据你弃置的牌获得以下效果直到回合结束:基本牌,你可以将一张基本牌当作杀、酒或桃使用;锦囊牌,摸两张牌且你使用的牌无距离限制;装备牌,你使用【杀】指定目标角色后,其弃置两张牌', + nuzhan:'怒斩', + nuzhan2:'怒斩', + nuzhan_info:'锁定技,你每当你使用由一张锦囊牌转化而来的【杀】时,你可以额外使用一张杀;锁定技,你使用的由一张装备牌转化而来的【杀】的伤害值基数+1', + danji:'单骑', + danji_info:'觉醒技,准备阶段开始时,若你的手牌数大于你的体力值,你减1点体力上限,然后获得“马术”和“怒斩”', + tunchu:'屯储', + tunchu_info:'摸牌阶段摸牌时,你可以额外摸两张牌,若如此做,将一张手牌置于你的武将上,称为“粮”,只要你的武将牌上有“粮”,你便不能使用【杀】和【决斗】', + shuliang:'输粮', + shuliang_info:'每当一名角色的结束阶段开始时,若其没有手牌,你可以移去一张“粮”,然后该角色摸两张牌', + jieyuan:'竭缘', + jieyuan_more:'竭缘', + jieyuan_less:'竭缘', + jieyuan_info:'当你对一名其他角色造成伤害时,若其体力值大于或等于你的体力值,你可弃置一张黑色手牌令此伤害+1;当你受到一名其他角色造成的伤害时,若其体力值大于或等于你的体力值,你可弃置一张红色手牌令此伤害-1。', + fenxin:'焚心', + fenxin_info:'限定技,当你杀死一名非主公角色时,在其翻开身份牌之前,你可以与该角色交换身份牌。(你的身份为主公时不能发动此技能)', + shixin:'释衅', + shixin_info:'锁定技,当你受到火属性伤害时,你防止此伤害', + qingyi:'轻逸', + qingyi1:'轻逸', + qingyi2:'轻逸', + qingyi_info:'你可以跳过摸牌阶段,或跳过出牌阶段并弃置一张装备牌,若如此则视为对任意一名使用一张【杀】', + dujin:'独进', + dujin_info:'摸牌阶段,你可以额外摸X+1张牌(X为你装备区里牌数的一半且向下取整)', + yuhua:'羽化', + yuhua_info:'锁定技,弃牌阶段内,你的非基本牌不计入手牌数,且你不能弃置你的非基本牌', + qirang:'祈禳', + qirang_info:'当有装备牌进入你的装备区时,你可以获得牌堆中的一张锦囊牌', + biluan:'避乱', + biluan_info:'摸牌阶段开始时,若有其他角色与你距离不大于1,则你可以放弃摸牌。若如此做,你的防御距离+X(X为势力数)', + lixia:'礼下', + lixia_info:'锁定技,其他角色结束阶段开始时,若你不在其攻击范围内,你摸一张牌或令其摸一张牌。若如此做,你的防御距离-1', + yishe:'义舍', + yishe_bg:'米', + yishe_info:'结束阶段开始时,若你的武将牌上没有牌,你可以摸两张牌。若如此做,你将两张牌置于武将牌上,称为“米”;当“米”移至其他区域后,若你的武将牌上没有“米”,你回复1点体力', + bushi:'布施', + midao:'米道', + bushi_info:'当你受到1点伤害后,或其他角色受到你造成的1点伤害后,受到伤害的角色可以获得一张“米”', + midao_info:'当一张判定牌生效前,你可以打出一张“米”代替之', + fengpo:'凤魄', + fengpo_info:'当你于出牌阶段内使用第一张【杀】或【决斗】指定目标后,若目标角色数为1,你可以选择一项:1.摸X张牌;2.此牌造成的伤害+X(X为其手牌中方牌的数量)', + chenqing:'陈情', + chenqing_info:'每轮限一次,当一名角色处于濒死状态时,你可以令另一名其他角色摸四张牌,然后弃置四张牌。若其以此法弃置的四张牌花色各不相同,则视为该角色对濒死的角色使用一张【桃】', + mozhi:'默识', + mozhi_info:'结束阶段开始时,你可以将一张手牌当你本回合出牌阶段使用的第一张基本或普通锦囊牌使用。然后,你可以将一张手牌当你本回合出牌阶段使用的第二张基本或普通锦囊牌使用', + ranshang:'燃殇', + ranshang2:'燃殇', + ranshang_info:'锁定技,当你受到1点火焰伤害后,你获得1枚“燃”标记;结束阶段开始时,你失去X点体力(X为“燃”标记的数量)', + hanyong:'悍勇', + hanyong_info:'当你使用【南蛮入侵】或【万箭齐发】时,若你的体力值小于游戏轮数,你可以令此牌造成的伤害+1', - yicong:'义从', - yongsi:'庸肆', - yongsi1:'庸肆', - yongsi2:'庸肆', - bifa:'笔伐', - bifa2:'笔伐', - songci:'颂词', - baobian:'豹变', - lihun:'离魂', - chongzhen:'冲阵', - chongzhen1:'冲阵', - chongzhen2:'冲阵', - yuanhu:'援护', - tianming:'天命', - mizhao:'密诏', - duwu:'黩武', - mingzhe:'明哲', - huanshi:'缓释', - hongyuan:'弘援', - aocai:'傲才', - aocai2:'傲才', - aocai2_backup:'傲才', - aocai3:'傲才', - huxiao:'虎啸', - huxiao3:'虎啸', - xueji:'血祭', - wuji:'武继', - shushen:'淑慎', - shenzhi:'神智', - xiongyi:'雄异', - junbing:'郡兵', - junbing2:'郡兵', - quji:'去疾', - sijian:'死谏', - suishi:'随势', - suishi2:'随势', - xiaoguo:'骁果', - duanxie:'断绁', - fenming:'奋命', - guixiu:'闺秀', - cunsi:'存嗣', - yongjue:'勇决', - hengzheng:'横征', - shengxi:'生息', - shoucheng:'守成', - shangyi:'尚义', - zhendu:'鸩毒', - qiluan:'戚乱', - qiluan2:'戚乱', - qiluan3:'戚乱', - shenxian:'甚贤', - qiangwu:'枪舞', - moukui:'谋溃', - moukui2:'谋溃', - lirang:'礼让', - mingshi:'名士', - liangzhu:'良助', - kaikang:'慷忾', - wangzun:'妄尊', - tongji:'同疾', - kuiwei:'溃围', - kuiwei2:'溃围', - yanzheng:'严整', - zhoufu:'咒缚', - zhoufu2:'咒缚', - zhoufu3:'咒缚', - yingbin:'影兵', - fenxun:'奋迅', - fenxun2:'奋迅', - spmengjin:'猛进', - xiemu:'协穆', - naman:'纳蛮', - zuixiang:'醉乡', - manjuan:'漫卷', - taichen:'抬榇', - jilei:'鸡肋', - jilei2:'鸡肋', - jilei2_bg:'肋', - fulu:'符箓', - fuji:'助祭', - fenyin:'奋音', - yawang:'雅望', - xunzhi:'殉志', - yingjian:'影箭', - fanxiang:'返乡', - fanxiang_info:'觉醒技,准备阶段开始时,若全场有至少一名已受伤且你曾发动【良助】令其摸牌的角色,则你回复1点体力和体力上限,失去技能【良助】并获得技能【枭姬】', - yingjian_info:'准备阶段,你可以视为使用一张无视距离的杀', - xunzhi_info:'准备阶段开始时,若你的上家和下家与你的体力值均不相等,你可以失去1点体力。若如此做,你的手牌上限+2', - yawang_info:'锁定技,摸牌阶段开始时,你改为摸x张牌,然后你于出牌阶段内至多使用x张牌(x为与你体力值相等的角色数)', - fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌颜色不同,则你可以摸一张牌,每回合最多发动3次', - fuji_info:'当一名角色造成雷电伤害时,你可以令其进行一次判定,若结果为黑色,此伤害+1;若结果为红色,该角色获得此牌。', - fulu_info:'你可以将【杀】当雷【杀】使用。', - jilei_info:'每当你受到有来源的伤害时,你可以选择一种牌的类别,令伤害来源不能使用、打出或弃置其此类别的手牌,直到回合结束', - danlao:'啖酪', - danlao_info:'当你成为一张指定了多个目标的锦囊牌的目标时,你可以取消之,并摸一张牌。', - gongao:'功獒', - zhuiji:'追击', - chouhai:'仇海', - chouhai_info:'锁定技,当你每次受到伤害时,若你没有手牌,此伤害+1。', - guiming:'归命', - guiming_info:'主公技,锁定技,你将残蚀描述中的“已受伤角色”改为“已受伤角色或其他吴势力角色”', - chixin:'赤心', - chixin1:'赤心', - chixin2:'赤心', - chixin_info:'你可以将♦牌当【杀】或【闪】使用或打出。出牌阶段,你对你攻击范围内的每名角色均可使用一张【杀】。', - suiren:'随仁', - suiren_info:'限定技,准备阶段开始时,你可以失去技能“义从”,然后加1点体力上限并回复1点体力,再令一名角色摸三张牌。', - canshi:'残蚀', - canshi2:'残蚀', - canshi_info:'摸牌阶段开始时,你可以改为摸x张牌(x为已受伤的角色数),若如此做,当你与此回合内使用基本牌或锦囊牌时,你弃置一张牌。', - zhuiji_info:'锁定技,你与体力值低于你的角色距离为1。', - kunfen:'困奋', - kunfen_info:'锁定技,结束阶段开始时,你失去1点体力,然后摸两张牌', - fengliang:'逢亮', - fengliang_info:'觉醒技,当你进入濒死状态时,你减1点体力上限并将体力值回复至2点,然后获得技能挑衅,将困奋改为非锁定技', - cihuai:'刺槐', - cihuai_info:'出牌阶段开始时,若你手牌中没有杀,你可以展示你的手牌,视为对一名角色使用一张杀', - gongao_info:'锁定技,每当一名角色死亡后,你增加一点体力上限,回复一点体力。', - juyi:'举义', - juyi_info:'觉醒技,准备阶段开始时,若你已受伤且体力上限大于存活角色数,你须将手牌摸至体力上限,然后获得技能“崩坏”和“威重”。', - weizhong:'威重', - weizhong_info:'锁定技,每当你的体力上限增加或减少时,你摸一张牌。', - taichen_info:'出牌阶段限一次,你可以自减一点体力,视为对一名角色使用一张杀(不计入回合内出杀限制)', - manjuan_info:'其他角色的卡牌因弃置而进入弃牌堆后,你可以弃置一张花色与之不同的牌,然后获得之', - zuixiang_info:'限定技,准备阶段开始时,你可以展示牌库顶的3张牌并置于你的武将牌上,你不可使用或打出与该些牌同类的牌,所有同类牌对你无效。之后每个你的准备阶段,你须重复展示一次,直至该些牌中任意两张点数相同时,将你武将牌上的全部牌置于你的手上。', - naman_info:'你可以获得其他角色打出的杀', - xiemu_info:'每当你成为其他角色的黑色牌的目标,可以弃置一张杀并摸两张牌', - spmengjin_info:'每当你使用一张杀,可以弃置目标一张牌', - fenxun_info:'出牌阶段限一次,你可以弃置一张牌并选择一名其他角色,然后本回合你计算与其的距离视为1', - yingbin_info:'受到“咒缚”技能影响的角色进行判定时,你可以摸两张牌。', - zhoufu_info:'出牌阶段限一次,你可以指定一名其他角色并将一张手牌移出游戏(将此牌置于该角色的武将牌旁)。若如此做,该角色进行判定时,改为将此牌作为判定牌。该角色的结束阶段,若此牌仍在该角色旁,你将此牌收入手牌。', - yanzheng_info:'若你的手牌数大于你的体力值,你可以将你装备区内的牌当【无懈可击】使用', - kuiwei_info:'结束阶段开始时,你可以摸2+X张牌,然后将你的武将牌翻面。在你的下个摸牌阶段开始时,你须弃置X张牌。(X等于当时场上装备区内的武器牌的数量)', - tongji_info:'锁定技。若你的手牌数大于你的体力值,则只要你在任一其他角色的攻击范围内,该角色使用【杀】时便不能指定你以外的角色为目标', - wangzun_info:'其他角色的准备阶段,你可以摸一张牌,然后令该角色此回合的手牌上限-1;直到你的回合开始,你不能再次发动此技', - kaikang_info:'每当你距离1以内的角色成为杀的目标后,你可以摸一张牌。若如此做,你交给其一张牌并展示之,若该牌为装备牌,该角色可以使用此牌。', - liangzhu_info:'当一名角色于其出牌阶段内回复体力时,你可以选择一项:1、摸一张牌;2、令该角色摸两张牌 ', - mingshi_info:'当你即将受到伤害时,若伤害来源的体力值大于你,你可以弃置一张黑色手牌令伤害-1 ', - lirang_info:'当你的牌因弃置而置入弃牌堆时,你可以将其中的任意张牌交给其他角色', - moukui_info:'当你使用【杀】指定一名角色为目标后,你可以选择一项:摸一张牌,或弃置其一张牌。若如此做,此【杀】被【闪】抵消时,该角色弃置你的一张牌。 ', - qiangwu_info:'出牌阶段,你可以进行一次判定。若如此做,则直到回合结束,你使用点数小于判定牌的 【杀】时不受距离限制,且你使用点数大于判定牌的【杀】时不计入出牌阶段的使用次数。', - shenxian_info:'每名角色的回合限一次,你的回合外,每当有其他角色因弃置而失去牌时,若其中有基本牌,你可以摸一张牌。', - qiluan_info:'每当你杀死一名角色后,可以在此回合结束时摸三张牌。', - qiluan_info_guozhan:'当你杀死一名角色后,你可于此回合结束后摸三张牌', - zhendu_info:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用一张【酒】,然后你对其造成一点伤害。', - shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌', - shoucheng_info:'每当一名其他角色在其回合外失去最后的手牌时,你可令该角色摸一张牌。', - shengxi_info:'若你于出牌阶段未造成伤害,你可在弃牌阶段开始时摸两张牌。', - hengzheng_info:'摸牌阶段开始时,若你的体力值为1或你没有手牌,你可以改为获得每名其他角色区域里的一张牌。', - cunsi_info:'限定技,出牌阶段,你可以将所有手牌交给一名男性角色,令该角色获得技能【勇决】,然后将武将牌翻面', - guixiu_info:'每当你成为杀的目标,若你的手牌数小于体力值,可以摸一张牌', - fenming_info:'结束阶段开始时,若你处于连环状态,你可以弃置处于连环状态的每名角色的一张牌。', - duanxie_info:'出牌阶段限一次,你可以令一名其他角色横置武将牌,若如此做,你横置武将牌。', - xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌并令你摸一张牌;2.受到你对其造成的1点伤害。', - sijian_info:'当你失去最后的手牌时,你可以弃置一名其他角色的一张牌。', - suishi_info:'每当其他角色进入濒死状态时,伤害来源可以令你摸一张牌;每当其他角色死亡时,伤害来源可以令你失去1点体力', - quji_info:'出牌阶段限一次,你可以弃置X张牌(X为你已损失的体力值),然后令至多X名已受伤的角色各回复1点体力。若你以此法弃置的牌中有黑色牌,你失去一点体力。', - junbing_info:'一名角色的结束阶段开始时,若其手牌数少于或者等于1,该角色可以摸一张牌。若如此做,该角色须将所有手牌交给你,然后你交给其等量的牌。', - xiongyi_info:'限定技,出牌阶段,你可以指定至多三名角色与你各摸三张牌;若你指定的角色数不超过2,你回复1点体力', - xiongyi_info_guozhan:'限定技,出牌阶段,你可以令与你势力相同的所有角色各摸三张牌,然后若你的势力是角色最少的势力(或之一),则你回复1点体力', - shenzhi_info:'准备阶段开始时,你可以弃置所有手牌,若你以此法弃置的牌的张数不小于X,你回复1点体力(X为你当前的体力值)。', - shushen_info:'当你回复1点体力时,你可以令一名其他角色回复1点体力或摸两张牌', - wuji_info:'觉醒技,结束阶段,若你于此回合内造成过3点或更多伤害,你加1点体力上限并回复1点体力,失去"虎啸",然后从场上、牌堆或弃牌堆中获得【青龙偃月刀】', - xueji_info:'出牌阶段限一次,你可以弃置一张红色牌,然后选择至多X名角色,横置这些角色并对其中一名角色造成1点火焰伤害。(X为你已损失的体力值数且至少为1)', - huxiao_info:'锁定技,当你造成火焰伤害后,受到此伤害的角色各摸一张牌,本回合你对这些角色使用牌没有次数限制', - aocai_info:'当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌。若你观看的牌中有此牌,你可以使用打出之。', - hongyuan_info:'摸牌阶段摸牌时,你可以少摸一张牌,然后指定至多两名其他角色各摸一张牌。', - hongyuan_info_combat:'摸牌阶段摸牌时,你可以少摸一张牌,然后令其他友方角色各摸一张牌', - huanshi_info:'一名角色的判定牌生效前,你可令其观看你的手牌。若如此做,该角色选择你的一张牌,令你打出此牌代替之。', - mingzhe_info:'你的回合外,每当你因使用、打出或弃置而失去一张红色牌时,你可以摸一张牌。', - duwu_info:'出牌阶段,你可以弃置X张牌对你攻击范围内的一名其他角色造成1点伤害(X为该角色的体力值)。若你以此法令该角色进入濒死状态,则濒死状态结算后你失去1点体力,且本回合不能再发动黩武。', - tianming_info:'当你成为【杀】的目标时,你可以弃置两张牌(不足则全弃,无牌则不弃),然后摸两张牌;若此时全场体力值最多的角色仅有一名(且不是你),该角色也可以如此做。', - mizhao_info:'出牌阶段,你可以将所有手牌(至少一张)交给一名其他角色。若如此做,你令该角色与你指定的另一名有手牌的角色拼点。视为拼点赢的角色对没赢的角色使用一张【杀】。每阶段限一次。', - yuanhu_info:'结束阶段开始时,你可以将一张装备牌置于一名角色的装备区里,然后根据此装备牌的种类执行以下效果。武器牌:弃置距离该角色1以内的一名角色区域中的一张牌;防具牌:该角色摸一张牌;坐骑牌:该角色回复1点体力。', - lihun_info:'出牌阶段,你可以弃置一张牌并将你的武将牌翻面,若如此做,你指定一名男性角色,获得其所有手牌。出牌阶段结束时,你需为该角色每一点体力分配给其一张牌。每回合限一次。', - chongzhen_info:'每当你发动“龙胆”使用或打出一张手牌时,你可以立即获得对方的一张手牌。', - bifa_info:'结束阶段开始时,你可以将一张手牌移出游戏并指定一名其他角色。该角色的准备阶段,其观看你移出游戏的牌并选择一项:交给你一张与此牌同类型的手牌并获得此牌;或将此牌置入弃牌堆,然后失去1点体力。', - songci_info:'出牌阶段,你可以选择一项:令一名手牌数小于其体力值的角色摸两张牌;或令一名手牌数大于其体力值的角色弃置两张牌。此技能对每名角色只能使用一次。', - yongsi_info:'锁定技,摸牌阶段,你额外摸X张牌,X为场上现存势力数。弃牌阶段,你至少须弃置等同于场上现存势力数的牌(不足则全弃)。', - yicong_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1', - baobian_info:'锁定技,若你的体力值为3或更少,你视为拥有技能“挑衅”;若你的体力值为2或更少;你视为拥有技能“咆哮”;若你的体力值为1,你视为拥有技能“神速”。', - }, + yicong:'义从', + yongsi:'庸肆', + yongsi1:'庸肆', + yongsi2:'庸肆', + bifa:'笔伐', + bifa2:'笔伐', + songci:'颂词', + baobian:'豹变', + lihun:'离魂', + chongzhen:'冲阵', + chongzhen1:'冲阵', + chongzhen2:'冲阵', + yuanhu:'援护', + tianming:'天命', + mizhao:'密诏', + duwu:'黩武', + mingzhe:'明哲', + huanshi:'缓释', + hongyuan:'弘援', + aocai:'傲才', + aocai2:'傲才', + aocai2_backup:'傲才', + aocai3:'傲才', + huxiao:'虎啸', + huxiao3:'虎啸', + xueji:'血祭', + wuji:'武继', + shushen:'淑慎', + shenzhi:'神智', + xiongyi:'雄异', + junbing:'郡兵', + junbing2:'郡兵', + quji:'去疾', + sijian:'死谏', + suishi:'随势', + suishi2:'随势', + xiaoguo:'骁果', + duanxie:'断绁', + fenming:'奋命', + guixiu:'闺秀', + cunsi:'存嗣', + yongjue:'勇决', + hengzheng:'横征', + shengxi:'生息', + shoucheng:'守成', + shangyi:'尚义', + zhendu:'鸩毒', + qiluan:'戚乱', + qiluan2:'戚乱', + qiluan3:'戚乱', + shenxian:'甚贤', + qiangwu:'枪舞', + moukui:'谋溃', + moukui2:'谋溃', + lirang:'礼让', + mingshi:'名士', + liangzhu:'良助', + kaikang:'慷忾', + wangzun:'妄尊', + tongji:'同疾', + kuiwei:'溃围', + kuiwei2:'溃围', + yanzheng:'严整', + zhoufu:'咒缚', + zhoufu2:'咒缚', + zhoufu3:'咒缚', + yingbin:'影兵', + fenxun:'奋迅', + fenxun2:'奋迅', + spmengjin:'猛进', + xiemu:'协穆', + naman:'纳蛮', + zuixiang:'醉乡', + manjuan:'漫卷', + taichen:'抬榇', + jilei:'鸡肋', + jilei2:'鸡肋', + jilei2_bg:'肋', + fulu:'符箓', + fuji:'助祭', + fenyin:'奋音', + yawang:'雅望', + xunzhi:'殉志', + yingjian:'影箭', + fanxiang:'返乡', + fanxiang_info:'觉醒技,准备阶段开始时,若全场有至少一名已受伤且你曾发动【良助】令其摸牌的角色,则你回复1点体力和体力上限,失去技能【良助】并获得技能【枭姬】', + yingjian_info:'准备阶段,你可以视为使用一张无视距离的杀', + xunzhi_info:'准备阶段开始时,若你的上家和下家与你的体力值均不相等,你可以失去1点体力。若如此做,你的手牌上限+2', + yawang_info:'锁定技,摸牌阶段开始时,你改为摸x张牌,然后你于出牌阶段内至多使用x张牌(x为与你体力值相等的角色数)', + fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌颜色不同,则你可以摸一张牌,每回合最多发动3次', + fuji_info:'当一名角色造成雷电伤害时,你可以令其进行一次判定,若结果为黑色,此伤害+1;若结果为红色,该角色获得此牌。', + fulu_info:'你可以将【杀】当雷【杀】使用。', + jilei_info:'每当你受到有来源的伤害时,你可以选择一种牌的类别,令伤害来源不能使用、打出或弃置其此类别的手牌,直到回合结束', + danlao:'啖酪', + danlao_info:'当你成为一张指定了多个目标的锦囊牌的目标时,你可以取消之,并摸一张牌。', + gongao:'功獒', + zhuiji:'追击', + chouhai:'仇海', + chouhai_info:'锁定技,当你每次受到伤害时,若你没有手牌,此伤害+1。', + guiming:'归命', + guiming_info:'主公技,锁定技,你将残蚀描述中的“已受伤角色”改为“已受伤角色或其他吴势力角色”', + chixin:'赤心', + chixin1:'赤心', + chixin2:'赤心', + chixin_info:'你可以将♦牌当【杀】或【闪】使用或打出。出牌阶段,你对你攻击范围内的每名角色均可使用一张【杀】。', + suiren:'随仁', + suiren_info:'限定技,准备阶段开始时,你可以失去技能“义从”,然后加1点体力上限并回复1点体力,再令一名角色摸三张牌。', + canshi:'残蚀', + canshi2:'残蚀', + canshi_info:'摸牌阶段开始时,你可以改为摸x张牌(x为已受伤的角色数),若如此做,当你与此回合内使用基本牌或锦囊牌时,你弃置一张牌。', + zhuiji_info:'锁定技,你与体力值低于你的角色距离为1。', + kunfen:'困奋', + kunfen_info:'锁定技,结束阶段开始时,你失去1点体力,然后摸两张牌', + fengliang:'逢亮', + fengliang_info:'觉醒技,当你进入濒死状态时,你减1点体力上限并将体力值回复至2点,然后获得技能挑衅,将困奋改为非锁定技', + cihuai:'刺槐', + cihuai_info:'出牌阶段开始时,若你手牌中没有杀,你可以展示你的手牌,视为对一名角色使用一张杀', + gongao_info:'锁定技,每当一名角色死亡后,你增加一点体力上限,回复一点体力。', + juyi:'举义', + juyi_info:'觉醒技,准备阶段开始时,若你已受伤且体力上限大于存活角色数,你须将手牌摸至体力上限,然后获得技能“崩坏”和“威重”。', + weizhong:'威重', + weizhong_info:'锁定技,每当你的体力上限增加或减少时,你摸一张牌。', + taichen_info:'出牌阶段限一次,你可以自减一点体力,视为对一名角色使用一张杀(不计入回合内出杀限制)', + manjuan_info:'其他角色的卡牌因弃置而进入弃牌堆后,你可以弃置一张花色与之不同的牌,然后获得之', + zuixiang_info:'限定技,准备阶段开始时,你可以展示牌库顶的3张牌并置于你的武将牌上,你不可使用或打出与该些牌同类的牌,所有同类牌对你无效。之后每个你的准备阶段,你须重复展示一次,直至该些牌中任意两张点数相同时,将你武将牌上的全部牌置于你的手上。', + naman_info:'你可以获得其他角色打出的杀', + xiemu_info:'每当你成为其他角色的黑色牌的目标,可以弃置一张杀并摸两张牌', + spmengjin_info:'每当你使用一张杀,可以弃置目标一张牌', + fenxun_info:'出牌阶段限一次,你可以弃置一张牌并选择一名其他角色,然后本回合你计算与其的距离视为1', + yingbin_info:'受到“咒缚”技能影响的角色进行判定时,你可以摸两张牌。', + zhoufu_info:'出牌阶段限一次,你可以指定一名其他角色并将一张手牌移出游戏(将此牌置于该角色的武将牌旁)。若如此做,该角色进行判定时,改为将此牌作为判定牌。该角色的结束阶段,若此牌仍在该角色旁,你将此牌收入手牌。', + yanzheng_info:'若你的手牌数大于你的体力值,你可以将你装备区内的牌当【无懈可击】使用', + kuiwei_info:'结束阶段开始时,你可以摸2+X张牌,然后将你的武将牌翻面。在你的下个摸牌阶段开始时,你须弃置X张牌。(X等于当时场上装备区内的武器牌的数量)', + tongji_info:'锁定技。若你的手牌数大于你的体力值,则只要你在任一其他角色的攻击范围内,该角色使用【杀】时便不能指定你以外的角色为目标', + wangzun_info:'其他角色的准备阶段,你可以摸一张牌,然后令该角色此回合的手牌上限-1;直到你的回合开始,你不能再次发动此技', + kaikang_info:'每当你距离1以内的角色成为杀的目标后,你可以摸一张牌。若如此做,你交给其一张牌并展示之,若该牌为装备牌,该角色可以使用此牌。', + liangzhu_info:'当一名角色于其出牌阶段内回复体力时,你可以选择一项:1、摸一张牌;2、令该角色摸两张牌 ', + mingshi_info:'当你即将受到伤害时,若伤害来源的体力值大于你,你可以弃置一张黑色手牌令伤害-1 ', + lirang_info:'当你的牌因弃置而置入弃牌堆时,你可以将其中的任意张牌交给其他角色', + moukui_info:'当你使用【杀】指定一名角色为目标后,你可以选择一项:摸一张牌,或弃置其一张牌。若如此做,此【杀】被【闪】抵消时,该角色弃置你的一张牌。 ', + qiangwu_info:'出牌阶段,你可以进行一次判定。若如此做,则直到回合结束,你使用点数小于判定牌的 【杀】时不受距离限制,且你使用点数大于判定牌的【杀】时不计入出牌阶段的使用次数。', + shenxian_info:'每名角色的回合限一次,你的回合外,每当有其他角色因弃置而失去牌时,若其中有基本牌,你可以摸一张牌。', + qiluan_info:'每当你杀死一名角色后,可以在此回合结束时摸三张牌。', + qiluan_info_guozhan:'当你杀死一名角色后,你可于此回合结束后摸三张牌', + zhendu_info:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用一张【酒】,然后你对其造成一点伤害。', + shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌', + shoucheng_info:'每当一名其他角色在其回合外失去最后的手牌时,你可令该角色摸一张牌。', + shengxi_info:'若你于出牌阶段未造成伤害,你可在弃牌阶段开始时摸两张牌。', + hengzheng_info:'摸牌阶段开始时,若你的体力值为1或你没有手牌,你可以改为获得每名其他角色区域里的一张牌。', + cunsi_info:'限定技,出牌阶段,你可以将所有手牌交给一名男性角色,令该角色获得技能【勇决】,然后将武将牌翻面', + guixiu_info:'每当你成为杀的目标,若你的手牌数小于体力值,可以摸一张牌', + fenming_info:'结束阶段开始时,若你处于连环状态,你可以弃置处于连环状态的每名角色的一张牌。', + duanxie_info:'出牌阶段限一次,你可以令一名其他角色横置武将牌,若如此做,你横置武将牌。', + xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌并令你摸一张牌;2.受到你对其造成的1点伤害。', + sijian_info:'当你失去最后的手牌时,你可以弃置一名其他角色的一张牌。', + suishi_info:'每当其他角色进入濒死状态时,伤害来源可以令你摸一张牌;每当其他角色死亡时,伤害来源可以令你失去1点体力', + quji_info:'出牌阶段限一次,你可以弃置X张牌(X为你已损失的体力值),然后令至多X名已受伤的角色各回复1点体力。若你以此法弃置的牌中有黑色牌,你失去一点体力。', + junbing_info:'一名角色的结束阶段开始时,若其手牌数少于或者等于1,该角色可以摸一张牌。若如此做,该角色须将所有手牌交给你,然后你交给其等量的牌。', + xiongyi_info:'限定技,出牌阶段,你可以指定至多三名角色与你各摸三张牌;若你指定的角色数不超过2,你回复1点体力', + xiongyi_info_guozhan:'限定技,出牌阶段,你可以令与你势力相同的所有角色各摸三张牌,然后若你的势力是角色最少的势力(或之一),则你回复1点体力', + shenzhi_info:'准备阶段开始时,你可以弃置所有手牌,若你以此法弃置的牌的张数不小于X,你回复1点体力(X为你当前的体力值)。', + shushen_info:'当你回复1点体力时,你可以令一名其他角色回复1点体力或摸两张牌', + wuji_info:'觉醒技,结束阶段,若你于此回合内造成过3点或更多伤害,你加1点体力上限并回复1点体力,失去"虎啸",然后从场上、牌堆或弃牌堆中获得【青龙偃月刀】', + xueji_info:'出牌阶段限一次,你可以弃置一张红色牌,然后选择至多X名角色,横置这些角色并对其中一名角色造成1点火焰伤害。(X为你已损失的体力值数且至少为1)', + huxiao_info:'锁定技,当你造成火焰伤害后,受到此伤害的角色各摸一张牌,本回合你对这些角色使用牌没有次数限制', + aocai_info:'当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌。若你观看的牌中有此牌,你可以使用打出之。', + hongyuan_info:'摸牌阶段摸牌时,你可以少摸一张牌,然后指定至多两名其他角色各摸一张牌。', + hongyuan_info_combat:'摸牌阶段摸牌时,你可以少摸一张牌,然后令其他友方角色各摸一张牌', + huanshi_info:'一名角色的判定牌生效前,你可令其观看你的手牌。若如此做,该角色选择你的一张牌,令你打出此牌代替之。', + mingzhe_info:'你的回合外,每当你因使用、打出或弃置而失去一张红色牌时,你可以摸一张牌。', + duwu_info:'出牌阶段,你可以弃置X张牌对你攻击范围内的一名其他角色造成1点伤害(X为该角色的体力值)。若你以此法令该角色进入濒死状态,则濒死状态结算后你失去1点体力,且本回合不能再发动黩武。', + tianming_info:'当你成为【杀】的目标时,你可以弃置两张牌(不足则全弃,无牌则不弃),然后摸两张牌;若此时全场体力值最多的角色仅有一名(且不是你),该角色也可以如此做。', + mizhao_info:'出牌阶段,你可以将所有手牌(至少一张)交给一名其他角色。若如此做,你令该角色与你指定的另一名有手牌的角色拼点。视为拼点赢的角色对没赢的角色使用一张【杀】。每阶段限一次。', + yuanhu_info:'结束阶段开始时,你可以将一张装备牌置于一名角色的装备区里,然后根据此装备牌的种类执行以下效果。武器牌:弃置距离该角色1以内的一名角色区域中的一张牌;防具牌:该角色摸一张牌;坐骑牌:该角色回复1点体力。', + lihun_info:'出牌阶段,你可以弃置一张牌并将你的武将牌翻面,若如此做,你指定一名男性角色,获得其所有手牌。出牌阶段结束时,你需为该角色每一点体力分配给其一张牌。每回合限一次。', + chongzhen_info:'每当你发动“龙胆”使用或打出一张手牌时,你可以立即获得对方的一张手牌。', + bifa_info:'结束阶段开始时,你可以将一张手牌移出游戏并指定一名其他角色。该角色的准备阶段,其观看你移出游戏的牌并选择一项:交给你一张与此牌同类型的手牌并获得此牌;或将此牌置入弃牌堆,然后失去1点体力。', + songci_info:'出牌阶段,你可以选择一项:令一名手牌数小于其体力值的角色摸两张牌;或令一名手牌数大于其体力值的角色弃置两张牌。此技能对每名角色只能使用一次。', + yongsi_info:'锁定技,摸牌阶段,你额外摸X张牌,X为场上现存势力数。弃牌阶段,你至少须弃置等同于场上现存势力数的牌(不足则全弃)。', + yicong_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1', + baobian_info:'锁定技,若你的体力值为3或更少,你视为拥有技能“挑衅”;若你的体力值为2或更少;你视为拥有技能“咆哮”;若你的体力值为1,你视为拥有技能“神速”。', + }, + }; }); diff --git a/character/standard.js b/character/standard.js index a6b63fd32..a436a471d 100644 --- a/character/standard.js +++ b/character/standard.js @@ -1,752 +1,748 @@ 'use strict'; -game.import('character',{ - name:'standard', - connect:true, - character:{ - caocao:['male','wei',4,['hujia','jianxiong'],['zhu']], - simayi:['male','wei',3,['fankui','guicai']], - xiahoudun:['male','wei',4,['ganglie']], - zhangliao:['male','wei',4,['tuxi']], - xuzhu:['male','wei',4,['luoyi']], - guojia:['male','wei',3,['tiandu','yiji']], - zhenji:['female','wei',3,['luoshen','qingguo']], - liubei:['male','shu',4,['rende','jijiang'],['zhu']], - guanyu:['male','shu',4,['wusheng']], - zhangfei:['male','shu',4,['paoxiao']], - zhugeliang:['male','shu',3,['guanxing','kongcheng']], - zhaoyun:['male','shu',4,['longdan']], - machao:['male','shu',4,['mashu','tieji']], - huangyueying:['female','shu',3,['jizhi','qicai']], - sunquan:['male','wu',4,['zhiheng','jiuyuan'],['zhu']], - ganning:['male','wu',4,['qixi']], - lvmeng:['male','wu',4,['keji']], - huanggai:['male','wu',4,['kurou']], - zhouyu:['male','wu',3,['yingzi','fanjian']], - daqiao:['female','wu',3,['guose','liuli']], - luxun:['male','wu',3,['qianxun','lianying']], - sunshangxiang:['female','wu',3,['xiaoji','jieyin']], - huatuo:['male','qun',3,['qingnang','jijiu']], - lvbu:['male','qun',4,['wushuang']], - diaochan:['female','qun',3,['lijian','biyue']], - }, - characterIntro:{ - liubei:'先主姓刘,讳备,字玄德,涿郡涿县人,汉景帝子中山靖王胜之后也。以仁德治天下。', - guanyu:'字云长,本字长生,并州河东解州人。五虎上将之首,爵至汉寿亭侯,谥曰“壮缪侯”。被奉为“关圣帝君”,崇为“武圣”。', - zhangfei:'字翼德,涿郡人,燕颔虎须,豹头环眼。有诗云:“长坂坡头杀气生,横枪立马眼圆睁。一声好似轰雷震,独退曹家百万兵”。', - zhugeliang:'字孔明,号卧龙,琅琊阳都人,蜀汉丞相。在世时被封为武乡侯,谥曰忠武侯。著有《出师表》、《诫子书》等。怀不世之才,以空城戏司马,能观星象而通鬼神。', - zhaoyun:'字子龙,常山真定人。身长八尺,姿颜雄伟。长坂坡单骑救阿斗,先主云:“子龙一身都是胆也。”', - machao:'字孟起,扶风茂陵人。面如冠玉,目如流星,虎体猿臂,彪腹狼腰,声雄力猛。因衣着讲究,举止非凡,故人称“锦马超”。麾铁骑,捻金枪。', - huangyueying:'荆州沔南白水人,沔阳名士黄承彦之女,诸葛亮之妻,诸葛瞻之母。容貌甚丑,而有奇才:上通天文,下察地理,韬略近于诸书无所不晓,诸葛亮在南阳闻其贤而迎娶。', - sunquan:'吴大帝,字仲谋,吴郡富春县人。统领吴与蜀魏三足鼎立,制衡天下。', - ganning:'字兴霸,巴郡临江人,祖籍荆州南阳郡。为人勇猛刚强,忠心耿耿,勇往无前。曾带兵百人于二更奇袭曹营,大挫其锐气。', - lvmeng:'字子明,汝南富陂人。陈寿评曰:“吕蒙勇而有谋断,识军计,谲郝普,擒关羽,最其妙者。初虽轻果妄杀,终于克己,有国士之量,岂徒武将而已乎!”', - huanggai:'字公覆,零陵郡泉陵县人。官至偏将军、武陵太守。以苦肉计骗曹孟德,亲往诈降,火烧战船,重创敌军。', - zhouyu:'字公瑾,庐江舒县人,任东吴三军大都督,雄姿英发,人称“美周郎”。赤壁之战前,巧用反间计杀了精通水战的叛将蔡瑁、张允。', - daqiao:'庐江皖县人,为乔公长女,孙策之妻,小乔之姊。与小乔并称为“江东二乔”,容貌国色流离。', - luxun:'本名陆议,字伯言,吴郡吴县人。历任东吴大都督、丞相。吴大帝孙权兄孙策之婿,世代为江东大族。以谦逊之书麻痹关羽,夺取荆州,又有火烧连营大破蜀军。', - sunshangxiang:'孙夫人,乃孙权之妹。刘备定荆州,孙权进妹与其结姻,重固盟好。孙夫人才捷刚猛,有诸兄之风。后人为其立庙,号曰“枭姬庙”。', - caocao:'魏武帝曹操,字孟德,小名阿瞒、吉利,沛国谯人。精兵法,善诗歌,乃治世之能臣,乱世之奸雄也。', - simayi:'晋宣帝,字仲达,河内温人。曾任职过曹魏的大都督,太尉,太傅。少有奇节,聪明多大略,博学洽闻,伏膺儒教,世之鬼才也。', - xiahoudun:'字元让,沛国谯人。有拔矢啖睛之勇,性格勇猛刚烈。', - zhangliao:'字文远,魏雁门马邑人。官至前将军、征东将军、晋阳侯。武功高强,又谋略过人,多次建立奇功,以800人突袭孙权十万大军,皆望风披靡。', - xuzhu:'字仲康,谯国谯县人。和典韦一同统率着曹操的亲卫队“虎卫军”。因为他十分勇猛,所以有“虎痴”的绰号。曾有裸衣斗马超之举。', - guojia:'字奉孝,颍川阳翟人,官至军师祭酒。惜天妒英才,英年早逝。有诗云:“良计环环不遗策,每临制变满座惊”。', - zhenji:'中山无极人,别称甄洛或甄宓,庙号文昭甄皇后。魏文帝曹丕的正室。懂诗文,有倾国倾城之貌,《洛神赋》即是曹植为她所作。', - huatuo:'字元化,一名旉,沛国谯人,“建安三神医”之一。集平生之所得著《青囊经》,现已失传。', - lvbu:'字奉先,五原郡九原县人。三国第一猛将,曾独力战刘关张三人,其武力世之无双。时人语曰:“人中有吕布,马中有赤兔。”', - diaochan:'中国古代四大美女之一,有闭月羞花之貌。司徒王允之义女,由王允授意施行连环计,离间董卓、吕布,借布手除卓。后貂蝉成为吕布的妾。', +game.import('character',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'standard', + connect:true, + character:{ + caocao:['male','wei',4,['hujia','jianxiong'],['zhu']], + simayi:['male','wei',3,['fankui','guicai']], + xiahoudun:['male','wei',4,['ganglie']], + zhangliao:['male','wei',4,['tuxi']], + xuzhu:['male','wei',4,['luoyi']], + guojia:['male','wei',3,['tiandu','yiji']], + zhenji:['female','wei',3,['luoshen','qingguo']], + liubei:['male','shu',4,['rende','jijiang'],['zhu']], + guanyu:['male','shu',4,['wusheng']], + zhangfei:['male','shu',4,['paoxiao']], + zhugeliang:['male','shu',3,['guanxing','kongcheng']], + zhaoyun:['male','shu',4,['longdan']], + machao:['male','shu',4,['mashu','tieji']], + huangyueying:['female','shu',3,['jizhi','qicai']], + sunquan:['male','wu',4,['zhiheng','jiuyuan'],['zhu']], + ganning:['male','wu',4,['qixi']], + lvmeng:['male','wu',4,['keji']], + huanggai:['male','wu',4,['kurou']], + zhouyu:['male','wu',3,['yingzi','fanjian']], + daqiao:['female','wu',3,['guose','liuli']], + luxun:['male','wu',3,['qianxun','lianying']], + sunshangxiang:['female','wu',3,['xiaoji','jieyin']], + huatuo:['male','qun',3,['qingnang','jijiu']], + lvbu:['male','qun',4,['wushuang']], + diaochan:['female','qun',3,['lijian','biyue']], + }, + characterIntro:{ + liubei:'先主姓刘,讳备,字玄德,涿郡涿县人,汉景帝子中山靖王胜之后也。以仁德治天下。', + guanyu:'字云长,本字长生,并州河东解州人。五虎上将之首,爵至汉寿亭侯,谥曰“壮缪侯”。被奉为“关圣帝君”,崇为“武圣”。', + zhangfei:'字翼德,涿郡人,燕颔虎须,豹头环眼。有诗云:“长坂坡头杀气生,横枪立马眼圆睁。一声好似轰雷震,独退曹家百万兵”。', + zhugeliang:'字孔明,号卧龙,琅琊阳都人,蜀汉丞相。在世时被封为武乡侯,谥曰忠武侯。著有《出师表》、《诫子书》等。怀不世之才,以空城戏司马,能观星象而通鬼神。', + zhaoyun:'字子龙,常山真定人。身长八尺,姿颜雄伟。长坂坡单骑救阿斗,先主云:“子龙一身都是胆也。”', + machao:'字孟起,扶风茂陵人。面如冠玉,目如流星,虎体猿臂,彪腹狼腰,声雄力猛。因衣着讲究,举止非凡,故人称“锦马超”。麾铁骑,捻金枪。', + huangyueying:'荆州沔南白水人,沔阳名士黄承彦之女,诸葛亮之妻,诸葛瞻之母。容貌甚丑,而有奇才:上通天文,下察地理,韬略近于诸书无所不晓,诸葛亮在南阳闻其贤而迎娶。', + sunquan:'吴大帝,字仲谋,吴郡富春县人。统领吴与蜀魏三足鼎立,制衡天下。', + ganning:'字兴霸,巴郡临江人,祖籍荆州南阳郡。为人勇猛刚强,忠心耿耿,勇往无前。曾带兵百人于二更奇袭曹营,大挫其锐气。', + lvmeng:'字子明,汝南富陂人。陈寿评曰:“吕蒙勇而有谋断,识军计,谲郝普,擒关羽,最其妙者。初虽轻果妄杀,终于克己,有国士之量,岂徒武将而已乎!”', + huanggai:'字公覆,零陵郡泉陵县人。官至偏将军、武陵太守。以苦肉计骗曹孟德,亲往诈降,火烧战船,重创敌军。', + zhouyu:'字公瑾,庐江舒县人,任东吴三军大都督,雄姿英发,人称“美周郎”。赤壁之战前,巧用反间计杀了精通水战的叛将蔡瑁、张允。', + daqiao:'庐江皖县人,为乔公长女,孙策之妻,小乔之姊。与小乔并称为“江东二乔”,容貌国色流离。', + luxun:'本名陆议,字伯言,吴郡吴县人。历任东吴大都督、丞相。吴大帝孙权兄孙策之婿,世代为江东大族。以谦逊之书麻痹关羽,夺取荆州,又有火烧连营大破蜀军。', + sunshangxiang:'孙夫人,乃孙权之妹。刘备定荆州,孙权进妹与其结姻,重固盟好。孙夫人才捷刚猛,有诸兄之风。后人为其立庙,号曰“枭姬庙”。', + caocao:'魏武帝曹操,字孟德,小名阿瞒、吉利,沛国谯人。精兵法,善诗歌,乃治世之能臣,乱世之奸雄也。', + simayi:'晋宣帝,字仲达,河内温人。曾任职过曹魏的大都督,太尉,太傅。少有奇节,聪明多大略,博学洽闻,伏膺儒教,世之鬼才也。', + xiahoudun:'字元让,沛国谯人。有拔矢啖睛之勇,性格勇猛刚烈。', + zhangliao:'字文远,魏雁门马邑人。官至前将军、征东将军、晋阳侯。武功高强,又谋略过人,多次建立奇功,以800人突袭孙权十万大军,皆望风披靡。', + xuzhu:'字仲康,谯国谯县人。和典韦一同统率着曹操的亲卫队“虎卫军”。因为他十分勇猛,所以有“虎痴”的绰号。曾有裸衣斗马超之举。', + guojia:'字奉孝,颍川阳翟人,官至军师祭酒。惜天妒英才,英年早逝。有诗云:“良计环环不遗策,每临制变满座惊”。', + zhenji:'中山无极人,别称甄洛或甄宓,庙号文昭甄皇后。魏文帝曹丕的正室。懂诗文,有倾国倾城之貌,《洛神赋》即是曹植为她所作。', + huatuo:'字元化,一名旉,沛国谯人,“建安三神医”之一。集平生之所得著《青囊经》,现已失传。', + lvbu:'字奉先,五原郡九原县人。三国第一猛将,曾独力战刘关张三人,其武力世之无双。时人语曰:“人中有吕布,马中有赤兔。”', + diaochan:'中国古代四大美女之一,有闭月羞花之貌。司徒王允之义女,由王允授意施行连环计,离间董卓、吕布,借布手除卓。后貂蝉成为吕布的妾。', - }, - perfectPair:{ - xiahoudun:['xiahouyuan'], - zhenji:['caopi'], - caocao:['xuzhu','dianwei'], - huangzhong:['weiyan'], - zhugeliang:['huangyueying'], - liubei:['guanyu','zhangfei','ganfuren'], - zhaoyun:['liushan'], - daqiao:['xiaoqiao'], - zhouyu:['huanggai','xiaoqiao'], - sunquan:['zhoutai'], - lvbu:['diaochan'], - machao:['madai','mayunlu'], - zhangliao:['zangba'] - }, - skill:{ - hujia:{ - audio:2, - unique:true, - zhuSkill:true, - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(player.storage.hujiaing) return false; - if(!player.hasZhuSkill('hujia')) return false; - if(event.filterCard({name:'shan'})==false) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='wei'; - }); - }, - check:function(event,player){ - if(get.damageEffect(player,event.player,player)>=0) return false; - return true; - }, - content:function(){ - "step 0" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - event.finish(); - } - else if(event.current.group=='wei'){ - if((event.current==game.me&&!_status.auto)||( - get.attitude(event.current,player)>2)|| - event.current.isOnline()){ - player.storage.hujiaing=true; - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张闪?',{name:'shan'}); - next.set('ai',function(){ - var event=_status.event; - return (get.attitude(event.player,event.source)-2); - }); - next.autochoose=lib.filter.autoRespondShan; - next.set('source',player); - } - } - "step 1" - player.storage.hujiaing=false; - if(result.bool){ - event.finish(); - trigger.result=result; - trigger.responded=true; - trigger.animate=false; - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; - } - } - else{ - event.current=event.current.next; - event.goto(0); - } - }, }, - jianxiong:{ - audio:2, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return get.itemtype(event.cards)=='cards'&&get.position(event.cards[0])=='d'; - }, - content:function(){ - player.gain(trigger.cards); - player.$gain2(trigger.cards); - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player){ - if(player.hasSkillTag('jueqing')) return [1,-1]; - if(get.tag(card,'damage')) return [1,0.5]; - } - } - } + perfectPair:{ + xiahoudun:['xiahouyuan'], + zhenji:['caopi'], + caocao:['xuzhu','dianwei'], + huangzhong:['weiyan'], + zhugeliang:['huangyueying'], + liubei:['guanyu','zhangfei','ganfuren'], + zhaoyun:['liushan'], + daqiao:['xiaoqiao'], + zhouyu:['huanggai','xiaoqiao'], + sunquan:['zhoutai'], + lvbu:['diaochan'], + machao:['madai','mayunlu'], + zhangliao:['zangba'] }, - fankui:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return (event.source&&event.source.countCards('he')&&event.source!=player); + skill:{ + hujia:{ + audio:2, + unique:true, + zhuSkill:true, + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(player.storage.hujiaing) return false; + if(!player.hasZhuSkill('hujia')) return false; + if(event.filterCard({name:'shan'})==false) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='wei'; + }); + }, + check:function(event,player){ + if(get.damageEffect(player,event.player,player)>=0) return false; + return true; + }, + content:function(){ + "step 0" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + event.finish(); + } + else if(event.current.group=='wei'){ + if((event.current==game.me&&!_status.auto)||( + get.attitude(event.current,player)>2)|| + event.current.isOnline()){ + player.storage.hujiaing=true; + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张闪?',{name:'shan'}); + next.set('ai',function(){ + var event=_status.event; + return (get.attitude(event.player,event.source)-2); + }); + next.autochoose=lib.filter.autoRespondShan; + next.set('source',player); + } + } + "step 1" + player.storage.hujiaing=false; + if(result.bool){ + event.finish(); + trigger.result=result; + trigger.responded=true; + trigger.animate=false; + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(0); + } + }, }, - content:function(){ - player.gainPlayerCard(get.prompt('fankui',trigger.source),trigger.source,get.buttonValue,'he').set('logSkill',['fankui',trigger.source]); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player.countCards('he')>1&&get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-1.5]; - if(get.attitude(target,player)<0) return [1,1]; + jianxiong:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return get.itemtype(event.cards)=='cards'&&get.position(event.cards[0])=='d'; + }, + content:function(){ + player.gain(trigger.cards); + player.$gain2(trigger.cards); + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player){ + if(player.hasSkillTag('jueqing')) return [1,-1]; + if(get.tag(card,'damage')) return [1,0.5]; } } } - } - }, - guicai:{ - audio:2, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; }, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('guicai')).set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result-get.value(card)/2; - } - else{ - return -result-get.value(card)/2; - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.logSkill('guicai'); - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); + fankui:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return (event.source&&event.source.countCards('he')&&event.source!=player); + }, + content:function(){ + player.gainPlayerCard(get.prompt('fankui',trigger.source),trigger.source,get.buttonValue,'he').set('logSkill',['fankui',trigger.source]); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player.countCards('he')>1&&get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-1.5]; + if(get.attitude(target,player)<0) return [1,1]; } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - ui.discardPile.appendChild(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - if(!get.owner(result.cards[0],'judge')){ - trigger.position.appendChild(result.cards[0]); - } - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, - ai:{ - tag:{ - rejudge:1, - } - } - }, - ganglie:{ - audio:2, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return (event.source!=undefined); - }, - check:function(event,player){ - return (get.attitude(player,event.source)<=0); - }, - content:function(){ - "step 0" - player.judge(function(card){ - if(get.suit(card)=='heart') return -2; - return 2; - }) - "step 1" - if(result.judge<2){ - event.finish();return; - } - trigger.source.chooseToDiscard(2).set('ai',function(card){ - if(card.name=='tao') return -10; - if(card.name=='jiu'&&_status.event.player.hp==1) return -10; - return get.unuseful(card)+2.5*(5-get.owner(card).hp); - }); - "step 2" - if(result.bool==false){ - trigger.source.damage(); - } - }, - ai:{ - result:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return [1,-1]; - if(get.tag(card,'damage')&&get.damageEffect(target,player,player)>0) return [1,0,0,-1.5]; - } - } - } - }, - tuxi:{ - audio:2, - trigger:{player:'phaseDrawBefore'}, - direct:true, - content:function(){ - "step 0" - var check; - var i,num=game.countPlayer(function(current){ - return current!=player&¤t.countCards('h')&&get.attitude(player,current)<=0; - }); - check=(num>=2); - player.chooseTarget(get.prompt('tuxi'),[1,2],function(card,player,target){ - return target.countCards('h')>0&&player!=target; - },function(target){ - if(!_status.event.aicheck) return 0; - var att=get.attitude(_status.event.player,target); - if(target.hasSkill('tuntian')) return att/10; - return 1-att; - }).set('aicheck',check); - "step 1" - if(result.bool){ - player.logSkill('tuxi',result.targets); - player.gainMultiple(result.targets); - trigger.finish(); - trigger.untrigger(); - } - else{ - event.finish(); - } - "step 2" - game.delay(); - }, - ai:{ - threaten:2, - expose:0.3 - } - }, - luoyi:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - check:function(event,player){ - if(player.countCards('h')<3) return false; - if(!player.hasSha()) return false; - return game.hasPlayer(function(current){ - return get.attitude(player,current)<0&&player.canUse('sha',current); - }); - }, - content:function(){ - player.addTempSkill('luoyi2','phaseEnd'); - trigger.num--; - } - }, - luoyi2:{ - trigger:{source:'damageBegin'}, - filter:function(event){ - return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); - }, - forced:true, - content:function(){ - trigger.num++; - } - }, - tiandu:{ - audio:2, - trigger:{player:'judgeEnd'}, - frequent:'check', - check:function(event){ - if(event.result.card.name=='du') return false; - return true; - }, - filter:function(event,player){ - if(get.owner(event.result.card)){ - return false; - } - if(event.nogain&&event.nogain(event.result.card)){ - return false; - } - return true; - }, - content:function(){ - player.gain(trigger.result.card); - player.$gain2(trigger.result.card); - } - }, - yiji:{ - audio:2, - trigger:{player:'damageEnd'}, - frequent:true, - filter:function(event){ - return (event.num>0) - }, - content:function(){ - "step 0" - player.draw(2*trigger.num); - "step 1" - event.cards=result; - "step 2" - player.chooseCardTarget({ - filterCard:function(card){ - return _status.event.getParent().cards.contains(card); - }, - selectCard:[1,event.cards.length], - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return 1-att; - } - return att-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 3" - if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(result.cards,player); - player.$give(result.cards.length,result.targets[0]); - for(var i=0;i=4) return [1,get.tag(card,'damage')*2]; - if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; } } } - } - }, - luoshen:{ - audio:2, - trigger:{player:'phaseBegin'}, - frequent:true, - content:function(){ - "step 0" - if(event.cards==undefined) event.cards=[]; - player.judge(function(card){ - if(get.color(card)=='black') return 1.5; - return -1.5; - },ui.special); - "step 1" - if(result.judge>0){ - event.cards.push(result.card); - if(lib.config.autoskilllist.contains('luoshen')){ - player.chooseBool('是否再次发动?'); + }, + guicai:{ + audio:2, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('guicai')).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result-get.value(card)/2; + } + else{ + return -result-get.value(card)/2; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight'); } else{ - event._result={bool:true}; + event.finish(); + } + "step 2" + if(result.bool){ + player.logSkill('guicai'); + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + ui.discardPile.appendChild(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + if(!get.owner(result.cards[0],'judge')){ + trigger.position.appendChild(result.cards[0]); + } + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, + ai:{ + tag:{ + rejudge:1, } } - else{ - for(var i=0;i0) return [1,0,0,-1.5]; } } - player.gain(event.cards); - if(event.cards.length){ - player.$draw(event.cards); + } + }, + tuxi:{ + audio:2, + trigger:{player:'phaseDrawBefore'}, + direct:true, + content:function(){ + "step 0" + var check; + var i,num=game.countPlayer(function(current){ + return current!=player&¤t.countCards('h')&&get.attitude(player,current)<=0; + }); + check=(num>=2); + player.chooseTarget(get.prompt('tuxi'),[1,2],function(card,player,target){ + return target.countCards('h')>0&&player!=target; + },function(target){ + if(!_status.event.aicheck) return 0; + var att=get.attitude(_status.event.player,target); + if(target.hasSkill('tuntian')) return att/10; + return 1-att; + }).set('aicheck',check); + "step 1" + if(result.bool){ + player.logSkill('tuxi',result.targets); + player.gainMultiple(result.targets); + trigger.finish(); + trigger.untrigger(); } - event.finish(); + else{ + event.finish(); + } + "step 2" + game.delay(); + }, + ai:{ + threaten:2, + expose:0.3 } - "step 2" - if(result.bool){ - event.goto(0); + }, + luoyi:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + check:function(event,player){ + if(player.countCards('h')<3) return false; + if(!player.hasSha()) return false; + return game.hasPlayer(function(current){ + return get.attitude(player,current)<0&&player.canUse('sha',current); + }); + }, + content:function(){ + player.addTempSkill('luoyi2','phaseEnd'); + trigger.num--; } - else{ - player.gain(event.cards); - if(event.cards.length){ - player.$draw(event.cards); + }, + luoyi2:{ + trigger:{source:'damageBegin'}, + filter:function(event){ + return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink(); + }, + forced:true, + content:function(){ + trigger.num++; + } + }, + tiandu:{ + audio:2, + trigger:{player:'judgeEnd'}, + frequent:'check', + check:function(event){ + if(event.result.card.name=='du') return false; + return true; + }, + filter:function(event,player){ + if(get.owner(event.result.card)){ + return false; + } + if(event.nogain&&event.nogain(event.result.card)){ + return false; + } + return true; + }, + content:function(){ + player.gain(trigger.result.card); + player.$gain2(trigger.result.card); + } + }, + yiji:{ + audio:2, + trigger:{player:'damageEnd'}, + frequent:true, + filter:function(event){ + return (event.num>0) + }, + content:function(){ + "step 0" + player.draw(2*trigger.num); + "step 1" + event.cards=result; + "step 2" + player.chooseCardTarget({ + filterCard:function(card){ + return _status.event.getParent().cards.contains(card); + }, + selectCard:[1,event.cards.length], + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + if(ui.selected.cards.length>0) return -1; + if(card.name=='du') return 20; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return 1-att; + } + return att-4; + }, + prompt:'请选择要送人的卡牌' + }); + "step 3" + if(result.bool){ + player.line(result.targets,'green'); + result.targets[0].gain(result.cards,player); + player.$give(result.cards.length,result.targets[0]); + for(var i=0;i=4) return [1,get.tag(card,'damage')*2]; + if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; + } + } } } - } - }, - qingguo:{ - audio:2, - enable:['chooseToRespond'], - filterCard:function(card){ - return get.color(card)=='black'; }, - viewAs:{name:'shan'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{color:'black'})) return false; + luoshen:{ + audio:2, + trigger:{player:'phaseBegin'}, + frequent:true, + content:function(){ + "step 0" + if(event.cards==undefined) event.cards=[]; + player.judge(function(card){ + if(get.color(card)=='black') return 1.5; + return -1.5; + },ui.special); + "step 1" + if(result.judge>0){ + event.cards.push(result.card); + if(lib.config.autoskilllist.contains('luoshen')){ + player.chooseBool('是否再次发动?'); + } + else{ + event._result={bool:true}; + } + } + else{ + for(var i=0;i1) return 0; - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; - if(!ui.selected.cards.length&&card.name=='du') return 20; - var player=get.owner(card); - if(player.hp==player.maxHp||player.storage.rende<0||player.countCards('h')<=1){ - if(ui.selected.cards.length){ + rende:{ + audio:2, + group:['rende1'], + enable:'phaseUse', + filterCard:true, + selectCard:[1,Infinity], + discard:false, + prepare:'give', + filterTarget:function(card,player,target){ + return player!=target; + }, + check:function(card){ + if(ui.selected.cards.length>1) return 0; + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; + if(!ui.selected.cards.length&&card.name=='du') return 20; + var player=get.owner(card); + if(player.hp==player.maxHp||player.storage.rende<0||player.countCards('h')<=1){ + if(ui.selected.cards.length){ + return -1; + } + var players=game.filterPlayer(); + for(var i=0;i=3&& + get.attitude(players[i],player)>=3){ + return 11-get.value(card); + } + } + if(player.countCards('h')>player.hp) return 10-get.value(card); + if(player.countCards('h')>2) return 6-get.value(card); return -1; } - var players=game.filterPlayer(); - for(var i=0;i=3&& - get.attitude(players[i],player)>=3){ - return 11-get.value(card); - } - } - if(player.countCards('h')>player.hp) return 10-get.value(card); - if(player.countCards('h')>2) return 6-get.value(card); - return -1; - } - return 10-get.value(card); - }, - content:function(){ - target.gain(cards,player); - if(typeof player.storage.rende!='number'){ - player.storage.rende=0; - } - if(player.storage.rende>=0){ - player.storage.rende+=cards.length; - if(player.storage.rende>=2){ - player.recover(); - player.storage.rende=-1; - } - } - }, - ai:{ - order:function(skill,player){ - if(player.hp1){ - return 10; - } - return 1; + return 10-get.value(card); }, - result:{ - target:function(player,target){ - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return -10; + content:function(){ + target.gain(cards,player); + if(typeof player.storage.rende!='number'){ + player.storage.rende=0; + } + if(player.storage.rende>=0){ + player.storage.rende+=cards.length; + if(player.storage.rende>=2){ + player.recover(); + player.storage.rende=-1; } - if(target.hasJudge('lebu')) return 0; - var nh=target.countCards('h'); - var np=player.countCards('h'); - if(player.hp==player.maxHp||player.storage.rende<0||player.countCards('h')<=1){ - if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; - } - return Math.max(1,5-nh); } }, - effect:{ - target:function(card,player,target){ - if(player==target&&get.type(card)=='equip'){ - if(player.countCards('e',{subtype:get.subtype(card)})){ - var players=game.filterPlayer(); - for(var i=0;i0){ - return 0; + ai:{ + order:function(skill,player){ + if(player.hp1){ + return 10; + } + return 1; + }, + result:{ + target:function(player,target){ + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + return -10; + } + if(target.hasJudge('lebu')) return 0; + var nh=target.countCards('h'); + var np=player.countCards('h'); + if(player.hp==player.maxHp||player.storage.rende<0||player.countCards('h')<=1){ + if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; + } + return Math.max(1,5-nh); + } + }, + effect:{ + target:function(card,player,target){ + if(player==target&&get.type(card)=='equip'){ + if(player.countCards('e',{subtype:get.subtype(card)})){ + var players=game.filterPlayer(); + for(var i=0;i0){ + return 0; + } } } } } - } + }, + threaten:0.8 + } + }, + rende1:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.rende=0; + } + }, + jijiang:{ + unique:true, + group:['jijiang1','jijiang2'], + zhuSkill:true, + }, + jijiang1:{ + audio:2, + audioname:['liushan'], + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(player.storage.jijianging) return false; + if(!player.hasZhuSkill('jijiang')) return false; + if(event.filterCard({name:'sha'},player,event)==false) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); }, - threaten:0.8 - } - }, - rende1:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.rende=0; - } - }, - jijiang:{ - unique:true, - group:['jijiang1','jijiang2'], - zhuSkill:true, - }, - jijiang1:{ - audio:2, - audioname:['liushan'], - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(player.storage.jijianging) return false; - if(!player.hasZhuSkill('jijiang')) return false; - if(event.filterCard({name:'sha'},player,event)==false) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - content:function(){ - "step 0" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - event.finish(); - } - else if(event.current.group=='shu'){ - player.storage.jijianging=true; - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张杀?',{name:'sha'}); - next.set('ai',function(){ - var event=_status.event; - return (get.attitude(event.player,event.source)-2); - }); - next.set('source',player); - next.autochoose=lib.filter.autoRespondSha; - } - else{ - event.current=event.current.next; - event.redo(); - } - "step 1" - player.storage.jijianging=false; - if(result.bool){ - event.finish(); - trigger.result=result; - trigger.responded=true; - trigger.animate=false; - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + content:function(){ + "step 0" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + event.finish(); } - } - else{ - event.current=event.current.next; - event.goto(0); - } - } - }, - jijiang2:{ - audio:2, - audioname:['liushan'], - enable:'chooseToUse', - filter:function(event,player){ - if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; - if(!player.hasZhuSkill('jijiang')) return false; - if(player.hasSkill('jijiang3')) return false; - if(!lib.filter.cardUsable({name:'sha'},player)) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - filterTarget:function(card,player,target){ - if(_status.event._backup&& - typeof _status.event._backup.filterTarget=='function'&& - !_status.event._backup.filterTarget({name:'sha'},player,target)){ - return false; - } - return player.canUse({name:'sha'},target); - }, - content:function(){ - "step 0" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - player.addSkill('jijiang3'); - event.getParent(2).step=0; - event.finish(); - } - else if(event.current.group=='shu'){ - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀', - function(card,player,event){ - event=event||_status.event; - return card.name=='sha'&&event.source.canUse(card,event.target); - }); - next.set('ai',function(card){ - var event=_status.event; - return get.effect(event.target,card,event.source,event.player); - }); - next.set('source',player); - next.set('target',target); - next.autochoose=lib.filter.autoRespondSha; - } - else{ - event.current=event.current.next; - event.redo(); - } - "step 1" - if(result.bool){ - event.finish(); - if(result.cards&&result.cards.length==1&&result.cards[0].name=='sha'){ - player.useCard(result.cards[0],target).animate=false; + else if(event.current.group=='shu'){ + player.storage.jijianging=true; + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张杀?',{name:'sha'}); + next.set('ai',function(){ + var event=_status.event; + return (get.attitude(event.player,event.source)-2); + }); + next.set('source',player); + next.autochoose=lib.filter.autoRespondSha; } else{ - player.useCard({name:'sha'},target).animate=false; + event.current=event.current.next; + event.redo(); } - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + "step 1" + player.storage.jijianging=false; + if(result.bool){ + event.finish(); + trigger.result=result; + trigger.responded=true; + trigger.animate=false; + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(0); } - } - else{ - event.current=event.current.next; - event.goto(0); } }, - ai:{ - result:{ - target:function(player,target){ - if(player.hasSkill('jijiang3')) return 0; - return get.effect(target,{name:'sha'},player,target); + jijiang2:{ + audio:2, + audioname:['liushan'], + enable:'chooseToUse', + filter:function(event,player){ + if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; + if(!player.hasZhuSkill('jijiang')) return false; + if(player.hasSkill('jijiang3')) return false; + if(!lib.filter.cardUsable({name:'sha'},player)) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, + filterTarget:function(card,player,target){ + if(_status.event._backup&& + typeof _status.event._backup.filterTarget=='function'&& + !_status.event._backup.filterTarget({name:'sha'},player,target)){ + return false; + } + return player.canUse({name:'sha'},target); + }, + content:function(){ + "step 0" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + player.addSkill('jijiang3'); + event.getParent(2).step=0; + event.finish(); + } + else if(event.current.group=='shu'){ + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀', + function(card,player,event){ + event=event||_status.event; + return card.name=='sha'&&event.source.canUse(card,event.target); + }); + next.set('ai',function(card){ + var event=_status.event; + return get.effect(event.target,card,event.source,event.player); + }); + next.set('source',player); + next.set('target',target); + next.autochoose=lib.filter.autoRespondSha; + } + else{ + event.current=event.current.next; + event.redo(); + } + "step 1" + if(result.bool){ + event.finish(); + if(result.cards&&result.cards.length==1&&result.cards[0].name=='sha'){ + player.useCard(result.cards[0],target).animate=false; + } + else{ + player.useCard({name:'sha'},target).animate=false; + } + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(0); } }, - order:function(){ - return get.order({name:'sha'})-0.1; + ai:{ + result:{ + target:function(player,target){ + if(player.hasSkill('jijiang3')) return 0; + return get.effect(target,{name:'sha'},player,target); + } + }, + order:function(){ + return get.order({name:'sha'})-0.1; + }, + } + }, + jijiang3:{ + trigger:{global:['useCardAfter','useSkillAfter','phaseAfter']}, + forced:true, + popup:false, + silent:true, + filter:function(event){ + return event.skill!='jijiang2'&&event.skill!='qinwang2'; }, - } - }, - jijiang3:{ - trigger:{global:['useCardAfter','useSkillAfter','phaseAfter']}, - forced:true, - popup:false, - silent:true, - filter:function(event){ - return event.skill!='jijiang2'&&event.skill!='qinwang2'; - }, - content:function(){ - player.removeSkill('jijiang3'); - } - }, - wusheng:{ - audio:3, - enable:['chooseToRespond','chooseToUse'], - filterCard:function(card,player){ - if(get.zhu(player,'shouyue')) return true; - return get.color(card)=='red'; - }, - position:'he', - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; - } - else{ - if(!player.countCards('he',{color:'red'})) return false; + content:function(){ + player.removeSkill('jijiang3'); } }, - prompt:'将一张红色牌当杀使用或打出', - check:function(card){return 4-get.value(card)}, - ai:{ - skillTagFilter:function(player){ + wusheng:{ + audio:3, + enable:['chooseToRespond','chooseToUse'], + filterCard:function(card,player){ + if(get.zhu(player,'shouyue')) return true; + return get.color(card)=='red'; + }, + position:'he', + viewAs:{name:'sha'}, + viewAsFilter:function(player){ if(get.zhu(player,'shouyue')){ if(!player.countCards('he')) return false; } @@ -754,1010 +750,1022 @@ game.import('character',{ if(!player.countCards('he',{color:'red'})) return false; } }, - respondSha:true, - } - }, - paoxiao:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return Infinity; + prompt:'将一张红色牌当杀使用或打出', + check:function(card){return 4-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + if(get.zhu(player,'shouyue')){ + if(!player.countCards('he')) return false; + } + else{ + if(!player.countCards('he',{color:'red'})) return false; + } + }, + respondSha:true, } }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(!get.zhu(player,'shouyue')) return false; - if(arg&&arg.name=='sha') return true; - return false; + paoxiao:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return Infinity; + } + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(!get.zhu(player,'shouyue')) return false; + if(arg&&arg.name=='sha') return true; + return false; + } } - } - }, - guanxing:{ - audio:2, - audioname:['jiangwei'], - trigger:{player:'phaseBegin'}, - frequent:true, - content:function(){ - "step 0" - if(player.isUnderControl()){ - game.modeSwapPlayer(player); - } - var num=Math.min(5,game.countPlayer()); - if(player.hasSkill('yizhi')&&player.hasSkill('guanxing')){ - num=5; - } - var cards=get.cards(num); - event.cards=cards; - var switchToAuto=function(){ - _status.imchoosing=false; - if(event.dialog) event.dialog.close(); - if(event.control) event.control.close(); - var top=[]; - var judges=player.node.judges.childNodes; - var stopped=false; - if(!player.countCards('h','wuxie')){ - for(var i=0;i0) return false; - if(event.player.group!='wu') return false; - return true; - }, - content:function(){ - player.recover(); - } - }, - qixi:{ - audio:4, - enable:'chooseToUse', - filterCard:function(card){ - return get.color(card)=='black'; - }, - position:'he', - viewAs:{name:'guohe'}, - viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; - }, - prompt:'将一张黑色牌当过河拆桥使用', - check:function(card){return 4-get.value(card)} - }, - keji:{ - audio:4, - trigger:{player:'phaseDiscardBefore'}, - filter:function(event,player){ - return (get.cardCount({name:'sha'},player)==0); - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - } - }, - kurou:{ - audio:4, - enable:'phaseUse', - prompt:'失去一点体力并摸两张牌', - content:function(){ - "step 0" - player.loseHp(1); - "step 1" - player.draw(2); - }, - ai:{ - basic:{ - order:1 - }, - result:{ - player:function(player){ - if(player.countCards('h')>=player.hp-1) return -1; - if(player.hp<3) return -1; - return 1; + "step 1" + if(event.result=='ai'||!event.result){ + event.switchToAuto(); } - } - } - }, - yingzi:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - frequent:true, - content:function(){ - trigger.num++; - }, - ai:{ - threaten:1.3 - } - }, - fanjian:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - content:function(){ - "step 0" - target.chooseControl('heart2','diamond2','club2','spade2').set('ai',function(event){ - switch(Math.floor(Math.random()*6)){ - case 0:return 'heart2'; - case 1:case 4:case 5:return 'diamond2'; - case 2:return 'club2'; - case 3:return 'spade2'; - } - }); - "step 1" - game.log(target,'选择了'+get.translation(result.control)); - event.choice=result.control; - target.popup(event.choice); - event.card=player.getCards('h').randomGet(); - target.gain(event.card,player); - player.$give(event.card,target); - game.delay(); - "step 2" - if(get.suit(event.card)+'2'!=event.choice) target.damage('nocard'); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - var eff=get.damageEffect(target,player); - if(eff>=0) return 1+eff; - var value=0,i; - var cards=player.getCards('h'); - for(i=0;i0; - }, - enable:'chooseToUse', - filterCard:function(card){ - return get.suit(card)=='diamond'; - }, - position:'he', - viewAs:{name:'lebu'}, - prompt:'将一张方片牌当乐不思蜀使用', - check:function(card){return 6-get.value(card)}, - ai:{ - threaten:1.5 - } - }, - liuli:{ - audio:2, - trigger:{target:'shaBefore'}, - direct:true, - priority:5, - filter:function(event,player){ - if(player.countCards('he')==0) return false; - return game.hasPlayer(function(current){ - return get.distance(player,current,'attack')<=1&¤t!=event.player&& - current!=player&&lib.filter.targetEnabled(event.card,event.player,current); - }); - }, - content:function(){ - "step 0" - var next=player.chooseCardTarget({ - position:'he', - filterCard:lib.filter.cardDiscardable, - filterTarget:function(card,player,target){ - var trigger=_status.event.getTrigger(); - if(get.distance(player,target,'attack')<=1&& - target!=trigger.player&&target!=player){ - if(player.canUse(trigger.card,target)) return true; + for(i=0;i0; - var vcard={name:'shacopy',nature:card.nature,suit:card.suit}; - var players=game.filterPlayer(); - for(var i=0;i0){ - if(!player.canUse(card,players[0])){ - return [0,0.1]; - } - min=0; - } + for(i=0;iplayer.hp) - return 8-get.value(card) - if(player.hp=target.maxHp) return false; - if(target==player) return false; - return true; - }, - content:function(){ - player.recover(); - target.recover(); - }, - ai:{ - order:5.5, - result:{ - player:function(player){ - if(player.hpplayer.hp) return 0 - return -1; + longdan:{ + group:['longdan_sha','longdan_shan','longdan_draw'], + subSkill:{ + draw:{ + trigger:{player:['useCard','respond']}, + forced:true, + popup:false, + filter:function(event,player){ + if(!get.zhu(player,'shouyue')) return false; + return event.skill=='longdan_sha'||event.skill=='longdan_shan'; + }, + content:function(){ + player.draw(); + player.storage.fanghun2++; + } }, - target:4 + sha:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + filterCard:{name:'shan'}, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.countCards('h','shan')) return false; + }, + prompt:'将一张闪当杀使用或打出', + check:function(){return 1}, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondSha')&¤t<0) return 0.6 + } + }, + respondSha:true, + skillTagFilter:function(player){ + if(!player.countCards('h','shan')) return false; + }, + order:function(){ + return get.order({name:'sha'})+0.1; + }, + useful:-1, + value:-1 + } + }, + shan:{ + audio:2, + enable:['chooseToRespond'], + filterCard:{name:'sha'}, + viewAs:{name:'shan'}, + prompt:'将一张杀当闪打出', + check:function(){return 1}, + viewAsFilter:function(player){ + if(!player.countCards('h','sha')) return false; + }, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(!player.countCards('h','sha')) return false; + }, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.6 + } + }, + order:4, + useful:-1, + value:-1 + } + } + } + }, + mashu:{ + mod:{ + globalFrom:function(from,to,distance){ + return distance-1; + } + } + }, + feiying:{ + mod:{ + globalTo:function(from,to,distance){ + return distance+1; + } + } + }, + tieji:{ + audio:2, + trigger:{player:'shaBegin'}, + check:function(event,player){ + return get.attitude(player,event.target)<=0; }, - threaten:2, - } - }, - qingnang:{ - audio:2, - enable:'phaseUse', - filterCard:true, - usable:1, - check:function(card){ - return 9-get.value(card) - }, - filterTarget:function(card,player,target){ - if(target.hp>=target.maxHp) return false; - return true; - }, - content:function(){ - target.recover(); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(target.hp==1) return 5; - if(player==target&&player.countCards('h')>player.hp) return 5; - return 2; - } - }, - threaten:2 - } - }, - jijiu:{ - audio:2, - enable:'chooseToUse', - filter:function(event,player){ - return _status.currentPhase!=player; - }, - filterCard:function(card){ - return get.color(card)=='red'; - }, - position:'he', - viewAs:{name:'tao'}, - prompt:'将一张红色牌当桃使用', - check:function(card){return 15-get.value(card)}, - ai:{ - skillTagFilter:function(player){ - return player.countCards('he',{color:'red'})>0&&_status.currentPhase!=player; - }, - threaten:1.5, - save:true, - } - }, - wushuang:{ - forced:true, - group:['wushuang1','wushuang2'] - }, - wushuang1:{ - audio:2, - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return !event.directHit; - }, - content:function(){ - "step 0" - var next=trigger.target.chooseToRespond({name:'shan'}); - next.autochoose=lib.filter.autoRespondShan; - next.set('ai',function(card){ - if(_status.event.player.countCards('h','shan')>1){ - return get.unuseful2(card); - } - return -1; - }); - "step 1" - if(result.bool==false){ - trigger.untrigger(); - trigger.directHit=true; - } - } - }, - wushuang2:{ - audio:2, - trigger:{player:'juedou',target:'juedou'}, - forced:true, - filter:function(event,player){ - return event.turn!=player; - }, - content:function(){ - "step 0" - var next=trigger.turn.chooseToRespond({name:'sha'}); - next.autochoose=lib.filter.autoRespondSha; - next.set('ai',function(card){ - var player=_status.event.player; - var trigger=_status.event.getTrigger(); - if(get.attitude(trigger.turn,player)<0&&trigger.turn.countCards('h','sha')>1){ - return get.unuseful2(card); - } - return -1; - }); - "step 1" - if(result.bool==false){ - trigger.directHit=true; - } - }, - ai:{ - result:{ - target:function(card,player,target){ - if(card.name=='juedou'&&target.countCards('h')>0) return [1,0,0,-1]; - } - } - } - }, - lijian:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.countPlayer(function(current){ - return current!=player&¤t.sex=='male'; - })>1; - }, - check:function(card){return 10-get.value(card)}, - filterCard:true, - position:'he', - filterTarget:function(card,player,target){ - if(player==target) return false; - if(target.sex!='male') return false; - if(ui.selected.targets.length==1){ - return target.canUse({name:'juedou'},ui.selected.targets[0]); - } - return true; - }, - targetprompt:['先出杀','后出杀'], - selectTarget:2, - multitarget:true, - content:function(){ - targets[1].useCard({name:'juedou'},targets[0],'noai').animate=false; - game.delay(0.5); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(ui.selected.targets.length==0){ - return -3; + logTarget:'target', + content:function(){ + "step 0" + player.judge(function(card){ + if(get.zhu(_status.event.player,'shouyue')){ + if(get.suit(card)!='spade') return 2; } else{ - return get.effect(target,{name:'juedou'},ui.selected.targets[0],target); + if(get.color(card)=='red') return 2; } + return -0.5; + }); + "step 1" + if(result.bool){ + trigger.directHit=true; + } + } + }, + jizhi:{ + audio:2, + audioname:['jianyong'], + trigger:{player:'useCard'}, + frequent:true, + filter:function(event){ + return (get.type(event.card)=='trick'&&event.cards[0]&&event.cards[0]==event.card); + }, + content:function(){ + player.draw(); + }, + ai:{ + threaten:1.4, + noautowuxie:true, + } + }, + qicai:{ + mod:{ + targetInRange:function(card,player,target,now){ + var type=get.type(card); + if(type=='trick'||type=='delay') return true; } }, - expose:0.4, - threaten:3, - } - }, - biyue:{ - audio:2, - trigger:{player:'phaseEnd'}, - frequent:true, - content:function(){ - player.draw(); + }, + zhiheng:{ + audio:2, + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + selectCard:[1,Infinity], + prompt:'弃置任意张牌并摸等量的牌', + check:function(card){ + return 6-get.value(card) + }, + content:function(){ + player.draw(cards.length); + }, + ai:{ + order:1, + result:{ + player:1 + }, + threaten:1.5 + }, + }, + jiuyuan:{ + audio:2, + unique:true, + trigger:{target:'taoBegin'}, + zhuSkill:true, + forced:true, + filter:function(event,player){ + if(event.player==player) return false; + if(!player.hasZhuSkill('jiuyuan')) return false; + if(player.hp>0) return false; + if(event.player.group!='wu') return false; + return true; + }, + content:function(){ + player.recover(); + } + }, + qixi:{ + audio:4, + enable:'chooseToUse', + filterCard:function(card){ + return get.color(card)=='black'; + }, + position:'he', + viewAs:{name:'guohe'}, + viewAsFilter:function(player){ + if(!player.countCards('he',{color:'black'})) return false; + }, + prompt:'将一张黑色牌当过河拆桥使用', + check:function(card){return 4-get.value(card)} + }, + keji:{ + audio:4, + trigger:{player:'phaseDiscardBefore'}, + filter:function(event,player){ + return (get.cardCount({name:'sha'},player)==0); + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + } + }, + kurou:{ + audio:4, + enable:'phaseUse', + prompt:'失去一点体力并摸两张牌', + content:function(){ + "step 0" + player.loseHp(1); + "step 1" + player.draw(2); + }, + ai:{ + basic:{ + order:1 + }, + result:{ + player:function(player){ + if(player.countCards('h')>=player.hp-1) return -1; + if(player.hp<3) return -1; + return 1; + } + } + } + }, + yingzi:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + frequent:true, + content:function(){ + trigger.num++; + }, + ai:{ + threaten:1.3 + } + }, + fanjian:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + content:function(){ + "step 0" + target.chooseControl('heart2','diamond2','club2','spade2').set('ai',function(event){ + switch(Math.floor(Math.random()*6)){ + case 0:return 'heart2'; + case 1:case 4:case 5:return 'diamond2'; + case 2:return 'club2'; + case 3:return 'spade2'; + } + }); + "step 1" + game.log(target,'选择了'+get.translation(result.control)); + event.choice=result.control; + target.popup(event.choice); + event.card=player.getCards('h').randomGet(); + target.gain(event.card,player); + player.$give(event.card,target); + game.delay(); + "step 2" + if(get.suit(event.card)+'2'!=event.choice) target.damage('nocard'); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + var eff=get.damageEffect(target,player); + if(eff>=0) return 1+eff; + var value=0,i; + var cards=player.getCards('h'); + for(i=0;i0; + }, + enable:'chooseToUse', + filterCard:function(card){ + return get.suit(card)=='diamond'; + }, + position:'he', + viewAs:{name:'lebu'}, + prompt:'将一张方片牌当乐不思蜀使用', + check:function(card){return 6-get.value(card)}, + ai:{ + threaten:1.5 + } + }, + liuli:{ + audio:2, + trigger:{target:'shaBefore'}, + direct:true, + priority:5, + filter:function(event,player){ + if(player.countCards('he')==0) return false; + return game.hasPlayer(function(current){ + return get.distance(player,current,'attack')<=1&¤t!=event.player&& + current!=player&&lib.filter.targetEnabled(event.card,event.player,current); + }); + }, + content:function(){ + "step 0" + var next=player.chooseCardTarget({ + position:'he', + filterCard:lib.filter.cardDiscardable, + filterTarget:function(card,player,target){ + var trigger=_status.event.getTrigger(); + if(get.distance(player,target,'attack')<=1&& + target!=trigger.player&&target!=player){ + if(player.canUse(trigger.card,target)) return true; + } + return false; + }, + ai1:function(card){ + return get.unuseful(card)+9; + }, + ai2:function(target){ + if(_status.event.player.countCards('h','shan')){ + return -get.attitude(_status.event.player,target); + } + if(get.attitude(_status.event.player,target)<5){ + return 6-get.attitude(_status.event.player,target); + } + if(_status.event.player.hp==1&&player.countCards('h','shan')==0){ + return 10-get.attitude(_status.event.player,target); + } + if(_status.event.player.hp==2&&player.countCards('h','shan')==0){ + return 8-get.attitude(_status.event.player,target); + } + return -1; + }, + prompt:get.prompt('liuli') + }); + "step 1" + if(result.bool){ + player.discard(result.cards); + player.logSkill(event.name,result.targets); + trigger.target=result.targets[0]; + trigger.targets.remove(player); + trigger.targets.push(result.targets[0]); + } + else{ + event.finish(); + } + "step 2" + trigger.untrigger(); + trigger.trigger('useCardToBefore'); + trigger.trigger('shaBefore'); + game.delay(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(target.countCards('he')==0) return; + if(card.name!='sha') return; + var min=1; + var friend=get.attitude(player,target)>0; + var vcard={name:'shacopy',nature:card.nature,suit:card.suit}; + var players=game.filterPlayer(); + for(var i=0;i0){ + if(!player.canUse(card,players[0])){ + return [0,0.1]; + } + min=0; + } + } + } + return min; + } + } + } + }, + qianxun:{ + mod:{ + targetEnabled:function(card,player,target,now){ + if(card.name=='shunshou'||card.name=='lebu') return false; + } + }, + }, + lianying:{ + audio:2, + trigger:{player:'loseEnd'}, + frequent:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + for(var i=0;iplayer.hp) + return 8-get.value(card) + if(player.hp=target.maxHp) return false; + if(target==player) return false; + return true; + }, + content:function(){ + player.recover(); + target.recover(); + }, + ai:{ + order:5.5, + result:{ + player:function(player){ + if(player.hpplayer.hp) return 0 + return -1; + }, + target:4 + }, + threaten:2, + } + }, + qingnang:{ + audio:2, + enable:'phaseUse', + filterCard:true, + usable:1, + check:function(card){ + return 9-get.value(card) + }, + filterTarget:function(card,player,target){ + if(target.hp>=target.maxHp) return false; + return true; + }, + content:function(){ + target.recover(); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(target.hp==1) return 5; + if(player==target&&player.countCards('h')>player.hp) return 5; + return 2; + } + }, + threaten:2 + } + }, + jijiu:{ + audio:2, + enable:'chooseToUse', + filter:function(event,player){ + return _status.currentPhase!=player; + }, + filterCard:function(card){ + return get.color(card)=='red'; + }, + position:'he', + viewAs:{name:'tao'}, + prompt:'将一张红色牌当桃使用', + check:function(card){return 15-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + return player.countCards('he',{color:'red'})>0&&_status.currentPhase!=player; + }, + threaten:1.5, + save:true, + } + }, + wushuang:{ + forced:true, + group:['wushuang1','wushuang2'] + }, + wushuang1:{ + audio:2, + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return !event.directHit; + }, + content:function(){ + "step 0" + var next=trigger.target.chooseToRespond({name:'shan'}); + next.autochoose=lib.filter.autoRespondShan; + next.set('ai',function(card){ + if(_status.event.player.countCards('h','shan')>1){ + return get.unuseful2(card); + } + return -1; + }); + "step 1" + if(result.bool==false){ + trigger.untrigger(); + trigger.directHit=true; + } + } + }, + wushuang2:{ + audio:2, + trigger:{player:'juedou',target:'juedou'}, + forced:true, + filter:function(event,player){ + return event.turn!=player; + }, + content:function(){ + "step 0" + var next=trigger.turn.chooseToRespond({name:'sha'}); + next.autochoose=lib.filter.autoRespondSha; + next.set('ai',function(card){ + var player=_status.event.player; + var trigger=_status.event.getTrigger(); + if(get.attitude(trigger.turn,player)<0&&trigger.turn.countCards('h','sha')>1){ + return get.unuseful2(card); + } + return -1; + }); + "step 1" + if(result.bool==false){ + trigger.directHit=true; + } + }, + ai:{ + result:{ + target:function(card,player,target){ + if(card.name=='juedou'&&target.countCards('h')>0) return [1,0,0,-1]; + } + } + } + }, + lijian:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.countPlayer(function(current){ + return current!=player&¤t.sex=='male'; + })>1; + }, + check:function(card){return 10-get.value(card)}, + filterCard:true, + position:'he', + filterTarget:function(card,player,target){ + if(player==target) return false; + if(target.sex!='male') return false; + if(ui.selected.targets.length==1){ + return target.canUse({name:'juedou'},ui.selected.targets[0]); + } + return true; + }, + targetprompt:['先出杀','后出杀'], + selectTarget:2, + multitarget:true, + content:function(){ + targets[1].useCard({name:'juedou'},targets[0],'noai').animate=false; + game.delay(0.5); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(ui.selected.targets.length==0){ + return -3; + } + else{ + return get.effect(target,{name:'juedou'},ui.selected.targets[0],target); + } + } + }, + expose:0.4, + threaten:3, + } + }, + biyue:{ + audio:2, + trigger:{player:'phaseEnd'}, + frequent:true, + content:function(){ + player.draw(); + }, }, }, - }, - translate:{ - caocao:'曹操', - simayi:'司马懿', - xiahoudun:'夏侯惇', - zhangliao:'张辽', - xuzhu:'许褚', - guojia:'郭嘉', - zhenji:'甄姬', - liubei:'刘备', - guanyu:'关羽', - zhangfei:'张飞', - zhugeliang:'诸葛亮', - zhaoyun:'赵云', - machao:'马超', - huangyueying:'黄月英', - sunquan:'孙权', - ganning:'甘宁', - lvmeng:'吕蒙', - huanggai:'黄盖', - zhouyu:'周瑜', - daqiao:'大乔', - luxun:'陆逊', - sunshangxiang:'孙尚香', - huatuo:'华佗', - lvbu:'吕布', - diaochan:'貂蝉', + translate:{ + caocao:'曹操', + simayi:'司马懿', + xiahoudun:'夏侯惇', + zhangliao:'张辽', + xuzhu:'许褚', + guojia:'郭嘉', + zhenji:'甄姬', + liubei:'刘备', + guanyu:'关羽', + zhangfei:'张飞', + zhugeliang:'诸葛亮', + zhaoyun:'赵云', + machao:'马超', + huangyueying:'黄月英', + sunquan:'孙权', + ganning:'甘宁', + lvmeng:'吕蒙', + huanggai:'黄盖', + zhouyu:'周瑜', + daqiao:'大乔', + luxun:'陆逊', + sunshangxiang:'孙尚香', + huatuo:'华佗', + lvbu:'吕布', + diaochan:'貂蝉', - hujia:'护驾', - jianxiong:'奸雄', - fankui:'反馈', - guicai:'鬼才', - ganglie:'刚烈', - tuxi:'突袭', - luoyi:'裸衣', - luoyi2:'裸衣', - tiandu:'天妒', - yiji:'遗计', - luoshen:'洛神', - qingguo:'倾国', - rende:'仁德', - jijiang:'激将', - jijiang1:'激将', - jijiang2:'激将', - wusheng:'武圣', - paoxiao:'咆哮', - guanxing:'观星', - kongcheng:'空城', - kongcheng1:'空城', - longdan:'龙胆', - longdan1:'龙胆', - longdan2:'龙胆', - mashu:'马术', - feiying:'飞影', - tieji:'铁骑', - jizhi:'集智', - qicai:'奇才', - zhiheng:'制衡', - jiuyuan:'救援', - qixi:'奇袭', - keji:'克己', - kurou:'苦肉', - yingzi:'英姿', - fanjian:'反间', - guose:'国色', - liuli:'流离', - qianxun:'谦逊', - lianying:'连营', - xiaoji:'枭姬', - jieyin:'结姻', - qingnang:'青囊', - jijiu:'急救', - wushuang:'无双', - wushuang1:'无双', - wushuang2:'无双', - lijian:'离间', - biyue:'闭月', - pileTop:'牌堆顶', - pileBottom:'牌堆底', - hujia_info:'主公技,魏势力角色可以替你打出[闪]', - jianxiong_info:'你可以立即获得对你造成伤害的牌', - fankui_info:'当你受到伤害时,可以获得伤害来源的一张牌', - guicai_info:'在任意角色的判定牌生效前,你可以打出一张手牌代替之', - ganglie_info:'每当你受到一次伤害,可进行一次判定,若结果不为红桃,则伤害来源须弃置两张手牌或受到来自你的一点伤害', - tuxi_info:'摸牌阶段,你可以改为从1~2名其他角色各抽取一张手牌', - luoyi_info:'摸牌阶段,你可以少摸一张牌,若如此做,你本回合内[杀]或[决斗]造成的伤害+1', - tiandu_info:'你可以立即获得你的判定牌', - yiji_info:'每当你受到一点伤害,可以观看牌堆顶的两张牌,并将其交给任意1~2名角色', - luoshen_info:'准备阶段,你可以进行一定判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌', - qingguo_info:'你可以将一张黑色手牌当[闪]使用或打出', - rende_info:'出牌阶段,你可以将任意手牌送给其他角色,若送出的手牌不少于两张,你回复一点体力', - jijiang_info:'主公技,蜀势力角色可以帮你使用或打出[杀]', - wusheng_info:'你可以将一张红色牌当[杀]使用', - paoxiao_info:'出牌阶段,你使用[杀]无数量限制', - guanxing_info:'准备阶段,你可以观看牌堆顶的x张牌,并将其以任意顺序置于牌堆项或牌堆底,x为存活角色个数且不超过5', - kongcheng_info:'锁定技,当你没有手牌时,不能成为[杀]或[决斗]的目标', - longdan_info:'你可以将[杀]当[闪],或[闪]当[杀]使用或打出', - mashu_info:'锁定技,你的进攻距离+1', - feiying_info:'锁定技,你的防御距离+1', - tieji_info:'当你使用一张[杀]时,可进行一次判定,若为红色则此[杀]不可闪避', - jizhi_info:'每当你使用一张非转化的普通锦囊牌,可以摸一张牌', - qicai_info:'锁定技,你使用的锦囊牌无距离限制', - zhiheng_info:'出牌阶段,你可以弃置任意张牌并摸等量的牌,每阶段限1次', - jiuyuan_info:'主公技,锁定技,濒死阶段,吴势力角色对你使用的[桃]额外回复一点体力', - qixi_info:'你可以将一张黑色牌当[过河拆桥]使用', - keji_info:'若你在出牌阶段没有使用[杀],则可跳过弃牌阶段', - kurou_info:'出牌阶段,你可以流失一点体力并摸两张牌', - yingzi_info:'摸牌阶段,你可以额外摸一张牌', - fanjian_info:'出牌阶段,你可以令一名角色选择一种花色并展示你的一张手牌,若选择的花色与展示的不同,该角色受到来自你的一点伤害。结算结束后该角色获得展示的牌。每阶段限1次', - guose_info:'你可以将一张方片花色的手牌当[乐不思蜀]使用', - liuli_info:'当你成为[杀]的目标时,可以弃置一张牌将其转移给攻击范围内的一名其他角色,此角色不能是[杀]的使用者', - qianxun_info:'锁定技,你不能成为[顺手牵羊]和[乐不思蜀]的目标', - lianying_info:'每当你失去最后一张手牌,可摸一张牌', - xiaoji_info:'每当你失去一张装备牌,可以摸两张牌', - jieyin_info:'出牌阶段,你可以弃置两张牌并选择1名已经受伤的男性角色,你与其各回复一点体力,每阶段限一次', - qingnang_info:'出牌阶段,你可以弃置一张手牌令一名角色回复一点体力,每阶段限一次', - jijiu_info:'回合外,你可以将一张红色牌当[桃]使用', - wushuang_info:'锁定技,你使用的[杀]或[决斗]需要两张[闪]或[杀]响应', - lijian_info:'出牌阶段,你可以弃一张牌,视为一名男性角色对另一名男性角色使用一张[决斗],每阶段限一次', - biyue_info:'结束阶段,你可以摸一张牌', - }, + hujia:'护驾', + jianxiong:'奸雄', + fankui:'反馈', + guicai:'鬼才', + ganglie:'刚烈', + tuxi:'突袭', + luoyi:'裸衣', + luoyi2:'裸衣', + tiandu:'天妒', + yiji:'遗计', + luoshen:'洛神', + qingguo:'倾国', + rende:'仁德', + jijiang:'激将', + jijiang1:'激将', + jijiang2:'激将', + wusheng:'武圣', + paoxiao:'咆哮', + guanxing:'观星', + kongcheng:'空城', + kongcheng1:'空城', + longdan:'龙胆', + longdan1:'龙胆', + longdan2:'龙胆', + mashu:'马术', + feiying:'飞影', + tieji:'铁骑', + jizhi:'集智', + qicai:'奇才', + zhiheng:'制衡', + jiuyuan:'救援', + qixi:'奇袭', + keji:'克己', + kurou:'苦肉', + yingzi:'英姿', + fanjian:'反间', + guose:'国色', + liuli:'流离', + qianxun:'谦逊', + lianying:'连营', + xiaoji:'枭姬', + jieyin:'结姻', + qingnang:'青囊', + jijiu:'急救', + wushuang:'无双', + wushuang1:'无双', + wushuang2:'无双', + lijian:'离间', + biyue:'闭月', + pileTop:'牌堆顶', + pileBottom:'牌堆底', + hujia_info:'主公技,魏势力角色可以替你打出[闪]', + jianxiong_info:'你可以立即获得对你造成伤害的牌', + fankui_info:'当你受到伤害时,可以获得伤害来源的一张牌', + guicai_info:'在任意角色的判定牌生效前,你可以打出一张手牌代替之', + ganglie_info:'每当你受到一次伤害,可进行一次判定,若结果不为红桃,则伤害来源须弃置两张手牌或受到来自你的一点伤害', + tuxi_info:'摸牌阶段,你可以改为从1~2名其他角色各抽取一张手牌', + luoyi_info:'摸牌阶段,你可以少摸一张牌,若如此做,你本回合内[杀]或[决斗]造成的伤害+1', + tiandu_info:'你可以立即获得你的判定牌', + yiji_info:'每当你受到一点伤害,可以观看牌堆顶的两张牌,并将其交给任意1~2名角色', + luoshen_info:'准备阶段,你可以进行一定判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌', + qingguo_info:'你可以将一张黑色手牌当[闪]使用或打出', + rende_info:'出牌阶段,你可以将任意手牌送给其他角色,若送出的手牌不少于两张,你回复一点体力', + jijiang_info:'主公技,蜀势力角色可以帮你使用或打出[杀]', + wusheng_info:'你可以将一张红色牌当[杀]使用', + paoxiao_info:'出牌阶段,你使用[杀]无数量限制', + guanxing_info:'准备阶段,你可以观看牌堆顶的x张牌,并将其以任意顺序置于牌堆项或牌堆底,x为存活角色个数且不超过5', + kongcheng_info:'锁定技,当你没有手牌时,不能成为[杀]或[决斗]的目标', + longdan_info:'你可以将[杀]当[闪],或[闪]当[杀]使用或打出', + mashu_info:'锁定技,你的进攻距离+1', + feiying_info:'锁定技,你的防御距离+1', + tieji_info:'当你使用一张[杀]时,可进行一次判定,若为红色则此[杀]不可闪避', + jizhi_info:'每当你使用一张非转化的普通锦囊牌,可以摸一张牌', + qicai_info:'锁定技,你使用的锦囊牌无距离限制', + zhiheng_info:'出牌阶段,你可以弃置任意张牌并摸等量的牌,每阶段限1次', + jiuyuan_info:'主公技,锁定技,濒死阶段,吴势力角色对你使用的[桃]额外回复一点体力', + qixi_info:'你可以将一张黑色牌当[过河拆桥]使用', + keji_info:'若你在出牌阶段没有使用[杀],则可跳过弃牌阶段', + kurou_info:'出牌阶段,你可以流失一点体力并摸两张牌', + yingzi_info:'摸牌阶段,你可以额外摸一张牌', + fanjian_info:'出牌阶段,你可以令一名角色选择一种花色并展示你的一张手牌,若选择的花色与展示的不同,该角色受到来自你的一点伤害。结算结束后该角色获得展示的牌。每阶段限1次', + guose_info:'你可以将一张方片花色的手牌当[乐不思蜀]使用', + liuli_info:'当你成为[杀]的目标时,可以弃置一张牌将其转移给攻击范围内的一名其他角色,此角色不能是[杀]的使用者', + qianxun_info:'锁定技,你不能成为[顺手牵羊]和[乐不思蜀]的目标', + lianying_info:'每当你失去最后一张手牌,可摸一张牌', + xiaoji_info:'每当你失去一张装备牌,可以摸两张牌', + jieyin_info:'出牌阶段,你可以弃置两张牌并选择1名已经受伤的男性角色,你与其各回复一点体力,每阶段限一次', + qingnang_info:'出牌阶段,你可以弃置一张手牌令一名角色回复一点体力,每阶段限一次', + jijiu_info:'回合外,你可以将一张红色牌当[桃]使用', + wushuang_info:'锁定技,你使用的[杀]或[决斗]需要两张[闪]或[杀]响应', + lijian_info:'出牌阶段,你可以弃一张牌,视为一名男性角色对另一名男性角色使用一张[决斗],每阶段限一次', + biyue_info:'结束阶段,你可以摸一张牌', + }, + }; }); diff --git a/character/swd.js b/character/swd.js index bda3b869c..674fb9307 100644 --- a/character/swd.js +++ b/character/swd.js @@ -1,6830 +1,6958 @@ 'use strict'; -game.import('character',{ - name:'swd', - character:{ - swd_huzhongxian:['male','wu',3,['daofa','xielv','hujing']], +game.import('character',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'swd', + character:{ + swd_huzhongxian:['male','wu',3,['daofa','xielv','hujing']], - swd_anka:['male','qun',3,['songci','anlianying']], - swd_septem:['male','qun',4,['jiying','liaoyuan','yishan']], - swd_kama:['female','qun',3,['yueren','shangshi']], - // swd_miles:['male','qun',4,['aojian','miles_xueyi','mohua2']], - swd_nicole:['female','qun',3,['huanjian','lingwu','minjing']], - swd_wangsiyue:['female','wei',3,['duishi','biyue']], - swd_weida:['female','qun',3,['yueren','zhenlie','duijue']], - swd_xuanyuanjianxian:['male','qun',4,['pozhou','huajian','xuanyuan']], + swd_anka:['male','qun',3,['songci','anlianying']], + swd_septem:['male','qun',4,['jiying','liaoyuan','yishan']], + swd_kama:['female','qun',3,['yueren','shangshi']], + // swd_miles:['male','qun',4,['aojian','miles_xueyi','mohua2']], + swd_nicole:['female','qun',3,['huanjian','lingwu','minjing']], + swd_wangsiyue:['female','wei',3,['duishi','biyue']], + swd_weida:['female','qun',3,['yueren','zhenlie','duijue']], + swd_xuanyuanjianxian:['male','qun',4,['pozhou','huajian','xuanyuan']], - swd_chenjingchou:['male','wu',3,['youyin','yihua']], - swd_duguningke:['female','qun',3,['nlianji','touxi']], - swd_guyue:['male','wei',3,['gtiandao','qinyin','wangchen']], - swd_tuobayuer:['female','shu',4,['liuhong','poyue','niepan']], - swd_yuwentuo:['male','shu',4,['wushuang','xielei','kunlunjing']], - swd_yuxiaoxue:['female','wei',3,['huanhun','daixing','yinyue']], + swd_chenjingchou:['male','wu',3,['youyin','yihua']], + swd_duguningke:['female','qun',3,['nlianji','touxi']], + swd_guyue:['male','wei',3,['gtiandao','qinyin','wangchen']], + swd_tuobayuer:['female','shu',4,['liuhong','poyue','niepan']], + swd_yuwentuo:['male','shu',4,['wushuang','xielei','kunlunjing']], + swd_yuxiaoxue:['female','wei',3,['huanhun','daixing','yinyue']], - swd_jiliang:['male','wu',3,['yunchou','gongxin','jqimou']], - swd_shuijing:['female','qun',4,['mojian','duanyue','tuzhen']], - swd_quxian:['female','qun',3,['mojian','huanxia']], - swd_xiyan:['male','qun',3,['jiefen','datong']], - swd_cheyun:['female','wu',3,['shengong','xianjiang','qiaoxie']], - swd_huanyuanzhi:['male','qun',3,['tianshu','lanzhi','mufeng']], - swd_murongshi:['female','shu',4,['duanyi','guxing']], - swd_jipeng:['male','wu',3,['reyingzi','guozao']], - swd_qi:['male','qun',3,['yaotong','heihuo','pojian']], + swd_jiliang:['male','wu',3,['yunchou','gongxin','jqimou']], + swd_shuijing:['female','qun',4,['mojian','duanyue','tuzhen']], + swd_quxian:['female','qun',3,['mojian','huanxia']], + swd_xiyan:['male','qun',3,['jiefen','datong']], + swd_cheyun:['female','wu',3,['shengong','xianjiang','qiaoxie']], + swd_huanyuanzhi:['male','qun',3,['tianshu','lanzhi','mufeng']], + swd_murongshi:['female','shu',4,['duanyi','guxing']], + swd_jipeng:['male','wu',3,['reyingzi','guozao']], + swd_qi:['male','qun',3,['yaotong','heihuo','pojian']], - swd_luchengxuan:['male','wu',4,['ljifeng','lxianglong']], - swd_xiarou:['female','shu',3,['xianghui','huiqi']], - swd_moye:['female','wu',3,['rexue','liuli','senluo']], + swd_luchengxuan:['male','wu',4,['ljifeng','lxianglong']], + swd_xiarou:['female','shu',3,['xianghui','huiqi']], + swd_moye:['female','wu',3,['rexue','liuli','senluo']], - swd_zhaoyun:['male','shu',4,['longdan','pozhen','tanlin']], - swd_hengai:['female','shu',3,['funiao','ningxian','hlingbo']], - swd_duanmeng:['female','shu',4,['xuanying','lieren']], - swd_jiangwu:['male','shu',4,['yijue','dangping']], - swd_tuwei:['male','shu',3,['zhanlu','susheng']], - swd_yeyaxi:['female','shu',3,['rexue','huopu','shenyan']], + swd_zhaoyun:['male','shu',4,['longdan','pozhen','tanlin']], + swd_hengai:['female','shu',3,['funiao','ningxian','hlingbo']], + swd_duanmeng:['female','shu',4,['xuanying','lieren']], + swd_jiangwu:['male','shu',4,['yijue','dangping']], + swd_tuwei:['male','shu',3,['zhanlu','susheng']], + swd_yeyaxi:['female','shu',3,['rexue','huopu','shenyan']], - swd_muyun:['male','wei',4,['zhuhai','polang','jikong']], - swd_lanyin:['female','wei',3,['xingdian','yulin','luomei']], - swd_zhiyin:['female','wei',3,['xuehuang','ningshuang','zhuyu']], - swd_qiner:['female','wei',3,['huanyin','tianhuo','xuanzhou']], - swd_jiuyou:['male','wei',3,['lexue']], - swd_duopeng:['male','wu',3,['luanji','reyingzi']], + swd_muyun:['male','wei',4,['zhuhai','polang','jikong']], + swd_lanyin:['female','wei',3,['xingdian','yulin','luomei']], + swd_zhiyin:['female','wei',3,['xuehuang','ningshuang','zhuyu']], + swd_qiner:['female','wei',3,['huanyin','tianhuo','xuanzhou']], + swd_jiuyou:['male','wei',3,['lexue']], + swd_duopeng:['male','wu',3,['luanji','reyingzi']], - swd_fengtianling:['male','shu',4,['guiyan','jiang']], - swd_huyue:['female','wu',3,['hyunshen','fengming']], - swd_jialanduo:['male','qun',4,['xianyin','mailun']], - swd_rongshuang:['female','wu',3,['suiyan','duanxing']], - swd_zhuoshanzhu:['male','wu',4,['suiyan','wanjun']], - swd_jiting:['female','wei',4,['guanhu','lingshi']], + swd_fengtianling:['male','shu',4,['guiyan','jiang']], + swd_huyue:['female','wu',3,['hyunshen','fengming']], + swd_jialanduo:['male','qun',4,['xianyin','mailun']], + swd_rongshuang:['female','wu',3,['suiyan','duanxing']], + swd_zhuoshanzhu:['male','wu',4,['suiyan','wanjun']], + swd_jiting:['female','wei',4,['guanhu','lingshi']], - swd_sikongyu:['male','wu',4,['sliufeng','linyun','hutian']], - swd_muyue:['female','wei',3,['xingzhui','lingxian','shouyin']], - swd_ziqiao:['female','shu',3,['guaili','fuyan']], - swd_fengyu:['male','shu',4,['fzhenwei','shangxi']], + swd_sikongyu:['male','wu',4,['sliufeng','linyun','hutian']], + swd_muyue:['female','wei',3,['xingzhui','lingxian','shouyin']], + swd_ziqiao:['female','shu',3,['guaili','fuyan']], + swd_fengyu:['male','shu',4,['fzhenwei','shangxi']], - // swd_wushi:['male','wei',3,['zhoufu','yingbin','xuying']], - // swd_lanmoshen:['female','wei',3,['bingjian','lieren']], - swd_huanglei:['male','qun',3,['jilve','gongshen','gaizao']], - // swd_libai:['female','qun',3,['miaobi','zhexian']], - swd_kendi:['male','qun',3,['zhanxing','kbolan']], - // swd_lijing:['male','qun',4,['tianyi','zhuhai']], - swd_lilian:['female','qun',3,['swd_wuxie','lqingcheng']], - // swd_linming:['male','qun',3,['shelie','bifa']], - // swd_philis:['male','qun',4,['yicong','wangxi']], - // swd_pepin:['male','qun',4,['rejianxiong','quhu']], - swd_kangnalishi:['male','qun',1,['busi','xuying','yinguo']], - swd_xuanyuanjiantong:['male','qun',3,['chengjian','huanling']], - swd_huiyan:['male','qun',4,['hwendao','lingfeng','hxunzhi']], + // swd_wushi:['male','wei',3,['zhoufu','yingbin','xuying']], + // swd_lanmoshen:['female','wei',3,['bingjian','lieren']], + swd_huanglei:['male','qun',3,['jilve','gongshen','gaizao']], + // swd_libai:['female','qun',3,['miaobi','zhexian']], + swd_kendi:['male','qun',3,['zhanxing','kbolan']], + // swd_lijing:['male','qun',4,['tianyi','zhuhai']], + swd_lilian:['female','qun',3,['swd_wuxie','lqingcheng']], + // swd_linming:['male','qun',3,['shelie','bifa']], + // swd_philis:['male','qun',4,['yicong','wangxi']], + // swd_pepin:['male','qun',4,['rejianxiong','quhu']], + swd_kangnalishi:['male','qun',1,['busi','xuying','yinguo']], + swd_xuanyuanjiantong:['male','qun',3,['chengjian','huanling']], + swd_huiyan:['male','qun',4,['hwendao','lingfeng','hxunzhi']], - // swd_chenfu:['male','qun',4,['xuanzhou','bingfeng']], - // swd_chengyaojin:['male','qun',4,['jiuchi','jufu']], - swd_shanxiaoxiao:['female','wu',3,['shehun','xiaomoyu']], - swd_yuchiyanhong:['female','shu',3,['huanxing','meihuo']], - // swd_hanteng:['male','qun',4,['kuangfu']], - // swd_heran:['male','qun',3,['yujian','guiyin','shejie']], - // swd_xingtian:['male','qun',8,[]], - // swd_qinshubao:['male','qun',3,['huajing','pingxu']], - // swd_tuobayueer:['female','shu',3,['shushen','biyue']], - // swd_yangshuo:['male','qun',4,['longdan','luomu']], - // swd_zhanglie:['male','qun',4,['huajin','poxiao']], + // swd_chenfu:['male','qun',4,['xuanzhou','bingfeng']], + // swd_chengyaojin:['male','qun',4,['jiuchi','jufu']], + swd_shanxiaoxiao:['female','wu',3,['shehun','xiaomoyu']], + swd_yuchiyanhong:['female','shu',3,['huanxing','meihuo']], + // swd_hanteng:['male','qun',4,['kuangfu']], + // swd_heran:['male','qun',3,['yujian','guiyin','shejie']], + // swd_xingtian:['male','qun',8,[]], + // swd_qinshubao:['male','qun',3,['huajing','pingxu']], + // swd_tuobayueer:['female','shu',3,['shushen','biyue']], + // swd_yangshuo:['male','qun',4,['longdan','luomu']], + // swd_zhanglie:['male','qun',4,['huajin','poxiao']], - swd_hanluo:['male','qun',5,['tiebi']], - swd_fu:['male','qun',5,['yudun']], - swd_linyue:['male','wei',3,['zhenjiu','lmazui']], - swd_zidashu:['male','wu',3,['shoulie','hudun']], - swd_maixing:['male','wu',3,['toudan','shending']], - swd_fuyan:['male','qun',4,['lianda']], - swd_haidapang:['female','wu',3,['bingjian','rumeng']], - swd_shaowei:['female','shu',3,['jianji','huangyu']], + swd_hanluo:['male','qun',5,['tiebi']], + swd_fu:['male','qun',5,['yudun']], + swd_linyue:['male','wei',3,['zhenjiu','lmazui']], + swd_zidashu:['male','wu',3,['shoulie','hudun']], + swd_maixing:['male','wu',3,['toudan','shending']], + swd_fuyan:['male','qun',4,['lianda']], + swd_haidapang:['female','wu',3,['bingjian','rumeng']], + swd_shaowei:['female','shu',3,['jianji','huangyu']], - swd_youzhao:['male','shu',4,['longdan','yuchen']], - swd_shangzhang:['male','shu',4,['lianwu']], - swd_situqiang:['female','shu',3,['fengze','lingyue','jinlin']], + swd_youzhao:['male','shu',4,['longdan','yuchen']], + swd_shangzhang:['male','shu',4,['lianwu']], + swd_situqiang:['female','shu',3,['fengze','lingyue','jinlin']], - swd_chunyuheng:['male','wei',2,['jueqing','shengshou','xuying']], - swd_hanlong:['male','wei',4,['ciqiu','siji']], - swd_yuli:['female','wu',3,['lingxin','tianxiang']], - swd_zhanggao:['male','wei',4,['yicong','poxing']], - swd_shuwaner:['female','shu',3,['sxianjing','huodan']], - swd_xiaohuanglong:['male','wei',3,['yeying','juxi']], + swd_chunyuheng:['male','wei',2,['jueqing','shengshou','xuying']], + swd_hanlong:['male','wei',4,['ciqiu','siji']], + swd_yuli:['female','wu',3,['lingxin','tianxiang']], + swd_zhanggao:['male','wei',4,['yicong','poxing']], + swd_shuwaner:['female','shu',3,['sxianjing','huodan']], + swd_xiaohuanglong:['male','wei',3,['yeying','juxi']], - swd_hupo:['male','wu',3,['dunxing','guiying']], - swd_jiangziya:['male','wu',3,['mingfu','tianlun']], - }, - characterIntro:{ - swd_kendi:'占星大师老肯迪的孙子,老肯迪死后,他也自称肯迪,伪装成老肯迪,以保护老肯迪的藏书。肯迪平常以接受委托抄书与翻译拉丁文书籍为业,除了占星术以外,其余知识也相当广博。为了增长见闻,什么可怕的地方都敢去,所以认识薇达与不少的军官。后来,肯迪的子孙成为伊斯兰地区的大学者,以因果定律的学说著名于世。', - swd_shuwaner:'第一代祝犁黄汉卿的妻子,二代祝犁黄采儿的母亲。陷阱机关师,擅长火系陷阱,并能驱使一种可爆裂来杀敌之神秘「火丹」技术。', - swd_xiaohuanglong:'龙族之幻兽,后土之神将它送给兰茵避险,以保护她安全。', - swd_huzhongxian:'炼妖壶是女娲神所创,是以开天辟地创造生命的工具,开创出万物后即遗留于某一处水底神殿中。由巴蛇及蛟龟守护该神器,过了约莫千年之久,炼妖壶已可幻化成人形,即为壶中仙。此时正因人类对异类的排斥,巴蛇对此愤愤不平,壶中仙与巴蛇讨论人魔共存的方法,但巴蛇觉得壶中仙是另有所图。自不采用,一日趁壶中仙不注意,将炼妖壶的妖怪全数释放,留下蛟龟看守练妖壶,巴蛇率领魔族大军反攻人类,从此人魔之战一直持续着。', - swd_anka:'安卡在数千年前,曾经是法老王的宠物。在法老王过世后,本来要当陪葬品,却被一位也要被陪葬的祭司带着逃走,安卡借着长期跟随祭司,学得不少后来传到欧洲的黑魔法,成了一只猫精。但在欧洲黑猫很不受欢迎,之后遇上卡玛,成为共患难的好友。安卡有许多癖好,像是收集漂亮的石头把它藏起来,若是日后又发现会很高兴。', - swd_septem:'欧洲梅罗文加王朝高卢出生的东方人与日耳曼混血儿,宇文拓的后人。深受丕平三世的器重,主要担任收集情报等工作,因为屡立大功而被受封为骑士。后因接受丕平三世的任务而秘密离开高卢前往东方寻找所谓的战争不败之术,由此踏上漫漫征途。', - swd_kama:'来自印度的爱情精灵,与一只来自埃及的有翼黑猫一同旅行,黑猫名叫安卡。数百年来,卡玛跟人类有数不尽的爱情故事,大部分都以悲剧收场,她不断的在人间徘徊,为的是寻找永恒的知己。', - swd_nicole:'前世是独孤宁珂,灵魂被古月仙人用伏羲琴净化,因此未受到魔界污染。她没有过去的记忆,因此个性单纯,对许多事都好奇。后来受撒旦派遣来引导赛特,希望赛特能加入撒旦的阵营。', - swd_wangsiyue:'长安名士的孙女,熟读四书以及佛经,有才女之称,还没出嫁就有大批追求者,她的字画就能在市集上以高价卖出。她非常喜欢诗,特别是古朴的诗经的诗句,遇到说不出口的事,就用吟诗的方式表达。', - swd_weida:'阿拉伯女性,凯利宾瓦力德之后裔,女中豪杰,做事干脆利落,不喜欢拖拖拉拉。长期的军旅生涯,使她的行事作风与一般女性不同。阿拉伯世界的女子长年戴着面纱,不能与男子一起走路,薇达则是通通不遵守。', - swd_xuanyuanjianxian:'东汉末年,年幼的徐暮云的神识被应龙之女分离出来时附于野狼尸体上,化作金狼。因总想夺回成年徐暮云神识所控制的肉身而时常袭击徐暮云。在木门道获得剑气后化为人形,前往遥远的云和山的彼端,归隐为轩辕剑仙。平常能言善道,出口成章,甚至杀人出血成“书画”为其一绝。', - swd_xuanyuanjiantong:'由轩辕剑鞘幻化而成的仙童,好奇心很重,完全是个小孩子的心,跟轩辕剑仙成一老一少的对比。', - swd_chenjingchou:'为陈朝后裔。忠臣陈辅以“靖北虏,复国仇”为他命名“靖仇”。将所有的复国重任全都寄托于他身上。虽然师傅对其寄予厚望,但长大后的陈靖仇却个性温柔,只喜欢诗词与音乐,非常讨厌杀戮,无心复国,一心只想过着与世无争的平静生活。因这样的性格,被其师责为软弱无能、胸无大志。', - swd_duguningke:'西方魔王撒旦手下的女魔将。由撒旦派往神州,目的是扩大赤贯星在神州九天结界上所划开的裂痕。是撒旦侵略神州的前锋。与宇文拓自幼相识,对他怀有感情。因不愿在宇文拓面前吃下撒旦之果而变得丑陋,在赤贯星上败给陈靖仇一行人后悲凉死去,后古月圣将她的魂魄放入伏羲琴中净化99年,宇文拓带着她的魂魄一路西行,回到欧洲。经过净化后忘记前世记忆,转世成为妮可。', - swd_guyue:'仙山岛最深处隐居的年轻仙人,飘逸潇洒,气质不凡。据说他的医术在仙界,也堪称是第一、第二位之绝。真身为一只白狐,后与修炼成仙的何然同归仙山岛隐居,二人经常在对弈亭对弈,不问世事。', - swd_tuobayuer:'本是拓跋部落(鲜卑)遗民,世世代代保护拓跋族神器“神农鼎”。年幼的她有一次随族人外出游牧时,隋炀帝为凸显天威而发兵侵略冲袭留守的部民,父母惨死,神鼎被夺。自此对隋人产生极深敌意,苦苦恳求姐夫张烈教她武艺,日夜勤练,打算伺机南下找回神鼎,并替父母报仇。', - swd_yuwentuo:'又名杨拓,本是北周皇室后裔,因国家被隋朝所篡,他自小流落於民间。幸好隋朝名将杨素发现了他,看出他的素质,就收他为徒,并让自己师弟杨义臣收他为义子。12岁那年曾用轩辕剑歼灭南陈旧部叛乱,杨素死後,宇文拓就担负起继续捍卫杨家天下的重责大任。后通过昆仑镜预见未来,得知赤贯将要划破九天神州结界,决定再也不管隋家天下安危,转而全心寻找上古神器,只想阻止这场危机,担负起挽救神州的重任。', - swd_yuxiaoxue:'女娲石转世,自幼孤儿,由月河村客栈老板贺老伯抚养,满头白发被当地村人认为是不祥的象征,备受歧视。后来她村子被村人祭祀的河神所摧毁,村人把责任全归咎于她,她因而被永远逐出了自己故乡。', - swd_jiliang:'故韩王国贵族出身,世代公卿,祖父被封于张邑,因此也以张为氏。喜好思考,心思敏捷聪慧,好奇心非常旺盛。尽管看来手无缚鸡之力,但却能以过人的智慧,凭藉著最少的情报,而去推演出全局;以一人之力,而胜过千军万马。', - swd_shuijing:'墨家的年轻女弟子,故赵王国人。亲人在秦战火中丧生,被协防赵国的墨家弟子在废墟之中发现,带回交由墨家夫人收容抚养。', - swd_quxian:'墨家年轻女弟子,故楚王国人。出身贵族,带有独特高贵气质。由于亲眼目睹全家死于秦人机关部队,心中有难以抹灭之阴影。', - swd_xiyan:'来自云中界的灵犀族,被壶中仙选中做为入室弟子,由他负责整合云中界的种族纠纷。', - swd_cheyun:'令狐国人,祖父是令狐国的大夫。但昔日由于研究“御木为兵”的“木甲术”而被政敌北宫大夫构陷,最后遭到抄家灭族;车芸年幼,因之只被处以刖刑,需以木制义肢来行走。由家臣端木氏抚养,之后她继续秘密研究祖父的木甲术,誓要效忠国家,为祖父及家人平反。', - swd_huanyuanzhi:'东晋名将桓温的亲属,为了改变淝水之战秦灭晋的结局而来到春秋时代,成为了晋国太辰宫的“九龙子”祭司之一,人称“肆龙子”,代号为 “负屃”。设置五岳阵法把王霸之气汇聚晋国,好让一千年后变成晋灭秦,和四百年以前来自不同时空的土耀使者墨老先生是同一个灵魂。', - swd_murongshi:'自称昔日夏朝时负责保管「夏后祭器」的涂山氏后人,实际是从经桓远之改动的历史中穿越回来,目的是在太一之轮上刻下秦克晋生克从而改变历史。和车芸、苻殷是不同历史中同一灵魂的人。', - swd_jipeng:'聒噪自大的鹦鹉国王,鹦鹉王国「多毛国」国王。原是野心家蜀桑子部下,被壶中仙丢入「云中界」后,在那里建立了自己的鹦鹉王国。由于曾偷吃壶中仙的长生丹药,因此老化速度变慢,聒噪威力不减当年。为了保护老主人女儿(墨家夫人),随同水镜返回人间,参与对抗赤松子的战争。', - swd_qi:'上古文明的术者,沉睡千年后醒来,梦想重建古代王朝。古代蜀国的科学家,是一个天才少年。', - swd_luchengxuan:'从小便拥有着强大的力量,可是不懂得控制,被周遭的人当成怪物般的看待,导致养成阴郁犹疑不轻易吐露心声的性格,后来在探索自己拥有力量与生命意义的旅程中,逐渐历练成熟,进而立志发挥自己的力量协助他人。', - swd_xiarou:'纯洁无瑕的气质与温柔婉约的外表,让人以为她手无缚鸡之力,但其实体内蕴藏有相当强的灵力,与生俱来个性温柔娴静,聪慧坚强,带领着族人勇敢面对他族的侵略,希望苍生皆能过着和平安稳的生活。', - swd_moye:'青龙圣者手下,对于青龙圣者有着莫名崇拜,常因沉不住气而搞砸许多事,不过还是很受族人的喜爱,单纯的个性让她丝毫不会烦恼任何事太久。后奉青龙圣者委派携带圣宇盘前往山海界西方寻找继任青龙圣者。', - swd_zhaoyun:'朝云出生于三国时期普通的民家,荆州襄阳人。父亲皇甫疾,乃昔日刘表麾下的水师参军,荆州投降后,被曹魏所征召,后惨死于赤壁,母亲韩氏,则于关羽北伐时,死于逃难途中。朝云为把剩余不多的干粮留给一起逃难的姊弟,决心自我牺牲,趁夜偷偷离开他们,躲在荒野中,后来在饥寒交迫之中昏死,为路过的名将赵云救起。赵云将他带至一收容战火孤儿的组织,让他有栖身之所。后来,朝云在一次支援粮秣运输工作中,意外以剑气救了误入曹贼陷阱中的赵云及所属部队,此后,赵云便夜夜蒙面,把朝云带至营后的山上,传授枪戟武术。最终朝云在天干十杰选拔中获得首位拿下“焉逢”称号,成为蜀汉精英部队“飞羽”的“羽之部”领导人。', - swd_hengai:'充满神秘色彩之女子。聪明而慧黠,凡事颇有自己见地。携上古神器「炼妖壶」在身,不时会同情敌人,又不喜杀戮的姑娘。擅法术,一头异于常人之蓝色长发,据说乃昔日为修练高深法术所造成。她对焉逢甚有好感,却又保持距离,态度甚为微妙。', - swd_duanmeng:'马良之女,本名马蕴。马良死后流落南蛮,后在诸葛亮平定南中时被马良之弟马谡找到并收为义女。马谡因街亭失守被斩,马蕴认为父亲是优秀幕僚而非将帅之才,街亭失守主因在于诸葛亮用人不当。为建立功勋,洗刷父亲的污名,马蕴加入飞羽部队,在「天干十杰」选拔中获得第二名「端蒙」称号,成为飞之部领导人', - swd_jiangwu:'故巴东郡主簿严函之子,因诸葛亮曾为父亲严函洗脱冤情,故对其为人与公忠体国的精神十分景仰,因此将报效朝廷一事,置于个人一己的功业之上。左手持巨弓,右手配强弩,擅远距离攻击,有百步穿杨能力。他与焉逢乃是战场上一起出生入死之多年至交,二人情深谊厚,因此平日彼此之间从不以代号互称,而皆直称对方本名。以自己能身为「飞羽」一员而深深自豪。', - swd_tuwei:'容貌清秀,但沉默寡言的青年。平日常闭目若有所思,偶一说话,也仅简单几个字回应而已。与横艾为同门之师姊弟,但飞羽「十杰」排名却意外地在横艾之上。他与横艾一样,坚不透露所属之道术门派,来历神秘。擅长疗愈系之法术', - swd_yeyaxi:'孙尚香的义女,深色肌肤,大眼睛,天真无邪。是吴帝孙权派人出海寻找传说中之夷洲、亶洲时,所掳回之夷洲当地原住民少女。耶亚希心里偷恋焉逢,于是在孙尚香请托下,随焉逢一行人共同旅行历练。', - swd_muyun:'皇甫朝云之弟,幼时遭逢变故,流落荒野,幸得魏国前御史中丞徐庶所救,将之收为养子,抚养成人。在洛阳的那段童年时光中,暮云与青梅竹马兰茵、以及魏国名将张郃之孙张诰相交甚笃,一同习剑成长。十年匆匆,暮云如今已是英姿焕发、名满洛阳的少年剑客,但为求精进,暮云始终勤练剑术,希望有朝一日能以一身武艺协助恩师张郃,报效朝廷。', - swd_lanyin:'魏国名将张郃,府中之女剑僮。性格温婉可人,剑术高超,身手利落,深为张郃所赏识。与暮云为青梅竹马,二人情投意合,经常一起行动。真实身份为应龙之女。', - swd_zhiyin:'女性法师,自称多年前随师父旅行至洛阳时与兰茵相遇,认作姊妹,实际与兰茵均为应龙之女的分身。个性果决,伶俐慧黠。于并西胡匈之地修习道术、降妖伏魔。', - swd_qiner:'「铜雀尊者」之副领导人,赤衣尊者,虽年纪轻轻,却有着令人难以置信之惊人实力,能施展许多强大而罕见的术法。随身总是抱着一只琵琶,以音律操纵幻术、幻兽来进行各式各样之攻击。天女青儿赠予巫山女神瑶姬的四样乐器中的磬所化。', - swd_jiuyou:'本名久须毗呼,来自东方邪马台国之清秀少年。他乃是多年前邪马台国领袖日御子(卑弥呼)私下派遣至辽东接触的使臣之一,由于对中原风土民情、文化制度深为着迷,便决定留下游历。身手非凡能使术法与剑术,持有剑、镜、玉三大法器。', - swd_duopeng:'来自桃源界之多毛民,自称是多毛国疾鹏大王驾前第一勇士「禽灵天尊铁爪无敌啸风攫魂多毛翔鹏大元帅」。多鹏不小心打碎了留侯夫人夫君(姬良)送给她的最喜爱的琉璃花瓶,担心被留侯夫人(水镜)宰了煮了吃。于是逃离了桃源仙境,来到了轩辕界。遇见了寻找盘古斧的兰茵,带领兰茵到云中界寻找盘古斧。', - swd_fengtianling:'商朝东方最强大的诸侯国──奄国大夫凤千平之子,外貌不俗,时刻流露出强烈的贵族气质与自信,但他脸上仍保有些许少年之青涩。从小生长在商民大族中的凤天凌,家中有一位哥哥,两人从小跟随住在太山上的师父习剑,剑术天分十分被肯定。', - swd_huyue:'九尾狐妖,商亡后狐妖一族被商朝太师诛灭,因年幼未被发现而逃过一劫。与幼时的凤天凌因巧合相遇,与其成为好友。', - swd_jialanduo:'迦兰多来自遥远的身毒国,身为身毒皇室的后裔,他却只身一人千里迢迢来到中原,只为了寻找昔日比他更早之前便独自前来中原、但如今却音信全无的亲姐姐。', - swd_rongshuang:'蓉霜来自中原西南方的古蜀国,是师承古蜀文明“战甲”一派的谜样少女。由于蓉霜初懂中原语言,因此在战甲师群中战力不算特别强大的她,也一起被派遣前来中原执行任务。', - swd_zhuoshanzhu:'战甲技能非常优秀的浊山铸,深受黑火门掌门师尊的重视,并有意指定他为自己的继承人。当师尊得知中原曾出现黑火踪迹,便下令浊山铸率领众徒前往中原,务必将黑火带回蜀国。任务途中,浊山铸为了保蓉霜周全,惨遭敌对门派痛下杀手,被埋葬在异国他乡黄土之下。', - swd_jiting:'周朝王姬,好武且崇尚英雄,擅长于箭术与驭车。其人飒爽英姿、风华绝代,以长弓为贴身武器。逃不开政治婚姻的宿命,因对未来夫君充满好奇并且不愿盲目嫁人,遂毅然离开镐京去寻求真相。', - swd_sikongyu:'来自有熊村,祖先自夏朝被灭后一直四处迁徙躲避战乱。习练的武功是司空一家代代相传的棍术,但也痴迷于研究陷阱、鸣竹等防御外来者入侵的机关,希望通过自己的本领使族人过上安稳的生活。', - swd_muyue:'华胥人,千年前,颛顼帝与华胥国主联手施行“绝地天通”之阵关闭天门,以绝世人登天之妄想,平天下之乱。“绝地天通”阵势浩大,需以华胥族人的魂灵为祭,沐月本欲替代被选为做辅祭的姐姐入阵,却在最后时刻因信念不够坚定,错过了施术时间。最终,天门关闭,华胥国被建木托升至天际,沐月独自留守在华胥。千年后,相柳为重开天门,借助青榆和伏羲琴之力试图破坏结界,沐月因此坠入人间。', - swd_ziqiao:'子国巫人之女,拥有凭神的体质。身材虽然娇小,却拥有常人所没有的力量,能够轻易的挥动巨斧作战。', - swd_fengyu:'商朝王子,化名凤煜四处游历,希望能找到解决商朝内忧外患的局面的方法', - swd_huanglei:'擅长古传的机关术(鲁班一脉),曾经在任官于唐朝政府少府监,因为被李林甫排挤而对政府怀恨在心。他出任高仙芝的参谋,出了主意灭掉石国,又企图干扰大食(阿拉伯)改朝换代,引起怛罗斯之战。当高仙芝返回长安,听其余的部属劝告,又因怛罗斯之战失利跟黄雷脱不了关系,疏远黄雷。黄雷转而投靠安禄山,想藉安禄山的叛乱取得势力。', - swd_lilian:'生长在一个贵族家庭,是第三千金,她父亲已经许婚给其他贵族,但她却迷恋上来做客的骑士麦尔斯,之后麦尔斯出任务到威尼斯,莉莲也偷偷的带着她的爱犬波尔去追随他。', - swd_kangnalishi:'梅罗文加护教骑士的指导教士,直属罗马教皇。在高卢没有一个人喜欢这个神情诡异的人。讲话都会带给人恐惧感。他称麦尔斯是他教出来最完美的骑士。', - swd_huiyan:'慧彦俗名刘书经,从小被誉为神童,一心想金榜题名,由于过于狂妄自大,在考场取笑主考官而被逐出考场,觉得了无生趣,也不敢回乡面对乡亲父老,游荡到嵩山时,对那些会武术的和尚发生兴趣,于是就在少林寺出家。慧彦天资聪颖,无论在武术、佛学上几乎凌驾师辈后来对少林祖师达摩的事迹产生兴趣。当时唐僧玄奘去天竺取经的事迹为世人尊崇,而从天竺来到达摩所教的(禅宗)却还有些出入,于是想亲身去天竺求证,获得唐玄宗支持,让他持使节信符出关。但唐玄宗额外交代一些军事上的任务,慧彦必须协助探查远至大食附近诸国的军事情势。', - swd_shanxiaoxiao:'独孤宁珂的婢女,是宁珂来到中原之后收伏的千年琵琶精。', - swd_yuchiyanhong:'独孤宁珂的婢女,是宁珂来到中原之后收伏之千年狐狸精。', - swd_hanluo:'寒洛是玄武国世子,因与知盈的婚事遭其父玄武侯反对,而与之私奔。', - swd_fu:'福来自毛民国,因助陆承轩、夏柔搭救被毛民抓来做祭品的莫耶而得罪族人,而后随陆承轩等人离开。', - swd_linyue:'来自氐人国的老医生,医术高明。醉心于各种医学技术,因此常外出云游,四处学习。随遇而安的个性让他不过于担心身边的人事物。', - swd_zidashu:'周侥国王子,十分仰慕陆承轩等人的高超武艺,故随其一同游历,磨练自己。', - swd_maixing:'奇肱国老神丁的徒弟。虽然是奇肱族近来难见的天才,但好胜的个性,让他常与旁人发生争执,孤独的他在没有比较之下更以为自己技术高超,另急躁的个性也让他急于试验自己未完成的工艺品,以致于常造成大乌龙。', - swd_fuyan:'俱有满腔的热血与爱国心,外表虽然像其他白虎族人一样勇猛,其实是自幼常生病的药罐子。', - swd_haidapang:'一目民,能在远处就注意到周遭的状况,一有危险马上逃跑!过于小心翼翼的性格,对于外界既害怕又好奇,总是张着大眼睛四处观望,又像惊弓之鸟似的随时保持警戒,做好逃跑的准备。', - swd_shaowei:'生在朱雀国,个性高傲、善变,因与主角战斗受伤,因而忘记过去的朱雀族少女。时而天真迷惘、时而冷漠无情、时而阴狠狡诈,不知何者是她的本性。', - swd_youzhao:'名将赵云之孙,枪法凛冽,胆识过人。一心追求建立不世之功业,期许自己能协助大汉讨灭曹贼,克复中原,以光耀祖先之名声。性格冷傲孤高,对自己在「天干十杰」名次排行战之中,竟输给了籍籍无名之孤儿焉逢,暗自耿耿为怀不已。执行任务时,出手迅疾猛狠,对敌人毫不留情,是极出色之菁英战士。', - swd_shangzhang:'端蒙之弟,马谡之子。由于姊姊不顾家族劝阻,坚持加入飞羽,他十分担忧她的安危,便努力苦练武艺,历经艰难之后,终于在高手如林的飞羽「天干十杰」争夺战之中,以遍体鳞伤却仍力战不懈之姿,撼动所有战友,最后如愿挤入了十天干最末一个名位。他配属于「飞之部」,在姊姊身边默默守护她。', - swd_situqiang:'原籍长安,父亲原是魏国医官,后因治疫不力遭罢,举家放逐。父亲死后,司徒蔷便想运用其自幼所习的知识,行走各地教授防疫知识。', - swd_chunyuheng:'字长生。身拥承袭淳于一脉的绝顶医术,却不轻易替人治病。因淳于一族不长命且无法治好自己的怪病,导致性情古怪孤僻,且言谈之间尽是轻生之词,让人难以亲近。最后知晓原因后,得同伴帮助,消除诅咒。', - swd_hanlong:'魁梧高大,身手矫健,能单手持巨刃而面不改色,是一本事卓绝之勇士。原为并西之地的胡族,因该地官员贪暴,其父反抗却遭杀害,他为照顾母亲,无奈沦为草莽盗匪,靠打劫路过达官显贵以维生。', - swd_yuli:'他人以为是鱼妖而自称是鱼仙的混仙。在徐暮云等人追查鱼妖传闻的真相时,与其相遇,却从此成为助她成仙的伙伴。', - swd_zhanggao:'字柏乔,为大魏名将张郃之孙,同时亦是徐暮云情谊深笃之挚友。暮云视他彷若兄长,十分尊敬。不时与暮云切磋剑术,互相砥砺,同为洛阳著名之少年剑客。', - swd_hupo:'属于山林鬼神一族,全身雪白,眼睛碧蓝,一对长而尖细的耳朵,长着一簇蓬松的大尾巴。它的同族都是力量强大的山林鬼魅,但一般人并看不到它们,只有拥有特殊能力的人才能看得见。', - swd_jiangziya:'周军统帅、周朝开国元勋,是一位尤其擅长法术攻击的权谋大家。曾修改了用于记载宇宙间万物生克关系的神器“太一之轮”,并留下了“周克商”的生克,造就牧野之战的胜利。', - }, - perfectPair:{ - swd_fengtianling:['swd_huyue','swd_jiting'], - swd_rongshuang:['swd_zhuoshanzhu'], - swd_jialanduo:['swd_zhuoshanzhu'], - swd_sikongyu:['swd_muyue'], - swd_fengyu:['swd_ziqiao'], - swd_zhaoyun:['swd_hengai','swd_yeyaxi','zhaoyun'], - swd_hengai:['zhugeliang','sp_zhugeliang'], - swd_duanmeng:['swd_shangzhang'], - swd_shangzhang:['swd_situqiang'], - swd_tuwei:['swd_hengai'], - swd_jiangwu:['swd_zhaoyun'], - swd_muyun:['swd_lanyin','swd_zhiyin','swd_zhanggao','xushu'], - swd_lanyin:['swd_zhiyin'], - swd_yuli:['swd_chunyuheng'], - swd_jiuyou:['swd_zhiyin'], - swd_qiner:['swd_hengai'], - swd_huzhongxian:['swd_jiliang','swd_jipeng','swd_xiyan'], - swd_anka:['swd_kama'], - swd_septem:['swd_nicole','swd_kama','swd_weida','swd_wangsiyue','swd_huiyan'], - swd_nicole:['swd_lilian'], - swd_xuanyuanjianxian:['swd_xuanyuanjiantong'], - swd_chenjingchou:['swd_yuxiaoxue','swd_tuobayuer'], - swd_yuxiaoxue:['swd_yuwentuo'], - swd_zhanglie:['swd_tuobayuer'], - swd_duguningke:['swd_yuwentuo','swd_shanxiaoxiao','swd_yuchiyanhong'], - swd_jiliang:['swd_shuijing','swd_jipeng'], - swd_jipeng:['swd_duopeng'], - swd_cheyun:['swd_huanyuanzhi','swd_murongshi'], - swd_murongshi:['swd_huanyuanzhi','swd_shuijing'], - swd_huanyuanzhi:['swd_jipeng'], - swd_qi:['swd_huzhongxian'], - swd_luchengxuan:['swd_xiarou'], - }, - skill:{ - yeying:{ - enable:'phaseUse', - usable:1, - viewAs:{name:'qiankunbiao'}, - viewAsFilter:function(player){ - return player.countCards('he',{color:'black'}); - }, - filterCard:{color:'black'}, - position:'he', - check:function(card){ - return 7-get.value(card); - }, - ai:{ - threaten:1.5 - } - }, - juxi:{ - enable:'phaseUse', - usable:2, - filter:function(event,player){ - return player.storage.juxi>=game.countPlayer(); - }, - filterTarget:true, - init:function(player){ - player.storage.juxi=0; - }, - init2:function(player){ - if(get.mode()=='guozhan'){ - player.logSkill('juxi'); - } - }, - intro:{ - content:'mark' - }, - content:function(){ - 'step 0' - player.storage.juxi-=game.countPlayer(); - player.syncStorage('juxi'); - if(player.storage.juxi<=0){ - player.unmarkSkill('juxi'); - } - else{ - player.updateMarks(); - } - if(target.isDamaged()){ - player.chooseControl(function(){ - if(get.attitude(player,target)>0) return 1; - return 0; - }).set('choiceList',[ - '对'+get.translation(target)+'造成一点伤害', - '令'+get.translation(target)+'回复一点体力', - ]) - } - else{ - target.damage(); - event.finish(); - } - 'step 1' - if(result.control=='选项一'){ - target.damage(); - } - else{ - target.recover(); - } - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(get.attitude(player,target)>0){ - if(target.isDamaged()) return get.recoverEffect(target,player,target); - return 0; - } - else{ - return get.damageEffect(target,player,target); - } - } - } - }, - group:'juxi_count', - subSkill:{ - count:{ - trigger:{global:'discardAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return _status.currentPhase!=event.player; - }, - content:function(){ - player.storage.juxi++; - player.syncStorage('juxi'); - player.markSkill('juxi'); - player.updateMarks(); - }, - } - } - }, - jiefen:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target.countCards('h')>player.countCards('h'); - }, - filter:function(event,player){ - return !player.isMostHandcard(); - }, - content:function(){ - 'step 0' - target.chooseCard('h',true,'交给'+get.translation(player)+'一张牌'); - 'step 1' - if(result.bool){ - player.gain(result.cards,target); - target.$giveAuto(result.cards,player); - } - else{ - event.finish(); - } - 'step 2' - var nh=player.countCards('h'); - if(game.hasPlayer(function(current){ - return current.countCards('h')max){ - max=nh; - } - if(nh=7){ - return max-min<=2; - } - else{ - return max-min<=1; - } - }, - content:function(){ - player.draw(2); - } - }, - huodan:{ - enable:'phaseUse', - usable:1, - filterCard:{color:'red'}, - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0; - }, - filterTarget:true, - selectTarget:[1,2], - position:'he', - check:function(card){ - return 7-get.value(card); - }, - contentBefore:function(){ - player.loseHp(); - }, - alter:true, - content:function(){ - if(targets.length==1){ - target.damage('fire',2); - if(get.is.altered('huodan')) target.draw(); - } - else{ - target.damage('fire'); - } - }, - line:'fire', - ai:{ - order:15, - expose:0.2, - threaten:1.5, - result:{ - target:function(player,target){ - if(player.hp<2) return 0; - if(get.attitude(player,target)>=0) return 0; - if(target.hp>player.hp) return 0; - var eff=get.damageEffect(target,player,target,'fire'); - if(eff<0){ - if(ui.selected.targets.length&&target.hp>1&&ui.selected.targets[0].hp>1){ - return 0; - } - if(target.nodying) return eff/10; - return eff/Math.sqrt(target.hp); - } - return 0; - } - } - } - }, - sxianjing:{ - enable:'phaseUse', - filter:function(event,player){ - var suits=[]; - for(var i=0;i0; - }, - content:function(){ - var card=player.storage.sxianjing.randomGet(); - player.storage.sxianjing.remove(card); - player.gain(card,'draw'); - player.syncStorage('sxianjing'); - if(player.storage.sxianjing.length){ - player.updateMarks(); - } - else{ - player.unmarkSkill('sxianjing'); - } - } - } - } - }, - zhanxing:{ - enable:'phaseUse', - usable:1, - position:'he', - filterCard:true, - selectCard:[1,Infinity], - filter:function(event,player){ - return player.countCards('he')>0; - }, - check:function(card){ - switch(ui.selected.cards.length){ - case 0: return 8-get.value(card); - case 1: return 6-get.value(card); - case 2: return 3-get.value(card); - } - return 0; - }, - content:function(){ - 'step 0' - var list=get.cards(cards.length); - event.list=list; - player.showCards(list); - 'step 1' - var suits=[]; - event.suits=suits; - for(var i=0;i=game.countPlayer(); + }, + filterTarget:true, + init:function(player){ + player.storage.juxi=0; + }, + init2:function(player){ + if(get.mode()=='guozhan'){ + player.logSkill('juxi'); + } + }, + intro:{ + content:'mark' + }, + content:function(){ + 'step 0' + player.storage.juxi-=game.countPlayer(); + player.syncStorage('juxi'); + if(player.storage.juxi<=0){ + player.unmarkSkill('juxi'); + } + else{ + player.updateMarks(); + } + if(target.isDamaged()){ + player.chooseControl(function(){ + if(get.attitude(player,target)>0) return 1; + return 0; + }).set('choiceList',[ + '对'+get.translation(target)+'造成一点伤害', + '令'+get.translation(target)+'回复一点体力', + ]) + } + else{ + target.damage(); + event.finish(); + } + 'step 1' + if(result.control=='选项一'){ + target.damage(); + } + else{ + target.recover(); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>0){ + if(target.isDamaged()) return get.recoverEffect(target,player,target); + return 0; + } + else{ + return get.damageEffect(target,player,target); + } + } + } + }, + group:'juxi_count', + subSkill:{ + count:{ + trigger:{global:'discardAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return _status.currentPhase!=event.player; + }, + content:function(){ + player.storage.juxi++; + player.syncStorage('juxi'); + player.markSkill('juxi'); + player.updateMarks(); + }, + } + } + }, + jiefen:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.countCards('h')>player.countCards('h'); + }, + filter:function(event,player){ + return !player.isMostHandcard(); + }, + content:function(){ + 'step 0' + target.chooseCard('h',true,'交给'+get.translation(player)+'一张牌'); + 'step 1' + if(result.bool){ + player.gain(result.cards,target); + target.$giveAuto(result.cards,player); + } + else{ + event.finish(); + } + 'step 2' + var nh=player.countCards('h'); + if(game.hasPlayer(function(current){ + return current.countCards('h')max){ + max=nh; + } + if(nh=7){ + return max-min<=2; + } + else{ + return max-min<=1; + } + }, + content:function(){ + player.draw(2); + } + }, + huodan:{ + enable:'phaseUse', + usable:1, + filterCard:{color:'red'}, + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0; + }, + filterTarget:true, + selectTarget:[1,2], + position:'he', + check:function(card){ + return 7-get.value(card); + }, + contentBefore:function(){ + player.loseHp(); + }, + alter:true, + content:function(){ + if(targets.length==1){ + target.damage('fire',2); + if(get.is.altered('huodan')) target.draw(); + } + else{ + target.damage('fire'); + } + }, + line:'fire', + ai:{ + order:15, + expose:0.2, + threaten:1.5, + result:{ + target:function(player,target){ + if(player.hp<2) return 0; + if(get.attitude(player,target)>=0) return 0; + if(target.hp>player.hp) return 0; + var eff=get.damageEffect(target,player,target,'fire'); + if(eff<0){ + if(ui.selected.targets.length&&target.hp>1&&ui.selected.targets[0].hp>1){ + return 0; + } + if(target.nodying) return eff/10; + return eff/Math.sqrt(target.hp); + } + return 0; + } + } + } + }, + sxianjing:{ + enable:'phaseUse', + filter:function(event,player){ + var suits=[]; + for(var i=0;i0; + }, + content:function(){ + var card=player.storage.sxianjing.randomGet(); + player.storage.sxianjing.remove(card); + player.gain(card,'draw'); + player.syncStorage('sxianjing'); + if(player.storage.sxianjing.length){ + player.updateMarks(); + } + else{ + player.unmarkSkill('sxianjing'); + } + } + } + } + }, + zhanxing:{ + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + selectCard:[1,Infinity], + filter:function(event,player){ + return player.countCards('he')>0; + }, + check:function(card){ + switch(ui.selected.cards.length){ + case 0: return 8-get.value(card); + case 1: return 6-get.value(card); + case 2: return 3-get.value(card); + } + return 0; + }, + content:function(){ + 'step 0' + var list=get.cards(cards.length); + event.list=list; + player.showCards(list); + 'step 1' + var suits=[]; + event.suits=suits; + for(var i=0;i2&& - get.damageEffect(trigger.target,trigger.player,player)<0); - next.ai=function(card){ - if(goon){ - if(trigger.target.hp==1) return 10-get.value(card); - return 7-get.value(card); - } - return 0; - }; - next.logSkill=['tiebi',trigger.target]; - "step 1" - if(result.bool){ - trigger.target.changeHujia(); - } - }, - ai:{ - threaten:1.1 - } - }, - shenyan:{ - trigger:{source:'damageBegin'}, - skillAnimation:true, - animationColor:'fire', - filter:function(event,player){ - return !player.storage.shenyan&&event.nature=='fire'; - }, - intro:{ - content:'limited' - }, - mark:true, - logTarget:'player', - init:function(player){ - player.storage.shenyan=false; - }, - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return 0; - if(player.hasUnknown()) return 0; - var num=0,players=game.filterPlayer(); - for(var i=0;i0){ - num++; - } - else if(eff<0){ - num--; - } - } - } - return num>0; - }, - content:function(){ - trigger.num++; - player.addSkill('shenyan2'); - player.storage.shenyan=true; - player.awakenSkill('shenyan'); - player.storage.shenyan2=[]; - var players=game.filterPlayer(); - for(var i=0;i0; - }, - content:function(){ - 'step 0' - target.draw(); - 'step 1' - target.chooseToDiscard(2,'h',true); - }, - selectTarget:-1, - ai:{ - order:9, - result:{ - target:-1 - } - } - }, - xuanying:{ - subSkill:{ - sha:{ - enable:'chooseToUse', - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(player.isLinked()) return false; - }, - precontent:function(){ - player.link(); - // player.getStat().card.sha--; - }, - filterCard:function(){return false}, - selectCard:-1, - prompt:'横置武将牌,视为使用一张无视距离的杀', - ai:{ - order:function(){ - // if(_status.event.player.countCards('h',{type:'equip'})) return 9; - return 3.15; - }, - skillTagFilter:function(player,tag,arg){ - if(arg!='use') return false; - if(player.isLinked()) return false; - }, - respondSha:true, - }, - mod:{ - targetInRange:function(card){ - if(_status.event.skill=='xuanying_sha') return true; - } - }, - }, - shan:{ - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(!player.isLinked()) return false; - if(event.responded) return false; - if(!event.filterCard({name:'shan'})) return false; - return true; - }, - check:function(event,player){ - if(get.damageEffect(player,event.player,player)>=0) return false; - return true; - }, - content:function(){ - 'step 0' - player.link(); - 'step 1' - trigger.untrigger(); - trigger.responded=true; - trigger.result={bool:true,card:{name:'shan'}} - }, - ai:{ - target:function(card,player,target,current){ - if(!player.isLinked()&¤t<0) return 1.5; - if(!target.hasFriend()) return; - if(get.tag(card,'loseCard')&&_status.currentPhase!=target&&target.countCards('he')){ - return [0.5,Math.max(2,target.countCards('h'))]; - } - if(get.tag(card,'respondSha')||get.tag(card,'respondShan')){ - if(get.attitude(player,target)>0&&card.name=='juedou') return; - return [0.5,target.countCards('h','sha')+target.countCards('h','shan')]; - } - } - } - }, - damage:{ - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.source&&event.source.isAlive()&&player.isLinked()&& - lib.filter.targetEnabled({name:'sha'},player,event.source); - }, - check:function(event,player){ - return get.effect(event.source,{name:'sha'},player,player)>0; - }, - logTarget:'source', - content:function(){ - 'step 0' - player.link(); - 'step 1' - player.useCard({name:'sha'},trigger.source); - } - }, - use:{ - trigger:{player:'loseEnd'}, - direct:true, - filter:function(event,player){ - return _status.currentPhase!=player&&player.isLinked()&&event.cards&&event.cards.length; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('xuanying'),function(card,player,target){ - return lib.filter.targetEnabled({name:'sha'},player,target); - }).set('ai',function(target){ - return get.effect(target,{name:'sha'},_status.event.player); - }); - 'step 1' - if(result.bool){ - player.logSkill('xuanying'); - if(!event.isMine()) game.delay(0.5); - player.link(); - player.useCard({name:'sha'},result.targets,false); - } - }, - } - }, - group:['xuanying_sha','xuanying_use'], - ai:{ - threaten:function(player,target){ - if(target.isLinked()) return 0.7; - return 1.4; - } - } - }, - hwendao:{ - trigger:{player:['useCardAfter','respondAfter',]}, - check:function(event,player){ - return get.attitude(player,_status.currentPhase)<=0; - }, - logTarget:function(){ - return _status.currentPhase; - }, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - if(!_status.currentPhase.countCards('he')) return false; - return event.cards&&event.cards.length==1; - }, - content:function(){ - 'step 0' - var suit=get.suit(trigger.cards[0]); - var goon=(get.attitude(_status.currentPhase,player)<=0); - _status.currentPhase.chooseToDiscard('弃置一张'+get.translation(suit+'2')+ - '牌,或令'+get.translation(player)+'获得你的一张牌',{suit:suit}).ai=function(card){ - if(goon) return 8-get.value(card); - return 0; - } - 'step 1' - if(!result.bool){ - player.gainPlayerCard(_status.currentPhase,'he',true); - } - }, - ai:{ - threaten:0.7 - } - }, - lingfeng:{ - trigger:{player:'phaseEnd'}, - frequent:true, - filter:function(event,player){ - return get.cardCount(true,player)>=Math.min(3,player.hp); - }, - content:function(){ - 'step 0' - player.chooseTarget('凌锋:造成一点伤害,或取消并获得一点护甲',function(card,player,target){ - return player!=target&&get.distance(player,target,'attack')<=1; - }).ai=function(target){ - if(player.hp==1) return 0; - if(player.hp==2&&target.hp>=3) return 0; - return get.damageEffect(target,player,player); - } - 'step 1' - if(result.bool){ - player.line(result.targets[0]); - result.targets[0].damage(); - } - else{ - player.changeHujia(); - } - }, - ai:{ - order:-10, - result:{ - target:2 - }, - threaten:1.5 - } - }, - hxunzhi:{ - unique:true, - enable:'phaseUse', - derivation:['wusheng','paoxiao'], - filter:function(event,player){ - return !player.storage.hxunzhi; - }, - alter:true, - init:function(player){ - player.storage.hxunzhi=false; - }, - mark:true, - intro:{ - content:'limited' - }, - skillAnimation:true, - animationColor:'fire', - content:function(){ - 'step 0' - player.awakenSkill('hxunzhi'); - player.storage.hxunzhi=true; - if(!get.is.altered('hxunzhi')){ - var targets=game.filterPlayer(function(current){ - return player.canUse('wanjian',current); - }); - targets.sort(lib.sort.seat); - player.useCard({name:'wanjian'},targets); - } - 'step 1' - player.addSkill('wusheng'); - player.addSkill('paoxiao'); - player.addSkill('hxunzhi2'); - }, - ai:{ - order:2, - result:{ - player:function(player){ - if(get.mode()=='identity'){ - if(player.identity=='zhu') return 0; - if(player.identity=='nei') return 0; - } - else if(get.mode()=='guozhan'){ - if(player.identity=='ye') return 0; - if(player.isUnseen()) return 0; - } - if(player.hp==1) return 1; - if(player.hasUnknown()) return 0; - if(!player.hasFriend()) return 0; - var enemies=player.getEnemies(); - if(enemies.length+1==game.players.length) return 0; - var num=player.hasCard(function(card){ - return card.name=='sha'||get.color(card)=='red'; - }); - if(num<2) return 0; - for(var i=0;i0&& - !enemies[i].getEquip(2)&&num>enemies[i].hp&&enemies[i].hp<=2){ - return 1; - } - } - return 0; - } - } - } - }, - hxunzhi2:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('xunzhi2'); - player.die(); - } - }, - hjifeng:{ - enable:'phaseUse', - filter:function(event,player){ - if(!player.countCards('h')) return false; - if(player.countCards('h',{type:'jiqi'})) return false; - return true; - }, - discard:false, - prepare:'throw2', - usable:1, - check:function(card){ - return 6-get.value(card); - }, - filterCard:true, - content:function(){ - var name=get.suit(cards[0]); - ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); - switch(name){ - case 'spade':name='qinglongzhigui';break; - case 'club':name='baishouzhihu';break; - case 'diamond':name='zhuquezhizhang';break; - case 'heart':name='xuanwuzhihuang';break; - } - player.gain(get.cardPile(name)||game.createCard(name),'draw'); - }, - ai:{ - order:4, - result:{ - player:1 - } - } - }, - hjifeng_old:{ - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - if(!player.countCards('he',{type:'equip'})) return false; - if(player.countCards('h',{type:'jiqi'})) return false; - if(get.cardPile(function(card){return get.type(card)=='jiqi'})) return true; - return false; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseToDiscard('he','祭风:是否弃置一张装备牌并获得一张祭器牌?',{type:'equip'}).set('ai',function(card){ - return 6-get.value(card); - }).logSkill='hjifeng'; - 'step 1' - if(result.bool){ - var card=get.cardPile(function(card){ - return get.type(card)=='jiqi'&&card.name.indexOf('yuchan')!=0; - })||get.cardPile(function(card){ - return get.type(card)=='jiqi'; - }); - if(card){ - player.gain(card,'draw'); - } - } - } - }, - lmazui:{ - audio:'mazui', - enable:'phaseUse', - usable:1, - filterCard:{color:'black'}, - filterTarget:function(card,player,target){ - return !target.hasSkill('lmazui2'); - }, - check:function(card){ - return 6-get.value(card); - }, - discard:false, - prepare:'give', - content:function(){ - target.storage.lmazui2=cards[0]; - target.addSkill('lmazui2'); - game.addVideo('storage',target,['lmazui2',get.cardInfo(target.storage.lmazui2),'card']); - }, - ai:{ - expose:0.2, - result:{ - target:function(player,target){ - return -target.hp; - } - }, - order:4, - threaten:1.2 - } - }, - lmazui2:{ - trigger:{source:'damageBegin'}, - forced:true, - mark:'card', - filter:function(event){ - return event.num>0; - }, - content:function(){ - trigger.num--; - player.addSkill('lmazui3'); - player.removeSkill('lmazui2'); - }, - intro:{ - content:'card' - } - }, - lmazui3:{ - trigger:{source:['damageEnd','damageZero']}, - forced:true, - popup:false, - content:function(){ - player.gain(player.storage.lmazui2,'gain2','log'); - player.removeSkill('lmazui3'); - delete player.storage.lmazui2; - } - }, - hyunshen:{ - trigger:{player:'respond'}, - filter:function(event,player){ - return event.card.name=='shan'; - }, - frequent:true, - init:function(player){ - player.storage.hyunshen=0; - }, - content:function(){ - player.storage.hyunshen++; - player.markSkill('hyunshen'); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'respondShan')){ - var shans=target.countCards('h','shan'); - var hs=target.countCards('h'); - if(shans>1) return [1,1]; - if(shans&&hs>2) return [1,1]; - if(shans) return [1,0.5]; - if(hs>2) return [1,0.3]; - if(hs>1) return [1,0.2]; - return [1.2,0]; - } - } - }, - threaten:0.8 - }, - intro:{ - content:'mark' - }, - group:'hyunshen2' - }, - hyunshen2:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.hyunshen>0; - }, - content:function(){ - player.draw(player.storage.hyunshen); - player.storage.hyunshen=0; - player.unmarkSkill('hyunshen'); - }, - mod:{ - globalTo:function(from,to,distance){ - if(typeof to.storage.hyunshen=='number') return distance+to.storage.hyunshen; - } - } - }, - hlingbo:{ - audio:['lingbo',2], - trigger:{player:'respond'}, - filter:function(event,player){ - return event.card.name=='shan'; - }, - frequent:true, - content:function(){ - player.draw(2); - }, - ai:{ - mingzhi:false, - useShan:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'respondShan')){ - var shans=target.countCards('h','shan'); - var hs=target.countCards('h'); - if(shans>1) return [0,1]; - if(shans&&hs>2) return [0,1]; - if(shans) return [0,0]; - if(hs>2) return [0,0]; - if(hs>1) return [1,0.5]; - return [1.5,0]; - } - } - }, - threaten:0.8 - } - }, - gtiandao:{ - audio:true, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('gtiandao'),'he').ai=function(card){ - var trigger=_status.event.parent._trigger; - var player=_status.event.player; - var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result; - } - else{ - return -result; - } - }; - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.logSkill('gtiandao'); - player.$gain2(trigger.player.judging[0]); - player.gain(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.position.appendChild(result.cards[0]); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - } - "step 3" - game.delay(2); - }, - ai:{ - tag:{ - rejudge:1 - }, - threaten:1.5 - } - }, - jinlin:{ - enable:'phaseUse', - unique:true, - mark:true, - skillAnimation:true, - animationColor:'metal', - init:function(player){ - player.storage.jinlin=false; - }, - filter:function(event,player){ - if(player.storage.jinlin) return false; - return true; - }, - filterTarget:true, - selectTarget:[1,Infinity], - contentBefore:function(){ - player.awakenSkill('jinlin'); - player.storage.jinlin=true; - }, - content:function(){ - target.changeHujia(3); - target.addSkill('jinlin2'); - target.storage.jinlin2=3; - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(player.hp==1) return 1; - var num=0; - var players=game.filterPlayer(); - for(var i=0;i2){ - if(players[i].hp==1) return 1; - if(players[i].hp==2) num++; - } - } - if(player.hasUnknown()) return 0; - if(num>1) return 1; - return 0; - } - }, - }, - intro:{ - content:'limited' - } - }, - jinlin2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - if(player.hujia>0){ - player.changeHujia(-1); - } - player.storage.jinlin2--; - if(player.hujia==0||player.storage.jinlin2==0){ - player.removeSkill('jinlin2'); - delete player.storage.jinlin2; - } - }, - }, - lingyue:{ - trigger:{player:'shaBegin'}, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - logTarget:'target', - filter:function(event,player){ - return event.target.countCards('he')>0; - }, - content:function(){ - trigger.target.chooseToDiscard('he',true); - } - }, - fengze:{ - enable:'phaseUse', - filterCard:{color:'black'}, - selectCard:1, - position:'he', - usable:1, - viewAs:{name:'taoyuan'}, - filter:function(event,player){ - return player.countCards('he',{color:'black'})>0; - }, - audio:true, - prompt:'将一张黑色牌当作桃园结义使用', - check:function(card){ - return 7-get.useful(card) - }, - ai:{ - threaten:1.5 - } - }, - zaowu:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h',{suit:['spade','heart']})>0; - }, - filterCard:{suit:['spade','heart']}, - viewAs:{name:'fengyinzhidan'}, - check:function(card){ - return 7-get.value(card); - }, - ai:{ - order:8.5, - } - }, - huanxia:{ - enable:'chooseToUse', - filterCard:function(card){ - return get.color(card)=='red'; - }, - position:'he', - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(!player.countCards('he',{color:'red'})) return false; - }, - prompt:'将一张红色牌当杀使用', - check:function(card){return 5-get.value(card)}, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.1; - }, - skillTagFilter:function(player,tag,arg){ - if(arg!='use') return false; - if(!player.countCards('he',{color:'red'})) return false; - }, - }, - group:['huanxia_expire','huanxia_draw','huanxia_gain'], - subSkill:{ - expire:{ - trigger:{source:'damageAfter'}, - forced:true, - popup:false, - filter:function(event){ - return event.parent.skill=='huanxia'; - }, - content:function(){ - player.storage.huanxia=true; - } - }, - draw:{ - trigger:{player:'shaAfter'}, - forced:true, - popup:false, - content:function(){ - if(trigger.parent.skill=='huanxia'){ - var card=trigger.cards[0]; - if(get.itemtype(card)=='card'&&get.position(card)=='d'&&!player.storage.huanxia){ - ui.special.appendChild(card); - if(!player.storage.huanxia_draw){ - player.storage.huanxia_draw=[]; - } - player.storage.huanxia_draw.push(card); - } - } - delete player.storage.huanxia; - } - }, - gain:{ - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player.storage.huanxia_draw; - }, - content:function(){ - player.gain(player.storage.huanxia_draw,'gain2'); - delete player.storage.huanxia_draw; - } - } - } - }, - kongmo:{ - trigger:{player:'useCardAfter'}, - forced:true, - filter:function(event,player){ - if(event.parent.name=='kongmo') return false; - if(!event.targets||!event.card) return false; - var type=get.type(event.card); - if(type!='basic'&&type!='trick') return false; - var card=game.createCard(event.card.name,event.card.suit,event.card.number); - for(var i=0;i=0) return 0; - if(get.population('fan')<3) return 0; - return -1; - } - case 'zhong':{ - if(get.population('fan')<3) return 0; - return -1; - } - case 'nei':return 0; - case 'fan':{ - if(get.population('fan')==0) return 0; - if(get.population('zhong')<2) return 0; - return -1; - } - } - break; - } - case 'guozhan':{ - if(player.identity=='unknown') return 0; - return get.population(player.identity)>=3?-1:0; - } - default:{ - return -1; - } - } - }, - } - } - }, - bingfeng2:{ - mod:{ - cardEnabled:function(){ - return false; - }, - cardUsable:function(){ - return false; - }, - cardRespondable:function(){ - return false; - }, - cardSavable:function(){ - return false; - } - }, - trigger:{player:'turnOverAfter'}, - forced:true, - filter:function(event,player){ - return !player.isTurnedOver(); - }, - content:function(){ - player.removeSkill('bingfeng2'); - } - }, - yudun:{ - mod:{ - cardEnabled:function(card,player){ - if(get.type(card,'trick')=='trick') return false; - }, - cardRespondable:function(card,player){ - if(get.type(card,'trick')=='trick') return false; - }, - cardSavable:function(card,player){ - if(get.type(card,'trick')=='trick') return false; - }, - }, - enable:'chooseToUse', - filterCard:function(card){ - return get.type(card,'trick')=='trick'; - }, - selectCard:2, - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(player.countCards('h',{type:['trick','delay']})<2) return false; - }, - check:function(){return 1}, - ai:{ - skillTagFilter:function(player,tag,arg){ - if(arg!='use') return false; - if(player.countCards('h',{type:['trick','delay']})<2) return false; - }, - respondSha:true, - order:function(){ - return get.order({name:'sha'})+0.1; - }, - useful:-1, - value:-1 - }, - group:'yudun_count', - subSkill:{ - count:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='yudun'&&_status.currentPhase==player; - }, - content:function(){ - player.getStat().card.sha--; - } - } - } - }, - guozao:{ - trigger:{global:'damageEnd'}, - forced:true, - logv:false, - alter:true, - check:function(event,player){ - return game.hasPlayer(function(current){ - return get.attitude(player,current)>2&¤t.countCards('h')==1 - }); - }, - filter:function(event,player){ - if(event.source==player) return false; - if(get.distance(player,event.player)>1) return false; - return game.hasPlayer(function(current){ - return current.countCards('h'); - }); - }, - content:function(){ - "step 0" - var cards=[]; - if(ui.cardPile.childNodes.length<3){ - var discardcards=get.cards(3); - for(var i=0;i0&&get.distance(player,target)<=dist; - }).ai=function(target){ - var att=get.attitude(player,target); - var hs=target.getCards('h'); - var num=hs.length; - if(num<=1) return att*2; - if(num==2){ - for(var i=0;i6,target,'raw') return att; - } - if(target==player){ - for(var i=0;i<2;i++){ - if(get.value(cards[i])>6,target,'raw') return -1; - } - } - return att/2; - } - if(num==3){ - if(target==player){ - var num2=0; - for(var i=0;i<3;i++){ - num2+=get.value(cards[i],player,'raw'); - num2-=get.value(hs[i],player,'raw'); - } - if(num2>0) return 0.5; - if(num2<0) return -0.5; - } - return 0; - } - return -att/2; - }; - "step 1" - if(result.bool&&result.targets[0]){ - var target=result.targets[0]; - player.line(target,'green'); - // player.logSkill('guozao',target,'green',true); - var cards=target.getCards('h'); - target.lose(cards)._triggered=null; - game.log(target,'弃置了',cards,',并获得三张牌'); - // target.$draw(3); - target.$throw(cards); - target.gain(event.cards,'draw')._triggered=null; - } - else{ - event.finish(); - } - }, - ai:{ - expose:0.1 - } - }, - heihuo:{ - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h')>0&&player.countCards('he',{type:'equip'})>0&&!player.hasSkill('heihuo2'); - }, - filterCard:function(card){ - return get.type(card)=='equip'; - }, - position:'he', - check:function(card){ - var player=_status.currentPhase; - var nh=player.countCards('h'); - var pos=get.position(card); - if(nh<2) return 0; - if(nh>4) return 0; - if(nh==4&&pos=='e') return 0; - if(player.countCards('he',{subtype:get.subtype(card)})>1){ - return 11-get.equipValue(card)+(pos=='e'?0.4:0); - } - return 5.5-get.value(card)+(pos=='e'?0.4:0); - }, - content:function(){ - "step 0" - player.draw(player.countCards('h')); - "step 1" - if(player.countCards('h')>=8){ - player.damage(3,'fire'); - player.addTempSkill('heihuo2','phaseAfter'); - } - }, - ai:{ - order:10, - threaten:1.4, - result:{ - player:1 - } - } - }, - heihuo2:{}, - yaotong:{ - alter:true, - group:['yaotong1','yaotong2','yaotong3'], - ai:{ - respondSha:true, - respondShan:true, - skillTagFilter:function(player,tag){ - if(tag=='respondShan'&&get.is.altered('yaotong')) return false; - if(player.countCards('h')%2==0) return false; - }, - }, - threaten:1.3 - }, - yaotong1:{ - enable:['chooseToRespond','chooseToUse'], - filterCard:true, - viewAs:{name:'sha'}, - filter:function(event,player){ - var num=player.countCards('h'); - if(num==0) return false; - return num%2==1; - }, - prompt:'将一张手牌当作杀打出', - check:function(card){return 6-get.value(card)} - }, - yaotong2:{ - enable:['chooseToRespond','chooseToUse'], - filterCard:true, - viewAs:{name:'shan'}, - filter:function(event,player){ - if(get.is.altered('yaotong')) return false; - var num=player.countCards('h'); - if(num==0) return false; - return num%2==1; - }, - prompt:'将一张手牌当作闪打出', - check:function(card){return 6-get.value(card)} - }, - yaotong3:{ - enable:'chooseToUse', - filterCard:true, - viewAs:{name:'wuxie'}, - filter:function(event,player){ - var num=player.countCards('h'); - if(num==0) return false; - return num%2==0; - }, - viewAsFilter:function(player){ - var num=player.countCards('h'); - if(num==0) return false; - return num%2==0; - }, - prompt:'将一张手牌当作无懈可击使用', - check:function(card){return 7-get.value(card)}, - }, - yaotong4:{ - enable:'chooseToUse', - filterCard:true, - viewAs:{name:'tao'}, - filter:function(event,player){ - var num=player.countCards('h'); - if(num==0) return false; - return num%2==0; - }, - viewAsFilter:function(player){ - var num=player.countCards('h'); - if(num==0) return false; - return num%2==0; - }, - prompt:'将一张手牌当作桃使用', - check:function(card){return 9-get.value(card)}, - }, - pojian:{ - trigger:{player:'loseEnd'}, - filter:function(event,player){ - if(player.countCards('h')) return false; - for(var i=0;i0; - }, - filterCard:true, - position:'he', - content:function(){ - player.addSkill('huajin2'); - }, - check:function(card){ - return 5-get.value(card); - }, - ai:{ - order:10, - result:{ - player:function(player){ - if(player.countCards('h','juedou')) return 1; - if(player.countCards('h','sha')==0) return 0; - var players=game.filterPlayer(); - for(var i=0;i0){ - return 1; - } - } - return 0; - } - } - } - }, - huajin2:{ - trigger:{source:'damageBegin'}, - forced:true, - content:function(){ - trigger.num++; - }, - group:'huajin3' - }, - huajin3:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('huajin2'); - } - }, - yuchen:{ - trigger:{player:['useCard','respondAfter']}, - direct:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - if(event.cards){ - for(var i=0;i0; - }).ai=function(target){ - return -get.attitude(player,target); - }; - "step 1" - if(result.bool){ - player.logSkill('yuchen',result.targets); - player.discardPlayerCard(result.targets[0],true); - } - }, - ai:{ - threaten:0.7 - } - }, - bingjian:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he',{color:'black',name:'sha'})>0; - }, - filterCard:function(card){ - return card.name=='sha'&&get.color(card)=='black'; - }, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h')>0; - }, - line:'thunder', - content:function(){ - "step 0" - target.showHandcards(); - "step 1" - var cards=target.getCards('h','shan'); - if(cards.length){ - target.discard(cards); - } - else{ - target.damage('thunder'); - } - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target,'thunder'); - } - }, - expose:0.2 - } - }, - rumeng:{ - trigger:{global:'phaseUseBefore'}, - direct:true, - filter:function(event,player){ - return event.player!=player&&player.countCards('he',{type:'basic'})2; - var next=player.chooseToDiscard(function(card){ - return get.type(card)!='basic'; - },get.prompt('rumeng',trigger.player),'he'); - next.logSkill=['rumeng',trigger.player]; - next.ai=function(card){ - if(yep){ - return 6-get.value(card); - } - return 0; - } - "step 1" - if(result.bool){ - trigger.player.chooseToDiscard({type:'basic'},'入梦:弃置一张基本牌或跳过出牌及弃牌阶段').ai=function(card){ - return 5-get.value(card); - } - } - else{ - event.finish(); - } - "step 2" - if(!result.bool){ - trigger.untrigger(); - trigger.finish(); - trigger.player.skip('phaseDiscard'); - } - }, - ai:{ - expose:0.1 - } - }, - lianda:{ - trigger:{player:'shaAfter'}, - direct:true, - filter:function(event,player){ - return event.target.isAlive()&&player.countCards('he')>0&&!player.hasSkill('lianda2'); - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he',get.prompt('lianda')); - next.ai=function(card){ - if(get.effect(trigger.target,{name:'sha'},player,player)>0){ - return 7-get.value(card); - } - return 0; - } - next.logSkill='lianda'; - "step 1" - if(result.bool){ - player.addTempSkill('lianda2','phaseAfter'); - player.useCard({name:'sha'},trigger.target); - } - } - }, - lianda2:{}, - huiqi:{ - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return player.hp3){ - return att+Math.max(0,5-target.countCards('h')); - } - return att/4; - } - if(att>3){ - return att+Math.max(0,5-target.countCards('h')); - } - return att; - } - "step 1" - if(result.bool){ - player.logSkill('huiqi',result.targets); - result.targets[0].draw(player.maxHp-player.hp); - } - }, - ai:{ - expose:0.2, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - return [1,0.5]; - } - } - } - } - }, - xianghui:{ - enable:'phaseUse', - usable:1, - filterCard:{color:'red'}, - filter:function(){ - var players=game.filterPlayer(); - var min=players[0].hp; - for(var i=0;i2){ - if(player.countCards('h','shan')||player.getEquip(2)|| - trigger.target.hp==1||player.hp>trigger.target.hp+1){ - if(!trigger.target.countCards('h','shan')||trigger.target.countCards('h')3){ - return 100-target.countCards('h'); - } - return att; - } - "step 1" - if(result.bool){ - player.logSkill('fzhenwei',result.targets); - result.targets[0].gain(event.cards,'gain2','log'); - } - }, - ai:{ - expose:0.1, - threaten:1.6 - } - }, - shangxi:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - if(player.countCards('he')==0) return false; - return game.hasPlayer(function(current){ - return (current!=player&&get.distance(player,current,'attack')<=1&&player.hp<=current.hp); - }); - }, - content:function(){ - "step 0" - var next=player.chooseCardTarget({ - position:'he', - filterTarget:function(card,player,target){ - return get.distance(player,target,'attack')<=1&& - player!=target&&player.hp<=target.hp; - }, - filterCard:lib.filter.cardDiscardable, - ai1:function(card){ - return 9-get.value(card); - }, - ai2:function(target){ - return get.damageEffect(target,player,player); - }, - prompt:get.prompt('shangxi') - }); - "step 1" - if(result.bool){ - player.discard(result.cards); - player.logSkill('shangxi',result.targets); - result.targets[0].damage(); - } - }, - ai:{ - expose:0.3 - } - }, - fuyan:{ - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event){ - return event.num>0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('fuyan'),function(card,player,target){ - return !target.hujia; - }).ai=function(target){ - if(get.attitude(player,target)<=0) return 0; - var eff=-get.damageEffect(target,target,player)+(player==target?2:0); - if(target.hp==1) eff+=2; - return Math.min(1,eff); - }; - "step 1" - if(result.bool){ - player.logSkill('fuyan',result.targets); - var target=result.targets[0]; - target.changeHujia(); - } - }, - ai:{ - effect:{ - target:function(card,player){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - return 0.7; - } - } - }, - expose:0.2 - } - }, - fuyan2:{ - trigger:{player:'damageBegin'}, - filter:function(event,player){ - return event.num>0; - }, - forced:true, - mark:'card', - content:function(){ - trigger.num--; - player.removeSkill('fuyan2'); - ui.discardPile.appendChild(player.storage.fuyan2); - delete player.storage.fuyan2; - }, - intro:{ - content:'card' - } - }, - pingshen:{ - trigger:{source:'damageBegin'}, - forced:true, - popup:false, - unique:true, - silent:true, - content:function(){ - trigger.player.addSkill('pingshen2'); - trigger.player.storage.pingshen=player; - } - }, - pingshen2:{ - enable:'phaseUse', - unique:true, - mark:true, - init:function(player){ - player.storage.pingshen2=false; - }, - filter:function(event,player){ - return !player.storage.pingshen2&&player.storage.pingshen.isAlive(); - }, - filterCard:true, - filterTarget:function(card,player,target){ - return target==player.storage.pingshen; - }, - selectTarget:-1, - position:'he', - content:function(){ - player.storage.pingshen2=true; - player.unmarkSkill('pingshen2'); - player.gain(target.getCards('h'),target); - target.$give(target.countCards('h'),player); - player.turnOver(); - player.addSkill('pingshen3'); - }, - check:function(card){return 8-get.value(card);}, - intro:{ - content:'limited' - }, - ai:{ - order:10, - result:{ - player:function(player){ - if(player.classList.contains('turnedover')) return 10; - if(get.attitude(player,player.storage.pingshen)>=0){ - return 0; - } - if(player.storage.pingshen.countCards('h')>player.storage.pingshen.hp) return 1; - return 0; - } - }, - effect:{ - target:function(card,player,target){ - if(!target.storage.pingshen2){ - if(card.name=='guiyoujie') return [0,1]; - } - } - } - }, - }, - pingshen3:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - popup:false, - content:function(){ - "step 0" - player.removeSkill('pingshen3'); - if(player.storage.pingshen.classList.contains('dead')){ - event.finish(); - } - else{ - player.chooseCard('he',true,player.storage.pingshen.hp); - } - "step 1" - player.storage.pingshen.gain(result.cards,player); - player.$give(result.cards.length,player.storage.pingshen); - } - }, - guaili:{ - trigger:{source:'damageBegin'}, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2'; - }, - forced:true, - content:function(){ - trigger.num++; - player.addSkill('guaili2'); - } - }, - guaili2:{ - trigger:{source:'damageEnd'}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('guaili2'); - player.chooseToDiscard(2,true); - } - }, - xingzhui:{ - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }, - check:function(card){ - if(get.type(card)=='equip'){ - var distance=get.info(card).distance; - if(distance){ - if(distance.attackFrom<0||distance.globalFrom<0) return 10; - } - } - return 7-get.value(card); - }, - content:function(){ - "step 0" - event.type=get.type(cards[0],'trick'); - var dme=get.damageEffect(target,player,target); - target.chooseToDiscard('he',function(card){ - return get.type(card,'trick')==event.type; - },'弃置一张牌'+get.translation(event.type)+'牌,或受到1点伤害').ai=function(card){ - if(dme<0){ - return 8-get.value(card); - } - return 0; - } - "step 1" - if(!result.bool){ - target.damage(); - } - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - return get.damageEffect(target,player); - } - }, - threaten:2, - expose:0.2 - } - }, - lingxian:{ - trigger:{player:['respond','useCard']}, - direct:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - if(get.itemtype(event.cards)!='cards') return false; - return game.hasPlayer(function(current){ - return get.distance(player,current,'attack')>1&&player!=current; - }); - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('lingxian'),function(card,player,target){ - return get.distance(player,target,'attack')>1&&player!=target; - }).ai=function(target){ - var att=get.attitude(player,target); - if(att<=-0.5) return 0; - if(att<=3) return att+0.5; - return att+Math.min(0.5,5-target.countCards('h')); - } - "step 1" - if(result.bool){ - game.asyncDraw([player,result.targets[0]]); - player.logSkill('lingxian',result.targets); - } - }, - ai:{ - mingzhi:false, - effect:{ - target:function(card,player,target){ - if(!game.hasPlayer(function(current){ - return get.distance(player,current,'attack')>1&&player!=current&&get.attitude(player,current)>=0; - })){ - return; - } - if(get.type(card)=='equip'&&player==target){ - var distance=get.info(card).distance; - if(distance){ - if(distance.attackFrom<0||distance.globalFrom<0) return 0; - } - } - else{ - if(!target.hasFriend()) return; - var hs=target.countCards('h'); - if(get.tag(card,'respondShan')){ - var shans=target.countCards('h','shan'); - if(shans>1) return [0,1]; - if(shans&&hs>2) return [0,1]; - if(shans) return [0,0]; - if(hs>2) return [0,0]; - if(hs>1) return [1,0.5]; - return [1.5,0]; - } - if(get.tag(card,'respondSha')){ - var shas=target.countCards('h','sha'); - if(shas>1) return [0,1]; - if(shas&&hs>2) return [0,1]; - if(shas) return [0,0]; - if(hs>2) return [0,0]; - if(hs>1) return [1,0.5]; - return [1.5,0]; - } - } - } - }, - threaten:0.8, - expose:0.1 - } - }, - shouyin:{ - skillAnimation:'epic', - animationColor:'water', - unique:true, - enable:'chooseToUse', - init:function(player){ - player.storage.shouyin=false; - }, - mark:true, - filter:function(event,player){ - if(event.type!='dying') return false; - if(player.storage.shouyin) return false; - if(player.isTurnedOver()) return false; - return true; - }, - content:function(){ - "step 0" - player.awakenSkill('shouyin'); - player.storage.shouyin=true; - player.turnOver(); - "step 1" - event.targets=game.filterPlayer(); - event.targets.sort(lib.sort.seat); - "step 2" - if(event.targets.length){ - var target=event.targets.shift(); - if(target.hp0){ - num+=del; - } - else if(att<0){ - num-=del; - } - } - return num; - } - } - }, - intro:{ - content:'limited' - } - }, - sliufeng:{ - mod:{ - targetInRange:function(card,player,target){ - if(card.name=='sha'&&player.hp>=target.hp){ - return true; - } - } - }, - }, - linyun:{ - enable:'chooseToUse', - filterCard:true, - selectCard:2, - position:'he', - viewAs:{name:'sha'}, - prompt:'将两张牌当杀使用', - check:function(card){ - if(_status.event.player.countCards('h')<4) return 6-get.useful(card); - return 7-get.useful(card); - }, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.1; - } - }, - group:['linyun2'] - }, - linyun2:{ - trigger:{player:'shaBegin'}, - filter:function(event){ - return event.skill=='linyun' - }, - forced:true, - popup:false, - content:function(){ - "step 0" - var next=trigger.target.chooseToRespond({name:'shan'}); - next.autochoose=lib.filter.autoRespondShan; - next.ai=function(card){ - if(trigger.target.countCards('h','shan')>1){ - return get.unuseful2(card); - } - return -1; - }; - "step 1" - if(result.bool==false){ - trigger.untrigger(); - trigger.directHit=true; - } - }, - ai:{ - threaten:1.3 - } - }, - linyun3:{ - trigger:{source:'damageAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.parent.skill=='linyun'&&!player.hasSkill('linyun4'); - }, - content:function(){ - player.draw(); - player.addTempSkill('linyun4','shaAfter') - } - }, - linyun4:[], - bofeng:{ - mod:{ - targetInRange:function(card,player,target){ - if(card.name=='sha'&&player.hp>=target.hp){ - return true; - } - } - }, - trigger:{player:'shaBegin'}, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - content:function(){ - "step 0" - trigger.target.chooseToRespond({name:'shan'}); - "step 1" - if(result.bool==false){ - trigger.untrigger(); - trigger.directHit=true; - player.addTempSkill('bofeng2','shaEnd'); - } - }, - ai:{ - threaten:1.3 - } - }, - bofeng2:{ - trigger:{source:'damageBegin'}, - filter:function(event){ - return (event.card&&(event.card.name=='sha')&&event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2'); - }, - forced:true, - popup:false, - content:function(){ - trigger.num++; - }, - }, - hutian:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0&&!player.storage.hutian; - }, - content:function(){ - "step 0" - var next=player.chooseCardTarget({ - filterTarget:function(card,player,target){ - return target.maxHp>=ui.selected.cards.length; - }, - filterCard:true, - selectCard:[1,player.countCards('he')], - ai1:function(card){ - var useful=get.useful(card); - if(card.name=='du'){ - useful=-5; - } - if(ui.selected.cards.length==0&&player.hp==1) return 11-useful; - if(ui.selected.cards.length>1) return 0; - return 7-useful; - }, - ai2:function(target){ - if(target.hp>ui.selected.cards.length){ - return 0; - } - return get.attitude(player,target); - }, - position:'he', - prompt:get.prompt('hutian') - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.$give(result.cards,target); - player.lose(result.cards,ui.special); - player.storage.hutian=target; - player.logSkill('hutian',result.targets); - player.addTempSkill('hutian4','phaseAfter'); - target.addSkill('hutian2'); - target.storage.hutian2=result.cards; - game.addVideo('storage',target,['hutian2',get.cardsInfo(result.cards),'cards']); - } - else{ - event.finish(); - } - "step 2" - var target=event.target; - if(target.storage.hutian2&&target.hp0; - }, - filter:function(event,player){ - return event.source&&event.card&&event.card.name=='sha'&&event.source!=player; - }, - logTarget:'source', - content:function(){ - trigger.source.draw(); - }, - ai:{ - expose:0.1, - threaten:1.2 - } - }, - huanxing:{ - trigger:{player:'phaseBegin'}, - group:'huanxing2', - direct:true, - content:function(){ - "step 0" - if(player.countCards('he')){ - player.chooseCardTarget({ - prompt:get.prompt('huanxing'), - filterCard:lib.filter.cardDiscardable, - position:'he', - filterTarget:function(card,player,target){ - if(target==player) return false; - if(target.sex!='male') return false; - var name=target.name.indexOf('unknown')==0?target.name2:target.name; - if(name==player.storage.huanxing) return false; - - var info=lib.character[name]; - if(info){ - var skills=info[3]; - for(var j=0;j0) return 0; - return 7-get.value(card); - }, - ai2:function(target){ - if(target.isMin()) return 0; - return 6-target.maxHp; - } - }); - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - player.unmark(player.storage.huanxing+'_charactermark'); - player.discard(result.cards); - player.logSkill('huanxing',result.targets); - var name=result.targets[0].name; - if(name.indexOf('unknown')==0){ - name=result.targets[0].name2; - } - var list=[]; - var skills=lib.character[name][3]; - for(var j=0;j0; - }, - content:function(){ - player.unmark(player.storage.huanxing+'_charactermark'); - player.removeAdditionalSkill('huanxing'); - delete player.storage.huanxing; - player.checkMarks(); - } - }, - guiying:{ - enable:'chooseToUse', - filterCard:{color:'black'}, - position:'he', - viewAs:{name:'toulianghuanzhu'}, - prompt:'将一张黑色牌当作偷梁换柱使用', - check:function(card){ - if(_status.event.player.countCards('h')>_status.event.player.hp){ - return 5-get.value(card) - } - return 0; - }, - }, - suiyan:{ - trigger:{source:'damageEnd'}, - direct:true, - filter:function(event,player){ - return event.player.countCards('e'); - }, - content:function(){ - "step 0" - var att=get.attitude(player,trigger.player); - var next=player.chooseToDiscard('he',get.prompt('suiyan')); - next.ai=function(card){ - if(att<0) return 7-get.value(card); - return -1; - } - next.logSkill=['suiyan',trigger.player]; - "step 1" - if(result.bool){ - trigger.player.discard(trigger.player.getCards('e')); - } - }, - ai:{ - expose:0.3 - }, - }, - ningxian:{ - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('he',{color:'black'})>0; - }, - content:function(){ - "step 0" - var enemy=game.countPlayer(function(current){ - return current!=player&&get.damageEffect(current,player,player)>0; - }); - var next=player.chooseCardTarget({ - position:'he', - filterTarget:function(card,player,target){ - return player!=target; - }, - selectCard:[1,player.countCards('he',{color:'black'})], - selectTarget:function(){ - if(ui.selected.targets.length>ui.selected.cards.length){ - game.uncheck('target'); - } - return ui.selected.cards.length; - }, - filterCard:function(card,player){ - return get.color(card)=='black'&&lib.filter.cardDiscardable(card,player); - }, - ai1:function(card){ - if(ui.selected.cards.length>=enemy) return 0; - return 9-get.value(card); - }, - ai2:function(target){ - return get.damageEffect(target,player,player); - }, - prompt:get.prompt('ningxian') - }); - "step 1" - if(result.bool){ - player.discard(result.cards); - player.logSkill('ningxian',result.targets); - event.targets=result.targets; - event.targets.sort(lib.sort.seat); - } - else{ - event.finish(); - } - "step 2" - if(event.targets.length){ - event.targets.shift().damage(); - event.redo(); - } - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-0.5]; - if(!target.hasFriend()){ - if(lib.config.mode=='guozhan'){ - if(!player.hasFriend()) return; - } - else{ - return; - } - } - if(target.countCards('h')>2||target.countCards('e',{color:'black'})){ - return [1,0,0,-1]; - } - return [1,-0.5]; - } - }, - } - }, - xuanyuan:{ - trigger:{player:'phaseBegin'}, - unique:true, - forceunique:true, - filter:function(event,player){ - for(var i=0;i=4) return [1,1.5]; - if(target.hp==3) return [1,1]; - if(target.hp==2) return [1,0.5]; - } - } - } - } - }, - pozhou2:{ - enable:'phaseUse', - filter:function(event,player){ - return player.storage.pozhou>0; - }, - filterTarget:function(card,player,target){ - return target!=player&&!target.hasSkill('fengyin'); - }, - selectTarget:function(){ - return [1,_status.event.player.storage.pozhou]; - }, - prompt:'出牌阶段,你可以指定任意名其他角色并弃置等量的破咒标记,令目标的非锁定技失效直到其下一回合结束', - content:function(){ - player.storage.pozhou--; - if(!player.storage.pozhou){ - player.unmarkSkill('pozhou'); - } - else{ - player.updateMarks(); - } - target.addTempSkill('fengyin',{player:'phaseAfter'}); - }, - ai:{ - order:11, - result:{ - target:function(player,target){ - var skills=target.getSkills(); - for(var i=0;i0&&player!=event.player; - }, - prompt:function(event,player){ - return '是否弃置一枚破咒标记令'+get.translation(event.player)+ - '的非锁定技失效?(剩余'+player.storage.pozhou+'枚)'; - }, - logTarget:'player', - content:function(){ - player.storage.pozhou--; - if(!player.storage.pozhou){ - player.unmarkSkill('pozhou'); - } - else{ - player.updateMarks(); - } - trigger.player.addTempSkill('fengyin',{player:'phaseBegin'}); - } - }, - fengmo:{ - enable:'phaseUse', - usable:1, - filter:function(){ - return game.countPlayer(function(current){ - return current.getEquip(1); - })>=1; - }, - filterTarget:function(card,player,target){ - return player!=target&&!target.isTurnedOver(); - }, - content:function(){ - "step 0" - event.targets=[]; - event.num=0; - var players=game.filterPlayer(); - for(var i=0;i1){ - return 12-get.equipValue(card); - } - return 8-get.equipValue(card); - }, - filter:function(event,player){ - return player.countCards('he',{type:'equip'}); - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - content:function(){ - target.damage(); - }, - ai:{ - order:9.5, - expose:0.2, - result:{ - player:function(player,target){ - return get.damageEffect(target,player,player); - } - } - } - }, - tuzhen:{ - trigger:{source:'damageAfter'}, - filter:function(event,player){ - return event.player.isIn()&&event.player!=player&&event.player.hasCard(function(card){ - return get.type(card)!='basic'; - }); - }, - alter:true, - logTarget:'player', - check:function(event,player){ - return get.attitude(player,event.player)<0; - }, - content:function(){ - var hs=trigger.player.getCards('h',function(card){ - return get.type(card)!='basic'; - }); - if(get.is.altered('tuzhen')){ - hs=hs.randomGet(); - } - trigger.player.discard(hs); - } - }, - mojian:{ - trigger:{player:'shaBegin'}, - check:function(event,player){ - if(get.attitude(player,event.target)>0) return true; - return player.hp0){ - player.stat[player.stat.length-1].card.sha--; - } - }, - group:'poyue2' - }, - poyue2:{ - trigger:{player:'shaBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.card&&get.color(event.card)=='red'; - }, - content:function(){ - trigger.directHit=true; - } - }, - jianji:{ - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0&&lib.filter.cardEnabled({name:'sha'},player); - }, - usable:1, - filterCard:{type:'equip'}, - position:'he', - check:function(card){ - var player=_status.currentPhase; - if(player.countCards('he',{subtype:get.subtype(card)})>1){ - return 11-get.equipValue(card); - } - return 6-get.equipValue(card); - }, - discard:false, - prepare:'throw', - delay:false, - filterTarget:function(card,player,target){ - return lib.filter.targetEnabled({name:'sha'},player,target); - }, - content:function(){ - "step 0" - player.addAdditionalSkill('jianji','unequip'); - player.draw(); - player.useCard({name:'sha'},cards,targets,'jianji',false).animate=false; - player.line(targets,'fire'); - "step 1" - player.removeAdditionalSkill('jianji'); - }, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.1; - }, - result:{ - target:function(player,target){ - player.addAdditionalSkill('jianji_ai','unequip'); - var eff=get.effect(target,{name:'sha'},player,target); - player.removeAdditionalSkill('jianji_ai'); - return eff; - } - }, - effect:{ - player:function(card,player){ - if(_status.currentPhase!=player) return; - if(get.type(card)=='equip'&& - player.countCards('e',{subtype:get.subtype(card)})&& - lib.filter.filterCard({name:'sha'},player)){ - return 0; - } - } - }, - threaten:1.3 - } - }, - huangyu:{ - enable:'phaseUse', - filter:function(event,player){ - if(!lib.card.chiyuxi) return false; - return !player.getStat('skill').huangyu&&player.countCards('he',{color:'red'})>1; - }, - filterCard:{color:'red'}, - selectCard:2, - position:'he', - viewAs:{name:'chiyuxi',nature:'fire'}, - check:function(card){ - var player=_status.event.player; - if(player.hasSkill('jianji')&&get.type(card)=='equip'&& - lib.filter.filterCard({name:'sha'},player)){ - return 0; - } - return 6-get.value(card) - }, - ai:{ - order:8, - expose:0.2, - threaten:1.2 - } - }, - gongshen:{ - trigger:{global:'useCard'}, - priority:15, - filter:function(event,player){ - var type=get.type(event.card,'trick'); - if(type!='basic'&&type!='trick') return false; - return event.player!=player&&player.countCards('he',{type:'equip'})>0&& - event.targets&&event.targets.length>0; - }, - direct:true, - content:function(){ - "step 0" - var effect=0; - for(var i=0;itrigger.targets[0].hp) return val; - if(nme=='sha'&&trigger.targets[0].hp==1&&!trigger.targets[0].countCards('h','shan')) return val; - if(nme=='jiedao'&&trigger.targets[0]==player) return val; - if(nme=='yihuajiemu'&&trigger.targets[0]==player) return val; - if(nme=='shuiyanqijun'&&trigger.targets.contains(player)) return val; - return 0; - } - return -1; - } - "step 1" - if(result.bool){ - game.delay(2); - trigger.untrigger(); - trigger.finish(); - } - else{ - event.finish(); - } - "step 2" - ui.clear(); - }, - ai:{ - effect:{ - player:function(card,player,target){ - if(player!=target) return; - if(get.type(card)=='equip'&&!player.needsToDiscard()){ - return [0,0,0,0]; - } - } - }, - threaten:2, - expose:0.3 - } - }, - xiaozhan:{ - trigger:{global:'useCard'}, - priority:15, - filter:function(event,player){ - return event.card.name=='sha'&&event.player!=player&& - player.countCards('h','sha')>0&&event.targets.contains(player)==false; - }, - direct:true, - content:function(){ - "step 0" - var effect=0; - for(var i=0;i0; - }, - selectCard:2, - filterCard:true, - discard:false, - prepare:'throw', - filterTarget:function(card,player,target){ - return lib.filter.targetEnabled({name:'juedou'},player,target); - }, - check:function(card){ - return Math.max(7-get.value(card),7-get.useful(card)); - }, - content:function(){ - player.useCard({name:'juedou'},targets,cards).animate=false; - }, - ai:{ - result:{ - target:function(player,target){ - return get.effect(target,{name:'juedou'},player,target); - } - }, - order:8, - } - }, - yiesheng:{ - enable:'phaseUse', - filterCard:{color:'black'}, - filter:function(event,player){ - return player.countCards('h',{color:'black'})>0; - }, - selectCard:[1,Infinity], - prompt:'弃置任意张黑色手牌并摸等量的牌', - check:function(card){return 5-get.value(card)}, - content:function(){ - player.draw(cards.length); - }, - ai:{ - order:1, - result:{ - player:1 - }, - }, - }, - dangping:{ - trigger:{source:'damageAfter'}, - direct:true, - filter:function(event,player){ - return event.parent.name!='dangping'&&!player.hasSkill('dangping2')&&player.countCards('he')>0; - }, - content:function(){ - "step 0" - var next=player.chooseCardTarget({ - position:'he', - filterTarget:function(card,player,target){ - return player!=target&&trigger.player!=target&&get.distance(trigger.player,target)<=1; - }, - filterCard:lib.filter.cardDiscardable, - ai1:function(card){ - return get.unuseful(card)+9; - }, - ai2:function(target){ - return get.damageEffect(target,player,player); - }, - prompt:get.prompt('dangping') - }); - "step 1" - if(result.bool){ - player.discard(result.cards); - player.logSkill('dangping',result.targets); - player.addTempSkill('dangping2','phaseAfter'); - } - "step 2" - if(result.bool){ - result.targets[0].damage(); - } - } - }, - dangping2:{}, - duishi:{ - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h')>0&&!player.hasSkill('duishi2'); - }, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h')>0&&!target.hasSkill('duishi3'); - }, - filterCard:true, - check:function(card){return 8-get.value(card)}, - content:function(){ - "step 0" - var suit=get.suit(cards[0]); - target.chooseToDiscard({suit:suit},'h','对诗:弃置一张'+get.translation(suit)+ - '牌,或令'+get.translation(player)+'获得你一张牌').ai=function(card){ - if(get.attitude(target,player)>0) return 0; - return 9-get.value(card); - } - - "step 1" - if(result.bool){ - target.addTempSkill('duishi3','phaseAfter'); - } - else{ - player.gainPlayerCard(target,'he',true); - player.addTempSkill('duishi2','phaseAfter'); - } - }, - ai:{ - order:9, - threaten:1.5, - result:{ - target:-2, - player:0.5 - }, - expose:0.2 - } - }, - duishi2:{}, - duishi3:{}, - guisi:{ - trigger:{target:'shaBefore'}, - popup:false, - direct:true, - filter:function(event,player){ - return player.countCards('h'); - }, - content:function(){ - "step 0" - player.chooseCard('是否交给'+get.translation(trigger.player)+'一张牌并取消此杀?').ai=function(card){ - if(get.attitude(player,trigger.player)>0){ - return 9-get.value(card); - } - if(player.countCards('h',{name:'shan'})) return -1; - return 7-get.value(card); - } - "step 1" - if(result.bool){ - player.logSkill('guisi'); - trigger.player.gain(result.cards,player); - player.$give(result.cards,trigger.player); - trigger.untrigger(); - trigger.finish(); - } - }, - }, - lianwu:{ - mod:{ - selectTarget:function(card,player,range){ - if(card.name=='sha'&&range[1]!=-1) range[1]++; - }, - }, - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return event.card&&get.color(event.card)=='red'; - }, - content:function(){ - trigger.directHit=true; - } - }, - mingfu:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he',{suit:'club'})>0; - }, - position:'he', - filterCard:{suit:'club'}, - discard:false, - prepare:'throw', - filterTarget:function(card,player,target){ - return lib.filter.targetEnabled({name:'guiyoujie'},player,target); - }, - check:function(card){ - if(card.name=='du') return 20; - return Math.max(7-get.value(card),7-get.useful(card)); - }, - content:function(){ - target.addJudge('guiyoujie',cards); - }, - ai:{ - result:{ - target:function(player,target){ - return get.effect(target,{name:'guiyoujie'},player,target); - } - }, - order:8, - } - }, - mufeng_old:{ - init:function(player){ - player.storage.mufeng=0; + var cardx=ui.create.card(); + cardx.classList.add('infohidden'); + cardx.classList.add('infoflip'); + player.$throw(cardx,1000,'nobroadcast'); + } + 'step 2' + if(event.player==game.me) game.delay(0.5); + 'step 3' + if(event.card){ + event.card.fix(); + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + } + } + }, + hujing:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return get.cardPile('lianyaohu')?true:false; + }, + content:function(){ + var card=get.cardPile('lianyaohu'); + if(card){ + player.equip(card); + player.$gain2(card); + game.delayx(); + } + }, + mod:{ + maxHandcard:function(player,num){ + if(player.getEquip('lianyaohu')) return num+2; + } + }, + }, + gaizao:{ + trigger:{player:'useCardToBegin'}, + filter:function(event,player){ + if(player.countCards('e')==5) return false; + return lib.skill.gaizao.filterx(event.card,player)&&event.target==player; + }, + direct:true, + filterx:function(card,player){ + if(!lib.inpile.contains(card.name)) return false; + var info=get.info(card); + if(info.type!='equip') return false; + if(info.nomod) return false; + if(info.unique) return false; + if(!info.subtype) return false; + if(!player.getEquip(info.subtype)) return false; + return true; + }, + content:function(){ + 'step 0' + var list=['equip1','equip2','equip3','equip4','equip5']; + for(var i=0;i2&& + get.damageEffect(trigger.target,trigger.player,player)<0); + next.ai=function(card){ + if(goon){ + if(trigger.target.hp==1) return 10-get.value(card); + return 7-get.value(card); + } + return 0; + }; + next.logSkill=['tiebi',trigger.target]; + "step 1" + if(result.bool){ + trigger.target.changeHujia(); + } + }, + ai:{ + threaten:1.1 + } + }, + shenyan:{ + trigger:{source:'damageBegin'}, + skillAnimation:true, + animationColor:'fire', + filter:function(event,player){ + return !player.storage.shenyan&&event.nature=='fire'; + }, + intro:{ + content:'limited' + }, + mark:true, + logTarget:'player', + init:function(player){ + player.storage.shenyan=false; + }, + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return 0; + if(player.hasUnknown()) return 0; + var num=0,players=game.filterPlayer(); + for(var i=0;i0){ + num++; + } + else if(eff<0){ + num--; + } + } + } + return num>0; + }, + content:function(){ + trigger.num++; + player.addSkill('shenyan2'); + player.storage.shenyan=true; + player.awakenSkill('shenyan'); + player.storage.shenyan2=[]; + var players=game.filterPlayer(); + for(var i=0;i0; + }, + content:function(){ + 'step 0' + target.draw(); + 'step 1' + target.chooseToDiscard(2,'h',true); + }, + selectTarget:-1, + ai:{ + order:9, + result:{ + target:-1 + } + } + }, + xuanying:{ + subSkill:{ + sha:{ + enable:'chooseToUse', + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(player.isLinked()) return false; + }, + precontent:function(){ + player.link(); + // player.getStat().card.sha--; + }, + filterCard:function(){return false}, + selectCard:-1, + prompt:'横置武将牌,视为使用一张无视距离的杀', + ai:{ + order:function(){ + // if(_status.event.player.countCards('h',{type:'equip'})) return 9; + return 3.15; + }, + skillTagFilter:function(player,tag,arg){ + if(arg!='use') return false; + if(player.isLinked()) return false; + }, + respondSha:true, + }, + mod:{ + targetInRange:function(card){ + if(_status.event.skill=='xuanying_sha') return true; + } + }, + }, + shan:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(!player.isLinked()) return false; + if(event.responded) return false; + if(!event.filterCard({name:'shan'})) return false; + return true; + }, + check:function(event,player){ + if(get.damageEffect(player,event.player,player)>=0) return false; + return true; + }, + content:function(){ + 'step 0' + player.link(); + 'step 1' + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'shan'}} + }, + ai:{ + target:function(card,player,target,current){ + if(!player.isLinked()&¤t<0) return 1.5; + if(!target.hasFriend()) return; + if(get.tag(card,'loseCard')&&_status.currentPhase!=target&&target.countCards('he')){ + return [0.5,Math.max(2,target.countCards('h'))]; + } + if(get.tag(card,'respondSha')||get.tag(card,'respondShan')){ + if(get.attitude(player,target)>0&&card.name=='juedou') return; + return [0.5,target.countCards('h','sha')+target.countCards('h','shan')]; + } + } + } + }, + damage:{ + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.source&&event.source.isAlive()&&player.isLinked()&& + lib.filter.targetEnabled({name:'sha'},player,event.source); + }, + check:function(event,player){ + return get.effect(event.source,{name:'sha'},player,player)>0; + }, + logTarget:'source', + content:function(){ + 'step 0' + player.link(); + 'step 1' + player.useCard({name:'sha'},trigger.source); + } + }, + use:{ + trigger:{player:'loseEnd'}, + direct:true, + filter:function(event,player){ + return _status.currentPhase!=player&&player.isLinked()&&event.cards&&event.cards.length; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('xuanying'),function(card,player,target){ + return lib.filter.targetEnabled({name:'sha'},player,target); + }).set('ai',function(target){ + return get.effect(target,{name:'sha'},_status.event.player); + }); + 'step 1' + if(result.bool){ + player.logSkill('xuanying'); + if(!event.isMine()) game.delay(0.5); + player.link(); + player.useCard({name:'sha'},result.targets,false); + } + }, + } + }, + group:['xuanying_sha','xuanying_use'], + ai:{ + threaten:function(player,target){ + if(target.isLinked()) return 0.7; + return 1.4; + } + } + }, + hwendao:{ + trigger:{player:['useCardAfter','respondAfter',]}, + check:function(event,player){ + return get.attitude(player,_status.currentPhase)<=0; + }, + logTarget:function(){ + return _status.currentPhase; + }, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(!_status.currentPhase.countCards('he')) return false; + return event.cards&&event.cards.length==1; + }, + content:function(){ + 'step 0' + var suit=get.suit(trigger.cards[0]); + var goon=(get.attitude(_status.currentPhase,player)<=0); + _status.currentPhase.chooseToDiscard('弃置一张'+get.translation(suit+'2')+ + '牌,或令'+get.translation(player)+'获得你的一张牌',{suit:suit}).ai=function(card){ + if(goon) return 8-get.value(card); + return 0; + } + 'step 1' + if(!result.bool){ + player.gainPlayerCard(_status.currentPhase,'he',true); + } + }, + ai:{ + threaten:0.7 + } + }, + lingfeng:{ + trigger:{player:'phaseEnd'}, + frequent:true, + filter:function(event,player){ + return get.cardCount(true,player)>=Math.min(3,player.hp); + }, + content:function(){ + 'step 0' + player.chooseTarget('凌锋:造成一点伤害,或取消并获得一点护甲',function(card,player,target){ + return player!=target&&get.distance(player,target,'attack')<=1; + }).ai=function(target){ + if(player.hp==1) return 0; + if(player.hp==2&&target.hp>=3) return 0; + return get.damageEffect(target,player,player); + } + 'step 1' + if(result.bool){ + player.line(result.targets[0]); + result.targets[0].damage(); + } + else{ + player.changeHujia(); + } + }, + ai:{ + order:-10, + result:{ + target:2 + }, + threaten:1.5 + } + }, + hxunzhi:{ + unique:true, + enable:'phaseUse', + derivation:['wusheng','paoxiao'], + filter:function(event,player){ + return !player.storage.hxunzhi; + }, + alter:true, + init:function(player){ + player.storage.hxunzhi=false; + }, + mark:true, + intro:{ + content:'limited' + }, + skillAnimation:true, + animationColor:'fire', + content:function(){ + 'step 0' + player.awakenSkill('hxunzhi'); + player.storage.hxunzhi=true; + if(!get.is.altered('hxunzhi')){ + var targets=game.filterPlayer(function(current){ + return player.canUse('wanjian',current); + }); + targets.sort(lib.sort.seat); + player.useCard({name:'wanjian'},targets); + } + 'step 1' + player.addSkill('wusheng'); + player.addSkill('paoxiao'); + player.addSkill('hxunzhi2'); + }, + ai:{ + order:2, + result:{ + player:function(player){ + if(get.mode()=='identity'){ + if(player.identity=='zhu') return 0; + if(player.identity=='nei') return 0; + } + else if(get.mode()=='guozhan'){ + if(player.identity=='ye') return 0; + if(player.isUnseen()) return 0; + } + if(player.hp==1) return 1; + if(player.hasUnknown()) return 0; + if(!player.hasFriend()) return 0; + var enemies=player.getEnemies(); + if(enemies.length+1==game.players.length) return 0; + var num=player.hasCard(function(card){ + return card.name=='sha'||get.color(card)=='red'; + }); + if(num<2) return 0; + for(var i=0;i0&& + !enemies[i].getEquip(2)&&num>enemies[i].hp&&enemies[i].hp<=2){ + return 1; + } + } + return 0; + } + } + } + }, + hxunzhi2:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('xunzhi2'); + player.die(); + } + }, + hjifeng:{ + enable:'phaseUse', + filter:function(event,player){ + if(!player.countCards('h')) return false; + if(player.countCards('h',{type:'jiqi'})) return false; + return true; + }, + discard:false, + prepare:'throw2', + usable:1, + check:function(card){ + return 6-get.value(card); + }, + filterCard:true, + content:function(){ + var name=get.suit(cards[0]); + ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); + switch(name){ + case 'spade':name='qinglongzhigui';break; + case 'club':name='baishouzhihu';break; + case 'diamond':name='zhuquezhizhang';break; + case 'heart':name='xuanwuzhihuang';break; + } + player.gain(get.cardPile(name)||game.createCard(name),'draw'); + }, + ai:{ + order:4, + result:{ + player:1 + } + } + }, + hjifeng_old:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + if(!player.countCards('he',{type:'equip'})) return false; + if(player.countCards('h',{type:'jiqi'})) return false; + if(get.cardPile(function(card){return get.type(card)=='jiqi'})) return true; + return false; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseToDiscard('he','祭风:是否弃置一张装备牌并获得一张祭器牌?',{type:'equip'}).set('ai',function(card){ + return 6-get.value(card); + }).logSkill='hjifeng'; + 'step 1' + if(result.bool){ + var card=get.cardPile(function(card){ + return get.type(card)=='jiqi'&&card.name.indexOf('yuchan')!=0; + })||get.cardPile(function(card){ + return get.type(card)=='jiqi'; + }); + if(card){ + player.gain(card,'draw'); + } + } + } + }, + lmazui:{ + audio:'mazui', + enable:'phaseUse', + usable:1, + filterCard:{color:'black'}, + filterTarget:function(card,player,target){ + return !target.hasSkill('lmazui2'); + }, + check:function(card){ + return 6-get.value(card); + }, + discard:false, + prepare:'give', + content:function(){ + target.storage.lmazui2=cards[0]; + target.addSkill('lmazui2'); + game.addVideo('storage',target,['lmazui2',get.cardInfo(target.storage.lmazui2),'card']); + }, + ai:{ + expose:0.2, + result:{ + target:function(player,target){ + return -target.hp; + } + }, + order:4, + threaten:1.2 + } + }, + lmazui2:{ + trigger:{source:'damageBegin'}, + forced:true, + mark:'card', + filter:function(event){ + return event.num>0; + }, + content:function(){ + trigger.num--; + player.addSkill('lmazui3'); + player.removeSkill('lmazui2'); + }, + intro:{ + content:'card' + } + }, + lmazui3:{ + trigger:{source:['damageEnd','damageZero']}, + forced:true, + popup:false, + content:function(){ + player.gain(player.storage.lmazui2,'gain2','log'); + player.removeSkill('lmazui3'); + delete player.storage.lmazui2; + } + }, + hyunshen:{ + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'; + }, + frequent:true, + init:function(player){ + player.storage.hyunshen=0; + }, + content:function(){ + player.storage.hyunshen++; + player.markSkill('hyunshen'); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'respondShan')){ + var shans=target.countCards('h','shan'); + var hs=target.countCards('h'); + if(shans>1) return [1,1]; + if(shans&&hs>2) return [1,1]; + if(shans) return [1,0.5]; + if(hs>2) return [1,0.3]; + if(hs>1) return [1,0.2]; + return [1.2,0]; + } + } + }, + threaten:0.8 + }, + intro:{ + content:'mark' + }, + group:'hyunshen2' + }, + hyunshen2:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.hyunshen>0; + }, + content:function(){ + player.draw(player.storage.hyunshen); + player.storage.hyunshen=0; + player.unmarkSkill('hyunshen'); + }, + mod:{ + globalTo:function(from,to,distance){ + if(typeof to.storage.hyunshen=='number') return distance+to.storage.hyunshen; + } + } + }, + hlingbo:{ + audio:['lingbo',2], + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'; + }, + frequent:true, + content:function(){ + player.draw(2); + }, + ai:{ + mingzhi:false, + useShan:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'respondShan')){ + var shans=target.countCards('h','shan'); + var hs=target.countCards('h'); + if(shans>1) return [0,1]; + if(shans&&hs>2) return [0,1]; + if(shans) return [0,0]; + if(hs>2) return [0,0]; + if(hs>1) return [1,0.5]; + return [1.5,0]; + } + } + }, + threaten:0.8 + } + }, + gtiandao:{ + audio:true, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('gtiandao'),'he').ai=function(card){ + var trigger=_status.event.parent._trigger; + var player=_status.event.player; + var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result; + } + else{ + return -result; + } + }; + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.logSkill('gtiandao'); + player.$gain2(trigger.player.judging[0]); + player.gain(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.position.appendChild(result.cards[0]); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + } + "step 3" + game.delay(2); + }, + ai:{ + tag:{ + rejudge:1 + }, + threaten:1.5 + } + }, + jinlin:{ + enable:'phaseUse', + unique:true, + mark:true, + skillAnimation:true, + animationColor:'metal', + init:function(player){ + player.storage.jinlin=false; + }, + filter:function(event,player){ + if(player.storage.jinlin) return false; + return true; + }, + filterTarget:true, + selectTarget:[1,Infinity], + contentBefore:function(){ + player.awakenSkill('jinlin'); + player.storage.jinlin=true; + }, + content:function(){ + target.changeHujia(3); + target.addSkill('jinlin2'); + target.storage.jinlin2=3; + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(player.hp==1) return 1; + var num=0; + var players=game.filterPlayer(); + for(var i=0;i2){ + if(players[i].hp==1) return 1; + if(players[i].hp==2) num++; + } + } + if(player.hasUnknown()) return 0; + if(num>1) return 1; + return 0; + } + }, + }, + intro:{ + content:'limited' + } }, - group:['mufeng_gain','mufeng_lose'], - mark:true, - intro:{ - content:function(storage){ - if(storage>0){ - return '防御距离+'+storage; - } - else if(storage<0){ - return '防御距离'+storage; - } - else{ - return '无距离变化'; - } - } - }, - subSkill:{ - lose:{ - trigger:{global:'dieAfter'}, - forced:true, - filter:function(event,player){ - return player.storage.mufeng>game.players.length/2; + jinlin2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + if(player.hujia>0){ + player.changeHujia(-1); + } + player.storage.jinlin2--; + if(player.hujia==0||player.storage.jinlin2==0){ + player.removeSkill('jinlin2'); + delete player.storage.jinlin2; + } + }, + }, + lingyue:{ + trigger:{player:'shaBegin'}, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + logTarget:'target', + filter:function(event,player){ + return event.target.countCards('he')>0; + }, + content:function(){ + trigger.target.chooseToDiscard('he',true); + } + }, + fengze:{ + enable:'phaseUse', + filterCard:{color:'black'}, + selectCard:1, + position:'he', + usable:1, + viewAs:{name:'taoyuan'}, + filter:function(event,player){ + return player.countCards('he',{color:'black'})>0; + }, + audio:true, + prompt:'将一张黑色牌当作桃园结义使用', + check:function(card){ + return 7-get.useful(card) + }, + ai:{ + threaten:1.5 + } + }, + zaowu:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h',{suit:['spade','heart']})>0; + }, + filterCard:{suit:['spade','heart']}, + viewAs:{name:'fengyinzhidan'}, + check:function(card){ + return 7-get.value(card); + }, + ai:{ + order:8.5, + } + }, + huanxia:{ + enable:'chooseToUse', + filterCard:function(card){ + return get.color(card)=='red'; + }, + position:'he', + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.countCards('he',{color:'red'})) return false; + }, + prompt:'将一张红色牌当杀使用', + check:function(card){return 5-get.value(card)}, + ai:{ + order:function(){ + return get.order({name:'sha'})+0.1; }, - content:function(){ - player.storage.mufeng=0; - player.updateMarks(); - } + skillTagFilter:function(player,tag,arg){ + if(arg!='use') return false; + if(!player.countCards('he',{color:'red'})) return false; + }, + }, + group:['huanxia_expire','huanxia_draw','huanxia_gain'], + subSkill:{ + expire:{ + trigger:{source:'damageAfter'}, + forced:true, + popup:false, + filter:function(event){ + return event.parent.skill=='huanxia'; + }, + content:function(){ + player.storage.huanxia=true; + } + }, + draw:{ + trigger:{player:'shaAfter'}, + forced:true, + popup:false, + content:function(){ + if(trigger.parent.skill=='huanxia'){ + var card=trigger.cards[0]; + if(get.itemtype(card)=='card'&&get.position(card)=='d'&&!player.storage.huanxia){ + ui.special.appendChild(card); + if(!player.storage.huanxia_draw){ + player.storage.huanxia_draw=[]; + } + player.storage.huanxia_draw.push(card); + } + } + delete player.storage.huanxia; + } + }, + gain:{ + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player.storage.huanxia_draw; + }, + content:function(){ + player.gain(player.storage.huanxia_draw,'gain2'); + delete player.storage.huanxia_draw; + } + } + } + }, + kongmo:{ + trigger:{player:'useCardAfter'}, + forced:true, + filter:function(event,player){ + if(event.parent.name=='kongmo') return false; + if(!event.targets||!event.card) return false; + var type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + var card=game.createCard(event.card.name,event.card.suit,event.card.number); + for(var i=0;i=0) return 0; + if(get.population('fan')<3) return 0; + return -1; + } + case 'zhong':{ + if(get.population('fan')<3) return 0; + return -1; + } + case 'nei':return 0; + case 'fan':{ + if(get.population('fan')==0) return 0; + if(get.population('zhong')<2) return 0; + return -1; + } + } + break; + } + case 'guozhan':{ + if(player.identity=='unknown') return 0; + return get.population(player.identity)>=3?-1:0; + } + default:{ + return -1; + } + } + }, + } + } + }, + bingfeng2:{ + mod:{ + cardEnabled:function(){ + return false; + }, + cardUsable:function(){ + return false; + }, + cardRespondable:function(){ + return false; + }, + cardSavable:function(){ + return false; + } + }, + trigger:{player:'turnOverAfter'}, + forced:true, + filter:function(event,player){ + return !player.isTurnedOver(); + }, + content:function(){ + player.removeSkill('bingfeng2'); + } + }, + yudun:{ + mod:{ + cardEnabled:function(card,player){ + if(get.type(card,'trick')=='trick') return false; + }, + cardRespondable:function(card,player){ + if(get.type(card,'trick')=='trick') return false; + }, + cardSavable:function(card,player){ + if(get.type(card,'trick')=='trick') return false; + }, + }, + enable:'chooseToUse', + filterCard:function(card){ + return get.type(card,'trick')=='trick'; + }, + selectCard:2, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(player.countCards('h',{type:['trick','delay']})<2) return false; + }, + check:function(){return 1}, + ai:{ + skillTagFilter:function(player,tag,arg){ + if(arg!='use') return false; + if(player.countCards('h',{type:['trick','delay']})<2) return false; + }, + respondSha:true, + order:function(){ + return get.order({name:'sha'})+0.1; + }, + useful:-1, + value:-1 + }, + group:'yudun_count', + subSkill:{ + count:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='yudun'&&_status.currentPhase==player; + }, + content:function(){ + player.getStat().card.sha--; + } + } + } + }, + guozao:{ + trigger:{global:'damageEnd'}, + forced:true, + logv:false, + alter:true, + check:function(event,player){ + return game.hasPlayer(function(current){ + return get.attitude(player,current)>2&¤t.countCards('h')==1 + }); + }, + filter:function(event,player){ + if(event.source==player) return false; + if(get.distance(player,event.player)>1) return false; + return game.hasPlayer(function(current){ + return current.countCards('h'); + }); + }, + content:function(){ + "step 0" + var cards=[]; + if(ui.cardPile.childNodes.length<3){ + var discardcards=get.cards(3); + for(var i=0;i0&&get.distance(player,target)<=dist; + }).ai=function(target){ + var att=get.attitude(player,target); + var hs=target.getCards('h'); + var num=hs.length; + if(num<=1) return att*2; + if(num==2){ + for(var i=0;i6,target,'raw') return att; + } + if(target==player){ + for(var i=0;i<2;i++){ + if(get.value(cards[i])>6,target,'raw') return -1; + } + } + return att/2; + } + if(num==3){ + if(target==player){ + var num2=0; + for(var i=0;i<3;i++){ + num2+=get.value(cards[i],player,'raw'); + num2-=get.value(hs[i],player,'raw'); + } + if(num2>0) return 0.5; + if(num2<0) return -0.5; + } + return 0; + } + return -att/2; + }; + "step 1" + if(result.bool&&result.targets[0]){ + var target=result.targets[0]; + player.line(target,'green'); + // player.logSkill('guozao',target,'green',true); + var cards=target.getCards('h'); + target.lose(cards)._triggered=null; + game.log(target,'弃置了',cards,',并获得三张牌'); + // target.$draw(3); + target.$throw(cards); + target.gain(event.cards,'draw')._triggered=null; + } + else{ + event.finish(); + } + }, + ai:{ + expose:0.1 + } + }, + heihuo:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h')>0&&player.countCards('he',{type:'equip'})>0&&!player.hasSkill('heihuo2'); + }, + filterCard:function(card){ + return get.type(card)=='equip'; + }, + position:'he', + check:function(card){ + var player=_status.currentPhase; + var nh=player.countCards('h'); + var pos=get.position(card); + if(nh<2) return 0; + if(nh>4) return 0; + if(nh==4&&pos=='e') return 0; + if(player.countCards('he',{subtype:get.subtype(card)})>1){ + return 11-get.equipValue(card)+(pos=='e'?0.4:0); + } + return 5.5-get.value(card)+(pos=='e'?0.4:0); + }, + content:function(){ + "step 0" + player.draw(player.countCards('h')); + "step 1" + if(player.countCards('h')>=8){ + player.damage(3,'fire'); + player.addTempSkill('heihuo2','phaseAfter'); + } + }, + ai:{ + order:10, + threaten:1.4, + result:{ + player:1 + } + } + }, + heihuo2:{}, + yaotong:{ + alter:true, + group:['yaotong1','yaotong2','yaotong3'], + ai:{ + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag){ + if(tag=='respondShan'&&get.is.altered('yaotong')) return false; + if(player.countCards('h')%2==0) return false; + }, + }, + threaten:1.3 + }, + yaotong1:{ + enable:['chooseToRespond','chooseToUse'], + filterCard:true, + viewAs:{name:'sha'}, + filter:function(event,player){ + var num=player.countCards('h'); + if(num==0) return false; + return num%2==1; + }, + prompt:'将一张手牌当作杀打出', + check:function(card){return 6-get.value(card)} + }, + yaotong2:{ + enable:['chooseToRespond','chooseToUse'], + filterCard:true, + viewAs:{name:'shan'}, + filter:function(event,player){ + if(get.is.altered('yaotong')) return false; + var num=player.countCards('h'); + if(num==0) return false; + return num%2==1; + }, + prompt:'将一张手牌当作闪打出', + check:function(card){return 6-get.value(card)} + }, + yaotong3:{ + enable:'chooseToUse', + filterCard:true, + viewAs:{name:'wuxie'}, + filter:function(event,player){ + var num=player.countCards('h'); + if(num==0) return false; + return num%2==0; + }, + viewAsFilter:function(player){ + var num=player.countCards('h'); + if(num==0) return false; + return num%2==0; + }, + prompt:'将一张手牌当作无懈可击使用', + check:function(card){return 7-get.value(card)}, + }, + yaotong4:{ + enable:'chooseToUse', + filterCard:true, + viewAs:{name:'tao'}, + filter:function(event,player){ + var num=player.countCards('h'); + if(num==0) return false; + return num%2==0; + }, + viewAsFilter:function(player){ + var num=player.countCards('h'); + if(num==0) return false; + return num%2==0; + }, + prompt:'将一张手牌当作桃使用', + check:function(card){return 9-get.value(card)}, + }, + pojian:{ + trigger:{player:'loseEnd'}, + filter:function(event,player){ + if(player.countCards('h')) return false; + for(var i=0;i0; + }, + filterCard:true, + position:'he', + content:function(){ + player.addSkill('huajin2'); + }, + check:function(card){ + return 5-get.value(card); + }, + ai:{ + order:10, + result:{ + player:function(player){ + if(player.countCards('h','juedou')) return 1; + if(player.countCards('h','sha')==0) return 0; + var players=game.filterPlayer(); + for(var i=0;i0){ + return 1; + } + } + return 0; + } + } + } + }, + huajin2:{ + trigger:{source:'damageBegin'}, + forced:true, + content:function(){ + trigger.num++; + }, + group:'huajin3' + }, + huajin3:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('huajin2'); + } + }, + yuchen:{ + trigger:{player:['useCard','respondAfter']}, + direct:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(event.cards){ + for(var i=0;i0; + }).ai=function(target){ + return -get.attitude(player,target); + }; + "step 1" + if(result.bool){ + player.logSkill('yuchen',result.targets); + player.discardPlayerCard(result.targets[0],true); + } + }, + ai:{ + threaten:0.7 + } + }, + bingjian:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he',{color:'black',name:'sha'})>0; + }, + filterCard:function(card){ + return card.name=='sha'&&get.color(card)=='black'; + }, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h')>0; + }, + line:'thunder', + content:function(){ + "step 0" + target.showHandcards(); + "step 1" + var cards=target.getCards('h','shan'); + if(cards.length){ + target.discard(cards); + } + else{ + target.damage('thunder'); + } + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target,'thunder'); + } + }, + expose:0.2 + } + }, + rumeng:{ + trigger:{global:'phaseUseBefore'}, + direct:true, + filter:function(event,player){ + return event.player!=player&&player.countCards('he',{type:'basic'})2; + var next=player.chooseToDiscard(function(card){ + return get.type(card)!='basic'; + },get.prompt('rumeng',trigger.player),'he'); + next.logSkill=['rumeng',trigger.player]; + next.ai=function(card){ + if(yep){ + return 6-get.value(card); + } + return 0; + } + "step 1" + if(result.bool){ + trigger.player.chooseToDiscard({type:'basic'},'入梦:弃置一张基本牌或跳过出牌及弃牌阶段').ai=function(card){ + return 5-get.value(card); + } + } + else{ + event.finish(); + } + "step 2" + if(!result.bool){ + trigger.untrigger(); + trigger.finish(); + trigger.player.skip('phaseDiscard'); + } + }, + ai:{ + expose:0.1 + } + }, + lianda:{ + trigger:{player:'shaAfter'}, + direct:true, + filter:function(event,player){ + return event.target.isAlive()&&player.countCards('he')>0&&!player.hasSkill('lianda2'); + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he',get.prompt('lianda')); + next.ai=function(card){ + if(get.effect(trigger.target,{name:'sha'},player,player)>0){ + return 7-get.value(card); + } + return 0; + } + next.logSkill='lianda'; + "step 1" + if(result.bool){ + player.addTempSkill('lianda2','phaseAfter'); + player.useCard({name:'sha'},trigger.target); + } + } + }, + lianda2:{}, + huiqi:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return player.hp3){ + return att+Math.max(0,5-target.countCards('h')); + } + return att/4; + } + if(att>3){ + return att+Math.max(0,5-target.countCards('h')); + } + return att; + } + "step 1" + if(result.bool){ + player.logSkill('huiqi',result.targets); + result.targets[0].draw(player.maxHp-player.hp); + } + }, + ai:{ + expose:0.2, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + return [1,0.5]; + } + } + } + } + }, + xianghui:{ + enable:'phaseUse', + usable:1, + filterCard:{color:'red'}, + filter:function(){ + var players=game.filterPlayer(); + var min=players[0].hp; + for(var i=0;i2){ + if(player.countCards('h','shan')||player.getEquip(2)|| + trigger.target.hp==1||player.hp>trigger.target.hp+1){ + if(!trigger.target.countCards('h','shan')||trigger.target.countCards('h')3){ + return 100-target.countCards('h'); + } + return att; + } + "step 1" + if(result.bool){ + player.logSkill('fzhenwei',result.targets); + result.targets[0].gain(event.cards,'gain2','log'); + } + }, + ai:{ + expose:0.1, + threaten:1.6 + } + }, + shangxi:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + if(player.countCards('he')==0) return false; + return game.hasPlayer(function(current){ + return (current!=player&&get.distance(player,current,'attack')<=1&&player.hp<=current.hp); + }); + }, + content:function(){ + "step 0" + var next=player.chooseCardTarget({ + position:'he', + filterTarget:function(card,player,target){ + return get.distance(player,target,'attack')<=1&& + player!=target&&player.hp<=target.hp; + }, + filterCard:lib.filter.cardDiscardable, + ai1:function(card){ + return 9-get.value(card); + }, + ai2:function(target){ + return get.damageEffect(target,player,player); + }, + prompt:get.prompt('shangxi') + }); + "step 1" + if(result.bool){ + player.discard(result.cards); + player.logSkill('shangxi',result.targets); + result.targets[0].damage(); + } + }, + ai:{ + expose:0.3 + } + }, + fuyan:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event){ + return event.num>0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('fuyan'),function(card,player,target){ + return !target.hujia; + }).ai=function(target){ + if(get.attitude(player,target)<=0) return 0; + var eff=-get.damageEffect(target,target,player)+(player==target?2:0); + if(target.hp==1) eff+=2; + return Math.min(1,eff); + }; + "step 1" + if(result.bool){ + player.logSkill('fuyan',result.targets); + var target=result.targets[0]; + target.changeHujia(); + } + }, + ai:{ + effect:{ + target:function(card,player){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + return 0.7; + } + } + }, + expose:0.2 + } + }, + fuyan2:{ + trigger:{player:'damageBegin'}, + filter:function(event,player){ + return event.num>0; + }, + forced:true, + mark:'card', + content:function(){ + trigger.num--; + player.removeSkill('fuyan2'); + ui.discardPile.appendChild(player.storage.fuyan2); + delete player.storage.fuyan2; + }, + intro:{ + content:'card' + } + }, + pingshen:{ + trigger:{source:'damageBegin'}, + forced:true, + popup:false, + unique:true, + silent:true, + content:function(){ + trigger.player.addSkill('pingshen2'); + trigger.player.storage.pingshen=player; + } + }, + pingshen2:{ + enable:'phaseUse', + unique:true, + mark:true, + init:function(player){ + player.storage.pingshen2=false; + }, + filter:function(event,player){ + return !player.storage.pingshen2&&player.storage.pingshen.isAlive(); + }, + filterCard:true, + filterTarget:function(card,player,target){ + return target==player.storage.pingshen; + }, + selectTarget:-1, + position:'he', + content:function(){ + player.storage.pingshen2=true; + player.unmarkSkill('pingshen2'); + player.gain(target.getCards('h'),target); + target.$give(target.countCards('h'),player); + player.turnOver(); + player.addSkill('pingshen3'); + }, + check:function(card){return 8-get.value(card);}, + intro:{ + content:'limited' + }, + ai:{ + order:10, + result:{ + player:function(player){ + if(player.classList.contains('turnedover')) return 10; + if(get.attitude(player,player.storage.pingshen)>=0){ + return 0; + } + if(player.storage.pingshen.countCards('h')>player.storage.pingshen.hp) return 1; + return 0; + } + }, + effect:{ + target:function(card,player,target){ + if(!target.storage.pingshen2){ + if(card.name=='guiyoujie') return [0,1]; + } + } + } + }, + }, + pingshen3:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + content:function(){ + "step 0" + player.removeSkill('pingshen3'); + if(player.storage.pingshen.classList.contains('dead')){ + event.finish(); + } + else{ + player.chooseCard('he',true,player.storage.pingshen.hp); + } + "step 1" + player.storage.pingshen.gain(result.cards,player); + player.$give(result.cards.length,player.storage.pingshen); + } + }, + guaili:{ + trigger:{source:'damageBegin'}, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2'; + }, + forced:true, + content:function(){ + trigger.num++; + player.addSkill('guaili2'); + } + }, + guaili2:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('guaili2'); + player.chooseToDiscard(2,true); + } + }, + xingzhui:{ + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }, + check:function(card){ + if(get.type(card)=='equip'){ + var distance=get.info(card).distance; + if(distance){ + if(distance.attackFrom<0||distance.globalFrom<0) return 10; + } + } + return 7-get.value(card); + }, + content:function(){ + "step 0" + event.type=get.type(cards[0],'trick'); + var dme=get.damageEffect(target,player,target); + target.chooseToDiscard('he',function(card){ + return get.type(card,'trick')==event.type; + },'弃置一张牌'+get.translation(event.type)+'牌,或受到1点伤害').ai=function(card){ + if(dme<0){ + return 8-get.value(card); + } + return 0; + } + "step 1" + if(!result.bool){ + target.damage(); + } + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + return get.damageEffect(target,player); + } + }, + threaten:2, + expose:0.2 + } + }, + lingxian:{ + trigger:{player:['respond','useCard']}, + direct:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(get.itemtype(event.cards)!='cards') return false; + return game.hasPlayer(function(current){ + return get.distance(player,current,'attack')>1&&player!=current; + }); + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('lingxian'),function(card,player,target){ + return get.distance(player,target,'attack')>1&&player!=target; + }).ai=function(target){ + var att=get.attitude(player,target); + if(att<=-0.5) return 0; + if(att<=3) return att+0.5; + return att+Math.min(0.5,5-target.countCards('h')); + } + "step 1" + if(result.bool){ + game.asyncDraw([player,result.targets[0]]); + player.logSkill('lingxian',result.targets); + } + }, + ai:{ + mingzhi:false, + effect:{ + target:function(card,player,target){ + if(!game.hasPlayer(function(current){ + return get.distance(player,current,'attack')>1&&player!=current&&get.attitude(player,current)>=0; + })){ + return; + } + if(get.type(card)=='equip'&&player==target){ + var distance=get.info(card).distance; + if(distance){ + if(distance.attackFrom<0||distance.globalFrom<0) return 0; + } + } + else{ + if(!target.hasFriend()) return; + var hs=target.countCards('h'); + if(get.tag(card,'respondShan')){ + var shans=target.countCards('h','shan'); + if(shans>1) return [0,1]; + if(shans&&hs>2) return [0,1]; + if(shans) return [0,0]; + if(hs>2) return [0,0]; + if(hs>1) return [1,0.5]; + return [1.5,0]; + } + if(get.tag(card,'respondSha')){ + var shas=target.countCards('h','sha'); + if(shas>1) return [0,1]; + if(shas&&hs>2) return [0,1]; + if(shas) return [0,0]; + if(hs>2) return [0,0]; + if(hs>1) return [1,0.5]; + return [1.5,0]; + } + } + } + }, + threaten:0.8, + expose:0.1 + } + }, + shouyin:{ + skillAnimation:'epic', + animationColor:'water', + unique:true, + enable:'chooseToUse', + init:function(player){ + player.storage.shouyin=false; + }, + mark:true, + filter:function(event,player){ + if(event.type!='dying') return false; + if(player.storage.shouyin) return false; + if(player.isTurnedOver()) return false; + return true; + }, + content:function(){ + "step 0" + player.awakenSkill('shouyin'); + player.storage.shouyin=true; + player.turnOver(); + "step 1" + event.targets=game.filterPlayer(); + event.targets.sort(lib.sort.seat); + "step 2" + if(event.targets.length){ + var target=event.targets.shift(); + if(target.hp0){ + num+=del; + } + else if(att<0){ + num-=del; + } + } + return num; + } + } + }, + intro:{ + content:'limited' + } + }, + sliufeng:{ + mod:{ + targetInRange:function(card,player,target){ + if(card.name=='sha'&&player.hp>=target.hp){ + return true; + } + } + }, + }, + linyun:{ + enable:'chooseToUse', + filterCard:true, + selectCard:2, + position:'he', + viewAs:{name:'sha'}, + prompt:'将两张牌当杀使用', + check:function(card){ + if(_status.event.player.countCards('h')<4) return 6-get.useful(card); + return 7-get.useful(card); + }, + ai:{ + order:function(){ + return get.order({name:'sha'})+0.1; + } + }, + group:['linyun2'] + }, + linyun2:{ + trigger:{player:'shaBegin'}, + filter:function(event){ + return event.skill=='linyun' + }, + forced:true, + popup:false, + content:function(){ + "step 0" + var next=trigger.target.chooseToRespond({name:'shan'}); + next.autochoose=lib.filter.autoRespondShan; + next.ai=function(card){ + if(trigger.target.countCards('h','shan')>1){ + return get.unuseful2(card); + } + return -1; + }; + "step 1" + if(result.bool==false){ + trigger.untrigger(); + trigger.directHit=true; + } + }, + ai:{ + threaten:1.3 + } + }, + linyun3:{ + trigger:{source:'damageAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.parent.skill=='linyun'&&!player.hasSkill('linyun4'); + }, + content:function(){ + player.draw(); + player.addTempSkill('linyun4','shaAfter') + } + }, + linyun4:[], + bofeng:{ + mod:{ + targetInRange:function(card,player,target){ + if(card.name=='sha'&&player.hp>=target.hp){ + return true; + } + } + }, + trigger:{player:'shaBegin'}, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + content:function(){ + "step 0" + trigger.target.chooseToRespond({name:'shan'}); + "step 1" + if(result.bool==false){ + trigger.untrigger(); + trigger.directHit=true; + player.addTempSkill('bofeng2','shaEnd'); + } + }, + ai:{ + threaten:1.3 + } + }, + bofeng2:{ + trigger:{source:'damageBegin'}, + filter:function(event){ + return (event.card&&(event.card.name=='sha')&&event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2'); + }, + forced:true, + popup:false, + content:function(){ + trigger.num++; + }, + }, + hutian:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0&&!player.storage.hutian; + }, + content:function(){ + "step 0" + var next=player.chooseCardTarget({ + filterTarget:function(card,player,target){ + return target.maxHp>=ui.selected.cards.length; + }, + filterCard:true, + selectCard:[1,player.countCards('he')], + ai1:function(card){ + var useful=get.useful(card); + if(card.name=='du'){ + useful=-5; + } + if(ui.selected.cards.length==0&&player.hp==1) return 11-useful; + if(ui.selected.cards.length>1) return 0; + return 7-useful; + }, + ai2:function(target){ + if(target.hp>ui.selected.cards.length){ + return 0; + } + return get.attitude(player,target); + }, + position:'he', + prompt:get.prompt('hutian') + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.$give(result.cards,target); + player.lose(result.cards,ui.special); + player.storage.hutian=target; + player.logSkill('hutian',result.targets); + player.addTempSkill('hutian4','phaseAfter'); + target.addSkill('hutian2'); + target.storage.hutian2=result.cards; + game.addVideo('storage',target,['hutian2',get.cardsInfo(result.cards),'cards']); + } + else{ + event.finish(); + } + "step 2" + var target=event.target; + if(target.storage.hutian2&&target.hp0; + }, + filter:function(event,player){ + return event.source&&event.card&&event.card.name=='sha'&&event.source!=player; + }, + logTarget:'source', + content:function(){ + trigger.source.draw(); + }, + ai:{ + expose:0.1, + threaten:1.2 + } + }, + huanxing:{ + trigger:{player:'phaseBegin'}, + group:'huanxing2', + direct:true, + content:function(){ + "step 0" + if(player.countCards('he')){ + player.chooseCardTarget({ + prompt:get.prompt('huanxing'), + filterCard:lib.filter.cardDiscardable, + position:'he', + filterTarget:function(card,player,target){ + if(target==player) return false; + if(target.sex!='male') return false; + var name=target.name.indexOf('unknown')==0?target.name2:target.name; + if(name==player.storage.huanxing) return false; + + var info=lib.character[name]; + if(info){ + var skills=info[3]; + for(var j=0;j0) return 0; + return 7-get.value(card); + }, + ai2:function(target){ + if(target.isMin()) return 0; + return 6-target.maxHp; + } + }); + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + player.unmark(player.storage.huanxing+'_charactermark'); + player.discard(result.cards); + player.logSkill('huanxing',result.targets); + var name=result.targets[0].name; + if(name.indexOf('unknown')==0){ + name=result.targets[0].name2; + } + var list=[]; + var skills=lib.character[name][3]; + for(var j=0;j0; + }, + content:function(){ + player.unmark(player.storage.huanxing+'_charactermark'); + player.removeAdditionalSkill('huanxing'); + delete player.storage.huanxing; + player.checkMarks(); + } + }, + guiying:{ + enable:'chooseToUse', + filterCard:{color:'black'}, + position:'he', + viewAs:{name:'toulianghuanzhu'}, + prompt:'将一张黑色牌当作偷梁换柱使用', + check:function(card){ + if(_status.event.player.countCards('h')>_status.event.player.hp){ + return 5-get.value(card) + } + return 0; + }, + }, + suiyan:{ + trigger:{source:'damageEnd'}, + direct:true, + filter:function(event,player){ + return event.player.countCards('e'); + }, + content:function(){ + "step 0" + var att=get.attitude(player,trigger.player); + var next=player.chooseToDiscard('he',get.prompt('suiyan')); + next.ai=function(card){ + if(att<0) return 7-get.value(card); + return -1; + } + next.logSkill=['suiyan',trigger.player]; + "step 1" + if(result.bool){ + trigger.player.discard(trigger.player.getCards('e')); + } + }, + ai:{ + expose:0.3 + }, + }, + ningxian:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he',{color:'black'})>0; + }, + content:function(){ + "step 0" + var enemy=game.countPlayer(function(current){ + return current!=player&&get.damageEffect(current,player,player)>0; + }); + var next=player.chooseCardTarget({ + position:'he', + filterTarget:function(card,player,target){ + return player!=target; + }, + selectCard:[1,player.countCards('he',{color:'black'})], + selectTarget:function(){ + if(ui.selected.targets.length>ui.selected.cards.length){ + game.uncheck('target'); + } + return ui.selected.cards.length; + }, + filterCard:function(card,player){ + return get.color(card)=='black'&&lib.filter.cardDiscardable(card,player); + }, + ai1:function(card){ + if(ui.selected.cards.length>=enemy) return 0; + return 9-get.value(card); + }, + ai2:function(target){ + return get.damageEffect(target,player,player); + }, + prompt:get.prompt('ningxian') + }); + "step 1" + if(result.bool){ + player.discard(result.cards); + player.logSkill('ningxian',result.targets); + event.targets=result.targets; + event.targets.sort(lib.sort.seat); + } + else{ + event.finish(); + } + "step 2" + if(event.targets.length){ + event.targets.shift().damage(); + event.redo(); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-0.5]; + if(!target.hasFriend()){ + if(lib.config.mode=='guozhan'){ + if(!player.hasFriend()) return; + } + else{ + return; + } + } + if(target.countCards('h')>2||target.countCards('e',{color:'black'})){ + return [1,0,0,-1]; + } + return [1,-0.5]; + } + }, + } + }, + xuanyuan:{ + trigger:{player:'phaseBegin'}, + unique:true, + forceunique:true, + filter:function(event,player){ + for(var i=0;i=4) return [1,1.5]; + if(target.hp==3) return [1,1]; + if(target.hp==2) return [1,0.5]; + } + } + } + } + }, + pozhou2:{ + enable:'phaseUse', + filter:function(event,player){ + return player.storage.pozhou>0; + }, + filterTarget:function(card,player,target){ + return target!=player&&!target.hasSkill('fengyin'); + }, + selectTarget:function(){ + return [1,_status.event.player.storage.pozhou]; + }, + prompt:'出牌阶段,你可以指定任意名其他角色并弃置等量的破咒标记,令目标的非锁定技失效直到其下一回合结束', + content:function(){ + player.storage.pozhou--; + if(!player.storage.pozhou){ + player.unmarkSkill('pozhou'); + } + else{ + player.updateMarks(); + } + target.addTempSkill('fengyin',{player:'phaseAfter'}); + }, + ai:{ + order:11, + result:{ + target:function(player,target){ + var skills=target.getSkills(); + for(var i=0;i0&&player!=event.player; + }, + prompt:function(event,player){ + return '是否弃置一枚破咒标记令'+get.translation(event.player)+ + '的非锁定技失效?(剩余'+player.storage.pozhou+'枚)'; + }, + logTarget:'player', + content:function(){ + player.storage.pozhou--; + if(!player.storage.pozhou){ + player.unmarkSkill('pozhou'); + } + else{ + player.updateMarks(); + } + trigger.player.addTempSkill('fengyin',{player:'phaseBegin'}); + } + }, + fengmo:{ + enable:'phaseUse', + usable:1, + filter:function(){ + return game.countPlayer(function(current){ + return current.getEquip(1); + })>=1; + }, + filterTarget:function(card,player,target){ + return player!=target&&!target.isTurnedOver(); + }, + content:function(){ + "step 0" + event.targets=[]; + event.num=0; + var players=game.filterPlayer(); + for(var i=0;i1){ + return 12-get.equipValue(card); + } + return 8-get.equipValue(card); + }, + filter:function(event,player){ + return player.countCards('he',{type:'equip'}); + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + content:function(){ + target.damage(); + }, + ai:{ + order:9.5, + expose:0.2, + result:{ + player:function(player,target){ + return get.damageEffect(target,player,player); + } + } + } + }, + tuzhen:{ + trigger:{source:'damageAfter'}, + filter:function(event,player){ + return event.player.isIn()&&event.player!=player&&event.player.hasCard(function(card){ + return get.type(card)!='basic'; + }); + }, + alter:true, + logTarget:'player', + check:function(event,player){ + return get.attitude(player,event.player)<0; + }, + content:function(){ + var hs=trigger.player.getCards('h',function(card){ + return get.type(card)!='basic'; + }); + if(get.is.altered('tuzhen')){ + hs=hs.randomGet(); + } + trigger.player.discard(hs); + } + }, + mojian:{ + trigger:{player:'shaBegin'}, + check:function(event,player){ + if(get.attitude(player,event.target)>0) return true; + return player.hp0){ + player.stat[player.stat.length-1].card.sha--; + } + }, + group:'poyue2' + }, + poyue2:{ + trigger:{player:'shaBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card&&get.color(event.card)=='red'; + }, + content:function(){ + trigger.directHit=true; + } + }, + jianji:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0&&lib.filter.cardEnabled({name:'sha'},player); + }, + usable:1, + filterCard:{type:'equip'}, + position:'he', + check:function(card){ + var player=_status.currentPhase; + if(player.countCards('he',{subtype:get.subtype(card)})>1){ + return 11-get.equipValue(card); + } + return 6-get.equipValue(card); + }, + discard:false, + prepare:'throw', + delay:false, + filterTarget:function(card,player,target){ + return lib.filter.targetEnabled({name:'sha'},player,target); + }, + content:function(){ + "step 0" + player.addAdditionalSkill('jianji','unequip'); + player.draw(); + player.useCard({name:'sha'},cards,targets,'jianji',false).animate=false; + player.line(targets,'fire'); + "step 1" + player.removeAdditionalSkill('jianji'); + }, + ai:{ + order:function(){ + return get.order({name:'sha'})+0.1; + }, + result:{ + target:function(player,target){ + player.addAdditionalSkill('jianji_ai','unequip'); + var eff=get.effect(target,{name:'sha'},player,target); + player.removeAdditionalSkill('jianji_ai'); + return eff; + } + }, + effect:{ + player:function(card,player){ + if(_status.currentPhase!=player) return; + if(get.type(card)=='equip'&& + player.countCards('e',{subtype:get.subtype(card)})&& + lib.filter.filterCard({name:'sha'},player)){ + return 0; + } + } + }, + threaten:1.3 + } + }, + huangyu:{ + enable:'phaseUse', + filter:function(event,player){ + if(!lib.card.chiyuxi) return false; + return !player.getStat('skill').huangyu&&player.countCards('he',{color:'red'})>1; + }, + filterCard:{color:'red'}, + selectCard:2, + position:'he', + viewAs:{name:'chiyuxi',nature:'fire'}, + check:function(card){ + var player=_status.event.player; + if(player.hasSkill('jianji')&&get.type(card)=='equip'&& + lib.filter.filterCard({name:'sha'},player)){ + return 0; + } + return 6-get.value(card) + }, + ai:{ + order:8, + expose:0.2, + threaten:1.2 + } + }, + gongshen:{ + trigger:{global:'useCard'}, + priority:15, + filter:function(event,player){ + var type=get.type(event.card,'trick'); + if(type!='basic'&&type!='trick') return false; + return event.player!=player&&player.countCards('he',{type:'equip'})>0&& + event.targets&&event.targets.length>0; + }, + direct:true, + content:function(){ + "step 0" + var effect=0; + for(var i=0;itrigger.targets[0].hp) return val; + if(nme=='sha'&&trigger.targets[0].hp==1&&!trigger.targets[0].countCards('h','shan')) return val; + if(nme=='jiedao'&&trigger.targets[0]==player) return val; + if(nme=='yihuajiemu'&&trigger.targets[0]==player) return val; + if(nme=='shuiyanqijun'&&trigger.targets.contains(player)) return val; + return 0; + } + return -1; + } + "step 1" + if(result.bool){ + game.delay(2); + trigger.untrigger(); + trigger.finish(); + } + else{ + event.finish(); + } + "step 2" + ui.clear(); + }, + ai:{ + effect:{ + player:function(card,player,target){ + if(player!=target) return; + if(get.type(card)=='equip'&&!player.needsToDiscard()){ + return [0,0,0,0]; + } + } + }, + threaten:2, + expose:0.3 + } + }, + xiaozhan:{ + trigger:{global:'useCard'}, + priority:15, + filter:function(event,player){ + return event.card.name=='sha'&&event.player!=player&& + player.countCards('h','sha')>0&&event.targets.contains(player)==false; + }, + direct:true, + content:function(){ + "step 0" + var effect=0; + for(var i=0;i0; + }, + selectCard:2, + filterCard:true, + discard:false, + prepare:'throw', + filterTarget:function(card,player,target){ + return lib.filter.targetEnabled({name:'juedou'},player,target); + }, + check:function(card){ + return Math.max(7-get.value(card),7-get.useful(card)); + }, + content:function(){ + player.useCard({name:'juedou'},targets,cards).animate=false; + }, + ai:{ + result:{ + target:function(player,target){ + return get.effect(target,{name:'juedou'},player,target); + } + }, + order:8, + } + }, + yiesheng:{ + enable:'phaseUse', + filterCard:{color:'black'}, + filter:function(event,player){ + return player.countCards('h',{color:'black'})>0; + }, + selectCard:[1,Infinity], + prompt:'弃置任意张黑色手牌并摸等量的牌', + check:function(card){return 5-get.value(card)}, + content:function(){ + player.draw(cards.length); + }, + ai:{ + order:1, + result:{ + player:1 + }, + }, + }, + dangping:{ + trigger:{source:'damageAfter'}, + direct:true, + filter:function(event,player){ + return event.parent.name!='dangping'&&!player.hasSkill('dangping2')&&player.countCards('he')>0; + }, + content:function(){ + "step 0" + var next=player.chooseCardTarget({ + position:'he', + filterTarget:function(card,player,target){ + return player!=target&&trigger.player!=target&&get.distance(trigger.player,target)<=1; + }, + filterCard:lib.filter.cardDiscardable, + ai1:function(card){ + return get.unuseful(card)+9; + }, + ai2:function(target){ + return get.damageEffect(target,player,player); + }, + prompt:get.prompt('dangping') + }); + "step 1" + if(result.bool){ + player.discard(result.cards); + player.logSkill('dangping',result.targets); + player.addTempSkill('dangping2','phaseAfter'); + } + "step 2" + if(result.bool){ + result.targets[0].damage(); + } + } + }, + dangping2:{}, + duishi:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h')>0&&!player.hasSkill('duishi2'); + }, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h')>0&&!target.hasSkill('duishi3'); + }, + filterCard:true, + check:function(card){return 8-get.value(card)}, + content:function(){ + "step 0" + var suit=get.suit(cards[0]); + target.chooseToDiscard({suit:suit},'h','对诗:弃置一张'+get.translation(suit)+ + '牌,或令'+get.translation(player)+'获得你一张牌').ai=function(card){ + if(get.attitude(target,player)>0) return 0; + return 9-get.value(card); + } + + "step 1" + if(result.bool){ + target.addTempSkill('duishi3','phaseAfter'); + } + else{ + player.gainPlayerCard(target,'he',true); + player.addTempSkill('duishi2','phaseAfter'); + } + }, + ai:{ + order:9, + threaten:1.5, + result:{ + target:-2, + player:0.5 + }, + expose:0.2 + } + }, + duishi2:{}, + duishi3:{}, + guisi:{ + trigger:{target:'shaBefore'}, + popup:false, + direct:true, + filter:function(event,player){ + return player.countCards('h'); + }, + content:function(){ + "step 0" + player.chooseCard('是否交给'+get.translation(trigger.player)+'一张牌并取消此杀?').ai=function(card){ + if(get.attitude(player,trigger.player)>0){ + return 9-get.value(card); + } + if(player.countCards('h',{name:'shan'})) return -1; + return 7-get.value(card); + } + "step 1" + if(result.bool){ + player.logSkill('guisi'); + trigger.player.gain(result.cards,player); + player.$give(result.cards,trigger.player); + trigger.untrigger(); + trigger.finish(); + } + }, + }, + lianwu:{ + mod:{ + selectTarget:function(card,player,range){ + if(card.name=='sha'&&range[1]!=-1) range[1]++; + }, + }, + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return event.card&&get.color(event.card)=='red'; + }, + content:function(){ + trigger.directHit=true; + } + }, + mingfu:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he',{suit:'club'})>0; + }, + position:'he', + filterCard:{suit:'club'}, + discard:false, + prepare:'throw', + filterTarget:function(card,player,target){ + return lib.filter.targetEnabled({name:'guiyoujie'},player,target); + }, + check:function(card){ + if(card.name=='du') return 20; + return Math.max(7-get.value(card),7-get.useful(card)); + }, + content:function(){ + target.addJudge('guiyoujie',cards); + }, + ai:{ + result:{ + target:function(player,target){ + return get.effect(target,{name:'guiyoujie'},player,target); + } + }, + order:8, + } + }, + mufeng_old:{ + init:function(player){ + player.storage.mufeng=0; }, - gain:{ - trigger:{player:'loseEnd'}, - forced:true, - filter:function(event,player){ - return _status.currentPhase!=player; - }, - content:function(){ - player.storage.mufeng++; - if(player.storage.mufeng>game.players.length/2){ + group:['mufeng_gain','mufeng_lose'], + mark:true, + intro:{ + content:function(storage){ + if(storage>0){ + return '防御距离+'+storage; + } + else if(storage<0){ + return '防御距离'+storage; + } + else{ + return '无距离变化'; + } + } + }, + subSkill:{ + lose:{ + trigger:{global:'dieAfter'}, + forced:true, + filter:function(event,player){ + return player.storage.mufeng>game.players.length/2; + }, + content:function(){ player.storage.mufeng=0; + player.updateMarks(); + } + }, + gain:{ + trigger:{player:'loseEnd'}, + forced:true, + filter:function(event,player){ + return _status.currentPhase!=player; + }, + content:function(){ + player.storage.mufeng++; + if(player.storage.mufeng>game.players.length/2){ + player.storage.mufeng=0; + } + player.updateMarks(); + } + }, + }, + mod:{ + globalTo:function(from,to,distance){ + if(typeof to.storage.mufeng=='number'){ + return distance+to.storage.mufeng; + } + } + } + }, + mufeng:{ + trigger:{player:'phaseEnd'}, + frequent:true, + alter:true, + filter:function(event,player){ + if(get.is.altered('mufeng')){ + return player.countCards('h')player.countCards('h'); + }, + content:function(){ + player.draw(Math.min(5,trigger.player.countCards('h'))-player.countCards('h')); + player.addTempSkill('mufeng2',{player:'phaseBegin'}); + }, + }, + mufeng2:{}, + jiying:{ + mod:{ + targetInRange:function(card){ + if(card.name=='sha') return true; + } + }, + }, + minjing:{ + trigger:{player:'damageBegin'}, + forced:true, + filter:function(event,player){ + if(player.getEquip(2)) return false; + return lib.skill.guangshatianyi.filter(event,player); + }, + content:function(){ + trigger.num--; + }, + ai:{ + threaten:0.8 + } + }, + touxi:{ + trigger:{global:'phaseEnd'}, + check:function(event,player){ + if(get.damageEffect(event.player,player,player,'thunder')>0){ + if(get.is.altered('touxi')){ + if(get.attitude(player,event.player)<0&&event.player.hp==1&&player.hp>1){ + return true; + } + } + else{ + return true; + } + } + return false; + }, + alter:true, + filter:function(event,player){ + return event.player!=player&&!player.hasSkill('touxi2')&&event.player.isAlive(); + }, + logTarget:'player', + content:function(){ + "step 0" + player.judge(function(card){ + if(get.color(card)=='black') return 1; + return -1; + }); + "step 1" + if(result.bool){ + trigger.player.damage('thunder'); + player.addSkill('touxi2'); + event.finish(); + } + else{ + if(get.is.altered('touxi')){ + player.damage(trigger.player); + } + else{ + if(player.countCards('he')){ + var att=get.attitude(trigger.player,player); + trigger.player.discardPlayerCard(player,'he',function(button){ + if(att>0) return 0; + return get.buttonValue(button); + }); + } + } + } + }, + ai:{ + expose:0.3, + threaten:1.2 + } + }, + touxi2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('touxi2'); + } + }, + nlianji:{ + audio:'lianji', + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + if(player==target) return false; + return target.countCards('h')>0; + }, + selectTarget:2, + multitarget:true, + multiline:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + prepare:'throw', + discard:false, + filterCard:true, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + "step 0" + if(targets[0].countCards('h')&&targets[1].countCards('h')){ + targets[0].chooseToCompare(targets[1]); + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + targets[0].gain(cards,'log'); + targets[0].$gain2(cards); + targets[1].damage(targets[0]); + } + else{ + targets[1].gain(cards,'log'); + targets[1].$gain2(cards); + targets[0].damage(targets[1]); + } + }, + ai:{ + expose:0.3, + threaten:2, + order:9, + result:{ + target:-1 + } + }, + }, + lianji2:{ + group:['lianji3','lianji4'] + }, + lianji3:{ + trigger:{player:'shaHit'}, + forced:true, + popup:false, + content:function(){ + player.storage.lianji2=true; + } + }, + lianji4:{ + trigger:{player:'shaAfter'}, + forced:true, + popup:false, + content:function(){ + if(!player.storage.lianji2){ + player.damage('thunder',player.storage.lianji); + } + delete player.storage.lianji; + delete player.storage.lianji2; + player.removeSkill('lianji2'); + } + }, + yinmo:{}, + miedao:{ + group:['miedao1','miedao2'], + ai:{ + threaten:1.4 + } + }, + miedao1:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + filter:function(event,player){ + return player.hp=player.maxHp-1) return [0,0]; + } + } + } + }, + moyan:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.hp0; + }, + filterTarget:function(card,player,target){ + return player!=target;//&&get.distance(player,target,'attack')<=1; + }, + selectTarget:function(){ + return ui.selected.cards.length; + }, + selectCard:function(){ + var player=_status.currentPhase; + return [1,Math.min(game.players.length-1,player.maxHp-player.hp)]; + }, + filterCard:function(card){ + return get.color(card)=='red'; + }, + check:function(card){ + if(ui.selected.cards.length==0){ + return 8-get.value(card); + } + return 6-get.value(card); + }, + line:'fire', + content:function(){ + "step 0" + target.damage('fire'); + "step 1" + // target.draw(); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target,'fire'); + } + }, + threaten:function(player,target){ + if(target.hp==1) return 2; + if(target.hp==2) return 1.5; + return 0.5; + }, + maixie:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(target.hp==target.maxHp) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + shejie:{ + trigger:{player:'damageEnd'}, + priority:9, + check:function(event,player){ + return get.attitude(player,event.source)<0; + }, + filter:function(event){ + return event&&event.source; + }, + content:function(){ + trigger.source.addSkill('shejie2'); + }, + ai:{ + threaten:0.4 + } + }, + shejie2:{ + unique:true, + trigger:{player:'phaseBegin'}, + forced:true, + priority:10, + mod:{ + cardEnabled:function(){ + return false; + }, + cardUsable:function(){ + return false; + }, + cardRespondable:function(){ + return false; + }, + cardSavable:function(){ + return false; + } + }, + content:function(){ + player.removeSkill('shejie2') + }, + }, + guiyin:{ + trigger:{player:'phaseDiscardEnd'}, + frequent:true, + filter:function(event,player){ + return event.cards&&event.cards.length>1 + }, + content:function(){ + player.draw(2); + }, + }, + wangchen:{ + trigger:{player:'phaseDiscardEnd'}, + direct:true, + filter:function(event,player){ + if(event.cards){ + for(var i=0;i=2; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('yihua',trigger.player),2); + next.ai=function(card){ + if(get.effect(player,trigger.card)<0){ + if(card.name=='liuxinghuoyu') return 7-get.value(card); + return 5-get.value(card); + } + return 0; + }; + next.prompt2='反弹'+get.translation(trigger.player)+'的'+get.translation(trigger.card); + next.logSkill=['yihua',trigger.player]; + "step 1" + if(result.bool){ + // player.discard(result.cards); + trigger.target=trigger.player; + trigger.player=player; + trigger.untrigger(); + trigger.trigger('useCardToBefore'); + } + // "step 2" + // if(result.bool){ + // trigger.target=result.targets[0]; + // trigger.untrigger; + // trigger.trigger('shaBefore'); + // game.delay(); + // } + }, + ai:{ + threaten:function(player,target){ + if(target.countCards('h')<=2){ + return 2; + } + return 2/(target.countCards('h')-1); + } + } + }, + youyin:{ + trigger:{global:'discardAfter'}, + filter:function(event,player){ + if(event.player==player) return false; + if(player.countCards('h')>=5) return false; + for(var i=0;i0; + }, + check:function(card){ + return 10-get.value(card) + }, + filterTarget:function(card,player,target){ + if(target.hp>=target.maxHp) return false; + return true; + }, + selectTarget:[1,3], + content:function(){ + target.recover(); + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(player==target&&player.countCards('h')>player.hp) return 20; + return get.recoverEffect(target,player,target); + } + }, + threaten:2 + } + }, + huopu:{ + enable:'phaseUse', + usable:1, + position:'he', + filterCard:function(card){ + return get.suit(card)=='heart'; + }, + viewAs:{name:'liuxinghuoyu'}, + viewAsFilter:function(player){ + if(!player.countCards('he',{suit:'heart'})) return false; + }, + prompt:'将一张红桃手牌当作流星火羽使用', + check:function(card){return 6-get.value(card)}, + ai:{ + threaten:1.4, + order:9, + } + }, + rexue:{ + trigger:{global:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return lib.filter.targetEnabled({name:'sha'},player,event.player)&&player.hasSha(); + }, + content:function(){ + "step 0" + player.chooseToUse({name:'sha'},'热血:是否对'+get.translation(trigger.player)+'使用一张杀',trigger.player,-1).logSkill='rexue'; + "step 1" + if(result.bool){ + player.draw(); + } + } + }, + shengshou:{ + enable:'phaseUse', + filterCard:function(card){ + return get.color(card)=='black'; + }, + viewAs:{name:'caoyao'}, + prompt:'将一张黑色手牌当作草药使用', + check:function(card){return 6-get.value(card)}, + ai:{ + threaten:1.6 + } + }, + huanjian:{ + enable:'phaseUse', + filterCard:function(card){ + return get.color(card)=='black'; + }, + viewAs:{name:'bingpotong'}, + position:'he', + filter:function(event,player){ + return player.countCards('h',{color:'black'})>0; + }, + viewAsFilter:function(player){ + if(!player.countCards('he',{color:'black'})) return false; + }, + prompt:'将一张黑色牌当作冰魄针使用', + check:function(card){return 5-get.value(card)}, + ai:{ + threaten:1.1 + } + }, + benlei:{ + enable:'phaseUse', + viewAs:{name:'jingleishan',nature:'thunder'}, + filterCard:function(card,player){ + return true; + }, + selectCard:3, + position:'he', + prompt:'将三张牌当作惊雷闪使用', + check:function(card){ + return 4-get.value(card); + }, + group:'benlei2', + ai:{ + basic:{ + order:10 + } + } + }, + benlei2:{ + trigger:{source:'damageAfter'}, + filter:function(event,player){ + return event.nature=='thunder'&&player.hp0; + } + else{ + return player.countCards('h')>0; + } + }, + content:function(){ + "step 0" + var att=get.attitude(player,trigger.player); + var nh=player.countCards('h'); + var next; + if(get.is.altered('susheng')){ + next=player.chooseToDiscard(get.prompt('susheng',trigger.player),{color:'red'}); + } + else{ + next=player.chooseToDiscard(get.prompt('susheng',trigger.player)); + } + next.logSkill=['susheng',trigger.player]; + next.ai=function(card){ + if(att>3||(att>1&&nh>2)){ + return get.unuseful2(card); + } + return 0; + }; + "step 1" + if(result.bool){ + // player.chooseToDiscard('h',true); + trigger.untrigger(); + trigger.finish(); + trigger.player.hp=1; + if(trigger.player.maxHp<1) trigger.player.maxHp=1; + trigger.player.update(); + player.addTempSkill('susheng2','phaseAfter'); + } + + }, + ai:{ + threaten:2 + } + }, + susheng2:{}, + kunlunjing:{ + unique:true, + alter:true, + group:['kunlunjing1','kunlunjing2'], + video:function(player,data){ + if(data){ + for(var i in data){ + var current=game.playerMap[i]; + current.node.handcards1.innerHTML=''; + current.node.handcards2.innerHTML=''; + current.node.equips.innerHTML=''; + current.node.judges.innerHTML=''; + current.directgain(get.infoCards(data[i].h)); + var es=get.infoCards(data[i].e); + for(var j=0;j0){ + num+=num2; + } + else if(att<0){ + num-=num2; + } + } + } + return num>Math.min(2,game.players.length/2); + }, + content:function(){ + "step 0" + game.delay(0.5); + "step 1" + ui.window.style.transition='all 0.5s'; + ui.window.classList.add('zoomout3'); + ui.window.delete(); + ui.window.hide(); + game.delay(0,500); + game.addVideo('skill',event.player,'kunlunjing'); + "step 2" + var storage=event.player.storage.kunlunjing; + for(var i=0;i0 + }, + filterTarget:function(card,player,target){ + return player!=target + }, + filterCard:function(card,player){ + if(ui.selected.cards.length){ + return get.suit(card)==get.suit(ui.selected.cards[0]); + } + var cards=player.getCards('h'); + for(var i=0;i0 + }, + filterTarget:function(card,player,target){ + return player!=target + }, + filterCard:function(card,player){ + if(ui.selected.cards.length){ + return get.suit(card)==get.suit(ui.selected.cards[0]); + } + var cards=player.getCards('h'); + for(var i=0;i0; + }, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }, + filterCard:function(card){ + var suit=get.suit(card); + for(var i=0;ilength) return -1.5+eff; + return -1+eff; + } + }, + expose:0.2 + } + }, + liaoyuan:{ + trigger:{player:'shaBegin'}, + direct:true, + filter:function(event,player){ + if(get.itemtype(event.cards)!='cards') return false; + return player.countCards('he',{suit:get.suit(event.cards)})>0; + }, + alter:true, + content:function(){ + "step 0" + player.storage.liaoyuan=0; + event.num=0; + event.cards=[]; + "step 1" + var suit=get.suit(trigger.cards); + event.suit=suit; + player.chooseCard('he',get.prompt('liaoyuan'),function(card,player){ + return get.suit(card)==suit&&lib.filter.cardDiscardable(card,player); + }).ai=function(card){ + if(get.attitude(player,trigger.target)>=0) return 0; + if(get.effect(trigger.target,{name:'sha'},player,player)>0){ + return 7-get.value(card); + } + return 0; + } + "step 2" + if(result.bool){ + if(event.num==0){ + player.logSkill('liaoyuan'); + } + player.discard(result.cards); + event.num++; + if(player.countCards('he',{suit:event.suit})>1&&!get.is.altered('liaoyuan')){ + event.goto(1); + } + } + "step 3" + if(event.num){ + trigger.target.chooseToRespond({name:'shan'}).ai=get.unuseful2; + } + else{ + event.finish(); + } + "step 4" + if(result.bool){ + event.num--; + event.goto(3); + } + else{ + trigger.untrigger(); + trigger.directHit=true; + player.storage.liaoyuan=event.num; + } + }, + group:['liaoyuan2','liaoyuan3'] + }, + liaoyuan2:{ + trigger:{source:'damageBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&player.storage.liaoyuan>0&&event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2'; + }, + content:function(){ + trigger.num+=player.storage.liaoyuan; + player.storage.liaoyuan=0; + } + }, + liaoyuan3:{ + trigger:{player:'shaEnd'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.liaoyuan=0; + } + }, + dunxing:{ + direct:true, + filter:function(event,player){ + if(event.player==player) return false; + return player.countCards('he')>0; + }, + trigger:{target:'useCardToBefore'}, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he',get.prompt(event.name)); + next.logSkill=event.name; + next.ai=function(card){ + if(get.tag(trigger.card,'multitarget')&&!get.tag(card,'multineg')) return 0; + if(get.effect(player,trigger.card,trigger.player,player)<0){ + return 7-get.value(card); + } + return 0; + } + next.prompt2='弃置一张牌并进行一次判定,若结果不为红桃则'+get.translation(trigger.card)+'失效'; + "step 1" + if(result.bool){ + player.judge(function(card){ + return get.suit(card)=='heart'?-1:1; + }); + } + else{ + event.finish(); + } + "step 2" + if(result.suit!='heart'){ + trigger.untrigger(); + trigger.finish(); + } + } + }, + qiaoxie:{ + group:['qiaoxie2','qiaoxie3'], + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip') return [1,3]; + } + }, + noe:true, + } + }, + qiaoxie2:{ + trigger:{player:'equipEnd'}, + frequent:true, + //filter:function(event,player){ + // for(var i=0;i0; + }).ai=function(target){ + return -get.attitude(player,target); + }; + "step 1" + if(result.bool){ + player.logSkill('qiaoxie3',result.targets); + player.discardPlayerCard(result.targets[0],'he',true); + } + else{ + event.finish(); + } + }, + }, + qiaoxie4:{ + trigger:{player:['loseEnd']}, + frequent:true, + filter:function(event,player){ + if(typeof lib.cardType.hslingjian!='number') return false; + if(!player.equiping) return false; + for(var i=0;i0; + }).ai=function(target){ + var att=get.attitude(player,target); + if(att<=0){ + return 1-att+(target.countCards('e')?2:0); + } + return 0; + }; + "step 1" + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('meihuo',event.target); + player.choosePlayerCard(event.target,'he',true).ai=function(button){ + var card=button.link; + if(get.position(card)=='e') return get.equipValue(card); + return 5; + }; + } + "step 2" + if(result.bool){ + if(get.position(result.buttons[0].link)=='e'){ + player.equip(result.buttons[0].link); + } + else{ + player.gain(result.buttons[0].link,event.target); + } + event.target.$giveAuto(result.buttons[0].link,player); + } + }, + }, + yishan:{ + group:'yishan2', + trigger:{player:'damageEnd'}, + filter:function(event,player){ + var content=player.storage.yishan; + for(var i=0;i最近失去的牌'); + var cards=[]; + for(var i=0;i=4) break; + } + } + if(cards.length){ + dialog.add(cards); + } + else{ + dialog.add('(无)'); + } + }, + content:function(content,player){ + var str='最近失去的牌:'; + var cards=[]; + for(var i=0;i=4) break; + } + } + if(cards.length){ + str+=get.translation(cards); + } + else{ + str+='无'; + } + return str; + } + } + }, + yishan2:{ + trigger:{player:'loseEnd'}, + forced:true, + popup:false, + silent:true, + content:function(){ + for(var i=0;i1; + }, + content:function(){ + trigger.directHit=true; + } + }, + poxing:{ + trigger:{source:'damageBegin'}, + filter:function(trigger,player){ + return trigger.player.hp>player.hp; + }, + forced:true, + content:function(){ + trigger.num++; + } + }, + luomu:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.player.countCards('hej'); + }, + content:function(){ + trigger.player.discard(trigger.player.getCards('hej').randomGet()); + } + }, + huanhun:{ + trigger:{global:'dying'}, + priority:6, + filter:function(event,player){ + return event.player.hp<=0&&player.countCards('he')>0; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he',get.prompt('huanhun'),function(card){ + return get.color(card)=='red'; + }); + next.logSkill=['huanhun',trigger.player]; + next.ai=function(card){ + if(card.name=='tao') return 0; + if(get.attitude(player,trigger.player)>0){ + return 8-get.value(card); + } + return 0; + }; + "step 1" + if(result.bool){ + trigger.player.judge(function(card){ + return get.color(card)=='red'?1:-1; + }); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + trigger.player.recover(); + } + }, + ai:{ + threaten:1.6, + expose:0.2 + } + }, + huanhun_old:{ + enable:'phaseUse', + forbid:['versus'], + filter:function(){ + return game.dead.length>0 + }, + usable:1, + filterCard:function(card){ + return get.suit(card)=='heart'; + }, + direct:true, + content:function(){ + "step 0" + var list=[]; + for(var i=0;i2) return 3; + } + return 0; + } + }, + threaten:2, + } + }, + yinyue:{ + trigger:{global:'recoverAfter'}, + check:function(event,player){ + return get.attitude(player,event.player)>0; + }, + logTarget:'player', + alter:true, + content:function(){ + "step 0" + if(get.is.altered('yinyue')){ + trigger.player.draw(); + event.finish(); + } + else if(trigger.player!=player&&trigger.player.countCards('h')>=player.countCards('h')){ + game.asyncDraw([trigger.player,player]); + } + else{ + trigger.player.draw(); + event.finish(); + } + "step 1" + game.delay(); + }, + ai:{ + expose:0.2 + } + }, + daofa:{ + trigger:{global:'damageAfter'}, + check:function(event,player){ + return event.source&&get.attitude(player,event.source)<0; + }, + filter:function(event,player){ + return event.source&&event.source!=player&&event.source.countCards('he'); + }, + logTarget:'source', + content:function(){ + trigger.source.chooseToDiscard('he',true); + }, + ai:{ + expose:0.2, + threaten:1.5 + } + }, + daixing:{ + group:'daixing2', + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('请选择发动代形的卡牌','he',[1,player.countCards('he')]); + next.logSkill='daixing'; + next.ai=function(card){ + if(ui.selected.cards.length>=2) return 0; + if(ui.selected.cards.length==1){ + if(player.countCards('h')>player.hp){ + return 3-get.value(card); + } + return 0; + } + return 6-get.value(card); + }; + "step 1" + if(result.bool){ + player.changeHujia(result.cards.length); + player.storage.daixing=result.cards.length; + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return; + if(target.storage.daixing>1) return 0.1; + if(target.storage.daixing==1) return 0.5; + } + return 1.5; + } + } + }, + intro:{ + content:'mark' + } + }, + daixing2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + if(player.storage.daixing){ + player.changeHujia(-player.storage.daixing); + player.storage.daixing=0; + } + } + }, + swd_wuxie:{ + mod:{ + targetEnabled:function(card,player,target){ + if(get.type(card)=='delay'&&player!=target){ + return false; + } + } + } + }, + lqingcheng:{ + trigger:{player:'phaseEnd'}, + frequent:true, + content:function(){ + "step 0" + if(event.cards==undefined) event.cards=[]; + player.judge(function(card){ + if(get.color(card)=='red') return 1.5; + return -1.5; + },ui.special); + "step 1" + if(result.judge>0){ + event.cards.push(result.card); + if(event.cards.length==3){ + player.gain(event.cards); + if(event.cards.length){ + player.$draw(event.cards); + } + event.finish(); + } + else if(lib.config.autoskilllist.contains('lqingcheng')){ + player.chooseBool('是否再次发动?'); + } + else{ + event._result={bool:true}; + } + } + else{ + player.gain(event.cards); + if(event.cards.length){ + player.$draw(event.cards); + } + event.finish(); + } + "step 2" + if(result.bool){ + event.goto(0); + } + else{ + player.gain(event.cards); + if(event.cards.length){ + player.$draw(event.cards); + } + } + }, + ai:{ + threaten:1.4 + } + }, + lingxin:{ + trigger:{player:'phaseEnd'}, + frequent:true, + content:function(){ + "step 0" + event.cards=get.cards(3); + player.showCards(event.cards); + "step 1" + for(var i=0;i=player.hp&&event.skill!='lingwu'; + }, + content:function(){ + player.insertPhase(); + }, + ai:{ + order:-10, + result:{ + target:2 + }, + threaten:1.5 + } + }, + xianjiang_old:{ + enable:'phaseUse', + position:'he', + usable:1, + filterCard:function(card,player){ + if(player.storage.xianjiang&&player.storage.xianjiang.contains(card)) return false; + return get.type(card)=='equip'; + }, + init:function(player){ + player.storage.xianjiang=[]; + }, + check:function(card){ + return 10-get.value(card); + }, + prompt:'将一张装备牌永久转化为任意一张装备牌', + content:function(){ + "step 0" + var list=[]; + var suit=get.suit(cards[0]); + var number=get.number(cards[0]); + for(var i in lib.card){ + if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue; + if(lib.card[i].type=='equip'&&cards[0].name!=i){ + if(get.equipValue({name:i})<10) list.push([suit,number,i]); + } + } + var dialog=ui.create.dialog([list,'vcard']); + player.chooseButton(dialog,true,function(button){ + return get.value({name:button.link[2]},player); + }); + "step 1" + cards[0].init(result.buttons[0].link); + player.gain(cards[0]); + player.$gain(cards[0]); + game.delay(); + player.storage.xianjiang.add(cards[0]); + }, + ai:{ + order:9, + result:{ + player:1 + }, + threaten:2, + } + }, + xianjiang2:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.hasSkill('xianjiang'); + }, + content:function(){ + player.storage.xianjiang=[]; + } + }, + xianjiang:{ + enable:'phaseUse', + alter:true, + filterCard:function(card){ + return get.type(card,'trick')=='trick'; + }, + usable:1, + filter:function(event,player){ + if(get.is.altered('xianjiang')&&player.countCards('e')) return false; + if(player.countCards('h',{type:'trick'})) return true; + if(player.countCards('h',{type:'delay'})) return true; + return false; + }, + selectCard:1, + check:function(card){ + return 8-get.value(card); + }, + content:function(){ + var card=game.createCard(get.inpile('equip').randomGet()); + player.equip(card); + player.$gain2(card); + game.delay(); + }, + ai:{ + result:{ + player:1 + }, + order:9 + } + }, + shengong:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!player.countCards('he')) return false; + if(event.filterCard({name:'shan'})){ + if(game.hasPlayer(function(current){ + return current!=player&¤t.getEquip(2); + })){ + return true; + } + } + if(event.filterCard({name:'sha'})){ + if(game.hasPlayer(function(current){ + return current!=player&¤t.getEquip(1); + })){ + return true; + } + } + return false; + }, + direct:true, + content:function(){ + "step 0" + var list=[]; + var players=game.filterPlayer(); + if(trigger.filterCard({name:'shan'})){ + for(var i=0;i0; + }, + content:function(){ + "step 0" + var next=player.chooseCardTarget({ + position:'he', + filterTarget:function(card,player,target){ + return lib.filter.targetEnabled({name:'sha'},player,target); + }, + filterCard:true, + ai1:function(card){ + return get.unuseful(card)+9; + }, + ai2:function(target){ + return get.effect(target,{name:'sha'},player); + }, + prompt:get.prompt('huajian') + }); + "step 1" + if(result.bool){ + player.logSkill('huajian'); + player.useCard({name:'sha'},result.cards,result.targets,false); + } + }, + ai:{ + expose:0.2, + } + }, + polang:{ + trigger:{source:'damageEnd'}, + filter:function(event,player){ + return event.player.countCards('e'); + }, + direct:true, + content:function(){ + player.discardPlayerCard(trigger.player,'e',get.prompt('polang',trigger.player)).logSkill='polang'; + }, + ai:{ + expose:0.3 + }, + }, + jikong:{ + trigger:{player:['loseEnd','phaseBegin']}, + direct:true, + usable:1, + alter:true, + filter:function(event,player){ + if(event.name=='phase') return true; + if(get.is.altered('jikong')) return false; + if(player.countCards('h')) return false; + for(var i=0;i2&&event.card&&event.card.name=='sha'; + }, + content:function(){ + "step 0" + game.delay(0.5); + player.chooseCardTarget({ + prompt:get.prompt('xielei'), + filterCard:lib.filter.cardDiscardable, + position:'he', + filterTarget:function(card,player,target){ + if(player==target) return false; + if(trigger.name=='respond'){ + return trigger.source!=target; + } + else{ + return !trigger.targets.contains(target); + } + }, + ai1:function(card){ + return 8-get.value(card); + }, + ai2:function(target){ + return get.damageEffect(target,player,player,'thunder'); + } + }); + "step 1" + if(result.bool){ + player.logSkill('xielei',result.targets,'thunder'); + player.discard(result.cards); + result.targets[0].damage('thunder'); + } + }, + ai:{ + expose:0.3, + threaten:1.6 + } + }, + jingjie:{ + enable:'phaseUse', + init:function(player){ + player.storage.jingjie=false; + }, + mark:true, + intro:{ + content:'limited', + }, + filter:function(event,player){ + return !player.storage.jingjie; + }, + content:function(){ + 'step 0' + player.storage.jingjie=true; + player.unmarkSkill('jingjie'); + event.targets=game.filterPlayer(); + for(var i=0;i0){ + num-=players[i].countCards('he')-2; + } + else if(att<0){ + num+=players[i].countCards('he')-2; + } + } + if(player.hp==1) return num-1; + return num-players.length/2; + } + } + } + }, + ningjian:{ + group:['ningjian1','ningjian2'], + ai:{ + effect:{ + target:function(card,player,target){ + if(target.countCards('he')&&(get.tag(card,'respondShan')||get.tag(card,'respondSha'))) return 0.6 + } + }, + respondSha:true, + respondShan:true, + } + }, + ningjian1:{ + enable:['chooseToRespond','chooseToUse'], + filterCard:{color:'black'}, + viewAs:{name:'sha'}, + position:'he', + prompt:'将一张黑色牌当杀打出', + check:function(card){return 6-get.value(card)} + }, + ningjian2:{ + enable:['chooseToRespond','chooseToUse'], + filterCard:{color:'red'}, + viewAs:{name:'shan'}, + position:'he', + prompt:'将一张红色牌当闪打出', + check:function(card){return 6-get.value(card)} + }, + duoren:{ + trigger:{target:'shaMiss'}, + filter:function(event){ + return event.player.getEquip(1)!=undefined; + }, + check:function(event,player){ + return get.attitude(player,event.player)<0; + }, + priority:5, + content:function(){ + trigger.player.$give(trigger.player.getEquip(1),player); + player.gain(trigger.player.getEquip(1),trigger.player); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&target.countCards('h')>1&&player.getEquip(1)){ + return [1,0.5,0,-0.5]; + } + } + } + } + // filter:function(event){ + // return event.player.countCards('e')>0; + // }, + // content:function(){ + // "step 0" + // player.choosePlayerCard('是否获得'+get.translation(trigger.player)+'的一张装备牌?', + // 'e',trigger.player).ai=get.buttonValue; + // "step 1" + // if(result.bool){ + // var card=result.buttons[0].link; + // trigger.player.$give(card,player); + // player.gain(card); + // } + // }, + }, + taixu:{ + enable:'phaseUse', + filter:function(event,player){ + return (!player.storage.taixu)&&player.countCards('hej'); + }, + filterTarget:function(card,player,target){ + return player!=target&&target.hp>1; + }, + content:function(){ + player.discard(player.getCards('hej')); + player.storage.taixu=true; + target.damage(player.maxHp-player.hp); + }, + ai:{ + basic:{ + order:1, + }, + result:{ + target:function(player,target){ + if(player.maxHp-player.hp<2) return 0; + return -2; + }, + player:function(player,target){ + return -0.5*player.countCards('he'); + } + } + } + }, + pozhen:{ + trigger:{player:'damageEnd'}, + filter:function(event,player){ + if(!event.source) return false; + if(get.is.altered('pozhen')){ + return event.source.countCards('h')>player.countCards('h'); + } + return event.source.countCards('h')!=player.countCards('h'); + }, + alter:true, + // check:function(event,player){ + // return get.attitude(player,event.source)<0; + // }, + direct:true, + content:function(){ + "step 0" + var num=player.countCards('h')-trigger.source.countCards('h'); + event.num=num; + if(num>0){ + var next=player.chooseToDiscard(num,'是否弃置'+num+'张手牌,并对'+get.translation(trigger.source)+'造成一点伤害?'); + next.logSkill=['pozhen',trigger.source]; + next.ai=function(card){ + if(get.damageEffect(trigger.source,player,player)>0&&num<=2){ + return 6-get.value(card); + } + return -1; + } + } + else if(num<0){ + player.chooseBool('是否弃置'+get.translation(trigger.source)+(-num)+'张手牌?').ai=function(){ + return get.attitude(player,trigger.source)<0; + } + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + if(event.num>0){ + trigger.source.damage(); + } + else{ + player.logSkill('pozhen',trigger.source); + var cards=trigger.source.getCards('h'); + cards.sort(lib.sort.random); + trigger.source.discard(cards.slice(0,-event.num)); + } + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-1]; + var num=player.countCards('h')-target.countCards('h'); + if(num>0){ + return [1,0,0,-num/2]; + } + if(num<0&&!get.is.altered('pozhen')){ + return [1,0,0,-0.5]; + } + } + } + } + } + }, + tanlin_defence:{ + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return player.countCards('h')&&event.source&&event.source.countCards('h'); + }, + direct:true, + content:function(){ + "step 0" + player.chooseToDiscard([1,trigger.source.countCards('h')],'弃置任意张手牌并令伤害来源弃置等量手牌').ai=function(card){ + if(ui.selected.cards.length>=trigger.source.countCards('h')) return -1; + if(ui.selected.cards.length==0) return 8-get.value(card); + return 4-get.value(card); + } + "step 1" + if(result.bool){ + player.logSkill('tanlin'); + trigger.source.randomDiscard('h',result.cards.length); + } + else{ + event.finish(); + } + "step 2" + player.draw(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')&&target.countCards('h')&&target.hp>1&&player!=target) return [1,0.2,0,-0.2]; + } + } + } + }, + tanlin:{ + enable:'phaseUse', + usable:1, + group:'tanlin4', + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(target).set('preserve','win'); + "step 1" + if(result.bool){ + if(target.hasSkill('tanlin2')==false){ + target.addSkill('tanlin2'); + player.addSkill('tanlin3'); + player.gain([result.target]); + player.$gain2([result.target]); + } + } + else{ + player.damage(target); + } + }, + ai:{ + result:{ + target:function(player,target){ + var cards=player.getCards('h'); + var num=target.countCards('h'); + if(num>cards.length+3&&player.hp>1) return -2; + if(num>cards.length+1&&player.hp>1) return -1; + if(num==cards.length-1&&player.hp>1&&!get.is.altered('pozhen')) return -1; + for(var i=0;i9) return num==1?-1:-0.5; + } + return 0; + } + }, + order:9, + } + }, + tanlin2:{ + trigger:{global:'phaseAfter'}, + forced:true, + content:function(){ + player.removeSkill('tanlin2'); + }, + // mod:{ + // cardEnabled:function(){ + // return false; + // }, + // cardUsable:function(){ + // return false; + // }, + // cardRespondable:function(){ + // return false; + // }, + // cardSavable:function(){ + // return false; + // } + // }, + }, + tanlin3:{ + trigger:{global:'phaseAfter'}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('tanlin3'); + }, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + } + }, + }, + tanlin4:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(target.hasSkill('tanlin2')) return true; + }, + }, + }, + yunchou_old:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + filterCard:true, + selectCard:[1,Infinity], + content:function(){ + "step 0" + var card=target.getCards('h').randomGet(); + if(!card){ + event.finish(); + return; + } + target.discard(card); + var color=get.color(card); + var suit=get.suit(card); + var num1=0,num2=0; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseToDiscard('he',get.prompt('tianshu')).ai=function(card){ + if(get.position(card)=='h') return 5-get.useful(card); + return 4-get.value(card); + }.logSkill='tianshu'; + 'step 1' + if(result.bool){ + var list=[]; + for(var i in lib.character){ + if(lib.character[i][4]&&(lib.character[i][4].contains('boss')||lib.character[i][4].contains('hiddenboss'))) continue; + if(i==player.name||i==player.name1||i==player.name2) continue; + for(var j=0;jplayer.countCards('h'); - }, - content:function(){ - player.draw(Math.min(5,trigger.player.countCards('h'))-player.countCards('h')); - player.addTempSkill('mufeng2',{player:'phaseBegin'}); - }, - }, - mufeng2:{}, - jiying:{ - mod:{ - targetInRange:function(card){ - if(card.name=='sha') return true; - } - }, - }, - minjing:{ - trigger:{player:'damageBegin'}, - forced:true, - filter:function(event,player){ - if(player.getEquip(2)) return false; - return lib.skill.guangshatianyi.filter(event,player); - }, - content:function(){ - trigger.num--; - }, - ai:{ - threaten:0.8 - } - }, - touxi:{ - trigger:{global:'phaseEnd'}, - check:function(event,player){ - if(get.damageEffect(event.player,player,player,'thunder')>0){ - if(get.is.altered('touxi')){ - if(get.attitude(player,event.player)<0&&event.player.hp==1&&player.hp>1){ - return true; - } - } - else{ - return true; - } - } - return false; - }, - alter:true, - filter:function(event,player){ - return event.player!=player&&!player.hasSkill('touxi2')&&event.player.isAlive(); - }, - logTarget:'player', - content:function(){ - "step 0" - player.judge(function(card){ - if(get.color(card)=='black') return 1; - return -1; - }); - "step 1" - if(result.bool){ - trigger.player.damage('thunder'); - player.addSkill('touxi2'); - event.finish(); - } - else{ - if(get.is.altered('touxi')){ - player.damage(trigger.player); - } - else{ - if(player.countCards('he')){ - var att=get.attitude(trigger.player,player); - trigger.player.discardPlayerCard(player,'he',function(button){ - if(att>0) return 0; - return get.buttonValue(button); - }); - } - } - } - }, - ai:{ - expose:0.3, - threaten:1.2 - } - }, - touxi2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('touxi2'); - } - }, - nlianji:{ - audio:'lianji', - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - if(player==target) return false; - return target.countCards('h')>0; - }, - selectTarget:2, - multitarget:true, - multiline:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - prepare:'throw', - discard:false, - filterCard:true, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - "step 0" - if(targets[0].countCards('h')&&targets[1].countCards('h')){ - targets[0].chooseToCompare(targets[1]); - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - targets[0].gain(cards,'log'); - targets[0].$gain2(cards); - targets[1].damage(targets[0]); - } - else{ - targets[1].gain(cards,'log'); - targets[1].$gain2(cards); - targets[0].damage(targets[1]); - } - }, - ai:{ - expose:0.3, - threaten:2, - order:9, - result:{ - target:-1 - } - }, - }, - lianji2:{ - group:['lianji3','lianji4'] - }, - lianji3:{ - trigger:{player:'shaHit'}, - forced:true, - popup:false, - content:function(){ - player.storage.lianji2=true; - } - }, - lianji4:{ - trigger:{player:'shaAfter'}, - forced:true, - popup:false, - content:function(){ - if(!player.storage.lianji2){ - player.damage('thunder',player.storage.lianji); - } - delete player.storage.lianji; - delete player.storage.lianji2; - player.removeSkill('lianji2'); - } - }, - yinmo:{}, - miedao:{ - group:['miedao1','miedao2'], - ai:{ - threaten:1.4 - } - }, - miedao1:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - filter:function(event,player){ - return player.hp=player.maxHp-1) return [0,0]; - } - } - } - }, - moyan:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.hp0; - }, - filterTarget:function(card,player,target){ - return player!=target;//&&get.distance(player,target,'attack')<=1; - }, - selectTarget:function(){ - return ui.selected.cards.length; - }, - selectCard:function(){ - var player=_status.currentPhase; - return [1,Math.min(game.players.length-1,player.maxHp-player.hp)]; - }, - filterCard:function(card){ - return get.color(card)=='red'; - }, - check:function(card){ - if(ui.selected.cards.length==0){ - return 8-get.value(card); - } - return 6-get.value(card); - }, - line:'fire', - content:function(){ - "step 0" - target.damage('fire'); - "step 1" - // target.draw(); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target,'fire'); - } - }, - threaten:function(player,target){ - if(target.hp==1) return 2; - if(target.hp==2) return 1.5; - return 0.5; - }, - maixie:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(target.hp==target.maxHp) return [0,1]; - } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - shejie:{ - trigger:{player:'damageEnd'}, - priority:9, - check:function(event,player){ - return get.attitude(player,event.source)<0; - }, - filter:function(event){ - return event&&event.source; - }, - content:function(){ - trigger.source.addSkill('shejie2'); - }, - ai:{ - threaten:0.4 - } - }, - shejie2:{ - unique:true, - trigger:{player:'phaseBegin'}, - forced:true, - priority:10, - mod:{ - cardEnabled:function(){ - return false; - }, - cardUsable:function(){ - return false; - }, - cardRespondable:function(){ - return false; - }, - cardSavable:function(){ - return false; - } - }, - content:function(){ - player.removeSkill('shejie2') - }, - }, - guiyin:{ - trigger:{player:'phaseDiscardEnd'}, - frequent:true, - filter:function(event,player){ - return event.cards&&event.cards.length>1 - }, - content:function(){ - player.draw(2); - }, - }, - wangchen:{ - trigger:{player:'phaseDiscardEnd'}, - direct:true, - filter:function(event,player){ - if(event.cards){ - for(var i=0;i=2; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('yihua',trigger.player),2); - next.ai=function(card){ - if(get.effect(player,trigger.card)<0){ - if(card.name=='liuxinghuoyu') return 7-get.value(card); - return 5-get.value(card); - } - return 0; - }; - next.prompt2='反弹'+get.translation(trigger.player)+'的'+get.translation(trigger.card); - next.logSkill=['yihua',trigger.player]; - "step 1" - if(result.bool){ - // player.discard(result.cards); - trigger.target=trigger.player; - trigger.player=player; - trigger.untrigger(); - trigger.trigger('useCardToBefore'); - } - // "step 2" - // if(result.bool){ - // trigger.target=result.targets[0]; - // trigger.untrigger; - // trigger.trigger('shaBefore'); - // game.delay(); - // } - }, - ai:{ - threaten:function(player,target){ - if(target.countCards('h')<=2){ - return 2; - } - return 2/(target.countCards('h')-1); - } - } - }, - youyin:{ - trigger:{global:'discardAfter'}, - filter:function(event,player){ - if(event.player==player) return false; - if(player.countCards('h')>=5) return false; - for(var i=0;i0; - }, - check:function(card){ - return 10-get.value(card) - }, - filterTarget:function(card,player,target){ - if(target.hp>=target.maxHp) return false; - return true; - }, - selectTarget:[1,3], - content:function(){ - target.recover(); - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - if(player==target&&player.countCards('h')>player.hp) return 20; - return get.recoverEffect(target,player,target); - } - }, - threaten:2 - } - }, - huopu:{ - enable:'phaseUse', - usable:1, - position:'he', - filterCard:function(card){ - return get.suit(card)=='heart'; - }, - viewAs:{name:'liuxinghuoyu'}, - viewAsFilter:function(player){ - if(!player.countCards('he',{suit:'heart'})) return false; - }, - prompt:'将一张红桃手牌当作流星火羽使用', - check:function(card){return 6-get.value(card)}, - ai:{ - threaten:1.4, - order:9, - } - }, - rexue:{ - trigger:{global:'phaseBegin'}, - direct:true, - filter:function(event,player){ - return lib.filter.targetEnabled({name:'sha'},player,event.player)&&player.hasSha(); - }, - content:function(){ - "step 0" - player.chooseToUse({name:'sha'},'热血:是否对'+get.translation(trigger.player)+'使用一张杀',trigger.player,-1).logSkill='rexue'; - "step 1" - if(result.bool){ - player.draw(); - } - } - }, - shengshou:{ - enable:'phaseUse', - filterCard:function(card){ - return get.color(card)=='black'; - }, - viewAs:{name:'caoyao'}, - prompt:'将一张黑色手牌当作草药使用', - check:function(card){return 6-get.value(card)}, - ai:{ - threaten:1.6 - } - }, - huanjian:{ - enable:'phaseUse', - filterCard:function(card){ - return get.color(card)=='black'; - }, - viewAs:{name:'bingpotong'}, - position:'he', - filter:function(event,player){ - return player.countCards('h',{color:'black'})>0; - }, - viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; - }, - prompt:'将一张黑色牌当作冰魄针使用', - check:function(card){return 5-get.value(card)}, - ai:{ - threaten:1.1 - } - }, - benlei:{ - enable:'phaseUse', - viewAs:{name:'jingleishan',nature:'thunder'}, - filterCard:function(card,player){ - return true; - }, - selectCard:3, - position:'he', - prompt:'将三张牌当作惊雷闪使用', - check:function(card){ - return 4-get.value(card); - }, - group:'benlei2', - ai:{ - basic:{ - order:10 - } - } - }, - benlei2:{ - trigger:{source:'damageAfter'}, - filter:function(event,player){ - return event.nature=='thunder'&&player.hp0; - } - else{ - return player.countCards('h')>0; - } - }, - content:function(){ - "step 0" - var att=get.attitude(player,trigger.player); - var nh=player.countCards('h'); - var next; - if(get.is.altered('susheng')){ - next=player.chooseToDiscard(get.prompt('susheng',trigger.player),{color:'red'}); - } - else{ - next=player.chooseToDiscard(get.prompt('susheng',trigger.player)); - } - next.logSkill=['susheng',trigger.player]; - next.ai=function(card){ - if(att>3||(att>1&&nh>2)){ - return get.unuseful2(card); - } - return 0; - }; - "step 1" - if(result.bool){ - // player.chooseToDiscard('h',true); - trigger.untrigger(); - trigger.finish(); - trigger.player.hp=1; - if(trigger.player.maxHp<1) trigger.player.maxHp=1; - trigger.player.update(); - player.addTempSkill('susheng2','phaseAfter'); - } - - }, - ai:{ - threaten:2 - } - }, - susheng2:{}, - kunlunjing:{ - unique:true, - alter:true, - group:['kunlunjing1','kunlunjing2'], - video:function(player,data){ - if(data){ - for(var i in data){ - var current=game.playerMap[i]; - current.node.handcards1.innerHTML=''; - current.node.handcards2.innerHTML=''; - current.node.equips.innerHTML=''; - current.node.judges.innerHTML=''; - current.directgain(get.infoCards(data[i].h)); - var es=get.infoCards(data[i].e); - for(var j=0;j0){ - num+=num2; - } - else if(att<0){ - num-=num2; - } - } - } - return num>Math.min(2,game.players.length/2); - }, - content:function(){ - "step 0" - game.delay(0.5); - "step 1" - ui.window.style.transition='all 0.5s'; - ui.window.classList.add('zoomout3'); - ui.window.delete(); - ui.window.hide(); - game.delay(0,500); - game.addVideo('skill',event.player,'kunlunjing'); - "step 2" - var storage=event.player.storage.kunlunjing; - for(var i=0;i0 - }, - filterTarget:function(card,player,target){ - return player!=target - }, - filterCard:function(card,player){ - if(ui.selected.cards.length){ - return get.suit(card)==get.suit(ui.selected.cards[0]); - } - var cards=player.getCards('h'); - for(var i=0;i0 - }, - filterTarget:function(card,player,target){ - return player!=target - }, - filterCard:function(card,player){ - if(ui.selected.cards.length){ - return get.suit(card)==get.suit(ui.selected.cards[0]); - } - var cards=player.getCards('h'); - for(var i=0;i0; - }, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }, - filterCard:function(card){ - var suit=get.suit(card); - for(var i=0;ilength) return -1.5+eff; - return -1+eff; - } - }, - expose:0.2 - } - }, - liaoyuan:{ - trigger:{player:'shaBegin'}, - direct:true, - filter:function(event,player){ - if(get.itemtype(event.cards)!='cards') return false; - return player.countCards('he',{suit:get.suit(event.cards)})>0; - }, - alter:true, - content:function(){ - "step 0" - player.storage.liaoyuan=0; - event.num=0; - event.cards=[]; - "step 1" - var suit=get.suit(trigger.cards); - event.suit=suit; - player.chooseCard('he',get.prompt('liaoyuan'),function(card,player){ - return get.suit(card)==suit&&lib.filter.cardDiscardable(card,player); - }).ai=function(card){ - if(get.attitude(player,trigger.target)>=0) return 0; - if(get.effect(trigger.target,{name:'sha'},player,player)>0){ - return 7-get.value(card); - } - return 0; - } - "step 2" - if(result.bool){ - if(event.num==0){ - player.logSkill('liaoyuan'); - } - player.discard(result.cards); - event.num++; - if(player.countCards('he',{suit:event.suit})>1&&!get.is.altered('liaoyuan')){ - event.goto(1); - } - } - "step 3" - if(event.num){ - trigger.target.chooseToRespond({name:'shan'}).ai=get.unuseful2; - } - else{ - event.finish(); - } - "step 4" - if(result.bool){ - event.num--; - event.goto(3); - } - else{ - trigger.untrigger(); - trigger.directHit=true; - player.storage.liaoyuan=event.num; - } - }, - group:['liaoyuan2','liaoyuan3'] - }, - liaoyuan2:{ - trigger:{source:'damageBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.storage.liaoyuan>0&&event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2'; - }, - content:function(){ - trigger.num+=player.storage.liaoyuan; - player.storage.liaoyuan=0; - } - }, - liaoyuan3:{ - trigger:{player:'shaEnd'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.liaoyuan=0; - } - }, - dunxing:{ - direct:true, - filter:function(event,player){ - if(event.player==player) return false; - return player.countCards('he')>0; - }, - trigger:{target:'useCardToBefore'}, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he',get.prompt(event.name)); - next.logSkill=event.name; - next.ai=function(card){ - if(get.tag(trigger.card,'multitarget')&&!get.tag(card,'multineg')) return 0; - if(get.effect(player,trigger.card,trigger.player,player)<0){ - return 7-get.value(card); - } - return 0; - } - next.prompt2='弃置一张牌并进行一次判定,若结果不为红桃则'+get.translation(trigger.card)+'失效'; - "step 1" - if(result.bool){ - player.judge(function(card){ - return get.suit(card)=='heart'?-1:1; - }); - } - else{ - event.finish(); - } - "step 2" - if(result.suit!='heart'){ - trigger.untrigger(); - trigger.finish(); - } - } - }, - qiaoxie:{ - group:['qiaoxie2','qiaoxie3'], - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='equip') return [1,3]; - } - }, - noe:true, - } - }, - qiaoxie2:{ - trigger:{player:'equipEnd'}, - frequent:true, - //filter:function(event,player){ - // for(var i=0;i0; - }).ai=function(target){ - return -get.attitude(player,target); - }; - "step 1" - if(result.bool){ - player.logSkill('qiaoxie3',result.targets); - player.discardPlayerCard(result.targets[0],'he',true); - } - else{ - event.finish(); - } - }, - }, - qiaoxie4:{ - trigger:{player:['loseEnd']}, - frequent:true, - filter:function(event,player){ - if(typeof lib.cardType.hslingjian!='number') return false; - if(!player.equiping) return false; - for(var i=0;i0; - }).ai=function(target){ - var att=get.attitude(player,target); - if(att<=0){ - return 1-att+(target.countCards('e')?2:0); - } - return 0; - }; - "step 1" - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('meihuo',event.target); - player.choosePlayerCard(event.target,'he',true).ai=function(button){ - var card=button.link; - if(get.position(card)=='e') return get.equipValue(card); - return 5; - }; - } - "step 2" - if(result.bool){ - if(get.position(result.buttons[0].link)=='e'){ - player.equip(result.buttons[0].link); - } - else{ - player.gain(result.buttons[0].link,event.target); - } - event.target.$giveAuto(result.buttons[0].link,player); - } - }, - }, - yishan:{ - group:'yishan2', - trigger:{player:'damageEnd'}, - filter:function(event,player){ - var content=player.storage.yishan; - for(var i=0;i最近失去的牌'); - var cards=[]; - for(var i=0;i=4) break; - } - } - if(cards.length){ - dialog.add(cards); - } - else{ - dialog.add('(无)'); - } - }, - content:function(content,player){ - var str='最近失去的牌:'; - var cards=[]; - for(var i=0;i=4) break; - } - } - if(cards.length){ - str+=get.translation(cards); - } - else{ - str+='无'; - } - return str; - } - } - }, - yishan2:{ - trigger:{player:'loseEnd'}, - forced:true, - popup:false, - silent:true, - content:function(){ - for(var i=0;i1; - }, - content:function(){ - trigger.directHit=true; - } - }, - poxing:{ - trigger:{source:'damageBegin'}, - filter:function(trigger,player){ - return trigger.player.hp>player.hp; - }, - forced:true, - content:function(){ - trigger.num++; - } - }, - luomu:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event,player){ - return event.player.countCards('hej'); - }, - content:function(){ - trigger.player.discard(trigger.player.getCards('hej').randomGet()); - } - }, - huanhun:{ - trigger:{global:'dying'}, - priority:6, - filter:function(event,player){ - return event.player.hp<=0&&player.countCards('he')>0; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he',get.prompt('huanhun'),function(card){ - return get.color(card)=='red'; - }); - next.logSkill=['huanhun',trigger.player]; - next.ai=function(card){ - if(card.name=='tao') return 0; - if(get.attitude(player,trigger.player)>0){ - return 8-get.value(card); - } - return 0; - }; - "step 1" - if(result.bool){ - trigger.player.judge(function(card){ - return get.color(card)=='red'?1:-1; - }); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - trigger.player.recover(); - } - }, - ai:{ - threaten:1.6, - expose:0.2 - } - }, - huanhun_old:{ - enable:'phaseUse', - forbid:['versus'], - filter:function(){ - return game.dead.length>0 - }, - usable:1, - filterCard:function(card){ - return get.suit(card)=='heart'; - }, - direct:true, - content:function(){ - "step 0" - var list=[]; - for(var i=0;i2) return 3; - } - return 0; - } - }, - threaten:2, - } - }, - yinyue:{ - trigger:{global:'recoverAfter'}, - check:function(event,player){ - return get.attitude(player,event.player)>0; - }, - logTarget:'player', - alter:true, - content:function(){ - "step 0" - if(get.is.altered('yinyue')){ - trigger.player.draw(); - event.finish(); - } - else if(trigger.player!=player&&trigger.player.countCards('h')>=player.countCards('h')){ - game.asyncDraw([trigger.player,player]); - } - else{ - trigger.player.draw(); - event.finish(); - } - "step 1" - game.delay(); - }, - ai:{ - expose:0.2 - } - }, - daofa:{ - trigger:{global:'damageAfter'}, - check:function(event,player){ - return event.source&&get.attitude(player,event.source)<0; - }, - filter:function(event,player){ - return event.source&&event.source!=player&&event.source.countCards('he'); - }, - logTarget:'source', - content:function(){ - trigger.source.chooseToDiscard('he',true); - }, - ai:{ - expose:0.2, - threaten:1.5 - } - }, - daixing:{ - group:'daixing2', - trigger:{player:'phaseEnd'}, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('请选择发动代形的卡牌','he',[1,player.countCards('he')]); - next.logSkill='daixing'; - next.ai=function(card){ - if(ui.selected.cards.length>=2) return 0; - if(ui.selected.cards.length==1){ - if(player.countCards('h')>player.hp){ - return 3-get.value(card); - } - return 0; - } - return 6-get.value(card); - }; - "step 1" - if(result.bool){ - player.changeHujia(result.cards.length); - player.storage.daixing=result.cards.length; - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return; - if(target.storage.daixing>1) return 0.1; - if(target.storage.daixing==1) return 0.5; - } - return 1.5; - } - } - }, - intro:{ - content:'mark' - } - }, - daixing2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - if(player.storage.daixing){ - player.changeHujia(-player.storage.daixing); - player.storage.daixing=0; - } - } - }, - swd_wuxie:{ - mod:{ - targetEnabled:function(card,player,target){ - if(get.type(card)=='delay'&&player!=target){ - return false; - } - } - } - }, - lqingcheng:{ - trigger:{player:'phaseEnd'}, - frequent:true, - content:function(){ - "step 0" - if(event.cards==undefined) event.cards=[]; - player.judge(function(card){ - if(get.color(card)=='red') return 1.5; - return -1.5; - },ui.special); - "step 1" - if(result.judge>0){ - event.cards.push(result.card); - if(event.cards.length==3){ - player.gain(event.cards); - if(event.cards.length){ - player.$draw(event.cards); - } - event.finish(); - } - else if(lib.config.autoskilllist.contains('lqingcheng')){ - player.chooseBool('是否再次发动?'); - } - else{ - event._result={bool:true}; - } - } - else{ - player.gain(event.cards); - if(event.cards.length){ - player.$draw(event.cards); - } - event.finish(); - } - "step 2" - if(result.bool){ - event.goto(0); - } - else{ - player.gain(event.cards); - if(event.cards.length){ - player.$draw(event.cards); - } - } - }, - ai:{ - threaten:1.4 - } - }, - lingxin:{ - trigger:{player:'phaseEnd'}, - frequent:true, - content:function(){ - "step 0" - event.cards=get.cards(3); - player.showCards(event.cards); - "step 1" - for(var i=0;i=player.hp&&event.skill!='lingwu'; - }, - content:function(){ - player.insertPhase(); - }, - ai:{ - order:-10, - result:{ - target:2 - }, - threaten:1.5 - } - }, - xianjiang_old:{ - enable:'phaseUse', - position:'he', - usable:1, - filterCard:function(card,player){ - if(player.storage.xianjiang&&player.storage.xianjiang.contains(card)) return false; - return get.type(card)=='equip'; - }, - init:function(player){ - player.storage.xianjiang=[]; - }, - check:function(card){ - return 10-get.value(card); - }, - prompt:'将一张装备牌永久转化为任意一张装备牌', - content:function(){ - "step 0" - var list=[]; - var suit=get.suit(cards[0]); - var number=get.number(cards[0]); - for(var i in lib.card){ - if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue; - if(lib.card[i].type=='equip'&&cards[0].name!=i){ - if(get.equipValue({name:i})<10) list.push([suit,number,i]); - } - } - var dialog=ui.create.dialog([list,'vcard']); - player.chooseButton(dialog,true,function(button){ - return get.value({name:button.link[2]},player); - }); - "step 1" - cards[0].init(result.buttons[0].link); - player.gain(cards[0]); - player.$gain(cards[0]); - game.delay(); - player.storage.xianjiang.add(cards[0]); - }, - ai:{ - order:9, - result:{ - player:1 - }, - threaten:2, - } - }, - xianjiang2:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.hasSkill('xianjiang'); - }, - content:function(){ - player.storage.xianjiang=[]; - } - }, - xianjiang:{ - enable:'phaseUse', - alter:true, - filterCard:function(card){ - return get.type(card,'trick')=='trick'; - }, - usable:1, - filter:function(event,player){ - if(get.is.altered('xianjiang')&&player.countCards('e')) return false; - if(player.countCards('h',{type:'trick'})) return true; - if(player.countCards('h',{type:'delay'})) return true; - return false; - }, - selectCard:1, - check:function(card){ - return 8-get.value(card); - }, - content:function(){ - var card=game.createCard(get.inpile('equip').randomGet()); - player.equip(card); - player.$gain2(card); - game.delay(); - }, - ai:{ - result:{ - player:1 - }, - order:9 - } - }, - shengong:{ - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!player.countCards('he')) return false; - if(event.filterCard({name:'shan'})){ - if(game.hasPlayer(function(current){ - return current!=player&¤t.getEquip(2); - })){ - return true; - } - } - if(event.filterCard({name:'sha'})){ - if(game.hasPlayer(function(current){ - return current!=player&¤t.getEquip(1); - })){ - return true; - } - } - return false; - }, - direct:true, - content:function(){ - "step 0" - var list=[]; - var players=game.filterPlayer(); - if(trigger.filterCard({name:'shan'})){ - for(var i=0;i0; - }, - content:function(){ - "step 0" - var next=player.chooseCardTarget({ - position:'he', - filterTarget:function(card,player,target){ - return lib.filter.targetEnabled({name:'sha'},player,target); - }, - filterCard:true, - ai1:function(card){ - return get.unuseful(card)+9; - }, - ai2:function(target){ - return get.effect(target,{name:'sha'},player); - }, - prompt:get.prompt('huajian') - }); - "step 1" - if(result.bool){ - player.logSkill('huajian'); - player.useCard({name:'sha'},result.cards,result.targets,false); - } - }, - ai:{ - expose:0.2, - } - }, - polang:{ - trigger:{source:'damageEnd'}, - filter:function(event,player){ - return event.player.countCards('e'); - }, - direct:true, - content:function(){ - player.discardPlayerCard(trigger.player,'e',get.prompt('polang',trigger.player)).logSkill='polang'; - }, - ai:{ - expose:0.3 - }, - }, - jikong:{ - trigger:{player:['loseEnd','phaseBegin']}, - direct:true, - usable:1, - alter:true, - filter:function(event,player){ - if(event.name=='phase') return true; - if(get.is.altered('jikong')) return false; - if(player.countCards('h')) return false; - for(var i=0;i2&&event.card&&event.card.name=='sha'; - }, - content:function(){ - "step 0" - game.delay(0.5); - player.chooseCardTarget({ - prompt:get.prompt('xielei'), - filterCard:lib.filter.cardDiscardable, - position:'he', - filterTarget:function(card,player,target){ - if(player==target) return false; - if(trigger.name=='respond'){ - return trigger.source!=target; - } - else{ - return !trigger.targets.contains(target); - } - }, - ai1:function(card){ - return 8-get.value(card); - }, - ai2:function(target){ - return get.damageEffect(target,player,player,'thunder'); - } - }); - "step 1" - if(result.bool){ - player.logSkill('xielei',result.targets,'thunder'); - player.discard(result.cards); - result.targets[0].damage('thunder'); - } - }, - ai:{ - expose:0.3, - threaten:1.6 - } - }, - jingjie:{ - enable:'phaseUse', - init:function(player){ - player.storage.jingjie=false; - }, - mark:true, - intro:{ - content:'limited', - }, - filter:function(event,player){ - return !player.storage.jingjie; - }, - content:function(){ - 'step 0' - player.storage.jingjie=true; - player.unmarkSkill('jingjie'); - event.targets=game.filterPlayer(); - for(var i=0;i0){ - num-=players[i].countCards('he')-2; - } - else if(att<0){ - num+=players[i].countCards('he')-2; - } - } - if(player.hp==1) return num-1; - return num-players.length/2; - } - } - } - }, - ningjian:{ - group:['ningjian1','ningjian2'], - ai:{ - effect:{ - target:function(card,player,target){ - if(target.countCards('he')&&(get.tag(card,'respondShan')||get.tag(card,'respondSha'))) return 0.6 - } - }, - respondSha:true, - respondShan:true, - } - }, - ningjian1:{ - enable:['chooseToRespond','chooseToUse'], - filterCard:{color:'black'}, - viewAs:{name:'sha'}, - position:'he', - prompt:'将一张黑色牌当杀打出', - check:function(card){return 6-get.value(card)} - }, - ningjian2:{ - enable:['chooseToRespond','chooseToUse'], - filterCard:{color:'red'}, - viewAs:{name:'shan'}, - position:'he', - prompt:'将一张红色牌当闪打出', - check:function(card){return 6-get.value(card)} - }, - duoren:{ - trigger:{target:'shaMiss'}, - filter:function(event){ - return event.player.getEquip(1)!=undefined; - }, - check:function(event,player){ - return get.attitude(player,event.player)<0; - }, - priority:5, - content:function(){ - trigger.player.$give(trigger.player.getEquip(1),player); - player.gain(trigger.player.getEquip(1),trigger.player); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'&&target.countCards('h')>1&&player.getEquip(1)){ - return [1,0.5,0,-0.5]; - } - } - } - } - // filter:function(event){ - // return event.player.countCards('e')>0; - // }, - // content:function(){ - // "step 0" - // player.choosePlayerCard('是否获得'+get.translation(trigger.player)+'的一张装备牌?', - // 'e',trigger.player).ai=get.buttonValue; - // "step 1" - // if(result.bool){ - // var card=result.buttons[0].link; - // trigger.player.$give(card,player); - // player.gain(card); - // } - // }, - }, - taixu:{ - enable:'phaseUse', - filter:function(event,player){ - return (!player.storage.taixu)&&player.countCards('hej'); - }, - filterTarget:function(card,player,target){ - return player!=target&&target.hp>1; - }, - content:function(){ - player.discard(player.getCards('hej')); - player.storage.taixu=true; - target.damage(player.maxHp-player.hp); - }, - ai:{ - basic:{ - order:1, - }, - result:{ - target:function(player,target){ - if(player.maxHp-player.hp<2) return 0; - return -2; - }, - player:function(player,target){ - return -0.5*player.countCards('he'); - } - } - } - }, - pozhen:{ - trigger:{player:'damageEnd'}, - filter:function(event,player){ - if(!event.source) return false; - if(get.is.altered('pozhen')){ - return event.source.countCards('h')>player.countCards('h'); - } - return event.source.countCards('h')!=player.countCards('h'); - }, - alter:true, - // check:function(event,player){ - // return get.attitude(player,event.source)<0; - // }, - direct:true, - content:function(){ - "step 0" - var num=player.countCards('h')-trigger.source.countCards('h'); - event.num=num; - if(num>0){ - var next=player.chooseToDiscard(num,'是否弃置'+num+'张手牌,并对'+get.translation(trigger.source)+'造成一点伤害?'); - next.logSkill=['pozhen',trigger.source]; - next.ai=function(card){ - if(get.damageEffect(trigger.source,player,player)>0&&num<=2){ - return 6-get.value(card); - } - return -1; - } - } - else if(num<0){ - player.chooseBool('是否弃置'+get.translation(trigger.source)+(-num)+'张手牌?').ai=function(){ - return get.attitude(player,trigger.source)<0; - } - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - if(event.num>0){ - trigger.source.damage(); - } - else{ - player.logSkill('pozhen',trigger.source); - var cards=trigger.source.getCards('h'); - cards.sort(lib.sort.random); - trigger.source.discard(cards.slice(0,-event.num)); - } - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-1]; - var num=player.countCards('h')-target.countCards('h'); - if(num>0){ - return [1,0,0,-num/2]; - } - if(num<0&&!get.is.altered('pozhen')){ - return [1,0,0,-0.5]; - } - } - } - } - } - }, - tanlin_defence:{ - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return player.countCards('h')&&event.source&&event.source.countCards('h'); - }, - direct:true, - content:function(){ - "step 0" - player.chooseToDiscard([1,trigger.source.countCards('h')],'弃置任意张手牌并令伤害来源弃置等量手牌').ai=function(card){ - if(ui.selected.cards.length>=trigger.source.countCards('h')) return -1; - if(ui.selected.cards.length==0) return 8-get.value(card); - return 4-get.value(card); - } - "step 1" - if(result.bool){ - player.logSkill('tanlin'); - trigger.source.randomDiscard('h',result.cards.length); - } - else{ - event.finish(); - } - "step 2" - player.draw(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')&&target.countCards('h')&&target.hp>1&&player!=target) return [1,0.2,0,-0.2]; - } - } - } - }, - tanlin:{ - enable:'phaseUse', - usable:1, - group:'tanlin4', - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(target).set('preserve','win'); - "step 1" - if(result.bool){ - if(target.hasSkill('tanlin2')==false){ - target.addSkill('tanlin2'); - player.addSkill('tanlin3'); - player.gain([result.target]); - player.$gain2([result.target]); - } - } - else{ - player.damage(target); - } - }, - ai:{ - result:{ - target:function(player,target){ - var cards=player.getCards('h'); - var num=target.countCards('h'); - if(num>cards.length+3&&player.hp>1) return -2; - if(num>cards.length+1&&player.hp>1) return -1; - if(num==cards.length-1&&player.hp>1&&!get.is.altered('pozhen')) return -1; - for(var i=0;i9) return num==1?-1:-0.5; - } - return 0; - } - }, - order:9, - } - }, - tanlin2:{ - trigger:{global:'phaseAfter'}, - forced:true, - content:function(){ - player.removeSkill('tanlin2'); - }, - // mod:{ - // cardEnabled:function(){ - // return false; - // }, - // cardUsable:function(){ - // return false; - // }, - // cardRespondable:function(){ - // return false; - // }, - // cardSavable:function(){ - // return false; - // } - // }, - }, - tanlin3:{ - trigger:{global:'phaseAfter'}, - forced:true, - popup:false, - content:function(){ - player.removeSkill('tanlin3'); - }, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; - } - }, - }, - tanlin4:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(target.hasSkill('tanlin2')) return true; - }, - }, - }, - yunchou_old:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - filterCard:true, - selectCard:[1,Infinity], - content:function(){ - "step 0" - var card=target.getCards('h').randomGet(); - if(!card){ - event.finish(); - return; - } - target.discard(card); - var color=get.color(card); - var suit=get.suit(card); - var num1=0,num2=0; - for(var i=0;i0; + }, + intro:{ + nocount:true + }, + delay:0, + content:function(){ + 'step 0' + var list=player.storage.tianshu; + if(player.additionalSkills.tianshu){ + player.removeSkill(player.additionalSkills.tianshu); + } + event.skillai=function(list){ + return list.randomGet(); + }; + if(event.isMine()){ + var dialog=ui.create.dialog(); + dialog.add('选择获得一项技能'); + _status.event.list=list; + var clickItem=function(){ + _status.event._result=this.link; + game.resume(); + }; + for(var i=0;i
【'+ + translation+'】
'+lib.translate[list[i]+'_info']+'
'); + item.firstChild.addEventListener('click',clickItem); + item.firstChild.link=list[i]; + } + } + dialog.add(ui.create.div('.placeholder')); + event.dialog=dialog; + event.switchToAuto=function(){ + event._result=event.skillai(list); + game.resume(); + }; + game.pause(); + _status.imchoosing=true; + } + else{ + event._result=event.skillai(list); + } + "step 1" + _status.imchoosing=false; + if(event.dialog){ + event.dialog.close(); + } + var link=result; + player.addSkill(link); + player.skills.remove(link); + player.additionalSkills.tianshu=link; + player.popup(link); + var target=player.storage.tianshu2[player.storage.tianshu.indexOf(link)]; + player.markSkillCharacter('tianshu2',target,get.translation(link),lib.translate[link+'_info']); + player.checkMarks(); + player.addSkill('tianshu3'); + }, + ai:{ + order:10, + result:{ + player:function(player){ + return 1; } - return str; - } - else{ - return '暂无已学习技能'; } } }, - mark:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.chooseToDiscard('he',get.prompt('tianshu')).ai=function(card){ - if(get.position(card)=='h') return 5-get.useful(card); - return 4-get.value(card); - }.logSkill='tianshu'; - 'step 1' - if(result.bool){ - var list=[]; - for(var i in lib.character){ - if(lib.character[i][4]&&(lib.character[i][4].contains('boss')||lib.character[i][4].contains('hiddenboss'))) continue; - if(i==player.name||i==player.name1||i==player.name2) continue; - for(var j=0;j0; - }, - intro:{ - nocount:true - }, - delay:0, - content:function(){ - 'step 0' - var list=player.storage.tianshu; - if(player.additionalSkills.tianshu){ - player.removeSkill(player.additionalSkills.tianshu); - } - event.skillai=function(list){ - return list.randomGet(); - }; - if(event.isMine()){ - var dialog=ui.create.dialog(); + tianshu3:{ + trigger:{global:['useCardAfter','useSkillAfter','phaseAfter']}, + forced:true, + popup:false, + silent:true, + filter:function(event){ + return event.skill!='tianshu2'; + }, + content:function(){ + player.removeSkill('tianshu3'); + } + }, + tianshu:{ + unique:true, + enable:'phaseUse', + filterCard:function(card){ + return get.type(card,'trick')=='trick'; + }, + filter:function(event,player){ + return player.countCards('h',{type:['trick','delay']})>0; + }, + filterTarget:function(card,player,target){ + var names=[]; + if(target.name&&!target.isUnseen(0)) names.add(target.name); + if(target.name1&&!target.isUnseen(0)) names.add(target.name1); + if(target.name2&&!target.isUnseen(1)) names.add(target.name2); + var pss=player.getSkills(); + for(var i=0;iplayer.hp) return 1; + return 0; + } + } + } + }, + tianshu_remove:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return event.player==player.storage.tianshu; + }, + content:function(){ + player.unmarkSkill('tianshu'); + player.removeAdditionalSkill('tianshu'); + delete player.storage.tianshu; + } + }, + tianshu2_old:{ + trigger:{player:'phaseBegin'}, + direct:true, + priority:-9, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('tianshu'),lib.skill.tianshu.filterTarget).ai=function(target){ + if(target.maxHp<5) return Math.random()*(5-target.maxHp); + return -1; + }; + "step 1" + if(result.bool){ + player.logSkill('tianshu',result.targets); + event.target=result.targets[0]; + if(event.isMine()){ + ui.auto.hide(); + event.dialog=lib.skill.tianshu.createDialog(player,result.targets[0]); + game.pause(); + } + else{ + var target=result.targets[0]; + var names=[]; + var list=[]; + if(target.name&&!target.isUnseen(0)) names.add(target.name); + if(target.name1&&!target.isUnseen(0)) names.add(target.name1); + if(target.name2&&!target.isUnseen(1)) names.add(target.name2); + var pss=player.getSkills(); + for(var i=0;i0; + }, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }, + check:function(card){ + return 7-get.value(card); + }, + selectTarget:[1,2], + content:function(){ + target.chooseToDiscard(true,'he'); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(target.countCards('he')==1) return -1.5; + return -1; + } + }, + } + }, + yulin:{ + trigger:{player:'damageBefore'}, + priority:-10, + filter:function(event,player){ + return player.countCards('he',{type:'equip'}); + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he','是否弃置一张装备牌抵消伤害?',function(card,player){ + return get.type(card)=='equip'; + }); + next.logSkill='yulin'; + next.ai=function(card){ + if(player.hp==1||trigger.num>1){ + return 9-get.value(card); + } + if(player.hp==2){ + return 8-get.value(card); + } + return 7-get.value(card); + }; + "step 1" + if(result.bool){ + game.delay(); + trigger.untrigger(); + trigger.finish(); + } + } + }, + funiao:{ + enable:'phaseUse', + usable:1, + prepare:'give2', + filterTarget:function(card,player,target){ + if(player==target) return false; + return true; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + check:function(card){ + if(card.name=='du') return 20; + return 7-get.value(card); + }, + discard:false, + content:function(){ + target.gain(cards,player).delay=false; + player.draw(); + }, + ai:{ + result:{ + target:function(player,target){ + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + return -1; + } + return 1; + }, + }, + order:2 + } + }, + funiao_old:{ + enable:'phaseUse', + discard:false, + prepare:'give2', + filterTarget:function(card,player,target){ + if(player==target) return false; + if(player.countCards('h')==0) return false; + if(target.storage.funiao) return false; + return true; + }, + filterCard:true, + check:function(card){ + if(card.name=='du') return 20; + if(get.owner(card).countCards('h')0; + }, + selectTarget:-1, + content:function(){ + target.damage('fire'); + }, + line:'fire', + ai:{ + order:1, + result:{ + target:function(player,target){ + var eff=get.damageEffect(target,player,target,'fire'); + if(player==target&&player.hp<=1&&eff<0){ + eff*10; + } + return eff; + } + } + } + }, + xuehuang:{ + enable:'phaseUse', + init:function(player){ + player.storage.xuehuang=false; + }, + intro:{ + content:'limited' + }, + mark:true, + unique:true, + skillAnimation:true, + animationColor:'fire', + line:'fire', + filter:function(event,player){ + return !player.storage.xuehuang&& + player.countCards('he',{color:'red'})>0&& + player.countCards('he',{color:'black'})==0; + }, + content:function(){ + 'step 0' + player.storage.xuehuang=true; + player.awakenSkill('xuehuang'); + player.showHandcards(); + var cards=player.getCards('he'); + player.discard(cards); + event.num=cards.length; + 'step 1' + if(event.num){ + var targets=player.getEnemies().randomGets(2); + if(!targets.length){ + event.finish(); + return; + } + player.useCard({name:'sha',nature:'fire'},targets); + event.num--; + event.redo(); + } + }, + ai:{ + order:9, + result:{ + player:function(player){ + if(player.countCards('he',{color:'red'})<2) return 0; + if(player.hasCard(function(card){ + return get.color(card)=='red'&&get.value(card)>8; + })){ + return 0; + } + return 1; + } } } - } - }, - tianshu3:{ - trigger:{global:['useCardAfter','useSkillAfter','phaseAfter']}, - forced:true, - popup:false, - silent:true, - filter:function(event){ - return event.skill!='tianshu2'; - }, - content:function(){ - player.removeSkill('tianshu3'); - } - }, - tianshu:{ - unique:true, - enable:'phaseUse', - filterCard:function(card){ - return get.type(card,'trick')=='trick'; - }, - filter:function(event,player){ - return player.countCards('h',{type:['trick','delay']})>0; - }, - filterTarget:function(card,player,target){ - var names=[]; - if(target.name&&!target.isUnseen(0)) names.add(target.name); - if(target.name1&&!target.isUnseen(0)) names.add(target.name1); - if(target.name2&&!target.isUnseen(1)) names.add(target.name2); - var pss=player.getSkills(); - for(var i=0;i
【'+ - translation+'】
'+lib.translate[list[i]+'_info']+'
'); - item.firstChild.addEventListener('click',clickItem); - item.firstChild.link=list[i]; - } - } - dialog.add(ui.create.div('.placeholder')); - return dialog; - }, - check:function(card){ - return 5-get.value(card); - }, - content:function(){ - "step 0" - // target.gain(cards,player); - event.skillai=function(list){ - return list.randomGet(); - }; - if(event.isMine()){ - event.dialog=lib.skill.tianshu.createDialog(player,target); - event.switchToAuto=function(){ - event._result=event.skillai(event.list); - game.resume(); - }; - _status.imchoosing=true; - game.pause(); - } - else{ - event._result=event.skillai(lib.skill.tianshu.createDialog(player,target,true)); - } - "step 1" - _status.imchoosing=false; - if(event.dialog){ - event.dialog.close(); - } - var link=result; - player.addAdditionalSkill('tianshu',link); - player.popup(link); - player.markSkillCharacter('tianshu',target,get.translation(link),lib.translate[link+'_info']); - player.storage.tianshu=target; - player.checkMarks(); - game.log(player,'获得了技能','【'+get.translation(link)+'】'); - }, - ai:{ - order:1, - result:{ - player:function(player,target){ - if(player.countCards('h')>player.hp) return 1; - return 0; - } - } - } - }, - tianshu_remove:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return event.player==player.storage.tianshu; - }, - content:function(){ - player.unmarkSkill('tianshu'); - player.removeAdditionalSkill('tianshu'); - delete player.storage.tianshu; - } - }, - tianshu2_old:{ - trigger:{player:'phaseBegin'}, - direct:true, - priority:-9, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('tianshu'),lib.skill.tianshu.filterTarget).ai=function(target){ - if(target.maxHp<5) return Math.random()*(5-target.maxHp); - return -1; - }; - "step 1" - if(result.bool){ - player.logSkill('tianshu',result.targets); - event.target=result.targets[0]; - if(event.isMine()){ - ui.auto.hide(); - event.dialog=lib.skill.tianshu.createDialog(player,result.targets[0]); - game.pause(); - } - else{ - var target=result.targets[0]; - var names=[]; - var list=[]; - if(target.name&&!target.isUnseen(0)) names.add(target.name); - if(target.name1&&!target.isUnseen(0)) names.add(target.name1); - if(target.name2&&!target.isUnseen(1)) names.add(target.name2); - var pss=player.getSkills(); - for(var i=0;i0; - }, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }, - check:function(card){ - return 7-get.value(card); - }, - selectTarget:[1,2], - content:function(){ - target.chooseToDiscard(true,'he'); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(target.countCards('he')==1) return -1.5; - return -1; - } - }, - } - }, - yulin:{ - trigger:{player:'damageBefore'}, - priority:-10, - filter:function(event,player){ - return player.countCards('he',{type:'equip'}); - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he','是否弃置一张装备牌抵消伤害?',function(card,player){ - return get.type(card)=='equip'; - }); - next.logSkill='yulin'; - next.ai=function(card){ - if(player.hp==1||trigger.num>1){ - return 9-get.value(card); - } - if(player.hp==2){ - return 8-get.value(card); - } - return 7-get.value(card); - }; - "step 1" - if(result.bool){ - game.delay(); - trigger.untrigger(); - trigger.finish(); - } - } - }, - funiao:{ - enable:'phaseUse', - usable:1, - prepare:'give2', - filterTarget:function(card,player,target){ - if(player==target) return false; - return true; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - check:function(card){ - if(card.name=='du') return 20; - return 7-get.value(card); - }, - discard:false, - content:function(){ - target.gain(cards,player).delay=false; - player.draw(); - }, - ai:{ - result:{ - target:function(player,target){ - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - return -1; - } - return 1; - }, - }, - order:2 - } - }, - funiao_old:{ - enable:'phaseUse', - discard:false, - prepare:'give2', - filterTarget:function(card,player,target){ - if(player==target) return false; - if(player.countCards('h')==0) return false; - if(target.storage.funiao) return false; - return true; - }, - filterCard:true, - check:function(card){ - if(card.name=='du') return 20; - if(get.owner(card).countCards('h')0; - }, - selectTarget:-1, - content:function(){ - target.damage('fire'); - }, - line:'fire', - ai:{ - order:1, - result:{ - target:function(player,target){ - var eff=get.damageEffect(target,player,target,'fire'); - if(player==target&&player.hp<=1&&eff<0){ - eff*10; - } - return eff; - } - } - } - }, - xuehuang:{ - enable:'phaseUse', - init:function(player){ - player.storage.xuehuang=false; - }, - intro:{ - content:'limited' - }, - mark:true, - unique:true, - skillAnimation:true, - animationColor:'fire', - line:'fire', - filter:function(event,player){ - return !player.storage.xuehuang&& - player.countCards('he',{color:'red'})>0&& - player.countCards('he',{color:'black'})==0; - }, - content:function(){ - 'step 0' - player.storage.xuehuang=true; - player.awakenSkill('xuehuang'); - player.showHandcards(); - var cards=player.getCards('he'); - player.discard(cards); - event.num=cards.length; - 'step 1' - if(event.num){ - var targets=player.getEnemies().randomGets(2); - if(!targets.length){ - event.finish(); - return; - } - player.useCard({name:'sha',nature:'fire'},targets); - event.num--; - event.redo(); - } - }, - ai:{ - order:9, - result:{ - player:function(player){ - if(player.countCards('he',{color:'red'})<2) return 0; - if(player.hasCard(function(card){ - return get.color(card)=='red'&&get.value(card)>8; - })){ - return 0; - } - return 1; - } - } - } - }, - zhuyu:{ - trigger:{global:'damageBegin'}, - filter:function(event,player){ - if(!event.player.isLinked()) return false; - if(!event.notLink()) return false; - if(player.countCards('he',{color:'red'})) return true; - return false; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('朱羽:是否弃置一张红色牌使'+get.translation(trigger.player)+'受到的伤害+1?','he',function(card){ - return get.color(card)=='red'; - }); - next.logSkill=['zhuyu',trigger.player,'fire']; - var num=game.countPlayer(function(current){ - if(current.isLinked()){ - if(trigger.nature){ - return get.sgn(get.damageEffect(current,player,player,'fire')); - } - else{ - if(current==trigger.player){ - return get.sgn(get.damageEffect(current,player,player,'fire')); - } - else{ - return 2*get.sgn(get.damageEffect(current,player,player,'fire')); - } - } - } - }); - next.ai=function(card){ - if(trigger.player.hasSkillTag('nofire')) return 0; - if(num>0){ - return 9-get.value(card); - } - return 0; - }; - "step 1" - if(result.bool){ - trigger.num++; - trigger.nature='fire'; - } - } - }, - ningshuang:{ - trigger:{target:'useCardToBegin'}, - filter:function(event,player){ - if(get.color(event.card)!='black') return false; - if(!event.player) return false; - if(event.player==player) return false; - if(event.player.isLinked()&&event.player.isTurnedOver()) return false; - if(player.countCards('he',{color:'black'})) return true; - return false; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('凝霜:是否弃置一张黑色牌使'+get.translation(trigger.player)+'横置或翻面?','he',function(card){ - return get.color(card)=='black'; - }); - next.logSkill=['ningshuang',trigger.player]; - next.ai=function(card){ - if(get.attitude(player,trigger.player)<0){ - return 9-get.value(card); - } - return 0; - }; - "step 1" - if(result.bool){ - if(trigger.player.isTurnedOver()){ - trigger.player.loseHp(); - } - if(trigger.player.isLinked()){ - trigger.player.turnOver(); - } - else{ - trigger.player.link(); - player.draw(); - } - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.color(card)=='black'&&get.attitude(target,player)<0&&target.countCards('h')>0){ - return [1,0.1,0,-target.countCards('h')/4]; - } - } - } - } - }, - zaowu_old:{ - enable:'phaseUse', - usable:1, - position:'he', - filterCard:function(card,player,target){ - if(ui.selected.cards.length==0) return true; - for(var i=0;i=10) continue; - if(i!='list') list.push([suit,number,i]); - } - var dialog=ui.create.dialog([list,'vcard']); - player.chooseButton(dialog,2,true,function(button){ - return get.value({name:button.link[2]},player); - }); - "step 1" - var cards=[ui.create.card(),ui.create.card()]; - cards[0].init(result.buttons[0].link); - cards[1].init(result.buttons[1].link); - player.gain(cards); - player.$gain(cards); - game.delay(); - }, - ai:{ - order:8, - result:{ - player:1 - }, - threaten:1.6 - } - }, - xielv:{ - trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ - var cards=player.getCards('h'); - if(cards.length<2) return false; - var color=get.color(cards[0]); - for(var i=1;i0; - }, - content:function(){ - 'step 0' - player.showHandcards(); - 'step 1' - player.recover(); - event.targets=game.filterPlayer(function(current){ - return current.countCards('j'); - }); - event.targets.sortBySeat(); - 'step 2' - if(event.targets.length){ - var current=event.targets.shift(); - var js=current.getCards('j'); - if(js.length){ - current.discard(js); - player.line(current,'green'); - } - event.redo(); - } - }, - ai:{ - expose:0.1, - } - }, - xiaomoyu:{ - trigger:{source:'damageEnd'}, - priority:1, - forced:true, - filter:function(event,player){ - return !player.hasSkill('xiaomoyu2'); - }, - content:function(){ - "step 0" - player.addTempSkill('xiaomoyu2','phaseAfter'); - if(player.hp0; - }, - usable:1, - selectTarget:-1, - filter:function(){ - return game.hasPlayer(function(current){ - return current.countCards('j'); - }); - }, - line:'fire', - content:function(){ - "step 0" - event.num=target.countCards('j'); - target.discard(target.getCards('j')); - "step 1" - target.damage(event.num,'fire','nosource') - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - var eff=get.damageEffect(target,player,target,'fire'); - if(eff>=0) return eff+1; - var judges=target.getCards('j'); - if(!judges.length) return 0; - if(target.hp==1||judges.length>1) return -judges.length; - var name=judges[0].viewAs||judges[0].name; - if(name=='shandian'||name=='huoshan'||name=='hongshui') return -judges.length; - return 0; - } - } - } - }, - huanyin:{ - trigger:{target:'useCardToBefore'}, - forced:true, - priority:5.9, - filter:function(event,player){ - return event.player!=player; - }, - content:function(){ - "step 0" - var effect=get.effect(player,trigger.card,trigger.player,player); - player.judge(function(card){ - switch(get.suit(card)){ - case 'spade':return -effect; - case 'heart':return 1; - default:return 0; - } - }); - "step 1" - switch(result.suit){ - case 'spade':{ - trigger.untrigger(); - trigger.finish(); - break; - } - case 'heart':{ - player.draw(); - break; - } - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - return 0.7 - } - }, - threaten:0.8 - } - }, - xuanzhou:{ - enable:'phaseUse', - usable:1, - discard:false, - filter:function(event,player){ - return player.countCards('he',{type:'trick'})>0; - }, - prepare:'throw', - position:'he', - filterCard:{type:'trick'}, - filterTarget:function(card,player,target){ - return player!=target; - }, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - "step 0" - var list=[]; - for(var i in lib.card){ - if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue; - if(lib.card[i].type=='delay') list.push([cards[0].suit,cards[0].number,i]); - } - var dialog=ui.create.dialog([list,'vcard']); - var bing=target.countCards('h')<=1; - player.chooseButton(dialog,true,function(button){ - if(bing&&button.link[2]=='bingliang'){ - return 2; - } - if(button.link[2]=='lebu'){ - return 1; - } - if(button.link[2]=='guiyoujie'){ - return 0.5; - } - return 0.2; - }).filterButton=function(button){ - return !target.hasJudge(button.link[2]); - }; - "step 1" - // console.log(result.links[0][2]); - target.addJudge(result.links[0][2],cards); - }, - ai:{ - result:{ - target:-1 - }, - order:9.5, - } - }, - tianlun:{ - unique:true, - trigger:{global:'judge'}, - direct:true, - filter:function(event){ - if(event.card) return true; - return game.hasPlayer(function(current){ - return current.countCards('j'); - }); - }, - content:function(){ - "step 0" - var list=[]; - if(trigger.card) list.push(trigger.card); - var players=game.filterPlayer(); - for(var i=0;i1) return true; - var eff=get.damageEffect(event.player,player,player); - if(player.hp==player.maxHp) return eff<0; - return eff<=0; - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - player.recover(); - }, - }, - lanzhi:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - if(get.suit(event.card)=='club'){ - return game.hasPlayer(function(current){ - return current.hp<=player.hp&¤t.isDamaged(); - }); - } - return false; - }, - prompt:function(event,player){ - var list=game.filterPlayer(function(current){ - return current.hp<=player.hp&¤t.isDamaged(); - }); - return get.prompt('lanzhi',list); - }, - check:function(event,player){ - var list=game.filterPlayer(function(current){ - return current.hp<=player.hp&¤t.isDamaged(); - }); - var num=0; - for(var i=0;i0){ - num++; - } - else{ - num--; - } - } - return num>0; - }, - content:function(){ - "step 0" - var list=game.filterPlayer(function(current){ - return current.hp<=player.hp&¤t.isDamaged(); - }); - player.line(list,'green'); - list.sort(lib.sort.seat); - event.list=list; - "step 1" - if(event.list.length){ - event.list.shift().recover(); - event.redo(); - } - }, - ai:{ - expose:0.3, - threaten:1.5 - } - }, - lanzhi2:{}, - duanyi:{ - enable:'phaseUse', - usable:1, - alter:true, - filter:function(event,player){ - return player.countCards('h','sha')>1; - }, - filterCard:{name:'sha'}, - selectCard:2, - filterTarget:function(card,player,target){ - return player!=target; - }, - check:function(card){ - return 10-get.value(card); - }, - content:function(){ - "step 0" - target.damage(); - if(get.is.altered('duanyi')){ - event.finish(); - } - "step 1" - var he=target.getCards('he'); - target.discard(he.randomGets(target.maxHp-target.hp)); - }, - ai:{ - expose:0.3, - result:{ - target:function(player,target){ - return get.damageEffect(target,player)-(target.maxHp-target.hp)/2; - } - }, - order:5 - } - }, - guxing:{ - group:['guxing1','guxing3'] - }, - guxing1:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - var min=Math.max(1,player.maxHp-player.hp); - return player.countCards('h')<=min&&player.countCards('h')>0&& - lib.filter.filterCard({name:'sha'},player); - }, - filterCard:true, - selectCard:-1, - // viewAs:{name:'sha'}, - discard:false, - prepare:'throw', - filterTarget:function(card,player,target){ - return lib.filter.targetEnabled({name:'sha'},player,target); - }, - content:function(){ - "step 0" - delete player.storage.guxing; - targets.sort(lib.sort.seat); - player.useCard({name:'sha'},cards,targets,'guxing').animate=false; - "step 1" - if(player.storage.guxing){ - player.draw(player.storage.guxing); - delete player.storage.guxing; - } - }, - multitarget:true, - multiline:true, - selectTarget:[1,3], - ai:{ - order:function(){ - if(_status.event.player.countCards('h')==1) return 10; - return get.order({name:'sha'})+0.1; - }, - result:{ - target:function(player,target){ - return get.effect(target,{name:'sha'},player,target); - } - }, - threaten:function(player,target){ - if(target.hp=player.maxHp-1) return [0,0]; - } - } - } - }, - jifeng:{ - mod:{ - selectTarget:function(card,player,range){ - if(range[0]!=1||range[1]!=1) return; - var range2=get.select(get.info(card).selectTarget); - if(range2[0]!=1&&range2[1]!=1) return; - if(card.name=='sha'||get.type(card)=='trick') range[1]=Infinity; - }, - }, - trigger:{player:'useCardToBefore'}, - priority:6, - forced:true, - popup:false, - filter:function(event,player){ - if(event.targets.length<=1) return false; - if(event.card.name=='sha') return true; - else if(get.type(event.card)=='trick'){ - var range=get.select(get.info(event.card).selectTarget); - if(range[0]==1&&range[1]==1) return true; - } - return false; - }, - content:function(){ - if(Math.random()>(1.3+trigger.targets.length/5)/trigger.targets.length){ - trigger.target.popup('失误'); - trigger.untrigger(); - trigger.finish(); - } - } - }, - mohua2:{ - unique:true, - trigger:{player:'dying'}, - priority:10, - forced:true, - content:function(){ - "step 0" - player.removeSkill('miles_xueyi'); - player.removeSkill('aojian'); - player.removeSkill('mohua2'); - player.addSkill('moyan'); - player.addSkill('miedao'); - player.addSkill('jifeng'); - player.addSkill('swd_xiuluo'); + }, + zhuyu:{ + trigger:{global:'damageBegin'}, + filter:function(event,player){ + if(!event.player.isLinked()) return false; + if(!event.notLink()) return false; + if(player.countCards('he',{color:'red'})) return true; + return false; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('朱羽:是否弃置一张红色牌使'+get.translation(trigger.player)+'受到的伤害+1?','he',function(card){ + return get.color(card)=='red'; + }); + next.logSkill=['zhuyu',trigger.player,'fire']; + var num=game.countPlayer(function(current){ + if(current.isLinked()){ + if(trigger.nature){ + return get.sgn(get.damageEffect(current,player,player,'fire')); + } + else{ + if(current==trigger.player){ + return get.sgn(get.damageEffect(current,player,player,'fire')); + } + else{ + return 2*get.sgn(get.damageEffect(current,player,player,'fire')); + } + } + } + }); + next.ai=function(card){ + if(trigger.player.hasSkillTag('nofire')) return 0; + if(num>0){ + return 9-get.value(card); + } + return 0; + }; + "step 1" + if(result.bool){ + trigger.num++; + trigger.nature='fire'; + } + } + }, + ningshuang:{ + trigger:{target:'useCardToBegin'}, + filter:function(event,player){ + if(get.color(event.card)!='black') return false; + if(!event.player) return false; + if(event.player==player) return false; + if(event.player.isLinked()&&event.player.isTurnedOver()) return false; + if(player.countCards('he',{color:'black'})) return true; + return false; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('凝霜:是否弃置一张黑色牌使'+get.translation(trigger.player)+'横置或翻面?','he',function(card){ + return get.color(card)=='black'; + }); + next.logSkill=['ningshuang',trigger.player]; + next.ai=function(card){ + if(get.attitude(player,trigger.player)<0){ + return 9-get.value(card); + } + return 0; + }; + "step 1" + if(result.bool){ + if(trigger.player.isTurnedOver()){ + trigger.player.loseHp(); + } + if(trigger.player.isLinked()){ + trigger.player.turnOver(); + } + else{ + trigger.player.link(); + player.draw(); + } + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.color(card)=='black'&&get.attitude(target,player)<0&&target.countCards('h')>0){ + return [1,0.1,0,-target.countCards('h')/4]; + } + } + } + } + }, + zaowu_old:{ + enable:'phaseUse', + usable:1, + position:'he', + filterCard:function(card,player,target){ + if(ui.selected.cards.length==0) return true; + for(var i=0;i=10) continue; + if(i!='list') list.push([suit,number,i]); + } + var dialog=ui.create.dialog([list,'vcard']); + player.chooseButton(dialog,2,true,function(button){ + return get.value({name:button.link[2]},player); + }); + "step 1" + var cards=[ui.create.card(),ui.create.card()]; + cards[0].init(result.buttons[0].link); + cards[1].init(result.buttons[1].link); + player.gain(cards); + player.$gain(cards); + game.delay(); + }, + ai:{ + order:8, + result:{ + player:1 + }, + threaten:1.6 + } + }, + xielv:{ + trigger:{player:'phaseDiscardEnd'}, + filter:function(event,player){ + var cards=player.getCards('h'); + if(cards.length<2) return false; + var color=get.color(cards[0]); + for(var i=1;i0; + }, + content:function(){ + 'step 0' + player.showHandcards(); + 'step 1' + player.recover(); + event.targets=game.filterPlayer(function(current){ + return current.countCards('j'); + }); + event.targets.sortBySeat(); + 'step 2' + if(event.targets.length){ + var current=event.targets.shift(); + var js=current.getCards('j'); + if(js.length){ + current.discard(js); + player.line(current,'green'); + } + event.redo(); + } + }, + ai:{ + expose:0.1, + } + }, + xiaomoyu:{ + trigger:{source:'damageEnd'}, + priority:1, + forced:true, + filter:function(event,player){ + return !player.hasSkill('xiaomoyu2'); + }, + content:function(){ + "step 0" + player.addTempSkill('xiaomoyu2','phaseAfter'); + if(player.hp0; + }, + usable:1, + selectTarget:-1, + filter:function(){ + return game.hasPlayer(function(current){ + return current.countCards('j'); + }); + }, + line:'fire', + content:function(){ + "step 0" + event.num=target.countCards('j'); + target.discard(target.getCards('j')); + "step 1" + target.damage(event.num,'fire','nosource') + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + var eff=get.damageEffect(target,player,target,'fire'); + if(eff>=0) return eff+1; + var judges=target.getCards('j'); + if(!judges.length) return 0; + if(target.hp==1||judges.length>1) return -judges.length; + var name=judges[0].viewAs||judges[0].name; + if(name=='shandian'||name=='huoshan'||name=='hongshui') return -judges.length; + return 0; + } + } + } + }, + huanyin:{ + trigger:{target:'useCardToBefore'}, + forced:true, + priority:5.9, + filter:function(event,player){ + return event.player!=player; + }, + content:function(){ + "step 0" + var effect=get.effect(player,trigger.card,trigger.player,player); + player.judge(function(card){ + switch(get.suit(card)){ + case 'spade':return -effect; + case 'heart':return 1; + default:return 0; + } + }); + "step 1" + switch(result.suit){ + case 'spade':{ + trigger.untrigger(); + trigger.finish(); + break; + } + case 'heart':{ + player.draw(); + break; + } + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + return 0.7 + } + }, + threaten:0.8 + } + }, + xuanzhou:{ + enable:'phaseUse', + usable:1, + discard:false, + filter:function(event,player){ + return player.countCards('he',{type:'trick'})>0; + }, + prepare:'throw', + position:'he', + filterCard:{type:'trick'}, + filterTarget:function(card,player,target){ + return player!=target; + }, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + "step 0" + var list=[]; + for(var i in lib.card){ + if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue; + if(lib.card[i].type=='delay') list.push([cards[0].suit,cards[0].number,i]); + } + var dialog=ui.create.dialog([list,'vcard']); + var bing=target.countCards('h')<=1; + player.chooseButton(dialog,true,function(button){ + if(bing&&button.link[2]=='bingliang'){ + return 2; + } + if(button.link[2]=='lebu'){ + return 1; + } + if(button.link[2]=='guiyoujie'){ + return 0.5; + } + return 0.2; + }).filterButton=function(button){ + return !target.hasJudge(button.link[2]); + }; + "step 1" + // console.log(result.links[0][2]); + target.addJudge(result.links[0][2],cards); + }, + ai:{ + result:{ + target:-1 + }, + order:9.5, + } + }, + tianlun:{ + unique:true, + trigger:{global:'judge'}, + direct:true, + filter:function(event){ + if(event.card) return true; + return game.hasPlayer(function(current){ + return current.countCards('j'); + }); + }, + content:function(){ + "step 0" + var list=[]; + if(trigger.card) list.push(trigger.card); + var players=game.filterPlayer(); + for(var i=0;i1) return true; + var eff=get.damageEffect(event.player,player,player); + if(player.hp==player.maxHp) return eff<0; + return eff<=0; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + player.recover(); + }, + }, + lanzhi:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + if(get.suit(event.card)=='club'){ + return game.hasPlayer(function(current){ + return current.hp<=player.hp&¤t.isDamaged(); + }); + } + return false; + }, + prompt:function(event,player){ + var list=game.filterPlayer(function(current){ + return current.hp<=player.hp&¤t.isDamaged(); + }); + return get.prompt('lanzhi',list); + }, + check:function(event,player){ + var list=game.filterPlayer(function(current){ + return current.hp<=player.hp&¤t.isDamaged(); + }); + var num=0; + for(var i=0;i0){ + num++; + } + else{ + num--; + } + } + return num>0; + }, + content:function(){ + "step 0" + var list=game.filterPlayer(function(current){ + return current.hp<=player.hp&¤t.isDamaged(); + }); + player.line(list,'green'); + list.sort(lib.sort.seat); + event.list=list; + "step 1" + if(event.list.length){ + event.list.shift().recover(); + event.redo(); + } + }, + ai:{ + expose:0.3, + threaten:1.5 + } + }, + lanzhi2:{}, + duanyi:{ + enable:'phaseUse', + usable:1, + alter:true, + filter:function(event,player){ + return player.countCards('h','sha')>1; + }, + filterCard:{name:'sha'}, + selectCard:2, + filterTarget:function(card,player,target){ + return player!=target; + }, + check:function(card){ + return 10-get.value(card); + }, + content:function(){ + "step 0" + target.damage(); + if(get.is.altered('duanyi')){ + event.finish(); + } + "step 1" + var he=target.getCards('he'); + target.discard(he.randomGets(target.maxHp-target.hp)); + }, + ai:{ + expose:0.3, + result:{ + target:function(player,target){ + return get.damageEffect(target,player)-(target.maxHp-target.hp)/2; + } + }, + order:5 + } + }, + guxing:{ + group:['guxing1','guxing3'] + }, + guxing1:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var min=Math.max(1,player.maxHp-player.hp); + return player.countCards('h')<=min&&player.countCards('h')>0&& + lib.filter.filterCard({name:'sha'},player); + }, + filterCard:true, + selectCard:-1, + // viewAs:{name:'sha'}, + discard:false, + prepare:'throw', + filterTarget:function(card,player,target){ + return lib.filter.targetEnabled({name:'sha'},player,target); + }, + content:function(){ + "step 0" + delete player.storage.guxing; + targets.sort(lib.sort.seat); + player.useCard({name:'sha'},cards,targets,'guxing').animate=false; + "step 1" + if(player.storage.guxing){ + player.draw(player.storage.guxing); + delete player.storage.guxing; + } + }, + multitarget:true, + multiline:true, + selectTarget:[1,3], + ai:{ + order:function(){ + if(_status.event.player.countCards('h')==1) return 10; + return get.order({name:'sha'})+0.1; + }, + result:{ + target:function(player,target){ + return get.effect(target,{name:'sha'},player,target); + } + }, + threaten:function(player,target){ + if(target.hp=player.maxHp-1) return [0,0]; + } + } + } + }, + jifeng:{ + mod:{ + selectTarget:function(card,player,range){ + if(range[0]!=1||range[1]!=1) return; + var range2=get.select(get.info(card).selectTarget); + if(range2[0]!=1&&range2[1]!=1) return; + if(card.name=='sha'||get.type(card)=='trick') range[1]=Infinity; + }, + }, + trigger:{player:'useCardToBefore'}, + priority:6, + forced:true, + popup:false, + filter:function(event,player){ + if(event.targets.length<=1) return false; + if(event.card.name=='sha') return true; + else if(get.type(event.card)=='trick'){ + var range=get.select(get.info(event.card).selectTarget); + if(range[0]==1&&range[1]==1) return true; + } + return false; + }, + content:function(){ + if(Math.random()>(1.3+trigger.targets.length/5)/trigger.targets.length){ + trigger.target.popup('失误'); + trigger.untrigger(); + trigger.finish(); + } + } + }, + mohua2:{ + unique:true, + trigger:{player:'dying'}, + priority:10, + forced:true, + content:function(){ + "step 0" + player.removeSkill('miles_xueyi'); + player.removeSkill('aojian'); + player.removeSkill('mohua2'); + player.addSkill('moyan'); + player.addSkill('miedao'); + player.addSkill('jifeng'); + player.addSkill('swd_xiuluo'); - lib.character.swd_satan=['','qun',4,['moyan','miedao','jifeng','swd_xiuluo'],['temp']]; - if(player.name=='swd_miles') player.name='swd_satan'; - if(player.name1=='swd_miles') player.name1='swd_satan'; - if(player.name2=='swd_miles'){ - player.name2='swd_satan'; - player.node.avatar2.setBackground('swd_satan','character'); - } - else{ - player.node.avatar.setBackground('swd_satan','character'); - } + lib.character.swd_satan=['','qun',4,['moyan','miedao','jifeng','swd_xiuluo'],['temp']]; + if(player.name=='swd_miles') player.name='swd_satan'; + if(player.name1=='swd_miles') player.name1='swd_satan'; + if(player.name2=='swd_miles'){ + player.name2='swd_satan'; + player.node.avatar2.setBackground('swd_satan','character'); + } + else{ + player.node.avatar.setBackground('swd_satan','character'); + } - "step 1" - player.recover(2); - "step 2" - player.draw(2); - }, - }, - liexin:{ - trigger:{source:'damageBegin'}, - direct:true, - content:function(){ - "step 0" - player.chooseToDiscard('是否弃置一张牌使伤害+1?','he').ai=function(card){ - if(get.attitude(player,trigger.player)<0){ - return 7-get.value(card); - } - } - "step 1" - if(result.bool){ - player.logSkill('liexin'); - trigger.num++; - } - }, - ai:{ - threaten:1.8 - } - }, - mohua:{ - trigger:{player:'dying'}, - priority:10, - forced:true, - mode:['identity'], - content:function(){ - "step 0" - var skills=['wuying','xiehun','jumo']; - if(lib.config.mode_choice.double_character){ - skills.push('swd_xiuluo'); - } - lib.character.swd_satan=['','qun',6,skills,['temp']]; - if(!_status.ai.customAttitude) _status.ai.customAttitude=[]; - _status.ai.customAttitude.push(function(from,to){ - if(from.storage.xiehun){ - if(to==game.zhu) return 10; - return -10; - } - if(to.storage.xiehun){ - return 0; - } - }); - player.uninit(); - player.init('swd_satan'); - player.hp=game.players.length; - player.update(); - game.zhu=player; - player.identity='zhu'; - player.setIdentity('魔'); - player.identityShown=true; - var players=get.players(false,true); - for(var i=0;i0){ - player.draw(num); - } - }, - }, - duijue:{ - enable:'phaseUse', - mark:true, - unique:true, - forceunique:true, - skillAnimation:true, - filter:function(event,player){ - return !player.storage.duijue; - }, - filterTarget:function(card,player,target){ - if(get.mode()=='identity'&&_status.mode=='zhong'&&game.zhu&&!game.zhu.isZhu){ - return target==game.zhong; - } - if(target.identity=='zhu'||get.is.jun(target)) return false; - return player!=target; - }, - content:function(){ - player.storage.duijue=true; - player.awakenSkill('duijue'); - var evt=_status.event; - for(var i=0;i<10;i++){ - if(evt&&evt.getParent){ - evt=evt.getParent(); - } - if(evt.name=='phaseUse'){ - evt.skipped=true; - break; - } - } - player.storage.duijue3=target; - player.addSkill('duijue3'); - }, - duijueLoop:function(){ - 'step 0' - targets[0].phase('duijue'); - 'step 1' - if(targets[0].isDead()||targets[1].isDead()){ - event.goto(3); - } - else{ - targets[1].phase('duijue'); - } - 'step 2' - if(targets[0].isDead()||targets[1].isDead()){ - event.goto(3); - } - else{ - event.goto(0); - } - 'step 3' - for(var i=0;i=3) return -1; - if(target.hp0&& - get.attitude(player,trigger.source)<0&& - get.damageEffect(trigger.player,trigger.source,player)< - get.damageEffect(trigger.source,trigger.player,player); - var next=player.chooseToDiscard('是否将伤害来源('+get.translation(trigger.source)+ - ')和目标('+get.translation(trigger.player)+')对调?','he'); - next.ai=function(card){ - if(go){ - return 10-get.value(card); - } - return 0; - }; - next.logSkill='yinguo'; - "step 1" - if(result.bool){ - var target=trigger.player; - trigger.player=trigger.source; - trigger.source=target; - trigger.trigger('damageBefore'); - player.addTempSkill('yinguo2',['damageAfter','damageCancelled']); - } - }, - ai:{ - threaten:10, - expose:0.5, - }, - global:'yinguo3' - }, - yinguo2:{}, - yinguo3:{ - ai:{ - effect:{ - target:function(card,player,target){ - if(!get.tag(card,'damage')) return; - if(target.hasSkill('yinguo')) return; - var source=game.findPlayer(function(current){ - return current.hasSkill('yinguo'); - }); - if(source&&source.countCards('he')){ - if(get.attitude(source,player)<0&&get.attitude(source,target)>0){ - return [0,0,0,-1]; - } - } - } - } - } - }, - guiyan:{ - unique:true, - enable:'phaseUse', - usable:1, - intro:{ - content:'濒死时回复一点体力并失去鬼眼' - }, - mark:true, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); - }, - content:function(){ - "step 0" - player.chooseCardButton(target,target.getCards('h')).filterButton=function(button){ - return get.suit(button.link)=='club'; - } - "step 1" - if(result.bool){ - player.gain(result.links[0],target); - target.$giveAuto(result.links[0],player); - } - }, - ai:{ - order:11, - result:{ - target:-1, - player:1, - }, - threaten:1.3 - }, - group:['guiyan2'], - }, - guiyan2:{ - trigger:{player:'dying'}, - priority:6, - forced:true, - content:function(){ - player.recover(); - player.removeSkill('guiyan'); - player.removeSkill('guiyan2'); - } - }, - yunshen_old:{ - mod:{ - globalFrom:function(from,to,distance){ - if(!from.getEquip(1)) return distance-1; - }, - globalTo:function(from,to,distance){ - if(!to.getEquip(2)) return distance+1; - } - } - }, - suiyan_old:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return get.type(card)=='basic'; - }, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('e'); - }, - content:function(){ - var num=Math.floor(Math.random()*3); - if(num==0){ - player.draw(); - } - else{ - target.discard(target.getCards('e').sort(lib.sort.random).splice(0,num)); - } - }, - ai:{ - order:7, - result:{ - target:-1, - }, - threaten:1.2 - } - }, - xianyin:{ - enable:'phaseUse', - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.countCards('j')&¤t!=player; - }); - }, - content:function(){ - "step 0" - event.targets=game.filterPlayer(function(current){ - return current.countCards('j')&¤t!=player; - }); - event.targets.sort(lib.sort.seat); - "step 1" - if(event.targets.length){ - event.target=event.targets.shift(); - event.target.discard(event.target.getCards('j')); - player.line(event.target,'green'); - } - else{ - event.finish(); - } - "step 2" - if(event.target.countCards('h')){ - event.target.chooseCard('选择一张手牌交给'+get.translation(player),true).ai=function(card){ - return -get.value(card); - } - } - else{ - event.goto(1); - } - "step 3" - if(result.bool){ - player.gain(result.cards[0],target); - target.$give(1,player); - } - event.goto(1); - }, - ai:{ - order:9, - result:{ - player:function(player){ - var num=0,players=game.filterPlayer(); - for(var i=0;i=0&& - get.attitude(players[i],player)>=0){ - num++; - } - else{ - num--; - } - } - } - return num; - } - } - } - }, - mailun:{ - unique:true, - trigger:{player:'phaseBegin'}, - direct:true, - intro:{ - content:function(storage){ - if(!storage) return '无'; - return lib.skill.mailun.effects[storage-1]; - } - }, - effects:[ - '减少一点体力并增加一点体力上限', - '增加一点体力并减少一点体力上限', - '令你即将造成和即将受到的首次伤害-1', - '令你即将造成和即将受到的首次伤害+1', - '少摸一张牌并令手牌上限+1', - '多摸一张牌并令手牌上限-1', - '进攻距离+1,防御距离-1', - '进攻距离-1,防御距离+1' - ], - content:function(){ - "step 0" - player.removeSkill('mailun31'); - player.removeSkill('mailun32'); - player.removeSkill('mailun41'); - player.removeSkill('mailun42'); - player.removeSkill('mailun5'); - player.removeSkill('mailun6'); - player.removeSkill('mailun7'); - player.removeSkill('mailun8'); - if(event.isMine()){ - ui.auto.hide(); - event.dialog=ui.create.dialog('脉轮:选择一个效果'); - var effects=lib.skill.mailun.effects; - var clickItem=function(){ - event.choice=this.link; - game.resume(); - } - for(var i=0;i<8;i++){ - if(i==0&&player.maxHp==6) continue; - var item=event.dialog.add(''); - item.addEventListener('click',clickItem); - item.link=i+1; + "step 1" + player.recover(2); + "step 2" + player.draw(2); + }, + }, + liexin:{ + trigger:{source:'damageBegin'}, + direct:true, + content:function(){ + "step 0" + player.chooseToDiscard('是否弃置一张牌使伤害+1?','he').ai=function(card){ + if(get.attitude(player,trigger.player)<0){ + return 7-get.value(card); + } + } + "step 1" + if(result.bool){ + player.logSkill('liexin'); + trigger.num++; + } + }, + ai:{ + threaten:1.8 + } + }, + mohua:{ + trigger:{player:'dying'}, + priority:10, + forced:true, + mode:['identity'], + content:function(){ + "step 0" + var skills=['wuying','xiehun','jumo']; + if(lib.config.mode_choice.double_character){ + skills.push('swd_xiuluo'); + } + lib.character.swd_satan=['','qun',6,skills,['temp']]; + if(!_status.ai.customAttitude) _status.ai.customAttitude=[]; + _status.ai.customAttitude.push(function(from,to){ + if(from.storage.xiehun){ + if(to==game.zhu) return 10; + return -10; + } + if(to.storage.xiehun){ + return 0; + } + }); + player.uninit(); + player.init('swd_satan'); + player.hp=game.players.length; + player.update(); + game.zhu=player; + player.identity='zhu'; + player.setIdentity('魔'); + player.identityShown=true; + var players=get.players(false,true); + for(var i=0;i0){ + player.draw(num); + } + }, + }, + duijue:{ + enable:'phaseUse', + mark:true, + unique:true, + forceunique:true, + skillAnimation:true, + filter:function(event,player){ + return !player.storage.duijue; + }, + filterTarget:function(card,player,target){ + if(get.mode()=='identity'&&_status.mode=='zhong'&&game.zhu&&!game.zhu.isZhu){ + return target==game.zhong; + } + if(target.identity=='zhu'||get.is.jun(target)) return false; + return player!=target; + }, + content:function(){ + player.storage.duijue=true; + player.awakenSkill('duijue'); + var evt=_status.event; + for(var i=0;i<10;i++){ + if(evt&&evt.getParent){ + evt=evt.getParent(); + } + if(evt.name=='phaseUse'){ + evt.skipped=true; + break; + } + } + player.storage.duijue3=target; + player.addSkill('duijue3'); + }, + duijueLoop:function(){ + 'step 0' + targets[0].phase('duijue'); + 'step 1' + if(targets[0].isDead()||targets[1].isDead()){ + event.goto(3); + } + else{ + targets[1].phase('duijue'); + } + 'step 2' + if(targets[0].isDead()||targets[1].isDead()){ + event.goto(3); + } + else{ + event.goto(0); + } + 'step 3' + for(var i=0;i=3) return -1; + if(target.hp0&& + get.attitude(player,trigger.source)<0&& + get.damageEffect(trigger.player,trigger.source,player)< + get.damageEffect(trigger.source,trigger.player,player); + var next=player.chooseToDiscard('是否将伤害来源('+get.translation(trigger.source)+ + ')和目标('+get.translation(trigger.player)+')对调?','he'); + next.ai=function(card){ + if(go){ + return 10-get.value(card); + } + return 0; + }; + next.logSkill='yinguo'; + "step 1" + if(result.bool){ + var target=trigger.player; + trigger.player=trigger.source; + trigger.source=target; + trigger.trigger('damageBefore'); + player.addTempSkill('yinguo2',['damageAfter','damageCancelled']); + } + }, + ai:{ + threaten:10, + expose:0.5, + }, + global:'yinguo3' + }, + yinguo2:{}, + yinguo3:{ + ai:{ + effect:{ + target:function(card,player,target){ + if(!get.tag(card,'damage')) return; + if(target.hasSkill('yinguo')) return; + var source=game.findPlayer(function(current){ + return current.hasSkill('yinguo'); + }); + if(source&&source.countCards('he')){ + if(get.attitude(source,player)<0&&get.attitude(source,target)>0){ + return [0,0,0,-1]; + } + } + } + } + } + }, + guiyan:{ + unique:true, + enable:'phaseUse', + usable:1, + intro:{ + content:'濒死时回复一点体力并失去鬼眼' + }, + mark:true, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h'); + }, + content:function(){ + "step 0" + player.chooseCardButton(target,target.getCards('h')).filterButton=function(button){ + return get.suit(button.link)=='club'; + } + "step 1" + if(result.bool){ + player.gain(result.links[0],target); + target.$giveAuto(result.links[0],player); + } + }, + ai:{ + order:11, + result:{ + target:-1, + player:1, + }, + threaten:1.3 + }, + group:['guiyan2'], + }, + guiyan2:{ + trigger:{player:'dying'}, + priority:6, + forced:true, + content:function(){ + player.recover(); + player.removeSkill('guiyan'); + player.removeSkill('guiyan2'); + } + }, + yunshen_old:{ + mod:{ + globalFrom:function(from,to,distance){ + if(!from.getEquip(1)) return distance-1; + }, + globalTo:function(from,to,distance){ + if(!to.getEquip(2)) return distance+1; + } + } + }, + suiyan_old:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return get.type(card)=='basic'; + }, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('e'); + }, + content:function(){ + var num=Math.floor(Math.random()*3); + if(num==0){ + player.draw(); + } + else{ + target.discard(target.getCards('e').sort(lib.sort.random).splice(0,num)); + } + }, + ai:{ + order:7, + result:{ + target:-1, + }, + threaten:1.2 + } + }, + xianyin:{ + enable:'phaseUse', + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countCards('j')&¤t!=player; + }); + }, + content:function(){ + "step 0" + event.targets=game.filterPlayer(function(current){ + return current.countCards('j')&¤t!=player; + }); + event.targets.sort(lib.sort.seat); + "step 1" + if(event.targets.length){ + event.target=event.targets.shift(); + event.target.discard(event.target.getCards('j')); + player.line(event.target,'green'); + } + else{ + event.finish(); + } + "step 2" + if(event.target.countCards('h')){ + event.target.chooseCard('选择一张手牌交给'+get.translation(player),true).ai=function(card){ + return -get.value(card); + } + } + else{ + event.goto(1); + } + "step 3" + if(result.bool){ + player.gain(result.cards[0],target); + target.$give(1,player); + } + event.goto(1); + }, + ai:{ + order:9, + result:{ + player:function(player){ + var num=0,players=game.filterPlayer(); + for(var i=0;i=0&& + get.attitude(players[i],player)>=0){ + num++; + } + else{ + num--; + } + } + } + return num; + } + } + } + }, + mailun:{ + unique:true, + trigger:{player:'phaseBegin'}, + direct:true, + intro:{ + content:function(storage){ + if(!storage) return '无'; + return lib.skill.mailun.effects[storage-1]; + } + }, + effects:[ + '减少一点体力并增加一点体力上限', + '增加一点体力并减少一点体力上限', + '令你即将造成和即将受到的首次伤害-1', + '令你即将造成和即将受到的首次伤害+1', + '少摸一张牌并令手牌上限+1', + '多摸一张牌并令手牌上限-1', + '进攻距离+1,防御距离-1', + '进攻距离-1,防御距离+1' + ], + content:function(){ + "step 0" + player.removeSkill('mailun31'); + player.removeSkill('mailun32'); + player.removeSkill('mailun41'); + player.removeSkill('mailun42'); + player.removeSkill('mailun5'); + player.removeSkill('mailun6'); + player.removeSkill('mailun7'); + player.removeSkill('mailun8'); + if(event.isMine()){ + ui.auto.hide(); + event.dialog=ui.create.dialog('脉轮:选择一个效果'); + var effects=lib.skill.mailun.effects; + var clickItem=function(){ + event.choice=this.link; + game.resume(); + } + for(var i=0;i<8;i++){ + if(i==0&&player.maxHp==6) continue; + var item=event.dialog.add(''); + item.addEventListener('click',clickItem); + item.link=i+1; - } - event.control=ui.create.control('取消',function(){ - event.choice=0; - game.resume(); - }); - event.dialog.add(ui.create.div('.placeholder')); - event.dialog.add(ui.create.div('.placeholder')); - event.dialog.add(ui.create.div('.placeholder')); - game.pause(); - } - else{ - var ctrl; - if(player.hp<=1){ - if(player.maxHp>3){ - ctrl=2; - } - else{ - ctrl=3; - } - } - else if(player.hp==2){ - if(player.maxHp>4){ - ctrl=2; - } - else if(player.countCards('h')==0){ - ctrl=6; - } - else{ - ctrl=3; - } - } - else if(player.countCards('h')player.hp+1){ - ctrl=5; - } - event.choice=ctrl; - } - "step 1" - ui.auto.show(); - player.storage.mailun=event.choice; - game.addVideo('storage',player,['mailun',player.storage.mailun]); - if(event.choice){ - player.logSkill('mailun'); - player.markSkill('mailun'); - switch(event.choice){ - case 1:{ - player.loseHp(); - player.gainMaxHp(); - break; - } - case 2:{ - player.recover(); - player.loseMaxHp(); - break; - } - case 3:{ - player.addSkill('mailun31'); - player.addSkill('mailun32'); - break; - } - case 4:{ - player.addSkill('mailun41'); - player.addSkill('mailun42'); - break; - } - case 5:{ - player.addSkill('mailun5'); - break; - } - case 6:{ - player.addSkill('mailun6'); - break; - } - case 7:{ - player.addSkill('mailun7'); - break; - } - case 8:{ - player.addSkill('mailun8'); - break; - } - } - } - else{ - player.unmarkSkill('mailun'); - } + } + event.control=ui.create.control('取消',function(){ + event.choice=0; + game.resume(); + }); + event.dialog.add(ui.create.div('.placeholder')); + event.dialog.add(ui.create.div('.placeholder')); + event.dialog.add(ui.create.div('.placeholder')); + game.pause(); + } + else{ + var ctrl; + if(player.hp<=1){ + if(player.maxHp>3){ + ctrl=2; + } + else{ + ctrl=3; + } + } + else if(player.hp==2){ + if(player.maxHp>4){ + ctrl=2; + } + else if(player.countCards('h')==0){ + ctrl=6; + } + else{ + ctrl=3; + } + } + else if(player.countCards('h')player.hp+1){ + ctrl=5; + } + event.choice=ctrl; + } + "step 1" + ui.auto.show(); + player.storage.mailun=event.choice; + game.addVideo('storage',player,['mailun',player.storage.mailun]); + if(event.choice){ + player.logSkill('mailun'); + player.markSkill('mailun'); + switch(event.choice){ + case 1:{ + player.loseHp(); + player.gainMaxHp(); + break; + } + case 2:{ + player.recover(); + player.loseMaxHp(); + break; + } + case 3:{ + player.addSkill('mailun31'); + player.addSkill('mailun32'); + break; + } + case 4:{ + player.addSkill('mailun41'); + player.addSkill('mailun42'); + break; + } + case 5:{ + player.addSkill('mailun5'); + break; + } + case 6:{ + player.addSkill('mailun6'); + break; + } + case 7:{ + player.addSkill('mailun7'); + break; + } + case 8:{ + player.addSkill('mailun8'); + break; + } + } + } + else{ + player.unmarkSkill('mailun'); + } - if(event.dialog){ - event.dialog.close(); - } - if(event.control){ - event.control.close(); - } - } - }, - mailun31:{ - trigger:{source:'damageBegin'}, - forced:true, - content:function(){ - trigger.num--; - player.removeSkill('mailun31'); - } - }, - mailun32:{ - trigger:{player:'damageBegin'}, - forced:true, - content:function(){ - trigger.num--; - player.removeSkill('mailun32'); - } - }, - mailun41:{ - trigger:{source:'damageBegin'}, - forced:true, - content:function(){ - trigger.num++; - player.removeSkill('mailun41'); - } - }, - mailun42:{ - trigger:{player:'damageBegin'}, - forced:true, - content:function(){ - trigger.num++; - player.removeSkill('mailun42'); - } - }, - mailun5:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - popup:false, - content:function(){ - trigger.num--; - }, - mod:{ - maxHandcard:function(player,num){ - return num+1; - } - } - }, - mailun6:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - popup:false, - content:function(){ - trigger.num++; - }, - mod:{ - maxHandcard:function(player,num){ - return num-1; - } - } - }, - mailun7:{ - mod:{ - globalFrom:function(from,to,distance){ - return distance-1; - }, - globalTo:function(from,to,distance){ - return distance-1; - } - } - }, - mailun8:{ - mod:{ - globalFrom:function(from,to,distance){ - return distance+1; - }, - globalTo:function(from,to,distance){ - return distance+1; - } - } - }, - fengming:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})>0; - }, - filterCard:{type:'equip'}, - position:'he', - filterTarget:true, - content:function(){ - "step 0" - target.recover(); - "step 1" - target.draw(); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(target.hp0; - }, - filterCard:function(card){ - return get.type(card)=='equip'; - }, - position:'he', - viewAs:{name:'nanman'}, - prompt:'将一张装备牌当南蛮入侵使用', - check:function(card){ - var player=_status.currentPhase; - if(player.countCards('he',{subtype:get.subtype(card)})>1){ - return 11-get.equipValue(card); - } - if(player.countCards('h')0){ - return att+5; - } - return -1; - } - if(player.isTurnedOver()){ - return 5-att; - } - if(att<=-3){ - return -att; - } - return 0; - }; - "step 1" - if(result.bool){ - player.logSkill('huanling',result.targets); - player.turnOver(); - result.targets[0].turnOver(); - } - }, - group:'huanling2', - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='guiyoujie') return [0,2]; - if(target.isTurnedOver()){ - if(get.tag(card,'damage')) return 0; - } - } - }, - expose:0.2 - } - }, - huanling2:{ - trigger:{player:'damageBefore'}, - filter:function(event,player){ - return player.isTurnedOver(); - }, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - }, - ljifeng:{ - mod:{ - selectTarget:function(card,player,range){ - if(card.name=='sha'&&range[1]!=-1) range[1]+=player.maxHp-player.hp; - }, - attackFrom:function(from,to,distance){ - return distance+from.hp-from.maxHp; - } - }, - }, - ljifeng_old:{ - trigger:{player:'phaseUseBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - var check=player.countCards('h')<=player.hp+(player.hp>2?2:1); - player.chooseCardTarget({ - prompt:get.prompt('ljifeng'), - filterCard:lib.filter.cardDiscardable, - filterTarget:function(card,player,target){ - if(player==target) return false; - return player.canUse({name:'sha'},target,false); - }, - selectTarget:[1,2], - ai1:function(card){ - if(!check) return 0; - return 8-get.value(card); - }, - ai2:function(target){ - if(!check) return 0; - return get.effect(target,{name:'sha'},player); - } - }); - "step 1" - if(result.bool){ - player.logSkill('ljifeng',result.targets); - player.discard(result.cards); - player.useCard({name:'sha'},result.targets).animate=false; - trigger.untrigger(); - trigger.finish(); - } - } - }, - lxianglong:{ - trigger:{target:'shaMiss'}, - priority:5, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(function(card,player,target){ - return player.canUse('sha',target); - },get.prompt('lxianglong')).ai=function(target){ - return get.effect(target,{name:'sha'},player,player); - } - "step 1" - if(result.bool){ - player.logSkill('lxianglong',result.targets); - player.useCard({name:'sha'},trigger.cards,result.targets).animate=false; - game.delay(); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(card.name=='sha'&&target.countCards('h')) return 0.7; - } - } - } - }, - zhenjiu:{ - enable:'phaseUse', - usable:1, - filterCard:{color:'red'}, - filterTarget:function(card,player,target){ - return !target.hasSkill('zhenjiu2'); - }, - check:function(card){ - return 8-get.value(card); - }, - discard:false, - prepare:'give', - content:function(){ - target.storage.zhenjiu2=cards[0]; - game.addVideo('storage',target,['zhenjiu2',get.cardInfo(target.storage.zhenjiu2),'card']); - target.addSkill('zhenjiu2'); - }, - ai:{ - result:{ - target:function(player,target){ - if(target.hpplayer.hp) return 0.5; - return 0; - } - }, - order:9, - threaten:1.7 - } - }, - zhenjiu2:{ - trigger:{player:'phaseBegin'}, - forced:true, - mark:'card', - content:function(){ - player.recover(); - player.gain(player.storage.zhenjiu2,'gain2','log'); - player.removeSkill('zhenjiu2'); - delete player.storage.zhenjiu2; - }, - intro:{ - content:'card' - } - }, - shoulie:{ - trigger:{player:'shaBegin'}, - direct:true, - content:function(){ - "step 0" - var dis=trigger.target.countCards('h','shan')||trigger.target.getEquip('bagua')||trigger.target.countCards('h')>2; - var next=player.chooseToDiscard(get.prompt('shoulie',trigger.target)); - next.ai=function(card){ - if(dis) return 7-get.value(card); - return 0; - } - next.logSkill='shoulie'; - "step 1" - if(result.bool){ - trigger.directHit=true; - } - } - }, - hudun:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event,player){ - return !player.hujia&&event.player!=player; - }, - content:function(){ - player.changeHujia(); - player.update(); - }, - }, - toudan:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he',{suit:'spade'}); - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - filterCard:{suit:'spade'}, - check:function(card){ - return 10-get.value(card); - }, - position:'he', - line:'fire', - content:function(){ - "step 0" - target.damage('fire'); - event.targets=game.filterPlayer(function(current){ - return get.distance(target,current)<=1; - }); - event.targets.sortBySeat(event.target); - event.targets.unshift(player); - "step 1" - if(event.targets.length){ - var current=event.targets.shift(); - if(current.countCards('he')){ - current.chooseToDiscard('he',true); - } - event.redo(); - } - }, - ai:{ - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target,'fire'); - } - }, - order:10, - threaten:1.5 - } - }, - shending:{ - inherit:'longfan', - filter:function(event,player){ - return !player.getEquip(5); - }, - ai:{ - order:11, - result:{ - player:1, - }, - effect:{ - target:function(card,player,target){ - if(player!=target) return; - if(get.subtype(card)=='equip5'){ - if(get.equipValue(card)<=7) return 0; - } - } - }, - threaten:1.2 - } - }, - poxiao:{ - mod:{ - attackFrom:function(from,to,distance){ - if(!from.getEquip(1)) return distance-1; - }, - selectTarget:function(card,player,range){ - if(!player.getEquip(1)&&card.name=='sha') range[1]++; - } - }, - enable:'chooseToUse', - filterCard:{type:'equip'}, - filter:function(event,player){ - return player.countCards('he',{type:'equip'}); - }, - position:'he', - viewAs:{name:'sha'}, - prompt:'将一张闪当杀使用或打出', - check:function(card){ - if(get.subtype(card)=='equip1') return 10-get.value(card); - return 7-get.equipValue(card); - }, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.1; - }, - effect:{ - target:function(card,player){ - if(get.subtype(card)=='equip1'){ - var num=0,players=game.filterPlayer(); - for(var i=0;i1) return [0,0,0,0]; - } - } - } - } - } - } - }, - }, - translate:{ - swd_yangshuo:'杨硕', - swd_septem:'赛特', - swd_yuxiaoxue:'于小雪', - swd_lilian:'莉莲', - swd_cheyun:'车芸', - swd_jipeng:'疾鹏', - swd_muyun:'徐暮云', - swd_zhaoyun:'皇甫朝云', - swd_jiliang:'姬良', - swd_lanyin:'兰茵', - swd_zhiyin:'芝茵', - swd_hengai:'横艾', - swd_huzhongxian:'壶中仙', - swd_qiner:'磬儿', - swd_huanyuanzhi:'桓远之', - swd_murongshi:'慕容诗', - swd_hupo:'琥珀', - swd_miles:'麦尔斯', - swd_kangnalishi:'康那里士', - swd_satan:'撒旦', - swd_philis:'菲力斯', - swd_weida:'薇达', - swd_fengtianling:'凤天凌', - swd_huyue:'瑚月', - swd_jiting:'姬亭', - swd_rongshuang:'蓉霜', - swd_zhuoshanzhu:'浊山铸', - swd_jialanduo:'迦兰多', - swd_linming:'林明', - swd_duanmeng:'端蒙', - swd_nicole:'妮可', - swd_kendi:'肯迪', - swd_lijing:'李靖', - swd_hanteng:'韩腾', - swd_yuwentuo:'宇文拓', - swd_shanxiaoxiao:'单小小', - swd_yuchiyanhong:'尉迟嫣红', - swd_pepin:'丕平', - swd_anka:'安卡', - swd_jiangwu:'疆梧', - swd_situqiang:'司徒蔷', - swd_tuwei:'徒维', - swd_yeyaxi:'耶亚希', - swd_chunyuheng:'淳于恒', - swd_duguningke:'独孤宁珂', - swd_duguningke2:'魔化宁珂', - swd_chenjingchou:'陈靖仇', - swd_zhanglie:'张烈', - swd_guyue:'古月圣', - swd_kama:'卡玛', - swd_yuli:'玉澧', - swd_duopeng:'多鹏', - swd_jiangziya:'姜子牙', - swd_heran:'何然', - swd_zhanggao:'张诰', - swd_hanlong:'韩龙', - swd_jiuyou:'久悠', - swd_qingming:'青冥', - swd_shangzhang:'尚章', - swd_youzhao:'游兆', - swd_wangsiyue:'王思月', - swd_huanglei:'黄雷', - swd_tuobayuer:'拓跋玉儿', - swd_tuobayueer:'拓跋月儿', - swd_chengyaojin:'程咬金', - swd_qinshubao:'秦叔宝', - swd_lishimin:'李世民', - swd_shuijing:'水镜', - swd_xuanyuanjianxian:'轩辕剑仙', - swd_xuanyuanjiantong:'轩辕剑童', - swd_luchengxuan:'陆承轩', - swd_xiarou:'夏柔', - swd_moye:'莫耶', - swd_fu:'毛民·福', - swd_hanluo:'寒洛', - swd_linyue:'临月', - swd_zidashu:'子大暑', - swd_maixing:'麦星', - swd_haidapang:'海大胖', - swd_shaowei:'少微', - swd_fuyan:'符验', - swd_huiyan:'慧彦', - swd_sikongyu:'司空宇', - swd_muyue:'沐月', - swd_ziqiao:'子巧', - swd_fengyu:'凤煜', - swd_qi:'柒', - swd_chenfu:'陈辅', - swd_libai:'李白', - swd_xingtian:'刑天', - swd_lanmoshen:'蓝魔神', - swd_wushi:'巫师', - swd_quxian:'屈娴', - swd_xiyan:'犀衍', - swd_shuwaner:'舒莞儿', - swd_xiaohuanglong:'小黄龙', + if(event.dialog){ + event.dialog.close(); + } + if(event.control){ + event.control.close(); + } + } + }, + mailun31:{ + trigger:{source:'damageBegin'}, + forced:true, + content:function(){ + trigger.num--; + player.removeSkill('mailun31'); + } + }, + mailun32:{ + trigger:{player:'damageBegin'}, + forced:true, + content:function(){ + trigger.num--; + player.removeSkill('mailun32'); + } + }, + mailun41:{ + trigger:{source:'damageBegin'}, + forced:true, + content:function(){ + trigger.num++; + player.removeSkill('mailun41'); + } + }, + mailun42:{ + trigger:{player:'damageBegin'}, + forced:true, + content:function(){ + trigger.num++; + player.removeSkill('mailun42'); + } + }, + mailun5:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + popup:false, + content:function(){ + trigger.num--; + }, + mod:{ + maxHandcard:function(player,num){ + return num+1; + } + } + }, + mailun6:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + popup:false, + content:function(){ + trigger.num++; + }, + mod:{ + maxHandcard:function(player,num){ + return num-1; + } + } + }, + mailun7:{ + mod:{ + globalFrom:function(from,to,distance){ + return distance-1; + }, + globalTo:function(from,to,distance){ + return distance-1; + } + } + }, + mailun8:{ + mod:{ + globalFrom:function(from,to,distance){ + return distance+1; + }, + globalTo:function(from,to,distance){ + return distance+1; + } + } + }, + fengming:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})>0; + }, + filterCard:{type:'equip'}, + position:'he', + filterTarget:true, + content:function(){ + "step 0" + target.recover(); + "step 1" + target.draw(); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(target.hp0; + }, + filterCard:function(card){ + return get.type(card)=='equip'; + }, + position:'he', + viewAs:{name:'nanman'}, + prompt:'将一张装备牌当南蛮入侵使用', + check:function(card){ + var player=_status.currentPhase; + if(player.countCards('he',{subtype:get.subtype(card)})>1){ + return 11-get.equipValue(card); + } + if(player.countCards('h')0){ + return att+5; + } + return -1; + } + if(player.isTurnedOver()){ + return 5-att; + } + if(att<=-3){ + return -att; + } + return 0; + }; + "step 1" + if(result.bool){ + player.logSkill('huanling',result.targets); + player.turnOver(); + result.targets[0].turnOver(); + } + }, + group:'huanling2', + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='guiyoujie') return [0,2]; + if(target.isTurnedOver()){ + if(get.tag(card,'damage')) return 0; + } + } + }, + expose:0.2 + } + }, + huanling2:{ + trigger:{player:'damageBefore'}, + filter:function(event,player){ + return player.isTurnedOver(); + }, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + }, + ljifeng:{ + mod:{ + selectTarget:function(card,player,range){ + if(card.name=='sha'&&range[1]!=-1) range[1]+=player.maxHp-player.hp; + }, + attackFrom:function(from,to,distance){ + return distance+from.hp-from.maxHp; + } + }, + }, + ljifeng_old:{ + trigger:{player:'phaseUseBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + var check=player.countCards('h')<=player.hp+(player.hp>2?2:1); + player.chooseCardTarget({ + prompt:get.prompt('ljifeng'), + filterCard:lib.filter.cardDiscardable, + filterTarget:function(card,player,target){ + if(player==target) return false; + return player.canUse({name:'sha'},target,false); + }, + selectTarget:[1,2], + ai1:function(card){ + if(!check) return 0; + return 8-get.value(card); + }, + ai2:function(target){ + if(!check) return 0; + return get.effect(target,{name:'sha'},player); + } + }); + "step 1" + if(result.bool){ + player.logSkill('ljifeng',result.targets); + player.discard(result.cards); + player.useCard({name:'sha'},result.targets).animate=false; + trigger.untrigger(); + trigger.finish(); + } + } + }, + lxianglong:{ + trigger:{target:'shaMiss'}, + priority:5, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(function(card,player,target){ + return player.canUse('sha',target); + },get.prompt('lxianglong')).ai=function(target){ + return get.effect(target,{name:'sha'},player,player); + } + "step 1" + if(result.bool){ + player.logSkill('lxianglong',result.targets); + player.useCard({name:'sha'},trigger.cards,result.targets).animate=false; + game.delay(); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(card.name=='sha'&&target.countCards('h')) return 0.7; + } + } + } + }, + zhenjiu:{ + enable:'phaseUse', + usable:1, + filterCard:{color:'red'}, + filterTarget:function(card,player,target){ + return !target.hasSkill('zhenjiu2'); + }, + check:function(card){ + return 8-get.value(card); + }, + discard:false, + prepare:'give', + content:function(){ + target.storage.zhenjiu2=cards[0]; + game.addVideo('storage',target,['zhenjiu2',get.cardInfo(target.storage.zhenjiu2),'card']); + target.addSkill('zhenjiu2'); + }, + ai:{ + result:{ + target:function(player,target){ + if(target.hpplayer.hp) return 0.5; + return 0; + } + }, + order:9, + threaten:1.7 + } + }, + zhenjiu2:{ + trigger:{player:'phaseBegin'}, + forced:true, + mark:'card', + content:function(){ + player.recover(); + player.gain(player.storage.zhenjiu2,'gain2','log'); + player.removeSkill('zhenjiu2'); + delete player.storage.zhenjiu2; + }, + intro:{ + content:'card' + } + }, + shoulie:{ + trigger:{player:'shaBegin'}, + direct:true, + content:function(){ + "step 0" + var dis=trigger.target.countCards('h','shan')||trigger.target.getEquip('bagua')||trigger.target.countCards('h')>2; + var next=player.chooseToDiscard(get.prompt('shoulie',trigger.target)); + next.ai=function(card){ + if(dis) return 7-get.value(card); + return 0; + } + next.logSkill='shoulie'; + "step 1" + if(result.bool){ + trigger.directHit=true; + } + } + }, + hudun:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return !player.hujia&&event.player!=player; + }, + content:function(){ + player.changeHujia(); + player.update(); + }, + }, + toudan:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he',{suit:'spade'}); + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + filterCard:{suit:'spade'}, + check:function(card){ + return 10-get.value(card); + }, + position:'he', + line:'fire', + content:function(){ + "step 0" + target.damage('fire'); + event.targets=game.filterPlayer(function(current){ + return get.distance(target,current)<=1; + }); + event.targets.sortBySeat(event.target); + event.targets.unshift(player); + "step 1" + if(event.targets.length){ + var current=event.targets.shift(); + if(current.countCards('he')){ + current.chooseToDiscard('he',true); + } + event.redo(); + } + }, + ai:{ + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target,'fire'); + } + }, + order:10, + threaten:1.5 + } + }, + shending:{ + inherit:'longfan', + filter:function(event,player){ + return !player.getEquip(5); + }, + ai:{ + order:11, + result:{ + player:1, + }, + effect:{ + target:function(card,player,target){ + if(player!=target) return; + if(get.subtype(card)=='equip5'){ + if(get.equipValue(card)<=7) return 0; + } + } + }, + threaten:1.2 + } + }, + poxiao:{ + mod:{ + attackFrom:function(from,to,distance){ + if(!from.getEquip(1)) return distance-1; + }, + selectTarget:function(card,player,range){ + if(!player.getEquip(1)&&card.name=='sha') range[1]++; + } + }, + enable:'chooseToUse', + filterCard:{type:'equip'}, + filter:function(event,player){ + return player.countCards('he',{type:'equip'}); + }, + position:'he', + viewAs:{name:'sha'}, + prompt:'将一张闪当杀使用或打出', + check:function(card){ + if(get.subtype(card)=='equip1') return 10-get.value(card); + return 7-get.equipValue(card); + }, + ai:{ + order:function(){ + return get.order({name:'sha'})+0.1; + }, + effect:{ + target:function(card,player){ + if(get.subtype(card)=='equip1'){ + var num=0,players=game.filterPlayer(); + for(var i=0;i1) return [0,0,0,0]; + } + } + } + } + } + } + }, + }, + translate:{ + swd_yangshuo:'杨硕', + swd_septem:'赛特', + swd_yuxiaoxue:'于小雪', + swd_lilian:'莉莲', + swd_cheyun:'车芸', + swd_jipeng:'疾鹏', + swd_muyun:'徐暮云', + swd_zhaoyun:'皇甫朝云', + swd_jiliang:'姬良', + swd_lanyin:'兰茵', + swd_zhiyin:'芝茵', + swd_hengai:'横艾', + swd_huzhongxian:'壶中仙', + swd_qiner:'磬儿', + swd_huanyuanzhi:'桓远之', + swd_murongshi:'慕容诗', + swd_hupo:'琥珀', + swd_miles:'麦尔斯', + swd_kangnalishi:'康那里士', + swd_satan:'撒旦', + swd_philis:'菲力斯', + swd_weida:'薇达', + swd_fengtianling:'凤天凌', + swd_huyue:'瑚月', + swd_jiting:'姬亭', + swd_rongshuang:'蓉霜', + swd_zhuoshanzhu:'浊山铸', + swd_jialanduo:'迦兰多', + swd_linming:'林明', + swd_duanmeng:'端蒙', + swd_nicole:'妮可', + swd_kendi:'肯迪', + swd_lijing:'李靖', + swd_hanteng:'韩腾', + swd_yuwentuo:'宇文拓', + swd_shanxiaoxiao:'单小小', + swd_yuchiyanhong:'尉迟嫣红', + swd_pepin:'丕平', + swd_anka:'安卡', + swd_jiangwu:'疆梧', + swd_situqiang:'司徒蔷', + swd_tuwei:'徒维', + swd_yeyaxi:'耶亚希', + swd_chunyuheng:'淳于恒', + swd_duguningke:'独孤宁珂', + swd_duguningke2:'魔化宁珂', + swd_chenjingchou:'陈靖仇', + swd_zhanglie:'张烈', + swd_guyue:'古月圣', + swd_kama:'卡玛', + swd_yuli:'玉澧', + swd_duopeng:'多鹏', + swd_jiangziya:'姜子牙', + swd_heran:'何然', + swd_zhanggao:'张诰', + swd_hanlong:'韩龙', + swd_jiuyou:'久悠', + swd_qingming:'青冥', + swd_shangzhang:'尚章', + swd_youzhao:'游兆', + swd_wangsiyue:'王思月', + swd_huanglei:'黄雷', + swd_tuobayuer:'拓跋玉儿', + swd_tuobayueer:'拓跋月儿', + swd_chengyaojin:'程咬金', + swd_qinshubao:'秦叔宝', + swd_lishimin:'李世民', + swd_shuijing:'水镜', + swd_xuanyuanjianxian:'轩辕剑仙', + swd_xuanyuanjiantong:'轩辕剑童', + swd_luchengxuan:'陆承轩', + swd_xiarou:'夏柔', + swd_moye:'莫耶', + swd_fu:'毛民·福', + swd_hanluo:'寒洛', + swd_linyue:'临月', + swd_zidashu:'子大暑', + swd_maixing:'麦星', + swd_haidapang:'海大胖', + swd_shaowei:'少微', + swd_fuyan:'符验', + swd_huiyan:'慧彦', + swd_sikongyu:'司空宇', + swd_muyue:'沐月', + swd_ziqiao:'子巧', + swd_fengyu:'凤煜', + swd_qi:'柒', + swd_chenfu:'陈辅', + swd_libai:'李白', + swd_xingtian:'刑天', + swd_lanmoshen:'蓝魔神', + swd_wushi:'巫师', + swd_quxian:'屈娴', + swd_xiyan:'犀衍', + swd_shuwaner:'舒莞儿', + swd_xiaohuanglong:'小黄龙', - juxi:'聚息', - juxi_info:'锁定技,每当一名角色于其回合外弃置牌,你获得一枚聚息标记;出牌阶段限两次,你可以移去X枚聚息标记,然后选择一项:对一名角造成一点伤害,或令一名角色回复一点体力,X为存活角色数', - yeying:'曳影', - yeying_info:'出牌阶段限一次,你可以将一张黑色牌当作乾坤镖使用', - jiefen:'解纷', - jiefen_info:'出牌阶段限一次,你可以令一名手牌数多于你的角色交给你一张牌,然后你交给一名手牌数少于你的角色一张牌', - datong:'大同', - datong_info:'任意一名角色的结束阶段,若全场手牌数最多和最少的角色手牌数之差不超过1(人数不少于7时改为2),你摸两张牌', - huodan:'火丹', - huodan_info:'出牌阶段限一次,你可以弃置一张红色牌并失去一点体力,然后将两点火属性伤害分配给1~2名角色', - huodan_info_alter:'出牌阶段限一次,你可以弃置一张红色牌并失去一点体力,然后将两点火属性伤害分配给1~2名角色;若你只分配了一名角色,该角色在结算后摸一张牌', - sxianjing:'陷阱', - sxianjing_bg:'阱', - sxianjing_info:'出牌阶段,你可以将一张手牌背面朝上置于你的武将牌上(不能与已有花色相同)。当一名其他角色使用与一张“陷阱”牌花色相同的牌指定你为目标时,你移去对应的“陷阱”牌,然后随机获得该角色的一张牌。每当你受到一次伤害,你随机将一张“陷阱”牌返回手牌', - zhanxing:'占星', - zhanxing_info:'出牌阶段限一次,你可以弃置任意张牌,并亮出牌堆顶的等量的牌,并根据亮出的牌包含的花色执行以下效果:♦︎摸两张牌;♥回复一点体力(若未损失体力改为获得一点护甲);♣令所有敌人随机弃置一张牌;♠令一名角色受到一点无来源的雷属性伤害', - kbolan:'博览', - kbolan_info:'每当你摸牌时,你可以额外摸一张牌,然后摸牌结束时将一张手牌置于牌堆顶', - gaizao:'改造', - gaizao_info:'每当你即将装备一张牌(特殊类装备除外),若你的装备区内对应位置已有牌,你可以永久改变此牌的装备类型使其装备在装备区内的空余位置', - lingshi:'灵矢', - lingshi_info:'你的装备区内每有一张牌,你的攻击范围+2;当你的装备区内有武器牌或防具牌时,你的杀不可闪避;当你的装备区内有马时,你摸牌阶段额外摸一张牌;当你的装备内的宝物牌时,你回合内可以额外使用一张杀', - tiebi:'铁壁', - tiebi_info:'当距离你1以内的一名角色成为杀的目标时,若其没有护甲,你可以弃置一张黑色手牌使其获得一点护甲', - shenyan:'神炎', - shenyan_info:'限定技,当你即将造成火焰伤害时,你可以令此伤害+1,并对目标距离1以内的所有其他角色各造成一点火焰伤害', - xuanying:'旋影', - xuanying_info:'你可以横置你的武将牌,视为使用一张无视距离的杀;每当你于回合外失去牌,你可以竖置你的武将牌,视为使用一张无视距离的杀', - hwendao:'问道', - hwendao_info:'每当你于回合外使用或打出一张牌,你可以令当前回合角色弃置一张与之花色相同的牌,否则你获得其一张牌', - lingfeng:'凌锋', - lingfeng_info:'结束阶段,若你本回合内使用了至少X张牌,你可以选择一项:获得一点护甲,或对攻击范围内的一名角色造成一点伤害(X为你当前的体力值且最多为3)', - hxunzhi:'殉志', - hxunzhi_info:'限定技,出牌阶段,你可以视为使用一张万箭齐发并获得技能武圣、咆哮,若如此做,你在此阶段结束时死亡', - hxunzhi_info_alter:'限定技,出牌阶段,你可以获得技能武圣、咆哮,若如此做,你在此阶段结束时死亡', - lmazui:'麻醉', - lmazui2:'麻醉', - lmazui_info:'出牌阶段限一次,你可以将一张黑色手牌置于一名角色的武将牌上,该角色造成的下一次伤害-1,然后获得此牌', - hyunshen:'云身', - hyunshen2:'云身', - hyunshen_info:'每当你打出一张闪,你可以令你的防御距离+1;准备阶段,你将累计的防御距离清零,然后摸等量的牌', - hlingbo:'凌波', - hlingbo_info:'每当你使用或打出一张闪,你可以摸两张牌', - gtiandao:'天道', - gtiandao_info:'任意一名角色的判定生效前,你可以打出一张牌替换之', - nlianji:'连计', - nlianji_info:'出牌阶段限一次,你可以选择一张手牌并指定两名角色进行拼点,拼点赢的角色获得此牌,并对没赢的角色造成一点伤害', - fengze:'风泽', - fengze_info:'出牌阶段限一次,你可以将一张黑色牌当作桃园结义使用', - lingyue:'凌月', - lingyue_info:'每当你使用一张杀,你可以令目标弃置一张牌', - jinlin:'金鳞', - jinlin_info:'限定技,出牌阶段,你可以令任意名角色各获得3点护甲,获得护甲的角色于每个准备阶段失去1点护甲直到首次失去所有护甲或累计以此法失去3点护甲', - huanxia:'幻霞', - huanxia_info:'你可以将一张红色牌当作杀使用,若此杀未造成伤害,你在结束阶段收回此牌', - jingjie:'幻镜', - jingjie_info:'准备阶段,你可以流失一点体力,并', - jingjie_old_info:'限定技,出牌阶段,你可以令所有角色弃置所有牌,然后摸两张牌(不触发任何技能)', - kongmo:'恐魔', - kongmo_info:'锁定技,你使用基本牌或普通锦囊牌后将额外结算一次卡牌效果', - jufu:'巨斧', - jufu_info:'锁定技,当你有武器牌时,杀造成的伤害+1', - huajing:'化精', - huajing_info:'每当你使用锦囊牌造成伤害,可以回复一点体力并摸一张牌', - pingxu:'冯虚', - pingxu_info:'锁定技,当你没有武器牌时,你的进攻距离+1;当你没有防具牌时,你的防御距离+1', - yudun:'愚钝', - yudun_info:'锁定技,你无法使用锦囊牌;你可以将两张锦囊牌当作一张不计入出杀次数的杀使用', - bingfeng:'冰封', - bingfeng2:'冰封', - bingfeng2_info:'不能使用或打出手牌', - bingfeng_info:'限定技,出牌阶段,你可以指定至多三个目标与其一同翻面,且处于翻面状态时不能使用或打出手牌;若如此做,你失去技能玄咒并减少一点体力上限', - guozao:'聒噪', - guozao_info:'锁定技,每当距离你1以内的角色受到一次伤害,若伤害来源不你,你须观看牌堆顶的三张牌,然后指定距离2以内的一名有手牌角色将手牌与这些牌交换', - guozao_info_alter:'锁定技,每当距离你1以内的角色受到一次伤害,若伤害来源不你,你须观看牌堆顶的三张牌,然后指定距离1以内的一名有手牌角色将手牌与这些牌交换', - heihuo:'黑火', - heihuo_info:'出牌阶段,你可以弃置一张装备牌,令你的手牌数加倍;若你的手牌因此达到8张或更多,你立即受到3点火焰伤害且本回合内不能再次发动黑火', - yaotong:'妖瞳', - yaotong1:'妖瞳', - yaotong2:'妖瞳', - yaotong3:'妖瞳', - yaotong4:'妖瞳', - yaotong_info:'当你的手牌数为奇数时,你可以将一张手牌当作杀或闪使用或打出,当你的手牌数为偶数时,你可以将一张手牌当作无懈可击使用', - yaotong_info_alter:'当你的手牌数为奇数时,你可以将一张手牌当作杀使用或打出,当你的手牌数为偶数时,你可以将一张手牌当作无懈可击使用', - pojian:'破茧', - pojian_info:'每当你失去最后一张手牌,可以从牌堆中获得一张装备牌并装备之', - huajin:'化金', - huajin2:'化金', - huajin_info:'出牌阶段限一次,你可以弃置一张牌令你造成的伤害+1,直到你的下一回合开始', - poxiao:'破霄', - poxiao_info:'你可以将一张装备牌当杀使用;当你没有武器牌时,你的攻击范围+1,杀可以额外指定一个目标', - jianji:'箭疾', - jianji_info:'你可以将一张装备牌当杀使用,然后摸一张牌,此杀无视距离和防具,且不计入回合内出杀限制', - yuchen:'浴尘', - yuchen_info:'每当你于回合外使用或打出一张黑色牌,你可以弃置一名角色的一张牌', - huangyu:'凰羽', - huangyu_info:'出牌阶段限一次,你可以将两张红色牌当炽羽袭使用', - bingjian:'冰箭', - bingjian_info:'出牌阶段限一次,你可以弃置一张黑色的杀,令一名有手牌的其他角色展示手牌并弃置其中的所有闪,若其没有闪则受到一点雷电伤害', - rumeng:'入梦', - rumeng_info:'其他角色的出牌阶段前,你可以弃置一张非基本牌,并令其选择一项:弃置一张基本牌,或跳过出牌及弃牌阶段', - lianda:'连打', - lianda_info:'当你使用一杀结算完毕后,可以弃置一张牌视为对目标再使用一张杀', - xianghui:'祥晖', - xianghui_info:'出牌阶段限一次,你可以弃置一张红色手牌,然后令场上体力值最少的角色各回复一点体力', - huiqi:'回气', - huiqi_info:'每当你受到一次伤害,可令一名其他角色摸X张牌,X为你已损失的体力值', - toudan:'投弹', - toudan_info:'出牌阶段限一次,你可以弃置一张黑桃牌对一名其他角色造成一点火焰伤害,然后你与距离该角色1以内的所有角色各弃置一张牌', - shending:'神丁', - shending_info:'锁定技,若你没有宝物牌,视为装备了蓝格怪衣', - hzhenwei:'镇卫', - hzhenwei_info:'当一名其他角色成为杀的目标后,若你在杀的使用者的攻击范围内,你可以弃置一张牌将此杀转移给自己,并在杀结算完毕后摸一张牌', - shoulie:'狩猎', - shoulie_info:'当你使用一张杀指定目标后,可以弃置一张手牌令此杀不可闪避', - hudun:'盾甲', - hudun_bg:'盾', - hudun2:'盾甲', - hudun_info:'锁定技,当你对其他角色造成伤害后,若你没有护甲,你获得一点护甲值', - zhenjiu:'针灸', - zhenjiu2:'针灸', - zhenjiu_info:'出牌阶段限一次,你可以将一张红色手牌置于一名角色的武将牌上,该角色于下一个准备阶段回复一点体力,然后获得此牌', - ljifeng:'疾风', - ljifeng_info:'锁定技,你的攻击范围+X,杀可以额外指定X个目标,X为你已损失的体力值', - lxianglong:'翔龙', - lxianglong_info:'每当你闪避一张杀,你可以视为使用一张杀', - shangxi:'伤袭', - shangxi_info:'准备阶段,你可以弃置一张牌,并对攻击范围内一名体力值不小于你的其他角色造成一点伤害', - fzhenwei:'镇威', - fzhenwei_info:'在你的回合内,你可以将其他角色打出的卡牌交给除该角色外的任意一名角色', - fuyan:'覆岩', - fuyan2:'覆岩', - fuyan_info:'每当你受到一次伤害,可以令一名没有护甲的角色获得一点护甲值', - guaili:'怪力', - guaili_info:'锁定技,你的杀造成的伤害+1,造成伤害后需弃置两张手牌', - pingshen:'凭神', - pingshen2:'凭神', - pingshen_info:'锁定技,受到过你的伤害的角色可在回合内对你发动一次【离魂】(每局限发动一次)', - xingzhui:'星坠', - xingzhui_info:'出牌阶段限一次,你可以弃置一张牌,并令一名有牌的其他角色弃置一张类别相同的牌,若则受到一点伤害', - lingxian:'凌仙', - lingxian_info:'每当你于回合外使用或打出一张手牌,你可以选择攻击范围外的一名其他角色与你各摸一张牌', - shouyin:'守印', - shouyin_info:'限定技,当任意一名角色处于濒死状态时,若你的武将牌正朝上,可以将武将牌翻面,然后令场上所有存活角色将体力回复至体力上限', - shouyin_info_alter:'限定技,当任意一名角色处于濒死状态时,若你的武将牌正朝上,可以将武将牌翻面,然后令场上所有存活角色回复两点体力', - bofeng:'搏风', - bofeng_info:'锁定技,体力值不大于你的角色视为在你的攻击范围;当你使用杀指定目标时,可令目标额外打出一张闪,否则此杀不可闪避且造成的伤害+1', - hutian:'护天', - hutian2:'护天', - hutian3:'护天', - hutian_info:'结束阶段,你可以将任意张牌置于一名角色的武将牌上,则该角色的体力值始终不能小于“护天”牌数;在你的下一个结束阶段,该角色获得武将牌上的“护天”牌(在此回合不能再次发动)', - linyun:'凌云', - linyun_info:'你可以将两张牌当作杀使用,此杀需要额外一张闪才能闪避', - sliufeng:'流风', - sliufeng_info:'锁定技,体力值不大于你的角色视为在你的攻击范围', - chengjian:'承剑', - chengjian_info:'每当其他角色使用杀造成一次伤害,你可以令其摸一张牌', - huanling:'幻灵', - huanling2:'幻灵', - huanling_info:'结束阶段,你可以选择一名角色与你同时翻面;翻面状态下,你防止一切伤害', - xiaozhan:'消战', - xiaozhan_info:'其他角色使用杀时,若你不是杀的目标,可以弃置一张杀取消之', - xielei:'挟雷', - xielei_info:'每当你使用或打出一张杀,可以弃置一张牌并对目标以外的一名角色造成一点雷电伤害', - dangping:'荡平', - dangping_info:'每当你造成一次伤害,可以弃置一张手牌对其距离1以内的另一名角色造成一点伤害,每回合限一次', - guisi:'归思', - guisi_info:'每当你成为杀的目标,你可以交给对方一张手牌并取消之', - duishi:'对诗', - duishi_info:'出牌阶段,你可以弃置一张手牌,并指定一名有手牌的角色选择一项:1)弃置一张与之花色相同的手牌,本回合内对诗不能再次指定其为目标,2)令你获得其一张牌,对诗失效直到回合结束', - anlianying:'连营', - anlianying_info:'每当你失去最后一张手牌,可摸两张牌', - lianwu:'连舞', - lianwu_info:'锁定技,你的杀可以额外指定一个目标,你的红杀不可被闪避', - jiying:'疾鹰', - jiying_info:'锁定技,你使用杀无视距离', - daofa:'道法', - daofa_info:'每当有一名其他角色造成伤害,你可以令其弃置一张牌', - xiaomoyu:'魔愈', - xiaomoyu_info:'锁定技,每当你于一个回合内首次造成伤害,你回复一点体力,若你没有受伤,则改为摸一张牌', - yihua:'移花', - yihua_info:'每当你成为其他角色的某张卡牌的惟一目标时,你可以弃置两张手牌,将使用者与目标对调', - youyin:'游吟', - youyin_info:'每当有其他角色弃置卡牌时,若其中有非基本牌且你的手牌数不超过5,你可以摸一张牌', - rexue:'热血', - rexue_info:'任意一名角色的准备阶段,你可以对其使用一张杀,然后摸一张牌', - huopu:'火瀑', - huopu_info:'出牌阶段限一次,你可以将一张红桃牌当作流星火羽使用', - benlei:'奔雷', - benlei2:'奔雷', - benlei_info:'你可以将三张牌当惊雷闪使用;每当你造成一次雷属性伤害,你回复一点体力', - lingwu:'灵舞', - lingwu_info:'回合结束后,若你在本回合内使用的牌数不少于当前体力值,你可以进行一个额外的回合(不可重复发动)', - miejing:'灭境', - miejing_info:'限制技,你可以弃置所有黑色牌,然后令所有其他角色受到一点雷电伤害', - lingxin:'灵心', - lingxin_info:'结束阶段,你可以亮出牌堆顶的三张牌,然后获得其中的红桃牌', - fushen:'附身', - fushen_info:'回合开始前,你可以将自己移出游戏,并代替另一名角色进行一回合,然后流失一点体力', - fushen2:'附身', - wangchen:'忘尘', - wangchen_info:'若你于弃牌阶段弃置了基本牌,可令一名角色翻面', - wangchen_info_alter:'若你于弃牌阶段弃置了基本牌,可令一名角色失去一点体力', - guiyin:'归隐', - guiyin_info:'若你于弃牌阶段弃置了至少两张牌,你可以摸两张牌', - shejie:'设界', - shejie2:'设界', - shejie_info:'每当你受到一次伤害,可以令伤害来源不能使用或打出其手牌,直到其下一回合开始', - shejie2_info:'不能使用或打出手牌,直到下一回合开始', - yinyue:'引月', - yinyue_info:'每当有一名角色回复一次体力,你可以令其摸一张牌,若你的手牌数不大于该角色,你也摸一张牌', - yinyue_info_alter:'每当有一名角色回复一次体力,你可以令其摸一张牌', - mohua2:'魔化', - mohua2_info:'锁定技,当你进入濒死状态时,你立即变身为撒旦,将体力回复至2,然后摸两张牌', - liexin:'裂心', - liexin_info:'每当你即将造成伤害,你可以弃置一张牌令伤害+1', - swdxueyi:'血裔', - swdxueyi_info:'锁定技,你摸牌阶段额外摸X张牌,X为你已损失的体力值', - moyan:'血焰', - moyan_info:'出牌阶段,你可以弃置X张红色手牌,然后对至多X名角色各造成一点火焰伤害,X为你已损失的体力值。每阶段限一次', - aojian:'傲剑', - aojian_info:'出牌阶段,你可以弃置X张手牌,然后对攻击范围内至多X名角色各造成一点伤害,X为你已损失的体力值。每阶段限一次', - milesxiehun:'邪魂', - milesxiehun_info:'锁定技,出牌阶段结束后,你令随机X名角色各弃置一张牌,X为你已损失的体力值且至少为1 ', - liaochen:'撩尘', - liaochen_info:'锁定技,出牌阶段结束后,所有角色需弃置一张牌', - yinmo:'引魔', - yinmo_info:'锁定技,当你对场上所有角色发动「连计」后,你立即变身为魔化宁珂,然后对所有其他角色造成一点雷电伤害', - huanxing:'幻形', - huanxing2:'幻形', - huanxing_info:'准备阶段,你可以弃置一张牌并选择一名男性角色,获得其所有技能,直到你首次受到伤害', - meihuo:'魅惑', - meihuo_info:'每当你失去最后一张装备牌,你可以获得一名其他角色的一张牌,若此牌来自装备区,你立即装备之', + juxi:'聚息', + juxi_info:'锁定技,每当一名角色于其回合外弃置牌,你获得一枚聚息标记;出牌阶段限两次,你可以移去X枚聚息标记,然后选择一项:对一名角造成一点伤害,或令一名角色回复一点体力,X为存活角色数', + yeying:'曳影', + yeying_info:'出牌阶段限一次,你可以将一张黑色牌当作乾坤镖使用', + jiefen:'解纷', + jiefen_info:'出牌阶段限一次,你可以令一名手牌数多于你的角色交给你一张牌,然后你交给一名手牌数少于你的角色一张牌', + datong:'大同', + datong_info:'任意一名角色的结束阶段,若全场手牌数最多和最少的角色手牌数之差不超过1(人数不少于7时改为2),你摸两张牌', + huodan:'火丹', + huodan_info:'出牌阶段限一次,你可以弃置一张红色牌并失去一点体力,然后将两点火属性伤害分配给1~2名角色', + huodan_info_alter:'出牌阶段限一次,你可以弃置一张红色牌并失去一点体力,然后将两点火属性伤害分配给1~2名角色;若你只分配了一名角色,该角色在结算后摸一张牌', + sxianjing:'陷阱', + sxianjing_bg:'阱', + sxianjing_info:'出牌阶段,你可以将一张手牌背面朝上置于你的武将牌上(不能与已有花色相同)。当一名其他角色使用与一张“陷阱”牌花色相同的牌指定你为目标时,你移去对应的“陷阱”牌,然后随机获得该角色的一张牌。每当你受到一次伤害,你随机将一张“陷阱”牌返回手牌', + zhanxing:'占星', + zhanxing_info:'出牌阶段限一次,你可以弃置任意张牌,并亮出牌堆顶的等量的牌,并根据亮出的牌包含的花色执行以下效果:♦︎摸两张牌;♥回复一点体力(若未损失体力改为获得一点护甲);♣令所有敌人随机弃置一张牌;♠令一名角色受到一点无来源的雷属性伤害', + kbolan:'博览', + kbolan_info:'每当你摸牌时,你可以额外摸一张牌,然后摸牌结束时将一张手牌置于牌堆顶', + gaizao:'改造', + gaizao_info:'每当你即将装备一张牌(特殊类装备除外),若你的装备区内对应位置已有牌,你可以永久改变此牌的装备类型使其装备在装备区内的空余位置', + lingshi:'灵矢', + lingshi_info:'你的装备区内每有一张牌,你的攻击范围+2;当你的装备区内有武器牌或防具牌时,你的杀不可闪避;当你的装备区内有马时,你摸牌阶段额外摸一张牌;当你的装备内的宝物牌时,你回合内可以额外使用一张杀', + tiebi:'铁壁', + tiebi_info:'当距离你1以内的一名角色成为杀的目标时,若其没有护甲,你可以弃置一张黑色手牌使其获得一点护甲', + shenyan:'神炎', + shenyan_info:'限定技,当你即将造成火焰伤害时,你可以令此伤害+1,并对目标距离1以内的所有其他角色各造成一点火焰伤害', + xuanying:'旋影', + xuanying_info:'你可以横置你的武将牌,视为使用一张无视距离的杀;每当你于回合外失去牌,你可以竖置你的武将牌,视为使用一张无视距离的杀', + hwendao:'问道', + hwendao_info:'每当你于回合外使用或打出一张牌,你可以令当前回合角色弃置一张与之花色相同的牌,否则你获得其一张牌', + lingfeng:'凌锋', + lingfeng_info:'结束阶段,若你本回合内使用了至少X张牌,你可以选择一项:获得一点护甲,或对攻击范围内的一名角色造成一点伤害(X为你当前的体力值且最多为3)', + hxunzhi:'殉志', + hxunzhi_info:'限定技,出牌阶段,你可以视为使用一张万箭齐发并获得技能武圣、咆哮,若如此做,你在此阶段结束时死亡', + hxunzhi_info_alter:'限定技,出牌阶段,你可以获得技能武圣、咆哮,若如此做,你在此阶段结束时死亡', + lmazui:'麻醉', + lmazui2:'麻醉', + lmazui_info:'出牌阶段限一次,你可以将一张黑色手牌置于一名角色的武将牌上,该角色造成的下一次伤害-1,然后获得此牌', + hyunshen:'云身', + hyunshen2:'云身', + hyunshen_info:'每当你打出一张闪,你可以令你的防御距离+1;准备阶段,你将累计的防御距离清零,然后摸等量的牌', + hlingbo:'凌波', + hlingbo_info:'每当你使用或打出一张闪,你可以摸两张牌', + gtiandao:'天道', + gtiandao_info:'任意一名角色的判定生效前,你可以打出一张牌替换之', + nlianji:'连计', + nlianji_info:'出牌阶段限一次,你可以选择一张手牌并指定两名角色进行拼点,拼点赢的角色获得此牌,并对没赢的角色造成一点伤害', + fengze:'风泽', + fengze_info:'出牌阶段限一次,你可以将一张黑色牌当作桃园结义使用', + lingyue:'凌月', + lingyue_info:'每当你使用一张杀,你可以令目标弃置一张牌', + jinlin:'金鳞', + jinlin_info:'限定技,出牌阶段,你可以令任意名角色各获得3点护甲,获得护甲的角色于每个准备阶段失去1点护甲直到首次失去所有护甲或累计以此法失去3点护甲', + huanxia:'幻霞', + huanxia_info:'你可以将一张红色牌当作杀使用,若此杀未造成伤害,你在结束阶段收回此牌', + jingjie:'幻镜', + jingjie_info:'准备阶段,你可以流失一点体力,并', + jingjie_old_info:'限定技,出牌阶段,你可以令所有角色弃置所有牌,然后摸两张牌(不触发任何技能)', + kongmo:'恐魔', + kongmo_info:'锁定技,你使用基本牌或普通锦囊牌后将额外结算一次卡牌效果', + jufu:'巨斧', + jufu_info:'锁定技,当你有武器牌时,杀造成的伤害+1', + huajing:'化精', + huajing_info:'每当你使用锦囊牌造成伤害,可以回复一点体力并摸一张牌', + pingxu:'冯虚', + pingxu_info:'锁定技,当你没有武器牌时,你的进攻距离+1;当你没有防具牌时,你的防御距离+1', + yudun:'愚钝', + yudun_info:'锁定技,你无法使用锦囊牌;你可以将两张锦囊牌当作一张不计入出杀次数的杀使用', + bingfeng:'冰封', + bingfeng2:'冰封', + bingfeng2_info:'不能使用或打出手牌', + bingfeng_info:'限定技,出牌阶段,你可以指定至多三个目标与其一同翻面,且处于翻面状态时不能使用或打出手牌;若如此做,你失去技能玄咒并减少一点体力上限', + guozao:'聒噪', + guozao_info:'锁定技,每当距离你1以内的角色受到一次伤害,若伤害来源不你,你须观看牌堆顶的三张牌,然后指定距离2以内的一名有手牌角色将手牌与这些牌交换', + guozao_info_alter:'锁定技,每当距离你1以内的角色受到一次伤害,若伤害来源不你,你须观看牌堆顶的三张牌,然后指定距离1以内的一名有手牌角色将手牌与这些牌交换', + heihuo:'黑火', + heihuo_info:'出牌阶段,你可以弃置一张装备牌,令你的手牌数加倍;若你的手牌因此达到8张或更多,你立即受到3点火焰伤害且本回合内不能再次发动黑火', + yaotong:'妖瞳', + yaotong1:'妖瞳', + yaotong2:'妖瞳', + yaotong3:'妖瞳', + yaotong4:'妖瞳', + yaotong_info:'当你的手牌数为奇数时,你可以将一张手牌当作杀或闪使用或打出,当你的手牌数为偶数时,你可以将一张手牌当作无懈可击使用', + yaotong_info_alter:'当你的手牌数为奇数时,你可以将一张手牌当作杀使用或打出,当你的手牌数为偶数时,你可以将一张手牌当作无懈可击使用', + pojian:'破茧', + pojian_info:'每当你失去最后一张手牌,可以从牌堆中获得一张装备牌并装备之', + huajin:'化金', + huajin2:'化金', + huajin_info:'出牌阶段限一次,你可以弃置一张牌令你造成的伤害+1,直到你的下一回合开始', + poxiao:'破霄', + poxiao_info:'你可以将一张装备牌当杀使用;当你没有武器牌时,你的攻击范围+1,杀可以额外指定一个目标', + jianji:'箭疾', + jianji_info:'你可以将一张装备牌当杀使用,然后摸一张牌,此杀无视距离和防具,且不计入回合内出杀限制', + yuchen:'浴尘', + yuchen_info:'每当你于回合外使用或打出一张黑色牌,你可以弃置一名角色的一张牌', + huangyu:'凰羽', + huangyu_info:'出牌阶段限一次,你可以将两张红色牌当炽羽袭使用', + bingjian:'冰箭', + bingjian_info:'出牌阶段限一次,你可以弃置一张黑色的杀,令一名有手牌的其他角色展示手牌并弃置其中的所有闪,若其没有闪则受到一点雷电伤害', + rumeng:'入梦', + rumeng_info:'其他角色的出牌阶段前,你可以弃置一张非基本牌,并令其选择一项:弃置一张基本牌,或跳过出牌及弃牌阶段', + lianda:'连打', + lianda_info:'当你使用一杀结算完毕后,可以弃置一张牌视为对目标再使用一张杀', + xianghui:'祥晖', + xianghui_info:'出牌阶段限一次,你可以弃置一张红色手牌,然后令场上体力值最少的角色各回复一点体力', + huiqi:'回气', + huiqi_info:'每当你受到一次伤害,可令一名其他角色摸X张牌,X为你已损失的体力值', + toudan:'投弹', + toudan_info:'出牌阶段限一次,你可以弃置一张黑桃牌对一名其他角色造成一点火焰伤害,然后你与距离该角色1以内的所有角色各弃置一张牌', + shending:'神丁', + shending_info:'锁定技,若你没有宝物牌,视为装备了蓝格怪衣', + hzhenwei:'镇卫', + hzhenwei_info:'当一名其他角色成为杀的目标后,若你在杀的使用者的攻击范围内,你可以弃置一张牌将此杀转移给自己,并在杀结算完毕后摸一张牌', + shoulie:'狩猎', + shoulie_info:'当你使用一张杀指定目标后,可以弃置一张手牌令此杀不可闪避', + hudun:'盾甲', + hudun_bg:'盾', + hudun2:'盾甲', + hudun_info:'锁定技,当你对其他角色造成伤害后,若你没有护甲,你获得一点护甲值', + zhenjiu:'针灸', + zhenjiu2:'针灸', + zhenjiu_info:'出牌阶段限一次,你可以将一张红色手牌置于一名角色的武将牌上,该角色于下一个准备阶段回复一点体力,然后获得此牌', + ljifeng:'疾风', + ljifeng_info:'锁定技,你的攻击范围+X,杀可以额外指定X个目标,X为你已损失的体力值', + lxianglong:'翔龙', + lxianglong_info:'每当你闪避一张杀,你可以视为使用一张杀', + shangxi:'伤袭', + shangxi_info:'准备阶段,你可以弃置一张牌,并对攻击范围内一名体力值不小于你的其他角色造成一点伤害', + fzhenwei:'镇威', + fzhenwei_info:'在你的回合内,你可以将其他角色打出的卡牌交给除该角色外的任意一名角色', + fuyan:'覆岩', + fuyan2:'覆岩', + fuyan_info:'每当你受到一次伤害,可以令一名没有护甲的角色获得一点护甲值', + guaili:'怪力', + guaili_info:'锁定技,你的杀造成的伤害+1,造成伤害后需弃置两张手牌', + pingshen:'凭神', + pingshen2:'凭神', + pingshen_info:'锁定技,受到过你的伤害的角色可在回合内对你发动一次【离魂】(每局限发动一次)', + xingzhui:'星坠', + xingzhui_info:'出牌阶段限一次,你可以弃置一张牌,并令一名有牌的其他角色弃置一张类别相同的牌,若则受到一点伤害', + lingxian:'凌仙', + lingxian_info:'每当你于回合外使用或打出一张手牌,你可以选择攻击范围外的一名其他角色与你各摸一张牌', + shouyin:'守印', + shouyin_info:'限定技,当任意一名角色处于濒死状态时,若你的武将牌正朝上,可以将武将牌翻面,然后令场上所有存活角色将体力回复至体力上限', + shouyin_info_alter:'限定技,当任意一名角色处于濒死状态时,若你的武将牌正朝上,可以将武将牌翻面,然后令场上所有存活角色回复两点体力', + bofeng:'搏风', + bofeng_info:'锁定技,体力值不大于你的角色视为在你的攻击范围;当你使用杀指定目标时,可令目标额外打出一张闪,否则此杀不可闪避且造成的伤害+1', + hutian:'护天', + hutian2:'护天', + hutian3:'护天', + hutian_info:'结束阶段,你可以将任意张牌置于一名角色的武将牌上,则该角色的体力值始终不能小于“护天”牌数;在你的下一个结束阶段,该角色获得武将牌上的“护天”牌(在此回合不能再次发动)', + linyun:'凌云', + linyun_info:'你可以将两张牌当作杀使用,此杀需要额外一张闪才能闪避', + sliufeng:'流风', + sliufeng_info:'锁定技,体力值不大于你的角色视为在你的攻击范围', + chengjian:'承剑', + chengjian_info:'每当其他角色使用杀造成一次伤害,你可以令其摸一张牌', + huanling:'幻灵', + huanling2:'幻灵', + huanling_info:'结束阶段,你可以选择一名角色与你同时翻面;翻面状态下,你防止一切伤害', + xiaozhan:'消战', + xiaozhan_info:'其他角色使用杀时,若你不是杀的目标,可以弃置一张杀取消之', + xielei:'挟雷', + xielei_info:'每当你使用或打出一张杀,可以弃置一张牌并对目标以外的一名角色造成一点雷电伤害', + dangping:'荡平', + dangping_info:'每当你造成一次伤害,可以弃置一张手牌对其距离1以内的另一名角色造成一点伤害,每回合限一次', + guisi:'归思', + guisi_info:'每当你成为杀的目标,你可以交给对方一张手牌并取消之', + duishi:'对诗', + duishi_info:'出牌阶段,你可以弃置一张手牌,并指定一名有手牌的角色选择一项:1)弃置一张与之花色相同的手牌,本回合内对诗不能再次指定其为目标,2)令你获得其一张牌,对诗失效直到回合结束', + anlianying:'连营', + anlianying_info:'每当你失去最后一张手牌,可摸两张牌', + lianwu:'连舞', + lianwu_info:'锁定技,你的杀可以额外指定一个目标,你的红杀不可被闪避', + jiying:'疾鹰', + jiying_info:'锁定技,你使用杀无视距离', + daofa:'道法', + daofa_info:'每当有一名其他角色造成伤害,你可以令其弃置一张牌', + xiaomoyu:'魔愈', + xiaomoyu_info:'锁定技,每当你于一个回合内首次造成伤害,你回复一点体力,若你没有受伤,则改为摸一张牌', + yihua:'移花', + yihua_info:'每当你成为其他角色的某张卡牌的惟一目标时,你可以弃置两张手牌,将使用者与目标对调', + youyin:'游吟', + youyin_info:'每当有其他角色弃置卡牌时,若其中有非基本牌且你的手牌数不超过5,你可以摸一张牌', + rexue:'热血', + rexue_info:'任意一名角色的准备阶段,你可以对其使用一张杀,然后摸一张牌', + huopu:'火瀑', + huopu_info:'出牌阶段限一次,你可以将一张红桃牌当作流星火羽使用', + benlei:'奔雷', + benlei2:'奔雷', + benlei_info:'你可以将三张牌当惊雷闪使用;每当你造成一次雷属性伤害,你回复一点体力', + lingwu:'灵舞', + lingwu_info:'回合结束后,若你在本回合内使用的牌数不少于当前体力值,你可以进行一个额外的回合(不可重复发动)', + miejing:'灭境', + miejing_info:'限制技,你可以弃置所有黑色牌,然后令所有其他角色受到一点雷电伤害', + lingxin:'灵心', + lingxin_info:'结束阶段,你可以亮出牌堆顶的三张牌,然后获得其中的红桃牌', + fushen:'附身', + fushen_info:'回合开始前,你可以将自己移出游戏,并代替另一名角色进行一回合,然后流失一点体力', + fushen2:'附身', + wangchen:'忘尘', + wangchen_info:'若你于弃牌阶段弃置了基本牌,可令一名角色翻面', + wangchen_info_alter:'若你于弃牌阶段弃置了基本牌,可令一名角色失去一点体力', + guiyin:'归隐', + guiyin_info:'若你于弃牌阶段弃置了至少两张牌,你可以摸两张牌', + shejie:'设界', + shejie2:'设界', + shejie_info:'每当你受到一次伤害,可以令伤害来源不能使用或打出其手牌,直到其下一回合开始', + shejie2_info:'不能使用或打出手牌,直到下一回合开始', + yinyue:'引月', + yinyue_info:'每当有一名角色回复一次体力,你可以令其摸一张牌,若你的手牌数不大于该角色,你也摸一张牌', + yinyue_info_alter:'每当有一名角色回复一次体力,你可以令其摸一张牌', + mohua2:'魔化', + mohua2_info:'锁定技,当你进入濒死状态时,你立即变身为撒旦,将体力回复至2,然后摸两张牌', + liexin:'裂心', + liexin_info:'每当你即将造成伤害,你可以弃置一张牌令伤害+1', + swdxueyi:'血裔', + swdxueyi_info:'锁定技,你摸牌阶段额外摸X张牌,X为你已损失的体力值', + moyan:'血焰', + moyan_info:'出牌阶段,你可以弃置X张红色手牌,然后对至多X名角色各造成一点火焰伤害,X为你已损失的体力值。每阶段限一次', + aojian:'傲剑', + aojian_info:'出牌阶段,你可以弃置X张手牌,然后对攻击范围内至多X名角色各造成一点伤害,X为你已损失的体力值。每阶段限一次', + milesxiehun:'邪魂', + milesxiehun_info:'锁定技,出牌阶段结束后,你令随机X名角色各弃置一张牌,X为你已损失的体力值且至少为1 ', + liaochen:'撩尘', + liaochen_info:'锁定技,出牌阶段结束后,所有角色需弃置一张牌', + yinmo:'引魔', + yinmo_info:'锁定技,当你对场上所有角色发动「连计」后,你立即变身为魔化宁珂,然后对所有其他角色造成一点雷电伤害', + huanxing:'幻形', + huanxing2:'幻形', + huanxing_info:'准备阶段,你可以弃置一张牌并选择一名男性角色,获得其所有技能,直到你首次受到伤害', + meihuo:'魅惑', + meihuo_info:'每当你失去最后一张装备牌,你可以获得一名其他角色的一张牌,若此牌来自装备区,你立即装备之', - touxi:'偷袭', - touxi_info:'在其他角色的结束阶段,你可以进行一次判定,若结果为黑色,你对其造成一点雷电伤害,且直到下一回合开始不能再次发动偷袭;若结果为红色,对方可以弃置你的一张牌', - touxi_info_alter:'在其他角色的结束阶段,你可以进行一次判定,若结果为黑色,你对其造成一点雷电伤害,且直到下一回合开始不能再次发动偷袭;若结果为红色,对方对你造成一点伤害', - minjing:'明镜', - minjing_info:'若你没有防具牌,你视为装备了光纱天衣', - jqimou:'奇谋', - jqimou_info:'每当你于回合外受到一次伤害,你可以摸一张牌,并可以使用一张牌', - mufeng:'沐风', - mufeng_info:'结束阶段,你可以将手牌数补至体力上限', - mufeng_info_alter:'结束阶段,你可以将手牌数补至当前体力值', - mufeng_old2_info:'在一名角色的结束阶段,若你的手牌数比其少,你可以将手牌补至与该角色相同(最多补至5),每轮限一次', - hjifeng:'祭风', - hjifeng_info:'出牌阶段限一次,若你手牌中没有祭器牌,你可以将一张手牌置于牌堆顶,并根据其花色获得对应祭器:黑桃-青龙之圭;梅花-白兽之琥;方片-朱雀之璋;红桃-玄武之璜', - mufeng_old_info:'锁定技,每当你于回合外失去牌,你的防御距离+1;若防御距离的变化值超过了存活角色数的一半,则降至0', - lexue:'乐学', - lexue_info:'回合内,你随机获得制衡、集智、缔盟、驱虎中的一个技能;回合外,你随机获得遗计、急救、鬼道、反馈中的一个技能', - mingfu:'冥缚', - mingfu_info:'出牌阶段限一次,你可以将一张梅花牌当鬼幽结使用', - chuanyue:'穿月', - chuanyue_info:'出牌阶段限一次,你可以将两张手牌当决斗使用', + touxi:'偷袭', + touxi_info:'在其他角色的结束阶段,你可以进行一次判定,若结果为黑色,你对其造成一点雷电伤害,且直到下一回合开始不能再次发动偷袭;若结果为红色,对方可以弃置你的一张牌', + touxi_info_alter:'在其他角色的结束阶段,你可以进行一次判定,若结果为黑色,你对其造成一点雷电伤害,且直到下一回合开始不能再次发动偷袭;若结果为红色,对方对你造成一点伤害', + minjing:'明镜', + minjing_info:'若你没有防具牌,你视为装备了光纱天衣', + jqimou:'奇谋', + jqimou_info:'每当你于回合外受到一次伤害,你可以摸一张牌,并可以使用一张牌', + mufeng:'沐风', + mufeng_info:'结束阶段,你可以将手牌数补至体力上限', + mufeng_info_alter:'结束阶段,你可以将手牌数补至当前体力值', + mufeng_old2_info:'在一名角色的结束阶段,若你的手牌数比其少,你可以将手牌补至与该角色相同(最多补至5),每轮限一次', + hjifeng:'祭风', + hjifeng_info:'出牌阶段限一次,若你手牌中没有祭器牌,你可以将一张手牌置于牌堆顶,并根据其花色获得对应祭器:黑桃-青龙之圭;梅花-白兽之琥;方片-朱雀之璋;红桃-玄武之璜', + mufeng_old_info:'锁定技,每当你于回合外失去牌,你的防御距离+1;若防御距离的变化值超过了存活角色数的一半,则降至0', + lexue:'乐学', + lexue_info:'回合内,你随机获得制衡、集智、缔盟、驱虎中的一个技能;回合外,你随机获得遗计、急救、鬼道、反馈中的一个技能', + mingfu:'冥缚', + mingfu_info:'出牌阶段限一次,你可以将一张梅花牌当鬼幽结使用', + chuanyue:'穿月', + chuanyue_info:'出牌阶段限一次,你可以将两张手牌当决斗使用', - miedao:'灭道', - miedao1:'灭道', - miedao2:'灭道', - miedao_info:'锁定技,摸牌阶段,你额外摸X张牌;弃牌阶段,你至少须弃X张牌(不足则全弃),X为你已损失的体力值。', + miedao:'灭道', + miedao1:'灭道', + miedao2:'灭道', + miedao_info:'锁定技,摸牌阶段,你额外摸X张牌;弃牌阶段,你至少须弃X张牌(不足则全弃),X为你已损失的体力值。', - senluo:'森罗', - senluo_info:'出牌阶段限一次,若你的手牌数为全场最少或之一,你可以令所有有手牌的其他角色摸一张牌并弃置两张手牌', - polang:'破浪', - polang_info:'每当你造成一次伤害,可以一张对方的装备牌', - jikong:'亟空', - jikong2:'亟空', - jikong_info:'准备阶段,你可以指定一名角色视为对其使用一张雷杀;每当你失去最后一张手牌,你可以指定一名角色视为对其使用一张雷杀(每回合限发动一次)', - jikong_info_alter:'准备阶段,你可以指定一名角色视为对其使用一张雷杀', - xiangu:'仙骨', - xiangu_info:'锁定技,你的手牌上限不会因体力值的减少而减少。', - hujing:'壶境', - hujing_info:'锁定技,准备阶段,若牌堆或弃牌堆中有炼妖壶,你装备之;当你的装备区内有炼妖壶时,你的手牌上限+2', - yiesheng:'回雪', - yiesheng_info:'出牌阶段,你可以弃置任意数量的黑色手牌,然后摸等量的牌。', - huajian:'化剑', - huajian_info:'出牌阶段结束时,你可以将一张牌当作杀对任意一名角色使用', - xuanyuan:'轩辕', - xuanyuan_info:'锁定技,你无视【轩辕剑】的装备条件及流失体力的效果;准备阶段,你可以从场上或弃牌堆中获得【轩辕剑】', - jilve:'极略', - jilve_backup:'极略', - jilve2:'极略', - jilve_info:'出牌阶段,你可以观看牌堆顶的三张牌,然后使用其中的非装备牌。每回合最多发动三次', - jilve_info_alter:'出牌阶段,你可以观看牌堆顶的两张牌,然后使用其中的非装备牌。每回合最多发动三次', - gongshen:'工神', - gongshen_info:'任意一名其他角色使用一张基本牌或锦囊牌指定目标后,你可以弃置一张装备牌令其失效', + senluo:'森罗', + senluo_info:'出牌阶段限一次,若你的手牌数为全场最少或之一,你可以令所有有手牌的其他角色摸一张牌并弃置两张手牌', + polang:'破浪', + polang_info:'每当你造成一次伤害,可以一张对方的装备牌', + jikong:'亟空', + jikong2:'亟空', + jikong_info:'准备阶段,你可以指定一名角色视为对其使用一张雷杀;每当你失去最后一张手牌,你可以指定一名角色视为对其使用一张雷杀(每回合限发动一次)', + jikong_info_alter:'准备阶段,你可以指定一名角色视为对其使用一张雷杀', + xiangu:'仙骨', + xiangu_info:'锁定技,你的手牌上限不会因体力值的减少而减少。', + hujing:'壶境', + hujing_info:'锁定技,准备阶段,若牌堆或弃牌堆中有炼妖壶,你装备之;当你的装备区内有炼妖壶时,你的手牌上限+2', + yiesheng:'回雪', + yiesheng_info:'出牌阶段,你可以弃置任意数量的黑色手牌,然后摸等量的牌。', + huajian:'化剑', + huajian_info:'出牌阶段结束时,你可以将一张牌当作杀对任意一名角色使用', + xuanyuan:'轩辕', + xuanyuan_info:'锁定技,你无视【轩辕剑】的装备条件及流失体力的效果;准备阶段,你可以从场上或弃牌堆中获得【轩辕剑】', + jilve:'极略', + jilve_backup:'极略', + jilve2:'极略', + jilve_info:'出牌阶段,你可以观看牌堆顶的三张牌,然后使用其中的非装备牌。每回合最多发动三次', + jilve_info_alter:'出牌阶段,你可以观看牌堆顶的两张牌,然后使用其中的非装备牌。每回合最多发动三次', + gongshen:'工神', + gongshen_info:'任意一名其他角色使用一张基本牌或锦囊牌指定目标后,你可以弃置一张装备牌令其失效', - liuhong:'流虹', - liuhong_info:'每当你使用一张杀,可以摸一张牌', - poyue:'破月', - poyue_info:'锁定技,你的黑杀无视距离,红色杀不计入回合内的出杀限制且不可闪避', - poyue_info_alter:'锁定技,你的黑杀无视距离,红色杀不可闪避', - mojian:'墨剑', - mojian_info:'每当你使用杀并指定目标后,你可以令其摸一张牌,然后你回复一点体力', - duanyue:'断月', - duanyue_info:'出牌阶段限一次,你可以弃置一张装备牌,对一名其他角色造成一点伤害', - tuzhen:'突阵', - tuzhen_info:'当你造成一次伤害后,你可以弃置对方手牌中的非基本牌', - tuzhen_info_alter:'当你造成一次伤害后,你可以弃置对方手牌中的一张非基本牌', - fengmo:'封魔', - fengmo_info:'出牌阶段限一次,你可以弃置场所有武器牌(至少两张),然后令一名未翻面的角色摸等量的牌并翻面', - pozhou:'破咒', - pozhou_bg:'破', - pozhou2:'破咒', - pozhou_info:'每当你受到一次伤害,你获得一枚破咒标记。出牌阶段,你可以指定任意名其他角色并弃置等量的破咒标记,令目标的非锁定技失效直到其下一回合结束', - xuanzhou:'玄咒', - xuanzhou_info:'出牌阶段限一次,你可以将一张普通锦囊牌当作任意一张延时锦囊,对任意一名角色使用(无视锦囊使用范围限制)', - ningxian:'凝霰', - ningxian_info:'每当你受到一次伤害,你可以弃置任意张黑色牌并选择等量其他角色对其各造成一点伤害', - guanhu:'贯鹄', - guanhu_info:'每当你使用杀造成伤害,你可以弃置对方一张手牌和一张装备牌', - chuanyang:'穿杨', - chuanyang_info:'每当你使用一张杀,若你不在目标的攻击范围,你可以令此杀不可闪避', - fengming:'凤鸣', - fengming_info:'出牌阶段限一次,你可以弃置一张装备牌,令一名角色恢复一点体力并摸一张牌', - duanxing:'锻星', - duanxing_info:'每当你装备一张未强化的装备牌,可以视为一名角色使用一张杀', - wanjun:'万钧', - wanjun_info:'你可以将一张装备牌当作南蛮入侵使用', - dunxing:'遁形', - dunxing_info:'当你成为其他角色卡牌的目标时,你可以弃置一张牌并进行一次判定,若不为红桃,则取消之', - guiying:'鬼影', - guiying_info:'你可以将一张黑色牌当偷梁换柱使用', - shehun:'摄魂', - shehun_info:'出牌阶段限一次,你可以弃置任意张花色不同的牌,另一名其他角色弃置等量的牌,若其弃置的牌中有牌的花色与你弃置的牌相同,你对其造成一点伤害', + liuhong:'流虹', + liuhong_info:'每当你使用一张杀,可以摸一张牌', + poyue:'破月', + poyue_info:'锁定技,你的黑杀无视距离,红色杀不计入回合内的出杀限制且不可闪避', + poyue_info_alter:'锁定技,你的黑杀无视距离,红色杀不可闪避', + mojian:'墨剑', + mojian_info:'每当你使用杀并指定目标后,你可以令其摸一张牌,然后你回复一点体力', + duanyue:'断月', + duanyue_info:'出牌阶段限一次,你可以弃置一张装备牌,对一名其他角色造成一点伤害', + tuzhen:'突阵', + tuzhen_info:'当你造成一次伤害后,你可以弃置对方手牌中的非基本牌', + tuzhen_info_alter:'当你造成一次伤害后,你可以弃置对方手牌中的一张非基本牌', + fengmo:'封魔', + fengmo_info:'出牌阶段限一次,你可以弃置场所有武器牌(至少两张),然后令一名未翻面的角色摸等量的牌并翻面', + pozhou:'破咒', + pozhou_bg:'破', + pozhou2:'破咒', + pozhou_info:'每当你受到一次伤害,你获得一枚破咒标记。出牌阶段,你可以指定任意名其他角色并弃置等量的破咒标记,令目标的非锁定技失效直到其下一回合结束', + xuanzhou:'玄咒', + xuanzhou_info:'出牌阶段限一次,你可以将一张普通锦囊牌当作任意一张延时锦囊,对任意一名角色使用(无视锦囊使用范围限制)', + ningxian:'凝霰', + ningxian_info:'每当你受到一次伤害,你可以弃置任意张黑色牌并选择等量其他角色对其各造成一点伤害', + guanhu:'贯鹄', + guanhu_info:'每当你使用杀造成伤害,你可以弃置对方一张手牌和一张装备牌', + chuanyang:'穿杨', + chuanyang_info:'每当你使用一张杀,若你不在目标的攻击范围,你可以令此杀不可闪避', + fengming:'凤鸣', + fengming_info:'出牌阶段限一次,你可以弃置一张装备牌,令一名角色恢复一点体力并摸一张牌', + duanxing:'锻星', + duanxing_info:'每当你装备一张未强化的装备牌,可以视为一名角色使用一张杀', + wanjun:'万钧', + wanjun_info:'你可以将一张装备牌当作南蛮入侵使用', + dunxing:'遁形', + dunxing_info:'当你成为其他角色卡牌的目标时,你可以弃置一张牌并进行一次判定,若不为红桃,则取消之', + guiying:'鬼影', + guiying_info:'你可以将一张黑色牌当偷梁换柱使用', + shehun:'摄魂', + shehun_info:'出牌阶段限一次,你可以弃置任意张花色不同的牌,另一名其他角色弃置等量的牌,若其弃置的牌中有牌的花色与你弃置的牌相同,你对其造成一点伤害', - zhanlu:'沾露', - luomu:'落木', - jifeng:'魔影', - liaoyuan:'燎原', - huanhun:'唤魂', - daixing:'代形', - yishan:'异闪', - yishan2:'异闪', - swd_wuxie:'无邪', - lqingcheng:'倾城', - xianjiang:'仙匠', - xianjiang3:'仙匠', - shengong:'神工', - ningjian:'凝剑', - ningjian1:'凝剑', - ningjian2:'凝剑', - taixu:'太虚', - duoren:'夺刃', - tanlin:'探麟', - tanlin2:'探麟', - pozhen:'破阵', - yunchou:'运筹', - tianshu:'天书', - tianshu_bg:'书', - tianshu2:'天书', - xingdian:'星点', - luomei:'落梅', - yulin:'玉鳞', - funiao:'符鸟', - xuehuang:'血凰', - xuehuang_bg:'凰', - zhuyu:'朱羽', - ningshuang:'凝霜', - zaowu:'造物', - // shouhua:'收化', - xielv:'谐率', - tianhuo:'天火', - huanyin:'幻音', - tianlun:'天轮', - hlongyin:'龙吟', - lanzhi:'兰芷', - duanyi:'断意', - miesheng:'灭生', - guxing:'孤星', - guxing1:'孤星', - guxing2:'孤星', - poxing:'破星', - mohua:'魔化', - miles_xueyi:'血裔', - wuying:'无影', - xiehun:'邪魂', - xiehun1:'邪魂', - xiehun2:'邪魂', - xiehun3:'邪魂', - jumo:'聚魔', - duijue:'对决', - duijue_bg:'决', - yueren:'月刃', - busi:'不死', - xuying:'虚影', - yinguo:'因果', - guiyan:'鬼眼', - guiyan2:'鬼眼', - swd_xiuluo:'修罗', - suiyan:'碎岩', - suiyan_info:'每当你造成一次伤害,可以弃置一张牌并弃置对方的全部装备牌', - xianyin:'散结', - qiaoxie:'巧械', - qiaoxie2:'巧械', - qiaoxie3:'巧械', - qiaoxie4:'巧械', - mailun:'脉轮', - mailun31:'脉轮', - mailun32:'脉轮', - mailun41:'脉轮', - mailun42:'脉轮', - kunlunjing:'幻镜', - kunlunjing1:'幻镜', - kunlunjing2:'幻镜', - susheng:'苏生', - shengshou:'圣手', - huanjian:'幻箭', - huanjian_info:'出牌阶段,你可以将一张黑色牌当作冰魄针使用', - shengshou_info:'你可以将一张黑色手牌当作草药使用', - susheng_info:'在任意一名角色即将死亡时,你可以弃置一张手牌防止其死亡,并将其体力回复至1,每回合限发动一次', - susheng_info_alter:'在任意一名角色即将死亡时,你可以弃置一张红色手牌防止其死亡,并将其体力回复至1,每回合限发动一次', - zhanlu_info:'出牌阶段限一次,你可以弃置一张黑桃牌令至多3名角色各回复一点体力', - kunlunjing_info:'准备阶段,若你的体力值小于上回合结束时的体力值,你可以将场上所有牌还原到你上一回合结束时的位置', - kunlunjing_info_alter:'准备阶段,若你的体力值小于上回合结束时的体力值,你可以将场上所有牌还原到你上一回合结束时的位置,然后流失一点体力', - swd_xiuluo_info:'准备阶段,你可以弃一张手牌来弃置你判断区里的一张延时类锦囊(必须花色相同)', - xianyin_info:'出牌阶段,你可以令所有判定区内有牌的角色弃置判定区内的牌,然后交给你一张手牌', - qiaoxie_info:'每当你装备一张牌,可摸一张牌;每当你失去一张装备牌(不含替换),你可以弃置其他角色的一张牌', - mailun_info:'准备阶段,你可以选择一个脉轮效果直到下一回合开始', - guiyan_info:'出牌阶段,你可以观看一名角色的手牌,并获得其中一张梅花牌,每阶段限一次。当你首次进入濒死状态时,你须回复一点体力并失去技能鬼眼', - busi_info:'锁定技,当你进入濒死状态时,你进行一次判定,若结果不为黑桃,你将体力回复至1并将武将牌翻至背面', - xuying_info:'锁定技,每当你即将受到伤害,你防止此伤害,若你此时有手牌,你流失一点体力', - yinguo_info:'除你之外的任意一名角色即将受到受到伤害时,若有伤害来源,你可以弃置一张牌将伤害来源和目标对调', - yueren_info:'每当你使用一张杀,可以进行一次判定,若结果为黑色,你弃置目标一张牌,若结果为红色,你将此杀收回,每回合限发动一次', - duijue_info:'限定技,出牌阶段,你可以指定一名非主公的其他角色,你结束出牌阶段,并在回合结束后将所有其他角色移出游戏,然后该角色与你轮流进行回合,直到有一方死亡为止', - wuying_info:'锁定技,你的杀和单体x锦囊目标锁定为范围内的所有角色', - xiehun_info:'锁定技,受到来自你伤害的角色进入混乱状态,行为不受控制,且会攻击队友,直到你的下一回合开始', - jumo_info:'锁定技,结束阶段,你摸X-1张牌,X为未进入混乱状态的角色数与进入混乱状态的角色数之差(若为双将则改为X)', - jifeng_info:'你的杀和单体锦囊可以额外指定任意个目标,若如此做,此卡牌有一定机率失效,指定的目标越多失效的概率越大', - mohua_info:'锁定技,在身份局中,当你进入濒死状态时,你立即变身为撒旦,体力上限变为现存角色数(至少为4),并成为其他所有角色的共同敌人', - miles_xueyi_info:'锁定技,你防止即将受到的伤害,然后流失一点体力', - duanyi_info:'出牌阶段限一次,你可以弃置两张杀,对一名角色造成一点伤害,然后其随机弃置X张牌,X为其已损失的体力值', - duanyi_info_alter:'出牌阶段限一次,你可以弃置两张杀,并对一名角色造成一点伤害', - guxing_info:'出牌阶段,你可以将最后至多X张手牌当杀使用,此杀无视距离且可以指定至多3个目标,每造成一次伤害,你摸一张牌,X为你已损失的体力值且至少为1。', - tianlun_info:'任意一名角色的判定生效前,你可以弃置一张场上角色的判定牌代替之', - hlongyin_info:'出牌阶段,你可以弃置任意张颜色相同且点数不同的牌,并获得逆时针座位距离与卡牌点数相同的角色区域内的一张牌。每阶段限一次', - lanzhi_info:'每当你使用一张梅花牌,你可以令所有体力值不大于你的角色回复一点体力', - lanzhi_old_info:'每当你即将造成伤害,可以防止此伤害,然后摸两张牌。每回合限发动一次。', - tianhuo_info:'出牌阶段,你可以令所有角色弃置其判定区域内的牌,并受到没有来源的等量火焰伤害,每阶段限一次', - huanyin_info:'锁定技,每当你成为其他角色的卡牌的目标时,你进行一次判定,若为黑桃则取消之,若为红桃你摸一张牌', - luomu_info:'锁定技,每当你造成伤害时,受伤害角色随机弃置一张牌', - poxing_info:'锁定技,每当你即将造成伤害,若目标的体力值大于你,你令伤害+1', - liaoyuan_info:'每当你使用一张杀指定目标后,你可以弃置任意张与此杀花色相同的牌,若如此做,目标需额外打出等量的闪,每少打出一张闪,此杀的伤害+1', - liaoyuan_info_alter:'每当你使用一张杀指定目标后,你可以弃置一张与此杀花色相同的牌,若如此做,目标需额外打出一张闪,若目标没打出闪,此杀的伤害+1', - yishan_info:'每当你受到一次伤害,你可以重新获得最近失去的两张牌', - huanhun_info:'当一名角色进入濒死状态时,你可以弃置一张红色牌并令其进行一次判定,若结果为红色,其回复一点体力', - daixing_info:'结束阶段,你可以任意张牌并获得等量的护甲,这些护甲将在你的下个准备阶段消失', - swd_wuxie_info:'锁定技,你不能成为其他角色的延时锦囊的目标', - lqingcheng_info:'结束阶段,你可以进行判定,若为红色则可以继续判定,最多判定3次,判定结束后将判定成功的牌收入手牌', - xianjiang_old_info:'出牌阶段,你可以将一张装备牌永久转化为任意一张其它装备牌,一张牌在一个阶段只能转化一次', - xianjiang_info:'出牌阶段限一次,你可以弃置一张锦囊牌并随机装备一件装备', - xianjiang_info_alter:'出牌阶段限一次,若你装备内没有牌,你可以弃置一张锦囊牌并随机装备一件装备', - shengong_info:'每当你需要打出一张杀或闪时,你可以弃置一名其他角色装备区内的一张武器牌或防具牌,视为打出一张杀或闪,然后该角色摸一张牌,你弃一张牌', - ningjian_info:'你可以将一张红色牌当闪、黑色牌当杀使用或打出', - taixu_info:'限定技,你可以弃置你的所有牌(至少1张),并对一名体力值大于1为其他角色造成X点火焰伤害,X为你已损失的体力值且至少为1', - duoren_info:'每当你闪避一张杀,你可以立即获得来源的武器牌', - tanlin_info:'出牌阶段限一次,你可以与一名其他角色进行拼点,若你赢,你获得对方拼点牌、对该角色使用卡牌无视距离且可以额外使用一张杀直到回合结束,若你没赢,你受到该角色的一点伤害。', - pozhen_info:'每当你受到一次伤害,若你的手牌数大于伤害来源,你可以弃置X张手牌对其造成一点伤害;若你的手牌数小于伤害来源,你可以弃置其X张手牌。X为你与伤害来源的手牌数之差。', - pozhen_info_alter:'每当你受到一次伤害,若你的手牌数小于伤害来源,你可以弃置其X张手牌。X为你与伤害来源的手牌数之差。', - yunchou_info:'出牌阶段限一次,你可以弃置一张手牌,并弃置一名其他角色的一张手牌,若两张牌颜色相同,你摸一张牌,否则对方摸一张牌', - yunchou_info_alter:'出牌阶段限一次,你可以弃置一张非基本手牌,并弃置一名其他角色的一张手牌,若两张牌颜色相同,你摸一张牌,否则对方摸一张牌', - tianshu_old_info:'结束阶段,你可以弃置一张牌并从三名随机武将中选择一个,在2X回合后你将其所有技能加入你的天书列表,X为其技能数;在技能加入天书列表时,或于出牌阶段,你可以装备一项天书列表中的技能', - tianshu_info:'出牌阶段,你可以弃置一张锦囊牌,然后获得一名其他角色的一项技能直到该角色死亡(替换以此法获得的前一个技能)', - zaowu_info:'出牌阶段限一次,你可以将一张黑桃或红桃手牌当作封印之蛋使用', - luomei_info:'每当你使用或打出一张梅花花色的牌,你可以摸一张牌', - xingdian_info:'出牌阶段限一次,你可以弃置一张手牌,然后指定至多两名角色令其各弃置一张牌', - yulin_info:'每当你即将受到伤害,你可以弃置一张装备牌抵消此伤害', - funiao_info:'出牌阶段限一次,你可以将一张手牌交给一名其他角色,然后摸一张牌', - funiao_old_info:'出牌阶段,你可以交给一名角色一张手牌,然后观看其手牌,每个阶段对一名角色只能发动一次', - xuehuang_info:'限定技,出牌阶段,若你没有黑色牌,你可以展示并弃置所有牌,每弃置一张牌视为使用一张火杀,随机指定两名敌人为目标', - zhuyu_info:'每当一名横置的角色即将受到伤害时,你可以弃置一张红色牌令此伤害+1并变为火属性', - ningshuang_info:'每当你成为黑色牌的目标,你可以弃置一张黑色牌将其横置,并摸一张牌,若其已经模置则改为将其翻面', - zaowu_old_info:'出牌阶段,你可以弃置三张不同类型的牌,创造任意两张牌并获得之', - xielv_info:'弃牌阶段结束后,若你的所有手牌(至少两张)颜色均相同,你可以展示所有手牌,然后回复一点体力并弃置场上的所有判定牌', - }, + zhanlu:'沾露', + luomu:'落木', + jifeng:'魔影', + liaoyuan:'燎原', + huanhun:'唤魂', + daixing:'代形', + yishan:'异闪', + yishan2:'异闪', + swd_wuxie:'无邪', + lqingcheng:'倾城', + xianjiang:'仙匠', + xianjiang3:'仙匠', + shengong:'神工', + ningjian:'凝剑', + ningjian1:'凝剑', + ningjian2:'凝剑', + taixu:'太虚', + duoren:'夺刃', + tanlin:'探麟', + tanlin2:'探麟', + pozhen:'破阵', + yunchou:'运筹', + tianshu:'天书', + tianshu_bg:'书', + tianshu2:'天书', + xingdian:'星点', + luomei:'落梅', + yulin:'玉鳞', + funiao:'符鸟', + xuehuang:'血凰', + xuehuang_bg:'凰', + zhuyu:'朱羽', + ningshuang:'凝霜', + zaowu:'造物', + // shouhua:'收化', + xielv:'谐率', + tianhuo:'天火', + huanyin:'幻音', + tianlun:'天轮', + hlongyin:'龙吟', + lanzhi:'兰芷', + duanyi:'断意', + miesheng:'灭生', + guxing:'孤星', + guxing1:'孤星', + guxing2:'孤星', + poxing:'破星', + mohua:'魔化', + miles_xueyi:'血裔', + wuying:'无影', + xiehun:'邪魂', + xiehun1:'邪魂', + xiehun2:'邪魂', + xiehun3:'邪魂', + jumo:'聚魔', + duijue:'对决', + duijue_bg:'决', + yueren:'月刃', + busi:'不死', + xuying:'虚影', + yinguo:'因果', + guiyan:'鬼眼', + guiyan2:'鬼眼', + swd_xiuluo:'修罗', + suiyan:'碎岩', + suiyan_info:'每当你造成一次伤害,可以弃置一张牌并弃置对方的全部装备牌', + xianyin:'散结', + qiaoxie:'巧械', + qiaoxie2:'巧械', + qiaoxie3:'巧械', + qiaoxie4:'巧械', + mailun:'脉轮', + mailun31:'脉轮', + mailun32:'脉轮', + mailun41:'脉轮', + mailun42:'脉轮', + kunlunjing:'幻镜', + kunlunjing1:'幻镜', + kunlunjing2:'幻镜', + susheng:'苏生', + shengshou:'圣手', + huanjian:'幻箭', + huanjian_info:'出牌阶段,你可以将一张黑色牌当作冰魄针使用', + shengshou_info:'你可以将一张黑色手牌当作草药使用', + susheng_info:'在任意一名角色即将死亡时,你可以弃置一张手牌防止其死亡,并将其体力回复至1,每回合限发动一次', + susheng_info_alter:'在任意一名角色即将死亡时,你可以弃置一张红色手牌防止其死亡,并将其体力回复至1,每回合限发动一次', + zhanlu_info:'出牌阶段限一次,你可以弃置一张黑桃牌令至多3名角色各回复一点体力', + kunlunjing_info:'准备阶段,若你的体力值小于上回合结束时的体力值,你可以将场上所有牌还原到你上一回合结束时的位置', + kunlunjing_info_alter:'准备阶段,若你的体力值小于上回合结束时的体力值,你可以将场上所有牌还原到你上一回合结束时的位置,然后流失一点体力', + swd_xiuluo_info:'准备阶段,你可以弃一张手牌来弃置你判断区里的一张延时类锦囊(必须花色相同)', + xianyin_info:'出牌阶段,你可以令所有判定区内有牌的角色弃置判定区内的牌,然后交给你一张手牌', + qiaoxie_info:'每当你装备一张牌,可摸一张牌;每当你失去一张装备牌(不含替换),你可以弃置其他角色的一张牌', + mailun_info:'准备阶段,你可以选择一个脉轮效果直到下一回合开始', + guiyan_info:'出牌阶段,你可以观看一名角色的手牌,并获得其中一张梅花牌,每阶段限一次。当你首次进入濒死状态时,你须回复一点体力并失去技能鬼眼', + busi_info:'锁定技,当你进入濒死状态时,你进行一次判定,若结果不为黑桃,你将体力回复至1并将武将牌翻至背面', + xuying_info:'锁定技,每当你即将受到伤害,你防止此伤害,若你此时有手牌,你流失一点体力', + yinguo_info:'除你之外的任意一名角色即将受到受到伤害时,若有伤害来源,你可以弃置一张牌将伤害来源和目标对调', + yueren_info:'每当你使用一张杀,可以进行一次判定,若结果为黑色,你弃置目标一张牌,若结果为红色,你将此杀收回,每回合限发动一次', + duijue_info:'限定技,出牌阶段,你可以指定一名非主公的其他角色,你结束出牌阶段,并在回合结束后将所有其他角色移出游戏,然后该角色与你轮流进行回合,直到有一方死亡为止', + wuying_info:'锁定技,你的杀和单体x锦囊目标锁定为范围内的所有角色', + xiehun_info:'锁定技,受到来自你伤害的角色进入混乱状态,行为不受控制,且会攻击队友,直到你的下一回合开始', + jumo_info:'锁定技,结束阶段,你摸X-1张牌,X为未进入混乱状态的角色数与进入混乱状态的角色数之差(若为双将则改为X)', + jifeng_info:'你的杀和单体锦囊可以额外指定任意个目标,若如此做,此卡牌有一定机率失效,指定的目标越多失效的概率越大', + mohua_info:'锁定技,在身份局中,当你进入濒死状态时,你立即变身为撒旦,体力上限变为现存角色数(至少为4),并成为其他所有角色的共同敌人', + miles_xueyi_info:'锁定技,你防止即将受到的伤害,然后流失一点体力', + duanyi_info:'出牌阶段限一次,你可以弃置两张杀,对一名角色造成一点伤害,然后其随机弃置X张牌,X为其已损失的体力值', + duanyi_info_alter:'出牌阶段限一次,你可以弃置两张杀,并对一名角色造成一点伤害', + guxing_info:'出牌阶段,你可以将最后至多X张手牌当杀使用,此杀无视距离且可以指定至多3个目标,每造成一次伤害,你摸一张牌,X为你已损失的体力值且至少为1。', + tianlun_info:'任意一名角色的判定生效前,你可以弃置一张场上角色的判定牌代替之', + hlongyin_info:'出牌阶段,你可以弃置任意张颜色相同且点数不同的牌,并获得逆时针座位距离与卡牌点数相同的角色区域内的一张牌。每阶段限一次', + lanzhi_info:'每当你使用一张梅花牌,你可以令所有体力值不大于你的角色回复一点体力', + lanzhi_old_info:'每当你即将造成伤害,可以防止此伤害,然后摸两张牌。每回合限发动一次。', + tianhuo_info:'出牌阶段,你可以令所有角色弃置其判定区域内的牌,并受到没有来源的等量火焰伤害,每阶段限一次', + huanyin_info:'锁定技,每当你成为其他角色的卡牌的目标时,你进行一次判定,若为黑桃则取消之,若为红桃你摸一张牌', + luomu_info:'锁定技,每当你造成伤害时,受伤害角色随机弃置一张牌', + poxing_info:'锁定技,每当你即将造成伤害,若目标的体力值大于你,你令伤害+1', + liaoyuan_info:'每当你使用一张杀指定目标后,你可以弃置任意张与此杀花色相同的牌,若如此做,目标需额外打出等量的闪,每少打出一张闪,此杀的伤害+1', + liaoyuan_info_alter:'每当你使用一张杀指定目标后,你可以弃置一张与此杀花色相同的牌,若如此做,目标需额外打出一张闪,若目标没打出闪,此杀的伤害+1', + yishan_info:'每当你受到一次伤害,你可以重新获得最近失去的两张牌', + huanhun_info:'当一名角色进入濒死状态时,你可以弃置一张红色牌并令其进行一次判定,若结果为红色,其回复一点体力', + daixing_info:'结束阶段,你可以任意张牌并获得等量的护甲,这些护甲将在你的下个准备阶段消失', + swd_wuxie_info:'锁定技,你不能成为其他角色的延时锦囊的目标', + lqingcheng_info:'结束阶段,你可以进行判定,若为红色则可以继续判定,最多判定3次,判定结束后将判定成功的牌收入手牌', + xianjiang_old_info:'出牌阶段,你可以将一张装备牌永久转化为任意一张其它装备牌,一张牌在一个阶段只能转化一次', + xianjiang_info:'出牌阶段限一次,你可以弃置一张锦囊牌并随机装备一件装备', + xianjiang_info_alter:'出牌阶段限一次,若你装备内没有牌,你可以弃置一张锦囊牌并随机装备一件装备', + shengong_info:'每当你需要打出一张杀或闪时,你可以弃置一名其他角色装备区内的一张武器牌或防具牌,视为打出一张杀或闪,然后该角色摸一张牌,你弃一张牌', + ningjian_info:'你可以将一张红色牌当闪、黑色牌当杀使用或打出', + taixu_info:'限定技,你可以弃置你的所有牌(至少1张),并对一名体力值大于1为其他角色造成X点火焰伤害,X为你已损失的体力值且至少为1', + duoren_info:'每当你闪避一张杀,你可以立即获得来源的武器牌', + tanlin_info:'出牌阶段限一次,你可以与一名其他角色进行拼点,若你赢,你获得对方拼点牌、对该角色使用卡牌无视距离且可以额外使用一张杀直到回合结束,若你没赢,你受到该角色的一点伤害。', + pozhen_info:'每当你受到一次伤害,若你的手牌数大于伤害来源,你可以弃置X张手牌对其造成一点伤害;若你的手牌数小于伤害来源,你可以弃置其X张手牌。X为你与伤害来源的手牌数之差。', + pozhen_info_alter:'每当你受到一次伤害,若你的手牌数小于伤害来源,你可以弃置其X张手牌。X为你与伤害来源的手牌数之差。', + yunchou_info:'出牌阶段限一次,你可以弃置一张手牌,并弃置一名其他角色的一张手牌,若两张牌颜色相同,你摸一张牌,否则对方摸一张牌', + yunchou_info_alter:'出牌阶段限一次,你可以弃置一张非基本手牌,并弃置一名其他角色的一张手牌,若两张牌颜色相同,你摸一张牌,否则对方摸一张牌', + tianshu_old_info:'结束阶段,你可以弃置一张牌并从三名随机武将中选择一个,在2X回合后你将其所有技能加入你的天书列表,X为其技能数;在技能加入天书列表时,或于出牌阶段,你可以装备一项天书列表中的技能', + tianshu_info:'出牌阶段,你可以弃置一张锦囊牌,然后获得一名其他角色的一项技能直到该角色死亡(替换以此法获得的前一个技能)', + zaowu_info:'出牌阶段限一次,你可以将一张黑桃或红桃手牌当作封印之蛋使用', + luomei_info:'每当你使用或打出一张梅花花色的牌,你可以摸一张牌', + xingdian_info:'出牌阶段限一次,你可以弃置一张手牌,然后指定至多两名角色令其各弃置一张牌', + yulin_info:'每当你即将受到伤害,你可以弃置一张装备牌抵消此伤害', + funiao_info:'出牌阶段限一次,你可以将一张手牌交给一名其他角色,然后摸一张牌', + funiao_old_info:'出牌阶段,你可以交给一名角色一张手牌,然后观看其手牌,每个阶段对一名角色只能发动一次', + xuehuang_info:'限定技,出牌阶段,若你没有黑色牌,你可以展示并弃置所有牌,每弃置一张牌视为使用一张火杀,随机指定两名敌人为目标', + zhuyu_info:'每当一名横置的角色即将受到伤害时,你可以弃置一张红色牌令此伤害+1并变为火属性', + ningshuang_info:'每当你成为黑色牌的目标,你可以弃置一张黑色牌将其横置,并摸一张牌,若其已经模置则改为将其翻面', + zaowu_old_info:'出牌阶段,你可以弃置三张不同类型的牌,创造任意两张牌并获得之', + xielv_info:'弃牌阶段结束后,若你的所有手牌(至少两张)颜色均相同,你可以展示所有手牌,然后回复一点体力并弃置场上的所有判定牌', + }, + }; }); diff --git a/character/xiake.js b/character/xiake.js index c13bd3be3..a509ed7ab 100644 --- a/character/xiake.js +++ b/character/xiake.js @@ -1,122 +1,130 @@ 'use strict'; -game.import('character',{ - name:'xiake', - character:{ - // xk_dongfangweiming:['male','shu',4,[]], - xk_guyuexuan:['male','qun',4,['rouquan','gzhenji']], - xk_jinji:['male','shu',4,['zhongzhan','lianpo']], - // xk_shenxiangyun:['female','wei',3,['zhenjiu']], - xk_fujianhan:['male','qun',4,['zuijian','zitong']], - }, - skill:{ - zhongzhan:{ - trigger:{source:'damageBegin'}, - logTarget:'player', - check:function(event,player){ - if(get.damageEffect(event.player,player,player)>0&& - get.attitude(player,event.player)<0){ - return player.hp>event.player.hp&&player.hp>=2; - } - return false; - }, - content:function(){ - player.loseHp(); - trigger.num++; - } - }, - rouquan:{ - mod:{ - selectTarget:function(card,player,range){ - if(card.name=='sha'&&!player.getEquip(1)&&range[1]!=-1) range[1]=Infinity; - } - }, - enable:'phaseUse', - position:'e', - filter:function(event,player){ - return player.countCards('e')>0; - }, - filterCard:true, - prompt:'将要重铸的牌置入弃牌堆并摸一张牌', - discard:false, - delay:0.5, - check:function(card,player){ - var val=get.equipValue(card); - var player=_status.event.player; - var cards=player.getCards('h',{subtype:get.subtype(card)}); - for(var i=0;i=val){ - return 1; - } - } - return 0; - }, - prepare:function(cards,player){ - player.$throw(cards,1000); - }, - content:function(){ - "step 0" - player.draw(); - "step 1" - for(var i=0;i0&& + get.attitude(player,event.player)<0){ + return player.hp>event.player.hp&&player.hp>=2; + } + return false; + }, + content:function(){ + player.loseHp(); + trigger.num++; + } + }, + rouquan:{ + mod:{ + selectTarget:function(card,player,range){ + if(card.name=='sha'&&!player.getEquip(1)&&range[1]!=-1) range[1]=Infinity; + } + }, + enable:'phaseUse', + position:'e', + filter:function(event,player){ + return player.countCards('e')>0; + }, + filterCard:true, + prompt:'将要重铸的牌置入弃牌堆并摸一张牌', + discard:false, + delay:0.5, + check:function(card,player){ + var val=get.equipValue(card); + var player=_status.event.player; + var cards=player.getCards('h',{subtype:get.subtype(card)}); + for(var i=0;i=val){ + return 1; + } + } + return 0; + }, + prepare:function(cards,player){ + player.$throw(cards,1000); + }, + content:function(){ + "step 0" + player.draw(); + "step 1" + for(var i=0;i0; - }, - content:function(){ - 'step 0' - event.targets=get.players(lib.sort.seat); - 'step 1' - if(event.targets.length){ - var current=event.targets.shift(); - if(current.isIn()){ - player.line(current,'fire'); - current.damage('fire'); - event.redo(); - } - } - } + characterIntro:{ + pal_lixiaoyao:'一个天资聪颖的乡下客栈店小二,因一壶酒被酒剑仙传授了蜀山仙剑派剑术,在仙灵岛与赵灵儿相遇,自此经历重重磨难成长为一代旷世奇侠。灵儿牺牲以后他悲痛欲绝。后出任蜀山掌门,取道号一贫,从此御剑行遍天下,行侠仗义、斩妖除魔。多年后因魔教之乱,故引咎卸职,成为蜀山七圣之一。而后虽心力交瘁,但仍竭力保护天下苍生。', + pal_zhaoliner:'林青儿与巫王之女,亦是女娲族人。自幼与世隔绝,跟随姥姥隐居仙灵岛修炼,躲避仇人的追杀。难以告人的神秘身世,让她逃不过命运的捉弄,注定在滚滚红尘中历尽千灾万劫。在最终,赵灵儿为了消灭拜月水魔兽,与其同归于尽。但在王小虎、李忆如决战大魔头千叶禅师的结尾,出现了她的声音。', + pal_linyueru:'天资灵秀,聪敏慧黠,情深义重。身为江南武林魁首林家堡之武门千金,与李逍遥不打不相识,并在此后的寻人旅途中相知相恋。在经历过重重艰辛和生离死别后,遥月二人终于携手而共结连理,与高堂娇儿共享天伦。', + + pal_wangxiaohu:'李逍遥的同乡,自小仰慕李逍遥,想要拜在他门下,得知拜师无望之后,遂跟随李大婶学习排云掌法。之后前往杭州拜”三大神铺“之一的”神眼魔刀”盛尊武为师,并习得魔刀刀法。热血少年,敢作敢当,嫉恶如仇,相信人定胜天。他最后发现千叶禅师的阴谋,与众人合力击败千叶禅师。', + pal_sumei:'蛇妖和狐精之女,其父母当年被李逍遥和林月如所杀,因此她一直想要报仇,可以说是为报仇而活着。爱上王小虎,认识李忆如之后,苏媚学会了宽恕,最后甚至为了朋友和爱人牺牲自己。', + pal_shenqishuang:'乳名沈七七,峨嵋山仙霞派掌门清柔师太座下弟子,与四位师姊妹合称“仙霞五奇”,排行第四,个性拘谨温婉,对小虎心怀爱意却不敢开口表达。', + + pal_jingtian:'永安当的小伙计,司“管饰”一职,专门保管当铺收押的首饰珠宝类贵重物品。景天不但有鉴别古董珠宝的天赋,而且对买卖、帐目能很精通,对保管的当品更有过目不忘的本事。每日幻想有朝一日能富甲天下或成为人人景仰的蜀山剑仙。', + pal_xuejian:'出身唐门,虽为大小姐,却备受家族内部排挤欺凌。后离开唐家堡,与景天等人一同浪迹江湖并探寻自己的身世秘密。经历各种事件后,与景天结为连理,并育有一子名为景小楼。', + pal_longkui:'古时的姜国公主,景天前世龙阳的妹妹。因国破家亡而跳入铸剑炉,成为魔剑剑灵。龙葵拥有两种性格形态:蓝色龙葵温柔娴淑,红色龙葵火辣张扬。', + pal_zixuan:'女娲族后裔,饱受情爱煎熬三生三世之苦。在面对为了天下苍生而牺牲生命的女娲族宿命时,她坦然接受,把自己用水灵珠修炼的内丹渡给徐长卿使他成为上仙,最后献出自己的生命封印锁妖塔。', + pal_changqing:'蜀山仙剑派俗家弟子。自幼被蜀山掌门清微收为入室弟子,武学天赋极高。与紫萱相恋三世,最终紫萱为修复锁妖塔而牺牲了自己并把自己用水灵珠修炼的内丹渡给徐长卿,使徐长卿迅速成仙并继任蜀山派第二十三代掌门,最后辞去了掌门职务归隐。', + + pal_nangonghuang:'出生不久后父母被为了追寻记忆而来燎日所误杀,后来被常纪带到蜀山抚养长大,视同己出。从小希望得到尊敬。后来奉蜀山掌门徐长卿之命开启地脉入口,疏通五灵,从而使蜀山"否极泰来"、回复混沌状态。', + pal_wenhui:'爽朗大方,性情如同男子,极富正义感;内心却是天真少女般剔透明净。因为不愿嫁去室韦而逃出家里,后与南宫煌相遇,并随其完成地脉任务。', + pal_wangpengxu:'原形是一只娇小可爱的五毒兽。擅长读心术,可以看透人的心思。多次被南宫煌无意中救下,后跟随其恢复地脉。', + pal_xingxuan:'南宫煌之兄,幼时被燎日带走并由其抚养长大。身体其实是一具尸体(尸体是其父赤炎的),不仅残缺而且带有剧毒。初,灵肉分离,身体毫无感觉,后经重楼相助灵肉合一。为使尸身不坏,使用剧毒保存,故无法进入人界,绝大多数时间身在里蜀山。有领导才能,凭借自身上位者的气质和才干,在里蜀山妖界占据了一定势力。', + pal_leiyuange:'是个来历成谜的木讷男子,擅长使用弩、单手斧,有三只名为风雅颂的怪鸟时常出现在他的头顶代替其言语。生前为室韦族族长,死后尸体被鬼差附身。在胜洲与南宫煌与温慧等人结识,并成为好友。', + + pal_yuntianhe:'自幼孤身一人在黄山青鸾峰长大,从未下过山,对外界事物一无所知。一次偶然的机会与闯入父亲的墓室寻找宝藏的少女韩菱纱相遇。为了更多地了解父亲的过去、也为了成为剑仙,云天河与韩菱纱和柳梦璃一同拜入昆仑琼华派成为门下弟子。下山后云天河虽经历种种,但从未改变过“我命由我不由天”的想法。', + pal_hanlingsha:'背负着家族命运而四处奔走的少女,自称是独行千里的陵墓大盗。年纪不大,却对辨识墓穴位置、破解奇诡机关、地脉风水之学颇有研究。', + pal_liumengli:'妖界婵幽之女,因19年前妖界大战而失散,被云天青行侠救下后送至寿阳城县家抚养。', + pal_murongziying:'昆仑琼华派弟子。很小就被家人送至琼华派修行,天赋极高,在同辈弟子中修为较深,已臻“以气御剑”的境界。性格外冷内热,稳重内敛;看似不易相处,实则是一个恩怨分明、极重情义的热血男儿。', + pal_xuanxiao:'天赋异禀,资质极佳,是万中无一的修仙奇才,和夙玉用双剑束缚幻瞑界吸取灵力并引发琼华派与妖界之战。因夙玉离开昆仑,修炼双剑中断,他被邪火入侵而走火入魔,打伤数名师兄弟,被夙瑶联合青阳、重光与宗炼长老冰封19年,因此逢缘与云天河结拜。', + + // pal_jiangyunfan:'', + // pal_tangyurou:'', + // pal_longyou:'', + // pal_xiaoman:'', + + pal_xiahoujinxuan:'夏侯世家的少主。因不喜舞枪弄剑,专爱趣闻逸史,让父亲深感恨铁不成钢;好在他对于仙术符法也有所涉略,没沦落到手无缚鸡之力的境地。', + pal_muchanglan:'行走江湖买卖消息的佣兵,冷艳霸气,洞察力强。受人雇佣而加入夏侯瑾轩等一行人,虽然目的不纯,但通过相处,渐渐地被改变;同时通过夏侯瑾轩等人的帮助,完成了救治暮蔼村村民的心愿。', + pal_xia:'走江湖卖艺为生的孤女,性格倔强,自尊心强,不喜欢被人小看,更不爱占别人的便宜。卖艺的艰辛让她深知人间冷暖,却仍保持善良天性。', + pal_jiangcheng:'折剑山庄庄主欧阳英的得意门生,但因其蚩尤后人魔族的身份,令他无法被容于人界;再加上人界半魔同族饱受人类迫害,故最终成为净天教教主魔君“姜世离”,毅然肩负起保护同族的重任。', }, - yanzhan:{ - enable:'phaseUse', - viewAs:{name:'sha',nature:'fire'}, - usable:1, - position:'he', - viewAsFilter:function(player){ - if(!player.countCards('he',{color:'red'})) return false; + skill:{ + fenshi:{ + unique:true, + skillAnimation:true, + animationColor:'fire', + trigger:{player:'dyingAfter'}, + forced:true, + mark:true, + derivation:'longhuo', + intro:{ + content:'limited' + }, + content:function(){ + player.awakenSkill('fenshi'); + player.changeHujia(2); + player.draw(2); + player.addSkill('longhuo'); + }, }, - filterCard:{color:'red'}, - check:function(card){ - if(get.suit(card)=='heart') return 7-get.value(card); - return 5-get.value(card); - }, - onuse:function(result){ - if(result.targets){ - for(var i=0;i2||nh==0)){ - return false; - } - } - } - }, - feixia:{ - enable:'phaseUse', - usable:1, - filterCard:{color:'red'}, - position:'he', - filter:function(event,player){ - return player.countCards('he',{color:'red'})>0; - }, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - var targets=player.getEnemies(); - if(targets.length){ - var target=targets.randomGet(); - target.addExpose(0.2); - player.useCard({name:'sha'},target,false); - } - }, - ai:{ - order:2.9, - result:{ - player:1 - } - } - }, - lueying:{ - trigger:{player:'shaBegin'}, - filter:function(event,player){ - if(event.target.countCards('he')>0){ - return game.hasPlayer(function(current){ - return current!=player&¤t!=event.target&¤t.countCards('he'); + longhuo:{ + unique:true, + trigger:{player:'phaseEnd'}, + check:function(event,player){ + if(player.hp==1&&player.hujia==0) return false; + var num=game.countPlayer(function(current){ + var eff=get.sgn(get.damageEffect(current,player,player,'fire')); + if(current.hp==1&¤t.hujia==0) eff*=1.5; + return eff; }); - } - return false; - }, - logTarget:'target', - usable:1, - content:function(){ - 'step 0' - var card=trigger.target.getCards('he').randomGet(); - player.gain(card,trigger.target); - if(get.position(card)=='e'){ - trigger.target.$give(card,player); - } - else{ - trigger.target.$giveAuto(card,player); - } - 'step 1' - if(game.hasPlayer(function(current){ - return current!=player&¤t!=trigger.target&¤t.countCards('he'); - })){ - trigger.target.chooseTarget(function(card,player,target){ - return target!=player&&target!=_status.event.parent.player&&target.countCards('he')>0; - },'选择一名角色并令'+get.translation(player)+'弃置其一张牌').ai=function(target){ - return -get.attitude(_status.event.player,target); - }; - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - trigger.target.line(result.targets[0],'green'); - player.discardPlayerCard(result.targets[0],true,'he'); - } - }, - ai:{ - threaten:1.5, - expose:0.2, - } - }, - tianjian:{ - enable:'phaseUse', - viewAs:{name:'wanjian'}, - filterCard:{name:'sha'}, - filter:function(event,player){ - return player.countCards('h','sha')>0; - }, - alter:true, - usable:1, - group:'tianjian_discard', - subSkill:{ - discard:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event){ - if(get.is.altered('tianjian')) return false; - return event.parent.skill=='tianjian'&&event.player.countCards('he'); - }, - popup:false, - content:function(){ - trigger.player.discard(trigger.player.getCards('he').randomGet()); + return num>0; + }, + content:function(){ + 'step 0' + event.targets=get.players(lib.sort.seat); + 'step 1' + if(event.targets.length){ + var current=event.targets.shift(); + if(current.isIn()){ + player.line(current,'fire'); + current.damage('fire'); + event.redo(); + } } } - } - }, - feng:{ - unique:true, - init:function(player){ - player.storage.feng=0; }, - mark:true, - intro:{ - content:'已累计摸#次牌' - }, - trigger:{player:'drawBegin'}, - forced:true, - popup:false, - content:function(){ - if(player.storage.feng<2){ - player.storage.feng++; - } - else{ - trigger.num++; - player.storage.feng=0; - player.logSkill('feng'); - } - player.updateMarks(); - } - }, - ya:{ - unique:true, - init:function(player){ - player.storage.ya=0; - }, - mark:true, - intro:{ - content:'已累计受到#次伤害' - }, - trigger:{player:'damageBegin'}, - filter:function(event,player){ - if(player.storage.ya==2) return event.num>0; - return true; - }, - forced:true, - popup:false, - content:function(){ - if(player.storage.ya<2){ - player.storage.ya++; - } - else if(trigger.num>0){ - trigger.num--; - player.storage.ya=0; - player.logSkill('ya'); - } - player.updateMarks(); - } - }, - song:{ - unique:true, - init:function(player){ - player.storage.song=0; - }, - mark:true, - intro:{ - content:'已累计造成#次伤害' - }, - trigger:{source:'damageBegin'}, - forced:true, - popup:false, - content:function(){ - if(player.storage.song<2){ - player.storage.song++; - } - else{ - trigger.num++; - player.storage.song=0; - player.logSkill('song'); - } - player.updateMarks(); - } - }, - longxiang:{ - trigger:{player:'shaBegin'}, - filter:function(event,player){ - return event.target.countCards('h')>player.countCards('h'); - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - logTarget:'target', - content:function(){ - var hs=trigger.target.getCards('h'); - trigger.target.discard(hs.randomGets(hs.length-player.countCards('h'))); - } - }, - huxi:{ - enable:'chooseToUse', - viewAs:{name:'sha'}, - precontent:function(){ - 'step 0' - player.loseHp(); - 'step 1' - player.changeHujia(); - }, - filterCard:function(){return false}, - selectCard:-1, - prompt:'失去一点体力并获得一点护甲,视为使用一张杀', - ai:{ - order:function(){ - var player=_status.event.player; - if(player.hp<=2) return 0; - return 2; + yanzhan:{ + enable:'phaseUse', + viewAs:{name:'sha',nature:'fire'}, + usable:1, + position:'he', + viewAsFilter:function(player){ + if(!player.countCards('he',{color:'red'})) return false; }, - skillTagFilter:function(player,tag,arg){ - if(arg!='use') return false; + filterCard:{color:'red'}, + check:function(card){ + if(get.suit(card)=='heart') return 7-get.value(card); + return 5-get.value(card); + }, + onuse:function(result){ + if(result.targets){ + for(var i=0;i0; - }, - discard:false, - prepare:'throw', - content:function(){ - game.log(player,'将',cards,'置于牌堆顶'); - ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); - var list=get.inpile(get.type(cards[0],'trick'),'trick').randomGets(2); - for(var i=0;i2||nh==0)){ + return false; + } + } + } + }, + feixia:{ + enable:'phaseUse', + usable:1, + filterCard:{color:'red'}, + position:'he', + filter:function(event,player){ + return player.countCards('he',{color:'red'})>0; + }, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + var targets=player.getEnemies(); + if(targets.length){ + var target=targets.randomGet(); + target.addExpose(0.2); + player.useCard({name:'sha'},target,false); + } + }, + ai:{ + order:2.9, + result:{ + player:1 + } + } + }, + lueying:{ + trigger:{player:'shaBegin'}, + filter:function(event,player){ + if(event.target.countCards('he')>0){ + return game.hasPlayer(function(current){ + return current!=player&¤t!=event.target&¤t.countCards('he'); + }); + } + return false; + }, + logTarget:'target', + usable:1, + content:function(){ + 'step 0' + var card=trigger.target.getCards('he').randomGet(); + player.gain(card,trigger.target); + if(get.position(card)=='e'){ + trigger.target.$give(card,player); } else{ - var str='已使用过'+get.translation(storage[0]+'2'); - for(var i=1;i0; + },'选择一名角色并令'+get.translation(player)+'弃置其一张牌').ai=function(target){ + return -get.attitude(_status.event.player,target); + }; + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + trigger.target.line(result.targets[0],'green'); + player.discardPlayerCard(result.targets[0],true,'he'); + } + }, + ai:{ + threaten:1.5, + expose:0.2, } }, - filter:function(event,player){ - return player.storage.danqing.length==4; - }, - ai:{ - threaten:1.2, - }, - alter:true, - content:function(){ - 'step 0' - player.storage.danqing.length=0; - player.updateMarks(); - player.chooseTarget(get.prompt('danqing'),[1,get.is.altered('danqing')?2:4]).ai=function(target){ - return get.attitude(player,target); - } - 'step 1' - if(result.bool){ - player.logSkill('danqing',result.targets); - var effs=['draw','hujia','equip','stealth']; - for(var i=0;i0; + }, + alter:true, + usable:1, + group:'tianjian_discard', + subSkill:{ + discard:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event){ + if(get.is.altered('tianjian')) return false; + return event.parent.skill=='tianjian'&&event.player.countCards('he'); + }, + popup:false, + content:function(){ + trigger.player.discard(trigger.player.getCards('he').randomGet()); } } - if(effs.contains('draw')){ - game.delay(); - } - } - else{ - event.finish(); } }, - group:'danqing_count' - }, - danqing_count:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - silent:true, - content:function(){ - var suit=get.suit(trigger.card); - if(suit){ - player.storage.danqing.add(suit); + feng:{ + unique:true, + init:function(player){ + player.storage.feng=0; + }, + mark:true, + intro:{ + content:'已累计摸#次牌' + }, + trigger:{player:'drawBegin'}, + forced:true, + popup:false, + content:function(){ + if(player.storage.feng<2){ + player.storage.feng++; + } + else{ + trigger.num++; + player.storage.feng=0; + player.logSkill('feng'); + } player.updateMarks(); } - } - }, - danqing_old:{ - content:function(){ - 'step 0' - player.storage.danqing.length=0; - player.updateMarks(); - event.targets=[]; - 'step 1' - player.chooseTarget('令一名角色摸一张牌',function(card,player,target){ - return !event.targets.contains(target); - }).ai=function(target){ - var att=get.attitude(player,target); - if(att>0){ - return att+1/Math.sqrt(1+target.countCards('h')); + }, + ya:{ + unique:true, + init:function(player){ + player.storage.ya=0; + }, + mark:true, + intro:{ + content:'已累计受到#次伤害' + }, + trigger:{player:'damageBegin'}, + filter:function(event,player){ + if(player.storage.ya==2) return event.num>0; + return true; + }, + forced:true, + popup:false, + content:function(){ + if(player.storage.ya<2){ + player.storage.ya++; } - return 0; - }; - 'step 2' - if(result.bool){ - player.line(result.targets[0],'green'); - result.targets[0].draw(); - event.targets.push(result.targets[0]); - if(event.targets.length==game.players.length){ - event.finish(); + else if(trigger.num>0){ + trigger.num--; + player.storage.ya=0; + player.logSkill('ya'); + } + player.updateMarks(); + } + }, + song:{ + unique:true, + init:function(player){ + player.storage.song=0; + }, + mark:true, + intro:{ + content:'已累计造成#次伤害' + }, + trigger:{source:'damageBegin'}, + forced:true, + popup:false, + content:function(){ + if(player.storage.song<2){ + player.storage.song++; } else{ - player.chooseTarget('令一名角色获得一点护甲',function(card,player,target){ - return !event.targets.contains(target); - }).ai=function(target){ - var att=get.attitude(player,target); - if(att>0){ - return att+1/Math.sqrt(1+target.hp); - } - return 0; - }; + trigger.num++; + player.storage.song=0; + player.logSkill('song'); } - } - else{ - event.finish(); - } - 'step 3' - if(result.bool){ - player.line(result.targets[0],'green'); - result.targets[0].changeHujia(); - game.delay(); - event.targets.push(result.targets[0]); - if(event.targets.length==game.players.length){ - event.finish(); - } - else{ - player.chooseTarget('令一名角色装备一件随机装备',function(card,player,target){ - return !event.targets.contains(target); - }).ai=function(target){ - var att=get.attitude(player,target); - if(att>0&&!target.getEquip(5)){ - return att; - } - return 0; - }; - } - } - else{ - event.finish(); - } - 'step 4' - if(result.bool){ - player.line(result.targets[0],'green'); - game.delay(); - var list=[]; - for(var i=0;i0){ - return att+1/Math.sqrt(1+target.hp); - } - return 0; - }; - } - } - else{ - event.finish(); - } - 'step 5' - if(result.bool){ - player.line(result.targets[0],'green'); - game.delay(); - result.targets[0].addTempSkill('qianxing',{player:'phaseBegin'}); - } - } - }, - sheling:{ - trigger:{global:['useCardAfter','respondAfter','discardAfter']}, - filter:function(event,player){ - if(player!=_status.currentPhase||player==event.player) return false; - if(event.cards){ - for(var i=0;i0&&player.countCards('h')>0; - }, - check:function(event,player){ - if(player.isUnseen()) return false; - if(get.attitude(player,event.player)>=0) return false; - var hs=player.getCards('h'); - if(hs.length=10&&val<=6) return true; - if(hs[i].number>=8&&val<=3) return true; - } - return false; - }, - logTarget:'player', - content:function(){ - 'step 0' - player.chooseToCompare(trigger.player); - 'step 1' - if(result.bool){ - player.draw(2); - } - else{ - event.finish(); - } - 'step 2' - player.chooseCard('将两张牌置于牌堆顶(先选择的在上)',2,'he',true); - 'step 3' - if(result.bool){ - player.lose(result.cards,ui.special); - event.cards=result.cards; - } - else{ - event.finish(); - } - 'step 4' - game.delay(); - var nodes=[]; - for(var i=0;i=0;i--){ - ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); + player.updateMarks(); } }, - ai:{ - mingzhi:false, - expose:0.2 - } - }, - zhangmu:{ - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!event.filterCard({name:'shan'})) return false; - return player.countCards('h','shan')>0; - }, - direct:true, - usable:1, - content:function(){ - "step 0" - var goon=(get.damageEffect(player,trigger.player,player)<=0); - player.chooseCard(get.prompt('zhangmu'),{name:'shan'}).ai=function(){ - return goon?1:0; - } - "step 1" - if(result.bool){ - player.logSkill('zhangmu'); - player.showCards(result.cards); - trigger.untrigger(); - trigger.responded=true; - trigger.result={bool:true,card:{name:'shan'}} - player.addSkill('zhangmu_ai'); - } - else{ - player.storage.counttrigger.zhangmu--; - } - }, - ai:{ - effect:{ - target:function(card,player,target,effect){ - if(get.tag(card,'respondShan')&&effect<0){ - if(target.hasSkill('zhangmu_ai')) return 0; - if(target.countCards('h')>=2) return 0.5; - } - } - } - } - }, - zhangmu_ai:{ - trigger:{player:'loseAfter'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return player.countCards('h','shan')==0; - }, - content:function(){ - player.removeSkill('zhangmu_ai'); - } - }, - leiyu:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - if(!player.countCards('h',{color:'black'})) return false; - if(player.storage.leiyu){ - for(var i=0;i0){ - num2++; - } - else if(eff<0){ - num2--; - } - } - var next=player.chooseToDiscard(get.prompt('leiyu',player.storage.leiyu),{color:'black'}); - next.ai=function(card){ - if(num>0&&num2>=2){ - return 7-get.value(card); - } - return 0; - }; - next.logSkill=['leiyu',player.storage.leiyu]; - 'step 1' - if(result.bool){ - player.storage.leiyu.sort(lib.sort.seat); - player.useCard({name:'jingleishan',nature:'thunder'},player.storage.leiyu).animate=false; - } - }, - group:['leiyu2','leiyu4'], - ai:{ - threaten:1.3 - } - }, - leiyu2:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.leiyu=[]; - } - }, - leiyu3:{ - trigger:{source:'dieAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.leiyu2?true:false; - }, - content:function(){ - player.recover(); - delete player.storage.leiyu2; - } - }, - leiyu4:{ - trigger:{player:'useCardToBegin'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return _status.currentPhase==player&&Array.isArray(player.storage.leiyu)&&event.target&&event.target!=player; - }, - content:function(){ - player.storage.leiyu.add(trigger.target); - } - }, - feizhua:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - if(event.card.name!='sha') return false; - if(event.targets.length!=1) return false; - var target=event.targets[0]; - var players=game.filterPlayer(function(current){ - return get.distance(target,current,'pure')==1; - }); - for(var i=0;i0; - }, - content:function(){ - "step 0" - var target=trigger.targets[0]; - var players=game.filterPlayer(function(current){ - return get.distance(target,current,'pure')==1; - }); - for(var i=0;iplayer.countCards('h'); }, - }, - global:'guijiang3' - }, - guijiang3:{ - mod:{ - cardSavable:function(card,player){ - if(_status.event.dying&&_status.event.dying.hasSkill('guijiang2')) return false; - } - } - }, - fenxing:{ - trigger:{player:'phaseBegin'}, - forced:true, - unique:true, - forceunique:true, - filter:function(){ - return Math.random()<0.5; - }, - derivation:['diesha','guijiang'], - content:function(){ - if(player.storage.fenxing){ - player.storage.fenxing=false; - player.removeSkill('guijiang'); - player.removeSkill('diesha'); - player.addSkill('diewu'); - player.addSkill('lingyu'); - player.setAvatar('pal_longkui','pal_longkui'); - } - else{ - player.storage.fenxing=true; - player.removeSkill('diewu'); - player.removeSkill('lingyu'); - player.addSkill('guijiang'); - player.addSkill('diesha'); - player.setAvatar('pal_longkui','pal_longkuigui'); - } - }, - }, - diewu:{ - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h','sha')>0; - }, - filterCard:{name:'sha'}, - filterTarget:function(card,player,target){ - return target!=player; - }, - prepare:'give', - discard:false, - content:function(){ - target.gain(cards,player); - if(!player.hasSkill('diewu2')){ - player.draw(); - player.addTempSkill('diewu2','phaseAfter'); - } - }, - ai:{ - order:2, - expose:0.2, - result:{ - target:function(player,target){ - if(!player.hasSkill('diewu2')) return 1; - return 0; - } - } - } - }, - diewu2:{}, - lingyu:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.isDamaged(); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget('灵愈:令一名其他角色回复一点体力',function(card,player,target){ - return target!=player&&target.hp0; - }, - logTarget:'player', - content:function(){ - trigger.player.draw(); - }, - ai:{ - mingzhi:false, - threaten:2, - expose:0.2, - } - }, - xuanyan:{ - // trigger:{source:'damageBefore'}, - // forced:true, - // priority:5, - // check:function(event,player){ - // return player.hp>3; - // }, - // filter:function(event){ - // return event.card&&get.color(event.card)=='red'; - // }, - // content:function(){ - // trigger.nature='fire'; - // }, - group:['xuanyan2','xuanyan3'] - }, - xuanyan2:{ - trigger:{source:'damageBegin'}, - forced:true, - filter:function(event){ - return event.nature=='fire'&&event.notLink(); - }, - content:function(){ - trigger.num++; - } - }, - xuanyan3:{ - trigger:{source:'damageEnd'}, - forced:true, - popup:false, - filter:function(event){ - return event.nature=='fire'; - }, - content:function(){ - player.loseHp(); - } - }, - ningbin:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event){ - return event.nature=='thunder'; - }, - content:function(){ - player.recover(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'thunderDamage')){ - if(target.hp<=1||!target.hasSkill('xfenxin')) return [0,0]; - return [0,1.5]; - } - } + logTarget:'target', + content:function(){ + var hs=trigger.target.getCards('h'); + trigger.target.discard(hs.randomGets(hs.length-player.countCards('h'))); } }, - }, - xfenxin:{ - trigger:{player:'changeHp'}, - forced:true, - filter:function(event){ - return event.num!=0; - }, - alter:true, - content:function(){ - if(get.is.altered('xfenxin')){ - player.draw(); - } - else{ - player.draw(Math.abs(trigger.num)); - } - }, - ai:{ - effect:{ - target:function(card){ - if(get.tag(card,'thunderDamage')) return; - if(get.tag(card,'damage')||get.tag(card,'recover')){ - return [1,0.2]; - } - } - } - }, - group:'xfenxin2' - }, - xfenxin2:{ - trigger:{source:'dieAfter'}, - forced:true, - filter:function(){ - return !get.is.altered('xfenxin'); - }, - content:function(){ - player.gainMaxHp(); - player.recover(); - } - }, - luanjian:{ - enable:'phaseUse', - filterCard:{name:'sha'}, - selectCard:2, - check:function(card){ - var num=0; - var player=_status.event.player; - var players=game.filterPlayer(); - for(var i=0;i0){ - num++; - if(num>1) return 8-get.value(card); - } - } - return 0; - }, - viewAs:{name:'sha'}, - selectTarget:[1,Infinity], - filterTarget:function(card,player,target){ - return lib.filter.targetEnabled({name:'sha'},player,target); - }, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.1; + huxi:{ + enable:'chooseToUse', + viewAs:{name:'sha'}, + precontent:function(){ + 'step 0' + player.loseHp(); + 'step 1' + player.changeHujia(); }, - effect:{ - player:function(card,player){ - if(_status.currentPhase!=player) return; - if(card.name=='sha'&&player.countCards('h','sha')<2&&!player.needsToDiscard()){ - var num=0; - var player=_status.event.player; - var players=game.filterPlayer(); - for(var i=0;i1) return [0,0,0,0]; - } - } - } - } + filterCard:function(){return false}, + selectCard:-1, + prompt:'失去一点体力并获得一点护甲,视为使用一张杀', + ai:{ + order:function(){ + var player=_status.event.player; + if(player.hp<=2) return 0; + return 2; + }, + skillTagFilter:function(player,tag,arg){ + if(arg!='use') return false; + }, + respondSha:true, + } + }, + xuanmo:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + var type=get.type(card,'trick'); + return type=='basic'||type=='equip'||type=='trick'; }, - }, - group:'luanjian2' - }, - luanjian2:{ - trigger:{source:'damageBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.parent.skill=='luanjian'; - }, - content:function(){ - if(Math.random()<0.5) trigger.num++; - } - }, - ctianfu:{ - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h','shan')>0; - }, - usable:1, - filterCard:{name:'shan'}, - discard:false, - prepare:'give', - filterTarget:function(card,player,target){ - return target!=player&&!target.hasSkill('ctianfu2'); - }, - check:function(card){ - if(_status.event.player.hp>=3) return 8-get.value(card); - return 7-get.value(card); - }, - content:function(){ - target.storage.ctianfu2=cards[0]; - target.storage.ctianfu3=player; - game.addVideo('storage',target,['ctianfu2',get.cardInfo(cards[0]),'card']); - target.addSkill('ctianfu2'); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - var att=get.attitude(player,target); - if(att>=0) return 0; - return get.damageEffect(target,player,target,'thunder'); - } + check:function(card){ + return 8-get.value(card); }, - expose:0.2 - } - }, - ctianfu2:{ - trigger:{source:'damageAfter'}, - forced:true, - mark:'card', - filter:function(event,player){ - return player.storage.ctianfu2&&player.storage.ctianfu3; - }, - content:function(){ - "step 0" - if(player.storage.ctianfu3&&player.storage.ctianfu3.isAlive()){ - player.damage(player.storage.ctianfu3); - player.storage.ctianfu3.line(player,'thunder'); - } - else{ - player.damage('nosource'); - } - "step 1" - var he=player.getCards('he'); - if(he.length){ - player.discard(he.randomGet()); - } - "step 2" - player.$throw(player.storage.ctianfu2); - ui.discardPile.appendChild(player.storage.ctianfu2); - delete player.storage.ctianfu2; - delete player.storage.ctianfu3; - player.removeSkill('ctianfu2'); - }, - group:'ctianfu3', - intro:{ - content:'card' - } - }, - ctianfu3:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - content:function(){ - ui.discardPile.appendChild(player.storage.ctianfu2); - delete player.storage.ctianfu2; - delete player.storage.ctianfu3; - player.removeSkill('ctianfu2'); - } - }, - shuiyun:{ - trigger:{player:'phaseEnd'}, - direct:true, - init:function(player){ - player.storage.shuiyun=[]; - }, - alter:true, - filter:function(event,player){ - if(player.storage.shuiyun.length>=3) return false; - if(player.storage.shuiyun.length>=2&&get.is.altered('shuiyun')) return false; - var types=[]; - for(var i=0;i0; }, - threaten:2.2 - }, - group:['shuiyun5'] - }, - shuiyun5:{ - trigger:{global:'dying'}, - priority:6, - filter:function(event,player){ - return event.player.hp<=0&&player.storage.shuiyun&&player.storage.shuiyun.length; - }, - direct:true, - content:function(){ - "step 0" - player.chooseCardButton(player.storage.shuiyun,get.prompt('shuiyun',trigger.player)).ai=function(button){ - return get.attitude(player,trigger.player)>2?1:0; - } - "step 1" - if(result.bool){ - player.storage.shuiyun.remove(result.links[0]); - if(!player.storage.shuiyun.length){ - player.unmarkSkill('shuiyun'); - } - player.$throw(result.links); - ui.discardPile.appendChild(result.links[0]); - trigger.player.recover(); - // if(trigger.player!=player){ - // trigger.player.draw(); - // } - player.logSkill('shuiyun5',trigger.player,'thunder'); - game.addVideo('storage',player,['shuiyun',get.cardsInfo(player.storage.shuiyun),'cards']); - } - else{ - event.finish(); - } - "step 2" - if(trigger.player!=player){ - game.delay(); - } - }, - ai:{ - expose:0.3 - } - }, - wangyou:{ - trigger:{global:'phaseEnd'}, - unique:true, - gainable:true, - direct:true, - filter:function(event,player){ - if(!player.countCards('he')) return false; - if(player==event.player) return false; - return game.hasPlayer(function(current){ - return current.hasSkill('wangyou3'); - }); - }, - content:function(){ - "step 0" - var targets=[]; - var num=0; - var players=game.filterPlayer(); - for(var i=0;i0) num++; - else if(att<0) num--; - targets.push(players[i]); - } - } - event.targets=targets; - var next=player.chooseToDiscard(get.prompt('wangyou',targets),'he'); - next.logSkill=['wangyou',event.targets]; - next.ai=function(card){ - if(num<=0) return 0; - switch(num){ - case 1:return 5-get.value(card); - case 2:return 7-get.value(card); - default:return 8-get.value(card); - } - } - "step 1" - if(result.bool){ - event.targets.sort(lib.sort.seat); - game.asyncDraw(event.targets); - } - else{ - event.finish(); - } - }, - ai:{ - expose:0.1, - threaten:1.2 - }, - group:'wangyou2' - }, - wangyou2:{ - trigger:{global:'damageEnd'}, - forced:true, - popup:false, - silent:true, - filter:function(event){ - return event.player.isAlive(); - }, - content:function(){ - trigger.player.addTempSkill('wangyou3','phaseAfter'); - } - }, - wangyou3:{}, - changnian:{ - forbid:['boss'], - trigger:{player:'dieBegin'}, - direct:true, - unique:true, - derivation:'changnian2', - content:function(){ - "step 0" - player.chooseTarget(get.prompt('changnian'),function(card,player,target){ - return player!=target; - }).ai=function(target){ - return get.attitude(player,target); - }; - "step 1" - if(result.bool){ - var cards=player.getCards('hej'); - var target=result.targets[0]; - // if(player.storage.shuiyun&&player.storage.shuiyun.length){ - // target.gainMaxHp(); - // target.recover(player.storage.shuiyun.length); - // cards=cards.concat(player.storage.shuiyun); - // player.storage.shuiyun.length=0; - // } - player.$give(cards,target); - target.gain(cards); - target.addSkill('changnian2'); - player.logSkill('changnian',target); - target.marks.changnian=target.markCharacter(player,{ - name:'长念', - content:'@
【追思】
锁定技,结束阶段,你摸一张牌
' - }); - game.addVideo('markCharacter',target,{ - name:'长念', - content:'@
【追思】
锁定技,结束阶段,你摸一张牌
', - id:'changnian', - target:player.dataset.position - }); - } - }, - ai:{ - threaten:0.8 - } - }, - changnian2:{ - trigger:{player:'phaseEnd'}, - forced:true, - nopop:true, - content:function(){ - player.draw(); - }, - }, - sajin:{ - enable:'phaseUse', - filterTarget:function(card,player,target){ - return target.hpplayer.hp){ - return 7-get.value(card); - } - return 4-get.value(card); - }, - content:function(){ - "step 0" - var color=get.color(cards[0]); - target.judge(function(card){ - return get.color(card)==color?1:0; - }); - "step 1" - if(result.bool){ - target.recover(); - } - }, - ai:{ - order:3, - result:{ - target:function(player,target){ - return get.recoverEffect(target); + discard:false, + prepare:'throw', + content:function(){ + game.log(player,'将',cards,'置于牌堆顶'); + ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); + var list=get.inpile(get.type(cards[0],'trick'),'trick').randomGets(2); + for(var i=0;i0){ - return [1,3]; - } - } - } - } - } - } - }, - xshuangren:{ - trigger:{player:['loseEnd']}, - filter:function(event,player){ - if(!player.equiping) return false; - for(var i=0;i0; - }, - content:function(){ - "step 0" - player.chooseTarget([1,trigger.cards.length],get.prompt('qijian'),function(card,player,target){ - return player.canUse({name:'sha'},target,false); - }).ai=function(target){ - return get.effect(target,{name:'sha'},player); - }; - "step 1" - if(result.bool){ - player.logSkill('qijian'); - player.useCard({name:'sha'},result.targets); - } - }, - }, - shenmu:{ - trigger:{global:'dying'}, - priority:6, - filter:function(event,player){ - return event.player.hp<=0&&player.countCards('h',{color:'red'}); - }, - check:function(event,player){ - if(get.attitude(player,event.player)<=0) return false; - var cards=player.getCards('h',{color:'red'}); - for(var i=0;i7&&cards.length>2) return false; - } - }, - content:function(){ - "step 0" - player.showHandcards(); - "step 1" - var cards=player.getCards('h',{color:'red'}); - event.num=cards.length; - player.discard(cards); - "step 2" - trigger.player.recover(); - trigger.player.draw(event.num); - }, - ai:{ - threaten:1.6, - expose:0.2 - } - }, - qianfang:{ - trigger:{player:'phaseBegin'}, - direct:true, - filter:function(event,player){ - return player.storage.xuanning&&player.countCards('he')+player.storage.xuanning>=3; - }, - alter:true, - content:function(){ - "step 0" - var ainum=0; - var num=3-player.storage.xuanning; - var players=game.filterPlayer(); - event.targets=[]; - for(var i=0;i=0){ - switch(num){ - case 1:return 8-get.value(card); - case 2:return 6-get.value(card); - case 3:return 4-get.value(card); - } - } - return -1; - } - next.logSkill='qianfang'; - event.logged=true; - } - else{ - player.chooseBool(get.prompt('qianfang')).ai=function(){ - return ainum>=0; - } - } - "step 1" - if(result.bool){ - player.storage.xuanning=0; - player.unmarkSkill('xuanning'); - if(!get.is.altered('qianfang')){ - player.addTempSkill('qianfang2','phaseAfter'); - } - if(!event.logged) player.logSkill('qianfang'); - player.useCard({name:'wanjian'},event.targets); - } - else{ - event.finish(); - } - }, - ai:{ - expose:0.1, - threaten:1.5 - } - }, - qianfang2:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - popup:false, - content:function(){ - trigger.num++; - } - }, - poyun:{ - trigger:{source:'damageEnd'}, - alter:true, - filter:function(event,player){ - return player.storage.xuanning>0&&event.player.countCards('he')>0; - }, - direct:true, - content:function(){ - "step 0" - player.discardPlayerCard(trigger.player,'he',get.prompt('poyun',trigger.player),[1,get.is.altered('poyun')?1:2]).logSkill=['poyun',trigger.player]; - "step 1" - if(result.bool){ - player.storage.xuanning--; - if(!player.storage.xuanning){ - player.unmarkSkill('xuanning'); - } - player.syncStorage('xuanning'); - } - }, - ai:{ - threaten:1.3 - } - }, - poyun2:{ - trigger:{source:'damageEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.poyun?true:false; - }, - content:function(){ - player.draw(); - player.storage.poyun=false; - player.removeSkill('poyun2'); - } - }, - poyun3:{}, - zhuyue:{ - enable:'phaseUse', - alter:true, - filter:function(event,player){ - if(get.is.altered('zhuyue')){ - return player.hasCard(function(card){ - return get.color(card)=='black'&&get.type(card)!='basic'; - }); - } - return player.countCards('h',{type:'basic'})0; - }, - usable:1, - locked:false, - check:function(card){ - return 7-get.value(card); - }, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - targets.sort(lib.sort.seat); - var target=targets[0]; - var cs=target.getCards('he'); - if(cs.length){ - target.discard(cs.randomGet()); - } - player.storage.zhuyue.add(target); - if(targets.length<2){ - event.finish(); - } - 'step 1' - var target=targets[1]; - var cs=target.getCards('he'); - if(cs.length){ - target.discard(cs.randomGet()); - } - player.storage.zhuyue.add(target); - }, - ai:{ - result:{ - target:function(player,target){ - if(!target.countCards('he')) return -0.2; - return -1; - } + danqing:{ + trigger:{player:'phaseEnd'}, + init:function(player){ + player.storage.danqing=[]; }, - order:10, - threaten:1.2, - exoise:0.2 - }, - mod:{ - targetInRange:function(card,player,target){ - if(card.name=='sha'&&player.storage.zhuyue&&player.storage.zhuyue.contains(target)){ - return true; - } - }, - selectTarget:function(card,player,range){ - if(card.name=='sha'&&player.storage.zhuyue&&player.storage.zhuyue.length){ - range[1]=-1; - range[0]=-1; - } - }, - playerEnabled:function(card,player,target){ - if(card.name=='sha'&&player.storage.zhuyue&&player.storage.zhuyue.length&&!player.storage.zhuyue.contains(target)){ - return false; - } - } - }, - intro:{ - content:'players' - }, - group:'zhuyue2' - }, - zhuyue2:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.zhuyue.length=0; - } - }, - longxi:{ - trigger:{player:['chooseToRespondBegin','chooseToUseBegin']}, - forced:true, - popup:false, - max:2, - filter:function(event,player){ - return _status.currentPhase!=player; - }, - priority:101, - content:function(){ - var cards=[]; - var max=Math.min(ui.cardPile.childNodes.length,lib.skill.longxi.max); - for(var i=0;i=2; - }, - check:function(card){ - return 8-get.value(card); - }, - filterCard:function(card){ - return get.color(card)=='red'; - }, - selectCard:2, - filterTarget:function(card,player,target){ - return player!=target&&target.hp>=player.hp; - }, - intro:{ - content:'limited' - }, - line:'fire', - content:function(){ - "step 0" - player.storage.guanri=true; - player.loseHp(); - "step 1" - target.damage(2,'fire'); - "step 2" - if(target.isAlive()){ - target.discard(target.getCards('e')); - } - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - var eff=get.damageEffect(target,player,target,'fire'); - if(player.hp>2) return eff; - if(player.hp==2&&target.hp==2) return eff; - return 0; - } - }, - expose:0.5 - } - }, - tianxian:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(card.name=='sha') return true; - }, - selectTarget:function(card,player,range){ - if(card.name=='sha'&&range[1]!=-1) range[1]=Infinity; - } - }, - priority:5.5, - trigger:{player:'useCardToBefore'}, - filter:function(event){ - return event.card.name=='sha'; - }, - forced:true, - check:function(){ - return false; - }, - content:function(){ - "step 0" - trigger.target.judge(function(card){ - return get.color(card)=='black'?1:0; - }); - "step 1" - if(result.bool){ - trigger.untrigger(); - trigger.finish(); - } - } - }, - runxin:{ - trigger:{player:['useCard','respondEnd']}, - direct:true, - filter:function(event){ - if(get.suit(event.card)=='heart'){ - return game.hasPlayer(function(current){ - return current.isDamaged(); - }); - } - return false; - }, - content:function(){ - "step 0" - var noneed=(trigger.card.name=='tao'&&trigger.targets[0]==player&&player.hp==player.maxHp-1); - player.chooseTarget(get.prompt('runxin'),function(card,player,target){ - return target.hp0){ - if(noneed&&player==target){ - num=0.5; - } - else if(target.hp==1){ - num+=3; - } - else if(target.hp==2){ - num+=1; - } - } - return num; - } - "step 1" - if(result.bool){ - player.logSkill('runxin',result.targets); - result.targets[0].recover(); - } - }, - ai:{ - expose:0.3, - threaten:1.5 - } - }, - zhimeng:{ - trigger:{player:'phaseEnd'}, - direct:true, - locked:true, - unique:true, - gainable:true, - alter:true, - group:'zhimeng3', - content:function(){ - "step 0" - player.chooseTarget(get.prompt('zhimeng'),function(card,player,target){ - return player!=target; - }).ai=function(target){ - var num=get.attitude(player,target); - if(num>0){ - if(player==target){ - num++; - } - if(target.hp==1){ - num+=3; - } - if(target.hp==2){ - num+=1; - } - } - return num; - } - "step 1" - if(result.bool){ - var target=result.targets[0]; - if(get.is.altered('zhimeng')){ - target.draw(); - } - else{ - var card=get.cards()[0]; - target.$draw(card); - target.storage.zhimeng2=card; - game.addVideo('storage',target,['zhimeng2',get.cardInfo(card),'card']); - target.addSkill('zhimeng2'); - } - player.logSkill('zhimeng',target); - } - }, - ai:{ - expose:0.2 - } - }, - zhimeng2:{ - intro:{ - content:'card', - onunmark:function(storage,player){ - delete player.storage.zhimeng2; - } - }, - mark:'card', - trigger:{target:'useCardToBegin'}, - frequent:true, - filter:function(event,player){ - return player.storage.zhimeng2&&get.type(event.card,'trick')==get.type(player.storage.zhimeng2,'trick'); - }, - content:function(){ - player.draw(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(target.storage.zhimeng2&&get.type(card,'trick')==get.type(target.storage.zhimeng2,'trick')){ - return [1,0.5]; - } - } - } - } - }, - zhimeng3:{ - trigger:{player:['phaseBegin','dieBegin']}, - forced:true, - popup:false, - silent:true, - content:function(){ - "step 0" - event.players=game.filterPlayer(); - event.num=0; - "step 1" - if(event.num1){ - return 11-get.equipValue(card); + danqing_old:{ + content:function(){ + 'step 0' + player.storage.danqing.length=0; + player.updateMarks(); + event.targets=[]; + 'step 1' + player.chooseTarget('令一名角色摸一张牌',function(card,player,target){ + return !event.targets.contains(target); + }).ai=function(target){ + var att=get.attitude(player,target); + if(att>0){ + return att+1/Math.sqrt(1+target.countCards('h')); + } + return 0; + }; + 'step 2' + if(result.bool){ + player.line(result.targets[0],'green'); + result.targets[0].draw(); + event.targets.push(result.targets[0]); + if(event.targets.length==game.players.length){ + event.finish(); + } + else{ + player.chooseTarget('令一名角色获得一点护甲',function(card,player,target){ + return !event.targets.contains(target); + }).ai=function(target){ + var att=get.attitude(player,target); + if(att>0){ + return att+1/Math.sqrt(1+target.hp); + } + return 0; + }; + } + } + else{ + event.finish(); + } + 'step 3' + if(result.bool){ + player.line(result.targets[0],'green'); + result.targets[0].changeHujia(); + game.delay(); + event.targets.push(result.targets[0]); + if(event.targets.length==game.players.length){ + event.finish(); + } + else{ + player.chooseTarget('令一名角色装备一件随机装备',function(card,player,target){ + return !event.targets.contains(target); + }).ai=function(target){ + var att=get.attitude(player,target); + if(att>0&&!target.getEquip(5)){ + return att; + } + return 0; + }; + } + } + else{ + event.finish(); + } + 'step 4' + if(result.bool){ + player.line(result.targets[0],'green'); + game.delay(); + var list=[]; + for(var i=0;i0){ + return att+1/Math.sqrt(1+target.hp); + } + return 0; + }; + } + } + else{ + event.finish(); + } + 'step 5' + if(result.bool){ + player.line(result.targets[0],'green'); + game.delay(); + result.targets[0].addTempSkill('qianxing',{player:'phaseBegin'}); + } } - if(player.countCards('h')0&&player.countCards('h')>0; + }, + check:function(event,player){ + if(player.isUnseen()) return false; + if(get.attitude(player,event.player)>=0) return false; + var hs=player.getCards('h'); + if(hs.length=10&&val<=6) return true; + if(hs[i].number>=8&&val<=3) return true; + } + return false; + }, + logTarget:'player', + content:function(){ + 'step 0' + player.chooseToCompare(trigger.player); + 'step 1' + if(result.bool){ + player.draw(2); + } + else{ + event.finish(); + } + 'step 2' + player.chooseCard('将两张牌置于牌堆顶(先选择的在上)',2,'he',true); + 'step 3' + if(result.bool){ + player.lose(result.cards,ui.special); + event.cards=result.cards; + } + else{ + event.finish(); + } + 'step 4' + game.delay(); + var nodes=[]; + for(var i=0;i=0;i--){ + ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); + } + }, + ai:{ + mingzhi:false, + expose:0.2 + } + }, + zhangmu:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'shan'})) return false; + return player.countCards('h','shan')>0; + }, + direct:true, + usable:1, + content:function(){ + "step 0" + var goon=(get.damageEffect(player,trigger.player,player)<=0); + player.chooseCard(get.prompt('zhangmu'),{name:'shan'}).ai=function(){ + return goon?1:0; + } + "step 1" + if(result.bool){ + player.logSkill('zhangmu'); + player.showCards(result.cards); + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'shan'}} + player.addSkill('zhangmu_ai'); + } + else{ + player.storage.counttrigger.zhangmu--; + } + }, + ai:{ + effect:{ + target:function(card,player,target,effect){ + if(get.tag(card,'respondShan')&&effect<0){ + if(target.hasSkill('zhangmu_ai')) return 0; + if(target.countCards('h')>=2) return 0.5; + } + } + } + } + }, + zhangmu_ai:{ + trigger:{player:'loseAfter'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return player.countCards('h','shan')==0; + }, + content:function(){ + player.removeSkill('zhangmu_ai'); + } + }, + leiyu:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + if(!player.countCards('h',{color:'black'})) return false; + if(player.storage.leiyu){ + for(var i=0;i0){ + num2++; + } + else if(eff<0){ + num2--; + } + } + var next=player.chooseToDiscard(get.prompt('leiyu',player.storage.leiyu),{color:'black'}); + next.ai=function(card){ + if(num>0&&num2>=2){ + return 7-get.value(card); + } + return 0; + }; + next.logSkill=['leiyu',player.storage.leiyu]; + 'step 1' + if(result.bool){ + player.storage.leiyu.sort(lib.sort.seat); + player.useCard({name:'jingleishan',nature:'thunder'},player.storage.leiyu).animate=false; + } + }, + group:['leiyu2','leiyu4'], + ai:{ + threaten:1.3 + } + }, + leiyu2:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.leiyu=[]; + } + }, + leiyu3:{ + trigger:{source:'dieAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.leiyu2?true:false; + }, + content:function(){ + player.recover(); + delete player.storage.leiyu2; + } + }, + leiyu4:{ + trigger:{player:'useCardToBegin'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return _status.currentPhase==player&&Array.isArray(player.storage.leiyu)&&event.target&&event.target!=player; + }, + content:function(){ + player.storage.leiyu.add(trigger.target); + } + }, + feizhua:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + if(event.targets.length!=1) return false; + var target=event.targets[0]; + var players=game.filterPlayer(function(current){ + return get.distance(target,current,'pure')==1; + }); + for(var i=0;i0; + }, + content:function(){ + "step 0" + var target=trigger.targets[0]; + var players=game.filterPlayer(function(current){ + return get.distance(target,current,'pure')==1; + }); + for(var i=0;i0; + diewu:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h','sha')>0; + }, + filterCard:{name:'sha'}, + filterTarget:function(card,player,target){ + return target!=player; + }, + prepare:'give', + discard:false, + content:function(){ + target.gain(cards,player); + if(!player.hasSkill('diewu2')){ + player.draw(); + player.addTempSkill('diewu2','phaseAfter'); + } + }, + ai:{ + order:2, + expose:0.2, + result:{ + target:function(player,target){ + if(!player.hasSkill('diewu2')) return 1; + return 0; + } + } + } }, - ai:{ - shihuifen:true, - skillTagFilter:function(player){ + diewu2:{}, + lingyu:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.isDamaged(); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget('灵愈:令一名其他角色回复一点体力',function(card,player,target){ + return target!=player&&target.hp0; + }, + logTarget:'player', + content:function(){ + trigger.player.draw(); + }, + ai:{ + mingzhi:false, + threaten:2, + expose:0.2, + } + }, + xuanyan:{ + // trigger:{source:'damageBefore'}, + // forced:true, + // priority:5, + // check:function(event,player){ + // return player.hp>3; + // }, + // filter:function(event){ + // return event.card&&get.color(event.card)=='red'; + // }, + // content:function(){ + // trigger.nature='fire'; + // }, + group:['xuanyan2','xuanyan3'] + }, + xuanyan2:{ + trigger:{source:'damageBegin'}, + forced:true, + filter:function(event){ + return event.nature=='fire'&&event.notLink(); + }, + content:function(){ + trigger.num++; + } + }, + xuanyan3:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + filter:function(event){ + return event.nature=='fire'; + }, + content:function(){ + player.loseHp(); + } + }, + ningbin:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event){ + return event.nature=='thunder'; + }, + content:function(){ + player.recover(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'thunderDamage')){ + if(target.hp<=1||!target.hasSkill('xfenxin')) return [0,0]; + return [0,1.5]; + } + } + } + }, + }, + xfenxin:{ + trigger:{player:'changeHp'}, + forced:true, + filter:function(event){ + return event.num!=0; + }, + alter:true, + content:function(){ + if(get.is.altered('xfenxin')){ + player.draw(); + } + else{ + player.draw(Math.abs(trigger.num)); + } + }, + ai:{ + effect:{ + target:function(card){ + if(get.tag(card,'thunderDamage')) return; + if(get.tag(card,'damage')||get.tag(card,'recover')){ + return [1,0.2]; + } + } + } + }, + group:'xfenxin2' + }, + xfenxin2:{ + trigger:{source:'dieAfter'}, + forced:true, + filter:function(){ + return !get.is.altered('xfenxin'); + }, + content:function(){ + player.gainMaxHp(); + player.recover(); + } + }, + luanjian:{ + enable:'phaseUse', + filterCard:{name:'sha'}, + selectCard:2, + check:function(card){ + var num=0; + var player=_status.event.player; + var players=game.filterPlayer(); + for(var i=0;i0){ + num++; + if(num>1) return 8-get.value(card); + } + } + return 0; + }, + viewAs:{name:'sha'}, + selectTarget:[1,Infinity], + filterTarget:function(card,player,target){ + return lib.filter.targetEnabled({name:'sha'},player,target); + }, + ai:{ + order:function(){ + return get.order({name:'sha'})+0.1; + }, + effect:{ + player:function(card,player){ + if(_status.currentPhase!=player) return; + if(card.name=='sha'&&player.countCards('h','sha')<2&&!player.needsToDiscard()){ + var num=0; + var player=_status.event.player; + var players=game.filterPlayer(); + for(var i=0;i1) return [0,0,0,0]; + } + } + } + } + }, + }, + group:'luanjian2' + }, + luanjian2:{ + trigger:{source:'damageBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.parent.skill=='luanjian'; + }, + content:function(){ + if(Math.random()<0.5) trigger.num++; + } + }, + ctianfu:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h','shan')>0; + }, + usable:1, + filterCard:{name:'shan'}, + discard:false, + prepare:'give', + filterTarget:function(card,player,target){ + return target!=player&&!target.hasSkill('ctianfu2'); + }, + check:function(card){ + if(_status.event.player.hp>=3) return 8-get.value(card); + return 7-get.value(card); + }, + content:function(){ + target.storage.ctianfu2=cards[0]; + target.storage.ctianfu3=player; + game.addVideo('storage',target,['ctianfu2',get.cardInfo(cards[0]),'card']); + target.addSkill('ctianfu2'); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + var att=get.attitude(player,target); + if(att>=0) return 0; + return get.damageEffect(target,player,target,'thunder'); + } + }, + expose:0.2 + } + }, + ctianfu2:{ + trigger:{source:'damageAfter'}, + forced:true, + mark:'card', + filter:function(event,player){ + return player.storage.ctianfu2&&player.storage.ctianfu3; + }, + content:function(){ + "step 0" + if(player.storage.ctianfu3&&player.storage.ctianfu3.isAlive()){ + player.damage(player.storage.ctianfu3); + player.storage.ctianfu3.line(player,'thunder'); + } + else{ + player.damage('nosource'); + } + "step 1" + var he=player.getCards('he'); + if(he.length){ + player.discard(he.randomGet()); + } + "step 2" + player.$throw(player.storage.ctianfu2); + ui.discardPile.appendChild(player.storage.ctianfu2); + delete player.storage.ctianfu2; + delete player.storage.ctianfu3; + player.removeSkill('ctianfu2'); + }, + group:'ctianfu3', + intro:{ + content:'card' + } + }, + ctianfu3:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + ui.discardPile.appendChild(player.storage.ctianfu2); + delete player.storage.ctianfu2; + delete player.storage.ctianfu3; + player.removeSkill('ctianfu2'); + } + }, + shuiyun:{ + trigger:{player:'phaseEnd'}, + direct:true, + init:function(player){ + player.storage.shuiyun=[]; + }, + alter:true, + filter:function(event,player){ + if(player.storage.shuiyun.length>=3) return false; + if(player.storage.shuiyun.length>=2&&get.is.altered('shuiyun')) return false; + var types=[]; + for(var i=0;i2?1:0; + } + "step 1" + if(result.bool){ + player.storage.shuiyun.remove(result.links[0]); + if(!player.storage.shuiyun.length){ + player.unmarkSkill('shuiyun'); + } + player.$throw(result.links); + ui.discardPile.appendChild(result.links[0]); + trigger.player.recover(); + // if(trigger.player!=player){ + // trigger.player.draw(); + // } + player.logSkill('shuiyun5',trigger.player,'thunder'); + game.addVideo('storage',player,['shuiyun',get.cardsInfo(player.storage.shuiyun),'cards']); + } + else{ + event.finish(); + } + "step 2" + if(trigger.player!=player){ + game.delay(); + } + }, + ai:{ + expose:0.3 + } + }, + wangyou:{ + trigger:{global:'phaseEnd'}, + unique:true, + gainable:true, + direct:true, + filter:function(event,player){ + if(!player.countCards('he')) return false; + if(player==event.player) return false; + return game.hasPlayer(function(current){ + return current.hasSkill('wangyou3'); + }); + }, + content:function(){ + "step 0" + var targets=[]; + var num=0; + var players=game.filterPlayer(); + for(var i=0;i0) num++; + else if(att<0) num--; + targets.push(players[i]); + } + } + event.targets=targets; + var next=player.chooseToDiscard(get.prompt('wangyou',targets),'he'); + next.logSkill=['wangyou',event.targets]; + next.ai=function(card){ + if(num<=0) return 0; + switch(num){ + case 1:return 5-get.value(card); + case 2:return 7-get.value(card); + default:return 8-get.value(card); + } + } + "step 1" + if(result.bool){ + event.targets.sort(lib.sort.seat); + game.asyncDraw(event.targets); + } + else{ + event.finish(); + } + }, + ai:{ + expose:0.1, + threaten:1.2 + }, + group:'wangyou2' + }, + wangyou2:{ + trigger:{global:'damageEnd'}, + forced:true, + popup:false, + silent:true, + filter:function(event){ + return event.player.isAlive(); + }, + content:function(){ + trigger.player.addTempSkill('wangyou3','phaseAfter'); + } + }, + wangyou3:{}, + changnian:{ + forbid:['boss'], + trigger:{player:'dieBegin'}, + direct:true, + unique:true, + derivation:'changnian2', + content:function(){ + "step 0" + player.chooseTarget(get.prompt('changnian'),function(card,player,target){ + return player!=target; + }).ai=function(target){ + return get.attitude(player,target); + }; + "step 1" + if(result.bool){ + var cards=player.getCards('hej'); + var target=result.targets[0]; + // if(player.storage.shuiyun&&player.storage.shuiyun.length){ + // target.gainMaxHp(); + // target.recover(player.storage.shuiyun.length); + // cards=cards.concat(player.storage.shuiyun); + // player.storage.shuiyun.length=0; + // } + player.$give(cards,target); + target.gain(cards); + target.addSkill('changnian2'); + player.logSkill('changnian',target); + target.marks.changnian=target.markCharacter(player,{ + name:'长念', + content:'@
【追思】
锁定技,结束阶段,你摸一张牌
' + }); + game.addVideo('markCharacter',target,{ + name:'长念', + content:'@
【追思】
锁定技,结束阶段,你摸一张牌
', + id:'changnian', + target:player.dataset.position + }); + } + }, + ai:{ + threaten:0.8 + } + }, + changnian2:{ + trigger:{player:'phaseEnd'}, + forced:true, + nopop:true, + content:function(){ + player.draw(); + }, + }, + sajin:{ + enable:'phaseUse', + filterTarget:function(card,player,target){ + return target.hpplayer.hp){ + return 7-get.value(card); + } + return 4-get.value(card); + }, + content:function(){ + "step 0" + var color=get.color(cards[0]); + target.judge(function(card){ + return get.color(card)==color?1:0; + }); + "step 1" + if(result.bool){ + target.recover(); + } + }, + ai:{ + order:3, + result:{ + target:function(player,target){ + return get.recoverEffect(target); + } + }, + threaten:1.5 + } + }, + jubao:{ + trigger:{global:'discardAfter'}, + filter:function(event,player){ + if(player.hasSkill('jubao2')) return false; + if(event.player==player) return false; + if(_status.currentPhase==player) return false; + for(var i=0;i0){ + return [1,3]; + } + } + } + } + } + } + }, + xshuangren:{ + trigger:{player:['loseEnd']}, + filter:function(event,player){ + if(!player.equiping) return false; + for(var i=0;i0; + }, + content:function(){ + "step 0" + player.chooseTarget([1,trigger.cards.length],get.prompt('qijian'),function(card,player,target){ + return player.canUse({name:'sha'},target,false); + }).ai=function(target){ + return get.effect(target,{name:'sha'},player); + }; + "step 1" + if(result.bool){ + player.logSkill('qijian'); + player.useCard({name:'sha'},result.targets); + } + }, + }, + shenmu:{ + trigger:{global:'dying'}, + priority:6, + filter:function(event,player){ + return event.player.hp<=0&&player.countCards('h',{color:'red'}); + }, + check:function(event,player){ + if(get.attitude(player,event.player)<=0) return false; + var cards=player.getCards('h',{color:'red'}); + for(var i=0;i7&&cards.length>2) return false; + } + }, + content:function(){ + "step 0" + player.showHandcards(); + "step 1" + var cards=player.getCards('h',{color:'red'}); + event.num=cards.length; + player.discard(cards); + "step 2" + trigger.player.recover(); + trigger.player.draw(event.num); + }, + ai:{ + threaten:1.6, + expose:0.2 + } + }, + qianfang:{ + trigger:{player:'phaseBegin'}, + direct:true, + filter:function(event,player){ + return player.storage.xuanning&&player.countCards('he')+player.storage.xuanning>=3; + }, + alter:true, + content:function(){ + "step 0" + var ainum=0; + var num=3-player.storage.xuanning; + var players=game.filterPlayer(); + event.targets=[]; + for(var i=0;i=0){ + switch(num){ + case 1:return 8-get.value(card); + case 2:return 6-get.value(card); + case 3:return 4-get.value(card); + } + } + return -1; + } + next.logSkill='qianfang'; + event.logged=true; + } + else{ + player.chooseBool(get.prompt('qianfang')).ai=function(){ + return ainum>=0; + } + } + "step 1" + if(result.bool){ + player.storage.xuanning=0; + player.unmarkSkill('xuanning'); + if(!get.is.altered('qianfang')){ + player.addTempSkill('qianfang2','phaseAfter'); + } + if(!event.logged) player.logSkill('qianfang'); + player.useCard({name:'wanjian'},event.targets); + } + else{ + event.finish(); + } + }, + ai:{ + expose:0.1, + threaten:1.5 + } + }, + qianfang2:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + popup:false, + content:function(){ + trigger.num++; + } + }, + poyun:{ + trigger:{source:'damageEnd'}, + alter:true, + filter:function(event,player){ + return player.storage.xuanning>0&&event.player.countCards('he')>0; + }, + direct:true, + content:function(){ + "step 0" + player.discardPlayerCard(trigger.player,'he',get.prompt('poyun',trigger.player),[1,get.is.altered('poyun')?1:2]).logSkill=['poyun',trigger.player]; + "step 1" + if(result.bool){ + player.storage.xuanning--; + if(!player.storage.xuanning){ + player.unmarkSkill('xuanning'); + } + player.syncStorage('xuanning'); + } + }, + ai:{ + threaten:1.3 + } + }, + poyun2:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.poyun?true:false; + }, + content:function(){ + player.draw(); + player.storage.poyun=false; + player.removeSkill('poyun2'); + } + }, + poyun3:{}, + zhuyue:{ + enable:'phaseUse', + alter:true, + filter:function(event,player){ + if(get.is.altered('zhuyue')){ + return player.hasCard(function(card){ + return get.color(card)=='black'&&get.type(card)!='basic'; + }); + } + return player.countCards('h',{type:'basic'})0; + }, + usable:1, + locked:false, + check:function(card){ + return 7-get.value(card); + }, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + targets.sort(lib.sort.seat); + var target=targets[0]; + var cs=target.getCards('he'); + if(cs.length){ + target.discard(cs.randomGet()); + } + player.storage.zhuyue.add(target); + if(targets.length<2){ + event.finish(); + } + 'step 1' + var target=targets[1]; + var cs=target.getCards('he'); + if(cs.length){ + target.discard(cs.randomGet()); + } + player.storage.zhuyue.add(target); + }, + ai:{ + result:{ + target:function(player,target){ + if(!target.countCards('he')) return -0.2; + return -1; + } + }, + order:10, + threaten:1.2, + exoise:0.2 + }, + mod:{ + targetInRange:function(card,player,target){ + if(card.name=='sha'&&player.storage.zhuyue&&player.storage.zhuyue.contains(target)){ + return true; + } + }, + selectTarget:function(card,player,range){ + if(card.name=='sha'&&player.storage.zhuyue&&player.storage.zhuyue.length){ + range[1]=-1; + range[0]=-1; + } + }, + playerEnabled:function(card,player,target){ + if(card.name=='sha'&&player.storage.zhuyue&&player.storage.zhuyue.length&&!player.storage.zhuyue.contains(target)){ + return false; + } + } + }, + intro:{ + content:'players' + }, + group:'zhuyue2' + }, + zhuyue2:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.zhuyue.length=0; + } + }, + longxi:{ + trigger:{player:['chooseToRespondBegin','chooseToUseBegin']}, + forced:true, + popup:false, + max:2, + filter:function(event,player){ + return _status.currentPhase!=player; + }, + priority:101, + content:function(){ + var cards=[]; + var max=Math.min(ui.cardPile.childNodes.length,lib.skill.longxi.max); + for(var i=0;i=2; + }, + check:function(card){ + return 8-get.value(card); + }, + filterCard:function(card){ + return get.color(card)=='red'; + }, + selectCard:2, + filterTarget:function(card,player,target){ + return player!=target&&target.hp>=player.hp; + }, + intro:{ + content:'limited' + }, + line:'fire', + content:function(){ + "step 0" + player.storage.guanri=true; + player.loseHp(); + "step 1" + target.damage(2,'fire'); + "step 2" + if(target.isAlive()){ + target.discard(target.getCards('e')); + } + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + var eff=get.damageEffect(target,player,target,'fire'); + if(player.hp>2) return eff; + if(player.hp==2&&target.hp==2) return eff; + return 0; + } + }, + expose:0.5 + } + }, + tianxian:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(card.name=='sha') return true; + }, + selectTarget:function(card,player,range){ + if(card.name=='sha'&&range[1]!=-1) range[1]=Infinity; + } + }, + priority:5.5, + trigger:{player:'useCardToBefore'}, + filter:function(event){ + return event.card.name=='sha'; + }, + forced:true, + check:function(){ + return false; + }, + content:function(){ + "step 0" + trigger.target.judge(function(card){ + return get.color(card)=='black'?1:0; + }); + "step 1" + if(result.bool){ + trigger.untrigger(); + trigger.finish(); + } + } + }, + runxin:{ + trigger:{player:['useCard','respondEnd']}, + direct:true, + filter:function(event){ + if(get.suit(event.card)=='heart'){ + return game.hasPlayer(function(current){ + return current.isDamaged(); + }); + } + return false; + }, + content:function(){ + "step 0" + var noneed=(trigger.card.name=='tao'&&trigger.targets[0]==player&&player.hp==player.maxHp-1); + player.chooseTarget(get.prompt('runxin'),function(card,player,target){ + return target.hp0){ + if(noneed&&player==target){ + num=0.5; + } + else if(target.hp==1){ + num+=3; + } + else if(target.hp==2){ + num+=1; + } + } + return num; + } + "step 1" + if(result.bool){ + player.logSkill('runxin',result.targets); + result.targets[0].recover(); + } + }, + ai:{ + expose:0.3, + threaten:1.5 + } + }, + zhimeng:{ + trigger:{player:'phaseEnd'}, + direct:true, + locked:true, + unique:true, + gainable:true, + alter:true, + group:'zhimeng3', + content:function(){ + "step 0" + player.chooseTarget(get.prompt('zhimeng'),function(card,player,target){ + return player!=target; + }).ai=function(target){ + var num=get.attitude(player,target); + if(num>0){ + if(player==target){ + num++; + } + if(target.hp==1){ + num+=3; + } + if(target.hp==2){ + num+=1; + } + } + return num; + } + "step 1" + if(result.bool){ + var target=result.targets[0]; + if(get.is.altered('zhimeng')){ + target.draw(); + } + else{ + var card=get.cards()[0]; + target.$draw(card); + target.storage.zhimeng2=card; + game.addVideo('storage',target,['zhimeng2',get.cardInfo(card),'card']); + target.addSkill('zhimeng2'); + } + player.logSkill('zhimeng',target); + } + }, + ai:{ + expose:0.2 + } + }, + zhimeng2:{ + intro:{ + content:'card', + onunmark:function(storage,player){ + delete player.storage.zhimeng2; + } + }, + mark:'card', + trigger:{target:'useCardToBegin'}, + frequent:true, + filter:function(event,player){ + return player.storage.zhimeng2&&get.type(event.card,'trick')==get.type(player.storage.zhimeng2,'trick'); + }, + content:function(){ + player.draw(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(target.storage.zhimeng2&&get.type(card,'trick')==get.type(target.storage.zhimeng2,'trick')){ + return [1,0.5]; + } + } + } + } + }, + zhimeng3:{ + trigger:{player:['phaseBegin','dieBegin']}, + forced:true, + popup:false, + silent:true, + content:function(){ + "step 0" + event.players=game.filterPlayer(); + event.num=0; + "step 1" + if(event.num1){ + return 11-get.equipValue(card); + } + if(player.countCards('h')0; - } - } - }, - tuoqiao_old:{ - filter:function(event,player){ - return game.players.length>3&&(event.player==player.next||event.player==player.previous); - }, - check:function(event,player){ - return get.effect(player,event.card,event.player,player)<0 - }, - changeSeat:true, - trigger:{target:'useCardToBefore'}, - content:function(){ - if(trigger.player==player.next){ - game.swapSeat(player,player.previous); - } - else if(trigger.player==player.previous){ - game.swapSeat(player,player.next); - } - else{ - return; - } - trigger.untrigger(); - trigger.finish(); - // player.popup('xiaoyao'); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(target==player.next||target==player.previous) return 0.1; + }, + ai:{ + shihuifen:true, + skillTagFilter:function(player){ + return player.countCards('he',{color:'black'})>0; } } - } - }, - tianjian_old:{ - enable:'phaseUse', - usable:1, - changeSeat:true, - filterTarget:function(card,player,target){ - return player!=target&&player.next!=target; }, - filterCard:true, - check:function(card){ - return 4-get.value(card); - }, - content:function(){ - while(player.next!=target){ - game.swapSeat(player,player.next); - } - }, - ai:{ - order:5, - result:{ - player:function(player,target){ - var att=get.attitude(player,target); - if(target==player.previous&&att>0) return 1; - if(target==player.next.next&&get.attitude(player,player.next)<0) return 1; - return 0; + tuoqiao_old:{ + filter:function(event,player){ + return game.players.length>3&&(event.player==player.next||event.player==player.previous); + }, + check:function(event,player){ + return get.effect(player,event.card,event.player,player)<0 + }, + changeSeat:true, + trigger:{target:'useCardToBefore'}, + content:function(){ + if(trigger.player==player.next){ + game.swapSeat(player,player.previous); + } + else if(trigger.player==player.previous){ + game.swapSeat(player,player.next); + } + else{ + return; + } + trigger.untrigger(); + trigger.finish(); + // player.popup('xiaoyao'); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(target==player.next||target==player.previous) return 0.1; + } } } - } - }, - huimeng:{ - trigger:{player:'recoverAfter'}, - frequent:true, - content:function(){ - player.draw(2); }, - ai:{ - threaten:0.8 - } - }, - tianshe:{ - group:['tianshe2'], - trigger:{player:'damageBefore'}, - filter:function(event){ - if(event.nature) return true; - }, - forced:true, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - nofire:true, - nothunder:true, - effect:{ - target:function(card,player,target,current){ - if(card.name=='tiesuo') return 0; - if(get.tag(card,'fireDamage')) return 0; - if(get.tag(card,'thunderDamage')) return 0; + tianjian_old:{ + enable:'phaseUse', + usable:1, + changeSeat:true, + filterTarget:function(card,player,target){ + return player!=target&&player.next!=target; + }, + filterCard:true, + check:function(card){ + return 4-get.value(card); + }, + content:function(){ + while(player.next!=target){ + game.swapSeat(player,player.next); + } + }, + ai:{ + order:5, + result:{ + player:function(player,target){ + var att=get.attitude(player,target); + if(target==player.previous&&att>0) return 1; + if(target==player.next.next&&get.attitude(player,player.next)<0) return 1; + return 0; + } } } + }, + huimeng:{ + trigger:{player:'recoverAfter'}, + frequent:true, + content:function(){ + player.draw(2); + }, + ai:{ + threaten:0.8 + } + }, + tianshe:{ + group:['tianshe2'], + trigger:{player:'damageBefore'}, + filter:function(event){ + if(event.nature) return true; + }, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + nothunder:true, + effect:{ + target:function(card,player,target,current){ + if(card.name=='tiesuo') return 0; + if(get.tag(card,'fireDamage')) return 0; + if(get.tag(card,'thunderDamage')) return 0; + } + } + } + }, + tianshe2:{ + trigger:{source:'damageAfter'}, + filter:function(event,player){ + if(event.nature&&player.hpevent.card2.number){ - return !get.owner(event.card2); - } - else{ - return !get.owner(event.card1); - } - } - else{ - if(event.card1.numberevent.card2.number){ - return event.card2.name!='du'; - } - else{ - return event.card1.name!='du'; - } - } - else{ - if(event.card1.numbertrigger.card2.number){ - player.gain(trigger.card2,'gain2'); - } - else{ - player.gain(trigger.card1,'gain2'); - } - } - else{ - if(trigger.card1.number0; - }, - content:function(){ - 'step 0' - var goon=true; - if(get.attitude(player,trigger.player)>=-0.8) goon=false; - else if(trigger.player.countCards('h')<=3) goon=false; - else if(player.countCards('h','shan')==0) goon=false; - var es=player.getCards('e'); - var color=[]; - for(var i=0;i0){ - return 1+Math.random(); - } - return 0; - } - if(button.link=='nanman'||button.link=='wanjian'||button.link=='taoyuan'||button.link=='wugu'){ - var eff=0; - for(var i=0;i0){ - return 1+Math.random(); - } - return 0; - } - return Math.random(); + cenhun:['male','wu',3,['jishe','lianhuo']], + huanghao:['male','shu',3,['qinqing','huisheng']], + zhangrang:['male','qun',3,['taoluan']], + sunziliufang:['male','wei',3,['guizao','jiyu']], + }, + characterIntro:{ + huaxiong:'董卓旗下名将,自荐抵抗山东地区反对董卓的诸侯联军于汜水关前,他先后斩杀济北相鲍信之弟鲍忠和孙坚部将祖茂、以及袁术部将俞涉和韩馥手下潘凤等人,最后关东联军派出关羽与之一对一决斗而被杀。', + caozhi:'字子建,沛国谯人,三国曹魏著名文学家,建安文学代表人物。魏武帝曹操之子,魏文帝曹丕之弟,生前曾为陈王,去世后谥号“思”,因此又称陈思王。南朝宋文学家谢灵运更有“天下才有一石,曹子建独占八斗”的评价。王士祯尝论汉魏以来二千年间诗家堪称“仙才”者,曹植、李白、苏轼三人耳。', + gaoshun:'中国东汉末年将领,吕布帐下中郎将。史载高顺为人清白有威严,不好饮酒,所统率的部队精锐非常,号称“陷阵营”。屡进忠言于吕布,吕布虽知其忠而不能用。曹操击破吕布后,高顺被曹操所杀。', + chengong:'字公台,东汉末年吕布帐下谋士,东郡东武阳人。性情刚直,足智多谋,年少时与海内知名之士相互结交。192年,陈宫等人主张曹操接任兖州牧。但此后陈宫因曹操杀害边让而与曹操反目,并游说张邈等人背叛曹操迎吕布入兖州,辅助吕布攻打曹操。吕布战败后,随吕布等一同被曹操所擒,决意赴死。', + lingtong:'字公绩,吴郡馀杭人,三国时期吴国名将。凌操之子,官至偏将军。', + masu:'字幼常,襄阳宜城人,三国时期蜀汉大臣,侍中马良之弟。初以荆州从事跟随刘备取蜀入川,曾任绵竹、成都令、越嶲太守。诸葛亮北伐时因作战失误而失守街亭,因而被诸葛亮所斩。', + wuguotai:'吴国太,小说《三国演义》中的人物,不见于正史记载。在小说中,吴国太被描述为孙坚的次妻,孙坚正妻武烈皇后(小说中写作吴太夫人)的妹妹,孙朗、孙仁(孙尚香)的母亲。', + xusheng:'字文向,琅邪莒县人。三国时期吴将。徐盛最初因讨伐山贼有功而被加为中郎将,后于濡须口之战中表现出色,得到孙权的赞赏。魏文帝曹丕伐吴时,徐盛以疑城之计退去魏军。', + yujin:'字文则,泰山钜平人。三国时期曹魏武将。本为鲍信部将,后属曹操,曹操称赞他可与古代名将相比。然而在建安二十四年的襄樊之战中,于禁在败给关羽后投降,致使一代名将晚节不保。', + zhangchunhua:'西晋宣穆皇后张春华(189-247),河内平皋(今河南温县)人。她是晋宣帝司马懿之妻,晋景帝司马师、晋文帝司马昭的母亲。后被追尊为皇后。', + fazheng:'字孝直,本为刘璋部下,刘备围成都时劝说刘璋投降,而后又与刘备进取汉中,献计将曹操大将夏侯渊斩首。法正善奇谋,深受刘备信任和敬重。', + xushu:'字元直,与司马徽、诸葛亮等人为友。先化名单福仕官于新野的刘备,后因曹操囚禁其母而不得不弃备投操,临行前向刘备推荐诸葛亮之才。入曹营后,一言不发,不曾为曹操进献过一计半策。后人形容徐庶“身在曹营心在汉”。', + caozhang:'字子文,是曹操与武宣卞皇后所生第二子,曹丕之弟,曹植之兄,曹魏任城王。曹彰武艺过人,曹操问诸子志向时自言“好为将”,因此得到曹操的赞赏。其胡须黄色,被曹操称为“黄须儿”。', + xunyou:'字公达,颍川颍阴人。东汉末年曹操的五谋臣之一,荀彧从子,被曹操称为“谋主”。官至尚书令。正始五年被追谥为敬侯。', + liaohua:'本名淳,字元俭,襄阳中卢(今湖北襄樊)人。三国时期蜀国后期将领,以勇敢果断著称。廖化是三国时代中经历了魏、蜀、吴整个兴衰过程极少数人中的一个,与严颜、黄忠共称为蜀汉三老将。', + bulianshi:'步夫人(?-238),讳练师,临淮淮阴人。东吴丞相步骘同族,吴大帝孙权之妃,在孙权众夫人中最受孙权的宠爱(宠冠后庭),生有二女:孙鲁班、孙鲁育。赤乌元年卒,追封为皇后,葬于蒋陵。', + chengpu:'字德谋,右北平土垠人。历仕孙坚、孙策、孙权三任君主。孙策死后,他与张昭等人共同辅佐孙权,并讨伐江东境内的山贼,功勋卓著。被人们尊称为“程公”。', + handang:'字义公,辽西令支(今河北迁安)人,吴国将领。韩当因为长于弓箭、骑术并且膂力过人而被孙坚赏识,追随他四处征伐周旋,数次冒险犯难,攻陷敌人、擒拿俘虏。对江东基业的逐渐稳固和吴国的建立有着重要影响。', + liubiao:'刘表,字景升,山阳郡高平(今山东微山)人。东汉末年名士,汉室宗亲,荆州牧,汉末群雄之一。', + zhonghui:'字士季。魏名将,太傅钟繇之子。公元263年,他与邓艾带兵攻打蜀国,最终导致蜀国灭亡。之后钟会设计害死邓艾,联合姜维准备自立,最终因部下反叛失败,与姜维一同死于兵变。', + wangyi:'益州刺史赵昂之妻,赵英、赵月之母。马超作乱凉州时,王异协助丈夫守城,多有功勋,自马超攻冀城至祁山坚守,赵昂曾出奇计九条,王异皆有参与。', + guanzhang:'关兴,名将关羽之子,继承了父亲汉寿亭侯的爵位。年少时即受诸葛亮器重,在蜀汉担任侍中、中监军之职,后在夷陵之战中报了杀父之仇。张苞,张飞的长子,使用父亲的家传蛇矛为兵器,勇猛剽悍不弱其父。', + madai:'名将马超的从弟。早年他曾经从曹操手中死里逃生,后跟随马超大战曹操。后在诸葛亮病逝后受杨仪派遣斩杀了蜀将魏延。曾率领军队出师北伐,被魏将牛金击败而退还。', + caochong:'字仓舒,曹操之子。从小聪明仁爱,与众不同,深受曹操喜爱。留有“曹冲称象”的典故。曹操几次对群臣夸耀他,有让他继嗣之意。可惜曹冲在建安十三病逝,年仅13岁。', + guohuai:'魏国名将,夏侯渊战死时郭淮收集残兵,与杜袭共推张郃为主将而得以稳定局势。曹丕称帝后,赐郭淮爵关内侯,又任镇西长史。诸葛亮伐魏时,郭淮料敌准确,多立战功,而后亦曾击退姜维。', + manchong:'初在曹操手下任许县县令,掌管司法,以执法严格著称;转任汝南太守,开始参与军事,曾参与赤壁之战。后关羽围攻樊城,满宠协助曹仁守城,劝阻了弃城而逃的计划,成功坚持到援军到来。曹丕在位期间,满宠驻扎在新野,负责荆州侧的对吴作战。曹叡在位期间,满宠转任到扬州,接替曹休负责东侧对吴作战,屡有功劳。', + guanping:'关平是关羽在战乱中所收之义子。关羽脱离曹军后,与刘备于关定家中重逢,关定欲使年仅十八岁的关平随关羽同行,刘备便主张让关羽与关平结为义父子。自此后关平随侍在关羽身边,一生东征西讨。他武勇过人,不逊乃父,曾跟随刘备出征西川,立下战功,后来又与曹魏猛将庞德大战三十回合,不分胜负。', + jianyong:'简雍为刘备同乡,年少时与刘备相识。黄巾之乱时,刘备加入对抗黄巾军的战争,简雍便跟随他奔走。常作为谈客,往来使命,刘备围成都时简雍作为刘备使臣成功劝说刘璋投降。简雍擅于辩论、议事。性情简单直接、不拘小节。', + liufeng:'刘备义子。性格刚猛,气力过人。随赵云、张飞等扫荡西川,颇有战功,而后又统领孟达攻取上庸,深为刘备信任。但是后来关羽北伐曹魏,多次要求刘封起兵相助,刘封不从。而后又侵凌孟达,迫其降魏。孟达与魏徐晃共袭刘封,并劝刘封投降,刘封不降,又遭部下叛变,败归成都。刘备在诸葛亮的建议下赐死刘封,刘封自裁,刘备深表痛惜。', + panzhangmazhong:'马忠为潘璋部将。于麦城之战中设伏擒获关羽及关平。刘备伐吴时,马忠随潘璋等往拒,突袭射伤蜀将黄忠,导致黄忠阵亡。不久,潘璋为关兴所杀,马忠领兵围击,击退张苞援军。后降将糜、傅发动兵变,刺杀了马忠,将首级献于刘备。', + yufan:'虞翻初在会稽被太守王朗任命为功曹,曾劝谏王朗躲开孙策未果。后孙策占江东仍任命他为功曹。吕蒙袭取荆州时,虞翻提醒其躲过了埋伏,成功占领城池。后因为直言进谏被孙权发配到交州。', + zhuran:'吴国著名将领,吕蒙白衣渡江取荆州,朱然协助潘璋捉住了关羽。黄武元年,刘备兵伐东吴,朱然与孙桓抵抗刘备大军。后又参加夷陵之战,追击刘备,被前来接应的赵云一枪刺死。', + fuhuanghou:'执金吾伏完之女,汉献帝的皇后,后因怨恨曹操诛董承,与父伏完密谋曹操,事情泄漏,曹将伏皇后禁闭冷宫逼其自缢,所生二位皇子亦被鸩杀。', + liru:'董卓的首席谋士,为董卓所亲信,大小事宜皆与其商议。董卓趁乱进京、说降吕布、废立皇帝、迁都长安等举动,均离不开李儒的参谋之功,并奉命毒杀皇帝刘辩。李傕被曹操击败后,李儒从此不知所踪,消失在历史长河中。', + caozhen:'曹操族子,官至大将军、大司马。其父为曹操招募人马时被州郡所杀,曹操因怜悯曹真少年丧父而待其如亲子一般,因赞赏曹真的勇猛而让他率领虎豹骑。曹真在镇守曹魏西北边境时表现突出,魏文帝时期督众将大破羌胡联军,平定河西;魏明帝时期屡次对抗诸葛亮的北伐。', + hanhaoshihuan:'韩浩和史涣都以忠勇著称,两人皆是曹操心腹将领,共同掌管禁兵。', + chenqun:'陈群一直位居要职,先后受曹操、曹丕托孤,成为魏国重臣,官至司空。其子陈泰,亦是魏国后期名将。最大的贡献为创立了九品中正制,为后期的人才选拔和管理打好了基础。', + wuyi:'初为益州牧刘璋的部将,刘备进攻益州时,泠苞在雒城大败,吴懿自告奋勇,领兵前往救援。不料被赵云和张飞生擒,吴懿于是归降。刘备自称汉中王,迎娶吴懿之妹。诸葛亮出师北伐,吴懿以左将军、高阳侯的身份跟随出征,屡立战功。诸葛亮逝世后,吴懿随姜维一并镇守汉中。', + zhoucang:'原为张宝部将。关羽千里走单骑时,周仓投降关羽,成为了关羽的贴身护卫。建安十六年(公元211年),刘备攻打成都时,周仓跟随关羽镇守荆州。关羽水淹七军时,周仓曾生擒魏军的立义将军庞德,关羽被孙权斩首之后,周仓在麦城大哭失声,拔剑自刎而死。', + zhangsong:'刘璋的部下,长相丑陋但有过目不忘的本领。张松奉命出使许都被曹操赶出,归蜀时为刘备所厚待,于是将西川地理图献予刘备,劝刘备取益州,愿为内应,并派好友孟达、法正帮助刘备。', + sunluban:'孙权之女。孙鲁班与孙权二子孙和不睦。孙权长子孙登死后,孙和被立为太子。孙鲁班向孙权进谗言废孙和太子之位,孙和被废后忧愤而死。', + zhuhuan:'字休穆,吴郡吴县(今江苏苏州)人,吴国名将,官至前将军、青州牧,假节,封为嘉兴侯。有一子朱异。', + guyong:'为蔡邕之徒。其为人少言语,不饮酒,严厉正大,被张纮推荐仕于孙权。孙权任命他为会稽郡丞,行太守事,后不断升迁,官至吴国丞相。顾雍为官,多进良言,有功于吴。', + jushou:'袁绍帐下谋士。史载他“少有大志,擅于谋略”。曾为冀州别驾,举茂才,并当过两次县令。后来又当韩馥别驾,被韩馥表为骑都尉。袁绍占据冀州后任用沮授为从事。经常对袁绍提出良策,但很多时候袁绍并不听从。官渡之战时袁绍大败,沮授未及逃走,被曹操所获,因拒降被曹操处死。', + caifuren:'原是刘表的小妾,正室死后,成为了刘表的后妻。因刘琮娶了自己的侄女所以对其偏爱有加。刘备客居荆州时险些受其所害。刘表死后为了让刘琮即位不惜献州于曹操。', + caorui:'魏文帝曹丕长子,曹魏第二位皇帝。在位期间指挥曹真、司马懿等人成功防御了吴、蜀的多次攻伐,并且平定鲜卑,攻灭公孙渊,颇有建树。', + caoxiu:'曹操族子,曹操大宴铜雀台之时,射箭夺袍。曹休随曹操四处征伐,在攻蜀汉中之战,伐吴濡须口之战均有登场,曾放冷箭射倒凌统的马匹,后又协助夏侯惇平息洛阳纵火叛乱,总管御林兵马,协助曹丕代汉。', + zhongyao:'初为长安郡守,马超反叛时,引军攻打长安,钟繇率军防卫。后城破,钟繇从东门弃城而走,退守潼关。后奉献帝令繇草拟诏令,册立曹操为魏王,曹操以钟繇为相国。明帝即位时,钟繇为太傅。诸葛亮北伐,钟繇举荐司马懿前往抵御。', + liuchen:'刘禅第五子,自幼聪明,英敏过人。魏军兵临城下时,刘禅准备投降,刘谌劝阻刘禅投降不成后悲愤不已,遂自杀于昭烈庙。', + xiahoushi:'夏侯渊从女,夏侯霸从妹,出城拾柴时被张飞所得,取其为妻。后生有二女,其中一人为星彩。', + zhangyi:'曾随诸葛亮南征孟获,七擒孟获的战斗中立下赫赫战功,与祝融夫人单挑。诸葛亮病死五丈原,告诉姜维张嶷忠贞勇猛,经验丰富,是可以依靠的武将,后于征伐魏国时为掩护姜维撤退阵亡。', + sunxiu:'孙权第六子,孙綝发动政变罢黜孙亮后,迎立孙休为帝。后孙綝专权,孙休遣使丁奉等人将其诛杀。孙休在位期间,颁布良制,嘉惠百姓,促进了东吴的繁荣。', + zhuzhi:'孙坚旧将,朱然嗣父,孙坚阵亡后,孙策附袁术,朱治、吕范为之定计,用玉玺向袁术借兵夺取江东。孙策平定东路后,任命朱治为吴郡太守,收军返回江东。后来赤壁之战,大都督周瑜令朱治、吕范为四方巡警使,催督六郡官军。', + quancong:'吴国名将,孙策进兵江东时归顺之,深得孙权赏识,孙权甚至将孙鲁班许配之。', + gongsunyuan:'辽东太守公孙度之孙,辽东割据首领。趁魏、吴骚乱之际自称燕王,发动叛乱,与魏对抗。败给司马懿率领的讨伐大军,被围困后乞降不被接受,与子修在欲出城逃跑时被斩杀。', + guotufengji:'两人均是袁绍帐下谋士。曾联手献计,利用公孙瓒攻击韩馥,又劝说韩馥请袁绍抵挡公孙瓒,终替袁绍拿下冀州。官渡之战期间,两人进谗逼反张郃高览,逼死田丰。使得袁绍的实力大损。', + guohuanghou:'明元郭皇后(并非郭女王),在三国志有正传。曹叡夫人,曹丕的儿媳妇,曹芳,曹髦,曹奂三朝太后,是唯一经历了曹魏全部皇帝时代的贵族女性。曹魏后三帝时期,由于皇帝年少,太后与重臣一同处理政务。史书上对郭皇后有两种截然不同的记载,一种是曹芳被废和曹髦死后郭太后发诏书斥责他们不配人君,另一种却提及曹芳被夺权期间,太后与曹芳相拥而泣,曹髦讨伐司马昭前,曾向太后禀报。', + liyan:'字正方,蜀汉重臣。初为刘表部下,曹操入主荆州时,李严西奔入蜀。刘备入川,李严率众投降,深得刘备器重,受命与诸葛亮、法正等人一同编制《蜀科》,又率军平定了蜀中盗贼。白帝城托孤,与诸葛亮共受遗诏同扶幼主。其人性格矜高难近,终因督粮不利且谎报实情而被流放,后在当地去世。', + sundeng:'字子高,孙权长子。孙权称帝后其被立为太子,受诸葛恪等人辅佐。其人性情温和而能礼贤下士,加之爱民如子,因此深受爱戴。曾劝服孙权在孙虑之死时节哀,并劝谏孙权勿用吕壹苛政。后不幸早逝,临终前上书建言,推荐了多位良臣。其亡故令孙权极为悲伤,也为南鲁党争的祸乱埋下了伏笔。', + liuyu:'伯安,幽州牧,汉室宗亲。在幽州两度任职,颇有威望。张纯、张举叛乱,刘虞恩威并施将其平定,又鼓励农商,大大改善了当地经济民生,青徐二州流民纷纷前来避难。后坚拒袁绍等人立其为帝的请求,派兵迎接献帝,却为袁术所扣,并因此事激化了与公孙瓒的矛盾,最终被击败,为其所害。', + cenhun:'岑昏为宦官,官列中常侍,孙皓即位后得到宠幸。280年,晋龙骧将军王濬率军伐吴,岑昏建议以铁锁链封锁长江,阻挡晋军进攻。王濬以火船烧锁链破其计,沿途东吴将士或死或降。群臣上奏东吴衰败之因在于岑昏,将他与蜀汉的黄皓并列为误国之奸臣。', + sunziliufang:'孙资在曹操手下历任县令,参丞相军事;刘放曾有劝王松归顺曹操之举,为曹操所欣赏,遂招为司空府官,又外放历任几处县令。魏国初建之际,孙资与刘放俱任秘书郎。曹丕继位后,二人一同掌握机密。曹睿病危时,二人力荐曹爽,又推荐招回司马懿辅政。最后,曹睿独召曹爽、司马懿、刘放、孙资同受诏命,而免去曹宇、夏侯献、曹肇、秦朗的官职。', + huanghao:'宦官。为后主刘禅所宠,专秉朝政。黄皓与大将军姜维不睦,维启后主杀之,后主不从。皓阴以心腹阎宇替维。景耀六年,蜀亡,邓艾预欲杀之,皓贿赂左右得免。及后主迁洛阳,皓为司马昭凌迟处死。', + zhangrang:'汉中常侍。同赵忠、曹节、段珪等为“十常侍”,为灵帝所宠。让等专权乱政、卖官索财,朝野皆痛恨之。郎中张钧上书奏请诛杀十常侍,帝不允,让等阴杀钧。及灵帝崩,大将军何进欲杀让等,让阴结何太后,招进入宫,斩杀之。部将袁绍引兵攻让,让等劫帝走河上。追急,让投水自尽。', + }, + perfectPair:{ + wuguotai:['sunjian','sunshangxiang'], + zhangchunhua:['simayi'], + caozhi:['zhenji'], + xunyou:['xunyu'], + xushu:['liubei'], + lingtong:['ganning'], + chengong:['lvbu'], + bulianshi:['sunquan'], + fuhuanghou:['liuxie'], + sunluban:['quancong'], + caifuren:['liubiao'], + xiahoushi:['zhangfei'], + zhoucang:['guanyu'], + guanping:['guanyu'], + sundeng:['sunquan'], + liru:['dongzhuo'], + liuchen:['liushan'], + }, + skill:{ + jyzongshi:{ + audio:2, + trigger:{player:['chooseToCompareAfter','compareMultipleAfter'],target:['chooseToCompareAfter','compareMultipleAfter']}, + filter:function(event,player){ + if(event.preserve) return false; + if(player==event.player){ + if(event.card1.number>event.card2.number){ + return !get.owner(event.card2); + } + else{ + return !get.owner(event.card1); + } + } + else{ + if(event.card1.numberevent.card2.number){ + return event.card2.name!='du'; + } + else{ + return event.card1.name!='du'; + } + } + else{ + if(event.card1.numbertrigger.card2.number){ + player.gain(trigger.card2,'gain2'); + } + else{ + player.gain(trigger.card1,'gain2'); + } + } + else{ + if(trigger.card1.number0; + }, + content:function(){ + 'step 0' + var goon=true; + if(get.attitude(player,trigger.player)>=-0.8) goon=false; + else if(trigger.player.countCards('h')<=3) goon=false; + else if(player.countCards('h','shan')==0) goon=false; + var es=player.getCards('e'); + var color=[]; + for(var i=0;i0){ + return 1+Math.random(); + } + return 0; + } + if(button.link=='nanman'||button.link=='wanjian'||button.link=='taoyuan'||button.link=='wugu'){ + var eff=0; + for(var i=0;i0){ + return 1+Math.random(); + } + return 0; + } + return Math.random(); - }, - backup:function(links,player){ - return { - filterCard:false, - selectCard:0, - popname:true, - viewAs:{name:links[0][2]}, - onuse:function(result,player){ - player.storage.taoluan.push(result.card.name); - }, - } - }, - prompt:function(links,player){ - return '选择'+get.translation(links[0][2])+'的目标'; - } - }, - ai:{ - order:4, - result:{ - player:function(player){ - var allshown=true,players=game.filterPlayer(); - for(var i=0;i0){ - return 1; - } - } - if(allshown) return 1; - return 0; - } - }, - threaten:1.6, - }, - group:['taoluan2'] - }, - taoluan2:{ - trigger:{player:['useCardAfter','respondAfter']}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='taoluan_backup'||event.skill=='taoluan5'; - }, - content:function(){ - 'step 0' - player.chooseTarget(true,function(card,player,target){ - return target!=player; - },'滔乱

令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别相同的牌;2.你失去1点体力').set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0){ - if(get.attitude(target,player)>0){ - return target.countCards('h'); - } - return target.countCards('h')/2; - } - return 0; - }); - 'step 1' - var target=result.targets[0]; - event.target=target; - player.line(target,'green'); - var type=get.type(trigger.card,'trick'); - target.chooseCard('滔乱

交给'+get.translation(player)+'一张'+get.translation(type)+'牌,或令其失去一点体力且滔乱无效直到回合',function(card,player,target){ - return get.type(card,'trick')==_status.event.cardType; - }).set('cardType',type).set('ai',function(card){ - if(_status.event.att){ - return 11-get.value(card); - } - return 0; - }).set('att',get.attitude(target,player)>0); - 'step 2' - var target=event.target; - if(result.bool){ - player.gain(result.cards,target); - target.$give(result.cards,player); - } - else{ - player.addTempSkill('taoluan3','phaseAfter'); - player.loseHp(); - } - } - }, - taoluan3:{}, - taoluan4:{ - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!event.filterCard({name:'shan'})) return false; - if(player.storage.taoluan.contains('shan')) return false; - return true; - }, - check:function(event,player){ - var allshown=true,players=game.filterPlayer(); - for(var i=0;i1&&get.attitude(player,players[i])>0){ - return 1; - } - } - return 0; - }, - content:function(){ - trigger.untrigger(); - trigger.responded=true; - trigger.result={bool:true,card:{name:'shan'},skill:'taoluan_backup'}; - player.storage.taoluan.push('shan'); - }, - }, - taoluan5:{ - enable:'chooseToUse', - filter:function(event,player){ - return event.type=='dying'&&!player.storage.taoluan.contains('tao'); - }, - onuse:function(result,player){ - player.storage.taoluan.push('tao'); - }, - filterCard:function(){ - return false; - }, - selectCard:-1, - viewAs:{name:'tao'}, - ai:{ - skillTagFilter:function(player){ - return !player.storage.taoluan.contains('tao'); - }, - threaten:1.5, - save:true, - } - }, - taoluan_backup:{}, - jishe:{ - enable:'phaseUse', - filter:function(event,player){ - return player.getHandcardLimit()>0; - }, - init:function(player){ - player.storage.jishe=0; - }, - usable:20, - content:function(){ - player.draw(); - player.storage.jishe++; - }, - ai:{ - order:10, - result:{ - player:function(player){ - if(player.countCards('h')0); - var goon=false; - if(player.hp==1){ - goon=true; - } - else{ - var he=player.getCards('he'); - var num=0; - for(var i=0;i=2){ - goon=true;break; - } - } - } - } - player.chooseCard('he',[1,player.countCards('he')],get.prompt('huisheng',trigger.source)).set('ai',function(card){ - if(_status.event.att){ - return 10-get.value(card); - } - if(_status.event.goon){ - return 8-get.value(card); - } - return 0; - }).set('goon',goon).set('att',att); - 'step 1' - if(result.bool){ - player.logSkill('huisheng'); - event.num=result.cards.length; - var goon=false; - if(event.num>2||get.attitude(trigger.source,player)>=0){ - goon=true; - } - var forced=false; - var str='获得其中一张牌并防止伤害'; - if(trigger.source.countCards('he')0; - }).set('ai',function(target){ - var player=_status.event.player; - var zhu=_status.event.zhu; - if(get.attitude(player,target)>0) return 0; - var nh=target.countCards('h'); - var nh2=zhu.countCards('h'); - if(nh>nh2) return 2; - if(nh==nh2&&target.countCards('e')) return 1.5; - return 1; - }).set('zhu',get.zhu(player)); - 'step 1' - if(result.bool){ - event.target=result.targets[0]; - player.logSkill('qinqing',event.target); - player.discardPlayerCard(event.target,'he',true); - } - else{ - event.finish(); - } - 'step 2' - event.target.draw(); - 'step 3' - if(event.target.countCards('h')>get.zhu(player).countCards('h')){ - player.draw(); - } - }, - ai:{ - threaten:1.2 - } - }, - guizao:{ - trigger:{player:'phaseDiscardEnd'}, - direct:true, - filter:function(event,player){ - if(event.cards&&event.cards.length>1){ - var suits=[]; - for(var i=0;i0||target.hp<=2){ - spade=false; - } - target.chooseToDiscard('h',true).set('ai',function(card){ - if(get.suit(card)=='spade'){ - if(_status.event.spade){ - return 10-get.value(card); - } - else{ - return -10-get.value(card); - } - } - if(_status.event.getParent().player.storage.jiyu2.contains(get.suit(card))){ - return -3-get.value(card); - } - return -get.value(card); - }).set('spade',spade); - 'step 1' - var card=result.cards[0]; - if(get.suit(card)=='spade'){ - player.turnOver(); - target.loseHp(); - } - player.storage.jiyu.push(target); - player.storage.jiyu2.add(get.suit(card)); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(player.isTurnedOver()||target.countCards('h')<=3) return -1; - return 0; - } - } - }, - group:'jiyu2', - mod:{ - cardEnabled:function(card,player){ - if(player.storage.jiyu2&&player.storage.jiyu2.contains(get.suit(card))) return false; - } - } - }, - jiyu2:{ - trigger:{player:['phaseUseBegin','phaseAfter']}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.jiyu=[]; - player.storage.jiyu2=[]; - } - }, - jiaozhao:{ - enable:'phaseUse', - usable:1, - audio:2, - check:function(card){ - return 8-get.value(card); - }, - filterCard:true, - discard:false, - lose:false, - content:function(){ - 'step 0' - player.showCards(cards); - 'step 1' - if(player.storage.jiaozhao2){ - event.target=player; - } - else{ - var targets=game.filterPlayer(); - targets.remove(player); - targets.sort(function(a,b){ - return Math.max(1,get.distance(player,a))-Math.max(1,get.distance(player,b)); - }); - var distance=Math.max(1,get.distance(player,targets[0])); - for(var i=1;idistance){ - targets.splice(i);break; - } - } - player.chooseTarget(true,function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }).set('targets',targets); - } - 'step 2' - if(!event.target){ - event.target=result.targets[0]; - player.line(result.targets,'green'); - } - if(!event.target){ - event.finish(); - return; - } - var list=['sha','shan','tao','jiu']; - if(player.storage.jiaozhao1){ - list=list.concat(['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']); - } - for(var i=0;i=5){ - choice='jiu'; - } - else if(nh<=2){ - choice='sha'; - } - else{ - choice=Math.random()<0.5?'sha':'jiu'; - } - } - else{ - var recover=0,lose=1,players=game.filterPlayer(); - for(var i=0;i0){ - if(players[i].hp<2){ - lose--; - recover+=0.5; - } - lose--; - recover++; - } - else if(get.attitude(player,players[i])<0){ - if(players[i].hp<2){ - lose++; - recover-=0.5; - } - lose++; - recover--; - } - } - else{ - if(get.attitude(player,players[i])>0){ - lose--; - } - else if(get.attitude(player,players[i])<0){ - lose++; - } - } - } - } - if(lose>recover&&lose>0){ - choice=Math.random()<0.7?'nanman':'wanjian'; - } - else if(lose0){ - choice='taoyuan'; - } - else{ - choice=Math.random()<0.5?'wuzhong':'shunshou'; - } - } - } - event.target.chooseButton(['矫诏',[list,'vcard']],true).set('ai',function(button){ - return button.link[2]==_status.event.choice?1:0; - }).set('choice',choice); - 'step 3' - var chosen=result.links[0][2]; - event.target.showCards(game.createCard({name:chosen,suit:cards[0].suit,number:cards[0].number}),get.translation(event.target)+'声明了'+get.translation(chosen)); - player.storage.jiaozhao=cards[0]; - player.storage.jiaozhao_card=chosen; - game.broadcastAll(function(name){ - lib.skill.jiaozhao2.viewAs={name:name}; - },result.links[0][2]); - }, - ai:{ - order:9, - result:{ - player:1 - } - }, - intro:{ - content:function(storage,player){ - if(player.storage.jiaozhao2){ - return '出牌阶段限一次,你可以展示一张手牌,然后你声明一张基本牌或普通锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标'; - } - else{ - return '出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌或普通锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标'; - } - } - }, - group:['jiaozhao2','jiaozhao3'] - }, - jiaozhao2:{ - enable:'phaseUse', - audio:'jiaozhao', - filter:function(event,player){ - if(!player.storage.jiaozhao) return false; - var name=player.storage.jiaozhao_card; - if(name=='tao'||name=='shan'||name=='wuzhong'||name=='jiu') return false; - return player.getCards('h').contains(player.storage.jiaozhao); - }, - filterCard:function(card,player){ - return card==player.storage.jiaozhao; - }, - selectCard:-1, - popname:true, - filterTarget:function(card,player,target){ - if(player==target) return false; - return lib.filter.filterTarget({name:player.storage.jiaozhao_card},player,target); - }, - check:function(card){ - return 8-get.value(card); - }, - ai:{ - order:6 - } - }, - jiaozhao3:{ - trigger:{player:'phaseEnd'}, - forced:true, - popup:false, - content:function(){ - delete player.storage.jiaozhao; - delete player.storage.jiaozhao_card; - } - }, - danxin:{ - trigger:{player:'damageEnd'}, - frequent:true, - audio:2, - content:function(){ - 'step 0' - if(player.storage.jiaozhao1&&player.storage.jiaozhao2){ - player.draw(); - event.finish(); - } - else{ - var list=['draw_card','更改描述']; - var prompt; - if(player.storage.jiaozhao1){ - prompt='摸一张牌或更改矫诏的描述

更改描述:将“选择距离最近的一名其他角色,该角色”改为“你”'; - } - else{ - prompt='摸一张牌或更改矫诏的描述

更改描述:将“基本牌”改为“基本牌或普通锦囊牌”'; - } - player.chooseControl(list,function(){ - if(!_status.event.player.hasSkill('jiaozhao')) return 'draw_card'; - return '更改描述'; - }).set('prompt',prompt); - } - 'step 1' - if(result.control=='draw_card'){ - player.draw(); - } - else{ - game.log(player,'更改了','【矫诏】','的描述'); - player.popup('更改描述'); - player.markSkill('jiaozhao'); - if(player.storage.jiaozhao1){ - player.storage.jiaozhao2=true; - } - else{ - player.storage.jiaozhao1=true; - } - } - } - }, - zongzuo:{ - trigger:{global:'phaseBefore'}, - forced:true, - priority:10, - audio:2, - filter:function(event,player){ - return !player.storage.zongzuo; - }, - content:function(){ - 'step 0' - player.storage.zongzuo=true; - var list=['wei','shu','wu','qun']; - var num=game.countPlayer(function(current){ - if(list.contains(current.group)){ - list.remove(current.group); - return true; - } - }); - player.gainMaxHp(num); - event.num=num; - 'step 1' - player.hp+=event.num; - player.update(); - }, - group:'zongzuo_lose', - subSkill:{ - lose:{ - trigger:{global:'dieAfter'}, - forced:true, - audio:'zongzuo', - filter:function(event,player){ - var list=['wei','shu','wu','qun']; - if(!list.contains(event.player.group)) return false; - if(game.hasPlayer(function(current){ - return current.group==event.player.group; - })){ - return false; - } - return true; - }, - content:function(){ - player.loseMaxHp(); - } - } - } - }, - zhige:{ - enable:'phaseUse', - usable:1, - audio:2, - filter:function(event,player){ - return player.countCards('h')>player.hp; - }, - filterTarget:function(card,player,target){ - return get.distance(target,player,'attack')<=1&&target.countCards('e')>0; - }, - content:function(){ - 'step 0' - target.chooseToUse({name:'sha'},'止戈:使用一张杀,或将其装备区里的一张牌交给'+get.translation(player)); - 'step 1' - if(!result.bool&&target.countCards('e')){ - target.chooseCard('e',true,'将其装备区里的一张牌交给'+get.translation(player)); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool&&result.cards&&result.cards.length){ - player.gain(result.cards,target); - target.$give(result.cards,player); - } - }, - ai:{ - expose:0.2, - order:5, - result:{ - target:-1, - player:function(player,target){ - if(target.countCards('h')==0) return 0; - if(target.countCards('h')==1) return -0.1; - if(player.hp<=2) return -2; - if(player.countCards('h','shan')==0) return -1; - return -0.5; - } - } - } - }, - kuangbi:{ - enable:'phaseUse', - usable:1, - audio:2, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - content:function(){ - 'step 0' - target.chooseCard('he',[1,3],'匡弼:将1~3张牌置于'+get.translation(player)+'的武将牌上',true).set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ - return 7-get.value(card); - } - return -get.value(card); - }); - 'step 1' - if(result.bool){ - target.$give(result.cards,player); - target.lose(result.cards,ui.special); - player.storage.kuangbi_draw=result.cards; - player.storage.kuangbi_draw_source=target; - player.syncStorage('kuangbi_draw'); - player.addSkill('kuangbi_draw'); - } - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(get.attitude(player,target)>0){ - return Math.sqrt(target.countCards('he')); - } - return 0; - }, - player:1 - } - }, - subSkill:{ - draw:{ - trigger:{player:'phaseBegin'}, - forced:true, - mark:true, - intro:{ - content:'cards' - }, - content:function(){ - var cards=player.storage.kuangbi_draw; - if(cards){ - player.gain(cards,'gain2'); - var target=player.storage.kuangbi_draw_source; - if(target&&target.isAlive()){ - target.draw(cards.length); - } - } - delete player.storage.kuangbi_draw; - delete player.storage.kuangbi_draw_source; - player.removeSkill('kuangbi_draw'); - } - } - } - }, - fulin:{ - trigger:{player:'phaseDiscardBegin'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.addTempSkill('fulin2','phaseDiscardAfter'); - }, - group:['fulin_count','fulin_reset'], - subSkill:{ - reset:{ - trigger:{player:['phaseBegin','phaseEnd']}, - forced:true, - popup:false, - silent:true, - priority:10, - content:function(){ - player.storage.fulin=[]; - } - }, - count:{ - trigger:{player:'gainEnd'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return _status.currentPhase==player; - }, - content:function(){ - if(!player.storage.fulin){ - player.storage.fulin=[]; - } - for(var i=0;i0; - }, - audio:2, - content:function(){ - 'step 0' - var card=target.getCards('h').randomGet(); - player.gain(card,target); - target.$giveAuto(card,player); - 'step 1' - var name=get.translation(target.name); - player.chooseControl(function(){ - return Math.random()<0.5?'选项一':'选项二'; - }).set('prompt','督粮').set('choiceList',['令'+name+'观看牌堆顶的两张牌,然后获得其中的基本牌','令'+name+'于下个摸牌阶段额外摸一张牌']); - 'step 2' - if(result.control=='选项一'){ - var cards=get.cards(2); - target.viewCards('督粮',cards); - event.cards2=[]; - for(var i=0;i=_status.event.getParent().num) return -1; - if(_status.event.player.hasSkillTag('nofire')) return -1; - if(_status.event.res>=0) return 6-get.value(card); - if(get.type(card)!='basic'){ - return 10-get.value(card); - } - return 8-get.value(card); - }).set('res',res); - } - else{ - event.finish(); - } - "step 2" - if(!result.bool){ - event.target.damage(2,'fire'); - event.num=1; - } - else{ - event.num=result.cards.length+1; - } - event.goto(1); - }, - ai:{ - order:1, - result:{ - player:function(player){ - var num=0,players=game.filterPlayer(); - for(var i=0;i0){ - num--; - } - else if(att<0){ - num++; - } - } - } - if(game.players.length<5){ - return num-1; - } - else{ - return num-2; - } - } - } - }, - init:function(player){ - player.storage.xinfencheng=false; - }, - intro:{ - content:'limited' - } - }, - xinjuece:{ - audio:2, - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(player){ - return player.countCards('h')==0; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('xinjuece'),function(card,player,target){ - return target.countCards('h')==0; - }).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - 'step 1' - if(result.bool){ - player.logSkill('juece',result.targets); - result.targets[0].damage(); - } - } - }, - xinmieji:{ - audio:2, - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return get.color(card)=='black'&&get.type(card,'trick')=='trick'; - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - discard:false, - delay:false, - check:function(card){ - return 8-get.value(card); - }, - content:function(){ - 'step 0' - player.showCards(cards); - 'step 1' - ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); - var n1=target.getCards('he',function(card){ - if(!lib.filter.cardDiscardable(card,player)) return false; - return get.type(card,'trick')=='trick'; - }); - var n2=target.getCards('he',function(card){ - if(!lib.filter.cardDiscardable(card,player)) return false; - return get.type(card,'trick')!='trick'; - }); - if(n1.length>1||n2.length>2||(n1.length==1&&n2.length==2)){ - target.chooseToDiscard('弃置一张锦囊牌,或两张非锦囊牌',true,'he',function(card,player){ - if(!lib.filter.cardDiscardable(card,player)) return false; - if(!_status.event.nontrick){ - return get.type(card,'trick')=='trick'; - } - if(ui.selected.cards.length){ - return get.type(card,'trick')!='trick'; - } - return true; - }).set('ai',function(card){ - if(get.type(card,'trick')=='trick'){ - return 8-get.value(card); - } - return -get.value(card); - }).set('selectCard',function(){ - if(ui.selected.cards.length==1&&get.type(ui.selected.cards[0],'trick')=='trick'){ - return 1; - } - return 2; - }).set('nontrick',n2.length>=2).set('complexCard',true); - } - else{ - if(n1.length){ - target.discard(n1); - } - else if(n2.length){ - target.discard(n2); - } - } - }, - ai:{ - order:9, - result:{ - target:-1 - } - } - }, - qianju:{ - mod:{ - globalFrom:function(from,to,distance){ - return distance-(from.maxHp-from.hp); - } - } - }, - qingxi:{ - trigger:{source:'damageBegin'}, - check:function(event,player){ - return get.attitude(player,event.player)<0; - }, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.getEquip(1); - }, - content:function(){ - 'step 0' - var num=1; - var info=get.info(player.getEquip(1)); - if(info&&info.distance&&info.distance.attackFrom){ - num-=info.distance.attackFrom; - } - if(trigger.player.countCards('h')2){ - return 0; - } - return 8-get.value(card); - } - }); - } - 'step 1' - if(!event.directfalse&&result.bool){ - var e1=player.getEquip(1); - if(e1){ - player.discard(e1); - } - } - else{ - trigger.num++; - } - } - }, - jieyue:{ - group:'jieyue1' - }, - jieyue1:{ - audio:2, - trigger:{player:'phaseEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseCardTarget({ - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }, - filterCard:lib.filter.cardDiscardable, - ai1:function(card){ - return 7-get.useful(card); - }, - ai2:function(target){ - return 1-get.attitude(_status.event.player,target); - }, - prompt:get.prompt('jieyue') - }); - 'step 1' - if(result.bool){ - player.logSkill('jieyue1',result.targets); - player.discard(result.cards); - var target=result.targets[0]; - event.target=target; - target.chooseCard('将一张牌置于'+get.translation(player)+'的武将牌上,或令其弃置你的一张牌','he').set('ai',function(card){ - if(card.name=='du') return 20; - var player=_status.event.player; - if(get.attitude(player,_status.event.getParent().player)>0){ - return 8-get.value(card); - } - var nh=player.countCards('h'); - if(nh<=2){ - return 6-get.value(card); - } - if(nh<=3){ - return 2-get.value(card); - } - return 0; - }); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool&&result.cards&&result.cards.length){ - event.target.$give(result.cards,player); - player.storage.jieyue2=result.cards[0]; - event.target.lose(result.cards[0],ui.special); - player.syncStorage('jieyue2'); - player.addSkill('jieyue2'); - } - else if(event.target.countCards('he')){ - player.discardPlayerCard(event.target,true); - } - }, - ai:{ - expose:0.1 - } - }, - jieyue2:{ - mark:'card', - intro:{ - content:'card' - }, - audio:true, - enable:'chooseToUse', - filterCard:function(card){ - return get.color(card)=='black'; - }, - viewAsFilter:function(player){ - return player.countCards('h',{color:'black'})>0; - }, - viewAs:{name:'wuxie'}, - prompt:'将一张黑色手牌当无懈可击使用', - check:function(card){return 8-get.value(card)}, - threaten:1.2, - group:['jieyue3','jieyue4'] - }, - jieyue3:{ - enable:['chooseToRespond'], - filterCard:function(card){ - return get.color(card)=='red'; - }, - viewAs:{name:'shan'}, - viewAsFilter:function(player){ - if(!player.countCards('h',{color:'red'})) return false; - }, - audio:true, - prompt:'将一张红色手牌当闪打出', - check:function(){return 1}, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - if(!player.countCards('h',{color:'red'})) return false; - }, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.8 - } - } - } - }, - jieyue4:{ - trigger:{player:'phaseBegin'}, - forced:true, - content:function(){ - player.gain(player.storage.jieyue2,'gain2'); - player.storage.jieyue2=null; - player.removeSkill('jieyue2'); - } - }, - jinjiu:{ - mod:{ - cardEnabled:function(card,player){ - if(card.name=='jiu'&&_status.event.skill!='jinjiu') return false; - }, - cardUsable:function(card,player){ - if(card.name=='jiu'&&_status.event.skill!='jinjiu') return false; - }, - cardRespondable:function(card,player){ - if(card.name=='jiu'&&_status.event.skill!='jinjiu') return false; - }, - cardSavable:function(card,player){ - if(card.name=='jiu'&&_status.event.skill!='jinjiu') return false; - }, - }, - enable:['chooseToUse','chooseToRespond'], - filter:function(event,player){ - return player.countCards('h','jiu')>0; - }, - filterCard:{name:'jiu'}, - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(!player.countCards('h','jiu')) return false; - }, - check:function(){return 1}, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h','jiu')) return false; - }, - respondSha:true, - order:4, - useful:-1, - value:-1 - } - }, - xianzhen:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h')>0; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(target); - "step 1" - if(result.bool){ - player.storage.xianzhen=target; - player.addTempSkill('xianzhen2','phaseAfter'); - } - else{ - player.addTempSkill('xianzhen3','phaseAfter'); - } - }, - ai:{ - order:function(name,player){ - var cards=player.getCards('h'); - if(player.countCards('h','sha')==0){ - return 1; - } - for(var i=0;i11&&get.value(cards[i])<7){ - return 9; - } - } - return get.order({name:'sha'})-1; - }, - result:{ - player:function(player){ - if(player.countCards('h','sha')>0) return 0; - var num=player.countCards('h'); - if(num>player.hp) return 0; - if(num==1) return -2; - if(num==2) return -1; - return -0.7; - }, - target:function(player,target){ - var num=target.countCards('h'); - if(num==1) return -1; - if(num==2) return -0.7; - return -0.5 - }, - }, - threaten:1.3 - } - }, - xianzhen2:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(player.storage.xianzhen==target) return true; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return Infinity; - } - }, - ai:{ - unequip:true - } - }, - xianzhen3:{ - mod:{ - cardEnabled:function(card){if(card.name=='sha') return false} - } - }, - lihuo:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - return card.name=='sha'&&!card.nature; - }, - filter:function(event,player){ - return player.countCards('h','sha')>0 - }, - viewAs:{name:'sha',nature:'fire'}, - mod:{ - selectTarget:function(card,player,range){ - if(card.name=='sha'&&card.nature=='fire'&&range[1]!=-1){ - range[1]++; - } - }, - }, - group:'lihuo2' - }, - lihuo2:{ - trigger:{source:'damageEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.parent.skill=='lihuo'; - }, - content:function(){ - player.addTempSkill('lihuo3','phaseAfter'); - } - }, - lihuo3:{ - trigger:{player:'useCardAfter'}, - filter:function(event,player){ - return event.card.name=='sha'; - }, - forced:true, - silent:true, - audio:false, - content:function(){ - player.loseHp(); - player.removeSkill('lihuo3'); - delete player.tempSkills.lihuo3; - } - }, - chunlao:{ - trigger:{player:'phaseEnd'}, - direct:true, - audio:2, - filter:function(event,player){ - return player.countCards('h','sha')>0&&!player.storage.chunlao.length; - }, - init:function(player){ - player.storage.chunlao=[]; - }, - intro:{ - content:'cards', - }, - content:function(){ - 'step 0' - player.chooseCard([1,player.countCards('h','sha')],get.prompt('chunlao'),{name:'sha'}).set('ai',function(){ - return 1; - }); - 'step 1' - if(result.bool){ - player.logSkill('chunlao'); - player.storage.chunlao=player.storage.chunlao.concat(result.cards); - player.syncStorage('chunlao'); - player.markSkill('chunlao'); - player.lose(result.cards,ui.special); - player.$give(result.cards,player); - } - }, - ai:{ - effect:{ - player:function(card,player){ - if(_status.currentPhase!=player) return; - if(card.name=='sha'&&player.countCards('h')<=player.hp&&!player.storage.chunlao.length){ - return [0,0,0,0]; - } - } - }, - threaten:1.4 - }, - group:'chunlao2' - }, - chunlao2:{ - trigger:{global:'dying'}, - priority:6, - filter:function(event,player){ - return event.player.hp<=0&&player.storage.chunlao.length>0; - }, - direct:true, - content:function(){ - "step 0" - var att=get.attitude(player,trigger.player); - player.chooseCardButton(get.prompt('chunlao',trigger.player),player.storage.chunlao).set('ai',function(button){ - if(_status.event.att>0) return 1; - return 0; - }).set('att',att); - "step 1" - if(result.bool){ - player.logSkill('chunlao',trigger.player); - player.$throw(result.links); - player.storage.chunlao.remove(result.links[0]); - ui.discardPile.appendChild(result.links[0]); - player.syncStorage('chunlao'); - trigger.player.useCard({name:'jiu'},trigger.player); - if(!player.storage.chunlao.length){ - player.unmarkSkill('chunlao'); - } - else{ - player.markSkill('chunlao'); - } - } - }, - ai:{ - expose:0.2 - } - }, - shenduan:{ - trigger:{player:'discardAfter'}, - filter:function(event,player){ - for(var i=0;i0&&get.distance(player,event.player,'attack')<=1; - }, - content:function(){ - 'step 0' - var att=get.attitude(player,trigger.player); - var nh=trigger.player.countCards('h'); - var eff=get.effect(trigger.player,{name:'sha'},player,player); - player.chooseCardButton(get.prompt('yonglve',trigger.player),trigger.player.getCards('j')).set('ai',function(button){ - var name=button.link.viewAs||button.link.name; - var att=_status.event.att; - var nh=_status.event.nh; - var eff=_status.event.eff; - var trigger=_status.event.getTrigger(); - if(att>0&&eff>=0) return 1; - if(att>=0&&eff>0) return 1; - if(att>0&&(trigger.player.hp>=3||trigger.player.getEquip('bagua')||trigger.player.countCards('h','shan'))){ - if(name=='lebu'&&nh>trigger.player.hp) return 1; - if(name=='bingliang'&&nh0){ + return 1; + } + } + if(allshown) return 1; + return 0; + } + }, + threaten:1.6, + }, + group:['taoluan2'] + }, + taoluan2:{ + trigger:{player:['useCardAfter','respondAfter']}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='taoluan_backup'||event.skill=='taoluan5'; + }, + content:function(){ + 'step 0' + player.chooseTarget(true,function(card,player,target){ + return target!=player; + },'滔乱

令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别相同的牌;2.你失去1点体力').set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0){ + if(get.attitude(target,player)>0){ + return target.countCards('h'); + } + return target.countCards('h')/2; + } + return 0; + }); + 'step 1' + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); + var type=get.type(trigger.card,'trick'); + target.chooseCard('滔乱

交给'+get.translation(player)+'一张'+get.translation(type)+'牌,或令其失去一点体力且滔乱无效直到回合',function(card,player,target){ + return get.type(card,'trick')==_status.event.cardType; + }).set('cardType',type).set('ai',function(card){ + if(_status.event.att){ + return 11-get.value(card); + } + return 0; + }).set('att',get.attitude(target,player)>0); + 'step 2' + var target=event.target; + if(result.bool){ + player.gain(result.cards,target); + target.$give(result.cards,player); + } + else{ + player.addTempSkill('taoluan3','phaseAfter'); + player.loseHp(); + } + } + }, + taoluan3:{}, + taoluan4:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'shan'})) return false; + if(player.storage.taoluan.contains('shan')) return false; + return true; + }, + check:function(event,player){ + var allshown=true,players=game.filterPlayer(); + for(var i=0;i1&&get.attitude(player,players[i])>0){ + return 1; + } + } + return 0; + }, + content:function(){ + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'shan'},skill:'taoluan_backup'}; + player.storage.taoluan.push('shan'); + }, + }, + taoluan5:{ + enable:'chooseToUse', + filter:function(event,player){ + return event.type=='dying'&&!player.storage.taoluan.contains('tao'); + }, + onuse:function(result,player){ + player.storage.taoluan.push('tao'); + }, + filterCard:function(){ + return false; + }, + selectCard:-1, + viewAs:{name:'tao'}, + ai:{ + skillTagFilter:function(player){ + return !player.storage.taoluan.contains('tao'); + }, + threaten:1.5, + save:true, + } + }, + taoluan_backup:{}, + jishe:{ + enable:'phaseUse', + filter:function(event,player){ + return player.getHandcardLimit()>0; + }, + init:function(player){ + player.storage.jishe=0; + }, + usable:20, + content:function(){ + player.draw(); + player.storage.jishe++; + }, + ai:{ + order:10, + result:{ + player:function(player){ + if(player.countCards('h')1; - })){ - range[1]++; - } - } - } - } + ai:{ + expose:0.3 + } }, - ai:{ - unequip:true, - skillTagFilter:function(player){ - if(game.hasPlayer(function(current){ - return get.distance(player,current)>1; - })){ - return false; - } - } - } - }, - sidi:{ - trigger:{global:'respondEnd'}, - filter:function(event,player){ - if(event.parent.parent.name!='sha') return false; - if(event.player==player) return true; - return _status.currentPhase==player; - }, - frequent:true, - init:function(player){ - player.storage.sidi=[]; - }, - intro:{ - content:'cards' - }, - content:function(){ - var card=get.cards()[0]; - game.log(player,'将',card,'置于武将牌上'); - player.$gain2(card); - player.storage.sidi.add(card); - player.markSkill('sidi'); - player.syncStorage('sidi'); - }, - group:'sidi2' - }, - sidi2:{ - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - if(event.player==player) return false; - if(!player.storage.sidi.length) return false; - return true; - }, - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return false; - if(event.player.getEquip('zhuge')) return false; - if(event.player.hasSkill('paoxiao')) return false; - var players=game.filterPlayer(); - for(var i=0;i0) break; - } - if(i==players.length) return false; - var nh=event.player.countCards('h'); - var nsha=event.player.countCards('h','sha'); - if(nh<2) return false; - switch(nh){ - case 2: - if(nsha) return Math.random()<0.4; - return Math.random()<0.2; - case 3: - if(nsha) return Math.random()<0.8; - return Math.random()<0.3; - case 4: - if(nsha>1) return true; - if(nsha) return Math.random()<0.9; - return Math.random()<0.5; - default:return true; - } - }, - content:function(){ - 'step 0' - if(player.storage.sidi.length==1){ - event.directbutton=player.storage.sidi[0]; - } - else{ - player.chooseCardButton('弃置武将牌上的一张牌',player.storage.sidi,true); - } - 'step 1' - var button; - if(event.directbutton){ - button=event.directbutton; - } - else if(result.bool&&result.links&&result.links.length){ - button=result.links[0]; - } - if(button){ - player.$throw([button]); - player.line(trigger.player,'green'); - game.log(player,'将',button,'置于弃牌堆'); - ui.discardPile.appendChild(button); - trigger.player.addTempSkill('sidi3','phaseAfter'); - player.storage.sidi.remove(button); - player.syncStorage('sidi'); - if(player.storage.sidi.length==0){ - player.unmarkSkill('sidi'); - } - else{ - player.markSkill('sidi'); - } - game.delayx(); - } - } - }, - sidi3:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num-1; - } - } - }, - zhongyong:{ - trigger:{player:'shaMiss'}, - direct:true, - filter:function(event,player){ - return event.responded&&get.itemtype(event.responded.cards)=='cards'; - }, - content:function(){ - "step 0" - var cards=trigger.responded.cards; - event.cards=cards; - player.chooseTarget('忠勇:将'+get.translation(trigger.responded.cards)+'交给一名角色',function(card,player,target){ - return target!=_status.event.getTrigger().target; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(target.countCards('h','shan')&&target.countCards('h')>=2){ - att/=1.5; - } - return att; - }); - "step 1" - if(result.bool){ - player.logSkill('zhongyong',result.targets); - result.targets[0].gain(event.cards,'gain2'); - if(result.targets[0]==player){ - event.finish(); - } - } - else{ - event.finish(); - } - "step 2" - if(player.hasSkill('jiu')){ - game.broadcastAll(function(player){ - player.removeSkill('jiu'); - if(player.node.jiu){ - player.node.jiu.delete(); - player.node.jiu2.delete(); - delete player.node.jiu; - delete player.node.jiu2; - } - },player); - event.jiu=true; - } - player.chooseToUse('是否对'+get.translation(trigger.target)+'再使用一张杀?', - {name:'sha'},trigger.target,-1).logSkill='qinglong_skill'; - "step 3" - if(result.bool); - else if(event.jiu){ - player.addSkill('jiu'); - } - } - }, - xinzhongyong:{ - trigger:{player:'shaMiss'}, - direct:true, - filter:function(event,player){ - return event.responded&&get.itemtype(event.cards)=='cards'&&get.itemtype(event.responded.cards)=='cards'; - }, - content:function(){ - "step 0" - event.cards1=trigger.cards.slice(0); - event.cards2=trigger.responded.cards.slice(0); - player.chooseTarget('忠勇:将杀或闪交给一名其他角色',function(card,player,target){ - return target!=_status.event.getTrigger().target&&target!=player; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool){ - var sha=false; - if(event.cards1.length==1&&get.color(event.cards1[0])=='red'){ - sha=true; - } - player.chooseControl('杀','闪',function(event,player){ - if(_status.event.choosesha) return '杀'; - return '闪'; - }).set('prompt','选择交给'+get.translation(result.targets)+'的牌').set('choosesha',sha); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - "step 2" - player.logSkill('zhongyong',event.target); - event.sha=false; - if(result.control=='杀'){ - event.target.gain(event.cards1,'gain2'); - if(event.cards1.length==1&&get.color(event.cards1[0])=='red'){ - event.sha=true; - } - } - else{ - event.target.gain(event.cards2,'gain2'); - if(event.cards2.length==1&&get.color(event.cards2[0])=='red'){ - event.sha=true; - } - } - "step 3" - if(event.sha){ - event.target.chooseToUse('是否使用一张杀?',{name:'sha'}).set('filterTarget',function(card,player,target){ - return target!=_status.event.source&&get.distance(_status.event.source,target,'attack')<=1&&player.canUse('sha',target,false); - }).set('source',player); - } - } - }, - dangxian:{ - trigger:{player:'phaseBegin'}, - forced:true, - content:function(){ - 'step 0' - player.phaseUse(); - 'step 1' - player.getStat().card={}; - } - }, - longyin:{ - trigger:{global:'shaBegin'}, - direct:true, - filter:function(event,player){ - return event.target==event.targets[0]&&player.countCards('he')>0&&event.card.name=='sha'&& - _status.currentPhase==event.player&&event.parent.parent.parent.name=='phaseUse'; - }, - content:function(){ - 'step 0' - var go=false; - if(get.attitude(player,trigger.player)>0){ - if(get.color(trigger.card)=='red'){ - go=true; - } - else if(!trigger.player.hasSkill('paoxiao')&& - !trigger.player.hasSkill('tanlin3')&& - !trigger.player.hasSkill('zhaxiang2')&& - !trigger.player.hasSkill('fengnu')&& - !trigger.player.getEquip('zhuge')){ - var nh=trigger.player.countCards('h'); - if(player==trigger.player){ - go=(player.countCards('h','sha')>0); - } - else if(nh>=4){ - go=true; - } - else if(player.countCards('h','sha')){ - if(nh==3){ - go=Math.random()<0.8; - } - else if(nh==2){ - go=Math.random()<0.5; - } - } - else if(nh>=3){ - if(nh==3){ - go=Math.random()<0.5; - } - else if(nh==2){ - go=Math.random()<0.2; - } - } - } - } - var next=player.chooseToDiscard(get.prompt('longyin'),'he'); - next.logSkill=['longyin',trigger.player]; - next.set('ai',function(card){ - if(_status.event.go){ - return 6-get.value(card); - } - return 0; - }); - next.set('go',go); - 'step 1' - if(result.bool){ - trigger.player.getStat().card.sha--; - if(get.color(trigger.card)=='red'){ - player.draw(); - } - // player.logSkill('longyin',trigger.player); - } - }, - ai:{ - expose:0.2 - } - }, - jigong:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - check:function(event,player){ - var nh=player.countCards('h')-player.countCards('h',{type:'equip'}); - if(nh<=1) return true; - if(player.countCards('h','tao')) return false; - if(nh<=2) return Math.random()<0.7; - if(nh<=3) return Math.random()<0.4; - return false; - }, - content:function(){ - player.draw(2); - player.addTempSkill('jigong2','phaseAfter'); - } - }, - jigong2:{ - mod:{ - maxHandcard:function(player,num){ - var damage=player.getStat().damage; - if(typeof damage=='number') return num-player.hp+damage; - return 0; - } - } - }, - shifei:{ - audio:2, - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!event.filterCard({name:'shan'})) return false; - return true; - }, - check:function(event,player){ - if(get.attitude(player,_status.currentPhase)>0) return true; - var nh=_status.currentPhase.countCards('h')+1; - var players=game.filterPlayer(); - for(var i=0;inh){ - if(!player.hasShan()||get.attitude(player,players[i])<=0) return true; - } - } - return false; - }, - content:function(){ - 'step 0' - player.line(_status.currentPhase,'green'); - _status.currentPhase.draw(); - 'step 1' - var nh=_status.currentPhase.countCards('h'); - var nmax=nh+1; - var targets=[]; - var players=game.filterPlayer(); - for(var i=0;inmax){ - nmax=nh2; - targets.length=0; - targets.push(players[i]); - } - else if(nh2==nmax){ - targets.push(players[i]); - } - } - if(targets.length==1){ - event.onlytarget=targets[0]; - } - else if(targets.length){ - player.chooseTarget('选择一名角色弃置其一张牌',true,function(card,player,target){ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }).set('targets',targets); - } - else{ - event.finish(); - } - 'step 2' - var target; - if(event.onlytarget){ - target=event.onlytarget; - } - else if(result.targets&&result.targets.length){ - target=result.targets[0]; - } - if(target){ - player.line(target,'green'); - player.discardPlayerCard(target,'he',true); - trigger.untrigger(); - trigger.responded=true; - trigger.result={bool:true,card:{name:'shan'}} - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0){ - var nh=player.countCards('h'); - var players=game.filterPlayer(); - for(var i=0;inh) return 0.4; - } - } - } - } - } - }, - huaiyi:{ - audio:2, - enable:'phaseUse', - usable:1, - delay:0, - filter:function(event,player){ - return player.countCards('h',{color:'red'})&&player.countCards('h',{color:'black'}); - }, - content:function(){ - 'step 0' - player.chooseControl('红色','黑色').set('ai',function(){ - var player=_status.event.player; - if(player.countCards('h',{color:'red'})==1&& - player.countCards('h',{color:'black'})>1) return '红色'; - return '黑色'; - }); - 'step 1' - event.control=result.control; - player.showHandcards(); - 'step 2' - var cards; - if(event.control=='红色'){ - cards=player.getCards('h',{color:'red'}); - } - else{ - cards=player.getCards('h',{color:'black'}); - } - player.discard(cards); - event.num=cards.length; - 'step 3' - player.chooseTarget([1,event.num],function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target)+0.5; - }); - 'step 4' - if(result.bool&&result.targets){ - player.line(result.targets,'green'); - event.targets=result.targets; - event.targets.sort(lib.sort.seat); - event.gained=event.targets.length; - } - else{ - event.finish(); - } - 'step 5' - if(event.targets.length){ - player.gainPlayerCard(event.targets.shift(),'he',true); - event.redo(); - } - 'step 6' - if(event.gained>=2){ - player.loseHp(); - } - }, - ai:{ - order:function(item,player){ - if(player.countCards('h',{color:'red'})==1) return 10; - if(player.countCards('h',{color:'black'})==1) return 10; - return 1; - }, - result:{ - player:1 - } - } - }, - yaoming:{ - audio:2, - trigger:{player:'damageEnd',source:'damageEnd'}, - direct:true, - filter:function(event,player){ - if(player.hasSkill('yaoming2')) return false; - var nh=player.countCards('h'); - return game.hasPlayer(function(current){ - return current.countCards('h')!=nh; - }); - }, - content:function(){ - 'step 0' - var nh=player.countCards('h'); - player.chooseTarget(get.prompt('yaoming'),function(card,player,target){ - return _status.event.nh!=target.countCards('h'); - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(target.countCards('h')>_status.event.nh) return -att; - return att; - }).set('nh',nh); - 'step 1' - if(result.bool){ - player.logSkill('yaoming',result.targets); - player.addTempSkill('yaoming2','phaseAfter'); - var target=result.targets[0]; - if(target.countCards('h')0; - }, - content:function(){ - 'step 0' - player.choosePlayerCard(target,'e',true); - 'step 1' - if(result.links){ - var num=0,players=game.filterPlayer(); - for(var i=0;inum2){ - player.draw(); - } - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(target.hasSkillTag('noe')) return 1; - if(target.getEquip(1)||target.getEquip(4)) return -1; - if(target.getEquip(2)) return -0.7; - return -0.5; - } - } - } - }, - zhaofu:{ - unique:true, - global:'zhaofu2', - zhuSkill:true - }, - zhaofu2:{ - mod:{ - attackTo:function(from,to,distance){ - if(from.group!='wu') return; - var players=game.filterPlayer(); - for(var i=0;i0&&target!=player; - }, - content:function(){ - 'step 0' - if(target.countCards('e')){ - target.chooseBool('是否将装备区内的所有牌交给'+get.translation(player)+'?').set('ai',function(){ - if(_status.event.player.countCards('e')>=3) return false; - return true; - }); - } - else{ - target.chooseToDiscard(true,'he'); - event.finish(); - } - 'step 1' - if(result.bool){ - var es=target.getCards('e'); - player.gain(es,target); - target.$give(es,player); - player.removeSkill('yanzhu'); - } - else{ - target.chooseToDiscard(true,'he'); - } - }, - ai:{ - order:6, - result:{ - target:function(player,target){ - var ne=target.countCards('e'); - if(!ne) return -2; - if(ne>=2) return -ne; - return 0; - } - } - } - }, - shizhi:{ - mod:{ - cardRespondable:function(card,player){ - if(card.name=='shan'&&player.hp==1&&_status.event.skill!='shizhi') return false; - }, - }, - enable:['chooseToUse','chooseToRespond'], - filter:function(event,player){ - return player.hp==1; - }, - filterCard:{name:'shan'}, - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(!player.countCards('h','shan')) return false; - if(player.hp!=1) return false; - }, - check:function(){return 1}, - ai:{ - skillTagFilter:function(player){ - if(!player.countCards('h','shan')) return false; - if(player.hp!=1) return false; - }, - respondSha:true, - order:4, - useful:-1, - value:-1 - } - }, - wurong:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return target.countCards('h')>0&&target!=player; - }, - content:function(){ - "step 0" - if(target.countCards('h')==0||player.countCards('h')==0){ - event.finish(); - return; - } - "step 1" - var sendback=function(){ - if(_status.event!=event){ - return function(){ - event.resultOL=_status.event.resultOL; - }; - } - }; - if(player.isOnline()){ - player.wait(sendback); - event.ol=true; - player.send(function(){ - game.me.chooseCard(true).set('glow_result',true).ai=function(){ - return Math.random(); - }; - game.resume(); - }); - } - else{ - event.localPlayer=true; - player.chooseCard(true).set('glow_result',true).ai=function(){ - return Math.random(); - }; - } - if(target.isOnline()){ - target.wait(sendback); - event.ol=true; - target.send(function(){ - var rand=Math.random()<0.4; - game.me.chooseCard(true).set('glow_result',true).ai=function(card){ - if(rand) return card.name=='shan'?1:0; - return card.name=='shan'?0:1; - }; - game.resume(); - }); - } - else{ - event.localTarget=true; - } - "step 2" - if(event.localPlayer){ - event.card1=result.cards[0]; - } - if(event.localTarget){ - var rand=Math.random()<0.4; - target.chooseCard(true).set('glow_result',true).ai=function(card){ - if(rand) return card.name=='shan'?1:0; - return card.name=='shan'?0:1; - }; - } - "step 3" - if(event.localTarget){ - event.card2=result.cards[0]; - } - if(!event.resultOL&&event.ol){ - game.pause(); - } - "step 4" - try{ - if(!event.card1) event.card1=event.resultOL[player.playerid].cards[0]; - if(!event.card2) event.card2=event.resultOL[target.playerid].cards[0]; - if(!event.card1||!event.card2){ - throw('err'); - } - } - catch(e){ - console.log(e); - event.finish(); - return; - } - if(event.card2.number>=10||event.card2.number<=4){ - if(target.countCards('h')>2){ - event.addToAI=true; - } - } - game.broadcastAll(function(card1,card2){ - card1.classList.remove('glow'); - card2.classList.remove('glow'); - },event.card1,event.card2); - "step 5" - game.broadcastAll(function(){ - ui.arena.classList.add('thrownhighlight'); - }); - game.addVideo('thrownhighlight1'); - player.$compare(event.card1,target,event.card2); - game.delay(4); - "step 6" - game.log(player,'展示了',event.card1); - game.log(target,'展示了',event.card2); - var name1=event.card1.name; - if(player.hp==1&&name1=='shan'){ - name1='sha'; - } - if(name1=='sha'&&event.card2.name!='shan'){ - player.discard(event.card1).set('animate',false); - target.$gain2(event.card2); - var clone=event.card1.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([clone])); - } - game.broadcast(function(card){ - var clone=card.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - } - },event.card1); - target.damage(); - } - else if(name1!='sha'&&event.card2.name=='shan'){ - player.discard(event.card1).set('animate',false); - target.$gain2(event.card2); - var clone=event.card1.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - game.addVideo('deletenode',player,get.cardsInfo([clone])); - } - game.broadcast(function(card){ - var clone=card.clone; - if(clone){ - clone.style.transition='all 0.5s'; - clone.style.transform='scale(1.2)'; - clone.delete(); - } - },event.card1); - player.gainPlayerCard(target,true,'he'); - } - else{ - player.$gain2(event.card1); - target.$gain2(event.card2); - } - game.broadcastAll(function(){ - ui.arena.classList.remove('thrownhighlight'); - }); - game.addVideo('thrownhighlight2'); - }, - ai:{ - order:6, - result:{ - target:-1, - } - } - }, - zhanjue:{ - audio:2, - enable:'phaseUse', - filterCard:true, - selectCard:-1, - filter:function(event,player){ - if(!player.countCards('h')) return false; - if(player.storage.zhanjue>=2) return false; - return true; - }, - viewAs:{name:'juedou'}, - group:['zhanjue2','zhanjue3','zhanjue4'], - ai:{ - order:1, - effect:{ - player:function(card,player,target){ - if(_status.event.skill=='zhanjue'){ - if(player.countCards('h')>=3||target.countCards('h')>=3) return 'zeroplayertarget'; - if(player.countCards('h','tao')) return 'zeroplayertarget'; - if(target.countCards('h','sha')>1) return 'zeroplayertarget'; - } - } - } - } - }, - zhanjue2:{ - audio:false, - trigger:{player:'phaseBefore'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.storage.zhanjue=0; - } - }, - zhanjue3:{ - audio:false, - trigger:{player:'damageAfter',source:'damageAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.parent.skill=='zhanjue'; - }, - content:function(){ - player.storage.zhanjue2=trigger.player; - } - }, - zhanjue4:{ - audio:false, - trigger:{player:'juedouAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='zhanjue'; - }, - content:function(){ - if(player.storage.zhanjue2==player){ - player.draw(2); - player.storage.zhanjue+=2; - } - else if(player.storage.zhanjue2){ - if(player.storage.zhanjue2.isAlive()){ - game.asyncDraw([player,player.storage.zhanjue2]); - } - else{ - player.draw(); - } - player.storage.zhanjue++; - } - else{ - player.draw(); - player.storage.zhanjue++; - } - delete player.storage.zhanjue2; - } - }, - qinwang:{ - unique:true, - group:['qinwang1','qinwang2'], - zhuSkill:true - }, - qinwang1:{ - audio:2, - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!player.hasZhuSkill('qinwang')) return false; - if(!player.countCards('he')) return false; - if(event.filterCard({name:'sha'},player,event)==false) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - direct:true, - content:function(){ - "step 0" - var yep=false; - if(!player.storage.jijianging){ - var players=game.filterPlayer(); - for(var i=0;i1&&(nh>=4||(nh>=3&&players[i].countCards('h','sha')))){ - yep=true;break; - } - } - } - var next=player.chooseToDiscard(get.prompt('qinwang'),'he'); - next.set('ai',function(card){ - if(_status.event.yep) return 5-get.value(card); - return 0; - }); - next.set('yep',yep); - next.logSkill='qinwang' - "step 1" - if(!result.bool){ - event.finish(); - } - "step 2" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - event.finish(); - } - else if(event.current.group=='shu'){ - player.storage.jijianging=true; - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张杀?',{name:'sha'}); - next.set('ai',function(){ - var event=_status.event; - return (get.attitude(event.player,event.source)-2); - }); - next.set('source',player); - next.autochoose=lib.filter.autoRespondSha; - } - else{ - event.current=event.current.next; - event.redo(); - } - "step 3" - player.storage.jijianging=false; - if(result.bool){ - event.finish(); - trigger.result=result; - trigger.responded=true; - trigger.animate=false; - event.current.draw(); - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; - } - } - else{ - event.current=event.current.next; - event.goto(2); - } - } - }, - qinwang2:{ - audio:2, - enable:'chooseToUse', - filter:function(event,player){ - if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; - if(!player.hasZhuSkill('qinwang')) return false; - if(!lib.filter.cardUsable({name:'sha'},player)) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='shu'; - }); - }, - filterCard:true, - position:'he', - check:function(card){ - var player=_status.event.player,players=game.filterPlayer(); - for(var i=0;i1&&(nh>=4||(nh>=3&&players[i].countCards('h','sha')))){ - return 5-get.value(card); - } - } - return 0; - }, - filterTarget:function(card,player,target){ - if(_status.event._backup&& - typeof _status.event._backup.filterTarget=='function'&& - !_status.event._backup.filterTarget({name:'sha'},player,target)){ - return false; - } - return player.canUse({name:'sha'},target); - }, - content:function(){ - "step 0" - if(event.current==undefined) event.current=player.next; - if(event.current==player){ - player.addSkill('jijiang3'); - event.getParent(2).step=0; - event.finish(); - } - else if(event.current.group=='shu'){ - var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀', - function(card){ - var evt=_status.event.getParent(); - return evt.player.canUse(card,evt.target)&&card.name=='sha'; - }); - next.set('ai',function(card){ - var event=_status.event; - return get.effect(event.target,card,event.source,event.player); - }); - next.set('source',player); - next.set('target',target); - next.autochoose=lib.filter.autoRespondSha; - } - else{ - event.current=event.current.next; - event.redo(); - } - "step 1" - if(result.bool){ - event.finish(); - event.current.draw(); - if(result.cards&&result.cards.length==1&&result.cards[0].name=='sha'){ - player.useCard(result.cards[0],target).animate=false; - } - else{ - player.useCard({name:'sha'},target).animate=false; - } - if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ - event.current.ai.shown+=0.3; - if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; - } - } - else{ - event.current=event.current.next; - event.goto(0); - } - }, - ai:{ - result:{ - target:function(player,target){ - if(player.hasSkill('jijiang3')) return 0; - return get.effect(target,{name:'sha'},player,target); - } - }, - order:function(){ - return get.order({name:'sha'})-0.1; - }, - } - }, - zuoding:{ - trigger:{global:'useCard'}, - filter:function(event,player){ - return !player.hasSkill('zuoding2')&&get.suit(event.card)=='spade'&& - _status.currentPhase==event.player&&event.targets&&event.targets.length&& - event.player!=player; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('zuoding'),function(card,player,target){ - return _status.event.getTrigger().targets.contains(target); - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - player.logSkill('zuoding',result.targets); - result.targets[0].draw(); - } - }, - ai:{ - expose:0.2 - }, - group:'zuoding3' - }, - zuoding2:{}, - zuoding3:{ - trigger:{global:'damageEnd'}, - forced:true, - popup:false, - silent:true, - content:function(){ - player.addTempSkill('zuoding2','phaseAfter'); - } - }, - huomo:{ - audio:2, - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - if(!event.filterCard({name:'shan'})) return false; - if(player.hasSkill('huomo2')) return false; - if(event.parent.name!='sha') return false; - var hs=player.getCards('he',{color:'black'}); - for(var i=0;i0; - })){ - switch(button.link[2]){ - case 'tao':return 5; - case 'jiu':return 3.01; - case 'sha': - if(button.link[3]=='fire') return 2.95; - else if(button.link[3]=='fire') return 2.92; - else return 2.9; - } - } - return 0; - }, - backup:function(links,player){ - return { - filterCard:function(card){ - return get.type(card)!='basic'&&get.color(card)=='black'; - }, - viewAs:{name:links[0][2],nature:links[0][3]}, - position:'he', - popname:true, - precontent:function(){ - 'step 0' - var card=event.result.cards[0]; - event.card=card; - player.$throw(card,1000); - game.log(player,'将',card,'置于牌堆顶'); - event.result.cards.length=0; - player.lose(card); - 'step 1' - game.delay(); - 'step 2' - ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); - }, - } - }, - prompt:function(links,player){ - return '将一张黑色非基本牌置于牌堆顶并视为使用一张'+get.translation(links[0][3]||'')+get.translation(links[0][2]); - } - }, - ai:{ - order:function(){ - var player=_status.event.player; - var event=_status.event; - if(!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0){ - return 3.1; - } - return 2.9; - }, - save:true, - respondSha:true, - skillTagFilter:function(player,tag,arg){ - if(player.hasCard(function(card){ - return get.color(card)=='black'&&get.type(card)!='basic'; - },'he')){ - if(!player.storage.huomo) player.storage.huomo={}; - if(tag=='respondSha'){ - if(arg!='use') return false; - if(player.storage.huomo.sha) return false; - } - else{ - if(player.storage.huomo.tao&&player.storage.huomo.jiu) return false; - } - } - }, - result:{ - player:1 - } - } - }, - taoxi:{ - audio:2, - trigger:{player:'useCardToBegin'}, - filter:function(event,player){ - return _status.currentPhase==player&&event.targets.length==1&& - event.target.countCards('h')>0&&!player.hasSkill('taoxi4')&&player!=event.target; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - intro:{ - content:'card' - }, - content:function(){ - var card=trigger.target.getCards('h').randomGet(); - player.showCards([card]); - player.storage.taoxi=card; - player.storage.taoxi2=trigger.target; - player.syncStorage('taoxi'); - player.markSkill('taoxi'); - player.addTempSkill('taoxi4','phaseAfter'); - }, - group:['taoxi2','taoxi3'] - }, - taoxi2:{ - audio:false, - enable:'phaseUse', - filter:function(event,player){ - if(player.storage.taoxi&&player.storage.taoxi2&& - get.owner(player.storage.taoxi)==player.storage.taoxi2&& - lib.filter.filterCard(player.storage.taoxi,player,event)){ - return true; - } - return false; - }, - filterTarget:function(card,player,target){ - return player.canUse(player.storage.taoxi,target); - }, - selectTarget:function(){ - var info=get.info(_status.event.player.storage.taoxi); - if(info.notarget) return -1; - return get.select(info.selectTarget); - }, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - var card=player.storage.taoxi; - if(!card){ - event.finish(); - return; - } - var owner=get.owner(card); - if(owner){ - owner.lose(card,ui.special); - } - event.card=card; - player.$throw(card); - 'step 1' - player.useCard(event.card,targets).animate=false; - delete player.storage.taoxi; - delete player.storage.taoxi2; - player.unmarkSkill('taoxi'); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - return get.effect(target,player.storage.taoxi,player,target); - }, - player:1 - } - } - }, - taoxi3:{ - trigger:{player:'phaseEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.taoxi?true:false; - }, - content:function(){ - if(get.owner(player.storage.taoxi)==player.storage.taoxi2){ - player.loseHp(); - } - delete player.storage.taoxi; - delete player.storage.taoxi2; - player.unmarkSkill('taoxi'); - } - }, - taoxi4:{}, - xingshuai:{ - skillAnimation:true, - audio:2, - trigger:{player:'dying'}, - priority:6, - zhuSkill:true, - filter:function(event,player){ - if(player.storage.xingshuai) return false; - if(player.hp>0) return false; - if(!player.hasZhuSkill('xingshuai')) return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.group=='wei'; - }); - }, - init:function(player){ - if(player.hasZhuSkill('xingshuai')){ - player.markSkill('xingshuai'); - player.storage.xingshuai=false; - } - }, - intro:{ - content:'limited' - }, - unique:true, - content:function(){ - 'step 0' - player.storage.xingshuai=true; - player.awakenSkill('xingshuai'); - var targets=game.filterPlayer(); - targets.remove(player); - event.targets=targets; - event.damages=[]; - 'step 1' - if(event.targets.length){ - var current=event.targets.shift(); - if(current.group=='wei'){ - current.chooseBool('是否令'+get.translation(player)+'回复一点体力?').set('ai',function(){ - return get.attitude(_status.event.player,_status.event.target)>2; - }).set('target',player); - event.current=current; - } - else{ - event.redo(); - } - } - else{ - event.goto(3); - } - 'step 2' - if(result.bool){ - event.damages.push(event.current); - event.current.line(player,'green'); - game.log(event.current,'令',player,'回复一点体力'); - } - if(event.targets.length){ - event.goto(1); - } - 'step 3' - if(event.damages.length){ - player.recover(event.damages.length); - } - 'step 4' - if(event.damages.length){ - event.damages.shift().damage('nosource'); - event.redo(); - } - } - }, - mingjian:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player!=target; - }, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - selectCard:-1, - discard:false, - lose:true, - content:function(){ - player.$give(cards.length,target); - target.gain(cards,player); - target.addTempSkill('mingjian2',{player:'phaseAfter'}); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(player.countCards('h')==1&&player.countCards('h','du')) return -1; - if(player.hp<=2&&player.countCards('h','shan')) return 0; - if(target.countCards('h')+player.countCards('h')>target.hp+2) return 0; - if(get.attitude(player,target)>3) return 1; - return 0; - } - } - } - }, - mingjian2:{ - mark:true, - intro:{ - content:'手牌上限+1,出杀次数+1' - }, - mod:{ - maxHandcard:function(player,num){ - return num+1; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; - } - }, - }, - mingjian_old:{ - audio:2, - trigger:{player:'phaseUseBefore'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - 'step 0' - var go=Math.random()<0.5; - player.chooseTarget(get.prompt('mingjian'),function(card,player,target){ - return player!=target - }).ai=function(target){ - var att=get.attitude(player,target); - if(att>3){ - if(player.countCards('h')>player.hp) return att; - if(go) return att; - } - return 0; - } - 'step 1' - if(result.bool){ - player.logSkill('mingjian',result.targets); - trigger.untrigger(); - trigger.finish(); - var target=result.targets[0]; - target.addSkill('mingjian2'); - var hs=player.getCards('h'); - target.gain(hs,player); - player.$give(hs.length,target); - } - } - }, - mingjian2_old:{ - audio:false, - trigger:{global:'phaseAfter'}, - forced:true, - popup:false, - content:function(){ - if(lib.config.glow_phase){ - if(_status.currentPhase){ - _status.currentPhase.classList.remove('glow_phase'); - } - player.classList.add('glow_phase'); - } - game.addVideo('phaseChange',player); - _status.currentPhase=player; - player.ai.tempIgnore=[]; - player.stat.push({card:{},skill:{}}); - player.phaseUse(); - player.removeSkill('mingjian2'); - } - }, - huituo:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('huituo')).set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)>0){ - return get.recoverEffect(target,player,player)+1; - } - return 0; - }); - 'step 1' - if(result.bool){ - player.logSkill('huituo',result.targets); - var target=result.targets[0]; - event.target=target; - target.judge(function(card){ - if(target.hp==target.maxHp){ - if(get.color(card)=='red') return -1; - } - if(get.color(card)=='red') return 1; - return 0; - }); - } - else{ - event.finish(); - } - 'step 2' - if(result.color){ - if(result.color=='red'){ - if(event.target.hp0&&event.source&&event.source.getEquip(1)!=undefined&& - event.card&&event.card.name=='sha'; - }, - direct:true, - priority:5, - audio:2, - content:function(){ - 'step 0' - var next=player.chooseToDiscard('he',get.prompt('duodao')); - next.logSkill=['duodao',trigger.source]; - next.set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getTrigger().source)<=0){ - return 6-get.value(card); - } - return 0; - }); - 'step 1' - if(result.bool){ - trigger.source.$give(trigger.source.getEquip(1),player); - player.gain(trigger.source.getEquip(1),trigger.source); - } - }, - }, - anjian:{ - audio:2, - trigger:{source:'damageBegin'}, - check:function(event,player){ - return get.attitude(player,event.player)<=0; - }, - forced:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&get.distance(event.player,player,'attack')>1&& - event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2'; - }, - content:function(){ - trigger.num++; - } - }, - xinpojun:{ - trigger:{player:'shaBegin'}, - direct:true, - filter:function(event,player){ - return event.target.hp>0&&event.target.countCards('he')>0; - }, - audio:2, - logTarget:'target', - content:function(){ - 'step 0' - player.choosePlayerCard(trigger.target,'he', - [1,Math.min(trigger.target.countCards('he'),trigger.target.hp)],get.prompt('pojun',trigger.target)); - 'step 1' - if(result.bool&&result.links.length){ - player.logSkill('xinpojun'); - if(trigger.target.storage.xinpojun2){ - trigger.target.storage.xinpojun2=trigger.target.storage.xinpojun2.concat(result.links); - } - else{ - trigger.target.storage.xinpojun2=result.links; - } - game.addVideo('storage',trigger.target,['xinpojun2',get.cardsInfo(trigger.target.storage.xinpojun2),'cards']); - trigger.target.addSkill('xinpojun2'); - trigger.target.lose(result.links,ui.special); - } - }, - ai:{ - expose:0.2 - } - }, - xinpojun2:{ - trigger:{global:'phaseEnd'}, - forced:true, - audio:false, - mark:true, - intro:{ - content:'cardCount' - }, - content:function(){ - if(player.storage.xinpojun2){ - player.gain(player.storage.xinpojun2); - delete player.storage.xinpojun2; - } - player.removeSkill('xinpojun2'); - }, - group:'xinpojun3' - }, - xinpojun3:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - content:function(){ - player.$throw(player.storage.xinpojun2,1000); - for(var i=0;i=0; - }, - priority:-5, - logTarget:'player', - content:function(){ - game.asyncDraw([trigger.player,player]); - }, - ai:{ - expose:0.1 - } - }, - yanyu:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h','sha')>0; - }, - filterCard:{name:'sha'}, - prepare:function(cards,player){ - player.$throw(cards,1000); - }, - discard:false, - delay:0.5, - content:function(){ - "step 0" - player.draw(); - "step 1" - for(var i=0;i=2; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('yanyu'),function(card,player,target){ - return target.sex=='male'&&target!=player; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - player.logSkill('yanyu',result.targets); - result.targets[0].draw(2); - } - } - }, - youdi:{ - audio:true, - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('youdi'),function(card,player,target){ - return player!=target; - }).set('ai',function(target){ - if(!_status.event.goon) return 0; - if(target.countCards('he')==0) return 0; - return -get.attitude(_status.event.player,target); - }).set('goon',player.countCards('h','sha')<=player.countCards('h')/3); - "step 1" - if(result.bool){ - game.delay(); - player.logSkill('youdi',result.targets); - event.target=result.targets[0]; - event.target.discardPlayerCard(player,'he',true); - } - else{ - event.finish(); - } - "step 2" - if(result.links[0].name!='sha'&&event.target.countCards('he')){ - player.gainPlayerCard('he',event.target,true); - } - }, - ai:{ - expose:0.2, - threaten:1.4 - } - }, - fuhun:{ - enable:['chooseToUse','chooseToRespond'], - filterCard:true, - selectCard:2, - position:'h', - audio:2, - derivation:['wusheng','paoxiao'], - viewAs:{name:'sha'}, - prompt:'将两张手牌当杀使用或打出', - check:function(card){ - if(_status.event.player.countCards('h')<4) return 6-get.useful(card); - return 7-get.useful(card); - }, - ai:{ - respondSha:true, - order:function(item,player){ - if(player.hasSkill('wusheng')&&player.hasSkill('paoxiao')){ - return 1; - } - if(player.countCards('h')<4){ - return 1; - } - return 4; - }, - }, - group:'fuhun2' - }, - fuhun2:{ - trigger:{source:'damageAfter'}, - forced:true, - filter:function(event){ - return event.getParent().skill=='fuhun'; - }, - content:function(){ - player.addTempSkill('wusheng','phaseAfter'); - player.addTempSkill('paoxiao','phaseAfter'); - } - }, - fencheng:{ - skillAnimation:'epic', - animationColor:'fire', - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return !player.storage.fencheng; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - unique:true, - selectTarget:-1, - mark:true, - line:'fire', - content:function(){ - "step 0" - player.storage.fencheng=true; - player.awakenSkill('fencheng'); - var res=get.damageEffect(target,player,target,'fire'); - var num=Math.max(1,target.countCards('e')); - target.chooseToDiscard(num,'he','弃置'+get.cnNumber(num)+'张牌或受到1点火焰伤害').set('ai',function(card){ - var res=_status.event.res; - var num=_status.event.num; - var player=_status.event.player; - if(res>=0) return -1; - if(num>2&&player.hp>1) return -1; - if(num>1&&player.hp>2) return -1; - if(get.position(card)=='e'){ - return 10-get.value(card); - } - return 6-get.value(card); - }).set('res',res).set('num',num); - "step 1" - if(!result.bool){ - target.damage('fire'); - } - }, - ai:{ - order:1, - result:{ - player:function(player){ - var num=0,players=game.filterPlayer(); - for(var i=0;i0){ - num-=Math.max(1,players[i].countCards('e')); - } - else if(att<0){ - num+=Math.max(1,players[i].countCards('e')); - } - } - } - if(players.length<5){ - return num-1; - } - else{ - return num-2; - } - } - } - }, - init:function(player){ - player.storage.fencheng=false; - }, - intro:{ - content:'limited' - } - }, - mieji:{ - trigger:{player:'useCardBegin'}, - direct:true, - audio:2, - filter:function(event,player){ - return event.targets.length==1&&get.type(event.card)=='trick'&&get.color(event.card)=='black'; - }, - position:'he', - content:function(){ - "step 0" - player.chooseTarget(get.prompt('mieji'),function(card,player,target){ - var trigger=_status.event.getTrigger(); - return lib.filter.filterTarget(trigger.card,player,target)&&target!=trigger.targets[0]; - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player); - }); - "step 1" - if(result.bool){ - trigger.targets.push(result.targets[0]); - player.logSkill('mieji',result.targets); - } - } - }, - junxing:{ - enable:'phaseUse', - audio:2, - usable:1, - filterCard:true, - selectCard:[1,Infinity], - filter:function(event,player){ - return player.countCards('h')>0; - }, - check:function(card){ - if(ui.selected.cards.length) return -1; - var val=get.value(card); - if(get.type(card)=='basic') return 8-get.value(card); - return 5-get.value(card); - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - content:function(){ - "step 0" - var types=[]; - for(var i=0;i0; - }, - filter:function(event,player){ - if(event.player.countCards('h')) return false; - if(_status.currentPhase!=player) return false; - if(event.player==player) return false; - for(var i=0;i2){ - if(game.phaseNumber0&&event.player.countCards('j')) return true; - if(event.num>1){ - if(att<0) return false; - if(att>0) return true; - } - var cards=event.player.getCards('e'); - for(var i=0;i=6) return true; - } - return false; - }, - content:function(){ - if(trigger.player.countCards('ej')){ - player.gainPlayerCard(trigger.player,'ej',true); - } - trigger.untrigger(); - trigger.finish(); - } - }, - sanyao:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target.isHighestHp(); - }, - check:function(card){return 7-get.value(card);}, - position:'he', - filterCard:true, - content:function(){ - target.damage(); - }, - ai:{ - result:{ - target:function(player,target){ - if(target.countCards('j')&&get.attitude(player,target)>0){ - return 1; - } - if(target.countCards('e')){ - return -1; - } - return get.damageEffect(target,player); - }, - }, - order:7 - } - }, - qiaoshui:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('qiaoshui'),function(card,player,target){ - return player!=target&&target.countCards('h')>0; - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target)/target.countCards('h'); - }); - "step 1" - if(result.bool){ - player.logSkill('qiaoshui',result.targets[0]); - player.chooseToCompare(result.targets[0]); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.addTempSkill('qiaoshui3','phaseAfter'); - } - else{ - player.addTempSkill('qiaoshui2','phaseAfter'); - } - }, - ai:{ - expose:0.1 - } - }, - qiaoshui2:{ - mod:{ - cardEnabled:function(card){ - if(get.type(card,'trick')=='trick') return false; - } - } - }, - qiaoshui3:{ - trigger:{player:'useCard'}, - direct:true, - filter:function(event,player){ - var type=get.type(event.card); - return type=='basic'||type=='trick'; - }, - content:function(){ - 'step 0' - player.removeSkill('qiaoshui3'); - var goon=false; - var info=get.info(trigger.card); - if(trigger.targets&&!info.multitarget){ - var players=game.filterPlayer(); - for(var i=0;i1){ - event.goto(3); - } - } - 'step 1' - if(result.bool){ - game.delay(0.5); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - 'step 2' - if(event.target){ - player.logSkill('qiaoshui',event.target); - trigger.targets.add(event.target); - } - event.finish(); - 'step 3' - player.chooseTarget('巧说:是否减少一名'+get.translation(trigger.card)+'的目标?',function(card,player,target){ - return _status.event.getTrigger().targets.contains(target); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - return -get.effect(target,trigger.card,trigger.player,_status.event.player); - }); - 'step 4' - if(result.bool){ - event.targets=result.targets; - if(event.isMine()){ - player.logSkill('qiaoshui',event.targets); - event.finish(); - } - for(var i=0;i1) return false; - return event.card&&get.type(event.card)=='trick'&&event.player!=player; - }, - frequent:true, - content:function(){ - player.draw(); - }, - ai:{ - effect:function(card,player,target){ - if(get.type(card)=='trick') return [1,1]; - }, - } - }, - shenxing:{ - audio:2, - enable:'phaseUse', - position:'he', - filterCard:true, - selectCard:2, - prompt:'弃置两张牌并摸一张牌', - check:function(card){return 4-get.useful(card)}, - content:function(){ - player.draw(); - }, - ai:{ - order:1, - result:{ - player:1 - }, - }, - }, - bingyi:{ - audio:2, - trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ - var cards=player.getCards('h'); - if(cards.length<1) return false; - var color=get.color(cards[0]); - for(var i=1;i=2) return false; - if(player.hp==1) return false; - if(player.hp==2&&player.countCards('h')<2) return false; - if(event.player.countCards('h')>=event.player.hp) return false; - return true; - }, - content:function(){ - "step 0" - player.draw(2); - "step 1" - player.chooseCard(2,'he',true,'交给'+get.translation(trigger.player)+'两张牌').set('ai',function(card){ - if(ui.selected.cards.length&&card.name==ui.selected.cards[0].name) return -1; - if(get.tag(card,'damage')) return 1; - if(get.type(card)=='equip') return 1; - return 0; - }); - "step 2" - trigger.player.gain(result.cards,player); - if(player==game.me||trigger.player==game.me) - player.$give(result.cards,trigger.player); - else - player.$give(2,trigger.player); - game.delay(); - trigger.player.addSkill('xiantu2'); - trigger.player.storage.xiantu=player; - }, - ai:{ - threaten:1.1, - expose:0.3 - } - }, - xiantu2:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - audio:false, - content:function(){ - if(player.storage.xiantu){ - player.storage.xiantu.loseHp(); - delete player.storage.xiantu; - } - player.removeSkill('xiantu2'); - }, - group:'xiantu3' - }, - xiantu3:{ - trigger:{source:'dieAfter'}, - forced:true, - audio:false, - content:function(){ - delete player.storage.xiantu; - player.removeSkill('xiantu2'); - } - }, - qiangzhi:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('qiangzhi'),function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }).set('ai',function(){ - return Math.random(); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('qiangzhi',target); - var card=target.getCards('h').randomGet(); - player.showCards(card); - player.storage.qiangzhi=get.type(card,'trick'); - game.addVideo('storage',player,['qiangzhi',player.storage.qiangzhi]); - player.markSkill('qiangzhi'); - } - }, - intro:{ - content:function(type){ - return get.translation(type)+'牌'; - } - }, - group:['qiangzhi2','qiangzhi3'], - ai:{ - order:11, - result:{ - player:1 - } - } - }, - qiangzhi2:{ - trigger:{player:'useCard'}, - frequent:true, - filter:function(event,player){ - // return (get.type(event.card,'trick')==player.storage.qiangzhi&&event.cards[0]&&event.cards[0]==event.card); - return get.type(event.card,'trick')==player.storage.qiangzhi; - }, - content:function(){ - player.draw(); - }, - ai:{ - threaten:1.4 - } - }, - qiangzhi3:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - popup:false, - silent:true, - content:function(){ - delete player.storage.qiangzhi; - player.unmarkSkill('qiangzhi'); - } - }, - dingpin:{ - enable:'phaseUse', - usable:3, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return target.hp0; - }, - logTarget:'player', - content:function(){ - trigger.player.draw(); - }, - ai:{ - expose:0.2 - } - }, - jiaojin:{ - audio:2, - trigger:{player:'damageBegin'}, - filter:function(event,player){ - return player.countCards('he',{type:'equip'})&&event.source&&event.source.sex=='male'; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he','骄矜:是否弃置一张装备牌令伤害-1?',function(card,player){ - return get.type(card)=='equip'; - }); - next.set('ai',function(card){ - var player=_status.event.player; - if(player.hp==1||_status.event.getTrigger().num>1){ - return 9-get.value(card); - } - if(player.hp==2){ - return 8-get.value(card); - } - return 7-get.value(card); - }); - next.logSkill='jiaojin'; - "step 1" - if(result.bool){ - game.delay(0.5); - trigger.num--; - } - } - }, - chanhui:{ - audio:2, - trigger:{player:'useCard'}, - filter:function(event,player){ - if(_status.currentPhase!=player) return false; - if(player.hasSkill('chanhui2')) return false; - if(event.targets.length>1) return false; - var card=event.card; - if(card.name=='sha') return true; - if(get.color(card)=='black'&&get.type(card)=='trick') return true; - return false; - }, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('chanhui'),function(card,player,target){ - if(player==target) return false; - var trigger=_status.event.getTrigger(); - return player.canUse(trigger.card,target)&&trigger.targets.contains(target)==false; - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player)+1; - }); - "step 1" - if(result.bool){ - game.delay(0,200); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - "step 2" - game.delay(); - player.addSkill('chanhui2'); - player.logSkill('chanhui',event.target); - event.target.chooseCard('交给'+get.translation(player)+'一张手牌,或成为'+ - get.translation(trigger.card)+'的额外目标').set('ai',function(card){ - return 5-get.value(card); - }); - "step 3" - if(result.bool){ - player.gain(result.cards,event.target); - event.target.$give(1,player); - game.delay(); - trigger.untrigger(); - trigger.player=event.target; - trigger.trigger('useCard'); - game.log(event.target,'成为了',trigger.card,'的使用者'); - } - else{ - game.log(event.target,'成为了',trigger.card,'的额外目标'); - trigger.targets.push(event.target); - } - } - }, - chanhui2:{ - trigger:{player:'phaseEnd'}, - forced:true, - popup:false, - audio:false, - content:function(){ - player.removeSkill('chanhui2'); - } - }, - quanji:{ - audio:2, - trigger:{player:'damageEnd'}, - frequent:true, - locked:false, - init:function(player){ - player.storage.quanji=[]; - }, - filter:function(event){ - return event.num>0; - }, - content:function(){ - "step 0" - player.draw(trigger.num); - "step 1" - if(player.countCards('he')){ - player.chooseCard('将'+get.cnNumber(trigger.num)+'张手牌置于武将牌上作为“权”',trigger.num,true); - } - else{ - event.finish(); - } - "step 2" - if(result.cards&&result.cards.length){ - player.lose(result.cards,ui.special); - player.storage.quanji=player.storage.quanji.concat(result.cards); - player.syncStorage('quanji'); - player.markSkill('quanji'); - game.log(player,'将',result.cards,'置于武将牌上作为“权”'); - } - }, - intro:{ - content:'cards' - }, - mod:{ - maxHandcard:function(player,num){ - return num+player.storage.quanji.length; - } - }, - ai:{ - maixie:true, - maixie_hp:true, - threaten:0.8, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(!target.hasFriend()) return; - if(target.hp>=4) return [0.5,get.tag(card,'damage')*2]; - if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5]; - if(target.hp==3) return [0.5,get.tag(card,'damage')*1.5]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; - } - } - } - } - }, - zili:{ - skillAnimation:true, - audio:3, - unique:true, - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return !player.hasSkill('paiyi')&&player.storage.quanji&&player.storage.quanji.length>=3; - }, - content:function(){ - "step 0" - player.chooseDrawRecover(2,true,function(event,player){ - if(player.hp==1&&player.isDamaged()) return 'recover_hp'; - return 'draw_card'; - }); - "step 1" - player.loseMaxHp(); - player.addSkill('paiyi'); - player.awakenSkill('zili'); - } - }, - paiyi:{ - enable:'phaseUse', - usable:1, - audio:2, - filterTarget:true, - filter:function(event,player){ - return player.storage.quanji.length>0; - }, - content:function(){ - "step 0" - player.chooseCardButton(player.storage.quanji,true); - "step 1" - var card=result.links[0]; - player.discard(card); - player.storage.quanji.remove(card); - if(!player.storage.quanji.length){ - player.unmarkSkill('quanji'); - } - else{ - player.markSkill('quanji'); - } - player.syncStorage('quanji'); - "step 2" - target.draw(2); - "step 3" - if(target.countCards('h')>player.countCards('h')){ - target.damage(); - } - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(player!=target) return 0; - if(player.countCards('h')+2<=player.hp+player.storage.quanji.length) return 1; - return 0; - } - } - } - }, - xianzhou:{ - skillAnimation:true, - audio:2, - unique:true, - enable:'phaseUse', - filter:function(event,player){ - return !player.storage.xianzhou&&player.countCards('e')>0; - }, - init:function(player){ - player.storage.xianzhou=false; - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - mark:true, - content:function(){ - "step 0" - player.awakenSkill('xianzhou'); - var cards=player.getCards('e'); - target.gain(cards,player); - event.num=cards.length; - player.$give(cards,target); - player.storage.xianzhou=true; - game.delay(); - "step 1" - target.chooseTarget([1,event.num],'令'+get.translation(player)+'回复'+ - event.num+'点体力,或对攻击范围内的'+event.num+'名角色造成一点伤害',function(card,player,target2){ - return get.distance(_status.event.player,target2,'attack')<=1; - }).set('ai',function(target2){ - var target=_status.event.player; - var player=_status.event.getParent().player; - if(get.attitude(target,player)>0){ - if(player.hp+event.num<=player.maxHp||player.hp==1) return -1; - } - return get.damageEffect(target2,target,target); - }); - "step 2" - if(result.bool){ - target.line(result.targets,'green'); - event.targets=result.targets; - event.num2=0; - } - else{ - player.recover(event.num); - event.finish(); - } - "step 3" - if(event.num22&&get.attitude(players[i],player)>2){ - bool=false;break; - } - } - if(bool) return -10; - if(player.hp==1) return 1; - if(game.phaseNumber0){ - return '移动装备'; - } - } - else{ - if(att<=0){ - return '移动装备'; - } - } - return 'draw_card'; - }).set('source',trigger.player); - } - else{ - next=player.chooseControl('draw_card','cancel2',function(){ - return 'draw_card'; - }); - } - next.set('prompt',get.prompt('qieting',trigger.player)); - "step 1" - if(result.control=='移动装备'){ - player.logSkill('qieting',trigger.player); - player.choosePlayerCard(trigger.player,'e','将一张装备牌移至你的装备区'); - } - else{ - if(result.control=='draw_card'){ - player.logSkill('qieting'); - player.draw(); - } - event.finish(); - } - "step 2" - if(result&&result.links&&result.links.length){ - game.delay(2); - trigger.player.$give(result.links[0],player); - player.equip(result.links[0]); - } - }, - ai:{ - expose:0.1 - } - }, - qieting2:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return _status.currentPhase==player&&event.targets&&(event.targets.length>1||event.targets[0]!=player); - }, - forced:true, - popup:false, - content:function(){ - player.addTempSkill('qieting3','phaseAfter'); - } - }, - qieting3:{}, - zhuikong:{ - audio:2, - trigger:{global:'phaseBegin'}, - check:function(event,player){ - if(get.attitude(player,event.player)<-2){ - var cards=player.getCards('h'); - if(cards.length>player.hp) return true; - for(var i=0;i9&&useful<7) return true; - } - } - return false; - }, - logTarget:'player', - filter:function(event,player){ - return player.hp0&&event.player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(trigger.player); - "step 1" - if(result.bool){ - trigger.player.addTempSkill('zishou2','phaseAfter'); - } - }, - }, - qiuyuan:{ - audio:2, - trigger:{target:'shaBefore'}, - direct:true, - priority:11, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('qiuyuan'),function(card,player,target){ - return target!=player&&_status.event.getTrigger().player.canUse('sha',target,false); - }).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,trigger.player,player)+0.1; - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - player.logSkill('qiuyuan',target); - event.target=target; - target.chooseCard({name:'shan'},'交给'+get.translation(player)+ - '一张闪,或成为此杀的额外目标').set('ai',function(card){ - return get.attitude(target,_status.event.source)>=0?1:-1; - }).set('source',player); - game.delay(); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.gain(result.cards,event.target); - event.target.$give(result.cards,player); - game.delay(); - } - else{ - trigger.targets.push(event.target); - game.log(event.target,'成为了额外目标'); - } - }, - ai:{ - expose:0.2, - effect:{ - target:function(card,player,target){ - if(card.name!='sha') return; - var players=game.filterPlayer(); - for(var i=0;i1){ - return 11-get.equipValue(card); - } - return 6-get.equipValue(card); - }, - content:function(){ - "step 0" - player.addTempSkill('gongji2','phaseAfter'); - "step 1" - if(get.type(cards[0])=='equip'){ - player.chooseTarget('是否弃置一名角色的一张牌?',function(card,player,target){ - return player!=target&&target.countCards('he')>0; - }).set('ai',function(target){ - var player=_status.event.player; - if(get.attitude(player,target)<0){ - return Math.max(0.5,get.effect(target,{name:'sha'},player,player)); - } - return 0; - }); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.line(result.targets,'green'); - event.target=result.targets[0]; - player.discardPlayerCard(event.target,'he',true).ai=get.buttonValue; - } - }, - ai:{ - order:9, - result:{ - player:1 - } - } - }, - gongji2:{ - mod:{ - attackFrom:function(){ - return -Infinity; - }, - }, - }, - zhuiyi:{ - audio:2, - trigger:{player:'dieBegin'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('zhuiyi'),function(card,player,target){ - return player!=target&&_status.event.source!=target; - }).set('ai',function(target){ - var num=get.attitude(_status.event.player,target); - if(num>0){ - if(target.hp==1){ - num+=2; - } - if(target.hpplayers[i].countCards('h')) return true; - } - return false; - }, - selectTarget:2, - content:function(){ - 'step 0' - var gainner,giver; - if(targets[0].countCards('h')0) return -1; - var players=game.filterPlayer(); - for(var i=0;i=0&&num20||player.countCards('he',{type:'equip'})>0; - }, - check:function(card){return 8-get.value(card)}, - selectTarget:2, - multitarget:true, - discard:false, - targetprompt:['得到牌','出杀目标'], - prepare:'give', - filterTarget:function(card,player,target){ - if(ui.selected.targets.length==0){ - return player!=target; - } - else{ - return lib.filter.filterTarget({name:'sha'},ui.selected.targets[0],target); - } - }, - content:function(){ - "step 0" - targets[0].gain(cards,player); - "step 1" - targets[0].chooseControl('draw_card','出杀',function(){ - var player=_status.event.player; - var target=_status.event.target; - if(get.effect(_status.event.target,{name:'sha'},player,player)>0){ - return 1; - } - return 0; - }).set('target',targets[1]).set('prompt','对'+get.translation(targets[1])+'使用一张杀,或摸一张牌'); - "step 2" - if(result.control=='draw_card'){ - targets[0].draw(); - } - else{ - targets[0].useCard({name:'sha'},targets[1]); - } - }, - ai:{ - result:{ - player:function(player){ - var players=game.filterPlayer(); - for(var i=0;i1&&get.attitude(players[i],player)>1){ - return 1; - } - } - return 0; - }, - target:function(player,target){ - if(ui.selected.targets.length){ - return -0.1; - } - return 1; - } - }, - order:8.5, - expose:0.2 - } - }, - xinxuanhuo:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('xinxuanhuo'),function(card,player,target){ - return player!=target; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(att>0){ - if(target.countCards('h')1&&check<2) return 0; - return get.unuseful(card)+9; - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length==1&&ui.selected.cards[0].name=='du') return 1-att; - return att-2; - }, - prompt:'将'+get.cnNumber(event.num)+'张手牌交给一名其他角色', - }).set('check',check); - "step 2" - if(result.bool){ - result.targets[0].gain(result.cards,event.player); - event.player.$give(result.cards.length,result.targets[0]); - player.line(result.targets,'green'); - } - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 3; - if(target.hp==2) return 1.5; - return 0.5; - }, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - } - } - } - }, - zhenlie:{ - audio:2, - filter:function(event,player){ - return event.player!=player&&event.card&&(event.card.name=='sha'||get.type(event.card)=='trick'); - }, - logTarget:'player', - check:function(event,player){ - if(get.attitude(player,event.player)>0){ - return false; - } - if(get.tag(event.card,'respondSha')){ - if(player.countCards('h',{name:'sha'})==0){ - return true; - } - } - else if(get.tag(event.card,'respondShan')){ - if(player.countCards('h',{name:'shan'})==0){ - return true; - } - } - else if(get.tag(event.card,'damage')){ - if(player.countCards('h')<2) return true; - } - else if(event.card.name=='shunshou'&&player.hp>2){ - return true; - } - return false; - }, - priority:10, - trigger:{target:'useCardToBefore'}, - content:function(){ - "step 0" - player.loseHp(); - "step 1" - trigger.untrigger(); - trigger.finish(); - "step 2" - if(trigger.player.countCards('he')){ - player.discardPlayerCard(trigger.player,'he',true); - } - }, - ai:{ - expose:0.3 - } - }, - wuyan:{ - audio:2, - trigger:{target:'useCardToBefore',player:'useCardToBefore'}, - forced:true, - priority:15, - check:function(event,player){ - return get.effect(event.target,event.card,event.player,player)<0; - }, - filter:function(event,player){ - if(!event.target) return false; - if(event.player==player&&event.target==player) return false; - return (get.type(event.card)=='trick'); - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; - }, - player:function(card,player,target,current){ - if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; - } - } - } - }, - xinwuyan:{ - audio:2, - trigger:{source:'damageBefore',player:'damageBefore'}, - forced:true, - priority:15, - check:function(event,player){ - if(player==event.player) return true; - return false; - }, - filter:function(event,player){ - return get.type(event.card,'trick')=='trick'; - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - notrick:true, - notricksource:true, - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='trick'&&get.tag(card,'damage')){ - return 'zeroplayertarget'; - } - }, - player:function(card,player,target,current){ - if(get.type(card)=='trick'&&get.tag(card,'damage')){ - return 'zeroplayertarget'; - } - } - } - } - }, - xinjujian:{ - trigger:{player:'phaseEnd'}, - direct:true, - audio:2, - filter:function(event,player){ - return player.countCards('he')>player.countCards('he',{type:'basic'}); - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - filterTarget:function(card,player,target){ - return player!=target; - }, - filterCard:function(card,player){ - return get.type(card)!='basic'&&lib.filter.cardDiscardable(card,player); - }, - ai1:function(card){ - if(get.tag(card,'damage')&&get.type(card)=='trick'){ - return 20; - } - return 9-get.value(card); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(att>0){ - if(target.isTurnedOver()) att+=3; - if(target.hp==1) att+=3; - } - return att; - }, - position:'he', - prompt:get.prompt('xinjujian') - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('xinjujian',target); - player.discard(result.cards); - if(target.hp==target.maxHp&& - !target.isTurnedOver()&& - !target.isLinked()){ - target.draw(2); - event.finish(); - } - else{ - var controls=['draw_card']; - if(target.hp2){ - return 'recover_hp'; - } - else if(target.hp==2&&target.maxHp>2&&target.countCards('h')>1){ - return 'recover_hp'; - } - else{ - return 'draw_card'; - } - } - } - } - else{ - event.finish(); - } - "step 2" - event.control=result.control; - switch(event.control){ - case 'recover_hp':event.target.recover();event.finish();break; - case 'draw_card':event.target.draw(2);event.finish();break; - case 'reset_character':if(event.target.isTurnedOver()) event.target.turnOver();break; - } - "step 3" - if(event.control=='reset_character'&&event.target.isLinked()){ - event.target.link(); - } - }, - ai:{ - expose:0.2, - threaten:1.4 - } - }, - jujian:{ - enable:'phaseUse', - usable:1, - audio:2, - filterCard:true, - position:'he', - selectCard:[1,3], - check:function(card){ - var player=get.owner(card); - if(get.type(card)=='trick') return 10; - if(player.countCards('h')-player.hp-ui.selected.cards.length>0){ - return 8-get.value(card); - } - return 4-get.value(card); - }, - filterTarget:function(card,player,target){ - return player!=target; - }, - content:function(){ - target.draw(cards.length); - if(cards.length==3){ - if(get.type(cards[0],'trick')==get.type(cards[1],'trick')&& - get.type(cards[0],'trick')==get.type(cards[2],'trick')){ - player.recover(); - } - } - }, - ai:{ - expose:0.2, - order:1, - result:{ - target:1 - } - } - }, - yizhong:{ - trigger:{target:'shaBefore'}, - forced:true, - audio:2, - filter:function(event,player){ - if(player.getEquip(2)) return false; - return (event.card.name=='sha'&&get.color(event.card)=='black') - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player==target&&get.subtype(card)=='equip2'){ - if(get.equipValue(card)<=8) return 0; - } - if(target.getEquip(2)) return; - if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; - } - } - } - }, - jueqing:{ - trigger:{source:'damageBefore'}, - forced:true, - audio:2, - priority:16, - check:function(){return false;}, - content:function(){ - trigger.untrigger(); - trigger.finish(); - var ex=0; - if(trigger.card&&trigger.card.name=='sha'){ - if(player.hasSkill('jiu')) ex++; - if(player.hasSkill('luoyi2')) ex++; - if(player.hasSkill('reluoyi2')) ex++; - } - trigger.player.loseHp(trigger.num+ex); - }, - ai:{ - jueqing:true - } - }, - shangshi:{ - audio:2, - trigger:{player:['loseEnd','changeHp']}, - forced:true, - filter:function(event,player){ - return (player.countCards('h')0) return 0; - if(player.getEquip('zhuge')&&player.countCards('h','sha')>1) return 0; - if(!player.countCards('h','sha')) return 0; - var targets=[]; - var target; - var players=game.filterPlayer(); - for(var i=0;inum){ - target=targets[i]; - num=num2; - } - } - if(num<=0) return 0; - var e2=target.getEquip(2); - if(e2){ - if(e2.name=='tengjia'){ - if(!player.countCards('h',{name:'sha',nature:'fire'})&&!player.getEquip('zhuque')) return 0; - } - if(e2.name=='renwang'){ - if(!player.countCards('h',{name:'sha',color:'red'})) return 0; - } - if(e2.name=='baiyin') return 0; - } - if(player.getEquip('guanshi')&&player.countCards('he')>2) return 1; - return target.countCards('h')>3?0:1; - } - if(player==_status.event.dying||player.isTurnedOver()) return 3; - } - }, - effect:{ - target:function(card,player,target){ - if(card.name=='guiyoujie') return [0,0.5]; - if(target.isTurnedOver()){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(target.hp==1) return; - return [1,target.countCards('h')/2]; - } - } - } - } - }, - }, - jiushi2:{ - trigger:{player:'damageBegin'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return player.classList.contains('turnedover'); - }, - content:function(){ - player.storage.jiushi=true; - } - }, - jiushi3:{ - audio:2, - trigger:{player:'damageAfter'}, - check:function(event,player){ - return player.isTurnedOver(); - }, - filter:function(event,player){ - if(player.storage.jiushi){ - return true; - } - return false; - }, - content:function(){ - player.storage.jiushi=false; - player.turnOver(); - } - }, - zongshi:{ - mod:{ - maxHandcard:function(player,num){ - var list=['wei','shu','wu','qun']; - var num2=game.countPlayer(function(current){ - if(list.contains(current.group)){ - list.remove(current.group); - return true; - } - }); - return num+num2; - } - } - }, - zishou:{ - audio:2, - trigger:{player:'phaseDrawBegin'}, - check:function(event,player){ - return player.countCards('h')<=player.maxHp||player.skipList.contains('phaseUse'); - }, - content:function(){ - var list=['wei','shu','wu','qun']; - var num=game.countPlayer(function(current){ - if(list.contains(current.group)){ - list.remove(current.group); - return true; - } - }); - trigger.num+=num; - player.addTempSkill('zishou2','phaseAfter'); - - }, - ai:{ - threaten:1.5 - } - }, - zishou2:{ - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target) return false; - } - } - }, - yaowu:{ - trigger:{player:'damageEnd'}, - priority:1, - audio:2, - filter:function(event){ - if(event.card&&(event.card.name=='sha')){ - if(get.color(event.card)=='red') return true; - } - return false; - }, - forced:true, - check:function(){ - return false; - }, - content:function(){ - trigger.source.chooseDrawRecover(true); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'&&(get.color(card)=='red')){ - return [1,-2]; - } - } - } - } - }, - olddanshou:{ - trigger:{source:'damageEnd'}, - priority:9, - check:function(event,player){ - return get.attitude(player,event.player)<=0; - }, - content:function(){ - "step 0" - player.draw(); - "step 1" - while(_status.event.name!='phase'){ - _status.event=_status.event.parent; - } - game.resetSkills(); - _status.event.finish(); - _status.event.untrigger(true); - } - }, - danshou:{ - enable:'phaseUse', - filterCard:true, - position:'he', - audio:2, - filter:function(event,player){ - var num=player.getStat().skill.danshou; - if(num){ - num++; - } - else{ - num=1; - } - return player.countCards('he')>=num; - }, - check:function(card){ - return 6-get.value(card); - }, - selectCard:function(card){ - var num=_status.event.player.getStat().skill.danshou; - if(num) return num+1; - return 1; - }, - filterTarget:function(card,player,target){ - if(player==target) return false; - var num=player.getStat().skill.danshou; - if(num){ - num++; - } - else{ - num=1; - } - if(num<=2&&!target.countCards('he')) return false; - return get.distance(player,target,'attack')<=1; - }, - content:function(){ - 'step 0' - var num=player.getStat().skill.danshou; - switch(num){ - case 1:player.discardPlayerCard(target,true);break; - case 2:target.chooseCard('选择一张牌交给'+get.translation(player),'he',true);break; - case 3:target.damage();break; - default:game.asyncDraw([player,target],2); - } - if(num!=2) event.finish(); - 'step 1' - if(result.cards){ - player.gain(result.cards,target); - target.$give(result.cards.length,player); - } - }, - ai:{ - order:8.6, - result:{ - target:function(player,target){ - var num=player.getStat().skill.danshou; - if(num){ - num++; - } - else{ - num=1; - } - if(num>3) return 0; - if(num==3) return get.damageEffect(target,player,target); - return -1; - } - } - } - }, - qice:{ - enable:'phaseUse', - usable:1, - audio:2, - filter:function(event,player){ - return player.countCards('h')>0 - }, - chooseButton:{ - dialog:function(){ - var list=['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; - for(var i=0;i0){ - if(players[i].hp<2){ - lose--; - recover+=0.5; - } - lose--; - recover++; - } - else if(get.attitude(player,players[i])<0){ - if(players[i].hp<2){ - lose++; - recover-=0.5; - } - lose++; - recover--; - } - } - else{ - if(get.attitude(player,players[i])>0){ - lose--; - } - else if(get.attitude(player,players[i])<0){ - lose++; - } - } - } - } - if(lose>recover&&lose>0) return (button.link[2]=='nanman')?1:-1; - if(lose0) return (button.link[2]=='taoyuan')?1:-1; - return (button.link[2]=='wuzhong')?1:-1; - }, - backup:function(links,player){ - return { - filterCard:true, - selectCard:-1, - audio:2, - popname:true, - viewAs:{name:links[0][2]}, - } - }, - prompt:function(links,player){ - return '将全部手牌当作'+get.translation(links[0][2])+'使用'; - } - }, - ai:{ - order:1, - result:{ - player:function(player){ - var num=0; - var cards=player.getCards('h'); - if(cards.length>=3&&player.hp>=3) return 0; - for(var i=0;i1 - } - else{ - for(var i=0;i3&&player.countCards('h','sha')>1){ - return 'jiangchi_less'; - } - if(player.countCards('h','sha')>2){ - return 'jiangchi_less'; - } - if(player.hp-player.countCards('h')>1){ - return 'jiangchi_more'; - } - return 'cancel2'; - }); - "step 1" - if(result.control=='jiangchi_less'){ - trigger.num--; - player.addTempSkill('jiangchi2','phaseUseEnd'); - player.logSkill('jiangchi'); - } - else if(result.control=='jiangchi_more'){ - trigger.num++; - player.addTempSkill('jiangchi3','phaseUseEnd'); - player.logSkill('jiangchi'); - } - } - }, - jiangchi2:{ - mod:{ - targetInRange:function(card,player,target,now){ - if(card.name=='sha') return true; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; - } - } - }, - jiangchi3:{ - mod:{ - cardEnabled:function(card){if(card.name=='sha') return false} - } - }, - xinzhan:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return true;//player.countCards('h')>player.maxHp; - }, - usable:1, - content:function(){ - "step 0" - var cards=get.cards(3); - event.cards=cards; - var next=player.chooseCardButton(cards,'选择获得的红桃牌',[1,Infinity]).set('filterButton',function(button){ - return get.suit(button.link)=='heart'; - }); - "step 1" - if(result.bool){ - player.gain(result.links); - player.$draw(result.links); - game.delay(2); - } - for(var i=event.cards.length-1;i>=0;i--){ - if(!result.bool||!result.links.contains(event.cards[i])){ - ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); - } - } - }, - ai:{ - order:11, - result:{ - player:1 - } - } - }, - huilei:{ - audio:2, - trigger:{player:'dieBegin'}, - forced:true, - filter:function(event){ - return event.source!=undefined; - }, - content:function(){ - trigger.source.discard(trigger.source.getCards('he')); - }, - ai:{ - threaten:0.7 - } - }, - xinenyuan:{ - audio:true, - trigger:{player:'damageEnd'}, - check:function(event,player){ - var att=get.attitude(player,event.source); - var num=event.source.countCards('h'); - if(att<=0) return true; - if(num>2) return true; - if(num) return att<4; - return false; - }, - filter:function(event,player){ - return event.source&&event.source!=player&&event.num>0&&event.source.isAlive(); - }, - content:function(){ - "step 0" - event.num=trigger.num; - "step 1" - trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌或流失一点体力').set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ - return 11-get.value(card); - } - else{ - return 7-get.value(card); - } - }); - "step 2" - if(result.bool){ - player.gain(result.cards[0],trigger.source); - trigger.source.$give(1,player); - } - else{ - trigger.source.loseHp(); - } - if(event.num>1){ - event.num--; - event.goto(1); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return [1,-1.5]; - if(!target.hasFriend()) return; - if(get.tag(card,'damage')) return [1,0,0,-0.7]; - } - } - }, - group:'xinenyuan2' - }, - xinenyuan2:{ - trigger:{player:'gainEnd'}, - filter:function(event,player){ - return event.source&&event.source.isAlive()&&event.source!=player&&event.cards.length>=2; - }, - logTarget:'source', - check:function(event,player){ - return get.attitude(player,event.source)>0; - }, - content:function(){ - trigger.source.draw(); - } - }, - enyuan:{ - locked:true, - group:['enyuan1','enyuan2'], - ai:{ - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(!target.hasFriend()) return; - if(get.tag(card,'damage')) return [1,0,0,-1]; - } - } - } - }, - enyuan1:{ - trigger:{player:'recoverEnd'}, - forced:true, - audio:2, - filter:function(event,player){ - return event.source&&event.source!=player; - }, - content:function(){ - trigger.source.draw(); - } - }, - enyuan2:{ - trigger:{player:'damageEnd'}, - forced:true, - audio:true, - filter:function(event,player){ - return event.source&&event.source!=player; - }, - content:function(){ - "step 0" - trigger.source.chooseCard('交出一张红桃牌或流失一点体力',function(card){ - return get.suit(card)=='heart'; - }).set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ - return 11-get.value(card); - } - else{ - return 7-get.value(card); - } - }); - "step 1" - if(result.bool){ - player.gain(result.cards[0],trigger.source); - trigger.source.$give(1,player); - } - else{ - trigger.source.loseHp(); - } - } - }, - xuanhuo:{ - audio:2, - enable:'phaseUse', - usable:1, - discard:false, - prepare:'give2', - filter:function(event,player){ - return player.countCards('he',{suit:'heart'}); - }, - filterCard:function(card){ - return get.suit(card)=='heart'; - }, - filterTarget:function(card,player,target){ - if(game.countPlayer()==2) return false; - return player!=target; - }, - check:function(card){ - var player=get.owner(card); - var players=game.filterPlayer(); - for(var i=0;i3) break; - } - if(i==players.length) return -1; - return 5-get.value(card); - }, - content:function(){ - "step 0" - target.gain(cards,player); - // game.delay(); - "step 1" - player.gainPlayerCard(target,'he',true); - "step 2" - var source=target; - event.card=result.links[0]; - player.chooseTarget('选择一个目标送出'+get.translation(event.card),function(card,player,target){ - return target!=_status.event.source&&target!=player; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }).set('source',target); - "step 3" - if(result.bool){ - result.targets[0].gain(card,player); - player.$give(1,result.targets[0]); - game.delay(); - } - }, - ai:{ - result:{ - target:-0.5, - }, - basic:{ - order:9, - } - } - }, - ganlu:{ - enable:'phaseUse', - usable:1, - audio:2, - selectTarget:2, - filterTarget:function(card,player,target){ - if(target.isMin()) return false; - if(ui.selected.targets.length==0) return true; - if(ui.selected.targets[0].countCards('e')==0&&target.countCards('e')==0) return false; - return Math.abs(ui.selected.targets[0].countCards('e')-target.countCards('e'))<=player.maxHp-player.hp; - }, - multitarget:true, - content:function(){ - "step 0" - event.cards=[targets[0].getCards('e'),targets[1].getCards('e')]; - targets[0].lose(event.cards[0],ui.special); - targets[1].lose(event.cards[1],ui.special); - if(event.cards[0].length) targets[0].$give(event.cards[0],targets[1]); - if(event.cards[1].length) targets[1].$give(event.cards[1],targets[0]); - "step 1" - for(var i=0;i0) list1.push(players[i]); - else if(get.attitude(player,players[i])<0) list2.push(players[i]); - } - list1.sort(function(a,b){ - return a.countCards('e')-b.countCards('e'); - }); - list2.sort(function(a,b){ - return b.countCards('e')-a.countCards('e'); - }); - var delta; - for(var i=0;i0; - }, - direct:true, - content:function(){ - "step 0" - var check; - if(trigger.player.isUnderControl(true,player)){ - check=player.hasCard(function(card){ - return get.type(card)!='basic'; - }); - } - else{ - check=(get.attitude(player,trigger.player)>0); - } - player.choosePlayerCard(trigger.player,get.prompt('buyi',trigger.player),'h').set('ai',function(button){ - if(!_status.event.check) return 0; - if(_status.event.target.isUnderControl(true,_status.event.player)){ - if(get.type(button.link)!='basic'){ - return 10-get.value(button.link); - } - return 0; - } - else{ - return Math.random(); - } - }).set('check',check).set('filterButton',function(button){ - if(_status.event.player==_status.event.target){ - return lib.filter.cardDiscardable(button.link,_status.event.player); - } - return true; - }); - "step 1" - if(result.bool){ - player.logSkill('buyi',trigger.player); - event.card=result.links[0]; - player.showCards([event.card],get.translation(player)+'展示的手牌'); - } - else{ - event.finish(); - } - "step 2" - if(get.type(event.card)!='basic'){ - trigger.player.recover(); - trigger.player.discard(event.card); - } - }, - ai:{ - threaten:1.4 - } - }, - pojun:{ - audio:2, - trigger:{source:'damageEnd'}, - check:function(event,player){ - if(event.player.isTurnedOver()) return get.attitude(player,event.player)>0; - if(event.player.hp<3){ - return get.attitude(player,event.player)<0; - } - return get.attitude(player,event.player)>0; - }, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.player.isAlive(); - }, - logTarget:'player', - content:function(){ - "step 0" - trigger.player.draw(Math.min(5,trigger.player.hp)); - "step 1" - trigger.player.turnOver(); - } - }, - jingce:{ - trigger:{player:'phaseUseEnd'}, - frequent:true, - filter:function(event,player){ - return get.cardCount(true,player)>=player.hp; - }, - content:function(){ - player.draw(2); - }, - audio:2, - init:function(player){player.storage.jingce=true}, - intro:{ - content:function(storage,player){ - if(_status.currentPhase==player) return '已使用'+get.cardCount(true,player)+'张牌'; - } - } - }, - chengxiang:{ - trigger:{player:'damageEnd'}, - direct:true, - audio:2, - content:function(){ - "step 0" - event.cards=get.cards(4); - event.videoId=lib.status.videoId++; - game.broadcastAll(function(player,id,cards){ - var str; - if(player==game.me&&!_status.auto){ - str='称象:选择任意张点数不大于13的牌'; - } - else{ - str='称象'; - } - var dialog=ui.create.dialog(str,cards); - dialog.videoId=id; - },player,event.videoId,event.cards); - event.time=get.utc(); - game.addVideo('showCards',player,['称象',get.cardsInfo(event.cards)]); - game.addVideo('delay',null,2); - "step 1" - var next=player.chooseButton([0,4]); - next.set('dialog',event.videoId); - next.set('filterButton',function(button){ - var num=0 - for(var i=0;i0){ - game.delay(0,time); - } - "step 3" - game.broadcastAll('closeDialog',event.videoId); - var cards2=event.cards2; - player.gain(cards2,'log'); - player.$draw(cards2); - game.delay(); - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(!target.hasFriend()) return; - if(target.hp>=4) return [1,2]; - if(target.hp==3) return [1,1.5]; - if(target.hp==2) return [1,0.5]; - } - } - } - } - }, - renxin:{ - trigger:{global:'damageBefore'}, - audio:3, - priority:6, - filter:function(event,player){ - return event.player!=player&&event.player.hp==1&&player.countCards('he',{type:'equip'})>0; - }, - direct:true, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('renxin',trigger.player),{type:'equip'},'he'); - next.logSkill=['renxin',trigger.player]; - next.set('ai',function(card){ - var player=_status.event.player; - if(get.attitude(player,_status.event.getTrigger().player)>3){ - return 11-get.value(card); - } - return -1; - }); - "step 1" - if(result.bool){ - player.turnOver(); - } - else{ - event.finish(); - } - "step 2" - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - expose:0.5 - } - }, - yuce:{ - audio:2, - trigger:{player:'damageAfter'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0&&player.isDamaged(); - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('yuce')); - next.logSkill='yuce'; - next.set('ai',function(card){ - return 7-get.value(card); - }); - "step 1" - if(result.bool){ - var type=get.type(result.cards[0],'trick'); - if(trigger.source){ - trigger.source.chooseToDiscard('弃置一张'+get.translation(type)+'牌或令'+get.translation(player)+'回复一点体力',function(card){ - return get.type(card,'trick')==_status.event.type; - }).set('ai',function(card){ - if(get.recoverEffect(_status.event.getParent().player,_status.event.player,_status.event.player)<0){ - return 7-get.value(card); - } - return 0; - }).set('type',type); - } - else{ - event.recover=true; - } - } - else{ - event.finish(); - } - "step 2" - if(event.recover){ - player.recover(); - } - else if(result.bool){ - player.draw(); - } - else{ - player.recover(); - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage'&&target.countCards('h'))){ - return 0.8 - } - } - } - } - }, - xiansi:{ - audio:2, - trigger:{player:'phaseBegin'}, - direct:true, - init:function(player){ - player.storage.xiansi=[]; - }, - unique:true, - forceunique:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('xiansi'),[1,2],function(card,player,target){ - return target.countCards('he')>0; - },function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool){ - player.logSkill('xiansi',result.targets); - event.targets=result.targets; - } - else{ - event.finish(); - } - "step 2" - if(event.targets.length){ - var target=event.targets.shift(); - event.current=target; - player.choosePlayerCard(target,true); - } - else{ - event.finish(); - } - "step 3" - if(result.bool){ - player.storage.xiansi=player.storage.xiansi.concat(result.links); - player.markSkill('xiansi'); - player.syncStorage('xiansi'); - event.current.lose(result.links,ui.special); - event.current.$give(result.links,player); - event.goto(2); - } - }, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - for(var i=0;i1&&player.canUse('sha',players[i],true,true); - } - } - return false; - }, - content:function(){ - "step 0" - event.target=game.findPlayer(function(current){ - return current.storage.xiansi; - }); - if(event.target){ - player.chooseCardButton(2,event.target.storage.xiansi).set('ai',function(){ - return 1; - }); - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - for(var i=0;i0); + var goon=false; + if(player.hp==1){ + goon=true; + } + else{ + var he=player.getCards('he'); + var num=0; + for(var i=0;i=2){ + goon=true;break; + } + } + } + } + player.chooseCard('he',[1,player.countCards('he')],get.prompt('huisheng',trigger.source)).set('ai',function(card){ + if(_status.event.att){ + return 10-get.value(card); + } + if(_status.event.goon){ + return 8-get.value(card); + } + return 0; + }).set('goon',goon).set('att',att); + 'step 1' + if(result.bool){ + player.logSkill('huisheng'); + event.num=result.cards.length; + var goon=false; + if(event.num>2||get.attitude(trigger.source,player)>=0){ + goon=true; + } + var forced=false; + var str='获得其中一张牌并防止伤害'; + if(trigger.source.countCards('he')0; + }).set('ai',function(target){ + var player=_status.event.player; + var zhu=_status.event.zhu; + if(get.attitude(player,target)>0) return 0; + var nh=target.countCards('h'); + var nh2=zhu.countCards('h'); + if(nh>nh2) return 2; + if(nh==nh2&&target.countCards('e')) return 1.5; + return 1; + }).set('zhu',get.zhu(player)); + 'step 1' + if(result.bool){ + event.target=result.targets[0]; + player.logSkill('qinqing',event.target); + player.discardPlayerCard(event.target,'he',true); + } + else{ + event.finish(); + } + 'step 2' + event.target.draw(); + 'step 3' + if(event.target.countCards('h')>get.zhu(player).countCards('h')){ + player.draw(); + } + }, + ai:{ + threaten:1.2 + } + }, + guizao:{ + trigger:{player:'phaseDiscardEnd'}, + direct:true, + filter:function(event,player){ + if(event.cards&&event.cards.length>1){ + var suits=[]; + for(var i=0;i0||target.hp<=2){ + spade=false; + } + target.chooseToDiscard('h',true).set('ai',function(card){ + if(get.suit(card)=='spade'){ + if(_status.event.spade){ + return 10-get.value(card); + } + else{ + return -10-get.value(card); + } + } + if(_status.event.getParent().player.storage.jiyu2.contains(get.suit(card))){ + return -3-get.value(card); + } + return -get.value(card); + }).set('spade',spade); + 'step 1' + var card=result.cards[0]; + if(get.suit(card)=='spade'){ + player.turnOver(); + target.loseHp(); + } + player.storage.jiyu.push(target); + player.storage.jiyu2.add(get.suit(card)); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(player.isTurnedOver()||target.countCards('h')<=3) return -1; + return 0; + } + } + }, + group:'jiyu2', + mod:{ + cardEnabled:function(card,player){ + if(player.storage.jiyu2&&player.storage.jiyu2.contains(get.suit(card))) return false; + } + } + }, + jiyu2:{ + trigger:{player:['phaseUseBegin','phaseAfter']}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.jiyu=[]; + player.storage.jiyu2=[]; + } + }, + jiaozhao:{ + enable:'phaseUse', + usable:1, + audio:2, + check:function(card){ + return 8-get.value(card); + }, + filterCard:true, + discard:false, + lose:false, + content:function(){ + 'step 0' + player.showCards(cards); + 'step 1' + if(player.storage.jiaozhao2){ + event.target=player; + } + else{ + var targets=game.filterPlayer(); + targets.remove(player); + targets.sort(function(a,b){ + return Math.max(1,get.distance(player,a))-Math.max(1,get.distance(player,b)); + }); + var distance=Math.max(1,get.distance(player,targets[0])); + for(var i=1;idistance){ + targets.splice(i);break; + } + } + player.chooseTarget(true,function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }).set('targets',targets); + } + 'step 2' + if(!event.target){ + event.target=result.targets[0]; + player.line(result.targets,'green'); + } + if(!event.target){ + event.finish(); + return; + } + var list=['sha','shan','tao','jiu']; + if(player.storage.jiaozhao1){ + list=list.concat(['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']); + } + for(var i=0;i=5){ + choice='jiu'; + } + else if(nh<=2){ + choice='sha'; + } + else{ + choice=Math.random()<0.5?'sha':'jiu'; + } + } + else{ + var recover=0,lose=1,players=game.filterPlayer(); + for(var i=0;i0){ + if(players[i].hp<2){ + lose--; + recover+=0.5; + } + lose--; + recover++; + } + else if(get.attitude(player,players[i])<0){ + if(players[i].hp<2){ + lose++; + recover-=0.5; + } + lose++; + recover--; + } + } + else{ + if(get.attitude(player,players[i])>0){ + lose--; + } + else if(get.attitude(player,players[i])<0){ + lose++; + } + } + } + } + if(lose>recover&&lose>0){ + choice=Math.random()<0.7?'nanman':'wanjian'; + } + else if(lose0){ + choice='taoyuan'; + } + else{ + choice=Math.random()<0.5?'wuzhong':'shunshou'; + } + } + } + event.target.chooseButton(['矫诏',[list,'vcard']],true).set('ai',function(button){ + return button.link[2]==_status.event.choice?1:0; + }).set('choice',choice); + 'step 3' + var chosen=result.links[0][2]; + event.target.showCards(game.createCard({name:chosen,suit:cards[0].suit,number:cards[0].number}),get.translation(event.target)+'声明了'+get.translation(chosen)); + player.storage.jiaozhao=cards[0]; + player.storage.jiaozhao_card=chosen; + game.broadcastAll(function(name){ + lib.skill.jiaozhao2.viewAs={name:name}; + },result.links[0][2]); + }, + ai:{ + order:9, + result:{ + player:1 + } + }, + intro:{ + content:function(storage,player){ + if(player.storage.jiaozhao2){ + return '出牌阶段限一次,你可以展示一张手牌,然后你声明一张基本牌或普通锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标'; + } + else{ + return '出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌或普通锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标'; + } + } + }, + group:['jiaozhao2','jiaozhao3'] + }, + jiaozhao2:{ + enable:'phaseUse', + audio:'jiaozhao', + filter:function(event,player){ + if(!player.storage.jiaozhao) return false; + var name=player.storage.jiaozhao_card; + if(name=='tao'||name=='shan'||name=='wuzhong'||name=='jiu') return false; + return player.getCards('h').contains(player.storage.jiaozhao); + }, + filterCard:function(card,player){ + return card==player.storage.jiaozhao; + }, + selectCard:-1, + popname:true, + filterTarget:function(card,player,target){ + if(player==target) return false; + return lib.filter.filterTarget({name:player.storage.jiaozhao_card},player,target); + }, + check:function(card){ + return 8-get.value(card); + }, + ai:{ + order:6 + } + }, + jiaozhao3:{ + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + content:function(){ + delete player.storage.jiaozhao; + delete player.storage.jiaozhao_card; + } + }, + danxin:{ + trigger:{player:'damageEnd'}, + frequent:true, + audio:2, + content:function(){ + 'step 0' + if(player.storage.jiaozhao1&&player.storage.jiaozhao2){ + player.draw(); + event.finish(); + } + else{ + var list=['draw_card','更改描述']; + var prompt; + if(player.storage.jiaozhao1){ + prompt='摸一张牌或更改矫诏的描述

更改描述:将“选择距离最近的一名其他角色,该角色”改为“你”'; + } + else{ + prompt='摸一张牌或更改矫诏的描述

更改描述:将“基本牌”改为“基本牌或普通锦囊牌”'; + } + player.chooseControl(list,function(){ + if(!_status.event.player.hasSkill('jiaozhao')) return 'draw_card'; + return '更改描述'; + }).set('prompt',prompt); + } + 'step 1' + if(result.control=='draw_card'){ + player.draw(); + } + else{ + game.log(player,'更改了','【矫诏】','的描述'); + player.popup('更改描述'); + player.markSkill('jiaozhao'); + if(player.storage.jiaozhao1){ + player.storage.jiaozhao2=true; + } + else{ + player.storage.jiaozhao1=true; + } + } + } + }, + zongzuo:{ + trigger:{global:'phaseBefore'}, + forced:true, + priority:10, + audio:2, + filter:function(event,player){ + return !player.storage.zongzuo; + }, + content:function(){ + 'step 0' + player.storage.zongzuo=true; + var list=['wei','shu','wu','qun']; + var num=game.countPlayer(function(current){ + if(list.contains(current.group)){ + list.remove(current.group); + return true; + } + }); + player.gainMaxHp(num); + event.num=num; + 'step 1' + player.hp+=event.num; + player.update(); + }, + group:'zongzuo_lose', + subSkill:{ + lose:{ + trigger:{global:'dieAfter'}, + forced:true, + audio:'zongzuo', + filter:function(event,player){ + var list=['wei','shu','wu','qun']; + if(!list.contains(event.player.group)) return false; + if(game.hasPlayer(function(current){ + return current.group==event.player.group; + })){ + return false; + } + return true; + }, + content:function(){ + player.loseMaxHp(); + } + } + } + }, + zhige:{ + enable:'phaseUse', + usable:1, + audio:2, + filter:function(event,player){ + return player.countCards('h')>player.hp; + }, + filterTarget:function(card,player,target){ + return get.distance(target,player,'attack')<=1&&target.countCards('e')>0; + }, + content:function(){ + 'step 0' + target.chooseToUse({name:'sha'},'止戈:使用一张杀,或将其装备区里的一张牌交给'+get.translation(player)); + 'step 1' + if(!result.bool&&target.countCards('e')){ + target.chooseCard('e',true,'将其装备区里的一张牌交给'+get.translation(player)); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool&&result.cards&&result.cards.length){ + player.gain(result.cards,target); + target.$give(result.cards,player); + } + }, + ai:{ + expose:0.2, + order:5, + result:{ + target:-1, + player:function(player,target){ + if(target.countCards('h')==0) return 0; + if(target.countCards('h')==1) return -0.1; + if(player.hp<=2) return -2; + if(player.countCards('h','shan')==0) return -1; + return -0.5; + } + } + } + }, + kuangbi:{ + enable:'phaseUse', + usable:1, + audio:2, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + content:function(){ + 'step 0' + target.chooseCard('he',[1,3],'匡弼:将1~3张牌置于'+get.translation(player)+'的武将牌上',true).set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ + return 7-get.value(card); + } + return -get.value(card); + }); + 'step 1' + if(result.bool){ + target.$give(result.cards,player); + target.lose(result.cards,ui.special); + player.storage.kuangbi_draw=result.cards; + player.storage.kuangbi_draw_source=target; + player.syncStorage('kuangbi_draw'); + player.addSkill('kuangbi_draw'); + } + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>0){ + return Math.sqrt(target.countCards('he')); + } + return 0; + }, + player:1 + } + }, + subSkill:{ + draw:{ + trigger:{player:'phaseBegin'}, + forced:true, + mark:true, + intro:{ + content:'cards' + }, + content:function(){ + var cards=player.storage.kuangbi_draw; + if(cards){ + player.gain(cards,'gain2'); + var target=player.storage.kuangbi_draw_source; + if(target&&target.isAlive()){ + target.draw(cards.length); + } + } + delete player.storage.kuangbi_draw; + delete player.storage.kuangbi_draw_source; + player.removeSkill('kuangbi_draw'); + } + } + } + }, + fulin:{ + trigger:{player:'phaseDiscardBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.addTempSkill('fulin2','phaseDiscardAfter'); + }, + group:['fulin_count','fulin_reset'], + subSkill:{ + reset:{ + trigger:{player:['phaseBegin','phaseEnd']}, + forced:true, + popup:false, + silent:true, + priority:10, + content:function(){ + player.storage.fulin=[]; + } + }, + count:{ + trigger:{player:'gainEnd'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return _status.currentPhase==player; + }, + content:function(){ + if(!player.storage.fulin){ + player.storage.fulin=[]; + } + for(var i=0;i0; + }, + audio:2, + content:function(){ + 'step 0' + var card=target.getCards('h').randomGet(); + player.gain(card,target); + target.$giveAuto(card,player); + 'step 1' + var name=get.translation(target.name); + player.chooseControl(function(){ + return Math.random()<0.5?'选项一':'选项二'; + }).set('prompt','督粮').set('choiceList',['令'+name+'观看牌堆顶的两张牌,然后获得其中的基本牌','令'+name+'于下个摸牌阶段额外摸一张牌']); + 'step 2' + if(result.control=='选项一'){ + var cards=get.cards(2); + target.viewCards('督粮',cards); + event.cards2=[]; + for(var i=0;i=_status.event.getParent().num) return -1; + if(_status.event.player.hasSkillTag('nofire')) return -1; + if(_status.event.res>=0) return 6-get.value(card); + if(get.type(card)!='basic'){ + return 10-get.value(card); + } + return 8-get.value(card); + }).set('res',res); + } + else{ + event.finish(); + } + "step 2" + if(!result.bool){ + event.target.damage(2,'fire'); + event.num=1; + } + else{ + event.num=result.cards.length+1; + } + event.goto(1); + }, + ai:{ + order:1, + result:{ + player:function(player){ + var num=0,players=game.filterPlayer(); + for(var i=0;i0){ + num--; + } + else if(att<0){ + num++; + } + } + } + if(game.players.length<5){ + return num-1; + } + else{ + return num-2; + } + } + } + }, + init:function(player){ + player.storage.xinfencheng=false; + }, + intro:{ + content:'limited' + } + }, + xinjuece:{ + audio:2, + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(player){ + return player.countCards('h')==0; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('xinjuece'),function(card,player,target){ + return target.countCards('h')==0; + }).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + 'step 1' + if(result.bool){ + player.logSkill('juece',result.targets); + result.targets[0].damage(); + } + } + }, + xinmieji:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return get.color(card)=='black'&&get.type(card,'trick')=='trick'; + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + discard:false, + delay:false, + check:function(card){ + return 8-get.value(card); + }, + content:function(){ + 'step 0' + player.showCards(cards); + 'step 1' + ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); + var n1=target.getCards('he',function(card){ + if(!lib.filter.cardDiscardable(card,player)) return false; + return get.type(card,'trick')=='trick'; + }); + var n2=target.getCards('he',function(card){ + if(!lib.filter.cardDiscardable(card,player)) return false; + return get.type(card,'trick')!='trick'; + }); + if(n1.length>1||n2.length>2||(n1.length==1&&n2.length==2)){ + target.chooseToDiscard('弃置一张锦囊牌,或两张非锦囊牌',true,'he',function(card,player){ + if(!lib.filter.cardDiscardable(card,player)) return false; + if(!_status.event.nontrick){ + return get.type(card,'trick')=='trick'; + } + if(ui.selected.cards.length){ + return get.type(card,'trick')!='trick'; + } + return true; + }).set('ai',function(card){ + if(get.type(card,'trick')=='trick'){ + return 8-get.value(card); + } + return -get.value(card); + }).set('selectCard',function(){ + if(ui.selected.cards.length==1&&get.type(ui.selected.cards[0],'trick')=='trick'){ + return 1; + } + return 2; + }).set('nontrick',n2.length>=2).set('complexCard',true); + } + else{ + if(n1.length){ + target.discard(n1); + } + else if(n2.length){ + target.discard(n2); + } + } + }, + ai:{ + order:9, + result:{ + target:-1 + } + } + }, + qianju:{ + mod:{ + globalFrom:function(from,to,distance){ + return distance-(from.maxHp-from.hp); + } + } + }, + qingxi:{ + trigger:{source:'damageBegin'}, + check:function(event,player){ + return get.attitude(player,event.player)<0; + }, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&player.getEquip(1); + }, + content:function(){ + 'step 0' + var num=1; + var info=get.info(player.getEquip(1)); + if(info&&info.distance&&info.distance.attackFrom){ + num-=info.distance.attackFrom; + } + if(trigger.player.countCards('h')2){ + return 0; + } + return 8-get.value(card); + } + }); + } + 'step 1' + if(!event.directfalse&&result.bool){ + var e1=player.getEquip(1); + if(e1){ + player.discard(e1); + } + } + else{ + trigger.num++; + } + } + }, + jieyue:{ + group:'jieyue1' + }, + jieyue1:{ + audio:2, + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + filterCard:lib.filter.cardDiscardable, + ai1:function(card){ + return 7-get.useful(card); + }, + ai2:function(target){ + return 1-get.attitude(_status.event.player,target); + }, + prompt:get.prompt('jieyue') + }); + 'step 1' + if(result.bool){ + player.logSkill('jieyue1',result.targets); + player.discard(result.cards); + var target=result.targets[0]; + event.target=target; + target.chooseCard('将一张牌置于'+get.translation(player)+'的武将牌上,或令其弃置你的一张牌','he').set('ai',function(card){ + if(card.name=='du') return 20; + var player=_status.event.player; + if(get.attitude(player,_status.event.getParent().player)>0){ + return 8-get.value(card); + } + var nh=player.countCards('h'); + if(nh<=2){ + return 6-get.value(card); + } + if(nh<=3){ + return 2-get.value(card); + } + return 0; + }); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool&&result.cards&&result.cards.length){ + event.target.$give(result.cards,player); + player.storage.jieyue2=result.cards[0]; + event.target.lose(result.cards[0],ui.special); + player.syncStorage('jieyue2'); + player.addSkill('jieyue2'); + } + else if(event.target.countCards('he')){ + player.discardPlayerCard(event.target,true); + } + }, + ai:{ + expose:0.1 + } + }, + jieyue2:{ + mark:'card', + intro:{ + content:'card' + }, + audio:true, + enable:'chooseToUse', + filterCard:function(card){ + return get.color(card)=='black'; + }, + viewAsFilter:function(player){ + return player.countCards('h',{color:'black'})>0; + }, + viewAs:{name:'wuxie'}, + prompt:'将一张黑色手牌当无懈可击使用', + check:function(card){return 8-get.value(card)}, + threaten:1.2, + group:['jieyue3','jieyue4'] + }, + jieyue3:{ + enable:['chooseToRespond'], + filterCard:function(card){ + return get.color(card)=='red'; + }, + viewAs:{name:'shan'}, + viewAsFilter:function(player){ + if(!player.countCards('h',{color:'red'})) return false; + }, + audio:true, + prompt:'将一张红色手牌当闪打出', + check:function(){return 1}, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(!player.countCards('h',{color:'red'})) return false; + }, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.8 + } + } + } + }, + jieyue4:{ + trigger:{player:'phaseBegin'}, + forced:true, + content:function(){ + player.gain(player.storage.jieyue2,'gain2'); + player.storage.jieyue2=null; + player.removeSkill('jieyue2'); + } + }, + jinjiu:{ + mod:{ + cardEnabled:function(card,player){ + if(card.name=='jiu'&&_status.event.skill!='jinjiu') return false; + }, + cardUsable:function(card,player){ + if(card.name=='jiu'&&_status.event.skill!='jinjiu') return false; + }, + cardRespondable:function(card,player){ + if(card.name=='jiu'&&_status.event.skill!='jinjiu') return false; + }, + cardSavable:function(card,player){ + if(card.name=='jiu'&&_status.event.skill!='jinjiu') return false; + }, + }, + enable:['chooseToUse','chooseToRespond'], + filter:function(event,player){ + return player.countCards('h','jiu')>0; + }, + filterCard:{name:'jiu'}, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.countCards('h','jiu')) return false; + }, + check:function(){return 1}, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h','jiu')) return false; + }, + respondSha:true, + order:4, + useful:-1, + value:-1 + } + }, + xianzhen:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('h')>0; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(target); + "step 1" + if(result.bool){ + player.storage.xianzhen=target; + player.addTempSkill('xianzhen2','phaseAfter'); + } + else{ + player.addTempSkill('xianzhen3','phaseAfter'); + } + }, + ai:{ + order:function(name,player){ + var cards=player.getCards('h'); + if(player.countCards('h','sha')==0){ + return 1; + } + for(var i=0;i11&&get.value(cards[i])<7){ + return 9; + } + } + return get.order({name:'sha'})-1; + }, + result:{ + player:function(player){ + if(player.countCards('h','sha')>0) return 0; + var num=player.countCards('h'); + if(num>player.hp) return 0; + if(num==1) return -2; + if(num==2) return -1; + return -0.7; + }, + target:function(player,target){ + var num=target.countCards('h'); + if(num==1) return -1; + if(num==2) return -0.7; + return -0.5 + }, + }, + threaten:1.3 + } + }, + xianzhen2:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(player.storage.xianzhen==target) return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return Infinity; + } + }, + ai:{ + unequip:true + } + }, + xianzhen3:{ + mod:{ + cardEnabled:function(card){if(card.name=='sha') return false} + } + }, + lihuo:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + return card.name=='sha'&&!card.nature; + }, + filter:function(event,player){ + return player.countCards('h','sha')>0 + }, + viewAs:{name:'sha',nature:'fire'}, + mod:{ + selectTarget:function(card,player,range){ + if(card.name=='sha'&&card.nature=='fire'&&range[1]!=-1){ + range[1]++; + } + }, + }, + group:'lihuo2' + }, + lihuo2:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.parent.skill=='lihuo'; + }, + content:function(){ + player.addTempSkill('lihuo3','phaseAfter'); + } + }, + lihuo3:{ + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + return event.card.name=='sha'; + }, + forced:true, + silent:true, + audio:false, + content:function(){ + player.loseHp(); + player.removeSkill('lihuo3'); + delete player.tempSkills.lihuo3; + } + }, + chunlao:{ + trigger:{player:'phaseEnd'}, + direct:true, + audio:2, + filter:function(event,player){ + return player.countCards('h','sha')>0&&!player.storage.chunlao.length; + }, + init:function(player){ + player.storage.chunlao=[]; + }, + intro:{ + content:'cards', + }, + content:function(){ + 'step 0' + player.chooseCard([1,player.countCards('h','sha')],get.prompt('chunlao'),{name:'sha'}).set('ai',function(){ + return 1; + }); + 'step 1' + if(result.bool){ + player.logSkill('chunlao'); + player.storage.chunlao=player.storage.chunlao.concat(result.cards); + player.syncStorage('chunlao'); + player.markSkill('chunlao'); + player.lose(result.cards,ui.special); + player.$give(result.cards,player); + } + }, + ai:{ + effect:{ + player:function(card,player){ + if(_status.currentPhase!=player) return; + if(card.name=='sha'&&player.countCards('h')<=player.hp&&!player.storage.chunlao.length){ + return [0,0,0,0]; + } + } + }, + threaten:1.4 + }, + group:'chunlao2' + }, + chunlao2:{ + trigger:{global:'dying'}, + priority:6, + filter:function(event,player){ + return event.player.hp<=0&&player.storage.chunlao.length>0; + }, + direct:true, + content:function(){ + "step 0" + var att=get.attitude(player,trigger.player); + player.chooseCardButton(get.prompt('chunlao',trigger.player),player.storage.chunlao).set('ai',function(button){ + if(_status.event.att>0) return 1; + return 0; + }).set('att',att); + "step 1" + if(result.bool){ + player.logSkill('chunlao',trigger.player); + player.$throw(result.links); + player.storage.chunlao.remove(result.links[0]); + ui.discardPile.appendChild(result.links[0]); + player.syncStorage('chunlao'); + trigger.player.useCard({name:'jiu'},trigger.player); + if(!player.storage.chunlao.length){ + player.unmarkSkill('chunlao'); + } + else{ + player.markSkill('chunlao'); + } + } + }, + ai:{ + expose:0.2 + } + }, + shenduan:{ + trigger:{player:'discardAfter'}, + filter:function(event,player){ + for(var i=0;i0&&get.distance(player,event.player,'attack')<=1; + }, + content:function(){ + 'step 0' + var att=get.attitude(player,trigger.player); + var nh=trigger.player.countCards('h'); + var eff=get.effect(trigger.player,{name:'sha'},player,player); + player.chooseCardButton(get.prompt('yonglve',trigger.player),trigger.player.getCards('j')).set('ai',function(button){ + var name=button.link.viewAs||button.link.name; + var att=_status.event.att; + var nh=_status.event.nh; + var eff=_status.event.eff; + var trigger=_status.event.getTrigger(); + if(att>0&&eff>=0) return 1; + if(att>=0&&eff>0) return 1; + if(att>0&&(trigger.player.hp>=3||trigger.player.getEquip('bagua')||trigger.player.countCards('h','shan'))){ + if(name=='lebu'&&nh>trigger.player.hp) return 1; + if(name=='bingliang'&&nh1; + })){ + range[1]++; + } + } + } + } }, - result:{ - player:function(player){ - var target=game.findPlayer(function(current){ - return current.storage.xiansi; - }); - if(target){ - return get.effect(target,{name:'sha'},player,player); - } - } - } - } - }, - shibei:{ - audio:2, - trigger:{player:'damageAfter'}, - forced:true, - content:function(){ - "step 0" - player.judge(function(card){ - if(player.hasSkill('shibei2')){ - if(get.color(card)=='black') return -1; - } - else{ - if(get.color(card)=='red') return 1; - } - return 0; - }) - "step 1" - if(result.judge>0){ - player.recover(); - } - else if(result.judge<0){ - player.loseHp(); - } - if(!player.hasSkill('shibei2')){ - player.addTempSkill('shibei2','phaseAfter'); - } - } - }, - shibei2:{}, - jianying:{ - audio:2, - trigger:{player:'useCard'}, - frequent:true, - filter:function(event,player){ - if(!event.cards||event.cards.length!=1) return false; - if(_status.currentPhase!=player) return false; - if(!player.storage.jianying) return false; - return get.suit(player.storage.jianying)==get.suit(event.cards[0])|| - player.storage.jianying.number==event.cards[0].number; - }, - content:function(){ - player.draw(); - }, - intro:{ - content:'card' - }, - group:['jianying2','jianying3'] - }, - jianying3:{ - trigger:{player:'useCard'}, - priority:-1, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - if(!event.cards||event.cards.length!=1) return false; - if(_status.currentPhase!=player) return false; - return true; - }, - content:function(){ - player.storage.jianying=trigger.cards[0]; - } - }, - jianying2:{ - trigger:{player:'phaseAfter'}, - forced:true, - silent:true, - popup:false, - content:function(){ - player.storage.jianying=null; - } - }, - zzhenggong:{ - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return event.source&&event.source.countCards('e')>0; - }, - content:function(){ - "step 0" - var att=get.attitude(player,trigger.source); - player.choosePlayerCard('e',get.prompt('zzhenggong'),trigger.source).ai=function(button){ - if(att<=0){ - return get.equipValue(button.link); - } - return 0; - } - "step 1" - if(result.bool){ - player.logSkill('zzhenggong',trigger.source); - player.equip(result.links[0]); - trigger.source.$give(result.links[0],player); - } - } - }, - zquanji:{ - trigger:{global:'phaseBegin'}, - priority:15, - check:function(event,player){ - var att=get.attitude(player,event.player); - if(att<0){ - var nh1=event.player.countCards('h'); - var nh2=player.countCards('h'); - return nh1<=2&&nh2>nh1+1; - } - if(att>0&&event.player.hasJudge('lebu')&&event.player.countCards('h')>event.player.hp+1) return true; - return false; - }, - logTarget:'player', - filter:function(event,player){ - return event.player!=player&&event.player.countCards('h')>0&&player.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseToCompare(trigger.player); - "step 1" - if(result.bool){ - trigger.player.skip('phaseJudge'); - trigger.untrigger(); - } - }, - ai:{ - expose:0.2 - } - }, - zbaijiang:{ - skillAnimation:true, - trigger:{player:'phaseBegin'}, - forced:true, - unique:true, - derivation:['zyexin','zzili'], - init:function(player){ - player.storage.zbaijiang=false; - }, - // intro:{ - // content:'limited' - // }, - filter:function(event,player){ - return !player.storage.zbaijiang&&player.countCards('e')>=2; - }, - content:function(){ - player.storage.zbaijiang=true; - player.removeSkill('zzhenggong'); - player.removeSkill('zquanji'); - player.removeSkill('zbaijiang'); - player.addSkill('zyexin'); - player.addSkill('zzili'); - player.gainMaxHp(); - } - }, - zyexin:{ - trigger:{player:'damageEnd',source:'damageEnd'}, - frequent:true, - init:function(player){ - player.storage.zyexin=[]; - }, - intro:{ - content:'cards' - }, - content:function(){ - var card=get.cards()[0]; - player.storage.zyexin.push(card); - player.$draw(card); - player.markSkill('zyexin'); - game.addVideo('storage',player,['zyexin',get.cardsInfo(player.storage.zyexin),'cards']); - }, - group:'zyexin2' - }, - zyexin2:{ - enable:'phaseUse', - usable:1, - lose:false, - delay:false, - selectCard:[1,Infinity], - filterCard:true, - filter:function(event,player){ - return player.storage.zyexin.length>0; - }, - prompt:'用任意数量的手牌与等量的“权”交换', - content:function(){ - "step 0" - player.lose(cards,ui.special)._triggered=null; - player.storage.zyexin=player.storage.zyexin.concat(cards); - player.chooseCardButton(player.storage.zyexin,'选择'+cards.length+'张牌作为手牌',cards.length,true).ai=function(button){ - return get.value(button.link); - } - if(player==game.me&&_status.auto){ - game.delay(); - } - "step 1" - player.gain(result.links)._triggered=null; - for(var i=0;i=4&&!player.storage.zzili; - }, - forced:true, - content:function(){ - player.storage.zzili=true; - player.loseMaxHp(); - player.addSkill('zpaiyi'); - player.removeSkill('zzili'); - }, - // intro:{ - // content:'limited' - // } - }, - zpaiyi:{ - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - for(var i=0;i1; + })){ + return false; + } + } + } + }, + sidi:{ + trigger:{global:'respondEnd'}, + filter:function(event,player){ + if(event.parent.parent.name!='sha') return false; + if(event.player==player) return true; + return _status.currentPhase==player; + }, + frequent:true, + init:function(player){ + player.storage.sidi=[]; + }, + intro:{ + content:'cards' + }, + content:function(){ + var card=get.cards()[0]; + game.log(player,'将',card,'置于武将牌上'); + player.$gain2(card); + player.storage.sidi.add(card); + player.markSkill('sidi'); + player.syncStorage('sidi'); + }, + group:'sidi2' + }, + sidi2:{ + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + if(event.player==player) return false; + if(!player.storage.sidi.length) return false; + return true; + }, + check:function(event,player){ + if(get.attitude(player,event.player)>=0) return false; + if(event.player.getEquip('zhuge')) return false; + if(event.player.hasSkill('paoxiao')) return false; + var players=game.filterPlayer(); + for(var i=0;i0) break; + } + if(i==players.length) return false; + var nh=event.player.countCards('h'); + var nsha=event.player.countCards('h','sha'); + if(nh<2) return false; + switch(nh){ + case 2: + if(nsha) return Math.random()<0.4; + return Math.random()<0.2; + case 3: + if(nsha) return Math.random()<0.8; + return Math.random()<0.3; + case 4: + if(nsha>1) return true; + if(nsha) return Math.random()<0.9; + return Math.random()<0.5; + default:return true; + } + }, + content:function(){ + 'step 0' + if(player.storage.sidi.length==1){ + event.directbutton=player.storage.sidi[0]; + } + else{ + player.chooseCardButton('弃置武将牌上的一张牌',player.storage.sidi,true); + } + 'step 1' + var button; + if(event.directbutton){ + button=event.directbutton; + } + else if(result.bool&&result.links&&result.links.length){ + button=result.links[0]; + } + if(button){ + player.$throw([button]); + player.line(trigger.player,'green'); + game.log(player,'将',button,'置于弃牌堆'); + ui.discardPile.appendChild(button); + trigger.player.addTempSkill('sidi3','phaseAfter'); + player.storage.sidi.remove(button); + player.syncStorage('sidi'); + if(player.storage.sidi.length==0){ + player.unmarkSkill('sidi'); + } + else{ + player.markSkill('sidi'); + } + game.delayx(); + } + } + }, + sidi3:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num-1; + } + } + }, + zhongyong:{ + trigger:{player:'shaMiss'}, + direct:true, + filter:function(event,player){ + return event.responded&&get.itemtype(event.responded.cards)=='cards'; + }, + content:function(){ + "step 0" + var cards=trigger.responded.cards; + event.cards=cards; + player.chooseTarget('忠勇:将'+get.translation(trigger.responded.cards)+'交给一名角色',function(card,player,target){ + return target!=_status.event.getTrigger().target; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(target.countCards('h','shan')&&target.countCards('h')>=2){ + att/=1.5; + } + return att; + }); + "step 1" + if(result.bool){ + player.logSkill('zhongyong',result.targets); + result.targets[0].gain(event.cards,'gain2'); + if(result.targets[0]==player){ + event.finish(); + } + } + else{ + event.finish(); + } + "step 2" + if(player.hasSkill('jiu')){ + game.broadcastAll(function(player){ + player.removeSkill('jiu'); + if(player.node.jiu){ + player.node.jiu.delete(); + player.node.jiu2.delete(); + delete player.node.jiu; + delete player.node.jiu2; + } + },player); + event.jiu=true; + } + player.chooseToUse('是否对'+get.translation(trigger.target)+'再使用一张杀?', + {name:'sha'},trigger.target,-1).logSkill='qinglong_skill'; + "step 3" + if(result.bool); + else if(event.jiu){ + player.addSkill('jiu'); + } + } + }, + xinzhongyong:{ + trigger:{player:'shaMiss'}, + direct:true, + filter:function(event,player){ + return event.responded&&get.itemtype(event.cards)=='cards'&&get.itemtype(event.responded.cards)=='cards'; + }, + content:function(){ + "step 0" + event.cards1=trigger.cards.slice(0); + event.cards2=trigger.responded.cards.slice(0); + player.chooseTarget('忠勇:将杀或闪交给一名其他角色',function(card,player,target){ + return target!=_status.event.getTrigger().target&&target!=player; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool){ + var sha=false; + if(event.cards1.length==1&&get.color(event.cards1[0])=='red'){ + sha=true; + } + player.chooseControl('杀','闪',function(event,player){ + if(_status.event.choosesha) return '杀'; + return '闪'; + }).set('prompt','选择交给'+get.translation(result.targets)+'的牌').set('choosesha',sha); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" + player.logSkill('zhongyong',event.target); + event.sha=false; + if(result.control=='杀'){ + event.target.gain(event.cards1,'gain2'); + if(event.cards1.length==1&&get.color(event.cards1[0])=='red'){ + event.sha=true; + } + } + else{ + event.target.gain(event.cards2,'gain2'); + if(event.cards2.length==1&&get.color(event.cards2[0])=='red'){ + event.sha=true; + } + } + "step 3" + if(event.sha){ + event.target.chooseToUse('是否使用一张杀?',{name:'sha'}).set('filterTarget',function(card,player,target){ + return target!=_status.event.source&&get.distance(_status.event.source,target,'attack')<=1&&player.canUse('sha',target,false); + }).set('source',player); + } + } + }, + dangxian:{ + trigger:{player:'phaseBegin'}, + forced:true, + content:function(){ + 'step 0' + player.phaseUse(); + 'step 1' + player.getStat().card={}; + } + }, + longyin:{ + trigger:{global:'shaBegin'}, + direct:true, + filter:function(event,player){ + return event.target==event.targets[0]&&player.countCards('he')>0&&event.card.name=='sha'&& + _status.currentPhase==event.player&&event.parent.parent.parent.name=='phaseUse'; + }, + content:function(){ + 'step 0' + var go=false; + if(get.attitude(player,trigger.player)>0){ + if(get.color(trigger.card)=='red'){ + go=true; + } + else if(!trigger.player.hasSkill('paoxiao')&& + !trigger.player.hasSkill('tanlin3')&& + !trigger.player.hasSkill('zhaxiang2')&& + !trigger.player.hasSkill('fengnu')&& + !trigger.player.getEquip('zhuge')){ + var nh=trigger.player.countCards('h'); + if(player==trigger.player){ + go=(player.countCards('h','sha')>0); + } + else if(nh>=4){ + go=true; + } + else if(player.countCards('h','sha')){ + if(nh==3){ + go=Math.random()<0.8; + } + else if(nh==2){ + go=Math.random()<0.5; + } + } + else if(nh>=3){ + if(nh==3){ + go=Math.random()<0.5; + } + else if(nh==2){ + go=Math.random()<0.2; + } + } + } + } + var next=player.chooseToDiscard(get.prompt('longyin'),'he'); + next.logSkill=['longyin',trigger.player]; + next.set('ai',function(card){ + if(_status.event.go){ + return 6-get.value(card); + } + return 0; + }); + next.set('go',go); + 'step 1' + if(result.bool){ + trigger.player.getStat().card.sha--; + if(get.color(trigger.card)=='red'){ + player.draw(); + } + // player.logSkill('longyin',trigger.player); + } + }, + ai:{ + expose:0.2 + } + }, + jigong:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + check:function(event,player){ + var nh=player.countCards('h')-player.countCards('h',{type:'equip'}); + if(nh<=1) return true; + if(player.countCards('h','tao')) return false; + if(nh<=2) return Math.random()<0.7; + if(nh<=3) return Math.random()<0.4; + return false; + }, + content:function(){ + player.draw(2); + player.addTempSkill('jigong2','phaseAfter'); + } + }, + jigong2:{ + mod:{ + maxHandcard:function(player,num){ + var damage=player.getStat().damage; + if(typeof damage=='number') return num-player.hp+damage; + return 0; + } + } + }, + shifei:{ + audio:2, + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'shan'})) return false; + return true; + }, + check:function(event,player){ + if(get.attitude(player,_status.currentPhase)>0) return true; + var nh=_status.currentPhase.countCards('h')+1; + var players=game.filterPlayer(); + for(var i=0;inh){ + if(!player.hasShan()||get.attitude(player,players[i])<=0) return true; + } + } + return false; + }, + content:function(){ + 'step 0' + player.line(_status.currentPhase,'green'); + _status.currentPhase.draw(); + 'step 1' + var nh=_status.currentPhase.countCards('h'); + var nmax=nh+1; + var targets=[]; + var players=game.filterPlayer(); + for(var i=0;inmax){ + nmax=nh2; + targets.length=0; + targets.push(players[i]); + } + else if(nh2==nmax){ + targets.push(players[i]); + } + } + if(targets.length==1){ + event.onlytarget=targets[0]; + } + else if(targets.length){ + player.chooseTarget('选择一名角色弃置其一张牌',true,function(card,player,target){ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }).set('targets',targets); + } + else{ + event.finish(); + } + 'step 2' + var target; + if(event.onlytarget){ + target=event.onlytarget; + } + else if(result.targets&&result.targets.length){ + target=result.targets[0]; + } + if(target){ + player.line(target,'green'); + player.discardPlayerCard(target,'he',true); + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'shan'}} + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0){ + var nh=player.countCards('h'); + var players=game.filterPlayer(); + for(var i=0;inh) return 0.4; + } + } + } + } + } + }, + huaiyi:{ + audio:2, + enable:'phaseUse', + usable:1, + delay:0, + filter:function(event,player){ + return player.countCards('h',{color:'red'})&&player.countCards('h',{color:'black'}); + }, + content:function(){ + 'step 0' + player.chooseControl('红色','黑色').set('ai',function(){ + var player=_status.event.player; + if(player.countCards('h',{color:'red'})==1&& + player.countCards('h',{color:'black'})>1) return '红色'; + return '黑色'; + }); + 'step 1' + event.control=result.control; + player.showHandcards(); + 'step 2' + var cards; + if(event.control=='红色'){ + cards=player.getCards('h',{color:'red'}); + } + else{ + cards=player.getCards('h',{color:'black'}); + } + player.discard(cards); + event.num=cards.length; + 'step 3' + player.chooseTarget([1,event.num],function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target)+0.5; + }); + 'step 4' + if(result.bool&&result.targets){ + player.line(result.targets,'green'); + event.targets=result.targets; + event.targets.sort(lib.sort.seat); + event.gained=event.targets.length; + } + else{ + event.finish(); + } + 'step 5' + if(event.targets.length){ + player.gainPlayerCard(event.targets.shift(),'he',true); + event.redo(); + } + 'step 6' + if(event.gained>=2){ + player.loseHp(); + } + }, + ai:{ + order:function(item,player){ + if(player.countCards('h',{color:'red'})==1) return 10; + if(player.countCards('h',{color:'black'})==1) return 10; + return 1; + }, + result:{ + player:1 + } + } + }, + yaoming:{ + audio:2, + trigger:{player:'damageEnd',source:'damageEnd'}, + direct:true, + filter:function(event,player){ + if(player.hasSkill('yaoming2')) return false; + var nh=player.countCards('h'); + return game.hasPlayer(function(current){ + return current.countCards('h')!=nh; + }); + }, + content:function(){ + 'step 0' + var nh=player.countCards('h'); + player.chooseTarget(get.prompt('yaoming'),function(card,player,target){ + return _status.event.nh!=target.countCards('h'); + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(target.countCards('h')>_status.event.nh) return -att; + return att; + }).set('nh',nh); + 'step 1' + if(result.bool){ + player.logSkill('yaoming',result.targets); + player.addTempSkill('yaoming2','phaseAfter'); + var target=result.targets[0]; + if(target.countCards('h')0; + }, + content:function(){ + 'step 0' + player.choosePlayerCard(target,'e',true); + 'step 1' + if(result.links){ + var num=0,players=game.filterPlayer(); + for(var i=0;inum2){ + player.draw(); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noe')) return 1; + if(target.getEquip(1)||target.getEquip(4)) return -1; + if(target.getEquip(2)) return -0.7; + return -0.5; + } + } + } + }, + zhaofu:{ + unique:true, + global:'zhaofu2', + zhuSkill:true + }, + zhaofu2:{ + mod:{ + attackTo:function(from,to,distance){ + if(from.group!='wu') return; + var players=game.filterPlayer(); + for(var i=0;i0&&target!=player; + }, + content:function(){ + 'step 0' + if(target.countCards('e')){ + target.chooseBool('是否将装备区内的所有牌交给'+get.translation(player)+'?').set('ai',function(){ + if(_status.event.player.countCards('e')>=3) return false; + return true; + }); + } + else{ + target.chooseToDiscard(true,'he'); + event.finish(); + } + 'step 1' + if(result.bool){ + var es=target.getCards('e'); + player.gain(es,target); + target.$give(es,player); + player.removeSkill('yanzhu'); + } + else{ + target.chooseToDiscard(true,'he'); + } + }, + ai:{ + order:6, + result:{ + target:function(player,target){ + var ne=target.countCards('e'); + if(!ne) return -2; + if(ne>=2) return -ne; + return 0; + } + } + } + }, + shizhi:{ + mod:{ + cardRespondable:function(card,player){ + if(card.name=='shan'&&player.hp==1&&_status.event.skill!='shizhi') return false; + }, + }, + enable:['chooseToUse','chooseToRespond'], + filter:function(event,player){ + return player.hp==1; + }, + filterCard:{name:'shan'}, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.countCards('h','shan')) return false; + if(player.hp!=1) return false; + }, + check:function(){return 1}, + ai:{ + skillTagFilter:function(player){ + if(!player.countCards('h','shan')) return false; + if(player.hp!=1) return false; + }, + respondSha:true, + order:4, + useful:-1, + value:-1 + } + }, + wurong:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return target.countCards('h')>0&&target!=player; + }, + content:function(){ + "step 0" + if(target.countCards('h')==0||player.countCards('h')==0){ + event.finish(); + return; + } + "step 1" + var sendback=function(){ + if(_status.event!=event){ + return function(){ + event.resultOL=_status.event.resultOL; + }; + } + }; + if(player.isOnline()){ + player.wait(sendback); + event.ol=true; + player.send(function(){ + game.me.chooseCard(true).set('glow_result',true).ai=function(){ + return Math.random(); + }; + game.resume(); + }); + } + else{ + event.localPlayer=true; + player.chooseCard(true).set('glow_result',true).ai=function(){ + return Math.random(); + }; + } + if(target.isOnline()){ + target.wait(sendback); + event.ol=true; + target.send(function(){ + var rand=Math.random()<0.4; + game.me.chooseCard(true).set('glow_result',true).ai=function(card){ + if(rand) return card.name=='shan'?1:0; + return card.name=='shan'?0:1; + }; + game.resume(); + }); + } + else{ + event.localTarget=true; + } + "step 2" + if(event.localPlayer){ + event.card1=result.cards[0]; + } + if(event.localTarget){ + var rand=Math.random()<0.4; + target.chooseCard(true).set('glow_result',true).ai=function(card){ + if(rand) return card.name=='shan'?1:0; + return card.name=='shan'?0:1; + }; + } + "step 3" + if(event.localTarget){ + event.card2=result.cards[0]; + } + if(!event.resultOL&&event.ol){ + game.pause(); + } + "step 4" + try{ + if(!event.card1) event.card1=event.resultOL[player.playerid].cards[0]; + if(!event.card2) event.card2=event.resultOL[target.playerid].cards[0]; + if(!event.card1||!event.card2){ + throw('err'); + } + } + catch(e){ + console.log(e); + event.finish(); + return; + } + if(event.card2.number>=10||event.card2.number<=4){ + if(target.countCards('h')>2){ + event.addToAI=true; + } + } + game.broadcastAll(function(card1,card2){ + card1.classList.remove('glow'); + card2.classList.remove('glow'); + },event.card1,event.card2); + "step 5" + game.broadcastAll(function(){ + ui.arena.classList.add('thrownhighlight'); + }); + game.addVideo('thrownhighlight1'); + player.$compare(event.card1,target,event.card2); + game.delay(4); + "step 6" + game.log(player,'展示了',event.card1); + game.log(target,'展示了',event.card2); + var name1=event.card1.name; + if(player.hp==1&&name1=='shan'){ + name1='sha'; + } + if(name1=='sha'&&event.card2.name!='shan'){ + player.discard(event.card1).set('animate',false); + target.$gain2(event.card2); + var clone=event.card1.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([clone])); + } + game.broadcast(function(card){ + var clone=card.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + } + },event.card1); + target.damage(); + } + else if(name1!='sha'&&event.card2.name=='shan'){ + player.discard(event.card1).set('animate',false); + target.$gain2(event.card2); + var clone=event.card1.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + game.addVideo('deletenode',player,get.cardsInfo([clone])); + } + game.broadcast(function(card){ + var clone=card.clone; + if(clone){ + clone.style.transition='all 0.5s'; + clone.style.transform='scale(1.2)'; + clone.delete(); + } + },event.card1); + player.gainPlayerCard(target,true,'he'); + } + else{ + player.$gain2(event.card1); + target.$gain2(event.card2); + } + game.broadcastAll(function(){ + ui.arena.classList.remove('thrownhighlight'); + }); + game.addVideo('thrownhighlight2'); + }, + ai:{ + order:6, + result:{ + target:-1, + } + } + }, + zhanjue:{ + audio:2, + enable:'phaseUse', + filterCard:true, + selectCard:-1, + filter:function(event,player){ + if(!player.countCards('h')) return false; + if(player.storage.zhanjue>=2) return false; + return true; + }, + viewAs:{name:'juedou'}, + group:['zhanjue2','zhanjue3','zhanjue4'], + ai:{ + order:1, + effect:{ + player:function(card,player,target){ + if(_status.event.skill=='zhanjue'){ + if(player.countCards('h')>=3||target.countCards('h')>=3) return 'zeroplayertarget'; + if(player.countCards('h','tao')) return 'zeroplayertarget'; + if(target.countCards('h','sha')>1) return 'zeroplayertarget'; + } + } + } + } + }, + zhanjue2:{ + audio:false, + trigger:{player:'phaseBefore'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.zhanjue=0; + } + }, + zhanjue3:{ + audio:false, + trigger:{player:'damageAfter',source:'damageAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.parent.skill=='zhanjue'; + }, + content:function(){ + player.storage.zhanjue2=trigger.player; + } + }, + zhanjue4:{ + audio:false, + trigger:{player:'juedouAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='zhanjue'; + }, + content:function(){ + if(player.storage.zhanjue2==player){ + player.draw(2); + player.storage.zhanjue+=2; + } + else if(player.storage.zhanjue2){ + if(player.storage.zhanjue2.isAlive()){ + game.asyncDraw([player,player.storage.zhanjue2]); + } + else{ + player.draw(); + } + player.storage.zhanjue++; + } + else{ + player.draw(); + player.storage.zhanjue++; + } + delete player.storage.zhanjue2; + } + }, + qinwang:{ + unique:true, + group:['qinwang1','qinwang2'], + zhuSkill:true + }, + qinwang1:{ + audio:2, + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!player.hasZhuSkill('qinwang')) return false; + if(!player.countCards('he')) return false; + if(event.filterCard({name:'sha'},player,event)==false) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, + direct:true, + content:function(){ + "step 0" + var yep=false; + if(!player.storage.jijianging){ + var players=game.filterPlayer(); + for(var i=0;i1&&(nh>=4||(nh>=3&&players[i].countCards('h','sha')))){ + yep=true;break; + } + } + } + var next=player.chooseToDiscard(get.prompt('qinwang'),'he'); + next.set('ai',function(card){ + if(_status.event.yep) return 5-get.value(card); + return 0; + }); + next.set('yep',yep); + next.logSkill='qinwang' + "step 1" + if(!result.bool){ + event.finish(); + } + "step 2" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + event.finish(); + } + else if(event.current.group=='shu'){ + player.storage.jijianging=true; + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张杀?',{name:'sha'}); + next.set('ai',function(){ + var event=_status.event; + return (get.attitude(event.player,event.source)-2); + }); + next.set('source',player); + next.autochoose=lib.filter.autoRespondSha; + } + else{ + event.current=event.current.next; + event.redo(); + } + "step 3" + player.storage.jijianging=false; + if(result.bool){ + event.finish(); + trigger.result=result; + trigger.responded=true; + trigger.animate=false; + event.current.draw(); + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(2); + } + } + }, + qinwang2:{ + audio:2, + enable:'chooseToUse', + filter:function(event,player){ + if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; + if(!player.hasZhuSkill('qinwang')) return false; + if(!lib.filter.cardUsable({name:'sha'},player)) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); + }, + filterCard:true, + position:'he', + check:function(card){ + var player=_status.event.player,players=game.filterPlayer(); + for(var i=0;i1&&(nh>=4||(nh>=3&&players[i].countCards('h','sha')))){ + return 5-get.value(card); + } + } + return 0; + }, + filterTarget:function(card,player,target){ + if(_status.event._backup&& + typeof _status.event._backup.filterTarget=='function'&& + !_status.event._backup.filterTarget({name:'sha'},player,target)){ + return false; + } + return player.canUse({name:'sha'},target); + }, + content:function(){ + "step 0" + if(event.current==undefined) event.current=player.next; + if(event.current==player){ + player.addSkill('jijiang3'); + event.getParent(2).step=0; + event.finish(); + } + else if(event.current.group=='shu'){ + var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀', + function(card){ + var evt=_status.event.getParent(); + return evt.player.canUse(card,evt.target)&&card.name=='sha'; + }); + next.set('ai',function(card){ + var event=_status.event; + return get.effect(event.target,card,event.source,event.player); + }); + next.set('source',player); + next.set('target',target); + next.autochoose=lib.filter.autoRespondSha; + } + else{ + event.current=event.current.next; + event.redo(); + } + "step 1" + if(result.bool){ + event.finish(); + event.current.draw(); + if(result.cards&&result.cards.length==1&&result.cards[0].name=='sha'){ + player.useCard(result.cards[0],target).animate=false; + } + else{ + player.useCard({name:'sha'},target).animate=false; + } + if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){ + event.current.ai.shown+=0.3; + if(event.current.ai.shown>0.95) event.current.ai.shown=0.95; + } + } + else{ + event.current=event.current.next; + event.goto(0); + } + }, + ai:{ + result:{ + target:function(player,target){ + if(player.hasSkill('jijiang3')) return 0; + return get.effect(target,{name:'sha'},player,target); + } + }, + order:function(){ + return get.order({name:'sha'})-0.1; + }, + } + }, + zuoding:{ + trigger:{global:'useCard'}, + filter:function(event,player){ + return !player.hasSkill('zuoding2')&&get.suit(event.card)=='spade'&& + _status.currentPhase==event.player&&event.targets&&event.targets.length&& + event.player!=player; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('zuoding'),function(card,player,target){ + return _status.event.getTrigger().targets.contains(target); + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + player.logSkill('zuoding',result.targets); + result.targets[0].draw(); + } + }, + ai:{ + expose:0.2 + }, + group:'zuoding3' + }, + zuoding2:{}, + zuoding3:{ + trigger:{global:'damageEnd'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.addTempSkill('zuoding2','phaseAfter'); + } + }, + huomo:{ + audio:2, + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'shan'})) return false; + if(player.hasSkill('huomo2')) return false; + if(event.parent.name!='sha') return false; + var hs=player.getCards('he',{color:'black'}); + for(var i=0;i0; + })){ + switch(button.link[2]){ + case 'tao':return 5; + case 'jiu':return 3.01; + case 'sha': + if(button.link[3]=='fire') return 2.95; + else if(button.link[3]=='fire') return 2.92; + else return 2.9; + } + } + return 0; + }, + backup:function(links,player){ + return { + filterCard:function(card){ + return get.type(card)!='basic'&&get.color(card)=='black'; + }, + viewAs:{name:links[0][2],nature:links[0][3]}, + position:'he', + popname:true, + precontent:function(){ + 'step 0' + var card=event.result.cards[0]; + event.card=card; + player.$throw(card,1000); + game.log(player,'将',card,'置于牌堆顶'); + event.result.cards.length=0; + player.lose(card); + 'step 1' + game.delay(); + 'step 2' + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + }, + } + }, + prompt:function(links,player){ + return '将一张黑色非基本牌置于牌堆顶并视为使用一张'+get.translation(links[0][3]||'')+get.translation(links[0][2]); + } + }, + ai:{ + order:function(){ + var player=_status.event.player; + var event=_status.event; + if(!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0){ + return 3.1; + } + return 2.9; + }, + save:true, + respondSha:true, + skillTagFilter:function(player,tag,arg){ + if(player.hasCard(function(card){ + return get.color(card)=='black'&&get.type(card)!='basic'; + },'he')){ + if(!player.storage.huomo) player.storage.huomo={}; + if(tag=='respondSha'){ + if(arg!='use') return false; + if(player.storage.huomo.sha) return false; + } + else{ + if(player.storage.huomo.tao&&player.storage.huomo.jiu) return false; + } + } + }, + result:{ + player:1 + } + } + }, + taoxi:{ + audio:2, + trigger:{player:'useCardToBegin'}, + filter:function(event,player){ + return _status.currentPhase==player&&event.targets.length==1&& + event.target.countCards('h')>0&&!player.hasSkill('taoxi4')&&player!=event.target; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + intro:{ + content:'card' + }, + content:function(){ + var card=trigger.target.getCards('h').randomGet(); + player.showCards([card]); + player.storage.taoxi=card; + player.storage.taoxi2=trigger.target; + player.syncStorage('taoxi'); + player.markSkill('taoxi'); + player.addTempSkill('taoxi4','phaseAfter'); + }, + group:['taoxi2','taoxi3'] + }, + taoxi2:{ + audio:false, + enable:'phaseUse', + filter:function(event,player){ + if(player.storage.taoxi&&player.storage.taoxi2&& + get.owner(player.storage.taoxi)==player.storage.taoxi2&& + lib.filter.filterCard(player.storage.taoxi,player,event)){ + return true; + } + return false; + }, + filterTarget:function(card,player,target){ + return player.canUse(player.storage.taoxi,target); + }, + selectTarget:function(){ + var info=get.info(_status.event.player.storage.taoxi); + if(info.notarget) return -1; + return get.select(info.selectTarget); + }, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + var card=player.storage.taoxi; + if(!card){ + event.finish(); + return; + } + var owner=get.owner(card); + if(owner){ + owner.lose(card,ui.special); + } + event.card=card; + player.$throw(card); + 'step 1' + player.useCard(event.card,targets).animate=false; + delete player.storage.taoxi; + delete player.storage.taoxi2; + player.unmarkSkill('taoxi'); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + return get.effect(target,player.storage.taoxi,player,target); + }, + player:1 + } + } + }, + taoxi3:{ + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.taoxi?true:false; + }, + content:function(){ + if(get.owner(player.storage.taoxi)==player.storage.taoxi2){ + player.loseHp(); + } + delete player.storage.taoxi; + delete player.storage.taoxi2; + player.unmarkSkill('taoxi'); + } + }, + taoxi4:{}, + xingshuai:{ + skillAnimation:true, + audio:2, + trigger:{player:'dying'}, + priority:6, + zhuSkill:true, + filter:function(event,player){ + if(player.storage.xingshuai) return false; + if(player.hp>0) return false; + if(!player.hasZhuSkill('xingshuai')) return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='wei'; + }); + }, + init:function(player){ + if(player.hasZhuSkill('xingshuai')){ + player.markSkill('xingshuai'); + player.storage.xingshuai=false; + } + }, + intro:{ + content:'limited' + }, + unique:true, + content:function(){ + 'step 0' + player.storage.xingshuai=true; + player.awakenSkill('xingshuai'); + var targets=game.filterPlayer(); + targets.remove(player); + event.targets=targets; + event.damages=[]; + 'step 1' + if(event.targets.length){ + var current=event.targets.shift(); + if(current.group=='wei'){ + current.chooseBool('是否令'+get.translation(player)+'回复一点体力?').set('ai',function(){ + return get.attitude(_status.event.player,_status.event.target)>2; + }).set('target',player); + event.current=current; + } + else{ + event.redo(); + } + } + else{ + event.goto(3); + } + 'step 2' + if(result.bool){ + event.damages.push(event.current); + event.current.line(player,'green'); + game.log(event.current,'令',player,'回复一点体力'); + } + if(event.targets.length){ + event.goto(1); + } + 'step 3' + if(event.damages.length){ + player.recover(event.damages.length); + } + 'step 4' + if(event.damages.length){ + event.damages.shift().damage('nosource'); + event.redo(); + } + } + }, + mingjian:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target; + }, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + selectCard:-1, + discard:false, + lose:true, + content:function(){ + player.$give(cards.length,target); + target.gain(cards,player); + target.addTempSkill('mingjian2',{player:'phaseAfter'}); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(player.countCards('h')==1&&player.countCards('h','du')) return -1; + if(player.hp<=2&&player.countCards('h','shan')) return 0; + if(target.countCards('h')+player.countCards('h')>target.hp+2) return 0; + if(get.attitude(player,target)>3) return 1; + return 0; + } + } + } + }, + mingjian2:{ + mark:true, + intro:{ + content:'手牌上限+1,出杀次数+1' + }, + mod:{ + maxHandcard:function(player,num){ + return num+1; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + } + }, + }, + mingjian_old:{ + audio:2, + trigger:{player:'phaseUseBefore'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + 'step 0' + var go=Math.random()<0.5; + player.chooseTarget(get.prompt('mingjian'),function(card,player,target){ + return player!=target + }).ai=function(target){ + var att=get.attitude(player,target); + if(att>3){ + if(player.countCards('h')>player.hp) return att; + if(go) return att; + } + return 0; + } + 'step 1' + if(result.bool){ + player.logSkill('mingjian',result.targets); + trigger.untrigger(); + trigger.finish(); + var target=result.targets[0]; + target.addSkill('mingjian2'); + var hs=player.getCards('h'); + target.gain(hs,player); + player.$give(hs.length,target); + } + } + }, + mingjian2_old:{ + audio:false, + trigger:{global:'phaseAfter'}, + forced:true, + popup:false, + content:function(){ + if(lib.config.glow_phase){ + if(_status.currentPhase){ + _status.currentPhase.classList.remove('glow_phase'); + } + player.classList.add('glow_phase'); + } + game.addVideo('phaseChange',player); + _status.currentPhase=player; + player.ai.tempIgnore=[]; + player.stat.push({card:{},skill:{}}); + player.phaseUse(); + player.removeSkill('mingjian2'); + } + }, + huituo:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('huituo')).set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)>0){ + return get.recoverEffect(target,player,player)+1; + } + return 0; + }); + 'step 1' + if(result.bool){ + player.logSkill('huituo',result.targets); + var target=result.targets[0]; + event.target=target; + target.judge(function(card){ + if(target.hp==target.maxHp){ + if(get.color(card)=='red') return -1; + } + if(get.color(card)=='red') return 1; + return 0; + }); + } + else{ + event.finish(); + } + 'step 2' + if(result.color){ + if(result.color=='red'){ + if(event.target.hp0&&event.source&&event.source.getEquip(1)!=undefined&& + event.card&&event.card.name=='sha'; + }, + direct:true, + priority:5, + audio:2, + content:function(){ + 'step 0' + var next=player.chooseToDiscard('he',get.prompt('duodao')); + next.logSkill=['duodao',trigger.source]; + next.set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getTrigger().source)<=0){ + return 6-get.value(card); + } + return 0; + }); + 'step 1' + if(result.bool){ + trigger.source.$give(trigger.source.getEquip(1),player); + player.gain(trigger.source.getEquip(1),trigger.source); + } + }, + }, + anjian:{ + audio:2, + trigger:{source:'damageBegin'}, + check:function(event,player){ + return get.attitude(player,event.player)<=0; + }, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&get.distance(event.player,player,'attack')>1&& + event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2'; + }, + content:function(){ + trigger.num++; + } + }, + xinpojun:{ + trigger:{player:'shaBegin'}, + direct:true, + filter:function(event,player){ + return event.target.hp>0&&event.target.countCards('he')>0; + }, + audio:2, + logTarget:'target', + content:function(){ + 'step 0' + player.choosePlayerCard(trigger.target,'he', + [1,Math.min(trigger.target.countCards('he'),trigger.target.hp)],get.prompt('pojun',trigger.target)); + 'step 1' + if(result.bool&&result.links.length){ + player.logSkill('xinpojun'); + if(trigger.target.storage.xinpojun2){ + trigger.target.storage.xinpojun2=trigger.target.storage.xinpojun2.concat(result.links); + } + else{ + trigger.target.storage.xinpojun2=result.links; + } + game.addVideo('storage',trigger.target,['xinpojun2',get.cardsInfo(trigger.target.storage.xinpojun2),'cards']); + trigger.target.addSkill('xinpojun2'); + trigger.target.lose(result.links,ui.special); + } + }, + ai:{ + expose:0.2 + } + }, + xinpojun2:{ + trigger:{global:'phaseEnd'}, + forced:true, + audio:false, + mark:true, + intro:{ + content:'cardCount' + }, + content:function(){ + if(player.storage.xinpojun2){ + player.gain(player.storage.xinpojun2); + delete player.storage.xinpojun2; + } + player.removeSkill('xinpojun2'); + }, + group:'xinpojun3' + }, + xinpojun3:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + player.$throw(player.storage.xinpojun2,1000); + for(var i=0;i=0; + }, + priority:-5, + logTarget:'player', + content:function(){ + game.asyncDraw([trigger.player,player]); + }, + ai:{ + expose:0.1 + } + }, + yanyu:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h','sha')>0; + }, + filterCard:{name:'sha'}, + prepare:function(cards,player){ + player.$throw(cards,1000); + }, + discard:false, + delay:0.5, + content:function(){ + "step 0" + player.draw(); + "step 1" + for(var i=0;i=2; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('yanyu'),function(card,player,target){ + return target.sex=='male'&&target!=player; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + player.logSkill('yanyu',result.targets); + result.targets[0].draw(2); + } + } + }, + youdi:{ + audio:true, + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('youdi'),function(card,player,target){ + return player!=target; + }).set('ai',function(target){ + if(!_status.event.goon) return 0; + if(target.countCards('he')==0) return 0; + return -get.attitude(_status.event.player,target); + }).set('goon',player.countCards('h','sha')<=player.countCards('h')/3); + "step 1" + if(result.bool){ + game.delay(); + player.logSkill('youdi',result.targets); + event.target=result.targets[0]; + event.target.discardPlayerCard(player,'he',true); + } + else{ + event.finish(); + } + "step 2" + if(result.links[0].name!='sha'&&event.target.countCards('he')){ + player.gainPlayerCard('he',event.target,true); + } + }, + ai:{ + expose:0.2, + threaten:1.4 + } + }, + fuhun:{ + enable:['chooseToUse','chooseToRespond'], + filterCard:true, + selectCard:2, + position:'h', + audio:2, + derivation:['wusheng','paoxiao'], + viewAs:{name:'sha'}, + prompt:'将两张手牌当杀使用或打出', + check:function(card){ + if(_status.event.player.countCards('h')<4) return 6-get.useful(card); + return 7-get.useful(card); + }, + ai:{ + respondSha:true, + order:function(item,player){ + if(player.hasSkill('wusheng')&&player.hasSkill('paoxiao')){ + return 1; + } + if(player.countCards('h')<4){ + return 1; + } + return 4; + }, + }, + group:'fuhun2' + }, + fuhun2:{ + trigger:{source:'damageAfter'}, + forced:true, + filter:function(event){ + return event.getParent().skill=='fuhun'; + }, + content:function(){ + player.addTempSkill('wusheng','phaseAfter'); + player.addTempSkill('paoxiao','phaseAfter'); + } + }, + fencheng:{ + skillAnimation:'epic', + animationColor:'fire', + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.fencheng; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + unique:true, + selectTarget:-1, + mark:true, + line:'fire', + content:function(){ + "step 0" + player.storage.fencheng=true; + player.awakenSkill('fencheng'); + var res=get.damageEffect(target,player,target,'fire'); + var num=Math.max(1,target.countCards('e')); + target.chooseToDiscard(num,'he','弃置'+get.cnNumber(num)+'张牌或受到1点火焰伤害').set('ai',function(card){ + var res=_status.event.res; + var num=_status.event.num; + var player=_status.event.player; + if(res>=0) return -1; + if(num>2&&player.hp>1) return -1; + if(num>1&&player.hp>2) return -1; + if(get.position(card)=='e'){ + return 10-get.value(card); + } + return 6-get.value(card); + }).set('res',res).set('num',num); + "step 1" + if(!result.bool){ + target.damage('fire'); + } + }, + ai:{ + order:1, + result:{ + player:function(player){ + var num=0,players=game.filterPlayer(); + for(var i=0;i0){ + num-=Math.max(1,players[i].countCards('e')); + } + else if(att<0){ + num+=Math.max(1,players[i].countCards('e')); + } + } + } + if(players.length<5){ + return num-1; + } + else{ + return num-2; + } + } + } + }, + init:function(player){ + player.storage.fencheng=false; + }, + intro:{ + content:'limited' + } + }, + mieji:{ + trigger:{player:'useCardBegin'}, + direct:true, + audio:2, + filter:function(event,player){ + return event.targets.length==1&&get.type(event.card)=='trick'&&get.color(event.card)=='black'; + }, + position:'he', + content:function(){ + "step 0" + player.chooseTarget(get.prompt('mieji'),function(card,player,target){ + var trigger=_status.event.getTrigger(); + return lib.filter.filterTarget(trigger.card,player,target)&&target!=trigger.targets[0]; + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }); + "step 1" + if(result.bool){ + trigger.targets.push(result.targets[0]); + player.logSkill('mieji',result.targets); + } + } + }, + junxing:{ + enable:'phaseUse', + audio:2, + usable:1, + filterCard:true, + selectCard:[1,Infinity], + filter:function(event,player){ + return player.countCards('h')>0; + }, + check:function(card){ + if(ui.selected.cards.length) return -1; + var val=get.value(card); + if(get.type(card)=='basic') return 8-get.value(card); + return 5-get.value(card); + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + content:function(){ + "step 0" + var types=[]; + for(var i=0;i0; + }, + filter:function(event,player){ + if(event.player.countCards('h')) return false; + if(_status.currentPhase!=player) return false; + if(event.player==player) return false; + for(var i=0;i2){ + if(game.phaseNumber0&&event.player.countCards('j')) return true; + if(event.num>1){ + if(att<0) return false; + if(att>0) return true; + } + var cards=event.player.getCards('e'); + for(var i=0;i=6) return true; + } + return false; + }, + content:function(){ + if(trigger.player.countCards('ej')){ + player.gainPlayerCard(trigger.player,'ej',true); + } + trigger.untrigger(); + trigger.finish(); + } + }, + sanyao:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.isHighestHp(); + }, + check:function(card){return 7-get.value(card);}, + position:'he', + filterCard:true, + content:function(){ + target.damage(); + }, + ai:{ + result:{ + target:function(player,target){ + if(target.countCards('j')&&get.attitude(player,target)>0){ + return 1; + } + if(target.countCards('e')){ + return -1; + } + return get.damageEffect(target,player); + }, + }, + order:7 + } + }, + qiaoshui:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('qiaoshui'),function(card,player,target){ + return player!=target&&target.countCards('h')>0; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target)/target.countCards('h'); + }); + "step 1" + if(result.bool){ + player.logSkill('qiaoshui',result.targets[0]); + player.chooseToCompare(result.targets[0]); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.addTempSkill('qiaoshui3','phaseAfter'); + } + else{ + player.addTempSkill('qiaoshui2','phaseAfter'); + } + }, + ai:{ + expose:0.1 + } + }, + qiaoshui2:{ + mod:{ + cardEnabled:function(card){ + if(get.type(card,'trick')=='trick') return false; + } + } + }, + qiaoshui3:{ + trigger:{player:'useCard'}, + direct:true, + filter:function(event,player){ + var type=get.type(event.card); + return type=='basic'||type=='trick'; + }, + content:function(){ + 'step 0' + player.removeSkill('qiaoshui3'); + var goon=false; + var info=get.info(trigger.card); + if(trigger.targets&&!info.multitarget){ + var players=game.filterPlayer(); + for(var i=0;i1){ + event.goto(3); + } + } + 'step 1' + if(result.bool){ + game.delay(0.5); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + 'step 2' + if(event.target){ + player.logSkill('qiaoshui',event.target); + trigger.targets.add(event.target); + } + event.finish(); + 'step 3' + player.chooseTarget('巧说:是否减少一名'+get.translation(trigger.card)+'的目标?',function(card,player,target){ + return _status.event.getTrigger().targets.contains(target); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + return -get.effect(target,trigger.card,trigger.player,_status.event.player); + }); + 'step 4' + if(result.bool){ + event.targets=result.targets; + if(event.isMine()){ + player.logSkill('qiaoshui',event.targets); + event.finish(); + } + for(var i=0;i1) return false; + return event.card&&get.type(event.card)=='trick'&&event.player!=player; + }, + frequent:true, + content:function(){ + player.draw(); + }, + ai:{ + effect:function(card,player,target){ + if(get.type(card)=='trick') return [1,1]; + }, + } + }, + shenxing:{ + audio:2, + enable:'phaseUse', + position:'he', + filterCard:true, + selectCard:2, + prompt:'弃置两张牌并摸一张牌', + check:function(card){return 4-get.useful(card)}, + content:function(){ + player.draw(); + }, + ai:{ + order:1, + result:{ + player:1 + }, + }, + }, + bingyi:{ + audio:2, + trigger:{player:'phaseDiscardEnd'}, + filter:function(event,player){ + var cards=player.getCards('h'); + if(cards.length<1) return false; + var color=get.color(cards[0]); + for(var i=1;i=2) return false; + if(player.hp==1) return false; + if(player.hp==2&&player.countCards('h')<2) return false; + if(event.player.countCards('h')>=event.player.hp) return false; + return true; + }, + content:function(){ + "step 0" + player.draw(2); + "step 1" + player.chooseCard(2,'he',true,'交给'+get.translation(trigger.player)+'两张牌').set('ai',function(card){ + if(ui.selected.cards.length&&card.name==ui.selected.cards[0].name) return -1; + if(get.tag(card,'damage')) return 1; + if(get.type(card)=='equip') return 1; + return 0; + }); + "step 2" + trigger.player.gain(result.cards,player); + if(player==game.me||trigger.player==game.me) + player.$give(result.cards,trigger.player); + else + player.$give(2,trigger.player); + game.delay(); + trigger.player.addSkill('xiantu2'); + trigger.player.storage.xiantu=player; + }, + ai:{ + threaten:1.1, + expose:0.3 + } + }, + xiantu2:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + audio:false, + content:function(){ + if(player.storage.xiantu){ + player.storage.xiantu.loseHp(); + delete player.storage.xiantu; + } + player.removeSkill('xiantu2'); + }, + group:'xiantu3' + }, + xiantu3:{ + trigger:{source:'dieAfter'}, + forced:true, + audio:false, + content:function(){ + delete player.storage.xiantu; + player.removeSkill('xiantu2'); + } + }, + qiangzhi:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('qiangzhi'),function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }).set('ai',function(){ + return Math.random(); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('qiangzhi',target); + var card=target.getCards('h').randomGet(); + player.showCards(card); + player.storage.qiangzhi=get.type(card,'trick'); + game.addVideo('storage',player,['qiangzhi',player.storage.qiangzhi]); + player.markSkill('qiangzhi'); + } + }, + intro:{ + content:function(type){ + return get.translation(type)+'牌'; + } + }, + group:['qiangzhi2','qiangzhi3'], + ai:{ + order:11, + result:{ + player:1 + } + } + }, + qiangzhi2:{ + trigger:{player:'useCard'}, + frequent:true, + filter:function(event,player){ + // return (get.type(event.card,'trick')==player.storage.qiangzhi&&event.cards[0]&&event.cards[0]==event.card); + return get.type(event.card,'trick')==player.storage.qiangzhi; + }, + content:function(){ + player.draw(); + }, + ai:{ + threaten:1.4 + } + }, + qiangzhi3:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + silent:true, + content:function(){ + delete player.storage.qiangzhi; + player.unmarkSkill('qiangzhi'); + } + }, + dingpin:{ + enable:'phaseUse', + usable:3, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return target.hp0; + }, + logTarget:'player', + content:function(){ + trigger.player.draw(); + }, + ai:{ + expose:0.2 + } + }, + jiaojin:{ + audio:2, + trigger:{player:'damageBegin'}, + filter:function(event,player){ + return player.countCards('he',{type:'equip'})&&event.source&&event.source.sex=='male'; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he','骄矜:是否弃置一张装备牌令伤害-1?',function(card,player){ + return get.type(card)=='equip'; + }); + next.set('ai',function(card){ + var player=_status.event.player; + if(player.hp==1||_status.event.getTrigger().num>1){ + return 9-get.value(card); + } + if(player.hp==2){ + return 8-get.value(card); + } + return 7-get.value(card); + }); + next.logSkill='jiaojin'; + "step 1" + if(result.bool){ + game.delay(0.5); + trigger.num--; + } + } + }, + chanhui:{ + audio:2, + trigger:{player:'useCard'}, + filter:function(event,player){ + if(_status.currentPhase!=player) return false; + if(player.hasSkill('chanhui2')) return false; + if(event.targets.length>1) return false; + var card=event.card; + if(card.name=='sha') return true; + if(get.color(card)=='black'&&get.type(card)=='trick') return true; + return false; + }, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('chanhui'),function(card,player,target){ + if(player==target) return false; + var trigger=_status.event.getTrigger(); + return player.canUse(trigger.card,target)&&trigger.targets.contains(target)==false; + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player)+1; + }); + "step 1" + if(result.bool){ + game.delay(0,200); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" + game.delay(); + player.addSkill('chanhui2'); + player.logSkill('chanhui',event.target); + event.target.chooseCard('交给'+get.translation(player)+'一张手牌,或成为'+ + get.translation(trigger.card)+'的额外目标').set('ai',function(card){ + return 5-get.value(card); + }); + "step 3" + if(result.bool){ + player.gain(result.cards,event.target); + event.target.$give(1,player); + game.delay(); + trigger.untrigger(); + trigger.player=event.target; + trigger.trigger('useCard'); + game.log(event.target,'成为了',trigger.card,'的使用者'); + } + else{ + game.log(event.target,'成为了',trigger.card,'的额外目标'); + trigger.targets.push(event.target); + } + } + }, + chanhui2:{ + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + audio:false, + content:function(){ + player.removeSkill('chanhui2'); + } + }, + quanji:{ + audio:2, + trigger:{player:'damageEnd'}, + frequent:true, + locked:false, + init:function(player){ + player.storage.quanji=[]; + }, + filter:function(event){ + return event.num>0; + }, + content:function(){ + "step 0" + player.draw(trigger.num); + "step 1" + if(player.countCards('he')){ + player.chooseCard('将'+get.cnNumber(trigger.num)+'张手牌置于武将牌上作为“权”',trigger.num,true); + } + else{ + event.finish(); + } + "step 2" + if(result.cards&&result.cards.length){ + player.lose(result.cards,ui.special); + player.storage.quanji=player.storage.quanji.concat(result.cards); + player.syncStorage('quanji'); + player.markSkill('quanji'); + game.log(player,'将',result.cards,'置于武将牌上作为“权”'); + } + }, + intro:{ + content:'cards' + }, + mod:{ + maxHandcard:function(player,num){ + return num+player.storage.quanji.length; + } + }, + ai:{ + maixie:true, + maixie_hp:true, + threaten:0.8, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(!target.hasFriend()) return; + if(target.hp>=4) return [0.5,get.tag(card,'damage')*2]; + if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5]; + if(target.hp==3) return [0.5,get.tag(card,'damage')*1.5]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; + } + } + } + } + }, + zili:{ + skillAnimation:true, + audio:3, + unique:true, + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return !player.hasSkill('paiyi')&&player.storage.quanji&&player.storage.quanji.length>=3; + }, + content:function(){ + "step 0" + player.chooseDrawRecover(2,true,function(event,player){ + if(player.hp==1&&player.isDamaged()) return 'recover_hp'; + return 'draw_card'; + }); + "step 1" + player.loseMaxHp(); + player.addSkill('paiyi'); + player.awakenSkill('zili'); + } + }, + paiyi:{ + enable:'phaseUse', + usable:1, + audio:2, + filterTarget:true, + filter:function(event,player){ + return player.storage.quanji.length>0; + }, + content:function(){ + "step 0" + player.chooseCardButton(player.storage.quanji,true); + "step 1" + var card=result.links[0]; + player.discard(card); + player.storage.quanji.remove(card); + if(!player.storage.quanji.length){ + player.unmarkSkill('quanji'); + } + else{ + player.markSkill('quanji'); + } + player.syncStorage('quanji'); + "step 2" + target.draw(2); + "step 3" + if(target.countCards('h')>player.countCards('h')){ + target.damage(); + } + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(player!=target) return 0; + if(player.countCards('h')+2<=player.hp+player.storage.quanji.length) return 1; + return 0; + } + } + } + }, + xianzhou:{ + skillAnimation:true, + audio:2, + unique:true, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.xianzhou&&player.countCards('e')>0; + }, + init:function(player){ + player.storage.xianzhou=false; + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + mark:true, + content:function(){ + "step 0" + player.awakenSkill('xianzhou'); + var cards=player.getCards('e'); + target.gain(cards,player); + event.num=cards.length; + player.$give(cards,target); + player.storage.xianzhou=true; + game.delay(); + "step 1" + target.chooseTarget([1,event.num],'令'+get.translation(player)+'回复'+ + event.num+'点体力,或对攻击范围内的'+event.num+'名角色造成一点伤害',function(card,player,target2){ + return get.distance(_status.event.player,target2,'attack')<=1; + }).set('ai',function(target2){ + var target=_status.event.player; + var player=_status.event.getParent().player; + if(get.attitude(target,player)>0){ + if(player.hp+event.num<=player.maxHp||player.hp==1) return -1; + } + return get.damageEffect(target2,target,target); + }); + "step 2" + if(result.bool){ + target.line(result.targets,'green'); + event.targets=result.targets; + event.num2=0; + } + else{ + player.recover(event.num); + event.finish(); + } + "step 3" + if(event.num22&&get.attitude(players[i],player)>2){ + bool=false;break; + } + } + if(bool) return -10; + if(player.hp==1) return 1; + if(game.phaseNumber0){ + return '移动装备'; + } + } + else{ + if(att<=0){ + return '移动装备'; + } + } + return 'draw_card'; + }).set('source',trigger.player); + } + else{ + next=player.chooseControl('draw_card','cancel2',function(){ + return 'draw_card'; + }); + } + next.set('prompt',get.prompt('qieting',trigger.player)); + "step 1" + if(result.control=='移动装备'){ + player.logSkill('qieting',trigger.player); + player.choosePlayerCard(trigger.player,'e','将一张装备牌移至你的装备区'); + } + else{ + if(result.control=='draw_card'){ + player.logSkill('qieting'); + player.draw(); + } + event.finish(); + } + "step 2" + if(result&&result.links&&result.links.length){ + game.delay(2); + trigger.player.$give(result.links[0],player); + player.equip(result.links[0]); + } + }, + ai:{ + expose:0.1 + } + }, + qieting2:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return _status.currentPhase==player&&event.targets&&(event.targets.length>1||event.targets[0]!=player); + }, + forced:true, + popup:false, + content:function(){ + player.addTempSkill('qieting3','phaseAfter'); + } + }, + qieting3:{}, + zhuikong:{ + audio:2, + trigger:{global:'phaseBegin'}, + check:function(event,player){ + if(get.attitude(player,event.player)<-2){ + var cards=player.getCards('h'); + if(cards.length>player.hp) return true; + for(var i=0;i9&&useful<7) return true; + } + } + return false; + }, + logTarget:'player', + filter:function(event,player){ + return player.hp0&&event.player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(trigger.player); + "step 1" + if(result.bool){ + trigger.player.addTempSkill('zishou2','phaseAfter'); + } + }, + }, + qiuyuan:{ + audio:2, + trigger:{target:'shaBefore'}, + direct:true, + priority:11, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('qiuyuan'),function(card,player,target){ + return target!=player&&_status.event.getTrigger().player.canUse('sha',target,false); + }).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,trigger.player,player)+0.1; + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + player.logSkill('qiuyuan',target); + event.target=target; + target.chooseCard({name:'shan'},'交给'+get.translation(player)+ + '一张闪,或成为此杀的额外目标').set('ai',function(card){ + return get.attitude(target,_status.event.source)>=0?1:-1; + }).set('source',player); + game.delay(); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.gain(result.cards,event.target); + event.target.$give(result.cards,player); + game.delay(); + } + else{ + trigger.targets.push(event.target); + game.log(event.target,'成为了额外目标'); + } + }, + ai:{ + expose:0.2, + effect:{ + target:function(card,player,target){ + if(card.name!='sha') return; + var players=game.filterPlayer(); + for(var i=0;i1){ + return 11-get.equipValue(card); + } + return 6-get.equipValue(card); + }, + content:function(){ + "step 0" + player.addTempSkill('gongji2','phaseAfter'); + "step 1" + if(get.type(cards[0])=='equip'){ + player.chooseTarget('是否弃置一名角色的一张牌?',function(card,player,target){ + return player!=target&&target.countCards('he')>0; + }).set('ai',function(target){ + var player=_status.event.player; + if(get.attitude(player,target)<0){ + return Math.max(0.5,get.effect(target,{name:'sha'},player,player)); + } + return 0; + }); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.line(result.targets,'green'); + event.target=result.targets[0]; + player.discardPlayerCard(event.target,'he',true).ai=get.buttonValue; + } + }, + ai:{ + order:9, + result:{ + player:1 + } + } + }, + gongji2:{ + mod:{ + attackFrom:function(){ + return -Infinity; + }, + }, + }, + zhuiyi:{ + audio:2, + trigger:{player:'dieBegin'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('zhuiyi'),function(card,player,target){ + return player!=target&&_status.event.source!=target; + }).set('ai',function(target){ + var num=get.attitude(_status.event.player,target); + if(num>0){ + if(target.hp==1){ + num+=2; + } + if(target.hpplayers[i].countCards('h')) return true; + } + return false; + }, + selectTarget:2, + content:function(){ + 'step 0' + var gainner,giver; + if(targets[0].countCards('h')0) return -1; + var players=game.filterPlayer(); + for(var i=0;i=0&&num20||player.countCards('he',{type:'equip'})>0; + }, + check:function(card){return 8-get.value(card)}, + selectTarget:2, + multitarget:true, + discard:false, + targetprompt:['得到牌','出杀目标'], + prepare:'give', + filterTarget:function(card,player,target){ + if(ui.selected.targets.length==0){ + return player!=target; + } + else{ + return lib.filter.filterTarget({name:'sha'},ui.selected.targets[0],target); + } + }, + content:function(){ + "step 0" + targets[0].gain(cards,player); + "step 1" + targets[0].chooseControl('draw_card','出杀',function(){ + var player=_status.event.player; + var target=_status.event.target; + if(get.effect(_status.event.target,{name:'sha'},player,player)>0){ + return 1; + } + return 0; + }).set('target',targets[1]).set('prompt','对'+get.translation(targets[1])+'使用一张杀,或摸一张牌'); + "step 2" + if(result.control=='draw_card'){ + targets[0].draw(); + } + else{ + targets[0].useCard({name:'sha'},targets[1]); + } + }, + ai:{ + result:{ + player:function(player){ + var players=game.filterPlayer(); + for(var i=0;i1&&get.attitude(players[i],player)>1){ + return 1; + } + } + return 0; + }, + target:function(player,target){ + if(ui.selected.targets.length){ + return -0.1; + } + return 1; + } + }, + order:8.5, + expose:0.2 + } + }, + xinxuanhuo:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('xinxuanhuo'),function(card,player,target){ + return player!=target; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(att>0){ + if(target.countCards('h')1&&check<2) return 0; + return get.unuseful(card)+9; + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length==1&&ui.selected.cards[0].name=='du') return 1-att; + return att-2; + }, + prompt:'将'+get.cnNumber(event.num)+'张手牌交给一名其他角色', + }).set('check',check); + "step 2" + if(result.bool){ + result.targets[0].gain(result.cards,event.player); + event.player.$give(result.cards.length,result.targets[0]); + player.line(result.targets,'green'); + } + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 3; + if(target.hp==2) return 1.5; + return 0.5; + }, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + } + } + } + }, + zhenlie:{ + audio:2, + filter:function(event,player){ + return event.player!=player&&event.card&&(event.card.name=='sha'||get.type(event.card)=='trick'); + }, + logTarget:'player', + check:function(event,player){ + if(get.attitude(player,event.player)>0){ + return false; + } + if(get.tag(event.card,'respondSha')){ + if(player.countCards('h',{name:'sha'})==0){ + return true; + } + } + else if(get.tag(event.card,'respondShan')){ + if(player.countCards('h',{name:'shan'})==0){ + return true; + } + } + else if(get.tag(event.card,'damage')){ + if(player.countCards('h')<2) return true; + } + else if(event.card.name=='shunshou'&&player.hp>2){ + return true; + } + return false; + }, + priority:10, + trigger:{target:'useCardToBefore'}, + content:function(){ + "step 0" + player.loseHp(); + "step 1" + trigger.untrigger(); + trigger.finish(); + "step 2" + if(trigger.player.countCards('he')){ + player.discardPlayerCard(trigger.player,'he',true); + } + }, + ai:{ + expose:0.3 + } + }, + wuyan:{ + audio:2, + trigger:{target:'useCardToBefore',player:'useCardToBefore'}, + forced:true, + priority:15, + check:function(event,player){ + return get.effect(event.target,event.card,event.player,player)<0; + }, + filter:function(event,player){ + if(!event.target) return false; + if(event.player==player&&event.target==player) return false; + return (get.type(event.card)=='trick'); + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; + }, + player:function(card,player,target,current){ + if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; + } + } + } + }, + xinwuyan:{ + audio:2, + trigger:{source:'damageBefore',player:'damageBefore'}, + forced:true, + priority:15, + check:function(event,player){ + if(player==event.player) return true; + return false; + }, + filter:function(event,player){ + return get.type(event.card,'trick')=='trick'; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + notrick:true, + notricksource:true, + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='trick'&&get.tag(card,'damage')){ + return 'zeroplayertarget'; + } + }, + player:function(card,player,target,current){ + if(get.type(card)=='trick'&&get.tag(card,'damage')){ + return 'zeroplayertarget'; + } + } + } + } + }, + xinjujian:{ + trigger:{player:'phaseEnd'}, + direct:true, + audio:2, + filter:function(event,player){ + return player.countCards('he')>player.countCards('he',{type:'basic'}); + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + filterTarget:function(card,player,target){ + return player!=target; + }, + filterCard:function(card,player){ + return get.type(card)!='basic'&&lib.filter.cardDiscardable(card,player); + }, + ai1:function(card){ + if(get.tag(card,'damage')&&get.type(card)=='trick'){ + return 20; + } + return 9-get.value(card); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(att>0){ + if(target.isTurnedOver()) att+=3; + if(target.hp==1) att+=3; + } + return att; + }, + position:'he', + prompt:get.prompt('xinjujian') + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('xinjujian',target); + player.discard(result.cards); + if(target.hp==target.maxHp&& + !target.isTurnedOver()&& + !target.isLinked()){ + target.draw(2); + event.finish(); + } + else{ + var controls=['draw_card']; + if(target.hp2){ + return 'recover_hp'; + } + else if(target.hp==2&&target.maxHp>2&&target.countCards('h')>1){ + return 'recover_hp'; + } + else{ + return 'draw_card'; + } + } + } + } + else{ + event.finish(); + } + "step 2" + event.control=result.control; + switch(event.control){ + case 'recover_hp':event.target.recover();event.finish();break; + case 'draw_card':event.target.draw(2);event.finish();break; + case 'reset_character':if(event.target.isTurnedOver()) event.target.turnOver();break; + } + "step 3" + if(event.control=='reset_character'&&event.target.isLinked()){ + event.target.link(); + } + }, + ai:{ + expose:0.2, + threaten:1.4 + } + }, + jujian:{ + enable:'phaseUse', + usable:1, + audio:2, + filterCard:true, + position:'he', + selectCard:[1,3], + check:function(card){ + var player=get.owner(card); + if(get.type(card)=='trick') return 10; + if(player.countCards('h')-player.hp-ui.selected.cards.length>0){ + return 8-get.value(card); + } + return 4-get.value(card); + }, + filterTarget:function(card,player,target){ + return player!=target; + }, + content:function(){ + target.draw(cards.length); + if(cards.length==3){ + if(get.type(cards[0],'trick')==get.type(cards[1],'trick')&& + get.type(cards[0],'trick')==get.type(cards[2],'trick')){ + player.recover(); + } + } + }, + ai:{ + expose:0.2, + order:1, + result:{ + target:1 + } + } + }, + yizhong:{ + trigger:{target:'shaBefore'}, + forced:true, + audio:2, + filter:function(event,player){ + if(player.getEquip(2)) return false; + return (event.card.name=='sha'&&get.color(event.card)=='black') + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player==target&&get.subtype(card)=='equip2'){ + if(get.equipValue(card)<=8) return 0; + } + if(target.getEquip(2)) return; + if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; + } + } + } + }, + jueqing:{ + trigger:{source:'damageBefore'}, + forced:true, + audio:2, + priority:16, + check:function(){return false;}, + content:function(){ + trigger.untrigger(); + trigger.finish(); + var ex=0; + if(trigger.card&&trigger.card.name=='sha'){ + if(player.hasSkill('jiu')) ex++; + if(player.hasSkill('luoyi2')) ex++; + if(player.hasSkill('reluoyi2')) ex++; + } + trigger.player.loseHp(trigger.num+ex); + }, + ai:{ + jueqing:true + } + }, + shangshi:{ + audio:2, + trigger:{player:['loseEnd','changeHp']}, + forced:true, + filter:function(event,player){ + return (player.countCards('h')0) return 0; + if(player.getEquip('zhuge')&&player.countCards('h','sha')>1) return 0; + if(!player.countCards('h','sha')) return 0; + var targets=[]; + var target; + var players=game.filterPlayer(); + for(var i=0;inum){ + target=targets[i]; + num=num2; + } + } + if(num<=0) return 0; + var e2=target.getEquip(2); + if(e2){ + if(e2.name=='tengjia'){ + if(!player.countCards('h',{name:'sha',nature:'fire'})&&!player.getEquip('zhuque')) return 0; + } + if(e2.name=='renwang'){ + if(!player.countCards('h',{name:'sha',color:'red'})) return 0; + } + if(e2.name=='baiyin') return 0; + } + if(player.getEquip('guanshi')&&player.countCards('he')>2) return 1; + return target.countCards('h')>3?0:1; + } + if(player==_status.event.dying||player.isTurnedOver()) return 3; + } + }, + effect:{ + target:function(card,player,target){ + if(card.name=='guiyoujie') return [0,0.5]; + if(target.isTurnedOver()){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(target.hp==1) return; + return [1,target.countCards('h')/2]; + } + } + } + } + }, + }, + jiushi2:{ + trigger:{player:'damageBegin'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return player.classList.contains('turnedover'); + }, + content:function(){ + player.storage.jiushi=true; + } + }, + jiushi3:{ + audio:2, + trigger:{player:'damageAfter'}, + check:function(event,player){ + return player.isTurnedOver(); + }, + filter:function(event,player){ + if(player.storage.jiushi){ + return true; + } + return false; + }, + content:function(){ + player.storage.jiushi=false; + player.turnOver(); + } + }, + zongshi:{ + mod:{ + maxHandcard:function(player,num){ + var list=['wei','shu','wu','qun']; + var num2=game.countPlayer(function(current){ + if(list.contains(current.group)){ + list.remove(current.group); + return true; + } + }); + return num+num2; + } + } + }, + zishou:{ + audio:2, + trigger:{player:'phaseDrawBegin'}, + check:function(event,player){ + return player.countCards('h')<=player.maxHp||player.skipList.contains('phaseUse'); + }, + content:function(){ + var list=['wei','shu','wu','qun']; + var num=game.countPlayer(function(current){ + if(list.contains(current.group)){ + list.remove(current.group); + return true; + } + }); + trigger.num+=num; + player.addTempSkill('zishou2','phaseAfter'); - guizao:'瑰藻', - guizao_info:'弃牌阶段结束时,若你于此阶段弃置牌的数量不小于2且它们的花色各不相同,你可以回复1点体力或摸一张牌', - jiyu:'讥谀', - jiyu_info:'出牌阶段每名角色限一次,若你有可以使用的手牌,你可以令一名角色弃置一张手牌。若如此做,你不能使用与之相同花色的牌,直到回合结束。若其以此法弃置的牌为黑桃,你翻面并令其失去1点体力', - qinqing:'寝情', - qinqing_info:'结束阶段开始时,你可以弃置攻击范围内含有主公的一名其他角色的一张牌,令其摸一张牌,然后若其手牌比主公多,你摸一张牌', - huisheng:'贿生', - huisheng_info:'每名角色限一次,当你受到其他角色造成的伤害时,你可选你的任意数量的牌令该角色观看,然后该角色选择:1.获得这些牌中的一张,然后防止伤害。2.弃置等量的牌', - jishe:'极奢', - jishe_info:'出牌阶段,若你的手牌上限大于0,你可以摸一张牌,然后你本回合的手牌上限-1。结束阶段开始时,若你没有手牌,则你可以横置至多X名角色的武将牌(X为你的体力值)', - lianhuo:'链祸', - lianhuo_info:'锁定技,当你受到火焰伤害时,若你处于“连环状态”且你是传导伤害的起点,则此伤害+1', - taoluan:'滔乱', - taoluan4:'滔乱', - taoluan5:'滔乱', - taoluan_backup:'滔乱', - taoluan_info:'出牌阶段,你可视为使用任意一张基本牌或普通锦囊牌(此牌不得是本局游戏你以此法使用过的牌),然后你令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别相同的牌;2.你失去1点体力且滔乱无效直到回合结束', - jiaozhao:'矫诏', - jiaozhao2:'矫诏', - jiaozhao_info:'出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标', - danxin:'殚心', - danxin_info:'当你受到伤害后,你可以摸一张牌,或对“矫诏”的描述依次执行下列一项修改:1.将“基本牌”改为“基本牌或普通锦囊牌”;2.将“选择距离最近的一名其他角色,该角色”改为“你”', - duliang:'督粮', - duliang2:'督粮', - duliang_info:'出牌阶段限一次,你可以获得一名其他角色的一张手牌,然后选择一项:1.令其观看牌堆顶的两张牌,然后获得其中的基本牌;2.令其于下个摸牌阶段额外摸一张牌', - fulin:'腹鳞', - fulin_info:'锁定技,弃牌阶段内,你于此回合内获得的牌不计入你的手牌数', - kuangbi:'匡弼', - kuangbi_info:'出牌阶段限一次,你可以选择一名有牌的其他角色,该角色将其一至三张牌置于你的武将牌上。若如此做,你的下准备阶段,你获得武将牌上的所有牌,然后其摸等量的牌', - zhige:'止戈', - zhige_info:'出牌阶段限一次,若你的手牌数大于你的体力值,你可以选择攻击范围内含有你的一名其他角色,除非该角色使用一张【杀】,否则其将其装备区里的一张牌交给你', - zongzuo:'宗祚', - zongzuo_info:'锁定技,游戏的第一个回合开始前,你加X点体力上限和体力(X为全场势力数);当一名角色死亡后,若没有与其势力相同的角色,你减1点体力上限', - xinjuece:'绝策', - xinjuece_info:'结束阶段开始时,你可以对没有手牌的一名角色造成1点伤害', - xinmieji:'灭计', - xinmieji_info:'出牌阶段限一次,你可以展示一张黑色锦囊牌并将之置于牌堆顶,然后令有手牌的一名其他角色选择一项:弃置一张锦囊牌;或弃置两张非锦囊牌', - xinfencheng:'焚城', - xinfencheng_info:'限定技。出牌阶段,你可以令所有其他角色各选择一项:弃置至少X张牌(X为该角色的上家以此法弃置牌的数量+1);或受到你对其造成的2点火焰伤害', - qianju:'千驹', - qianju_info:'锁定技,若你已受伤,你的进攻距离+X(X为你已损失体力值)', - qingxi:'倾袭', - qingxi_info:'当你使用【杀】对目标角色造成伤害时,若你的装备区里有武器牌,你可以令其选择一项:1、弃置X张手牌(X为此武器牌的攻击范围),若如此做,其弃置你的此武器牌;2、令伤害值+1', - jieyue:'节钺', - jieyue1:'节钺', - jieyue2:'节钺', - jieyue3:'节钺', - jieyue4:'节钺', - jieyue_info:'结束阶段开始时,你可以弃置一张手牌,然后令一名其他角色选择一项:将一张牌置于你的武将牌上;或令你弃置其一张牌。你武将牌上有牌时,你可以将红色手牌当【闪】、黑色的手牌当【无懈可击】使用或打出。准备阶段开始时,你获得你武将牌上的牌。', - xianzhen:'陷阵', - xianzhen_info:'出牌阶段,你可以与一名角色拼点。若你赢,你获得以下技能直到回合结束:无视与该角色的距离;无视防具且可使用任意数量的【杀】。若你没赢,你不能使用【杀】直到回合结束。每回合限一次', - jinjiu:'禁酒', - jinjiu_info:'锁定技,你的【酒】均视为【杀】', - chunlao:'醇醪', - chunlao_info:'结束阶段开始时,若没有“醇”,你可以将至少一张【杀】置于你的武将牌上,称为“醇”。当一名角色处于濒死状态时,你可以移去一张“醇”,视为该角色使用一张【酒】', - lihuo:'疠火', - lihuo_info:'你可以将一张普通【杀】当火【杀】使用。若以此法使用的【杀】造成了伤害,则此【杀】结算后你失去1点体力;你使用火【杀】指定目标后,可以额外指定一个目标', - shenduan:'慎断', - shenduan_info:'当你的黑色基本牌因弃置而进入弃牌堆时,你可以将之视为 【兵粮寸断】并置于一名其他角色的判定区里', - yonglve:'勇略', - yonglve_info:'你攻击范围内的一名其他角色的判定阶段开始时,你可以弃置其判定区里的一张牌,视为对该角色使用一张【杀】。若此【杀】未造成伤害,你摸一张牌', - benxi:'奔袭', - benxi_info:'锁定技,在你的回合内,你每使用一次牌后,你的进攻距离+1,直到回合结束;你的回合内,若你与所有角色的距离均为1,你无视其他角色的防具,且你使用的【杀】可额外指定一个目标', - sidi:'司敌', - sidi2:'司敌', - sidi3:'司敌', - sidi_info:'每当你使用或其他角色在你的回合内使用闪时,你可以将牌堆顶的一张牌正面向上置于你的武将牌上;一名其他角色的出牌阶段开始时,你可以移去一张“司敌”牌,然后该角色本阶段可使用杀的次数上限-1', - xinsidi:'司敌', - xinsidi2:'司敌', - xinsidi_info:'其他角色出牌阶段开始时,你可以弃置一张与你装备区里的牌颜色相同的非基本牌,然后该角色于此阶段内不能使用和打出与此牌颜色相同的牌。此阶段结束时,若其此阶段没有使用【杀】,视为你对其使用了【杀】', - dangxian:'当先', - dangxian_info:'锁定技,准备阶段,你执行一个额外的出牌阶段', - longyin:'龙吟', - longyin_info:'每当一名角色在其出牌阶段使用【杀】时,你可弃置一张牌令此【杀】不计入出牌阶段使用次数,若此【杀】为红色,你摸一张牌', - zhongyong:'忠勇', - zhongyong_info:'当你于出牌阶段内使用的【杀】被目标角色使用的【闪】抵消时,你可以将此【闪】交给除该角色外的一名角色。若获得此【闪】的角色不是你,你可以对相同的目标再使用一张【杀】', - xinzhongyong:'忠勇', - xinzhongyong_info:'当你使用的【杀】结算完毕后,你可以将此【杀】或目标角色使用的【闪】交给一名该角色以外的其他角色,以此法获得红色牌的角色可以对你攻击范围内的角色使用一张【杀】', - jigong:'急攻', - jigong_info:'出牌阶段开始时,你可以摸两张牌。若如此做,此回合你的手牌上限改为X(X为你此阶段造成的伤害数)', - shifei:'饰非', - shifei_info:'当你需要使用或打出【闪】时,你可以令当前回合角色摸一张牌,然后若其手牌数不为全场最多,则你弃置全场手牌数最多(或之一)角色的一张牌,视为你使用或打出了一张【闪】', - huaiyi:'怀异', - huaiyi_info:'出牌阶段限一次,你可以展示所有手牌,若其中包含不止一种颜色,则你选择一种颜色并弃置该颜色的所有手牌,然后你可以获得至多X名角色的各一张牌(X为你以此法弃置的手牌数)。若你以此法获得的牌不少于两张,则你失去1点体力', - yaoming:'邀名', - yaoming_info:'每回合限一次,当你造成或受到伤害后,你可以选择一项:1. 弃置手牌数大于你的一名角色的一张手牌;2. 令手牌数小于你的一名角色摸一张牌', - anguo:'安国', - anguo_info:'出牌阶段限一次,你可以选择一名其他角色装备区里的一张牌,令其将此牌收回手牌。然后若该角色攻击范围内的角色数因此减少,则你摸一张牌', - yanzhu:'宴诛', - yanzhu_info:'出牌阶段限一次,你可以令一名有牌的其他角色选择一项:令你获得其装备区里所有的牌,然后你失去技能“宴诛”,直到游戏结束;或弃置一张牌', - xingxue:'兴学', - xingxue_info:'结束阶段开始时,你可以令至多X名角色依次摸一张牌并将一张牌置于牌堆顶(X为你的体力值);若你已失去技能“宴诛”,则将X改为你的体力上限', - zhaofu:'诏缚', - zhaofu_info:'主公技,锁定技,你距离为1的角色视为在其他吴势力角色的攻击范围内', - wurong:'怃戎', - wurong_info:'出牌阶段限一次,你可以令一名其他角色与你同时展示一张手牌:若你展示的是【杀】且该角色展示的不是【闪】,则你弃置此【杀】并对其造成1点伤害;若你展示的不是【杀】且该角色展示的是【闪】,则你弃置你展示的牌并获得其一张牌', - shizhi:'矢志', - shizhi_info:'锁定技,当你体力为1时,你的【闪】均视为【杀】', - zhanjue:'战绝', - zhanjue_info:'出牌阶段,你可以将所有手牌当【决斗】使用,结算后你和以此法受到伤害的角色各摸一张牌。若你在同一阶段内以此法摸了两张或更多的牌,则此技能失效直到回合结束', - qinwang:'勤王', - qinwang1:'勤王', - qinwang2:'勤王', - qinwang_info:'主公技,你可以弃置一张牌,然后视为你发动“激将”。若有角色响应,则该角色打出【杀】时摸一张牌', - huomo:'活墨', - huomo_use:'活墨', - huomo_use_backup:'活墨', - huomo_info:'每当你需要使用一张本回合内未使用过的基本牌时,你可以将一张黑色非基本牌置于牌堆顶,然后视为你使用了此基本牌', - huomo_use_info:'每当你需要使用一张本回合内未使用过的基本牌时,你可以将一张黑色非基本牌置于牌堆顶,然后视为你使用了此基本牌', - zuoding:'佐定', - zuoding_info:'每当一名其他角色于其回合内使用♠牌指定目标后,若本回合没有角色受到过伤害,则你可以令其中一名目标角色摸一张牌', - taoxi:'讨袭', - taoxi2:'讨袭', - taoxi3:'讨袭', - taoxi_info:'出牌阶段限一次,当你使用牌指定一名其他角色为唯一目标后,你可以亮出其一张手牌直到回合结束,并且你可以于此回合内将此牌如手牌般使用。结束阶段,若该角色未失去此手牌,则你失去1点体力', - huituo:'恢拓', - huituo_info:'每当你受到伤害后,你可以令一名角色进行一次判定,若结果为红色,该角色回复1点体力;若结果为黑色,该角色摸X张牌(X为此次伤害的伤害数)', - mingjian:'明鉴', - mingjian2:'明鉴', - mingjian_info:'出牌阶段限一次,你可以将所有手牌交给一名其他角色,若如此做,该角色于其下个回合的手牌上限+1,且出杀的次数上限+1', - xingshuai:'兴衰', - xingshuai_info:'主公技,限定技,当你进入濒死状态时,其他魏势力角色可依次令你回复1点体力,然后这些角色依次受到1点伤害', - duodao:'夺刀', - duodao_info:'每当你受到杀造成的一次伤害后,你可以弃置一张牌,然后获得伤害来源装备区里的武器牌', - anjian:'暗箭', - anjian_info:'当你使用的杀对目标角色造成伤害时,若你不在其攻击范围内,则此杀伤害+1', - xinpojun:'破军', - xinpojun2:'破军', - xinpojun_info:'当你于出牌阶段内使用【杀】指定一个目标后,你可以将其至多X张牌扣置于该角色的武将牌旁(X为其体力值)。若如此做,当前回合结束后,该角色获得其武将牌旁的所有牌。', + }, + ai:{ + threaten:1.5 + } + }, + zishou2:{ + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target) return false; + } + } + }, + yaowu:{ + trigger:{player:'damageEnd'}, + priority:1, + audio:2, + filter:function(event){ + if(event.card&&(event.card.name=='sha')){ + if(get.color(event.card)=='red') return true; + } + return false; + }, + forced:true, + check:function(){ + return false; + }, + content:function(){ + trigger.source.chooseDrawRecover(true); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&(get.color(card)=='red')){ + return [1,-2]; + } + } + } + } + }, + olddanshou:{ + trigger:{source:'damageEnd'}, + priority:9, + check:function(event,player){ + return get.attitude(player,event.player)<=0; + }, + content:function(){ + "step 0" + player.draw(); + "step 1" + while(_status.event.name!='phase'){ + _status.event=_status.event.parent; + } + game.resetSkills(); + _status.event.finish(); + _status.event.untrigger(true); + } + }, + danshou:{ + enable:'phaseUse', + filterCard:true, + position:'he', + audio:2, + filter:function(event,player){ + var num=player.getStat().skill.danshou; + if(num){ + num++; + } + else{ + num=1; + } + return player.countCards('he')>=num; + }, + check:function(card){ + return 6-get.value(card); + }, + selectCard:function(card){ + var num=_status.event.player.getStat().skill.danshou; + if(num) return num+1; + return 1; + }, + filterTarget:function(card,player,target){ + if(player==target) return false; + var num=player.getStat().skill.danshou; + if(num){ + num++; + } + else{ + num=1; + } + if(num<=2&&!target.countCards('he')) return false; + return get.distance(player,target,'attack')<=1; + }, + content:function(){ + 'step 0' + var num=player.getStat().skill.danshou; + switch(num){ + case 1:player.discardPlayerCard(target,true);break; + case 2:target.chooseCard('选择一张牌交给'+get.translation(player),'he',true);break; + case 3:target.damage();break; + default:game.asyncDraw([player,target],2); + } + if(num!=2) event.finish(); + 'step 1' + if(result.cards){ + player.gain(result.cards,target); + target.$give(result.cards.length,player); + } + }, + ai:{ + order:8.6, + result:{ + target:function(player,target){ + var num=player.getStat().skill.danshou; + if(num){ + num++; + } + else{ + num=1; + } + if(num>3) return 0; + if(num==3) return get.damageEffect(target,player,target); + return -1; + } + } + } + }, + qice:{ + enable:'phaseUse', + usable:1, + audio:2, + filter:function(event,player){ + return player.countCards('h')>0 + }, + chooseButton:{ + dialog:function(){ + var list=['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; + for(var i=0;i0){ + if(players[i].hp<2){ + lose--; + recover+=0.5; + } + lose--; + recover++; + } + else if(get.attitude(player,players[i])<0){ + if(players[i].hp<2){ + lose++; + recover-=0.5; + } + lose++; + recover--; + } + } + else{ + if(get.attitude(player,players[i])>0){ + lose--; + } + else if(get.attitude(player,players[i])<0){ + lose++; + } + } + } + } + if(lose>recover&&lose>0) return (button.link[2]=='nanman')?1:-1; + if(lose0) return (button.link[2]=='taoyuan')?1:-1; + return (button.link[2]=='wuzhong')?1:-1; + }, + backup:function(links,player){ + return { + filterCard:true, + selectCard:-1, + audio:2, + popname:true, + viewAs:{name:links[0][2]}, + } + }, + prompt:function(links,player){ + return '将全部手牌当作'+get.translation(links[0][2])+'使用'; + } + }, + ai:{ + order:1, + result:{ + player:function(player){ + var num=0; + var cards=player.getCards('h'); + if(cards.length>=3&&player.hp>=3) return 0; + for(var i=0;i1 + } + else{ + for(var i=0;i3&&player.countCards('h','sha')>1){ + return 'jiangchi_less'; + } + if(player.countCards('h','sha')>2){ + return 'jiangchi_less'; + } + if(player.hp-player.countCards('h')>1){ + return 'jiangchi_more'; + } + return 'cancel2'; + }); + "step 1" + if(result.control=='jiangchi_less'){ + trigger.num--; + player.addTempSkill('jiangchi2','phaseUseEnd'); + player.logSkill('jiangchi'); + } + else if(result.control=='jiangchi_more'){ + trigger.num++; + player.addTempSkill('jiangchi3','phaseUseEnd'); + player.logSkill('jiangchi'); + } + } + }, + jiangchi2:{ + mod:{ + targetInRange:function(card,player,target,now){ + if(card.name=='sha') return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + } + } + }, + jiangchi3:{ + mod:{ + cardEnabled:function(card){if(card.name=='sha') return false} + } + }, + xinzhan:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return true;//player.countCards('h')>player.maxHp; + }, + usable:1, + content:function(){ + "step 0" + var cards=get.cards(3); + event.cards=cards; + var next=player.chooseCardButton(cards,'选择获得的红桃牌',[1,Infinity]).set('filterButton',function(button){ + return get.suit(button.link)=='heart'; + }); + "step 1" + if(result.bool){ + player.gain(result.links); + player.$draw(result.links); + game.delay(2); + } + for(var i=event.cards.length-1;i>=0;i--){ + if(!result.bool||!result.links.contains(event.cards[i])){ + ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild); + } + } + }, + ai:{ + order:11, + result:{ + player:1 + } + } + }, + huilei:{ + audio:2, + trigger:{player:'dieBegin'}, + forced:true, + filter:function(event){ + return event.source!=undefined; + }, + content:function(){ + trigger.source.discard(trigger.source.getCards('he')); + }, + ai:{ + threaten:0.7 + } + }, + xinenyuan:{ + audio:true, + trigger:{player:'damageEnd'}, + check:function(event,player){ + var att=get.attitude(player,event.source); + var num=event.source.countCards('h'); + if(att<=0) return true; + if(num>2) return true; + if(num) return att<4; + return false; + }, + filter:function(event,player){ + return event.source&&event.source!=player&&event.num>0&&event.source.isAlive(); + }, + content:function(){ + "step 0" + event.num=trigger.num; + "step 1" + trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌或流失一点体力').set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ + return 11-get.value(card); + } + else{ + return 7-get.value(card); + } + }); + "step 2" + if(result.bool){ + player.gain(result.cards[0],trigger.source); + trigger.source.$give(1,player); + } + else{ + trigger.source.loseHp(); + } + if(event.num>1){ + event.num--; + event.goto(1); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return [1,-1.5]; + if(!target.hasFriend()) return; + if(get.tag(card,'damage')) return [1,0,0,-0.7]; + } + } + }, + group:'xinenyuan2' + }, + xinenyuan2:{ + trigger:{player:'gainEnd'}, + filter:function(event,player){ + return event.source&&event.source.isAlive()&&event.source!=player&&event.cards.length>=2; + }, + logTarget:'source', + check:function(event,player){ + return get.attitude(player,event.source)>0; + }, + content:function(){ + trigger.source.draw(); + } + }, + enyuan:{ + locked:true, + group:['enyuan1','enyuan2'], + ai:{ + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(!target.hasFriend()) return; + if(get.tag(card,'damage')) return [1,0,0,-1]; + } + } + } + }, + enyuan1:{ + trigger:{player:'recoverEnd'}, + forced:true, + audio:2, + filter:function(event,player){ + return event.source&&event.source!=player; + }, + content:function(){ + trigger.source.draw(); + } + }, + enyuan2:{ + trigger:{player:'damageEnd'}, + forced:true, + audio:true, + filter:function(event,player){ + return event.source&&event.source!=player; + }, + content:function(){ + "step 0" + trigger.source.chooseCard('交出一张红桃牌或流失一点体力',function(card){ + return get.suit(card)=='heart'; + }).set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ + return 11-get.value(card); + } + else{ + return 7-get.value(card); + } + }); + "step 1" + if(result.bool){ + player.gain(result.cards[0],trigger.source); + trigger.source.$give(1,player); + } + else{ + trigger.source.loseHp(); + } + } + }, + xuanhuo:{ + audio:2, + enable:'phaseUse', + usable:1, + discard:false, + prepare:'give2', + filter:function(event,player){ + return player.countCards('he',{suit:'heart'}); + }, + filterCard:function(card){ + return get.suit(card)=='heart'; + }, + filterTarget:function(card,player,target){ + if(game.countPlayer()==2) return false; + return player!=target; + }, + check:function(card){ + var player=get.owner(card); + var players=game.filterPlayer(); + for(var i=0;i3) break; + } + if(i==players.length) return -1; + return 5-get.value(card); + }, + content:function(){ + "step 0" + target.gain(cards,player); + // game.delay(); + "step 1" + player.gainPlayerCard(target,'he',true); + "step 2" + var source=target; + event.card=result.links[0]; + player.chooseTarget('选择一个目标送出'+get.translation(event.card),function(card,player,target){ + return target!=_status.event.source&&target!=player; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }).set('source',target); + "step 3" + if(result.bool){ + result.targets[0].gain(card,player); + player.$give(1,result.targets[0]); + game.delay(); + } + }, + ai:{ + result:{ + target:-0.5, + }, + basic:{ + order:9, + } + } + }, + ganlu:{ + enable:'phaseUse', + usable:1, + audio:2, + selectTarget:2, + filterTarget:function(card,player,target){ + if(target.isMin()) return false; + if(ui.selected.targets.length==0) return true; + if(ui.selected.targets[0].countCards('e')==0&&target.countCards('e')==0) return false; + return Math.abs(ui.selected.targets[0].countCards('e')-target.countCards('e'))<=player.maxHp-player.hp; + }, + multitarget:true, + content:function(){ + "step 0" + event.cards=[targets[0].getCards('e'),targets[1].getCards('e')]; + targets[0].lose(event.cards[0],ui.special); + targets[1].lose(event.cards[1],ui.special); + if(event.cards[0].length) targets[0].$give(event.cards[0],targets[1]); + if(event.cards[1].length) targets[1].$give(event.cards[1],targets[0]); + "step 1" + for(var i=0;i0) list1.push(players[i]); + else if(get.attitude(player,players[i])<0) list2.push(players[i]); + } + list1.sort(function(a,b){ + return a.countCards('e')-b.countCards('e'); + }); + list2.sort(function(a,b){ + return b.countCards('e')-a.countCards('e'); + }); + var delta; + for(var i=0;i0; + }, + direct:true, + content:function(){ + "step 0" + var check; + if(trigger.player.isUnderControl(true,player)){ + check=player.hasCard(function(card){ + return get.type(card)!='basic'; + }); + } + else{ + check=(get.attitude(player,trigger.player)>0); + } + player.choosePlayerCard(trigger.player,get.prompt('buyi',trigger.player),'h').set('ai',function(button){ + if(!_status.event.check) return 0; + if(_status.event.target.isUnderControl(true,_status.event.player)){ + if(get.type(button.link)!='basic'){ + return 10-get.value(button.link); + } + return 0; + } + else{ + return Math.random(); + } + }).set('check',check).set('filterButton',function(button){ + if(_status.event.player==_status.event.target){ + return lib.filter.cardDiscardable(button.link,_status.event.player); + } + return true; + }); + "step 1" + if(result.bool){ + player.logSkill('buyi',trigger.player); + event.card=result.links[0]; + player.showCards([event.card],get.translation(player)+'展示的手牌'); + } + else{ + event.finish(); + } + "step 2" + if(get.type(event.card)!='basic'){ + trigger.player.recover(); + trigger.player.discard(event.card); + } + }, + ai:{ + threaten:1.4 + } + }, + pojun:{ + audio:2, + trigger:{source:'damageEnd'}, + check:function(event,player){ + if(event.player.isTurnedOver()) return get.attitude(player,event.player)>0; + if(event.player.hp<3){ + return get.attitude(player,event.player)<0; + } + return get.attitude(player,event.player)>0; + }, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.player.isAlive(); + }, + logTarget:'player', + content:function(){ + "step 0" + trigger.player.draw(Math.min(5,trigger.player.hp)); + "step 1" + trigger.player.turnOver(); + } + }, + jingce:{ + trigger:{player:'phaseUseEnd'}, + frequent:true, + filter:function(event,player){ + return get.cardCount(true,player)>=player.hp; + }, + content:function(){ + player.draw(2); + }, + audio:2, + init:function(player){player.storage.jingce=true}, + intro:{ + content:function(storage,player){ + if(_status.currentPhase==player) return '已使用'+get.cardCount(true,player)+'张牌'; + } + } + }, + chengxiang:{ + trigger:{player:'damageEnd'}, + direct:true, + audio:2, + content:function(){ + "step 0" + event.cards=get.cards(4); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + var str; + if(player==game.me&&!_status.auto){ + str='称象:选择任意张点数不大于13的牌'; + } + else{ + str='称象'; + } + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + event.time=get.utc(); + game.addVideo('showCards',player,['称象',get.cardsInfo(event.cards)]); + game.addVideo('delay',null,2); + "step 1" + var next=player.chooseButton([0,4]); + next.set('dialog',event.videoId); + next.set('filterButton',function(button){ + var num=0 + for(var i=0;i0){ + game.delay(0,time); + } + "step 3" + game.broadcastAll('closeDialog',event.videoId); + var cards2=event.cards2; + player.gain(cards2,'log'); + player.$draw(cards2); + game.delay(); + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(!target.hasFriend()) return; + if(target.hp>=4) return [1,2]; + if(target.hp==3) return [1,1.5]; + if(target.hp==2) return [1,0.5]; + } + } + } + } + }, + renxin:{ + trigger:{global:'damageBefore'}, + audio:3, + priority:6, + filter:function(event,player){ + return event.player!=player&&event.player.hp==1&&player.countCards('he',{type:'equip'})>0; + }, + direct:true, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('renxin',trigger.player),{type:'equip'},'he'); + next.logSkill=['renxin',trigger.player]; + next.set('ai',function(card){ + var player=_status.event.player; + if(get.attitude(player,_status.event.getTrigger().player)>3){ + return 11-get.value(card); + } + return -1; + }); + "step 1" + if(result.bool){ + player.turnOver(); + } + else{ + event.finish(); + } + "step 2" + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + expose:0.5 + } + }, + yuce:{ + audio:2, + trigger:{player:'damageAfter'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0&&player.isDamaged(); + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard(get.prompt('yuce')); + next.logSkill='yuce'; + next.set('ai',function(card){ + return 7-get.value(card); + }); + "step 1" + if(result.bool){ + var type=get.type(result.cards[0],'trick'); + if(trigger.source){ + trigger.source.chooseToDiscard('弃置一张'+get.translation(type)+'牌或令'+get.translation(player)+'回复一点体力',function(card){ + return get.type(card,'trick')==_status.event.type; + }).set('ai',function(card){ + if(get.recoverEffect(_status.event.getParent().player,_status.event.player,_status.event.player)<0){ + return 7-get.value(card); + } + return 0; + }).set('type',type); + } + else{ + event.recover=true; + } + } + else{ + event.finish(); + } + "step 2" + if(event.recover){ + player.recover(); + } + else if(result.bool){ + player.draw(); + } + else{ + player.recover(); + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage'&&target.countCards('h'))){ + return 0.8 + } + } + } + } + }, + xiansi:{ + audio:2, + trigger:{player:'phaseBegin'}, + direct:true, + init:function(player){ + player.storage.xiansi=[]; + }, + unique:true, + forceunique:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('xiansi'),[1,2],function(card,player,target){ + return target.countCards('he')>0; + },function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool){ + player.logSkill('xiansi',result.targets); + event.targets=result.targets; + } + else{ + event.finish(); + } + "step 2" + if(event.targets.length){ + var target=event.targets.shift(); + event.current=target; + player.choosePlayerCard(target,true); + } + else{ + event.finish(); + } + "step 3" + if(result.bool){ + player.storage.xiansi=player.storage.xiansi.concat(result.links); + player.markSkill('xiansi'); + player.syncStorage('xiansi'); + event.current.lose(result.links,ui.special); + event.current.$give(result.links,player); + event.goto(2); + } + }, + intro:{ + content:'cards', + onunmark:function(storage,player){ + if(storage&&storage.length){ + for(var i=0;i1&&player.canUse('sha',players[i],true,true); + } + } + return false; + }, + content:function(){ + "step 0" + event.target=game.findPlayer(function(current){ + return current.storage.xiansi; + }); + if(event.target){ + player.chooseCardButton(2,event.target.storage.xiansi).set('ai',function(){ + return 1; + }); + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + for(var i=0;i0){ + player.recover(); + } + else if(result.judge<0){ + player.loseHp(); + } + if(!player.hasSkill('shibei2')){ + player.addTempSkill('shibei2','phaseAfter'); + } + } + }, + shibei2:{}, + jianying:{ + audio:2, + trigger:{player:'useCard'}, + frequent:true, + filter:function(event,player){ + if(!event.cards||event.cards.length!=1) return false; + if(_status.currentPhase!=player) return false; + if(!player.storage.jianying) return false; + return get.suit(player.storage.jianying)==get.suit(event.cards[0])|| + player.storage.jianying.number==event.cards[0].number; + }, + content:function(){ + player.draw(); + }, + intro:{ + content:'card' + }, + group:['jianying2','jianying3'] + }, + jianying3:{ + trigger:{player:'useCard'}, + priority:-1, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + if(!event.cards||event.cards.length!=1) return false; + if(_status.currentPhase!=player) return false; + return true; + }, + content:function(){ + player.storage.jianying=trigger.cards[0]; + } + }, + jianying2:{ + trigger:{player:'phaseAfter'}, + forced:true, + silent:true, + popup:false, + content:function(){ + player.storage.jianying=null; + } + }, + zzhenggong:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return event.source&&event.source.countCards('e')>0; + }, + content:function(){ + "step 0" + var att=get.attitude(player,trigger.source); + player.choosePlayerCard('e',get.prompt('zzhenggong'),trigger.source).ai=function(button){ + if(att<=0){ + return get.equipValue(button.link); + } + return 0; + } + "step 1" + if(result.bool){ + player.logSkill('zzhenggong',trigger.source); + player.equip(result.links[0]); + trigger.source.$give(result.links[0],player); + } + } + }, + zquanji:{ + trigger:{global:'phaseBegin'}, + priority:15, + check:function(event,player){ + var att=get.attitude(player,event.player); + if(att<0){ + var nh1=event.player.countCards('h'); + var nh2=player.countCards('h'); + return nh1<=2&&nh2>nh1+1; + } + if(att>0&&event.player.hasJudge('lebu')&&event.player.countCards('h')>event.player.hp+1) return true; + return false; + }, + logTarget:'player', + filter:function(event,player){ + return event.player!=player&&event.player.countCards('h')>0&&player.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseToCompare(trigger.player); + "step 1" + if(result.bool){ + trigger.player.skip('phaseJudge'); + trigger.untrigger(); + } + }, + ai:{ + expose:0.2 + } + }, + zbaijiang:{ + skillAnimation:true, + trigger:{player:'phaseBegin'}, + forced:true, + unique:true, + derivation:['zyexin','zzili'], + init:function(player){ + player.storage.zbaijiang=false; + }, + // intro:{ + // content:'limited' + // }, + filter:function(event,player){ + return !player.storage.zbaijiang&&player.countCards('e')>=2; + }, + content:function(){ + player.storage.zbaijiang=true; + player.removeSkill('zzhenggong'); + player.removeSkill('zquanji'); + player.removeSkill('zbaijiang'); + player.addSkill('zyexin'); + player.addSkill('zzili'); + player.gainMaxHp(); + } + }, + zyexin:{ + trigger:{player:'damageEnd',source:'damageEnd'}, + frequent:true, + init:function(player){ + player.storage.zyexin=[]; + }, + intro:{ + content:'cards' + }, + content:function(){ + var card=get.cards()[0]; + player.storage.zyexin.push(card); + player.$draw(card); + player.markSkill('zyexin'); + game.addVideo('storage',player,['zyexin',get.cardsInfo(player.storage.zyexin),'cards']); + }, + group:'zyexin2' + }, + zyexin2:{ + enable:'phaseUse', + usable:1, + lose:false, + delay:false, + selectCard:[1,Infinity], + filterCard:true, + filter:function(event,player){ + return player.storage.zyexin.length>0; + }, + prompt:'用任意数量的手牌与等量的“权”交换', + content:function(){ + "step 0" + player.lose(cards,ui.special)._triggered=null; + player.storage.zyexin=player.storage.zyexin.concat(cards); + player.chooseCardButton(player.storage.zyexin,'选择'+cards.length+'张牌作为手牌',cards.length,true).ai=function(button){ + return get.value(button.link); + } + if(player==game.me&&_status.auto){ + game.delay(); + } + "step 1" + player.gain(result.links)._triggered=null; + for(var i=0;i=4&&!player.storage.zzili; + }, + forced:true, + content:function(){ + player.storage.zzili=true; + player.loseMaxHp(); + player.addSkill('zpaiyi'); + player.removeSkill('zzili'); + }, + // intro:{ + // content:'limited' + // } + }, + zpaiyi:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + for(var i=0;i=Math.floor(game.countPlayer()/2); - }, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current.hasSkill('lyuxue2'); - }); - list.sortBySeat(); - event.list=list; - player.line(list,'green'); - 'step 1' - if(event.list.length){ - event.list.shift().removeSkill('lyuxue2'); - event.redo(); +game.import('character',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'yxs', + character:{ + yxs_wuzetian:['female','wu',4,['nvquan','qiandu','weiyi']], + yxs_caocao:['male','wei',4,['zhulu','xieling']], + yxs_mozi:['male','qun',3,['jieyong','feigong','jianai']], + yxs_bole:['male','wu',3,['bolehuiyan','xiangma']], + yxs_aijiyanhou:['female','qun',3,['seyou','sheshi']], + yxs_diaochan:['female','qun',3,['fengyi','wange']], + yxs_yangyuhuan:['female','wu',3,['fengyan','nichang']], + yxs_baosi:['female','wu',3,['jieyin','fenghuo']], + yxs_napolun:['male','wei',4,['tongling','fanpu']], + yxs_kaisa:['male','shu',4,['ducai']], + yxs_zhuyuanzhang:['male','wu',4,['qiangyun']], + yxs_jinke:['male','qun',3,['cike','qiangxi']], + yxs_libai:['male','qun',3,['miaobi','zhexian']], + yxs_luban:['male','wu',3,['guifu','lshengong']], + yxs_lvzhi:['female','shu',4,['zhensha','xumou']], + yxs_goujian:['male','wu',3,['keji','tuqiang']], + yxs_lishimin:['male','qun',4,['kongju']], + yxs_huamulan:['female','shu',3,['xiaoji','yizhuang']], + yxs_luobinhan:['male','wu',4,['xiadao','sheshu','lguiyin']], + yxs_chengjisihan:['male','qun',4,['mashu','qianglue']], + yxs_mingchenghuanghou:['female','shu',3,['tiewan','chajue']], + yxs_wangzhaojun:['female','wei',3,['heqin','wluoyan']], + yxs_luocheng:['male','wu',4,['hanqiang','biaoqi']], + yxs_direnjie:['male','wei',3,['shentan','kanpo']], + yxs_sunwu:['male','wu',3,['bingsheng','taolue']], + yxs_chengyaojin:['male','shu',4,['sanbanfu']], + yxs_yujix:['female','shu',3,['ysheshen','changnian']], + yxs_xiangyu:['male','shu',4,['wushuang','ciqiu']], + yxs_yingzheng:['male','qun',4,['jianxiong','batu']], + yxs_yuefei:['male','qun',4,['longdan','wumu']], + yxs_fuermosi:['male','wei',3,['yanyi','jiean']], + yxs_guiguzi:['male','qun',3,['baihe','yinyang','xiushen']], + yxs_xiaoqiao:['female','wu',3,['chujia','zhijie']], + yxs_luzhishen:['male','wei',4,['dili','kuangchan']], + yxs_zhaoyong:['male','shu',3,['zyhufu','hanbei']], + yxs_yangguang:['male','qun',3,['shiqin','yaoyi']], + yxs_tangbohu:['male','qun',3,['luobi','fengliu']], + yxs_zhangsanfeng:['male','wei',4,['zbudao','taiji']], + yxs_nandinggeer:['female','shu',3,['huli','xianqu','yixin']], + yxs_weizhongxian:['male','qun',3,['zhuxin','wlianhuan']], + yxs_meixi:['female','shu',3,['liebo','yaoji']], + yxs_lanlinwang:['male','shu',4,['guimian','lyuxue']], + }, + characterIntro:{ + yxs_wuzetian:'中国历史上唯一一个正统的女皇帝,也是继位年龄最大的皇帝(67岁即位),又是寿命最长的皇帝之一(终年82岁)。唐高宗时为皇后(655—683)、唐中宗和唐睿宗时为皇太后(683—690),后自立为武周皇帝(690—705),改国号“唐”为“周”,定都洛阳,并号其为“神都”。史称“武周”或“南周”,705年退位。武则天也是一位女诗人和政治家。', + yxs_caocao:' 曹操(155年7月18日-220年3月15日),字孟德,一名吉利,小字阿瞒,汉族,沛国谯(今安徽省亳州市)人。曹操生于宦官之家,适逢乱世,但是胸怀大志,参与剿灭董卓战争,之后在官渡大败袁绍,占据北方,挟天子以令诸侯。最后兵败赤壁,与吴,蜀三分天下。', + yxs_mozi:' 宋国大夫,名翟,鲁人(今山东滕州人)。墨子是我国战国时期著名的思想家、教育家、科学家、军事家、社会活动家,墨家学派的创始人。墨子曾阻止鲁阳文君攻郑,说服公输般而止楚攻宋。楚惠王打算以书社封墨子,越王也打算以吴之地方五百里以封墨子,但墨子都没有接受。其创立墨家学说,并有《墨子》一书传世。', + yxs_bole:'伯乐,名孙阳,字子良,一作王良。春秋齐(今山东省威武)人。善于相马,为赵简子御。相传天上御者名伯乐,因其善相,遂号之,传至今。初,见老骥 拖车,喘息不定,伯乐哀之,马亦哀啼,方知乃良驹。后世长以伯乐比喻慧眼识人者。', + yxs_aijiyanhou:'埃及艳后即克丽奥佩托拉七世,是古埃及托勒密王朝的最后一任法老。她通过政治联姻为古埃及赢取了22年的和平。埃及艳后的一生富有戏剧性,特别是卷入罗马共和末期的政治漩涡,同恺撒、安东尼关系密切,并伴以种种传闻逸事,使她成为文学和艺术作品中的著名人物。', + yxs_diaochan:'中国古代四大美女之一,今山西忻州人,有野史说其姓霍,无名,又有一说称其任姓,小字红昌。貂蝉是东汉末年司徒王允的义女,国色天香,有倾国倾城之貌,相传貂婵在后花园拜月时,忽然轻风吹来,一块浮云将那皎洁的明月遮住。这时正好王允瞧见,便说我的女儿和月亮比美,月亮比不过,赶紧躲在云彩后面。此后,世人常用“闭月”来形容貂婵的美貌。', + yxs_yangyuhuan:'唐朝贵妃,名玉环,字太真,蒲州永乐人(今山西永济)。杨玉环自小习音律,善歌舞,姿色超群。27岁时,得唐玄宗宠幸,召入宫中,封为贵妃。杨贵妃天生丽质,回眸一笑百媚生,六宫粉黛无颜色,堪称大唐第一美女,此后千余年无出其右者。其与西施、昭君、貂蝉并称中国古代四大美女。', + yxs_baosi:'褒姒,周幽王姬宫涅的王后,褒姒原是一名弃婴,被一对做小买卖的夫妻收养,在褒国(今陕西省汉中西北)长大,公元前七七九年(周幽王三年),周幽王征伐有褒国,褒人献出美女褒姒乞降,幽王爱如掌上明珠,立为妃,宠冠周王宫,翌年,褒姒生子伯服(一作伯般),幽王对她更加宠爱,竟废去王后申氏和太子宜臼,册立褒姒为王后,立伯服为太子,周太史伯阳叹气道:“周王室已面临大祸,这是不可避免的了。”', + yxs_napolun:'法兰西第一共和国执政、法兰西第一帝国皇帝,出生在法国科西嘉岛,是一位卓越的军事天才。他多次击败保王党的反扑和反法同盟的入侵,捍卫了法国大革命的成果。他颁布的《民法典》更是成为了后世资本主义国家的立法蓝本。他执政期间多次对外扩张,形成了庞大的帝国体系,创造了一系列军事奇迹。', + yxs_kaisa:'凯撒是罗马共和国末期杰出的军事统帅、政治家。他公元前60年与庞培、克拉苏秘密结成前三巨头同盟,随后出任高卢总督,在大约8年的时间内征服了高卢全境(今法国一带),还袭击了日耳曼和不列颠。前49年,他率军占领罗马,打败庞培,集大权于一身,实行独裁统治并制定了《儒略历》。', + yxs_zhuyuanzhang:' 朱元璋,明王朝的开国皇帝。原名重八,后取名兴宗。汉族,濠州(今安徽凤阳县东)钟离太平乡人。朱元璋自幼贫寒,父母兄长均死于瘟疫,孤苦无依,入皇觉寺为小沙弥,入寺不到二个月,因荒年寺租难收,寺主封仓遣散众僧,只得离乡为游方僧,后参加了起义军,并改名“朱元璋”意为诛(朱)灭元朝的璋(璋,古代的一种玉器)。25岁时参加郭子兴领导的红巾军反抗蒙元暴政,在郭子兴手下,率兵出征,有攻必克;因此郭便把养女马氏嫁与了他。元至正二十八年(1368),在基本击破各路农民起义军和扫平元的残余势力后,于南京称帝,国号大明,年号洪武,建立了全国统一的封建政权。朱元璋统治时期被称为“洪武之治”。葬于明孝陵。', + yxs_jinke:'荆轲,喜好读书击剑,为人慷慨侠义。后游历到燕国,被称为“荆卿”(或荆叔),随之由燕国智勇深沉的“节侠”田光推荐给太子丹,拜为上卿。秦国灭赵后,兵锋直指燕国南界,太子丹震惧,与田光密谋,决定派荆轲入秦行刺秦王。荆轲献计太子丹,拟以秦国叛将樊于期之头及燕督亢(今河北涿县、易县、固安一带,是一块肥沃的土地)地图进献秦王,相机行刺。太子丹不忍杀樊于期,荆轲只好私见樊于期,告以实情,樊于期为成全荆轲而自刎。', + yxs_libai:'字太白,号青莲居士,又号“谪仙人”,祖籍陇西郡成纪县(今甘肃省平凉市静宁县南)。李白是唐朝著名的浪漫主义诗人,有“诗仙”之称。李白生平作诗无数,存世诗文达千余篇之多,《蜀道难》、《行路难》、《梦游天姥吟留别》、《将进酒》等诗篇脍炙人口,妇孺皆知,另有《李太白集》传世。', + yxs_luban:' 鲁班,姓公输,名般。战国时期鲁国公族之后,故又称公输子、班输等。出身于工匠世家,是我国古代最著名的发明家、建筑家。鲁班一生发明无数,而最具贡献意义的则要数木工使用的工具,诸如墨斗、锯、和鲁班尺等。为后世的建筑学提供了最基础的工具。除此之外,相传石磨、云梯等工具也是鲁班发明。', + yxs_lvzhi:' 吕雉,西汉开国皇帝高祖刘邦的原配夫人,中国历史上第一位掌权的女性统治者,是历史上有记载以来的第一位皇后、皇太后。于高祖刘邦死后掌握政权,实行高祖的“黄老政治”,百姓安乐民富国强,为“文景之治”奠定了坚实的基础。', + yxs_goujian:'勾践,又写作句践,在出土文物“越王勾践剑”里写为鸠浅,司马贞《史记索隐》引《纪年》作菼执。是中国春秋时代后期的越国君主。有关他的先世,有说“其先禹之苗裔”,亦有说“先世无所考”,也有说他是“祝融之后”并且是楚国的芈姓,众说纷纭。父亲则是越侯允常。', + yxs_lishimin:' 李世民,唐朝第二位皇帝。他的前半生是立下赫赫武功的军事家。平窦建德、王世充之后,始大量接触文学与书法,有《温泉铭》、《晋祠铭》等墨宝传世。后在玄武门之变杀死自己的兄弟李建成、李元吉两人,成为太子,唐高祖不久被迫让位。世民即位为帝后,积极听取群臣的意见、努力学习文治天下,成功转型为中国史上最出名的政治家与明君之一。唐太宗开创了历史上的“贞观之治”,经过主动消灭群雄割据势力,虚心纳谏、在国内厉行节约、使百姓休养生息,终于使得社会出现了国泰民安的局面。此举为后来的开元盛世奠定了重要的基础,将中国传统农业社会推向一个高峰。', + yxs_huamulan:' 花木兰是中国文学作品中的一位代父从军的巾帼英雄,其真实性不详。花木兰最早出现于南北朝一首叙事诗《木兰辞》中,该诗约作于北魏,最初录于南朝陈的《古今乐录》,僧人智匠在《古今乐录》称:“木兰不知名。”', + yxs_luobinhan:'罗宾汉是英国民间传说中的侠盗式的一个英雄人物,人称汉丁顿伯爵。他武艺出众、机智勇敢、聪明,仇视官吏和教士,是一位劫富济贫、行侠仗义的绿林英雄。传说他住在诺丁汉雪伍德森林。从14世纪中叶起,关于罗宾汉的民谣和传说就开始在民间流传。罗宾汉最突出的就是射箭术高超。现代射箭比赛里就有“罗宾汉”这一术语,指射中另一支已中靶心的箭。', + yxs_chengjisihan:'成吉思汗,名铁木真,孛儿只斤氏,奇渥温姓,乞颜(起延)部人。从小遭受结拜兄弟札木合迫害,形成刚毅坚韧的性格。1206年,被推举为蒙古帝国的大汗,统一蒙古各部,为之后的进攻中原提供了坚实的基础。', + yxs_mingchenghuanghou:'明成皇后,朝鲜近代史上的女政治家,本名闵兹映,通称闵妃,是朝鲜京畿道骊州郡人。她是朝鲜王朝高宗李熙的王妃,骊兴闵氏外戚集团的核心人物,19世纪末朝鲜的实际统治者。由于闵妃早期主张开放、后期力抗日本并身死殉难,故深受后世韩国人民的尊崇。 1897年,高宗李熙改国号称“大韩帝国”,追谥闵妃为“孝慈元圣正化合天明成皇后”,故现今韩国史学家多称她为“明成皇后”。', + yxs_wangzhaojun:'王昭君,名嫱,字昭君,晋朝时为避司马昭讳,又称“明妃”,汉元帝时期宫女,汉族,西汉南郡秭归(今湖北省兴山县)人。匈奴呼韩邪单于阏氏。 “昭君出塞”是汉匈交往上的大事,稳定了汉朝和匈奴的外交关系,《汉书.匈奴传》和《后汉书.南匈奴传》都记载了这件事。相传和亲途中,南飞的大雁听到昭君奏起悲壮的离别之曲,看到骑在马上的这位美丽女子,忘记摆动翅膀,跌落地下,因此得“落雁”之名。昭君出塞的故事也被后世传为佳话。', + yxs_luocheng:'《隋唐》说书和《说唐传》中的虚构人物,隋唐十八杰中列第七,十六杰列第八。在清初禇人获的讲史小说《隋唐演义》中,也虚构了罗成,是燕山罗艺的儿子,秦琼的表弟,精通枪法。', + yxs_direnjie:'唐武周时期杰出的著名政治家,时任豫州刺史、魏州刺史等要职,官至凤阁鸾台平章事、内史,卒后追封梁国公。狄仁杰生于贞观、卒于武周时期,经历了大唐鼎盛和动乱的年代。其一生秉承了以民为本、不畏权贵、为民请命的宗旨。狄仁杰通晓了吏治、兵刑等法律制度,在任大理丞任期内解决了诸多案件,被誉为“神探”。狄仁杰为官清廉,素有政绩,有辅国安邦之能,史称“唐室砥柱”。', + yxs_sunwu:'著名军事家,字长卿,中国春秋时期齐国乐安人。曾率领吴国军队大破数倍于己的楚国军队,占领了楚国都城郢城,几乎亡楚。其著有巨作《孙子兵法》十三篇,为后世兵法家所推崇,被誉为“兵学圣典”,置于《武经七书》之首,被译为英文、法文、德文、日文,成为国际间最著名的兵学典范之书。后人尊称其为孙子、孙武子、兵圣、百世兵家之师、东方兵学的鼻祖。', + yxs_chengyaojin:'程咬金,原名咬金,后更名知节,字义贞,中国济州东阿斑鸠店人(现山东省东平县斑鸠店)。“凌烟阁二十四功臣”之一,唐朝开国名将。隋朝末年,隋炀帝杨广统治残暴,骄奢荒淫,民不聊生,最终爆发了大规模的农民起义。程咬金先入瓦岗军,投王世充,后降唐,成为秦王李世民的骨干成员。据史书记载,程咬金“少骁勇,善用马槊。”而在以《说唐》为代表的系列话本及历史演义小说中,程咬金则使得一柄八卦宣花斧,以“三板斧”武艺著称,是一名性格直爽、粗中有细的福将。', + yxs_yujix:'虞姬,又称虞美人,西楚霸王项羽爱姬,相传为江苏沭阳县颜集乡人,一说苏州常熟人。公元前209年,项羽与叔父项梁起义反秦。项羽军中战将虞子期的妹妹虞姬,貌美好武,倾慕年轻勇猛的项羽,嫁其为妾,常伴左右随军出征,至终形影不离。 公元前202年,项羽在垓下之战中被刘邦、韩信、彭越三方大军合围困于垓下(今安徽灵璧县城南沱河北岸城后村),身陷十面埋伏,兵孤粮缺,夜闻四面楚歌,楚军士气尽失。项羽认为大势已去,帐中酌酒,对着虞姬唱起悲壮的“垓下歌”。虞姬拔剑起舞,含泪唱和:“汉兵已略地,四面楚歌声。大王义气尽,贱妾何聊生。”为免后顾之忧影响项羽突围,唱毕于其面前自刎。', + yxs_xiangyu:'项籍(前232—前202)字羽,通常被称作项羽,中国古代著名将领及政治人物,汉族,秦下相(今江苏省宿迁市宿城区)人。秦末时被楚怀王熊心封为鲁公,在前207年的决定性战役巨鹿之战中统率楚军大破秦军。秦亡后自封“西楚霸王”,统治黄河及长江下游的梁楚九郡。后在楚汉战争中为汉高祖刘邦所败,在乌江(今安徽和县)自刎而死。', + yxs_yingzheng:'秦始皇,赢姓,赵氏,名政,秦庄襄王之子。秦始皇22岁时,在雍城举行国君成人加冕仪式,开始“亲理朝政”。后除掉吕不韦,嫪毐等人,重用李斯,尉缭。自公元前230年至前221年,采取由近及远,集中力量,各个击破的策略,先后灭六国,完成统一中国的大业。同时建立起历史上第一个书同文,度同制,车同轨,行同伦的中央集权国家——秦朝。', + yxs_yuefei:' 岳飞(1103年-1142年),字鹏举,相州汤阴(今属河南)人。南宋军事家,中国历史上著名的抗金名将。绍兴十一年(1142)十二月二十九日,秦桧以“莫须有”的罪名将岳飞毒死于临安风波亭。1162年,宋孝宗时诏复官,谥武穆,宁宗时追封为鄂王,改谥忠武,有《岳武穆集》传世。', + yxs_fuermosi:'福尔摩斯,是一个虚构的侦探人物,是由19世纪末20世纪初的英国侦探小说家阿瑟?柯南·道尔所塑造的一个才华横溢的侦探形象。福尔摩斯不但头脑冷静、观察力敏锐、推理能力极强;而且,他的剑术、拳术和小提琴演奏水平也相当高超,已经成为侦探小说中的典型代表人物之一。', + yxs_guiguzi:'本名王诩,春秋时纵横家,卫国(今河南鹤壁一带)人。曾隐于清溪鬼谷,常入云梦采药修道,弟子无数。有张仪、苏秦、孙膑、庞涓四弟子。精于兵法、奇门遁甲、五行八卦之学。后人称之为王禅老祖。今传《鬼谷子》十四篇。', + yxs_xiaoqiao:'小乔, 庐江皖县(今安徽潜山)人。 史书中称小桥,是中国汉末三国时期的女性, 乔公的次女,东吴名将周瑜的妻子。传说与其姐大乔均为绝世美女。合称“二乔”。', + yxs_luzhishen:'鲁智深,梁山泊第十三位好汉,十员步军头领第一名。鲁智深原名鲁达,绰号花和尚。是经略的提辖,因为见郑屠欺侮金翠莲父女,三拳打死了镇关西。被官府追捕,逃到五台山削发为僧,改名鲁智深。', + yxs_zhaoyong:'赵武灵王,战国中后期赵国君主,嬴姓,赵氏,名雍。赵武灵王在位时,推行的“胡服骑射”政策,赵国因而得以强盛,灭中山国,败林胡、楼烦二族,辟云中、雁门、代三郡,并修筑了“赵长城”。', + yxs_yangguang:'隋炀帝杨广,是隋朝第二代皇帝,华阴(今陕西华阴)人,生于隋京师长安。杨广在位期间修建大运河,营建东都迁都洛阳城,开创科举制度,亲征吐谷浑,三征高句丽。但因为杨广滥用民力,导致了隋朝的灭亡,618年在江都被部下缢杀。', + yxs_tangbohu:'唐伯虎,名寅,字伯虎,自号六如居士,明代诗人、画家,吴县(今江苏苏州)人。出身富商家庭,后家道衰落,因祝枝山之劝而潜心读书。公试时为状元,会试时候因科场舞弊案牵连而被斥为吏。后绝意仕途,以卖画为生。唐伯虎为人玩世不恭而又才气横溢,诗文擅名,与祝枝山、文征明、徐祯卿并称“江南四大才子”,画名更著,与沈周、文征明、仇英并称“吴门四家”。民间盛传其点秋香的故事。', + yxs_zhangsanfeng:'明朝最著名的武术家、道士。原名张通,字君宝,在武当山开山立派,成为武当派开山祖师。明英宗赐号“通微显化真人”;明宪宗特封号为“韬光尚志真仙”;明世宗赠封他为“清虚元妙真君”。传说其丰姿魁伟,大耳圆目,须髯如戟。无论寒暑,只一衲一蓑,一餐能食升斗,或数日一食,或数月不食,事能前知。其在武术上的造诣和超乎寻常的长寿都为后人称道。 曾传洪武年间,两度受朱元璋诏请入京,皆避而不见。其与明初巨贾沈万三亦有交际。其所创太极拳一直延续至今,成为后人养身妙术。', + yxs_nandinggeer:'出生于意大利,英国护士和统计学家。她谙熟数学,精通英、法、德、意四门语言,除古典文学外,还精于自然科学、历史和哲学,擅长音乐与绘画。在德国学习护理后,曾往伦敦的医院工作。南丁格尔于1854年和38位护士到克里米亚野战医院工作,成为该院的护士长,被称为“克里米亚的天使”又称“提灯女神”。1860年6月15日,南丁格尔在伦敦成立世界第一所护士学校。为了纪念她的成就,1912年,国际护士会倡仪各国医院和护士学校定每年5月12日南丁格尔诞辰日举行纪念活动,并将5月12日定为“国际护士节”,以缅怀和纪念这位伟大的女性。', + yxs_weizhongxian:'魏忠贤(1568年-1627年12月11日),字完吾,北直隶肃宁(今河北沧州肃宁县)人,汉族,原名李进忠。由才人王氏复姓,出任秉笔太监后,改名魏忠贤。明朝末期宦官。明熹宗时期,出任司礼秉笔太监,极受宠信,被称为“九千九百岁”,排除异己,专断国政,以致人们“只知有忠贤,而不知有皇上”。朱由检继位后,打击惩治阉党,治魏忠贤十大罪,命逮捕法办,自缢而亡,其余党亦被肃清。', + yxs_meixi:'妺(mò)喜,姓嬉(喜),生卒年不详,亦作妺嬉、末喜、末嬉,有施氏之女,夏朝最后一位君主夏桀的王后。根据先秦时代记述女子名时所用的全称和简称方式,妺喜应姓喜,即嬉(也作僖)。由于其名字的“妺”字与“妹妹”的“妹”字字形相似,且在《庄子》等作中也有以妺为妹的用法,因此常误作"妹喜"。', + yxs_lanlinwang:'高长恭(541年―573年),又名高孝瓘、高肃,祖籍渤海调蓨(今河北省景县),神武帝高欢之孙,文襄帝高澄第四子,生母不详,南北朝时期北齐宗室、将领,封爵兰陵郡王。高长恭貌柔心壮,音容兼美。为将躬勤细事,每得甘美,虽一瓜数果,必与将士分享。累次升任至并州刺史。突厥攻入晋阳,高长恭奋力将其击退。邙山之战,高长恭为中军,率领五百骑兵再入周军包围圈,直至金墉城下,因高长恭戴着头盔,城中的人不确定是敌军或是我军,直到高长恭把头盔脱下来城上的人才知道是高长恭,派弓箭手开始放箭保护他,之后高长恭成功替金墉解围,高长恭在此次战中威名大振,士兵们为此战而讴歌他,即后来知名的《兰陵王入阵曲》。', + }, + skill:{ + guimian:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&_status.currentPhase==player; + }, + content:function(){ + player.getStat().card.sha--; + } + }, + lyuxue:{ + trigger:{source:'damageEnd'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + return event.player.isIn()&&!event.player.hasSkill('lyuxue2'); + }, + content:function(){ + trigger.player.addSkill('lyuxue2'); + }, + subSkill:{ + clear:{ + trigger:{player:['phaseBegin','dieBegin']}, + forced:true, + filter:function(event,player){ + var num=game.countPlayer(function(current){ + return current.hasSkill('lyuxue2'); + }); + if(!num) return false; + if(event.name=='die') return true; + return num>=Math.floor(game.countPlayer()/2); + }, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current.hasSkill('lyuxue2'); + }); + list.sortBySeat(); + event.list=list; + player.line(list,'green'); + 'step 1' + if(event.list.length){ + event.list.shift().removeSkill('lyuxue2'); + event.redo(); + } } } + }, + group:'lyuxue_clear', + }, + lyuxue2:{ + mark:true, + intro:{ + content:'已获得浴血标记' + }, + onremove:function(player){ + player.loseHp(); } }, - group:'lyuxue_clear', - }, - lyuxue2:{ - mark:true, - intro:{ - content:'已获得浴血标记' - }, - onremove:function(player){ - player.loseHp(); - } - }, - yaoji:{ - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.source&&event.source.isIn()&&event.source!=player&&!event.source.hasJudge('lebu'); - }, - check:function(event,player){ - return get.attitude(player,event.source)<=0; - }, - logTarget:'source', - content:function(){ - var card=game.createCard('lebu'); - trigger.source.addJudge(card); - trigger.source.$draw(card); - game.delay(); - } - }, - liebo:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return Math.abs(target.countCards('h')-player.countCards('h'))<=1; - }, - content:function(){ - player.swapHandcards(target); - }, - ai:{ - order:function(){ - var player=_status.event.player; - if(player.hasCard(function(card){ - return get.value(card)>=8; - })){ - return 0; - } - var nh=player.countCards('h'); - if(game.hasPlayer(function(current){ - return get.attitude(player,current)<=0&¤t.countCards('h')==nh+1; - })){ - return 9; - } - return 1; + yaoji:{ + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.source&&event.source.isIn()&&event.source!=player&&!event.source.hasJudge('lebu'); }, - result:{ - player:function(player,target){ - var att=get.attitude(player,target); - if(att>0) return 0; + check:function(event,player){ + return get.attitude(player,event.source)<=0; + }, + logTarget:'source', + content:function(){ + var card=game.createCard('lebu'); + trigger.source.addJudge(card); + trigger.source.$draw(card); + game.delay(); + } + }, + liebo:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return Math.abs(target.countCards('h')-player.countCards('h'))<=1; + }, + content:function(){ + player.swapHandcards(target); + }, + ai:{ + order:function(){ + var player=_status.event.player; if(player.hasCard(function(card){ return get.value(card)>=8; })){ return 0; } - var n1=target.countCards('h'),n2=player.countCards('h'); - var num=0; - if(n1-n2==1){ - num=1; - } - if(player.countCards('h','du')){ - if(n1==n2) num=0.5; - else num=0.1; - } - if(att==0){ - num/=2; - } - return num; - } - } - } - }, - zhuxin:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h'); - }, - filter:function(event,player){ - return player.countCards('h'); - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool){ - target.damage(); - } - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target); - } - } - } - }, - wlianhuan:{ - trigger:{source:'damageBegin'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.countCards('e'); - }, - direct:true, - content:function(){ - 'step 0' - var next=player.chooseToDiscard('e',get.prompt('wlianhuan',trigger.player),'弃置一张装备区内的牌使伤害+1'); - next.ai=function(card){ - if(get.attitude(player,trigger.player)<0){ - return 7-get.value(card); - } - return 0; - } - next.logSkill=['wlianhuan',trigger.player]; - 'step 1' - if(result.bool){ - trigger.num++; - } - } - }, - huli:{ - enable:'phaseUse', - filterCard:{suit:'heart'}, - filterTarget:function(card,player,target){ - return get.distance(player,target)<=1&&lib.filter.cardEnabled({name:'tao'},target,target); - }, - check:function(card){ - return 8-get.value(card); - }, - discard:false, - filter:function(event,player){ - if(player.countCards('h',{suit:'heart'})){ - return true; - } - return false; - }, - prepare:'throw', - content:function(){ - player.useCard({name:'tao'},cards,targets[0]).animate=false; - }, - ai:{ - order:9.5, - result:{ - target:function(player,target){ - return get.recoverEffect(target,player,target); - } - }, - threaten:1.6 - } - }, - yixin:{ - skillAnimation:true, - unique:true, - mark:true, - init:function(player){ - player.storage.yixin=false; - }, - enable:'phaseUse', - filter:function(event,player){ - return !player.storage.yixin&&player.countCards('he')>2; - }, - intro:{ - content:'limited' - }, - filterTarget:function(card,player,target){ - return target.isDamaged(); - }, - filterCard:true, - position:'he', - selectCard:2, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - player.awakenSkill('yixin'); - player.storage.yixin=true; - var num=Math.min(4,target.maxHp-target.hp); - target.recover(num); - if(num<4){ - target.draw(4-num); - } - }, - ai:{ - order:9.6, - result:{ - target:function(player,target){ - if(target.hp==1&&target.maxHp>=3){ - return get.recoverEffect(target,player,player); - } - return 0; - } - } - } - }, - xianqu:{ - mod:{ - targetEnabled:function(card){ - if(card.name=='sha'&&card.number<8) return false; - } - }, - }, - zbudao:{ - trigger:{player:'phaseDrawBegin'}, - check:function(event,player){ - if(player.hasFriend()) return true; - return false; - }, - content:function(){ - trigger.num++; - player.addTempSkill('zbudao2','phaseDrawAfter'); - }, - ai:{ - threaten:1.3 - }, - }, - zbudao2:{ - trigger:{player:'phaseDrawEnd'}, - forced:true, - popup:false, - filter:function(event){ - return event.cards&&event.cards.length; - }, - content:function(){ - 'step 0' - event.cards=trigger.cards.slice(0); - player.chooseCardTarget({ - filterCard:function(card){ - return _status.event.getParent().cards.contains(card); - }, - selectCard:1, - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - return 1-att; - } - return att-4; - }, - forced:true, - prompt:'请选择要送人的卡牌' - }); - "step 1" - if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(result.cards,player); - player.$give(result.cards.length,result.targets[0]); - game.delay(0.7); - } - } - }, - taiji:{ - trigger:{player:'respond'}, - filter:function(event,player){ - return event.card.name=='shan'&&player.hasSha(); - }, - direct:true, - content:function(){ - player.chooseToUse({name:'sha'},'太极:是否使用一张杀?').logSkill='taiji'; - }, - }, - fengliu:{ - trigger:{player:'phaseDrawBegin'}, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.sex=='female'; - }); - }, - forced:true, - content:function(){ - var num=game.countPlayer(function(current){ - return current.sex=='female'; - }); - if(num>2) num=2; - trigger.num+=num; - }, - ai:{ - threaten:function(){ - var num=game.countPlayer(function(current){ - return current.sex=='female'; - }); - switch(num){ - case 0:return 1; - case 1:return 1.3; - default:return 2; - } - } - }, - }, - luobi:{ - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - return player.isDamaged(); - }, - content:function(){ - "step 0" - player.draw(player.maxHp-player.hp); - "step 1" - event.cards=result; - "step 2" - player.chooseCardTarget({ - filterCard:function(card){ - return _status.event.getParent().cards.contains(card); - }, - selectCard:[1,event.cards.length], - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - return 1-att; - } - return att-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 3" - if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(result.cards,player); - player.$give(result.cards.length,result.targets[0]); - for(var i=0;i0){ - return game.hasPlayer(function(current){ - return current.group!='qun'&¤t!=player; - }); - } - return false; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('yaoyi'),[1,2],function(card,player,target){ - return target.countCards('h')&&target.group!='qun'&&target!=player; - }).set('ai',function(target){ - return 0.5-get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - player.logSkill('yaoyi',result.targets); - event.targets=result.targets; - } - else{ - event.finish(); - } - 'step 2' - if(event.targets&&event.targets.length){ - event.target=event.targets.shift(); - event.target.chooseCard('交给'+get.translation(player)+'一张手牌',true).ai=function(card){ - return -get.value(card); - } - } - else{ - event.finish(); - } - 'step 3' - if(result.bool&&result.cards&&result.cards.length){ - event.target.$give(1,player); - player.gain(result.cards,event.target); - } - event.goto(2); - }, - ai:{ - maixie:true, - maixie_hp:true, - expose:0.2, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(!target.hasFriend()) return; - var players=game.filterPlayer(); - for(var i=0;i=4) return [1,get.tag(card,'damage')*2]; - if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; - } - } - } - } - } - } - }, - shiqin:{ - trigger:{global:'dying'}, - priority:11, - filter:function(event,player){ - return event.player!=player&&event.player.hp<=0&&event.player.group=='qun'; - }, - check:function(event,player){ - return get.attitude(player,event.player)<0; - }, - forced:true, - logTarget:'player', - content:function(){ - 'step 0' - game.delay(0.5); - trigger.player.die(); - 'step 1' - if(!trigger.player.isAlive()){ - trigger.untrigger(true); - trigger.finish(); - } - } - }, - zyhufu:{ - trigger:{player:'phaseDrawBegin'}, - filter:function(event,player){ - return !player.getEquip(2); - }, - forced:true, - content:function(){ - trigger.num++; - }, - ai:{ - threaten:1.3 - }, - mod:{ - maxHandcard:function(player,num){ - if(player.getEquip(2)) return num+5; - } - } - }, - hanbei:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - if(player.getEquip(3)||player.getEquip(4)) return true; - return false; - }, - content:function(){ - trigger.directHit=true; - } - }, - sheshu:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event,player){ - return event.target.hp>=3; - }, - content:function(){ - trigger.directHit=true; - }, - mod:{ - targetInRange:function(card){ - if(card.name=='sha') return true; - }, - }, - }, - lguiyin:{ - unique:true, - forceunique:true, - enable:'phaseUse', - filter:function(event,player){ - return !player.hasSkill('tongyu_guiyin')&&!player.getStat('damage'); - }, - derivation:['lzhangyi','jimin','tongyu'], - content:function(){ - player.draw(); - player.setAvatar('yxs_luobinhan','yxs_handingdun'); - player.removeSkill('lguiyin'); - player.removeSkill('sheshu'); - player.removeSkill('xiadao'); - player.addSkill('jimin'); - player.addSkill('lzhangyi'); - player.addSkill('tongyu'); - player.addTempSkill('tongyu_guiyin','phaseAfter'); - }, - ai:{ - order:function(){ - if(_status.event.player.hp==1) return 9; - return 0.5; - }, - result:{ - player:function(player){ - if(player.hp0&&!player.hasSkill('tongyu_guiyin'); - }, - filterCard:true, - position:'he', - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - player.setAvatar('yxs_luobinhan','yxs_luobinhan'); - player.addSkill('lguiyin'); - player.addSkill('sheshu'); - player.addSkill('xiadao'); - player.removeSkill('jimin'); - player.removeSkill('lzhangyi'); - player.removeSkill('tongyu'); - player.addTempSkill('tongyu_guiyin','phaseAfter'); - }, - ai:{ - order:9, - result:{ - player:function(player){ - if(player.hasFriend()) return 1; - return 0; - } - } - } - }, - tongyu_guiyin:{}, - zhijie:{ - enable:'phaseUse', - usable:1, - viewAsFilter:function(player){ - return player.countCards('h',{suit:'heart'})>0; - }, - viewAs:{name:'wuzhong'}, - filterCard:{suit:'heart'}, - check:function(card){ - return 8-get.value(card); - } - }, - dili:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - alter:true, - filter:function(event,player){ - return player.hp=player.maxHp-1) return [0,0]; - } - } - } - }, - kuangchan:{ - init:function(player){ - if(lib.config.mode=='identity'&&player.isZhu){ - player.maxHp--; - player.update(); - } - } - }, - chujia:{ - enable:'phaseUse', - filterCard:function(card){ - if(ui.selected.cards.length){ - return get.color(card)==get.color(ui.selected.cards[0]); - } - return true; - }, - complexCard:true, - usable:1, - selectCard:2, - check:function(card){ - return 6-get.value(card); - }, - filterTarget:function(card,player,target){ - return target.hptarget.hp){ - target.draw(target.maxHp-target.hp); - } - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - var num=target.maxHp-target.hp; - if(num>2) return num; - return 0; - } - } - } - }, - baihe:{ - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - filterTarget:true, - content:function(){ - 'step 0' - if(target.isLinked()){ - target.link(); - } - else{ - target.link(); - target.draw(); - event.finish(); - } - 'step 1' - if(target.countCards('h')){ - target.chooseToDiscard('h',true); - } - }, - check:function(card){ - return 8-get.value(card); - }, - ai:{ - order:1, - result:{ - player:function(player,target){ - if(!player.hasSkill('xiushen')) return 0; - if(target.isLinked()) return 0; + var nh=player.countCards('h'); if(game.hasPlayer(function(current){ - return current.isLinked(); + return get.attitude(player,current)<=0&¤t.countCards('h')==nh+1; })){ - return 0; + return 9; } return 1; - } - } - } - }, - yinyang:{ - enable:'phaseUse', - usable:1, - filterCard:true, - selectCard:2, - filterTarget:true, - selectTarget:3, - content:function(){ - target.link(); - }, - check:function(card){ - return 6-get.value(card); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(target.isLinked()) return 1; - return -1; - } - } - } - }, - xiushen:{ - trigger:{player:['phaseEnd','phaseUseEnd']}, - forced:true, - alter:true, - filter:function(event,player){ - if(get.is.altered('xiushen')){ - if(event.name!='phaseUse') return false; - } - else{ - if(event.name!='phase') return false; - } - return game.hasPlayer(function(current){ - return current.isLinked(); - }); - }, - content:function(){ - player.draw(2); - }, - ai:{ - threaten:1.6 - } - }, - jiean:{ - trigger:{source:'damageEnd'}, - frequent:true, - filter:function(event){ - return event.player.isAlive()&&event.parent.name=='yanyi'&&event.player.hp0) return -1; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - return get.attitude(_status.event.player,target)-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 3" - if(result.bool){ - result.targets[0].gain(result.cards,player); - player.$give(result.cards.length,result.targets[0]); - for(var i=0;i=4) return [1,get.tag(card,'damage')*2]; - if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; - if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; - } - } - } - } - }, - yanyi:{ - enable:'phaseUse', - usable:1, - filterCard:{color:'black'}, - position:'he', - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - "step 0" - player.chooseControl('heart2','diamond2','club2','spade2').ai=function(event){ - switch(Math.floor(Math.random()*5)){ - case 0:return 'heart2'; - case 1:case 4:return 'diamond2'; - case 2:return 'club2'; - case 3:return 'spade2'; - } - }; - "step 1" - game.log(player,'选择了'+get.translation(result.control)); - event.choice=result.control.slice(0,result.control.length-1); - target.popup(result.control); - target.showHandcards(); - "step 2" - if(target.countCards('h',{suit:event.choice})){ - target.damage(); - } - }, - ai:{ - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target); - } - } - } - }, - wumu:{ - mod:{ - targetInRange:function(card,player){ - if(card.name=='sha'&&get.color(card)=='black') return true; - }, - cardUsable:function(card){ - if(card.name=='sha'&&get.color(card)=='red') return Infinity; - } - }, - trigger:{player:'useCard'}, - filter:function(event,player){ - return event.card.name=='sha'&&get.color(event.card)=='red'; - }, - forced:true, - content:function(){ - if(player.stat[player.stat.length-1].card.sha>0){ - player.stat[player.stat.length-1].card.sha--; - } - }, - }, - ysheshen:{ - inherit:'yiji' - }, - sanbanfu:{ - trigger:{player:'shaBegin'}, - filter:function(event,player){ - if(player.storage.sanbanfu||player.storage.sanbanfu2) return false; - return !event.directHit; - }, - check:function(event,player){ - if(get.attitude(player,event.target)>=0) return false; - if(event.target.getEquip('bagua')) return false; - if(event.target.hasSkillTag('respondShan')&&event.target.countCards('h')>=3) return false; - return true; - }, - logTarget:'target', - content:function(){ - "step 0" - var next=trigger.target.chooseToRespond({name:'shan'}); - next.autochoose=lib.filter.autoRespondShan; - next.ai=function(card){ - return get.unuseful2(card); - }; - player.storage.sanbanfu=false; - player.storage.sanbanfu2=false; - "step 1" - if(result.bool==false){ - trigger.untrigger(); - trigger.directHit=true; - player.storage.sanbanfu2=true; - } - else{ - player.storage.sanbanfu=true; - } - }, - group:['sanbanfu2','sanbanfu3'] - }, - sanbanfu2:{ - trigger:{player:'shaAfter'}, - forced:true, - popup:false, - silent:true, - content:function(){ - if(player.storage.sanbanfu) player.damage(trigger.target); - delete player.storage.sanbanfu; - delete player.storage.sanbanfu2; - } - }, - sanbanfu3:{ - trigger:{source:'damageBegin'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&player.storage.sanbanfu2; - }, - content:function(){ - trigger.num++; - } - }, - bingsheng:{ - enable:'phaseUse', - usable:1, - filterCard:function(card){ - if(ui.selected.cards.length){ - return get.suit(card)!=get.suit(ui.selected.cards[0]); - } - return true; - }, - complexCard:true, - selectCard:2, - check:function(card){ - return 8-get.value(card); - }, - filterTarget:function(card,player,target){ - if(target.hp==Infinity) return false; - if(target.hp>player.hp) return true; - if(target.hp0){ - target.damage(num); - } - else if(num<0&&target.hptarget.maxHp){ - num=player.hp-target.maxHp; - } - else{ - num=player.hp-target.hp; - } - if(target.hp==1&&num){ - return num+1; - } - return num; - } - } - } - }, - taolue:{ - mod:{ - maxHandcard:function(player,num){ - return num+1; - } - }, - }, - shentan:{ - enable:'phaseUse', - usable:1, - filterCard:true, - filterTarget:function(card,player,target){ - return target.countCards('h')>0&&get.distance(player,target)<=2; - }, - check:function(card){ - return 7-get.value(card); - }, - position:'he', - content:function(){ - "step 0" - var hs=target.getCards('h'); - if(hs.length){ - event.card=hs.randomGet(); - player.gain(event.card,target); - target.$giveAuto(event.card,player); - } - else{ - event.finish(); - } - "step 1" - var source=target; - player.chooseTarget('选择一个目标送出'+get.translation(event.card),function(card,player,target){ - return target!=player; - }).ai=function(target){ - var att=get.attitude(player,target); - if(att>3&&player.countCards('h')>target.countCards('h')){ - return att; - } - return 0; - } - "step 2" - if(result.bool){ - result.targets[0].gain(card,player); - player.$give(1,result.targets[0]); - player.line(result.targets,'green'); - game.delay(); - } - }, - ai:{ - order:9, - result:{ - target:-1, - player:function(player,target){ - if(get.attitude(player,target)>0){ - return 0; - } - return 1; - } - }, - }, - }, - hanqiang:{ - mod:{ - attackFrom:function(from,to,distance){ - if(!from.getEquip(1)) return distance-1 - } - } - }, - biaoqi:{ - trigger:{player:'shaBegin'}, - forced:true, - content:function(){ - var range=player.getAttackRange(); - if(range>trigger.target.hp){ - trigger.directHit=true; - } - else if(range0; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - content:function(){ - 'step 0' - player.judge(function(card){ - return get.color(card)=='black'?1:-1; - }); - 'step 1' - if(result.bool){ - player.gainPlayerCard('he',trigger.target); - } - } - }, - jimin:{ - enable:['chooseToRespond'], - filterCard:true, - viewAs:{name:'shan'}, - viewAsFilter:function(player){ - if(!player.countCards('h')) return false; - if(player.countCards('e')) return false; - }, - prompt:'将一张手牌当闪打出', - check:function(){return 1}, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - if(!player.countCards('h')) return false; - if(player.countCards('e')) return false; - }, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0&&!target.countCards('e')) return 0.6 - } - } - } - }, - xiadao:{ - trigger:{source:'damageEnd'}, - direct:true, - filter:function(event,player){ - if(event.player.isDead()) return false; - var nh=event.player.countCards('h'); - if(nh==0) return false; - var players=game.filterPlayer(); - for(var i=0;i0) return 0; - return get.attitude(player,target); - } - 'step 1' - if(result.bool){ - player.logSkill('xiadao'); - player.line2([trigger.player,result.targets[0]],'green'); - event.target=result.targets[0]; - game.delay(); - } - else{ - event.finish(); - } - 'step 0' - if(event.target){ - var card=trigger.player.getCards('h').randomGet(); - event.target.gain(card,trigger.player); - trigger.player.$giveAuto(card,event.target); - } - }, - ai:{ - expose:0.2, - threaten:1.4 - } - }, - lzhangyi:{ - trigger:{player:'discardAfter'}, - filter:function(event,player){ - for(var i=0;i0) return 0; + if(player.hasCard(function(card){ + return get.value(card)>=8; + })){ + return 0; } - return false; - }, - ai1:function(card){ - if(player.additionalSkills.yizhuang&&player.additionalSkills.yizhuang.length>0) return 0; - return 7-get.value(card); - }, - ai2:function(target){ - if(target.isMin()) return 0; - return 6-target.maxHp; - } - }); - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - player.unmark(player.storage.yizhuang+'_charactermark'); - player.discard(result.cards); - player.logSkill('yizhuang',result.targets); - var name=result.targets[0].name; - if(name.indexOf('unknown')==0){ - name=result.targets[0].name2; - } - var list=[]; - var skills=lib.character[name][3]; - for(var j=0;j0; - }, - content:function(){ - player.unmark(player.storage.yizhuang+'_charactermark'); - player.removeAdditionalSkill('yizhuang'); - delete player.storage.yizhuang; - player.checkMarks(); - } - }, - kongju:{ - mod:{ - maxHandcard:function(player,num){ - if(player.hptarget.maxHp){ - if(card.name=='lebu') return false; - } - } - }, - }, - tuqiang:{ - trigger:{player:'respond'}, - filter:function(event,player){ - return event.card&&event.card.name=='shan'; - }, - frequent:true, - content:function(){ - player.draw(); - }, - ai:{ - mingzhi:false, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'respondShan')){ - return 0.8; - } - } - }, - } - }, - xumou:{ - inherit:'jushou' - }, - zhensha:{ - trigger:{global:'dying'}, - priority:11, - filter:function(event,player){ - return event.player.hp<=0&&(player.countCards('h','jiu')>0||player.countCards('h',{color:'black'})>=2)&&player!=event.player; - }, - direct:true, - content:function(){ - 'step 0' - var goon=(get.attitude(player,trigger.player)<0); - var next=player.chooseToDiscard('鸠杀:是否弃置一张酒或两张黑色手牌令'+get.translation(trigger.player)+'立即死亡?'); - next.ai=function(card){ - if(ui.selected.cards.length){ - if(ui.selected.cards[0].name=='jiu') return 0; - } - if(goon){ - if(card.name=='jiu') return 2; - return 1; - } - return 0; - }; - next.filterCard=function(card){ - if(ui.selected.cards.length){ - return get.color(card)=='black'; - } - return get.color(card)=='black'||card.name=='jiu'; - }; - next.complexCard=true, - next.logSkill=['zhensha',trigger.player]; - next.selectCard=function(){ - if(ui.selected.cards.length){ - if(get.color(ui.selected.cards[0])!='black') return [1,1]; - } - return [1,2]; - } - 'step 1' - if(result.bool){ - trigger.player.die(); - } - else{ - event.finish(); - } - 'step 2' - if(!trigger.player.isAlive()){ - trigger.untrigger(true); - trigger.finish(); - } - }, - ai:{ - threaten:1.5 - } - }, - ducai:{ - enable:'phaseUse', - usable:1, - unique:true, - forceunique:true, - check:function(card){ - if(_status.event.player.countCards('h')>=3){ - return 5-get.value(card); - } - return 0; - }, - position:'he', - filterCard:true, - content:function(){ - player.storage.ducai2=cards[0]; - player.addTempSkill('ducai2',{player:'phaseBegin'}); - }, - ai:{ - order:8, - result:{ - player:1 - } - }, - global:'ducai3' - }, - ducai2:{ - mark:'card', - intro:{ - content:'card' - } - }, - ducai3:{ - mod:{ - cardEnabled:function(card,player){ - if(player.hasSkill('ducai2')) return; - var suit,players=game.filterPlayer(); - for(var i=0;i=3; - }, - promptfunc:function(){ - return '令自己在本轮内不能成为出杀的目标(选择自己),或对攻击范围内的一名其他角色造成一点伤害' - }, - filterTarget:function(card,player,target){ - return player==target||get.distance(player,target,'attack')<=1; - }, - content:function(){ - if(target==player){ - target.addTempSkill('fanpu_disable',{player:'phaseBegin'}); - } - else{ - target.damage(); - } - player.storage.tongling-=3; - player.unmarkSkill('tongling'); - player.syncStorage('tongling'); - }, - subSkill:{ - disable:{ - mark:true, - intro:{ - content:'不能成为杀的目标' - }, - mod:{ - targetEnabled:function(card,player,target,now){ - if(card.name=='sha') return false; - } - } - } - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(player==target){ - if(player.hp<=2&&!player.countCards('h','shan')){ - return 2; + var n1=target.countCards('h'),n2=player.countCards('h'); + var num=0; + if(n1-n2==1){ + num=1; } - return 0; + if(player.countCards('h','du')){ + if(n1==n2) num=0.5; + else num=0.1; + } + if(att==0){ + num/=2; + } + return num; } - else{ + } + } + }, + zhuxin:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h'); + }, + filter:function(event,player){ + return player.countCards('h'); + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool){ + target.damage(); + } + }, + ai:{ + order:8, + result:{ + target:function(player,target){ return get.damageEffect(target,player,target); } } } - } - }, - fenghuo:{ - enable:'chooseToUse', - filter:function(event,player){ - return player.countCards('e')>0; }, - filterCard:true, - position:'e', - viewAs:{name:'nanman'}, - prompt:'将一张装备区内的牌当南蛮入侵使用', - check:function(card){ - var player=_status.currentPhase; - if(player.countCards('he',{subtype:get.subtype(card)})>1){ - return 11-get.equipValue(card); - } - if(player.countCards('h')=2; - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - player.addSkill('nichang2'); - } - }, - nichang2:{ - trigger:{player:'phaseEnd'}, - forced:true, - content:function(){ - "step 0" - if(player.countCards('h')){ - player.showHandcards(); - } - player.removeSkill('nichang2'); - "step 1" - var suits=['spade','heart','diamond','club']; - var cards=player.getCards('h'); - for(var i=0;i1){ - if(game.phaseNumber=3){ - break; - } - } - event.cards=cards; - event.suit=suit; - player.showCards(cards); - } - else{ - event.finish(); - } - "step 2" - if(event.cards&&event.cards.length){ - if(get.suit(event.cards[event.cards.length-1])==event.suit){ - ui.discardPile.appendChild(event.cards.pop()); - } - if(event.cards.length){ - player.gain(event.cards,'draw2'); - } - } - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-2]; - if(!target.hasFriend()) return; - if(target.hp>=4) return [1,2]; - if(target.hp==3) return [1,1.5]; - if(target.hp==2) return [1,0.5]; - } - } - } - } - }, - bolehuiyan:{ - trigger:{global:'shaBegin'}, - direct:true, - priority:11, - filter:function(event,player){ - if(player.hasSkill('bolehuiyan4')) return false; - if(event.target.isUnderControl()) return false; - return event.player!=player&&event.target!=player&&event.target.countCards('h')>0; - }, - group:['bolehuiyan2','bolehuiyan3'], - content:function(){ - "step 0" - if(event.isMine()){ - event.dialog=ui.create.dialog('慧眼:预言'+get.translation(trigger.player)+'对'+get.translation(trigger.target)+'的杀能否命中'); - } - player.chooseControl('能命中','不能命中','cancel').ai=function(event){ - if(trigger.player.hasSkill('wushuang')) return 0; - if(trigger.player.hasSkill('liegong')) return 0; - if(trigger.player.hasSkill('tieji')) return 0; - if(trigger.player.hasSkill('juji')) return 0; - if(trigger.player.hasSkill('retieji')) return 0; - if(trigger.player.hasSkill('roulin')&&trigger.target.sex=='female') return 0; - if(trigger.player.hasSkill('nvquan')&&trigger.target.sex=='male') return 0; - if(trigger.target.hasSkill('yijue2')) return 0; - if(trigger.target.hasSkill('shejie2')) return 0; - if(trigger.target.hasSkill('shanguang2')) return 0; - - var equip=trigger.target.getEquip(2); - if(equip&&equip.name=='bagua') return 1; - return trigger.target.countCards('h')<2?0:1; - }; - "step 1" - if(event.dialog){ - event.dialog.close(); - } - if(result.control!='cancel'){ - player.addTempSkill('bolehuiyan4','phaseAfter'); - player.logSkill(['bolehuiyan',result.control],trigger.target); - game.log(player,'预言'+result.control); - player.storage.bolehuiyan=result.control; - game.delay(); - } - }, - ai:{ - threaten:1.3 - } - }, - bolehuiyan2:{ - trigger:{global:'shaEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.bolehuiyan?true:false; - }, - content:function(){ - if(player.storage.bolehuiyan=='不能命中'){ - player.popup('预言成功'); - player.draw(); - } - else{ - player.popup('预言失败'); - player.chooseToDiscard('预言失败,请弃置一张牌','he',true); - } - delete player.storage.bolehuiyan; - } - }, - bolehuiyan3:{ - trigger:{global:'shaDamage'}, - forced:true, - popup:false, - filter:function(event,player){ - return player.storage.bolehuiyan?true:false; - }, - content:function(){ - if(player.storage.bolehuiyan=='能命中'){ - player.popup('预言成功'); - player.draw(); - } - else{ - player.popup('预言失败'); - player.chooseToDiscard('预言失败,请弃置一张牌','he',true); - } - delete player.storage.bolehuiyan; - } - }, - bolehuiyan4:{}, - oldbolehuiyan:{ - trigger:{global:'judgeBegin'}, - direct:true, - priority:11, - filter:function(event,player){ - return event.player!=player; - }, - content:function(){ - "step 0" - if(event.isMine()){ - event.dialog=ui.create.dialog('慧眼:预言'+get.translation(trigger.player)+'的'+trigger.judgestr+'判定'); - } - player.chooseControl('heart2','diamond2','club2','spade2','cancel').ai=function(event){ - switch(Math.floor(Math.random()*4)){ - case 0:return 'heart2'; - case 1:return 'diamond2'; - case 2:return 'club2'; - case 3:return 'spade2'; - } - }; - "step 1" - if(event.dialog){ - event.dialog.close(); - } - if(result.control!='cancel'){ - game.log(player,'预言判定结果为'+get.translation(result.control)); - player.storage.bolehuiyan=result.control.slice(0,result.control.length-1); - player.popup(result.control); - game.delay(); - } - }, - group:'bolehuiyan2' - }, - oldbolehuiyan2:{ - trigger:{global:'judgeEnd'}, - forced:true, - popup:false, - content:function(){ - if(player.storage.bolehuiyan==trigger.result.suit){ - game.log(player,'预言成功'); - player.popup('洗具'); - player.draw(2); - } - else if(get.color({suit:player.storage.bolehuiyan})==trigger.result.color){ - player.popup('洗具'); - player.draw(); - } - delete player.storage.bolehuiyan; - } - }, - xiangma:{ - inherit:'yicong' - }, - weiyi:{ - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return (event.source&&event.source.countCards('he')); - }, - check:function(event,player){ - return get.attitude(player,event.source)<0; - }, - content:function(){ - trigger.source.chooseToDiscard(2,'he',true); - }, - logTarget:'source', - ai:{ - expose:0.3, - result:{ - target:function(card,player,target){ - if(player.countCards('he')>1&&get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing')) return [1,-1]; - if(get.attitude(target,player)<0) return [1,0,0,-1.5]; - } - } - } - } - }, - qiandu:{ - enable:'phaseUse', - usable:1, - changeSeat:true, - filterTarget:function(card,player,target){ - return player!=target&&player.next!=target; - }, - filterCard:{color:'black'}, - check:function(card){ - return 4-get.value(card); - }, - content:function(){ - game.swapSeat(player,target); - }, - ai:{ - order:5, - result:{ - player:function(player,target){ - var att=get.attitude(player,target); - if(target==player.previous&&att>0) return att; - if(target==player.next&&att<0) return -att; - var att2=get.attitude(player,player.next); - if(target==player.next.next&&att<0&&att2<0) return -att-att2; return 0; } - } - } - }, - nvquan:{ - group:['nvquan1','nvquan2','nvquan3'], - }, - nvquan1:{ - trigger:{player:'shaBegin'}, - forced:true, - filter:function(event){ - return event.target.sex=='male'; - }, - content:function(){ - "step 0" - var next=trigger.target.chooseToRespond({name:'shan'}); - next.autochoose=lib.filter.autoRespondShan; - next.ai=function(card){ - if(trigger.target.countCards('h','shan')>1){ - return get.unuseful2(card); - } - return -1; - }; - "step 1" - if(result.bool==false){ - trigger.untrigger(); - trigger.directHit=true; - } - } - }, - nvquan2:{ - trigger:{player:'juedou',target:'juedou'}, - forced:true, - filter:function(event,player){ - return event.turn!=player&&event.turn.sex=='male'; - }, - content:function(){ - "step 0" - var next=trigger.turn.chooseToRespond({name:'sha'}); - next.autochoose=lib.filter.autoRespondSha; - next.ai=function(card){ - if(get.attitude(trigger.turn,player)<0&&trigger.turn.countCards('h','sha')>1){ - return get.unuseful2(card); - } - return -1; - }; - "step 1" - if(result.bool==false){ - trigger.directHit=true; - } - }, - ai:{ - result:{ - target:function(card,player,target){ - if(card.name=='juedou'&&target.countCards('h')>0) return [1,0,0,-1]; + next.logSkill=['wlianhuan',trigger.player]; + 'step 1' + if(result.bool){ + trigger.num++; } } - } - }, - nvquan3:{ - mod:{ - targetEnabled:function(card,player,target){ - if(card.name=='juedou'&&player.sex=='male'){ - return false; + }, + huli:{ + enable:'phaseUse', + filterCard:{suit:'heart'}, + filterTarget:function(card,player,target){ + return get.distance(player,target)<=1&&lib.filter.cardEnabled({name:'tao'},target,target); + }, + check:function(card){ + return 8-get.value(card); + }, + discard:false, + filter:function(event,player){ + if(player.countCards('h',{suit:'heart'})){ + return true; } - } - } - }, - feigong:{ - trigger:{global:'useCard'}, - priority:15, - filter:function(event,player){ - return event.card.name=='sha'&&event.player!=player&& - player.countCards('h','sha')>0&&event.targets.contains(player)==false; - }, - direct:true, - content:function(){ - "step 0" - var effect=0; - for(var i=0;i2){ - eff+=0.5; + }, + prepare:'throw', + content:function(){ + player.useCard({name:'tao'},cards,targets[0]).animate=false; + }, + ai:{ + order:9.5, + result:{ + target:function(player,target){ + return get.recoverEffect(target,player,target); } + }, + threaten:1.6 + } + }, + yixin:{ + skillAnimation:true, + unique:true, + mark:true, + init:function(player){ + player.storage.yixin=false; + }, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.yixin&&player.countCards('he')>2; + }, + intro:{ + content:'limited' + }, + filterTarget:function(card,player,target){ + return target.isDamaged(); + }, + filterCard:true, + position:'he', + selectCard:2, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + player.awakenSkill('yixin'); + player.storage.yixin=true; + var num=Math.min(4,target.maxHp-target.hp); + target.recover(num); + if(num<4){ + target.draw(4-num); } - if(get.attitude(player,players[i])>0){ - num+=eff; - } - else if(get.attitude(player,players[i])<0){ - num-=eff; - } - } - return num>0; - }, - content:function(){ - "step 0" - event.targets=game.filterPlayer(); - event.targets.remove(player); - "step 1" - if(event.targets.length){ - event.targets.shift().recover(); - event.redo(); - } - }, - ai:{ - expose:0.1 - } - }, - jieyong:{ - trigger:{player:'useCardAfter'}, - direct:true, - filter:function(event,player){ - if(get.position(event.card)!='d') return false; - if(player.hasSkill('jieyong2')) return false; - return player.countCards('he',{color:'black'})>0; - }, - content:function(){ - "step 0" - var next=player.chooseToDiscard('he','是否弃置一张黑色牌并收回'+get.translation(trigger.card)+'?',{color:'black'}); - next.ai=function(card){ - return get.value(trigger.card)-get.value(card); - } - next.logSkill='jieyong'; - "step 1" - if(result.bool){ - player.gain(trigger.card,'gain2'); - player.addTempSkill('jieyong2',['phaseAfter','phaseBegin']); - } - }, - ai:{ - threaten:1.3 - } - }, - jieyong2:{ - filterCard:{suit:'heart'}, - popname:true, - }, - jieyong3:{ - trigger:{player:'useCardBefore'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.skill=='jieyong2'; - }, - content:function(){ - player.popup(trigger.card.name); - player.getStat('skill').jieyong++; - } - }, - jieyong4:{}, - jieyong5:{}, - jieyong6:{}, - zhulu:{ - trigger:{global:'useCardAfter'}, - direct:true, - filter:function(event,player){ - return _status.currentPhase!=player&&event.player!=player&&get.type(event.card)=='trick'&& - get.position(event.card)=='d'&&!player.hasSkill('zhulu2')&& - get.itemtype(event.card)=='card'&&player.countCards('he',{suit:get.suit(event.card)})>0; - }, - content:function(){ - "step 0" - var val=get.value(trigger.card); - var suit=get.suit(trigger.card); - var next=player.chooseToDiscard('he','逐鹿:是否弃置一张'+get.translation(suit)+ - '牌并获得'+get.translation(trigger.card)+'?',{suit:suit}); - next.ai=function(card){ - return val-get.value(card); - }; - next.logSkill='zhulu'; - "step 1" - if(result.bool){ - player.gain(trigger.card,'gain2'); - player.addTempSkill('zhulu2','phaseAfter'); - } - }, - ai:{ - threaten:1.2 - } - }, - zhulu2:{}, - xieling:{ - enable:'phaseUse', - usable:1, - filterCard:true, - selectCard:2, - check:function(card){ - return 7-get.value(card); - }, - multitarget:true, - targetprompt:['被移走','移动目标'], - filterTarget:function(card,player,target){ - if(ui.selected.targets.length){ - var from=ui.selected.targets[0]; - var judges=from.getCards('j'); - for(var i=0;i0; - } - }, - selectTarget:2, - content:function(){ - "step 0" - if(targets.length==2){ - player.choosePlayerCard('ej',function(button){ - if(get.attitude(player,targets[0])>get.attitude(player,targets[1])){ - return get.position(button.link)=='j'?10:0; - } - else{ - if(get.position(button.link)=='j') return -10; - return get.equipValue(button.link); - } - },targets[0]); - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - if(get.position(result.buttons[0].link)=='e'){ - event.targets[1].equip(result.buttons[0].link); - } - else if(result.buttons[0].link.viewAs){ - event.targets[1].addJudge({name:result.buttons[0].link.viewAs},[result.buttons[0].link]); - } - else{ - event.targets[1].addJudge(result.buttons[0].link); - } - event.targets[0].$give(result.buttons[0].link,event.targets[1]) - game.delay(); - } - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - if(ui.selected.targets.length==0){ - if(target.countCards('j')&&get.attitude(player,target)>0) return 1; - if(get.attitude(player,target)<0){ - var players=game.filterPlayer(); - for(var i=0;i0){ - if((target.getEquip(1)&&!players[i].getEquip(1))|| - (target.getEquip(2)&&!players[i].getEquip(2))|| - (target.getEquip(3)&&!players[i].getEquip(3))|| - (target.getEquip(4)&&!players[i].getEquip(4))|| - (target.getEquip(5)&&!players[i].getEquip(5))) - return -1; - } - } + }, + ai:{ + order:9.6, + result:{ + target:function(player,target){ + if(target.hp==1&&target.maxHp>=3){ + return get.recoverEffect(target,player,player); } return 0; } - else{ - return get.attitude(player,ui.selected.targets[0])>0?-1:1; + } + } + }, + xianqu:{ + mod:{ + targetEnabled:function(card){ + if(card.name=='sha'&&card.number<8) return false; + } + }, + }, + zbudao:{ + trigger:{player:'phaseDrawBegin'}, + check:function(event,player){ + if(player.hasFriend()) return true; + return false; + }, + content:function(){ + trigger.num++; + player.addTempSkill('zbudao2','phaseDrawAfter'); + }, + ai:{ + threaten:1.3 + }, + }, + zbudao2:{ + trigger:{player:'phaseDrawEnd'}, + forced:true, + popup:false, + filter:function(event){ + return event.cards&&event.cards.length; + }, + content:function(){ + 'step 0' + event.cards=trigger.cards.slice(0); + player.chooseCardTarget({ + filterCard:function(card){ + return _status.event.getParent().cards.contains(card); + }, + selectCard:1, + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + if(ui.selected.cards.length>0) return -1; + if(card.name=='du') return 20; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + return 1-att; + } + return att-4; + }, + forced:true, + prompt:'请选择要送人的卡牌' + }); + "step 1" + if(result.bool){ + player.line(result.targets,'green'); + result.targets[0].gain(result.cards,player); + player.$give(result.cards.length,result.targets[0]); + game.delay(0.7); + } + } + }, + taiji:{ + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'&&player.hasSha(); + }, + direct:true, + content:function(){ + player.chooseToUse({name:'sha'},'太极:是否使用一张杀?').logSkill='taiji'; + }, + }, + fengliu:{ + trigger:{player:'phaseDrawBegin'}, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.sex=='female'; + }); + }, + forced:true, + content:function(){ + var num=game.countPlayer(function(current){ + return current.sex=='female'; + }); + if(num>2) num=2; + trigger.num+=num; + }, + ai:{ + threaten:function(){ + var num=game.countPlayer(function(current){ + return current.sex=='female'; + }); + switch(num){ + case 0:return 1; + case 1:return 1.3; + default:return 2; + } + } + }, + }, + luobi:{ + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + return player.isDamaged(); + }, + content:function(){ + "step 0" + player.draw(player.maxHp-player.hp); + "step 1" + event.cards=result; + "step 2" + player.chooseCardTarget({ + filterCard:function(card){ + return _status.event.getParent().cards.contains(card); + }, + selectCard:[1,event.cards.length], + filterTarget:function(card,player,target){ + return player!=target; + }, + ai1:function(card){ + if(ui.selected.cards.length>0) return -1; + if(card.name=='du') return 20; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + return 1-att; + } + return att-4; + }, + prompt:'请选择要送人的卡牌' + }); + "step 3" + if(result.bool){ + player.line(result.targets,'green'); + result.targets[0].gain(result.cards,player); + player.$give(result.cards.length,result.targets[0]); + for(var i=0;i0){ + return game.hasPlayer(function(current){ + return current.group!='qun'&¤t!=player; + }); + } + return false; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('yaoyi'),[1,2],function(card,player,target){ + return target.countCards('h')&&target.group!='qun'&&target!=player; + }).set('ai',function(target){ + return 0.5-get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + player.logSkill('yaoyi',result.targets); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 2' + if(event.targets&&event.targets.length){ + event.target=event.targets.shift(); + event.target.chooseCard('交给'+get.translation(player)+'一张手牌',true).ai=function(card){ + return -get.value(card); + } + } + else{ + event.finish(); + } + 'step 3' + if(result.bool&&result.cards&&result.cards.length){ + event.target.$give(1,player); + player.gain(result.cards,event.target); + } + event.goto(2); + }, + ai:{ + maixie:true, + maixie_hp:true, + expose:0.2, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(!target.hasFriend()) return; + var players=game.filterPlayer(); + for(var i=0;i=4) return [1,get.tag(card,'damage')*2]; + if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; + } + } + } + } + } + } + }, + shiqin:{ + trigger:{global:'dying'}, + priority:11, + filter:function(event,player){ + return event.player!=player&&event.player.hp<=0&&event.player.group=='qun'; + }, + check:function(event,player){ + return get.attitude(player,event.player)<0; + }, + forced:true, + logTarget:'player', + content:function(){ + 'step 0' + game.delay(0.5); + trigger.player.die(); + 'step 1' + if(!trigger.player.isAlive()){ + trigger.untrigger(true); + trigger.finish(); + } + } + }, + zyhufu:{ + trigger:{player:'phaseDrawBegin'}, + filter:function(event,player){ + return !player.getEquip(2); + }, + forced:true, + content:function(){ + trigger.num++; + }, + ai:{ + threaten:1.3 + }, + mod:{ + maxHandcard:function(player,num){ + if(player.getEquip(2)) return num+5; + } + } + }, + hanbei:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + if(player.getEquip(3)||player.getEquip(4)) return true; + return false; + }, + content:function(){ + trigger.directHit=true; + } + }, + sheshu:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return event.target.hp>=3; + }, + content:function(){ + trigger.directHit=true; + }, + mod:{ + targetInRange:function(card){ + if(card.name=='sha') return true; + }, + }, + }, + lguiyin:{ + unique:true, + forceunique:true, + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('tongyu_guiyin')&&!player.getStat('damage'); + }, + derivation:['lzhangyi','jimin','tongyu'], + content:function(){ + player.draw(); + player.setAvatar('yxs_luobinhan','yxs_handingdun'); + player.removeSkill('lguiyin'); + player.removeSkill('sheshu'); + player.removeSkill('xiadao'); + player.addSkill('jimin'); + player.addSkill('lzhangyi'); + player.addSkill('tongyu'); + player.addTempSkill('tongyu_guiyin','phaseAfter'); + }, + ai:{ + order:function(){ + if(_status.event.player.hp==1) return 9; + return 0.5; + }, + result:{ + player:function(player){ + if(player.hp0&&!player.hasSkill('tongyu_guiyin'); + }, + filterCard:true, + position:'he', + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + player.setAvatar('yxs_luobinhan','yxs_luobinhan'); + player.addSkill('lguiyin'); + player.addSkill('sheshu'); + player.addSkill('xiadao'); + player.removeSkill('jimin'); + player.removeSkill('lzhangyi'); + player.removeSkill('tongyu'); + player.addTempSkill('tongyu_guiyin','phaseAfter'); + }, + ai:{ + order:9, + result:{ + player:function(player){ + if(player.hasFriend()) return 1; + return 0; + } + } + } + }, + tongyu_guiyin:{}, + zhijie:{ + enable:'phaseUse', + usable:1, + viewAsFilter:function(player){ + return player.countCards('h',{suit:'heart'})>0; + }, + viewAs:{name:'wuzhong'}, + filterCard:{suit:'heart'}, + check:function(card){ + return 8-get.value(card); + } + }, + dili:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + alter:true, + filter:function(event,player){ + return player.hp=player.maxHp-1) return [0,0]; + } + } + } + }, + kuangchan:{ + init:function(player){ + if(lib.config.mode=='identity'&&player.isZhu){ + player.maxHp--; + player.update(); + } + } + }, + chujia:{ + enable:'phaseUse', + filterCard:function(card){ + if(ui.selected.cards.length){ + return get.color(card)==get.color(ui.selected.cards[0]); + } + return true; + }, + complexCard:true, + usable:1, + selectCard:2, + check:function(card){ + return 6-get.value(card); + }, + filterTarget:function(card,player,target){ + return target.hptarget.hp){ + target.draw(target.maxHp-target.hp); + } + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + var num=target.maxHp-target.hp; + if(num>2) return num; + return 0; + } + } + } + }, + baihe:{ + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + filterTarget:true, + content:function(){ + 'step 0' + if(target.isLinked()){ + target.link(); + } + else{ + target.link(); + target.draw(); + event.finish(); + } + 'step 1' + if(target.countCards('h')){ + target.chooseToDiscard('h',true); + } + }, + check:function(card){ + return 8-get.value(card); + }, + ai:{ + order:1, + result:{ + player:function(player,target){ + if(!player.hasSkill('xiushen')) return 0; + if(target.isLinked()) return 0; + if(game.hasPlayer(function(current){ + return current.isLinked(); + })){ + return 0; + } + return 1; + } + } + } + }, + yinyang:{ + enable:'phaseUse', + usable:1, + filterCard:true, + selectCard:2, + filterTarget:true, + selectTarget:3, + content:function(){ + target.link(); + }, + check:function(card){ + return 6-get.value(card); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(target.isLinked()) return 1; + return -1; + } + } + } + }, + xiushen:{ + trigger:{player:['phaseEnd','phaseUseEnd']}, + forced:true, + alter:true, + filter:function(event,player){ + if(get.is.altered('xiushen')){ + if(event.name!='phaseUse') return false; + } + else{ + if(event.name!='phase') return false; + } + return game.hasPlayer(function(current){ + return current.isLinked(); + }); + }, + content:function(){ + player.draw(2); + }, + ai:{ + threaten:1.6 + } + }, + jiean:{ + trigger:{source:'damageEnd'}, + frequent:true, + filter:function(event){ + return event.player.isAlive()&&event.parent.name=='yanyi'&&event.player.hp0) return -1; + return (_status.event.player.countCards('h')-_status.event.player.hp); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target)-4; + }, + prompt:'请选择要送人的卡牌' + }); + "step 3" + if(result.bool){ + result.targets[0].gain(result.cards,player); + player.$give(result.cards.length,result.targets[0]); + for(var i=0;i=4) return [1,get.tag(card,'damage')*2]; + if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; + if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; + } + } + } + } + }, + yanyi:{ + enable:'phaseUse', + usable:1, + filterCard:{color:'black'}, + position:'he', + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + "step 0" + player.chooseControl('heart2','diamond2','club2','spade2').ai=function(event){ + switch(Math.floor(Math.random()*5)){ + case 0:return 'heart2'; + case 1:case 4:return 'diamond2'; + case 2:return 'club2'; + case 3:return 'spade2'; + } + }; + "step 1" + game.log(player,'选择了'+get.translation(result.control)); + event.choice=result.control.slice(0,result.control.length-1); + target.popup(result.control); + target.showHandcards(); + "step 2" + if(target.countCards('h',{suit:event.choice})){ + target.damage(); + } + }, + ai:{ + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target); + } + } + } + }, + wumu:{ + mod:{ + targetInRange:function(card,player){ + if(card.name=='sha'&&get.color(card)=='black') return true; + }, + cardUsable:function(card){ + if(card.name=='sha'&&get.color(card)=='red') return Infinity; + } + }, + trigger:{player:'useCard'}, + filter:function(event,player){ + return event.card.name=='sha'&&get.color(event.card)=='red'; + }, + forced:true, + content:function(){ + if(player.stat[player.stat.length-1].card.sha>0){ + player.stat[player.stat.length-1].card.sha--; + } + }, + }, + ysheshen:{ + inherit:'yiji' + }, + sanbanfu:{ + trigger:{player:'shaBegin'}, + filter:function(event,player){ + if(player.storage.sanbanfu||player.storage.sanbanfu2) return false; + return !event.directHit; + }, + check:function(event,player){ + if(get.attitude(player,event.target)>=0) return false; + if(event.target.getEquip('bagua')) return false; + if(event.target.hasSkillTag('respondShan')&&event.target.countCards('h')>=3) return false; + return true; + }, + logTarget:'target', + content:function(){ + "step 0" + var next=trigger.target.chooseToRespond({name:'shan'}); + next.autochoose=lib.filter.autoRespondShan; + next.ai=function(card){ + return get.unuseful2(card); + }; + player.storage.sanbanfu=false; + player.storage.sanbanfu2=false; + "step 1" + if(result.bool==false){ + trigger.untrigger(); + trigger.directHit=true; + player.storage.sanbanfu2=true; + } + else{ + player.storage.sanbanfu=true; + } + }, + group:['sanbanfu2','sanbanfu3'] + }, + sanbanfu2:{ + trigger:{player:'shaAfter'}, + forced:true, + popup:false, + silent:true, + content:function(){ + if(player.storage.sanbanfu) player.damage(trigger.target); + delete player.storage.sanbanfu; + delete player.storage.sanbanfu2; + } + }, + sanbanfu3:{ + trigger:{source:'damageBegin'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&player.storage.sanbanfu2; + }, + content:function(){ + trigger.num++; + } + }, + bingsheng:{ + enable:'phaseUse', + usable:1, + filterCard:function(card){ + if(ui.selected.cards.length){ + return get.suit(card)!=get.suit(ui.selected.cards[0]); + } + return true; + }, + complexCard:true, + selectCard:2, + check:function(card){ + return 8-get.value(card); + }, + filterTarget:function(card,player,target){ + if(target.hp==Infinity) return false; + if(target.hp>player.hp) return true; + if(target.hp0){ + target.damage(num); + } + else if(num<0&&target.hptarget.maxHp){ + num=player.hp-target.maxHp; + } + else{ + num=player.hp-target.hp; + } + if(target.hp==1&&num){ + return num+1; + } + return num; + } + } + } + }, + taolue:{ + mod:{ + maxHandcard:function(player,num){ + return num+1; + } + }, + }, + shentan:{ + enable:'phaseUse', + usable:1, + filterCard:true, + filterTarget:function(card,player,target){ + return target.countCards('h')>0&&get.distance(player,target)<=2; + }, + check:function(card){ + return 7-get.value(card); + }, + position:'he', + content:function(){ + "step 0" + var hs=target.getCards('h'); + if(hs.length){ + event.card=hs.randomGet(); + player.gain(event.card,target); + target.$giveAuto(event.card,player); + } + else{ + event.finish(); + } + "step 1" + var source=target; + player.chooseTarget('选择一个目标送出'+get.translation(event.card),function(card,player,target){ + return target!=player; + }).ai=function(target){ + var att=get.attitude(player,target); + if(att>3&&player.countCards('h')>target.countCards('h')){ + return att; + } + return 0; + } + "step 2" + if(result.bool){ + result.targets[0].gain(card,player); + player.$give(1,result.targets[0]); + player.line(result.targets,'green'); + game.delay(); + } + }, + ai:{ + order:9, + result:{ + target:-1, + player:function(player,target){ + if(get.attitude(player,target)>0){ + return 0; + } + return 1; } }, }, - expose:0.2, - threaten:1.5 - } - }, - qiangyun:{ - trigger:{player:'loseEnd'}, - frequent:true, - filter:function(event,player){ - if(player.countCards('h')) return false; - for(var i=0;itrigger.target.hp){ + trigger.directHit=true; + } + else if(range0; + wluoyan:{ + trigger:{player:'damageBefore'}, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + player.loseHp(); + }, + ai:{ + noDirectDamage:true, + } }, - content:function(){ - 'step 0' - player.discardPlayerCard(target,true); - 'step 1' - if(result.bool){ - var type=get.type(result.cards[0]); - if(type!='basic'&&type!='trick'){ - player.chooseToDiscard('he',true); - event.finish(); + heqin:{ + skillAnimation:true, + enable:'phaseUse', + filter:function(event,player){ + return !player.storage.heqin; + }, + filterTarget:function(card,player,target){ + return target.sex=='male'&&target!=player; + }, + content:function(){ + player.awakenSkill('heqin'); + + player.addSkill('heqin2'); + target.addSkill('heqin2'); + + target.marks.heqin=target.markCharacter(player,{ + name:'和亲', + content:'摸牌阶段摸牌数+1' + }); + game.addVideo('markCharacter',target,{ + name:'放权', + content:'摸牌阶段摸牌数+1', + id:'heqin', + target:player.dataset.position + }); + + player.storage.heqin=target; + target.storage.heqin=player; + + player.marks.heqin=player.markCharacter(target,{ + name:'和亲', + content:'摸牌阶段摸牌数+1' + }); + game.addVideo('markCharacter',player,{ + name:'放权', + content:'摸牌阶段摸牌数+1', + id:'heqin', + target:target.dataset.position + }); + }, + ai:{ + order:1, + result:{ + target:1 + } + } + }, + heqin2:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + trigger.num++; + }, + group:'heqin3' + }, + heqin3:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + player.removeSkill('heqin2'); + player.unmarkSkill('heqin'); + if(player.storage.heqin){ + player.storage.heqin.removeSkill('heqin2'); + player.storage.heqin.unmarkSkill('heqin'); + } + } + }, + chajue:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return _status.currentPhase!=player; + }, + content:function(){ + player.addTempSkill('chajue2',{player:'phaseBegin'}); + } + }, + chajue2:{ + trigger:{target:'useCardToBefore'}, + forced:true, + priority:15, + mark:true, + intro:{ + content:'杀或普通锦囊牌对你无效' + }, + filter:function(event,player){ + return get.type(event.card)=='trick'||event.card.name=='sha'; + }, + content:function(){ + game.log(player,'发动了察觉,',trigger.card,'对',trigger.target,'失效') + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='trick'||card.name=='sha') return [0,0,0,0]; + } + } + } + }, + tiewan:{ + trigger:{global:'useCardAfter'}, + filter:function(event,player){ + return get.type(event.card.viewAs||event.card.name)=='delay'&&event.player!=player; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseCardTarget({ + prompt:get.prompt('tiewan'), + filterCard:{color:'red'}, + position:'he', + filterTarget:function(card,player,target){ + return player.canUse({name:'lebu'},target); + }, + ai1:function(card){ + return 7-get.value(card); + }, + ai2:function(target){ + return get.effect(target,{name:'lebu'},player,player); + } + }); + 'step 1' + if(result.bool){ + player.logSkill('tiewan'); + player.useCard({name:'lebu'},result.cards,result.targets); + } + }, + ai:{ + threaten:1.5 + } + }, + qianglue:{ + trigger:{player:'shaMiss'}, + priority:-1, + filter:function(event){ + return event.target.countCards('he')>0; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + content:function(){ + 'step 0' + player.judge(function(card){ + return get.color(card)=='black'?1:-1; + }); + 'step 1' + if(result.bool){ + player.gainPlayerCard('he',trigger.target); + } + } + }, + jimin:{ + enable:['chooseToRespond'], + filterCard:true, + viewAs:{name:'shan'}, + viewAsFilter:function(player){ + if(!player.countCards('h')) return false; + if(player.countCards('e')) return false; + }, + prompt:'将一张手牌当闪打出', + check:function(){return 1}, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(!player.countCards('h')) return false; + if(player.countCards('e')) return false; + }, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0&&!target.countCards('e')) return 0.6 + } + } + } + }, + xiadao:{ + trigger:{source:'damageEnd'}, + direct:true, + filter:function(event,player){ + if(event.player.isDead()) return false; + var nh=event.player.countCards('h'); + if(nh==0) return false; + var players=game.filterPlayer(); + for(var i=0;i0) return 0; + return get.attitude(player,target); + } + 'step 1' + if(result.bool){ + player.logSkill('xiadao'); + player.line2([trigger.player,result.targets[0]],'green'); + event.target=result.targets[0]; + game.delay(); } else{ - event.card=result.cards[0]; + event.finish(); } - } - else{ - event.finish(); - } - 'step 2' - var card=event.card; - card={name:card.name,nature:card.nature,suit:card.suit,number:card.number}; - if(lib.filter.cardEnabled(card)){ - if(game.hasPlayer(function(current){ - return player.canUse(card,current); - })){ - lib.skill.miaobix.viewAs=card; - var next=player.chooseToUse(); - next.logSkill='miaobi'; - next.set('openskilldialog','妙笔:将一张手牌当'+get.translation(card)+'使用'); - next.set('norestore',true); - next.set('_backupevent','miaobix'); - next.backup('miaobix'); + 'step 0' + if(event.target){ + var card=trigger.player.getCards('h').randomGet(); + event.target.gain(card,trigger.player); + trigger.player.$giveAuto(card,event.target); } + }, + ai:{ + expose:0.2, + threaten:1.4 } }, - ai:{ - order:9, - result:{ - target:-1 + lzhangyi:{ + trigger:{player:'discardAfter'}, + filter:function(event,player){ + for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.discardPlayerCard(target,'e',true); - 'step 1' - game.asyncDraw([player,target]); - }, - ai:{ - order:8, - threaten:1.5, - result:{ - target:-1, - player:0.5 + yizhuang:{ + trigger:{player:'phaseBegin'}, + group:'yizhuang2', + direct:true, + content:function(){ + "step 0" + if(player.countCards('he')){ + player.chooseCardTarget({ + prompt:get.prompt('yizhuang'), + filterCard:lib.filter.cardDiscardable, + position:'he', + filterTarget:function(card,player,target){ + if(target==player) return false; + if(target.sex!='male') return false; + var name=target.name.indexOf('unknown')==0?target.name2:target.name; + if(name==player.storage.yizhuang) return false; + + var info=lib.character[name]; + if(info){ + var skills=info[3]; + for(var j=0;j0) return 0; + return 7-get.value(card); + }, + ai2:function(target){ + if(target.isMin()) return 0; + return 6-target.maxHp; + } + }); + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + player.unmark(player.storage.yizhuang+'_charactermark'); + player.discard(result.cards); + player.logSkill('yizhuang',result.targets); + var name=result.targets[0].name; + if(name.indexOf('unknown')==0){ + name=result.targets[0].name2; + } + var list=[]; + var skills=lib.character[name][3]; + for(var j=0;j0; + }, + content:function(){ + player.unmark(player.storage.yizhuang+'_charactermark'); + player.removeAdditionalSkill('yizhuang'); + delete player.storage.yizhuang; + player.checkMarks(); } - 'step 1' - if(result.links[0]){ - cards[0].init([result.links[0].suit,result.links[0].number,result.links[0].name,result.links[0].nature]); - event.card=cards[0]; - player.chooseTarget('选择一个角色装备'+get.translation(result.links),function(card,player,target){ - return !target.isMin(); - }).ai=function(target){ - if(!target.countCards('e',{subtype:get.subtype(event.card)})){ - return get.attitude(player,target); + }, + kongju:{ + mod:{ + maxHandcard:function(player,num){ + if(player.hptarget.maxHp){ + if(card.name=='lebu') return false; + } + } + }, + }, + tuqiang:{ + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card&&event.card.name=='shan'; + }, + frequent:true, + content:function(){ + player.draw(); + }, + ai:{ + mingzhi:false, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'respondShan')){ + return 0.8; + } + } + }, + } + }, + xumou:{ + inherit:'jushou' + }, + zhensha:{ + trigger:{global:'dying'}, + priority:11, + filter:function(event,player){ + return event.player.hp<=0&&(player.countCards('h','jiu')>0||player.countCards('h',{color:'black'})>=2)&&player!=event.player; + }, + direct:true, + content:function(){ + 'step 0' + var goon=(get.attitude(player,trigger.player)<0); + var next=player.chooseToDiscard('鸠杀:是否弃置一张酒或两张黑色手牌令'+get.translation(trigger.player)+'立即死亡?'); + next.ai=function(card){ + if(ui.selected.cards.length){ + if(ui.selected.cards[0].name=='jiu') return 0; + } + if(goon){ + if(card.name=='jiu') return 2; + return 1; } return 0; + }; + next.filterCard=function(card){ + if(ui.selected.cards.length){ + return get.color(card)=='black'; + } + return get.color(card)=='black'||card.name=='jiu'; + }; + next.complexCard=true, + next.logSkill=['zhensha',trigger.player]; + next.selectCard=function(){ + if(ui.selected.cards.length){ + if(get.color(ui.selected.cards[0])!='black') return [1,1]; + } + return [1,2]; } - } - else{ - event.finish(); - } - 'step 2' - if(result.targets&&result.targets[0]&&event.card){ - player.$give(event.card,result.targets[0]); - game.delay(); - event.toequip=result.targets[0]; - } - else{ - event.finish(); - } - 'step 3' - if(event.toequip){ - event.toequip.equip(event.card); + 'step 1' + if(result.bool){ + trigger.player.die(); + } + else{ + event.finish(); + } + 'step 2' + if(!trigger.player.isAlive()){ + trigger.untrigger(true); + trigger.finish(); + } + }, + ai:{ + threaten:1.5 } }, - ai:{ - order:9, - threaten:1.5, - result:{ - player:function(player){ - if(player.countCards('e')<3) return 1; - return 0; + ducai:{ + enable:'phaseUse', + usable:1, + unique:true, + forceunique:true, + check:function(card){ + if(_status.event.player.countCards('h')>=3){ + return 5-get.value(card); + } + return 0; + }, + position:'he', + filterCard:true, + content:function(){ + player.storage.ducai2=cards[0]; + player.addTempSkill('ducai2',{player:'phaseBegin'}); + }, + ai:{ + order:8, + result:{ + player:1 + } + }, + global:'ducai3' + }, + ducai2:{ + mark:'card', + intro:{ + content:'card' + } + }, + ducai3:{ + mod:{ + cardEnabled:function(card,player){ + if(player.hasSkill('ducai2')) return; + var suit,players=game.filterPlayer(); + for(var i=0;i=3; + }, + promptfunc:function(){ + return '令自己在本轮内不能成为出杀的目标(选择自己),或对攻击范围内的一名其他角色造成一点伤害' + }, + filterTarget:function(card,player,target){ + return player==target||get.distance(player,target,'attack')<=1; + }, + content:function(){ + if(target==player){ + target.addTempSkill('fanpu_disable',{player:'phaseBegin'}); + } + else{ + target.damage(); + } + player.storage.tongling-=3; + player.unmarkSkill('tongling'); + player.syncStorage('tongling'); + }, + subSkill:{ + disable:{ + mark:true, + intro:{ + content:'不能成为杀的目标' + }, + mod:{ + targetEnabled:function(card,player,target,now){ + if(card.name=='sha') return false; + } + } + } + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(player==target){ + if(player.hp<=2&&!player.countCards('h','shan')){ + return 2; + } + return 0; + } + else{ + return get.damageEffect(target,player,target); + } + } + } + } + }, + fenghuo:{ + enable:'chooseToUse', + filter:function(event,player){ + return player.countCards('e')>0; + }, + filterCard:true, + position:'e', + viewAs:{name:'nanman'}, + prompt:'将一张装备区内的牌当南蛮入侵使用', + check:function(card){ + var player=_status.currentPhase; + if(player.countCards('he',{subtype:get.subtype(card)})>1){ + return 11-get.equipValue(card); + } + if(player.countCards('h')=2; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + player.addSkill('nichang2'); + } + }, + nichang2:{ + trigger:{player:'phaseEnd'}, + forced:true, + content:function(){ + "step 0" + if(player.countCards('h')){ + player.showHandcards(); + } + player.removeSkill('nichang2'); + "step 1" + var suits=['spade','heart','diamond','club']; + var cards=player.getCards('h'); + for(var i=0;i1){ + if(game.phaseNumber=3){ + break; + } + } + event.cards=cards; + event.suit=suit; + player.showCards(cards); + } + else{ + event.finish(); + } + "step 2" + if(event.cards&&event.cards.length){ + if(get.suit(event.cards[event.cards.length-1])==event.suit){ + ui.discardPile.appendChild(event.cards.pop()); + } + if(event.cards.length){ + player.gain(event.cards,'draw2'); + } + } + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-2]; + if(!target.hasFriend()) return; + if(target.hp>=4) return [1,2]; + if(target.hp==3) return [1,1.5]; + if(target.hp==2) return [1,0.5]; + } + } + } + } + }, + bolehuiyan:{ + trigger:{global:'shaBegin'}, + direct:true, + priority:11, + filter:function(event,player){ + if(player.hasSkill('bolehuiyan4')) return false; + if(event.target.isUnderControl()) return false; + return event.player!=player&&event.target!=player&&event.target.countCards('h')>0; + }, + group:['bolehuiyan2','bolehuiyan3'], + content:function(){ + "step 0" + if(event.isMine()){ + event.dialog=ui.create.dialog('慧眼:预言'+get.translation(trigger.player)+'对'+get.translation(trigger.target)+'的杀能否命中'); + } + player.chooseControl('能命中','不能命中','cancel').ai=function(event){ + if(trigger.player.hasSkill('wushuang')) return 0; + if(trigger.player.hasSkill('liegong')) return 0; + if(trigger.player.hasSkill('tieji')) return 0; + if(trigger.player.hasSkill('juji')) return 0; + if(trigger.player.hasSkill('retieji')) return 0; + if(trigger.player.hasSkill('roulin')&&trigger.target.sex=='female') return 0; + if(trigger.player.hasSkill('nvquan')&&trigger.target.sex=='male') return 0; + if(trigger.target.hasSkill('yijue2')) return 0; + if(trigger.target.hasSkill('shejie2')) return 0; + if(trigger.target.hasSkill('shanguang2')) return 0; + + var equip=trigger.target.getEquip(2); + if(equip&&equip.name=='bagua') return 1; + return trigger.target.countCards('h')<2?0:1; + }; + "step 1" + if(event.dialog){ + event.dialog.close(); + } + if(result.control!='cancel'){ + player.addTempSkill('bolehuiyan4','phaseAfter'); + player.logSkill(['bolehuiyan',result.control],trigger.target); + game.log(player,'预言'+result.control); + player.storage.bolehuiyan=result.control; + game.delay(); + } + }, + ai:{ + threaten:1.3 + } + }, + bolehuiyan2:{ + trigger:{global:'shaEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.bolehuiyan?true:false; + }, + content:function(){ + if(player.storage.bolehuiyan=='不能命中'){ + player.popup('预言成功'); + player.draw(); + } + else{ + player.popup('预言失败'); + player.chooseToDiscard('预言失败,请弃置一张牌','he',true); + } + delete player.storage.bolehuiyan; + } + }, + bolehuiyan3:{ + trigger:{global:'shaDamage'}, + forced:true, + popup:false, + filter:function(event,player){ + return player.storage.bolehuiyan?true:false; + }, + content:function(){ + if(player.storage.bolehuiyan=='能命中'){ + player.popup('预言成功'); + player.draw(); + } + else{ + player.popup('预言失败'); + player.chooseToDiscard('预言失败,请弃置一张牌','he',true); + } + delete player.storage.bolehuiyan; + } + }, + bolehuiyan4:{}, + oldbolehuiyan:{ + trigger:{global:'judgeBegin'}, + direct:true, + priority:11, + filter:function(event,player){ + return event.player!=player; + }, + content:function(){ + "step 0" + if(event.isMine()){ + event.dialog=ui.create.dialog('慧眼:预言'+get.translation(trigger.player)+'的'+trigger.judgestr+'判定'); + } + player.chooseControl('heart2','diamond2','club2','spade2','cancel').ai=function(event){ + switch(Math.floor(Math.random()*4)){ + case 0:return 'heart2'; + case 1:return 'diamond2'; + case 2:return 'club2'; + case 3:return 'spade2'; + } + }; + "step 1" + if(event.dialog){ + event.dialog.close(); + } + if(result.control!='cancel'){ + game.log(player,'预言判定结果为'+get.translation(result.control)); + player.storage.bolehuiyan=result.control.slice(0,result.control.length-1); + player.popup(result.control); + game.delay(); + } + }, + group:'bolehuiyan2' + }, + oldbolehuiyan2:{ + trigger:{global:'judgeEnd'}, + forced:true, + popup:false, + content:function(){ + if(player.storage.bolehuiyan==trigger.result.suit){ + game.log(player,'预言成功'); + player.popup('洗具'); + player.draw(2); + } + else if(get.color({suit:player.storage.bolehuiyan})==trigger.result.color){ + player.popup('洗具'); + player.draw(); + } + delete player.storage.bolehuiyan; + } + }, + xiangma:{ + inherit:'yicong' + }, + weiyi:{ + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return (event.source&&event.source.countCards('he')); + }, + check:function(event,player){ + return get.attitude(player,event.source)<0; + }, + content:function(){ + trigger.source.chooseToDiscard(2,'he',true); + }, + logTarget:'source', + ai:{ + expose:0.3, + result:{ + target:function(card,player,target){ + if(player.countCards('he')>1&&get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing')) return [1,-1]; + if(get.attitude(target,player)<0) return [1,0,0,-1.5]; + } + } + } + } + }, + qiandu:{ + enable:'phaseUse', + usable:1, + changeSeat:true, + filterTarget:function(card,player,target){ + return player!=target&&player.next!=target; + }, + filterCard:{color:'black'}, + check:function(card){ + return 4-get.value(card); + }, + content:function(){ + game.swapSeat(player,target); + }, + ai:{ + order:5, + result:{ + player:function(player,target){ + var att=get.attitude(player,target); + if(target==player.previous&&att>0) return att; + if(target==player.next&&att<0) return -att; + var att2=get.attitude(player,player.next); + if(target==player.next.next&&att<0&&att2<0) return -att-att2; + return 0; + } + } + } + }, + nvquan:{ + group:['nvquan1','nvquan2','nvquan3'], + }, + nvquan1:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event){ + return event.target.sex=='male'; + }, + content:function(){ + "step 0" + var next=trigger.target.chooseToRespond({name:'shan'}); + next.autochoose=lib.filter.autoRespondShan; + next.ai=function(card){ + if(trigger.target.countCards('h','shan')>1){ + return get.unuseful2(card); + } + return -1; + }; + "step 1" + if(result.bool==false){ + trigger.untrigger(); + trigger.directHit=true; + } + } + }, + nvquan2:{ + trigger:{player:'juedou',target:'juedou'}, + forced:true, + filter:function(event,player){ + return event.turn!=player&&event.turn.sex=='male'; + }, + content:function(){ + "step 0" + var next=trigger.turn.chooseToRespond({name:'sha'}); + next.autochoose=lib.filter.autoRespondSha; + next.ai=function(card){ + if(get.attitude(trigger.turn,player)<0&&trigger.turn.countCards('h','sha')>1){ + return get.unuseful2(card); + } + return -1; + }; + "step 1" + if(result.bool==false){ + trigger.directHit=true; + } + }, + ai:{ + result:{ + target:function(card,player,target){ + if(card.name=='juedou'&&target.countCards('h')>0) return [1,0,0,-1]; + } + } + } + }, + nvquan3:{ + mod:{ + targetEnabled:function(card,player,target){ + if(card.name=='juedou'&&player.sex=='male'){ + return false; + } + } + } + }, + feigong:{ + trigger:{global:'useCard'}, + priority:15, + filter:function(event,player){ + return event.card.name=='sha'&&event.player!=player&& + player.countCards('h','sha')>0&&event.targets.contains(player)==false; + }, + direct:true, + content:function(){ + "step 0" + var effect=0; + for(var i=0;i2){ + eff+=0.5; + } + } + if(get.attitude(player,players[i])>0){ + num+=eff; + } + else if(get.attitude(player,players[i])<0){ + num-=eff; + } + } + return num>0; + }, + content:function(){ + "step 0" + event.targets=game.filterPlayer(); + event.targets.remove(player); + "step 1" + if(event.targets.length){ + event.targets.shift().recover(); + event.redo(); + } + }, + ai:{ + expose:0.1 + } + }, + jieyong:{ + trigger:{player:'useCardAfter'}, + direct:true, + filter:function(event,player){ + if(get.position(event.card)!='d') return false; + if(player.hasSkill('jieyong2')) return false; + return player.countCards('he',{color:'black'})>0; + }, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he','是否弃置一张黑色牌并收回'+get.translation(trigger.card)+'?',{color:'black'}); + next.ai=function(card){ + return get.value(trigger.card)-get.value(card); + } + next.logSkill='jieyong'; + "step 1" + if(result.bool){ + player.gain(trigger.card,'gain2'); + player.addTempSkill('jieyong2',['phaseAfter','phaseBegin']); + } + }, + ai:{ + threaten:1.3 + } + }, + jieyong2:{ + filterCard:{suit:'heart'}, + popname:true, + }, + jieyong3:{ + trigger:{player:'useCardBefore'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='jieyong2'; + }, + content:function(){ + player.popup(trigger.card.name); + player.getStat('skill').jieyong++; + } + }, + jieyong4:{}, + jieyong5:{}, + jieyong6:{}, + zhulu:{ + trigger:{global:'useCardAfter'}, + direct:true, + filter:function(event,player){ + return _status.currentPhase!=player&&event.player!=player&&get.type(event.card)=='trick'&& + get.position(event.card)=='d'&&!player.hasSkill('zhulu2')&& + get.itemtype(event.card)=='card'&&player.countCards('he',{suit:get.suit(event.card)})>0; + }, + content:function(){ + "step 0" + var val=get.value(trigger.card); + var suit=get.suit(trigger.card); + var next=player.chooseToDiscard('he','逐鹿:是否弃置一张'+get.translation(suit)+ + '牌并获得'+get.translation(trigger.card)+'?',{suit:suit}); + next.ai=function(card){ + return val-get.value(card); + }; + next.logSkill='zhulu'; + "step 1" + if(result.bool){ + player.gain(trigger.card,'gain2'); + player.addTempSkill('zhulu2','phaseAfter'); + } + }, + ai:{ + threaten:1.2 + } + }, + zhulu2:{}, + xieling:{ + enable:'phaseUse', + usable:1, + filterCard:true, + selectCard:2, + check:function(card){ + return 7-get.value(card); + }, + multitarget:true, + targetprompt:['被移走','移动目标'], + filterTarget:function(card,player,target){ + if(ui.selected.targets.length){ + var from=ui.selected.targets[0]; + var judges=from.getCards('j'); + for(var i=0;i0; + } + }, + selectTarget:2, + content:function(){ + "step 0" + if(targets.length==2){ + player.choosePlayerCard('ej',function(button){ + if(get.attitude(player,targets[0])>get.attitude(player,targets[1])){ + return get.position(button.link)=='j'?10:0; + } + else{ + if(get.position(button.link)=='j') return -10; + return get.equipValue(button.link); + } + },targets[0]); + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + if(get.position(result.buttons[0].link)=='e'){ + event.targets[1].equip(result.buttons[0].link); + } + else if(result.buttons[0].link.viewAs){ + event.targets[1].addJudge({name:result.buttons[0].link.viewAs},[result.buttons[0].link]); + } + else{ + event.targets[1].addJudge(result.buttons[0].link); + } + event.targets[0].$give(result.buttons[0].link,event.targets[1]) + game.delay(); + } + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(ui.selected.targets.length==0){ + if(target.countCards('j')&&get.attitude(player,target)>0) return 1; + if(get.attitude(player,target)<0){ + var players=game.filterPlayer(); + for(var i=0;i0){ + if((target.getEquip(1)&&!players[i].getEquip(1))|| + (target.getEquip(2)&&!players[i].getEquip(2))|| + (target.getEquip(3)&&!players[i].getEquip(3))|| + (target.getEquip(4)&&!players[i].getEquip(4))|| + (target.getEquip(5)&&!players[i].getEquip(5))) + return -1; + } + } + } + return 0; + } + else{ + return get.attitude(player,ui.selected.targets[0])>0?-1:1; + } + }, + }, + expose:0.2, + threaten:1.5 + } + }, + qiangyun:{ + trigger:{player:'loseEnd'}, + frequent:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.discardPlayerCard(target,true); + 'step 1' + if(result.bool){ + var type=get.type(result.cards[0]); + if(type!='basic'&&type!='trick'){ + player.chooseToDiscard('he',true); + event.finish(); + } + else{ + event.card=result.cards[0]; + } + } + else{ + event.finish(); + } + 'step 2' + var card=event.card; + card={name:card.name,nature:card.nature,suit:card.suit,number:card.number}; + if(lib.filter.cardEnabled(card)){ + if(game.hasPlayer(function(current){ + return player.canUse(card,current); + })){ + lib.skill.miaobix.viewAs=card; + var next=player.chooseToUse(); + next.logSkill='miaobi'; + next.set('openskilldialog','妙笔:将一张手牌当'+get.translation(card)+'使用'); + next.set('norestore',true); + next.set('_backupevent','miaobix'); + next.backup('miaobix'); + } + } + }, + ai:{ + order:9, + result:{ + target:-1 + } + } + }, + zhexian:{ + trigger:{player:'loseEnd'}, + usable:1, + filter:function(event,player){ + return _status.currentPhase!=player; + }, + frequent:true, + content:function(){ + player.draw(); + } + }, + guifu:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.countCards('e')>0; + }, + content:function(){ + 'step 0' + player.discardPlayerCard(target,'e',true); + 'step 1' + game.asyncDraw([player,target]); + }, + ai:{ + order:8, + threaten:1.5, + result:{ + target:-1, + player:0.5 + } + } + }, + lshengong:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return player!=target&&target.hasCard(function(card){ + return !get.info(card).unique; + },'e'); + }, + check:function(card){ + return 6-get.value(card); + }, + filterCard:function(card){ + var info=lib.card[card.name]; + if(!info) return false; + return !info.image&&!info.fullimage; + }, + discard:false, + lose:false, + content:function(){ + 'step 0' + var next=player.choosePlayerCard(target,'e',true); + next.ai=get.buttonValue; + next.filterButton=function(button){ + return !get.info(button.link).unique; + } + 'step 1' + if(result.links[0]){ + cards[0].init([result.links[0].suit,result.links[0].number,result.links[0].name,result.links[0].nature]); + event.card=cards[0]; + player.chooseTarget('选择一个角色装备'+get.translation(result.links),function(card,player,target){ + return !target.isMin(); + }).ai=function(target){ + if(!target.countCards('e',{subtype:get.subtype(event.card)})){ + return get.attitude(player,target); + } + return 0; + } + } + else{ + event.finish(); + } + 'step 2' + if(result.targets&&result.targets[0]&&event.card){ + player.$give(event.card,result.targets[0]); + game.delay(); + event.toequip=result.targets[0]; + } + else{ + event.finish(); + } + 'step 3' + if(event.toequip){ + event.toequip.equip(event.card); + } + }, + ai:{ + order:9, + threaten:1.5, + result:{ + player:function(player){ + if(player.countCards('e')<3) return 1; + return 0; + } } } } - } - }, - translate:{ - yxs_guanyu:'关羽', - yxs_wuzetian:'武则天', - yxs_caocao:'曹操', - yxs_mozi:'墨子', - yxs_bole:'伯乐', - yxs_aijiyanhou:'埃及艳后', - yxs_diaochan:'貂蝉', - yxs_yangyuhuan:'杨玉环', - yxs_baosi:'褒姒', - yxs_napolun:'拿破仑', - yxs_kaisa:'凯撒', - yxs_zhuyuanzhang:'朱元璋', - yxs_jinke:'荆轲', - yxs_libai:'李白', - yxs_luban:'鲁班', - yxs_lvzhi:'吕雉', - yxs_goujian:'勾践', - yxs_lishimin:'李世民', - yxs_huamulan:'花木兰', - yxs_luobinhan:'罗宾汉', - yxs_chengjisihan:'成吉思汗', - yxs_mingchenghuanghou:'明成皇后', - yxs_wangzhaojun:'王昭君', - yxs_luocheng:'罗成', - yxs_direnjie:'狄仁杰', - yxs_sunwu:'孙武', - yxs_chengyaojin:'程咬金', - yxs_yujix:'虞姬', - yxs_xiangyu:'项羽', - yxs_yingzheng:'嬴政', - yxs_yuefei:'岳飞', - yxs_fuermosi:'福尔摩斯', - yxs_guiguzi:'鬼谷子', - yxs_xiaoqiao:'小乔', - yxs_luzhishen:'鲁智深', - yxs_handingdun:'汉丁顿伯爵', - yxs_zhaoyong:'赵雍', - yxs_yangguang:'杨广', - yxs_tangbohu:'唐伯虎', - yxs_zhangsanfeng:'张三丰', - yxs_nandinggeer:'南丁格尔', - yxs_weizhongxian:'魏忠贤', - yxs_lanlinwang:'兰陵王', - yxs_meixi:'妹喜', + }, + translate:{ + yxs_guanyu:'关羽', + yxs_wuzetian:'武则天', + yxs_caocao:'曹操', + yxs_mozi:'墨子', + yxs_bole:'伯乐', + yxs_aijiyanhou:'埃及艳后', + yxs_diaochan:'貂蝉', + yxs_yangyuhuan:'杨玉环', + yxs_baosi:'褒姒', + yxs_napolun:'拿破仑', + yxs_kaisa:'凯撒', + yxs_zhuyuanzhang:'朱元璋', + yxs_jinke:'荆轲', + yxs_libai:'李白', + yxs_luban:'鲁班', + yxs_lvzhi:'吕雉', + yxs_goujian:'勾践', + yxs_lishimin:'李世民', + yxs_huamulan:'花木兰', + yxs_luobinhan:'罗宾汉', + yxs_chengjisihan:'成吉思汗', + yxs_mingchenghuanghou:'明成皇后', + yxs_wangzhaojun:'王昭君', + yxs_luocheng:'罗成', + yxs_direnjie:'狄仁杰', + yxs_sunwu:'孙武', + yxs_chengyaojin:'程咬金', + yxs_yujix:'虞姬', + yxs_xiangyu:'项羽', + yxs_yingzheng:'嬴政', + yxs_yuefei:'岳飞', + yxs_fuermosi:'福尔摩斯', + yxs_guiguzi:'鬼谷子', + yxs_xiaoqiao:'小乔', + yxs_luzhishen:'鲁智深', + yxs_handingdun:'汉丁顿伯爵', + yxs_zhaoyong:'赵雍', + yxs_yangguang:'杨广', + yxs_tangbohu:'唐伯虎', + yxs_zhangsanfeng:'张三丰', + yxs_nandinggeer:'南丁格尔', + yxs_weizhongxian:'魏忠贤', + yxs_lanlinwang:'兰陵王', + yxs_meixi:'妹喜', - zhuxin:'诛心', - zhuxin_info:'出牌阶段限一次,你可以与一名其他角色拼点,若你赢,你对其造成一点伤害', - wlianhuan:'连环', - wlianhuan_info:'你使用杀造成伤害时,可以弃置一张装备区内的牌并令伤害+1', - liebo:'裂帛', - liebo_info:'出牌阶段限一次,你可以将你的手牌与一名其他角色交换(手牌数之差不能多于1)', - yaoji:'妖姬', - yaoji_info:'每当你受到一次伤害,你可以将一张乐不思蜀置入伤害来源的判定区', - guimian:'鬼面', - guimian_info:'锁定技,每当你在出牌阶段使用杀造成伤害,本阶段内出杀次数上限+1', - lyuxue:'浴血', - lyuxue2:'浴血', - lyuxue_info:'锁定技,每当你造成一次伤害,若目标没有浴血标记,你令其获得一个浴血标记;当一名角色失去浴血标记时,其流失一点体力;准备阶段,若场上浴血标记的数量不少于存活角色数的一半(向下取整),你清空浴血标记;当你即将死亡时,你清空浴血标记', - huli:'护理', - huli_info:'出牌阶段,你可以将一张红桃手牌当作桃对距离1以内的角色使用', - yixin:'医心', - yixin_info:'限定技,你可以弃置两张牌,然后令一名已受伤角色回复X点体力并摸4-X张牌(X为该角色已损失的体力值且不超过4)', - xianqu:'先驱', - xianqu_info:'锁定技,你不能成为点数小于8的杀的目标', - zbudao:'布道', - zbudao_info:'摸牌阶段,你可以额外摸一张牌,然后将摸到的牌中的一张交给一名其他角色', - taiji:'太极', - taiji_info:'每当你使用或打出一张闪,你可以使用一张杀', - luobi:'落笔', - luobi_info:'结束阶段,可以摸数量等同于已损失体力值的牌,并以任意方式分配给任意角色', - fengliu:'风流', - fengliu_info:'锁定技,摸牌阶段,你额外摸X张牌,X为存活女性角色数且不超过2', - shiqin:'弑亲', - shiqin_info:'锁定技,其他群势力角色濒死时,你令其立即死亡', - yjujian:'拒谏', - yjujian_info:'出牌阶段限一次,你可以交给一名其他角色一张牌,该角色的锦囊牌不能指定你为目标直到你的下一回合开始', - yaoyi:'徭役', - yaoyi_info:'每当你受到一次伤害,你可以令至多2名非群势力角色交给你一张手牌', - zyhufu:'胡服', - zyhufu_info:'锁定技,当你的装备区内没有防具牌时,你摸牌阶段额外摸一张牌;当你装备区内有防具牌时,你的手牌上限+5', - hanbei:'捍北', - hanbei_info:'锁定技,你的装备区有马时,你的杀不可闪避', - kuangchan:'狂禅', - kuangchan_info:'锁定技,你做主公时,不增加体力上限', - dili:'底力', - dili_info:'锁定技,摸牌阶段,你额外摸X张牌,X为你已损失的体力值', - dili_info_alter:'锁定技,摸牌阶段,你额外摸X张牌,X为你已损失的体力值的一半,向上取整', - chujia:'初嫁', - chujia_info:'出牌阶段限一次,你可以弃置两张相同颜色的手牌,指定任意一名角色摸X张牌。(X为该角色已损失的体力值) ', - zhijie:'知节', - zhijie_info:'出牌阶段限一次,你的红桃手牌可以当做无中生有使用', - baihe:'捭阖', - baihe_info:'出牌阶段限一次,你可以弃置一张牌,选择以下1项执行:(1)横置1名未横置角色,该角色摸一张牌;(2)重置一名已横置角色,该角色弃置一张手牌', - yinyang:'阴阳', - yinyang_info:'出牌阶段限一次,你可以弃置两张手牌并选择3名角色,分别横置或重置这些角色', - xiushen:'修身', - xiushen_info:'锁定技,结束阶段,若场上有横置角色,你摸两张牌', - xiushen_info_alter:'锁定技,出牌阶段结束时,若场上有横置角色,你摸两张牌', - yanyi:'演绎', - yanyi_info:'出牌阶段限一次,你可以弃置一张黑色牌,指定1名角色和1种花色,若被指定角色的手牌中含有此花色,则受到1点伤害', - jiean:'结案', - jiean_info:'每当【演绎】造成伤害时,你可以摸X张牌,并以任意数量分配给任意角色(X为被【演绎】造成伤害角色的已损失体力值)。', - wumu:'武穆', - wumu_info:'锁定技,你的黑杀无视距离,红色不计入回合内的出杀限制', - ysheshen:'舍身', - ysheshen_info:'每当你受到一点伤害,可以观看牌堆顶的两张牌,并将其交给任意1~2名角色', - sanbanfu:'三板斧', - sanbanfu_info:'当你对其他角色使用杀时,你可以使此杀有如下效果:若对方没有出闪,其受到2点伤害;若对方打出了一张闪,你与其各受到1点伤害;若对方打出了两张闪,你受到一点伤害', - bingsheng:'兵圣', - bingsheng_info:'出牌阶段限一次,你可以弃置两张花色不同的手牌,指定一名其他角色使其体力值与你相同', - taolue:'韬略', - taolue_info:'锁定技,你的手牌上限+1', - shentan:'神探', - shentan_info:'出牌阶段限一次,你可以弃置一张牌,获得距离2以内的一名角色的手牌,并可以将其交给任意一名角色', - hanqiang:'寒枪', - hanqiang_info:'锁定技,当你没装备武器时,攻击范围+1', - biaoqi:'骠骑', - biaoqi_info:'锁定技,当你出杀指定目标后,若你的攻击范围大于目标体力值,则此杀不可闪避;若你的攻击范围小于目标体力值,你摸一张牌', - wluoyan:'落雁', - wluoyan_info:'锁定技,你防止即将受到的伤害,改为流失一点体力', - heqin:'和亲', - heqin2:'和亲', - heqin3:'和亲', - heqin_info:'限定技,你可以与场上一名男性角色形成【和亲】状态,你与该男性角色于摸牌阶段摸牌数+1。你或者男性角色阵亡时,【和亲】状态消失', - chajue:'察觉', - chajue2:'察觉', - chajue_info:'锁定技,你的回合外,你每受到一次伤害,任何【杀】或普通锦囊牌均对你无效,直到你的回合开始', - tiewan:'铁腕', - tiewan_info:'每当其他角色使用延时类锦囊牌时,你可以立即将一张红色牌当作乐不思蜀使用', - qianglue:'强掠', - qianglue_info:'每当你的杀被闪避时,你可以进行一次判定,若结果为黑色,你可以获得对方的一张牌', - xiadao:'侠盗', - xiadao_info:'每当你造成一次伤害,你可以令一名手牌数不少于受伤害角色的另一名角色获得其一张手牌', - jimin:'机敏', - jimin_info:'当你的装备区内没有牌时,你可以将一张手牌当作闪使用或打出', - sheshu:'射术', - sheshu_info:'锁定技,你的杀无视距离;体力值不小于3的角色不能闪避你的杀', - tongyu:'统御', - tongyu_info:'出牌阶段,你可以弃置一张牌,并转变为罗宾汉(每回合只能转变一次)', - lguiyin:'归隐', - lguiyin_info:'出牌阶段,若你本回合内未造成伤害,你可以摸一张牌,并转变为汉丁顿伯爵(每回合只能转变一次)', - lzhangyi:'仗义', - lzhangyi_info:'你可以将你弃置的卡牌交给一名其他角色', - yizhuang:'易装', - yizhuang2:'易装', - yizhuang_info:'准备阶段,你可以弃置一张牌并选择一名男性角色,获得其所有技能,直到你首次受到伤害', - kongju:'控局', - kongju_info:'锁定技,你的手牌上限为你的体力上限;当你的手牌数小于体力上限时,你不能成为过河拆桥或顺手牵羊的目标;当你的手牌数大于体力上限时,你不能成为乐不思蜀的目标', - tuqiang:'图强', - tuqiang_info:'每当你使用或打出一张闪,你可以摸一张牌', - zhensha:'鸩杀', - zhensha_info:'当场上有角色进入濒死状态时,你可以弃置一张酒或两张黑色手牌,则该角色立即死亡。', - xumou:'蓄谋', - xumou_info:'结束阶段,你可以将武将牌翻面并摸3张牌', - guifu:'鬼斧', - guifu_info:'出牌阶段限一次,你可以指定一名角色装备区内的一张牌,将其弃掉,自己和对方同时摸取一张牌', - lshengong:'神工', - lshengong_info:'出牌阶段限一次,你可以选定场上任意一名角色的装备区的非特殊牌,出自己的一张手牌复制该装备,然后可以选择装备上自己或者别的角色的装备区', - zhexian:'谪仙', - zhexian_info:'当你于一名其他角色的回合内首次失去牌时,你可以摸一张牌', - miaobi:'妙笔', - miaobi_info:'出牌阶段限一次,你可以弃置一名其他角色的一张牌,若此牌是基本牌或普通锦囊,你可以将一张手牌当此牌使用;否则你须弃置一张牌', - cike:'刺客', - cike_info:'你对别的角色出【杀】时可以选择做一次判定:若判定牌为红色花色,则此【杀】不可回避,直接命中;若判定牌为黑色花色,你可以选择弃掉对方一张牌。', - qiangyun:'强运', - qiangyun_info:'每当你失去最后一张手牌,可摸两张牌', - ducai:'独裁', - ducai2:'独裁', - ducai3:'独裁', - ducai_info:'出牌阶段限一次,你可以弃置一张牌,则本轮内除你外的角色不能使用或打出与该手牌花色相同的手牌', - tongling:'统领', - tongling_info:'每当其他角色受到一次伤害时,你获得1个统领标记(标记上限为3)', - fanpu:'反扑', - fanpu_info:'出牌阶段限一次,你可以弃掉3个统领标记并选择1项执行:(1)本轮内不能成为【杀】的目标;(2)对你攻击范围内的1名其他角色造成1点伤害。', - fenghuo:'烽火', - fenghuo_info:'你可以将一张装备区内的牌当作南蛮入侵使用', - weiyi:'威仪', - weiyi_info:'每当你受到一次伤害,可以令伤害来源弃置两张牌', - xieling:'挟令', - xieling_info:'出牌阶段,弃掉两张手牌,将任意一名角色装备区或判定区的牌移动到另一名角色对应的区域', - baye:'霸业', - baye_info:'出牌阶段,你可以将一张牌当做本回合内前一张使用的牌来使用。每回合限用一次。', - nvquan:'女权', - nvquan1:'女权', - nvquan2:'女权', - nvquan_info:'你对男性角色使用【杀】或【决斗】时,对方需连续打出两张【闪】或【杀】响应;你不能成为男性角色的决斗目标', - qiandu:'迁都', - qiandu_info:'出牌阶段,你可以弃一张黑色手牌,和一名存活的玩家与其交换位置。每回合限一次。', - budao:'补刀', - budao_info:'你的回合外,你的攻击范围的一名角色受到【杀】的伤害时,你可以对其使用一张【杀】,只要你的【杀】对目标角色造成了伤害,你就可以继续对其使用【杀】。', - feigong:'非攻', - feigong_info:'其他角色使用杀时,若你不是杀的目标,可以弃置一张杀取消之', - jianai:'兼爱', - jianai_info:'每当你回复一点体力,可以令所有其他角色回复一点体力', - bolehuiyan:'慧眼', - bolehuiyan_info:'当一名有手牌的其他角色成为来源不为你的杀的目标时,你可以预言此杀能否命中,若预言正确,你摸一张牌,否则你须弃置一张牌。每回合限发动一次', - xiangma:'相马', - xiangma_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1', - seyou:'色诱', - seyou_info:'限定技,出牌阶段,你可以指定任意1名角色,其他所有男性角色需选择1项执行:(1)对你指定的角色出【杀】;(2)令你获得其一张牌。', - sheshi:'蛇噬', - sheshi_info:'每受到1次伤害,可以指定1种花色,依次展示牌堆顶的牌,直到出现指定花色的牌为止,你获得与指定花色不同花色的所有牌(最多展示4张牌)。', + zhuxin:'诛心', + zhuxin_info:'出牌阶段限一次,你可以与一名其他角色拼点,若你赢,你对其造成一点伤害', + wlianhuan:'连环', + wlianhuan_info:'你使用杀造成伤害时,可以弃置一张装备区内的牌并令伤害+1', + liebo:'裂帛', + liebo_info:'出牌阶段限一次,你可以将你的手牌与一名其他角色交换(手牌数之差不能多于1)', + yaoji:'妖姬', + yaoji_info:'每当你受到一次伤害,你可以将一张乐不思蜀置入伤害来源的判定区', + guimian:'鬼面', + guimian_info:'锁定技,每当你在出牌阶段使用杀造成伤害,本阶段内出杀次数上限+1', + lyuxue:'浴血', + lyuxue2:'浴血', + lyuxue_info:'锁定技,每当你造成一次伤害,若目标没有浴血标记,你令其获得一个浴血标记;当一名角色失去浴血标记时,其流失一点体力;准备阶段,若场上浴血标记的数量不少于存活角色数的一半(向下取整),你清空浴血标记;当你即将死亡时,你清空浴血标记', + huli:'护理', + huli_info:'出牌阶段,你可以将一张红桃手牌当作桃对距离1以内的角色使用', + yixin:'医心', + yixin_info:'限定技,你可以弃置两张牌,然后令一名已受伤角色回复X点体力并摸4-X张牌(X为该角色已损失的体力值且不超过4)', + xianqu:'先驱', + xianqu_info:'锁定技,你不能成为点数小于8的杀的目标', + zbudao:'布道', + zbudao_info:'摸牌阶段,你可以额外摸一张牌,然后将摸到的牌中的一张交给一名其他角色', + taiji:'太极', + taiji_info:'每当你使用或打出一张闪,你可以使用一张杀', + luobi:'落笔', + luobi_info:'结束阶段,可以摸数量等同于已损失体力值的牌,并以任意方式分配给任意角色', + fengliu:'风流', + fengliu_info:'锁定技,摸牌阶段,你额外摸X张牌,X为存活女性角色数且不超过2', + shiqin:'弑亲', + shiqin_info:'锁定技,其他群势力角色濒死时,你令其立即死亡', + yjujian:'拒谏', + yjujian_info:'出牌阶段限一次,你可以交给一名其他角色一张牌,该角色的锦囊牌不能指定你为目标直到你的下一回合开始', + yaoyi:'徭役', + yaoyi_info:'每当你受到一次伤害,你可以令至多2名非群势力角色交给你一张手牌', + zyhufu:'胡服', + zyhufu_info:'锁定技,当你的装备区内没有防具牌时,你摸牌阶段额外摸一张牌;当你装备区内有防具牌时,你的手牌上限+5', + hanbei:'捍北', + hanbei_info:'锁定技,你的装备区有马时,你的杀不可闪避', + kuangchan:'狂禅', + kuangchan_info:'锁定技,你做主公时,不增加体力上限', + dili:'底力', + dili_info:'锁定技,摸牌阶段,你额外摸X张牌,X为你已损失的体力值', + dili_info_alter:'锁定技,摸牌阶段,你额外摸X张牌,X为你已损失的体力值的一半,向上取整', + chujia:'初嫁', + chujia_info:'出牌阶段限一次,你可以弃置两张相同颜色的手牌,指定任意一名角色摸X张牌。(X为该角色已损失的体力值) ', + zhijie:'知节', + zhijie_info:'出牌阶段限一次,你的红桃手牌可以当做无中生有使用', + baihe:'捭阖', + baihe_info:'出牌阶段限一次,你可以弃置一张牌,选择以下1项执行:(1)横置1名未横置角色,该角色摸一张牌;(2)重置一名已横置角色,该角色弃置一张手牌', + yinyang:'阴阳', + yinyang_info:'出牌阶段限一次,你可以弃置两张手牌并选择3名角色,分别横置或重置这些角色', + xiushen:'修身', + xiushen_info:'锁定技,结束阶段,若场上有横置角色,你摸两张牌', + xiushen_info_alter:'锁定技,出牌阶段结束时,若场上有横置角色,你摸两张牌', + yanyi:'演绎', + yanyi_info:'出牌阶段限一次,你可以弃置一张黑色牌,指定1名角色和1种花色,若被指定角色的手牌中含有此花色,则受到1点伤害', + jiean:'结案', + jiean_info:'每当【演绎】造成伤害时,你可以摸X张牌,并以任意数量分配给任意角色(X为被【演绎】造成伤害角色的已损失体力值)。', + wumu:'武穆', + wumu_info:'锁定技,你的黑杀无视距离,红色不计入回合内的出杀限制', + ysheshen:'舍身', + ysheshen_info:'每当你受到一点伤害,可以观看牌堆顶的两张牌,并将其交给任意1~2名角色', + sanbanfu:'三板斧', + sanbanfu_info:'当你对其他角色使用杀时,你可以使此杀有如下效果:若对方没有出闪,其受到2点伤害;若对方打出了一张闪,你与其各受到1点伤害;若对方打出了两张闪,你受到一点伤害', + bingsheng:'兵圣', + bingsheng_info:'出牌阶段限一次,你可以弃置两张花色不同的手牌,指定一名其他角色使其体力值与你相同', + taolue:'韬略', + taolue_info:'锁定技,你的手牌上限+1', + shentan:'神探', + shentan_info:'出牌阶段限一次,你可以弃置一张牌,获得距离2以内的一名角色的手牌,并可以将其交给任意一名角色', + hanqiang:'寒枪', + hanqiang_info:'锁定技,当你没装备武器时,攻击范围+1', + biaoqi:'骠骑', + biaoqi_info:'锁定技,当你出杀指定目标后,若你的攻击范围大于目标体力值,则此杀不可闪避;若你的攻击范围小于目标体力值,你摸一张牌', + wluoyan:'落雁', + wluoyan_info:'锁定技,你防止即将受到的伤害,改为流失一点体力', + heqin:'和亲', + heqin2:'和亲', + heqin3:'和亲', + heqin_info:'限定技,你可以与场上一名男性角色形成【和亲】状态,你与该男性角色于摸牌阶段摸牌数+1。你或者男性角色阵亡时,【和亲】状态消失', + chajue:'察觉', + chajue2:'察觉', + chajue_info:'锁定技,你的回合外,你每受到一次伤害,任何【杀】或普通锦囊牌均对你无效,直到你的回合开始', + tiewan:'铁腕', + tiewan_info:'每当其他角色使用延时类锦囊牌时,你可以立即将一张红色牌当作乐不思蜀使用', + qianglue:'强掠', + qianglue_info:'每当你的杀被闪避时,你可以进行一次判定,若结果为黑色,你可以获得对方的一张牌', + xiadao:'侠盗', + xiadao_info:'每当你造成一次伤害,你可以令一名手牌数不少于受伤害角色的另一名角色获得其一张手牌', + jimin:'机敏', + jimin_info:'当你的装备区内没有牌时,你可以将一张手牌当作闪使用或打出', + sheshu:'射术', + sheshu_info:'锁定技,你的杀无视距离;体力值不小于3的角色不能闪避你的杀', + tongyu:'统御', + tongyu_info:'出牌阶段,你可以弃置一张牌,并转变为罗宾汉(每回合只能转变一次)', + lguiyin:'归隐', + lguiyin_info:'出牌阶段,若你本回合内未造成伤害,你可以摸一张牌,并转变为汉丁顿伯爵(每回合只能转变一次)', + lzhangyi:'仗义', + lzhangyi_info:'你可以将你弃置的卡牌交给一名其他角色', + yizhuang:'易装', + yizhuang2:'易装', + yizhuang_info:'准备阶段,你可以弃置一张牌并选择一名男性角色,获得其所有技能,直到你首次受到伤害', + kongju:'控局', + kongju_info:'锁定技,你的手牌上限为你的体力上限;当你的手牌数小于体力上限时,你不能成为过河拆桥或顺手牵羊的目标;当你的手牌数大于体力上限时,你不能成为乐不思蜀的目标', + tuqiang:'图强', + tuqiang_info:'每当你使用或打出一张闪,你可以摸一张牌', + zhensha:'鸩杀', + zhensha_info:'当场上有角色进入濒死状态时,你可以弃置一张酒或两张黑色手牌,则该角色立即死亡。', + xumou:'蓄谋', + xumou_info:'结束阶段,你可以将武将牌翻面并摸3张牌', + guifu:'鬼斧', + guifu_info:'出牌阶段限一次,你可以指定一名角色装备区内的一张牌,将其弃掉,自己和对方同时摸取一张牌', + lshengong:'神工', + lshengong_info:'出牌阶段限一次,你可以选定场上任意一名角色的装备区的非特殊牌,出自己的一张手牌复制该装备,然后可以选择装备上自己或者别的角色的装备区', + zhexian:'谪仙', + zhexian_info:'当你于一名其他角色的回合内首次失去牌时,你可以摸一张牌', + miaobi:'妙笔', + miaobi_info:'出牌阶段限一次,你可以弃置一名其他角色的一张牌,若此牌是基本牌或普通锦囊,你可以将一张手牌当此牌使用;否则你须弃置一张牌', + cike:'刺客', + cike_info:'你对别的角色出【杀】时可以选择做一次判定:若判定牌为红色花色,则此【杀】不可回避,直接命中;若判定牌为黑色花色,你可以选择弃掉对方一张牌。', + qiangyun:'强运', + qiangyun_info:'每当你失去最后一张手牌,可摸两张牌', + ducai:'独裁', + ducai2:'独裁', + ducai3:'独裁', + ducai_info:'出牌阶段限一次,你可以弃置一张牌,则本轮内除你外的角色不能使用或打出与该手牌花色相同的手牌', + tongling:'统领', + tongling_info:'每当其他角色受到一次伤害时,你获得1个统领标记(标记上限为3)', + fanpu:'反扑', + fanpu_info:'出牌阶段限一次,你可以弃掉3个统领标记并选择1项执行:(1)本轮内不能成为【杀】的目标;(2)对你攻击范围内的1名其他角色造成1点伤害。', + fenghuo:'烽火', + fenghuo_info:'你可以将一张装备区内的牌当作南蛮入侵使用', + weiyi:'威仪', + weiyi_info:'每当你受到一次伤害,可以令伤害来源弃置两张牌', + xieling:'挟令', + xieling_info:'出牌阶段,弃掉两张手牌,将任意一名角色装备区或判定区的牌移动到另一名角色对应的区域', + baye:'霸业', + baye_info:'出牌阶段,你可以将一张牌当做本回合内前一张使用的牌来使用。每回合限用一次。', + nvquan:'女权', + nvquan1:'女权', + nvquan2:'女权', + nvquan_info:'你对男性角色使用【杀】或【决斗】时,对方需连续打出两张【闪】或【杀】响应;你不能成为男性角色的决斗目标', + qiandu:'迁都', + qiandu_info:'出牌阶段,你可以弃一张黑色手牌,和一名存活的玩家与其交换位置。每回合限一次。', + budao:'补刀', + budao_info:'你的回合外,你的攻击范围的一名角色受到【杀】的伤害时,你可以对其使用一张【杀】,只要你的【杀】对目标角色造成了伤害,你就可以继续对其使用【杀】。', + feigong:'非攻', + feigong_info:'其他角色使用杀时,若你不是杀的目标,可以弃置一张杀取消之', + jianai:'兼爱', + jianai_info:'每当你回复一点体力,可以令所有其他角色回复一点体力', + bolehuiyan:'慧眼', + bolehuiyan_info:'当一名有手牌的其他角色成为来源不为你的杀的目标时,你可以预言此杀能否命中,若预言正确,你摸一张牌,否则你须弃置一张牌。每回合限发动一次', + xiangma:'相马', + xiangma_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1', + seyou:'色诱', + seyou_info:'限定技,出牌阶段,你可以指定任意1名角色,其他所有男性角色需选择1项执行:(1)对你指定的角色出【杀】;(2)令你获得其一张牌。', + sheshi:'蛇噬', + sheshi_info:'每受到1次伤害,可以指定1种花色,依次展示牌堆顶的牌,直到出现指定花色的牌为止,你获得与指定花色不同花色的所有牌(最多展示4张牌)。', - fengyi:'凤仪', - fengyi_info:'出牌阶段,你可以弃一张手牌,指定任意目标摸两张牌。(每回合限用一次)', - wange:'婉歌', - wange_info:'摸牌时,你可以少摸一张牌,则结束阶段你可以抽取一名其他角色的手牌,至少1张,至多X张(X为你当前的掉血量)。', - nichang:'霓裳', - nichang2:'霓裳', - nichang_info:'摸牌时,你可以选择不摸牌,并在结束阶段展示手牌,每少一种花色摸一张牌', - fengyan:'丰艳', - fengyan_info:'你可以获得其他男性角色的红色判定牌', - zhulu:'逐鹿', - zhulu_info:'回合外,当有普通锦囊牌结算完毕后,你可以立即弃掉一张相同花色手牌或装备区的牌,获得这张锦囊牌。', - jieyong:'节用', - jieyong2:'节用', - jieyong_info:'你使用的卡牌进入弃牌堆后,你可以弃置一张黑色牌并重新获得之(每回合限一次)', - shangtong:'尚同', - shangtong_info:'每当你令其他角色恢复1点血量或掉1点血量时,你可以摸1张牌(摸牌上限为4)', - feiming:'非命', - feiming_info:'其他角色对你造成伤害时,你可以令该角色须选择1项执行:1,将1张红桃花色手牌交给你;2,流失1点血量', - yxsrenwang:'人望', - yxsrenwang_info:'出牌阶段,你可以弃掉2张牌并指定一名手牌数大于你的角色,你摸牌至与该角色手牌数相等,每阶段限一次。', - shiwei:'施威', - shiwei_info:'当其他角色失去最后一张手牌时,你可以将牌堆顶的一张牌背面朝上置于该角色面前,该角色回合,跳过出牌阶段并弃掉这张牌。', - yxswushuang:'无双', - yxswushuang_info:'出牌阶段,你使用【杀】时可同时打出两张【杀】,则该【杀】具有以下效果之一:1,伤害+1;2,额外指定两个目标', - xiaoyong:'骁勇', - xiaoyong_info:'你可以将黑色手牌当作【杀】来使用', - qinzheng:'亲征', - qinzheng_info:'出牌阶段,你对其他角色造成伤害时,可以令场上任意角色摸一张牌。', - juma:'拒马', - juma_info:'你与其他角色的距离始终视为1。', - }, + fengyi:'凤仪', + fengyi_info:'出牌阶段,你可以弃一张手牌,指定任意目标摸两张牌。(每回合限用一次)', + wange:'婉歌', + wange_info:'摸牌时,你可以少摸一张牌,则结束阶段你可以抽取一名其他角色的手牌,至少1张,至多X张(X为你当前的掉血量)。', + nichang:'霓裳', + nichang2:'霓裳', + nichang_info:'摸牌时,你可以选择不摸牌,并在结束阶段展示手牌,每少一种花色摸一张牌', + fengyan:'丰艳', + fengyan_info:'你可以获得其他男性角色的红色判定牌', + zhulu:'逐鹿', + zhulu_info:'回合外,当有普通锦囊牌结算完毕后,你可以立即弃掉一张相同花色手牌或装备区的牌,获得这张锦囊牌。', + jieyong:'节用', + jieyong2:'节用', + jieyong_info:'你使用的卡牌进入弃牌堆后,你可以弃置一张黑色牌并重新获得之(每回合限一次)', + shangtong:'尚同', + shangtong_info:'每当你令其他角色恢复1点血量或掉1点血量时,你可以摸1张牌(摸牌上限为4)', + feiming:'非命', + feiming_info:'其他角色对你造成伤害时,你可以令该角色须选择1项执行:1,将1张红桃花色手牌交给你;2,流失1点血量', + yxsrenwang:'人望', + yxsrenwang_info:'出牌阶段,你可以弃掉2张牌并指定一名手牌数大于你的角色,你摸牌至与该角色手牌数相等,每阶段限一次。', + shiwei:'施威', + shiwei_info:'当其他角色失去最后一张手牌时,你可以将牌堆顶的一张牌背面朝上置于该角色面前,该角色回合,跳过出牌阶段并弃掉这张牌。', + yxswushuang:'无双', + yxswushuang_info:'出牌阶段,你使用【杀】时可同时打出两张【杀】,则该【杀】具有以下效果之一:1,伤害+1;2,额外指定两个目标', + xiaoyong:'骁勇', + xiaoyong_info:'你可以将黑色手牌当作【杀】来使用', + qinzheng:'亲征', + qinzheng_info:'出牌阶段,你对其他角色造成伤害时,可以令场上任意角色摸一张牌。', + juma:'拒马', + juma_info:'你与其他角色的距离始终视为1。', + }, + }; }); diff --git a/character/zhuogui.js b/character/zhuogui.js index 0726db688..7e6aeb335 100644 --- a/character/zhuogui.js +++ b/character/zhuogui.js @@ -1,341 +1,349 @@ 'use strict'; -game.import('character',{ - name:'zhuogui', - character:{ - nianshou:['male','shu',4,['nianrui','qixiang']], - mamian:['male','qun',4,['lianyu','guiji']], - niutou:['male','shu',4,['manjia','xiaoshou']], - baiwuchang:['male','qun',3,['qiangzheng','moukui']], - heiwuchang:['male','qun',3,['suoling','xixing']], - }, - skill:{ - qixiang:{ - group:['qixiang1','qixiang2'], - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='lebu'&&card.name=='bingliang') return 0.8; - } - } - } - }, - qixiang1:{ - trigger:{player:'judge'}, - forced:true, - filter:function(event,player){ - if(event.card){ - if(event.card.viewAs){ - return event.card.viewAs=='lebu'; - } - else{ - return event.card.name=='lebu'; - } - } - }, - content:function(){ - player.addTempSkill('qixiang3','phaseJudgeAfter'); - } - }, - qixiang2:{ - trigger:{player:'judge'}, - forced:true, - filter:function(event,player){ - if(event.card){ - if(event.card.viewAs){ - return event.card.viewAs=='bingliang'; - } - else{ - return event.card.name=='bingliang'; - } - } - }, - content:function(){ - player.addTempSkill('qixiang4','phaseJudgeAfter'); - } - }, - qixiang3:{ - mod:{ - suit:function(card,suit){ - if(suit=='diamond') return 'heart'; - } - } - }, - qixiang4:{ - mod:{ - suit:function(card,suit){ - if(suit=='spade') return 'club'; - } - } - }, - nianrui:{ - trigger:{player:['phaseBegin','phaseEnd']}, - content:function(){ - "step 0" - player.judge(function(card){ - return get.color(card)=='red'?1:0; - }); - "step 1" - if(result.bool){ - player.draw(); - } - } - }, - lianyu:{ - enable:'phaseUse', - usable:1, - filterCard:{color:'red'}, - check:function(card){return 6-get.value(card)}, - filterTarget:true, - selectTarget:-1, - line:'fire', - content:function(){ - target.damage('fire'); - }, - ai:{ - result:{ - player:function(card,player,target){ - var eff=0; - for(var i=0;iplayers[1].hp&&players[0]!=player; - }, - check:function(event,player){ - var players=game.players.slice(0); - players.sort(function(a,b){ - return b.hp-a.hp; - }); - return get.damageEffect(players[0],player,player,'fire')>0; - }, - prompt:function(){ - var players=game.players.slice(0); - players.sort(function(a,b){ - return b.hp-a.hp; - }); - return '枭首:是否对'+get.translation(players[0])+'造成一点火焰伤害?'; - }, - content:function(){ - var players=game.players.slice(0); - players.sort(function(a,b){ - return b.hp-a.hp; - }); - if(players[0].hp>players[1].hp&&players[0]!=player){ - players[0].damage('fire'); - player.line(players[0],'fire'); - } - }, - ai:{ - expose:0.2 - } - }, - guiji:{ - trigger:{player:'phaseJudgeBegin'}, - forced:true, - content:function(){ - player.discard(player.getCards('j').randomGet()); - }, - filter:function(event ,player){ - return player.countCards('j')>0; - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='delay'&&target.countCards('j')==0) return 0.1; - } - } - } - }, - qiangzheng:{ - audio:2, - trigger:{player:'phaseEnd'}, - direct:true, - forced:true, - filter:function(event,player){ - for(var i=0;i0; - }).ai=function(target){ - return -get.attitude(player,target); - }; - "step 1" - if(result.targets&&result.targets.length){ - player.logSkill('qiangzheng',result.targets); - player.gain(result.targets[0].getCards('h').randomGet(),result.targets[0]); - result.targets[0].$give(1,player); - game.delay(); - } - }, - ai:{ - threaten:1.7 - } - }, - suoling:{ - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - if(player.isLinked()) return true; - for(var i=0;iplayers[1].hp&&players[0]!=player; + }, + check:function(event,player){ + var players=game.players.slice(0); + players.sort(function(a,b){ + return b.hp-a.hp; + }); + return get.damageEffect(players[0],player,player,'fire')>0; + }, + prompt:function(){ + var players=game.players.slice(0); + players.sort(function(a,b){ + return b.hp-a.hp; + }); + return '枭首:是否对'+get.translation(players[0])+'造成一点火焰伤害?'; + }, + content:function(){ + var players=game.players.slice(0); + players.sort(function(a,b){ + return b.hp-a.hp; + }); + if(players[0].hp>players[1].hp&&players[0]!=player){ + players[0].damage('fire'); + player.line(players[0],'fire'); + } + }, + ai:{ + expose:0.2 + } + }, + guiji:{ + trigger:{player:'phaseJudgeBegin'}, + forced:true, + content:function(){ + player.discard(player.getCards('j').randomGet()); + }, + filter:function(event ,player){ + return player.countCards('j')>0; + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='delay'&&target.countCards('j')==0) return 0.1; + } + } + } + }, + qiangzheng:{ + audio:2, + trigger:{player:'phaseEnd'}, + direct:true, + forced:true, + filter:function(event,player){ + for(var i=0;i0; + }).ai=function(target){ + return -get.attitude(player,target); + }; + "step 1" + if(result.targets&&result.targets.length){ + player.logSkill('qiangzheng',result.targets); + player.gain(result.targets[0].getCards('h').randomGet(),result.targets[0]); + result.targets[0].$give(1,player); + game.delay(); + } + }, + ai:{ + threaten:1.7 + } + }, + suoling:{ + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + if(player.isLinked()) return true; + for(var i=0;i
  • 在非挑战模式中使用挑战武将' - }, + } + }, + help:{ + '挑战武将':'
    • 在非挑战模式中使用挑战武将' + }, + }; }); diff --git a/extension/cardpile/extension.js b/extension/cardpile/extension.js index f0f229a6e..8baf7c618 100644 --- a/extension/cardpile/extension.js +++ b/extension/cardpile/extension.js @@ -1,98 +1,106 @@ 'use strict'; -game.import('play',{ - name:'cardpile', - arenaReady:function(){ - var data={ - total:160, - sha:{ - diamond:6, - club:14, - heart:3, - spade:7, - }, - huosha:{ - diamond:2, - heart:3 - }, - leisha:{ - spade:5, - club:4 - }, - shan:{ - heart:6, - diamond:18 - }, - jiu:{ - diamond:1, - spade:2, - club:2 - }, - tao:{ - heart:9, - diamond:3, - }, - wanjian:{ - heart:1, - }, - nanman:{ - spade:2, - club:1, - }, - guohe:{ - spade:3, - club:2, - heart:1 - }, - shunshou:{ - spade:3, - diamond:2 - }, - wuxie:{ - heart:2, - diamond:1, - spade:2, - club:2 - }, - tiesuo:{ - spade:2, - club:4 - } - } - var rand=function(){ - return Math.ceil(Math.random()*13); - }; - var getn=function(i,j){ - return Math.round(data[i][j]*parseFloat(lib.config['cardpile_'+i+'_playpackconfig'])); - }; - var num=0; - for(var i in data){ - for(var j in data[i]){ - num+=getn(i,j); - } - } - var dn=num*(lib.card.list.length-data.total)/(data.total-num); - if(dn>1000) dn=1000; - if(dn>0){ - var p=0; - for(var i in data){ - for(var j in data[i]){ - var n=Math.round(dn*getn(i,j)/num); - while(n--){ - if(i=='huosha'){ - lib.card.list.push([j,rand(),'sha','fire']); - } - else if(i=='leisha'){ - lib.card.list.push([j,rand(),'sha','thunder']); - } - else{ - lib.card.list.push([j,rand(),i]); - } - } - } - } - } - }, - help:{ - '牌堆补充':'
      • 将杀闪等牌在牌堆中的比例维持在与军争牌堆相同,防止开启扩展包后重要的牌被过多地稀释' - }, +game.import('play',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'cardpile', + arenaReady:function(){ + var data={ + total:160, + sha:{ + diamond:6, + club:14, + heart:3, + spade:7, + }, + huosha:{ + diamond:2, + heart:3 + }, + leisha:{ + spade:5, + club:4 + }, + shan:{ + heart:6, + diamond:18 + }, + jiu:{ + diamond:1, + spade:2, + club:2 + }, + tao:{ + heart:9, + diamond:3, + }, + wanjian:{ + heart:1, + }, + nanman:{ + spade:2, + club:1, + }, + guohe:{ + spade:3, + club:2, + heart:1 + }, + shunshou:{ + spade:3, + diamond:2 + }, + wuxie:{ + heart:2, + diamond:1, + spade:2, + club:2 + }, + tiesuo:{ + spade:2, + club:4 + } + } + var rand=function(){ + return Math.ceil(Math.random()*13); + }; + var getn=function(i,j){ + return Math.round(data[i][j]*parseFloat(lib.config['cardpile_'+i+'_playpackconfig'])); + }; + var num=0; + for(var i in data){ + for(var j in data[i]){ + num+=getn(i,j); + } + } + var dn=num*(lib.card.list.length-data.total)/(data.total-num); + if(dn>1000) dn=1000; + if(dn>0){ + var p=0; + for(var i in data){ + for(var j in data[i]){ + var n=Math.round(dn*getn(i,j)/num); + while(n--){ + if(i=='huosha'){ + lib.card.list.push([j,rand(),'sha','fire']); + } + else if(i=='leisha'){ + lib.card.list.push([j,rand(),'sha','thunder']); + } + else{ + lib.card.list.push([j,rand(),i]); + } + } + } + } + } + }, + help:{ + '牌堆补充':'
        • 将杀闪等牌在牌堆中的比例维持在与军争牌堆相同,防止开启扩展包后重要的牌被过多地稀释' + }, + }; }); diff --git a/extension/coin/extension.js b/extension/coin/extension.js index e5765f7a0..6c3456266 100644 --- a/extension/coin/extension.js +++ b/extension/coin/extension.js @@ -1,115 +1,21 @@ 'use strict'; -game.import('play',{ - name:'coin', - init:function(){ - if(lib.config.mode!='chess'||get.config('chess_mode')!='leader'){ - _status.coin=0; - } - }, - arenaReady:function(){ - if(_status.video||_status.connectMode) return; - if(lib.config.mode!='chess'||get.config('chess_mode')!='leader'){ - var str; - if(lib.config.coin_display_playpackconfig=='text'){ - str=''+lib.config.coin+'' +game.import('play',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'coin', + init:function(){ + if(lib.config.mode!='chess'||get.config('chess_mode')!='leader'){ + _status.coin=0; } - else{ - str=''+lib.config.coin+''; - } - if(lib.config.coin_canvas_playpackconfig){ - ui.window.classList.add('canvas_top'); - } - ui.coin=ui.create.system(str,null,true); - if(lib.config.snowFall){ - game.haveFun.list.snow.bought=true; - setTimeout(function(){ - game.haveFun.snow(); - },500); - } - lib.setPopped(ui.coin,function(){ - var uiintro=ui.create.dialog('hidden'); - uiintro.classList.add('coin_menu') - uiintro.add('商店'); - uiintro.listen(function(e){ - e.stopPropagation(); - }); - var clickBuy=function(){ - if(this.innerHTML=='停止'){ - game.haveFun[this.name+'Stop'](); - } - else if(this.innerHTML=='开始'){ - game.haveFun[this.name](); - } - else if(this.innerHTML.indexOf('金')!=-1){ - if(lib.config.coin>=this.content.cost){ - this.content.bought=true; - game.changeCoin(-this.content.cost); - game.haveFun[this.name](); - if(this.content.onbuy){ - this.content.onbuy.call(this); - } - } - else{ - return; - } - } - ui.click.window(); - }; - for(var i in game.haveFun.list){ - var item=game.haveFun.list[i]; - uiintro.add('
          '+item.name+'
          '); - var buy=uiintro.content.lastChild.lastChild.lastChild; - if(lib.config.coin本局获胜
  • '); - var bet=uiintro.content.lastChild.lastChild.lastChild; - bet.listen(function(){ - if(_status.betWin) return; - _status.betWin=true; - game.changeCoin(-20); - this.innerHTML='已下注'; - }); - if(_status.betWin){ - bet.innerHTML='已下注'; - } - } - else if(_status.betWin){ - uiintro.add('下注'); - uiintro.add('
    本局获胜
    '); - } - - uiintro.classList.add('noleave'); - - return uiintro; - },220,400); - } - }, - game:{ - changeCoin:function(num){ - if(typeof num=='number'&&ui.coin){ - game.saveConfig('coin',lib.config.coin+num); + }, + arenaReady:function(){ + if(_status.video||_status.connectMode) return; + if(lib.config.mode!='chess'||get.config('chess_mode')!='leader'){ var str; if(lib.config.coin_display_playpackconfig=='text'){ str=''+lib.config.coin+'' @@ -117,1257 +23,1359 @@ game.import('play',{ else{ str=''+lib.config.coin+''; } - ui.coin.innerHTML=str; + if(lib.config.coin_canvas_playpackconfig){ + ui.window.classList.add('canvas_top'); + } + ui.coin=ui.create.system(str,null,true); + if(lib.config.snowFall){ + game.haveFun.list.snow.bought=true; + setTimeout(function(){ + game.haveFun.snow(); + },500); + } + lib.setPopped(ui.coin,function(){ + var uiintro=ui.create.dialog('hidden'); + uiintro.classList.add('coin_menu') + uiintro.add('商店'); + uiintro.listen(function(e){ + e.stopPropagation(); + }); + var clickBuy=function(){ + if(this.innerHTML=='停止'){ + game.haveFun[this.name+'Stop'](); + } + else if(this.innerHTML=='开始'){ + game.haveFun[this.name](); + } + else if(this.innerHTML.indexOf('金')!=-1){ + if(lib.config.coin>=this.content.cost){ + this.content.bought=true; + game.changeCoin(-this.content.cost); + game.haveFun[this.name](); + if(this.content.onbuy){ + this.content.onbuy.call(this); + } + } + else{ + return; + } + } + ui.click.window(); + }; + for(var i in game.haveFun.list){ + var item=game.haveFun.list[i]; + uiintro.add('
    '+item.name+'
    '); + var buy=uiintro.content.lastChild.lastChild.lastChild; + if(lib.config.coin本局获胜
    '); + var bet=uiintro.content.lastChild.lastChild.lastChild; + bet.listen(function(){ + if(_status.betWin) return; + _status.betWin=true; + game.changeCoin(-20); + this.innerHTML='已下注'; + }); + if(_status.betWin){ + bet.innerHTML='已下注'; + } + } + else if(_status.betWin){ + uiintro.add('下注'); + uiintro.add('
    本局获胜
    '); + } + + uiintro.classList.add('noleave'); + + return uiintro; + },220,400); } - }, - haveFun:{ - list:{ - firework:{ - name:'烟花', - cost:50, - }, - snow:{ - name:'下雪', - cost:20, - size:'large', - control:function(){ - var size=ui.create.div('.menubutton'); - if(game.haveFun.list.snow.size=='small'){ - size.innerHTML='大雪'; + }, + game:{ + changeCoin:function(num){ + if(typeof num=='number'&&ui.coin){ + game.saveConfig('coin',lib.config.coin+num); + var str; + if(lib.config.coin_display_playpackconfig=='text'){ + str=''+lib.config.coin+'' + } + else{ + str=''+lib.config.coin+''; + } + ui.coin.innerHTML=str; + } + }, + haveFun:{ + list:{ + firework:{ + name:'烟花', + cost:50, + }, + snow:{ + name:'下雪', + cost:20, + size:'large', + control:function(){ + var size=ui.create.div('.menubutton'); + if(game.haveFun.list.snow.size=='small'){ + size.innerHTML='大雪'; + } + else{ + size.innerHTML='小雪'; + } + size.listen(game.haveFun.snowSize); + return size; } - else{ - size.innerHTML='小雪'; - } - size.listen(game.haveFun.snowSize); - return size; + }, + star:{ + name:'星云', + cost:10 + }, + blink:{ + name:'闪烁', + cost:10 } }, - star:{ - name:'星云', - cost:10 + alwaysSnow:function(){ + game.saveConfig('snowFall',!lib.config.snowFall); + game.reload(); }, - blink:{ - name:'闪烁', - cost:10 - } - }, - alwaysSnow:function(){ - game.saveConfig('snowFall',!lib.config.snowFall); - game.reload(); - }, - blink:function(){ - if(game.haveFun.list.blink.running) return; - game.haveFun.list.blink.running=true; - if(game.haveFun.blinkLoop){ - game.haveFun.blinkLoop(); - } - else{ - var canvas = document.createElement("canvas"); - ui.window.appendChild(canvas); - canvas.classList.add('fun'); - canvas.style.zIndex=20; - var ctx = canvas.getContext("2d"); + blink:function(){ + if(game.haveFun.list.blink.running) return; + game.haveFun.list.blink.running=true; + if(game.haveFun.blinkLoop){ + game.haveFun.blinkLoop(); + } + else{ + var canvas = document.createElement("canvas"); + ui.window.appendChild(canvas); + canvas.classList.add('fun'); + canvas.style.zIndex=20; + var ctx = canvas.getContext("2d"); - //Make the canvas occupy the full page - var W = ui.window.offsetWidth, H = ui.window.offsetHeight; - canvas.width = W; - canvas.height = H; - lib.onresize.push(function(){ + //Make the canvas occupy the full page var W = ui.window.offsetWidth, H = ui.window.offsetHeight; canvas.width = W; canvas.height = H; - }); + lib.onresize.push(function(){ + var W = ui.window.offsetWidth, H = ui.window.offsetHeight; + canvas.width = W; + canvas.height = H; + }); - var particles = []; - var mouse = {}; + var particles = []; + var mouse = {}; - //Lets create some particles now - var particle_count = 25; + //Lets create some particles now + var particle_count = 25; - //finally some mouse tracking - ui.window.addEventListener('mousemove', function(e) - { - //since the canvas = full page the position of the mouse - //relative to the document will suffice - mouse.x = e.pageX/game.documentZoom; - mouse.y = e.pageY/game.documentZoom; - }); - ui.window.addEventListener('touchmove',function(e){ - mouse.x = e.touches[0].clientX/game.documentZoom; - mouse.y = e.touches[0].clientY/game.documentZoom; - }); - - var particle=function() - { - //speed, life, location, life, colors - //speed.x range = -2.5 to 2.5 - //speed.y range = -15 to -5 to make it move upwards - //lets change the Y speed to make it look like a flame - this.speed = {x: -2.5+Math.random()*5, y: -5+Math.random()*10}; - this.speed.x/=4; - this.speed.y/=4; - //location = mouse coordinates - //Now the flame follows the mouse coordinates - if(mouse.x && mouse.y) + //finally some mouse tracking + ui.window.addEventListener('mousemove', function(e) { - this.location = {x: mouse.x, y: mouse.y}; - } - else + //since the canvas = full page the position of the mouse + //relative to the document will suffice + mouse.x = e.pageX/game.documentZoom; + mouse.y = e.pageY/game.documentZoom; + }); + ui.window.addEventListener('touchmove',function(e){ + mouse.x = e.touches[0].clientX/game.documentZoom; + mouse.y = e.touches[0].clientY/game.documentZoom; + }); + + var particle=function() { - this.location = {x: W/2, y: H/2}; - } - //radius range = 10-30 - this.radius = 10+Math.random()*20; - //life range = 20-30 - this.radius/=4; - this.life = 20+Math.random()*10; - this.life*=4; - this.remaining_life = this.life; - //colors - this.r = Math.round(Math.random()*255); - this.g = Math.round(Math.random()*255); - this.b = Math.round(Math.random()*255); - } - for(var i = 0; i < particle_count; i++) - { - particles.push(new particle()); - } - - var draw=function() - { - if(!game.haveFun.list.blink.running){ - canvas.width=W; - canvas.height=H; - return; - } - ctx.clearRect(0, 0, W, H); - //Painting the canvas black - //Time for lighting magic - //particles are painted with "lighter" - //In the next frame the background is painted normally without blending to the - //previous frame - ctx.globalCompositeOperation = "lighter"; - - for(var i = 0; i < particles.length; i++) - { - var p = particles[i]; - ctx.beginPath(); - //changing opacity according to the life. - //opacity goes to 0 at the end of life of a particle - p.opacity = Math.round(p.remaining_life/p.life*100)/100 - //a gradient instead of white fill - var gradient = ctx.createRadialGradient(p.location.x, p.location.y, 0, p.location.x, p.location.y, p.radius); - gradient.addColorStop(0, "rgba("+p.r+", "+p.g+", "+p.b+", "+p.opacity+")"); - gradient.addColorStop(0.5, "rgba("+p.r+", "+p.g+", "+p.b+", "+p.opacity+")"); - gradient.addColorStop(1, "rgba("+p.r+", "+p.g+", "+p.b+", 0)"); - ctx.fillStyle = gradient; - ctx.arc(p.location.x, p.location.y, p.radius, Math.PI*2, false); - ctx.fill(); - - //lets move the particles - p.remaining_life--; - p.radius-=0.2; - p.location.x += p.speed.x; - p.location.y += p.speed.y; - - //regenerate particles - if(p.remaining_life < 0 || p.radius < 0) + //speed, life, location, life, colors + //speed.x range = -2.5 to 2.5 + //speed.y range = -15 to -5 to make it move upwards + //lets change the Y speed to make it look like a flame + this.speed = {x: -2.5+Math.random()*5, y: -5+Math.random()*10}; + this.speed.x/=4; + this.speed.y/=4; + //location = mouse coordinates + //Now the flame follows the mouse coordinates + if(mouse.x && mouse.y) { - //a brand new particle replacing the dead one - particles[i] = new particle(); + this.location = {x: mouse.x, y: mouse.y}; } + else + { + this.location = {x: W/2, y: H/2}; + } + //radius range = 10-30 + this.radius = 10+Math.random()*20; + //life range = 20-30 + this.radius/=4; + this.life = 20+Math.random()*10; + this.life*=4; + this.remaining_life = this.life; + //colors + this.r = Math.round(Math.random()*255); + this.g = Math.round(Math.random()*255); + this.b = Math.round(Math.random()*255); + } + for(var i = 0; i < particle_count; i++) + { + particles.push(new particle()); + } + + var draw=function() + { + if(!game.haveFun.list.blink.running){ + canvas.width=W; + canvas.height=H; + return; + } + ctx.clearRect(0, 0, W, H); + //Painting the canvas black + //Time for lighting magic + //particles are painted with "lighter" + //In the next frame the background is painted normally without blending to the + //previous frame + ctx.globalCompositeOperation = "lighter"; + + for(var i = 0; i < particles.length; i++) + { + var p = particles[i]; + ctx.beginPath(); + //changing opacity according to the life. + //opacity goes to 0 at the end of life of a particle + p.opacity = Math.round(p.remaining_life/p.life*100)/100 + //a gradient instead of white fill + var gradient = ctx.createRadialGradient(p.location.x, p.location.y, 0, p.location.x, p.location.y, p.radius); + gradient.addColorStop(0, "rgba("+p.r+", "+p.g+", "+p.b+", "+p.opacity+")"); + gradient.addColorStop(0.5, "rgba("+p.r+", "+p.g+", "+p.b+", "+p.opacity+")"); + gradient.addColorStop(1, "rgba("+p.r+", "+p.g+", "+p.b+", 0)"); + ctx.fillStyle = gradient; + ctx.arc(p.location.x, p.location.y, p.radius, Math.PI*2, false); + ctx.fill(); + + //lets move the particles + p.remaining_life--; + p.radius-=0.2; + p.location.x += p.speed.x; + p.location.y += p.speed.y; + + //regenerate particles + if(p.remaining_life < 0 || p.radius < 0) + { + //a brand new particle replacing the dead one + particles[i] = new particle(); + } + } + requestAnimationFrame(draw); + } + + draw(); + game.haveFun.blinkLoop=draw; + game.haveFun.blinkStop=function(){ + game.haveFun.list.blink.running=false; } - requestAnimationFrame(draw); } - - draw(); - game.haveFun.blinkLoop=draw; - game.haveFun.blinkStop=function(){ - game.haveFun.list.blink.running=false; + }, + star:function(){ + if(game.haveFun.list.star.running) return; + game.haveFun.list.star.running=true; + if(game.haveFun.starLoop){ + game.haveFun.starLoop(); } - } - }, - star:function(){ - if(game.haveFun.list.star.running) return; - game.haveFun.list.star.running=true; - if(game.haveFun.starLoop){ - game.haveFun.starLoop(); - } - else{ - //****************************************************** - // Yet Another Particle Engine - var cos = Math.cos, - sin = Math.sin, - sqrt = Math.sqrt, - abs = Math.abs, - atan2 = Math.atan2, - log = Math.log, - random = Math.random, - PI = Math.PI, - sqr = function(v){return v*v;}, - particles = [], - drawScale = 1, - emitters = [], - forces = [], - collidedMass = 0, - maxParticles = 100, - emissionRate = 1, - minParticleSize = 2; + else{ + //****************************************************** + // Yet Another Particle Engine + var cos = Math.cos, + sin = Math.sin, + sqrt = Math.sqrt, + abs = Math.abs, + atan2 = Math.atan2, + log = Math.log, + random = Math.random, + PI = Math.PI, + sqr = function(v){return v*v;}, + particles = [], + drawScale = 1, + emitters = [], + forces = [], + collidedMass = 0, + maxParticles = 100, + emissionRate = 1, + minParticleSize = 2; - //------------------------------------------------------- - // Vectors, and not the kind you put stuff in - var Vector=function(x, y, z) { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - } - Vector.prototype = { - add : function(vector) { - this.x += vector.x; - this.y += vector.y; - this.z += vector.z; - return this; - }, - subtract : function(vector) { - this.x -= vector.x; - this.y -= vector.y; - this.z -= vector.z; - return this; - }, - multiply : function(another) { - this.x /= another.x; - this.y /= another.y; - this.z /= another.z; - return this; - }, - divide : function(another) { - this.x /= another.x; - this.y /= another.y; - this.z /= another.z; - return this; - }, - scale : function(factor) { - this.x *= factor; - this.y *= factor; - this.z *= factor; - return this; - }, - magnitude : function () { - return sqrt(sqr(this.x + this.y)); - }, - distance : function (another) { - return abs(sqrt(sqr(this.x - another.x) + sqr(this.y - another.y))); - }, - angle : function (angle, magnitude) { - if(angle && magnitude) - return Vector.fromAngle(angle, magnitude); - return atan2(this.y, this.x); - }, - clone : function() { - return new Vector(this.x, this.y, this.z); - }, - equals : function(another) { - return this.x === another.x&& - this.y === another.y&& - this.z === another.z; - }, - random : function(r) { - this.x += (random() * r * 2) - r; - this.y += (random() * r * 2) - r; - return this; - } - }; - Vector.fromAngle = function (angle, magnitude) { - return new Vector( - magnitude * cos(angle), - magnitude * sin(angle), - magnitude * sin(angle)); - }; + //------------------------------------------------------- + // Vectors, and not the kind you put stuff in + var Vector=function(x, y, z) { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + } + Vector.prototype = { + add : function(vector) { + this.x += vector.x; + this.y += vector.y; + this.z += vector.z; + return this; + }, + subtract : function(vector) { + this.x -= vector.x; + this.y -= vector.y; + this.z -= vector.z; + return this; + }, + multiply : function(another) { + this.x /= another.x; + this.y /= another.y; + this.z /= another.z; + return this; + }, + divide : function(another) { + this.x /= another.x; + this.y /= another.y; + this.z /= another.z; + return this; + }, + scale : function(factor) { + this.x *= factor; + this.y *= factor; + this.z *= factor; + return this; + }, + magnitude : function () { + return sqrt(sqr(this.x + this.y)); + }, + distance : function (another) { + return abs(sqrt(sqr(this.x - another.x) + sqr(this.y - another.y))); + }, + angle : function (angle, magnitude) { + if(angle && magnitude) + return Vector.fromAngle(angle, magnitude); + return atan2(this.y, this.x); + }, + clone : function() { + return new Vector(this.x, this.y, this.z); + }, + equals : function(another) { + return this.x === another.x&& + this.y === another.y&& + this.z === another.z; + }, + random : function(r) { + this.x += (random() * r * 2) - r; + this.y += (random() * r * 2) - r; + return this; + } + }; + Vector.fromAngle = function (angle, magnitude) { + return new Vector( + magnitude * cos(angle), + magnitude * sin(angle), + magnitude * sin(angle)); + }; - //****************************************************** - // A thing with mass, position, and velocity - like your mom - var Particle=function(pt, vc, ac, mass) { - this.pos = pt || new Vector(0, 0); - this.vc = vc || new Vector(0, 0); - this.ac = ac || new Vector(0, 0); - this.mass = mass || 1; - this.alive = true; - } - Particle.prototype.move = function () { - this.vc.add(this.ac); - this.pos.add(this.vc); - }; - Particle.prototype.reactToForces = function (fields) { - var totalAccelerationX = 0; - var totalAccelerationY = 0; + //****************************************************** + // A thing with mass, position, and velocity - like your mom + var Particle=function(pt, vc, ac, mass) { + this.pos = pt || new Vector(0, 0); + this.vc = vc || new Vector(0, 0); + this.ac = ac || new Vector(0, 0); + this.mass = mass || 1; + this.alive = true; + } + Particle.prototype.move = function () { + this.vc.add(this.ac); + this.pos.add(this.vc); + }; + Particle.prototype.reactToForces = function (fields) { + var totalAccelerationX = 0; + var totalAccelerationY = 0; - for (var i = 0; i < fields.length; i++) { - var field = fields[i]; - var vectorX = field.pos.x - this.pos.x; - var vectorY = field.pos.y - this.pos.y; - var distance = this.pos.distance(field.pos); - if(distance < 1) field.grow(this); - if(distance < 100) this.doubleSize = true; - var force = G(this.forceBetween(field, distance)); - totalAccelerationX += vectorX * force; - totalAccelerationY += vectorY * force; - } - this.ac = new Vector(totalAccelerationX, totalAccelerationY); + for (var i = 0; i < fields.length; i++) { + var field = fields[i]; + var vectorX = field.pos.x - this.pos.x; + var vectorY = field.pos.y - this.pos.y; + var distance = this.pos.distance(field.pos); + if(distance < 1) field.grow(this); + if(distance < 100) this.doubleSize = true; + var force = G(this.forceBetween(field, distance)); + totalAccelerationX += vectorX * force; + totalAccelerationY += vectorY * force; + } + this.ac = new Vector(totalAccelerationX, totalAccelerationY); - totalAccelerationX = 0; - totalAccelerationY = 0; - for (var i = 0; i < particles.length; i++) { - var field = particles[i]; - if(field === this || !field.alive) continue; - var vectorX = field.pos.x - this.pos.x; - var vectorY = field.pos.y - this.pos.y; - var distance = this.pos.distance(field.pos); - if(distance < 1) { - if(this.mass >= field.mass) { - var massRatio = this.mass / field.mass; - if(particles.length <= maxParticles && this.mass>40) { - this.alive = false; - this.nova = true; - collidedMass += this.mass; - } else this.grow(field); - } else this.alive = false; - } - if(this.alive) { - var force = G(this.forceBetween(field, distance)); - totalAccelerationX += vectorX * G(force); - totalAccelerationY += vectorY * G(force); - } - } + totalAccelerationX = 0; + totalAccelerationY = 0; + for (var i = 0; i < particles.length; i++) { + var field = particles[i]; + if(field === this || !field.alive) continue; + var vectorX = field.pos.x - this.pos.x; + var vectorY = field.pos.y - this.pos.y; + var distance = this.pos.distance(field.pos); + if(distance < 1) { + if(this.mass >= field.mass) { + var massRatio = this.mass / field.mass; + if(particles.length <= maxParticles && this.mass>40) { + this.alive = false; + this.nova = true; + collidedMass += this.mass; + } else this.grow(field); + } else this.alive = false; + } + if(this.alive) { + var force = G(this.forceBetween(field, distance)); + totalAccelerationX += vectorX * G(force); + totalAccelerationY += vectorY * G(force); + } + } - var travelDist = this.pos.distance(this.lastPos ? this.lastPos : this.pos); - this.velocity = travelDist - (this.lastDistance ? this.lastDistance : travelDist); - this.lastDistance = travelDist; - this.lastPos = this.pos.clone(); + var travelDist = this.pos.distance(this.lastPos ? this.lastPos : this.pos); + this.velocity = travelDist - (this.lastDistance ? this.lastDistance : travelDist); + this.lastDistance = travelDist; + this.lastPos = this.pos.clone(); - this.ac.add(new Vector(totalAccelerationX, totalAccelerationY)); - this.lastPos = this.pos.clone(); - // if(this.mass > 20) { - // var chance = 1 / (this.mass - 20); - // if(Math.random()>chance) { - // this.supernova = true; - // this.supernovaDur = 10; - // this.alive = false; - // if(particles.length <= maxParticles) collidedMass += this.mass; - // delete this.size; - // } - // } - }; - Particle.prototype.grow = function (another) { - this.mass += another.mass; - this.nova = true; - another.alive = false; - delete this.size; - }; - Particle.prototype.breakApart = function(minMass, maxParts) { - if(!minMass) minMass = 1; - if(!maxParts) maxParts = 2; - var remainingMass = this.mass; - var num = 0; - while(remainingMass > 0) { - var np = new Particle(this.pos.clone().random(this.mass), new Vector(0,0)); - np.mass = 1 + Math.random() * (remainingMass - 1); - if(num>=maxParts-1) np.mass = remainingMass; - np.mass = np.mass < minMass ? minMass : np.mass; - remainingMass -= np.mass; - num++; - } - this.nova = true; - delete this.size; - this.alive = false; - }; - Particle.prototype.forceBetween = function(another, distance) { - var distance = distance? distance : this.pos.distance(another.pos); - return (this.mass * another.mass) / sqr(distance); - }; + this.ac.add(new Vector(totalAccelerationX, totalAccelerationY)); + this.lastPos = this.pos.clone(); + // if(this.mass > 20) { + // var chance = 1 / (this.mass - 20); + // if(Math.random()>chance) { + // this.supernova = true; + // this.supernovaDur = 10; + // this.alive = false; + // if(particles.length <= maxParticles) collidedMass += this.mass; + // delete this.size; + // } + // } + }; + Particle.prototype.grow = function (another) { + this.mass += another.mass; + this.nova = true; + another.alive = false; + delete this.size; + }; + Particle.prototype.breakApart = function(minMass, maxParts) { + if(!minMass) minMass = 1; + if(!maxParts) maxParts = 2; + var remainingMass = this.mass; + var num = 0; + while(remainingMass > 0) { + var np = new Particle(this.pos.clone().random(this.mass), new Vector(0,0)); + np.mass = 1 + Math.random() * (remainingMass - 1); + if(num>=maxParts-1) np.mass = remainingMass; + np.mass = np.mass < minMass ? minMass : np.mass; + remainingMass -= np.mass; + num++; + } + this.nova = true; + delete this.size; + this.alive = false; + }; + Particle.prototype.forceBetween = function(another, distance) { + var distance = distance? distance : this.pos.distance(another.pos); + return (this.mass * another.mass) / sqr(distance); + }; - //****************************************************** - //This certainly doesn't *sub*mit to particles, that's for sure - var ParticleEmitter=function(pos, vc, ang) { - // to do config options for emitter - random, static, show emitter, emitter color, etc - this.pos = pos; - this.vc = vc; - this.ang = ang || 0.09; - this.color = "#999"; - } - ParticleEmitter.prototype.emit = function() { - var angle = this.vc.angle() + - this.ang - (Math.random() * this.ang * 2); - var magnitude = this.vc.magnitude(); - var position = this.pos.clone(); - position.add( - new Vector( - ~~((Math.random() * 100) - 50) * drawScale, - ~~((Math.random() * 100) - 50) * drawScale - )); - var velocity = Vector.fromAngle(angle, magnitude); - return new Particle(position,velocity); - }; + //****************************************************** + //This certainly doesn't *sub*mit to particles, that's for sure + var ParticleEmitter=function(pos, vc, ang) { + // to do config options for emitter - random, static, show emitter, emitter color, etc + this.pos = pos; + this.vc = vc; + this.ang = ang || 0.09; + this.color = "#999"; + } + ParticleEmitter.prototype.emit = function() { + var angle = this.vc.angle() + + this.ang - (Math.random() * this.ang * 2); + var magnitude = this.vc.magnitude(); + var position = this.pos.clone(); + position.add( + new Vector( + ~~((Math.random() * 100) - 50) * drawScale, + ~~((Math.random() * 100) - 50) * drawScale + )); + var velocity = Vector.fromAngle(angle, magnitude); + return new Particle(position,velocity); + }; - //****************************************************** - // Use it, Luke - // to do collapse functionality into particle - var Force=function(pos, m) { - this.pos = pos; - this.mass = m || 100; - } - Force.prototype.grow = function (another) { - this.mass += another.mass; - this.burp = true; - another.alive = false; - }; + //****************************************************** + // Use it, Luke + // to do collapse functionality into particle + var Force=function(pos, m) { + this.pos = pos; + this.mass = m || 100; + } + Force.prototype.grow = function (another) { + this.mass += another.mass; + this.burp = true; + another.alive = false; + }; - var G=function(data) { - return 0.00674 * data; - } + var G=function(data) { + return 0.00674 * data; + } - //****************************************************** - var canvas = document.createElement('canvas'); - canvas.classList.add('fun'); - ui.window.appendChild(canvas); - var ctx = canvas.getContext('2d'); - canvas.width = ui.window.offsetWidth; - canvas.height = ui.window.offsetHeight; - var canvasWidth = canvas.width; - var canvasHeight = canvas.height; - lib.onresize.push(function() { + //****************************************************** + var canvas = document.createElement('canvas'); + canvas.classList.add('fun'); + ui.window.appendChild(canvas); + var ctx = canvas.getContext('2d'); canvas.width = ui.window.offsetWidth; canvas.height = ui.window.offsetHeight; - canvasWidth = canvas.width; - canvasHeight = canvas.height; - }); + var canvasWidth = canvas.width; + var canvasHeight = canvas.height; + lib.onresize.push(function() { + canvas.width = ui.window.offsetWidth; + canvas.height = ui.window.offsetHeight; + canvasWidth = canvas.width; + canvasHeight = canvas.height; + }); - var renderToCanvas = function (width, height, renderFunction) { - var buffer = document.createElement('canvas'); - buffer.width = width; - buffer.height = height; - renderFunction(buffer.getContext('2d')); - return buffer; - }; + var renderToCanvas = function (width, height, renderFunction) { + var buffer = document.createElement('canvas'); + buffer.width = width; + buffer.height = height; + renderFunction(buffer.getContext('2d')); + return buffer; + }; - maxParticles = 500; - emissionRate = 1; - drawScale = 1.3; - minParticleSize = 2; - emitters = [ - //br - new ParticleEmitter( - new Vector( - canvasWidth / 2 * drawScale + 400, - canvasHeight / 2 * drawScale - ), - Vector.fromAngle(2, 5), - 1 - ), - // // bl - // new ParticleEmitter( - // new Vector( - // canvasWidth / 2 * drawScale - 400, - // canvasHeight / 2 * drawScale + 400 - // ), - // Vector.fromAngle(1.5, 1), - // 1 - // ), - // tl - new ParticleEmitter( - new Vector( - canvasWidth / 2 * drawScale - 400, - canvasHeight / 2 * drawScale - ), - Vector.fromAngle(5, 5), - 1 - ), - // // tr - // new ParticleEmitter( - // new Vector( - // canvasWidth / 2 * drawScale + 400, - // canvasHeight / 2 * drawScale - 400 - // ), - // Vector.fromAngle(4.5, 1), - // 1 - // ) - ]; - forces = [ - new Force( - new Vector((canvasWidth / 2 * drawScale) , - (canvasHeight / 2 * drawScale)), 1800) - ]; + maxParticles = 500; + emissionRate = 1; + drawScale = 1.3; + minParticleSize = 2; + emitters = [ + //br + new ParticleEmitter( + new Vector( + canvasWidth / 2 * drawScale + 400, + canvasHeight / 2 * drawScale + ), + Vector.fromAngle(2, 5), + 1 + ), + // // bl + // new ParticleEmitter( + // new Vector( + // canvasWidth / 2 * drawScale - 400, + // canvasHeight / 2 * drawScale + 400 + // ), + // Vector.fromAngle(1.5, 1), + // 1 + // ), + // tl + new ParticleEmitter( + new Vector( + canvasWidth / 2 * drawScale - 400, + canvasHeight / 2 * drawScale + ), + Vector.fromAngle(5, 5), + 1 + ), + // // tr + // new ParticleEmitter( + // new Vector( + // canvasWidth / 2 * drawScale + 400, + // canvasHeight / 2 * drawScale - 400 + // ), + // Vector.fromAngle(4.5, 1), + // 1 + // ) + ]; + forces = [ + new Force( + new Vector((canvasWidth / 2 * drawScale) , + (canvasHeight / 2 * drawScale)), 1800) + ]; - var loop=function() { - if(!game.haveFun.list.star.running){ - canvas.width=ui.window.offsetWidth; - canvas.height=ui.window.offsetHeight; - return; + var loop=function() { + if(!game.haveFun.list.star.running){ + canvas.width=ui.window.offsetWidth; + canvas.height=ui.window.offsetHeight; + return; + } + clear(); + update(); + draw(); + queue(); } - clear(); - update(); - draw(); - queue(); - } - game.haveFun.starLoop=loop; - game.haveFun.starStop=function(){ - game.haveFun.list.star.running=false; - }; + game.haveFun.starLoop=loop; + game.haveFun.starStop=function(){ + game.haveFun.list.star.running=false; + }; - var clear=function() { - ctx.clearRect(0, 0, canvas.width, canvas.height); - } - - var ctr = 0; - var c = [ - 'rgba(255,255,255,', - 'rgba(0,150,255,', - 'rgba(255,255,128,', - 'rgba(255,255,255,' - ]; - var rndc=function() { - return c[~~(Math.random() * c.length-1)]; - } - var c2 = 'rgba(255,64,32,'; - var addNewParticles=function() { - var _emit = function() { - var ret = 0; - for (var i = 0; i < emitters.length; i++) { - for (var j = 0; j < emissionRate; j++) { - var p = emitters[i].emit(); - p.color = ( ctr % 10 === 0 )? - ( Math.random() * 5 <= 1 ? c2 : rndc() ) - : rndc(); - p.mass = ~~(Math.random() * 5); - particles.push(p); - ret += p.mass; - ctr++; - } - } - return ret; - }; - if(collidedMass !== 0) { - while(collidedMass !== 0) { - collidedMass -= _emit(); - collidedMass = collidedMass<0 ? 0 :collidedMass; - } - } - if (particles.length > maxParticles) - return; - _emit(); - } - - var CLIPOFFSCREEN = 1, - BUFFEROFFSCREEN = 2, - LOOPSCREEN = 3; - - var isPositionAliveAndAdjust=function(particle,check) { - return true; - // var pos = particle.pos; - // if(!check) check = BUFFEROFFSCREEN; - // if(check === CLIPOFFSCREEN) { - // return !(!particle.alive || - // pos.x < 0 || - // (pos.x / drawScale) > boundsX || - // pos.y < 0 || - // (pos.y / drawScale) > boundsY); - // } else if(check === BUFFEROFFSCREEN) { - // return !(!particle.alive || - // pos.x < -boundsX * drawScale || - // pos.x > 2 * boundsX * drawScale || - // pos.y < -boundsY * drawScale || - // pos.y > 2 * boundsY * drawScale); - // } else if(check === LOOPSCREEN) { - // if (pos.x < 0) pos.x = boundsX * drawScale; - // if ((pos.x / drawScale) > boundsX) pos.x = 0; - // if (pos.y < 0) pos.y = boundsY * drawScale; - // if ((pos.y / drawScale) > boundsY) pos.y = 0; - // return true; - // } - } - - var plotParticles=function(boundsX, boundsY) { - var currentParticles = []; - for (var i = 0; i < particles.length; i++) { - var particle = particles[i]; - particle.reactToForces(forces); - if(!isPositionAliveAndAdjust(particle)) - continue; - particle.move(); - currentParticles.push(particle); - } - } - - var offscreenCache = {}; - var renderParticle=function(p) { - var position = p.pos; - if(!p.size) p.size = Math.floor(p.mass / 100); - - - if(!p.opacity) p.opacity = 0.05; - if(p.velocity > 0) { - if(p.opacity<=0.18) - p.opacity += 0.04; - } - if(p.opacity>0.08) - p.opacity -= 0.02; - - var actualSize = p.size / drawScale; - actualSize = actualSize < minParticleSize ? minParticleSize : actualSize; - if(p.mass>8) actualSize *= 2; - if(p.nova) { - actualSize *= 4; - p.nova = false; - } - if(p.doubleSize) { - p.doubleSize = false; - actualSize *= 2; - } - // if(p.supernova) { - // actualSize *= 6; - // opacity = 0.15; - // p.supernovaDur = p.supernovaDur - 1; - // if(p.supernovaDur === 0) - // p.supernova = false; - // } - var cacheKey = actualSize + '_' + p.opacity + '_' + p.color; - var cacheValue = offscreenCache[cacheKey]; - if(!cacheValue) { - cacheValue = renderToCanvas(actualSize * 32, actualSize * 32, function(ofsContext) { - var opacity = p.opacity; - var fills = [ - {size:actualSize/2, opacity:1}, - {size:actualSize, opacity:opacity}, - {size:actualSize * 2, opacity:opacity / 2}, - {size:actualSize * 4, opacity:opacity / 3}, - {size:actualSize * 8, opacity:opacity / 5}, - {size:actualSize * 16, opacity:opacity / 16} - ]; - ofsContext.beginPath(); - for(var f in fills) { - f = fills[f]; - ofsContext.fillStyle = p.color + f.opacity + ')'; - ofsContext.arc( - actualSize * 16, - actualSize * 16, - f.size , 0, Math.PI*2, true); - ofsContext.fill(); - } - ofsContext.closePath(); - }); - offscreenCache[cacheKey] = cacheValue; - } - var posX = p.pos.x / drawScale; - var posY = p.pos.y / drawScale; - ctx.drawImage(cacheValue, posX, posY); - } - - var fills = [ - {size:15,opacity:1 }, - {size:25,opacity:0.3}, - {size:50,opacity:0.1} ]; - - var renderScene=function(ofsContext) { - for (var i = 0; i < forces.length; i++) { - var p = forces[i]; - var position = p.pos; - var opacity = 1; - - ofsContext.beginPath(); - for(var f in fills) { - f = fills[f]; - var o = p.burp === true ? 1 : f.opacity; - p.burp = false; - // ofsContext.fillStyle = 'rgba(255,255,255,' + o + ')'; - // ofsContext.arc(position.x / drawScale, - // position.y / drawScale, - // f.size / drawScale, 0, Math.PI*2, true); - // ofsContext.fill(); - } - ofsContext.closePath(); - } - - for (var i = 0; i < particles.length; i++) { - var p = particles[i]; - renderParticle(p); - } - } - - var draw=function() { - renderScene(ctx); - } - - var update=function() { - addNewParticles(); - plotParticles(canvas.width, canvas.height); - } - - var queue=function() { - window.requestAnimationFrame(loop); - } - - loop(); - - } - }, - snow:function(){ - game.haveFun.list.snow.running=true; - if(game.haveFun.snowStart){ - game.haveFun.snowStart(); - } - else{ - /* - * 自由下雪 snowFall - * author:xuanfeng - * time: 2014-01-11 - */ - // 控制下雪 - var canvas; - var snowFall=function(snow) { - // 可配置属性 - snow = snow || {}; - this.maxFlake = snow.maxFlake || 200; //最多片数 - this.flakeSize = snow.flakeSize || 10; //雪花形状 - this.fallSpeed = snow.fallSpeed || 2; //坠落速度 - this.status = 0; //0-初始化、1-开始下雪、2-停止下雪、3-暂停下雪、4-继续下雪 - } - - // 兼容写法 - var requestAnimationFrame = window.requestAnimationFrame || - window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame || - window.msRequestAnimationFrame || - window.oRequestAnimationFrame || - function(callback) { setTimeout(callback, 1000 / 60); }; - var cancelAnimationFrame = window.cancelAnimationFrame || - window.mozCancelAnimationFrame || - window.webkitCancelAnimationFrame || - window.msCancelAnimationFrame || - window.oCancelAnimationFrame; - - // 开始下雪 - snowFall.prototype.start = function(){ - if(this.status == 1 || this.status == 4){ - // 已经在下雪则不作处理 - return false; + var clear=function() { + ctx.clearRect(0, 0, canvas.width, canvas.height); } - this.status = 1; + + var ctr = 0; + var c = [ + 'rgba(255,255,255,', + 'rgba(0,150,255,', + 'rgba(255,255,128,', + 'rgba(255,255,255,' + ]; + var rndc=function() { + return c[~~(Math.random() * c.length-1)]; + } + var c2 = 'rgba(255,64,32,'; + var addNewParticles=function() { + var _emit = function() { + var ret = 0; + for (var i = 0; i < emitters.length; i++) { + for (var j = 0; j < emissionRate; j++) { + var p = emitters[i].emit(); + p.color = ( ctr % 10 === 0 )? + ( Math.random() * 5 <= 1 ? c2 : rndc() ) + : rndc(); + p.mass = ~~(Math.random() * 5); + particles.push(p); + ret += p.mass; + ctr++; + } + } + return ret; + }; + if(collidedMass !== 0) { + while(collidedMass !== 0) { + collidedMass -= _emit(); + collidedMass = collidedMass<0 ? 0 :collidedMass; + } + } + if (particles.length > maxParticles) + return; + _emit(); + } + + var CLIPOFFSCREEN = 1, + BUFFEROFFSCREEN = 2, + LOOPSCREEN = 3; + + var isPositionAliveAndAdjust=function(particle,check) { + return true; + // var pos = particle.pos; + // if(!check) check = BUFFEROFFSCREEN; + // if(check === CLIPOFFSCREEN) { + // return !(!particle.alive || + // pos.x < 0 || + // (pos.x / drawScale) > boundsX || + // pos.y < 0 || + // (pos.y / drawScale) > boundsY); + // } else if(check === BUFFEROFFSCREEN) { + // return !(!particle.alive || + // pos.x < -boundsX * drawScale || + // pos.x > 2 * boundsX * drawScale || + // pos.y < -boundsY * drawScale || + // pos.y > 2 * boundsY * drawScale); + // } else if(check === LOOPSCREEN) { + // if (pos.x < 0) pos.x = boundsX * drawScale; + // if ((pos.x / drawScale) > boundsX) pos.x = 0; + // if (pos.y < 0) pos.y = boundsY * drawScale; + // if ((pos.y / drawScale) > boundsY) pos.y = 0; + // return true; + // } + } + + var plotParticles=function(boundsX, boundsY) { + var currentParticles = []; + for (var i = 0; i < particles.length; i++) { + var particle = particles[i]; + particle.reactToForces(forces); + if(!isPositionAliveAndAdjust(particle)) + continue; + particle.move(); + currentParticles.push(particle); + } + } + + var offscreenCache = {}; + var renderParticle=function(p) { + var position = p.pos; + if(!p.size) p.size = Math.floor(p.mass / 100); + + + if(!p.opacity) p.opacity = 0.05; + if(p.velocity > 0) { + if(p.opacity<=0.18) + p.opacity += 0.04; + } + if(p.opacity>0.08) + p.opacity -= 0.02; + + var actualSize = p.size / drawScale; + actualSize = actualSize < minParticleSize ? minParticleSize : actualSize; + if(p.mass>8) actualSize *= 2; + if(p.nova) { + actualSize *= 4; + p.nova = false; + } + if(p.doubleSize) { + p.doubleSize = false; + actualSize *= 2; + } + // if(p.supernova) { + // actualSize *= 6; + // opacity = 0.15; + // p.supernovaDur = p.supernovaDur - 1; + // if(p.supernovaDur === 0) + // p.supernova = false; + // } + var cacheKey = actualSize + '_' + p.opacity + '_' + p.color; + var cacheValue = offscreenCache[cacheKey]; + if(!cacheValue) { + cacheValue = renderToCanvas(actualSize * 32, actualSize * 32, function(ofsContext) { + var opacity = p.opacity; + var fills = [ + {size:actualSize/2, opacity:1}, + {size:actualSize, opacity:opacity}, + {size:actualSize * 2, opacity:opacity / 2}, + {size:actualSize * 4, opacity:opacity / 3}, + {size:actualSize * 8, opacity:opacity / 5}, + {size:actualSize * 16, opacity:opacity / 16} + ]; + ofsContext.beginPath(); + for(var f in fills) { + f = fills[f]; + ofsContext.fillStyle = p.color + f.opacity + ')'; + ofsContext.arc( + actualSize * 16, + actualSize * 16, + f.size , 0, Math.PI*2, true); + ofsContext.fill(); + } + ofsContext.closePath(); + }); + offscreenCache[cacheKey] = cacheValue; + } + var posX = p.pos.x / drawScale; + var posY = p.pos.y / drawScale; + ctx.drawImage(cacheValue, posX, posY); + } + + var fills = [ + {size:15,opacity:1 }, + {size:25,opacity:0.3}, + {size:50,opacity:0.1} ]; + + var renderScene=function(ofsContext) { + for (var i = 0; i < forces.length; i++) { + var p = forces[i]; + var position = p.pos; + var opacity = 1; + + ofsContext.beginPath(); + for(var f in fills) { + f = fills[f]; + var o = p.burp === true ? 1 : f.opacity; + p.burp = false; + // ofsContext.fillStyle = 'rgba(255,255,255,' + o + ')'; + // ofsContext.arc(position.x / drawScale, + // position.y / drawScale, + // f.size / drawScale, 0, Math.PI*2, true); + // ofsContext.fill(); + } + ofsContext.closePath(); + } + + for (var i = 0; i < particles.length; i++) { + var p = particles[i]; + renderParticle(p); + } + } + + var draw=function() { + renderScene(ctx); + } + + var update=function() { + addNewParticles(); + plotParticles(canvas.width, canvas.height); + } + + var queue=function() { + window.requestAnimationFrame(loop); + } + + loop(); + + } + }, + snow:function(){ + game.haveFun.list.snow.running=true; + if(game.haveFun.snowStart){ + game.haveFun.snowStart(); + } + else{ + /* + * 自由下雪 snowFall + * author:xuanfeng + * time: 2014-01-11 + */ + // 控制下雪 + var canvas; + var snowFall=function(snow) { + // 可配置属性 + snow = snow || {}; + this.maxFlake = snow.maxFlake || 200; //最多片数 + this.flakeSize = snow.flakeSize || 10; //雪花形状 + this.fallSpeed = snow.fallSpeed || 2; //坠落速度 + this.status = 0; //0-初始化、1-开始下雪、2-停止下雪、3-暂停下雪、4-继续下雪 + } + + // 兼容写法 + var requestAnimationFrame = window.requestAnimationFrame || + window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame || + window.msRequestAnimationFrame || + window.oRequestAnimationFrame || + function(callback) { setTimeout(callback, 1000 / 60); }; + var cancelAnimationFrame = window.cancelAnimationFrame || + window.mozCancelAnimationFrame || + window.webkitCancelAnimationFrame || + window.msCancelAnimationFrame || + window.oCancelAnimationFrame; + + // 开始下雪 + snowFall.prototype.start = function(){ + if(this.status == 1 || this.status == 4){ + // 已经在下雪则不作处理 + return false; + } + this.status = 1; + + // 创建画布 + snowCanvas.apply(this); + // 创建雪花形状 + createFlakes.apply(this); + // 画雪 + drawSnow.apply(this) + } + + // 停止下雪 + snowFall.prototype.stop = function(){ + if(this.status == 2 || this.status == 0 || !this.canvas){ + return false; + } + // 停止动画循环 + this.pause(); + this.status = 2; + // 删除画布 + this.canvas.parentNode.removeChild(this.canvas); + this.canvas = null; + } + + // 暂停下雪 + snowFall.prototype.pause = function(){ + if(this.status == 3){ + return false; + } + this.status = 3; + cancelAnimationFrame(this.loop) + }; + // 继续下雪 + snowFall.prototype.resume = function(){ + if(this.status == 3 && this.canvas){ + this.status = 4; + // 动画的计时控制 + var that=this; + this.loop = requestAnimationFrame(function() { + drawSnow.apply(that) + }); + } + }; // 创建画布 - snowCanvas.apply(this); - // 创建雪花形状 - createFlakes.apply(this); + var snowCanvas=function() { + // 添加Dom结点 + var snowcanvas = document.createElement("canvas"); + snowcanvas.classList.add('fun'); + snowcanvas.id = "snowfall"; + ui.window.appendChild(snowcanvas); + canvas=snowcanvas; + this.canvas = snowcanvas; + this.ctx = snowcanvas.getContext("2d"); + // 窗口大小改变的处理 + lib.onresize.push(function() { + snowcanvas.width = ui.window.offsetWidth; + snowcanvas.height = ui.window.offsetHeight + }); + snowcanvas.width = ui.window.offsetWidth; + snowcanvas.height = ui.window.offsetHeight; + } + + // 雪运动对象 + var flakeMove=function(canvasWidth, canvasHeight, flakeSize, fallSpeed) { + this.x = Math.floor(Math.random() * canvasWidth); //x坐标 + this.y = Math.floor(Math.random() * canvasHeight); //y坐标 + this.size = Math.random() * flakeSize + 2; //形状 + this.maxSize = flakeSize; //最大形状 + this.speed = Math.random() * 1 + fallSpeed; //坠落速度 + this.fallSpeed = fallSpeed; //坠落速度 + this.velY = this.speed; //Y方向速度 + this.velX = 0; //X方向速度 + this.stepSize = Math.random() / 30; //步长 + this.step = 0 //步数 + } + + flakeMove.prototype.update = function() { + var x = this.x, + y = this.y; + + // 左右摆动(余弦) + this.velX *= 0.98; + if (this.velY <= this.speed) { + this.velY = this.speed + } + this.velX += Math.cos(this.step += 0.05) * this.stepSize; + + this.y += this.velY; + this.x += this.velX; + // 飞出边界的处理 + if (this.x >= canvas.width || this.x <= 0 || this.y >= canvas.height || this.y <= 0) { + this.reset(canvas.width, canvas.height) + } + }; + + // 飞出边界-放置最顶端继续坠落 + flakeMove.prototype.reset = function(width, height) { + this.x = Math.floor(Math.random() * width); + this.y = 0; + this.size = Math.random() * snow.flakeSize + 2; + this.speed = Math.random() * 1 + snow.fallSpeed; + this.velY = this.speed; + this.velX = 0; + }; + + // 渲染雪花-随机形状 + flakeMove.prototype.render = function(ctx) { + var snowFlake = ctx.createRadialGradient(this.x, this.y, 0, this.x, this.y, this.size); + snowFlake.addColorStop(0, "rgba(255, 255, 255, 0.9)"); + snowFlake.addColorStop(0.5, "rgba(255, 255, 255, 0.5)"); + snowFlake.addColorStop(1, "rgba(255, 255, 255, 0)"); + ctx.save(); + ctx.fillStyle = snowFlake; + ctx.beginPath(); + ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); + ctx.fill(); + ctx.restore(); + }; + + // 创建雪花-定义形状 + var createFlakes=function() { + var maxFlake = this.maxFlake, + flakes = this.flakes = [], + canvas = this.canvas; + for (var i = 0; i < 200; i++) { + flakes.push(new flakeMove(canvas.width, canvas.height, this.flakeSize, this.fallSpeed)) + } + } + // 画雪 - drawSnow.apply(this) - } - - // 停止下雪 - snowFall.prototype.stop = function(){ - if(this.status == 2 || this.status == 0 || !this.canvas){ - return false; - } - // 停止动画循环 - this.pause(); - this.status = 2; - // 删除画布 - this.canvas.parentNode.removeChild(this.canvas); - this.canvas = null; - } - - // 暂停下雪 - snowFall.prototype.pause = function(){ - if(this.status == 3){ - return false; - } - this.status = 3; - cancelAnimationFrame(this.loop) - }; - // 继续下雪 - snowFall.prototype.resume = function(){ - if(this.status == 3 && this.canvas){ - this.status = 4; - // 动画的计时控制 - var that=this; + var drawSnow=function() { + var maxFlake = this.maxFlake, + flakes = this.flakes; + var ctx = this.ctx, canvas = this.canvas, that = this; + // 清空雪花 + ctx.clearRect(0, 0, canvas.width, canvas.height); + for (var e = 0; e < maxFlake; e++) { + flakes[e].update(); + flakes[e].render(ctx); + } + // 一帧一帧的画 this.loop = requestAnimationFrame(function() { - drawSnow.apply(that) + drawSnow.apply(that); }); } - }; - // 创建画布 - var snowCanvas=function() { - // 添加Dom结点 - var snowcanvas = document.createElement("canvas"); - snowcanvas.classList.add('fun'); - snowcanvas.id = "snowfall"; - ui.window.appendChild(snowcanvas); - canvas=snowcanvas; - this.canvas = snowcanvas; - this.ctx = snowcanvas.getContext("2d"); - // 窗口大小改变的处理 - lib.onresize.push(function() { - snowcanvas.width = ui.window.offsetWidth; - snowcanvas.height = ui.window.offsetHeight - }); - snowcanvas.width = ui.window.offsetWidth; - snowcanvas.height = ui.window.offsetHeight; - } - - // 雪运动对象 - var flakeMove=function(canvasWidth, canvasHeight, flakeSize, fallSpeed) { - this.x = Math.floor(Math.random() * canvasWidth); //x坐标 - this.y = Math.floor(Math.random() * canvasHeight); //y坐标 - this.size = Math.random() * flakeSize + 2; //形状 - this.maxSize = flakeSize; //最大形状 - this.speed = Math.random() * 1 + fallSpeed; //坠落速度 - this.fallSpeed = fallSpeed; //坠落速度 - this.velY = this.speed; //Y方向速度 - this.velX = 0; //X方向速度 - this.stepSize = Math.random() / 30; //步长 - this.step = 0 //步数 - } - - flakeMove.prototype.update = function() { - var x = this.x, - y = this.y; - - // 左右摆动(余弦) - this.velX *= 0.98; - if (this.velY <= this.speed) { - this.velY = this.speed + // 调用及控制方法 + var snow = new snowFall(); + game.haveFun.snowStart=function(){ + snow.start(); } - this.velX += Math.cos(this.step += 0.05) * this.stepSize; - - this.y += this.velY; - this.x += this.velX; - // 飞出边界的处理 - if (this.x >= canvas.width || this.x <= 0 || this.y >= canvas.height || this.y <= 0) { - this.reset(canvas.width, canvas.height) + game.haveFun.snowStop=function(){ + game.haveFun.list.snow.running=false; + snow.stop(); } - }; - - // 飞出边界-放置最顶端继续坠落 - flakeMove.prototype.reset = function(width, height) { - this.x = Math.floor(Math.random() * width); - this.y = 0; - this.size = Math.random() * snow.flakeSize + 2; - this.speed = Math.random() * 1 + snow.fallSpeed; - this.velY = this.speed; - this.velX = 0; - }; - - // 渲染雪花-随机形状 - flakeMove.prototype.render = function(ctx) { - var snowFlake = ctx.createRadialGradient(this.x, this.y, 0, this.x, this.y, this.size); - snowFlake.addColorStop(0, "rgba(255, 255, 255, 0.9)"); - snowFlake.addColorStop(0.5, "rgba(255, 255, 255, 0.5)"); - snowFlake.addColorStop(1, "rgba(255, 255, 255, 0)"); - ctx.save(); - ctx.fillStyle = snowFlake; - ctx.beginPath(); - ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2); - ctx.fill(); - ctx.restore(); - }; - - // 创建雪花-定义形状 - var createFlakes=function() { - var maxFlake = this.maxFlake, - flakes = this.flakes = [], - canvas = this.canvas; - for (var i = 0; i < 200; i++) { - flakes.push(new flakeMove(canvas.width, canvas.height, this.flakeSize, this.fallSpeed)) + game.haveFun.snowSize=function(){ + if(game.haveFun.list.snow.size=='large'){ + game.haveFun.list.snow.size='small'; + snow.maxFlake=80; + snow.flakeSize=3; + snow.fallSpeed=1; + if(this&&this.innerHTML){ + this.innerHTML='大雪'; + } + game.saveConfig('coinSnowSize',true); + } + else{ + game.haveFun.list.snow.size='large'; + snow.maxFlake=200; + snow.flakeSize=10; + snow.fallSpeed=2; + if(this&&this.innerHTML){ + this.innerHTML='小雪'; + } + game.saveConfig('coinSnowSize',false); + } } - } - - // 画雪 - var drawSnow=function() { - var maxFlake = this.maxFlake, - flakes = this.flakes; - var ctx = this.ctx, canvas = this.canvas, that = this; - // 清空雪花 - ctx.clearRect(0, 0, canvas.width, canvas.height); - for (var e = 0; e < maxFlake; e++) { - flakes[e].update(); - flakes[e].render(ctx); + if(lib.config.coinSnowSize){ + game.haveFun.snowSize(); } - // 一帧一帧的画 - this.loop = requestAnimationFrame(function() { - drawSnow.apply(that); - }); - } - - // 调用及控制方法 - var snow = new snowFall(); - game.haveFun.snowStart=function(){ snow.start(); } - game.haveFun.snowStop=function(){ - game.haveFun.list.snow.running=false; - snow.stop(); + }, + firework:function(){ + if(game.haveFun.list.firework.running) return; + game.haveFun.list.firework.running=true; + if(game.haveFun.fireworkLoop){ + game.haveFun.fireworkLoop(); } - game.haveFun.snowSize=function(){ - if(game.haveFun.list.snow.size=='large'){ - game.haveFun.list.snow.size='small'; - snow.maxFlake=80; - snow.flakeSize=3; - snow.fallSpeed=1; - if(this&&this.innerHTML){ - this.innerHTML='大雪'; - } - game.saveConfig('coinSnowSize',true); - } - else{ - game.haveFun.list.snow.size='large'; - snow.maxFlake=200; - snow.flakeSize=10; - snow.fallSpeed=2; - if(this&&this.innerHTML){ - this.innerHTML='小雪'; - } - game.saveConfig('coinSnowSize',false); - } - } - if(lib.config.coinSnowSize){ - game.haveFun.snowSize(); - } - snow.start(); - } - }, - firework:function(){ - if(game.haveFun.list.firework.running) return; - game.haveFun.list.firework.running=true; - if(game.haveFun.fireworkLoop){ - game.haveFun.fireworkLoop(); - } - else{ - // when animating on canvas, it is best to use requestAnimationFrame instead of setTimeout or setInterval - // not supported in all browsers though and sometimes needs a prefix, so we need a shim - var requestAnimFrame = ( function() { - return window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - function( callback ) { - window.setTimeout( callback, 1000 / 60 ); - }; - })(); + else{ + // when animating on canvas, it is best to use requestAnimationFrame instead of setTimeout or setInterval + // not supported in all browsers though and sometimes needs a prefix, so we need a shim + var requestAnimFrame = ( function() { + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + function( callback ) { + window.setTimeout( callback, 1000 / 60 ); + }; + })(); - // now we will setup our basic variables for the demo - var canvas = document.createElement( 'canvas' ), - ctx = canvas.getContext( '2d' ), - // full screen dimensions - cw = ui.window.offsetWidth, - ch = ui.window.offsetHeight, - // firework collection - fireworks = [], - // particle collection - particles = [], - // starting hue - hue = 120, - // when launching fireworks with a click, too many get launched at once without a limiter, one launch per 5 loop ticks - limiterTotal = 5, - limiterTick = 0, - // this will time the auto launches of fireworks, one launch per 80 loop ticks - timerTotal = 80, - timerTick = 0, - mousedown = false, - // mouse x coordinate, - mx, - // mouse y coordinate - my; + // now we will setup our basic variables for the demo + var canvas = document.createElement( 'canvas' ), + ctx = canvas.getContext( '2d' ), + // full screen dimensions + cw = ui.window.offsetWidth, + ch = ui.window.offsetHeight, + // firework collection + fireworks = [], + // particle collection + particles = [], + // starting hue + hue = 120, + // when launching fireworks with a click, too many get launched at once without a limiter, one launch per 5 loop ticks + limiterTotal = 5, + limiterTick = 0, + // this will time the auto launches of fireworks, one launch per 80 loop ticks + timerTotal = 80, + timerTick = 0, + mousedown = false, + // mouse x coordinate, + mx, + // mouse y coordinate + my; - // set canvas dimensions - canvas.width = cw; - canvas.height = ch; - ui.window.appendChild(canvas); - canvas.classList.add('fun'); - lib.onresize.push(function(){ - cw=ui.window.offsetWidth; - ch=ui.window.offsetHeight; + // set canvas dimensions canvas.width = cw; canvas.height = ch; - }); + ui.window.appendChild(canvas); + canvas.classList.add('fun'); + lib.onresize.push(function(){ + cw=ui.window.offsetWidth; + ch=ui.window.offsetHeight; + canvas.width = cw; + canvas.height = ch; + }); - // now we are going to setup our function placeholders for the entire demo + // now we are going to setup our function placeholders for the entire demo - // get a random number within a range - var random=function( min, max ) { - return Math.random() * ( max - min ) + min; - } - - // calculate the distance between two points - var calculateDistance=function( p1x, p1y, p2x, p2y ) { - var xDistance = p1x - p2x, - yDistance = p1y - p2y; - return Math.sqrt( Math.pow( xDistance, 2 ) + Math.pow( yDistance, 2 ) ); - } - - // create firework - var Firework=function( sx, sy, tx, ty ) { - // actual coordinates - this.x = sx; - this.y = sy; - // starting coordinates - this.sx = sx; - this.sy = sy; - // target coordinates - this.tx = tx; - this.ty = ty; - // distance from starting point to target - this.distanceToTarget = calculateDistance( sx, sy, tx, ty ); - this.distanceTraveled = 0; - // track the past coordinates of each firework to create a trail effect, increase the coordinate count to create more prominent trails - this.coordinates = []; - this.coordinateCount = 3; - // populate initial coordinate collection with the current coordinates - while( this.coordinateCount-- ) { - this.coordinates.push( [ this.x, this.y ] ); + // get a random number within a range + var random=function( min, max ) { + return Math.random() * ( max - min ) + min; } - this.angle = Math.atan2( ty - sy, tx - sx ); - this.speed = 2; - this.acceleration = 1.05; - this.brightness = random( 50, 70 ); - // circle target indicator radius - this.targetRadius = 1; - } - // update firework - Firework.prototype.update = function( index ) { - // remove last item in coordinates array - this.coordinates.pop(); - // add current coordinates to the start of the array - this.coordinates.unshift( [ this.x, this.y ] ); + // calculate the distance between two points + var calculateDistance=function( p1x, p1y, p2x, p2y ) { + var xDistance = p1x - p2x, + yDistance = p1y - p2y; + return Math.sqrt( Math.pow( xDistance, 2 ) + Math.pow( yDistance, 2 ) ); + } - // cycle the circle target indicator radius - if( this.targetRadius < 8 ) { - this.targetRadius += 0.3; - } else { + // create firework + var Firework=function( sx, sy, tx, ty ) { + // actual coordinates + this.x = sx; + this.y = sy; + // starting coordinates + this.sx = sx; + this.sy = sy; + // target coordinates + this.tx = tx; + this.ty = ty; + // distance from starting point to target + this.distanceToTarget = calculateDistance( sx, sy, tx, ty ); + this.distanceTraveled = 0; + // track the past coordinates of each firework to create a trail effect, increase the coordinate count to create more prominent trails + this.coordinates = []; + this.coordinateCount = 3; + // populate initial coordinate collection with the current coordinates + while( this.coordinateCount-- ) { + this.coordinates.push( [ this.x, this.y ] ); + } + this.angle = Math.atan2( ty - sy, tx - sx ); + this.speed = 2; + this.acceleration = 1.05; + this.brightness = random( 50, 70 ); + // circle target indicator radius this.targetRadius = 1; } - // speed up the firework - this.speed *= this.acceleration; + // update firework + Firework.prototype.update = function( index ) { + // remove last item in coordinates array + this.coordinates.pop(); + // add current coordinates to the start of the array + this.coordinates.unshift( [ this.x, this.y ] ); - // get the current velocities based on angle and speed - var vx = Math.cos( this.angle ) * this.speed, - vy = Math.sin( this.angle ) * this.speed; - // how far will the firework have traveled with velocities applied? - this.distanceTraveled = calculateDistance( this.sx, this.sy, this.x + vx, this.y + vy ); + // cycle the circle target indicator radius + if( this.targetRadius < 8 ) { + this.targetRadius += 0.3; + } else { + this.targetRadius = 1; + } - // if the distance traveled, including velocities, is greater than the initial distance to the target, then the target has been reached - if( this.distanceTraveled >= this.distanceToTarget ) { - createParticles( this.tx, this.ty ); - // remove the firework, use the index passed into the update function to determine which to remove - fireworks.splice( index, 1 ); - } else { - // target not reached, keep traveling - this.x += vx; - this.y += vy; + // speed up the firework + this.speed *= this.acceleration; + + // get the current velocities based on angle and speed + var vx = Math.cos( this.angle ) * this.speed, + vy = Math.sin( this.angle ) * this.speed; + // how far will the firework have traveled with velocities applied? + this.distanceTraveled = calculateDistance( this.sx, this.sy, this.x + vx, this.y + vy ); + + // if the distance traveled, including velocities, is greater than the initial distance to the target, then the target has been reached + if( this.distanceTraveled >= this.distanceToTarget ) { + createParticles( this.tx, this.ty ); + // remove the firework, use the index passed into the update function to determine which to remove + fireworks.splice( index, 1 ); + } else { + // target not reached, keep traveling + this.x += vx; + this.y += vy; + } } - } - // draw firework - Firework.prototype.draw = function() { - ctx.beginPath(); - // move to the last tracked coordinate in the set, then draw a line to the current x and y - ctx.moveTo( this.coordinates[ this.coordinates.length - 1][ 0 ], this.coordinates[ this.coordinates.length - 1][ 1 ] ); - ctx.lineTo( this.x, this.y ); - ctx.strokeStyle = 'hsl(' + hue + ', 100%, ' + this.brightness + '%)'; - ctx.stroke(); + // draw firework + Firework.prototype.draw = function() { + ctx.beginPath(); + // move to the last tracked coordinate in the set, then draw a line to the current x and y + ctx.moveTo( this.coordinates[ this.coordinates.length - 1][ 0 ], this.coordinates[ this.coordinates.length - 1][ 1 ] ); + ctx.lineTo( this.x, this.y ); + ctx.strokeStyle = 'hsl(' + hue + ', 100%, ' + this.brightness + '%)'; + ctx.stroke(); - ctx.beginPath(); - // draw the target for this firework with a pulsing circle - ctx.arc( this.tx, this.ty, this.targetRadius, 0, Math.PI * 2 ); - ctx.stroke(); - } - - // create particle - var Particle=function( x, y ) { - this.x = x; - this.y = y; - // track the past coordinates of each particle to create a trail effect, increase the coordinate count to create more prominent trails - this.coordinates = []; - this.coordinateCount = 5; - while( this.coordinateCount-- ) { - this.coordinates.push( [ this.x, this.y ] ); + ctx.beginPath(); + // draw the target for this firework with a pulsing circle + ctx.arc( this.tx, this.ty, this.targetRadius, 0, Math.PI * 2 ); + ctx.stroke(); } - // set a random angle in all possible directions, in radians - this.angle = random( 0, Math.PI * 2 ); - this.speed = random( 1, 10 ); - // friction will slow the particle down - this.friction = 0.95; - // gravity will be applied and pull the particle down - this.gravity = 1; - // set the hue to a random number +-20 of the overall hue variable - this.hue = random( hue - 20, hue + 20 ); - this.brightness = random( 50, 80 ); - this.alpha = 1; - // set how fast the particle fades out - this.decay = random( 0.015, 0.03 ); - } - // update particle - Particle.prototype.update = function( index ) { - // remove last item in coordinates array - this.coordinates.pop(); - // add current coordinates to the start of the array - this.coordinates.unshift( [ this.x, this.y ] ); - // slow down the particle - this.speed *= this.friction; - // apply velocity - this.x += Math.cos( this.angle ) * this.speed; - this.y += Math.sin( this.angle ) * this.speed + this.gravity; - // fade out the particle - this.alpha -= this.decay; - - // remove the particle once the alpha is low enough, based on the passed in index - if( this.alpha <= this.decay ) { - particles.splice( index, 1 ); + // create particle + var Particle=function( x, y ) { + this.x = x; + this.y = y; + // track the past coordinates of each particle to create a trail effect, increase the coordinate count to create more prominent trails + this.coordinates = []; + this.coordinateCount = 5; + while( this.coordinateCount-- ) { + this.coordinates.push( [ this.x, this.y ] ); + } + // set a random angle in all possible directions, in radians + this.angle = random( 0, Math.PI * 2 ); + this.speed = random( 1, 10 ); + // friction will slow the particle down + this.friction = 0.95; + // gravity will be applied and pull the particle down + this.gravity = 1; + // set the hue to a random number +-20 of the overall hue variable + this.hue = random( hue - 20, hue + 20 ); + this.brightness = random( 50, 80 ); + this.alpha = 1; + // set how fast the particle fades out + this.decay = random( 0.015, 0.03 ); } - } - // draw particle - Particle.prototype.draw = function() { - ctx. beginPath(); - // move to the last tracked coordinates in the set, then draw a line to the current x and y - ctx.moveTo( this.coordinates[ this.coordinates.length - 1 ][ 0 ], this.coordinates[ this.coordinates.length - 1 ][ 1 ] ); - ctx.lineTo( this.x, this.y ); - ctx.strokeStyle = 'hsla(' + this.hue + ', 100%, ' + this.brightness + '%, ' + this.alpha + ')'; - ctx.stroke(); - } + // update particle + Particle.prototype.update = function( index ) { + // remove last item in coordinates array + this.coordinates.pop(); + // add current coordinates to the start of the array + this.coordinates.unshift( [ this.x, this.y ] ); + // slow down the particle + this.speed *= this.friction; + // apply velocity + this.x += Math.cos( this.angle ) * this.speed; + this.y += Math.sin( this.angle ) * this.speed + this.gravity; + // fade out the particle + this.alpha -= this.decay; - // create particle group/explosion - var createParticles=function( x, y ) { - // increase the particle count for a bigger explosion, beware of the canvas performance hit with the increased particles though - var particleCount = 30; - while( particleCount-- ) { - particles.push( new Particle( x, y ) ); + // remove the particle once the alpha is low enough, based on the passed in index + if( this.alpha <= this.decay ) { + particles.splice( index, 1 ); + } } - } - // main demo loop - var loop=function() { - // if(lib.config.coin_free_playpackconfig&&!_status.imchoosing){ - // canvas.style.display='none'; - // } - // else{ - // canvas.style.display=''; - // } - // this function will run endlessly with requestAnimationFrame - if(!game.haveFun.list.firework.running){ - canvas.width=cw; - canvas.height=ch; - return; + // draw particle + Particle.prototype.draw = function() { + ctx. beginPath(); + // move to the last tracked coordinates in the set, then draw a line to the current x and y + ctx.moveTo( this.coordinates[ this.coordinates.length - 1 ][ 0 ], this.coordinates[ this.coordinates.length - 1 ][ 1 ] ); + ctx.lineTo( this.x, this.y ); + ctx.strokeStyle = 'hsla(' + this.hue + ', 100%, ' + this.brightness + '%, ' + this.alpha + ')'; + ctx.stroke(); + } + + // create particle group/explosion + var createParticles=function( x, y ) { + // increase the particle count for a bigger explosion, beware of the canvas performance hit with the increased particles though + var particleCount = 30; + while( particleCount-- ) { + particles.push( new Particle( x, y ) ); + } + } + + // main demo loop + var loop=function() { + // if(lib.config.coin_free_playpackconfig&&!_status.imchoosing){ + // canvas.style.display='none'; + // } + // else{ + // canvas.style.display=''; + // } + // this function will run endlessly with requestAnimationFrame + if(!game.haveFun.list.firework.running){ + canvas.width=cw; + canvas.height=ch; + return; + } + else{ + requestAnimFrame( loop ); + } + + // increase the hue to get different colored fireworks over time + hue += 0.5; + + // normally, clearRect() would be used to clear the canvas + // we want to create a trailing effect though + // setting the composite operation to destination-out will allow us to clear the canvas at a specific opacity, rather than wiping it entirely + ctx.globalCompositeOperation = 'destination-out'; + // decrease the alpha property to create more prominent trails + ctx.fillStyle = 'rgba(0, 0, 0, 0.5)'; + ctx.fillRect( 0, 0, cw, ch ); + // change the composite operation back to our main mode + // lighter creates bright highlight points as the fireworks and particles overlap each other + ctx.globalCompositeOperation = 'lighter'; + + // loop over each firework, draw it, update it + var i = fireworks.length; + while( i-- ) { + fireworks[ i ].draw(); + fireworks[ i ].update( i ); + } + + // loop over each particle, draw it, update it + var i = particles.length; + while( i-- ) { + particles[ i ].draw(); + particles[ i ].update( i ); + } + + // launch fireworks automatically to random coordinates, when the mouse isn't down + if( timerTick >= timerTotal ) { + if( !mousedown ) { + // start the firework at the bottom middle of the screen, then set the random target coordinates, the random y coordinates will be set within the range of the top half of the screen + fireworks.push( new Firework( cw / 2, ch, random( 0, cw ), random( 0, ch / 2 ) ) ); + timerTick = 0; + } + } else { + timerTick++; + } + + // limit the rate at which fireworks get launched when mouse is down + if( limiterTick >= limiterTotal ) { + if( mousedown ) { + // start the firework at the bottom middle of the screen, then set the current mouse coordinates as the target + fireworks.push( new Firework( cw / 2, ch, mx, my ) ); + limiterTick = 0; + } + } else { + limiterTick++; + } + } + + + if(lib.config.touchscreen){ + ui.window.addEventListener( 'touchmove', function( e ) { + mx = e.touches[0].clientX/game.documentZoom - canvas.offsetLeft; + my = e.touches[0].clientY/game.documentZoom - canvas.offsetTop; + }); + ui.window.addEventListener( 'touchstart', function( e ) { + mousedown = true; + }); + ui.window.addEventListener( 'touchend', function( e ) { + mousedown = false; + }); } else{ - requestAnimFrame( loop ); + // mouse event bindings + // update the mouse coordinates on mousemove + ui.window.addEventListener( 'mousemove', function( e ) { + mx = e.pageX/game.documentZoom - canvas.offsetLeft; + my = e.pageY/game.documentZoom - canvas.offsetTop; + }); + + // toggle mousedown state and prevent canvas from being selected + ui.window.addEventListener( 'mousedown', function( e ) { + e.preventDefault(); + mousedown = true; + }); + + ui.window.addEventListener( 'mouseup', function( e ) { + e.preventDefault(); + mousedown = false; + }); } - // increase the hue to get different colored fireworks over time - hue += 0.5; - - // normally, clearRect() would be used to clear the canvas - // we want to create a trailing effect though - // setting the composite operation to destination-out will allow us to clear the canvas at a specific opacity, rather than wiping it entirely - ctx.globalCompositeOperation = 'destination-out'; - // decrease the alpha property to create more prominent trails - ctx.fillStyle = 'rgba(0, 0, 0, 0.5)'; - ctx.fillRect( 0, 0, cw, ch ); - // change the composite operation back to our main mode - // lighter creates bright highlight points as the fireworks and particles overlap each other - ctx.globalCompositeOperation = 'lighter'; - - // loop over each firework, draw it, update it - var i = fireworks.length; - while( i-- ) { - fireworks[ i ].draw(); - fireworks[ i ].update( i ); - } - - // loop over each particle, draw it, update it - var i = particles.length; - while( i-- ) { - particles[ i ].draw(); - particles[ i ].update( i ); - } - - // launch fireworks automatically to random coordinates, when the mouse isn't down - if( timerTick >= timerTotal ) { - if( !mousedown ) { - // start the firework at the bottom middle of the screen, then set the random target coordinates, the random y coordinates will be set within the range of the top half of the screen - fireworks.push( new Firework( cw / 2, ch, random( 0, cw ), random( 0, ch / 2 ) ) ); - timerTick = 0; - } - } else { - timerTick++; - } - - // limit the rate at which fireworks get launched when mouse is down - if( limiterTick >= limiterTotal ) { - if( mousedown ) { - // start the firework at the bottom middle of the screen, then set the current mouse coordinates as the target - fireworks.push( new Firework( cw / 2, ch, mx, my ) ); - limiterTick = 0; - } - } else { - limiterTick++; - } + // once the window loads, we are ready for some fireworks! + game.haveFun.fireworkLoop=loop; + game.haveFun.fireworkStop=function(){ + game.haveFun.list.firework.running=false; + }, + loop(); } - - - if(lib.config.touchscreen){ - ui.window.addEventListener( 'touchmove', function( e ) { - mx = e.touches[0].clientX/game.documentZoom - canvas.offsetLeft; - my = e.touches[0].clientY/game.documentZoom - canvas.offsetTop; - }); - ui.window.addEventListener( 'touchstart', function( e ) { - mousedown = true; - }); - ui.window.addEventListener( 'touchend', function( e ) { - mousedown = false; - }); - } - else{ - // mouse event bindings - // update the mouse coordinates on mousemove - ui.window.addEventListener( 'mousemove', function( e ) { - mx = e.pageX/game.documentZoom - canvas.offsetLeft; - my = e.pageY/game.documentZoom - canvas.offsetTop; - }); - - // toggle mousedown state and prevent canvas from being selected - ui.window.addEventListener( 'mousedown', function( e ) { - e.preventDefault(); - mousedown = true; - }); - - ui.window.addEventListener( 'mouseup', function( e ) { - e.preventDefault(); - mousedown = false; - }); - } - - // once the window loads, we are ready for some fireworks! - game.haveFun.fireworkLoop=loop; - game.haveFun.fireworkStop=function(){ - game.haveFun.list.firework.running=false; - }, - loop(); } } + }, + help:{ + '富甲天下':'
    • 每完成一次对局,可获得一定数量的金币'+ + '
    • 战斗胜利可额外获得20金币,每杀死一个敌人可获得10金币(托管无效)'+ + '
    • 使用的武将越强,获得的金币数越少'+ + '
    • 执行以下操作时,将扣除金币:
      • 作弊:20金币
      • 换将卡:3金币
      • '+ + '自由选将:10金币
      • 手气卡:3金币
      • 换人:10金币
      '+ + '
    • 金币可用于购买烟花等游戏特效(点击右上角的金币按钮)'+ + '
    • 修改金币:
      game.changCoin'+ + '
    • 默认下雪:
      game.haveFun.alwaysSnow' } - }, - help:{ - '富甲天下':'
      • 每完成一次对局,可获得一定数量的金币'+ - '
      • 战斗胜利可额外获得20金币,每杀死一个敌人可获得10金币(托管无效)'+ - '
      • 使用的武将越强,获得的金币数越少'+ - '
      • 执行以下操作时,将扣除金币:
        • 作弊:20金币
        • 换将卡:3金币
        • '+ - '自由选将:10金币
        • 手气卡:3金币
        • 换人:10金币
        '+ - '
      • 金币可用于购买烟花等游戏特效(点击右上角的金币按钮)'+ - '
      • 修改金币:
        game.changCoin'+ - '
      • 默认下雪:
        game.haveFun.alwaysSnow' - } + }; }); diff --git a/extension/wuxing/extension.js b/extension/wuxing/extension.js index 643a9e63e..7637bb506 100644 --- a/extension/wuxing/extension.js +++ b/extension/wuxing/extension.js @@ -1,227 +1,235 @@ 'use strict'; -game.import('play',{ - name:'wuxing', - arenaReady:function(){ - if(_status.connectMode) return; - lib.card.list.splice(Math.floor(lib.card.list.length*Math.random()),0,['spade',5,'wuxingpan']); - if(!_status.video){ - lib.video.push({ - type:'play', - name:'wuxing' - }); - } - }, - video:function(){ - for(var i in this.translate){ - lib.translate[i]=this.translate[i]; - } - for(var i in this.card){ - lib.card[i]=this.card[i]; - } - for(var i in this.skill){ - lib.skill[i]=this.skill[i]; - } - }, - element:{ - player:{ - init:function(player){ - if(player.node.wuxing){ - player.node.wuxing.remove(); - } - if(_status.video||_status.connectMode) return; - var node=ui.create.div('.wunature',player); - var list=['metal','wood','water','fire','soil']; - var nature=list.randomGet(); - player.wunature=nature; - node.dataset.nature=nature; - node.innerHTML=get.translation(nature); - player.node.wuxing=node; +game.import('play',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'wuxing', + arenaReady:function(){ + if(_status.connectMode) return; + lib.card.list.splice(Math.floor(lib.card.list.length*Math.random()),0,['spade',5,'wuxingpan']); + if(!_status.video){ + lib.video.push({ + type:'play', + name:'wuxing' + }); } }, - card:{ - init:function(card){ - if(_status.video||_status.connectMode) return; - if(card.name=='wuxingpan') return; - if(card.wunature) return; - if(Math.random()>(parseFloat(lib.config.wuxing_num_playpackconfig)||0)) return; - var node=ui.create.div('.wunature',card); - var list=['metal','wood','water','fire','soil']; - var nature=list.randomGet(); - card.wunature=nature; - node.dataset.nature=nature; - node.innerHTML=get.translation(nature); - card.node.wuxing=node; - if(!card.suit||!card.number){ - card.node.wuxing.style.display='none'; + video:function(){ + for(var i in this.translate){ + lib.translate[i]=this.translate[i]; + } + for(var i in this.card){ + lib.card[i]=this.card[i]; + } + for(var i in this.skill){ + lib.skill[i]=this.skill[i]; + } + }, + element:{ + player:{ + init:function(player){ + if(player.node.wuxing){ + player.node.wuxing.remove(); + } + if(_status.video||_status.connectMode) return; + var node=ui.create.div('.wunature',player); + var list=['metal','wood','water','fire','soil']; + var nature=list.randomGet(); + player.wunature=nature; + node.dataset.nature=nature; + node.innerHTML=get.translation(nature); + player.node.wuxing=node; + } + }, + card:{ + init:function(card){ + if(_status.video||_status.connectMode) return; + if(card.name=='wuxingpan') return; + if(card.wunature) return; + if(Math.random()>(parseFloat(lib.config.wuxing_num_playpackconfig)||0)) return; + var node=ui.create.div('.wunature',card); + var list=['metal','wood','water','fire','soil']; + var nature=list.randomGet(); + card.wunature=nature; + node.dataset.nature=nature; + node.innerHTML=get.translation(nature); + card.node.wuxing=node; + if(!card.suit||!card.number){ + card.node.wuxing.style.display='none'; + } } } - } - }, - skill:{ - _shengke:{ - trigger:{target:'useCardToBegin'}, - forced:true, - popup:false, - filter:function(event,player){ - if(_status.connectMode) return false; - return event.card.wunature&&player.wunature; - }, - content:function(){ - switch(trigger.card.wunature){ - case 'metal': - switch(player.wunature){ - case 'wood': - if(player.countCards('he')){ - game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); - player.chooseToDiscard('你被金属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('金克木')}return; - case 'water': - game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); - player.draw();player.popup('金生水'); - return; - } - return; - case 'wood': - switch(player.wunature){ - case 'soil': - if(player.countCards('he')){ - game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); - player.chooseToDiscard('你被木属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('木克土')}return; - case 'fire': - game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); - player.draw();player.popup('木生火'); - return; - } - return; - case 'water': - switch(player.wunature){ - case 'fire': - if(player.countCards('he')){ - game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); - player.chooseToDiscard('你被水属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('水克火')}return; - case 'wood': - game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); - player.draw();player.popup('水生木'); - return; - } - return; - case 'fire': - switch(player.wunature){ + }, + skill:{ + _shengke:{ + trigger:{target:'useCardToBegin'}, + forced:true, + popup:false, + filter:function(event,player){ + if(_status.connectMode) return false; + return event.card.wunature&&player.wunature; + }, + content:function(){ + switch(trigger.card.wunature){ case 'metal': - if(player.countCards('he')){ - game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); - player.chooseToDiscard('你被火属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('火克金')}return; - case 'soil': - game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); - player.draw();player.popup('火生土'); - return; - } - return; - case 'soil': - switch(player.wunature){ - case 'water': - if(player.countCards('he')){ - game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); - player.chooseToDiscard('你被土属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('土克水')}return; - case 'metal': - game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); - player.draw();player.popup('土生金'); - return; - } - return; - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - switch(card.wunature){ - case 'metal': - switch(target.wunature){ - case 'wood':if(current!=0) return [1,-0.3];return; - case 'water':if(current!=0) return [1,0.3];return; - } - return; + switch(player.wunature){ case 'wood': - switch(target.wunature){ - case 'soil':if(current!=0) return [1,-0.3];return; - case 'fire':if(current!=0) return [1,0.3];return; - } - return; + if(player.countCards('he')){ + game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); + player.chooseToDiscard('你被金属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('金克木')}return; case 'water': - switch(target.wunature){ - case 'fire':if(current!=0) return [1,-0.3];return; - case 'wood':if(current!=0) return [1,0.3];return; - } - return; - case 'fire': - switch(target.wunature){ - case 'metal':if(current!=0) return [1,-0.3];return; - case 'soil':if(current!=0) return [1,0.3];return; - } - return; + game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); + player.draw();player.popup('金生水'); + return; + } + return; + case 'wood': + switch(player.wunature){ case 'soil': - switch(target.wunature){ - case 'water':if(current!=0) return [1,-0.3];return; - case 'metal':if(current!=0) return [1,0.3];return; + if(player.countCards('he')){ + game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); + player.chooseToDiscard('你被木属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('木克土')}return; + case 'fire': + game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); + player.draw();player.popup('木生火'); + return; + } + return; + case 'water': + switch(player.wunature){ + case 'fire': + if(player.countCards('he')){ + game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); + player.chooseToDiscard('你被水属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('水克火')}return; + case 'wood': + game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); + player.draw();player.popup('水生木'); + return; + } + return; + case 'fire': + switch(player.wunature){ + case 'metal': + if(player.countCards('he')){ + game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); + player.chooseToDiscard('你被火属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('火克金')}return; + case 'soil': + game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); + player.draw();player.popup('火生土'); + return; + } + return; + case 'soil': + switch(player.wunature){ + case 'water': + if(player.countCards('he')){ + game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); + player.chooseToDiscard('你被土属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('土克水')}return; + case 'metal': + game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); + player.draw();player.popup('土生金'); + return; + } + return; + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + switch(card.wunature){ + case 'metal': + switch(target.wunature){ + case 'wood':if(current!=0) return [1,-0.3];return; + case 'water':if(current!=0) return [1,0.3];return; + } + return; + case 'wood': + switch(target.wunature){ + case 'soil':if(current!=0) return [1,-0.3];return; + case 'fire':if(current!=0) return [1,0.3];return; + } + return; + case 'water': + switch(target.wunature){ + case 'fire':if(current!=0) return [1,-0.3];return; + case 'wood':if(current!=0) return [1,0.3];return; + } + return; + case 'fire': + switch(target.wunature){ + case 'metal':if(current!=0) return [1,-0.3];return; + case 'soil':if(current!=0) return [1,0.3];return; + } + return; + case 'soil': + switch(target.wunature){ + case 'water':if(current!=0) return [1,-0.3];return; + case 'metal':if(current!=0) return [1,0.3];return; + } + return; } - return; } } } + }, + wuxingpan_skill:{ + enable:'phaseUse', + usable:1, + filterCard:true, + lose:false, + prompt:'选择一张手牌永久改变其五行属性', + content:function(){ + "step 0" + player.chooseControl('metal','wood','water','fire','soil'); + "step 1" + var card=cards[0]; + if(!card.node.wuxing){ + card.node.wuxing=ui.create.div('.wunature',card); + } + + + card.wunature=result.control; + card.node.wuxing.dataset.nature=result.control; + card.node.wuxing.innerHTML=get.translation(result.control); + } } }, - wuxingpan_skill:{ - enable:'phaseUse', - usable:1, - filterCard:true, - lose:false, - prompt:'选择一张手牌永久改变其五行属性', - content:function(){ - "step 0" - player.chooseControl('metal','wood','water','fire','soil'); - "step 1" - var card=cards[0]; - if(!card.node.wuxing){ - card.node.wuxing=ui.create.div('.wunature',card); - } - - - card.wunature=result.control; - card.node.wuxing.dataset.nature=result.control; - card.node.wuxing.innerHTML=get.translation(result.control); + card:{ + wuxingpan:{ + type:'equip', + subtype:'equip5', + skills:['wuxingpan_skill'], + fullskin:true } + }, + translate:{ + metal:'金', + wood:'木', + water:'水', + soil:'土', + goldColor:'rgb(236,236,130)', + woodColor:'rgb(149,202,147)', + waterColor:'rgb(150,88,201)', + fireColor:'rgb(236,132,106)', + soilColor:'rgb(201,159,98)', + goldColor2:'rgba(236,236,57,0.3)', + woodColor2:'rgba(33,155,10,0.3)', + waterColor2:'rgba(29,156,255,0.3)', + fireColor2:'rgba(255,51,0,0.3)', + soilColor2:'rgba(163,98,0,0.3)', + wuxingpan:'五行盘', + wuxingpan_skill:'五行', + wuxingpan_skill_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性', + wuxingpan_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性', + }, + help:{ + '五行生克':'
        • 每名角色在游戏开始时随机获得一个属性
        • 牌堆中三分之一的牌会随机获得一个属性
        • 当一名成为相克属性卡牌的目标时,'+ + '须弃置一张牌
        • 当一名角色成为相生的卡牌的目标时,须摸一张牌'+ + '
        • 金克木,金生水;
          木克土,木生火;
          水克火,水生木;
          火克金,火生土;
          土克水,土生金' } - }, - card:{ - wuxingpan:{ - type:'equip', - subtype:'equip5', - skills:['wuxingpan_skill'], - fullskin:true - } - }, - translate:{ - metal:'金', - wood:'木', - water:'水', - soil:'土', - goldColor:'rgb(236,236,130)', - woodColor:'rgb(149,202,147)', - waterColor:'rgb(150,88,201)', - fireColor:'rgb(236,132,106)', - soilColor:'rgb(201,159,98)', - goldColor2:'rgba(236,236,57,0.3)', - woodColor2:'rgba(33,155,10,0.3)', - waterColor2:'rgba(29,156,255,0.3)', - fireColor2:'rgba(255,51,0,0.3)', - soilColor2:'rgba(163,98,0,0.3)', - wuxingpan:'五行盘', - wuxingpan_skill:'五行', - wuxingpan_skill_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性', - wuxingpan_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性', - }, - help:{ - '五行生克':'
          • 每名角色在游戏开始时随机获得一个属性
          • 牌堆中三分之一的牌会随机获得一个属性
          • 当一名成为相克属性卡牌的目标时,'+ - '须弃置一张牌
          • 当一名角色成为相生的卡牌的目标时,须摸一张牌'+ - '
          • 金克木,金生水;
            木克土,木生火;
            水克火,水生木;
            火克金,火生土;
            土克水,土生金' - } + }; }); diff --git a/game/game.js b/game/game.js index ed813f017..1be13eba5 100644 --- a/game/game.js +++ b/game/game.js @@ -6474,6 +6474,11 @@ window.game=game; + window.lib=lib; + window.ui=ui; + window.ai=ai; + window.get=get; + window._status=_status; var styleToLoad=6; var styleLoaded=function(){ styleToLoad--; @@ -6922,16 +6927,21 @@ var character=lib.imported.character; var play=lib.imported.play; delete window.game; + delete window.ui; + delete window.get; + delete window.ai; + delete window.lib; + delete window._status; var i,j,k; for(i in mode[lib.config.mode].element){ if(!lib.element[i]) lib.element[i]=[]; for(j in mode[lib.config.mode].element[i]){ if(j=='init'){ if(!lib.element[i].inits) lib.element[i].inits=[]; - lib.element[i].inits.push(lib.init.eval(mode[lib.config.mode].element[i][j])); + lib.element[i].inits.push(mode[lib.config.mode].element[i][j]); } else{ - lib.element[i][j]=lib.init.eval(mode[lib.config.mode].element[i][j]); + lib.element[i][j]=mode[lib.config.mode].element[i][j]; } } } @@ -6939,32 +6949,32 @@ if(typeof mode[lib.config.mode].ai[i]=='object'){ if(ai[i]==undefined) ai[i]={}; for(j in mode[lib.config.mode].ai[i]){ - ai[i][j]=lib.init.eval(mode[lib.config.mode].ai[i][j]); + ai[i][j]=mode[lib.config.mode].ai[i][j]; } } else{ - ai[i]=lib.init.eval(mode[lib.config.mode].ai[i]); + ai[i]=mode[lib.config.mode].ai[i]; } } for(i in mode[lib.config.mode].ui){ if(typeof mode[lib.config.mode].ui[i]=='object'){ if(ui[i]==undefined) ui[i]={}; for(j in mode[lib.config.mode].ui[i]){ - ui[i][j]=lib.init.eval(mode[lib.config.mode].ui[i][j]); + ui[i][j]=mode[lib.config.mode].ui[i][j]; } } else{ - ui[i]=lib.init.eval(mode[lib.config.mode].ui[i]); + ui[i]=mode[lib.config.mode].ui[i]; } } for(i in mode[lib.config.mode].game){ - game[i]=lib.init.eval(mode[lib.config.mode].game[i]); + game[i]=mode[lib.config.mode].game[i]; } for(i in mode[lib.config.mode].get){ - get[i]=lib.init.eval(mode[lib.config.mode].get[i]); + get[i]=mode[lib.config.mode].get[i]; } lib.init.start=mode[lib.config.mode].start; - lib.init.startBefore=lib.init.eval(mode[lib.config.mode].startBefore); + lib.init.startBefore=mode[lib.config.mode].startBefore; if(game.onwash){ lib.onwash.push(game.onwash); delete game.onwash; @@ -6990,11 +7000,11 @@ if(i=='startBefore') continue; if(lib[i]==undefined) lib[i]=(get.objtype(mode[lib.config.mode][i])=='array')?[]:{}; for(j in mode[lib.config.mode][i]){ - lib[i][j]=lib.init.eval(mode[lib.config.mode][i][j]); + lib[i][j]=mode[lib.config.mode][i][j]; } } if(typeof mode[lib.config.mode].init=='function'){ - (lib.init.eval(mode[lib.config.mode].init))(); + mode[lib.config.mode].init(); } var connectCharacterPack=[]; @@ -7037,7 +7047,7 @@ } else{ if(lib[j][k]==undefined){ - lib[j][k]=lib.init.eval(character[i][j][k]); + lib[j][k]=character[i][j][k]; if(j=='card'&&lib[j][k].derivation){ if(!lib.cardPack.mode_derivation){ lib.cardPack.mode_derivation=[k]; @@ -7100,7 +7110,7 @@ if(lib.config.cards.contains(i)){ var pile; if(typeof card[i][j]=='function'){ - pile=lib.init.eval(card[i][j])(); + pile=card[i][j](); } else{ pile=card[i][j]; @@ -7131,7 +7141,7 @@ lib[j][k+'_card_config']=card[i][j][k]; } else{ - if(lib[j][k]==undefined) lib[j][k]=lib.init.eval(card[i][j][k]); + if(lib[j][k]==undefined) lib[j][k]=card[i][j][k]; else console.log('dublicate '+j+' in card '+i+':\n'+k+'\n'+lib[j][k]+'\n'+card[i][j][k]); if(j=='card'&&lib[j][k].derivation){ if(!lib.cardPack.mode_derivation){ @@ -7169,10 +7179,10 @@ for(k in play[i].element[j]){ if(k=='init'){ if(!lib.element[j].inits) lib.element[j].inits=[]; - lib.element[j].inits.push(lib.init.eval(play[i].element[j][k])); + lib.element[j].inits.push(play[i].element[j][k]); } else{ - lib.element[j][k]=lib.init.eval(play[i].element[j][k]); + lib.element[j][k]=play[i].element[j][k]; } } } @@ -7180,18 +7190,18 @@ if(typeof play[i].ui[j]=='object'){ if(ui[j]==undefined) ui[j]={}; for(k in play[i].ui[j]){ - ui[j][k]=lib.init.eval(play[i].ui[j][k]); + ui[j][k]=play[i].ui[j][k]; } } else{ - ui[j]=lib.init.eval(play[i].ui[j]); + ui[j]=play[i].ui[j]; } } for(j in play[i].game){ - game[j]=lib.init.eval(play[i].game[j]); + game[j]=play[i].game[j]; } for(j in play[i].get){ - get[j]=lib.init.eval(play[i].get[j]); + get[j]=play[i].get[j]; } for(j in play[i]){ if(j=='mode'||j=='forbid'||j=='init'||j=='element'|| @@ -7204,11 +7214,11 @@ if(lib[j][k]!=undefined){ console.log('dublicate '+j+' in play '+i+':\n'+k+'\n'+': '+lib[j][k]+'\n'+play[i][j][k]); } - lib[j][k]=lib.init.eval(play[i][j][k]); + lib[j][k]=play[i][j][k]; } } } - if(typeof play[i].init=='function') (lib.init.eval(play[i].init))(); + if(typeof play[i].init=='function') play[i].init(); if(typeof play[i].arenaReady=='function') lib.arenaReady.push(play[i].arenaReady); } } @@ -8668,9 +8678,12 @@ }, loadMode:function(){ 'step 0' + event.removegame=window.game!=game; + if(event.removegame) window.game=game; lib.init.js(lib.assetURL+'mode',event.mode,game.resume); game.pause(); 'step 1' + if(event.removegame) delete window.game; event.result=lib.imported.mode[event.mode]; delete lib.imported.mode[event.mode]; }, @@ -20785,9 +20798,10 @@ if(!lib.imported[type]){ lib.imported[type]={}; } - if(content.name){ - lib.imported[type][content.name]=content; - delete content.name; + var content2=content(); + if(content2.name){ + lib.imported[type][content2.name]=content2; + delete content2.name; } } }, @@ -24751,7 +24765,10 @@ return players[0]; }, loadModeAsync:function(name,callback){ + var removegame=window.game!=game; + if(removegame) window.game=game; var script=lib.init.js(lib.assetURL+'mode',name,function(){ + if(removegame) delete window.game; script.remove(); var content=lib.imported.mode[name]; delete lib.imported.mode[name]; @@ -24769,7 +24786,10 @@ } } } + var removegame=window.game!=game; + if(removegame) window.game=game; var script=lib.init.js(lib.assetURL+'mode',name,function(){ + if(removegame) delete window.game; script.remove(); var mode=lib.imported.mode; _status.sourcemode=lib.config.mode; diff --git a/mode/boss.js b/mode/boss.js index 0fceb98b5..e7519f6cf 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -1,4191 +1,4199 @@ 'use strict'; -game.import('mode',{ - name:'boss', - start:function(){ - "step 0" - var playback=localStorage.getItem(lib.configprefix+'playback'); - if(playback){ - ui.create.me(); - ui.arena.style.display='none'; - ui.system.style.display='none'; - _status.playback=playback; - localStorage.removeItem(lib.configprefix+'playback'); - var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); - store.get(parseInt(playback)).onsuccess=function(e){ - if(e.target.result){ - game.playVideoContent(e.target.result.video); - } - else{ - alert('播放失败:找不到录像'); - game.reload(); - } - } - event.finish(); - return; - } - for(var i in lib.characterPack.mode_boss){ - lib.character[i]=lib.characterPack.mode_boss[i]; - if(!lib.character[i][4]){ - lib.character[i][4]=[]; - } - } - for(var i in lib.skill){ - if(lib.skill[i].changeSeat){ - lib.skill[i]={}; - if(lib.translate[i+'_info']){ - lib.translate[i+'_info']='此模式下不可用'; - } - } - } - lib.translate.restart='返回'; - lib.init.css(lib.assetURL+'layout/mode','boss'); - game.delay(0.1); - "step 1" - var bosslist=ui.create.div('#bosslist.hidden'); - if(lib.config.player_border!='wide'){ - bosslist.classList.add('slim'); - } - event.bosslist=bosslist; - bosslist.ontouchmove = ui.click.touchScroll; - bosslist.style.WebkitOverflowScrolling='touch'; - if(!lib.config.touchscreen&&lib.config.mousewheel){ - bosslist._scrollspeed=30; - bosslist._scrollnum=10; - bosslist.onmousewheel=ui.click.mousewheel; - } - // var bosslistlinks={}; - // var toggleBoss=function(bool){ - // game.saveConfig(this._link.config._name,bool,true); - // var node=bosslistlinks[this._link.config._name]; - // if(bool){ - // node.style.display=''; - // } - // else{ - // node.style.display='none'; - // } - // }; - var onpause=function(){ - ui.window.classList.add('bosspaused'); - } - var onresume=function(){ - ui.window.classList.remove('bosspaused'); - } - game.onpause=onpause; - game.onpause2=onpause; - game.onresume=onresume; - game.onresume2=onresume; - ui.create.div(bosslist); - - event.current=null; - var list=[]; - for(var i in lib.character){ - var info=lib.character[i]; - if(info[4].contains('boss')){ - // var cfg=i+'_bossconfig'; - // if(get.config(cfg)==undefined){ - // game.saveConfig(cfg,true,true); - // } - // lib.translate[cfg+'_config']=lib.translate[i]; - // lib.mode.boss.config[cfg]={ - // name:get.translation(i), - // onclick:toggleBoss, - // init:true, - // } - var player=ui.create.player(bosslist).init(i); - if(lib.characterPack.mode_boss[i]&&get.config(i+'_boss_config')==false){ - player.style.display='none'; - } - if(player.hp==0){ - player.node.hp.style.display='none'; - } - list.push(player); - player.node.hp.classList.add('text'); - player.node.hp.dataset.condition=''; - player.node.hp.innerHTML=info[2]; - if(info[2]==Infinity){ - player.node.hp.innerHTML='∞'; - } - player.setIdentity(player.name); - player.node.identity.dataset.color=info[5]; - // bosslistlinks[cfg]=player; - player.classList.add('bossplayer'); - - if(lib.storage.current==i){ - event.current=player; - player.classList.add('highlight'); - } - - // if(!get.config(cfg)){ - // player.style.display='none'; - // } - } - } - if(!list.length){ - alert('没有可挑战的BOSS'); - event.finish(); - lib.init.onfree(); - _status.over=true; - return; - } - if(!event.current){ - event.current=bosslist.childNodes[1]; - event.current.classList.add('highlight'); - } - ui.create.div(bosslist); - lib.translate.boss_pangtong='涅槃凤雏'; - ui.create.cardsAsync(); - game.finishCards(); - game.addGlobalSkill('autoswap'); - ui.arena.setNumber(8); - ui.control.style.transitionProperty='opacity'; - ui.control.classList.add('bosslist'); - setTimeout(function(){ - ui.control.style.transitionProperty=''; - },1000); - - ui.window.appendChild(bosslist); - - setTimeout(function(){ - if(event.current){ - var left=event.current.offsetLeft-(ui.window.offsetWidth-180)/2; - if(bosslist.scrollLeft0){ - td.innerHTML='剩余'+(game.bossinfo.chongzheng-game.dead[i].storage.boss_chongzheng)+'回合'; - } - else{ - td.innerHTML='无法重整' - } - } - - if(!added){ - uiintro.add('
            (无重整角色)
            '); - uiintro.add(ui.create.div('.placeholder.slim')) - } - else{ - uiintro.add(table); - } - - return uiintro; - },180); - ui.single_swap=ui.create.system('换人',function(){ - var players=get.players(game.me); - players.remove(game.boss); - if(players.length>1){ - if(ui.auto.classList.contains('hidden')){ - game.me.popup('请稍后换人'); - return; - } - if(_status.event.isMine()){ - ui.click.auto(); - setTimeout(function(){ - ui.click.auto(); - },500); - } - game.modeSwapPlayer(players[1]); - } - },true); - if(get.config('single_control')||game.me==game.boss){ - ui.single_swap.style.display='none'; - } - - ui.arena.appendChild(boss); - if(boss.bossinginfo){ - var rect=boss.getBoundingClientRect(); - boss.style.transform='translate('+(boss.bossinginfo[0]-rect.left-rect.width/2)+'px,'+(boss.bossinginfo[1]-rect.top-rect.height/2)+'px) scale(1.1)'; - ui.refresh(boss); - boss.style.transition=''; - boss.style.transform=''; - delete boss.bossinginfo; - setTimeout(function(){ - boss.node.equips.style.opacity=''; - },500); - } - - event.bosslist.delete(); - - game.arrangePlayers(); - for(var i=0;i0){ - if(player.hp0?player.node.handcards1:player.node.handcards2; - card.fix(); - card.animate('start'); - position.insertBefore(card,position.firstChild); - player.$draw(); - game.log(player,'摸了一张牌'); - } - player.update(); - if(player.storage.boss_chongzheng>=game.bossinfo.chongzheng){ - player.revive(player.hp); - } - } - if(game.bossinfo.loopType==2){ - game.boss.chongzheng=true; - } - } - else{ - if(player.identity=='zhu'&&game.boss!=player){ - player=game.boss; - } - player.phase(); - } - "step 1" - if(game.bossinfo.loopType==2){ - _status.roundStart=true; - if(event.player==game.boss){ - if(!_status.last||_status.last.nextSeat==game.boss){ - event.player=game.boss.nextSeat; - } - else{ - event.player=_status.last.nextSeat; - } +game.import('mode',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'boss', + start:function(){ + "step 0" + var playback=localStorage.getItem(lib.configprefix+'playback'); + if(playback){ + ui.create.me(); + ui.arena.style.display='none'; + ui.system.style.display='none'; + _status.playback=playback; + localStorage.removeItem(lib.configprefix+'playback'); + var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); + store.get(parseInt(playback)).onsuccess=function(e){ + if(e.target.result){ + game.playVideoContent(e.target.result.video); } else{ - _status.last=player; - event.player=game.boss; - if(player.nextSeat==game.boss){ - delete _status.roundStart; - } + alert('播放失败:找不到录像'); + game.reload(); } } - else{ - event.player=event.player.nextSeat; - } - event.goto(0); - }); - }, - onSwapControl:function(){ - if(game.me==game.boss) return; - game.addVideo('onSwapControl'); - var name=game.me.name; - if(ui.fakeme&&ui.fakeme.current!=name){ - ui.fakeme.current=name; - if(ui.versushighlight&&ui.versushighlight!=game.me){ - ui.versushighlight.classList.remove('current_action'); - } - ui.versushighlight=game.me; - game.me.classList.add('current_action'); - // game.me.line(ui.fakeme,{opacity:0.5,dashed:true}); - - ui.fakeme.style.backgroundImage=game.me.node.avatar.style.backgroundImage; - // ui.fakeme.style.backgroundSize='cover'; + event.finish(); + return; } - ui.updatehl(); - }, - modeSwapPlayer:function(player){ - var bool=(game.me==game.boss||player==game.boss); - game.swapControl(player); - game.onSwapControl(); - if(!bool) return; - if(game.me==game.boss){ - game.singleHandcard=false; - ui.arena.classList.remove('single-handcard'); - ui.window.classList.remove('single-handcard'); - ui.fakeme.style.display='none'; - game.me.dataset.position=0; - game.me.nextSeat.dataset.position=2; - game.me.nextSeat.nextSeat.dataset.position=4; - game.me.nextSeat.nextSeat.nextSeat.dataset.position=6; + for(var i in lib.characterPack.mode_boss){ + lib.character[i]=lib.characterPack.mode_boss[i]; + if(!lib.character[i][4]){ + lib.character[i][4]=[]; + } + } + for(var i in lib.skill){ + if(lib.skill[i].changeSeat){ + lib.skill[i]={}; + if(lib.translate[i+'_info']){ + lib.translate[i+'_info']='此模式下不可用'; + } + } + } + lib.translate.restart='返回'; + lib.init.css(lib.assetURL+'layout/mode','boss'); + game.delay(0.1); + "step 1" + var bosslist=ui.create.div('#bosslist.hidden'); + if(lib.config.player_border!='wide'){ + bosslist.classList.add('slim'); + } + event.bosslist=bosslist; + bosslist.ontouchmove = ui.click.touchScroll; + bosslist.style.WebkitOverflowScrolling='touch'; + if(!lib.config.touchscreen&&lib.config.mousewheel){ + bosslist._scrollspeed=30; + bosslist._scrollnum=10; + bosslist.onmousewheel=ui.click.mousewheel; + } + // var bosslistlinks={}; + // var toggleBoss=function(bool){ + // game.saveConfig(this._link.config._name,bool,true); + // var node=bosslistlinks[this._link.config._name]; + // if(bool){ + // node.style.display=''; + // } + // else{ + // node.style.display='none'; + // } + // }; + var onpause=function(){ + ui.window.classList.add('bosspaused'); + } + var onresume=function(){ + ui.window.classList.remove('bosspaused'); + } + game.onpause=onpause; + game.onpause2=onpause; + game.onresume=onresume; + game.onresume2=onresume; + ui.create.div(bosslist); + + event.current=null; + var list=[]; + for(var i in lib.character){ + var info=lib.character[i]; + if(info[4].contains('boss')){ + // var cfg=i+'_bossconfig'; + // if(get.config(cfg)==undefined){ + // game.saveConfig(cfg,true,true); + // } + // lib.translate[cfg+'_config']=lib.translate[i]; + // lib.mode.boss.config[cfg]={ + // name:get.translation(i), + // onclick:toggleBoss, + // init:true, + // } + var player=ui.create.player(bosslist).init(i); + if(lib.characterPack.mode_boss[i]&&get.config(i+'_boss_config')==false){ + player.style.display='none'; + } + if(player.hp==0){ + player.node.hp.style.display='none'; + } + list.push(player); + player.node.hp.classList.add('text'); + player.node.hp.dataset.condition=''; + player.node.hp.innerHTML=info[2]; + if(info[2]==Infinity){ + player.node.hp.innerHTML='∞'; + } + player.setIdentity(player.name); + player.node.identity.dataset.color=info[5]; + // bosslistlinks[cfg]=player; + player.classList.add('bossplayer'); + + if(lib.storage.current==i){ + event.current=player; + player.classList.add('highlight'); + } + + // if(!get.config(cfg)){ + // player.style.display='none'; + // } + } + } + if(!list.length){ + alert('没有可挑战的BOSS'); + event.finish(); + lib.init.onfree(); + _status.over=true; + return; + } + if(!event.current){ + event.current=bosslist.childNodes[1]; + event.current.classList.add('highlight'); + } + ui.create.div(bosslist); + lib.translate.boss_pangtong='涅槃凤雏'; + ui.create.cardsAsync(); + game.finishCards(); + game.addGlobalSkill('autoswap'); + ui.arena.setNumber(8); + ui.control.style.transitionProperty='opacity'; + ui.control.classList.add('bosslist'); + setTimeout(function(){ + ui.control.style.transitionProperty=''; + },1000); + + ui.window.appendChild(bosslist); + + setTimeout(function(){ + if(event.current){ + var left=event.current.offsetLeft-(ui.window.offsetWidth-180)/2; + if(bosslist.scrollLeft0){ + td.innerHTML='剩余'+(game.bossinfo.chongzheng-game.dead[i].storage.boss_chongzheng)+'回合'; + } + else{ + td.innerHTML='无法重整' } } - } - }, - chooseCharacter:function(func){ - var next=game.createEvent('chooseCharacter',false); - next.showConfig=true; - next.customreplacetarget=func; - next.ai=function(player,list){ - if(get.config('double_character')){ - player.init(list[0],list[1]); + + if(!added){ + uiintro.add('
            (无重整角色)
            '); + uiintro.add(ui.create.div('.placeholder.slim')) } else{ - player.init(list[0]); + uiintro.add(table); } - } - next.setContent(function(){ - "step 0" - var i; - var list=[]; - event.list=list; - for(i in lib.character){ - if(lib.character[i][4].contains('minskin')) continue; - if(lib.character[i][4].contains('boss')) continue; - if(lib.character[i][4].contains('hiddenboss')) continue; - if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue; - if(lib.config.forbidboss.contains(i)) continue; - if(lib.filter.characterDisabled(i)) continue; - list.push(i); - } - list.randomSort(); - var dialog=ui.create.dialog('选择参战角色','hidden'); - dialog.classList.add('fixed'); - ui.window.appendChild(dialog); - dialog.classList.add('bosscharacter'); - dialog.classList.add('withbg'); - // dialog.add('0/3'); - dialog.add([list.slice(0,20),'character']); - dialog.noopen=true; - var next=game.me.chooseButton(dialog,true).set('onfree',true); - next._triggered=null; - next.custom.replace.target=event.customreplacetarget; - next.selectButton=[3,3]; - // next.custom.add.button=function(){ - // if(ui.cheat2&&ui.cheat2.backup) return; - // _status.event.dialog.content.childNodes[1].innerHTML= - // ui.selected.buttons.length+'/3'; - // }; - event.changeDialog=function(){ - if(ui.cheat2&&ui.cheat2.dialog==_status.event.dialog){ + + return uiintro; + },180); + ui.single_swap=ui.create.system('换人',function(){ + var players=get.players(game.me); + players.remove(game.boss); + if(players.length>1){ + if(ui.auto.classList.contains('hidden')){ + game.me.popup('请稍后换人'); return; } - if(game.changeCoin){ - game.changeCoin(-3); + if(_status.event.isMine()){ + ui.click.auto(); + setTimeout(function(){ + ui.click.auto(); + },500); } - list.randomSort(); - - var buttons=ui.create.div('.buttons'); - var node=_status.event.dialog.buttons[0].parentNode; - _status.event.dialog.buttons=ui.create.buttons(list.slice(0,20),'character',buttons); - _status.event.dialog.content.insertBefore(buttons,node); - buttons.animate('start'); - node.remove(); - - game.uncheck(); - game.check(); - }; - ui.create.cheat=function(){ - _status.createControl=ui.cheat2||event.asboss; - ui.cheat=ui.create.control('更换',event.changeDialog); - delete _status.createControl; - }; - var createCharacterDialog=function(){ - event.dialogxx=ui.create.characterDialog(); - event.dialogxx.classList.add('bosscharacter'); - event.dialogxx.classList.add('withbg'); - event.dialogxx.classList.add('fixed'); - if(ui.cheat2){ - ui.cheat2.classList.remove('disabled'); - } - }; - if(lib.onfree){ - lib.onfree.push(createCharacterDialog); + game.modeSwapPlayer(players[1]); } - else{ - createCharacterDialog(); - } - ui.create.cheat2=function(){ - _status.createControl=event.asboss; - ui.cheat2=ui.create.control('自由选将',function(){ - if(this.dialog==_status.event.dialog){ - if(game.changeCoin){ - game.changeCoin(50); - } - this.dialog.close(); - _status.event.dialog=this.backup; - ui.window.appendChild(this.backup); - delete this.backup; - game.uncheck(); - game.check(); - if(ui.cheat){ - ui.cheat.classList.remove('disabled'); - } - } - else{ - if(game.changeCoin){ - game.changeCoin(-10); - } - this.backup=_status.event.dialog; - _status.event.dialog.close(); - _status.event.dialog=_status.event.parent.dialogxx; - this.dialog=_status.event.dialog; - ui.window.appendChild(this.dialog); - game.uncheck(); - game.check(); - if(ui.cheat){ - ui.cheat.classList.add('disabled'); - } - } - }); - if(lib.onfree){ - ui.cheat2.classList.add('disabled'); - } - delete _status.createControl; - } - if(!ui.cheat&&get.config('change_choice')) - ui.create.cheat(); - if(!ui.cheat2&&get.config('free_choose')) - ui.create.cheat2(); + },true); + if(get.config('single_control')||game.me==game.boss){ + ui.single_swap.style.display='none'; + } - event.asboss=ui.create.control('应战',function(){ - event.boss=true; - event.enemy=[]; - for(var i=0;i0){ + if(player.hp0?player.node.handcards1:player.node.handcards2; + card.fix(); + card.animate('start'); + position.insertBefore(card,position.firstChild); + player.$draw(); + game.log(player,'摸了一张牌'); + } + player.update(); + if(player.storage.boss_chongzheng>=game.bossinfo.chongzheng){ + player.revive(player.hp); + } + } + if(game.bossinfo.loopType==2){ + game.boss.chongzheng=true; + } + } + else{ + if(player.identity=='zhu'&&game.boss!=player){ + player=game.boss; + } + player.phase(); + } + "step 1" + if(game.bossinfo.loopType==2){ + _status.roundStart=true; + if(event.player==game.boss){ + if(!_status.last||_status.last.nextSeat==game.boss){ + event.player=game.boss.nextSeat; } else{ - _status.coin+=Math.round(Math.pow(_status.damageCount,1.8)); + event.player=_status.last.nextSeat; + } + } + else{ + _status.last=player; + event.player=game.boss; + if(player.nextSeat==game.boss){ + delete _status.roundStart; } } - game.forceOver(true); - clearInterval(interval); } - time--; - },1000); - _status.damageCount=0; - ui.damageCount=ui.create.system('伤害: 0',null,true); - } - }, - boss_nianshou_heti:{ - chongzheng:99, - }, - boss_zhangjiao:{ - // loopType:2, - }, - boss_caiwenji:{ - loopType:2, - }, - boss_pangtong:{ - loopType:2, - chongzheng:12 - }, - boss_zhaoyun:{ - chongzheng:12 - }, - boss_zhenji:{ - chongzheng:4, - }, - boss_lvbu1:{ - loopType:2 - }, - boss_zuoci:{ - chongzheng:4, - }, - boss_diaochan:{ - chongzheng:4, - }, - boss_huangyueying:{ - chongzheng:12, - }, - global:{ - loopType:1, - chongzheng:6 - }, - }, - skill:{ - boss_chiyan:{ - trigger:{global:'gameStart'}, - forced:true, - popup:false, - content:function(){ - player.smoothAvatar(); - player.init('boss_zhuque'); - _status.noswap=true; - game.addVideo('reinit2',player,player.name); - } - }, - boss_chiyan2:{ - mode:['boss'], - global:'boss_chiyan2x' - }, - boss_chiyan2x:{ - trigger:{global:'dieAfter'}, - forced:true, - priority:-10, - globalFixed:true, - filter:function(event){ - if(lib.config.mode!='boss') return false; - return event.player==game.boss&&event.player.hasSkill('boss_chiyan2'); + else{ + event.player=event.player.nextSeat; + } + event.goto(0); + }); }, - content:function(){ - 'step 0' - game.delay(); - 'step 1' - if(game.me!=game.boss){ - game.changeSeat(game.boss,6); + onSwapControl:function(){ + if(game.me==game.boss) return; + game.addVideo('onSwapControl'); + var name=game.me.name; + if(ui.fakeme&&ui.fakeme.current!=name){ + ui.fakeme.current=name; + if(ui.versushighlight&&ui.versushighlight!=game.me){ + ui.versushighlight.classList.remove('current_action'); + } + ui.versushighlight=game.me; + game.me.classList.add('current_action'); + // game.me.line(ui.fakeme,{opacity:0.5,dashed:true}); + + ui.fakeme.style.backgroundImage=game.me.node.avatar.style.backgroundImage; + // ui.fakeme.style.backgroundSize='cover'; + } + ui.updatehl(); + }, + modeSwapPlayer:function(player){ + var bool=(game.me==game.boss||player==game.boss); + game.swapControl(player); + game.onSwapControl(); + if(!bool) return; + if(game.me==game.boss){ + game.singleHandcard=false; + ui.arena.classList.remove('single-handcard'); + ui.window.classList.remove('single-handcard'); + ui.fakeme.style.display='none'; + game.me.dataset.position=0; + game.me.nextSeat.dataset.position=2; + game.me.nextSeat.nextSeat.dataset.position=4; + game.me.nextSeat.nextSeat.nextSeat.dataset.position=6; } else{ - game.changeSeat(game.boss.nextSeat,3); - game.changeSeat(game.boss.previousSeat,5); + game.singleHandcard=true; + ui.arena.classList.add('single-handcard'); + ui.window.classList.add('single-handcard'); + ui.fakeme.style.display=''; + game.boss.dataset.position=7; + game.boss.nextSeat.dataset.position=1; + game.boss.nextSeat.nextSeat.dataset.position=2; + game.boss.nextSeat.nextSeat.nextSeat.dataset.position=3; + if(game.me&&game.me.node.handcards2.childNodes.length){ + while(game.me.node.handcards2.childNodes.length){ + game.me.node.handcards1.appendChild(game.me.node.handcards2.firstChild); + } + } } - game.changeBoss('boss_huoshenzhurong'); - for(var i=0;i=0){ - if(att1+att2>0){ - return '选项二'; + }, + boss_qingmushilian:{ + chongzheng:99, + loopType:2, + checkResult:function(player){ + if(player==game.boss&&game.boss.name!='boss_taihao'){ + return false; + } + }, + init:function(){ + _status.additionalReward=function(){ + return 500; + } + } + }, + boss_zhuoguiquxie:{ + chongzheng:99, + checkResult:function(player){ + if(player==game.boss&&game.boss.name!='boss_yecha'&&game.boss.name!='boss_luocha'){ + return false; + } + }, + init:function(){ + _status.additionalReward=function(){ + return 500; + } + } + }, + boss_nianshou:{ + chongzheng:99, + init:function(){ + game.boss.node.action.classList.add('freecolor'); + game.boss.node.action.style.opacity=1; + game.boss.node.action.style.letterSpacing='4px'; + game.boss.node.action.style.marginRight=0; + game.boss.node.action.style.fontFamily='huangcao'; + game.boss.node.action.innerHTML=''; + _status.additionalReward=function(){ + return Math.round(Math.pow(_status.damageCount,2.4))*2; + } + var time=360; + var interval=setInterval(function(){ + if(_status.over){ + clearInterval(interval); + return; } - else{ - return '选项一'; + var sec=time%60; + if(sec<10){ + sec='0'+sec; } + game.boss.node.action.innerHTML=Math.floor(time/60)+':'+sec; + if(time<=0){ + delete _status.additionalReward; + if(typeof _status.coin=='number'){ + if(game.me==game.boss){ + _status.coin+=Math.round(Math.pow(_status.damageCount,2.4)); + } + else{ + _status.coin+=Math.round(Math.pow(_status.damageCount,1.8)); + } + } + game.forceOver(true); + clearInterval(interval); + } + time--; + },1000); + _status.damageCount=0; + ui.damageCount=ui.create.system('伤害: 0',null,true); + } + }, + boss_nianshou_heti:{ + chongzheng:99, + }, + boss_zhangjiao:{ + // loopType:2, + }, + boss_caiwenji:{ + loopType:2, + }, + boss_pangtong:{ + loopType:2, + chongzheng:12 + }, + boss_zhaoyun:{ + chongzheng:12 + }, + boss_zhenji:{ + chongzheng:4, + }, + boss_lvbu1:{ + loopType:2 + }, + boss_zuoci:{ + chongzheng:4, + }, + boss_diaochan:{ + chongzheng:4, + }, + boss_huangyueying:{ + chongzheng:12, + }, + global:{ + loopType:1, + chongzheng:6 + }, + }, + skill:{ + boss_chiyan:{ + trigger:{global:'gameStart'}, + forced:true, + popup:false, + content:function(){ + player.smoothAvatar(); + player.init('boss_zhuque'); + _status.noswap=true; + game.addVideo('reinit2',player,player.name); + } + }, + boss_chiyan2:{ + mode:['boss'], + global:'boss_chiyan2x' + }, + boss_chiyan2x:{ + trigger:{global:'dieAfter'}, + forced:true, + priority:-10, + globalFixed:true, + filter:function(event){ + if(lib.config.mode!='boss') return false; + return event.player==game.boss&&event.player.hasSkill('boss_chiyan2'); + }, + content:function(){ + 'step 0' + game.delay(); + 'step 1' + if(game.me!=game.boss){ + game.changeSeat(game.boss,6); } else{ - if(trigger.player.isHealthy()&&trigger.source.isHealthy()) return rand; - if(trigger.player.isHealthy()){ - if(att1<0) return '选项二'; - if(att1>0&&!stop) return '选项一'; - } - if(trigger.source.isHealthy()){ - if(att2<0) return '选项二'; - if(att2>0&&!stop) return '选项一'; - } - if(stop) return 'cancel2'; - return rand; + game.changeSeat(game.boss.nextSeat,3); + game.changeSeat(game.boss.previousSeat,5); + } + game.changeBoss('boss_huoshenzhurong'); + for(var i=0;i0) return -1; - if(att1<0) return 1; - } - else{ - if(att2>0) return -1; - if(att2<0) return 1; - } - return 0; - }); } - else if(result.control=='选项二'){ - event.type=2; - player.judge(function(card){ - if(get.color(card)=='red'){ - if(trigger.player.isDamaged()){ - if(att1>0) return 1; - if(att1<0) return -1; + }, + boss_chiyan3:{ + mode:['boss'], + global:'boss_chiyan3x' + }, + boss_chiyan3x:{ + trigger:{global:'dieAfter'}, + forced:true, + priority:-10, + globalFixed:true, + filter:function(event){ + if(lib.config.mode!='boss') return false; + return event.player==game.boss&&event.player.hasSkill('boss_chiyan3'); + }, + content:function(){ + 'step 0' + game.delay(); + 'step 1' + game.changeBoss('boss_yandi'); + game.boss.nextSeat.hide(); + game.boss.previousSeat.hide(); + game.delay(0.5); + 'step 2' + game.changeBoss('boss_yanling',game.boss.previousSeat); + game.changeBoss('boss_huoshenzhurong',game.boss.nextSeat); + 'step 3' + while(_status.event.name!='phaseLoop'){ + _status.event=_status.event.parent; + } + game.resetSkills(); + _status.paused=false; + _status.event.player=game.boss; + _status.event.step=0; + } + }, + boss_qingmu:{ + trigger:{global:'gameStart'}, + forced:true, + popup:false, + content:function(){ + player.smoothAvatar(); + player.init('boss_qinglong'); + _status.noswap=true; + game.addVideo('reinit2',player,player.name); + } + }, + boss_qingmu2:{ + mode:['boss'], + global:'boss_qingmu2x' + }, + boss_qingmu2x:{ + trigger:{global:'dieAfter'}, + forced:true, + priority:-10, + globalFixed:true, + filter:function(event){ + if(lib.config.mode!='boss') return false; + return event.player==game.boss&&event.player.hasSkill('boss_qingmu2'); + }, + content:function(){ + 'step 0' + game.delay(); + 'step 1' + if(game.me!=game.boss){ + game.changeSeat(game.boss,6); + } + else{ + game.changeSeat(game.boss.nextSeat,3); + game.changeSeat(game.boss.previousSeat,5); + } + game.changeBoss('boss_mushengoumang'); + for(var i=0;i=0){ + if(att1+att2>0){ + return '选项二'; + } + else{ + return '选项一'; } } else{ - if(trigger.source.isDamaged()){ - if(att2>0) return 1; - if(att2<0) return -1; + if(trigger.player.isHealthy()&&trigger.source.isHealthy()) return rand; + if(trigger.player.isHealthy()){ + if(att1<0) return '选项二'; + if(att1>0&&!stop) return '选项一'; } + if(trigger.source.isHealthy()){ + if(att2<0) return '选项二'; + if(att2>0&&!stop) return '选项一'; + } + if(stop) return 'cancel2'; + return rand; } - return 0; - }); - } - else{ - event.finish(); - } - 'step 2' - if(event.type==1){ - if(result.color=='black'){ - trigger.player.loseHp(); + }).set('prompt',get.prompt('boss_yuance')).set('choiceList',[ + '若判定结果为黑色,'+playername+'失去一点体力,否则'+sourcename+'失去一点体力', + '若判定结果为红色,'+playername+'回复一点体力,否则'+sourcename+'回复一点体力' + ]); + 'step 1' + var att1=get.attitude(player,trigger.player); + var att2=get.attitude(player,trigger.source); + if(result.control=='选项一'){ + event.type=1; + player.judge(function(card){ + if(get.color(card)=='black'){ + if(att1>0) return -1; + if(att1<0) return 1; + } + else{ + if(att2>0) return -1; + if(att2<0) return 1; + } + return 0; + }); + } + else if(result.control=='选项二'){ + event.type=2; + player.judge(function(card){ + if(get.color(card)=='red'){ + if(trigger.player.isDamaged()){ + if(att1>0) return 1; + if(att1<0) return -1; + } + } + else{ + if(trigger.source.isDamaged()){ + if(att2>0) return 1; + if(att2<0) return -1; + } + } + return 0; + }); } else{ - trigger.source.loseHp(); + event.finish(); } - } - else{ - if(result.color=='red'){ - trigger.player.recover(); + 'step 2' + if(event.type==1){ + if(result.color=='black'){ + trigger.player.loseHp(); + } + else{ + trigger.source.loseHp(); + } } else{ - trigger.source.recover(); + if(result.color=='red'){ + trigger.player.recover(); + } + else{ + trigger.source.recover(); + } } } - } - }, - boss_guixin:{ - trigger:{global:'drawAfter'}, - forced:true, - logTarget:'player', - filter:function(event,player){ - return event.result&&event.result.length>=2&&event.player!=player; }, - content:function(){ - 'step 0' - trigger.player.chooseCard(function(card){ - return trigger.result.contains(card); - },'归心:交给'+get.translation(player)+'一张牌',true); - 'step 1' - if(result.bool){ - player.gain(result.cards,trigger.player); - trigger.player.$give(1,player); - } - } - }, - xiongcai:{ - unique:true, - trigger:{player:'phaseAfter'}, - direct:true, - init:function(player){ - player.storage.xiongcai=[]; - // player.storage.xiongcai2=0; - }, - intro:{ - content:'characters' - }, - content:function(){ - 'step 0' - // if(player.storage.xiongcai2<1){ - // player.storage.xiongcai2++; - // event.finish(); - // } - // else{ - // player.storage.xiongcai2=0; - // } - 'step 1' - player.logSkill('xiongcai'); - var list=[]; - var list2=[]; - var players=game.players.concat(game.dead); - for(var i=0;i'+get.translation(player)+'发动了【雄才】',[[name],'character']); - game.delay(2); - 'step 2' - event.dialog.close(); - } - }, - xiaoxiong:{ - trigger:{global:'useCardAfter'}, - forced:true, - unique:true, - forceunique:true, - filter:function(event,player){ - var type=get.type(event.card,'trick'); - return event.player!=player&&(type=='basic'||type=='trick'); - }, - content:function(){ - player.gain(game.createCard(trigger.card),'gain2'); - } - }, - boss_zhangwu:{ - global:'boss_zhangwu_ai', - trigger:{player:'damageEnd'}, - check:function(event,player){ - return event.source&&get.damageEffect(event.source,player,player)>0; - }, - filter:function(event){ - return event.source&&event.source.isAlive(); - }, - logTarget:'source', - content:function(){ - 'step 0' - var target=trigger.source; - if(target.countCards('h')==0){ - target.damage(2); - event.finish(); - } - else{ - target.chooseControl('discard_card','get_damage',function(){ - if(get.damageEffect(target,player,target)>=0) return 'get_damage'; - var nh=target.countCards('h'); - if(nh<=3||target.hp<=3||target.hasSkillTag('noh')) return 'discard_card'; - return 'get_damage'; - }) - } - 'step 1' - var target=trigger.source; - if(result.control=='discard_card'){ - target.discard(target.getCards('h')); - } - else{ - target.damage(2); + boss_guixin:{ + trigger:{global:'drawAfter'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + return event.result&&event.result.length>=2&&event.player!=player; + }, + content:function(){ + 'step 0' + trigger.player.chooseCard(function(card){ + return trigger.result.contains(card); + },'归心:交给'+get.translation(player)+'一张牌',true); + 'step 1' + if(result.bool){ + player.gain(result.cards,trigger.player); + trigger.player.$give(1,player); + } } }, - ai:{ - maixie:true, - maixie_hp:true, - } - }, - boss_zhangwu_ai:{ - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'recover')&&card.name!='recover'){ - for(var i=0;i'+get.translation(player)+'发动了【雄才】',[[name],'character']); + game.delay(2); + 'step 2' + event.dialog.close(); + } + }, + xiaoxiong:{ + trigger:{global:'useCardAfter'}, + forced:true, + unique:true, + forceunique:true, + filter:function(event,player){ + var type=get.type(event.card,'trick'); + return event.player!=player&&(type=='basic'||type=='trick'); + }, + content:function(){ + player.gain(game.createCard(trigger.card),'gain2'); + } + }, + boss_zhangwu:{ + global:'boss_zhangwu_ai', + trigger:{player:'damageEnd'}, + check:function(event,player){ + return event.source&&get.damageEffect(event.source,player,player)>0; + }, + filter:function(event){ + return event.source&&event.source.isAlive(); + }, + logTarget:'source', + content:function(){ + 'step 0' + var target=trigger.source; + if(target.countCards('h')==0){ + target.damage(2); + event.finish(); + } + else{ + target.chooseControl('discard_card','get_damage',function(){ + if(get.damageEffect(target,player,target)>=0) return 'get_damage'; + var nh=target.countCards('h'); + if(nh<=3||target.hp<=3||target.hasSkillTag('noh')) return 'discard_card'; + return 'get_damage'; + }) + } + 'step 1' + var target=trigger.source; + if(result.control=='discard_card'){ + target.discard(target.getCards('h')); + } + else{ + target.damage(2); + } + }, + ai:{ + maixie:true, + maixie_hp:true, + } + }, + boss_zhangwu_ai:{ + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'recover')&&card.name!='recover'){ + for(var i=0;i=4; - }); - }, - x2:function(player){ - return player.countCards('j')>=2; - }, - x1:function(){ - return game.players.length==2; - } - }, - }, - xiangxing:{ - unique:true, - init:function(player){ - player.storage.xiangxing=7; - player.storage.xiangxing_count=0; - player.addSkill('xiangxing7'); - }, - mark:true, - intro:{ - content:'当前有#枚星' - }, - trigger:{player:['damageEnd','loseHpEnd']}, - forced:true, - popup:false, - content:function(){ - 'step 0' - var num=trigger.num; - if(num){ - player.storage.xiangxing_count+=num; - } - if(player.storage.xiangxing_count>=7){ - if(player.hasSkill('yueyin')&&lib.skill.yueyin.skipDamage['x'+player.storage.xiangxing](player,trigger)){ - event.goto(3); - } - player.removeSkill('xiangxing'+player.storage.xiangxing); - player.storage.xiangxing--; - player.storage.xiangxing_count=0; - player.updateMarks(); - if(player.storage.xiangxing){ - player.addSkill('xiangxing'+player.storage.xiangxing); - } - else{ - player.awakenSkill('xiangxing'); - } - player.popup('xiangxing'); - game.log(player,'失去了一枚星'); - } - else{ - player.updateMarks(); - event.finish(); - } - 'step 1' - var list=game.filterPlayer(); - list.remove(player); - list.sort(lib.sort.seat); - var list2=[]; - for(var i=0;i=4; }); - if(targets.length){ - targets.sort(lib.sort.seat); - player.useCard(card,targets); + }, + x2:function(player){ + return player.countCards('j')>=2; + }, + x1:function(){ + return game.players.length==2; + } + }, + }, + xiangxing:{ + unique:true, + init:function(player){ + player.storage.xiangxing=7; + player.storage.xiangxing_count=0; + player.addSkill('xiangxing7'); + }, + mark:true, + intro:{ + content:'当前有#枚星' + }, + trigger:{player:['damageEnd','loseHpEnd']}, + forced:true, + popup:false, + content:function(){ + 'step 0' + var num=trigger.num; + if(num){ + player.storage.xiangxing_count+=num; + } + if(player.storage.xiangxing_count>=7){ + if(player.hasSkill('yueyin')&&lib.skill.yueyin.skipDamage['x'+player.storage.xiangxing](player,trigger)){ + event.goto(3); } - event.finish(); - } - else if(info.notarget){ - player.useCard(card); - } - else{ - var next=player.chooseTarget('选择'+get.translation(name)+'的目标'); - next._get_card=card; - next.filterTarget=lib.filter.filterTarget; - next.ai=get.effect; - if(typeof info.selectTarget=='function'){ - next.selectTarget=info.selectTarget; + player.removeSkill('xiangxing'+player.storage.xiangxing); + player.storage.xiangxing--; + player.storage.xiangxing_count=0; + player.updateMarks(); + if(player.storage.xiangxing){ + player.addSkill('xiangxing'+player.storage.xiangxing); } else{ - next.selectTarget=get.select(info.selectTarget); + player.awakenSkill('xiangxing'); } - event.card=card; - } - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - // player.addTempSkill('fengqi2',{player:'useCardAfter'}); - player.useCard(event.card,result.targets); - } - }, - ai:{ - threaten:1.5, - } - }, - fengqi2:{ - ai:{ - playernowuxie:true - } - }, - gaiming:{ - trigger:{player:'judgeBefore'}, - direct:true, - priority:1, - unique:true, - content:function(){ - "step 0" - event.cards=get.cards(7); - player.chooseCardButton(true,event.cards,'改命:选择一张牌作为你的'+trigger.judgestr+'判定结果').ai=function(button){ - if(get.attitude(player,trigger.player)>0){ - return 1+trigger.judge(button.link); - } - if(get.attitude(player,trigger.player)<0){ - return 1-trigger.judge(button.link); - } - return 0; - }; - "step 1" - if(!result.bool){ - event.finish(); - return; - } - player.logSkill('gaiming',trigger.player); - var card=result.links[0]; - event.cards.remove(card); - var judgestr=get.translation(trigger.player)+'的'+trigger.judgestr+'判定'; - event.videoId=lib.status.videoId++; - event.dialog=ui.create.dialog(judgestr); - event.dialog.classList.add('center'); - event.dialog.videoId=event.videoId; - - game.addVideo('judge1',player,[get.cardInfo(card),judgestr,event.videoId]); - for(var i=0;i0){ - trigger.result.bool=true; - trigger.player.popup('洗具'); - } - if(trigger.result.judge<0){ - trigger.result.bool=false; - trigger.player.popup('杯具'); - } - game.log(trigger.player,'的判定结果为',card); - trigger.direct=true; - trigger.position.appendChild(card); - game.delay(2); - } - else{ - event.finish(); - } - "step 2" - ui.arena.classList.remove('thrownhighlight'); - event.dialog.close(); - game.addVideo('judge2',null,event.videoId); - ui.clear(); - var card=trigger.result.card; - trigger.position.appendChild(card); - trigger.result.node.delete(); - game.delay(); - }, - }, - tiandao:{ - audio:true, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('tiandao'),'he').ai=function(card){ - var trigger=_status.event.parent._trigger; - var player=_status.event.player; - var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result; + player.popup('xiangxing'); + game.log(player,'失去了一枚星'); } else{ - return -result; + player.updateMarks(); + event.finish(); } - }; - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.logSkill('tiandao'); - player.$gain2(trigger.player.judging[0]); - player.gain(trigger.player.judging[0]); - trigger.player.judging[0]=result.cards[0]; - trigger.position.appendChild(result.cards[0]); - game.log(trigger.player,'的判定牌改为',result.cards[0]); - } - "step 3" - game.delay(2); - }, - ai:{ - tag:{ - rejudge:1 - }, - threaten:1.5 - } - }, - lianji:{ - audio:true, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - if(player==target) return false; - return target.countCards('h')>0; - }, - selectTarget:2, - multitarget:true, - multiline:true, - filter:function(event,player){ - return player.countCards('h')>0; - }, - prepare:'throw', - discard:false, - filterCard:true, - check:function(card){ - return 6-get.value(card); - }, - content:function(){ - "step 0" - if(targets[0].countCards('h')&&targets[1].countCards('h')){ - targets[0].chooseToCompare(targets[1]); - } - else{ - event.finish(); - } - "step 1" - if(result.bool){ - targets[0].gain(cards); - targets[0].$gain2(cards); - targets[1].damage(targets[0]); - } - else{ - targets[1].gain(cards); - targets[1].$gain2(cards); - targets[0].damage(targets[1]); - } - }, - ai:{ - expose:0.3, - threaten:2, - order:9, - result:{ - target:-1 - } - }, - }, - mazui:{ - audio:true, - enable:'phaseUse', - usable:1, - filterCard:{color:'black'}, - filterTarget:function(card,player,target){ - return !target.hasSkill('mazui2'); - }, - check:function(card){ - return 6-get.value(card); - }, - discard:false, - prepare:'give', - content:function(){ - target.storage.mazui2=cards[0]; - target.addSkill('mazui2'); - game.addVideo('storage',target,['mazui2',get.cardInfo(target.storage.mazui2),'card']); - }, - ai:{ - expose:0.2, - result:{ - target:function(player,target){ - return -target.hp; + 'step 1' + var list=game.filterPlayer(); + list.remove(player); + list.sort(lib.sort.seat); + var list2=[]; + for(var i=0;i0; }, - content:function(){ - trigger.num--; - player.addSkill('mazui3'); - player.removeSkill('mazui2'); - }, - intro:{ - content:'card' - } - }, - mazui3:{ - trigger:{source:['damageEnd','damageZero']}, - forced:true, - popup:false, - content:function(){ - player.gain(player.storage.mazui2,'gain2'); - game.log(player,'获得了',player.storage.mazui2); - player.removeSkill('mazui3'); - delete player.storage.mazui2; - } - }, - yunshen:{ - trigger:{player:'respond'}, - filter:function(event,player){ - return event.card.name=='shan'; - }, - frequent:true, - init:function(player){ - player.storage.yunshen=0; - }, - content:function(){ - player.storage.yunshen++; - player.markSkill('yunshen'); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'respondShan')){ - var shans=target.countCards('h','shan'); - var hs=target.countCards('h'); - if(shans>1) return [1,1]; - if(shans&&hs>2) return [1,1]; - if(shans) return [1,0.5]; - if(hs>2) return [1,0.3]; - if(hs>1) return [1,0.2]; - return [1.2,0]; + fengqi:{ + trigger:{player:['phaseBegin','phaseEnd']}, + direct:true, + content:function(){ + 'step 0' + var list={basic:[],equip:[],trick:[],delay:[]}; + for(var i=0;i0; - }, - content:function(){ - player.draw(player.storage.yunshen); - player.storage.yunshen=0; - player.unmarkSkill('yunshen'); - }, - mod:{ - globalTo:function(from,to,distance){ - if(typeof to.storage.yunshen=='number') return distance+to.storage.yunshen; - } - } - }, - lingbo:{ - audio:2, - trigger:{player:'respond'}, - filter:function(event,player){ - return event.card.name=='shan'; - }, - frequent:true, - content:function(){ - player.draw(2); - }, - ai:{ - mingzhi:false, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'respondShan')){ - var shans=target.countCards('h','shan'); - var hs=target.countCards('h'); - if(shans>1) return [0,1]; - if(shans&&hs>2) return [0,1]; - if(shans) return [0,0]; - if(hs>2) return [0,0]; - if(hs>1) return [1,0.5]; - return [1.5,0]; + list.trick.sort(lib.sort.name); + var dialog=ui.create.dialog('风起',[list.trick,'vcard']); + // for(var i in list){ + // dialog.addText(get.translation(i)+'牌'); + // dialog.add([list[i],'vcard']); + // } + var rand1=Math.random()<1/3; + var rand2=Math.random()<0.5; + var rand3=Math.random()<1/3; + var rand4=Math.random()<1/3; + player.chooseButton(dialog).ai=function(button){ + var name=button.link[2]; + if(player.hp<=1){ + switch(name){ + case 'zhiliaobo':return 1; + case 'dunpaigedang':return 0.8; + case 'nanman':return 0.5; + default:return 0; + } } + if(rand4&&player.countCards('h')<=1){ + switch(name){ + case 'zengbin':return 1; + case 'wuzhong':return 0.8; + default:return 0; + } + } + if(player.hasSkill('qinglonglingzhu')){ + if(rand2) return name=='chiyuxi'?0.8:0; + return name=='jingleishan'?0.8:0; + } + if(rand2) return name=='wanjian'?0.8:0; + return name=='nanman'?0.8:0; } - }, - threaten:0.8 - } - }, - jiaoxia:{ - audio:2, - trigger:{target:'useCardToBegin'}, - filter:function(event,player){ - return event.card&&get.color(event.card)=='red'; - }, - frequent:true, - content:function(){ - player.draw(); - }, - ai:{ - effect:function(card,player,target){ - if(get.color(card)=='red') return [1,1]; - }, - } - }, - boss_nbianshenx:{}, - boss_jingjue:{ - inherit:'boss_danshu' - }, - boss_renxing:{ - trigger:{global:['damageEnd','recoverEnd']}, - forced:true, - filter:function(event,player){ - return _status.currentPhase!=player; - }, - content:function(){ - player.draw(); - } - }, - boss_ruizhi:{ - trigger:{global:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return event.player!=player&&event.player.countCards('he')>1; - }, - content:function(){ - 'step 0' - player.line(trigger.player,'green'); - var next=trigger.player.chooseCard(true,'选择保留一张手牌和一张装备区内的牌,然后弃置其它牌','he',function(card){ - switch(get.position(card)){ - case 'h':{ - if(ui.selected.cards.length){ - return get.position(ui.selected.cards[0])=='e'; + 'step 1' + if(result.bool){ + var name=result.links[0][2]; + var info=lib.card[name]; + var card=game.createCard(name); + if(info.selectTarget==-1){ + var targets=game.filterPlayer(function(current){ + return lib.filter.filterTarget(card,player,current); + }); + if(targets.length){ + targets.sort(lib.sort.seat); + player.useCard(card,targets); + } + event.finish(); + } + else if(info.notarget){ + player.useCard(card); + } + else{ + var next=player.chooseTarget('选择'+get.translation(name)+'的目标'); + next._get_card=card; + next.filterTarget=lib.filter.filterTarget; + next.ai=get.effect; + if(typeof info.selectTarget=='function'){ + next.selectTarget=info.selectTarget; } else{ - return trigger.player.countCards('h')>1; + next.selectTarget=get.select(info.selectTarget); } - break; - } - case 'e':{ - if(ui.selected.cards.length){ - return get.position(ui.selected.cards[0])=='h'; - } - else{ - return trigger.player.countCards('e')>1; - } - break; + event.card=card; } } - }); - var num=0; - if(trigger.player.countCards('h')>1){ - num++; - } - if(trigger.player.countCards('e')>1){ - num++; - } - next.selectCard=[num,num]; - next.ai=function(card){ - return get.value(card); - }; - 'step 1' - if(result.bool){ - var he=[]; - var hs=trigger.player.getCards('h'); - var es=trigger.player.getCards('e'); - if(hs.length>1){ - he=he.concat(hs); + else{ + event.finish(); } - if(es.length>1){ - he=he.concat(es); + 'step 2' + if(result.bool){ + // player.addTempSkill('fengqi2',{player:'useCardAfter'}); + player.useCard(event.card,result.targets); } - for(var i=0;i4){ - trigger.num=4+Math.floor(Math.random()*(player.hp-3)); - } - else{ - trigger.num=4; + }, + ai:{ + threaten:1.5, } }, - subSkill:{ - sha:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'&&player.hp<5) return Infinity; - } - }, - trigger:{source:'damageBegin'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.notLink()&&player.hp<5; - }, - forced:true, - content:function(){ - trigger.num++; - } - } - } - }, - boss_shouyi:{ - mod:{ - targetInRange:function(){ - return true; + fengqi2:{ + ai:{ + playernowuxie:true } }, - }, - boss_mengtai:{ - group:['boss_mengtai_begin','boss_mengtai_draw','boss_mengtai_use', - 'boss_mengtai_discard','boss_mengtai_end'], - subSkill:{ - begin:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - player.storage.boss_mengtai_draw=true; - player.storage.boss_mengtai_use=true; + gaiming:{ + trigger:{player:'judgeBefore'}, + direct:true, + priority:1, + unique:true, + content:function(){ + "step 0" + event.cards=get.cards(7); + player.chooseCardButton(true,event.cards,'改命:选择一张牌作为你的'+trigger.judgestr+'判定结果').ai=function(button){ + if(get.attitude(player,trigger.player)>0){ + return 1+trigger.judge(button.link); + } + if(get.attitude(player,trigger.player)<0){ + return 1-trigger.judge(button.link); + } + return 0; + }; + "step 1" + if(!result.bool){ + event.finish(); + return; } - }, - draw:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - popup:false, - content:function(){ - player.storage.boss_mengtai_draw=false; + player.logSkill('gaiming',trigger.player); + var card=result.links[0]; + event.cards.remove(card); + var judgestr=get.translation(trigger.player)+'的'+trigger.judgestr+'判定'; + event.videoId=lib.status.videoId++; + event.dialog=ui.create.dialog(judgestr); + event.dialog.classList.add('center'); + event.dialog.videoId=event.videoId; + + game.addVideo('judge1',player,[get.cardInfo(card),judgestr,event.videoId]); + for(var i=0;i0){ + trigger.result.bool=true; + trigger.player.popup('洗具'); + } + if(trigger.result.judge<0){ + trigger.result.bool=false; + trigger.player.popup('杯具'); + } + game.log(trigger.player,'的判定结果为',card); + trigger.direct=true; + trigger.position.appendChild(card); + game.delay(2); + } + else{ + event.finish(); + } + "step 2" + ui.arena.classList.remove('thrownhighlight'); + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + ui.clear(); + var card=trigger.result.card; + trigger.position.appendChild(card); + trigger.result.node.delete(); + game.delay(); + }, + }, + tiandao:{ + audio:true, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('tiandao'),'he').ai=function(card){ + var trigger=_status.event.parent._trigger; + var player=_status.event.player; + var result=trigger.judge(card)-trigger.judge(trigger.player.judging[0]); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result; + } + else{ + return -result; + } + }; + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.logSkill('tiandao'); + player.$gain2(trigger.player.judging[0]); + player.gain(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.position.appendChild(result.cards[0]); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + } + "step 3" + game.delay(2); + }, + ai:{ + tag:{ + rejudge:1 + }, + threaten:1.5 + } + }, + lianji:{ + audio:true, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + if(player==target) return false; + return target.countCards('h')>0; + }, + selectTarget:2, + multitarget:true, + multiline:true, + filter:function(event,player){ + return player.countCards('h')>0; + }, + prepare:'throw', + discard:false, + filterCard:true, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + "step 0" + if(targets[0].countCards('h')&&targets[1].countCards('h')){ + targets[0].chooseToCompare(targets[1]); + } + else{ + event.finish(); + } + "step 1" + if(result.bool){ + targets[0].gain(cards); + targets[0].$gain2(cards); + targets[1].damage(targets[0]); + } + else{ + targets[1].gain(cards); + targets[1].$gain2(cards); + targets[0].damage(targets[1]); } }, - end:{ - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - if(player.storage.boss_mengtai_draw) return true; - return false; + ai:{ + expose:0.3, + threaten:2, + order:9, + result:{ + target:-1 + } + }, + }, + mazui:{ + audio:true, + enable:'phaseUse', + usable:1, + filterCard:{color:'black'}, + filterTarget:function(card,player,target){ + return !target.hasSkill('mazui2'); + }, + check:function(card){ + return 6-get.value(card); + }, + discard:false, + prepare:'give', + content:function(){ + target.storage.mazui2=cards[0]; + target.addSkill('mazui2'); + game.addVideo('storage',target,['mazui2',get.cardInfo(target.storage.mazui2),'card']); + }, + ai:{ + expose:0.2, + result:{ + target:function(player,target){ + return -target.hp; + } }, - content:function(){ - player.draw(3); - } - } - } - }, - boss_nbianshen:{ - trigger:{player:'phaseBefore'}, - forced:true, - popup:false, - priority:25, - filter:function(event,player){ - if(player.name=='boss_nianshou_heti'||player.storage.boss_nbianshen) return true; - return false; - }, - content:function(){ - if(player.storage.boss_nbianshen){ - var hp=player.hp, - maxHp=player.maxHp, - hujia=player.hujia; - player.init('boss_nianshou_'+player.storage.boss_nbianshen_next); - player.storage.boss_nbianshen.remove(player.storage.boss_nbianshen_next); - if(!player.storage.boss_nbianshen.length){ - player.storage.boss_nbianshen=['jingjue','renxing','ruizhi','baonu']; - } - player.storage.boss_nbianshen_next=player.storage.boss_nbianshen.randomGet(player.storage.boss_nbianshen_next); - player.hp=hp; - player.maxHp=maxHp; - player.hujia=hujia; - player.update(); - } - else{ - player.storage.boss_nbianshen=['jingjue','renxing','ruizhi','baonu']; - player.storage.boss_nbianshen_next=player.storage.boss_nbianshen.randomGet(); - player.markSkill('boss_nbianshen'); + order:4, + threaten:1.2 } }, - intro:{ - content:function(storage,player){ - var map={ - jingjue:'警觉', - renxing:'任性', - ruizhi:'睿智', - baonu:'暴怒' + mazui2:{ + trigger:{source:'damageBegin'}, + forced:true, + mark:'card', + filter:function(event){ + return event.num>0; + }, + content:function(){ + trigger.num--; + player.addSkill('mazui3'); + player.removeSkill('mazui2'); + }, + intro:{ + content:'card' + } + }, + mazui3:{ + trigger:{source:['damageEnd','damageZero']}, + forced:true, + popup:false, + content:function(){ + player.gain(player.storage.mazui2,'gain2'); + game.log(player,'获得了',player.storage.mazui2); + player.removeSkill('mazui3'); + delete player.storage.mazui2; + } + }, + yunshen:{ + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'; + }, + frequent:true, + init:function(player){ + player.storage.yunshen=0; + }, + content:function(){ + player.storage.yunshen++; + player.markSkill('yunshen'); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'respondShan')){ + var shans=target.countCards('h','shan'); + var hs=target.countCards('h'); + if(shans>1) return [1,1]; + if(shans&&hs>2) return [1,1]; + if(shans) return [1,0.5]; + if(hs>2) return [1,0.3]; + if(hs>1) return [1,0.2]; + return [1.2,0]; + } + } + }, + threaten:0.8 + }, + intro:{ + content:'mark' + }, + group:'yunshen2' + }, + yunshen2:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.yunshen>0; + }, + content:function(){ + player.draw(player.storage.yunshen); + player.storage.yunshen=0; + player.unmarkSkill('yunshen'); + }, + mod:{ + globalTo:function(from,to,distance){ + if(typeof to.storage.yunshen=='number') return distance+to.storage.yunshen; + } + } + }, + lingbo:{ + audio:2, + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'; + }, + frequent:true, + content:function(){ + player.draw(2); + }, + ai:{ + mingzhi:false, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'respondShan')){ + var shans=target.countCards('h','shan'); + var hs=target.countCards('h'); + if(shans>1) return [0,1]; + if(shans&&hs>2) return [0,1]; + if(shans) return [0,0]; + if(hs>2) return [0,0]; + if(hs>1) return [1,0.5]; + return [1.5,0]; + } + } + }, + threaten:0.8 + } + }, + jiaoxia:{ + audio:2, + trigger:{target:'useCardToBegin'}, + filter:function(event,player){ + return event.card&&get.color(event.card)=='red'; + }, + frequent:true, + content:function(){ + player.draw(); + }, + ai:{ + effect:function(card,player,target){ + if(get.color(card)=='red') return [1,1]; + }, + } + }, + boss_nbianshenx:{}, + boss_jingjue:{ + inherit:'boss_danshu' + }, + boss_renxing:{ + trigger:{global:['damageEnd','recoverEnd']}, + forced:true, + filter:function(event,player){ + return _status.currentPhase!=player; + }, + content:function(){ + player.draw(); + } + }, + boss_ruizhi:{ + trigger:{global:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return event.player!=player&&event.player.countCards('he')>1; + }, + content:function(){ + 'step 0' + player.line(trigger.player,'green'); + var next=trigger.player.chooseCard(true,'选择保留一张手牌和一张装备区内的牌,然后弃置其它牌','he',function(card){ + switch(get.position(card)){ + case 'h':{ + if(ui.selected.cards.length){ + return get.position(ui.selected.cards[0])=='e'; + } + else{ + return trigger.player.countCards('h')>1; + } + break; + } + case 'e':{ + if(ui.selected.cards.length){ + return get.position(ui.selected.cards[0])=='h'; + } + else{ + return trigger.player.countCards('e')>1; + } + break; + } + } + }); + var num=0; + if(trigger.player.countCards('h')>1){ + num++; + } + if(trigger.player.countCards('e')>1){ + num++; + } + next.selectCard=[num,num]; + next.ai=function(card){ + return get.value(card); }; - return '下一个状态:'+map[player.storage.boss_nbianshen_next]; - } - } - }, - boss_damagecount:{ - mode:['boss'], - global:'boss_damagecount2' - }, - boss_damagecount2:{ - trigger:{source:'damageEnd'}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - if(!ui.damageCount) return false; - return event.num>0&&player.isFriendOf(game.me)&&event.player.isEnemyOf(game.me); - }, - content:function(){ - _status.damageCount+=trigger.num; - ui.damageCount.innerHTML='伤害: '+_status.damageCount; - } - }, - boss_nianrui:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - content:function(){ - trigger.num+=2; - }, - ai:{ - threaten:1.6 - } - }, - boss_qixiang:{ - group:['boss_qixiang1','boss_qixiang2'], - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='lebu'&&card.name=='bingliang') return 0.8; - } - } - } - }, - boss_qixiang1:{ - trigger:{player:'judge'}, - forced:true, - filter:function(event,player){ - if(event.card){ - if(event.card.viewAs){ - return event.card.viewAs=='lebu'; - } - else{ - return event.card.name=='lebu'; - } + 'step 1' + if(result.bool){ + var he=[]; + var hs=trigger.player.getCards('h'); + var es=trigger.player.getCards('e'); + if(hs.length>1){ + he=he.concat(hs); + } + if(es.length>1){ + he=he.concat(es); + } + for(var i=0;i4){ + trigger.num=4+Math.floor(Math.random()*(player.hp-3)); + } + else{ + trigger.num=4; + } + }, + subSkill:{ + sha:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'&&player.hp<5) return Infinity; + } + }, + trigger:{source:'damageBegin'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.notLink()&&player.hp<5; + }, + forced:true, + content:function(){ + trigger.num++; + } + } } }, - content:function(){ - player.addTempSkill('boss_qixiang4','judgeAfter'); - } - }, - boss_qixiang3:{ - mod:{ - suit:function(card,suit){ - if(suit=='diamond') return 'heart'; + boss_shouyi:{ + mod:{ + targetInRange:function(){ + return true; + } + }, + }, + boss_mengtai:{ + group:['boss_mengtai_begin','boss_mengtai_draw','boss_mengtai_use', + 'boss_mengtai_discard','boss_mengtai_end'], + subSkill:{ + begin:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + player.storage.boss_mengtai_draw=true; + player.storage.boss_mengtai_use=true; + } + }, + draw:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + popup:false, + content:function(){ + player.storage.boss_mengtai_draw=false; + } + }, + use:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + content:function(){ + player.storage.boss_mengtai_use=false; + } + }, + discard:{ + trigger:{player:'phaseDiscardBefore'}, + forced:true, + filter:function(event,player){ + if(player.storage.boss_mengtai_use) return true; + return false; + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + } + }, + end:{ + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + if(player.storage.boss_mengtai_draw) return true; + return false; + }, + content:function(){ + player.draw(3); + } + } } - } - }, - boss_qixiang4:{ - mod:{ - suit:function(card,suit){ - if(suit=='spade') return 'club'; + }, + boss_nbianshen:{ + trigger:{player:'phaseBefore'}, + forced:true, + popup:false, + priority:25, + filter:function(event,player){ + if(player.name=='boss_nianshou_heti'||player.storage.boss_nbianshen) return true; + return false; + }, + content:function(){ + if(player.storage.boss_nbianshen){ + var hp=player.hp, + maxHp=player.maxHp, + hujia=player.hujia; + player.init('boss_nianshou_'+player.storage.boss_nbianshen_next); + player.storage.boss_nbianshen.remove(player.storage.boss_nbianshen_next); + if(!player.storage.boss_nbianshen.length){ + player.storage.boss_nbianshen=['jingjue','renxing','ruizhi','baonu']; + } + player.storage.boss_nbianshen_next=player.storage.boss_nbianshen.randomGet(player.storage.boss_nbianshen_next); + player.hp=hp; + player.maxHp=maxHp; + player.hujia=hujia; + player.update(); + } + else{ + player.storage.boss_nbianshen=['jingjue','renxing','ruizhi','baonu']; + player.storage.boss_nbianshen_next=player.storage.boss_nbianshen.randomGet(); + player.markSkill('boss_nbianshen'); + } + }, + intro:{ + content:function(storage,player){ + var map={ + jingjue:'警觉', + renxing:'任性', + ruizhi:'睿智', + baonu:'暴怒' + }; + return '下一个状态:'+map[player.storage.boss_nbianshen_next]; + } } - } - }, - boss_bianshen2:{ - mode:['boss'], - global:'boss_bianshen2x' - }, - boss_bianshen2x:{ - trigger:{global:'dieAfter'}, - forced:true, - priority:-10, - globalFixed:true, - filter:function(event){ - if(lib.config.mode!='boss') return false; - return event.player==game.boss&&event.player.hasSkill('boss_bianshen2'); }, - content:function(){ - 'step 0' - game.delay(); - 'step 1' - game.changeBoss(['boss_niutou','boss_mamian'].randomGet()); - } - }, - boss_bianshen3:{ - mode:['boss'], - global:'boss_bianshen3x' - }, - boss_bianshen3x:{ - trigger:{global:'dieAfter'}, - forced:true, - priority:-10, - globalFixed:true, - filter:function(event){ - if(lib.config.mode!='boss') return false; - return event.player==game.boss&&event.player.hasSkill('boss_bianshen3'); + boss_damagecount:{ + mode:['boss'], + global:'boss_damagecount2' }, - content:function(){ - 'step 0' - game.delay(); - 'step 1' - game.changeBoss(['boss_baiwuchang','boss_heiwuchang'].randomGet()); - } - }, - boss_bianshen4:{ - mode:['boss'], - global:'boss_bianshen4x' - }, - boss_bianshen4x:{ - trigger:{global:'dieAfter'}, - forced:true, - priority:-10, - globalFixed:true, - filter:function(event){ - if(lib.config.mode!='boss') return false; - return event.player==game.boss&&event.player.hasSkill('boss_bianshen4'); + boss_damagecount2:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + if(!ui.damageCount) return false; + return event.num>0&&player.isFriendOf(game.me)&&event.player.isEnemyOf(game.me); + }, + content:function(){ + _status.damageCount+=trigger.num; + ui.damageCount.innerHTML='伤害: '+_status.damageCount; + } }, - content:function(){ - 'step 0' - game.delay(); - 'step 1' - game.changeBoss(['boss_yecha','boss_luocha'].randomGet()); - } - }, - boss_moyany:{ - trigger:{player:'loseEnd'}, - frequent:true, - unique:true, - filter:function(event,player){ - return _status.currentPhase!=player; + boss_nianrui:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + trigger.num+=2; + }, + ai:{ + threaten:1.6 + } }, - content:function(){ - "step 0" - player.judge(function(card){ - return get.color(card)=='red'?1:0; - }); - "step 1" - if(result.bool){ - player.chooseTarget(true,'选择一个目标对其造成两点火焰伤害',function(card,player,target){ + boss_qixiang:{ + group:['boss_qixiang1','boss_qixiang2'], + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='lebu'&&card.name=='bingliang') return 0.8; + } + } + } + }, + boss_qixiang1:{ + trigger:{player:'judge'}, + forced:true, + filter:function(event,player){ + if(event.card){ + if(event.card.viewAs){ + return event.card.viewAs=='lebu'; + } + else{ + return event.card.name=='lebu'; + } + } + }, + content:function(){ + player.addTempSkill('boss_qixiang3','judgeAfter'); + } + }, + boss_qixiang2:{ + trigger:{player:'judge'}, + forced:true, + filter:function(event,player){ + if(event.card){ + if(event.card.viewAs){ + return event.card.viewAs=='bingliang'; + } + else{ + return event.card.name=='bingliang'; + } + } + }, + content:function(){ + player.addTempSkill('boss_qixiang4','judgeAfter'); + } + }, + boss_qixiang3:{ + mod:{ + suit:function(card,suit){ + if(suit=='diamond') return 'heart'; + } + } + }, + boss_qixiang4:{ + mod:{ + suit:function(card,suit){ + if(suit=='spade') return 'club'; + } + } + }, + boss_bianshen2:{ + mode:['boss'], + global:'boss_bianshen2x' + }, + boss_bianshen2x:{ + trigger:{global:'dieAfter'}, + forced:true, + priority:-10, + globalFixed:true, + filter:function(event){ + if(lib.config.mode!='boss') return false; + return event.player==game.boss&&event.player.hasSkill('boss_bianshen2'); + }, + content:function(){ + 'step 0' + game.delay(); + 'step 1' + game.changeBoss(['boss_niutou','boss_mamian'].randomGet()); + } + }, + boss_bianshen3:{ + mode:['boss'], + global:'boss_bianshen3x' + }, + boss_bianshen3x:{ + trigger:{global:'dieAfter'}, + forced:true, + priority:-10, + globalFixed:true, + filter:function(event){ + if(lib.config.mode!='boss') return false; + return event.player==game.boss&&event.player.hasSkill('boss_bianshen3'); + }, + content:function(){ + 'step 0' + game.delay(); + 'step 1' + game.changeBoss(['boss_baiwuchang','boss_heiwuchang'].randomGet()); + } + }, + boss_bianshen4:{ + mode:['boss'], + global:'boss_bianshen4x' + }, + boss_bianshen4x:{ + trigger:{global:'dieAfter'}, + forced:true, + priority:-10, + globalFixed:true, + filter:function(event){ + if(lib.config.mode!='boss') return false; + return event.player==game.boss&&event.player.hasSkill('boss_bianshen4'); + }, + content:function(){ + 'step 0' + game.delay(); + 'step 1' + game.changeBoss(['boss_yecha','boss_luocha'].randomGet()); + } + }, + boss_moyany:{ + trigger:{player:'loseEnd'}, + frequent:true, + unique:true, + filter:function(event,player){ + return _status.currentPhase!=player; + }, + content:function(){ + "step 0" + player.judge(function(card){ + return get.color(card)=='red'?1:0; + }); + "step 1" + if(result.bool){ + player.chooseTarget(true,'选择一个目标对其造成两点火焰伤害',function(card,player,target){ + return player!=target; + }).ai=function(target){ + return get.damageEffect(target,player,player,'fire'); + } + } + else{ + event.finish(); + } + "step 2" + if(result.targets.length){ + player.line(result.targets,'fire'); + result.targets[0].damage(2,'fire'); + } + }, + ai:{ + effect:{ + target:function(card){ + if(get.tag(card,'loseCard')){ + return [0.5,1]; + } + } + } + } + }, + boss_danshu:{ + trigger:{player:'loseEnd'}, + frequent:true, + unique:true, + filter:function(event,player){ + return _status.currentPhase!=player&&player.hp=player.hp; + }).ai=function(target){ + return get.damageEffect(target,player,player,'fire'); + } + "step 1" + if(result.bool){ + player.logSkill('boss_xiaoshou',result.targets); + result.targets[0].damage('fire',3); + } + }, + }, + boss_manjia:{ + group:['boss_manjia1','boss_manjia2'] + }, + boss_manjia1:{ + trigger:{target:'useCardToBefore'}, + forced:true, + priority:6, + filter:function(event,player){ + if(player.getEquip(2)) return false; + return lib.skill.tengjia1.filter(event,player); + }, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(target.getEquip(2)) return; + return lib.skill.tengjia1.ai.effect.target.apply(this,arguments); + } + } + } + }, + boss_manjia2:{ + trigger:{player:'damageBegin'}, + filter:function(event,player){ + if(player.getEquip(2)) return false; + if(event.nature=='fire') return true; + }, + forced:true, + check:function(){ + return false; + }, + content:function(){ + trigger.num++; + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(target.getEquip(2)) return; + return lib.skill.tengjia2.ai.effect.target.apply(this,arguments); + } + } + } + }, + boss_lianyu:{ + trigger:{player:'phaseEnd'}, + unique:true, + content:function(){ + "step 0" + event.players=get.players(player); + "step 1" + if(event.players.length){ + var current=event.players.shift(); + if(current.isEnemyOf(player)){ + player.line(current,'fire'); + current.damage('fire'); + } + event.redo(); + } + }, + ai:{ + threaten:2 + } + }, + boss_guiji:{ + trigger:{player:'phaseJudgeBegin'}, + forced:true, + content:function(){ + player.discard(player.getCards('j').randomGet()); + }, + filter:function(event ,player){ + return player.countCards('j')>0; + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='delay'&&target.countCards('j')==0) return 0.1; + } + } + } + }, + boss_minbao:{ + global:'boss_minbao2' + }, + boss_minbao2:{ + trigger:{global:'dieAfter'}, + forced:true, + globalFixed:true, + filter:function(event,player){ + return event.player.hasSkill('boss_minbao')&&event.player.isDead(); + }, + content:function(){ + trigger.player.line(player,'fire'); + player.damage('nosource','fire').animate=false; + player.$damage(trigger.player); + if(lib.config.animation&&!lib.config.low_performance){ + player.$fire(); + } + if(!event.parent.parent.boss_minbao_logv){ + event.parent.parent.boss_minbao_logv=true; + game.logv(trigger.player,'boss_minbao',game.filterPlayer(),event.parent.parent); + } + } + }, + boss_guihuo:{ + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('boss_guihuo'),function(card,player,target){ return player!=target; }).ai=function(target){ return get.damageEffect(target,player,player,'fire'); } - } - else{ - event.finish(); - } - "step 2" - if(result.targets.length){ - player.line(result.targets,'fire'); - result.targets[0].damage(2,'fire'); - } - }, - ai:{ - effect:{ - target:function(card){ - if(get.tag(card,'loseCard')){ - return [0.5,1]; - } + "step 1" + if(result.bool){ + player.logSkill('boss_guihuo',result.targets); + result.targets[0].damage('fire'); } - } - } - }, - boss_danshu:{ - trigger:{player:'loseEnd'}, - frequent:true, - unique:true, - filter:function(event,player){ - return _status.currentPhase!=player&&player.hp=player.hp; - }).ai=function(target){ - return get.damageEffect(target,player,player,'fire'); - } - "step 1" - if(result.bool){ - player.logSkill('boss_xiaoshou',result.targets); - result.targets[0].damage('fire',3); - } - }, - }, - boss_manjia:{ - group:['boss_manjia1','boss_manjia2'] - }, - boss_manjia1:{ - trigger:{target:'useCardToBefore'}, - forced:true, - priority:6, - filter:function(event,player){ - if(player.getEquip(2)) return false; - return lib.skill.tengjia1.filter(event,player); - }, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(target.getEquip(2)) return; - return lib.skill.tengjia1.ai.effect.target.apply(this,arguments); - } - } - } - }, - boss_manjia2:{ - trigger:{player:'damageBegin'}, - filter:function(event,player){ - if(player.getEquip(2)) return false; - if(event.nature=='fire') return true; - }, - forced:true, - check:function(){ - return false; - }, - content:function(){ - trigger.num++; - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(target.getEquip(2)) return; - return lib.skill.tengjia2.ai.effect.target.apply(this,arguments); - } - } - } - }, - boss_lianyu:{ - trigger:{player:'phaseEnd'}, - unique:true, - content:function(){ - "step 0" - event.players=get.players(player); - "step 1" - if(event.players.length){ - var current=event.players.shift(); - if(current.isEnemyOf(player)){ - player.line(current,'fire'); - current.damage('fire'); - } - event.redo(); - } - }, - ai:{ - threaten:2 - } - }, - boss_guiji:{ - trigger:{player:'phaseJudgeBegin'}, - forced:true, - content:function(){ - player.discard(player.getCards('j').randomGet()); - }, - filter:function(event ,player){ - return player.countCards('j')>0; - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='delay'&&target.countCards('j')==0) return 0.1; - } - } - } - }, - boss_minbao:{ - global:'boss_minbao2' - }, - boss_minbao2:{ - trigger:{global:'dieAfter'}, - forced:true, - globalFixed:true, - filter:function(event,player){ - return event.player.hasSkill('boss_minbao')&&event.player.isDead(); - }, - content:function(){ - trigger.player.line(player,'fire'); - player.damage('nosource','fire').animate=false; - player.$damage(trigger.player); - if(lib.config.animation&&!lib.config.low_performance){ - player.$fire(); - } - if(!event.parent.parent.boss_minbao_logv){ - event.parent.parent.boss_minbao_logv=true; - game.logv(trigger.player,'boss_minbao',game.filterPlayer(),event.parent.parent); - } - } - }, - boss_guihuo:{ - trigger:{player:'phaseEnd'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('boss_guihuo'),function(card,player,target){ - return player!=target; - }).ai=function(target){ - return get.damageEffect(target,player,player,'fire'); - } - "step 1" - if(result.bool){ - player.logSkill('boss_guihuo',result.targets); - result.targets[0].damage('fire'); - } - }, - }, - boss_luolei:{ - trigger:{player:'phaseBegin'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('boss_luolei'),function(card,player,target){ - return player!=target; - }).ai=function(target){ - return get.damageEffect(target,player,player,'thunder'); - } - "step 1" - if(result.bool){ - player.logSkill('boss_luolei',result.targets); - result.targets[0].damage('thunder'); - } - }, - }, - boss_beiming:{ - trigger:{player:'dieBegin'}, - forced:true, - filter:function(event){ - return event.source!=undefined; - }, - content:function(){ - trigger.source.discard(trigger.source.getCards('h')); - }, - ai:{ - threaten:0.7 - } - }, - boss_shanbeng:{ - global:'boss_shanbeng2', - trigger:{player:'dieBegin'}, - forced:true, - logv:false, - content:function(){ - var targets=game.filterPlayer(function(current){ - return current.countCards('e'); - }); - player.line(targets,'green'); - game.delay(); - game.logv(player,'boss_shanbeng',targets,null,true); - } - }, - boss_shanbeng2:{ - trigger:{global:'dieAfter'}, - forced:true, - globalFixed:true, - filter:function(event,player){ - return player.countCards('e')>0&&event.player.hasSkill('boss_shanbeng')&&event.player.isDead(); - }, - content:function(){ - player.discard(player.getCards('e')); - } - }, - boss_didong:{ - trigger:{player:'phaseEnd'}, - direct:true, - content:function(){ - "step 0" - player.chooseTarget(get.prompt('boss_didong'),function(card,player,target){ - return target.isEnemyOf(player); - }).ai=function(target){ - var att=get.attitude(player,target); - if(target.isTurnedOver()){ - if(att>0){ - return att+5; - } - return -1; - } - if(player.isTurnedOver()){ - return 5-att; - } - return -att; - }; - "step 1" - if(result.bool){ - player.logSkill('boss_didong',result.targets); - result.targets[0].turnOver(); - } - }, - ai:{ - threaten:1.7 - } - }, - boss_guimei:{ - mod:{ - targetEnabled:function(card,player,target){ - if(get.type(card)=='delay'){ - return false; - } - } - } - }, - boss_bianshen:{ - trigger:{global:'gameStart'}, - forced:true, - popup:false, - content:function(){ - player.smoothAvatar(); - player.init(['boss_chi','boss_mo','boss_wang','boss_liang'].randomGet()); - game.addVideo('reinit2',player,player.name); - } - }, - boss_bianshen_intro1:{nobracket:true}, - boss_bianshen_intro2:{nobracket:true}, - boss_bianshen_intro3:{nobracket:true}, - boss_bianshen_intro4:{nobracket:true}, - boss_chiyan_intro1:{nobracket:true}, - boss_chiyan_intro2:{nobracket:true}, - boss_chiyan_intro3:{nobracket:true}, - boss_chiyan_intro4:{nobracket:true}, - boss_qingmu_intro1:{nobracket:true}, - boss_qingmu_intro2:{nobracket:true}, - boss_qingmu_intro3:{nobracket:true}, - boss_qingmu_intro4:{nobracket:true}, - zhanjiang:{ - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - var players=game.filterPlayer(); - for(var i=0;i2){ - if(!target.hasSkill('guidao')) return 0; - return [0,hastarget?target.countCards('h')/4:0]; - } - if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){ - return [0,0]; - } - if(target.countCards('h')==0){ - return [1.5,0]; - } - if(target.countCards('h')==1&&!be){ - return [1.2,0]; - } - if(!target.hasSkill('guidao')) return [1,0.05]; - return [1,Math.min(0.5,(target.countCards('h')+be)/4)]; - } - } - } - } - }, - wuqin:{ - audio:2, - trigger:{player:'phaseEnd'}, - filter:function(event,player){ - return player.countCards('h')==0; - }, - content:function(){ - player.draw(3) - } - }, - boss_baolin:{ - audio:true, - inherit:'juece', - }, - boss_qiangzheng:{ - audio:2, - trigger:{player:'phaseEnd'}, - forced:true, - unique:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h'); - }); - }, - content:function(){ - "step 0" - var players=get.players(player); - players.remove(player); - event.players=players; - player.line(players,'green'); - "step 1" - if(event.players.length){ - var current=event.players.shift(); - var hs=current.getCards('h') - if(hs.length){ - var card=hs.randomGet(); - player.gain(card,current); - current.$giveAuto(card,player); - } - event.redo(); - } - } - }, - guizhen:{ - audio:2, - trigger:{player:'loseEnd'}, - frequent:true, - filter:function(event,player){ - if(player.countCards('h')) return false; - for(var i=0;i=3; - }, - content:function(){ - "step 0" - player.chooseTarget(function(card,player,target){ - return target!=player; - }).ai=function(){ - return 1; - } - "step 1" - if(result.bool){ - player.logSkill('boss_konghun',result.targets); - result.targets[0].goMad(); - } - }, - group:'boss_konghun2' - }, - boss_konghun2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - var players=game.players.concat(game.dead); - for(var i=0;i1){ - num--; - } - else{ - num++; - } - } - return num; - } - } - } - }, - huanhua:{ - audio:2, - trigger:{global:'gameDrawAfter'}, - forced:true, - unique:true, - content:function(){ - for(var i=0;i0&&event.player.hasSkill('boss_shanbeng')&&event.player.isDead(); + }, + content:function(){ + player.discard(player.getCards('e')); + } + }, + boss_didong:{ + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('boss_didong'),function(card,player,target){ + return target.isEnemyOf(player); + }).ai=function(target){ + var att=get.attitude(player,target); + if(target.isTurnedOver()){ + if(att>0){ + return att+5; + } + return -1; + } + if(player.isTurnedOver()){ + return 5-att; + } + return -att; + }; + "step 1" + if(result.bool){ + player.logSkill('boss_didong',result.targets); + result.targets[0].turnOver(); + } + }, + ai:{ + threaten:1.7 + } + }, + boss_guimei:{ + mod:{ + targetEnabled:function(card,player,target){ + if(get.type(card)=='delay'){ + return false; } } } - } - }, - boss_huixin:{ - trigger:{player:'loseEnd'}, - frequent:true, - unique:true, - filter:function(event,player){ - return _status.currentPhase!=player; }, - content:function(){ - "step 0" - player.judge(); - "step 1" - if(result.color=='black'){ - _status.currentPhase.loseHp(); - } - else{ - player.recover(); - player.draw(); + boss_bianshen:{ + trigger:{global:'gameStart'}, + forced:true, + popup:false, + content:function(){ + player.smoothAvatar(); + player.init(['boss_chi','boss_mo','boss_wang','boss_liang'].randomGet()); + game.addVideo('reinit2',player,player.name); } }, - ai:{ - effect:{ - target:function(card){ - if(get.tag(card,'loseCard')){ - return [0.5,1]; - } - } - } - } - }, - boss_shengshou:{ - audio:true, - trigger:{player:'useCard'}, - frequent:true, - unique:true, - filter:function(event,player){ - return player.hp0; - }, - content:function(){ - "step 0" - var next=player.discardPlayerCard(player,2,'hj','是否一张手牌来弃置一张花色相同的判定牌?'); - next.filterButton=function(button){ - var card=button.link; - if(!lib.filter.cardDiscardable(card,player)) return false; - if(ui.selected.buttons.length==0) return true; - if(get.position(ui.selected.buttons[0].link)=='h'){ - if(get.position(card)!='j') return false; + content:function(){ + var players=game.filterPlayer(); + for(var i=0;i1; - }, - content:function(){ - "step 0" - event.players=get.players(player); - event.num=0; - "step 1" - if(event.players.length){ - event.players.shift().loseHp(); - event.redo(); } - } - }, - boss_wuxin:{ - trigger:{player:'damageBefore'}, - forced:true, - priority:10, - content:function(){ - trigger.untrigger(); - trigger.finish(); - player.loseHp(); }, - audio:2, - }, - shenwei:{ - audio:2, - unique:true, - trigger:{player:'phaseDrawBegin'}, - forced:true, - content:function(){ - trigger.num+=3; - }, - mod:{ - maxHandcard:function(player,current){ - return current+3; - } - } - }, - shenji:{ - unique:true, - mod:{ - selectTarget:function(card,player,range){ - if(range[1]==-1) return; - if(player.getEquip(1)) return; - if(card.name=='sha') range[1]+=2; + boss_juejing:{ + trigger:{player:'phaseDrawBefore'}, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); }, - cardUsable:function(card,player,num){ - if(player.getEquip(1)) return; - if(card.name=='sha') return num+1; + ai:{ + noh:true, + }, + group:'boss_juejing2' + }, + boss_juejing2:{ + trigger:{player:'loseEnd'}, + forced:true, + filter:function(event,player){ + return player.countCards('h')<4; + }, + content:function(){ + player.draw(4-player.countCards('h')); } }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.subtype(card)=='equip1') return -1; + boss_leiji:{ + audio:2, + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'; + }, + direct:true, + content:function(){ + "step 0"; + player.chooseTarget(get.prompt('boss_leiji')).ai=function(target){ + return get.damageEffect(target,player,player,'thunder'); + }; + "step 1" + if(result.bool){ + player.logSkill('boss_leiji',result.targets,'thunder'); + event.target=result.targets[0]; + event.target.judge(function(card){ + // var suit=get.suit(card); + // if(suit=='spade') return -4; + // if(suit=='club') return -2; + if(get.color(card)=='black') return -2; + return 0; + }); + } + else{ + event.finish(); + } + "step 2" + if(result.bool==false){ + event.target.damage('thunder'); + player.draw(); + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')){ + var hastarget=false,players=game.filterPlayer(); + for(var i=0;i2){ + if(!target.hasSkill('guidao')) return 0; + return [0,hastarget?target.countCards('h')/4:0]; + } + if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){ + return [0,0]; + } + if(target.countCards('h')==0){ + return [1.5,0]; + } + if(target.countCards('h')==1&&!be){ + return [1.2,0]; + } + if(!target.hasSkill('guidao')) return [1,0.05]; + return [1,Math.min(0.5,(target.countCards('h')+be)/4)]; + } + } } } - } - }, - boss_baonuwash:{ - trigger:{player:'phaseAfter'}, - forced:true, - content:function(){ - game.over(game.me==game.boss); }, - temp:true, - }, - boss_baonu:{ - unique:true, - group:'boss_baonu2', - trigger:{player:'changeHp',global:'boss_baonuwash'}, - forced:true, - priority:100, - audio:2, - mode:['identity','guozhan','boss','stone'], - init:function(player){ - if(get.mode()=='boss'&&player==game.boss){ - lib.onwash.push(function(){ - if(!_status.boss_baonuwash){ - _status.boss_baonuwash=true; - _status.event.parent.trigger('boss_baonuwash'); + wuqin:{ + audio:2, + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + return player.countCards('h')==0; + }, + content:function(){ + player.draw(3) + } + }, + boss_baolin:{ + audio:true, + inherit:'juece', + }, + boss_qiangzheng:{ + audio:2, + trigger:{player:'phaseEnd'}, + forced:true, + unique:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h'); + }); + }, + content:function(){ + "step 0" + var players=get.players(player); + players.remove(player); + event.players=players; + player.line(players,'green'); + "step 1" + if(event.players.length){ + var current=event.players.shift(); + var hs=current.getCards('h') + if(hs.length){ + var card=hs.randomGet(); + player.gain(card,current); + current.$giveAuto(card,player); + } + event.redo(); + } + } + }, + guizhen:{ + audio:2, + trigger:{player:'loseEnd'}, + frequent:true, + filter:function(event,player){ + if(player.countCards('h')) return false; + for(var i=0;i=3; + }, + content:function(){ + "step 0" + player.chooseTarget(function(card,player,target){ + return target!=player; + }).ai=function(){ + return 1; + } + "step 1" + if(result.bool){ + player.logSkill('boss_konghun',result.targets); + result.targets[0].goMad(); + } + }, + group:'boss_konghun2' + }, + boss_konghun2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + var players=game.players.concat(game.dead); + for(var i=0;i4){ - game.delay(); - } - 'step 1' - player.chooseControl('暴怒战神','神鬼无前',function(){ - if(Math.random()<0.5) return '神鬼无前'; - return '暴怒战神'; - }).set('prompt','选择一个形态'); - 'step 2' - var hp=player.hp; - if(result.control=='暴怒战神'){ - player.init('boss_lvbu2'); - } - else{ - player.init('boss_lvbu3'); - } - if(hp>4){ - player.maxHp=hp; - player.hp=hp; - } - player.update(); - ui.clear(); - if(player.isLinked()) player.link(); - if(player.isTurnedOver()) player.turnOver(); - player.discard(player.getCards('ej')); - 'step 3' - while(_status.event.name!='phaseLoop'){ - _status.event=_status.event.parent; - } - game.resetSkills(); - _status.paused=false; - _status.event.player=player; - _status.event.step=0; - if(game.bossinfo){ - game.bossinfo.loopType=1; - _status.roundStart=game.boss; + yuehun:{ + unique:true, + trigger:{player:'phaseEnd'}, + frequent:true, + content:function(){ + player.recover(); + player.draw(2); } }, - ai:{ - effect:{ - target:function(card,player){ - if(get.tag(card,'damage')||get.tag(card,'loseHp')){ - if(player.hp==5){ - if(game.players.length<4) return [0,5]; - var num=0 - for(var i=0;i1) return [0,2]; - if(num&&Math.random()<0.7) return [0,1]; - } - } - } - } - } - }, - boss_baonu2:{ - trigger:{player:'gameDrawBegin'}, - forced:true, - popup:false, - content:function(){ - player.draw(4,false); - } - }, - qiwu:{ - audio:true, - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - return get.suit(event.card)=='club'&&player.hp0; - }, - content:function(){ - player.chooseToUse({name:'tao'},'神躯:是否使用一张桃?').logSkill='shenqu'; - } - }, - jiwu:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.countCards('h')==0) return false; - if(!player.hasSkill('qiangxi')) return true; - if(!player.hasSkill('lieren')) return true; - if(!player.hasSkill('xuanfeng')) return true; - if(!player.hasSkill('wansha')) return true; - return false; - }, - filterCard:true, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - 'step 0' - var list=[]; - if(!player.hasSkill('qiangxi')) list.push('qiangxi'); - if(!player.hasSkill('lieren')) list.push('lieren'); - if(!player.hasSkill('xuanfeng')) list.push('xuanfeng'); - if(!player.hasSkill('wansha')) list.push('wansha'); - if(list.length==1){ - player.addTempSkill(list[0],'phaseAfter'); - event.finish(); - } - else{ - player.chooseControl(list,function(){ - if(!player.getStat().skill.qiangxi){ - if(player.hasSkill('qiangxi')&&player.getEquip(1)&&list.contains('xuanfeng')) return 'xuanfeng'; - if(list.contains('wansha')||list.contains('qiangxi')){ - var players=game.filterPlayer(); - for(var i=0;i1){ + num--; + } + else{ + num++; + } + } + return num; } } - return 1; + } + }, + huanhua:{ + audio:2, + trigger:{global:'gameDrawAfter'}, + forced:true, + unique:true, + content:function(){ + for(var i=0;i0; + }, + content:function(){ + "step 0" + var next=player.discardPlayerCard(player,2,'hj','是否一张手牌来弃置一张花色相同的判定牌?'); + next.filterButton=function(button){ + var card=button.link; + if(!lib.filter.cardDiscardable(card,player)) return false; + if(ui.selected.buttons.length==0) return true; + if(get.position(ui.selected.buttons[0].link)=='h'){ + if(get.position(card)!='j') return false; + } + if(get.position(ui.selected.buttons[0].link)=='j'){ + if(get.position(card)!='h') return false; + } + return get.suit(card)==get.suit(ui.selected.buttons[0].link) + }; + next.ai=function(button){ + var card=button.link; + if(get.position(card)=='h'){ + return 11-get.value(card); + } + if(card.name=='lebu') return 5; + if(card.name=='bingliang') return 4; + if(card.name=='guiyoujie') return 3; + return 2; + }; + next.logSkill='xiuluo'; + } + }, + shangshix2:{ + trigger:{player:'phaseEnd'}, + forced:true, + unique:true, + filter:function(event,player){ + return player.hp>1; + }, + content:function(){ + "step 0" + event.players=get.players(player); + event.num=0; + "step 1" + if(event.players.length){ + event.players.shift().loseHp(); + event.redo(); + } + } + }, + boss_wuxin:{ + trigger:{player:'damageBefore'}, + forced:true, + priority:10, + content:function(){ + trigger.untrigger(); + trigger.finish(); + player.loseHp(); + }, + audio:2, + }, + shenwei:{ + audio:2, + unique:true, + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + trigger.num+=3; + }, + mod:{ + maxHandcard:function(player,current){ + return current+3; + } + } + }, + shenji:{ + unique:true, + mod:{ + selectTarget:function(card,player,range){ + if(range[1]==-1) return; + if(player.getEquip(1)) return; + if(card.name=='sha') range[1]+=2; + }, + cardUsable:function(card,player,num){ + if(player.getEquip(1)) return; + if(card.name=='sha') return num+1; + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.subtype(card)=='equip1') return -1; + } + } + } + }, + boss_baonuwash:{ + trigger:{player:'phaseAfter'}, + forced:true, + content:function(){ + game.over(game.me==game.boss); + }, + temp:true, + }, + boss_baonu:{ + unique:true, + group:'boss_baonu2', + trigger:{player:'changeHp',global:'boss_baonuwash'}, + forced:true, + priority:100, + audio:2, + mode:['identity','guozhan','boss','stone'], + init:function(player){ + if(get.mode()=='boss'&&player==game.boss){ + lib.onwash.push(function(){ + if(!_status.boss_baonuwash){ + _status.boss_baonuwash=true; + _status.event.parent.trigger('boss_baonuwash'); + } + else{ + _status.event.player.addSkill('boss_baonuwash'); + } + }); + for(var i in lib.card){ + if(lib.card[i].subtype=='equip1') lib.card[i].chongzhu=true; + } + } + }, + filter:function(event,player){ + return player.hp<=4||_status.boss_baonuwash; + }, + content:function(){ + 'step 0' + if(player.hp>4){ + game.delay(); + } + 'step 1' + player.chooseControl('暴怒战神','神鬼无前',function(){ + if(Math.random()<0.5) return '神鬼无前'; + return '暴怒战神'; + }).set('prompt','选择一个形态'); + 'step 2' + var hp=player.hp; + if(result.control=='暴怒战神'){ + player.init('boss_lvbu2'); + } + else{ + player.init('boss_lvbu3'); + } + if(hp>4){ + player.maxHp=hp; + player.hp=hp; + } + player.update(); + ui.clear(); + if(player.isLinked()) player.link(); + if(player.isTurnedOver()) player.turnOver(); + player.discard(player.getCards('ej')); + 'step 3' + while(_status.event.name!='phaseLoop'){ + _status.event=_status.event.parent; + } + game.resetSkills(); + _status.paused=false; + _status.event.player=player; + _status.event.step=0; + if(game.bossinfo){ + game.bossinfo.loopType=1; + _status.roundStart=game.boss; + } + }, + ai:{ + effect:{ + target:function(card,player){ + if(get.tag(card,'damage')||get.tag(card,'loseHp')){ + if(player.hp==5){ + if(game.players.length<4) return [0,5]; + var num=0 + for(var i=0;i1) return [0,2]; + if(num&&Math.random()<0.7) return [0,1]; } } } - if(!player.hasSkill('xuanfeng')&&player.needsToDiscard()>=3) return 1; - return 0; } } - } + }, + boss_baonu2:{ + trigger:{player:'gameDrawBegin'}, + forced:true, + popup:false, + content:function(){ + player.draw(4,false); + } + }, + qiwu:{ + audio:true, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return get.suit(event.card)=='club'&&player.hp0; + }, + content:function(){ + player.chooseToUse({name:'tao'},'神躯:是否使用一张桃?').logSkill='shenqu'; + } + }, + jiwu:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.countCards('h')==0) return false; + if(!player.hasSkill('qiangxi')) return true; + if(!player.hasSkill('lieren')) return true; + if(!player.hasSkill('xuanfeng')) return true; + if(!player.hasSkill('wansha')) return true; + return false; + }, + filterCard:true, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + 'step 0' + var list=[]; + if(!player.hasSkill('qiangxi')) list.push('qiangxi'); + if(!player.hasSkill('lieren')) list.push('lieren'); + if(!player.hasSkill('xuanfeng')) list.push('xuanfeng'); + if(!player.hasSkill('wansha')) list.push('wansha'); + if(list.length==1){ + player.addTempSkill(list[0],'phaseAfter'); + event.finish(); + } + else{ + player.chooseControl(list,function(){ + if(!player.getStat().skill.qiangxi){ + if(player.hasSkill('qiangxi')&&player.getEquip(1)&&list.contains('xuanfeng')) return 'xuanfeng'; + if(list.contains('wansha')||list.contains('qiangxi')){ + var players=game.filterPlayer(); + for(var i=0;i=3) return 1; + return 0; + } + } + } + }, }, - }, - translate:{ - zhu:'神', - cai:'盟', - zhong:'从', + translate:{ + zhu:'神', + cai:'盟', + zhong:'从', - boss_chi:'魑', - boss_mo:'魅', - boss_wang:'魍', - boss_liang:'魉', - boss_niutou:'牛头', - boss_mamian:'马面', - boss_baiwuchang:'白无常', - boss_heiwuchang:'黑无常', - boss_luocha:'罗刹', - boss_yecha:'夜叉', - boss_zhuoguiquxie:'捉鬼驱邪', + boss_chi:'魑', + boss_mo:'魅', + boss_wang:'魍', + boss_liang:'魉', + boss_niutou:'牛头', + boss_mamian:'马面', + boss_baiwuchang:'白无常', + boss_heiwuchang:'黑无常', + boss_luocha:'罗刹', + boss_yecha:'夜叉', + boss_zhuoguiquxie:'捉鬼驱邪', - boss_nianshou:'年兽', - boss_nianshou_heti:'年兽', - boss_nianshou_jingjue:'警觉年兽', - boss_nianshou_renxing:'任性年兽', - boss_nianshou_baonu:'暴怒年兽', - boss_nianshou_ruizhi:'睿智年兽', + boss_nianshou:'年兽', + boss_nianshou_heti:'年兽', + boss_nianshou_jingjue:'警觉年兽', + boss_nianshou_renxing:'任性年兽', + boss_nianshou_baonu:'暴怒年兽', + boss_nianshou_ruizhi:'睿智年兽', - boss_shuijing:'水镜先生', - boss_huangyueying:'奇智女杰', - boss_zhangchunhua:'冷血皇后', - boss_satan:'堕落天使', - boss_dongzhuo:'乱世魔王', - boss_lvbu1:'最强神话', - boss_lvbu2:'暴怒战神', - boss_lvbu3:'神鬼无前', - boss_zhouyu:'赤壁火神', - boss_pangtong:'涅盘凤雏', - boss_zhugeliang:'祭风卧龙', - boss_zhangjiao:'天公将军', - boss_zuoci:'迷之仙人', - boss_yuji:'琅琊道士', - boss_liubei:'蜀汉烈帝', - boss_caiwenji:'异乡孤女', - boss_huatuo:'药坛圣手', - boss_luxun:'蹁跹君子', - boss_zhenji:'洛水仙子', - boss_diaochan:'绝代妖姬', - boss_zhaoyun:'高达一号', - boss_guojia:'世之奇士', - boss_caocao:'魏武大帝', + boss_shuijing:'水镜先生', + boss_huangyueying:'奇智女杰', + boss_zhangchunhua:'冷血皇后', + boss_satan:'堕落天使', + boss_dongzhuo:'乱世魔王', + boss_lvbu1:'最强神话', + boss_lvbu2:'暴怒战神', + boss_lvbu3:'神鬼无前', + boss_zhouyu:'赤壁火神', + boss_pangtong:'涅盘凤雏', + boss_zhugeliang:'祭风卧龙', + boss_zhangjiao:'天公将军', + boss_zuoci:'迷之仙人', + boss_yuji:'琅琊道士', + boss_liubei:'蜀汉烈帝', + boss_caiwenji:'异乡孤女', + boss_huatuo:'药坛圣手', + boss_luxun:'蹁跹君子', + boss_zhenji:'洛水仙子', + boss_diaochan:'绝代妖姬', + boss_zhaoyun:'高达一号', + boss_guojia:'世之奇士', + boss_caocao:'魏武大帝', - boss_chiyanshilian:'赤炎试炼', - boss_zhuque:'朱雀', - boss_huoshenzhurong:'火神祝融', - boss_yanling:'焰灵', - boss_yandi:'炎帝', + boss_chiyanshilian:'赤炎试炼', + boss_zhuque:'朱雀', + boss_huoshenzhurong:'火神祝融', + boss_yanling:'焰灵', + boss_yandi:'炎帝', - boss_qingmushilian:'青木试炼', - boss_qinglong:'青龙', - boss_mushengoumang:'木神勾芒', - boss_shujing:'树精', - boss_taihao:'太昊', + boss_qingmushilian:'青木试炼', + boss_qinglong:'青龙', + boss_mushengoumang:'木神勾芒', + boss_shujing:'树精', + boss_taihao:'太昊', - boss_shenyi:'神裔', - boss_shenyi_info:'锁定技,你的武将牌始终正面向上,你的判定区内的牌效果反转', - boss_shenen:'神恩', - boss_shenen_info:'锁定技,所有己方角色使用牌无距离限制;所有敌方角色摸牌阶段多摸一张牌且手牌上限+1', - boss_fentian:'焚天', - boss_fentian_info:'锁定技,你造成的伤害视为火焰伤害;你使用红色牌无距离和次数限制,且不可被其他角色使用【闪】或【无懈可击】响应', - boss_xingxia:'行夏', - boss_xingxia_info:'每两轮限一次,出牌阶段,你可以对焰灵造成2点火焰伤害,然后令每名敌方角色选择一项:1.弃置一张红色牌;2.你对其造成1点火焰伤害', - boss_huihuo:'回火', - boss_huihuo_info:'锁定技,当你死亡时,你对所有敌方角色各造成3点火焰伤害;出牌阶段,你可以多使用一张【杀】', - boss_furan:'复燃', - boss_furan_info:'当你濒死时,所有敌方角色视为可以将红色牌当【桃】对你使用', - boss_chiyi:'赤仪', - boss_chiyi_info:'锁定技,从第三轮开始,敌方角色受到的伤害+1;第五轮开始时,你对所有角色各造成1点火焰伤害;第七轮开始时,你对焰灵造成5点火焰伤害', - boss_buchun:'布春', - boss_buchun_info:'每两轮限一次,出牌阶段,若场上有死亡的树精,你可以失去1点体力,复活所有树精,使其回复体力至1点,补充手牌至两张;若场上没有死亡的树精,你可以为一名己方角色回复2点体力', - boss_cuidu:'淬毒', - boss_cuidu_info:'锁定技,你对敌方角色造成伤害后,若其没有“中毒”,你令其获得“中毒”,然后令木神勾芒摸一张牌', - boss_zhongdu:'中毒', - boss_zhongdu_info:'锁定技,回合开始时,你进行判定,若结果不为红桃,你受到1点无来源的伤害,若结果不为黑桃,你失去此技能', - boss_qingyi:'青仪', - boss_qingyi_info:'锁定技,第三轮开始时,己方角色各回复1点体力;第五轮开始时,敌方角色各失去1点体力;第七轮开始时,复活木神勾芒和树精,使其各摸三张牌,各+1体力上限,然后各回复3点体力', + boss_shenyi:'神裔', + boss_shenyi_info:'锁定技,你的武将牌始终正面向上,你的判定区内的牌效果反转', + boss_shenen:'神恩', + boss_shenen_info:'锁定技,所有己方角色使用牌无距离限制;所有敌方角色摸牌阶段多摸一张牌且手牌上限+1', + boss_fentian:'焚天', + boss_fentian_info:'锁定技,你造成的伤害视为火焰伤害;你使用红色牌无距离和次数限制,且不可被其他角色使用【闪】或【无懈可击】响应', + boss_xingxia:'行夏', + boss_xingxia_info:'每两轮限一次,出牌阶段,你可以对焰灵造成2点火焰伤害,然后令每名敌方角色选择一项:1.弃置一张红色牌;2.你对其造成1点火焰伤害', + boss_huihuo:'回火', + boss_huihuo_info:'锁定技,当你死亡时,你对所有敌方角色各造成3点火焰伤害;出牌阶段,你可以多使用一张【杀】', + boss_furan:'复燃', + boss_furan_info:'当你濒死时,所有敌方角色视为可以将红色牌当【桃】对你使用', + boss_chiyi:'赤仪', + boss_chiyi_info:'锁定技,从第三轮开始,敌方角色受到的伤害+1;第五轮开始时,你对所有角色各造成1点火焰伤害;第七轮开始时,你对焰灵造成5点火焰伤害', + boss_buchun:'布春', + boss_buchun_info:'每两轮限一次,出牌阶段,若场上有死亡的树精,你可以失去1点体力,复活所有树精,使其回复体力至1点,补充手牌至两张;若场上没有死亡的树精,你可以为一名己方角色回复2点体力', + boss_cuidu:'淬毒', + boss_cuidu_info:'锁定技,你对敌方角色造成伤害后,若其没有“中毒”,你令其获得“中毒”,然后令木神勾芒摸一张牌', + boss_zhongdu:'中毒', + boss_zhongdu_info:'锁定技,回合开始时,你进行判定,若结果不为红桃,你受到1点无来源的伤害,若结果不为黑桃,你失去此技能', + boss_qingyi:'青仪', + boss_qingyi_info:'锁定技,第三轮开始时,己方角色各回复1点体力;第五轮开始时,敌方角色各失去1点体力;第七轮开始时,复活木神勾芒和树精,使其各摸三张牌,各+1体力上限,然后各回复3点体力', - boss_guimou:'鬼谋', - boss_guimou_info:'结束阶段,你可以令一名随机的其他角色进入混乱状态直到其下一回合结束', - boss_yuance:'远策', - boss_yuance_info:'每当一名角色受到其他角色的伤害,你可以选择一项并进行一次判定:1. 若结果为黑色,受伤害角色失去一点体力,否则伤害来源失去一点体力;2. 若结果为红色,受伤害角色回复一点体力,否则伤害来源回复一点体力', - boss_qizuo:'奇佐', - boss_qizuo_info:'你可以令你的普通锦囊牌额外结算一次', - boss_guixin:'归心', - boss_guixin_info:'锁定技,其他角色摸牌时,若摸牌数不少于2,须将摸到的牌中的一张交给你', - xiongcai:'雄才', - xiongcai_info:'锁定技,你在回合结束后随机获得一个魏势力角色的所有技能', - xiaoxiong:'枭雄', - xiaoxiong_info:'锁定技,每当一名其他角色使用一张基本牌或锦囊牌,你获得一张与之同名的牌', - boss_zhangwu:'章武', - boss_zhangwu_info:'每当你受到一次伤害,你可以令伤害来源选择一项:弃置所有手牌(至少一张),或受到两点伤害', - xiangxing:'禳星', - xiangxing_info:'锁定技,游戏开始时,你获得7枚星;每当你累计扣减7点体力,你失去一枚星,并造成7点雷属性伤害,随机分配给其他角色;当你失去全部星后,你的体力上限变为3', - yueyin:'月隐', - yueyin_info:'锁定技,你的每一枚星对应的一个特定条件,当你失去星时,若满足此条件,则不造成伤害', - xiangxing7_info:'你没有手牌', - xiangxing6_info:'此次受到的是火属性伤害', - xiangxing5_info:'此次受到的是雷属性伤害', - xiangxing4_info:'此次为失去体力', - xiangxing3_info:'一名其他角色有至少4件装备', - xiangxing2_info:'你的判定区内至少有2张牌', - xiangxing1_info:'场上只有2名存活角色', - gaiming:'改命', - gaiming_info:'锁定技,在你的判定牌生效前,你观看牌堆顶的7张牌并选择一张作为判定结果,此结果不可更改', - fengqi:'风起', - fengqi_info:'准备阶段和结束阶段,你可以视为使用任意一张普通锦囊牌', + boss_guimou:'鬼谋', + boss_guimou_info:'结束阶段,你可以令一名随机的其他角色进入混乱状态直到其下一回合结束', + boss_yuance:'远策', + boss_yuance_info:'每当一名角色受到其他角色的伤害,你可以选择一项并进行一次判定:1. 若结果为黑色,受伤害角色失去一点体力,否则伤害来源失去一点体力;2. 若结果为红色,受伤害角色回复一点体力,否则伤害来源回复一点体力', + boss_qizuo:'奇佐', + boss_qizuo_info:'你可以令你的普通锦囊牌额外结算一次', + boss_guixin:'归心', + boss_guixin_info:'锁定技,其他角色摸牌时,若摸牌数不少于2,须将摸到的牌中的一张交给你', + xiongcai:'雄才', + xiongcai_info:'锁定技,你在回合结束后随机获得一个魏势力角色的所有技能', + xiaoxiong:'枭雄', + xiaoxiong_info:'锁定技,每当一名其他角色使用一张基本牌或锦囊牌,你获得一张与之同名的牌', + boss_zhangwu:'章武', + boss_zhangwu_info:'每当你受到一次伤害,你可以令伤害来源选择一项:弃置所有手牌(至少一张),或受到两点伤害', + xiangxing:'禳星', + xiangxing_info:'锁定技,游戏开始时,你获得7枚星;每当你累计扣减7点体力,你失去一枚星,并造成7点雷属性伤害,随机分配给其他角色;当你失去全部星后,你的体力上限变为3', + yueyin:'月隐', + yueyin_info:'锁定技,你的每一枚星对应的一个特定条件,当你失去星时,若满足此条件,则不造成伤害', + xiangxing7_info:'你没有手牌', + xiangxing6_info:'此次受到的是火属性伤害', + xiangxing5_info:'此次受到的是雷属性伤害', + xiangxing4_info:'此次为失去体力', + xiangxing3_info:'一名其他角色有至少4件装备', + xiangxing2_info:'你的判定区内至少有2张牌', + xiangxing1_info:'场上只有2名存活角色', + gaiming:'改命', + gaiming_info:'锁定技,在你的判定牌生效前,你观看牌堆顶的7张牌并选择一张作为判定结果,此结果不可更改', + fengqi:'风起', + fengqi_info:'准备阶段和结束阶段,你可以视为使用任意一张普通锦囊牌', - jiaoxia:'皎霞', - jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', - lingbo:'凌波', - lingbo_info:'每当你使用或打出一张闪,你可以摸两张牌', - tiandao:'天道', - tiandao_info:'任意一名角色的判定生效前,你可以打出一张牌替换之', - yunshen:'云身', - yunshen2:'云身', - yunshen_info:'每当你打出一张闪,你可以令你的防御距离+1;准备阶段,你将累计的防御距离清零,然后摸等量的牌', - lianji:'连计', - lianji_info:'出牌阶段限一次,你可以选择一张手牌并指定两名角色进行拼点,拼点赢的角色获得此牌,并对没赢的角色造成一点伤害', - mazui:'麻醉', - mazui2:'麻醉', - mazui_info:'出牌阶段限一次,你可以将一张黑色手牌置于一名角色的武将牌上,该角色造成的下一次伤害-1,然后获得此牌', + jiaoxia:'皎霞', + jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', + lingbo:'凌波', + lingbo_info:'每当你使用或打出一张闪,你可以摸两张牌', + tiandao:'天道', + tiandao_info:'任意一名角色的判定生效前,你可以打出一张牌替换之', + yunshen:'云身', + yunshen2:'云身', + yunshen_info:'每当你打出一张闪,你可以令你的防御距离+1;准备阶段,你将累计的防御距离清零,然后摸等量的牌', + lianji:'连计', + lianji_info:'出牌阶段限一次,你可以选择一张手牌并指定两名角色进行拼点,拼点赢的角色获得此牌,并对没赢的角色造成一点伤害', + mazui:'麻醉', + mazui2:'麻醉', + mazui_info:'出牌阶段限一次,你可以将一张黑色手牌置于一名角色的武将牌上,该角色造成的下一次伤害-1,然后获得此牌', - boss_nbianshen:'变形', - boss_nbianshenx:'变形', - boss_nbianshenx_info:'你从第二轮开始,每一轮幻化为警觉、任性、睿智、暴怒四种随机状态中的一种', - boss_mengtai:'萌态', - boss_mengtai_info:'锁定技,若你的出牌阶段被跳过,你跳过本回合的弃牌阶段;若你的摸牌阶段被跳过,结束阶段开始时,你摸三张牌', - boss_ruizhi:'睿智', - boss_ruizhi_info:'锁定技,其他角色的准备阶段开始时,其选择一张手牌和一张装备区里的牌,然后弃置其余的牌', - boss_jingjue:'警觉', - boss_jingjue_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你回复1点体力', - boss_renxing:'任性', - boss_renxing_info:'锁定技,你的回合外,一名角色受到1点伤害后或回复1点体力时,你摸一张牌', - boss_nbaonu:'暴怒', - boss_nbaonu_info:'锁定技,摸牌阶段,你改为摸X张牌(X为4到你体力值间的随机数);若你的体力值小于5,则你使用【杀】造成的伤害+1且无次数限制', - boss_shouyi:'兽裔', - boss_shouyi_info:'锁定技,你使用牌无距离限制', + boss_nbianshen:'变形', + boss_nbianshenx:'变形', + boss_nbianshenx_info:'你从第二轮开始,每一轮幻化为警觉、任性、睿智、暴怒四种随机状态中的一种', + boss_mengtai:'萌态', + boss_mengtai_info:'锁定技,若你的出牌阶段被跳过,你跳过本回合的弃牌阶段;若你的摸牌阶段被跳过,结束阶段开始时,你摸三张牌', + boss_ruizhi:'睿智', + boss_ruizhi_info:'锁定技,其他角色的准备阶段开始时,其选择一张手牌和一张装备区里的牌,然后弃置其余的牌', + boss_jingjue:'警觉', + boss_jingjue_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你回复1点体力', + boss_renxing:'任性', + boss_renxing_info:'锁定技,你的回合外,一名角色受到1点伤害后或回复1点体力时,你摸一张牌', + boss_nbaonu:'暴怒', + boss_nbaonu_info:'锁定技,摸牌阶段,你改为摸X张牌(X为4到你体力值间的随机数);若你的体力值小于5,则你使用【杀】造成的伤害+1且无次数限制', + boss_shouyi:'兽裔', + boss_shouyi_info:'锁定技,你使用牌无距离限制', - boss_nianrui:'年瑞', - boss_nianrui_info:'锁定技,摸牌阶段,你额外摸两张牌', - boss_qixiang:'祺祥', - boss_qixiang1:'祺祥', - boss_qixiang2:'祺祥', - boss_qixiang_info:'乐不思蜀判定时,你的方块判定牌视为红桃;兵粮寸断判定时,你的黑桃判定牌视为草花', + boss_nianrui:'年瑞', + boss_nianrui_info:'锁定技,摸牌阶段,你额外摸两张牌', + boss_qixiang:'祺祥', + boss_qixiang1:'祺祥', + boss_qixiang2:'祺祥', + boss_qixiang_info:'乐不思蜀判定时,你的方块判定牌视为红桃;兵粮寸断判定时,你的黑桃判定牌视为草花', - qiwu:'栖梧', - qiwu_info:'锁定技。每当你使用一张梅花牌,你回复一点体力', - jizhen:'激阵', - jizhen_info:'结束阶段,你可以令所至多两名已受伤角色摸一张牌', + qiwu:'栖梧', + qiwu_info:'锁定技。每当你使用一张梅花牌,你回复一点体力', + jizhen:'激阵', + jizhen_info:'结束阶段,你可以令所至多两名已受伤角色摸一张牌', - boss_yushou:'驭兽', - boss_yushou_info:'出牌阶段开始时,你可以对所有敌方角色使用一张南蛮入侵', - boss_moyany:'魔炎', - boss_moyany_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你对一名其他角色造成2点火焰伤害', - boss_modao:'魔道', - boss_modao_info:'锁定技,准备阶段,你摸两张牌', - boss_mojian:'魔箭', - boss_mojian_info:'出牌阶段开始时,你可以对所有敌方角色使用一张万箭齐发', - boss_danshu:'丹术', - boss_danshu_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你回复1点体力', + boss_yushou:'驭兽', + boss_yushou_info:'出牌阶段开始时,你可以对所有敌方角色使用一张南蛮入侵', + boss_moyany:'魔炎', + boss_moyany_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你对一名其他角色造成2点火焰伤害', + boss_modao:'魔道', + boss_modao_info:'锁定技,准备阶段,你摸两张牌', + boss_mojian:'魔箭', + boss_mojian_info:'出牌阶段开始时,你可以对所有敌方角色使用一张万箭齐发', + boss_danshu:'丹术', + boss_danshu_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你回复1点体力', - boss_zuijiu:'醉酒', - boss_zuijiu_info:'锁定技,你的【杀】额外造成1点伤害', - boss_taiping:'太平', - boss_taiping_info:'锁定技,摸牌阶段摸牌时,你的摸牌数量+2', - boss_suoming:'索命', - boss_suoming_info:'结束阶段,将任意名未被横置的其他角色的武将牌横置', - boss_xixing:'吸星', - boss_xixing_info:'准备阶段,对任意一名横置的其他角色造成1点雷电伤害,然后回复1点体力', + boss_zuijiu:'醉酒', + boss_zuijiu_info:'锁定技,你的【杀】额外造成1点伤害', + boss_taiping:'太平', + boss_taiping_info:'锁定技,摸牌阶段摸牌时,你的摸牌数量+2', + boss_suoming:'索命', + boss_suoming_info:'结束阶段,将任意名未被横置的其他角色的武将牌横置', + boss_xixing:'吸星', + boss_xixing_info:'准备阶段,对任意一名横置的其他角色造成1点雷电伤害,然后回复1点体力', - boss_baolian:'暴敛', - boss_baolian_info:'锁定技,结束阶段,你摸两张牌', - boss_manjia:'蛮甲', - boss_manjia_info:'锁定技,若你的装备区内没有防具牌,则你视为装备了[藤甲]', - boss_xiaoshou:'枭首', - boss_xiaoshou_info:'结束阶段,对体力不小于你的一名其他角色造成3点伤害', - boss_guiji:'诡计', - boss_guiji_info:'锁定技,准备阶段结束时,若你的判定区内有牌,你随机弃置其中一张牌', - boss_lianyu:'炼狱', - boss_lianyu_info:'结束阶段,你可以对所有敌方角色造成1点火焰伤害', + boss_baolian:'暴敛', + boss_baolian_info:'锁定技,结束阶段,你摸两张牌', + boss_manjia:'蛮甲', + boss_manjia_info:'锁定技,若你的装备区内没有防具牌,则你视为装备了[藤甲]', + boss_xiaoshou:'枭首', + boss_xiaoshou_info:'结束阶段,对体力不小于你的一名其他角色造成3点伤害', + boss_guiji:'诡计', + boss_guiji_info:'锁定技,准备阶段结束时,若你的判定区内有牌,你随机弃置其中一张牌', + boss_lianyu:'炼狱', + boss_lianyu_info:'结束阶段,你可以对所有敌方角色造成1点火焰伤害', - boss_guihuo:'鬼火', - boss_guihuo_info:'结束阶段,你可以对一名其他角色造成1点火焰伤害', - boss_minbao:'冥爆', - boss_minbao_info:'锁定技,当你死亡时,对场上所有其他角色造成1点火焰伤害', - boss_luolei:'落雷', - boss_luolei_info:'准备阶段,你可以对一名其他角色造成1点雷电伤害', - boss_beiming:'悲鸣', - boss_beiming_info:'锁定技,当你死亡时,你令杀死你的角色弃置所有手牌', - boss_guimei:'鬼魅', - boss_guimei_info:'锁定技,你不能成为延时类锦囊的目标', - boss_didong:'地动', - boss_didong_info:'结束阶段,你可以选择一名敌方角色将其武将牌翻面', - boss_shanbeng:'山崩', - boss_shanbeng_info:'锁定技,当你死亡时,你令所有其他角色弃置其装备区内的所有牌', + boss_guihuo:'鬼火', + boss_guihuo_info:'结束阶段,你可以对一名其他角色造成1点火焰伤害', + boss_minbao:'冥爆', + boss_minbao_info:'锁定技,当你死亡时,对场上所有其他角色造成1点火焰伤害', + boss_luolei:'落雷', + boss_luolei_info:'准备阶段,你可以对一名其他角色造成1点雷电伤害', + boss_beiming:'悲鸣', + boss_beiming_info:'锁定技,当你死亡时,你令杀死你的角色弃置所有手牌', + boss_guimei:'鬼魅', + boss_guimei_info:'锁定技,你不能成为延时类锦囊的目标', + boss_didong:'地动', + boss_didong_info:'结束阶段,你可以选择一名敌方角色将其武将牌翻面', + boss_shanbeng:'山崩', + boss_shanbeng_info:'锁定技,当你死亡时,你令所有其他角色弃置其装备区内的所有牌', - boss_chiyan_intro1:'第一关:', - boss_chiyan_intro1_info:'挑战朱雀', - boss_chiyan_intro2:'第二关:', - boss_chiyan_intro2_info:'挑战火神祝融、焰灵', - boss_chiyan_intro3:'第三关:', - boss_chiyan_intro3_info:'挑战炎帝、火神祝融、焰灵', + boss_chiyan_intro1:'第一关:', + boss_chiyan_intro1_info:'挑战朱雀', + boss_chiyan_intro2:'第二关:', + boss_chiyan_intro2_info:'挑战火神祝融、焰灵', + boss_chiyan_intro3:'第三关:', + boss_chiyan_intro3_info:'挑战炎帝、火神祝融、焰灵', - boss_qingmu_intro1:'第一关:', - boss_qingmu_intro1_info:'挑战青龙', - boss_qingmu_intro2:'第二关:', - boss_qingmu_intro2_info:'挑战木神勾芒、树精', - boss_qingmu_intro3:'第三关:', - boss_qingmu_intro3_info:'挑战太昊、木神勾芒、树精', + boss_qingmu_intro1:'第一关:', + boss_qingmu_intro1_info:'挑战青龙', + boss_qingmu_intro2:'第二关:', + boss_qingmu_intro2_info:'挑战木神勾芒、树精', + boss_qingmu_intro3:'第三关:', + boss_qingmu_intro3_info:'挑战太昊、木神勾芒、树精', - boss_bianshen_intro1:'第一关:', - boss_bianshen_intro1_info:'挑战魑、魅、魍、魉中的随机一个', - boss_bianshen_intro2:'第二关:', - boss_bianshen_intro2_info:'挑战牛头、马面中的随机一个', - boss_bianshen_intro3:'第三关:', - boss_bianshen_intro3_info:'挑战白无常、黑无常中的随机一个', - boss_bianshen_intro4:'第四关:', - boss_bianshen_intro4_info:'挑战罗刹、夜叉中的随机一个', - // boss_bianshen2:'后援', - // boss_bianshen2_info:'你死亡后,随机召唤牛头、马面中的一个', - // boss_bianshen3:'后援', - // boss_bianshen3_info:'你死亡后,随机召唤白无常、黑无常中的一个', - // boss_bianshen4:'后援', - // boss_bianshen4_info:'你死亡后,随机召唤罗刹、夜叉中的一个', + boss_bianshen_intro1:'第一关:', + boss_bianshen_intro1_info:'挑战魑、魅、魍、魉中的随机一个', + boss_bianshen_intro2:'第二关:', + boss_bianshen_intro2_info:'挑战牛头、马面中的随机一个', + boss_bianshen_intro3:'第三关:', + boss_bianshen_intro3_info:'挑战白无常、黑无常中的随机一个', + boss_bianshen_intro4:'第四关:', + boss_bianshen_intro4_info:'挑战罗刹、夜叉中的随机一个', + // boss_bianshen2:'后援', + // boss_bianshen2_info:'你死亡后,随机召唤牛头、马面中的一个', + // boss_bianshen3:'后援', + // boss_bianshen3_info:'你死亡后,随机召唤白无常、黑无常中的一个', + // boss_bianshen4:'后援', + // boss_bianshen4_info:'你死亡后,随机召唤罗刹、夜叉中的一个', - zhanjiang:'斩将', - zhanjiang_info:'准备阶段开始时,如果其他角色的装备区内有【青釭剑】,你可以获得之', + zhanjiang:'斩将', + zhanjiang_info:'准备阶段开始时,如果其他角色的装备区内有【青釭剑】,你可以获得之', - boss_qiangzheng:'强征', - boss_qiangzheng_info:'锁定技,结束阶段,你获得每个敌方角色的一张手牌', - boss_baolin:'暴凌', - guizhen:'归真', - guizhen_info:'每当你失去最后一张手牌,你可以所有敌人失去全部手牌,没有手牌的角色失去一点体力(不触发技能)', - boss_shengshou:'圣手', - boss_shengshou_info:'每当你使用一张牌,你可以进行一次判定,若为红色,你回复一点体力', - wuqin:'五禽戏', - wuqin_info:'结束阶段,若你没有手牌,可以摸三张牌', + boss_qiangzheng:'强征', + boss_qiangzheng_info:'锁定技,结束阶段,你获得每个敌方角色的一张手牌', + boss_baolin:'暴凌', + guizhen:'归真', + guizhen_info:'每当你失去最后一张手牌,你可以所有敌人失去全部手牌,没有手牌的角色失去一点体力(不触发技能)', + boss_shengshou:'圣手', + boss_shengshou_info:'每当你使用一张牌,你可以进行一次判定,若为红色,你回复一点体力', + wuqin:'五禽戏', + wuqin_info:'结束阶段,若你没有手牌,可以摸三张牌', - boss_konghun:'控心', - boss_konghun_info:'结束阶段,你可以指定一名敌人令其进入混乱状态(不受对方控制,并将队友视为敌人)直到下一回合开始', - yuehun:'月魂', - yuehun_info:'结束阶段,你可以回复一点体力并摸两张牌', - fengwu:'风舞', - fengwu_info:'出牌阶段限一次,可令除你外的所有角色依次对与其距离最近的另一名角色使用一张【杀】,无法如此做者失去1点体力。', - boss_wange:'笙歌', + boss_konghun:'控心', + boss_konghun_info:'结束阶段,你可以指定一名敌人令其进入混乱状态(不受对方控制,并将队友视为敌人)直到下一回合开始', + yuehun:'月魂', + yuehun_info:'结束阶段,你可以回复一点体力并摸两张牌', + fengwu:'风舞', + fengwu_info:'出牌阶段限一次,可令除你外的所有角色依次对与其距离最近的另一名角色使用一张【杀】,无法如此做者失去1点体力。', + boss_wange:'笙歌', - huanhua:'幻化', - huanhua_info:'锁定技,游戏开始时,你获得其他角色的所有技能,体力上限变为其他角色之和;其他角色于摸牌阶段摸牌时,你摸等量的牌;其他角色于弃牌阶段弃牌时,你弃置等量的手牌', + huanhua:'幻化', + huanhua_info:'锁定技,游戏开始时,你获得其他角色的所有技能,体力上限变为其他角色之和;其他角色于摸牌阶段摸牌时,你摸等量的牌;其他角色于弃牌阶段弃牌时,你弃置等量的手牌', - boss_leiji:'雷击', - boss_leiji_info:'每当你使用或打出一张【闪】,可令任意一名角色进行一次判定,若结果为黑色,其受到一点雷电伤害,然后你摸一张牌', - jidian:'亟电', - jidian_info:'每当你造成一次伤害,可以指定距离受伤害角色1以内的一名其他角色进行判定,若结果为黑色,该角色受到一点雷电伤害', + boss_leiji:'雷击', + boss_leiji_info:'每当你使用或打出一张【闪】,可令任意一名角色进行一次判定,若结果为黑色,其受到一点雷电伤害,然后你摸一张牌', + jidian:'亟电', + jidian_info:'每当你造成一次伤害,可以指定距离受伤害角色1以内的一名其他角色进行判定,若结果为黑色,该角色受到一点雷电伤害', - tinqin:'听琴', - boss_guihan:'归汉', - boss_guihan_info:'限定技,濒死阶段,你可以将体力回复至体力上限,摸4张牌,令所有敌人的技能恢复,并获得技能【听琴】、【蕙质】', - boss_huixin:'蕙质', - boss_huixin_info:'每当你于回合外失去牌,可以进行一次判定,若为黑色,当前回合角色失去一点体力,否则你回复一点体力并摸一张牌', - boss_hujia:'胡笳', - boss_hujia_info:'结束阶段,若你已受伤,可以弃置一张牌令一名其他角色的所有技能失效,若其所有技能已失效,改为令其失去一点体力上限', - boss_honglian:'红莲', - boss_honglian_info:'锁定技,结束阶段,你摸两张牌,并对所有敌人造成一点火焰伤害', - huoshen:'火神', - huoshen_info:'锁定技,你防止即将受到的火焰伤害,改为回复1点体力', - boss_xianyin:'仙音', - boss_xianyin_info:'每当你于回合外失去牌,你可以进行一次判定,若为红色,你令一名敌人失去一点体力', + tinqin:'听琴', + boss_guihan:'归汉', + boss_guihan_info:'限定技,濒死阶段,你可以将体力回复至体力上限,摸4张牌,令所有敌人的技能恢复,并获得技能【听琴】、【蕙质】', + boss_huixin:'蕙质', + boss_huixin_info:'每当你于回合外失去牌,可以进行一次判定,若为黑色,当前回合角色失去一点体力,否则你回复一点体力并摸一张牌', + boss_hujia:'胡笳', + boss_hujia_info:'结束阶段,若你已受伤,可以弃置一张牌令一名其他角色的所有技能失效,若其所有技能已失效,改为令其失去一点体力上限', + boss_honglian:'红莲', + boss_honglian_info:'锁定技,结束阶段,你摸两张牌,并对所有敌人造成一点火焰伤害', + huoshen:'火神', + huoshen_info:'锁定技,你防止即将受到的火焰伤害,改为回复1点体力', + boss_xianyin:'仙音', + boss_xianyin_info:'每当你于回合外失去牌,你可以进行一次判定,若为红色,你令一名敌人失去一点体力', - boss_yuhuo:'浴火', - boss_yuhuo_info:'觉醒技,在你涅槃后,你获得技能【神威】、【朱羽】', - boss_tianyu:'天狱', - boss_tianyu_info:'锁定技,结束阶段,你解除横置状态,除你之外的所有角色进入横置状态', + boss_yuhuo:'浴火', + boss_yuhuo_info:'觉醒技,在你涅槃后,你获得技能【神威】、【朱羽】', + boss_tianyu:'天狱', + boss_tianyu_info:'锁定技,结束阶段,你解除横置状态,除你之外的所有角色进入横置状态', - boss_juejing:'绝境', - boss_juejing2:'绝境', - boss_juejing_info:'锁定技,摸牌阶段开始时,你不摸牌;锁定技,若你的手牌数小于4,你将手牌补至四张', + boss_juejing:'绝境', + boss_juejing2:'绝境', + boss_juejing_info:'锁定技,摸牌阶段开始时,你不摸牌;锁定技,若你的手牌数小于4,你将手牌补至四张', - boss_jizhi:'集智', - boss_jizhi_info:'每当你使用一张锦囊牌或装备牌,你可以摸一张牌并展示之', - boss_guiyin:'归隐', - boss_guiyin_info:'锁定技,体力值比你多的角色无法在回合内对你使用卡牌', - boss_gongshen:'工神', - boss_gongshen_info:'锁定技,除你之外的角色没有装备区;你不能成为其他角色的的延时锦囊目标', + boss_jizhi:'集智', + boss_jizhi_info:'每当你使用一张锦囊牌或装备牌,你可以摸一张牌并展示之', + boss_guiyin:'归隐', + boss_guiyin_info:'锁定技,体力值比你多的角色无法在回合内对你使用卡牌', + boss_gongshen:'工神', + boss_gongshen_info:'锁定技,除你之外的角色没有装备区;你不能成为其他角色的的延时锦囊目标', - fanghua:'芳华', - fanghua_info:'结束阶段,你可以令所有已翻面角色流失一点体力', - tashui:'踏水', - tashui_info:'每当你使用或打出一张黑色牌,你可以令一名其他角色翻面', + fanghua:'芳华', + fanghua_info:'结束阶段,你可以令所有已翻面角色流失一点体力', + tashui:'踏水', + tashui_info:'每当你使用或打出一张黑色牌,你可以令一名其他角色翻面', - boss_wuxin:'无心', - boss_wuxin_info:'锁定技,你防止即将受到的伤害,改为流失一点体力;你不能成为其他角色的延时锦囊的目标', - shangshix:'伤逝', - shangshix2:'伤逝', - shangshix_info:'锁定技,你的手牌数至少为4,结束阶段,若你的体力值大于1,你令场上所有角色流失一点体力', + boss_wuxin:'无心', + boss_wuxin_info:'锁定技,你防止即将受到的伤害,改为流失一点体力;你不能成为其他角色的延时锦囊的目标', + shangshix:'伤逝', + shangshix2:'伤逝', + shangshix_info:'锁定技,你的手牌数至少为4,结束阶段,若你的体力值大于1,你令场上所有角色流失一点体力', - boss_baonu:'暴怒', - boss_baonu_info:'锁定技,当你的体力值降至4或更低时,你变身为暴怒战神或神鬼无前,并立即开始你的回合', - shenwei:'神威', - shenwei_info:'锁定技,摸牌阶段,你额外摸3张牌,你的手牌上限+3', - shenji:'神戟', - shenji_info:'锁定技,若你未装备武器,你使用【杀】指定的目标数上限+2,次数上限+1', - xiuluo:'修罗', - xiuluo_info:'准备阶段,你可以弃置一张牌,然后弃置你判定区内一张同花色的牌', - shenqu:'神躯', - shenqu_info:'每名角色的准备阶段,若你的手牌数少于或等于你的体力上限数,你可以摸两张牌;当你受到伤害后,你可以使用一张【桃】', - jiwu:'极武', - jiwu_info:'出牌阶段,你可以弃置一张手牌,然后获得一项:“强袭”、“烈刃”、“旋风”、“完杀”,直到回合结束', + boss_baonu:'暴怒', + boss_baonu_info:'锁定技,当你的体力值降至4或更低时,你变身为暴怒战神或神鬼无前,并立即开始你的回合', + shenwei:'神威', + shenwei_info:'锁定技,摸牌阶段,你额外摸3张牌,你的手牌上限+3', + shenji:'神戟', + shenji_info:'锁定技,若你未装备武器,你使用【杀】指定的目标数上限+2,次数上限+1', + xiuluo:'修罗', + xiuluo_info:'准备阶段,你可以弃置一张牌,然后弃置你判定区内一张同花色的牌', + shenqu:'神躯', + shenqu_info:'每名角色的准备阶段,若你的手牌数少于或等于你的体力上限数,你可以摸两张牌;当你受到伤害后,你可以使用一张【桃】', + jiwu:'极武', + jiwu_info:'出牌阶段,你可以弃置一张手牌,然后获得一项:“强袭”、“烈刃”、“旋风”、“完杀”,直到回合结束', - mode_boss_character_config:'挑战武将', - }, - get:{ - rawAttitude:function(from,to){ - return (from.side===to.side?6:-6); + mode_boss_character_config:'挑战武将', + }, + get:{ + rawAttitude:function(from,to){ + return (from.side===to.side?6:-6); + } } - } + }; }); diff --git a/mode/brawl.js b/mode/brawl.js index 7a9ce9285..31b8c29df 100644 --- a/mode/brawl.js +++ b/mode/brawl.js @@ -1,2239 +1,2247 @@ 'use strict'; -game.import('mode',{ - name:'brawl', - game:{ - syncMenu:true, - }, - start:function(){ - ui.auto.hide(); - if(!lib.storage.scene){ - lib.storage.scene={}; - } - if(!lib.storage.stage){ - lib.storage.stage={}; - } - if(!_status.extensionmade){ - _status.extensionmade=[]; - } - if(_status.extensionscene){ - game.save('scene',lib.storage.scene); - } - if(_status.extensionstage){ - game.save('stage',lib.storage.stage); - } - var dialog=ui.create.dialog('hidden'); - dialog.classList.add('fixed'); - dialog.classList.add('scroll1'); - dialog.classList.add('scroll2'); - dialog.classList.add('fullwidth'); - dialog.classList.add('fullheight'); - dialog.classList.add('noupdate'); - dialog.classList.add('character'); - dialog.contentContainer.style.overflow='visible'; - dialog.style.overflow='hidden'; - dialog.content.style.height='100%'; - dialog.contentContainer.style.transition='all 0s'; - if(!lib.storage.directStage) dialog.open(); - var packnode=ui.create.div('.packnode',dialog); - lib.setScroll(packnode); - var clickCapt=function(){ - var active=this.parentNode.querySelector('.active'); - if(this.link=='stage'){ - if(get.is.empty(lib.storage.scene)){ - alert('请创建至少1个场景'); - return; - } - } - if(active){ - if(active==this) return; - for(var i=0;istage.level){ - stage.level=level.index+1; - game.save('stage',stagesave,'brawl'); - } - if(stage.mode!='sequal'){ - game.save('lastStage',level.index+1,'brawl'); - } - } - else{ - ui.create.control('重新开始',function(){ - if(stage.mode=='sequal'&&bool&&level.index==stage.scenes.length-1){ - game.save('directStage',[stage.name,0],'brawl'); - } - else{ - game.save('directStage',[stage.name,level.index],'brawl'); - } - localStorage.setItem(lib.configprefix+'directstart',true); - game.reload(); - }); - if(stage.mode=='sequal'&&level.index==stage.scenes.length-1){ - stage.level=0; - game.save('stage',stagesave,'brawl'); - } - if(stage.mode!='sequal'){ - game.save('lastStage',level.index,'brawl'); - } - } - delete _status.createControl; - }); - var scene=stage.scenes[level.index]; - info={ - name:scene.name, - intro:scene.intro, - }; - for(var i in lib.brawl.scene.template){ - info[i]=get.copy(lib.brawl.scene.template[i]); - } - if(!scene.gameDraw){ - info.content.noGameDraw=true; - } - info.content.scene=scene; - } - else{ - return; - } - } - else{ - info=lib.brawl[active.link]; - } - lib.translate.restart='返回'; - dialog.delete(); - ui.brawlinfo=ui.create.system('乱斗',null,true); - lib.setPopped(ui.brawlinfo,function(){ - var uiintro=ui.create.dialog('hidden'); - uiintro.add(info.name); - var intro; - if(Array.isArray(info.intro)){ - intro='
              '; - for(var i=0;i'+intro+'
    '); - var ul=uiintro.querySelector('ul'); - if(ul){ - ul.style.width='180px'; - } - uiintro.add(ui.create.div('.placeholder')); - return uiintro; - },250); - ui.auto.show(); - _status.brawl=info.content; - game.switchMode(info.mode); - if(info.init){ - info.init(); - } - } - }; - var start=ui.create.div('.menubutton.round.highlight','斗',dialog.content,clickStart); - start.style.position='absolute'; - start.style.left='auto'; - start.style.right='10px'; - start.style.top='auto'; - start.style.bottom='10px'; - start.style.width='80px'; - start.style.height='80px'; - start.style.lineHeight='80px'; - start.style.margin='0'; - start.style.padding='5px'; - start.style.fontSize='72px'; - start.style.zIndex=3; - start.style.transition='all 0s'; - game.addScene=function(name,clear){ - var scene=lib.storage.scene[name]; - var brawl={ - name:name, - intro:scene.intro, - }; - for(var i in lib.brawl.scene.template){ - brawl[i]=get.copy(lib.brawl.scene.template[i]); - } - if(!scene.gameDraw){ - brawl.content.noGameDraw=true; - } - brawl.content.scene=scene; - lib.brawl['scene_'+name]=brawl; - var node=createNode('scene_'+name); - if(clear){ - game.addSceneClear(); - clickCapt.call(node); - _status.sceneChanged=true; - } - }; - game.addStage=function(name,clear){ - var stage=lib.storage.stage[name]; - var brawl={ - name:name, - intro:stage.intro, - content:{} - }; - for(var i in lib.brawl.stage.template){ - brawl[i]=get.copy(lib.brawl.stage.template[i]); - } - brawl.content.stage=stage; - lib.brawl['stage_'+name]=brawl; - var node=createNode('stage_'+name); - if(clear){ - game.addStageClear(); - clickCapt.call(node); - } - } - game.removeScene=function(name){ - delete lib.storage.scene[name]; - game.save('scene',lib.storage.scene); - _status.sceneChanged=true; - for(var i=0;i7){ - setTimeout(function(){ - while(node.nodes.length>5){ - node.nodes.shift().delete(); - } - },500); - } - }; - if(init){ - node.nodes=[]; - for(var i=0;i<5;i++){ - func(); - } - } - node.showcaseinterval=setInterval(func,1000); - }, - content:{ - cardPile:function(list){ - var num=Math.ceil(list.length/10); - while(num--){ - list.push([['heart','diamond','club','spade'].randomGet(),Math.ceil(Math.random()*13),'du']); - } - return list; - } - }, - }, - daozhiyueying:{ - name:'导师月英', - mode:'identity', - intro:'牌堆中所有普通锦囊牌数量翻倍;移除拥有集智技能的角色', - showcase:function(init){ - var node=this; - var player1,player2; - if(init){ - player1=ui.create.player(null,true).init('huangyueying'); - player2=ui.create.player(null,true); - if(lib.character.re_huangyueying){ - player2.init('re_huangyueying'); - } - else{ - player2.init('huangyueying'); - } - player1.style.left='20px'; - player1.style.top='20px'; - player1.style.transform='scale(0.9)'; - player1.node.count.innerHTML='2'; - player1.node.count.dataset.condition='mid'; - player2.style.left='auto'; - player2.style.right='20px'; - player2.style.top='20px'; - player2.style.transform='scale(0.9)'; - player2.node.count.innerHTML='2'; - player2.node.count.dataset.condition='mid'; - this.appendChild(player1); - this.appendChild(player2); - this.player1=player1; - this.player2=player2; - } - else{ - player1=this.player1; - player2=this.player2; - } - var rect1=player1.getBoundingClientRect(); - var rect2=player2.getBoundingClientRect(); - var left1=rect1.left+rect1.width/2-ui.arena.offsetLeft; - var left2=rect2.left+rect2.width/2-ui.arena.offsetLeft; - var top1=rect1.top+rect1.height/2-ui.arena.offsetTop; - var top2=rect2.top+rect2.height/2-ui.arena.offsetTop; +game.import('mode',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'brawl', + game:{ + syncMenu:true, + }, + start:function(){ + ui.auto.hide(); + if(!lib.storage.scene){ + lib.storage.scene={}; + } + if(!lib.storage.stage){ + lib.storage.stage={}; + } + if(!_status.extensionmade){ + _status.extensionmade=[]; + } + if(_status.extensionscene){ + game.save('scene',lib.storage.scene); + } + if(_status.extensionstage){ + game.save('stage',lib.storage.stage); + } + var dialog=ui.create.dialog('hidden'); + dialog.classList.add('fixed'); + dialog.classList.add('scroll1'); + dialog.classList.add('scroll2'); + dialog.classList.add('fullwidth'); + dialog.classList.add('fullheight'); + dialog.classList.add('noupdate'); + dialog.classList.add('character'); + dialog.contentContainer.style.overflow='visible'; + dialog.style.overflow='hidden'; + dialog.content.style.height='100%'; + dialog.contentContainer.style.transition='all 0s'; + if(!lib.storage.directStage) dialog.open(); + var packnode=ui.create.div('.packnode',dialog); + lib.setScroll(packnode); + var clickCapt=function(){ + var active=this.parentNode.querySelector('.active'); + if(this.link=='stage'){ + if(get.is.empty(lib.storage.scene)){ + alert('请创建至少1个场景'); + return; + } + } + if(active){ + if(active==this) return; + for(var i=0;istage.level){ + stage.level=level.index+1; + game.save('stage',stagesave,'brawl'); + } + if(stage.mode!='sequal'){ + game.save('lastStage',level.index+1,'brawl'); + } + } + else{ + ui.create.control('重新开始',function(){ + if(stage.mode=='sequal'&&bool&&level.index==stage.scenes.length-1){ + game.save('directStage',[stage.name,0],'brawl'); + } + else{ + game.save('directStage',[stage.name,level.index],'brawl'); + } + localStorage.setItem(lib.configprefix+'directstart',true); + game.reload(); + }); + if(stage.mode=='sequal'&&level.index==stage.scenes.length-1){ + stage.level=0; + game.save('stage',stagesave,'brawl'); + } + if(stage.mode!='sequal'){ + game.save('lastStage',level.index,'brawl'); + } + } + delete _status.createControl; + }); + var scene=stage.scenes[level.index]; + info={ + name:scene.name, + intro:scene.intro, + }; + for(var i in lib.brawl.scene.template){ + info[i]=get.copy(lib.brawl.scene.template[i]); + } + if(!scene.gameDraw){ + info.content.noGameDraw=true; + } + info.content.scene=scene; + } + else{ + return; + } + } + else{ + info=lib.brawl[active.link]; + } + lib.translate.restart='返回'; + dialog.delete(); + ui.brawlinfo=ui.create.system('乱斗',null,true); + lib.setPopped(ui.brawlinfo,function(){ + var uiintro=ui.create.dialog('hidden'); + uiintro.add(info.name); + var intro; + if(Array.isArray(info.intro)){ + intro='
      '; + for(var i=0;i'+intro+'
    '); + var ul=uiintro.querySelector('ul'); + if(ul){ + ul.style.width='180px'; + } + uiintro.add(ui.create.div('.placeholder')); + return uiintro; + },250); + ui.auto.show(); + _status.brawl=info.content; + game.switchMode(info.mode); + if(info.init){ + info.init(); + } + } + }; + var start=ui.create.div('.menubutton.round.highlight','斗',dialog.content,clickStart); + start.style.position='absolute'; + start.style.left='auto'; + start.style.right='10px'; + start.style.top='auto'; + start.style.bottom='10px'; + start.style.width='80px'; + start.style.height='80px'; + start.style.lineHeight='80px'; + start.style.margin='0'; + start.style.padding='5px'; + start.style.fontSize='72px'; + start.style.zIndex=3; + start.style.transition='all 0s'; + game.addScene=function(name,clear){ + var scene=lib.storage.scene[name]; + var brawl={ + name:name, + intro:scene.intro, + }; + for(var i in lib.brawl.scene.template){ + brawl[i]=get.copy(lib.brawl.scene.template[i]); + } + if(!scene.gameDraw){ + brawl.content.noGameDraw=true; + } + brawl.content.scene=scene; + lib.brawl['scene_'+name]=brawl; + var node=createNode('scene_'+name); + if(clear){ + game.addSceneClear(); + clickCapt.call(node); + _status.sceneChanged=true; + } + }; + game.addStage=function(name,clear){ + var stage=lib.storage.stage[name]; + var brawl={ + name:name, + intro:stage.intro, + content:{} + }; + for(var i in lib.brawl.stage.template){ + brawl[i]=get.copy(lib.brawl.stage.template[i]); + } + brawl.content.stage=stage; + lib.brawl['stage_'+name]=brawl; + var node=createNode('stage_'+name); + if(clear){ + game.addStageClear(); + clickCapt.call(node); + } + } + game.removeScene=function(name){ + delete lib.storage.scene[name]; + game.save('scene',lib.storage.scene); + _status.sceneChanged=true; + for(var i=0;i7){ + setTimeout(function(){ + while(node.nodes.length>5){ + node.nodes.shift().delete(); + } + },500); + } + }; + if(init){ + node.nodes=[]; + for(var i=0;i<5;i++){ + func(); + } + } + node.showcaseinterval=setInterval(func,1000); + }, + content:{ + cardPile:function(list){ + var num=Math.ceil(list.length/10); + while(num--){ + list.push([['heart','diamond','club','spade'].randomGet(),Math.ceil(Math.random()*13),'du']); + } + return list; + } + }, + }, + daozhiyueying:{ + name:'导师月英', + mode:'identity', + intro:'牌堆中所有普通锦囊牌数量翻倍;移除拥有集智技能的角色', + showcase:function(init){ + var node=this; + var player1,player2; + if(init){ + player1=ui.create.player(null,true).init('huangyueying'); + player2=ui.create.player(null,true); + if(lib.character.re_huangyueying){ + player2.init('re_huangyueying'); + } + else{ + player2.init('huangyueying'); + } + player1.style.left='20px'; + player1.style.top='20px'; + player1.style.transform='scale(0.9)'; + player1.node.count.innerHTML='2'; + player1.node.count.dataset.condition='mid'; + player2.style.left='auto'; + player2.style.right='20px'; + player2.style.top='20px'; + player2.style.transform='scale(0.9)'; + player2.node.count.innerHTML='2'; + player2.node.count.dataset.condition='mid'; + this.appendChild(player1); + this.appendChild(player2); + this.player1=player1; + this.player2=player2; + } + else{ + player1=this.player1; + player2=this.player2; + } + var rect1=player1.getBoundingClientRect(); + var rect2=player2.getBoundingClientRect(); + var left1=rect1.left+rect1.width/2-ui.arena.offsetLeft; + var left2=rect2.left+rect2.width/2-ui.arena.offsetLeft; + var top1=rect1.top+rect1.height/2-ui.arena.offsetTop; + var top2=rect2.top+rect2.height/2-ui.arena.offsetTop; - var createCard=function(wuxie){ - var card; - if(wuxie){ - card=game.createCard('wuxie','noclick'); - card.style.transform='scale(0.9)'; - } - else{ - card=ui.create.card(null,'noclick',true); - } - card.style.opacity=0; - card.style.position='absolute'; - card.style.zIndex=2; - card.style.margin=0; - return card; - } + var createCard=function(wuxie){ + var card; + if(wuxie){ + card=game.createCard('wuxie','noclick'); + card.style.transform='scale(0.9)'; + } + else{ + card=ui.create.card(null,'noclick',true); + } + card.style.opacity=0; + card.style.position='absolute'; + card.style.zIndex=2; + card.style.margin=0; + return card; + } - var func=function(){ - game.linexy([left1,top1,left2,top2]); - var card=createCard(true); - card.style.left='43px'; - card.style.top='58px'; - node.appendChild(card); - ui.refresh(card); - card.style.opacity=1; - card.style.transform='scale(0.9) translate(137px,152px)'; - setTimeout(function(){ - card.delete(); - },1000); - player1.node.count.innerHTML='1'; + var func=function(){ + game.linexy([left1,top1,left2,top2]); + var card=createCard(true); + card.style.left='43px'; + card.style.top='58px'; + node.appendChild(card); + ui.refresh(card); + card.style.opacity=1; + card.style.transform='scale(0.9) translate(137px,152px)'; + setTimeout(function(){ + card.delete(); + },1000); + player1.node.count.innerHTML='1'; - setTimeout(function(){ - if(!node.showcaseinterval) return; - player1.node.count.innerHTML='2'; - var card=createCard(); - card.style.left='43px'; - card.style.top='58px'; - card.style.transform='scale(0.9) translate(137px,152px)'; - node.appendChild(card); - ui.refresh(card); - card.style.opacity=1; - card.style.transform='scale(0.9)'; - setTimeout(function(){ - card.delete(); - },1000); - },300); + setTimeout(function(){ + if(!node.showcaseinterval) return; + player1.node.count.innerHTML='2'; + var card=createCard(); + card.style.left='43px'; + card.style.top='58px'; + card.style.transform='scale(0.9) translate(137px,152px)'; + node.appendChild(card); + ui.refresh(card); + card.style.opacity=1; + card.style.transform='scale(0.9)'; + setTimeout(function(){ + card.delete(); + },1000); + },300); - setTimeout(function(){ - if(!node.showcaseinterval) return; - player2.node.count.innerHTML='1'; - game.linexy([left2,top2,left1,top1]); - var card=createCard(true); - card.style.left='auto'; - card.style.right='43px'; - card.style.top='58px'; - node.appendChild(card); - ui.refresh(card); - card.style.opacity=1; - card.style.transform='scale(0.9) translate(-137px,152px)'; - setTimeout(function(){ - card.delete(); - },700); + setTimeout(function(){ + if(!node.showcaseinterval) return; + player2.node.count.innerHTML='1'; + game.linexy([left2,top2,left1,top1]); + var card=createCard(true); + card.style.left='auto'; + card.style.right='43px'; + card.style.top='58px'; + node.appendChild(card); + ui.refresh(card); + card.style.opacity=1; + card.style.transform='scale(0.9) translate(-137px,152px)'; + setTimeout(function(){ + card.delete(); + },700); - setTimeout(function(){ - if(!node.showcaseinterval) return; - player2.node.count.innerHTML='2'; - var card=createCard(); - card.style.left='auto'; - card.style.right='43px'; - card.style.top='58px'; - card.style.transform='scale(0.9) translate(-137px,152px)'; - node.appendChild(card); - ui.refresh(card); - card.style.opacity=1; - card.style.transform='scale(0.9)'; - setTimeout(function(){ - card.delete(); - },700); - },300); - },1000); - }; - node.showcaseinterval=setInterval(func,2200); - func(); - }, - init:function(){ - for(var i in lib.character){ - var skills=lib.character[i][3] - if(skills.contains('jizhi')||skills.contains('rejizhi')||skills.contains('lingzhou')){ - delete lib.character[i]; - } - } - }, - content:{ - cardPile:function(list){ - var list2=[]; - for(var i=0;i=5){ - num=0; - } - var card=game.createCard('sha','noclick'); - card.style.left='calc(50% - 52px)'; - card.style.top='68px'; - card.style.position='absolute'; - card.style.margin=0; - card.style.zIndex=2; - card.style.opacity=0; - node.appendChild(card); - ui.refresh(card); - card.style.opacity=1; - card.style.transform='translate('+dx+'px,'+dy+'px)'; - setTimeout(function(){ - card.delete(); - },700); - },700); - }, - init:function(){ - lib.skill.weiwoduzun={ - mark:true, - intro:{ - content:'杀造成的伤害+1' - }, - group:['weiwoduzun_damage','weiwoduzun_lose'], - subSkill:{ - damage:{ - trigger:{source:'damageBegin'}, - forced:true, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.notLink(); - }, - content:function(){ - trigger.num++; - } - }, - lose:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event){ - return event.source&&event.source.isAlive(); - }, - content:function(){ - player.removeSkill('weiwoduzun'); - trigger.source.addSkill('weiwoduzun'); - } - } - } - }; - lib.translate.weiwoduzun='战神'; - lib.translate.weiwoduzun_bg='尊'; - }, - content:{ - cardPile:function(list){ - var num=0; - for(var i=0;i4){ - setTimeout(function(){ - while(node.nodes.length>3){ - node.nodes.shift().delete(); - } - },500); - } - }; - node.list=[]; - if(init){ - node.nodes=[]; - for(var i=0;i<3;i++){ - func(); - } - } - node.showcaseinterval=setInterval(func,1000); - }, - init:function(){ - var map={}; - var map3=[]; - var list1=['司','夏','诸']; - var list2=['马','侯','葛']; - var exclude=['界','新','大']; - for(var i in lib.character){ - if(lib.filter.characterDisabled(i)) continue; - var surname=lib.translate[i]; - for(var j=0;j=5){ + num=0; + } + var card=game.createCard('sha','noclick'); + card.style.left='calc(50% - 52px)'; + card.style.top='68px'; + card.style.position='absolute'; + card.style.margin=0; + card.style.zIndex=2; + card.style.opacity=0; + node.appendChild(card); + ui.refresh(card); + card.style.opacity=1; + card.style.transform='translate('+dx+'px,'+dy+'px)'; + setTimeout(function(){ + card.delete(); + },700); + },700); + }, + init:function(){ + lib.skill.weiwoduzun={ + mark:true, + intro:{ + content:'杀造成的伤害+1' + }, + group:['weiwoduzun_damage','weiwoduzun_lose'], + subSkill:{ + damage:{ + trigger:{source:'damageBegin'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.notLink(); + }, + content:function(){ + trigger.num++; + } + }, + lose:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event){ + return event.source&&event.source.isAlive(); + }, + content:function(){ + player.removeSkill('weiwoduzun'); + trigger.source.addSkill('weiwoduzun'); + } + } + } + }; + lib.translate.weiwoduzun='战神'; + lib.translate.weiwoduzun_bg='尊'; + }, + content:{ + cardPile:function(list){ + var num=0; + for(var i=0;i4){ + setTimeout(function(){ + while(node.nodes.length>3){ + node.nodes.shift().delete(); + } + },500); + } + }; + node.list=[]; + if(init){ + node.nodes=[]; + for(var i=0;i<3;i++){ + func(); + } + } + node.showcaseinterval=setInterval(func,1000); + }, + init:function(){ + var map={}; + var map3=[]; + var list1=['司','夏','诸']; + var list2=['马','侯','葛']; + var exclude=['界','新','大']; + for(var i in lib.character){ + if(lib.filter.characterDisabled(i)) continue; + var surname=lib.translate[i]; + for(var j=0;j7){ - nodes[i].index=0; - } - setPos(nodes[i]); - } - },1000); - }, - content:{ - gameStart:function(){ - var target=(_status.mode=='zhong')?game.zhong:game.zhu; - if(get.config('double_character')){ - target.init(game.me.name,game.me.name2); - } - else{ - target.init(game.me.name); - } - target.hp++; - target.maxHp++; - target.update(); - }, - chooseCharacterAi:function(player,list,list2,back){ - if(player==game.zhu){ - return; - } - else{ - if(get.config('double_character')){ - player.init(game.me.name,game.me.name2); - } - else{ - player.init(game.me.name); - } - } - }, - chooseCharacter:function(list,list2,num){ - if(game.me!=game.zhu){ - return list.slice(0,list2); - } - else{ - if(_status.event.zhongmode){ - return list.slice(0,6); - } - else{ - return list.concat(list2.slice(0,num)); - } - } - } - } - }, - // baiyudujiang:{ - // name:'白衣渡江', - // mode:'versus', - // submode:'2v2', - // intro:[ - // '玩家在选将时可从6-8张的武将牌里选择两张武将牌,一张面向大家可见(加入游戏),另一张是隐藏面孔(暗置)', - // '选择的两张武将牌需满足以下至少两个条件:1.性别相同;2.体力上限相同;3.技能数量相同', - // '每名玩家在其回合开始或回合结束时,可以选择将自己的武将牌弃置,然后使用暗置的武将牌进行剩余的游戏' - // ], - // content:{ - // submode:'two', - // chooseCharacterNum:2, - // chooseCharacterAfter:function(){ - // - // } - // } - // } - scene:{ - name:'创建场景', - content:{ - submode:'normal' - }, - nostart:true, - fullshow:true, - template:{ - mode:'identity', - init:function(){ - game.saveConfig('double_character',false,'identity'); - _status.brawl.playerNumber=_status.brawl.scene.players.length; - }, - showcase:function(init){ - if(init){ - var name=lib.brawl[this.link].name; - var scene=lib.storage.scene[name]; - ui.create.node('button','编辑场景',this,function(){ - _status.sceneToLoad=scene; - game.switchScene(); - }); - if(_status.extensionmade.contains(name)){ - ui.create.node('button','管理扩展',this,function(){ - ui.click.configMenu(); - ui.click.extensionTab(name); - },{marginLeft:'6px'}); - } - else{ - ui.create.node('button','删除场景',this,function(){ - if(confirm('确定删除'+name+'?')){ - game.removeScene(name); - } - },{marginLeft:'6px'}); - } - ui.create.node('button','导出扩展',this,function(){ - var str='{name:"'+name+'",content:function(){\nif(lib.config.mode=="brawl"){\n'+ - 'if(!lib.storage.scene) lib.storage.scene={};\n'+ - 'if(!lib.storage.scene["'+name+'"]){\nlib.storage.scene["'+name+'"]='+get.stringify(scene)+';\n_status.extensionscene=true;}\n'+ - 'if(!_status.extensionmade) _status.extensionmade=[];\n'+ - '_status.extensionmade.push("'+name+'");\n}}\n}'; - var extension={'extension.js':'game.import("extension",'+str+')'}; - game.importExtension(extension,null,name); - },{marginLeft:'6px'}); - } - }, - content:{ - submode:'normal', - noAddSetting:true, - identityShown:true, - orderedPile:true, - cardPile:function(list){ - list.randomSort(); - var scene=_status.brawl.scene; - var inpile=[]; - for(var i=0;i=0;i--){ - list.unshift(parseInfo(scene.cardPileTop[i])); - } - for(var i=0;igame.players[i].maxHp){ - game.players[i].hp=game.players[i].maxHp; - } - } - if(info.hp){ - game.players[i].hp=info.hp; - if(game.players[i].hp>game.players[i].maxHp){ - game.players[i].maxHp=game.players[i].hp; - } - } - game.players[i].update(); - } - var scene=_status.brawl.scene; - var over=function(str){ - switch(str){ - case 'win':game.over(true);break; - case 'lose':game.over(false);break; - case 'tie':game.over('平局');break; - } - } - if(scene.turns){ - var turns=scene.turns[0]; - lib.onphase.push(function(){ - turns--; - if(turns<0){ - over(scene.turns[1]); - } - }); - } - if(scene.washes){ - var washes=scene.washes[0]; - lib.onwash.push(function(){ - washes--; - if(washes<=0){ - over(scene.washes[1]); - } - }); - } - }, - chooseCharacterBefore:function(){ - var scene=_status.brawl.scene; - var playercontrol=[]; - var maxpos=0; - for(var i=0;i7){ + nodes[i].index=0; + } + setPos(nodes[i]); + } + },1000); + }, + content:{ + gameStart:function(){ + var target=(_status.mode=='zhong')?game.zhong:game.zhu; + if(get.config('double_character')){ + target.init(game.me.name,game.me.name2); + } + else{ + target.init(game.me.name); + } + target.hp++; + target.maxHp++; + target.update(); + }, + chooseCharacterAi:function(player,list,list2,back){ + if(player==game.zhu){ + return; + } + else{ + if(get.config('double_character')){ + player.init(game.me.name,game.me.name2); + } + else{ + player.init(game.me.name); + } + } + }, + chooseCharacter:function(list,list2,num){ + if(game.me!=game.zhu){ + return list.slice(0,list2); + } + else{ + if(_status.event.zhongmode){ + return list.slice(0,6); + } + else{ + return list.concat(list2.slice(0,num)); + } + } + } + } + }, + // baiyudujiang:{ + // name:'白衣渡江', + // mode:'versus', + // submode:'2v2', + // intro:[ + // '玩家在选将时可从6-8张的武将牌里选择两张武将牌,一张面向大家可见(加入游戏),另一张是隐藏面孔(暗置)', + // '选择的两张武将牌需满足以下至少两个条件:1.性别相同;2.体力上限相同;3.技能数量相同', + // '每名玩家在其回合开始或回合结束时,可以选择将自己的武将牌弃置,然后使用暗置的武将牌进行剩余的游戏' + // ], + // content:{ + // submode:'two', + // chooseCharacterNum:2, + // chooseCharacterAfter:function(){ + // + // } + // } + // } + scene:{ + name:'创建场景', + content:{ + submode:'normal' + }, + nostart:true, + fullshow:true, + template:{ + mode:'identity', + init:function(){ + game.saveConfig('double_character',false,'identity'); + _status.brawl.playerNumber=_status.brawl.scene.players.length; + }, + showcase:function(init){ + if(init){ + var name=lib.brawl[this.link].name; + var scene=lib.storage.scene[name]; + ui.create.node('button','编辑场景',this,function(){ + _status.sceneToLoad=scene; + game.switchScene(); + }); + if(_status.extensionmade.contains(name)){ + ui.create.node('button','管理扩展',this,function(){ + ui.click.configMenu(); + ui.click.extensionTab(name); + },{marginLeft:'6px'}); + } + else{ + ui.create.node('button','删除场景',this,function(){ + if(confirm('确定删除'+name+'?')){ + game.removeScene(name); + } + },{marginLeft:'6px'}); + } + ui.create.node('button','导出扩展',this,function(){ + var str='{name:"'+name+'",content:function(){\nif(lib.config.mode=="brawl"){\n'+ + 'if(!lib.storage.scene) lib.storage.scene={};\n'+ + 'if(!lib.storage.scene["'+name+'"]){\nlib.storage.scene["'+name+'"]='+get.stringify(scene)+';\n_status.extensionscene=true;}\n'+ + 'if(!_status.extensionmade) _status.extensionmade=[];\n'+ + '_status.extensionmade.push("'+name+'");\n}}\n}'; + var extension={'extension.js':'game.import("extension",'+str+')'}; + game.importExtension(extension,null,name); + },{marginLeft:'6px'}); + } + }, + content:{ + submode:'normal', + noAddSetting:true, + identityShown:true, + orderedPile:true, + cardPile:function(list){ + list.randomSort(); + var scene=_status.brawl.scene; + var inpile=[]; + for(var i=0;i=0;i--){ + list.unshift(parseInfo(scene.cardPileTop[i])); + } + for(var i=0;igame.players[i].maxHp){ + game.players[i].hp=game.players[i].maxHp; + } + } + if(info.hp){ + game.players[i].hp=info.hp; + if(game.players[i].hp>game.players[i].maxHp){ + game.players[i].maxHp=game.players[i].hp; + } + } + game.players[i].update(); + } + var scene=_status.brawl.scene; + var over=function(str){ + switch(str){ + case 'win':game.over(true);break; + case 'lose':game.over(false);break; + case 'tie':game.over('平局');break; + } + } + if(scene.turns){ + var turns=scene.turns[0]; + lib.onphase.push(function(){ + turns--; + if(turns<0){ + over(scene.turns[1]); + } + }); + } + if(scene.washes){ + var washes=scene.washes[0]; + lib.onwash.push(function(){ + washes--; + if(washes<=0){ + over(scene.washes[1]); + } + }); + } + }, + chooseCharacterBefore:function(){ + var scene=_status.brawl.scene; + var playercontrol=[]; + var maxpos=0; + for(var i=0;ibb?1:-1; - } - return a>b?1:-1; - }); - list.unshift(['random','自选主将']); - var name1=ui.create.selectlist(list,list[0],line2); - name1.style.marginLeft='3px'; - name1.style.marginRight='3px'; - name1.style.maxWidth='80px'; - list[0][1]='自选副将'; - list.unshift(['none','无副将']); - var name2=ui.create.selectlist(list,list[0],line2); - name2.style.marginLeft='3px'; - name2.style.marginRight='3px'; - name2.style.maxWidth='80px'; + list.sort(function(a,b){ + a=a[0];b=b[0]; + var aa=a,bb=b; + if(aa.indexOf('_')!=-1){ + aa=aa.slice(aa.indexOf('_')+1); + } + if(bb.indexOf('_')!=-1){ + bb=bb.slice(bb.indexOf('_')+1); + } + if(aa!=bb){ + return aa>bb?1:-1; + } + return a>b?1:-1; + }); + list.unshift(['random','自选主将']); + var name1=ui.create.selectlist(list,list[0],line2); + name1.style.marginLeft='3px'; + name1.style.marginRight='3px'; + name1.style.maxWidth='80px'; + list[0][1]='自选副将'; + list.unshift(['none','无副将']); + var name2=ui.create.selectlist(list,list[0],line2); + name2.style.marginLeft='3px'; + name2.style.marginRight='3px'; + name2.style.maxWidth='80px'; - var capt9=ui.create.div(style2,'','编辑牌堆',this); - capt9.style.display='none'; + var capt9=ui.create.div(style2,'','编辑牌堆',this); + capt9.style.display='none'; - var capt2=ui.create.div(style2,'','添加卡牌',this); - var line3=ui.create.div(style2,this); - line3.style.display='none'; - capt1.style.display='none'; - capt2.style.display='none'; + var capt2=ui.create.div(style2,'','添加卡牌',this); + var line3=ui.create.div(style2,this); + line3.style.display='none'; + capt1.style.display='none'; + capt2.style.display='none'; - var line5=ui.create.div(style2,this); - line5.style.display='none'; - var pileaddlist=[]; - for(var i=0;i替换牌堆'); - line11.style.display='none'; - var replacepile=ui.create.node('input',line11); - replacepile.type='checkbox'; + var line11=ui.create.div(style2,this,'','替换牌堆'); + line11.style.display='none'; + var replacepile=ui.create.node('input',line11); + replacepile.type='checkbox'; - ui.create.node('span',line11,'开局摸牌',{marginLeft:'10px'}); - var gameDraw=ui.create.node('input',line11); - gameDraw.type='checkbox'; - gameDraw.checked=true; + ui.create.node('span',line11,'开局摸牌',{marginLeft:'10px'}); + var gameDraw=ui.create.node('input',line11); + gameDraw.type='checkbox'; + gameDraw.checked=true; - var capt_t=ui.create.div(style2,'','牌堆顶',this); - var line6_t=ui.create.div(style2,this); - var capt_b=ui.create.div(style2,'','牌堆底',this); - var line6_b=ui.create.div(style2,this); - var capt_d=ui.create.div(style2,'','弃牌堆',this); - var line6_d=ui.create.div(style2,this); - line6_d.style.marginBottom='10px'; - capt_t.style.display='none'; - capt_b.style.display='none'; - capt_d.style.display='none'; + var capt_t=ui.create.div(style2,'','牌堆顶',this); + var line6_t=ui.create.div(style2,this); + var capt_b=ui.create.div(style2,'','牌堆底',this); + var line6_b=ui.create.div(style2,this); + var capt_d=ui.create.div(style2,'','弃牌堆',this); + var line6_d=ui.create.div(style2,this); + line6_d.style.marginBottom='10px'; + capt_t.style.display='none'; + capt_b.style.display='none'; + capt_d.style.display='none'; - var line4=ui.create.div(style2,this); - line4.style.display='none'; - line4.style.marginTop='20px'; - var resetCharacter=function(){ - // line1.style.display='block'; - editPile.disabled=false; - // editCode.disabled=false; - saveButton.disabled=false; - // exportButton.disabled=false; - line7.style.display='block'; - line2.style.display='none'; - line2_t.style.display='none'; - line3.style.display='none'; - line4.style.display='none'; - line5.style.display='none'; - line6_h.style.display='none'; - line6_e.style.display='none'; - line6_j.style.display='none'; - capt1.style.display='none'; - capt2.style.display='none'; - capt_h.style.display='none'; - capt_e.style.display='none'; - capt_j.style.display='none'; + var line4=ui.create.div(style2,this); + line4.style.display='none'; + line4.style.marginTop='20px'; + var resetCharacter=function(){ + // line1.style.display='block'; + editPile.disabled=false; + // editCode.disabled=false; + saveButton.disabled=false; + // exportButton.disabled=false; + line7.style.display='block'; + line2.style.display='none'; + line2_t.style.display='none'; + line3.style.display='none'; + line4.style.display='none'; + line5.style.display='none'; + line6_h.style.display='none'; + line6_e.style.display='none'; + line6_j.style.display='none'; + capt1.style.display='none'; + capt2.style.display='none'; + capt_h.style.display='none'; + capt_e.style.display='none'; + capt_j.style.display='none'; - name1.value='random'; - name2.value='none'; - identity.value='fan'; - position.value='0'; - hp.value=''; - maxHp.value=''; - line6_h.innerHTML=''; - line6_e.innerHTML=''; - line6_j.innerHTML=''; - cardpileaddname.value='random'; - cardpileaddsuit.value='random'; - cardpileaddnumber.value='random'; - linked.checked=false; - turnedover.checked=false; - playercontrol.checked=false; - }; - var createCharacter=function(info){ - var player=ui.create.player(null,true); - player._customintro=function(uiintro){ - if(info.handcards.length){ - uiintro.addText('手牌',true); - var hs=ui.create.div('.buttons'); - for(var i=0;i=8){ - addCharacter.disabled=true; - } + line7.appendChild(player); + player.listen(function(){ + if(confirm('是否删除此角色?')){ + this.remove(); + if(line7.childElementCount<8){ + addCharacter.disabled=false; + } + } + }); + if(line7.childElementCount>=8){ + addCharacter.disabled=true; + } - return player; - }; - ui.create.div('.menubutton.large','确定',line4,style3,function(){ - var info={ - name:name1.value, - name2:name2.value, - identity:identity.value, - position:parseInt(position.value), - hp:parseInt(hp.value), - maxHp:parseInt(maxHp.value), - linked:linked.checked, - turnedover:turnedover.checked, - playercontrol:playercontrol.checked, - handcards:[], - equips:[], - judges:[] - }; - for(var i=0;i=8){ - addCharacter.disabled=true; - } - else{ - addCharacter.disabled=false; - } - // editCode.disabled=false; - saveButton.disabled=false; - // exportButton.disabled=false; - cardpileaddname.value='random'; - cardpileaddsuit.value='random'; - cardpileaddnumber.value='random'; + var line9=ui.create.div(style2,this); + line9.style.display='none'; + line9.style.marginTop='20px'; + var resetStatus=function(all){ + if(line7.childElementCount>=8){ + addCharacter.disabled=true; + } + else{ + addCharacter.disabled=false; + } + // editCode.disabled=false; + saveButton.disabled=false; + // exportButton.disabled=false; + cardpileaddname.value='random'; + cardpileaddsuit.value='random'; + cardpileaddnumber.value='random'; - line8.style.display='none'; - capt8.style.display='none'; - capt9.style.display='none'; - line9.style.display='none'; - line10.style.display='none'; - line11.style.display='none'; - line3.style.display='none'; - line7.style.display='block'; + line8.style.display='none'; + capt8.style.display='none'; + capt9.style.display='none'; + line9.style.display='none'; + line10.style.display='none'; + line11.style.display='none'; + line3.style.display='none'; + line7.style.display='block'; - line6_t.style.display='none'; - line6_b.style.display='none'; - line6_d.style.display='none'; - capt_t.style.display='none'; - capt_b.style.display='none'; - capt_d.style.display='none'; + line6_t.style.display='none'; + line6_b.style.display='none'; + line6_d.style.display='none'; + capt_t.style.display='none'; + capt_b.style.display='none'; + capt_d.style.display='none'; - if(all===true){ - replacepile.checked=false; - gameDraw.checked=true; - turns.value='1'; - turnsresult.value='none'; - washes.value='1'; - washesresult.value='none'; - line6_t.innerHTML=''; - line6_b.innerHTML=''; - line6_d.innerHTML=''; - } - } + if(all===true){ + replacepile.checked=false; + gameDraw.checked=true; + turns.value='1'; + turnsresult.value='none'; + washes.value='1'; + washesresult.value='none'; + line6_t.innerHTML=''; + line6_b.innerHTML=''; + line6_d.innerHTML=''; + } + } - ui.create.div('.menubutton.large','确定',line9,style3,resetStatus); + ui.create.div('.menubutton.large','确定',line9,style3,resetStatus); - game.addSceneClear=function(){ - resetCharacter(); - resetStatus(true); - scenename.value=''; - sceneintro.value=''; - line7.innerHTML=''; - delete _status.currentScene; - }; - game.loadScene=function(scene){ - resetCharacter(); - resetStatus(true); - scenename.value=scene.name; - sceneintro.value=scene.intro; - _status.currentScene=scene.name; - line7.innerHTML=''; - if(scene.replacepile) replacepile.checked=true; - if(scene.gameDraw) gameDraw.checked=true; - else gameDraw.checked=false; - if(scene.turns){ - turns.value=scene.turns[0].toString(); - turnsresult.value=scene.turns[1]; - } - if(scene.washes){ - washes.value=scene.washes[0].toString(); - washesresult.value=scene.washes[1]; - } - for(var i=0;istage.level){ - node.classList.add('unselectable'); - } - } - if(lib.storage.lastStage==i&&!node.classList.contains('unselectable')){ - node.classList.add('active'); - noactive=false; - } - else if(lib.storage.lastStage==undefined&&noactive&&!node.classList.contains('unselectable')){ - node.classList.add('active'); - noactive=false; - } - } - } - }, - }, - showcase:function(init){ - if(_status.sceneChanged){ - init=true; - this.innerHTML=''; - delete _status.sceneChanged; - } - if(init){ - this.style.transition='all 0s'; - this.style.height=(this.offsetHeight-10)+'px'; - this.style.overflow='scroll'; - lib.setScroll(this); - var style2={position:'relative',display:'block',left:0,top:0,marginBottom:'6px',padding:0,width:'100%'}; - var style3={marginLeft:'4px',marginRight:'4px',position:'relative'} + for(var i=0;istage.level){ + node.classList.add('unselectable'); + } + } + if(lib.storage.lastStage==i&&!node.classList.contains('unselectable')){ + node.classList.add('active'); + noactive=false; + } + else if(lib.storage.lastStage==undefined&&noactive&&!node.classList.contains('unselectable')){ + node.classList.add('active'); + noactive=false; + } + } + } + }, + }, + showcase:function(init){ + if(_status.sceneChanged){ + init=true; + this.innerHTML=''; + delete _status.sceneChanged; + } + if(init){ + this.style.transition='all 0s'; + this.style.height=(this.offsetHeight-10)+'px'; + this.style.overflow='scroll'; + lib.setScroll(this); + var style2={position:'relative',display:'block',left:0,top:0,marginBottom:'6px',padding:0,width:'100%'}; + var style3={marginLeft:'4px',marginRight:'4px',position:'relative'} - var scenename=ui.create.node('input',ui.create.div(style2,'','关卡名称:',this),{width:'120px'}); - scenename.type='text'; - scenename.style.marginTop='20px'; - var sceneintro=ui.create.node('input',ui.create.div(style2,'','关卡描述:',this),{width:'120px'}); - sceneintro.type='text'; - sceneintro.style.marginBottom='10px'; + var scenename=ui.create.node('input',ui.create.div(style2,'','关卡名称:',this),{width:'120px'}); + scenename.type='text'; + scenename.style.marginTop='20px'; + var sceneintro=ui.create.node('input',ui.create.div(style2,'','关卡描述:',this),{width:'120px'}); + sceneintro.type='text'; + sceneintro.style.marginBottom='10px'; - var line1=ui.create.div(style2,this); - var line2=ui.create.div(style2,this); - line1.style.marginBottom='10px'; - line2.style.lineHeight='50px'; - var scenes=[]; - for(var i in lib.storage.scene){ - scenes.push([i,i]); - } - if(!scenes.length){ - alert('请创建至少1个场景'); - return; - } - var scenelist=ui.create.selectlist(scenes,null,line1); - var e1=function(){ - if(this.nextSibling){ - this.parentNode.insertBefore(this,this.nextSibling.nextSibling); - } - } - var e2=function(){ - var that=this; - this.movetimeout=setTimeout(function(){ - e1.call(that); - },500); - } - var e3=function(){ - clearTimeout(this.movetimeout); - delete this.movetimeout; - } - var e4=function(value){ - var node=ui.create.div('.menubutton.large',value,line2,style3,function(){ - if(confirm('是否移除'+this.innerHTML+'?')){ - this.remove(); - } - }); - if(lib.config.touchscreen){ - node.ontouchstart=e2; - node.ontouchend=e3; - node.ontouchmove=e3; - } - else{ - node.oncontextmenu=e1; - node.onmousedown=e2; - node.onmouseup=e3; - node.onmouseleave=e3; - } - } - var addButton=ui.create.node('button','添加场景',line1,function(){ - e4(scenelist.value); - },{marginLeft:'6px',marginRight:'12px'}); - var sceneconfig=ui.create.selectlist([ - ['normal','默认模式'], - ['sequal','连续闯关'], - ['free','自由选关'] - ],null,line1); - var saveButton=ui.create.node('button','保存关卡',line1,function(){ - if(!scenename.value){ - alert('请填写关卡名称'); - return; - } - if(line2.childElementCount<2){ - alert('请添加至少2个场景'); - return; - } - var stage={ - name:scenename.value, - intro:sceneintro.value, - scenes:[], - mode:sceneconfig.value, - level:0 - }; - for(var i=0;i.player'+pos+ - '{left:'+(14+i*148)+'px;top:'+(14+j*148)+'px}',0); - ui.chesssheet.sheet.insertRule('#arena.chess #chess>.card'+pos+ - '{left:'+(22+i*148)+'px;top:'+(22+j*148)+'px}',0); - ui.chesssheet.sheet.insertRule('#arena.chess #chess>.popup'+pos+ - '{left:'+(19+i*148)+'px;top:'+(142+j*148)+'px}',0); - } - } + for(var i=0;i.player'+pos+ + '{left:'+(14+i*148)+'px;top:'+(14+j*148)+'px}',0); + ui.chesssheet.sheet.insertRule('#arena.chess #chess>.card'+pos+ + '{left:'+(22+i*148)+'px;top:'+(22+j*148)+'px}',0); + ui.chesssheet.sheet.insertRule('#arena.chess #chess>.popup'+pos+ + '{left:'+(19+i*148)+'px;top:'+(142+j*148)+'px}',0); + } + } - var grids=[]; - var gridnum=ui.chessheight*ui.chesswidth; - for(var i=0;i0){ - var ng=Math.floor(gridnum*nco); - for(var i=0;i0){ + var ng=Math.floor(gridnum*nco); + for(var i=0;i_status.enemyDied){ - game.forceOver(false); - } - else{ - game.forceOver(); - } - }); - ui.finishGame.classList.add('finish_game'); - ui.finishGame.parentNode.insertBefore(finishGameBr,ui.finishGame); - } + return uiintro; + } + }); + } + } + if(!event.video&&_status.mode=='combat'&&!get.config('single_control')&&!_status.boss){ + ui.single_swap=ui.create.system('换人',function(){ + var bool=false; + for(var i=0;i_status.enemyDied){ + game.forceOver(false); + } + else{ + game.forceOver(); + } + }); + ui.finishGame.classList.add('finish_game'); + ui.finishGame.parentNode.insertBefore(finishGameBr,ui.finishGame); + } - ui.create.me(); - ui.create.fakeme(); + ui.create.me(); + ui.create.fakeme(); - if(!event.video&&((_status.mode=='combat'&&get.config('zhu')&&!_status.vsboss&&game.players.length>2)||_status.mode=='three')){ - game.friendZhu=event.friendZhu; - game.friendZhu.hp++; - game.friendZhu.maxHp++; - game.friendZhu.update(); - game.friendZhu.node.identity.firstChild.innerHTML='将'; + if(!event.video&&((_status.mode=='combat'&&get.config('zhu')&&!_status.vsboss&&game.players.length>2)||_status.mode=='three')){ + game.friendZhu=event.friendZhu; + game.friendZhu.hp++; + game.friendZhu.maxHp++; + game.friendZhu.update(); + game.friendZhu.node.identity.firstChild.innerHTML='将'; - for(var i=0;i=ui.chesswidth){ - x=ui.chesswidth-1; - } - if(y>=ui.chessheight){ - y=ui.chessheight-1; - } + event.trigger('gameStart'); + game.gameDraw(p); + game.me.classList.add('current_action'); + if(_status.mode=='three'){ + game.phaseLoopThree(_status.color?game.enemyZhu:game.friendZhu); + } + else if(_status.mode=='leader'){ + game.phaseLoopOrdered(p); + } + else if(get.config('seat_order')=='指定'){ + game.phaseLoopOrdered(p); + } + else{ + game.phaseLoop(p); + } + game.setChessInfo(p); + }, + element:{ + card:{ + moveTo:function(player,method){ + this.fixed=true; + if(this.parentNode==ui.arena){ + var rect=player.getBoundingClientRect(); + this.style.left=(rect.left+8)+'px'; + this.style.top=(rect.top+8)+'px'; + } + else{ + this.style.left=''; + this.style.top=''; + this.dataset.position=player.dataset.position; + } + if(method=='flip'){ + this.style.transition='all 0.5s'; + this.style.transform='rotate'+(Math.random()<0.5?'X':'Y')+'(180deg) perspective(1000px)'; + } + else if(method=='rotate'){ + this.style.transition='all 0.5s'; + this.style.transform='rotate(180deg)'; + } + else{ + this.style.transition='all 0.5s'; + this.style.transform=''; + } + return this; + }, + }, + player:{ + createRangeShadow:function(num,move){ + num++; + var shadows=this.parentNode.getElementsByClassName('playergrid'); + while(shadows.length){ + shadows[0].remove(); + } + var grids=[]; + for(var i=1-num;i=ui.chesswidth){ + x=ui.chesswidth-1; + } + if(y>=ui.chessheight){ + y=ui.chessheight-1; + } - var pos=y*ui.chesswidth+x; - if(!lib.posmap[pos]){ - delete lib.posmap[this.dataset.position]; - this.dataset.position=pos; - lib.posmap[pos]=this; - this.chessFocus(); - } + var pos=y*ui.chesswidth+x; + if(!lib.posmap[pos]){ + delete lib.posmap[this.dataset.position]; + this.dataset.position=pos; + lib.posmap[pos]=this; + this.chessFocus(); + } - if(get.mode()=='tafang'&&!_status.video){ - if(_status.tafangend.contains(this.dataset.position)){ - if(_status.enemies.contains(this)){ - game.over(false); - } - else{ - this.delete(); - delete lib.posmap[this]; - game.players.remove(this); - _status.friends.remove(this); - this.classList.add('dead'); - if(_status.roundStart==this){ - _status.roundStart=player.next||player.getNext()||game.players[0]; - } - if(this==game.me){ - if(ui.confirm){ - ui.confirm.close(); - } - if(_status.friends.length==0){ - ui.fakeme.hide(); - this.node.handcards1.delete(); - this.node.handcards2.delete(); - game.me=ui.create.player(); - game.me.side=false; - game.addVideo('removeTafangPlayer'); - } - else{ - game.modeSwapPlayer(_status.friends[0]); - } - } - for(var i=0;i0&&this.movable(1,0)) return true; - if(dy<0&&this.movable(0,-1)) return true; - if(dy>0&&this.movable(0,1)) return true; - return false; - }, - moveTowards:function(target,forbid){ - var fxy=this.getXY(); - var txy; - if(Array.isArray(target)){ - txy=target; - } - else if(typeof target=='string'){ - var pos=parseInt(target); - txy=[pos%ui.chesswidth,Math.floor(pos/ui.chesswidth)]; - } - else{ - txy=target.getXY(); - } - var dx=txy[0]-fxy[0]; - var dy=txy[1]-fxy[1]; - forbid=forbid||[]; - if(Math.abs(dx)>Math.abs(dy)){ - if(dx<0){ - if(!forbid.contains('moveLeft')&&this.movable(-1,0)){ - this.moveLeft(); - return 'moveLeft'; - } - } - else if(dx>0){ - if(!forbid.contains('moveRight')&&this.movable(1,0)){ - this.moveRight(); - return 'moveRight'; - } - } - if(dy<0){ - if(!forbid.contains('moveUp')&&this.movable(0,-1)){ - this.moveUp(); - return 'moveUp'; - } - } - else if(dy>0){ - if(!forbid.contains('moveDown')&&this.movable(0,1)){ - this.moveDown(); - return 'moveDown'; - } - } - } - else{ - if(dy<0){ - if(!forbid.contains('moveUp')&&this.movable(0,-1)){ - this.moveUp(); - return 'moveUp'; - } - } - else if(dy>0){ - if(!forbid.contains('moveDown')&&this.movable(0,1)){ - this.moveDown(); - return 'moveDown'; - } - } - if(dx<0){ - if(!forbid.contains('moveLeft')&&this.movable(-1,0)){ - this.moveLeft(); - return 'moveLeft'; - } - } - else if(dx>0){ - if(!forbid.contains('moveRight')&&this.movable(1,0)){ - this.moveRight(); - return 'moveRight'; - } - } - } - return false; - }, - chessFocus:function(){ - game.addVideo('chessFocus',this); - if(ui.chess._chessdrag) return; - if(_status.chessscrolling) return; - var player=this; - var dx=0,dy=0; + if(get.mode()=='tafang'&&!_status.video){ + if(_status.tafangend.contains(this.dataset.position)){ + if(_status.enemies.contains(this)){ + game.over(false); + } + else{ + this.delete(); + delete lib.posmap[this]; + game.players.remove(this); + _status.friends.remove(this); + this.classList.add('dead'); + if(_status.roundStart==this){ + _status.roundStart=player.next||player.getNext()||game.players[0]; + } + if(this==game.me){ + if(ui.confirm){ + ui.confirm.close(); + } + if(_status.friends.length==0){ + ui.fakeme.hide(); + this.node.handcards1.delete(); + this.node.handcards2.delete(); + game.me=ui.create.player(); + game.me.side=false; + game.addVideo('removeTafangPlayer'); + } + else{ + game.modeSwapPlayer(_status.friends[0]); + } + } + for(var i=0;i0&&this.movable(1,0)) return true; + if(dy<0&&this.movable(0,-1)) return true; + if(dy>0&&this.movable(0,1)) return true; + return false; + }, + moveTowards:function(target,forbid){ + var fxy=this.getXY(); + var txy; + if(Array.isArray(target)){ + txy=target; + } + else if(typeof target=='string'){ + var pos=parseInt(target); + txy=[pos%ui.chesswidth,Math.floor(pos/ui.chesswidth)]; + } + else{ + txy=target.getXY(); + } + var dx=txy[0]-fxy[0]; + var dy=txy[1]-fxy[1]; + forbid=forbid||[]; + if(Math.abs(dx)>Math.abs(dy)){ + if(dx<0){ + if(!forbid.contains('moveLeft')&&this.movable(-1,0)){ + this.moveLeft(); + return 'moveLeft'; + } + } + else if(dx>0){ + if(!forbid.contains('moveRight')&&this.movable(1,0)){ + this.moveRight(); + return 'moveRight'; + } + } + if(dy<0){ + if(!forbid.contains('moveUp')&&this.movable(0,-1)){ + this.moveUp(); + return 'moveUp'; + } + } + else if(dy>0){ + if(!forbid.contains('moveDown')&&this.movable(0,1)){ + this.moveDown(); + return 'moveDown'; + } + } + } + else{ + if(dy<0){ + if(!forbid.contains('moveUp')&&this.movable(0,-1)){ + this.moveUp(); + return 'moveUp'; + } + } + else if(dy>0){ + if(!forbid.contains('moveDown')&&this.movable(0,1)){ + this.moveDown(); + return 'moveDown'; + } + } + if(dx<0){ + if(!forbid.contains('moveLeft')&&this.movable(-1,0)){ + this.moveLeft(); + return 'moveLeft'; + } + } + else if(dx>0){ + if(!forbid.contains('moveRight')&&this.movable(1,0)){ + this.moveRight(); + return 'moveRight'; + } + } + } + return false; + }, + chessFocus:function(){ + game.addVideo('chessFocus',this); + if(ui.chess._chessdrag) return; + if(_status.chessscrolling) return; + var player=this; + var dx=0,dy=0; - if(player.offsetLeft-ui.chessContainer.scrollLeft<14){ - dx=player.offsetLeft-ui.chessContainer.scrollLeft-14; - } - else if(player.offsetLeft-ui.chessContainer.scrollLeft>ui.chessContainer.offsetWidth-134){ - dx=player.offsetLeft-ui.chessContainer.scrollLeft-ui.chessContainer.offsetWidth+134; - } - if(player.offsetTop-ui.chessContainer.scrollTop<14){ - dy=player.offsetTop-ui.chessContainer.scrollTop-14; - } - else if(player.offsetTop+ui.chess.offsetTop-ui.chessContainer.scrollTop>ui.chessContainer.offsetHeight-134){ - dy=player.offsetTop+ui.chess.offsetTop-ui.chessContainer.scrollTop-ui.chessContainer.offsetHeight+134; - } - if(_status.currentChessFocus){ - clearInterval(_status.currentChessFocus); - } - var count=12; - var ddx=Math.floor(dx/12); - var ddy=Math.floor(dy/12); - if(dx||dy){ - _status.currentChessFocus=setInterval(function(){ - if(count--){ - ui.chessContainer.scrollLeft+=ddx; - ui.chessContainer.scrollTop+=ddy; - } - else{ - ui.chessContainer.scrollLeft+=dx%12; - ui.chessContainer.scrollTop+=dy%12; - clearInterval(_status.currentChessFocus); - delete _status.currentChessFocus; - } - },16); - } - }, - getXY:function(){ - var pos=parseInt(this.dataset.position); - var x=pos%ui.chesswidth; - var y=Math.floor(pos/ui.chesswidth); - return [x,y]; - }, - getDataPos:function(x,y){ - var xy=this.getXY(); - if(typeof x!='number') x=0; - if(typeof y!='number') y=0; - x+=xy[0]; - y+=xy[1]; - return x+y*ui.chesswidth; - }, - getNeighbour:function(x,y){ - var xy=this.getXY(); - if(xy[0]+x<0) return null; - if(xy[1]+y<0) return null; - if(xy[0]+x>=ui.chesswidth) return null; - if(xy[1]+y>=ui.chessheight) return null; - return lib.posmap[this.getDataPos(x,y)]||null; - }, - getNeighbours:function(){ - var players=[]; - for(var i=0;i=ui.chesswidth) return false; - if(xy[1]+y>=ui.chessheight) return false; - return !this.getNeighbour(x,y); - }, - moveRight:function(){ - if(this.movable(1,0)){ - this.move(1,0); - return true; - } - return false; - }, - moveLeft:function(){ - if(this.movable(-1,0)){ - this.move(-1,0); - return true; - } - return false; - }, - moveUp:function(){ - if(this.movable(0,-1)){ - this.move(0,-1); - return true; - } - return false; - }, - moveDown:function(){ - if(this.movable(0,1)){ - this.move(0,1); - return true; - } - return false; - }, - dieAfter:function(source){ - var player=this; - if(_status.friends){ - _status.friends.remove(this); - } - if(_status.enemies){ - _status.enemies.remove(this); - } - if(ui.friendDied&&player.side==game.me.side){ - ui.friendDied.innerHTML='阵亡: '+get.cnNumber(++_status.friendDied,true); - } - if(ui.enemyDied&&player.side!=game.me.side){ - ui.enemyDied.innerHTML='杀敌: '+get.cnNumber(++_status.enemyDied,true); - } - delete lib.posmap[player.dataset.position]; - setTimeout(function(){ - player.delete(); - },500); - for(var i=0;iui.chessContainer.offsetWidth-134){ + dx=player.offsetLeft-ui.chessContainer.scrollLeft-ui.chessContainer.offsetWidth+134; + } + if(player.offsetTop-ui.chessContainer.scrollTop<14){ + dy=player.offsetTop-ui.chessContainer.scrollTop-14; + } + else if(player.offsetTop+ui.chess.offsetTop-ui.chessContainer.scrollTop>ui.chessContainer.offsetHeight-134){ + dy=player.offsetTop+ui.chess.offsetTop-ui.chessContainer.scrollTop-ui.chessContainer.offsetHeight+134; + } + if(_status.currentChessFocus){ + clearInterval(_status.currentChessFocus); + } + var count=12; + var ddx=Math.floor(dx/12); + var ddy=Math.floor(dy/12); + if(dx||dy){ + _status.currentChessFocus=setInterval(function(){ + if(count--){ + ui.chessContainer.scrollLeft+=ddx; + ui.chessContainer.scrollTop+=ddy; + } + else{ + ui.chessContainer.scrollLeft+=dx%12; + ui.chessContainer.scrollTop+=dy%12; + clearInterval(_status.currentChessFocus); + delete _status.currentChessFocus; + } + },16); + } + }, + getXY:function(){ + var pos=parseInt(this.dataset.position); + var x=pos%ui.chesswidth; + var y=Math.floor(pos/ui.chesswidth); + return [x,y]; + }, + getDataPos:function(x,y){ + var xy=this.getXY(); + if(typeof x!='number') x=0; + if(typeof y!='number') y=0; + x+=xy[0]; + y+=xy[1]; + return x+y*ui.chesswidth; + }, + getNeighbour:function(x,y){ + var xy=this.getXY(); + if(xy[0]+x<0) return null; + if(xy[1]+y<0) return null; + if(xy[0]+x>=ui.chesswidth) return null; + if(xy[1]+y>=ui.chessheight) return null; + return lib.posmap[this.getDataPos(x,y)]||null; + }, + getNeighbours:function(){ + var players=[]; + for(var i=0;i=ui.chesswidth) return false; + if(xy[1]+y>=ui.chessheight) return false; + return !this.getNeighbour(x,y); + }, + moveRight:function(){ + if(this.movable(1,0)){ + this.move(1,0); + return true; + } + return false; + }, + moveLeft:function(){ + if(this.movable(-1,0)){ + this.move(-1,0); + return true; + } + return false; + }, + moveUp:function(){ + if(this.movable(0,-1)){ + this.move(0,-1); + return true; + } + return false; + }, + moveDown:function(){ + if(this.movable(0,1)){ + this.move(0,1); + return true; + } + return false; + }, + dieAfter:function(source){ + var player=this; + if(_status.friends){ + _status.friends.remove(this); + } + if(_status.enemies){ + _status.enemies.remove(this); + } + if(ui.friendDied&&player.side==game.me.side){ + ui.friendDied.innerHTML='阵亡: '+get.cnNumber(++_status.friendDied,true); + } + if(ui.enemyDied&&player.side!=game.me.side){ + ui.enemyDied.innerHTML='杀敌: '+get.cnNumber(++_status.enemyDied,true); + } + delete lib.posmap[player.dataset.position]; + setTimeout(function(){ + player.delete(); + },500); + for(var i=0;i1){ - if(cards){ - that.$gain(cards,null,false) - } - else{ - that.$gain(num-1,null,false) - } - } - }, - $throw:function(card,time,init){ - if(init!==false){ - if(get.itemtype(card)!='cards'){ - if(get.itemtype(card)=='card'){ - card=[card]; - } - else{ - return; - } - } - game.addVideo('throw',this,[get.cardsInfo(card),time]); - } - this.chessFocus(); - if(get.itemtype(card)=='cards'){ - for(var i=0;i=0){ - for(var i=0;i1){ + if(cards){ + that.$gain(cards,null,false) + } + else{ + that.$gain(num-1,null,false) + } + } + }, + $throw:function(card,time,init){ + if(init!==false){ + if(get.itemtype(card)!='cards'){ + if(get.itemtype(card)=='card'){ + card=[card]; + } + else{ + return; + } + } + game.addVideo('throw',this,[get.cardsInfo(card),time]); + } + this.chessFocus(); + if(get.itemtype(card)=='cards'){ + for(var i=0;i=0){ + for(var i=0;i=ui.chessContainer.offsetHeight){ - amin=0; - amax=90; - } - else{ - amin=-90; - amax=90; - } - } - else if(rect.left+rect.width+80>=ui.chessContainer.offsetWidth){ - if(rect.top<=80){ - amin=180; - amax=270; - } - else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){ - amin=90; - amax=180; - } - else{ - amin=90; - amax=270; - } - } - else if(rect.top<=80){ - amin=180; - amax=360; - } - else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){ - amin=0; - amax=180; - } - else{ - var dx=ui.chessContainer.offsetWidth/2-(rect.left+rect.width/2); - var dy=-ui.chessContainer.offsetHeight/2+(rect.top+rect.height/2); - var ang=Math.abs(Math.atan(dy/dx))*180/Math.PI; - if(dx<0){ - if(dy>0){ - ang=180-ang; - } - else{ - ang+=180; - } - } - else if(dy<0){ - ang=360-ang; - } - amin=ang-180; - amax=ang+180; - } - var da=(amax-amin)/(thrown.length*2); - if(da>30&&thrown.length>1){ - amin+=(da-30)*thrown.length; - da=30; - } - for(var i=0;i=ui.chessContainer.offsetHeight){ + amin=0; + amax=90; + } + else{ + amin=-90; + amax=90; + } + } + else if(rect.left+rect.width+80>=ui.chessContainer.offsetWidth){ + if(rect.top<=80){ + amin=180; + amax=270; + } + else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){ + amin=90; + amax=180; + } + else{ + amin=90; + amax=270; + } + } + else if(rect.top<=80){ + amin=180; + amax=360; + } + else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){ + amin=0; + amax=180; + } + else{ + var dx=ui.chessContainer.offsetWidth/2-(rect.left+rect.width/2); + var dy=-ui.chessContainer.offsetHeight/2+(rect.top+rect.height/2); + var ang=Math.abs(Math.atan(dy/dx))*180/Math.PI; + if(dx<0){ + if(dy>0){ + ang=180-ang; + } + else{ + ang+=180; + } + } + else if(dy<0){ + ang=360-ang; + } + amin=ang-180; + amax=ang+180; + } + var da=(amax-amin)/(thrown.length*2); + if(da>30&&thrown.length>1){ + amin+=(da-30)*thrown.length; + da=30; + } + for(var i=0;i=ui.chesswidth){ - x=ui.chesswidth-1; - } - if(y>=ui.chessheight){ - y=ui.chessheight-1; - } + return player; + }, + replaceChessPlayer:function(name,enemy){ + var next=game.createEvent('replaceChessPlayer'); + next.playername=name; + next.enemy=enemy; + next.setContent('replaceChessPlayer'); + }, + removeTreasure:function(player){ + game.addVideo('removeTreasure',null,player.dataset.position); + player.delete(); + delete lib.posmap[player.dataset.position]; + game.treasures.remove(player); + }, + addObstacle:function(x,y){ + if(y!==false){ + game.addVideo('addObstacle',null,[x,y]); + } + var pos; + if(typeof x=='string'){ + pos=x; + } + else{ + if(x>=ui.chesswidth){ + x=ui.chesswidth-1; + } + if(y>=ui.chessheight){ + y=ui.chessheight-1; + } - pos=y*ui.chesswidth+x; - } - if(!lib.posmap[pos]){ - var grid=ui.create.div('.player.minskin.obstacle',ui.chess).animate('start'); - grid.dataset.position=pos; - grid.listen(ui.click.obstacle); - lib.posmap[pos]=grid; - game.obstacles.push(grid); - } - }, - removeObstacle:function(pos){ - var node=lib.posmap[pos]; - if(node&&game.obstacles.contains(node)){ - game.addVideo('removeObstacle',null,pos); - game.obstacles.remove(node); - delete lib.posmap[pos]; - node.delete(); - } - }, - addOverDialog:function(dialog,result){ - if(ui.finishGame){ - ui.finishGame.remove(); - } - dialog.classList.add('center'); - if(_status.mode!='leader') return; - if(result=='战斗胜利'){ - _status.victory=true; - if(!_status.enterArena){ - var div=ui.create.div(); - div.innerHTML='获得'+game.reward+'金'; - dialog.add(div); - if(_status.challenge&&_status.challengeMoney<=game.data.dust){ - var div2=ui.create.div(); - div2.style.display='block'; - div2.innerHTML='招降所需招募令:'+_status.challengeMoney+'/'+game.data.dust; - dialog.add(div2); - } - game.changeMoney(game.reward); - game.saveData(); - } - } - else if(_status.zhaoxiang){ - var div=ui.create.div(); - div.innerHTML='招降'+get.translation(_status.zhaoxiang)+'成功'; - dialog.add(div); - } - }, - controlOver:function(){ - if(_status.mode=='three'){ - ui.create.control('再战',function(){ - game.saveConfig('continue_name_chess',{ - friend:_status.friendBackup, - enemy:_status.enemyBackup, - color:_status.color - }); - game.saveConfig('mode',lib.config.mode); - localStorage.setItem(lib.configprefix+'directstart',true); - game.reload(); - }); - } - ui.create.control('返回',game.reload); - if(_status.mode!='leader') return; - if(_status.enterArena){ - game.data.arena.acted.length=0; - if(_status.victory){ - game.data.arena.win++; - for(var i=0;i=money){ - ui.create.control('招降'+get.translation(_status.challenge),function(){ - game.data.character.add(_status.challenge); - game.data.challenge=game.getLeaderList(); - game.changeDust(-money); - game.reload(); - }); - } - } - } - }, - phaseLoopThree:function(player){ - var next=game.createEvent('phaseLoop'); - next.player=player; - next.swap=function(player){ - if(player.side==game.me.side){ - return game.enemyZhu; - } - else{ - return game.me; - } - }, - next.setContent(function(){ - 'step 0' - player.classList.add('acted'); - player.phase(); - 'step 1' - if(player!=game.friendZhu&&player!=game.enemyZhu){ - for(var i=0;inum1){ - if(next.side==game.me.side){ - next=game.me; - } - var str; - if(num2-num1>1){ - str='选择至多'+get.cnNumber(num2-num1)+'个已方角色各摸一张牌' - } - else{ - str='选择一个已方角色摸一张牌' - } - var nevt=next.chooseTarget(str,function(card,player,target){ - return target.side==next.side; - },[1,num2-num1]); - nevt.ai=function(target){ - return Math.max(1,10-target.countCards('h')); - }; - nevt.includeOut=true; - nevt.chessForceAll=true; - } - else{ - game.delay(); - event.goto(2); - } - } - else{ - event.goto(2); - } - "step 1" - if(result.bool){ - game.asyncDraw(result.targets); - } - "step 2" - if(player.side==game.me.side){ - player=game.me; - } - if(player.isDead()){ - for(var i=0;i1){ - var nevt=player.chooseTarget('选择下一个行动的角色',function(card,player,target){ - return target.side==player.side&&!target.classList.contains('acted'); - },true); - nevt.chessForceAll=true; - nevt.includeOut=true; - nevt.ai=function(target){ - var nj=target.countCards('j'); - if(nj){ - return -nj; - } - return Math.max(0,10-target.hp); - } - } - else if(players.length){ - event.decided=players[0]; - } - else{ - event.player=game.findPlayer(function(current){ - return current.side!=player.side; - }); - event.goto(0); - } - "step 3" - if(event.decided){ - event.decided.phase(); - event.justacted=event.decided; - delete event.decided; - } - else{ - var current=result.targets[0]; - current.phase(); - event.justacted=current; - } - "step 4" - event.justacted.classList.add('acted'); - event.goto(0); - for(var i=0;i=money){ + ui.create.control('招降'+get.translation(_status.challenge),function(){ + game.data.character.add(_status.challenge); + game.data.challenge=game.getLeaderList(); + game.changeDust(-money); + game.reload(); + }); + } + } + } + }, + phaseLoopThree:function(player){ + var next=game.createEvent('phaseLoop'); + next.player=player; + next.swap=function(player){ + if(player.side==game.me.side){ + return game.enemyZhu; + } + else{ + return game.me; + } + }, + next.setContent(function(){ + 'step 0' + player.classList.add('acted'); + player.phase(); + 'step 1' + if(player!=game.friendZhu&&player!=game.enemyZhu){ + for(var i=0;inum1){ + if(next.side==game.me.side){ + next=game.me; + } + var str; + if(num2-num1>1){ + str='选择至多'+get.cnNumber(num2-num1)+'个已方角色各摸一张牌' + } + else{ + str='选择一个已方角色摸一张牌' + } + var nevt=next.chooseTarget(str,function(card,player,target){ + return target.side==next.side; + },[1,num2-num1]); + nevt.ai=function(target){ + return Math.max(1,10-target.countCards('h')); + }; + nevt.includeOut=true; + nevt.chessForceAll=true; + } + else{ + game.delay(); + event.goto(2); + } + } + else{ + event.goto(2); + } + "step 1" + if(result.bool){ + game.asyncDraw(result.targets); + } + "step 2" + if(player.side==game.me.side){ + player=game.me; + } + if(player.isDead()){ + for(var i=0;i1){ + var nevt=player.chooseTarget('选择下一个行动的角色',function(card,player,target){ + return target.side==player.side&&!target.classList.contains('acted'); + },true); + nevt.chessForceAll=true; + nevt.includeOut=true; + nevt.ai=function(target){ + var nj=target.countCards('j'); + if(nj){ + return -nj; + } + return Math.max(0,10-target.hp); + } + } + else if(players.length){ + event.decided=players[0]; + } + else{ + event.player=game.findPlayer(function(current){ + return current.side!=player.side; + }); + event.goto(0); + } + "step 3" + if(event.decided){ + event.decided.phase(); + event.justacted=event.decided; + delete event.decided; + } + else{ + var current=result.targets[0]; + current.phase(); + event.justacted=current; + } + "step 4" + event.justacted.classList.add('acted'); + event.goto(0); + for(var i=0;i'+game.data.money+'金币'); - uiintro.addText('通过战斗或竞技场可获得金币。花费100金币可招募3名随机武将;花费150金币可参加一次竞技场'); - uiintro.add(''+game.data.dust+'招募令'); - uiintro.addText('通过遣返武将或竞技场可获得招募令。挑战武将成功后可通过招募令招募该武将,普通/稀有/史诗/传说武将分别花费40/100/400/1600招募令'); - }); - ui.money.innerHTML=''+game.data.dust+''+ - ''+game.data.money+''; - ui.money.style.top='auto'; - ui.money.style.left='auto'; - ui.money.style.right='20px'; - ui.money.style.bottom='15px'; - ui.money.childNodes[0].style.color='rgb(111, 198, 255)'; - ui.money.childNodes[1].style.fontFamily='huangcao'; - ui.money.childNodes[1].style.marginRight='10px'; - ui.money.childNodes[2].style.color='#FFE600'; - ui.money.childNodes[3].style.fontFamily='huangcao'; - ui.money.style.letterSpacing='4px'; - for(var i in lib.rank){ - if(Array.isArray(lib.rank[i])){ - for(var j=0;j'+game.data.money+'金币'); + uiintro.addText('通过战斗或竞技场可获得金币。花费100金币可招募3名随机武将;花费150金币可参加一次竞技场'); + uiintro.add(''+game.data.dust+'招募令'); + uiintro.addText('通过遣返武将或竞技场可获得招募令。挑战武将成功后可通过招募令招募该武将,普通/稀有/史诗/传说武将分别花费40/100/400/1600招募令'); + }); + ui.money.innerHTML=''+game.data.dust+''+ + ''+game.data.money+''; + ui.money.style.top='auto'; + ui.money.style.left='auto'; + ui.money.style.right='20px'; + ui.money.style.bottom='15px'; + ui.money.childNodes[0].style.color='rgb(111, 198, 255)'; + ui.money.childNodes[1].style.fontFamily='huangcao'; + ui.money.childNodes[1].style.marginRight='10px'; + ui.money.childNodes[2].style.color='#FFE600'; + ui.money.childNodes[3].style.fontFamily='huangcao'; + ui.money.style.letterSpacing='4px'; + for(var i in lib.rank){ + if(Array.isArray(lib.rank[i])){ + for(var j=0;jb?1:-1; - } - return aa>bb?1:-1; - }); - if(game.data.character.length==0||!game.data.challenge){ - game.data.character=lib.rank.rarity.common.randomGets(3); - game.data.challenge=game.getLeaderList(); - game.saveData(); - } - var fixButton=function(button){ - var rarity=game.getRarity(button.link); - if(rarity!='common'){ - var intro=button.node.intro; - intro.classList.add('showintro'); - intro.style.fontFamily='huangcao'; - intro.style.fontSize='20px'; - intro.style.top='82px'; - intro.style.left='2px'; - switch(rarity){ - case 'rare':intro.dataset.nature='waterm';break; - case 'epic':intro.dataset.nature='thunderm';break; - case 'legend':intro.dataset.nature='metalm';break; - } - intro.innerHTML=get.translation(rarity); - } - } - game.leaderLord=['leader_caocao','leader_liubei','leader_sunquan']; - var dialog1=ui.create.dialog('选择君主','hidden'); - event.dialog1=dialog1; - dialog1.classList.add('fullheight'); - dialog1.classList.add('halfleft'); - dialog1.classList.add('fixed'); - dialog1.classList.add('pointerbutton'); - dialog1.add([game.leaderLord,'character']); - var i; - for(i=0;ib?1:-1; - }); - captnode.innerHTML=''; - for(i=0;ib?1:-1; + } + return aa>bb?1:-1; + }); + if(game.data.character.length==0||!game.data.challenge){ + game.data.character=lib.rank.rarity.common.randomGets(3); + game.data.challenge=game.getLeaderList(); + game.saveData(); + } + var fixButton=function(button){ + var rarity=game.getRarity(button.link); + if(rarity!='common'){ + var intro=button.node.intro; + intro.classList.add('showintro'); + intro.style.fontFamily='huangcao'; + intro.style.fontSize='20px'; + intro.style.top='82px'; + intro.style.left='2px'; + switch(rarity){ + case 'rare':intro.dataset.nature='waterm';break; + case 'epic':intro.dataset.nature='thunderm';break; + case 'legend':intro.dataset.nature='metalm';break; + } + intro.innerHTML=get.translation(rarity); + } + } + game.leaderLord=['leader_caocao','leader_liubei','leader_sunquan']; + var dialog1=ui.create.dialog('选择君主','hidden'); + event.dialog1=dialog1; + dialog1.classList.add('fullheight'); + dialog1.classList.add('halfleft'); + dialog1.classList.add('fixed'); + dialog1.classList.add('pointerbutton'); + dialog1.add([game.leaderLord,'character']); + var i; + for(i=0;ib?1:-1; + }); + captnode.innerHTML=''; + for(i=0;i3&&selected.character.length){ - event.removeCharacter.style.opacity=1; - } - if(game.data.money<150&&!game.data._arena){ - event.enterArena.style.opacity=0.5; - } - else{ - event.enterArena.style.opacity=1; - } - if(game.data.money<100){ - event.addCharacter.style.opacity=0.5; - } - else{ - event.addCharacter.style.opacity=1; - } - initcapt(); - },200); - },200); - },500); - }; - event.addCharacter=ui.create.control('招募','nozoom',zhaomu2); - if(game.data.money<150&&!game.data._arena){ - event.enterArena.style.opacity=0.5; - } - if(game.data.money<100){ - event.addCharacter.style.opacity=0.5; - } - var qianfan=function(){ - if(_status.kaibao) return; - if(game.data.character.length<=3) return; - if(!selected.character.length) return; - // _status.chessclicked=true; - // _status.qianfan=true; - // event.enterArena.style.opacity=0.5; - // event.addCharacter.style.opacity=0.5; - // event.fight.style.opacity=0.5; - var current=selected.character.slice(0); - clearSelected(); - var maxq=game.data.character.length-3; - if(current.length<=maxq){ - for(var i=0;i=100){ - event.addCharacter.style.opacity=1; - } - if(game.data.money>=150){ - event.enterArena.style.opacity=1; - } - node.delete(); - dialog1.buttons.remove(node); - } - initcapt(); - } - }; - event.removeCharacter=ui.create.control('遣返','nozoom',qianfan); - event.removeCharacter.style.opacity=0.5; - event.fight=ui.create.control('开始战斗','nozoom',function(){ - if(_status.kaibao||_status.qianfan) return; - if(selected.challenge.length){ - var cname=selected.challenge[0].link; - var rarity=game.getRarity(cname); - switch(rarity){ - case 'common':rarity=40;break; - case 'rare':rarity=100;break; - case 'epic':rarity=400;break; - case 'legend':rarity=1600;break; - } - if(!confirm('即将挑战'+get.translation(cname)+',战斗胜利后可消耗'+rarity+'招募令招募该武将,无论是否招募,挑战列表将被刷新。是否继续?')){ - return; - } - } - _status.enemylist=[]; - _status.mylist=[]; - if(selected.lord.length){ - _status.mylist.push(selected.lord[0].link); - _status.lord=selected.lord[0].link; - } - if(selected.character.length){ - for(var i=0;i0){ - switch(difficulty){ - case 'leader_easy':reward+=10*numdel;break; - case 'leader_medium':reward+=20*numdel;break; - case 'leader_hard':reward+=40*numdel;break; - } - } - var punish=0; - for(var i=0;i<_status.mylist.length;i++){ - switch(get.rank(_status.mylist[i])){ - case 's':punish+=25;break; - case 'ap':punish+=20;break; - case 'a':punish+=16;break; - case 'am':punish+=12;break; - case 'bp':punish+=9;break; - case 'b':punish+=7;break; - case 'bm':punish+=5;break; - case 'c':punish+=3;break; - case 'd':punish+=2;break; - } - } - if(numdel<0){ - switch(difficulty){ - case 'leader_easy':punish-=5*numdel;break; - case 'leader_medium':punish-=10*numdel;break; - case 'leader_hard':punish-=20*numdel;break; - } - } - game.reward=Math.max(3*_status.enemylist.length,reward-punish); - if(!_status.lord){ - switch(difficulty){ - case 'leader_easy':game.reward+=10;break; - case 'leader_medium':game.reward+=20;break; - case 'leader_hard':game.reward+=40;break; - } - } - game.resume(); - }); - event.custom.replace.button=function(button){ - if(_status.kaibao) return; - if(button.classList.contains('unselectable')&& - !button.classList.contains('selected')) return; - _status.chessclicked=true; - button.classList.toggle('selected'); - if(button.classList.contains('selected')){ - selected[button.area].add(button); - } - else{ - selected[button.area].remove(button); - } - switch(button.area){ - case 'lord':{ - for(var i=0;i5)|| - (_status.qianfan&&selected.character.length>=maxq)){ - dialog1.buttons[i].classList.add('unselectable'); - } - else{ - dialog1.buttons[i].classList.remove('unselectable'); - } - } - } - break; - } - case 'difficulty':case 'number':{ - for(var i=0;i3){ - event.removeCharacter.style.opacity=1; - } - else{ - event.removeCharacter.style.opacity=0.5; - } - }; - event.custom.add.window=function(){ - if(!_status.kaibao){ - var glows=document.querySelectorAll('.button.glow2'); - for(var i=0;i=100){ - event.addCharacter.style.opacity=1; - } - else{ - event.addCharacter.style.opacity=0.5; - } - if(game.data.money>=150||game.data._arena){ - event.enterArena.style.opacity=1; - } - else{ - event.enterArena.style.opacity=0.5; - } - event.fight.style.opacity=1; - } - clearSelected(); - }; - lib.init.onfree(); - game.pause(); - 'step 2' - if(!game.data.arena){ - event.dialog1.close(); - event.dialog2.close(); - event.fight.close(); - event.enterArena.close(); - event.addCharacter.close(); - event.removeCharacter.close(); - } - ui.arena.classList.add('leaderhide'); - ui.money.hide(); - game.delay(); - 'step 3' - ui.arena.classList.remove('leaderhide'); - if(!_status.enterArena){ - ui.wuxie.show(); - ui.auto.show(); - ui.control.style.display='none'; - ui.control.style.top=''; - ui.control.style.transition=''; - event.finish(); - } - else{ - game.minskin=false; - event.arenanodes=[]; - event.arenachoice=[]; - event.arenachoicenodes=[]; - event.arrangeNodes=function(){ - var num=event.arenachoicenodes.length; - var width=num*75+(num-1)*8; - for(var i=0;i=3){ - for(var i=0;i3&&selected.character.length){ + event.removeCharacter.style.opacity=1; + } + if(game.data.money<150&&!game.data._arena){ + event.enterArena.style.opacity=0.5; + } + else{ + event.enterArena.style.opacity=1; + } + if(game.data.money<100){ + event.addCharacter.style.opacity=0.5; + } + else{ + event.addCharacter.style.opacity=1; + } + initcapt(); + },200); + },200); + },500); + }; + event.addCharacter=ui.create.control('招募','nozoom',zhaomu2); + if(game.data.money<150&&!game.data._arena){ + event.enterArena.style.opacity=0.5; + } + if(game.data.money<100){ + event.addCharacter.style.opacity=0.5; + } + var qianfan=function(){ + if(_status.kaibao) return; + if(game.data.character.length<=3) return; + if(!selected.character.length) return; + // _status.chessclicked=true; + // _status.qianfan=true; + // event.enterArena.style.opacity=0.5; + // event.addCharacter.style.opacity=0.5; + // event.fight.style.opacity=0.5; + var current=selected.character.slice(0); + clearSelected(); + var maxq=game.data.character.length-3; + if(current.length<=maxq){ + for(var i=0;i=100){ + event.addCharacter.style.opacity=1; + } + if(game.data.money>=150){ + event.enterArena.style.opacity=1; + } + node.delete(); + dialog1.buttons.remove(node); + } + initcapt(); + } + }; + event.removeCharacter=ui.create.control('遣返','nozoom',qianfan); + event.removeCharacter.style.opacity=0.5; + event.fight=ui.create.control('开始战斗','nozoom',function(){ + if(_status.kaibao||_status.qianfan) return; + if(selected.challenge.length){ + var cname=selected.challenge[0].link; + var rarity=game.getRarity(cname); + switch(rarity){ + case 'common':rarity=40;break; + case 'rare':rarity=100;break; + case 'epic':rarity=400;break; + case 'legend':rarity=1600;break; + } + if(!confirm('即将挑战'+get.translation(cname)+',战斗胜利后可消耗'+rarity+'招募令招募该武将,无论是否招募,挑战列表将被刷新。是否继续?')){ + return; + } + } + _status.enemylist=[]; + _status.mylist=[]; + if(selected.lord.length){ + _status.mylist.push(selected.lord[0].link); + _status.lord=selected.lord[0].link; + } + if(selected.character.length){ + for(var i=0;i0){ + switch(difficulty){ + case 'leader_easy':reward+=10*numdel;break; + case 'leader_medium':reward+=20*numdel;break; + case 'leader_hard':reward+=40*numdel;break; + } + } + var punish=0; + for(var i=0;i<_status.mylist.length;i++){ + switch(get.rank(_status.mylist[i])){ + case 's':punish+=25;break; + case 'ap':punish+=20;break; + case 'a':punish+=16;break; + case 'am':punish+=12;break; + case 'bp':punish+=9;break; + case 'b':punish+=7;break; + case 'bm':punish+=5;break; + case 'c':punish+=3;break; + case 'd':punish+=2;break; + } + } + if(numdel<0){ + switch(difficulty){ + case 'leader_easy':punish-=5*numdel;break; + case 'leader_medium':punish-=10*numdel;break; + case 'leader_hard':punish-=20*numdel;break; + } + } + game.reward=Math.max(3*_status.enemylist.length,reward-punish); + if(!_status.lord){ + switch(difficulty){ + case 'leader_easy':game.reward+=10;break; + case 'leader_medium':game.reward+=20;break; + case 'leader_hard':game.reward+=40;break; + } + } + game.resume(); + }); + event.custom.replace.button=function(button){ + if(_status.kaibao) return; + if(button.classList.contains('unselectable')&& + !button.classList.contains('selected')) return; + _status.chessclicked=true; + button.classList.toggle('selected'); + if(button.classList.contains('selected')){ + selected[button.area].add(button); + } + else{ + selected[button.area].remove(button); + } + switch(button.area){ + case 'lord':{ + for(var i=0;i5)|| + (_status.qianfan&&selected.character.length>=maxq)){ + dialog1.buttons[i].classList.add('unselectable'); + } + else{ + dialog1.buttons[i].classList.remove('unselectable'); + } + } + } + break; + } + case 'difficulty':case 'number':{ + for(var i=0;i3){ + event.removeCharacter.style.opacity=1; + } + else{ + event.removeCharacter.style.opacity=0.5; + } + }; + event.custom.add.window=function(){ + if(!_status.kaibao){ + var glows=document.querySelectorAll('.button.glow2'); + for(var i=0;i=100){ + event.addCharacter.style.opacity=1; + } + else{ + event.addCharacter.style.opacity=0.5; + } + if(game.data.money>=150||game.data._arena){ + event.enterArena.style.opacity=1; + } + else{ + event.enterArena.style.opacity=0.5; + } + event.fight.style.opacity=1; + } + clearSelected(); + }; + lib.init.onfree(); + game.pause(); + 'step 2' + if(!game.data.arena){ + event.dialog1.close(); + event.dialog2.close(); + event.fight.close(); + event.enterArena.close(); + event.addCharacter.close(); + event.removeCharacter.close(); + } + ui.arena.classList.add('leaderhide'); + ui.money.hide(); + game.delay(); + 'step 3' + ui.arena.classList.remove('leaderhide'); + if(!_status.enterArena){ + ui.wuxie.show(); + ui.auto.show(); + ui.control.style.display='none'; + ui.control.style.top=''; + ui.control.style.transition=''; + event.finish(); + } + else{ + game.minskin=false; + event.arenanodes=[]; + event.arenachoice=[]; + event.arenachoicenodes=[]; + event.arrangeNodes=function(){ + var num=event.arenachoicenodes.length; + var width=num*75+(num-1)*8; + for(var i=0;i=3){ + for(var i=0;i胜'; - victory.style.top='auto'; - victory.style.left='auto'; - victory.style.right='20px'; - victory.style.bottom='15px'; - victory.style.fontSize='30px' - victory.style.fontFamily='huangcao'; - victory.firstChild.style.marginRight='5px'; - ui.window.appendChild(victory); - ui.refresh(victory); - victory.show(); + var victory=ui.create.div().hide(); + victory.innerHTML=''+game.data.arena.win+'胜'; + victory.style.top='auto'; + victory.style.left='auto'; + victory.style.right='20px'; + victory.style.bottom='15px'; + victory.style.fontSize='30px' + victory.style.fontFamily='huangcao'; + victory.firstChild.style.marginRight='5px'; + ui.window.appendChild(victory); + ui.refresh(victory); + victory.show(); - event.checkPrize=function(){ - // event.kaibao=true; - event.prize=[]; - event.turnCard2=function(){ - if(this.turned) return; - _status.chessclicked=true; - this.turned=true; - var node=this; - setTimeout(function(){ - node.turned2=true; - },1000); - if(node.name=='chess_coin'||node.name=='chess_dust'){ - node.style.transition='all 0s'; - node.style.transform='none'; - node.style.overflow='visible'; - node.style.background='none'; - node.style.boxShadow='none'; - var div=ui.create.div(node); - div.style.transition='all 0s'; - if(node.name=='chess_coin'){ - div.innerHTML=''+node.num+''; - div.firstChild.style.color='rgb(255, 230, 0)'; - node.$coin(); - } - else{ - div.innerHTML=''+node.num+''; - div.firstChild.style.color='rgb(111, 198, 255)'; - div.firstChild.style.marginRight='3px'; - node.$dust(); - } - div.style.fontFamily='huangcao'; - div.style.fontSize='50px'; - div.style.top='40px'; - div.style.letterSpacing='8px'; - div.style.whiteSpace='nowrap'; - // div.dataset.nature='metal'; + event.checkPrize=function(){ + // event.kaibao=true; + event.prize=[]; + event.turnCard2=function(){ + if(this.turned) return; + _status.chessclicked=true; + this.turned=true; + var node=this; + setTimeout(function(){ + node.turned2=true; + },1000); + if(node.name=='chess_coin'||node.name=='chess_dust'){ + node.style.transition='all 0s'; + node.style.transform='none'; + node.style.overflow='visible'; + node.style.background='none'; + node.style.boxShadow='none'; + var div=ui.create.div(node); + div.style.transition='all 0s'; + if(node.name=='chess_coin'){ + div.innerHTML=''+node.num+''; + div.firstChild.style.color='rgb(255, 230, 0)'; + node.$coin(); + } + else{ + div.innerHTML=''+node.num+''; + div.firstChild.style.color='rgb(111, 198, 255)'; + div.firstChild.style.marginRight='3px'; + node.$dust(); + } + div.style.fontFamily='huangcao'; + div.style.fontSize='50px'; + div.style.top='40px'; + div.style.letterSpacing='8px'; + div.style.whiteSpace='nowrap'; + // div.dataset.nature='metal'; - return; - } - node.style.transition='all ease-in 0.3s'; - node.style.transform='perspective(1200px) rotateY(270deg) translateX(150px)'; - var onEnd=function(){ - node.init(node.name); - node.node.avatar.style.display=''; - if(node.rarity){ - node.node.intro.innerHTML=get.translation(node.rarity); - node.node.intro.classList.add('showintro'); - } - node.classList.add('playerflip'); - node.style.transform='none'; - node.style.transition=''; - if(lib.config.animation&&!lib.config.low_performance){ - setTimeout(function(){ - switch(game.getRarity(node.name)){ - case 'rare':node.$rare();break; - case 'epic':node.$epic();break; - case 'legend':node.$legend();break; - } - },150); - } - }; - node.listenTransition(onEnd); - }; - setTimeout(function(){ - nodes[0].delete(); - },400+Math.random()*300); - setTimeout(function(){ - nodes[1].delete(); - },400+Math.random()*300); - setTimeout(function(){ - nodes[2].delete(); - },400+Math.random()*300); - setTimeout(function(){ - nodes[3].delete(); - },400+Math.random()*300); - setTimeout(function(){ - nodes[4].delete(); - },400+Math.random()*300); - setTimeout(function(){ - nodes[5].delete(); - },400+Math.random()*300); - setTimeout(function(){ - nodes[6].delete(); - },400+Math.random()*300); - setTimeout(function(){ - nodes[7].delete(); - },400+Math.random()*300); - setTimeout(function(){ - nodes[8].delete(); - },400+Math.random()*300); - setTimeout(function(){ - var prize=new Array(6); - var map=[1,2,3,4,5]; - var ccount=3; - var win=game.data.arena.win; - var prizeValue; - switch(win){ - case 0:prizeValue=100;break; - case 1:prizeValue=120;break; - case 2:prizeValue=150;break; - case 3:prizeValue=190;break; - case 4:prizeValue=240;break; - case 5:prizeValue=300;break; - case 6:prizeValue=370;break; - case 7:prizeValue=450;break; - case 8:prizeValue=540;break; - case 9:prizeValue=640;break; - case 10:prizeValue=750;break; - case 11:prizeValue=870;break; - case 12:prizeValue=1000;break; - } - if(Math.random()<0.4){ - if(win>=3&&Math.random()<0.5){ - ccount=4; - prizeValue-=33; - } - else{ - ccount=2; - prizeValue+=33; - } - } - prizeValue-=100; - while(ccount--){ - prize[map.randomRemove()]=game.getLeaderCharacter(); - } - if(map.length){ - prizeValue/=map.length; - } - while(map.length){ - var val=Math.round((Math.random()*0.4+0.8)*prizeValue); - if(Math.random()<0.7){ - prize[map.shift()]=['chess_coin',Math.max(Math.ceil(Math.random()*5),val)]; - } - else{ - val=Math.round(val/3); - prize[map.shift()]=['chess_dust',Math.max(Math.ceil(Math.random()*3),val)]; - } - } - for(var i=1;i=3&&Math.random()<0.5){ + ccount=4; + prizeValue-=33; + } + else{ + ccount=2; + prizeValue+=33; + } + } + prizeValue-=100; + while(ccount--){ + prize[map.randomRemove()]=game.getLeaderCharacter(); + } + if(map.length){ + prizeValue/=map.length; + } + while(map.length){ + var val=Math.round((Math.random()*0.4+0.8)*prizeValue); + if(Math.random()<0.7){ + prize[map.shift()]=['chess_coin',Math.max(Math.ceil(Math.random()*5),val)]; + } + else{ + val=Math.round(val/3); + prize[map.shift()]=['chess_dust',Math.max(Math.ceil(Math.random()*3),val)]; + } + } + for(var i=1;i=4&&!bosses.childNodes[i].classList.contains('glow')){ - bosses.childNodes[i].classList.add('forbidden'); - } - else{ - bosses.childNodes[i].classList.remove('forbidden'); - } - } - if(num){ - if(!event.asboss){ - event.asboss=ui.create.control('应战',function(){ - _status.boss=true; - ui.click.ok(); - }); - } - } - else{ - if(event.asboss){ - event.asboss.close(); - delete event.asboss; - } - } - addToButton(); - }; + var clickedBoss=false; + var clickBoss=function(){ + clickedBoss=true; + var num=bosses.querySelectorAll('.glow').length; + if(this.classList.contains('glow')){ + this.classList.remove('glow'); + num--; + } + else{ + if(num<4){ + this.classList.add('glow'); + num++; + } + } + for(var i=0;i=4&&!bosses.childNodes[i].classList.contains('glow')){ + bosses.childNodes[i].classList.add('forbidden'); + } + else{ + bosses.childNodes[i].classList.remove('forbidden'); + } + } + if(num){ + if(!event.asboss){ + event.asboss=ui.create.control('应战',function(){ + _status.boss=true; + ui.click.ok(); + }); + } + } + else{ + if(event.asboss){ + event.asboss.close(); + delete event.asboss; + } + } + addToButton(); + }; - var clickedJiange=false; - var clickJiange=function(){ - clickedJiange=true; - if(this.classList.contains('glow2')){ - this.classList.remove('glow2'); - } - else{ - this.classList.add('glow2'); - } - addToButton(); - }; + var clickedJiange=false; + var clickJiange=function(){ + clickedJiange=true; + if(this.classList.contains('glow2')){ + this.classList.remove('glow2'); + } + else{ + this.classList.add('glow2'); + } + addToButton(); + }; - for(var i=0;inum){ - for(var i=num;inum){ + for(var i=num;i2) return false; - var xy1=event.source.getXY(); - var xy2=player.getXY(); - var dx=xy2[0]-xy1[0]; - var dy=xy2[1]-xy1[1]; - // if(dx*dy!=0) return false; - if(dx==0&&Math.abs(dy)==2){ - dy/=2; - } - if(dy==0&&Math.abs(dx)==2){ - dx/=2; - } - return player.movable(dx,dy); - }, - content:function(){ - var xy1=trigger.source.getXY(); - var xy2=player.getXY(); - var dx=xy2[0]-xy1[0]; - var dy=xy2[1]-xy1[1]; - if(dx==0&&Math.abs(dy)==2){ - dy/=2; - } - if(dy==0&&Math.abs(dx)==2){ - dx/=2; - } - if(player.movable(dx,dy)){ - player.move(dx,dy); - } - } - }, - dubiaoxianjing:{ - global:'dubiaoxianjing2' - }, - dubiaoxianjing2:{ - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - if(player.hp<=1) return false; - for(var i=0;i1) return false; - for(var i=0;inh) return false; - } - return true; - } - } - return false; - }, - content:function(){ - 'step 0' - var source=null; - for(var i=0;i3; - } - } - return false; - }, - content:function(){ - 'step 0' - var source=null; - for(var i=0;igame.data.arena.dead.length; - }, - direct:true, - delay:0, - preservecancel:true, - content:function(){ - "step 0" - var list=game.data.arena.arenachoice.slice(0); - for(var i=0;i

    ' - for(var i=0;i'+ - (skill.chance(targets[i],player)*100).toFixed(2)+'%
    '; - } - str+='

    ' - } - return str; - }, - chance:function(target,player){ - var chance; - var renyi=player.hasSkill('leader_renyi'); - switch(target.hp){ - case 1:chance=0.7;break; - case 2:chance=0.4;break; - default:chance=0.2;break; - } - switch(target.countCards('he')){ - case 0:break; - case 1:chance/=1.2;break; - case 2:chance/=1.4;break; - case 3:chance/=1.7;break; - default:chance/=2;break; - } - switch(game.getRarity(target.name)){ - case 'common':{ - if(renyi) chance*=2; - break; - } - case 'rare':{ - chance/=2; - if(renyi) chance*=2; - break; - } - case 'epic':{ - chance/=5; - if(renyi) chance*=1.5; - break; - } - case 'legend':{ - chance/=15; - if(renyi) chance*=1.2; - break; - } - } - return Math.min(1,chance); - }, - filter:function(){ - return game.data.dust>=10; - }, - filterTarget:function(card,player,target){ - return game.isChessNeighbour(player,target)&&!game.data.character.contains(target.name); - }, - content:function(){ - var chance=lib.skill.leader_zhaoxiang.chance(target,player); - game.changeDust(-10); - if(Math.random()0; - }, - content:function(){ - switch(_status.difficulty){ - case 'leader_easy':game.reward+=2*trigger.num;break; - case 'leader_medium':game.reward+=4*trigger.num;break; - case 'leader_hard':game.reward+=6*trigger.num;break; - } - } - }, - leader_renyi:{ - unique:true, - }, - leader_mouduan:{ - unique:true, - global:'leader_mouduan2' - }, - leader_mouduan2:{ - mod:{ - chessMove:function(player,current){ - if(player.side&&player.name!=_status.lord) return current+1; - } - } - }, - tongshuai:{ - unique:true, - forbid:['guozhan'], - init:function(player){ - player.storage.tongshuai={ - list:[], - owned:{}, - player:player, - get:function(num){ - if(typeof num!='number') num=1; - var player=this.player; - while(num--){ - var name=player.storage.tongshuai.unowned.shift(); - if(!name) return; - var skills=lib.character[name][3].slice(0); - for(var i=0;i
    【'+get.translation(skill)+ - '】
    '+lib.translate[skill+'_info']+'
    '); - } - } - }, - // mark:true - }, - tongshuai1:{ - trigger:{global:'gameStart'}, - forced:true, - popup:false, - priority:10, - content:function(){ - for(var i=0;i1){ - player.storage.tongshuai.get(2); - } - else if(player.storage.tongshuai.unowned.length==1){ - player.storage.tongshuai.get(); - } - else{ - player.removeSkill('tongshuai'); - } - } - }, - tongshuai2:{ - audio:2, - trigger:{player:['phaseBegin','phaseEnd'],global:'gameStart'}, - filter:function(event,player,name){ - if(!player.hasSkill('tongshuai')) return false; - if(name=='phaseBegin'&&game.phaseNumber==1) return false; - return true; - }, - priority:-9, - forced:true, - popup:false, - content:function(){ - var slist=player.storage.tongshuai.owned; - var list=[]; - for(var i in slist){ - list.push(i); - } - if(event.isMine()){ - event.dialog=ui.create.dialog('选择获得一项技能',[list,'character']); - if(trigger.name=='game'){ - event.control=ui.create.control(); - } - else{ - event.control=ui.create.control(['cancel']); - } - event.clickControl=function(link){ - if(link!='cancel'){ - var currentname=event.dialog.querySelector('.selected.button').link; - var mark=player.marks.tongshuai; - if(!mark){ - player.markSkill('tongshuai'); - mark=player.marks.tongshuai; - if(mark.firstChild){ - mark.firstChild.remove(); - } - } - mark.setBackground(currentname,'character'); + var glows=event.bosses.querySelectorAll('.glow'); + var glows2=event.jiange.querySelectorAll('.glow2'); + if(!glows.length&&!glows2.length){ + if(!get.config('single_control')){ + var addnum; + if(get.config('additional_player')){ + addnum=parseInt(get.config('battle_number')); + } + else{ + addnum=parseInt(get.config('battle_number'))+parseInt(get.config('replace_number')); + } + for(var i=0;i2) return false; + var xy1=event.source.getXY(); + var xy2=player.getXY(); + var dx=xy2[0]-xy1[0]; + var dy=xy2[1]-xy1[1]; + // if(dx*dy!=0) return false; + if(dx==0&&Math.abs(dy)==2){ + dy/=2; + } + if(dy==0&&Math.abs(dx)==2){ + dx/=2; + } + return player.movable(dx,dy); + }, + content:function(){ + var xy1=trigger.source.getXY(); + var xy2=player.getXY(); + var dx=xy2[0]-xy1[0]; + var dy=xy2[1]-xy1[1]; + if(dx==0&&Math.abs(dy)==2){ + dy/=2; + } + if(dy==0&&Math.abs(dx)==2){ + dx/=2; + } + if(player.movable(dx,dy)){ + player.move(dx,dy); + } + } + }, + dubiaoxianjing:{ + global:'dubiaoxianjing2' + }, + dubiaoxianjing2:{ + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + if(player.hp<=1) return false; + for(var i=0;i1) return false; + for(var i=0;inh) return false; + } + return true; + } + } + return false; + }, + content:function(){ + 'step 0' + var source=null; + for(var i=0;i3; + } + } + return false; + }, + content:function(){ + 'step 0' + var source=null; + for(var i=0;igame.data.arena.dead.length; + }, + direct:true, + delay:0, + preservecancel:true, + content:function(){ + "step 0" + var list=game.data.arena.arenachoice.slice(0); + for(var i=0;i

    ' + for(var i=0;i'+ + (skill.chance(targets[i],player)*100).toFixed(2)+'%
    '; + } + str+='

    ' + } + return str; + }, + chance:function(target,player){ + var chance; + var renyi=player.hasSkill('leader_renyi'); + switch(target.hp){ + case 1:chance=0.7;break; + case 2:chance=0.4;break; + default:chance=0.2;break; + } + switch(target.countCards('he')){ + case 0:break; + case 1:chance/=1.2;break; + case 2:chance/=1.4;break; + case 3:chance/=1.7;break; + default:chance/=2;break; + } + switch(game.getRarity(target.name)){ + case 'common':{ + if(renyi) chance*=2; + break; + } + case 'rare':{ + chance/=2; + if(renyi) chance*=2; + break; + } + case 'epic':{ + chance/=5; + if(renyi) chance*=1.5; + break; + } + case 'legend':{ + chance/=15; + if(renyi) chance*=1.2; + break; + } + } + return Math.min(1,chance); + }, + filter:function(){ + return game.data.dust>=10; + }, + filterTarget:function(card,player,target){ + return game.isChessNeighbour(player,target)&&!game.data.character.contains(target.name); + }, + content:function(){ + var chance=lib.skill.leader_zhaoxiang.chance(target,player); + game.changeDust(-10); + if(Math.random()0; + }, + content:function(){ + switch(_status.difficulty){ + case 'leader_easy':game.reward+=2*trigger.num;break; + case 'leader_medium':game.reward+=4*trigger.num;break; + case 'leader_hard':game.reward+=6*trigger.num;break; + } + } + }, + leader_renyi:{ + unique:true, + }, + leader_mouduan:{ + unique:true, + global:'leader_mouduan2' + }, + leader_mouduan2:{ + mod:{ + chessMove:function(player,current){ + if(player.side&&player.name!=_status.lord) return current+1; + } + } + }, + tongshuai:{ + unique:true, + forbid:['guozhan'], + init:function(player){ + player.storage.tongshuai={ + list:[], + owned:{}, + player:player, + get:function(num){ + if(typeof num!='number') num=1; + var player=this.player; + while(num--){ + var name=player.storage.tongshuai.unowned.shift(); + if(!name) return; + var skills=lib.character[name][3].slice(0); + for(var i=0;i
    【'+get.translation(skill)+ + '】
    '+lib.translate[skill+'_info']+'
    '); + } + } + }, + // mark:true + }, + tongshuai1:{ + trigger:{global:'gameStart'}, + forced:true, + popup:false, + priority:10, + content:function(){ + for(var i=0;i1){ + player.storage.tongshuai.get(2); + } + else if(player.storage.tongshuai.unowned.length==1){ + player.storage.tongshuai.get(); + } + else{ + player.removeSkill('tongshuai'); + } + } + }, + tongshuai2:{ + audio:2, + trigger:{player:['phaseBegin','phaseEnd'],global:'gameStart'}, + filter:function(event,player,name){ + if(!player.hasSkill('tongshuai')) return false; + if(name=='phaseBegin'&&game.phaseNumber==1) return false; + return true; + }, + priority:-9, + forced:true, + popup:false, + content:function(){ + var slist=player.storage.tongshuai.owned; + var list=[]; + for(var i in slist){ + list.push(i); + } + if(event.isMine()){ + event.dialog=ui.create.dialog('选择获得一项技能',[list,'character']); + if(trigger.name=='game'){ + event.control=ui.create.control(); + } + else{ + event.control=ui.create.control(['cancel']); + } + event.clickControl=function(link){ + if(link!='cancel'){ + var currentname=event.dialog.querySelector('.selected.button').link; + var mark=player.marks.tongshuai; + if(!mark){ + player.markSkill('tongshuai'); + mark=player.marks.tongshuai; + if(mark.firstChild){ + mark.firstChild.remove(); + } + } + mark.setBackground(currentname,'character'); - player.addAdditionalSkill('tongshuai',link); - game.addVideo('chess_tongshuai_skill',player,[currentname,link]); - player.logSkill('tongshuai2'); - game.log(player,'获得技能','【'+get.translation(link)+'】'); - player.popup(link); + player.addAdditionalSkill('tongshuai',link); + game.addVideo('chess_tongshuai_skill',player,[currentname,link]); + player.logSkill('tongshuai2'); + game.log(player,'获得技能','【'+get.translation(link)+'】'); + player.popup(link); - for(var i=0;i0; - }, - content:function(){ - player.storage.tongshuai.get(); - } - }, - cangming:{ - enable:'phaseUse', - usable:1, - unique:true, - filter:function(event,player){ - if(player.isTurnedOver()) return false; - var suits=[]; - var hs=player.getCards('h'); - for(var i=0;i=4) return true; - } - return false; - }, - filterCard:function(card){ - var suit=get.suit(card); - for(var i=0;i1) break; - } - } - if(num<=1) return; - if(_status.currentPhase==player&&player.countCards('h')=6){ - if(typeof card=='string') return; - if(card.name=='wuzhong') return; - if(card.name=='shunshou') return; - if(card.name=='yuanjiao') return; - if(card.name=='yiyi') return; - if(!player.hasSkill('cangming2')) return [0,0,0,0]; - } - } - }, - result:{ - target:function(player){ - var num=0; - for(var i=0;i1) break; - } - } - if(num<=1) return 0; - return -10; - } - } - }, - }, - cangming2:{ - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - content:function(){ - for(var i=0;i0; + }, + content:function(){ + player.storage.tongshuai.get(); + } + }, + cangming:{ + enable:'phaseUse', + usable:1, + unique:true, + filter:function(event,player){ + if(player.isTurnedOver()) return false; + var suits=[]; + var hs=player.getCards('h'); + for(var i=0;i=4) return true; + } + return false; + }, + filterCard:function(card){ + var suit=get.suit(card); + for(var i=0;i1) break; + } + } + if(num<=1) return; + if(_status.currentPhase==player&&player.countCards('h')=6){ + if(typeof card=='string') return; + if(card.name=='wuzhong') return; + if(card.name=='shunshou') return; + if(card.name=='yuanjiao') return; + if(card.name=='yiyi') return; + if(!player.hasSkill('cangming2')) return [0,0,0,0]; + } + } + }, + result:{ + target:function(player){ + var num=0; + for(var i=0;i1) break; + } + } + if(num<=1) return 0; + return -10; + } + } + }, + }, + cangming2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + for(var i=0;i0; - }, - check:function(event,player){ - var targets=lib.skill.guanchuan.getTargets(player,event.targets[0]); - var eff=0; - for(var i=0;i0; - }, - content:function(){ - var targets=lib.skill.guanchuan.getTargets(player,trigger.targets[0]); - for(var i=0;i1&&lib.filter.filterCard({name:'sha'},player); - }, - filterCard:{name:'sha'}, - selectCard:2, - check:function(card){ - var num=0; - var player=_status.event.player; - for(var i=0;i0){ - num++; - if(num>1) return 8-get.value(card); - } - } - return 0; - }, - selectTarget:[1,Infinity], - discard:false, - prepare:'throw', - filterTarget:function(card,player,target){ - return lib.filter.targetEnabled({name:'sha'},player,target)&& - get.distance(player,target,'pure')<=5; - }, - content:function(){ - targets.sort(lib.sort.seat); - player.useCard({name:'sha'},cards,targets,'luanjian').animate=false; - }, - multitarget:true, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.1; - }, - result:{ - target:function(player,target){ - return get.effect(target,{name:'sha'},player,target); - } - }, - effect:{ - player:function(card,player){ - if(_status.currentPhase!=player) return; - if(card.name=='sha'&&player.countCards('h','sha')<2&&player.countCards('h')<=player.hp){ - var num=0; - var player=_status.event.player; - for(var i=0;i1) return [0,0,0,0]; - } - } - } - } - }, - } - }, - zhiming:{ - trigger:{source:'damageBegin'}, - filter:function(event,player){ - return get.distance(event.player,player,'attack')>1&&event.card&&event.card.name=='sha'; - }, - forced:true, - content:function(){ - trigger.num++; - } - }, - lianshe:{ - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha'){ - return num+get.cardCount(true,player)-get.cardCount('sha',player); - } - }, - }, - trigger:{player:'useCard'}, - frequent:true, - filter:function(event){ - return event.card&&event.card.name=='sha'; - }, - usable:1, - content:function(){ - player.draw(); - }, - ai:{ - threaten:1.5 - } - }, - pianyi:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return !player.getStat('damage'); - }, - content:function(){ - "step 0" - player.chooseToMove(2,get.prompt('pianyi')); - "step 1" - if(result.bool){ - player.logSkill('pianyi'); - } - } - }, - lingdong:{ - trigger:{player:'phaseEnd'}, - direct:true, - filter:function(event,player){ - return get.cardCount('sha',player)>0; - }, - content:function(){ - "step 0" - player.chooseToMove(get.cardCount('sha',player),get.prompt('lingdong')); - "step 1" - if(result.bool){ - player.logSkill('lingdong'); - } - } - }, - _noactpunish:{ - trigger:{player:'useCard'}, - filter:function(event,player){ - return _status.currentPhase==player&&event.targets&&(event.targets.length>1||event.targets[0]!=player); - }, - forced:true, - popup:false, - content:function(){ - player.addTempSkill('noactpunish','phaseAfter'); - } - }, - noactpunish:{}, - _chess_chuzhang:{ - enable:'phaseUse', - usable:1, - direct:true, - delay:false, - preservecancel:true, - filter:function(event,player){ - var num=0; - var xy=player.getXY(); - if(game.obstacles.contains(player.getNeighbour(-1,0))||xy[0]==0) num++; - if(game.obstacles.contains(player.getNeighbour(1,0))||xy[0]+1>=ui.chesswidth) num++; - if(game.obstacles.contains(player.getNeighbour(0,-1))||xy[1]==0) num++; - if(game.obstacles.contains(player.getNeighbour(0,1))||xy[1]+1>=ui.chessheight) num++; - return num>=3; - }, - content:function(){ - 'step 0' - event.obstacles=[]; - var neighbour; - neighbour=player.getNeighbour(-1,0); - if(neighbour&&game.obstacles.contains(neighbour)){ - event.obstacles.push(neighbour); - } - neighbour=player.getNeighbour(1,0); - if(neighbour&&game.obstacles.contains(neighbour)){ - event.obstacles.push(neighbour); - } - neighbour=player.getNeighbour(0,-1); - if(neighbour&&game.obstacles.contains(neighbour)){ - event.obstacles.push(neighbour); - } - neighbour=player.getNeighbour(0,1); - if(neighbour&&game.obstacles.contains(neighbour)){ - event.obstacles.push(neighbour); - } - if(!event.obstacles.length){ - event.finish(); - return; - } - else if(event.obstacles.length==1){ - event.obstacle=event.obstacles[0]; - } - else if(event.isMine()){ - for(var i=0;i'+lib.translate._chess_chuzhang_info+'
    '); - event.custom.replace.confirm=function(){ - player.getStat().skill._chess_chuzhang--; - event.cancelled=true; - game.resume(); - }; - } - 'step 1' - if(ui.confirm){ - ui.confirm.classList.add('removing'); - } - _status.imchoosing=false; - if(!event.cancelled){ - if(!event.obstacle){ - event.obstacle=event.obstacles.randomGet(); - } - game.removeObstacle(event.obstacle.dataset.position); - } - for(var i=0;i0; - }, - content:function(){ - "step 0" - var move=2; - move=game.checkMod(player,move,'chessMove',player); - player.chooseToMove(move).phasing=true; - "step 1" - if(ui.confirm){ - ui.confirm.classList.add('removing'); - } - if(!result.bool){ - var skill=player.getStat().skill; - skill._chessmove--; - if(typeof skill._chessmovetried=='number'){ - skill._chessmovetried++; - } - else{ - skill._chessmovetried=1; - } - } - }, - ai:{ - order:5, - result:{ - playerx:function(player){ - if(get.mode()=='tafang'&&_status.enemies.contains(player)){ - return 1; - } - var nh=player.countCards('h'); - if(!player.countCards('h','sha')&& - !player.countCards('h','shunshou')&& - !player.countCards('h','bingliang')){ - if(nh<=Math.min(3,player.hp)) return Math.random()-0.3; - else if(nh<=Math.min(2,player.hp)) return Math.random()-0.4; - return Math.random()-0.5; - } - var neighbour; - neighbour=player.getNeighbour(0,1); - if(neighbour&&game.players.contains(neighbour)&&neighbour.side!=player.side){ - if(get.distance(player,neighbour,'attack')<1) return 1; - return 0; - } - neighbour=player.getNeighbour(0,-1); - if(neighbour&&game.players.contains(neighbour)&&neighbour.side!=player.side){ - if(get.distance(player,neighbour,'attack')<1) return 1; - return 0; - } - neighbour=player.getNeighbour(1,0); - if(neighbour&&game.players.contains(neighbour)&&neighbour.side!=player.side){ - if(get.distance(player,neighbour,'attack')<1) return 1; - return 0; - } - neighbour=player.getNeighbour(-1,0); - if(neighbour&&game.players.contains(neighbour)&&neighbour.side!=player.side){ - if(get.distance(player,neighbour,'attack')<1) return 1; - return 0; - } - return 1; - }, - player:function(player){ - if(player.getStat().skill._chessmovetried>=10){ - return 0; - } - var x=lib.skill._chessmove.ai.result.playerx(player); - if(player.isMad()) return -x; - return x; - } - } - } - }, - _chesscenter:{ - trigger:{player:['phaseBegin','useCardBegin','useSkillBegin','respondBegin','damageBegin','loseHpBegin'], - target:'useCardToBegin'}, - forced:true, - priority:100, - popup:false, - content:function(){ - player.chessFocus(); - }, - }, - boss_bfengxing:{ - mod:{ - chessMove:function(player,current){ - return current+2; - }, - attackFrom:function(from,to,current){ - return current-2; - }, - }, - trigger:{player:'phaseDrawBegin'}, - forced:true, - content:function(){ - trigger.num+=2; - } - }, - boss_chiyu:{ - enable:'phaseUse', - usable:1, - filterCard:{color:'red'}, - nodelay:true, - check:function(card){return 8-get.value(card);}, - filterTarget:function(card,player,target){ - return get.distance(player,target)<=5&&player!=target; - }, - filter:function(event,player){ - return player.countCards('h',{color:'red'})>0; - }, - selectTarget:-1, - content:function(){ - target.damage('fire'); - }, - line:'fire', - ai:{ - order:1, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target,'fire'); - } - } - } - }, - boss_tenglong:{ - enable:'phaseUse', - usable:1, - position:'he', - filterCard:{type:'equip'}, - init:function(player){ - player.forcemin=true; - }, - check:function(card){ - var player=_status.currentPhase; - if(player.countCards('he',{subtype:get.subtype(card)})>1){ - return 12-get.equipValue(card); - } - return 8-get.equipValue(card); - }, - filter:function(event,player){ - return player.countCards('he',{type:'equip'}); - }, - filterTarget:function(card,player,target){ - return player!=target&&get.distance(player,target)<=2; - }, - content:function(){ - target.damage(3,'fire'); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target,'fire'); - } - } - } - }, - boss_wuying:{ - mod:{ - globalTo:function(from,to,distance){ - return distance+2; - }, - chessMove:function(player,current){ - return current-1; - } - } - }, - boss_wushang:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - for(var i=0;i0; + }, + check:function(event,player){ + var targets=lib.skill.guanchuan.getTargets(player,event.targets[0]); + var eff=0; + for(var i=0;i0; + }, + content:function(){ + var targets=lib.skill.guanchuan.getTargets(player,trigger.targets[0]); + for(var i=0;i1&&lib.filter.filterCard({name:'sha'},player); + }, + filterCard:{name:'sha'}, + selectCard:2, + check:function(card){ + var num=0; + var player=_status.event.player; + for(var i=0;i0){ + num++; + if(num>1) return 8-get.value(card); + } + } + return 0; + }, + selectTarget:[1,Infinity], + discard:false, + prepare:'throw', + filterTarget:function(card,player,target){ + return lib.filter.targetEnabled({name:'sha'},player,target)&& + get.distance(player,target,'pure')<=5; + }, + content:function(){ + targets.sort(lib.sort.seat); + player.useCard({name:'sha'},cards,targets,'luanjian').animate=false; + }, + multitarget:true, + ai:{ + order:function(){ + return get.order({name:'sha'})+0.1; + }, + result:{ + target:function(player,target){ + return get.effect(target,{name:'sha'},player,target); + } + }, + effect:{ + player:function(card,player){ + if(_status.currentPhase!=player) return; + if(card.name=='sha'&&player.countCards('h','sha')<2&&player.countCards('h')<=player.hp){ + var num=0; + var player=_status.event.player; + for(var i=0;i1) return [0,0,0,0]; + } + } + } + } + }, + } + }, + zhiming:{ + trigger:{source:'damageBegin'}, + filter:function(event,player){ + return get.distance(event.player,player,'attack')>1&&event.card&&event.card.name=='sha'; + }, + forced:true, + content:function(){ + trigger.num++; + } + }, + lianshe:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha'){ + return num+get.cardCount(true,player)-get.cardCount('sha',player); + } + }, + }, + trigger:{player:'useCard'}, + frequent:true, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + usable:1, + content:function(){ + player.draw(); + }, + ai:{ + threaten:1.5 + } + }, + pianyi:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return !player.getStat('damage'); + }, + content:function(){ + "step 0" + player.chooseToMove(2,get.prompt('pianyi')); + "step 1" + if(result.bool){ + player.logSkill('pianyi'); + } + } + }, + lingdong:{ + trigger:{player:'phaseEnd'}, + direct:true, + filter:function(event,player){ + return get.cardCount('sha',player)>0; + }, + content:function(){ + "step 0" + player.chooseToMove(get.cardCount('sha',player),get.prompt('lingdong')); + "step 1" + if(result.bool){ + player.logSkill('lingdong'); + } + } + }, + _noactpunish:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return _status.currentPhase==player&&event.targets&&(event.targets.length>1||event.targets[0]!=player); + }, + forced:true, + popup:false, + content:function(){ + player.addTempSkill('noactpunish','phaseAfter'); + } + }, + noactpunish:{}, + _chess_chuzhang:{ + enable:'phaseUse', + usable:1, + direct:true, + delay:false, + preservecancel:true, + filter:function(event,player){ + var num=0; + var xy=player.getXY(); + if(game.obstacles.contains(player.getNeighbour(-1,0))||xy[0]==0) num++; + if(game.obstacles.contains(player.getNeighbour(1,0))||xy[0]+1>=ui.chesswidth) num++; + if(game.obstacles.contains(player.getNeighbour(0,-1))||xy[1]==0) num++; + if(game.obstacles.contains(player.getNeighbour(0,1))||xy[1]+1>=ui.chessheight) num++; + return num>=3; + }, + content:function(){ + 'step 0' + event.obstacles=[]; + var neighbour; + neighbour=player.getNeighbour(-1,0); + if(neighbour&&game.obstacles.contains(neighbour)){ + event.obstacles.push(neighbour); + } + neighbour=player.getNeighbour(1,0); + if(neighbour&&game.obstacles.contains(neighbour)){ + event.obstacles.push(neighbour); + } + neighbour=player.getNeighbour(0,-1); + if(neighbour&&game.obstacles.contains(neighbour)){ + event.obstacles.push(neighbour); + } + neighbour=player.getNeighbour(0,1); + if(neighbour&&game.obstacles.contains(neighbour)){ + event.obstacles.push(neighbour); + } + if(!event.obstacles.length){ + event.finish(); + return; + } + else if(event.obstacles.length==1){ + event.obstacle=event.obstacles[0]; + } + else if(event.isMine()){ + for(var i=0;i'+lib.translate._chess_chuzhang_info+'
    '); + event.custom.replace.confirm=function(){ + player.getStat().skill._chess_chuzhang--; + event.cancelled=true; + game.resume(); + }; + } + 'step 1' + if(ui.confirm){ + ui.confirm.classList.add('removing'); + } + _status.imchoosing=false; + if(!event.cancelled){ + if(!event.obstacle){ + event.obstacle=event.obstacles.randomGet(); + } + game.removeObstacle(event.obstacle.dataset.position); + } + for(var i=0;i0; + }, + content:function(){ + "step 0" + var move=2; + move=game.checkMod(player,move,'chessMove',player); + player.chooseToMove(move).phasing=true; + "step 1" + if(ui.confirm){ + ui.confirm.classList.add('removing'); + } + if(!result.bool){ + var skill=player.getStat().skill; + skill._chessmove--; + if(typeof skill._chessmovetried=='number'){ + skill._chessmovetried++; + } + else{ + skill._chessmovetried=1; + } + } + }, + ai:{ + order:5, + result:{ + playerx:function(player){ + if(get.mode()=='tafang'&&_status.enemies.contains(player)){ + return 1; + } + var nh=player.countCards('h'); + if(!player.countCards('h','sha')&& + !player.countCards('h','shunshou')&& + !player.countCards('h','bingliang')){ + if(nh<=Math.min(3,player.hp)) return Math.random()-0.3; + else if(nh<=Math.min(2,player.hp)) return Math.random()-0.4; + return Math.random()-0.5; + } + var neighbour; + neighbour=player.getNeighbour(0,1); + if(neighbour&&game.players.contains(neighbour)&&neighbour.side!=player.side){ + if(get.distance(player,neighbour,'attack')<1) return 1; + return 0; + } + neighbour=player.getNeighbour(0,-1); + if(neighbour&&game.players.contains(neighbour)&&neighbour.side!=player.side){ + if(get.distance(player,neighbour,'attack')<1) return 1; + return 0; + } + neighbour=player.getNeighbour(1,0); + if(neighbour&&game.players.contains(neighbour)&&neighbour.side!=player.side){ + if(get.distance(player,neighbour,'attack')<1) return 1; + return 0; + } + neighbour=player.getNeighbour(-1,0); + if(neighbour&&game.players.contains(neighbour)&&neighbour.side!=player.side){ + if(get.distance(player,neighbour,'attack')<1) return 1; + return 0; + } + return 1; + }, + player:function(player){ + if(player.getStat().skill._chessmovetried>=10){ + return 0; + } + var x=lib.skill._chessmove.ai.result.playerx(player); + if(player.isMad()) return -x; + return x; + } + } + } + }, + _chesscenter:{ + trigger:{player:['phaseBegin','useCardBegin','useSkillBegin','respondBegin','damageBegin','loseHpBegin'], + target:'useCardToBegin'}, + forced:true, + priority:100, + popup:false, + content:function(){ + player.chessFocus(); + }, + }, + boss_bfengxing:{ + mod:{ + chessMove:function(player,current){ + return current+2; + }, + attackFrom:function(from,to,current){ + return current-2; + }, + }, + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + trigger.num+=2; + } + }, + boss_chiyu:{ + enable:'phaseUse', + usable:1, + filterCard:{color:'red'}, + nodelay:true, + check:function(card){return 8-get.value(card);}, + filterTarget:function(card,player,target){ + return get.distance(player,target)<=5&&player!=target; + }, + filter:function(event,player){ + return player.countCards('h',{color:'red'})>0; + }, + selectTarget:-1, + content:function(){ + target.damage('fire'); + }, + line:'fire', + ai:{ + order:1, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target,'fire'); + } + } + } + }, + boss_tenglong:{ + enable:'phaseUse', + usable:1, + position:'he', + filterCard:{type:'equip'}, + init:function(player){ + player.forcemin=true; + }, + check:function(card){ + var player=_status.currentPhase; + if(player.countCards('he',{subtype:get.subtype(card)})>1){ + return 12-get.equipValue(card); + } + return 8-get.equipValue(card); + }, + filter:function(event,player){ + return player.countCards('he',{type:'equip'}); + }, + filterTarget:function(card,player,target){ + return player!=target&&get.distance(player,target)<=2; + }, + content:function(){ + target.damage(3,'fire'); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target,'fire'); + } + } + } + }, + boss_wuying:{ + mod:{ + globalTo:function(from,to,distance){ + return distance+2; + }, + chessMove:function(player,current){ + return current-1; + } + } + }, + boss_wushang:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + for(var i=0;i=ui.chessheight-1) return false; - } - var node=ui.create.div('.player.minskin.playergrid',player.parentNode); - node.link=player; - node.dataset.position=pos; - return node; - }, - fakeme:function(){ - if(ui.fakeme){ - ui.fakeme.delete(); - } - ui.fakeme=ui.create.div('.fakeme.avatar',ui.me); - ui.fakeme.style.backgroundImage=game.me.node.avatar.style.backgroundImage; - } - }, - click:{ - chessInfo:function(e){ - if(this.link.isAlive()){ - this.link.chessFocus(); - if(this.link.classList.contains('selectable')|| - this.link.classList.contains('selected')){ - ui.click.target.call(this.link,e); - ui.click.window.call(ui.window,e); - } - e.stopPropagation(); - } - }, - playergrid:function(){ - if(!_status.paused) return; - var pos=parseInt(this.dataset.position); - this.link.moveTo(pos%ui.chesswidth,Math.floor(pos/ui.chesswidth)); - if(ui.movegrids){ - while(ui.movegrids.length){ - ui.movegrids.shift().delete(); - } - } - _status.event.result={ - bool:true, - move:this.link.dataset.position - }; - game.resume(); - }, - obstacle:function(){ - if(_status.event.chooseObstacle&&_status.paused&& - _status.event.obstacles&&_status.event.obstacles.contains(this)){ - _status.event.obstacle=this; - game.resume(); - } - } - } - }, - get:{ - chessDistance:function(from,to){ - var fxy=from.getXY(); - var txy=to.getXY(); - return Math.abs(fxy[0]-txy[0])+Math.abs(fxy[1]-txy[1]); - }, - rawAttitude:function(from,to){ - return (from.side===to.side?6:-6); - } - }, - card:{ - chess_shezhang:{ - type:'basic', - fullskin:true, - modeimage:'chess', - enable:function(card,player){ - if(player.movable(-1,0)) return true; - if(player.movable(1,0)) return true; - if(player.movable(0,-1)) return true; - if(player.movable(0,1)) return true; - return false; - }, - filterTarget:function(card,player,target){ - return player==target; - }, - selectTarget:-1, - content:function(){ - 'step 0' - var pos=parseInt(player.dataset.position); - var poses=[]; - if(player.movable(-1,0)){ - poses.push(pos-1); - } - if(player.movable(1,0)){ - poses.push(pos+1); - } - if(player.movable(0,-1)){ - poses.push(pos-ui.chesswidth); - } - if(player.movable(0,1)){ - poses.push(pos+ui.chesswidth); - } - event.poses=poses; - if(poses.length==1){ - event.obstacle=poses[0]; - event.grids=[]; - } - else if(event.isMine()){ - event.grids=player.createRangeShadow(1,function(){ - event.obstacle=this.dataset.position; - game.resume(); - }) - game.pause(); - _status.imchoosing=true; - for(var i=0;i对阵模式
    • n人对战n人的模式,由单人控制,开始游戏后随机分配位置与出牌顺序
    • '+ - '每人在出牌阶段有一次移动的机会,可移动的最大距离为2
    • '+ - '任何卡牌或技能无法指定位置相隔8个格以上的角色为目标
    • '+ - '杀死对方阵营的角色可摸一张牌,杀死本方阵营无惩罚
    • '+ - '若开启主将,双方各选择一名角色成为主将。主将体力上限加一,主将死亡后,若有副将,副将代替之成为主将,否则游戏结束
    • '+ - '开启无尽模式后,任何一方有角色死亡都将选择一名新角色重新加入战场,直到点击左上角的结束游戏按钮手动结束游戏。结束游戏时,杀敌更多的一方获胜
    • '+ - '行动顺序为指定时,双方无论存活角色角色多少都将轮流进行行动。在一方所有角色行动完毕进行下一轮行动时,若其人数比另一方少,另一方可指定至多X名角色名摸一张牌,X为人数之差
    • '+ - '开启战场机关后,每个回合结束时有一定机率出现一个机关,该机关不参与战斗,并有一个影响周围或全体角色的效果。机关在出现后的5~10个回合内消失
    • '+ - '开启击退效果后,当一名角色对距离两格以内的目标造成伤害后,受伤害角色将沿反方向移动一格
    • '+ - '战场上可设置出现随机路障,角色无法移动到路障处。当一名角色的周围四格有至少三格为路障或在战场外时,其可以在回合内清除一个相邻路障
    '+ - '
    君主模式
    • 收集武将进行战斗,根据战斗难度及我方出场武将的强度,战斗胜利后将获得数量不等的金钱。没有君主出场时,获得的金钱较多
    • '+ - '金钱可以用来招募随机武将,招到已有武将,或遣返不需要的武将时可得到招募令
    • '+ - '战斗中有君主出场时可招降敌将,成功率取决于敌将的稀有度、剩余体力值以及手牌数。成功后战斗立即结束且没有金钱奖励。每发动一次招降,无论成功还是失败,都会扣除10招募令
    • '+ - '挑战武将会与该武将以及与其强度相近的武将进行战斗,敌方人数与我方出场人数相同,但不少于3。胜利后可通过招募令招募该武将,普通/稀有/史诗/传说武将分别需要40/100/400/1600招募令
    • '+ - '竞技场:
      随机选择9名武将,每次派出1~3名武将参战。战斗中阵亡的武将不能再次上场。

      战斗后武将进入疲劳状态,若立即再次出场则初始体力值-1。

      战斗中本方武将行动时可召唤后援,令一名未出场的已方武将加入战斗。后援武将在战斗结束后无论存活与否均不能再次出场

      当取得12场胜利或所有武将全部阵亡后结束,并根据胜场数获得随机奖励
    • '+ - '修改金钱:
      game.changeMoney
      修改招募令:
      game.changeDust
    ' - }, + mode_chess_character_config:'战棋模式', + mode_chess_card_config:'战棋模式', + }, + ui:{ + create:{ + playergrid:function(player,x,y){ + var pos=player.getDataPos(x,y); + if(get.mode()=='tafang'){ + if(pos=ui.chessheight-1) return false; + } + var node=ui.create.div('.player.minskin.playergrid',player.parentNode); + node.link=player; + node.dataset.position=pos; + return node; + }, + fakeme:function(){ + if(ui.fakeme){ + ui.fakeme.delete(); + } + ui.fakeme=ui.create.div('.fakeme.avatar',ui.me); + ui.fakeme.style.backgroundImage=game.me.node.avatar.style.backgroundImage; + } + }, + click:{ + chessInfo:function(e){ + if(this.link.isAlive()){ + this.link.chessFocus(); + if(this.link.classList.contains('selectable')|| + this.link.classList.contains('selected')){ + ui.click.target.call(this.link,e); + ui.click.window.call(ui.window,e); + } + e.stopPropagation(); + } + }, + playergrid:function(){ + if(!_status.paused) return; + var pos=parseInt(this.dataset.position); + this.link.moveTo(pos%ui.chesswidth,Math.floor(pos/ui.chesswidth)); + if(ui.movegrids){ + while(ui.movegrids.length){ + ui.movegrids.shift().delete(); + } + } + _status.event.result={ + bool:true, + move:this.link.dataset.position + }; + game.resume(); + }, + obstacle:function(){ + if(_status.event.chooseObstacle&&_status.paused&& + _status.event.obstacles&&_status.event.obstacles.contains(this)){ + _status.event.obstacle=this; + game.resume(); + } + } + } + }, + get:{ + chessDistance:function(from,to){ + var fxy=from.getXY(); + var txy=to.getXY(); + return Math.abs(fxy[0]-txy[0])+Math.abs(fxy[1]-txy[1]); + }, + rawAttitude:function(from,to){ + return (from.side===to.side?6:-6); + } + }, + card:{ + chess_shezhang:{ + type:'basic', + fullskin:true, + modeimage:'chess', + enable:function(card,player){ + if(player.movable(-1,0)) return true; + if(player.movable(1,0)) return true; + if(player.movable(0,-1)) return true; + if(player.movable(0,1)) return true; + return false; + }, + filterTarget:function(card,player,target){ + return player==target; + }, + selectTarget:-1, + content:function(){ + 'step 0' + var pos=parseInt(player.dataset.position); + var poses=[]; + if(player.movable(-1,0)){ + poses.push(pos-1); + } + if(player.movable(1,0)){ + poses.push(pos+1); + } + if(player.movable(0,-1)){ + poses.push(pos-ui.chesswidth); + } + if(player.movable(0,1)){ + poses.push(pos+ui.chesswidth); + } + event.poses=poses; + if(poses.length==1){ + event.obstacle=poses[0]; + event.grids=[]; + } + else if(event.isMine()){ + event.grids=player.createRangeShadow(1,function(){ + event.obstacle=this.dataset.position; + game.resume(); + }) + game.pause(); + _status.imchoosing=true; + for(var i=0;i对阵模式
    • n人对战n人的模式,由单人控制,开始游戏后随机分配位置与出牌顺序
    • '+ + '每人在出牌阶段有一次移动的机会,可移动的最大距离为2
    • '+ + '任何卡牌或技能无法指定位置相隔8个格以上的角色为目标
    • '+ + '杀死对方阵营的角色可摸一张牌,杀死本方阵营无惩罚
    • '+ + '若开启主将,双方各选择一名角色成为主将。主将体力上限加一,主将死亡后,若有副将,副将代替之成为主将,否则游戏结束
    • '+ + '开启无尽模式后,任何一方有角色死亡都将选择一名新角色重新加入战场,直到点击左上角的结束游戏按钮手动结束游戏。结束游戏时,杀敌更多的一方获胜
    • '+ + '行动顺序为指定时,双方无论存活角色角色多少都将轮流进行行动。在一方所有角色行动完毕进行下一轮行动时,若其人数比另一方少,另一方可指定至多X名角色名摸一张牌,X为人数之差
    • '+ + '开启战场机关后,每个回合结束时有一定机率出现一个机关,该机关不参与战斗,并有一个影响周围或全体角色的效果。机关在出现后的5~10个回合内消失
    • '+ + '开启击退效果后,当一名角色对距离两格以内的目标造成伤害后,受伤害角色将沿反方向移动一格
    • '+ + '战场上可设置出现随机路障,角色无法移动到路障处。当一名角色的周围四格有至少三格为路障或在战场外时,其可以在回合内清除一个相邻路障
    '+ + '
    君主模式
    • 收集武将进行战斗,根据战斗难度及我方出场武将的强度,战斗胜利后将获得数量不等的金钱。没有君主出场时,获得的金钱较多
    • '+ + '金钱可以用来招募随机武将,招到已有武将,或遣返不需要的武将时可得到招募令
    • '+ + '战斗中有君主出场时可招降敌将,成功率取决于敌将的稀有度、剩余体力值以及手牌数。成功后战斗立即结束且没有金钱奖励。每发动一次招降,无论成功还是失败,都会扣除10招募令
    • '+ + '挑战武将会与该武将以及与其强度相近的武将进行战斗,敌方人数与我方出场人数相同,但不少于3。胜利后可通过招募令招募该武将,普通/稀有/史诗/传说武将分别需要40/100/400/1600招募令
    • '+ + '竞技场:
      随机选择9名武将,每次派出1~3名武将参战。战斗中阵亡的武将不能再次上场。

      战斗后武将进入疲劳状态,若立即再次出场则初始体力值-1。

      战斗中本方武将行动时可召唤后援,令一名未出场的已方武将加入战斗。后援武将在战斗结束后无论存活与否均不能再次出场

      当取得12场胜利或所有武将全部阵亡后结束,并根据胜场数获得随机奖励
    • '+ + '修改金钱:
      game.changeMoney
      修改招募令:
      game.changeDust
    ' + }, + }; }); diff --git a/mode/connect.js b/mode/connect.js index 5c16faed3..565f44151 100644 --- a/mode/connect.js +++ b/mode/connect.js @@ -1,142 +1,150 @@ 'use strict'; -game.import('mode',{ - name:'connect', - start:function(){ - var directstartmode=lib.config.directstartmode; - ui.create.menu(true); - var createNode=function(){ - if(event.created) return; - if(directstartmode&&lib.node){ - ui.exitroom=ui.create.system('退出房间',function(){ - game.saveConfig('directstartmode'); - game.reload(); - },true); - game.switchMode(directstartmode); - return; - } - if(lib.node&&window.require){ - ui.startServer=ui.create.system('启动服务器',function(e){ - e.stopPropagation(); - ui.click.connectMenu(); - },true); - } +game.import('mode',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'connect', + start:function(){ + var directstartmode=lib.config.directstartmode; + ui.create.menu(true); + var createNode=function(){ + if(event.created) return; + if(directstartmode&&lib.node){ + ui.exitroom=ui.create.system('退出房间',function(){ + game.saveConfig('directstartmode'); + game.reload(); + },true); + game.switchMode(directstartmode); + return; + } + if(lib.node&&window.require){ + ui.startServer=ui.create.system('启动服务器',function(e){ + e.stopPropagation(); + ui.click.connectMenu(); + },true); + } - event.created=true; - var node=ui.create.div('.shadowed'); - node.style.width='400px'; - node.style.height='30px'; - node.style.lineHeight='30px'; - node.style.fontFamily='xinwei'; - node.style.fontSize='30px'; - node.style.padding='10px'; - node.style.left='calc(50% - 210px)'; - node.style.top='calc(50% - 20px)'; - node.style.whiteSpace='nowrap'; - node.innerHTML=lib.config.last_ip||lib.hallURL; - node.contentEditable=true; - node.style.webkitUserSelect='text'; - node.style.textAlign='center'; + event.created=true; + var node=ui.create.div('.shadowed'); + node.style.width='400px'; + node.style.height='30px'; + node.style.lineHeight='30px'; + node.style.fontFamily='xinwei'; + node.style.fontSize='30px'; + node.style.padding='10px'; + node.style.left='calc(50% - 210px)'; + node.style.top='calc(50% - 20px)'; + node.style.whiteSpace='nowrap'; + node.innerHTML=lib.config.last_ip||lib.hallURL; + node.contentEditable=true; + node.style.webkitUserSelect='text'; + node.style.textAlign='center'; - var connect=function(e){ - clearTimeout(event.timeout); - if(e) e.preventDefault(); - game.saveConfig('last_ip',node.innerHTML); - game.connect(node.innerHTML); - }; - node.addEventListener('keydown',function(e){ - if(e.keyCode==13){ - connect(e); - } - }); - ui.window.appendChild(node); - ui.ipnode=node; + var connect=function(e){ + clearTimeout(event.timeout); + if(e) e.preventDefault(); + game.saveConfig('last_ip',node.innerHTML); + game.connect(node.innerHTML); + }; + node.addEventListener('keydown',function(e){ + if(e.keyCode==13){ + connect(e); + } + }); + ui.window.appendChild(node); + ui.ipnode=node; - var text=ui.create.div(); - text.style.width='400px'; - text.style.height='30px'; - text.style.lineHeight='30px'; - text.style.fontFamily='xinwei'; - text.style.fontSize='30px'; - text.style.padding='10px'; - text.style.left='calc(50% - 200px)'; - text.style.top='calc(50% - 80px)'; - text.innerHTML='输入联机地址'; - text.style.textAlign='center'; - ui.window.appendChild(text); - ui.iptext=text; + var text=ui.create.div(); + text.style.width='400px'; + text.style.height='30px'; + text.style.lineHeight='30px'; + text.style.fontFamily='xinwei'; + text.style.fontSize='30px'; + text.style.padding='10px'; + text.style.left='calc(50% - 200px)'; + text.style.top='calc(50% - 80px)'; + text.innerHTML='输入联机地址'; + text.style.textAlign='center'; + ui.window.appendChild(text); + ui.iptext=text; - var button=ui.create.div('.menubutton.highlight.large.pointerdiv','连接',connect); - button.style.width='70px'; - button.style.left='calc(50% - 35px)'; - button.style.top='calc(50% + 60px)'; - ui.window.appendChild(button); - ui.ipbutton=button; + var button=ui.create.div('.menubutton.highlight.large.pointerdiv','连接',connect); + button.style.width='70px'; + button.style.left='calc(50% - 35px)'; + button.style.top='calc(50% + 60px)'; + ui.window.appendChild(button); + ui.ipbutton=button; - ui.hall_button=ui.create.system('联机大厅',function(){ - node.innerHTML=get.config('hall_ip')||lib.hallURL; - connect(); - },true); - if(!get.config('hall_button')){ - ui.hall_button.style.display='none'; - } - ui.recentIP=ui.create.system('最近连接',null,true); - var clickLink=function(){ - node.innerHTML=this.innerHTML; - connect(); - }; - lib.setPopped(ui.recentIP,function(){ - if(!lib.config.recentIP.length) return; - var uiintro=ui.create.dialog('hidden'); - uiintro.listen(function(e){ - e.stopPropagation(); - }); - var list=ui.create.div('.caption'); - for(var i=0;i清除'); - clear.style.paddingTop=0; - clear.style.paddingBottom='3px'; - clear.listen(function(){ - lib.config.recentIP.length=0; - game.saveConfig('recentIP',[]); - uiintro.delete(); - }); - return uiintro; - },220); - lib.init.onfree(); - } - if(window.isNonameServer){ - game.connect(window.isNonameServerIp||'localhost'); - } - else if(lib.config.reconnect_info){ - var info=lib.config.reconnect_info; - game.onlineID=info[1]; - game.roomId=info[2]; - var n=5; - var connect=function(){ - game.connect(info[0],function(success){ - if(!success&&n--){ - createNode(); - event.timeout=setTimeout(connect,1000); - } - }); - }; - event.timeout=setTimeout(connect,500); - _status.createNodeTimeout=setTimeout(createNode,2000); - } - else{ - createNode(); - } - _status.connectDenied=createNode; - for(var i in lib.element.event){ - event.parent[i]=lib.element.event[i]; - } - event.parent.custom={ - add:{}, - replace:{} - }; - setTimeout(lib.init.onfree,1000); - } + ui.hall_button=ui.create.system('联机大厅',function(){ + node.innerHTML=get.config('hall_ip')||lib.hallURL; + connect(); + },true); + if(!get.config('hall_button')){ + ui.hall_button.style.display='none'; + } + ui.recentIP=ui.create.system('最近连接',null,true); + var clickLink=function(){ + node.innerHTML=this.innerHTML; + connect(); + }; + lib.setPopped(ui.recentIP,function(){ + if(!lib.config.recentIP.length) return; + var uiintro=ui.create.dialog('hidden'); + uiintro.listen(function(e){ + e.stopPropagation(); + }); + var list=ui.create.div('.caption'); + for(var i=0;i清除'); + clear.style.paddingTop=0; + clear.style.paddingBottom='3px'; + clear.listen(function(){ + lib.config.recentIP.length=0; + game.saveConfig('recentIP',[]); + uiintro.delete(); + }); + return uiintro; + },220); + lib.init.onfree(); + } + if(window.isNonameServer){ + game.connect(window.isNonameServerIp||'localhost'); + } + else if(lib.config.reconnect_info){ + var info=lib.config.reconnect_info; + game.onlineID=info[1]; + game.roomId=info[2]; + var n=5; + var connect=function(){ + game.connect(info[0],function(success){ + if(!success&&n--){ + createNode(); + event.timeout=setTimeout(connect,1000); + } + }); + }; + event.timeout=setTimeout(connect,500); + _status.createNodeTimeout=setTimeout(createNode,2000); + } + else{ + createNode(); + } + _status.connectDenied=createNode; + for(var i in lib.element.event){ + event.parent[i]=lib.element.event[i]; + } + event.parent.custom={ + add:{}, + replace:{} + }; + setTimeout(lib.init.onfree,1000); + } + }; }); diff --git a/mode/guozhan.js b/mode/guozhan.js index 432e71d5b..555071798 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -1,2700 +1,2547 @@ 'use strict'; -game.import('mode',{ - name:'guozhan', - startBefore:function(){ - var playback=localStorage.getItem(lib.configprefix+'playback'); - for(var i in lib.characterPack.mode_guozhan){ - if(!get.config('onlyguozhan')&&!playback){ - if(lib.character[i.slice(3)]) continue; - } - lib.character[i]=lib.characterPack.mode_guozhan[i]; - if(!lib.character[i][4]){ - lib.character[i][4]=[]; - } - if(!lib.translate[i]){ - lib.translate[i]=lib.translate[i.slice(3)]; - } - } - for(var i in lib.character){ - if(lib.character[i][1]=='shen'){ - if(lib.character[i][4]&&lib.group.contains(lib.character[i][4][0])){ - lib.character[i][1]=lib.character[i][4][0]; +game.import('mode',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'guozhan', + startBefore:function(){ + var playback=localStorage.getItem(lib.configprefix+'playback'); + for(var i in lib.characterPack.mode_guozhan){ + if(!get.config('onlyguozhan')&&!playback){ + if(lib.character[i.slice(3)]) continue; } - else{ - lib.character[i][1]='qun'; + lib.character[i]=lib.characterPack.mode_guozhan[i]; + if(!lib.character[i][4]){ + lib.character[i][4]=[]; + } + if(!lib.translate[i]){ + lib.translate[i]=lib.translate[i.slice(3)]; } } - } - }, - onreinit:function(){ - var pack=lib.characterPack.mode_guozhan; - for(var i in pack){ - if(!lib.configOL.onlyguozhan){ - if(lib.character[i.slice(3)]) continue; - } - lib.character[i]=pack[i]; - if(!lib.character[i][4]){ - lib.character[i][4]=[]; - } - if(!lib.translate[i]){ - lib.translate[i]=lib.translate[i.slice(3)]; - } - } - }, - start:function(){ - "step 0" - var playback=localStorage.getItem(lib.configprefix+'playback'); - if(playback){ - ui.create.me(); - ui.arena.style.display='none'; - ui.system.style.display='none'; - _status.playback=playback; - localStorage.removeItem(lib.configprefix+'playback'); - var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); - store.get(parseInt(playback)).onsuccess=function(e){ - if(e.target.result){ - game.playVideoContent(e.target.result.video); - } - else{ - alert('播放失败:找不到录像'); - game.reload(); + for(var i in lib.character){ + if(lib.character[i][1]=='shen'){ + if(lib.character[i][4]&&lib.group.contains(lib.character[i][4][0])){ + lib.character[i][1]=lib.character[i][4][0]; + } + else{ + lib.character[i][1]='qun'; + } } } - event.finish(); - } - else if(_status.connectMode){ - game.waitForPlayer(); - } - else{ - if(get.config('guozhanpile')){ - lib.card.list=lib.guozhanPile.slice(0); + }, + onreinit:function(){ + var pack=lib.characterPack.mode_guozhan; + for(var i in pack){ + if(!lib.configOL.onlyguozhan){ + if(lib.character[i.slice(3)]) continue; + } + lib.character[i]=pack[i]; + if(!lib.character[i][4]){ + lib.character[i][4]=[]; + } + if(!lib.translate[i]){ + lib.translate[i]=lib.translate[i.slice(3)]; + } } - game.prepareArena(); - // game.delay(); - game.showChangeLog(); - } - if(!_status.connectMode){ - _status.mode=get.config('guozhan_mode'); - if(_status.brawl&&_status.brawl.submode){ - _status.mode=_status.brawl.submode; + }, + start:function(){ + "step 0" + var playback=localStorage.getItem(lib.configprefix+'playback'); + if(playback){ + ui.create.me(); + ui.arena.style.display='none'; + ui.system.style.display='none'; + _status.playback=playback; + localStorage.removeItem(lib.configprefix+'playback'); + var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); + store.get(parseInt(playback)).onsuccess=function(e){ + if(e.target.result){ + game.playVideoContent(e.target.result.video); + } + else{ + alert('播放失败:找不到录像'); + game.reload(); + } + } + event.finish(); } - } - "step 1" - if(_status.connectMode){ - if(lib.configOL.guozhanpile){ - lib.card.list=lib.guozhanPile.slice(0); + else if(_status.connectMode){ + game.waitForPlayer(); } - game.broadcastAll(function(pack){ + else{ + if(get.config('guozhanpile')){ + lib.card.list=lib.guozhanPile.slice(0); + } + game.prepareArena(); + // game.delay(); + game.showChangeLog(); + } + if(!_status.connectMode){ + _status.mode=get.config('guozhan_mode'); + if(_status.brawl&&_status.brawl.submode){ + _status.mode=_status.brawl.submode; + } + } + "step 1" + if(_status.connectMode){ + if(lib.configOL.guozhanpile){ + lib.card.list=lib.guozhanPile.slice(0); + } + game.broadcastAll(function(pack){ + for(var i=0;i0){ - return true; + game.gameDraw(player); + game.broadcastAll(function(player){ + for(var i=0;i0){ - return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var zhu=get.zhu(player,'hongfa'); - return ui.create.dialog('黄巾天兵符',zhu.storage.huangjintianbingfu,'hidden'); + characterPack:{ + mode_guozhan:{ + gz_shibing1wei:['male','wei',0,[],['unseen']], + gz_shibing2wei:['female','wei',0,[],['unseen']], + gz_shibing1shu:['male','shu',0,[],['unseen']], + gz_shibing2shu:['female','shu',0,[],['unseen']], + gz_shibing1wu:['male','wu',0,[],['unseen']], + gz_shibing2wu:['female','wu',0,[],['unseen']], + gz_shibing1qun:['male','qun',0,[],['unseen']], + gz_shibing2qun:['female','qun',0,[],['unseen']], + + gz_caocao:['male','wei',4,['jianxiong']], + gz_simayi:['male','wei',3,['fankui','guicai']], + gz_xiahoudun:['male','wei',4,['ganglie']], + gz_zhangliao:['male','wei',4,['tuxi']], + gz_xuzhu:['male','wei',4,['luoyi']], + gz_guojia:['male','wei',3,['tiandu','yiji']], + gz_zhenji:['female','wei',3,['luoshen','qingguo']], + gz_xiahouyuan:['male','wei',4,['shensu']], + gz_zhanghe:['male','wei',4,['qiaobian']], + gz_xuhuang:['male','wei',4,['duanliang']], + gz_caoren:['male','wei',4,['jushou']], + gz_dianwei:['male','wei',4,['qiangxi']], + gz_xunyu:['male','wei',3,['quhu','jieming']], + gz_caopi:['male','wei',3,['xingshang','fangzhu']], + gz_yuejin:['male','wei',4,['gzxiaoguo']], + + gz_liubei:['male','shu',4,['gzrende']], + gz_guanyu:['male','shu',5,['wusheng']], + gz_zhangfei:['male','shu',4,['paoxiao']], + gz_zhugeliang:['male','shu',3,['guanxing','gzkongcheng']], + gz_zhaoyun:['male','shu',4,['longdan']], + gz_machao:['male','shu',4,['mashu','tieji']], + gz_huangyueying:['female','shu',3,['jizhi','qicai']], + gz_huangzhong:['male','shu',4,['liegong']], + gz_weiyan:['male','shu',4,['kuanggu']], + gz_pangtong:['male','shu',3,['lianhuan','oldniepan']], + gz_sp_zhugeliang:['male','shu',3,['huoji','bazhen','kanpo']], + gz_liushan:['male','shu',3,['xiangle','fangquan']], + gz_menghuo:['male','shu',4,['huoshou','zaiqi']], + gz_zhurong:['female','shu',4,['juxiang','lieren']], + gz_ganfuren:['female','shu',3,['shushen','shenzhi']], + + gz_sunquan:['male','wu',4,['gzzhiheng']], + gz_ganning:['male','wu',4,['qixi']], + gz_lvmeng:['male','wu',4,['keji']], + gz_huanggai:['male','wu',4,['kurou']], + gz_zhouyu:['male','wu',3,['yingzi','fanjian']], + gz_daqiao:['female','wu',3,['guose','liuli']], + gz_luxun:['male','wu',3,['gzqianxun','duoshi']], + gz_sunshangxiang:['female','wu',3,['jieyin','gzxiaoji']], + gz_sunjian:['male','wu',4,['gzyinghun']], + gz_xiaoqiao:['female','wu',3,['tianxiang','hongyan']], + gz_taishici:['male','wu',4,['tianyi']], + gz_zhoutai:['male','wu',4,['gzbuqu']], + gz_re_lusu:['male','wu',3,['haoshi','dimeng']], + gz_zhangzhang:['male','wu',3,['zhijian','guzheng']], + gz_dingfeng:['male','wu',4,['fenxun','duanbing']], + + gz_huatuo:['male','qun',3,['qingnang','jijiu']], + gz_lvbu:['male','qun',5,['wushuang']], + gz_diaochan:['female','qun',3,['lijian','biyue']], + gz_re_yuanshao:['male','qun',4,['luanji']], + gz_yanwen:['male','qun',4,['shuangxiong']], + gz_jiaxu:['male','qun',3,['wansha','luanwu','gzweimu']], + gz_pangde:['male','qun',4,['mashu','mengjin']], + gz_zhangjiao:['male','qun',3,['leiji','guidao']], + gz_caiwenji:['female','qun',3,['beige','gzduanchang']], + gz_mateng:['male','qun',4,['mashu','xiongyi']], + gz_kongrong:['male','qun',3,['gzmingshi','lirang']], + gz_jiling:['male','qun',4,['shuangren']], + gz_tianfeng:['male','qun',3,['sijian','gzsuishi']], + gz_panfeng:['male','qun',4,['kuangfu']], + gz_zoushi:['female','qun',3,['huoshui','qingcheng']], + + gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi']], + gz_caohong:['male','wei',4,['huyuan','heyi']], + gz_jiangfei:['male','shu',3,['shengxi','gzshoucheng']], + gz_jiangwei:['male','shu',4,['tiaoxin','yizhi','tianfu']], + gz_xusheng:['male','wu',4,['yicheng']], + gz_jiangqing:['male','wu',4,['gzshangyi','niaoxiang']], + gz_hetaihou:['female','qun',3,['zhendu','qiluan']], + + gz_re_lidian:['male','wei',3,['xunxun','wangxi']], + gz_zangba:['male','wei',4,['hengjiang']], + gz_madai:['male','shu',4,['mashu','gzqianxi']], + gz_mifuren:['female','shu',3,['gzguixiu','gzcunsi']], + gz_sunce:['male','wu',4,['jiang','yingyang','hunshang']], + gz_chendong:['male','wu',4,['duanxie','fenming']], + gz_sp_dongzhuo:['male','qun',4,['hengzheng','baoling']], + gz_zhangren:['male','qun',4,['chuanxin','fengshi']], + + gz_jun_liubei:['male','shu',4,['zhangwu','jizhao','shouyue','wuhujiangdaqi']], + gz_jun_zhangjiao:['male','qun',4,['wuxin','hongfa','wendao','huangjintianbingfu']], + } + }, + skill:{ + gzsuishi:{ + audio:'suishi', + trigger:{global:'dying'}, + forced:true, + priority:6.5, + check:function(){ + return false; }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - selectCard:-1, - viewAs:{name:'sha'}, - cards:links, - onuse:function(result,player){ - result.cards=lib.skill[result.skill].cards; - var card=result.cards[0]; - var zhu=get.zhu(player,'hongfa'); - zhu.storage.huangjintianbingfu.remove(card); - zhu.syncStorage('huangjintianbingfu'); - zhu.updateMarks('huangjintianbingfu'); - player.logSkill('_hongfa',result.targets); - } - } + filter:function(event,player){ + return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source.isFriendOf(player); }, - prompt:function(links,player){ - return '选择杀的目标'; + content:function(){ + player.draw(); + }, + group:'gzsuishi2' + }, + gzsuishi2:{ + audio:'suishi', + trigger:{global:'dieAfter'}, + forced:true, + filter:function(event,player){ + return event.player.isFriendOf(player); + }, + content:function(){ + player.loseHp(); } }, - ai:{ - respondSha:true, - skillTagFilter:function(player){ + _hongfa2:{ + trigger:{player:'chooseToRespondBegin'}, + direct:true, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'sha'})) return false; var zhu=get.zhu(player,'hongfa'); if(zhu&&zhu.storage.huangjintianbingfu&&zhu.storage.huangjintianbingfu.length>0){ return true; } return false; }, - order:function(){ - return get.order({name:'sha'})-0.1; - }, - result:{ - player:function(player){ - if(player.countCards('h','sha')) return 0; - return 1; + content:function(){ + "step 0" + var zhu=get.zhu(player,'hongfa'); + player.chooseCardButton(get.prompt('huangjintianbingfu'),zhu.storage.huangjintianbingfu).set('ai',function(){ + if(_status.event.goon) return 1; + return 0; + }).set('goon',player.countCards('h','sha')==0); + "step 1" + if(result.bool){ + var card=result.links[0]; + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'sha'},cards:[card]}; + var zhu=get.zhu(player,'hongfa'); + zhu.storage.huangjintianbingfu.remove(card); + zhu.syncStorage('huangjintianbingfu'); + zhu.updateMarks('huangjintianbingfu'); + player.logSkill('_hongfa2'); } } - } - }, - hongfa:{ - init:function(player){ - player.storage.huangjintianbingfu=[]; }, - derivation:'huangjintianbingfu', - unique:true, - forceunique:true, - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.huangjintianbingfu.length==0; - }, - content:function(){ - player.storage.huangjintianbingfu.addArray(get.cards(get.population('qun'))); - player.syncStorage('huangjintianbingfu'); - player.updateMarks('huangjintianbingfu'); - }, - ai:{ - threaten:2, - }, - group:'hongfa_hp', - subSkill:{ - hp:{ - trigger:{player:'loseHpBefore'}, - filter:function(event,player){ - return player.storage.huangjintianbingfu.length>0; + _hongfa:{ + enable:'chooseToUse', + filter:function(event,player){ + if(!event.filterCard({name:'sha'},player)) return false; + var zhu=get.zhu(player,'hongfa'); + if(zhu&&zhu.storage.huangjintianbingfu&&zhu.storage.huangjintianbingfu.length>0){ + return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var zhu=get.zhu(player,'hongfa'); + return ui.create.dialog('黄巾天兵符',zhu.storage.huangjintianbingfu,'hidden'); }, - direct:true, - content:function(){ - 'step 0' - player.chooseCardButton(get.prompt('hongfa'),player.storage.huangjintianbingfu).set('ai',function(){ - return 1; - }); - 'step 1' - if(result.bool){ - var card=result.links[0]; - ui.discardPile.appendChild(card); - player.storage.huangjintianbingfu.remove(card); - player.$throw(card,1000); - player.updateMarks('huangjintianbingfu'); - player.syncStorage('huangjintianbingfu'); - trigger.untrigger(); - trigger.finish(); - player.logSkill('hongfa'); - game.delay(); - } - } - } - } - }, - wendao:{ - unique:true, - forceunique:true, - enable:'phaseUse', - filterCard:{color:'red'}, - position:'he', - check:function(card){ - return 6-get.value(card); - }, - filter:function(event,player){ - for(var i=0;i
  • 当你计算群势力角色数时,每一张“天兵”均可视为一名群势力角色。
  • 每当你失去体力时,你可改为将一张“天兵”置入弃牌堆。
  • 与你势力相同的角色可将一张“天兵”当【杀】使用或打出。',false) - }, - } - }, - wuxin:{ - unique:true, - trigger:{player:'phaseDrawBegin'}, - // frequent:'check', - // check:function(event,player){ - // var num=get.population('qun'); - // if(player.hasSkill('huangjintianbingfu')){ - // num+=player.storage.huangjintianbingfu.length; - // } - // return num>event.num; - // }, - content:function(){ - 'step 0' - var num=get.population('qun'); - if(player.hasSkill('huangjintianbingfu')){ - num+=player.storage.huangjintianbingfu.length; - } - player.chooseCardButton(num,true,get.cards(num),'按顺将卡牌置于牌堆顶(先选择的在上)').set('ai',function(button){ - return get.value(button.link); - }); - 'step 1' - if(result.bool){ - var list=result.links.slice(0); - while(list.length){ - ui.cardPile.insertBefore(list.pop(),ui.cardPile.firstChild); - } - } - } - }, - zhangwu:{ - unique:true, - forceunique:true, - ai:{ - threaten:2, - }, - group:['zhangwu_gain','zhangwu_clear','zhangwu_count1','zhangwu_count2','zhangwu_count3'], - subSkill:{ - gain:{ - trigger:{global:['discardAfter','respondAfter','useCardAfter','equipAfter', - 'judgeAfter','useSkillAfter','phaseDrawBegin','phaseAfter']}, - forced:true, - filter:function(event,player){ - if(player.storage.zhangwu){ - for(var i=0;i0){ return true; } - if(['discard','respond','useCard'].contains(event.name)&&event.cards){ - for(var i=0;i0; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseCardButton(get.prompt('hongfa'),player.storage.huangjintianbingfu).set('ai',function(){ + return 1; + }); + 'step 1' + if(result.bool){ + var card=result.links[0]; + ui.discardPile.appendChild(card); + player.storage.huangjintianbingfu.remove(card); + player.$throw(card,1000); + player.updateMarks('huangjintianbingfu'); + player.syncStorage('huangjintianbingfu'); + trigger.untrigger(); + trigger.finish(); + player.logSkill('hongfa'); + game.delay(); } } } + } + }, + wendao:{ + unique:true, + forceunique:true, + enable:'phaseUse', + filterCard:{color:'red'}, + position:'he', + check:function(card){ + return 6-get.value(card); }, - count2:{ - trigger:{player:'loseAfter'}, - forced:true, - filter:function(event,player){ - if(lib.skill.zhangwu_count1.filter(event,player)){ - return false; + filter:function(event,player){ + for(var i=0;i
    【武圣】
    将“红色牌”改为“任意牌”
    【咆哮】
    增加描述“你使用的【杀】无视其他角色的防具”
    【龙胆】
    增加描述“你每发动一次‘龙胆’便摸一张牌”
    【烈弓】
    增加描述“你的攻击范围+1”
    【铁骑】
    将“若结果为红色”改为“若结果不为黑桃”
    ' - } - }, - jizhao:{ - derivation:'gzrende', - unique:true, - enable:'chooseToUse', - mark:true, - skillAnimation:true, - animationColor:'fire', - init:function(player){ - player.storage.jizhao=false; - }, - filter:function(event,player){ - if(player.storage.jizhao) return false; - if(event.type=='dying'){ - if(player!=event.dying) return false; - return true; - } - return false; - }, - content:function(){ - 'step 0' - player.awakenSkill('jizhao'); - player.storage.jizhao=true; - var num=player.maxHp-player.countCards('h'); - if(num>0){ - player.draw(num); - } - 'step 1' - if(player.hp<2){ - player.recover(2-player.hp); - } - 'step 2' - player.removeSkill('shouyue'); - player.removeSkill('wuhujiangdaqi'); - player.addSkill('gzrende'); - }, - ai:{ - order:1, - skillTagFilter:function(player){ - if(player.storage.jizhao) return false; - if(player.hp>0) return false; - }, - save:true, - result:{ - player:10 - }, - }, - intro:{ - content:'limited' - } - }, - gzshoucheng:{ - inherit:'shoucheng', - filter:function(event,player){ - if(event.player.countCards('h')) return false; - if(!event.player.isFriendOf(player)) return false; - if(_status.currentPhase==event.player) return false; - for(var i=0;i0; - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - filterCard:function(card){ - return get.type(card)=='equip'; + dialog.addText('
    • 当你计算群势力角色数时,每一张“天兵”均可视为一名群势力角色。
    • 每当你失去体力时,你可改为将一张“天兵”置入弃牌堆。
    • 与你势力相同的角色可将一张“天兵”当【杀】使用或打出。',false) }, - position:'he', - filterTarget:function(card,player,target){ - return !target.getEquip(card); - }, - ai1:function(card){ - return 6-get.value(card); - }, - ai2:function(target){ - return get.attitude(_status.event.player,target)-3; - }, - prompt:get.prompt('yuanhu') - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - player.logSkill('huyuan',target); - event.current=target; - target.equip(result.cards[0]); - if(target!=player){ - player.$give(result.cards,target); + } + }, + wuxin:{ + unique:true, + trigger:{player:'phaseDrawBegin'}, + // frequent:'check', + // check:function(event,player){ + // var num=get.population('qun'); + // if(player.hasSkill('huangjintianbingfu')){ + // num+=player.storage.huangjintianbingfu.length; + // } + // return num>event.num; + // }, + content:function(){ + 'step 0' + var num=get.population('qun'); + if(player.hasSkill('huangjintianbingfu')){ + num+=player.storage.huangjintianbingfu.length; } - game.delay(2); - player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){ - var source=_status.event.source; - return get.distance(source,target)<=1&&source!=target&&target.countCards('he'); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }).set('source',target); - } - else{ - event.finish(); - } - "step 2" - if(result.targets.length){ - event.current.line(result.targets,'green'); - player.discardPlayerCard(true,result.targets[0],'he'); - } - }, - }, - heyi:{ - zhenfa:'inline' - }, - _heyi:{ - mod:{ - globalTo:function(from,to,distance){ - if(game.hasPlayer(function(current){ - return current.hasSkill('heyi')&¤t.inline(to); - })){ - return distance+1; - } - } - } - }, - tianfu:{ - init:function(player){ - player.checkMainSkill('tianfu'); - }, - inherit:'kanpo', - zhenfa:'inline', - viewAsFilter:function(player){ - return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.countCards('h',{color:'black'})>0; - }, - }, - yizhi:{ - init:function(player){ - if(player.checkViceSkill('yizhi')){ - player.removeMaxHp(); - } - }, - inherit:'guanxing', - filter:function(event,player){ - return !player.hasSkill('guanxing'); - } - }, - gzshangyi:{ - audio:'shangyi', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return player!=target&&(target.countCards('h')||target.isUnseen(2)); - }, - content:function(){ - "step 0" - target.viewCards(get.translation(player)+'的手牌',player.getCards('h')); - "step 1" - if(!target.countCards('h')){ - event._result={index:1}; - } - else if(!target.isUnseen(2)){ - event._result={index:0}; - } - else{ - player.chooseControl().set('choiceList',[ - '观看'+get.translation(target)+'的手牌并可以弃置其中的一张黑色牌', - '观看'+get.translation(target)+'的所有暗置的武将牌', - ]); - } - "step 2" - if(result.index==0){ - player.discardPlayerCard(target,'h').set('filterButton',function(button){ - return get.color(button.link)=='black'; - }).set('visible',true); - } - else{ - player.viewCharacter(target,2); - } - }, - ai:{ - order:11, - result:{ - target:function(player,target){ - return -target.countCards('h'); - } - }, - threaten:1.1 - }, - }, - niaoxiang:{ - zhenfa:'siege' - }, - _niaoxiang:{ - trigger:{player:'shaBegin'}, - filter:function(event,player){ - if(game.countPlayer()<4) return false; - return player.siege(event.target)&&game.hasPlayer(function(current){ - return current.hasSkill('niaoxiang')&¤t.siege(event.target); - }); - }, - forced:true, - logTarget:'target', - content:function(){ - "step 0" - var next=trigger.target.chooseToRespond({name:'shan'}); - next.autochoose=lib.filter.autoRespondShan; - next.set('ai',function(card){ - if(_status.event.player.countCards('h','shan')>1){ - return get.unuseful2(card); - } - return -1; - }); - "step 1" - if(result.bool==false){ - trigger.untrigger(); - trigger.directHit=true; - } - } - }, - fengshi:{ - zhenfa:'siege' - }, - _fengshi:{ - trigger:{player:'shaBegin'}, - filter:function(event,player){ - if(game.countPlayer()<4) return false; - return player.siege(event.target)&&game.hasPlayer(function(current){ - return current.hasSkill('fengshi')&¤t.siege(event.target); - })&&event.target.countCards('e'); - }, - logTarget:'target', - content:function(){ - trigger.target.chooseToDiscard('e',true); - } - }, - gzguixiu:{ - init2:function(player){ - player.logSkill('guixiu'); - player.draw(2); - }, - onremove:function(player){ - if(player.isDamaged()){ - player.logSkill('guixiu'); - player.recover(); - } - } - }, - gzcunsi:{ - derivation:'gzyongjue', - enable:'phaseUse', - filter:function(event,player){ - return player.checkMainSkill('gzcunsi',false)||player.checkViceSkill('gzcunsi',false); - }, - unique:true, - forceunique:true, - filterTarget:true, - skillAnimation:true, - content:function(){ - 'step 0' - if(player.checkMainSkill('gzcunsi',false)){ - player.removeCharacter(0); - } - else{ - player.removeCharacter(1); - } - 'step 1' - target.addSkill('gzyongjue'); - if(target!=player){ - target.draw(2); - } - }, - ai:{ - order:9, - result:{ - player:function(player,target){ - var num=0; - if(player.isDamaged()&&target.isFriendOf(player)){ - num++; - if(target.hasSkill('kanpo')) num+=0.5; - if(target.hasSkill('liegong')) num+=0.5; - if(target.hasSkill('tieji')) num+=0.5; - if(target.hasSkill('gzrende')) num+=1.2; - if(target.hasSkill('longdan')) num+=1.2; - if(target.hasSkill('paoxiao')) num+=1.2; - if(target.hasSkill('zhangwu')) num+=1.5; - if(target!=player) num+=0.5; - } - return num; - } - } - } - }, - gzyongjue:{ - trigger:{global:'useCardAfter'}, - filter:function(event,player){ - if(event.gzyongjue==player){ - for(var i=0;i0&&event.source&&event.source.isUnseen(2); - }, - content:function(){ - trigger.num--; - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return; - if(!player.isUnseen(2)) return; - var num=get.tag(card,'damage'); - if(num){ - if(num>1) return 0.5; - return 0; + player.chooseCardButton(num,true,get.cards(num),'按顺将卡牌置于牌堆顶(先选择的在上)').set('ai',function(button){ + return get.value(button.link); + }); + 'step 1' + if(result.bool){ + var list=result.links.slice(0); + while(list.length){ + ui.cardPile.insertBefore(list.pop(),ui.cardPile.firstChild); } } } }, - }, - hunshang:{ - init:function(player){ - if(player.checkViceSkill('hunshang')){ - player.removeMaxHp(); - } - }, - group:['hunshang_yingzi','hunshang_yinghun'], - }, - hunshang_yingzi:{ - inherit:'yingzi', - filter:function(event,player){ - return player.hp<=1&&!player.hasSkill('yingzi'); - } - }, - hunshang_yinghun:{ - inherit:'gzyinghun', - filter:function(event,player){ - return player.hp<=1&&player.isDamaged()&&!player.hasSkill('gzyinghun'); - } - }, - yingyang:{ - trigger:{player:'compare',target:'compare'}, - filter:function(event){ - return !event.iwhile; - }, - content:function(){ - if(player==trigger.player){ - trigger.num1+=3; - } - else{ - trigger.num2+=3; - } - } - }, - gzqianxi:{ - audio:'qianxi', - trigger:{player:'phaseBegin'}, - content:function(){ - "step 0" - player.judge(); - "step 1" - event.color=result.color; - player.chooseTarget(function(card,player,target){ - return player!=target&&get.distance(player,target)<=1; - },true).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 2" - if(result.bool&&result.targets.length){ - result.targets[0].storage.qianxi2=event.color; - result.targets[0].addSkill('qianxi2'); - player.line(result.targets,'green'); - game.addVideo('storage',result.targets[0],['qianxi2',event.color]); - } - }, - }, - gzduanchang:{ - audio:'duanchang', - trigger:{player:'dieBegin'}, - forced:true, - silent:true, - filter:function(event,player){ - return event.source&&event.source.isIn()&&event.source!=player&& - (event.source.hasMainCharacter()||event.source.hasViceCharacter()); - }, - content:function(){ - 'step 0' - if(!trigger.source.hasViceCharacter()){ - event._result={control:'主将'} - } - else if(!trigger.source.hasMainCharacter()){ - event._result={control:'副将'} - } - else{ - player.chooseControl('主将','副将',function(){ - return Math.random()<0.5?'主将':'副将'; - }).set('prompt','令'+get.translation(trigger.source)+'失去一张武将牌的所有技能'); - } - 'step 1' - var skills; - if(result.control=='主将'){ - trigger.source.showCharacter(0); - game.broadcastAll(function(player){ - player.node.avatar.classList.add('disabled'); - },trigger.source); - skills=lib.character[trigger.source.name][3]; - game.log(trigger.source,'失去了主将技能'); - } - else{ - trigger.source.showCharacter(1); - game.broadcastAll(function(player){ - player.node.avatar2.classList.add('disabled'); - },trigger.source); - skills=lib.character[trigger.source.name2][3]; - game.log(trigger.source,'失去了副将技能'); - } - var list=[]; - for(var i=0;i2) return 0; - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; - if(!ui.selected.cards.length&&card.name=='du') return 20; - var player=get.owner(card); - if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ - if(ui.selected.cards.length){ - return -1; - } - var players=game.filterPlayer(); - for(var i=0;i=3&& - get.attitude(players[i],player)>=3){ - return 11-get.value(card); - } - } - if(player.countCards('h')>player.hp) return 10-get.value(card); - if(player.countCards('h')>2) return 6-get.value(card); - return -1; - } - return 10-get.value(card); - }, - content:function(){ - target.gain(cards,player); - if(typeof player.storage.gzrende!='number'){ - player.storage.gzrende=0; - } - if(player.storage.gzrende>=0){ - player.storage.gzrende+=cards.length; - if(player.storage.gzrende>=3){ - player.recover(); - player.storage.gzrende=-1; - } - } - }, - ai:{ - order:function(skill,player){ - if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ - return 1; - } - return 10; - }, - result:{ - target:function(player,target){ - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - return -10; - } - if(target.hasJudge('lebu')) return 0; - var nh=target.countCards('h'); - var np=player.countCards('h'); - if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ - if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; - } - return Math.max(1,5-nh); - } - }, - effect:{ - target:function(card,player,target){ - if(player==target&&get.type(card)=='equip'){ - if(player.countCards('e',{subtype:get.subtype(card)})){ - var players=game.filterPlayer(); - for(var i=0;i0){ - return 0; + group:['zhangwu_gain','zhangwu_clear','zhangwu_count1','zhangwu_count2','zhangwu_count3'], + subSkill:{ + gain:{ + trigger:{global:['discardAfter','respondAfter','useCardAfter','equipAfter', + 'judgeAfter','useSkillAfter','phaseDrawBegin','phaseAfter']}, + forced:true, + filter:function(event,player){ + if(player.storage.zhangwu){ + for(var i=0;i=0) return 0; - if(player.hasCard(function(card){ - return get.tag(card,'damage')&&player.canUse(card,target,true,true); - })){ - if(target.maxHp>3) return -0.5; - return -1; - } - return 0; - } - } - } - }, - qingcheng_ai:{ - ai:{ - effect:{ - target:function(card){ - if(get.tag(card,'damage')) return 2; - } - } - } - }, - duoshi:{ - enable:'chooseToUse', - viewAs:{name:'yiyi'}, - usable:4, - filterCard:{color:'red'}, - viewAsFilter:function(player){ - return player.countCards('h',{color:'red'})>0; - }, - check:function(card){ - return 5-get.value(card); - } - }, - gzxiaoguo:{ - inherit:'xiaoguo', - content:function(){ - "step 0" - var nono=(Math.abs(get.attitude(player,trigger.player))<3); - if(get.damageEffect(trigger.player,player,player)<=0){ - nono=true; - } - var next=player.chooseToDiscard(get.prompt('gzxiaoguo',trigger.player),{type:'basic'}); - next.set('ai',function(card){ - if(_status.event.nono) return 0; - return 8-get.useful(card); - }); - next.set('logSkill',['gzxiaoguo',trigger.player]); - next.set('nono',nono); - "step 1" - if(result.bool){ - var nono=(get.damageEffect(trigger.player,player,trigger.player)>=0); - trigger.player.chooseToDiscard('he',{type:'equip'}).set('ai',function(card){ - if(_status.event.nono){ - return 0; - } - if(_status.event.player.hp==1) return 10-get.value(card); - return 9-get.value(card); - }).set('nono',nono); - } - else{ - event.finish(); - } - "step 2" - if(!result.bool){ - trigger.player.damage(); - } - }, - }, - _mingzhi1:{ - trigger:{player:'phaseBegin'}, - priority:19, - forced:true, - popup:false, - content:function(){ - "step 0" - var choice=1; - for(var i=0;i=2||(popu==1&&game.players.length<=4)){ - return Math.random()<0.5?3:(Math.random()<0.5?2:1); - } - if(choice==0) return 0; - if(get.population(group)>0&&player.wontYe()){ - return Math.random()<0.2?(Math.random()<0.5?3:(Math.random()<0.5?2:1)):0; - } - var nming=0; - for(var i=0;i
      【武圣】
      将“红色牌”改为“任意牌”
      【咆哮】
      增加描述“你使用的【杀】无视其他角色的防具”
      【龙胆】
      增加描述“你每发动一次‘龙胆’便摸一张牌”
      【烈弓】
      增加描述“你的攻击范围+1”
      【铁骑】
      将“若结果为红色”改为“若结果不为黑桃”
      ' + } + }, + jizhao:{ + derivation:'gzrende', + unique:true, + enable:'chooseToUse', + mark:true, + skillAnimation:true, + animationColor:'fire', + init:function(player){ + player.storage.jizhao=false; + }, + filter:function(event,player){ + if(player.storage.jizhao) return false; + if(event.type=='dying'){ + if(player!=event.dying) return false; + return true; + } + return false; + }, + content:function(){ + 'step 0' + player.awakenSkill('jizhao'); + player.storage.jizhao=true; + var num=player.maxHp-player.countCards('h'); + if(num>0){ + player.draw(num); + } + 'step 1' + if(player.hp<2){ + player.recover(2-player.hp); + } + 'step 2' + player.removeSkill('shouyue'); + player.removeSkill('wuhujiangdaqi'); + player.addSkill('gzrende'); + }, + ai:{ + order:1, + skillTagFilter:function(player){ + if(player.storage.jizhao) return false; + if(player.hp>0) return false; + }, + save:true, + result:{ + player:10 + }, + }, + intro:{ + content:'limited' + } + }, + gzshoucheng:{ + inherit:'shoucheng', + filter:function(event,player){ + if(event.player.countCards('h')) return false; + if(!event.player.isFriendOf(player)) return false; + if(_status.currentPhase==event.player) return false; + for(var i=0;i0; + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + filterCard:function(card){ + return get.type(card)=='equip'; + }, + position:'he', + filterTarget:function(card,player,target){ + return !target.getEquip(card); + }, + ai1:function(card){ + return 6-get.value(card); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target)-3; + }, + prompt:get.prompt('yuanhu') + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + player.logSkill('huyuan',target); + event.current=target; + target.equip(result.cards[0]); + if(target!=player){ + player.$give(result.cards,target); + } + game.delay(2); + player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){ + var source=_status.event.source; + return get.distance(source,target)<=1&&source!=target&&target.countCards('he'); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }).set('source',target); } else{ event.finish(); } - } - "step 1" - switch(result.control){ - case '明置'+get.translation(player.name1):player.showCharacter(0);break; - case '明置'+get.translation(player.name2):player.showCharacter(1);break; - case 'tongshimingzhi':player.showCharacter(2);break; - } - } - }, - _mingzhi2:{ - trigger:{player:'triggerHidden'}, - forced:true, - popup:false, - priority:10, - content:function(){ - "step 0" - if(get.info(trigger.skill).silent){ - event.finish(); - } - else{ - event.skillHidden=true; - var bool1=(game.expandSkills(lib.character[player.name1][3]).contains(trigger.skill)); - var bool2=(game.expandSkills(lib.character[player.name2][3]).contains(trigger.skill)); - var nai=function(){ - var player=_status.event.player; - if(!_status.event.yes) return false; - if(player.identity!='unknown') return true; - if(Math.random()<0.5) return true; - var info=get.info(_status.event.skill); - if(info&&info.ai&&info.ai.maixie) return true; - var group=lib.character[player.name1][1]; - var popu=get.population(lib.character[player.name1][1]) - if(popu>=2||(popu==1&&game.players.length<=4)){ - return true; + "step 2" + if(result.targets.length){ + event.current.line(result.targets,'green'); + player.discardPlayerCard(true,result.targets[0],'he'); + } + }, + }, + heyi:{ + zhenfa:'inline' + }, + _heyi:{ + mod:{ + globalTo:function(from,to,distance){ + if(game.hasPlayer(function(current){ + return current.hasSkill('heyi')&¤t.inline(to); + })){ + return distance+1; } - if(get.population(group)>0&&player.wontYe()){ - return Math.random()<0.2?true:false; + } + } + }, + tianfu:{ + init:function(player){ + player.checkMainSkill('tianfu'); + }, + inherit:'kanpo', + zhenfa:'inline', + viewAsFilter:function(player){ + return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.countCards('h',{color:'black'})>0; + }, + }, + yizhi:{ + init:function(player){ + if(player.checkViceSkill('yizhi')){ + player.removeMaxHp(); + } + }, + inherit:'guanxing', + filter:function(event,player){ + return !player.hasSkill('guanxing'); + } + }, + gzshangyi:{ + audio:'shangyi', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return player!=target&&(target.countCards('h')||target.isUnseen(2)); + }, + content:function(){ + "step 0" + target.viewCards(get.translation(player)+'的手牌',player.getCards('h')); + "step 1" + if(!target.countCards('h')){ + event._result={index:1}; + } + else if(!target.isUnseen(2)){ + event._result={index:0}; + } + else{ + player.chooseControl().set('choiceList',[ + '观看'+get.translation(target)+'的手牌并可以弃置其中的一张黑色牌', + '观看'+get.translation(target)+'的所有暗置的武将牌', + ]); + } + "step 2" + if(result.index==0){ + player.discardPlayerCard(target,'h').set('filterButton',function(button){ + return get.color(button.link)=='black'; + }).set('visible',true); + } + else{ + player.viewCharacter(target,2); + } + }, + ai:{ + order:11, + result:{ + target:function(player,target){ + return -target.countCards('h'); } - var nming=0; - for(var i=0;i1){ + return get.unuseful2(card); + } + return -1; + }); + "step 1" + if(result.bool==false){ + trigger.untrigger(); + trigger.directHit=true; + } + } + }, + fengshi:{ + zhenfa:'siege' + }, + _fengshi:{ + trigger:{player:'shaBegin'}, + filter:function(event,player){ + if(game.countPlayer()<4) return false; + return player.siege(event.target)&&game.hasPlayer(function(current){ + return current.hasSkill('fengshi')&¤t.siege(event.target); + })&&event.target.countCards('e'); + }, + logTarget:'target', + content:function(){ + trigger.target.chooseToDiscard('e',true); + } + }, + gzguixiu:{ + init2:function(player){ + player.logSkill('guixiu'); + player.draw(2); + }, + onremove:function(player){ + if(player.isDamaged()){ + player.logSkill('guixiu'); + player.recover(); + } + } + }, + gzcunsi:{ + derivation:'gzyongjue', + enable:'phaseUse', + filter:function(event,player){ + return player.checkMainSkill('gzcunsi',false)||player.checkViceSkill('gzcunsi',false); + }, + unique:true, + forceunique:true, + filterTarget:true, + skillAnimation:true, + content:function(){ + 'step 0' + if(player.checkMainSkill('gzcunsi',false)){ + player.removeCharacter(0); + } + else{ + player.removeCharacter(1); + } + 'step 1' + target.addSkill('gzyongjue'); + if(target!=player){ + target.draw(2); + } + }, + ai:{ + order:9, + result:{ + player:function(player,target){ + var num=0; + if(player.isDamaged()&&target.isFriendOf(player)){ + num++; + if(target.hasSkill('kanpo')) num+=0.5; + if(target.hasSkill('liegong')) num+=0.5; + if(target.hasSkill('tieji')) num+=0.5; + if(target.hasSkill('gzrende')) num+=1.2; + if(target.hasSkill('longdan')) num+=1.2; + if(target.hasSkill('paoxiao')) num+=1.2; + if(target.hasSkill('zhangwu')) num+=1.5; + if(target!=player) num+=0.5; + } + return num; + } + } + } + }, + gzyongjue:{ + trigger:{global:'useCardAfter'}, + filter:function(event,player){ + if(event.gzyongjue==player){ + for(var i=0;i0&&event.source&&event.source.isUnseen(2); + }, + content:function(){ + trigger.num--; + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return; + if(!player.isUnseen(2)) return; + var num=get.tag(card,'damage'); + if(num){ + if(num>1) return 0.5; + return 0; + } + } + } + }, + }, + hunshang:{ + init:function(player){ + if(player.checkViceSkill('hunshang')){ + player.removeMaxHp(); + } + }, + group:['hunshang_yingzi','hunshang_yinghun'], + }, + hunshang_yingzi:{ + inherit:'yingzi', + filter:function(event,player){ + return player.hp<=1&&!player.hasSkill('yingzi'); + } + }, + hunshang_yinghun:{ + inherit:'gzyinghun', + filter:function(event,player){ + return player.hp<=1&&player.isDamaged()&&!player.hasSkill('gzyinghun'); + } + }, + yingyang:{ + trigger:{player:'compare',target:'compare'}, + filter:function(event){ + return !event.iwhile; + }, + content:function(){ + if(player==trigger.player){ + trigger.num1+=3; } else{ - event.name=bool1?player.name1:player.name2; + trigger.num2+=3; } - var info=get.info(trigger.skill); - var next=player.chooseBool('是否明置'+get.translation(event.name)+'以发动【'+get.translation(trigger.skill)+'】?'); - next.yes=!info.check||info.check(trigger._trigger,player); - next.skill=trigger.skill; - next.ai=nai } - "step 1" - if(result.bool){ - if(event.name==player.name1) player.showCharacter(0); - else player.showCharacter(1); - trigger.revealed=true; - event.finish(); + }, + gzqianxi:{ + audio:'qianxi', + trigger:{player:'phaseBegin'}, + content:function(){ + "step 0" + player.judge(); + "step 1" + event.color=result.color; + player.chooseTarget(function(card,player,target){ + return player!=target&&get.distance(player,target)<=1; + },true).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 2" + if(result.bool&&result.targets.length){ + result.targets[0].storage.qianxi2=event.color; + result.targets[0].addSkill('qianxi2'); + player.line(result.targets,'green'); + game.addVideo('storage',result.targets[0],['qianxi2',event.color]); + } + }, + }, + gzduanchang:{ + audio:'duanchang', + trigger:{player:'dieBegin'}, + forced:true, + silent:true, + filter:function(event,player){ + return event.source&&event.source.isIn()&&event.source!=player&& + (event.source.hasMainCharacter()||event.source.hasViceCharacter()); + }, + content:function(){ + 'step 0' + if(!trigger.source.hasViceCharacter()){ + event._result={control:'主将'} + } + else if(!trigger.source.hasMainCharacter()){ + event._result={control:'副将'} + } + else{ + player.chooseControl('主将','副将',function(){ + return Math.random()<0.5?'主将':'副将'; + }).set('prompt','令'+get.translation(trigger.source)+'失去一张武将牌的所有技能'); + } + 'step 1' + var skills; + if(result.control=='主将'){ + trigger.source.showCharacter(0); + game.broadcastAll(function(player){ + player.node.avatar.classList.add('disabled'); + },trigger.source); + skills=lib.character[trigger.source.name][3]; + game.log(trigger.source,'失去了主将技能'); + } + else{ + trigger.source.showCharacter(1); + game.broadcastAll(function(player){ + player.node.avatar2.classList.add('disabled'); + },trigger.source); + skills=lib.character[trigger.source.name2][3]; + game.log(trigger.source,'失去了副将技能'); + } + var list=[]; + for(var i=0;i2) return 0; + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; + if(!ui.selected.cards.length&&card.name=='du') return 20; + var player=get.owner(card); + if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ + if(ui.selected.cards.length){ + return -1; + } + var players=game.filterPlayer(); + for(var i=0;i=3&& + get.attitude(players[i],player)>=3){ + return 11-get.value(card); + } + } + if(player.countCards('h')>player.hp) return 10-get.value(card); + if(player.countCards('h')>2) return 6-get.value(card); + return -1; + } + return 10-get.value(card); + }, + content:function(){ + target.gain(cards,player); + if(typeof player.storage.gzrende!='number'){ + player.storage.gzrende=0; + } + if(player.storage.gzrende>=0){ + player.storage.gzrende+=cards.length; + if(player.storage.gzrende>=3){ + player.recover(); + player.storage.gzrende=-1; + } + } + }, + ai:{ + order:function(skill,player){ + if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ + return 1; + } + return 10; + }, + result:{ + target:function(player,target){ + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + return -10; + } + if(target.hasJudge('lebu')) return 0; + var nh=target.countCards('h'); + var np=player.countCards('h'); + if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ + if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; + } + return Math.max(1,5-nh); + } + }, + effect:{ + target:function(card,player,target){ + if(player==target&&get.type(card)=='equip'){ + if(player.countCards('e',{subtype:get.subtype(card)})){ + var players=game.filterPlayer(); + for(var i=0;i0){ + return 0; + } + } + } + } + } + }, + threaten:0.8 + } + }, + gzrende1:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + popup:false, + silent:true, + content:function(){ + player.storage.gzrende=0; + } + }, + gzzhiheng:{ + inherit:'zhiheng', + selectCard:function(){ + return [1,_status.event.player.maxHp]; + }, + prompt:'出牌阶段限一次,你可以弃置至多X张牌(X为你的体力上限),然后摸等量的牌' + }, + huoshui:{ + enable:'phaseUse', + unique:true, + forceunique:true, + filter:function(event,player){ + if(player.name1=='gz_zoushi') return player.isUnseen(0); + return player.isUnseen(1); + }, + content:function(){ + if(player.name1=='gz_zoushi') player.showCharacter(0); + else player.showCharacter(1); + } + }, + _huoshui:{ + ai:{ + nomingzhi:true, + skillTagFilter:function(player){ + return _status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('huoshui'); + } + } + }, + qingcheng:{ + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',{type:'equip'})&&game.hasPlayer(function(current){ + return current!=player&&!current.isUnseen(2); + }); + }, + filterCard:{type:'equip'}, + position:'he', + filterTarget:function(card,player,target){ + return !target.isUnseen(2); + }, + check:function(card){ + return 6-get.value(card,_status.event.player); + }, + content:function(){ + 'step 0' + if(get.is.jun(target)){ + event._result={control:'副将'}; } else{ + var choice='主将'; + var skills=lib.character[target.name2][3]; + for(var i=0;i=0) return 0; + if(player.hasCard(function(card){ + return get.tag(card,'damage')&&player.canUse(card,target,true,true); + })){ + if(target.maxHp>3) return -0.5; + return -1; + } + return 0; + } + } + } + }, + qingcheng_ai:{ + ai:{ + effect:{ + target:function(card){ + if(get.tag(card,'damage')) return 2; + } + } + } + }, + duoshi:{ + enable:'chooseToUse', + viewAs:{name:'yiyi'}, + usable:4, + filterCard:{color:'red'}, + viewAsFilter:function(player){ + return player.countCards('h',{color:'red'})>0; + }, + check:function(card){ + return 5-get.value(card); + } + }, + gzxiaoguo:{ + inherit:'xiaoguo', + content:function(){ + "step 0" + var nono=(Math.abs(get.attitude(player,trigger.player))<3); + if(get.damageEffect(trigger.player,player,player)<=0){ + nono=true; + } + var next=player.chooseToDiscard(get.prompt('gzxiaoguo',trigger.player),{type:'basic'}); + next.set('ai',function(card){ + if(_status.event.nono) return 0; + return 8-get.useful(card); + }); + next.set('logSkill',['gzxiaoguo',trigger.player]); + next.set('nono',nono); + "step 1" + if(result.bool){ + var nono=(get.damageEffect(trigger.player,player,trigger.player)>=0); + trigger.player.chooseToDiscard('he',{type:'equip'}).set('ai',function(card){ + if(_status.event.nono){ + return 0; + } + if(_status.event.player.hp==1) return 10-get.value(card); + return 9-get.value(card); + }).set('nono',nono); + } + else{ + event.finish(); + } + "step 2" + if(!result.bool){ + trigger.player.damage(); + } + }, + }, + _mingzhi1:{ + trigger:{player:'phaseBegin'}, + priority:19, + forced:true, + popup:false, + content:function(){ + "step 0" + var choice=1; + for(var i=0;i=2||(popu==1&&game.players.length<=4)){ + return Math.random()<0.5?3:(Math.random()<0.5?2:1); + } + if(choice==0) return 0; + if(get.population(group)>0&&player.wontYe()){ + return Math.random()<0.2?(Math.random()<0.5?3:(Math.random()<0.5?2:1)):0; + } + var nming=0; + for(var i=0;i=2||(popu==1&&game.players.length<=4)){ + return true; + } + if(get.population(group)>0&&player.wontYe()){ + return Math.random()<0.2?true:false; + } + var nming=0; + for(var i=0;i=num){ - break; - } - } - } - else{ - if(!map[lib.character[list[i]][1]]){ - group=lib.character[list[i]][1]; - choice.push(list[i]); - list.splice(i--,1); - } - } - } - } - return choice; - }, - getState:function(){ - var state={}; - for(var i in lib.playerOL){ - var player=lib.playerOL[i]; - state[i]={ - identity:player.identity, - shown:player.ai.shown, - }; - } - return state; - }, - updateState:function(state){ - for(var i in state){ - var player=lib.playerOL[i]; - if(player){ - player.identity=state[i].identity; - player.ai.shown=state[i].shown; - } - } - }, - getRoomInfo:function(uiintro){ - var num,last; - if(lib.configOL.initshow_draw=='0'){ - num='关闭' - } - else{ - num=get.cnNumber(parseInt(lib.configOL.initshow_draw))+'张' - } - uiintro.add('
      首亮摸牌:'+num); - uiintro.add('
      珠联璧合:'+(lib.configOL.zhulian?'开启':'关闭')); - uiintro.add('
      出牌时限:'+lib.configOL.choose_timeout+'秒'); - uiintro.add('
      国战牌堆:'+(lib.configOL.guozhanpile?'开启':'关闭')); - last=uiintro.add('
      国战武将:'+(lib.configOL.onlyguozhan?'开启':'关闭')); - if(!lib.configOL.onlyguozhan){ - uiintro.add('
      屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); - last=uiintro.add('
      屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); - if(lib.configOL.banned.length){ - last=uiintro.add('
      禁用武将:'+get.translation(lib.configOL.banned)); - } - if(lib.configOL.bannedcards.length){ - last=uiintro.add('
      禁用卡牌:'+get.translation(lib.configOL.bannedcards)); - } - } - last.style.paddingBottom='8px'; - }, - addRecord:function(bool){ - if(typeof bool=='boolean'){ - var data=lib.config.gameRecord.guozhan.data; - var identity=game.me.identity; - if(!data[identity]){ - data[identity]=[0,0]; - } - if(bool){ - data[identity][0]++; - } - else{ - data[identity][1]++; - } - var list=['wei','shu','wu','qun','ye']; - var str=''; - for(var i=0;i'; - } - } - lib.config.gameRecord.guozhan.str=str; - game.saveConfig('gameRecord',lib.config.gameRecord); - } - }, - getIdentityList:function(player){ - if(!player.isUnseen()) return; - if(player==game.me) return; - var list={ - wei:'魏', - shu:'蜀', - wu:'吴', - qun:'群', - ye:'野', - unknown:'猜' - } - var num=Math.floor((game.players.length+game.dead.length)/2); - var noye=true; - if(get.population('wei')>=num){ - delete list.wei; - noye=false; - } - if(get.population('shu')>=num){ - delete list.shu; - noye=false; - } - if(get.population('wu')>=num){ - delete list.wu; - noye=false; - } - if(get.population('qun')>=num){ - delete list.qun; - noye=false; - } - if(noye){ - delete list.ye; - } - return list; - }, - getVideoName:function(){ - var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2); - var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+ - get.translation(lib.config.mode); - if(game.me.identity=='ye'){ - str2+=' - 野心家'; - } - var name=[str,str2]; - return name; - }, - showIdentity:function(started){ - if(game.phaseNumber==0&&!started) return; - for(var i=0;i1){ - check=false; - } - } - else{ - if(hasunknown&&!game.hasPlayer(function(current){ - return get.is.jun(current); - })){ - var players=game.players.concat(game.dead); - var num=0; - for(var i=0;iplayers.length/2){ - check=false; - } - } - } - } - if(check){ - game.checkResult(); - } - else if(!hasunknown){ - var ids=[]; - var idmap={}; - var idp={}; - for(var i=0;i1&&idmap[id2]>1) return; - if(idmap[id1]>1&&id1=='ye') return; - if(idmap[id2]>1&&id2=='ye') return; - if(idmap[id1]==1){ - idp[id1].showGiveup(); - } - if(idmap[id2]==1){ - idp[id2].showGiveup(); - } - } - }, - checkResult:function(){ - _status.overing=true; - for(var i=0;i0; - }, - chooseCharacter:function(){ - var next=game.createEvent('chooseCharacter',false); - next.showConfig=true; - next.addPlayer=true; - next.ai=function(player,list,back){ - if(_status.brawl&&_status.brawl.chooseCharacterAi){ - if(_status.brawl.chooseCharacterAi(player,list,back)!==false){ - return; - } - } - for(var i=0;i'; - td.link=i-1; - td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ - if(_status.dragged) return; - if(_status.justdragged) return; - if(_status.cheat_seat){ - _status.cheat_seat.classList.remove('thundertext'); - if(_status.cheat_seat==this){ - delete _status.cheat_seat; - return; - } - } - this.classList.add('thundertext'); - _status.cheat_seat=this; - }); - } - dialog.content.appendChild(seats); - if(game.me==game.zhu){ - seats.previousSibling.style.display='none'; - seats.style.display='none'; - } - - dialog.add(ui.create.div('.placeholder')); - dialog.add(ui.create.div('.placeholder')); - dialog.add(ui.create.div('.placeholder')); - }; - var removeSetting=function(){ - var dialog=_status.event.dialog; - if(dialog.querySelector('table')&&!get.config('change_identity')){ - dialog.querySelector('table').previousSibling.remove(); - dialog.querySelector('table').nextSibling.remove(); - dialog.querySelector('table').nextSibling.remove(); - dialog.querySelector('table').nextSibling.remove(); - dialog.querySelector('table').remove(); - } - }; - event.addSetting=addSetting; - event.removeSetting=removeSetting; - - var chosen=lib.config.continue_name||[]; - game.saveConfig('continue_name'); - event.chosen=chosen; - - var i; - event.list=[]; - for(i in lib.character){ - if(i.indexOf('gz_shibing')==0) continue; - if(chosen.contains(i)) continue; - if(lib.filter.characterDisabled(i)) continue; - if(get.config('onlyguozhan')){ - if(!lib.characterPack.mode_guozhan[i]) continue; - if(get.config('junzhu')){ - if(lib.junList.contains(i.slice(3))) continue; - } - else{ - if(get.is.jun(i)) continue; - } - } - if(lib.character[i][2]==3||lib.character[i][2]==4||lib.character[i][2]==5) - event.list.push(i); - } - _status.characterlist=event.list.slice(0); - _status.yeidentity=[]; - if(_status.brawl&&_status.brawl.chooseCharacterFilter){ - event.list=_status.brawl.chooseCharacterFilter(event.list); - } - event.list.randomSort(); - // var list=event.list.splice(0,parseInt(get.config('choice_num'))); - var list; - if(_status.brawl&&_status.brawl.chooseCharacter){ - list=_status.brawl.chooseCharacter(event.list,game.me); - } - else{ - list=game.getCharacterChoice(event.list,parseInt(get.config('choice_num'))); - } - if(_status.auto){ - event.ai(game.me,list); - lib.init.onfree(); - } - else if(chosen.length){ - game.me.init(chosen[0],chosen[1],false); - lib.init.onfree(); - } - else{ - var dialog=ui.create.dialog('选择角色','hidden',[list,'character']); - if(!_status.brawl||!_status.brawl.noAddSetting){ - if(get.config('change_identity')){ - addSetting(dialog); - } - } - var next=game.me.chooseButton(dialog,true,2).set('onfree',true); - next.filterButton=function(button){ - if(ui.dialog.buttons.length<=10){ - for(var i=0;i=num){ + break; + } + } } else{ - if(get.is.jun(i)) continue; - } - list.push(i); - } - } - else{ - list=get.charactersOL(); - } - _status.characterlist=list.slice(0); - _status.yeidentity=[]; - event.list=list.slice(0); - var list2=[]; - var num; - if(lib.configOL.number*6>list.length){ - num=5; - } - else if(lib.configOL.number*7>list.length){ - num=6; - } - else{ - num=7; - } - var filterButton=function(button){ - if(ui.dialog){ - if(ui.dialog.buttons.length<=10){ - for(var i=0;i首亮摸牌:'+num); + uiintro.add('
      珠联璧合:'+(lib.configOL.zhulian?'开启':'关闭')); + uiintro.add('
      出牌时限:'+lib.configOL.choose_timeout+'秒'); + uiintro.add('
      国战牌堆:'+(lib.configOL.guozhanpile?'开启':'关闭')); + last=uiintro.add('
      国战武将:'+(lib.configOL.onlyguozhan?'开启':'关闭')); + if(!lib.configOL.onlyguozhan){ + uiintro.add('
      屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); + last=uiintro.add('
      屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); + if(lib.configOL.banned.length){ + last=uiintro.add('
      禁用武将:'+get.translation(lib.configOL.banned)); + } + if(lib.configOL.bannedcards.length){ + last=uiintro.add('
      禁用卡牌:'+get.translation(lib.configOL.bannedcards)); + } + } + last.style.paddingBottom='8px'; + }, + addRecord:function(bool){ + if(typeof bool=='boolean'){ + var data=lib.config.gameRecord.guozhan.data; + var identity=game.me.identity; + if(!data[identity]){ + data[identity]=[0,0]; + } + if(bool){ + data[identity][0]++; + } + else{ + data[identity][1]++; + } + var list=['wei','shu','wu','qun','ye']; + var str=''; + for(var i=0;i'; + } + } + lib.config.gameRecord.guozhan.str=str; + game.saveConfig('gameRecord',lib.config.gameRecord); + } + }, + getIdentityList:function(player){ + if(!player.isUnseen()) return; + if(player==game.me) return; + var list={ + wei:'魏', + shu:'蜀', + wu:'吴', + qun:'群', + ye:'野', + unknown:'猜' + } + var num=Math.floor((game.players.length+game.dead.length)/2); + var noye=true; + if(get.population('wei')>=num){ + delete list.wei; + noye=false; + } + if(get.population('shu')>=num){ + delete list.shu; + noye=false; + } + if(get.population('wu')>=num){ + delete list.wu; + noye=false; + } + if(get.population('qun')>=num){ + delete list.qun; + noye=false; + } + if(noye){ + delete list.ye; + } + return list; + }, + getVideoName:function(){ + var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2); + var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+ + get.translation(lib.config.mode); + if(game.me.identity=='ye'){ + str2+=' - 野心家'; + } + var name=[str,str2]; + return name; + }, + showIdentity:function(started){ + if(game.phaseNumber==0&&!started) return; for(var i=0;i1){ + check=false; } } else{ - result[i]=result[i].links - } - if(!lib.playerOL[i].name){ - lib.playerOL[i].init(result[i][0],result[i][1],false); - } - } - - for(var i=0;iplayers.length/2){ + check=false; + } } } - for(var j=0;j1&&idmap[id2]>1) return; + if(idmap[id1]>1&&id1=='ye') return; + if(idmap[id2]>1&&id2=='ye') return; + if(idmap[id1]==1){ + idp[id1].showGiveup(); + } + if(idmap[id2]==1){ + idp[id2].showGiveup(); } } - game.broadcastAll(function(result){ - for(var i in result){ - if(!lib.playerOL[i].name){ - lib.playerOL[i].init(result[i][0],result[i][1],false); + }, + checkResult:function(){ + _status.overing=true; + for(var i=0;i0; + }, + chooseCharacter:function(){ + var next=game.createEvent('chooseCharacter',false); + next.showConfig=true; + next.addPlayer=true; + next.ai=function(player,list,back){ + if(_status.brawl&&_status.brawl.chooseCharacterAi){ + if(_status.brawl.chooseCharacterAi(player,list,back)!==false){ + return; + } + } + for(var i=0;i'; + td.link=i-1; + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + if(_status.cheat_seat){ + _status.cheat_seat.classList.remove('thundertext'); + if(_status.cheat_seat==this){ + delete _status.cheat_seat; + return; + } + } + this.classList.add('thundertext'); + _status.cheat_seat=this; + }); + } + dialog.content.appendChild(seats); + if(game.me==game.zhu){ + seats.previousSibling.style.display='none'; + seats.style.display='none'; + } + + dialog.add(ui.create.div('.placeholder')); + dialog.add(ui.create.div('.placeholder')); + dialog.add(ui.create.div('.placeholder')); + }; + var removeSetting=function(){ + var dialog=_status.event.dialog; + if(dialog.querySelector('table')&&!get.config('change_identity')){ + dialog.querySelector('table').previousSibling.remove(); + dialog.querySelector('table').nextSibling.remove(); + dialog.querySelector('table').nextSibling.remove(); + dialog.querySelector('table').nextSibling.remove(); + dialog.querySelector('table').remove(); + } + }; + event.addSetting=addSetting; + event.removeSetting=removeSetting; + + var chosen=lib.config.continue_name||[]; + game.saveConfig('continue_name'); + event.chosen=chosen; + + var i; + event.list=[]; + for(i in lib.character){ + if(i.indexOf('gz_shibing')==0) continue; + if(chosen.contains(i)) continue; + if(lib.filter.characterDisabled(i)) continue; + if(get.config('onlyguozhan')){ + if(!lib.characterPack.mode_guozhan[i]) continue; + if(get.config('junzhu')){ + if(lib.junList.contains(i.slice(3))) continue; + } + else{ + if(get.is.jun(i)) continue; + } + } + if(lib.character[i][2]==3||lib.character[i][2]==4||lib.character[i][2]==5) + event.list.push(i); + } + _status.characterlist=event.list.slice(0); + _status.yeidentity=[]; + if(_status.brawl&&_status.brawl.chooseCharacterFilter){ + event.list=_status.brawl.chooseCharacterFilter(event.list); + } + event.list.randomSort(); + // var list=event.list.splice(0,parseInt(get.config('choice_num'))); + var list; + if(_status.brawl&&_status.brawl.chooseCharacter){ + list=_status.brawl.chooseCharacter(event.list,game.me); + } + else{ + list=game.getCharacterChoice(event.list,parseInt(get.config('choice_num'))); + } + if(_status.auto){ + event.ai(game.me,list); + lib.init.onfree(); + } + else if(chosen.length){ + game.me.init(chosen[0],chosen[1],false); + lib.init.onfree(); + } + else{ + var dialog=ui.create.dialog('选择角色','hidden',[list,'character']); + if(!_status.brawl||!_status.brawl.noAddSetting){ + if(get.config('change_identity')){ + addSetting(dialog); + } + } + var next=game.me.chooseButton(dialog,true,2).set('onfree',true); + next.filterButton=function(button){ + if(ui.dialog.buttons.length<=10){ + for(var i=0;ilist.length){ + num=5; + } + else if(lib.configOL.number*7>list.length){ + num=6; + } + else{ + num=7; + } + var filterButton=function(button){ + if(ui.dialog){ + if(ui.dialog.buttons.length<=10){ + for(var i=0;i每当你失去体力时,你可改为将一张“天兵”置入弃牌堆。
      与你势力相同的角色可将一张“天兵”当【杀】使用或打出。', - wuhujiangdaqi:'五虎将大旗', - wuhujiangdaqi_bg:'旗', - wuhujiangdaqi_info:'存活的蜀势力角色的技能按以下规则改动:
      武圣:将“红色牌”改为“任意牌”
      咆哮:增加描述“你使用的【杀】无视其他角色的防具”
      龙胆:增加描述“你每发动一次‘龙胆’便摸一张牌”
      烈弓:增加描述“你的攻击范围+1”
      铁骑:将“若结果为红色”改为“若结果不为黑桃”', - zhangwu:'章武', - zhangwu_info:'锁定技。当【飞龙夺凤】进入弃牌堆或其他角色的装备区时,你获得之。当你失去【飞龙夺风】时,展示之,然后将此牌置于牌堆底并摸两张牌', - shouyue:'授钺', - shouyue_info:'君主技。只要此武将牌处于明置状态,你便拥有“五虎将大旗”', - jizhao:'激诏', - jizhao_bg:'诏', - jizhao_info:'限定技。当你处于濒死状态时,你可以将手牌补至体力上限,体力回复至2点,失去技能“授钺”并获得技能“仁德”', - gzshoucheng:'守成', - gzshoucheng_info:'当与你势力相同的一名角色于其回合外失去最后手牌时,你可以令其摸一张牌', - gzmingshi:'名士', - gzmingshi_info:'锁定技,当你受到伤害时,若伤害来源有暗置的武将牌,此伤害-1', - fengshi:'锋矢', - _fengshi:'锋矢', - fengshi_info:'阵法技,在同一个围攻关系中,若你是围攻角色,则你或另一名围攻角色使用【杀】指定被围攻角色为目标后,可令该角色弃置装备区里的一张牌', - gzsuishi:'随势', - gzsuishi_info:'锁定技,当其他角色进入濒死状态时,若伤害来源与你势力相同,你摸一张牌;当其他角色死亡时,若其与你势力相同,你失去1点体力', - baoling:'暴凌', - baoling_info:'主将技,锁定技,出牌阶段结束时,若你有副将,则你移除副将,然后加3点体力上限,回复3点体力,并获得“崩坏”', - yingyang:'鹰扬', - yingyang_info:'当你拼点的牌亮出后,你可以令此牌的点数+3或-3', - hunshang:'魂殇', - hunshang_info:'副将技,此武将牌减少半个阴阳鱼;准备阶段,若你的体力值不大于1,则你本回合获得“英姿”和“英魂”', - gzguixiu:'闺秀', - gzguixiu_info:'当你明置此武将牌时,你摸两张牌;当你失去此技能时,你回复1点体力', - gzcunsi:'存嗣', - gzcunsi_info:'出牌阶段,你可以移除此武将牌并选择一名角色,然后其获得技能“勇决”,若你没有获得“勇决”,则获得“勇决”的角色摸两张牌', - gzyongjue:'勇决', - gzyongjue_info:'若与你势力相同的一名角色于其回合内使用的第一张牌为【杀】,则该角色可以在此【杀】结算完成后获得之', - gzqianxi:'潜袭', - gzqianxi_info:'准备阶段开始时,你可以进行判定,然后你选择距离为1的一名角色,直到回合结束,该角色不能使用或打出与结果颜色相同的手牌', - gzshangyi:'尚义', - gzshangyi_info:'出牌阶段限一次,你可以令一名其他角色观看你的手牌。若如此做,你选择一项:1.观看其手牌并可以弃置其中的一张黑色牌;2.观看其所有暗置的武将牌', - niaoxiang:'鸟翔', - _niaoxiang:'鸟翔', - niaoxiang_info:'阵法技,在同一个围攻关系中,若你是围攻角色,则你或另一名围攻角色使用【杀】指定被围攻角色为目标后,你令该角色需依次使用两张【闪】才能抵消', - yicheng:'疑城', - yicheng_info:'当与你势力相同的一名角色成为【杀】的目标后,你可以令该角色摸一张牌然后弃置一张牌', - yizhi:'遗志', - yizhi_info:'副将技,此武将牌上单独的阴阳鱼个数-1。若你的主将拥有技能“观星”,则将其描述中的X改为5;若你的主将没有技能“观星”,则你拥有技能“观星”', - tianfu:'天覆', - tianfu_info:'主将技,阵法技,若当前回合角色与你处于同一队列,你拥有技能“看破”', - ziliang:'资粮', - ziliang_info:'副将技,当与你势力相同的一名角色受到伤害后,你可以将一张“田”交给该角色', - gzjixi:'急袭', - gzjixi_info:'主将技,此武将牌减少半个阴阳鱼;你可以将一张“田”当【顺手牵羊】使用', - huyuan:'护援', - huyuan_info:'结束阶段开始时,你可以将一张装备牌置入一名角色的装备区,然后你可以弃置该角色距离为1的一名角色的一张牌', - heyi:'鹤翼', - heyi_info:'阵法技,与你处于同一队列的其他角色防御距离+1', - gz_shibing1wei:'魏兵', - gz_shibing2wei:'魏兵', - gz_shibing1shu:'蜀兵', - gz_shibing2shu:'蜀兵', - gz_shibing1wu:'吴兵', - gz_shibing2wu:'吴兵', - gz_shibing1qun:'群兵', - gz_shibing2qun:'群兵', - gzduanchang:'断肠', - gzduanchang_info:'锁定技,当你死亡时,你令杀死你的角色失去一张武将牌的所有技能', - gzweimu:'帷幕', - gzweimu_info:'锁定技,当你成为黑色锦囊牌的目标时,则取消之', - gzqianxun:'谦逊', - gzqianxun_info:'锁定技,当你成为顺手牵羊或乐不思蜀的目标时,则取消之', - gzkongcheng:'空城', - gzkongcheng_info:'锁定技,当你成为【杀】或【决斗】的目标时,若你没有手牌,则取消之', - gzxiaoji:'枭姬', - gzxiaoji_info:'当你失去装备区里的牌后,你可以摸两张牌', - gzrende:'仁德', - gzrende_info:'出牌阶段,你可以将任意张手牌交给其他角色,然后若你于此阶段内给出第三张“仁德”牌时,你回复1点体力', - gzzhiheng:'制衡', - gzzhiheng_info:'出牌阶段限一次,你可以弃置至多X张牌(X为你的体力上限),然后摸等量的牌', - huoshui:'祸水', - huoshui_info:'出牌阶段,你可以明置此武将牌;你的回合内,若此武将牌处于明置状态,其他角色不能明置其武将牌', - qingcheng:'倾城', - qingcheng_info:'出牌阶段,你可以弃置一张装备牌并选择一名两张武将牌均明置的其他角色,你暗置其一张武将牌', - duoshi:'度势', - duoshi_info:'出牌阶段限四次,你可以将一张红色手牌当【以逸待劳】使用。', - gzxiaoguo:'骁果', - gzxiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌;2.受到你对其造成的1点伤害。', - }, - junList:['liubei','zhangjiao'], - guozhanPile:[ - ["spade",7,"sha"], - ["spade",8,"sha"], - ["spade",8,"sha"], - ["spade",9,"sha"], - ["spade",9,"sha"], - ["spade",10,"sha"], - ["spade",10,"sha"], - ["club",2,"sha"], - ["club",3,"sha"], - ["club",4,"sha"], - ["club",5,"sha"], - ["club",6,"sha"], - ["club",7,"sha"], - ["club",8,"sha"], - ["club",8,"sha"], - ["club",9,"sha"], - ["club",9,"sha"], - ["club",10,"sha"], - ["club",10,"sha"], - ["club",11,"sha"], - ["club",11,"sha"], - ["heart",10,"sha"], - ["heart",10,"sha"], - ["heart",11,"sha"], - ["diamond",6,"sha"], - ["diamond",7,"sha"], - ["diamond",8,"sha"], - ["diamond",9,"sha"], - ["diamond",10,"sha"], - ["diamond",13,"sha"], - ["heart",2,"shan"], - ["heart",2,"shan"], - ["heart",13,"shan"], - ["diamond",2,"shan"], - ["diamond",2,"shan"], - ["diamond",3,"shan"], - ["diamond",4,"shan"], - ["diamond",5,"shan"], - ["diamond",6,"shan"], - ["diamond",7,"shan"], - ["diamond",8,"shan"], - ["diamond",9,"shan"], - ["diamond",10,"shan"], - ["diamond",11,"shan"], - ["diamond",11,"shan"], - ["heart",3,"tao"], - ["heart",4,"tao"], - ["heart",6,"tao"], - ["heart",7,"tao"], - ["heart",8,"tao"], - ["heart",9,"tao"], - ["heart",12,"tao"], - ["diamond",12,"tao"], - - ["spade",2,"bagua"], - ["club",2,"bagua"], - ["spade",5,"jueying"], - ["club",5,"dilu"], - ["heart",13,"zhuahuang"], - ["heart",5,"chitu"], - ["spade",13,"dawan"], - ["diamond",13,"zixin"], - ["club",1,"zhuge"], - ["diamond",1,"zhuge"], - ["spade",2,"feilongduofeng"], - ["spade",6,"qinggang"], - ["spade",5,"qinglong"], - ["spade",12,"zhangba"], - ["diamond",5,"guanshi"], - ["diamond",12,"fangtian"], - ["heart",5,"qilin"], - - ["heart",3,"wugu"], - ["heart",4,"wugu"], - ["heart",1,"taoyuan"], - ["spade",7,"nanman"], - ["spade",13,"nanman"], - ["club",7,"nanman"], - ["heart",1,"wanjian"], - ["spade",1,"juedou"], - ["club",1,"juedou"], - ["diamond",1,"juedou"], - ["heart",7,"wuzhong"], - ["heart",8,"wuzhong"], - ["heart",9,"wuzhong"], - ["heart",11,"wuzhong"], - ["spade",3,'shunshou'], - ["spade",4,'shunshou'], - ["spade",11,'shunshou'], - ["diamond",3,'shunshou'], - ["diamond",4,'shunshou'], - ["spade",3,'guohe'], - ["spade",4,'guohe'], - ["spade",12,'guohe'], - ["club",3,'guohe'], - ["club",4,'guohe'], - ["heart",12,'guohe'], - ["club",12,'jiedao'], - ["club",13,'jiedao'], - ["spade",11,'wuxie'], - ["club",12,'wuxie'], - ["club",13,'wuxie'], - ["spade",6,'lebu'], - ["club",6,'lebu'], - ["heart",6,'lebu'], - ["spade",1,'shandian','thunder'], - ["spade",2,'hanbing'], - ["club",2,'renwang'], - ["heart",12,'shandian','thunder'], - ["diamond",12,'wuxie'], - - ["heart",4,"sha","fire"], - ["heart",7,"sha","fire"], - ["heart",10,"sha","fire"], - ["diamond",4,"sha","fire"], - ["diamond",5,"sha","fire"], - ["spade",4,"sha","thunder"], - ["spade",5,"sha","thunder"], - ["spade",6,"sha","thunder"], - ["spade",7,"sha","thunder"], - ["spade",8,"sha","thunder"], - ["club",5,"sha","thunder"], - ["club",6,"sha","thunder"], - ["club",7,"sha","thunder"], - ["club",8,"sha","thunder"], - ["heart",8,"shan"], - ["heart",9,"shan"], - ["heart",11,"shan"], - ["heart",12,"shan"], - ["diamond",6,"shan"], - ["diamond",7,"shan"], - ["diamond",8,"shan"], - ["diamond",10,"shan"], - ["diamond",11,"shan"], - ["heart",5,"tao"], - ["heart",6,"tao"], - ["diamond",2,"tao"], - ["diamond",3,"tao"], - ["diamond",9,"jiu"], - ["spade",3,"jiu"], - ["spade",9,"jiu"], - ["club",3,"jiu"], - ["club",9,"jiu"], - - ["diamond",13,"hualiu"], - ["club",1,"baiyin"], - ["spade",2,"tengjia",'fire'], - ["club",2,"tengjia",'fire'], - ["spade",1,"guding"], - ["diamond",1,"zhuque",'fire'], - - ["heart",2,"huogong","fire"], - ["heart",3,"huogong","fire"], - ["diamond",12,"huogong","fire"], - ["spade",11,"tiesuo"], - ["spade",12,"tiesuo"], - ["club",10,"tiesuo"], - ["club",11,"tiesuo"], - ["club",12,"tiesuo"], - ["club",13,"tiesuo"], - ["heart",13,"wuxie"], - ["heart",13,"wuxie"], - ["spade",13,"wuxie"], - ["spade",10,"bingliang"], - ["club",4,"bingliang"], - - ['heart',9,'yuanjiao'], - ['club',3,'zhibi'], - ['club',4,'zhibi'], - ['diamond',4,'yiyi'], - ['heart',11,'yiyi'], - ['diamond',6,'wuliu'], - ['diamond',12,'sanjian'], - ['heart',3,'jingfanma'], - ["spade",4,'shunshou'], - ["spade",12,'guohe'], - ["spade",11,'wuxie'], - ['spade',3,'huoshaolianying','fire'], - ['club',11,'huoshaolianying','fire'], - ['heart',12,'huoshaolianying','fire'], - ['club',2,'huxinjing'], - ['heart',2,'diaohulishan'], - ['diamond',10,'diaohulishan'], - ['heart',1,'lianjunshengyan'], - ['club',3,'chiling'], - ['spade',12,'lulitongxin'], - ['club',10,'lulitongxin'], - ['club',12,'shuiyanqijunx'], - ['heart',13,'shuiyanqijunx'], - ['spade',1,'xietianzi'], - ['diamond',1,'xietianzi'], - ['diamond',4,'xietianzi'], - ['club',1,'yuxi'], - ['heart',3,'taipingyaoshu'], - ], - element:{ - content:{ - zhulian:function(){ - player.popup('珠联璧合'); - game.log(player,'发动了【珠联璧合】'); - player.chooseDrawRecover(2,true,'珠联璧合:摸两张牌或回复一点体力'); + for(var i=0;i每当你失去体力时,你可改为将一张“天兵”置入弃牌堆。
      与你势力相同的角色可将一张“天兵”当【杀】使用或打出。', + wuhujiangdaqi:'五虎将大旗', + wuhujiangdaqi_bg:'旗', + wuhujiangdaqi_info:'存活的蜀势力角色的技能按以下规则改动:
      武圣:将“红色牌”改为“任意牌”
      咆哮:增加描述“你使用的【杀】无视其他角色的防具”
      龙胆:增加描述“你每发动一次‘龙胆’便摸一张牌”
      烈弓:增加描述“你的攻击范围+1”
      铁骑:将“若结果为红色”改为“若结果不为黑桃”', + zhangwu:'章武', + zhangwu_info:'锁定技。当【飞龙夺凤】进入弃牌堆或其他角色的装备区时,你获得之。当你失去【飞龙夺风】时,展示之,然后将此牌置于牌堆底并摸两张牌', + shouyue:'授钺', + shouyue_info:'君主技。只要此武将牌处于明置状态,你便拥有“五虎将大旗”', + jizhao:'激诏', + jizhao_bg:'诏', + jizhao_info:'限定技。当你处于濒死状态时,你可以将手牌补至体力上限,体力回复至2点,失去技能“授钺”并获得技能“仁德”', + gzshoucheng:'守成', + gzshoucheng_info:'当与你势力相同的一名角色于其回合外失去最后手牌时,你可以令其摸一张牌', + gzmingshi:'名士', + gzmingshi_info:'锁定技,当你受到伤害时,若伤害来源有暗置的武将牌,此伤害-1', + fengshi:'锋矢', + _fengshi:'锋矢', + fengshi_info:'阵法技,在同一个围攻关系中,若你是围攻角色,则你或另一名围攻角色使用【杀】指定被围攻角色为目标后,可令该角色弃置装备区里的一张牌', + gzsuishi:'随势', + gzsuishi_info:'锁定技,当其他角色进入濒死状态时,若伤害来源与你势力相同,你摸一张牌;当其他角色死亡时,若其与你势力相同,你失去1点体力', + baoling:'暴凌', + baoling_info:'主将技,锁定技,出牌阶段结束时,若你有副将,则你移除副将,然后加3点体力上限,回复3点体力,并获得“崩坏”', + yingyang:'鹰扬', + yingyang_info:'当你拼点的牌亮出后,你可以令此牌的点数+3或-3', + hunshang:'魂殇', + hunshang_info:'副将技,此武将牌减少半个阴阳鱼;准备阶段,若你的体力值不大于1,则你本回合获得“英姿”和“英魂”', + gzguixiu:'闺秀', + gzguixiu_info:'当你明置此武将牌时,你摸两张牌;当你失去此技能时,你回复1点体力', + gzcunsi:'存嗣', + gzcunsi_info:'出牌阶段,你可以移除此武将牌并选择一名角色,然后其获得技能“勇决”,若你没有获得“勇决”,则获得“勇决”的角色摸两张牌', + gzyongjue:'勇决', + gzyongjue_info:'若与你势力相同的一名角色于其回合内使用的第一张牌为【杀】,则该角色可以在此【杀】结算完成后获得之', + gzqianxi:'潜袭', + gzqianxi_info:'准备阶段开始时,你可以进行判定,然后你选择距离为1的一名角色,直到回合结束,该角色不能使用或打出与结果颜色相同的手牌', + gzshangyi:'尚义', + gzshangyi_info:'出牌阶段限一次,你可以令一名其他角色观看你的手牌。若如此做,你选择一项:1.观看其手牌并可以弃置其中的一张黑色牌;2.观看其所有暗置的武将牌', + niaoxiang:'鸟翔', + _niaoxiang:'鸟翔', + niaoxiang_info:'阵法技,在同一个围攻关系中,若你是围攻角色,则你或另一名围攻角色使用【杀】指定被围攻角色为目标后,你令该角色需依次使用两张【闪】才能抵消', + yicheng:'疑城', + yicheng_info:'当与你势力相同的一名角色成为【杀】的目标后,你可以令该角色摸一张牌然后弃置一张牌', + yizhi:'遗志', + yizhi_info:'副将技,此武将牌上单独的阴阳鱼个数-1。若你的主将拥有技能“观星”,则将其描述中的X改为5;若你的主将没有技能“观星”,则你拥有技能“观星”', + tianfu:'天覆', + tianfu_info:'主将技,阵法技,若当前回合角色与你处于同一队列,你拥有技能“看破”', + ziliang:'资粮', + ziliang_info:'副将技,当与你势力相同的一名角色受到伤害后,你可以将一张“田”交给该角色', + gzjixi:'急袭', + gzjixi_info:'主将技,此武将牌减少半个阴阳鱼;你可以将一张“田”当【顺手牵羊】使用', + huyuan:'护援', + huyuan_info:'结束阶段开始时,你可以将一张装备牌置入一名角色的装备区,然后你可以弃置该角色距离为1的一名角色的一张牌', + heyi:'鹤翼', + heyi_info:'阵法技,与你处于同一队列的其他角色防御距离+1', + gz_shibing1wei:'魏兵', + gz_shibing2wei:'魏兵', + gz_shibing1shu:'蜀兵', + gz_shibing2shu:'蜀兵', + gz_shibing1wu:'吴兵', + gz_shibing2wu:'吴兵', + gz_shibing1qun:'群兵', + gz_shibing2qun:'群兵', + gzduanchang:'断肠', + gzduanchang_info:'锁定技,当你死亡时,你令杀死你的角色失去一张武将牌的所有技能', + gzweimu:'帷幕', + gzweimu_info:'锁定技,当你成为黑色锦囊牌的目标时,则取消之', + gzqianxun:'谦逊', + gzqianxun_info:'锁定技,当你成为顺手牵羊或乐不思蜀的目标时,则取消之', + gzkongcheng:'空城', + gzkongcheng_info:'锁定技,当你成为【杀】或【决斗】的目标时,若你没有手牌,则取消之', + gzxiaoji:'枭姬', + gzxiaoji_info:'当你失去装备区里的牌后,你可以摸两张牌', + gzrende:'仁德', + gzrende_info:'出牌阶段,你可以将任意张手牌交给其他角色,然后若你于此阶段内给出第三张“仁德”牌时,你回复1点体力', + gzzhiheng:'制衡', + gzzhiheng_info:'出牌阶段限一次,你可以弃置至多X张牌(X为你的体力上限),然后摸等量的牌', + huoshui:'祸水', + huoshui_info:'出牌阶段,你可以明置此武将牌;你的回合内,若此武将牌处于明置状态,其他角色不能明置其武将牌', + qingcheng:'倾城', + qingcheng_info:'出牌阶段,你可以弃置一张装备牌并选择一名两张武将牌均明置的其他角色,你暗置其一张武将牌', + duoshi:'度势', + duoshi_info:'出牌阶段限四次,你可以将一张红色手牌当【以逸待劳】使用。', + gzxiaoguo:'骁果', + gzxiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌;2.受到你对其造成的1点伤害。', + }, + junList:['liubei','zhangjiao'], + guozhanPile:[ + ["spade",7,"sha"], + ["spade",8,"sha"], + ["spade",8,"sha"], + ["spade",9,"sha"], + ["spade",9,"sha"], + ["spade",10,"sha"], + ["spade",10,"sha"], + ["club",2,"sha"], + ["club",3,"sha"], + ["club",4,"sha"], + ["club",5,"sha"], + ["club",6,"sha"], + ["club",7,"sha"], + ["club",8,"sha"], + ["club",8,"sha"], + ["club",9,"sha"], + ["club",9,"sha"], + ["club",10,"sha"], + ["club",10,"sha"], + ["club",11,"sha"], + ["club",11,"sha"], + ["heart",10,"sha"], + ["heart",10,"sha"], + ["heart",11,"sha"], + ["diamond",6,"sha"], + ["diamond",7,"sha"], + ["diamond",8,"sha"], + ["diamond",9,"sha"], + ["diamond",10,"sha"], + ["diamond",13,"sha"], + ["heart",2,"shan"], + ["heart",2,"shan"], + ["heart",13,"shan"], + ["diamond",2,"shan"], + ["diamond",2,"shan"], + ["diamond",3,"shan"], + ["diamond",4,"shan"], + ["diamond",5,"shan"], + ["diamond",6,"shan"], + ["diamond",7,"shan"], + ["diamond",8,"shan"], + ["diamond",9,"shan"], + ["diamond",10,"shan"], + ["diamond",11,"shan"], + ["diamond",11,"shan"], + ["heart",3,"tao"], + ["heart",4,"tao"], + ["heart",6,"tao"], + ["heart",7,"tao"], + ["heart",8,"tao"], + ["heart",9,"tao"], + ["heart",12,"tao"], + ["diamond",12,"tao"], + + ["spade",2,"bagua"], + ["club",2,"bagua"], + ["spade",5,"jueying"], + ["club",5,"dilu"], + ["heart",13,"zhuahuang"], + ["heart",5,"chitu"], + ["spade",13,"dawan"], + ["diamond",13,"zixin"], + ["club",1,"zhuge"], + ["diamond",1,"zhuge"], + ["spade",2,"feilongduofeng"], + ["spade",6,"qinggang"], + ["spade",5,"qinglong"], + ["spade",12,"zhangba"], + ["diamond",5,"guanshi"], + ["diamond",12,"fangtian"], + ["heart",5,"qilin"], + + ["heart",3,"wugu"], + ["heart",4,"wugu"], + ["heart",1,"taoyuan"], + ["spade",7,"nanman"], + ["spade",13,"nanman"], + ["club",7,"nanman"], + ["heart",1,"wanjian"], + ["spade",1,"juedou"], + ["club",1,"juedou"], + ["diamond",1,"juedou"], + ["heart",7,"wuzhong"], + ["heart",8,"wuzhong"], + ["heart",9,"wuzhong"], + ["heart",11,"wuzhong"], + ["spade",3,'shunshou'], + ["spade",4,'shunshou'], + ["spade",11,'shunshou'], + ["diamond",3,'shunshou'], + ["diamond",4,'shunshou'], + ["spade",3,'guohe'], + ["spade",4,'guohe'], + ["spade",12,'guohe'], + ["club",3,'guohe'], + ["club",4,'guohe'], + ["heart",12,'guohe'], + ["club",12,'jiedao'], + ["club",13,'jiedao'], + ["spade",11,'wuxie'], + ["club",12,'wuxie'], + ["club",13,'wuxie'], + ["spade",6,'lebu'], + ["club",6,'lebu'], + ["heart",6,'lebu'], + ["spade",1,'shandian','thunder'], + ["spade",2,'hanbing'], + ["club",2,'renwang'], + ["heart",12,'shandian','thunder'], + ["diamond",12,'wuxie'], + + ["heart",4,"sha","fire"], + ["heart",7,"sha","fire"], + ["heart",10,"sha","fire"], + ["diamond",4,"sha","fire"], + ["diamond",5,"sha","fire"], + ["spade",4,"sha","thunder"], + ["spade",5,"sha","thunder"], + ["spade",6,"sha","thunder"], + ["spade",7,"sha","thunder"], + ["spade",8,"sha","thunder"], + ["club",5,"sha","thunder"], + ["club",6,"sha","thunder"], + ["club",7,"sha","thunder"], + ["club",8,"sha","thunder"], + ["heart",8,"shan"], + ["heart",9,"shan"], + ["heart",11,"shan"], + ["heart",12,"shan"], + ["diamond",6,"shan"], + ["diamond",7,"shan"], + ["diamond",8,"shan"], + ["diamond",10,"shan"], + ["diamond",11,"shan"], + ["heart",5,"tao"], + ["heart",6,"tao"], + ["diamond",2,"tao"], + ["diamond",3,"tao"], + ["diamond",9,"jiu"], + ["spade",3,"jiu"], + ["spade",9,"jiu"], + ["club",3,"jiu"], + ["club",9,"jiu"], + + ["diamond",13,"hualiu"], + ["club",1,"baiyin"], + ["spade",2,"tengjia",'fire'], + ["club",2,"tengjia",'fire'], + ["spade",1,"guding"], + ["diamond",1,"zhuque",'fire'], + + ["heart",2,"huogong","fire"], + ["heart",3,"huogong","fire"], + ["diamond",12,"huogong","fire"], + ["spade",11,"tiesuo"], + ["spade",12,"tiesuo"], + ["club",10,"tiesuo"], + ["club",11,"tiesuo"], + ["club",12,"tiesuo"], + ["club",13,"tiesuo"], + ["heart",13,"wuxie"], + ["heart",13,"wuxie"], + ["spade",13,"wuxie"], + ["spade",10,"bingliang"], + ["club",4,"bingliang"], + + ['heart',9,'yuanjiao'], + ['club',3,'zhibi'], + ['club',4,'zhibi'], + ['diamond',4,'yiyi'], + ['heart',11,'yiyi'], + ['diamond',6,'wuliu'], + ['diamond',12,'sanjian'], + ['heart',3,'jingfanma'], + ["spade",4,'shunshou'], + ["spade",12,'guohe'], + ["spade",11,'wuxie'], + ['spade',3,'huoshaolianying','fire'], + ['club',11,'huoshaolianying','fire'], + ['heart',12,'huoshaolianying','fire'], + ['club',2,'huxinjing'], + ['heart',2,'diaohulishan'], + ['diamond',10,'diaohulishan'], + ['heart',1,'lianjunshengyan'], + ['club',3,'chiling'], + ['spade',12,'lulitongxin'], + ['club',10,'lulitongxin'], + ['club',12,'shuiyanqijunx'], + ['heart',13,'shuiyanqijunx'], + ['spade',1,'xietianzi'], + ['diamond',1,'xietianzi'], + ['diamond',4,'xietianzi'], + ['club',1,'yuxi'], + ['heart',3,'taipingyaoshu'], + ], + element:{ + content:{ + zhulian:function(){ + player.popup('珠联璧合'); + game.log(player,'发动了【珠联璧合】'); + player.chooseDrawRecover(2,true,'珠联璧合:摸两张牌或回复一点体力'); } }, - dieAfter:function(source){ - this.showCharacter(2); - if(get.is.jun(this.name1)){ - var yelist=[]; - for(var i=0;i0){ - min=Math.min(min,num); - } - } - return get.population(this.identity)==min; - }, - logAi:function(targets,card){ - if(this.ai.shown==1||this.isMad()) return; - if(typeof targets=='number'){ - this.ai.shown+=targets; - } - else{ - var effect=0,c,shown; - var info=get.info(card); - if(info.ai&&info.ai.expose){ - if(_status.event.name=='_wuxie'){ - if(_status.event.source&&_status.event.source.ai.shown){ - this.ai.shown+=0.2; + }, + inline:function(){ + if(this.identity=='unknown'||this.identity=='ye'||this.hasSkill('undist')) return false; + var next=this,previous=this; + var list=[]; + for(var i=0;next||previous;i++){ + if(next){ + next=next.getNext(); + if(next.identity!=this.identity||next==this){ + next=null; + } + else{ + list.add(next); } } - else{ - this.ai.shown+=info.ai.expose; + if(previous){ + previous=previous.getPrevious(); + if(previous.identity!=this.identity||previous==this){ + previous=null; + } + else{ + list.add(previous); + } } } - if(targets.length>0){ - for(var i=0;i0){ + min=Math.min(min,num); + } + } + return get.population(this.identity)==min; + }, + logAi:function(targets,card){ + if(this.ai.shown==1||this.isMad()) return; + if(typeof targets=='number'){ + this.ai.shown+=targets; + } + else{ + var effect=0,c,shown; + var info=get.info(card); + if(info.ai&&info.ai.expose){ + if(_status.event.name=='_wuxie'){ + if(_status.event.source&&_status.event.source.ai.shown){ + this.ai.shown+=0.2; + } + } + else{ + this.ai.shown+=info.ai.expose; + } + } + if(targets.length>0){ + for(var i=0;i0){ + if(effect<1) c=0.5; else c=1; - effect+=get.effect(targets[i],card,this)*c; + if(targets.length==1&&targets[0]==this); + else if(targets.length==1) this.ai.shown+=0.2*c; + else this.ai.shown+=0.1*c; } } - if(effect>0){ - if(effect<1) c=0.5; - else c=1; - if(targets.length==1&&targets[0]==this); - else if(targets.length==1) this.ai.shown+=0.2*c; - else this.ai.shown+=0.1*c; - } - } - if(this.ai.shown>0.95) this.ai.shown=0.95; - if(this.ai.shown<-0.5) this.ai.shown=-0.5; - }, - } - }, - get:{ - realAttitude:function(from,toidentity,difficulty){ - if(from.identity==toidentity&&toidentity!='ye'){ - return 4+difficulty; + if(this.ai.shown>0.95) this.ai.shown=0.95; + if(this.ai.shown<-0.5) this.ai.shown=-0.5; + }, } - if(from.identity=='unknown'&&lib.character[from.name1][1]==toidentity){ - if(from.wontYe()) return 4+difficulty; - } - var groups=[]; - for(var i=0;i=game.players.length/2){ - if(to_p<=from_p){ - return 0.5; - } - return 0; - } - if(to_p=get.population()-2){ - toidentity='ye'; + get:{ + realAttitude:function(from,toidentity,difficulty){ + if(from.identity==toidentity&&toidentity!='ye'){ + return 4+difficulty; } - } - var att=get.realAttitude(from,toidentity,difficulty); - if(from.storage.zhibi&&from.storage.zhibi.contains(to)){ - return att; - } - if(to.ai.shown>=0.5) return att*to.ai.shown; + if(from.identity=='unknown'&&lib.character[from.name1][1]==toidentity){ + if(from.wontYe()) return 4+difficulty; + } + var groups=[]; + for(var i=0;i=game.players.length/2&&att>=0){ + if(to_p==max) return -5; + if(from_p==max) return -2-get.population(toidentity); + if(max>=game.players.length/2){ + if(to_p<=from_p){ + return 0.5; + } return 0; } - return Math.min(0,Math.random()-0.5)+difficulty; - } - if(to.ai.shown>=0.2){ + if(to_p=get.population()-2){ + toidentity='ye'; + } + } + var att=get.realAttitude(from,toidentity,difficulty); + if(from.storage.zhibi&&from.storage.zhibi.contains(to)){ + return att; + } + if(to.ai.shown>=0.5) return att*to.ai.shown; + + var nshown=0; + for(var i=0;i=game.players.length/2&&att>=0){ + return 0; + } + return Math.min(0,Math.random()-0.5)+difficulty; + } + if(to.ai.shown>=0.2){ + if(att>2){ + return Math.max(0,Math.random()-0.5)+difficulty; + } + if(att>=0){ + return 0; + } + return Math.min(0,Math.random()-0.7)+difficulty; + } if(att>2){ - return Math.max(0,Math.random()-0.5)+difficulty; + return Math.max(0,Math.random()-0.7)+difficulty; } if(att>=0){ - return 0; + return Math.min(0,Math.random()-0.3)+difficulty; } - return Math.min(0,Math.random()-0.7)+difficulty; - } - if(att>2){ - return Math.max(0,Math.random()-0.7)+difficulty; - } - if(att>=0){ - return Math.min(0,Math.random()-0.3)+difficulty; - } - return Math.min(0,Math.random()-0.5)+difficulty; - }, - } + return Math.min(0,Math.random()-0.5)+difficulty; + }, + } + }; }); diff --git a/mode/identity.js b/mode/identity.js index e437b9cb4..788b60745 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -1,846 +1,1167 @@ 'use strict'; -game.import('mode',{ - name:'identity', - start:function(){ - "step 0" - if(!lib.config.new_tutorial){ - ui.arena.classList.add('only_dialog'); - } - _status.mode=get.config('identity_mode'); - if(_status.brawl&&_status.brawl.submode){ - _status.mode=_status.brawl.submode; - } - event.replacePile=function(){ - var list=['shengdong','qijia','caomu','jinchan','zengbin','fulei','qibaodao','zhungangshuo','lanyinjia']; - var map={ - shunshou:'shengdong', - jiedao:'qijia', - bingliang:'caomu', - wuxie:'jinchan', - wuzhong:'zengbin', - wugu:'zengbin', - shandian:'fulei', - qinggang:'qibaodao', - qinglong:'zhungangshuo', - bagua:'lanyinjia' - }; - for(var i=0;i跳过后,你可以在选项-其它中重置新手向导'); - ui.auto.hide(); - ui.create.control('跳过向导',function(){ - clear(); - clear2(); - game.resume(); - }); - ui.create.control('继续',step2); + _status.mode=get.config('identity_mode'); + if(_status.brawl&&_status.brawl.submode){ + _status.mode=_status.brawl.submode; } - var step2=function(){ - if(!lib.config.phonelayout){ - clear(); - ui.create.dialog('如果你在使用手机,可能会觉得按钮有点小'+ - ',将布局改成移动可以使按钮变大'); - ui.dialog.add('
      你可以在选项-外观-布局中更改此设置'); - var lcontrol=ui.create.control('使用移动布局',function(){ - if(lib.config.phonelayout){ - ui.control.firstChild.firstChild.innerHTML='使用移动布局'; - game.saveConfig('phonelayout',false); - lib.init.layout('mobile'); - } - else{ - ui.control.firstChild.firstChild.innerHTML='使用默认布局'; - game.saveConfig('phonelayout',true); - lib.init.layout('mobile'); - } + event.replacePile=function(){ + var list=['shengdong','qijia','caomu','jinchan','zengbin','fulei','qibaodao','zhungangshuo','lanyinjia']; + var map={ + shunshou:'shengdong', + jiedao:'qijia', + bingliang:'caomu', + wuxie:'jinchan', + wuzhong:'zengbin', + wugu:'zengbin', + shandian:'fulei', + qinggang:'qibaodao', + qinglong:'zhungangshuo', + bagua:'lanyinjia' + }; + for(var i=0;i跳过后,你可以在选项-其它中重置新手向导'); + ui.auto.hide(); + ui.create.control('跳过向导',function(){ + clear(); + clear2(); + game.resume(); }); - ui.create.control('继续',step3); + ui.create.control('继续',step2); } - else{ - step3(); - } - }; - var step3=function(){ - if(lib.config.touchscreen){ + var step2=function(){ + if(!lib.config.phonelayout){ + clear(); + ui.create.dialog('如果你在使用手机,可能会觉得按钮有点小'+ + ',将布局改成移动可以使按钮变大'); + ui.dialog.add('
      你可以在选项-外观-布局中更改此设置'); + var lcontrol=ui.create.control('使用移动布局',function(){ + if(lib.config.phonelayout){ + ui.control.firstChild.firstChild.innerHTML='使用移动布局'; + game.saveConfig('phonelayout',false); + lib.init.layout('mobile'); + } + else{ + ui.control.firstChild.firstChild.innerHTML='使用默认布局'; + game.saveConfig('phonelayout',true); + lib.init.layout('mobile'); + } + }); + ui.create.control('继续',step3); + } + else{ + step3(); + } + }; + var step3=function(){ + if(lib.config.touchscreen){ + clear(); + ui.create.dialog('触屏模式中,下划可以显示菜单,上划可以切换托管,双指单击可以暂停'); + ui.dialog.add('
      你可以在选项-通用-中更改手势设置'); + ui.create.control('继续',step4); + } + else{ + step4(); + } + }; + var step4=function(){ clear(); - ui.create.dialog('触屏模式中,下划可以显示菜单,上划可以切换托管,双指单击可以暂停'); - ui.dialog.add('
      你可以在选项-通用-中更改手势设置'); - ui.create.control('继续',step4); - } - else{ - step4(); - } - }; - var step4=function(){ - clear(); - ui.window.classList.add('noclick_important'); - ui.click.configMenu(); - ui.control.classList.add('noclick_click_important'); - ui.control.style.top='calc(100% - 105px)'; - ui.create.control('在菜单中,可以进行各项设置',function(){ - ui.click.menuTab('选项'); - ui.controls[0].replace('如果你感到游戏较卡,可以开启流畅模式',function(){ - ui.controls[0].replace('在技能一栏中,可以设置自动发动或双将禁配的技能',function(){ - ui.click.menuTab('武将'); - ui.controls[0].replace('在武将或卡牌一栏中,单击武将/卡牌可以将其禁用',function(){ - ui.click.menuTab('战局'); - ui.controls[0].replace('在战局中可以输入游戏命令,或者管理录像',function(){ - ui.click.menuTab('帮助'); - ui.controls[0].replace('在帮助中,可以检查更新和下载素材',function(){ - ui.click.configMenu(); - ui.window.classList.remove('noclick_important'); - ui.control.classList.remove('noclick_click_important'); - ui.control.style.top=''; - step5(); + ui.window.classList.add('noclick_important'); + ui.click.configMenu(); + ui.control.classList.add('noclick_click_important'); + ui.control.style.top='calc(100% - 105px)'; + ui.create.control('在菜单中,可以进行各项设置',function(){ + ui.click.menuTab('选项'); + ui.controls[0].replace('如果你感到游戏较卡,可以开启流畅模式',function(){ + ui.controls[0].replace('在技能一栏中,可以设置自动发动或双将禁配的技能',function(){ + ui.click.menuTab('武将'); + ui.controls[0].replace('在武将或卡牌一栏中,单击武将/卡牌可以将其禁用',function(){ + ui.click.menuTab('战局'); + ui.controls[0].replace('在战局中可以输入游戏命令,或者管理录像',function(){ + ui.click.menuTab('帮助'); + ui.controls[0].replace('在帮助中,可以检查更新和下载素材',function(){ + ui.click.configMenu(); + ui.window.classList.remove('noclick_important'); + ui.control.classList.remove('noclick_click_important'); + ui.control.style.top=''; + step5(); + }); }); }); }); }); - }); - }) - }; - var step5=function(){ - clear(); - ui.create.dialog('如果还有其它问题,欢迎来到百度无名杀吧进行交流'); - ui.create.control('完成',function(){ + }) + }; + var step5=function(){ clear(); - clear2(); - game.resume(); - }) - }; - game.pause(); - step1(); - } - else{ - if(!_status.connectMode){ - game.showChangeLog(); + ui.create.dialog('如果还有其它问题,欢迎来到百度无名杀吧进行交流'); + ui.create.control('完成',function(){ + clear(); + clear2(); + game.resume(); + }) + }; + game.pause(); + step1(); } - } - "step 3" - if(typeof _status.new_tutorial=='function'){ - _status.new_tutorial(); - } - delete _status.new_tutorial; - if(_status.connectMode){ - game.waitForPlayer(function(){ - if(lib.configOL.identity_mode=='zhong'){ - lib.configOL.number=8; - } - }); - } - "step 4" - if(_status.connectMode){ - _status.mode=lib.configOL.identity_mode; - if(_status.mode=='zhong'){ - lib.configOL.number=8; - if(lib.configOL.zhong_card){ - event.replacePile(); + else{ + if(!_status.connectMode){ + game.showChangeLog(); } } - if(lib.configOL.number<2){ - lib.configOL.number=2; + "step 3" + if(typeof _status.new_tutorial=='function'){ + _status.new_tutorial(); } - game.randomMapOL(); - } - else{ - for(var i=0;i=3) + game.waitForPlayer(function(){ + if(lib.configOL.identity_mode=='zhong'){ + lib.configOL.number=8; + } + }); + } + "step 4" + if(_status.connectMode){ + _status.mode=lib.configOL.identity_mode; + if(_status.mode=='zhong'){ + lib.configOL.number=8; + if(lib.configOL.zhong_card){ + event.replacePile(); + } + } + if(lib.configOL.number<2){ + lib.configOL.number=2; + } + game.randomMapOL(); } else{ - enhance_zhu=(_status.mode!='zhong'&&get.config('enhance_zhu')&&get.population('fan')>=3); - } - if(enhance_zhu){ - var skill; - switch(game.zhu.name){ - case 'liubei':skill='jizhen';break; - case 'dongzhuo':skill='hengzheng';break; - case 'sunquan':skill='batu';break; - case 'sp_zhangjiao':skill='tiangong';break; - case 'liushan':skill='shengxi';break; - case 'sunce':skill='ciqiu';break; - case 'yuanshao':skill='geju';break; - case 're_caocao':skill='dangping';break; - case 'caopi':skill='junxing';break; - case 'liuxie':skill='moukui';break; - default:skill='tianming';break; + for(var i=0;i游戏模式:'+(lib.configOL.identity_mode=='zhong'?'明忠':'标准')); - uiintro.add('
      双将模式:'+(lib.configOL.double_character?'开启':'关闭')); - if(lib.configOL.identity_mode!='zhong'){ - uiintro.add('
      双内奸:'+(lib.configOL.double_nei?'开启':'关闭')); - uiintro.add('
      加强主公:'+(lib.configOL.enhance_zhu?'开启':'关闭')); + },map); } else{ - uiintro.add('
      卡牌替换:'+(lib.configOL.zhong_card?'开启':'关闭')); - } - uiintro.add('
      出牌时限:'+lib.configOL.choose_timeout+'秒'); - uiintro.add('
      屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); - var last=uiintro.add('
      屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); - if(lib.configOL.banned.length){ - last=uiintro.add('
      禁用武将:'+get.translation(lib.configOL.banned)); - } - if(lib.configOL.bannedcards.length){ - last=uiintro.add('
      禁用卡牌:'+get.translation(lib.configOL.bannedcards)); - } - last.style.paddingBottom='8px'; - }, - getIdentityList:function(player){ - if(player.identityShown) return; - if(player==game.me) return; - if(_status.mode=='zhong'){ - if(game.zhu&&game.zhu.isZhu){ - return { - fan:'反', - zhong:'忠', - nei:'内', - cai:'猜', - } - } - else{ - return { - fan:'反', - zhong:'忠', - nei:'内', - zhu:'主', - cai:'猜', - } + for(var i=0;i'; - } - } - lib.config.gameRecord.identity.str=str; - game.saveConfig('gameRecord',lib.config.gameRecord); - } - }, - showIdentity:function(me){ - for(var i=0;i0) return; - if(game.zhong){ - game.zhong.identity='zhong'; - } - game.showIdentity(); - if(game.me.identity=='zhu'||game.me.identity=='zhong'){ - if(game.zhu.classList.contains('dead')){ - game.over(false); - } - else{ - game.over(true); - } - } - else if(game.me.identity=='nei'){ - if(game.players.length==1&&game.me.isAlive()){ - game.over(true); - } - else{ - game.over(false); - } - } - else{ - if((get.population('fan')+get.population('zhong')>0||get.population('nei')>1)&& - game.zhu.classList.contains('dead')){ - game.over(true); - } - else{ - game.over(false); - } - } - }, - checkOnlineResult:function(player){ - if(game.zhu.isAlive()){ - return (player.identity=='zhu'||player.identity=='zhong'); - } - else if(game.players.length==1&&game.players[0].identity=='nei'){ - return player.isAlive(); - } - else{ - return player.identity=='fan'; - } - }, - chooseCharacter:function(){ - var next=game.createEvent('chooseCharacter',false); - next.showConfig=true; - next.addPlayer=function(player){ - var list=lib.config.mode_config.identity.identity[game.players.length-3].slice(0); - var list2=lib.config.mode_config.identity.identity[game.players.length-2].slice(0); - for(var i=0;i=3) + } + else{ + enhance_zhu=(_status.mode!='zhong'&&get.config('enhance_zhu')&&get.population('fan')>=3); + } + if(enhance_zhu){ + var skill; + switch(game.zhu.name){ + case 'liubei':skill='jizhen';break; + case 'dongzhuo':skill='hengzheng';break; + case 'sunquan':skill='batu';break; + case 'sp_zhangjiao':skill='tiangong';break; + case 'liushan':skill='shengxi';break; + case 'sunce':skill='ciqiu';break; + case 'yuanshao':skill='geju';break; + case 're_caocao':skill='dangping';break; + case 'caopi':skill='junxing';break; + case 'liuxie':skill='moukui';break; + default:skill='tianming';break; + } + game.broadcastAll(function(player,skill){ + player.addSkill(skill); + player.storage.enhance_zhu=skill; + },game.zhu,skill); + } + } + game.syncState(); + event.trigger('gameStart'); + + var players=get.players(lib.sort.position); + var info=[]; + for(var i=0;i游戏模式:'+(lib.configOL.identity_mode=='zhong'?'明忠':'标准')); + uiintro.add('
      双将模式:'+(lib.configOL.double_character?'开启':'关闭')); + if(lib.configOL.identity_mode!='zhong'){ + uiintro.add('
      双内奸:'+(lib.configOL.double_nei?'开启':'关闭')); + uiintro.add('
      加强主公:'+(lib.configOL.enhance_zhu?'开启':'关闭')); + } + else{ + uiintro.add('
      卡牌替换:'+(lib.configOL.zhong_card?'开启':'关闭')); + } + uiintro.add('
      出牌时限:'+lib.configOL.choose_timeout+'秒'); + uiintro.add('
      屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); + var last=uiintro.add('
      屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); + if(lib.configOL.banned.length){ + last=uiintro.add('
      禁用武将:'+get.translation(lib.configOL.banned)); + } + if(lib.configOL.bannedcards.length){ + last=uiintro.add('
      禁用卡牌:'+get.translation(lib.configOL.bannedcards)); + } + last.style.paddingBottom='8px'; + }, + getIdentityList:function(player){ + if(player.identityShown) return; + if(player==game.me) return; + if(_status.mode=='zhong'){ + if(game.zhu&&game.zhu.isZhu){ + return { + fan:'反', + zhong:'忠', + nei:'内', + cai:'猜', + } + } + else{ + return { + fan:'反', + zhong:'忠', + nei:'内', + zhu:'主', + cai:'猜', + } + } + } + else{ + return { + fan:'反', + zhong:'忠', + nei:'内', + cai:'猜', + } + } + }, + getVideoName:function(){ + var str=get.translation(game.me.name); + if(game.me.name2){ + str+='/'+get.translation(game.me.name2); + } + var name=[ + str, + get.cnNumber(get.playerNumber())+'人'+ + get.translation(lib.config.mode)+' - '+lib.translate[game.me.identity+'2'] + ]; + return name; + }, + addRecord:function(bool){ + if(typeof bool=='boolean'){ + var data=lib.config.gameRecord.identity.data; + var identity=game.me.identity; + if(identity=='mingzhong'){ + identity='zhong'; + } + if(!data[identity]){ + data[identity]=[0,0]; + } + if(bool){ + data[identity][0]++; + } + else{ + data[identity][1]++; + } + var list=['zhu','zhong','nei','fan']; + var str=''; + for(var i=0;i'; + } + } + lib.config.gameRecord.identity.str=str; + game.saveConfig('gameRecord',lib.config.gameRecord); + } + }, + showIdentity:function(me){ + for(var i=0;i0) return; + if(game.zhong){ + game.zhong.identity='zhong'; + } + game.showIdentity(); + if(game.me.identity=='zhu'||game.me.identity=='zhong'){ + if(game.zhu.classList.contains('dead')){ + game.over(false); + } + else{ + game.over(true); + } + } + else if(game.me.identity=='nei'){ + if(game.players.length==1&&game.me.isAlive()){ + game.over(true); + } + else{ + game.over(false); + } + } + else{ + if((get.population('fan')+get.population('zhong')>0||get.population('nei')>1)&& + game.zhu.classList.contains('dead')){ + game.over(true); + } + else{ + game.over(false); + } + } + }, + checkOnlineResult:function(player){ + if(game.zhu.isAlive()){ + return (player.identity=='zhu'||player.identity=='zhong'); + } + else if(game.players.length==1&&game.players[0].identity=='nei'){ + return player.isAlive(); + } + else{ + return player.identity=='fan'; + } + }, + chooseCharacter:function(){ + var next=game.createEvent('chooseCharacter',false); + next.showConfig=true; + next.addPlayer=function(player){ + var list=lib.config.mode_config.identity.identity[game.players.length-3].slice(0); + var list2=lib.config.mode_config.identity.identity[game.players.length-2].slice(0); + for(var i=0;i4){ - player.hp++; - player.maxHp++; - player.update(); - } - } - else if(player.identity=='zhong'&&Math.random()<0.5){ - var choice=0; - for(var i=0;i4){ + player.hp++; + player.maxHp++; + player.update(); } } - if(get.config('double_character')){ - player.init(list[choice],list[choice==0?choice+1:choice-1]); + else if(player.identity=='zhong'&&Math.random()<0.5){ + var choice=0; + for(var i=0;i'; - td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ - if(_status.dragged) return; - if(_status.justdragged) return; - _status.tempNoButton=true; - setTimeout(function(){ - _status.tempNoButton=false; - },500); - var link=this.link; - if(game.zhu.name){ - if(link!='random'){ - _status.event.parent.fixedseat=get.distance(game.me,game.zhu,'absolute'); + else{ + listi=['random','zhu','zhong','nei','fan']; + } + + for(var i=0;i'; + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + _status.tempNoButton=true; + setTimeout(function(){ + _status.tempNoButton=false; + },500); + var link=this.link; + if(game.zhu.name){ + if(link!='random'){ + _status.event.parent.fixedseat=get.distance(game.me,game.zhu,'absolute'); + } + game.zhu.uninit(); + delete game.zhu.isZhu; + delete game.zhu.identityShown; } - game.zhu.uninit(); - delete game.zhu.isZhu; - delete game.zhu.identityShown; - } - var current=this.parentNode.querySelector('.thundertext'); - if(current){ - current.classList.remove('thundertext'); - } - current=seats.querySelector('.thundertext'); - if(current){ - current.classList.remove('thundertext'); - } - if(link=='random'){ - if(event.zhongmode){ - link=['zhu','zhong','nei','fan','mingzhong'].randomGet(); + var current=this.parentNode.querySelector('.thundertext'); + if(current){ + current.classList.remove('thundertext'); + } + current=seats.querySelector('.thundertext'); + if(current){ + current.classList.remove('thundertext'); + } + if(link=='random'){ + if(event.zhongmode){ + link=['zhu','zhong','nei','fan','mingzhong'].randomGet(); + } + else{ + link=['zhu','zhong','nei','fan'].randomGet(); + } + for(var i=0;i'; + td.link=i-1; + if(get.distance(game.zhu,game.me,'absolute')===i-1){ + td.classList.add('thundertext'); } - else{ + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + if(get.distance(game.zhu,game.me,'absolute')==this.link) return; + var current=this.parentNode.querySelector('.thundertext'); + if(current){ + current.classList.remove('thundertext'); + } this.classList.add('thundertext'); - } - num=get.config('choice_'+link); - if(event.zhongmode){ - num=6; - if(link=='zhu'||link=='nei'||link=='mingzhong'){ - num=8; - } - } - _status.event.parent.swapnodialog=function(dialog,list){ - var buttons=ui.create.div('.buttons'); - var node=dialog.buttons[0].parentNode; - dialog.buttons=ui.create.buttons(list,'character',buttons); - dialog.content.insertBefore(buttons,node); - buttons.animate('start'); - node.remove(); - game.uncheck(); - game.check(); - for(var i=0;i'; - td.link=i-1; - if(get.distance(game.zhu,game.me,'absolute')===i-1){ - td.classList.add('thundertext'); + }); } - td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ - if(_status.dragged) return; - if(_status.justdragged) return; - if(get.distance(game.zhu,game.me,'absolute')==this.link) return; - var current=this.parentNode.querySelector('.thundertext'); - if(current){ - current.classList.remove('thundertext'); + dialog.content.appendChild(seats); + if(game.me==game.zhu){ + seats.previousSibling.style.display='none'; + seats.style.display='none'; + } + + dialog.add(ui.create.div('.placeholder')); + dialog.add(ui.create.div('.placeholder')); + dialog.add(ui.create.div('.placeholder')); + }; + var removeSetting=function(){ + var dialog=_status.event.dialog; + if(dialog.querySelector('table')&&!get.config('change_identity')){ + dialog.querySelector('table').previousSibling.remove(); + dialog.querySelector('table').nextSibling.remove(); + dialog.querySelector('table').nextSibling.remove(); + dialog.querySelector('table').nextSibling.remove(); + dialog.querySelector('table').nextSibling.remove(); + dialog.querySelector('table').nextSibling.remove(); + dialog.querySelector('table').remove(); + } + }; + event.addSetting=addSetting; + event.removeSetting=removeSetting; + event.list=[]; + identityList.randomSort(); + if(event.identity){ + identityList.remove(event.identity); + identityList.unshift(event.identity); + if(event.fixedseat){ + var zhuIdentity=(_status.mode=='zhong')?'mingzhong':'zhu'; + if(zhuIdentity!=event.identity){ + identityList.remove(zhuIdentity); + identityList.splice(event.fixedseat,0,zhuIdentity); } - this.classList.add('thundertext'); - for(var i=0;i4){ + game.me.hp++; + game.me.maxHp++; + game.me.update(); + } + for(var i=0;i4){ + game.zhu.maxHp++; + game.zhu.hp++; + game.zhu.update(); } - else{ - list=event.list.slice(0,num); - } - } - else{ - if(_status.brawl&&_status.brawl.chooseCharacter){ - list=_status.brawl.chooseCharacter(list2,list3,num); - if(list===false){ - if(event.zhongmode){ - list=list3.slice(0,6); - } - else{ - list=list2.concat(list3.slice(0,num)); - } - } - else if(list==='nozhu'){ - list=event.list.slice(0,num); - } - } - else{ - if(event.zhongmode){ - list=list3.slice(0,8); - } - else{ - list=list2.concat(list3.slice(0,num)); - } - } - } - delete event.swapnochoose; - var dialog; - if(event.swapnodialog){ - dialog=ui.dialog; - event.swapnodialog(dialog,list); - delete event.swapnodialog; - } - else{ - var str='选择角色'; - if(_status.brawl&&_status.brawl.chooseCharacterStr){ - str=_status.brawl.chooseCharacterStr; - } - dialog=ui.create.dialog(str,'hidden',[list,'character']); - if(!_status.brawl||!_status.brawl.noAddSetting){ - if(get.config('change_identity')){ - addSetting(dialog); - } - } - } - if(!event.chosen.length){ - game.me.chooseButton(dialog,true).set('onfree',true).selectButton=function(){ - if(_status.brawl&&_status.brawl.doubleCharacter) return 2; - return get.config('double_character')?2:1 - }; - } - else{ - lib.init.onfree(); - } - ui.create.cheat=function(){ - _status.createControl=ui.cheat2; - ui.cheat=ui.create.control('更换',function(){ - if(ui.cheat2&&ui.cheat2.dialog==_status.event.dialog){ - return; - } - if(game.changeCoin){ - game.changeCoin(-3); - } + game.broadcast(function(zhu,name,name2,addMaxHp){ if(game.zhu!=game.me){ - event.list.randomSort(); - if(_status.brawl&&_status.brawl.chooseCharacter){ - list=_status.brawl.chooseCharacter(event.list,num); - if(list===false||list==='nozhu'){ - list=event.list.slice(0,num); - } - } - else{ - list=event.list.slice(0,num); - } + zhu.init(name,name2); } - else{ - list3.randomSort(); - if(_status.brawl&&_status.brawl.chooseCharacter){ - list=_status.brawl.chooseCharacter(list2,list3,num); - if(list===false){ - if(event.zhongmode){ - list=list3.slice(0,6); - } - else{ - list=list2.concat(list3.slice(0,num)); - } - } - else if(list==='nozhu'){ - event.list.randomSort(); - list=event.list.slice(0,num); - } - } - else{ - if(event.zhongmode){ - list=list3.slice(0,6); - } - else{ - list=list2.concat(list3.slice(0,num)); - } - } + if(addMaxHp){ + zhu.maxHp++; + zhu.hp++; + zhu.update(); } - var buttons=ui.create.div('.buttons'); - var node=_status.event.dialog.buttons[0].parentNode; - _status.event.dialog.buttons=ui.create.buttons(list,'character',buttons); - _status.event.dialog.content.insertBefore(buttons,node); - buttons.animate('start'); - node.remove(); - game.uncheck(); - game.check(); - }); - delete _status.createControl; - }; - if(lib.onfree){ - lib.onfree.push(function(){ - event.dialogxx=ui.create.characterDialog(); - if(ui.cheat2){ - ui.cheat2.classList.remove('disabled'); - } - }); - } - else{ - event.dialogxx=ui.create.characterDialog(); - } + },game.zhu,game.zhu.name,game.zhu.name2,game.players.length>4); - ui.create.cheat2=function(){ - ui.cheat2=ui.create.control('自由选将',function(){ - if(this.dialog==_status.event.dialog){ - if(game.changeCoin){ - game.changeCoin(50); - } - this.dialog.close(); - _status.event.dialog=this.backup; - this.backup.open(); - delete this.backup; - game.uncheck(); - game.check(); - if(ui.cheat){ - ui.cheat.classList.remove('disabled'); - } - } - else{ - if(game.changeCoin){ - game.changeCoin(-10); - } - this.backup=_status.event.dialog; - _status.event.dialog.close(); - _status.event.dialog=_status.event.parent.dialogxx; - this.dialog=_status.event.dialog; - this.dialog.open(); - game.uncheck(); - game.check(); - if(ui.cheat){ - ui.cheat.classList.add('disabled'); - } - } - }); - if(lib.onfree){ - ui.cheat2.classList.add('disabled'); - } - } - if(!_status.brawl||!_status.brawl.chooseCharacterFixed){ - if(!ui.cheat&&get.config('change_choice')) - ui.create.cheat(); - if(!ui.cheat2&&get.config('free_choose')) - ui.create.cheat2(); - } - "step 1" - if(ui.cheat){ - ui.cheat.close(); - delete ui.cheat; - } - if(ui.cheat2){ - ui.cheat2.close(); - delete ui.cheat2; - } - if(event.chosen.length){ - game.me.init(event.chosen[0],event.chosen[1]); - } - else if(event.modchosen){ - if(event.modchosen[0]=='random') event.modchosen[0]=result.buttons[0].link; - else event.modchosen[1]=result.buttons[0].link; - game.me.init(event.modchosen[0],event.modchosen[1]); - } - else if(result.buttons.length==2){ - game.me.init(result.buttons[0].link,result.buttons[1].link) - } - else{ - game.me.init(result.buttons[0].link) - } - game.addRecentCharacter(game.me.name,game.me.name2); - event.list.remove(game.me.name); - event.list.remove(game.me.name2); - if(game.me==game.zhu&&game.players.length>4){ - game.me.hp++; - game.me.maxHp++; - game.me.update(); - } - for(var i=0;i5){ + num=5; + } + if(num2>2){ + num2=2; } } - game.players[i].identityShown=false; - } - game.zhu.setIdentity(); - game.zhu.identityShown=true; - game.zhu.isZhu=(game.zhu.identity=='zhu'); - game.zhu.node.identity.classList.remove('guessing'); - game.me.setIdentity(); - game.me.node.identity.classList.remove('guessing'); - - for(var i=0;i4){ - game.zhu.maxHp++; - game.zhu.hp++; - game.zhu.update(); - } - game.broadcast(function(zhu,name,name2,addMaxHp){ - if(game.zhu!=game.me){ - zhu.init(name,name2); - } - if(addMaxHp){ - zhu.maxHp++; - zhu.hp++; - zhu.update(); - } - },game.zhu,game.zhu.name,game.zhu.name2,game.players.length>4); - - var list=[]; - var selectButton=(lib.configOL.double_character?2:1); - - var num,num2=0; - if(event.zhongmode){ - num=6; - } - else{ - num=Math.floor(event.list.length/(game.players.length-1)); - num2=event.list.length-num*(game.players.length-1); - if(lib.configOL.double_nei){ - num2=Math.floor(num2/2); - } - if(num>5){ - num=5; - } - if(num2>2){ - num2=2; - } - } - for(var i=0;i0){ + for(var i=0;i0){ + if(effect<1) c=0.5; + else c=1; + if(targets.length==1&&targets[0]==this); + else if(targets.length==1) this.ai.shown+=0.2*c; + else this.ai.shown+=0.1*c; + } + else if(effect<0&&this==game.me&&game.me.identity!='nei'){ + if(targets.length==1&&targets[0]==this); + else if(targets.length==1) this.ai.shown-=0.2; + else this.ai.shown-=0.1; + } + } + if(this!=game.me) this.ai.shown*=2; + if(this.ai.shown>0.95) this.ai.shown=0.95; + if(this.ai.shown<-0.5) this.ai.shown=-0.5; + + var marknow=(!_status.connectMode&&this!=game.me&&get.config('auto_mark_identity')&&this.ai.identity_mark!='finished'); + if(true){ + if(marknow&&_status.clickingidentity&&_status.clickingidentity[0]==this){ for(var i=0;i<_status.clickingidentity[1].length;i++){ _status.clickingidentity[1][i].delete(); _status.clickingidentity[1][i].style.transform=''; } delete _status.clickingidentity; } - },game.zhu); - game.delay(2); - game.zhu.playerfocus(1000); - _status.event.trigger('zhuUpdate'); - } - - if(!_status.over){ - var giveup; - if(get.population('fan')+get.population('nei')==1){ - for(var i=0;i0){ + if(this.identity=='fan'){ + effect=-1; + } + else{ + effect=1; + } } } - } - else if(get.population('zhong')+get.population('mingzhong')+get.population('nei')==0){ - giveup=game.zhu; - } - if(giveup){ - giveup.showGiveup(); - } - } - - }, - logAi:function(targets,card){ - if(this.ai.shown==1||this.isMad()) return; - if(typeof targets=='number'){ - this.ai.shown+=targets; - } - else{ - var effect=0,c,shown; - var info=get.info(card); - if(info.ai&&info.ai.expose){ - if(_status.event.name=='_wuxie'){ - if(_status.event.source&&_status.event.source.ai.shown){ - this.ai.shown+=0.2; + else if(targets.length>0){ + for(var i=0;i0){ - for(var i=0;i0){ + if(this.ai.identity_mark=='fan'){ + if(marknow) this.setIdentity(); + this.ai.identity_mark='finished'; + } + else{ + if(marknow) this.setIdentity('zhong'); + this.ai.identity_mark='zhong'; + } + } + else if(effect<0&&get.population('fan')>0){ + if(this.ai.identity_mark=='zhong'){ + if(marknow) this.setIdentity(); + this.ai.identity_mark='finished'; + } + else{ + if(marknow) this.setIdentity('fan'); + this.ai.identity_mark='fan'; + } } } - } - if(effect>0){ - if(effect<1) c=0.5; - else c=1; - if(targets.length==1&&targets[0]==this); - else if(targets.length==1) this.ai.shown+=0.2*c; - else this.ai.shown+=0.1*c; - } - else if(effect<0&&this==game.me&&game.me.identity!='nei'){ - if(targets.length==1&&targets[0]==this); - else if(targets.length==1) this.ai.shown-=0.2; - else this.ai.shown-=0.1; - } - } - if(this!=game.me) this.ai.shown*=2; - if(this.ai.shown>0.95) this.ai.shown=0.95; - if(this.ai.shown<-0.5) this.ai.shown=-0.5; - - var marknow=(!_status.connectMode&&this!=game.me&&get.config('auto_mark_identity')&&this.ai.identity_mark!='finished'); - if(true){ - if(marknow&&_status.clickingidentity&&_status.clickingidentity[0]==this){ - for(var i=0;i<_status.clickingidentity[1].length;i++){ - _status.clickingidentity[1][i].delete(); - _status.clickingidentity[1][i].style.transform=''; - } - delete _status.clickingidentity; - } - if(!Array.isArray(targets)){ - targets=[]; - } - var effect=0,c,shown; - var zhu=game.zhu; - if(_status.mode=='zhong'&&!game.zhu.isZhu){ - zhu=game.zhong; - } - if(targets.length==1&&targets[0]==this){ - effect=0; - } - else if(this.identity!='nei'){ - if(this.ai.shown>0){ - if(this.identity=='fan'){ - effect=-1; - } - else{ - effect=1; - } - } - } - else if(targets.length>0){ - for(var i=0;i0){ - if(this.ai.identity_mark=='fan'){ - if(marknow) this.setIdentity(); + else if(marknow){ + if(effect>0&&this.identity!='fan'){ + this.setIdentity('zhong'); this.ai.identity_mark='finished'; } - else{ - if(marknow) this.setIdentity('zhong'); - this.ai.identity_mark='zhong'; - } - } - else if(effect<0&&get.population('fan')>0){ - if(this.ai.identity_mark=='zhong'){ - if(marknow) this.setIdentity(); + else if(effect<0&&this.identity=='fan'){ + this.setIdentity('fan'); this.ai.identity_mark='finished'; } - else{ - if(marknow) this.setIdentity('fan'); - this.ai.identity_mark='fan'; - } } } - else if(marknow){ - if(effect>0&&this.identity!='fan'){ - this.setIdentity('zhong'); - this.ai.identity_mark='finished'; - } - else if(effect<0&&this.identity=='fan'){ - this.setIdentity('fan'); - this.ai.identity_mark='finished'; - } - } - } - }, - } - }, - get:{ - rawAttitude:function(from,to){ - var x=0,num=0,temp,i; - if(_status.ai.customAttitude){ - for(i=0;i<_status.ai.customAttitude.length;i++){ - temp=_status.ai.customAttitude[i](from,to); - if(temp!=undefined){ - x+=temp; - num++; - } - } - } - if(num){ - return x/num; - } - var difficulty=0; - if(to==game.me) difficulty=2-get.difficulty(); - if(from==to||to.identityShown||(from.storage.dongcha==to)){ - return get.realAttitude(from,to)+difficulty*1.5; - } - else{ - if(from.identity=='zhong'&&to.ai.shown==0&&from.ai.tempIgnore&& - !from.ai.tempIgnore.contains(to)){ - for(var i=0;i1&&to.hp>fan.hp&&to.countCards('he')>fan.countCards('he')){ - return -3; - } - } - return 0; - } - if(situation>1) return 0; - return Math.min(3,get.population('fan')); - case 'fan': - if(get.population('fan')==1&&get.population('nei')==1&&game.players.length==3){ - var nei; - for(var i=0;i1&&nei.hp>to.hp&&nei.countCards('he')>to.countCards('he')){ - return 0; - } - } - return -3; - } - return -4; + } } - break; - case 'zhong':case 'mingzhong': - switch(identity2){ - case 'zhu': return 10; - case 'zhong':case 'mingzhong': return 4; - case 'nei': - if(get.population('fan')==0) return -2; - if(zhongmode&&to.ai.sizhong&&to.ai.shown<1) return 6; - return Math.min(3,-situation); - case 'fan': return -8; + var aishown=to.ai.shown; + if(to.identity=='nei'&&to.ai.shown<1&&(to.ai.identity_mark=='fan'||to.ai.identity_mark=='zhong')){ + aishown=0.5; } - break; - case 'nei': - if(identity2=='zhu'&&game.players.length==2) return -10; - var strategy=get.aiStrategy(); - if(strategy==4){ - if(from==to) return 10; - return 0; + else if(aishown==0&&to.identity!='fan'&&to.identity!='zhu'){ + var fanshown=true; + for(var i=0;i1&&to.hp>fan.hp&&to.countCards('he')>fan.countCards('he')){ - return -3; + if(fan){ + if(to.hp>1&&to.hp>fan.hp&&to.countCards('he')>fan.countCards('he')){ + return -3; + } } + return 0; } - return 0; - } - else{ - if(situation>1||get.population('fan')==0) num=0; - else num=get.population('fan')+Math.max(0,3-game.zhu.hp); - } - if(strategy==2) num--; - if(strategy==3) num++; - return num; - case 'zhong': - if(strategy==5) return Math.min(0,-situation); - if(strategy==6) return Math.max(-1,-situation); - if(get.population('fan')==0) num=-5; - else if(situation<=0) num=0; - else if(game.zhu&&game.zhu.hp<2) num=0; - else if(game.zhu&&game.zhu.hp==2) num=-1; - else if(game.zhu&&game.zhu.hp<=2&&situation>1) num=-1; - else num=-2; - if(zhongmode&&situation<2){ - num=4; - } - if(strategy==2) num--; - if(strategy==3) num++; - return num; - case 'mingzhong': - if(zhongmode){ - if(from.ai.sizhong==undefined){ - from.ai.sizhong=(Math.random()<0.5); + if(situation>1) return 0; + return Math.min(3,get.population('fan')); + case 'fan': + if(get.population('fan')==1&&get.population('nei')==1&&game.players.length==3){ + var nei; + for(var i=0;i1&&nei.hp>to.hp&&nei.countCards('he')>to.countCards('he')){ + return 0; + } + } + return -3; } - if(from.ai.sizhong) return 6; - } - if(strategy==5) return Math.min(0,-situation); - if(strategy==6) return Math.max(-1,-situation); - if(get.population('fan')==0) num=-5; - else if(situation<=0) num=0; - else num=-3; - if(strategy==2) num--; - if(strategy==3) num++; - return num; - case 'nei': + return -4; + } + break; + case 'zhong':case 'mingzhong': + switch(identity2){ + case 'zhu': return 10; + case 'zhong':case 'mingzhong': return 4; + case 'nei': + if(get.population('fan')==0) return -2; + if(zhongmode&&to.ai.sizhong&&to.ai.shown<1) return 6; + return Math.min(3,-situation); + case 'fan': return -8; + } + break; + case 'nei': + if(identity2=='zhu'&&game.players.length==2) return -10; + var strategy=get.aiStrategy(); + if(strategy==4){ if(from==to) return 10; - if(from.ai.friend.contains(to)) return 5; - if(get.population('fan')+get.population('zhong')>0) return 0; - return -5; - case 'fan': - if(strategy==5) return Math.max(-1,situation); - if(strategy==6) return Math.min(0,situation); - if((game.zhu&&game.zhu.hp<=2&&situation<0)||situation<-1) num=-3; - else if(situation<0||get.population('zhong')+get.population('mingzhong')==0) num=-2; - else if((game.zhu&&game.zhu.hp>=4&&situation>0)||situation>1) num=1; - else num=0; - if(strategy==2) num++; - if(strategy==3) num--; - return num; - } - break; - case 'fan': - switch(identity2){ - case 'zhu': - if(get.population('nei')>0){ - if(situation==1) return -6; - if(situation>1) return -5; - } - return -8; - case 'zhong': - if(!zhongmode&&game.zhu.hp>=3&&to.hp==1){ - return -10; - } - return -7; - case 'mingzhong':return -5; - case 'nei': - if(zhongmode&&to.ai.sizhong) return -7; - if(get.population('fan')==1) return 0; - if(get.population('zhong')+get.population('mingzhong')==0) return -7; - if(game.zhu&&game.zhu.hp<=2) return -1; - return Math.min(3,situation); - case 'fan': return 5; - } - } - }, - situation:function(absolute){ - var i,j,player; - var zhuzhong=0,total=0,zhu,fan=0; - for(i=0;i4){ - php=4; - } - else if(php>6){ - php=6; - } - j=player.countCards('h')+player.countCards('e')*1.5+php*2; - if(player.identity=='zhu'){ - zhuzhong+=j*1.2+5; - total+=j*1.2+5; - zhu=j; - } - else if(player.identity=='zhong'||player.identity=='mingzhong'){ - zhuzhong+=j*0.8+3; - total+=j*0.8+3; - } - else if(player.identity=='fan'){ - zhuzhong-=j+4; - total+=j+4; - fan+=j+4; - } - } - if(absolute) return zhuzhong; - var result=parseInt(10*Math.abs(zhuzhong/total)); - if(zhuzhong<0) result=-result; - if(!game.zhong){ - if(zhu<12&&fan>30) result--; - if(zhu<6&&fan>15) result--; - if(zhu<4) result--; - } - return result; - }, - }, - skill:{ - dongcha:{ - trigger:{player:'phaseBegin'}, - direct:true, - unique:true, - forceunique:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('dongcha'),function(card,player,target){ - return target.countCards('hej')>0; - }).set('ai',function(target){ - var player=_status.event.player; - return get.attitude(player,target)*lib.card.guohe.ai.result.target(player,target); - }); - 'step 1' - if(result.bool){ - event.target=result.targets[0]; - event.target.addExpose(0.1); - player.logSkill('dongcha',event.target); - game.delayx(); - } - else{ - event.finish(); - } - 'step 2' - if(event.target){ - player.discardPlayerCard('hej',true,event.target); - } - }, - group:'dongcha_begin', - subSkill:{ - begin:{ - trigger:{global:'gameStart'}, - forced:true, - popup:false, - content:function(){ - var list=[]; - for(var i=0;i1&&to.hp>fan.hp&&to.countCards('he')>fan.countCards('he')){ + return -3; + } + } + return 0; + } + else{ + if(situation>1||get.population('fan')==0) num=0; + else num=get.population('fan')+Math.max(0,3-game.zhu.hp); + } + if(strategy==2) num--; + if(strategy==3) num++; + return num; + case 'zhong': + if(strategy==5) return Math.min(0,-situation); + if(strategy==6) return Math.max(-1,-situation); + if(get.population('fan')==0) num=-5; + else if(situation<=0) num=0; + else if(game.zhu&&game.zhu.hp<2) num=0; + else if(game.zhu&&game.zhu.hp==2) num=-1; + else if(game.zhu&&game.zhu.hp<=2&&situation>1) num=-1; + else num=-2; + if(zhongmode&&situation<2){ + num=4; + } + if(strategy==2) num--; + if(strategy==3) num++; + return num; + case 'mingzhong': + if(zhongmode){ + if(from.ai.sizhong==undefined){ + from.ai.sizhong=(Math.random()<0.5); + } + if(from.ai.sizhong) return 6; + } + if(strategy==5) return Math.min(0,-situation); + if(strategy==6) return Math.max(-1,-situation); + if(get.population('fan')==0) num=-5; + else if(situation<=0) num=0; + else num=-3; + if(strategy==2) num--; + if(strategy==3) num++; + return num; + case 'nei': + if(from==to) return 10; + if(from.ai.friend.contains(to)) return 5; + if(get.population('fan')+get.population('zhong')>0) return 0; + return -5; + case 'fan': + if(strategy==5) return Math.max(-1,situation); + if(strategy==6) return Math.min(0,situation); + if((game.zhu&&game.zhu.hp<=2&&situation<0)||situation<-1) num=-3; + else if(situation<0||get.population('zhong')+get.population('mingzhong')==0) num=-2; + else if((game.zhu&&game.zhu.hp>=4&&situation>0)||situation>1) num=1; + else num=0; + if(strategy==2) num++; + if(strategy==3) num--; + return num; + } + break; + case 'fan': + switch(identity2){ + case 'zhu': + if(get.population('nei')>0){ + if(situation==1) return -6; + if(situation>1) return -5; + } + return -8; + case 'zhong': + if(!zhongmode&&game.zhu.hp>=3&&to.hp==1){ + return -10; + } + return -7; + case 'mingzhong':return -5; + case 'nei': + if(zhongmode&&to.ai.sizhong) return -7; + if(get.population('fan')==1) return 0; + if(get.population('zhong')+get.population('mingzhong')==0) return -7; + if(game.zhu&&game.zhu.hp<=2) return -1; + return Math.min(3,situation); + case 'fan': return 5; + } + } + }, + situation:function(absolute){ + var i,j,player; + var zhuzhong=0,total=0,zhu,fan=0; + for(i=0;i4){ + php=4; } + else if(php>6){ + php=6; + } + j=player.countCards('h')+player.countCards('e')*1.5+php*2; + if(player.identity=='zhu'){ + zhuzhong+=j*1.2+5; + total+=j*1.2+5; + zhu=j; + } + else if(player.identity=='zhong'||player.identity=='mingzhong'){ + zhuzhong+=j*0.8+3; + total+=j*0.8+3; + } + else if(player.identity=='fan'){ + zhuzhong-=j+4; + total+=j+4; + fan+=j+4; + } + } + if(absolute) return zhuzhong; + var result=parseInt(10*Math.abs(zhuzhong/total)); + if(zhuzhong<0) result=-result; + if(!game.zhong){ + if(zhu<12&&fan>30) result--; + if(zhu<6&&fan>15) result--; + if(zhu<4) result--; + } + return result; + }, + }, + skill:{ + dongcha:{ + trigger:{player:'phaseBegin'}, + direct:true, + unique:true, + forceunique:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('dongcha'),function(card,player,target){ + return target.countCards('hej')>0; + }).set('ai',function(target){ + var player=_status.event.player; + return get.attitude(player,target)*lib.card.guohe.ai.result.target(player,target); + }); + 'step 1' + if(result.bool){ + event.target=result.targets[0]; + event.target.addExpose(0.1); + player.logSkill('dongcha',event.target); + game.delayx(); + } + else{ + event.finish(); + } + 'step 2' + if(event.target){ + player.discardPlayerCard('hej',true,event.target); + } + }, + group:'dongcha_begin', + subSkill:{ + begin:{ + trigger:{global:'gameStart'}, + forced:true, + popup:false, + content:function(){ + var list=[]; + for(var i=0;i0; + }, + logTarget:'player', + content:function(){ + 'step 0' + trigger.player.gainMaxHp(); + 'step 1' + var dh=player.hp-trigger.player.hp; + if(dh>0){ + trigger.player.recover(dh); + } + 'step 2' + var cards=player.getCards('he'); + if(cards.length){ + trigger.player.gain(cards,player); + player.$giveAuto(cards,trigger.player); + } + 'step 3' + trigger.untrigger(); + trigger.finish(); + player.die(); } } }, - sheshen:{ - trigger:{global:'dieBefore'}, - forced:true, - unique:true, - forceunique:true, - filter:function(event,player){ - return event.player==game.zhu&&player.hp>0; - }, - logTarget:'player', - content:function(){ - 'step 0' - trigger.player.gainMaxHp(); - 'step 1' - var dh=player.hp-trigger.player.hp; - if(dh>0){ - trigger.player.recover(dh); - } - 'step 2' - var cards=player.getCards('he'); - if(cards.length){ - trigger.player.gain(cards,player); - player.$giveAuto(cards,trigger.player); - } - 'step 3' - trigger.untrigger(); - trigger.finish(); - player.die(); - } + help:{ + '身份模式':'
      选项
      • 加强主公
        反贼人数多于2时主公会额外增加一个技能(每个主公的额外技能固定,非常备主公增加天命)
      '+ + '
      明忠
      • 本模式需要8名玩家进行游戏,使用的身份牌为:1主公、2忠臣、4反贼和1内奸。游戏开始时,每名玩家随机获得一个身份,由系统随机选择一名忠臣身份的玩家亮出身份(将忠臣牌正面朝上放在面前),其他身份(包括主公)的玩家不亮出身份。
      • '+ + '首先由亮出身份的忠臣玩家随机获得六张武将牌,挑选一名角色,并将选好的武将牌展示给其他玩家。之后其余每名玩家随机获得三张武将牌,各自从其中挑选一张同时亮出
      • '+ + '亮出身份牌的忠臣增加1点体力上限。角色濒死和死亡的结算及胜利条件与普通身份局相同。', } - }, - help:{ - '身份模式':'
        选项
        • 加强主公
          反贼人数多于2时主公会额外增加一个技能(每个主公的额外技能固定,非常备主公增加天命)
        '+ - '
        明忠
        • 本模式需要8名玩家进行游戏,使用的身份牌为:1主公、2忠臣、4反贼和1内奸。游戏开始时,每名玩家随机获得一个身份,由系统随机选择一名忠臣身份的玩家亮出身份(将忠臣牌正面朝上放在面前),其他身份(包括主公)的玩家不亮出身份。
        • '+ - '首先由亮出身份的忠臣玩家随机获得六张武将牌,挑选一名角色,并将选好的武将牌展示给其他玩家。之后其余每名玩家随机获得三张武将牌,各自从其中挑选一张同时亮出
        • '+ - '亮出身份牌的忠臣增加1点体力上限。角色濒死和死亡的结算及胜利条件与普通身份局相同。', - } + }; }); diff --git a/mode/realtime.js b/mode/realtime.js index a468639ae..1c4e4b7af 100644 --- a/mode/realtime.js +++ b/mode/realtime.js @@ -1,10 +1,18 @@ 'use strict'; -game.import('mode',{ - name:'realtime', - start:function(){ +game.import('mode',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'realtime', + start:function(){ - }, - game:{ + }, + game:{ - } + } + }; }); diff --git a/mode/stone.js b/mode/stone.js index 5c400a03f..ee79e4b23 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -1,10212 +1,10220 @@ 'use strict'; -game.import('mode',{ - name:'stone', - start:function(){ - "step 0" - lib.init.css(lib.assetURL+'layout/mode/','stone'); - _status.mode='deck'; - game.initStone(); - var playback=localStorage.getItem(lib.configprefix+'playback'); - - if(!playback&&_status.mode=='deck'){ - var createCardDialog=function(){ - ui.deckBuilder=ui.create.div('.popup-container#deck-builder',function(){ - if(careerList.classList.contains('shown')){ - careerList.classList.remove('shown'); - newDeck.classList.remove('active'); - } - else if(!cardDialog.classList.contains('shown')){ - this.classList.remove('shown'); - this.timeout=setTimeout(function(){ - ui.deckBuilder.remove(); - },500); - ui.arena.style.top=''; - ui.arena.style.transform=''; - ui.arena.style.opacity=''; - ui.system.style.opacity=''; - ui.auto.show(); - ui.pause.show(); - ui.historybar.show(); - } - }); - var clickNode=function(){ - cardDialog.classList.add('shown'); - controls.classList.add('shown'); - var name='未命名'; - for(var i=1;;i++){ - if(!lib.storage.deckList[name+i]){ - break; - } - } - cardDialog.editing={ - name:name+i, - content:{ - career:this.firstChild.dataset.career, - deck:[] - }, - } - rename.innerHTML=name+i; - newDeck.innerHTML='确认编辑'; - newDeck.classList.add('active'); - careerList.classList.remove('shown'); - listContainer.style.transform='translateX(200px)'; - deckContainer.innerHTML=''; - deckContainer.classList.add('shown'); - updateCardDialog(); - } - var careerList=ui.create.div('.shadowed.career',ui.deckBuilder); - for(var i=0;i/g,''); - }; - var observer = new MutationObserver(removeLine); - observer.observe(rename,{characterData:true,subtree:true}); - rename.addEventListener('keyup',removeLine); - - var cardDialog=ui.create.cardDialog(true,function(name){ - if(lib.card[name].stonehidden) return true; - var type=lib.card[name].type; - return type!='stonecard'&&type!='stonecharacter'; - },{seperate:function(list){ - var nl=[],ns=[]; - var career={}; - var careerspell={}; - for(var i=0;i=30){ - for(var i=0;i=2){ - list.push(i); - } - } - for(var i=0;ib) return 1; - if(a'+editing.name+'', - listContainer,editDeck); - ui.create.div('.menubutton.round',deckitem).dataset.career=editing.content.career; - deckitem.name=editing.name; - } - lib.storage.deckList[editing.name]=editing.content; - } - game.save('deckList',lib.storage.deckList); - listContainer.style.transform=''; - deckContainer.classList.remove('shown'); - updateCardDialog(); - } - e.stopPropagation(); - }); - var listContainer=ui.create.div('.list-container',deckList); - for(var i in lib.storage.deckList){ - var deckitem=ui.create.div('.deckitem.shadowed',''+i+'', - listContainer,editDeck); - ui.create.div('.menubutton.round',deckitem).dataset.career=lib.storage.deckList[i].career; - deckitem.name=i; - } - var deckContainer=ui.create.div('.list-container.deck',deckList); - if(ui.deckcontrol) ui.deckcontrol.show(); - }; - - ui.deckcontrol=ui.create.system('卡组管理',function(){ - if(this.classList.contains('hidden')) return; - // if(lib.config.low_performance){ - // ui.arena.style.transform='translateY('+ui.window.offsetHeight+'px)'; - // } - // else{ - // ui.arena.style.top='100%'; - // } - // ui.arena.style.transform='scale(0.6)'; - ui.arena.style.opacity=0; - ui.system.style.opacity=0; - ui.window.appendChild(ui.deckBuilder); - if(ui.deckBuilder.timeout){ - clearTimeout(ui.deckBuilder.timeout); - delete ui.deckBuilder.timeout; - } - ui.refresh(ui.deckBuilder); - ui.deckBuilder.classList.add('shown'); - ui.auto.hide(); - ui.pause.hide(); - ui.historybar.hide(); - },true); - - if(lib.onfree){ - ui.deckcontrol.hide(); - lib.onfree.push(createCardDialog); - } - else{ - createCardDialog(); - } - } - - if(playback){ - ui.create.me(); - ui.arena.style.display='none'; - ui.system.style.display='none'; - _status.playback=playback; - localStorage.removeItem(lib.configprefix+'playback'); - var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); - store.get(parseInt(playback)).onsuccess=function(e){ - if(e.target.result){ - game.playVideoContent(e.target.result.video); - } - else{ - alert('播放失败:找不到录像'); - game.reload(); - } - } - event.finish(); - } - else{ - game.prepareArena(2); - // game.delay(); - } - ui.arena.classList.add('stone'); - "step 1" - for(var i=0;i'+game.me.deckCards.length); - uiintro.addSmall([game.me.deckCards,'card']); - return uiintro; - },220); - if(get.config('skill_bar')){ - _status.rageEnabled=true; - - ui.friendBar=ui.create.div('.skillbar.right.shadowed.playerbg',ui.arena); - ui.enemyBar=ui.create.div('.skillbar.left.shadowed.playerbg',ui.arena); - // ui.friendBar.dataset.nature='metal'; - // ui.enemyBar.dataset.nature='fire'; - ui.create.div('.skillbarshadow',ui.friendBar); - ui.create.div('.skillbarshadow',ui.enemyBar); - ui.create.div('.skillbarfill',ui.friendBar); - ui.create.div('.skillbarfill',ui.enemyBar); - ui.friendBar.fillnode=ui.create.div(ui.friendBar.lastChild); - ui.enemyBar.fillnode=ui.create.div(ui.enemyBar.lastChild); - // ui.friendBar.popnode=ui.create.div('.skillbartext',ui.friendBar); - // ui.enemyBar.popnode=ui.create.div('.skillbartext',ui.enemyBar); - _status.friendRage=0; - _status.enemyRage=0; - - lib.setIntro(ui.friendBar); - lib.setIntro(ui.enemyBar); - } - } - _status.friendCount=ui.create.system('',null,true); - _status.enemyCount=ui.create.system('',null,true); - game.updateStatusCount(); - lib.setPopped(_status.friendCount,function(){ - var uiintro=ui.create.dialog('hidden'); - - if(_status.deadfriend.length){ - uiintro.add('已阵亡'); - uiintro.add([_status.deadfriend,'player']); - } - - uiintro.add('未上场'); - if(_status.mylist.length){ - uiintro.add([_status.mylist,'character']); - } - else{ - uiintro.add('(无)') - } - - return uiintro; - }); - lib.setPopped(_status.enemyCount,function(){ - if(_status.deadenemy.length){ - var uiintro=ui.create.dialog('hidden'); - uiintro.add('已阵亡'); - uiintro.add([_status.deadenemy,'player']); - return uiintro; - } - }); - - game.me.side=Math.random()<0.5; - game.enemy.side=!game.me.side; - - var players=get.players(lib.sort.position); - var info=[]; - for(var i=0;i=100){ - _status.friendRage=100; - ui.friendBar.fillnode.style.top='-50%'; - ui.friendBar.classList.add('full'); - } - else{ - ui.friendBar.fillnode.style.top=(100-_status.friendRage)+'%'; - ui.friendBar.classList.remove('full'); - } - } - else{ - if(_status.enemyRage<100){ - popup=ui.enemyBar; - } - _status.enemyRage+=num; - if(_status.enemyRage<0){ - _status.enemyRage=0; - } - if(_status.enemyRage>=100){ - _status.enemyRage=100; - ui.enemyBar.fillnode.style.top='-50%'; - ui.enemyBar.classList.add('full'); - } - else{ - ui.enemyBar.fillnode.style.top=(100-_status.enemyRage)+'%'; - ui.enemyBar.classList.remove('full'); - } - } - if(num>0&&popup){ - var node=ui.create.div('.skillbartext',num.toString(),popup); - ui.refresh(node); - node.style.opacity=1; - setTimeout(function(){ - node.delete(); - },700); - } - }, - drawDeck:function(num,log){ - if(!num){ - num=1; - } - var cards=this.getDeckCards(num); - if(log==false){ - this.directgain(cards); - } - else if(log==true){ - this.directgain(cards); - game.log(this,'从牌库中获得了'+get.cnNumber(num)+'张牌'); - } - else{ - this.gain(cards,'draw'); - game.log(this,'从牌库中获得了'+get.cnNumber(num)+'张牌'); - } - return cards; - }, - updateActCount:function(used,countx,current){ - if(_status.video){ - this.actcount=countx||2; - } - else{ - game.addVideo('updateActCount',this,[used,this.actcount,this.getActCount()]); - } - var maxcount,overflow2; - if(game.layout=='default'||used=='outphase'||_status.currentPhase!=this){ - maxcount=this.actcount; - } - else{ - if(_status.video){ - maxcount=this.actcount-(current||0); - } - else{ - maxcount=this.actcount-this.getActCount(); - } - if(this.actcount>maxcount){ - maxcount=this.actcount; - } - if(maxcount>12){ - maxcount=this.actcount+1; - this.node.actcount.classList.add('overflow2'); - } - else{ - this.node.actcount.classList.remove('overflow2'); - } - } - for(var i=0;i<12;i++){ - if(maxcount>this.node.actcount.childElementCount){ - ui.create.div(this.node.actcount); - } - else if(maxcount=this.actcount){ - this.node.actcount.childNodes[i].classList.add('overflow'); - } - else{ - this.node.actcount.childNodes[i].classList.remove('overflow'); - } - } - else{ - this.node.actcount.childNodes[i].classList.add('lost'); - this.node.actcount.childNodes[i].classList.remove('overflow'); - } - } - } - }, - getAct:function(){ - return this.actcount-this.getActCount(); - }, - hasFellowSkill:function(skill,exclude){ - for(var i=0;i=0){ - this.actcharacterlist[index]=null; - } - return this; - }, - dieAfter:function(source){ - var dead=this; - if(game.me.isDead()){ - if(!_status.mylist.length){ - _status.friendCount.innerHTML='友军: '+get.cnNumber(0); - game.over(false); - } - else{ - game.pause(); - _status.deadfriend.push(this); - game.additionaldead.push(this); - setTimeout(function(){ - var player=ui.create.player(); - player.getId(); - player.classList.add('noidentity'); - player.dataset.position=dead.dataset.position; - player.side=dead.side; - player.actcharacterlist=dead.actcharacterlist; - player.animate('replaceme'); - player.actcount=game.enemy.actcount; - player.actcount=dead.actcount; - if(_status.double_character){ - player.init(_status.mylist.shift(),_status.mylist.shift()); - } - else{ - player.init(_status.mylist.shift()); - } - player.maxHp++; - player.hp++; - if(_status.mode=='deck'){ - get.deck(player,_status.deck.shift()); - } - game.players.push(player); - ui.arena.appendChild(player); - - game.addVideo('stoneSwap',null,{ - name:player.name, - name2:player.name2, - position:player.dataset.position, - actcount:player.actcount, - me:true - }); - game.swapControl(player); - game.arrangePlayers(); - if(_status.mode=='deck'){ - var nd=game.enemy.countFellow(); - if(nd){ - player.draw(3+nd,{drawDeck:nd},false); - } - else{ - player.draw(3,false); - } - } - else{ - player.draw(3+game.enemy.countFellow(),false); - } - game.resume(); - game.updateStatusCount(); - },lib.config.duration); - - } - } - else if(game.enemy.isDead()){ - if(!_status.enemylist.length){ - _status.enemyCount.innerHTML='敌军: '+get.cnNumber(0); - game.over(true); - } - else{ - game.pause(); - _status.deadenemy.push(this); - game.additionaldead.push(this); - setTimeout(function(){ - var player=ui.create.player(); - player.getId(); - player.classList.add('noidentity'); - player.dataset.position=dead.dataset.position; - player.side=dead.side; - player.actcharacterlist=dead.actcharacterlist; - player.animate('replaceenemy'); - player.actcount=dead.actcount; - if(_status.double_character){ - player.init(_status.enemylist.shift(),_status.enemylist.shift()); - } - else{ - player.init(_status.enemylist.shift()); - } - player.maxHp++; - player.hp++; - if(_status.mode=='deck'){ - get.deck(player,'random'); - } - game.players.push(player); - game.enemy=player; - ui.arena.appendChild(player); - - game.addVideo('stoneSwap',null,{ - name:player.name, - name2:player.name2, - position:player.dataset.position, - actcount:player.actcount, - }); - game.arrangePlayers(); - if(_status.mode=='deck'){ - var nd=game.me.countFellow(); - if(nd){ - player.draw(3+nd,{drawDeck:nd},false); - } - else{ - player.draw(3,false); - } - } - else{ - player.draw(3+game.me.countFellow(),false); - } - game.resume(); - game.updateStatusCount(); - },lib.config.duration); - } - } - if(source&&source.side!=this.side&&!source.isMin()){ - if(_status.mode=='deck'){ - source.drawDeck(); - } - else{ - source.draw(); - } - source.actused--; - source.updateActCount(); - } - game.dead.remove(this); - game.arrangePlayers(); - this.getLeader().removeFellow(this); - setTimeout(function(){ - dead.delete(); - },500); - } - } - }, - beastList:['stone_misha','stone_leiouke','stone_huofu','stone_caoyuanshi','stone_jiewangzhu', - 'stone_huangjialeixiang','stone_damoshatuo','stone_tujiu','stone_senlinlang', - 'stone_fennuxiaoji','stone_juxingchanchu','stone_yanjingshe','stone_yuanhou' - ], - cardPack:{ - mode_stone:[ - 'spell_xiaoshi','spell_chenmo','spell_morizaihuo','spell_shengerpingdeng','spell_jingshenkongzhi','spell_anyingkuangluan', - 'spell_binghuan','spell_yanmie','spell_zhiliaozhichu','spell_wangzhezhufu','spell_diyulieyan','spell_zhiliaoshui', - 'spell_hanbingjian','spell_huoqiushu','spell_bianxingshu','spell_aoshuzhihui','spell_baofengxue','spell_lieyanfengbao', - 'spell_shandianfengbao','spell_chazhuangshandian','spell_yaoshu','spell_shixue','spell_lianhuanbaolie','spell_yexinglanghun', - 'spell_fuchouzhinu','spell_liliangzhufu','spell_fennuzhichui','spell_fengxian','spell_zuozhandongyuan','spell_shengliaoshu', - 'spell_cigu','spell_modaoyou','spell_jianrenluanwu','spell_daoshan','spell_cisha','spell_sijidaifa', - 'spell_huotigenxu','spell_wuyashenxiang','spell_ziranzhili','spell_yemanpaoxiao','spell_hengsao','spell_yexingchengzhang', - 'spell_xishengqiyue','spell_zuzhou','spell_xiaoguibaopo','spell_emozhinu','spell_anyinglieyan','spell_liliangdaijia', - 'spell_shenshengxinxing','spell_shengguangzhadan','spell_maizang','spell_xinlingshijie','spell_naluzhiguang','spell_zhiliaozhihuan', - 'spell_nuxi','spell_dunpaimengji','spell_zhansha','spell_nuhuozhongshao','spell_xuanfengzhan','spell_juemingluandou', - 'spell_lierenyinji','spell_kuaisusheji','spell_guanmenfanggou','spell_zhaohuanchongwu','spell_zidanshangtang','spell_duochongsheji', - 'spell_xianzuzhihun','spell_xianzuzhaohuan','spell_fengnu','spell_shihuawuqi','spell_xianzuzhishi','spell_rongyanbaolie', - 'spell_laojiuhuoba','spell_chirehuoba','spell_aoshufeidan','spell_canying','spell_yanbaoshu','spell_hanbingpingzhang','spell_jingxiang', - 'spell_mengun','spell_jipao','spell_beici','spell_weijisifu','spell_zhumo','spell_anzhongpohuai','spell_piaoqie', - 'spell_conglinzhihun','spell_heiandiyu','spell_fugen','spell_xingchenzhuiluo','spell_fennu','spell_ziyang', - 'spell_shalumingling','spell_tianjiangzhuqun','spell_tanxianmao','spell_dubiao','spell_qiangfengsheji','spell_zhuizongshu', - 'spell_zhenyanshu','spell_enzeshu','spell_anyingxingtai','spell_kuaisuzhiliao','spell_kongxinshu','spell_xinlinghanbao', - 'spell_jinyingduijue','spell_zhihuizhufu','spell_shenshengfennu','spell_yongshizhufu','spell_shenpan','spell_zhengqianghaosheng', - 'spell_zhongnian','spell_fuchoudaji','spell_yingyongdaji','spell_zhandounuhuo','spell_chongfeng','spell_kuangbao', - 'spell_linghunhongxi','spell_siwangchanrao','spell_emozhixin','spell_fushishu','spell_ansezhadan','spell_heianqiyue' - ] - }, - characterPack:{ - mode_stone:{ - stone_tutengyongshi:['male','wei',4,['shaman_jili'],['minskin','stone'],[4,2,'shaman']], - stone_xuejuren:['male','wei',2,['shaman_xueju'],['minskin','stone'],[1,1,'shaman']], - stone_tuyuansu:['male','qun',5,['chaofeng'],['minskin','stone'],[5,4,'shaman']], - stone_huoyuansu:['male','shu',3,['shaman_huoxi'],['minskin','stone'],[4,3,'shaman']], - stone_fachao:['male','wei',3,['shaman_tuteng','shaman_fachao'],['minskin','stone'],[3,0,'shaman']], - stone_huoshe:['male','shu',3,['shaman_tuteng','shaman_huoshe'],['minskin','stone'],[3,0,'shaman']], - stone_huoli:['male','wei',3,['shaman_tuteng','shaman_huoli'],['minskin','stone'],[2,0,'shaman']], - stone_huoyanweishi:['male','shu',4,['shaman_zhuhuo'],['minskin','stone'],[4,1,'shaman']], - stone_tutengshi:['female','wei',2,['shaman_peiyu'],['minskin','stone'],[3,3,'shaman']], - stone_shachuisaman:['male','qun',3,['shaman_fengnu'],['minskin','stone'],[4,4,'shaman']], - stone_wanshiyuansu:['male','qun',3,['shaman_zoushi'],['minskin','stone'],[3,1,'shaman']], - stone_shalinxingzhe:['male','qun',4,['shaman_anhun'],['minskin','stone'],[4,2,'shaman']], - - stone_kuangyedoushi:['male','wu',3,['druid_nuhuo'],['minskin','stone'],[4,2,'druid']], - stone_conglinshouwei:['male','wu',3,['druid_huwei'],['minskin','stone'],[4,2,'druid']], - stone_baohuzhishu:['male','qun',6,['chaofeng'],['minskin','stone'],[6,4,'druid']], - stone_liebao:['male','wei',3,['stone_chongfeng'],['minskin','stone'],[3,2,'druid']], - stone_zongxiong:['male','shu',4,['chaofeng'],['minskin','stone'],[4,2,'druid']], - stone_baoqishi:['female','wei',2,['druid_chengzhang'],['minskin','stone'],[2,2,'druid']], - stone_renyaqishi:['female','wei',1,['druid_renya'],['minskin','stone'],[1,1,'druid']], - stone_huangyeqishi:['male','wei',4,['druid_chicheng'],['minskin','stone'],[5,2,'druid']], - stone_huoshanxiemu:['male','wei',3,['druid_juhuo','chaofeng'],['minskin','stone'],[5,6,'druid']], - stone_conglinxiaoshou:['male','wei',3,['druid_yuehuo'],['minskin','stone'],[4,4,'druid']], - stone_lindishuyao:['female','wei',3,['druid_yeyou'],['minskin','stone'],[3,3,'druid']], - stone_xunmenglong:['male','wei',2,['druid_qicheng'],['minskin','stone'],[3,3,'druid']], - - stone_caoyuanshi:['male','qun',5,['hunter_nuhou'],['minskin','stone'],[5,2,'hunter']], - stone_leiouke:['male','shu',2,['hunter_zhanhuo'],['minskin','stone'],[3,1,'hunter']], - stone_huofu:['male','qun',2,['stone_chongfeng'],['minskin','stone'],[3,4,'hunter']], - stone_misha:['male','shu',3,['chaofeng'],['minskin','stone'],[3,3,'hunter']], - stone_jiewangzhu:['male','wu',1,['hunter_jiewang'],['minskin','stone'],[1,2,'hunter']], - stone_xunshoushi:['male','qun',2,['hunter_xunshou'],['minskin','stone'],[4,3,'hunter']], - stone_senlinlang:['male','qun',1,['hunter_qunxi'],['minskin','stone'],[1,2,'hunter']], - stone_tujiu:['male','qun',3,['hunter_mishi'],['minskin','stone'],[3,2,'hunter']], - stone_muyangren:['male','qun',3,['hunter_muyang'],['minskin','stone'],[4,3,'hunter']], - stone_jujishou:['male','qun',2,['hunter_juji'],['minskin','stone'],[2,2,'hunter']], - stone_damoshatuo:['male','qun',3,['hunter_dusha'],['minskin','stone'],[3,3,'hunter']], - stone_huangjialeixiang:['male','qun',2,['hunter_chuanlin'],['minskin','stone'],[2,3,'hunter']], - - stone_shuiyuansu:['male','wei',4,['mage_bingdong'],['minskin','stone'],[4,2,'mage']], - stone_wushixuetu:['female','wu',1,['mage_zhufa'],['minskin','stone'],[1,2,'mage']], - stone_huoyao:['male','shu',3,['mage_lieyan'],['minskin','stone'],[3,1,'mage']], - stone_falifulong:['male','shu',2,['mage_tunfa'],['minskin','stone'],[1,1,'mage']], - stone_yingxiongzhihun:['male','wei',1,['mage_minghuo'],['minskin','stone'],[1,2,'mage']], - stone_shifazhe:['male','qun',3,['mage_shifa'],['minskin','stone'],[3,3,'mage']], - stone_aoshushi:['male','qun',3,['mage_aoshu'],['minskin','stone'],[3,2,'mage']], - stone_faqishi:['male','qun',4,['mage_jili'],['minskin','stone'],[4,2,'mage']], - stone_fuhuokaijia:['male','qun',3,['mage_gushou'],['minskin','stone'],[3,3,'mage']], - stone_kaodalalong:['male','qun',4,['mage_yufa'],['minskin','stone'],[5,4,'mage']], - stone_yanshushi:['male','qun',2,['mage_yanshu'],['minskin','stone'],[4,4,'mage']], - stone_xulingwushi:['male','qun',2,['mage_pingxu'],['minskin','stone'],[3,3,'mage']], - - stone_hudunren:['male','qun',2,['paladin_hudun'],['minskin','stone'],[2,2,'paladin']], - stone_junxuguan:['male','qun',3,['paladin_buji'],['minskin','stone'],[4,1,'paladin']], - stone_yurenqishi:['male','qun',2,['paladin_zhaochao'],['minskin','stone'],[4,2,'paladin']], - stone_chidunweishi:['male','qun',3,['paladin_chidun'],['minskin','stone'],[3,2,'paladin']], - stone_liewangshouwei:['male','qun',5,['paladin_shouwei'],['minskin','stone'],[5,2,'paladin']], - stone_longwangpeiou:['female','qun',4,['paladin_zhaohuan'],['minskin','stone'],[5,4,'paladin']], - stone_baoweizhe:['male','qun',2,['paladin_baowei'],['minskin','stone'],[2,1,'paladin']], - stone_guiqishi:['male','qun',5,['paladin_tuxi'],['minskin','stone'],[5,4,'paladin']], - stone_shenmiqishou:['male','qun',4,['paladin_miying'],['minskin','stone'],[5,4,'paladin']], - stone_shixiangweishi:['female','qun',3,['paladin_huashi'],['minskin','stone'],[3,3,'paladin']], - stone_xuefanzhanshi:['male','qun',3,['paladin_jinghua'],['minskin','stone'],[4,4,'paladin']], - stone_xunmashi:['male','qun',3,['paladin_moma'],['minskin','stone'],[3,2,'paladin']], - - stone_lieyanxiaogui:['male','qun',2,['warlock_nonghuo'],['minskin','stone'],[1,4,'warlock']], - stone_xiaoguishouling:['male','qun',3,['warlock_zhaogui'],['minskin','stone'],[3,1,'warlock']], - stone_xiaogui:['male','qun',1,[],['minskin','stone','stonehidden'],[1,1]], - stone_kongjuzhanma:['male','qun',1,['warlock_yongsheng'],['minskin','stone'],[3,1,'warlock']], - stone_morishouwei:['male','qun',4,['stone_chongfeng','warlock_zaihuo'],['minskin','stone'],[4,4,'warlock']], - stone_xukongxingzhe:['male','qun',2,['chaofeng'],['minskin','stone'],[1,1,'warlock']], - stone_diyuhuo:['male','qun',4,['warlock_yuhuo'],['minskin','stone'],[5,4,'warlock']], - stone_diyuhuox:['male','qun',2,[],['minskin','stone','stonehidden'],[2,2,'warlock']], - stone_heishitanfan:['male','qun',2,['warlock_anyu'],['minskin','stone'],[2,2,'warlock']], - stone_zhaohuanzhe:['male','qun',3,['warlock_zhaohuan'],['minskin','stone'],[4,2,'warlock']], - stone_meimo:['male','qun',3,['warlock_huanmeng'],['minskin','stone'],[2,3,'warlock']], - stone_tongkunvwang:['male','qun',2,['warlock_tongku'],['minskin','stone'],[2,1,'warlock']], - stone_xukongkongmo:['male','qun',3,['warlock_tunshi'],['minskin','stone'],[3,3,'warlock']], - stone_fukongmoyan:['male','qun',4,['warlock_shijie'],['minskin','stone'],[5,4,'warlock']], - - stone_zhihuiguan:['female','qun',2,['warrior_tongling'],['minskin','stone'],[3,2,'warrior']], - stone_kuangzhanshi:['male','qun',2,['warrior_baoluan'],['minskin','stone'],[3,1,'warrior']], - stone_zhujiashi:['male','qun',2,['warrior_zhujia'],['minskin','stone'],[2,1,'warrior']], - stone_jiangong:['male','qun',2,['warrior_jiangong'],['minskin','stone'],[2,2,'warrior']], - stone_chidunshinv:['female','qun',4,['warrior_tidun'],['minskin','stone'],[5,4,'warrior']], - stone_yuanhou:['male','qun',2,['chaofeng'],['minskin','stone'],[2,3,'warrior']], - stone_heiyaoyaoshou:['male','qun',4,['warrior_heiyao'],['minskin','stone'],[5,4,'warrior']], - stone_honglongyongshi:['male','qun',2,['warrior_fenyong'],['minskin','stone'],[2,3,'warrior']], - stone_peilianshi:['male','qun',2,['chaofeng','warrior_peilian'],['minskin','stone'],[2,2,'warrior']], - stone_jingyingweishi:['male','qun',3,['stone_chongfeng'],['minskin','stone'],[4,3,'warrior']], - stone_mengmaren:['male','qun',3,['warrior_chuanci'],['minskin','stone'],[4,4,'warrior']], - stone_zhifuzhe:['male','qun',2,['warrior_zhifu'],['minskin','stone'],[3,1,'warrior']], - - stone_daomufeizei:['male','qun',3,['rogue_xunbao'],['minskin','stone'],[4,3,'rogue']], - stone_qiezei:['male','qun',2,['rogue_touqie'],['minskin','stone'],[2,2,'rogue']], - stone_heitieairen:['male','qun',2,['rogue_qiancang'],['minskin','stone'],[4,3,'rogue']], - stone_tegong:['male','qun',2,['rogue_touxi'],['minskin','stone'],[3,3,'rogue']], - stone_haidaotoumu:['male','qun',2,['rogue_zhaomu'],['minskin','stone'],[2,2,'rogue']], - stone_haidao:['male','qun',1,[],['minskin','stone','stonehidden'],[1,2,'rogue']], - stone_cike:['male','qun',1,['rogue_cisha','stone_qianxing'],['minskin','stone'],[1,1,'rogue']], - stone_duyanhaidao:['male','qun',2,['rogue_duxing'],['minskin','stone'],[3,4,'rogue']], - stone_gangtiewushi:['male','qun',2,['rogue_shoudao'],['minskin','stone'],[3,2,'rogue']], - stone_lifaji:['male','qun',2,['rogue_lifa'],['minskin','stone'],[2,2,'rogue']], - stone_shihualong:['male','qun',1,['rogue_fusheng'],['minskin','stone'],[3,2,'rogue']], - stone_xiushuihaidao:['male','qun',1,['rogue_jielue'],['minskin','stone'],[1,2,'rogue']], - stone_zousishangfan:['male','qun',3,['rogue_jiaoyi'],['minskin','stone'],[4,3,'rogue']], - - stone_beijunmushi:['male','qun',2,['priest_shengliao'],['minskin','stone'],[1,1,'priest']], - stone_guanliyuan:['male','qun',2,['priest_faxian'],['minskin','stone'],[2,1,'priest']], - stone_linghunjisi:['female','qun',4,['priest_hunwu'],['minskin','stone'],[4,2,'priest']], - stone_heianjiaotu:['male','qun',3,['priest_zhufu'],['minskin','stone'],[3,2,'priest']], - stone_guangyaozhizi:['male','qun',3,['priest_guangyao'],['minskin','stone'],[5,3,'priest']], - stone_longmianjiaoguan:['male','qun',2,['priest_xundao'],['minskin','stone'],[2,2,'priest']], - stone_shengdianzhishi:['male','qun',4,['priest_puzhao'],['minskin','stone'],[5,4,'priest']], - stone_suoxiaojishi:['male','qun',2,['priest_suoxiao'],['minskin','stone'],[2,2,'priest']], - stone_anyingzisi:['male','qun',3,['priest_shixin'],['minskin','stone'],[4,4,'priest']], - stone_guangmingquan:['male','qun',3,['priest_shengshui'],['minskin','stone'],[2,0,'priest']], - stone_muguangchulong:['male','qun',2,['priest_muguang'],['minskin','stone'],[1,1,'priest']], - stone_shenshengyongshi:['male','qun',3,['priest_shengguang'],['minskin','stone'],[4,3,'priest']], - - stone_zhongshi:['male','wei',1,['stone_zhongshi1'],['minskin','stone'],[1,2]], - stone_zhucangzhe:['male','wei',1,['stone_zhucangzhe1'],['minskin','stone'],[1,2]], - stone_huoqiangshou:['male','wei',3,['stone_huoqiangshou1'],['minskin','stone'],[3,1]], - - stone_lansaizhanshi:['male','shu',1,['stone_chongfeng'],['minskin','stone'],[1,2]], - stone_kutongsiseng:['male','shu',1,['stone_kutongsiseng1'],['minskin','stone'],[1,2]], - stone_yuanguanying:['male','shu',3,['stone_yuanguanying1'],['minskin','stone'],[3,1]], - - stone_dijieshicong:['male','wu',2,['stone_dijieshicong1'],['minskin','stone'],[1,1]], - stone_yaosaishouwei:['male','wu',2,['stone_yaosaishouwei1'],['minskin','stone'],[1,1]], - stone_famingjia:['male','wu',3,['stone_famingjia1'],['minskin','stone'],[3,1]], - - stone_chilundashi:['male','qun',2,['stone_chilundashi1'],['minskin','stone'],[1,1]], - stone_hanguangzhizhe:['male','qun',2,['stone_hanguangzhizhe1'],['minskin','stone'],[2,2]], - stone_aihaozhihun:['male','qun',3,['stone_aihaozhihun1'],['minskin','stone'],[3,1]], - - stone_fennuxiaoji:['male','qun',1,['stone_fennuxiaoji1'],['minskin','stone'],[1,2]], - stone_juxingchanchu:['male','qun',2,['stone_juxingchanchu1'],['minskin','stone'],[2,1]], - stone_wuyi:['male','qun',1,['jijiu'],['minskin','stone'],[2,2]], - stone_langren:['male','qun',1,['stone_qianxing'],['minskin','stone'],[1,2]], - stone_shishigui:['male','qun',2,['stone_shishigui1'],['minskin','stone'],[2,1]], - - stone_fatiaozhuru:['female','qun',1,['stone_fatiaozhuru1'],['minskin','stone'],[1,2]], - stone_mingguangjisi:['female','wu',2,['shushen'],['minskin','stone'],[2,1]], - stone_nianqingjisi:['female','wei',2,['stone_zhufu'],['minskin','stone'],[2,1]], - stone_aomishouwei:['female','qun',1,['biyue'],['minskin','stone'],[2,2]], - stone_yanjingshe:['female','qun',2,['stone_yanjingshe1'],['minskin','stone'],[3,2]], - stone_zhiyuzhe:['female','qun',3,['stone_zhiyu'],['minskin','stone'],[3,1]], - stone_mafengzhuru:['female','qun',1,['stone_mafengzhuru1'],['minskin','stone'],[1,2]], - - stone_shumiao:['none','wu',1,[],['minskin','stone','stonehidden'],[1,1]], - stone_shuren:['none','wu',2,['stone_chongfeng','stone_zibao'],['minskin','stone','stonehidden'],[2,2]], - stone_shurenx:['none','wu',2,[],['minskin','stone','stonehidden'],[2,2]], - stone_shurenxx:['none','wu',2,['chaofeng'],['minskin','stone','stonehidden'],[2,2]], - stone_youlinglang:['none','qun',2,['chaofeng'],['minskin','stone','stonehidden'],[2,2]], - stone_xiaojingling:['none','qun',1,['xuying'],['minskin','stone','stonehidden'],[1,1]], - stone_zhumo:['none','qun',2,[],['minskin','stone','stonehidden'],[2,2]], - stone_jingxiang:['none','qun',2,['stone_jingxiang','chaofeng'],['minskin','stone','stonehidden'],[2,0]], - stone_shengguanghuwei:['female','qun',2,['priest_shengguang'],['minskin','stone','stonehidden'],[1,1]], - stone_liegou:['none','qun',1,['stone_chongfeng'],['minskin','stone','stonehidden'],[1,2]], - stone_mianyang:['none','qun',1,['mage_mianyang'],['minskin','stone','stonehidden'],[1,0]], - stone_qingwa:['none','wu',1,['shaman_qingwa'],['minskin','stone','stonehidden'],[1,0]], - stone_shengjiachong:['none','qun',1,['chaofeng'],['minskin','stone','stonehidden'],[1,1]], - - stone_tuteng1:['none','qun',2,['shaman_tuteng','chaofeng'],['minskin','stone','stonehidden'],[2,0]], - stone_tuteng2:['none','qun',2,['shaman_tuteng','shaman_zhuore'],['minskin','stone','stonehidden'],[2,0]], - stone_tuteng3:['none','qun',2,['shaman_tuteng','shaman_fali'],['minskin','stone','stonehidden'],[2,0]], - stone_tuteng4:['none','qun',2,['shaman_tuteng','shaman_zhiliao'],['minskin','stone','stonehidden'],[2,0]], - stone_xinbing:['none','qun',2,[],['minskin','stone','stonehidden'],[2,0]], - - stone_siwangzhiyi:['male','qun',4,['stone_mieshi'],['minskin','stone','stonehidden','stonelegend'],[6,4]], - stone_alaikesita:['female','qun',4,['stone_fushi'],['minskin','stone','stonehidden','stonelegend'],[6,4]], - stone_yisela:['female','qun',4,['stone_chenshui'],['minskin','stone','stonehidden','stonelegend'],[6,2]], - stone_nuoziduomu:['male','qun',4,['stone_shixu'],['minskin','stone','stonehidden','stonelegend'],[6,4]], - stone_maligousi:['male','qun',4,['stone_mowang'],['minskin','stone','stonehidden','stonelegend'],[6,2]], - - stone_aolajier:['male','qun',4,['stone_chongfeng','shaman_fengnu','paladin_hudun','chaofeng'],['minskin','stone','stonehidden','stonelegend_shaman'],[6,4]], - stone_andongni:['male','qun',4,['stone_zhiyin'],['minskin','stone','stonehidden','stonelegend_mage'],[6,4]], - stone_jialakesi:['male','qun',6,['stone_bianshen'],['minskin','stone','stonehidden','stonelegend_warlock'],[6,0]], - stone_jialakesix:['male','qun',6,['stone_lianyu'],['modeimage','stonehidden','stonespecial']], - stone_kelushi:['male','qun',5,['stone_chongfeng'],['minskin','stone','stonehidden','stonelegend_hunter'],[6,5]], - stone_geluomashi:['male','qun',4,['stone_chongfeng','stone_jinu'],['minskin','stone','stonehidden','stonelegend_warrior'],[6,4]], - stone_aidewen:['male','qun',3,['stone_lianji'],['minskin','stone','stonehidden','stonelegend_rogue'],[6,3]], - stone_sainaliusi:['male','qun',3,['stone_shenyu'],['minskin','stone','stonehidden','stonelegend_druid'],[6,3]], - stone_fuding:['male','qun',3,['paladin_hudun','chaofeng','stone_fuchou'],['minskin','stone','stonehidden','stonelegend_paladin'],[6,3]], - stone_weilun:['male','qun',4,['stone_shenyou'],['minskin','stone','stonehidden','stonelegend_priest'],[6,6]], - } - }, - careerList:['mage','shaman','druid','paladin','rogue','priest','hunter','warrior','warlock'], - game:{ - reserveDead:true, - bannedcards:['lebu','guiyoujie','xietianzi','lingjiandai','jiguanshu','sifeizhenmian','fengxueren','chuansongmen'], - onwash:function(){ - if(_status.mode!='deck') return; - var list=[]; - for(var i=0;i'+i+'',buttons,clickButton); - ui.create.div('.menubutton.round',deckitem).dataset.career=lib.storage.deckList[i].career; - deckitem.name=i; - } - } - for(var i=0;i随机',buttons,clickButton); - ui.create.div('.menubutton.round',deckitem).dataset.career=lib.careerList[i]; - deckitem.name='random:'+lib.careerList[i]; - } - event.dialog.open(); - } - else{ - var bn=parseInt(get.config('battle_number')); - for(var i=0;ib) return 1; - if(a==b) return 0; - return -1; - }); - player.deck=name; - player.career=career; - if(!player.node.career){ - player.node.career=ui.create.div('.menubutton.round.identity',player); - player.node.career.dataset.career=career; - lib.setIntro(player.node.career); - } - if(!player.deckCards) player.deckCards=[]; - for(var i=0;i=2) return 1; - return 0; - } - } - } - }, - spell_linghunhongxi:{ - type:'stonecard', - stoneact:4, - career:'warlock', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - content:function(){ - 'step 0' - target.die(); - 'step 1' - player.recover(); - }, - ai:{ - order:7.5, - value:5, - useful:5, - result:{ - target:function(player,target){ - return -target.hp-target.countCards('h')/2; - } - } - } - }, - spell_fushishu:{ - type:'stonecard', - stoneact:2, - career:'warlock', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&!target.hasSkill('warlock_fushishu'); - }, - content:function(){ - target.addSkill('warlock_fushishu'); - }, - ai:{ - order:7.5, - value:5, - useful:5, - result:{ - target:function(player,target){ - return -target.hp-target.countCards('h')/2; - } - } - } - }, - - spell_fuchoudaji:{ - type:'stonecard', - fullimage:true, - enable:true, - stoneact:3, - career:'warrior', - filterTarget:function(card,player,target){ - return target.isMin(); - }, - selectTarget:-1, - content:function(){ - if(player.hp<=2){ - target.damage(3); - } - else{ - target.damage(); - } - }, - ai:{ - order:8.9, - value:5, - useful:5, - result:{ - target:-1.5 - }, - tag:{ - damage:1, - multitarget:1, - multineg:1, - } - } - }, - spell_yingyongdaji:{ - type:'stonecard', - stoneact:2, - career:'warrior', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.side!=player.side; - }, - content:function(){ - 'step 0' - player.damage(2,target); - 'step 1' - target.damage(2); - }, - ai:{ - order:8, - value:5, - useful:5, - result:{ - target:function(player,target){ - if(player.hujia>=2) return -1.5; - if(player.hujia==1){ - if(player.hp>3) return -1.5; - return 0; - } - return 0; - } - }, - tag:{ - damage:1, - } - } - }, - spell_zhandounuhuo:{ - type:'stonecard', - fullimage:true, - enable:function(event,player){ - for(var i=0;i=2) return -1.5; - } - } - return 0; - }, - tag:{ - damage:1 - } - } - } - }, - - spell_jinyingduijue:{ - type:'stonecard', - stoneact:4, - career:'paladin', - enable:function(card,player){ - var n1=player.countFellow(); - var n2=player.getEnemy().countFellow(); - return n1>0&&n2>0&&n1+n2>2; - }, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - selectTarget:-1, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - if(!targets.length){ - event.finish(); - return; - } - var maxf=[],maxe=[]; - for(var i=0;imaxf[0].hp){ - maxf.length=0; - maxf.push(targets[i]); - } - } - else{ - if(!maxe.length||targets[i].hp==maxe[0].hp){ - maxe.push(targets[i]); - } - else if(targets[i].hp>maxe[0].hp){ - maxe.length=0; - maxe.push(targets[i]); - } - } - } - if(maxf.length){ - targets.remove(maxf.randomGet()); - } - if(maxe.length){ - targets.remove(maxe.randomGet()); - } - targets.sort(lib.sort.seat); - event.targets=targets; - 'step 1' - if(event.targets.length){ - event.targets.shift().die(); - event.redo(); - } - }, - ai:{ - order:9, - value:2, - useful:2, - result:{ - player:function(player,target){ - return player.getEnemy().countFellow()-player.countFellow(); - } - } - } - }, - spell_zhihuizhufu:{ - type:'stonecard', - stoneact:1, - career:'paladin', - enable:function(card,player){ - return !player.isMin(); - }, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&!target.hasSkill('paladin_zhihuizhufu'); - }, - content:function(){ - target.addSkill('paladin_zhihuizhufu'); - target.storage.paladin_zhihuizhufu=player; - }, - ai:{ - order:2, - value:5, - useful:5, - result:{ - player:function(player,target){ - return target.hp; - } - } - } - }, - spell_shenshengfennu:{ - type:'stonecard', - stoneact:5, - career:'paladin', - enable:true, - fullimage:true, - filterTarget:true, - content:function(){ - 'step 0' - event.card=player.getDeckCards()[0]; - player.gain(event.card,'gain2','log'); - 'step 1' - var num=lib.card[event.card.name].stoneact; - if(num&&typeof num=='number'){ - target.damage(num); - } - }, - ai:{ - order:6, - value:2, - useful:2, - result:{ - target:-2 - }, - tag:{ - damage:2 - } - } - }, - spell_yongshizhufu:{ - type:'stonecard', - stoneact:2, - career:'paladin', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&target.countCards('h')>0; - }, - content:function(){ - target.draw(target.countCards('h')); - }, - ai:{ - order:4, - value:2, - useful:2, - result:{ - target:function(player,target){ - return Math.max(0,target.countCards('h')-1); - } - } - } - }, - spell_shenpan:{ - type:'stonecard', - stoneact:2, - career:'paladin', - enable:function(card,player){ - var num=player.getEnemy().countFellow(); - return num>0&&num>=player.countFellow(); - }, - fullimage:true, - notarget:true, - content:function(){ - var target=player.getEnemy().getFellow().randomGet(); - player.line(target); - target.die(); - }, - ai:{ - order:9, - value:4, - useful:4, - result:{ - player:1 - } - } - }, - spell_zhengqianghaosheng:{ - type:'stonecard', - stoneact:2, - career:'paladin', - enable:function(card,player){ - return !player.hasSkill('paladin_zhengqianghaosheng'); - }, - fullimage:true, - filterTarget:function(card,player,target){ - return player==target; - }, - selectTarget:-1, - content:function(){ - player.addSkill('paladin_zhengqianghaosheng'); - }, - ai:{ - order:3, - value:4, - useful:4, - result:{ - player:function(player){ - if(player.countFellow()>=2) return 1; - return 0; - } - } - } - }, - - spell_zhenyanshu:{ - type:'stonecard', - stoneact:1, - career:'priest', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - content:function(){ - target.maxHp++; - target.hp++; - target.update(); - player.drawDeck(); - }, - ai:{ - order:7, - value:3, - useful:3, - result:{ - target:function(player,target){ - return Math.max(1,10-target.hp); - } - } - } - }, - spell_enzeshu:{ - type:'stonecard', - stoneact:3, - career:'priest', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - content:function(){ - target.maxHp+=3; - target.hp+=3; - target.update(); - }, - ai:{ - order:5, - value:3, - useful:3, - result:{ - target:function(player,target){ - return Math.max(1,10-target.hp); - } - } - } - }, - spell_anyingxingtai:{ - type:'stonecard', - stoneact:2, - career:'priest', - chongzhu:true, - enable:function(event,player){ - if(player.career!='priest') return false; - return !player.storage.anyingxingtai||player.storage.anyingxingtai<2; - }, - fullimage:true, - filterTarget:function(card,player,target){ - return player==target; - }, - selectTarget:-1, - content:function(){ - if(typeof player.storage.anyingxingtai!='number'){ - player.storage.anyingxingtai=1; - } - else if(player.storage.anyingxingtai<2){ - player.storage.anyingxingtai=2; - } - player.markSkill('priest_anyingxingtai'); - }, - ai:{ - order:6.1, - value:3, - useful:3, - result:{ - player:1 - } - } - }, - spell_kuaisuzhiliao:{ - type:'stonecard', - stoneact:2, - career:'priest', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - if(player.hasFellowSkill('priest_hunwu')){ - return true; - } - return target.hp=2) return 1; - } - } - return 0; - } - } - } - }, - spell_heiandiyu:{ - fullimage:true, - type:'stonecard', - enable:true, - stoneact:4, - career:'druid', - filterTarget:function(card,player,target){ - return target.isMin(); - }, - multitarget:true, - targetprompt:['增加体力并摸牌'], - selectTarget:[0,1], - notarget:true, - content:function(){ - 'step 0' - if(targets.length){ - targets[0].maxHp++; - targets[0].hp++; - target.update(); - targets[0].draw(3); - event.finish(); - } - else{ - event.num=0; - } - 'step 1' - if(player.canAddFellow()&&event.num++<10){ - player.addFellowAuto('stone_xiaojingling'); - event.redo(); - } - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - return Math.max(1,target.hp-target.countCards('h')); - }, - } - } - }, - spell_ziyang:{ - type:'stonecard', - stoneact:3, - career:'druid', - enable:function(card,player){ - return player.deckCards&&!player.isMin(); - }, - fullimage:true, - filterTarget:function(card,player,target){ - return player==target; - }, - selectTarget:-1, - content:function(){ - 'step 0' - if(player.hasSkill('druid_ziyang')){ - player.drawDeck(3); - event.finish(); - } - else{ - player.chooseControl('获得行动值','摸牌').ai=function(){ - if(player.countCards('h')<=1) return '摸牌'; - return '获得行动值'; - }; - } - 'step 1' - if(result.control=='摸牌'){ - player.drawDeck(3); - } - else{ - player.addSkill('druid_ziyang'); - } - }, - ai:{ - order:1, - value:4, - useful:4, - result:{ - player:1 - } - } - }, - spell_xingchenzhuiluo:{ - type:'stonecard', - fullimage:true, - enable:true, - stoneact:6, - career:'druid', - targetprompt:['造成五点伤害'], - multitarget:true, - filterTarget:function(card,player,target){ - return target.side!=player.side&&target.isMin(); - }, - selectTarget:[0,1], - notarget:true, - content:function(){ - 'step 0' - if(targets.length){ - targets[0].damage(4); - event.finish(); - } - else{ - var list=player.getFellow(true); - if(list.length){ - list.sort(lib.sort.seat); - event.list=list; - player.line(list); - } - else{ - event.finish(); - } - } - 'step 1' - if(event.list.length){ - event.list.shift().damage(2); - event.redo(); - } - }, - ai:{ - order:7, - useful:5, - value:5, - result:{ - target:function(player,target){ - if(target==player.getEnemy()) return -2; - return -1; - } - }, - tag:{ - damage:2 - } - } - }, - spell_fennu:{ - type:'stonecard', - fullimage:true, - enable:true, - stoneact:2, - career:'druid', - filterTarget:function(card,player,target){ - return target.isMin(); - }, - content:function(){ - 'step 0' - player.chooseControl('两点','一点').prompt='造成两点伤害,或造成一点伤害并从牌库中获得一张牌'; - 'step 1' - if(result.control=='一点'){ - target.damage(); - } - else{ - target.damage(2); - event.finish(); - } - 'step 2' - player.drawDeck(); - }, - ai:{ - order:8, - value:5, - useful:5, - result:{ - target:-1 - }, - tag:{ - damage:2, - } - } - }, - spell_fugen:{ - type:'stonecard', - stoneact:2, - career:'druid', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - content:function(){ - 'step 0' - target.die(); - 'step 1' - var list=[]; - for(var i in lib.card){ - if(lib.card[i].stonehidden) continue; - if(lib.card[i].type=='stonecharacter'){ - list.push(i); - } - } - player.getEnemy().gain(game.createCard(list.randomGet()),'draw'); - }, - ai:{ - order:8.8, - value:5, - useful:5, - result:{ - target:function(player,target){ - return -target.hp-target.countCards('h')/2; - } - } - } - }, - - spell_mengun:{ - type:'stonecard', - stoneact:2, - career:'rogue', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&target.side!=player.side; - }, - content:function(){ - 'step 0' - target.die()._triggered=null; - event.name=target.name; - 'step 1' - player.getEnemy().gain(game.createCard(event.name+'_stonecharacter'),'gain2'); - }, - ai:{ - order:8.8, - value:5, - useful:5, - result:{ - target:function(player,target){ - return -target.hp-target.countCards('h')/2; - } - } - } - }, - spell_jipao:{ - type:'stonecard', - stoneact:3, - career:'rogue', - enable:function(card,player){ - return !player.isMin(); - }, - fullimage:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - content:function(){ - if(!player.isMin()){ - player.drawDeck(4); - } - }, - ai:{ - order:1, - value:3, - useful:3, - result:{ - player:1 - } - } - }, - spell_beici:{ - type:'stonecard', - stoneact:0, - career:'rogue', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&target.hp==target.maxHp; - }, - content:function(){ - target.loseHp(); - }, - ai:{ - order:9, - result:{ - target:-1 - }, - value:6, - useful:6, - } - }, - spell_weijisifu:{ - type:'stonecard', - stoneact:2, - career:'rogue', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target==player.getEnemy(); - }, - selectTarget:-1, - content:function(){ - if(target.deckCards){ - var cards=[]; - for(var i=0;i<3;i++){ - cards.push(game.createCard('spell_zhumo')); - } - player.$give(cards,target); - for(var i=0;i0; - }, - stoneact:2, - career:'mage', - filterTarget:function(card,player,target){ - return target.side!=player.side&&target.isMin(); - }, - selectTarget:-1, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - if(!targets.length){ - event.finish(); - return; - } - var map=[]; - for(var i=0;i1) return target.hp; - return 0; - } - } - } - }, - spell_shihuawuqi:{ - type:'stonecard', - stoneact:1, - career:'shaman', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&!target.hasSkill('shaman_shihuawuqi'); - }, - content:function(){ - target.addSkill('shaman_shihuawuqi'); - }, - ai:{ - order:4, - value:4, - useful:4, - result:{ - target:function(player,target){ - if(target.isTurnedOver()) return 0; - var num=0; - if(target.hasSkill('shaman_fengnu')){ - num=3; - } - if(target.isMin()) return target.hp+num; - return 1.1; - } - } - } - }, - spell_xianzuzhaohuan:{ - type:'stonecard', - stoneact:2, - career:'shaman', - fullimage:true, - enable:true, - filterTarget:function(card,player,target){ - return !target.isMin(); - }, - multitarget:true, - multiline:true, - selectTarget:-1, - content:function(){ - 'step 0' - if(targets[0]){ - var hs=targets[0].getCards('h',function(card){ - return get.type(card)=='stonecharacter'; - }); - if(hs.length&&targets[0].canAddFellow()){ - targets[0].useCard(targets[0],hs.randomGet(),false).noActCount=true; - } - } - 'step 1' - if(targets[1]){ - var hs=targets[1].getCards('h',function(card){ - return get.type(card)=='stonecharacter'; - }); - if(hs.length&&targets[1].canAddFellow()){ - targets[1].useCard(targets[1],hs.randomGet(),false).noActCount=true; - } - } - }, - ai:{ - order:9, - value:5, - useful:5, - result:{ - player:function(player){ - var hs=player.getCards('h',function(card){ - return get.type(card)=='stonecharacter'; - }); - if(hs.length==0) return 0; - var enemy=player.getEnemy(); - if(enemy.countCards('h')<=1) return 1; - var num=0; - for(var i=0;i=3) return 1; - return 0; - } - } - } - }, - spell_xianzuzhihun:{ - type:'stonecard', - stoneact:2, - career:'shaman', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&!target.hasSkill('shaman_xianzuzhihun'); - }, - content:function(){ - target.addSkill('shaman_xianzuzhihun'); - }, - ai:{ - order:5, - value:4, - useful:4, - result:{ - target:function(player,target){ - if(lib.card[target.name+'_stonecharacter']){ - return lib.card[target.name+'_stonecharacter'].stoneact-1; - } - return 0; - } - } - } - }, - spell_xianzuzhishi:{ - type:'stonecard', - fullimage:true, - enable:true, - stoneact:0, - career:'shaman', - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - content:function(){ - player.drawDeck(2); - player.addTempSkill('shaman_xianzuzhishi','phaseAfter'); - }, - ai:{ - order:10, - result:{ - player:1 - } - } - }, - spell_rongyanbaolie:{ - type:'stonecard', - fullimage:true, - enable:true, - stoneact:3, - career:'shaman', - filterTarget:true, - content:function(){ - 'step 0' - target.damage(3,'fire'); - 'step 1' - player.loseHp(); - }, - ai:{ - order:8, - value:6, - useful:5, - result:{ - target:-2 - }, - tag:{ - damage:2, - natureDamage:2, - fireDamage:2, - } - } - }, - - spell_shenshengxinxing:{ - type:'stonecard', - stoneact:5, - career:'priest', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - if(player.hasFellowSkill('priest_hunwu')||target.side!=player.side) return true; - return target.isDamaged(); - }, - selectTarget:-1, - content:function(){ - var num=1; - if(player.hasFellowSkill('stone_shenyou')){ - num=2; - } - if(player.side==target.side){ - if(player.hasFellowSkill('priest_hunwu')){ - target.loseHp(num); - } - else{ - target.recover(num); - } - } - else{ - target.damage(); - } - }, - ai:{ - order:7, - value:5, - useful:5, - result:{ - target:function(player,target){ - if(player.hasFellowSkill('priest_hunwu')) return -1; - if(player.side==target.side) return 1; - return -1; - } - }, - tag:{ - damage:1, - multitarget:1, - multineg:1 - } - } - }, - spell_shengguangzhadan:{ - type:'stonecard', - stoneact:2, - career:'priest', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&target.countCards('h')>0; - }, - selectTarget:-1, - content:function(){ - var num=1; - // if(player.hasFellowSkill('stone_shenyou')){ - // num=2; - // } - target.damage(target.countCards('h')*num); - }, - ai:{ - order:7, - value:5, - useful:5, - result:{ - target:function(player,target){ - return -Math.min(target.countCards('h'),target.hp); - } - }, - tag:{ - damage:1, - multitarget:1, - multineg:1 - } - } - }, - spell_maizang:{ - type:'stonecard', - stoneact:3, - career:'priest', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&target.side!=player.side; - }, - content:function(){ - 'step 0' - target.die()._triggered=null; - 'step 1' - if(player.deckCards){ - player.deckCards.push(game.createCard(target.name+'_stonecharacter')); - } - }, - ai:{ - order:7, - value:5, - useful:5, - result:{ - target:function(player,target){ - return -target.hp-target.countCards('h')/2; - } - } - } - }, - spell_xinlingshijie:{ - type:'stonecard', - stoneact:0, - career:'priest', - enable:function(event,player){ - return player.getEnemy().countCards('h')>0; - }, - fullimage:true, - filterTarget:function(card,player,target){ - return target==player.getEnemy(); - }, - selectTarget:-1, - content:function(){ - var card=target.getCards('h').randomGet(); - if(card){ - player.gain(game.createCard(card.name,card.suit,card.number,card.nature),'draw'); - } - }, - ai:{ - order:9.5, - value:5, - useful:5, - result:{ - player:1 - } - } - }, - spell_naluzhiguang:{ - type:'stonecard', - stoneact:1, - career:'priest', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - if(player.hasFellowSkill('priest_hunwu')){ - return true; - } - return target.hp0; - }, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - content:function(){ - target.damage(player.hujia); - }, - ai:{ - order:7.2, - value:5, - useful:5, - result:{ - target:-1.5, - tag:{ - damage:1 - } - } - } - }, - spell_zhansha:{ - type:'stonecard', - stoneact:1, - career:'warrior', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&target.hp=4) return 1.5; - if(target.hp>=3&&target.countCards('h')=2) return true; - } - } - return false; - }, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - selectTarget:-1, - content:function(){ - 'step 0' - targets.randomRemove(); - targets.sort(lib.sort.seat); - event.list=targets; - 'step 1' - if(event.list.length){ - event.list.shift().die(); - event.redo(); - } - }, - ai:{ - order:9, - value:5, - useful:5, - result:{ - target:-2 - } - } - }, - - spell_lierenyinji:{ - type:'stonecard', - stoneact:0, - career:'hunter', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target.isMin()&&target.maxHp>1; - }, - content:function(){ - target.loseMaxHp(target.maxHp-1); - }, - ai:{ - order:7, - value:5, - useful:5, - result:{ - target:function(player,target){ - return 1-target.hp; - } - } - } - }, - spell_kuaisusheji:{ - type:'stonecard', - stoneact:2, - career:'hunter', - enable:true, - fullimage:true, - filterTarget:true, - content:function(){ - target.damage(); - player.draw(); - }, - ai:{ - order:7, - value:5, - useful:5, - result:{ - target:-1.5, - }, - tag:{ - damage:1 - } - } - }, - spell_guanmenfanggou:{ - type:'stonecard', - stoneact:2, - career:'hunter', - enable:function(event,player){ - return player.getEnemy().countFellow()>0&&player.canAddFellow(); - }, - fullimage:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - content:function(){ - 'step 0' - event.num=player.getEnemy().countFellow(); - 'step 1' - if(player.canAddFellow()&&event.num--){ - player.addFellowAuto('stone_liegou'); - event.redo(); - } - }, - ai:{ - order:7, - value:5, - useful:5, - result:{ - target:1 - } - } - }, - spell_zhaohuanchongwu:{ - type:'stonecard', - stoneact:2, - career:'hunter', - enable:function(event,player){ - return player.canAddFellow(); - }, - fullimage:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - content:function(){ - player.addFellowAuto(lib.beastList.randomGet()); - }, - ai:{ - order:6, - value:5, - useful:5, - result:{ - player:1 - } - } - }, - spell_zidanshangtang:{ - type:'stonecard', - stoneact:1, - career:'hunter', - enable:true, - fullimage:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - content:function(){ - var list=['spell_lierenyinji','spell_guanmenfanggou','spell_duochongsheji','spell_kuaisusheji','spell_zhaohuanchongwu']; - player.gain(game.createCard(list.randomGet()),'draw'); - player.addTempSkill('hunter_zidanshangtang','phaseAfter'); - }, - ai:{ - order:7.5, - value:5, - useful:5, - result:{ - player:1 - } - } - }, - spell_duochongsheji:{ - type:'stonecard', - fullimage:true, - enable:function(event,player){ - for(var i=0;imaxHp){ - maxHp=game.players[i].hp; - } - } - } - if(list.length<2) return 0; - if(list.length==2&&target.hp>=4) return 0; - if(target.hp>maxHp) return 1; - return target.hp; - } - }, - } - }, - spell_xishengqiyue:{ - type:'stonecard', - fullimage:true, - enable:true, - stoneact:0, - career:'warlock', - filterTarget:function(card,player,target){ - if(!target.isMin()) return false; - if(ui.selected.targets.length){ - return target.side!=ui.selected.targets[0].side; - } - return true; - }, - selectTarget:2, - multitarget:true, - multiline:true, - content:function(){ - targets.sort(lib.sort.seat); - for(var i=0;i=2) return 1; - return 0; - } - }, - } - }, - spell_hengsao:{ - type:'stonecard', - fullimage:true, - enable:true, - stoneact:4, - career:'druid', - filterTarget:function(card,player,target){ - return target.side!=player.side; - }, - content:function(){ - 'step 0' - event.list=[]; - for(var i=0;i0; - }, - stoneact:4, - career:'paladin', - filterTarget:function(card,player,target){ - return target.side!=player.side&&target.isMin(); - }, - selectTarget:-1, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - if(!targets.length){ - event.finish(); - return; - } - var map=[]; - for(var i=0;i1||target.countCards('he')>0); - }, - content:function(){ - "step 0" - target.discard(target.getCards('he')); - "step 1" - if(target.maxHp>2){ - target.loseMaxHp(target.maxHp-2); - } - }, - ai:{ - result:{ - target:function(player,target){ - return Math.min(0,2-target.hp)-target.countCards('h')/2; - } - }, - order:7 - } - }, - spell_morizaihuo:{ - fullimage:true, - type:'stonecard', - enable:true, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - selectTarget:-1, - multiline:true, - multitarget:true, - content:function(){ - 'step 0' - targets.sort(lib.sort.seat); - event.list=targets; - 'step 1' - if(event.list.length){ - event.list.shift().die(); - event.redo(); - } - 'step 2' - player.recover(2) - }, - stoneact:5, - ai:{ - order:9, - result:{ - target:-1, - player:function(player){ - if(player.hp1; - }, - selectTarget:-1, - content:function(){ - target.loseMaxHp(target.maxHp-1); - }, - ai:{ - order:9.1, - result:{ - target:function(player,target){ - if(target.hp>1) return -1; - if(target.maxHp>1) return -0.1; - return 0; - } - } - } - }, - spell_jingshenkongzhi:{ - fullimage:true, - type:'stonecard', - enable:function(event,player){ - if(player.isMin()) return false; - return player.canAddFellow(); - }, - stoneact:6, - filterTarget:function(card,player,target){ - return target.isMin()&&target.side!=player.side; - }, - content:function(){ - target.getLeader().removeFellow(target); - target.side=player.side; - player.addFellow(target); - if(!target.isTurnedOver()){ - target.turnOver(); - } - }, - ai:{ - order:9.5, - result:{ - target:function(player,target){ - return -target.hp; - } - } - } - }, - spell_anyingkuangluan:{ - type:'stonecard', - fullimage:true, - enable:function(event,player){ - if(player.isMin()) return false; - return player.canAddFellow(); - }, - stoneact:4, - filterTarget:function(card,player,target){ - return target.isMin()&&target.side!=player.side; - }, - content:function(){ - target.getLeader().removeFellow(target); - target.side=player.side; - player.addFellow(target); - target.addSkill('spell_anyingkuangluan_die'); - }, - ai:{ - order:9.5, - result:{ - target:function(player,target){ - return -target.hp; - } - } - } - }, - spell_binghuan:{ - fullimage:true, - type:'stonecard', - enable:true, - stoneact:1, - filterTarget:function(card,player,target){ - return target.isMin(); - }, - selectTarget:-1, - content:function(){ - target.turnOver(); - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(target.isTurnedOver()) return 1; - return -1; - } - } - } - }, - spell_zhiliaozhichu:{ - fullimage:true, - type:'stonecard', - enable:true, - stoneact:1, - filterTarget:function(card,player,target){ - return target.isMin()&&target.side==player.side&& - (!target.hasSkill('chaofeng')||target.hp0){ - player.draw(dh); - } - }, - ai:{ - order:7, - value:1, - useful:1, - result:{ - target:function(player,target){ - var ne1=target.countCards('e'),ne2=player.countCards('e'); - var nh1=target.countCards('h'),nh2=player.countCards('h'); - if(nh10){ - target.discard(target.getCards('h').randomGets(dh)); - } - }, - ai:{ - order:1, - value:1, - useful:1, - result:{ - target:function(player,target){ - if(target.countCards('he')>=player.countCards('h')) return -1; - return 0; - } - } - } - }, - }, - skill:{ - stone_mieshi:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;i=player.maxHp-1) return [0,0]; - } - } - } - }, - stone_lianyu:{ - mark:true, - intro:{ - content:function(storage){ - return '地狱火的初始手牌数和体力值为'+(storage+2); - } - }, - ai:{ - threaten:function(player,target){ - return 1+target.storage.stone_lianyu; - }, - } - }, - stone_lianji:{ - trigger:{global:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - return event.player.side==player.side&&event.source!=player; - }, - content:function(){ - player.maxHp++; - player.hp++; - player.update(); - player.draw(); - }, - ai:{ - threaten:2 - } - }, - stone_shenyu:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - 'step 0' - var target=player.getLeader(); - var next=target.chooseControl('召唤树人','增强随从'); - next.prompt='召唤两个嘲讽树人,或令所有其他随从增加一点体力和体力上限并摸两张牌'; - next.ai=function(){ - if(target.countFellow()<=2) return '召唤树人'; - return '增强随从'; - } - 'step 1' - if(result.control=='增强随从'){ - var targets=player.getLeader().getFellow(); - targets.remove(player); - for(var i=0;i0; - }, - content:function(){ - player.addSkill('stone_chongfeng'); - if(player.isTurnedOver()){ - player.turnOver(); - } - } - }, - warrior_peilian:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;i1) return true; - } - return false; - }, - content:function(){ - "step 0" - event.chooser=player.getLeader(); - event.chooser.chooseTarget('缩小:令一名随从减少两点体力上限',function(card,playerx,target){ - return player!=target&&target.isMin()&&target.maxHp>1; - }).ai=function(target){ - if(get.attitude(player,target)>=0) return 0; - if(target.hp==1) return 0.01; - if(target.maxHp-target.hp>=2) return 0.01; - if(target.maxHp-target.hp==1){ - if(target.hp==2) return 1; - return 0.1; - } - switch(target.hp){ - case 1:return 0.01; - case 2:return 1; - case 3:return 2; - case 4:return 1.5; - case 5:return 1; - default:return 0.8; - } - }; - player.line(event.chooser); - "step 1" - if(result.bool){ - event.chooser.line(result.targets[0]); - result.targets[0].maxHp-=2; - if(result.targets[0].maxHp<1){ - result.targets[0].maxHp=1; - } - result.targets[0].update(); - } - } - }, - priest_shixin:{ - trigger:{global:'useSkillAfter'}, - forced:true, - unique:true, - filter:function(event,player){ - return event.career&&event.player.side==player.side; - }, - content:function(){ - 'step 0' - var target=player.getLeader(); - target.damage(); - player.line(target,'green'); - 'step 1' - var target=player.getEnemy(); - target.damage(); - player.line(target,'green'); - } - }, - priest_shengshui:{ - trigger:{player:'phaseBegin'}, - unique:true, - forced:true, - filter:function(event,player){ - for(var i=0;i0; - }, - content:function(){ - player.maxHp++; - player.hp++; - player.update(); - } - }, - - hunter_mishi:{ - trigger:{global:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - return event.player.side==player.side&&event.source!=player; - }, - content:function(){ - player.draw(); - } - }, - hunter_muyang:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - return player.getLeader().countFellow()>1&&player.getLeader().canAddFellow(); - }, - content:function(){ - var num=player.getLeader().countFellow()-1; - var list=[]; - for(var i in lib.character){ - if(lib.character[i][4].contains('stone')&& - !lib.character[i][4].contains('stonehidden')&& - lib.character[i][5]&&lib.character[i][5][0]==num){ - list.push(i); - } - } - var target=player.getLeader(); - if(list.length){ - target.addFellowAuto(list.randomGet()); - } - } - }, - hunter_juji:{ - unique:true - }, - hunter_dusha:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - 'step 0' - var list=[]; - var target=player.getLeader(); - for(var i=0;i0; - }, - content:function(){ - "step 0" - event.chooser=player.getLeader(); - event.chooser.chooseToDiscard('是否弃置一张装备牌令'+get.translation(player)+'摸三张牌?', - 'he',function(card){ - return get.type(card)=='equip'; - }).ai=function(card){ - return 7-get.value(card); - }; - "step 1" - if(result.bool){ - player.draw(3); - } - } - }, - rogue_jielue:{ - trigger:{global:'equipEnd'}, - unique:true, - forced:true, - filter:function(event,player){ - return event.player.side==player.side&&get.subtype(event.card)=='equip1'; - }, - content:function(){ - player.draw(2); - }, - ai:{ - threaten:1.3 - } - }, - rogue_fusheng:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;i1){ - return true; - } - } - }, - content:function(){ - var num=1; - for(var i=0;inum){ - num=game.players[i].hp; - } - } - player.hp=num; - player.maxHp=num; - player.update(); - } - }, - rogue_lifa:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - 'step 0' - var target=player.getLeader(); - if(target.getEquip(1)){ - target=target.getEnemy(); - player.line(target,'green'); - target.damage(); - } - else{ - player.line(target,'green'); - var equip1=get.cardPile(function(card){ - return get.subtype(card)=='equip1'; - }); - if(!equip1){ - equip1=game.createCard('qingnang'); - } - target.equip(equip1); - } - } - }, - rogue_shoudao:{ - trigger:{global:'phaseEnd'}, - forced:true, - direct:true, - filter:function(event,player){ - return event.player==player.getLeader()&&event.player.countFellow()>1; - }, - content:function(){ - 'step 0' - var players=get.players(); - var targets=[]; - for(var i=0;i1){ - return true; - } - } - return false; - }, - content:function(){ - "step 0" - var list=[]; - for(var i=0;i1){ - list.push(game.players[i]); - } - } - list.sort(lib.sort.seat); - event.list=list; - "step 1" - if(event.list.length){ - var current=event.list.shift(); - current.damage(2); - player.line(current,'green'); - event.redo(); - } - } - }, - paladin_tuxi:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - var leader=player.getLeader(); - return leader.hp2){ - return get.attitude(event.chooser,target)*(2-target.maxHp)/100; - } - return get.attitude(event.chooser,target)*(2-target.hp); - }; - player.line(event.chooser); - "step 1" - if(result.bool){ - event.chooser.line(result.targets[0]); - result.targets[0].hp=2; - result.targets[0].maxHp=2; - result.targets[0].update(); - } - } - }, - paladin_baowei:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;i0&&player.getEnemy().hasFellow(); - }, - content:function(){ - 'step 0' - var num=player.getLeader().countCards('e'); - var map=[]; - var targets=player.getEnemy().getFellow(); - event.targets=targets; - for(var i=0;i1; - }, - content:function(){ - var target=player.getLeader(); - var num=target.countFellow(); - if(num>1){ - target.actused-=num-1; - target.updateActCount(); - } - } - }, - druid_qicheng:{ - trigger:{player:'dieBegin'}, - forced:true, - unique:true, - content:function(){ - player.getLeader().addSkill('druid_qicheng2'); - }, - ai:{ - threaten:0.8 - } - }, - druid_qicheng2:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.player.hasSkill('druid_qicheng'); - }, - content:function(){ - game.delay(); - var list=[]; - for(var i in lib.character){ - if(lib.character[i][4].contains('stone')&& - !lib.character[i][4].contains('stonehidden')&& - lib.character[i][5]&&lib.character[i][5][0]==1){ - list.push(i); - } - } - player.addFellowAuto(list.randomGet()); - player.removeSkill('druid_qicheng2'); - } - }, - druid_renya:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - 'step 0' - player.getLeader().chooseControl('冲锋','潜行').ai=function(){ - if(Math.random()<0.5) return '潜行'; - return '冲锋'; - } - 'step 1' - if(result.control=='潜行'){ - player.maxHp++; - player.hp++; - player.update(); - player.addSkill('stone_qianxing'); - } - else{ - player.draw(); - player.addSkill('stone_chongfeng'); - if(player.isTurnedOver()){ - player.turnOver(); - } - } - } - }, - druid_yuehuo:{ - trigger:{global:'damageBegin'}, - forced:true, - unique:true, - filter:function(event){ - return event.card&&get.type(event.card)=='trick'&&event.notLink(); - }, - content:function(){ - trigger.num++; - }, - }, - - shaman_anhun:{ - trigger:{global:'dieAfter'}, - forced:true, - unique:true, - filter:function(event,player){ - return event.player.side==player.side; - }, - content:function(){ - player.line(player.getLeader(),'green'); - player.getLeader().drawDeck(); - } - }, - shaman_zoushi:{ - trigger:{global:'useCardAfter'}, - direct:true, - unique:true, - filter:function(event,player){ - return get.type(event.card)=='stonecharacter'&&event.player==player.getLeader(); - }, - content:function(){ - if(!player.storage.shaman_zoushi){ - player.storage.shaman_zoushi=true; - } - else{ - var list=[]; - for(var i=0;i3) num=3; - player.actused-=num; - player.updateActCount(); - player.removeSkill('spell_sijidaifa'); - } - }, - shaman_qingwa:{ - trigger:{player:'phaseDrawBefore'}, - forced:true, - unique:true, - popup:false, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - threaten:0.1 - } - }, - stone_jingxiang:{ - trigger:{player:'phaseDrawBefore'}, - forced:true, - unique:true, - popup:false, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - effect:{ - target:function(card){ - if(card.name=='bingliang') return 0; - } - }, - noPhaseDelay:1 - } - }, - mage_mianyang:{ - mod:{ - cardEnabled:function(card){ - if(card.name=='sha') return false; - } - }, - ai:{ - threaten:0.1 - } - }, - priest_xundao:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - return player.getLeader().countCards('h',{type:'stonecharacter'})>0; - }, - content:function(){ - player.draw(); - player.addSkill('chaofeng'); - } - }, - priest_guangyao:{ - trigger:{player:'changeHp'}, - forced:true, - unique:true, - filter:function(event){ - return event.num!=0; - }, - content:function(){ - player.draw(Math.abs(trigger.num)); - }, - }, - priest_zhufu:{ - trigger:{player:'dieBegin'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;i0; - }, - content:function(){ - "step 0" - event.chooser=player.getLeader(); - event.chooser.chooseCardTarget({ - position:'e', - filterTarget:function(card,player,target){ - return player.side!=target.side; - }, - filterCard:true, - ai1:function(card){ - return 9-get.value(card); - }, - ai2:function(target){ - return get.damageEffect(target,player,player); - }, - prompt:'偷袭:弃置一张装备区内的牌并对一名敌方角色一点伤害' - }); - player.line(event.chooser); - "step 1" - if(result.bool){ - event.chooser.discard(result.cards); - event.chooser.line(result.targets[0]); - result.targets[0].damage(event.chooser); - } - } - }, - rogue_qiancang:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;i0; - }).ai=function(target){ - return target.countCards('he'); - }; - player.line(event.chooser); - "step 1" - if(result.bool){ - event.chooser.line(result.targets[0]); - game.delay(); - result.targets[0].discard(result.targets[0].getCards('he')); - } - } - }, - paladin_zhaochao:{ - trigger:{global:'useSkillAfter'}, - forced:true, - unique:true, - filter:function(event,player){ - return event.career&&event.player.side==player.side; - }, - content:function(){ - player.draw(2); - } - }, - paladin_buji:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;i1) return 'discard_card'; - return '造成伤害'; - }; - event.chooser.line(event.target); - game.delay(); - } - else{ - event.finish(); - } - "step 2" - if(result.control=='造成伤害'){ - event.target.damage(event.chooser); - } - else{ - event.target.discard(event.target.getCards('h')); - if(event.target.maxHp>2){ - event.target.loseMaxHp(event.target.maxHp-2); - } - } - } - }, - druid_yexingchengzhang:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - mark:true, - intro:{ - content:'下个出牌阶段开始时获得三点额外行动值', - }, - content:function(){ - player.actused-=3; - player.updateActCount(); - player.removeSkill('druid_yexingchengzhang'); - } - }, - druid_ziyang:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - mark:true, - intro:{ - content:'下个出牌阶段开始时获得四点额外行动值', - }, - content:function(){ - player.actused-=4; - player.updateActCount(); - player.removeSkill('druid_ziyang'); - } - }, - druid_chengzhang:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - var target=player.getLeader(); - target.actused--; - target.updateActCount(); - }, - group:'druid_chengzhang2' - }, - druid_chengzhang2:{ - trigger:{player:'dieBegin'}, - forced:true, - unique:true, - content:function(){ - player.getLeader().addSkill('druid_chengzhang3'); - } - }, - druid_chengzhang3:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.player.hasSkill('druid_chengzhang'); - }, - content:function(){ - if(player.countCards('h')){ - game.delay(); - player.chooseToDiscard('h',true); - } - player.removeSkill('druid_chengzhang3'); - } - }, - shaman_xueju:{ - trigger:{global:'useCard'}, - forced:true, - unique:true, - filter:function(event,player){ - return get.type(event.card)=='stonecharacter'&&event.player==player.getLeader(); - }, - content:function(){ - player.draw(); - } - }, - shaman_huoxi:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;iplayer.actcount) return false; - if(player.storage.anyingxingtai) return false; - return true; - }, - usable:1, - prompt:function(event){ - if(event.player.hasFellowSkill('priest_hunwu')) return '令目标流失一点体力'; - return '回复一点体力'; - }, - filterTarget:function(card,player,target){ - if(player.hasFellowSkill('priest_hunwu')) return true; - return target.hpplayer.actcount) return false; - if(!player.storage.anyingxingtai) return false; - return true; - }, - usable:1, - prompt:function(event,player){ - return '造成'+get.cnNumber(_status.event.player.storage.anyingxingtai)+'点伤害'; - }, - filterTarget:true, - content:function(){ - player.actused+=2; - player.updateActCount(); - event.parent.career='priest'; - var num=1; - // if(player.hasFellowSkill('stone_shenyou')){ - // num=2; - // } - target.damage(player.storage.anyingxingtai*num); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target); - } - } - } - }, - _mage_skill:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.career!='mage') return false; - if(player.getActCount()+2>player.actcount) return false; - return true; - }, - usable:1, - line:'fire', - filterTarget:function(card,player,target){ - return !target.career; - }, - content:function(){ - player.actused+=2; - player.updateActCount(); - target.damage('fire'); - event.parent.career='mage'; - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target,'fire'); - } - } - } - }, - _warlock_skill:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.hasSkill('stone_lianyu')) return false; - if(player.career!='warlock') return false; - if(player.getActCount()+2>player.actcount) return false; - return true; - }, - usable:1, - content:function(){ - player.actused+=2; - player.updateActCount(); - player.drawDeck(2); - event.parent.career='warlock'; - }, - ai:{ - order:0.5, - result:{ - player:1 - } - } - }, - _warlock_skillx:{ - enable:'phaseUse', - filter:function(event,player){ - if(!player.hasSkill('stone_lianyu')) return false; - if(player.career!='warlock') return false; - if(player.getActCount()+2>player.actcount) return false; - if(!player.canAddFellow()) return false; - return true; - }, - usable:1, - content:function(){ - 'step 0' - player.actused+=2; - player.updateActCount(); - event.parent.career='warlock'; - player.addFellowAuto('stone_diyuhuox'); - 'step 1' - var num=player.storage.stone_lianyu; - if(num&&get.itemtype(result)=='player'){ - result.maxHp+=num; - result.hp+=num; - result.directgain(get.cards(num)); - } - }, - ai:{ - order:0.5, - result:{ - player:1 - } - } - }, - _hunter_skill:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.career!='hunter') return false; - if(player.getActCount()+2>player.actcount) return false; - return true; - }, - usable:1, - prompt:function(event){ - if(event.player.hasFellowSkill('hunter_juji')) return '造成一点伤害'; - return '对敌方主将造成一点伤害'; - }, - selectTarget:function(){ - if(_status.event.player.hasFellowSkill('hunter_juji')) return 1; - return -1; - }, - filterTarget:function(card,player,target){ - if(player.hasFellowSkill('hunter_juji')) return target!=player; - return target.career&&target.side!=player.side; - }, - content:function(){ - player.actused+=2; - player.updateActCount(); - target.damage(); - event.parent.career='hunter'; - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - return get.damageEffect(target,player,target); - } - } - } - }, - _warrior_skill:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.hujia>=3) return false; - if(player.career!='warrior') return false; - if(player.getActCount()+2>player.actcount) return false; - return true; - }, - usable:1, - content:function(){ - player.actused+=2; - player.updateActCount(); - player.changeHujia(1); - event.parent.career='warrior'; - }, - ai:{ - order:2, - result:{ - player:1 - } - } - }, - _rogue_skill:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.career!='rogue') return false; - if(player.getActCount()+2>player.actcount) return false; - return true; - }, - usable:1, - content:function(){ - 'step 0' - player.actused+=2; - player.updateActCount(); - var equip1=get.cardPile(function(card){ - return get.subtype(card)=='equip1'; - }); - if(!equip1){ - equip1=game.createCard('qingnang'); - } - var equip4=get.cardPile(function(card){ - return get.type(card)=='equip'&&get.subtype(card)!='equip1'; - }); - if(!equip4){ - equip4=game.createCard('chitu'); - } - player.$gain(equip1); - setTimeout(function(){ - player.$gain(equip4); - },250); - game.delay(); - event.equip1=equip1; - event.equip4=equip4; - 'step 1' - player.equip(event.equip1); - game.delay(0.5); - 'step 2' - player.equip(event.equip4); - event.parent.career='rogue'; - }, - ai:{ - order:function(skill,player){ - if(!player.getEquip(1)&&player.countCards('e')<2){ - if(player.countCards('h','sha')&&player.getActCount()+3<=player.actcount){ - return 4; - } - return 0.1; - } - return 0; - }, - result:{ - player:function(player){ - if(player.countCards('e')<=2) return 1; - return 0; - } - } - } - }, - _druid_skill:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.career!='druid') return false; - if(player.getActCount()+2>player.actcount) return false; - return lib.filter.cardEnabled({name:'sha'},player); - }, - usable:1, - filterTarget:function(card,player,target){ - return player.canUse('sha',target,null,false); - }, - direct:true, - content:function(){ - player.actused+=2; - player.updateActCount(); - player.useCard({name:'sha'},targets,'_druid_skill',false).animate=false; - event.parent.career='druid'; - }, - ai:{ - order:function(){ - return get.order({name:'sha'})-0.1; - }, - result:{ - target:function(player,target){ - return get.effect(target,{name:'sha'},player,target); - } - } - } - }, - shaman_tuteng:{ - trigger:{player:'phaseDrawBefore'}, - forced:true, - popup:false, - content:function(){ - trigger.untrigger(); - trigger.finish(); - }, - ai:{ - effect:{ - target:function(card){ - if(card.name=='bingliang') return 0; - } - }, - noPhaseDelay:1 - } - }, - shaman_zhiliao:{ - trigger:{player:'phaseEnd'}, - forced:true, - direct:true, - content:function(){ - 'step 0' - var players=get.players(); - var targets=[]; - for(var i=0;iplayer.actcount) return false; - return true; - }, - usable:1, - content:function(){ - player.actused+=2; - player.updateActCount(); - var name='stone_tuteng'+Math.ceil(Math.random()*4); - player.addFellowAuto(name); - event.parent.career='shaman'; - }, - ai:{ - order:2, - result:{ - player:1 - } - } - }, - _paladin_skill:{ - enable:'phaseUse', - filter:function(event,player){ - if(player.career!='paladin') return false; - if(!player.canAddFellow()) return false; - if(player.getActCount()+2>player.actcount) return false; - return true; - }, - usable:1, - content:function(){ - player.actused+=2; - player.updateActCount(); - player.addFellowAuto('stone_xinbing'); - event.parent.career='paladin'; - }, - ai:{ - order:2, - result:{ - player:1 - } - } - }, - chaofeng:{ - mark:true, - intro:{ - content:'已获得嘲讽' - } - }, - _chaofeng:{ - mod:{ - targetEnabled:function(card,player,target){ - if(target.hasSkill('chaofeng')) return; - if(card.name=='sha'){ - for(var i=0;i0; - }).ai=function(target){ - return target.countCards('he'); - }; - player.line(event.chooser); - "step 1" - if(result.bool){ - event.chooser.line(result.targets[0]); - game.delay(); - result.targets[0].discard(result.targets[0].getCards('he')); - } - } - }, - stone_huoqiangshou1:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - filter:function(event,player){ - for(var i=0;i0; - }, - content:function(){ - var enemy=player.getEnemy(); - var es=enemy.getCards('e'); - if(es.length){ - player.getLeader().line(enemy); - game.delay(); - enemy.discard(es.randomGet()); - // game.log(get.translation(event.enemy)+'将'+get.translation(es)+'收入手牌') - } - } - }, - stone_yaosaishouwei1:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - player.getLeader().addTempSkill('stone_yaosaishouwei2','phaseAfter'); - } - }, - stone_yaosaishouwei2:{ - mod:{ - maxHandcard:function(player,num){ - return num+2; - } - }, - }, - stone_famingjia1:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - player.getLeader().draw(2); - } - }, - stone_chilundashi1:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - player.addSkill('stone_chilundashi2'); - } - }, - stone_chilundashi2:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - content:function(){ - trigger.num++; - player.removeSkill('stone_chilundashi2'); - } - }, - stone_hanguangzhizhe1:{ - trigger:{source:'fellow'}, - forced:true, - unique:true, - content:function(){ - var targets=[]; - for(var i=0;i0&&num>=player.getLeader().countFellow(); - }, - content:function(){ - var list=[]; - for(var i=0;i=player.getLeader().countFellow(); - }, - content:function(){ - "step 0" - event.chooser=player.getEnemy(); - event.chooser.chooseTarget('毒噬:选择己方一名随从令其死亡',function(card,playerx,target){ - return target.isMin()&&target.side!=player.side; - },true).ai=function(target){ - return -target.hp; - }; - player.line(event.chooser); - "step 1" - if(result.bool){ - event.chooser.line(result.targets[0]); - game.delay(); - result.targets[0].die(); - } - } - }, - stone_mafengzhuru1:{ - trigger:{player:'dieBegin'}, - forced:true, - filter:function(event){ - return event.source&&event.source.isMin(); - }, - content:function(){ - trigger.source.addSkill('stone_mafengzhuru2'); - }, - }, - stone_mafengzhuru2:{ - trigger:{global:'dieAfter'}, - forced:true, - popup:false, - unique:true, - filter:function(event,player){ - return player.hasSkill('stone_mafengzhuru2'); - }, - content:function(){ - player.loseHp(); - player.removeSkill('stone_mafengzhuru2'); - } - }, - stone_zhufu:{ - trigger:{global:'phaseEnd'}, - forced:true, - unique:true, - filter:function(event,player){ - if(event.player!=player.getLeader()) return false; - for(var i=0;iplayer.actcount) return false; - } - }, - trigger:{player:'phaseBegin'}, - forced:true, - popup:false, - priority:15, - filter:function(event,player){ - return !player.isMin(); - }, - content:function(){ - player.actused=0; - if(player.side){ - player.actcount=player.getEnemy().actcount+1; - } - else{ - player.actcount=player.getEnemy().actcount; - if(!_status.actcoin){ - _status.actcoin=true; - player.actused--; - } - } - if(player.actcount>6){ - if(get.config('mana_mode')=='inc'){ - player.actcount=6; - } - else{ - player.actcount-=4; - } - } - player.updateActCount(); - player.getEnemy().updateActCount('outphase'); - } - }, - _actcount2:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - filter:function(event,player){ - return !player.isMin()&&!event.noActCount&&_status.currentPhase==player; - }, - content:function(){ - var stoneact=get.info(trigger.card).stoneact; - if(typeof stoneact==='number'){ - player.actused+=stoneact-1; - } - player.updateActCount(); - } - }, - stonesha:{ - unique:true, - enable:['chooseToUse','chooseToRespond'], - filterCard:{type:'equip'}, - viewAs:{name:'sha'}, - nopop:true, - check:function(){return 1}, - filter:function(event,player){ - return player.countCards('h',{type:'equip'})>0; - }, - viewAsFilter:function(player){ - return player.countCards('h',{type:'equip'})>0; - }, - ai:{ - skillTagFilter:function(player){ - return player.countCards('h',{type:'equip'})>0; - }, - respondSha:true, - order:4, - useful:-1, - value:-1 - } - }, - stoneshan:{ - unique:true, - enable:['chooseToRespond'], - viewAs:{name:'shan'}, - filterCard:{type:['stonecharacter','stonecard']}, - mod:{ - cardEnabled:function(card){ - if(get.type(card)=='stonecard') return false; - }, - cardSavable:function(card){ - if(get.type(card)=='stonecard') return false; - }, - }, - nopop:true, - check:function(){return 1}, - filter:function(event,player){ - return player.countCards('h',{type:['stonecharacter','stonecard']})>0; - }, - viewAsFilter:function(player){ - return player.countCards('h',{type:['stonecharacter','stonecard']})>0; - }, - ai:{ - skillTagFilter:function(player){ - return player.countCards('h',{type:['stonecharacter','stonecard']})>0; - }, - respondShan:true, - order:4, - useful:-1, - value:-1 - } - }, - stonedraw:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - popup:false, - content:function(){ - trigger.num--; - }, - ai:{ - effect:{ - target:function(card){ - if(card.name=='bingliang'){ - return 0.6; - } - } - } - } - }, - _stonerage1:{ - trigger:{player:'damageEnd'}, - forced:true, - popup:false, - content:function(){ - if(player.isMin()){ - player.changeRage(3*trigger.num); - } - else{ - player.changeRage(6*trigger.num); - } - } - }, - _stonerage2:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - content:function(){ - if(player.isMin()){ - player.changeRage(10); - } - else{ - player.changeRage(20); - } - } - }, - _stonerage3:{ - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - filter:function(event,player){ - return !player.isMin()&&player.getEnemy().countFellow()>player.countFellow(); - }, - content:function(){ - player.changeRage((player.getEnemy().countFellow()-player.countFellow())*10); - } - }, - _stonerage_add:{ - trigger:{player:'phaseBegin'}, - direct:true, - priority:10, - filter:function(event,player){ - if(!player.canAddFellow()){ - return false; - } - if(player==game.me){ - return _status.friendRage>=100; - } - else if(player==game.me.getEnemy()){ - return _status.enemyRage>=100; - } - return false; - }, - content:function(){ - 'step 0' - var list=[]; - var list2=[]; - for(var i in lib.character){ - if(lib.character[i][4].contains('stonelegend_'+player.career)){ - list.push(i); - } - else if(lib.character[i][4].contains('stonelegend')){ - list2.push(i); - } - } - var dialog=ui.create.dialog('hidden','召唤一名传说随从','
          消耗100怒气值和4点行动值
          ',[list.concat(list2),'character']); - var heilong=false; - var dc=player.getEnemy().countFellow()-player.countFellow(); - if(dc>2){ - heilong=true; - } - else if(dc==2){ - if(player.getEnemy().countFellow()>=3){ - heilong=Math.random()<0.5; - } - else if(player.actcount-player.getActCount()<=0){ - heilong=true; - } - else{ - dc=0; - for(var i=0;i5){ - heilong=true; - } - else{ - heilong=Math.random()<0.3; - } - } - } - var honglong=false; - if(!heilong){ - var num=0; - for(var i=0;i6){ - honglong=true; - } - else if(player.maxHp-player.hp>=3&&player.hp<=2){ - honglong=true; - } - } - player.chooseButton(dialog).ai=function(button){ - if(button.link=='stone_siwangzhiyi'){ - if(heilong) return 3; - return 0; - } - if(button.link=='stone_alaikesita'){ - if(honglong) return 2; - return 0; - } - return Math.random(); - } - 'step 1' - if(result.bool){ - player.$skill(get.translation(result.links[0]),'legend','metal'); - game.delay(2); - event.addname=result.links[0]; - player.changeRage(-100); - player.actused+=4; - player.updateActCount(); - } - else{ - event.finish(); - } - 'step 2' - if(event.addname){ - if(event.addname=='stone_jialakesi'){ - if(player.name=='stone_jialakesix'){ - player.hp=player.maxHp; - player.update(); - player.actused-=4; - player.updateActCount(); - player.storage.stone_lianyu++; - } - else{ - if(player.name2){ - player.storage.stone_lianyu=1; - } - else{ - player.storage.stone_lianyu=0; - } - player.init('stone_jialakesix'); - game.addVideo('reinit2',player,'stone_jialakesix'); - } - player.syncStorage('stone_lianyu'); - var card=game.createCard('stone_jialakesi_stonecharacter'); - card.node.info.remove(); - card.node.addinfo.remove(); - player.$give(card,player); - } - else{ - player.addFellowAuto(event.addname); - } - } - } - } - }, - translate:{ - shaman:'萨满', - mage:'法师', - priest:'牧师', - warrior:'战士', - warlock:'术士', - knight:'死亡骑士', - rogue:'潜行者', - paladin:'圣骑士', - hunter:'猎人', - druid:'德鲁伊', - - stone_siwangzhiyi:'死亡之翼', - stone_alaikesita:'阿莱克萨', - stone_yisela:'伊瑟拉', - stone_nuoziduomu:'诺兹多姆', - stone_maligousi:'玛里苟斯', - stone_aolajier:'奥拉基尔', - stone_andongni:'安东尼', - stone_jialakesi:'加拉克斯', - stone_jialakesix:'加拉克斯', - stone_kelushi:'克鲁什', - stone_geluomashi:'格罗玛什', - stone_aidewen:'艾德温', - stone_sainaliusi:'塞纳留斯', - stone_fuding:'弗丁', - stone_weilun:'维纶', - - stone_fushi:'缚誓', - stone_fushi_info:'你出场时,为所有友方角色回复所有体力值', - stone_mieshi:'灭世', - stone_mieshi_info:'你出场时,对所有其他随从造成两点伤害,然后弃置己方主将的所有手牌', - stone_shixu:'时序', - stone_shixu_info:'你出场的回合内,己方主将获得4点行动值', - stone_chenshui:'沉睡', - stone_chenshui_info:'在你的结束阶段,令己方主将获得一张梦境牌', - stone_mowang:'魔网', - stone_mowang_info:'己方法术对主将伤害+2,对随从伤害+4', - - stone_zhiyin:'指引', - stone_zhiyin_info:'每当己方主将使用一张法术牌,将一张火球术置于其手牌', - stone_bianshen:'变身', - stone_bianshen_info:'你出场时,若己方主将职业为术士,则代之成为新的主将;若己变身,则改为令你召唤的地狱火的初始手牌数和体力值+1', - stone_lianyu:'炼狱', - stone_lianyu_info:'你的职业技能改为召唤一个地狱火', - stone_lianji:'连击', - stone_lianji_info:'每当己方主将召唤一个随从,便增加一点体力和体力上限并摸一张牌', - stone_shenyu:'神谕', - stone_shenyu_info:'你出场时,己方主将可以选择一项:召唤两个嘲讽树人,或令所有其他随从增加一点体力和体力上限并摸两张牌', - stone_fuchou:'复仇', - stone_fuchou_info:'你死亡后,视为己方主将使用了一张复仇之怒', - stone_shenyou:'神佑', - stone_shenyou_info:'己方主将的职业技能和法术的治疗效果翻倍', - stone_jinu:'激怒', - stone_jinu_info:'摸牌阶段,若你己受伤,则额外摸两张牌', - - spell_shenshengxinxing:'神圣新星', - spell_shenshengxinxing_info:'对所有敌方角色造成一点伤害,令所有友方角色回复一点体力', - spell_shengguangzhadan:'圣光炸弹', - spell_shengguangzhadan_info:'对所有随从造成等同于其手牌数的伤害', - spell_maizang:'埋葬', - spell_maizang_info:'令一名敌方随从死亡(不触发死亡技能),并将一张与该随从同名的随从洗入你的牌库', - spell_xinlingshijie:'心灵视界', - spell_xinlingshijie_info:'将一张敌方主将手牌的复制置于你的手牌', - spell_naluzhiguang:'纳鲁之光', - spell_naluzhiguang_info:'恢复一点体力值,若目标仍处于受伤状态,则召唤一名圣光护卫', - spell_zhiliaozhihuan:'治疗之环', - spell_zhiliaozhihuan_info:'令所有随从回复三点体力', - - spell_zhenyanshu:'真言术', - spell_zhenyanshu_info:'令一名随从增加一点体力和体力上限;从牌库中获得一张牌', - spell_enzeshu:'恩泽术', - spell_enzeshu_info:'令一名随从增加三点体力和体力上限', - spell_anyingxingtai:'暗影形态', - priest_anyingxingtai:'暗影形态', - spell_anyingxingtai_info:'你的职业技能改为造成一点伤害,若已进入暗影形态,则改为造成两点伤害', - spell_kuaisuzhiliao:'快速治疗', - spell_kuaisuzhiliao_info:'回复两点体力', - spell_xinlinghanbao:'心灵撼爆', - spell_xinlinghanbao_info:'对敌方主将造成两点伤害', - spell_kongxinshu:'控心术', - spell_kongxinshu_info:'复制敌方牌库中的一张随从,将其置入战场', - - stone_shengguanghuwei:'圣光护卫', - priest_shengguang:'圣光', - priest_shengguang_info:'每当一名随从获得治疗,摸一张牌', - - spell_nuxi:'怒袭', - spell_nuxi_info:'造成一点伤害,获得两点护甲', - spell_dunpaimengji:'盾牌猛击', - spell_dunpaimengji_info:'对一名随从造成等同于你护甲值的伤害', - spell_zhansha:'斩杀', - spell_zhansha_info:'令一名已受伤的敌方随从死亡', - spell_nuhuozhongshao:'怒火中烧', - spell_nuhuozhongshao_info:'对一名随从造成一点伤害,然后令其摸两张牌', - spell_xuanfengzhan:'旋风斩', - spell_xuanfengzhan_info:'对所有随从造成一点伤害', - spell_juemingluandou:'绝命乱斗', - spell_juemingluandou_info:'随机保留一名随从,然后令所有其他随从死亡', - - spell_zhongnian:'重碾', - spell_zhongnian_info:'造成X点伤害,X为已受伤的友方角色数且不超过3', - spell_zhandounuhuo:'战斗怒火', - spell_zhandounuhuo_info:'从牌库中获得X张牌,X为已受伤的友方角色数', - spell_chongfeng:'冲锋', - spell_chongfeng_info:'令一名武将牌背面朝上的友方随从摸三张牌,然后将武将牌翻至正面', - spell_fuchoudaji:'复仇打击', - spell_fuchoudaji_info:'对所有随从造成一点伤害,若你的体力值不大于2,改为造成三点伤害', - spell_kuangbao:'狂暴', - spell_kuangbao_info:'令一名已受伤的友方随从摸四张牌', - spell_yingyongdaji:'英勇打击', - spell_yingyongdaji_info:'令一名敌方角色对你造成两点伤害,然后对其造成两点伤害', - - spell_dubiao:'毒镖', - spell_dubiao_info:'对一名随机敌方角色造成一点伤害', - spell_qiangfengsheji:'强风射击', - spell_qiangfengsheji_info:'对两名敌方随从各造成一点伤害,并弃置其两张手牌', - spell_tanxianmao:'探险帽', - hunter_tanxianmao:'探险帽', - hunter_tanxianmao_info:'你死亡时,将一张探险帽置入主将的手牌', - spell_tanxianmao_info:'令一名友方随从增加一点体力和体力上限并摸一张牌,当该随从死亡时,将一张探险帽置入你的手牌', - spell_shalumingling:'杀戮命令', - spell_shalumingling_info:'造成一点伤害,如果你控制任何野兽,则改为造成两点伤害', - spell_zhuizongshu:'追踪术', - spell_zhuizongshu_info:'从牌库中随机选择三张牌,获得其中的一张', - spell_tianjiangzhuqun:'天降蛛群', - spell_tianjiangzhuqun_info:'召唤三只结网蛛', - - spell_lierenyinji:'猎人印记', - spell_lierenyinji_info:'将一名随从的体力上限降至1', - spell_kuaisusheji:'快速射击', - spell_kuaisusheji_info:'造成一点伤害,摸一张牌', - spell_guanmenfanggou:'关门放狗', - spell_guanmenfanggou_info:'每有一名敌方随从,便召唤一只猎狗', - spell_zhaohuanchongwu:'动物伙伴', - spell_zhaohuanchongwu_info:'随机召唤一只野兽', - spell_zidanshangtang:'子弹上膛', - spell_zidanshangtang_info:'随机获得一张猎人职业法术牌,并获得技能【上膛】直到回合结束', - spell_duochongsheji:'多重射击', - spell_duochongsheji_info:'对两名随机敌方随从各造成两点伤害', - - stone_liegou:'猎狗', - hunter_zidanshangtang:'上膛', - hunter_zidanshangtang_bg:'膛', - hunter_zidanshangtang_info:'每当你使用一张法术牌,便随机获得一张猎人职业法术牌', - - spell_zuzhou:'诅咒', - spell_zuzhou_info:'将目标随从翻面,摸一张牌', - spell_xishengqiyue:'牺牲契约', - spell_xishengqiyue_info:'令双方各一名随从立即死亡', - spell_xiaoguibaopo:'小鬼爆破', - spell_xiaoguibaopo_info:'对一名随从造成1~3点伤害,每造成一点伤害,便召唤一只小鬼', - spell_anyinglieyan:'暗影裂焰', - spell_anyinglieyan_info:'杀死一名友方随从,并对所有敌方随从造成等于其体力值的伤害', - spell_liliangdaijia:'力量代价', - spell_liliangdaijia_info:'令一名友方随从摸4张牌,将体力值变为5,并在其下个回合结束后死亡', - spell_emozhinu:'恶魔之怒', - spell_emozhinu_info:'对所有随从造成两点伤害', - - spell_emozhixin:'恶魔之心', - spell_emozhixin_info:'对一名敌方随从造成四点伤害,或令一名友方随从摸四张牌', - spell_ansezhadan:'暗色炸弹', - spell_ansezhadan_info:'造成两点伤害', - spell_fushishu:'腐蚀术', - warlock_fushishu:'腐蚀', - warlock_fushishu_info:'下个回合结束后死亡', - spell_fushishu_info:'令一名敌方随从于其下个回合结束后死亡', - spell_heianqiyue:'黑暗契约', - spell_heianqiyue_info:'随机令两名敌方随从死亡,随机弃置两张手牌', - spell_linghunhongxi:'灵魂虹吸', - spell_linghunhongxi_info:'令一名随从死亡,回复一点体力', - spell_siwangchanrao:'死亡缠绕', - spell_siwangchanrao_info:'对一名随从造成一点伤害;若该随从死亡,从牌库中获得一张牌', - - spell_wuyashenxiang:'乌鸦神像', - spell_wuyashenxiang_info:'从三张法术牌或随从牌中选择一张加入手牌', - spell_huotigenxu:'活体根须', - spell_huotigenxu_info:'造成一点伤害,或召唤两个树苗', - spell_hengsao:'横扫', - spell_hengsao_info:'对一名敌方角色造成两点伤害,然后对其他敌方角色造成一点伤害', - spell_yexingchengzhang:'野性成长', - spell_yexingchengzhang_info:'下个出牌阶段开始时获得三点额外行动值', - spell_ziranzhili:'自然之力', - spell_ziranzhili_info:'召唤三个自爆树人', - spell_yemanpaoxiao:'野蛮咆哮', - spell_yemanpaoxiao_bg:'咆', - spell_yemanpaoxiao2:'咆哮', - spell_yemanpaoxiao_info:'所有友方角色造成的伤害+1,直到你的下个回合开始', - - spell_conglinzhihun:'丛林之魂', - druid_conglinzhihun:'树魂', - druid_conglinzhihun_info:'你死亡后召唤一个树人', - spell_conglinzhihun_info:'令所有友方随从获得技能树魂(你死亡后召唤一个树人)', - spell_ziyang:'滋养', - spell_ziyang_info:'下个出牌开始阶段获得四点额外行动值,或从牌库中获得三张牌', - spell_fugen:'腐根', - spell_fugen_info:'令一名随从死亡,将一张随机随从置入对手的手牌', - spell_xingchenzhuiluo:'星辰坠落', - spell_xingchenzhuiluo_info:'对一名敌方随从造成五点伤害,或对所有敌方随从造成两点伤害', - spell_fennu:'愤怒', - spell_fennu_info:'对一名随从造成两点伤害,或造成一点伤害并从牌库中获得一张牌', - spell_heiandiyu:'黑暗低语', - spell_heiandiyu_info:'召唤若干个小精灵直到你的随从数达到4;或令一名随从增加一点体力和体力上限并摸三张牌', - - druid_yexingchengzhang:'成长', - druid_yexingchengzhang_bg:'长', - druid_yexingchengzhang_info:'下个出牌阶段开始时获得三点额外行动值', - druid_ziyang:'滋养', - druid_ziyang_bg:'养', - druid_ziyang_info:'下个出牌阶段开始时获得四点额外行动值', - - stone_shumiao:'树苗', - stone_shuren:'自爆树人', - stone_shurenx:'树人', - stone_shurenxx:'嘲讽树人', - stone_zibao:'自爆', - stone_zibao_info:'结合结束后立即死亡', - - spell_cigu:'刺骨', - spell_cigu_info:'造成一点伤害,你可以弃置一张装备区内的牌令伤害+1', - spell_jianrenluanwu:'剑刃乱舞', - spell_jianrenluanwu_info:'弃置你的武器牌,并对所有敌方角色造成一点伤害', - spell_daoshan:'刀扇', - spell_daoshan_info:'对所有敌方随从造成一点伤害,从牌库中获得一张牌', - spell_sijidaifa:'伺机待发', - spell_sijidaifa_info:'你使用下一张法术牌时获得X点行动值,X为该法术的行动值消耗且不超过3', - spell_cisha:'刺杀', - spell_cisha_info:'杀死一名随从', - spell_modaoyou:'磨刀油', - spell_modaoyou_info:'令你下一次剑刃乱舞造成的伤害+1,并与一名随机友方随从各摸两张牌', - - spell_mengun:'闷棍', - spell_mengun_info:'令一名敌方随从死亡(不触发死亡技能),将一张该随从的复制置入对手的手牌', - spell_anzhongpohuai:'暗中破坏', - spell_anzhongpohuai_info:'随机杀死一名敌方随从,随机弃置敌方的一张装备牌', - spell_beici:'背刺', - spell_beici_info:'令一名未受伤的随从流失一点体力', - spell_weijisifu:'危机四伏', - spell_zhumo:'蛛魔', - stone_zhumo:'蛛魔', - spell_zhumo_info:'每当该牌被弃置,为你的对手召唤一只蛛魔', - spell_weijisifu_info:'将三张蛛魔牌洗入对手的牌库;每当一名角色弃置蛛魔牌,为其对手召唤一只蛛魔', - spell_piaoqie:'剽窃', - spell_piaoqie_info:'复制两张对手牌库中的牌加入你的手牌', - spell_jipao:'疾跑', - spell_jipao_info:'从牌库中获得四张牌', - - spell_fengxian:'奉献', - spell_fengxian_info:'对所有敌方角色造成一点伤害', - spell_fuchouzhinu:'复仇之怒', - spell_fuchouzhinu_info:'造成5点伤害,随机分配到所有敌方随从上', - spell_shengliaoshu:'圣疗术', - spell_shengliaoshu_info:'恢复两点体力,摸两张牌', - spell_fennuzhichui:'愤怒之锤', - spell_fennuzhichui_info:'造成一点伤害,从牌库中获得一张牌', - spell_zuozhandongyuan:'作战动员', - spell_zuozhandongyuan_info:'召唤两个新兵,随机装备一把武器', - spell_liliangzhufu:'力量祝福', - spell_liliangzhufu_info:'令一名随从摸两张牌', - - spell_jinyingduijue:'精英对决', - spell_jinyingduijue_info:'双方各保留体力值最高的一名随从,然后令其他随从死亡', - spell_shenpan:'审判', - spell_shenpan_info:'若你的对手随从数不少于你,则随机令一名敌方随从死亡', - spell_shenshengfennu:'神圣愤怒', - spell_shenshengfennu_info:'从牌库中获得一张牌,并造成等同于其行动值消耗的伤害', - spell_yongshizhufu:'勇士祝福', - spell_yongshizhufu_info:'令一名随从的手牌数翻倍', - spell_zhengqianghaosheng:'争强好胜', - paladin_zhengqianghaosheng:'争强好胜', - paladin_zhengqianghaosheng_info:'在你的下一准备阶段,令所有友方随从增加一点体力和体力上限并摸一张牌', - spell_zhengqianghaosheng_info:'在你的下一准备阶段,令所有友方随从增加一点体力和体力上限并摸一张牌', - spell_zhihuizhufu:'智慧祝福', - paladin_zhihuizhufu:'智慧祝福', - spell_zhihuizhufu_info:'选择一名随从,在其每个准备阶段,你从牌库中获得一张牌', - - spell_fengnu:'风怒', - shaman_fengnu:'风怒', - shaman_fengnu_info:'回合结束后,你获得一个额外回合', - spell_fengnu_info:'令一名随从获得技能风怒(回合结束后,你获得一个额外回合)', - spell_rongyanbaolie:'熔岩爆裂', - spell_rongyanbaolie_info:'造成三点火焰伤害,流失一点体力', - spell_shihuawuqi:'石化武器', - shaman_shihuawuqi:'充能', - shaman_shihuawuqi_info:'准备阶段,你摸三张牌', - spell_shihuawuqi_info:'令一名友方随从获得技能充能(准备阶段,你摸三张牌),直到你的下一回合开始', - spell_xianzuzhaohuan:'先祖召唤', - spell_xianzuzhaohuan_info:'双方各将手牌中的一张随机随从牌置入战场', - spell_xianzuzhihun:'先祖之魂', - shaman_xianzuzhihun:'转生', - shaman_xianzuzhihun_info:'你死亡后,召唤一个自身的复制', - spell_xianzuzhihun_info:'令一名随从获得技能转生(你死亡后,召唤一个自身的复制)', - spell_xianzuzhishi:'先祖知识', - shaman_xianzuzhishi:'先祖知识', - shaman_xianzuzhishi_info:'本回合手牌上限-1', - spell_xianzuzhishi_info:'从牌库中获得两张牌,本回合手牌上限-1(多次使用不叠加)', - - spell_lianhuanbaolie:'连环爆裂', - spell_lianhuanbaolie_info:'造成1~2点雷电伤害', - spell_shandianfengbao:'闪电风暴', - spell_shandianfengbao_info:'对所有敌方随从造成1~2点伤害', - spell_yaoshu:'妖术', - spell_yaoshu_info:'将一个随从变成一只青蛙', - spell_yexinglanghun:'野性狼魂', - spell_yexinglanghun_info:'召唤两个幽灵狼', - spell_shixue:'嗜血', - spell_shixue_info:'所有友方随从摸两张牌', - spell_chazhuangshandian:'叉状闪电', - spell_chazhuangshandian_info:'对两个随机敌方随从各造成一点雷电伤害', - - stone_qingwa:'青蛙', - stone_youlinglang:'幽灵狼', - stone_jingxiang:'镜像', - stone_jingxiang_info:'锁定技,你跳过摸牌阶段', - shaman_qingwa:'青蛙', - shaman_qingwa_info:'锁定技,你跳过摸牌阶段', - stone_xiaojingling:'小精灵', - - spell_laojiuhuoba:'老旧火把', - spell_laojiuhuoba_info:'造成一点伤害,将一张炽热火把置入你的牌库', - spell_chirehuoba:'炽热火把', - spell_chirehuoba_info:'造成两点火焰伤害', - spell_canying:'残影', - spell_canying_info:'复制你的所有随从,并将其置入你的手牌', - spell_yanbaoshu:'炎爆术', - spell_yanbaoshu_info:'造成四点火焰伤害(若目标为主将,伤害不能超过目标的当前体力值)', - spell_jingxiang:'镜像', - spell_jingxiang_info:'召唤两个具有嘲讽且摸牌阶段不摸牌的随从', - spell_aoshufeidan:'奥术飞弹', - spell_aoshufeidan_info:'造成3点伤害,随从分配到所有敌方随从上', - spell_hanbingpingzhang:'寒冰屏障', - mage_hanbingpingzhang:'寒冰屏障', - mage_hanbingpingzhang_info:'体力值不能降到2以内', - spell_hanbingpingzhang_info:'令一名角色的体力值不能降到2以内,直到你的下一回合开始', - - spell_hanbingjian:'寒冰箭', - spell_hanbingjian_info:'对一个随从造成两点伤害,然后将其翻面', - spell_lieyanfengbao:'烈焰风暴', - spell_lieyanfengbao_info:'对所有敌方随从造成两点伤害', - spell_baofengxue:'暴风雪', - spell_baofengxue_info:'对所有敌方随从造成一点伤害,然后将其翻面', - spell_aoshuzhihui:'奥术智慧', - spell_aoshuzhihui_info:'从牌库中获得两张牌', - spell_bianxingshu:'变形术', - spell_bianxingshu_info:'将一个随从变成一只绵羊', - spell_huoqiushu:'火球术', - spell_huoqiushu_info:'造成三点火焰伤害(若目标为主将,伤害不能超过目标的当前体力值)', - - stone_mianyang:'绵羊', - mage_mianyang:'绵羊', - mage_mianyang_info:'锁定技,你不能使用杀', - - stone_beijunmushi:'北郡牧师', - stone_guangyaozhizi:'光耀之子', - stone_longmianjiaoguan:'龙眠教官', - stone_linghunjisi:'灵魂祭司', - stone_guanliyuan:'管理员', - stone_heianjiaotu:'黑暗教徒', - - stone_shengdianzhishi:'圣殿执事', - stone_suoxiaojishi:'缩小技师', - stone_anyingzisi:'暗影子嗣', - stone_guangmingquan:'光明泉', - stone_muguangchulong:'暮光雏龙', - stone_shenshengyongshi:'神圣勇士', - - priest_puzhao:'普照', - priest_puzhao_info:'你出场时,己方主将可令一名其他友方随从增加两点体力和体力上限', - priest_suoxiao:'缩小', - priest_suoxiao_info:'你出场时,己方主将可令一名其他随从减少两点体力上限(不能小于1)', - priest_shengshui:'圣水', - priest_shengshui_info:'你跳过摸牌阶段;在你的准备阶段,令一名随机友方角色回复两点体力', - priest_muguang:'暮光', - priest_muguang_info:'你出场时,若主将手牌中有随从牌,则增加一点体力和体力上限', - priest_shixin:'蚀心', - priest_shixin_info:'每当己方主将使用一次职业技能,对双方主将各造成一点伤害', - - priest_shengliao:'圣疗', - priest_shengliao_info:'每当一名随从回复体力,己方主将从牌库中获得一张牌', - priest_guangyao:'光耀', - priest_guangyao_info:'每当你的体力值发生改变,摸一张牌', - priest_xundao:'训导', - priest_xundao_info:'你出场时,若己方主将手牌中有随从牌,则摸一张牌并获得嘲讽', - priest_hunwu:'魂舞', - priest_hunwu_info:'己方主将的职业技能及法术的治疗效果改为令目标流失等量体力', - priest_faxian:'发现', - priest_faxian_info:'你出场时,己方主将从三张随机随从牌中选择一张加入手牌', - priest_zhufu:'献身', - priest_zhufu_info:'你死亡时,令一名随机友方随从增加一点体力和体力上限', - - stone_daomufeizei:'盗墓匪贼', - stone_haidao:'海盗', - stone_haidaotoumu:'海盗头目', - stone_cike:'刺客', - stone_tegong:'特工', - stone_qiezei:'窃贼', - stone_heitieairen:'黑铁矮人', - - stone_duyanhaidao:'独眼海盗', - stone_gangtiewushi:'刚铁武师', - stone_lifaji:'理发机', - stone_shihualong:'石化龙', - stone_xiushuihaidao:'锈水海盗', - stone_zousishangfan:'走私商贩', - - rogue_duxing:'独行', - rogue_duxing_info:'每当敌方主将召唤一名随从,便获得潜行', - rogue_shoudao:'授道', - rogue_shoudao_info:'在己方主将的结束阶段,令一名随机友方随从增加一点体力和体力上限并摸一张牌', - rogue_lifa:'理发', - rogue_lifa_info:'为己方主将装备一把武器,若已有武器,改为对敌方主将造成一点伤害', - rogue_fusheng:'复生', - rogue_fusheng_info:'你出场时,体力值和体力上限变为X,X为场上体力最高的随从的体力值', - rogue_jielue:'劫掠', - rogue_jielue_info:'每当己方主将装备一把武器牌,摸两张牌', - rogue_jiaoyi:'交易', - rogue_jiaoyi_info:'你出场时,己方主将可以弃置一张装备牌令你摸三张牌', - - rogue_touqie:'偷窃', - rogue_touqie_info:'每当你造成一次伤害,己方主将从牌库中获得一张牌', - rogue_xunbao:'寻宝', - rogue_xunbao_info:'你死亡时,将一张伺机行发置于己方主将的手牌', - rogue_cisha:'刺杀', - rogue_cisha_info:'每当你对一名随从造成伤害,受伤害随从立即死亡', - rogue_touxi:'偷袭', - rogue_touxi_info:'你出场时,己方主将可弃置一张装备区内的牌并对一名敌方角色造成一点伤害', - rogue_qiancang:'潜藏', - rogue_qiancang_info:'你出场时,对所有未受伤害的敌方随从造成一点伤害', - rogue_zhaomu:'结伙', - rogue_zhaomu_info:'你出场时,召唤一个海盗', - - stone_zhihuiguan:'指挥官', - stone_jiangong:'监工', - stone_yuanhou:'猿猴', - stone_chidunshinv:'持盾侍女', - stone_zhujiashi:'铸甲师', - stone_kuangzhanshi:'狂战士', - - stone_heiyaoyaoshou:'黑曜妖兽', - stone_honglongyongshi:'红龙勇士', - stone_peilianshi:'陪练师', - stone_jingyingweishi:'精英卫士', - stone_shengjiachong:'圣甲虫', - stone_mengmaren:'猛犸人', - stone_zhifuzhe:'掷斧者', - - warrior_heiyao:'黑曜', - warrior_heiyao_info:'在己方主将的结束阶段,召唤一只圣甲虫', - warrior_peilian:'陪练', - warrior_peilian_info:'你出场时,己方主将可令一名其他随从获得嘲讽', - warrior_fenyong:'奋勇', - warrior_fenyong_info:'你出场时,若己方主将手牌中有随从牌,则获得冲锋', - warrior_chuanci:'穿刺', - warrior_chuanci_info:'每当你对一名敌方随从造成伤害,对另一名随机敌方随从造成等量的伤害', - warrior_zhifu:'掷斧', - warrior_zhifu_info:'每当你受到一次伤害,对敌方主将造成一点伤害', - - warrior_tongling:'统领', - warrior_tongling_info:'每当你召唤一个初始手牌数不大于2的随从,令其获得冲锋', - warrior_baoluan:'暴乱', - warrior_baoluan_info:'每当一名随从受到一次伤害,摸一张牌', - warrior_jiangong:'监工', - warrior_jiangong_info:'你出场时,己方主将可对一名随从造成一点伤害,然后令该随从摸两张牌', - warrior_zhujia:'铸甲', - warrior_zhujia_info:'每当你受到一次伤害,己方主将获得一点护甲', - warrior_tidun:'提盾', - warrior_tidun_info:'你出场时,己方主将获得两点护甲', - - stone_lieyanxiaogui:'烈焰小鬼', - stone_xiaoguishouling:'小鬼首领', - stone_kongjuzhanma:'恐惧战马', - stone_morishouwei:'末日守卫', - stone_xukongxingzhe:'虚空行者', - stone_diyuhuo:'地狱火', - stone_diyuhuox:'地狱火', - stone_xiaogui:'小鬼', - - stone_heishitanfan:'黑市摊贩', - stone_zhaohuanzhe:'召唤者', - stone_meimo:'魅魔', - stone_tongkunvwang:'痛苦女王', - stone_xukongkongmo:'虚空恐魔', - stone_fukongmoyan:'浮空魔眼', - - warlock_anyu:'暗语', - warlock_anyu_info:'你出场时,己方主将从三张随机的行动值消耗为1的牌中选择一张加入手牌', - warlock_zhaohuan:'召唤', - warlock_zhaohuan_info:'你死亡时,将手牌中的一张随机随从牌置入战场', - warlock_huanmeng:'幻梦', - warlock_huanmeng_info:'你出场时,己方主将随机弃置一张手牌', - warlock_tongku:'痛苦', - warlock_tongku_info:'每当你造成一次伤害,令己方主将回复一点体力', - warlock_tunshi:'吞噬', - warlock_tunshi_info:'你出场时,己方主将须令一名其他友方随从死亡,然后你获得其全部的手牌和体力值', - warlock_shijie:'视界', - warlock_shijie_info:'每当己方主将受到一次伤害,你增加一点体力和体力上限并摸一张牌', - - warlock_nonghuo:'弄火', - warlock_nonghuo_info:'你出场时,对己方主将造成1点火焰伤害', - warlock_zhaogui:'召鬼', - warlock_zhaogui_info:'每当你受到一次伤害,召唤一个小鬼', - warlock_yongsheng:'永生', - warlock_yongsheng_info:'你死亡后,召唤一匹恐惧战马', - warlock_yuhuo:'狱火', - warlock_yuhuo_info:'你出场时,对所有其他随从造成一点伤害', - warlock_zaihuo:'灾祸', - warlock_zaihuo_info:'你出场时,随机弃置主将的两张手牌', - - stone_hudunren:'护盾人', - stone_junxuguan:'军需官', - stone_yurenqishi:'鱼人骑士', - stone_chidunweishi:'持盾卫士', - stone_liewangshouwei:'列王守卫', - stone_longwangpeiou:'龙王配偶', - - stone_baoweizhe:'保卫者', - stone_guiqishi:'龟骑士', - stone_shenmiqishou:'神秘骑手', - stone_shixiangweishi:'石像卫士', - stone_xuefanzhanshi:'血帆战士', - stone_xunmashi:'训马师', - - paladin_baowei:'保卫', - paladin_baowei_info:'你出场时,己方主将可令一名其他随从获得一点护甲', - paladin_tuxi:'吐息', - paladin_tuxi_info:'你出场时,己方主将进行一次判定,若为红色,则回复一点体力', - paladin_miying:'秘影', - paladin_miying_info:'你出场时,依次将牌堆中的所有不重名的判定牌置入敌方主将的判定区', - paladin_huashi:'化石', - paladin_huashi_info:'你出场时,己方主将可将一名其他随从的体力值及体力上限变为2', - paladin_jinghua:'净化', - paladin_jinghua_info:'你出场时,对所有手牌数大于1的随从造成两点伤害', - paladin_moma:'秣马', - paladin_moma2:'秣马', - paladin_moma_info:'所有友方新兵摸牌阶段摸牌数+1', - - paladin_zhaohuan:'召唤', - paladin_zhaohuan2:'召唤', - paladin_zhaohuan_info:'你出场后,你的主将在使用下一张随从牌时获得两点行动值', - paladin_shouwei:'守卫', - paladin_shouwei_info:'你出场时,你的主将回复两点体力值', - paladin_chidun:'持盾', - paladin_chidun_info:'你出场时,己方主将可以弃置对方一名随从的所有牌', - paladin_buji:'补给', - paladin_buji_info:'你出场时,所有友方新兵增加一点体力和体力上限并摸两张牌', - paladin_hudun:'护盾', - paladin_hudun_info:'你出场时,获得一点护甲值', - paladin_zhaochao:'招潮', - paladin_zhaochao_info:'每当你的主将使用一次英雄技能,便摸两张牌', - - stone_shifazhe:'嗜法者', - stone_wushixuetu:'巫师学徒', - stone_shuiyuansu:'水元素', - stone_falifulong:'法力浮龙', - stone_yingxiongzhihun:'英雄之魂', - stone_huoyao:'火妖', - - stone_aoshushi:'奥术师', - stone_faqishi:'法骑士', - stone_fuhuokaijia:'复活铠甲', - stone_kaodalalong:'考达拉龙', - stone_yanshushi:'炎术士', - stone_xulingwushi:'虚灵巫师', - - mage_aoshu:'奥术', - mage_aoshu_info:'你出场时,将一张奥术智慧置入主将的手牌', - mage_jili:'激励', - mage_jili_info:'每当主将使用一次职业技能,摸一张牌', - mage_gushou:'固守', - mage_gushou_info:'每当己方主将受到多于1伤害时,防止其余伤害', - mage_yufa:'驭法', - mage_yufa_info:'每当己方主将使用一次职业技能,令其获得一点行动值', - mage_yanshu:'炎术', - mage_yanshu_info:'你出场时,造成X点火焰伤害,随机分配到敌方随从上,X为己方主将装备区内装备牌的数量', - mage_pingxu:'冯虚', - mage_pingxu_info:'你出场时,己方主将从三张随机法术牌中选择一张加入手牌', - - mage_shifa:'嗜法', - mage_shifa_info:'你出场时,将一张随机法术牌置入双方主将的手牌', - mage_minghuo:'冥火', - mage_minghuo_info:'你的主将的职业技能造成的伤害+1', - mage_tunfa:'吞法', - mage_tunfa_info:'每当己方主将使用一张法术牌,摸一张牌', - mage_lieyan:'烈焰', - mage_lieyan_info:'每当己方主将使用一张法术牌,对一名随机敌方角色造成一点火焰伤害', - mage_zhufa:'助法', - mage_zhufa_info:'每当己方主将使用一张法术牌,令其获得一点行动值', - mage_bingdong:'冰冻', - mage_bingdong_info:'每当你对一个随从造成伤害,该随从将武将牌翻至背面', - - stone_caoyuanshi:'草原狮', - stone_leiouke:'雷欧克', - stone_misha:'米莎', - stone_huofu:'霍弗', - stone_jiewangzhu:'结网蛛', - stone_xunshoushi:'驯兽师', - - stone_senlinlang:'森林狼', - stone_tujiu:'秃鹫', - stone_muyangren:'牧羊人', - stone_jujishou:'狙击手', - stone_damoshatuo:'大漠沙驼', - stone_huangjialeixiang:'皇家雷象', - - hunter_jiewang:'结网', - hunter_jiewang_info:'你死亡时,己方主将获得一张随机野兽牌', - hunter_xunshou:'驯兽', - hunter_xunshou_info:'你出场时,己方主将可选择一名其他友方随从令其增加一点体力和体力上限,摸两张牌并获得嘲讽', - hunter_nuhou:'怒吼', - hunter_nuhou_info:'当你死亡时,对所有敌方角色造成一点伤害', - hunter_zhanhuo:'战火', - hunter_zhanhuo2:'战火', - hunter_zhanhuo_info:'其他友方随从摸牌阶段的摸牌数+1', - - hunter_qunxi:'群袭', - hunter_qunxi_info:'你出场时,所有友方随从摸一张牌', - hunter_mishi:'觅食', - hunter_mishi_info:'每当己方主将召唤一个随从,摸一张牌', - hunter_dusha:'渡沙', - hunter_dusha_info:'你出场时,令双方主将各随机使用一张牌库中的1费随从牌(不计入行动值消耗)', - hunter_chuanlin:'穿林', - hunter_chuanlin_info:'你出场时,己方主将展示牌库中的一张随机随从牌并获得之', - hunter_muyang:'牧羊', - hunter_muyang_info:'你出场时,随机召唤一个行动值消耗为X的随从,X为其他友方随从数', - hunter_juji:'狙击', - hunter_juji_info:'你的职业技能可以指定随从为目标', - - stone_baoqishi:'豹骑士', - stone_conglinshouwei:'从林守卫', - stone_baohuzhishu:'保护之树', - stone_kuangyedoushi:'狂野斗士', - stone_liebao:'猎豹', - stone_zongxiong:'棕熊', - - stone_renyaqishi:'刃牙骑士', - stone_conglinxiaoshou:'丛林枭兽', - stone_huangyeqishi:'荒野骑士', - stone_xunmenglong:'迅猛龙', - stone_lindishuyao:'林地树妖', - stone_huoshanxiemu:'火山邪木', - - druid_renya:'刃牙', - druid_renya_info:'你出场时,己方主将可以选择一项:令你摸一张牌并将武将牌翻至正面,或令你增加一点体力上限并获得技能潜行', - druid_yuehuo:'月火', - druid_yuehuo_info:'所有锦囊牌造成的伤害+1', - druid_qicheng:'骑乘', - druid_qicheng_info:'你死亡时,随机召唤一个行动消耗为1的随从', - druid_chicheng:'驰骋', - druid_chicheng_info:'你出场时,己方主将获得X点行动值,X为其他友方随从数', - druid_yeyou:'夜游', - druid_yeyou_info:'双方主将各从牌库中获得一张牌', - druid_juhuo:'举火', - druid_juhuo_info:'己方主将回合内,每有一名随从死亡,令己方主将获得一点行动值', - - stone_chongfeng:'冲锋', - stone_chongfeng_info:'你出场时,立即将武将牌翻至正面', - druid_nuhuo:'怒火', - druid_nuhuo_info:'每当己方主将使用一次职业技能,便对一名随机敌人造成一点伤害', - druid_chengzhang:'成长', - druid_chengzhang2:'成长', - druid_chengzhang_info:'你出场时,己方主将获得一点行动值;你死亡时,己方主将需弃置一张手牌', - druid_huwei:'护卫', - druid_huwei_info:'你出场时,己方主将可以选择一项:对一名随从造成一点伤害,或弃置一名随从的所有牌并将其体力上限改为2', - - - stone_fachao:'法潮图腾', - stone_tutengyongshi:'图腾勇士', - stone_huoshe:'火舌图腾', - stone_huoyuansu:'火元素', - stone_tuyuansu:'土元素', - stone_wujiyuansu:'无羁元素', - stone_xuejuren:'穴居人', - stone_huoli:'活力图腾', - stone_tutengshi:'图腾师', - stone_shachuisaman:'砂槌萨满', - stone_huoyanweishi:'火焰卫士', - stone_wanshiyuansu:'顽石元素', - stone_shalinxingzhe:'砂鳞行者', - - shaman_anhun:'暗魂', - shaman_anhun_info:'每当一名友方随从死亡,令主将从牌库中获得一张牌', - shaman_zoushi:'走石', - shaman_zoushi_info:'每当己方主将使用一张随从牌,对一名随机敌方角色造成一点伤害', - shaman_zhuhuo:'逐火', - shaman_zhuhuo_info:'你出场时,摸1~3张牌', - shaman_peiyu:'培育', - shaman_peiyu_info:'你出场时,增加X点体力和体力上限,X为友方图腾数', - shaman_huoli:'活力', - shaman_huoli_info:'己方主将出牌阶段开始时,你令其获得一点行动值', - shaman_xueju:'穴居', - shaman_xueju_info:'每当己主将使用一张随从牌,摸一张牌', - shaman_huoxi:'火袭', - shaman_huoxi_info:'你出场时,己方主将可以对对方一名随从造成两点火焰伤害', - shaman_fachao:'法潮', - shaman_fachao_info:'己方主将在其每个回合结束阶从牌库中获得一张牌并回复一点体力', - shaman_huoshe:'火舌', - shaman_huoshe_info:'其他友方随从造成的伤害始终+1', - - shaman_jili:'激励', - shaman_jili_info:'己方主将的结束阶段,所有友方图腾摸一张牌', - shaman_tuteng:'图腾', - shaman_tuteng_info:'你跳过摸牌阶段', - shaman_fali:'空气', - shaman_fali_info:'已方主将的结束阶段,令所有手牌数不大于1的友方随从摸一张牌', - shaman_zhiliao:'治疗', - shaman_zhiliao_info:'在你的结束阶段,令所有友方随从回复一点体力', - shaman_zhuore:'灼热', - shaman_zhuore_info:'已方主将的结束阶段,对一名随机敌方随从造成一点伤害', - - _shaman_skill:'图腾', - _shaman_skill_info:'召唤一个随机图腾', - _mage_skill:'火冲', - _mage_skill_info:'对一名随从造成一点火焰伤害', - _priest_skill:'治疗', - _priest_skill_info:'回复一点体力', - _priest_skillx:'心刺', - _priest_skillx_info:'造成一点伤害', - _warrior_skill:'战甲', - _warrior_skill_info:'获得一点护甲(不能超过3点)', - _warlock_skill:'分流', - _warlock_skill_info:'从牌库中获得两张牌', - _warlock_skillx:'炼狱', - _warlock_skillx_info:'召唤一个地狱火', - _rogue_skill:'出鞘', - _rogue_skill_info:'装备一把武器和一个随机非武器装备', - _paladin_skill:'动员', - _paladin_skill_info:'召唤一名士兵', - _hunter_skill:'射击', - _hunter_skill_info:'对敌方主将造成一点伤害', - _druid_skill:'猛击', - _druid_skill_info:'视为使用一张不计入出杀次数的杀', - - stone_tuteng1:'石爪图腾', - stone_tuteng2:'灼热图腾', - stone_tuteng3:'空气图腾', - stone_tuteng4:'治疗图腾', - - stone_xinbing:'新兵', - - stone_zhongshi:'中士', - stone_zhongshi1:'叫嚣', - stone_zhongshi1_info:'你出场时,己方主将可以弃置对方一名随从的所有牌', - stone_zhucangzhe:'伫藏者', - stone_zhucangzhe1:'伫藏', - stone_zhucangzhe1_info:'你出场时,己方主将可以令己方一名其他角色摸一张牌', - stone_huoqiangshou:'火枪手', - stone_huoqiangshou1:'火枪', - stone_huoqiangshou1_info:'你出场时,己方主将可以对对方一名随从造成一点伤害', - - stone_lansaizhanshi:'蓝腮战士', - stone_kutongsiseng:'苦痛侍僧', - stone_kutongsiseng1:'苦痛', - stone_kutongsiseng2:'苦痛', - stone_kutongsiseng1_info:'你出场时,己方主将于本结束阶段摸一张牌', - stone_yuanguanying:'远古暗影', - stone_yuanguanying1:'暗影', - stone_yuanguanying1_info:'你出场时,己方主将可视为对一名敌方角色使用一张杀', - - stone_dijieshicong:'低阶侍从', - stone_dijieshicong1:'持枪', - stone_dijieshicong1_info:'你出场时,敌方主将随机弃置一张装备牌', - stone_yaosaishouwei:'要塞守卫', - stone_yaosaishouwei1:'守卫', - stone_yaosaishouwei1_info:'你出场时,己方主将本回合手牌上限+2', - stone_famingjia:'发明家', - stone_famingjia1:'发明', - stone_famingjia1_info:'你出场时,己方主将摸两张牌', - - stone_chilundashi:'齿轮大师', - stone_chilundashi1:'齿轮', - stone_chilundashi2:'齿轮', - stone_chilundashi1_info:'你出场后的第一个摸牌阶段摸牌数+1', - stone_hanguangzhizhe:'寒光智者', - stone_hanguangzhizhe1:'寒光', - stone_hanguangzhizhe1_info:'你出场时,所有其他随从各摸一张牌', - stone_aihaozhihun:'哀嚎之魂', - stone_aihaozhihun1:'哀嚎', - stone_aihaozhihun1_info:'你出场时,敌方随从弃置所有牌', - - stone_fennuxiaoji:'愤怒小鸡', - stone_fennuxiaoji1:'暴怒', - stone_fennuxiaoji1_info:'准备阶段,若你没有手牌,你摸两张牌', - stone_juxingchanchu:'巨型蟾蜍', - stone_juxingchanchu1:'毒液', - stone_juxingchanchu1_info:'你死亡时,己方主将可令一名敌方随从失去1点体力', - stone_shishigui:'食尸鬼', - stone_shishigui1:'食尸', - stone_shishigui1_info:'你死亡后,场上所有其他随从失去1点体力', - stone_wuyi:'巫医', - stone_langren:'狼人', - stone_qianxing:'潜行', - stone_qianxing_info:'在你的回合开始前,不能成为任何卡牌的目标', - - stone_mingguangjisi:'明光祭司', - stone_nianqingjisi:'年轻祭司', - stone_zhufu:'祝福', - stone_zhufu_info:'己方主将的结束阶段,你令一名随机的受伤友方随从回复一点体力', - stone_aomishouwei:'奥秘守卫', - stone_yanjingshe:'眼镜蛇', - stone_yanjingshe1:'毒噬', - stone_yanjingshe1_info:'你出场时,若敌方随从数不少于己方,则随机杀死一名随从', - stone_zhiyuzhe:'治愈者', - stone_zhiyu:'治愈', - stone_zhiyu_info:'你出场时,令所有友方随从回复一点体力', - stone_mafengzhuru:'麻风侏儒', - stone_mafengzhuru1:'麻风', - stone_mafengzhuru1_info:'杀死你的随从失去一点体力', - stone_fatiaozhuru:'发条侏儒', - stone_fatiaozhuru1:'发条', - stone_fatiaozhuru1_info:'结束阶段,若你没有手牌,你摸两张牌', - - stonesha:'进攻', - stonesha_info:'锁定技,你的装备牌均视为杀', - stoneshan:'格挡', - stoneshan_info:'锁定技,你的随从和法术牌均视为闪', - - stonecharacter:'随从', - spell_shengerpingdeng:'生而平等', - spell_shengerpingdeng_info:'将所有随从体力上限降为1', - spell_jingshenkongzhi:'精神控制', - spell_jingshenkongzhi_info:'将一名敌方随从吸收为己方', - spell_anyingkuangluan:'暗影狂乱', - spell_anyingkuangluan_info:'将一名敌方随从吸收为己方,并令其于下个回合结束后死亡', - spell_anyingkuangluan_die:'暗影狂乱', - spell_anyingkuangluan_die_info:'下个回合结束后死亡', - spell_binghuan:'冰环', - spell_binghuan_info:'将场上所有随从翻面', - spell_morizaihuo:'末日灾祸', - spell_morizaihuo_info:'令场上所有随从立即死亡,回复两点体力', - spell_zhiliaozhichu:'治疗之触', - spell_zhiliaozhichu_info:'令目标随从恢复所有体力值并获得嘲讽', - chaofeng:'嘲讽', - chaofeng_info:'同阵营的无嘲讽角色不以能成为杀的目标', - spell_wangzhezhufu:'王者祝福', - spell_wangzhezhufu_info:'令一名随从增加两点体力和体力上限并摸两张牌', - spell_diyulieyan:'地狱烈焰', - spell_diyulieyan_info:'所有角色失去一点体力', - spell_chenmo:'沉默', - spell_chenmo_info:'弃置一名随从的所有牌,并令其体力上限减至2', - spell_zhiliaoshui:'治疗水', - spell_zhiliaoshui_info:'出牌阶段对自己使用,恢复两点体力值;或于濒死阶段对一名角色使用,令目标恢复一点体力', - spell_yanmie:'极恶之咒', - spell_yanmie_info:'交换你与敌方主将的装备区,并摸若干张牌直到你的手牌数与敌方主将相等', - spell_xiaoshi:'消失', - spell_xiaoshi_info:'令敌方主将将所有装备区内的牌收入手牌,并弃置其若干张手牌,直到其手牌数与你相等', - - stonecard:'法术', - mode_stone_card_config:'炉石模式', - mode_stone_character_config:'炉石模式', - }, - help:{ - '炉石模式': - '
          构筑
          • 点击右上角的卡组管理构建卡组
          • 一套卡组共30张牌,由法术和随从牌构成,每个同名卡牌最多带两张'+ - '
          • 卡组管理器中,随从右上角的x/y表示登场状态为x牌y血'+ - '
          • 游戏开始时,双方摸三张牌并从牌库中获得一张牌,并可选择将手牌置换一次'+ - '
          • 每当主将摸X张牌时,若X至少为2,则其中的X-1张牌从牌堆中获得,1张牌从牌库中获得'+ - '
          • 每名角色使用一套卡组,卡组用完后会重新补满'+ - '
          • 卡组与职业绑定,每个职业有一个专属技能,每回合限用一次,消耗两点行动值
          '+ - '
          职业技能
          • 祭司:召唤一个随机图腾'+ - '
          • 法师:对一名随从造成一点火焰伤害'+ - '
          • 牧师:回复一点体力'+ - '
          • 战士:获得一点护甲(不能超过3点)'+ - '
          • 术士:牌库中摸两张牌'+ - '
          • 潜行者:装备一把武器和一个随机非武器装备'+ - '
          • 圣骑士:召唤一名士兵'+ - '
          • 猎人:对敌方主将造成一点伤害'+ - '
          • 德鲁伊:视为使用一张不计入出杀次数的杀
          '+ - '
          怒气值
          • 每当友方随从受到伤害获得3点怒气值,主将受到伤害获得6点怒气值'+ - '
          • 每有一个友方随从死亡,获得10点怒气值,主将死亡获得20点怒气值'+ - '
          • 结束阶段,若己方随从数少于对方会获得10X点怒气值,X为随从数之差'+ - '
          • 怒气值达到100时不再增加。准备阶段,若怒气值己满,可消耗全部怒气值和4点行动值并召唤一名传说随从
          '+ - '
          战斗
          • 场上有两名主将进行对抗,主将的体力上限+1'+ - '
          • 游戏牌堆移除了乐不思蜀等跳过出牌阶段以及包含翻面功能的卡牌'+ - '
          • 主将出牌阶段的出牌数量(行动值)有上限,从1开始递增,后手的首个回合有一点额外行动值,装备牌不计入出牌上限
          • 游戏每进行一轮,主将的出牌上限+1,直到增加至6'+ - '
          • 使用随从牌可召唤一个随从,随从出场时背面朝上。每一方在场的随从数不能超过4
          • 随从于摸牌阶段摸牌基数为1,随从的法术和随从牌均视为闪,装备牌均视为杀
          • '+ - '随从与其他所有角色相互距离基数为1
          • '+ - '主将杀死对方随从后获得一个额外的行动值并从牌库中获得一张牌,杀死己方随从无惩罚,随从杀死随从无效果'+ - '
          • 主将在随从满员时可重铸随从牌,但回合内总的重铸次数不能超过3;若重铸的牌为随从牌或法术牌,则摸牌改为获得一张随机法术牌'+ - '
          • 嘲讽:若一方阵营中有嘲讽角色,则同阵营的无嘲讽角色不以能成为杀目标'+ - '
          • 行动顺序为先主将后随从。主将或随从死亡后立即移出游戏,主将死亡后替补登场,替补登场时摸3+X张牌,X为对方存活的随从数,无替补时游戏结束' - } +game.import('mode',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'stone', + start:function(){ + "step 0" + lib.init.css(lib.assetURL+'layout/mode/','stone'); + _status.mode='deck'; + game.initStone(); + var playback=localStorage.getItem(lib.configprefix+'playback'); + + if(!playback&&_status.mode=='deck'){ + var createCardDialog=function(){ + ui.deckBuilder=ui.create.div('.popup-container#deck-builder',function(){ + if(careerList.classList.contains('shown')){ + careerList.classList.remove('shown'); + newDeck.classList.remove('active'); + } + else if(!cardDialog.classList.contains('shown')){ + this.classList.remove('shown'); + this.timeout=setTimeout(function(){ + ui.deckBuilder.remove(); + },500); + ui.arena.style.top=''; + ui.arena.style.transform=''; + ui.arena.style.opacity=''; + ui.system.style.opacity=''; + ui.auto.show(); + ui.pause.show(); + ui.historybar.show(); + } + }); + var clickNode=function(){ + cardDialog.classList.add('shown'); + controls.classList.add('shown'); + var name='未命名'; + for(var i=1;;i++){ + if(!lib.storage.deckList[name+i]){ + break; + } + } + cardDialog.editing={ + name:name+i, + content:{ + career:this.firstChild.dataset.career, + deck:[] + }, + } + rename.innerHTML=name+i; + newDeck.innerHTML='确认编辑'; + newDeck.classList.add('active'); + careerList.classList.remove('shown'); + listContainer.style.transform='translateX(200px)'; + deckContainer.innerHTML=''; + deckContainer.classList.add('shown'); + updateCardDialog(); + } + var careerList=ui.create.div('.shadowed.career',ui.deckBuilder); + for(var i=0;i/g,''); + }; + var observer = new MutationObserver(removeLine); + observer.observe(rename,{characterData:true,subtree:true}); + rename.addEventListener('keyup',removeLine); + + var cardDialog=ui.create.cardDialog(true,function(name){ + if(lib.card[name].stonehidden) return true; + var type=lib.card[name].type; + return type!='stonecard'&&type!='stonecharacter'; + },{seperate:function(list){ + var nl=[],ns=[]; + var career={}; + var careerspell={}; + for(var i=0;i=30){ + for(var i=0;i=2){ + list.push(i); + } + } + for(var i=0;ib) return 1; + if(a'+editing.name+'', + listContainer,editDeck); + ui.create.div('.menubutton.round',deckitem).dataset.career=editing.content.career; + deckitem.name=editing.name; + } + lib.storage.deckList[editing.name]=editing.content; + } + game.save('deckList',lib.storage.deckList); + listContainer.style.transform=''; + deckContainer.classList.remove('shown'); + updateCardDialog(); + } + e.stopPropagation(); + }); + var listContainer=ui.create.div('.list-container',deckList); + for(var i in lib.storage.deckList){ + var deckitem=ui.create.div('.deckitem.shadowed',''+i+'', + listContainer,editDeck); + ui.create.div('.menubutton.round',deckitem).dataset.career=lib.storage.deckList[i].career; + deckitem.name=i; + } + var deckContainer=ui.create.div('.list-container.deck',deckList); + if(ui.deckcontrol) ui.deckcontrol.show(); + }; + + ui.deckcontrol=ui.create.system('卡组管理',function(){ + if(this.classList.contains('hidden')) return; + // if(lib.config.low_performance){ + // ui.arena.style.transform='translateY('+ui.window.offsetHeight+'px)'; + // } + // else{ + // ui.arena.style.top='100%'; + // } + // ui.arena.style.transform='scale(0.6)'; + ui.arena.style.opacity=0; + ui.system.style.opacity=0; + ui.window.appendChild(ui.deckBuilder); + if(ui.deckBuilder.timeout){ + clearTimeout(ui.deckBuilder.timeout); + delete ui.deckBuilder.timeout; + } + ui.refresh(ui.deckBuilder); + ui.deckBuilder.classList.add('shown'); + ui.auto.hide(); + ui.pause.hide(); + ui.historybar.hide(); + },true); + + if(lib.onfree){ + ui.deckcontrol.hide(); + lib.onfree.push(createCardDialog); + } + else{ + createCardDialog(); + } + } + + if(playback){ + ui.create.me(); + ui.arena.style.display='none'; + ui.system.style.display='none'; + _status.playback=playback; + localStorage.removeItem(lib.configprefix+'playback'); + var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); + store.get(parseInt(playback)).onsuccess=function(e){ + if(e.target.result){ + game.playVideoContent(e.target.result.video); + } + else{ + alert('播放失败:找不到录像'); + game.reload(); + } + } + event.finish(); + } + else{ + game.prepareArena(2); + // game.delay(); + } + ui.arena.classList.add('stone'); + "step 1" + for(var i=0;i'+game.me.deckCards.length); + uiintro.addSmall([game.me.deckCards,'card']); + return uiintro; + },220); + if(get.config('skill_bar')){ + _status.rageEnabled=true; + + ui.friendBar=ui.create.div('.skillbar.right.shadowed.playerbg',ui.arena); + ui.enemyBar=ui.create.div('.skillbar.left.shadowed.playerbg',ui.arena); + // ui.friendBar.dataset.nature='metal'; + // ui.enemyBar.dataset.nature='fire'; + ui.create.div('.skillbarshadow',ui.friendBar); + ui.create.div('.skillbarshadow',ui.enemyBar); + ui.create.div('.skillbarfill',ui.friendBar); + ui.create.div('.skillbarfill',ui.enemyBar); + ui.friendBar.fillnode=ui.create.div(ui.friendBar.lastChild); + ui.enemyBar.fillnode=ui.create.div(ui.enemyBar.lastChild); + // ui.friendBar.popnode=ui.create.div('.skillbartext',ui.friendBar); + // ui.enemyBar.popnode=ui.create.div('.skillbartext',ui.enemyBar); + _status.friendRage=0; + _status.enemyRage=0; + + lib.setIntro(ui.friendBar); + lib.setIntro(ui.enemyBar); + } + } + _status.friendCount=ui.create.system('',null,true); + _status.enemyCount=ui.create.system('',null,true); + game.updateStatusCount(); + lib.setPopped(_status.friendCount,function(){ + var uiintro=ui.create.dialog('hidden'); + + if(_status.deadfriend.length){ + uiintro.add('已阵亡'); + uiintro.add([_status.deadfriend,'player']); + } + + uiintro.add('未上场'); + if(_status.mylist.length){ + uiintro.add([_status.mylist,'character']); + } + else{ + uiintro.add('(无)') + } + + return uiintro; + }); + lib.setPopped(_status.enemyCount,function(){ + if(_status.deadenemy.length){ + var uiintro=ui.create.dialog('hidden'); + uiintro.add('已阵亡'); + uiintro.add([_status.deadenemy,'player']); + return uiintro; + } + }); + + game.me.side=Math.random()<0.5; + game.enemy.side=!game.me.side; + + var players=get.players(lib.sort.position); + var info=[]; + for(var i=0;i=100){ + _status.friendRage=100; + ui.friendBar.fillnode.style.top='-50%'; + ui.friendBar.classList.add('full'); + } + else{ + ui.friendBar.fillnode.style.top=(100-_status.friendRage)+'%'; + ui.friendBar.classList.remove('full'); + } + } + else{ + if(_status.enemyRage<100){ + popup=ui.enemyBar; + } + _status.enemyRage+=num; + if(_status.enemyRage<0){ + _status.enemyRage=0; + } + if(_status.enemyRage>=100){ + _status.enemyRage=100; + ui.enemyBar.fillnode.style.top='-50%'; + ui.enemyBar.classList.add('full'); + } + else{ + ui.enemyBar.fillnode.style.top=(100-_status.enemyRage)+'%'; + ui.enemyBar.classList.remove('full'); + } + } + if(num>0&&popup){ + var node=ui.create.div('.skillbartext',num.toString(),popup); + ui.refresh(node); + node.style.opacity=1; + setTimeout(function(){ + node.delete(); + },700); + } + }, + drawDeck:function(num,log){ + if(!num){ + num=1; + } + var cards=this.getDeckCards(num); + if(log==false){ + this.directgain(cards); + } + else if(log==true){ + this.directgain(cards); + game.log(this,'从牌库中获得了'+get.cnNumber(num)+'张牌'); + } + else{ + this.gain(cards,'draw'); + game.log(this,'从牌库中获得了'+get.cnNumber(num)+'张牌'); + } + return cards; + }, + updateActCount:function(used,countx,current){ + if(_status.video){ + this.actcount=countx||2; + } + else{ + game.addVideo('updateActCount',this,[used,this.actcount,this.getActCount()]); + } + var maxcount,overflow2; + if(game.layout=='default'||used=='outphase'||_status.currentPhase!=this){ + maxcount=this.actcount; + } + else{ + if(_status.video){ + maxcount=this.actcount-(current||0); + } + else{ + maxcount=this.actcount-this.getActCount(); + } + if(this.actcount>maxcount){ + maxcount=this.actcount; + } + if(maxcount>12){ + maxcount=this.actcount+1; + this.node.actcount.classList.add('overflow2'); + } + else{ + this.node.actcount.classList.remove('overflow2'); + } + } + for(var i=0;i<12;i++){ + if(maxcount>this.node.actcount.childElementCount){ + ui.create.div(this.node.actcount); + } + else if(maxcount=this.actcount){ + this.node.actcount.childNodes[i].classList.add('overflow'); + } + else{ + this.node.actcount.childNodes[i].classList.remove('overflow'); + } + } + else{ + this.node.actcount.childNodes[i].classList.add('lost'); + this.node.actcount.childNodes[i].classList.remove('overflow'); + } + } + } + }, + getAct:function(){ + return this.actcount-this.getActCount(); + }, + hasFellowSkill:function(skill,exclude){ + for(var i=0;i=0){ + this.actcharacterlist[index]=null; + } + return this; + }, + dieAfter:function(source){ + var dead=this; + if(game.me.isDead()){ + if(!_status.mylist.length){ + _status.friendCount.innerHTML='友军: '+get.cnNumber(0); + game.over(false); + } + else{ + game.pause(); + _status.deadfriend.push(this); + game.additionaldead.push(this); + setTimeout(function(){ + var player=ui.create.player(); + player.getId(); + player.classList.add('noidentity'); + player.dataset.position=dead.dataset.position; + player.side=dead.side; + player.actcharacterlist=dead.actcharacterlist; + player.animate('replaceme'); + player.actcount=game.enemy.actcount; + player.actcount=dead.actcount; + if(_status.double_character){ + player.init(_status.mylist.shift(),_status.mylist.shift()); + } + else{ + player.init(_status.mylist.shift()); + } + player.maxHp++; + player.hp++; + if(_status.mode=='deck'){ + get.deck(player,_status.deck.shift()); + } + game.players.push(player); + ui.arena.appendChild(player); + + game.addVideo('stoneSwap',null,{ + name:player.name, + name2:player.name2, + position:player.dataset.position, + actcount:player.actcount, + me:true + }); + game.swapControl(player); + game.arrangePlayers(); + if(_status.mode=='deck'){ + var nd=game.enemy.countFellow(); + if(nd){ + player.draw(3+nd,{drawDeck:nd},false); + } + else{ + player.draw(3,false); + } + } + else{ + player.draw(3+game.enemy.countFellow(),false); + } + game.resume(); + game.updateStatusCount(); + },lib.config.duration); + + } + } + else if(game.enemy.isDead()){ + if(!_status.enemylist.length){ + _status.enemyCount.innerHTML='敌军: '+get.cnNumber(0); + game.over(true); + } + else{ + game.pause(); + _status.deadenemy.push(this); + game.additionaldead.push(this); + setTimeout(function(){ + var player=ui.create.player(); + player.getId(); + player.classList.add('noidentity'); + player.dataset.position=dead.dataset.position; + player.side=dead.side; + player.actcharacterlist=dead.actcharacterlist; + player.animate('replaceenemy'); + player.actcount=dead.actcount; + if(_status.double_character){ + player.init(_status.enemylist.shift(),_status.enemylist.shift()); + } + else{ + player.init(_status.enemylist.shift()); + } + player.maxHp++; + player.hp++; + if(_status.mode=='deck'){ + get.deck(player,'random'); + } + game.players.push(player); + game.enemy=player; + ui.arena.appendChild(player); + + game.addVideo('stoneSwap',null,{ + name:player.name, + name2:player.name2, + position:player.dataset.position, + actcount:player.actcount, + }); + game.arrangePlayers(); + if(_status.mode=='deck'){ + var nd=game.me.countFellow(); + if(nd){ + player.draw(3+nd,{drawDeck:nd},false); + } + else{ + player.draw(3,false); + } + } + else{ + player.draw(3+game.me.countFellow(),false); + } + game.resume(); + game.updateStatusCount(); + },lib.config.duration); + } + } + if(source&&source.side!=this.side&&!source.isMin()){ + if(_status.mode=='deck'){ + source.drawDeck(); + } + else{ + source.draw(); + } + source.actused--; + source.updateActCount(); + } + game.dead.remove(this); + game.arrangePlayers(); + this.getLeader().removeFellow(this); + setTimeout(function(){ + dead.delete(); + },500); + } + } + }, + beastList:['stone_misha','stone_leiouke','stone_huofu','stone_caoyuanshi','stone_jiewangzhu', + 'stone_huangjialeixiang','stone_damoshatuo','stone_tujiu','stone_senlinlang', + 'stone_fennuxiaoji','stone_juxingchanchu','stone_yanjingshe','stone_yuanhou' + ], + cardPack:{ + mode_stone:[ + 'spell_xiaoshi','spell_chenmo','spell_morizaihuo','spell_shengerpingdeng','spell_jingshenkongzhi','spell_anyingkuangluan', + 'spell_binghuan','spell_yanmie','spell_zhiliaozhichu','spell_wangzhezhufu','spell_diyulieyan','spell_zhiliaoshui', + 'spell_hanbingjian','spell_huoqiushu','spell_bianxingshu','spell_aoshuzhihui','spell_baofengxue','spell_lieyanfengbao', + 'spell_shandianfengbao','spell_chazhuangshandian','spell_yaoshu','spell_shixue','spell_lianhuanbaolie','spell_yexinglanghun', + 'spell_fuchouzhinu','spell_liliangzhufu','spell_fennuzhichui','spell_fengxian','spell_zuozhandongyuan','spell_shengliaoshu', + 'spell_cigu','spell_modaoyou','spell_jianrenluanwu','spell_daoshan','spell_cisha','spell_sijidaifa', + 'spell_huotigenxu','spell_wuyashenxiang','spell_ziranzhili','spell_yemanpaoxiao','spell_hengsao','spell_yexingchengzhang', + 'spell_xishengqiyue','spell_zuzhou','spell_xiaoguibaopo','spell_emozhinu','spell_anyinglieyan','spell_liliangdaijia', + 'spell_shenshengxinxing','spell_shengguangzhadan','spell_maizang','spell_xinlingshijie','spell_naluzhiguang','spell_zhiliaozhihuan', + 'spell_nuxi','spell_dunpaimengji','spell_zhansha','spell_nuhuozhongshao','spell_xuanfengzhan','spell_juemingluandou', + 'spell_lierenyinji','spell_kuaisusheji','spell_guanmenfanggou','spell_zhaohuanchongwu','spell_zidanshangtang','spell_duochongsheji', + 'spell_xianzuzhihun','spell_xianzuzhaohuan','spell_fengnu','spell_shihuawuqi','spell_xianzuzhishi','spell_rongyanbaolie', + 'spell_laojiuhuoba','spell_chirehuoba','spell_aoshufeidan','spell_canying','spell_yanbaoshu','spell_hanbingpingzhang','spell_jingxiang', + 'spell_mengun','spell_jipao','spell_beici','spell_weijisifu','spell_zhumo','spell_anzhongpohuai','spell_piaoqie', + 'spell_conglinzhihun','spell_heiandiyu','spell_fugen','spell_xingchenzhuiluo','spell_fennu','spell_ziyang', + 'spell_shalumingling','spell_tianjiangzhuqun','spell_tanxianmao','spell_dubiao','spell_qiangfengsheji','spell_zhuizongshu', + 'spell_zhenyanshu','spell_enzeshu','spell_anyingxingtai','spell_kuaisuzhiliao','spell_kongxinshu','spell_xinlinghanbao', + 'spell_jinyingduijue','spell_zhihuizhufu','spell_shenshengfennu','spell_yongshizhufu','spell_shenpan','spell_zhengqianghaosheng', + 'spell_zhongnian','spell_fuchoudaji','spell_yingyongdaji','spell_zhandounuhuo','spell_chongfeng','spell_kuangbao', + 'spell_linghunhongxi','spell_siwangchanrao','spell_emozhixin','spell_fushishu','spell_ansezhadan','spell_heianqiyue' + ] + }, + characterPack:{ + mode_stone:{ + stone_tutengyongshi:['male','wei',4,['shaman_jili'],['minskin','stone'],[4,2,'shaman']], + stone_xuejuren:['male','wei',2,['shaman_xueju'],['minskin','stone'],[1,1,'shaman']], + stone_tuyuansu:['male','qun',5,['chaofeng'],['minskin','stone'],[5,4,'shaman']], + stone_huoyuansu:['male','shu',3,['shaman_huoxi'],['minskin','stone'],[4,3,'shaman']], + stone_fachao:['male','wei',3,['shaman_tuteng','shaman_fachao'],['minskin','stone'],[3,0,'shaman']], + stone_huoshe:['male','shu',3,['shaman_tuteng','shaman_huoshe'],['minskin','stone'],[3,0,'shaman']], + stone_huoli:['male','wei',3,['shaman_tuteng','shaman_huoli'],['minskin','stone'],[2,0,'shaman']], + stone_huoyanweishi:['male','shu',4,['shaman_zhuhuo'],['minskin','stone'],[4,1,'shaman']], + stone_tutengshi:['female','wei',2,['shaman_peiyu'],['minskin','stone'],[3,3,'shaman']], + stone_shachuisaman:['male','qun',3,['shaman_fengnu'],['minskin','stone'],[4,4,'shaman']], + stone_wanshiyuansu:['male','qun',3,['shaman_zoushi'],['minskin','stone'],[3,1,'shaman']], + stone_shalinxingzhe:['male','qun',4,['shaman_anhun'],['minskin','stone'],[4,2,'shaman']], + + stone_kuangyedoushi:['male','wu',3,['druid_nuhuo'],['minskin','stone'],[4,2,'druid']], + stone_conglinshouwei:['male','wu',3,['druid_huwei'],['minskin','stone'],[4,2,'druid']], + stone_baohuzhishu:['male','qun',6,['chaofeng'],['minskin','stone'],[6,4,'druid']], + stone_liebao:['male','wei',3,['stone_chongfeng'],['minskin','stone'],[3,2,'druid']], + stone_zongxiong:['male','shu',4,['chaofeng'],['minskin','stone'],[4,2,'druid']], + stone_baoqishi:['female','wei',2,['druid_chengzhang'],['minskin','stone'],[2,2,'druid']], + stone_renyaqishi:['female','wei',1,['druid_renya'],['minskin','stone'],[1,1,'druid']], + stone_huangyeqishi:['male','wei',4,['druid_chicheng'],['minskin','stone'],[5,2,'druid']], + stone_huoshanxiemu:['male','wei',3,['druid_juhuo','chaofeng'],['minskin','stone'],[5,6,'druid']], + stone_conglinxiaoshou:['male','wei',3,['druid_yuehuo'],['minskin','stone'],[4,4,'druid']], + stone_lindishuyao:['female','wei',3,['druid_yeyou'],['minskin','stone'],[3,3,'druid']], + stone_xunmenglong:['male','wei',2,['druid_qicheng'],['minskin','stone'],[3,3,'druid']], + + stone_caoyuanshi:['male','qun',5,['hunter_nuhou'],['minskin','stone'],[5,2,'hunter']], + stone_leiouke:['male','shu',2,['hunter_zhanhuo'],['minskin','stone'],[3,1,'hunter']], + stone_huofu:['male','qun',2,['stone_chongfeng'],['minskin','stone'],[3,4,'hunter']], + stone_misha:['male','shu',3,['chaofeng'],['minskin','stone'],[3,3,'hunter']], + stone_jiewangzhu:['male','wu',1,['hunter_jiewang'],['minskin','stone'],[1,2,'hunter']], + stone_xunshoushi:['male','qun',2,['hunter_xunshou'],['minskin','stone'],[4,3,'hunter']], + stone_senlinlang:['male','qun',1,['hunter_qunxi'],['minskin','stone'],[1,2,'hunter']], + stone_tujiu:['male','qun',3,['hunter_mishi'],['minskin','stone'],[3,2,'hunter']], + stone_muyangren:['male','qun',3,['hunter_muyang'],['minskin','stone'],[4,3,'hunter']], + stone_jujishou:['male','qun',2,['hunter_juji'],['minskin','stone'],[2,2,'hunter']], + stone_damoshatuo:['male','qun',3,['hunter_dusha'],['minskin','stone'],[3,3,'hunter']], + stone_huangjialeixiang:['male','qun',2,['hunter_chuanlin'],['minskin','stone'],[2,3,'hunter']], + + stone_shuiyuansu:['male','wei',4,['mage_bingdong'],['minskin','stone'],[4,2,'mage']], + stone_wushixuetu:['female','wu',1,['mage_zhufa'],['minskin','stone'],[1,2,'mage']], + stone_huoyao:['male','shu',3,['mage_lieyan'],['minskin','stone'],[3,1,'mage']], + stone_falifulong:['male','shu',2,['mage_tunfa'],['minskin','stone'],[1,1,'mage']], + stone_yingxiongzhihun:['male','wei',1,['mage_minghuo'],['minskin','stone'],[1,2,'mage']], + stone_shifazhe:['male','qun',3,['mage_shifa'],['minskin','stone'],[3,3,'mage']], + stone_aoshushi:['male','qun',3,['mage_aoshu'],['minskin','stone'],[3,2,'mage']], + stone_faqishi:['male','qun',4,['mage_jili'],['minskin','stone'],[4,2,'mage']], + stone_fuhuokaijia:['male','qun',3,['mage_gushou'],['minskin','stone'],[3,3,'mage']], + stone_kaodalalong:['male','qun',4,['mage_yufa'],['minskin','stone'],[5,4,'mage']], + stone_yanshushi:['male','qun',2,['mage_yanshu'],['minskin','stone'],[4,4,'mage']], + stone_xulingwushi:['male','qun',2,['mage_pingxu'],['minskin','stone'],[3,3,'mage']], + + stone_hudunren:['male','qun',2,['paladin_hudun'],['minskin','stone'],[2,2,'paladin']], + stone_junxuguan:['male','qun',3,['paladin_buji'],['minskin','stone'],[4,1,'paladin']], + stone_yurenqishi:['male','qun',2,['paladin_zhaochao'],['minskin','stone'],[4,2,'paladin']], + stone_chidunweishi:['male','qun',3,['paladin_chidun'],['minskin','stone'],[3,2,'paladin']], + stone_liewangshouwei:['male','qun',5,['paladin_shouwei'],['minskin','stone'],[5,2,'paladin']], + stone_longwangpeiou:['female','qun',4,['paladin_zhaohuan'],['minskin','stone'],[5,4,'paladin']], + stone_baoweizhe:['male','qun',2,['paladin_baowei'],['minskin','stone'],[2,1,'paladin']], + stone_guiqishi:['male','qun',5,['paladin_tuxi'],['minskin','stone'],[5,4,'paladin']], + stone_shenmiqishou:['male','qun',4,['paladin_miying'],['minskin','stone'],[5,4,'paladin']], + stone_shixiangweishi:['female','qun',3,['paladin_huashi'],['minskin','stone'],[3,3,'paladin']], + stone_xuefanzhanshi:['male','qun',3,['paladin_jinghua'],['minskin','stone'],[4,4,'paladin']], + stone_xunmashi:['male','qun',3,['paladin_moma'],['minskin','stone'],[3,2,'paladin']], + + stone_lieyanxiaogui:['male','qun',2,['warlock_nonghuo'],['minskin','stone'],[1,4,'warlock']], + stone_xiaoguishouling:['male','qun',3,['warlock_zhaogui'],['minskin','stone'],[3,1,'warlock']], + stone_xiaogui:['male','qun',1,[],['minskin','stone','stonehidden'],[1,1]], + stone_kongjuzhanma:['male','qun',1,['warlock_yongsheng'],['minskin','stone'],[3,1,'warlock']], + stone_morishouwei:['male','qun',4,['stone_chongfeng','warlock_zaihuo'],['minskin','stone'],[4,4,'warlock']], + stone_xukongxingzhe:['male','qun',2,['chaofeng'],['minskin','stone'],[1,1,'warlock']], + stone_diyuhuo:['male','qun',4,['warlock_yuhuo'],['minskin','stone'],[5,4,'warlock']], + stone_diyuhuox:['male','qun',2,[],['minskin','stone','stonehidden'],[2,2,'warlock']], + stone_heishitanfan:['male','qun',2,['warlock_anyu'],['minskin','stone'],[2,2,'warlock']], + stone_zhaohuanzhe:['male','qun',3,['warlock_zhaohuan'],['minskin','stone'],[4,2,'warlock']], + stone_meimo:['male','qun',3,['warlock_huanmeng'],['minskin','stone'],[2,3,'warlock']], + stone_tongkunvwang:['male','qun',2,['warlock_tongku'],['minskin','stone'],[2,1,'warlock']], + stone_xukongkongmo:['male','qun',3,['warlock_tunshi'],['minskin','stone'],[3,3,'warlock']], + stone_fukongmoyan:['male','qun',4,['warlock_shijie'],['minskin','stone'],[5,4,'warlock']], + + stone_zhihuiguan:['female','qun',2,['warrior_tongling'],['minskin','stone'],[3,2,'warrior']], + stone_kuangzhanshi:['male','qun',2,['warrior_baoluan'],['minskin','stone'],[3,1,'warrior']], + stone_zhujiashi:['male','qun',2,['warrior_zhujia'],['minskin','stone'],[2,1,'warrior']], + stone_jiangong:['male','qun',2,['warrior_jiangong'],['minskin','stone'],[2,2,'warrior']], + stone_chidunshinv:['female','qun',4,['warrior_tidun'],['minskin','stone'],[5,4,'warrior']], + stone_yuanhou:['male','qun',2,['chaofeng'],['minskin','stone'],[2,3,'warrior']], + stone_heiyaoyaoshou:['male','qun',4,['warrior_heiyao'],['minskin','stone'],[5,4,'warrior']], + stone_honglongyongshi:['male','qun',2,['warrior_fenyong'],['minskin','stone'],[2,3,'warrior']], + stone_peilianshi:['male','qun',2,['chaofeng','warrior_peilian'],['minskin','stone'],[2,2,'warrior']], + stone_jingyingweishi:['male','qun',3,['stone_chongfeng'],['minskin','stone'],[4,3,'warrior']], + stone_mengmaren:['male','qun',3,['warrior_chuanci'],['minskin','stone'],[4,4,'warrior']], + stone_zhifuzhe:['male','qun',2,['warrior_zhifu'],['minskin','stone'],[3,1,'warrior']], + + stone_daomufeizei:['male','qun',3,['rogue_xunbao'],['minskin','stone'],[4,3,'rogue']], + stone_qiezei:['male','qun',2,['rogue_touqie'],['minskin','stone'],[2,2,'rogue']], + stone_heitieairen:['male','qun',2,['rogue_qiancang'],['minskin','stone'],[4,3,'rogue']], + stone_tegong:['male','qun',2,['rogue_touxi'],['minskin','stone'],[3,3,'rogue']], + stone_haidaotoumu:['male','qun',2,['rogue_zhaomu'],['minskin','stone'],[2,2,'rogue']], + stone_haidao:['male','qun',1,[],['minskin','stone','stonehidden'],[1,2,'rogue']], + stone_cike:['male','qun',1,['rogue_cisha','stone_qianxing'],['minskin','stone'],[1,1,'rogue']], + stone_duyanhaidao:['male','qun',2,['rogue_duxing'],['minskin','stone'],[3,4,'rogue']], + stone_gangtiewushi:['male','qun',2,['rogue_shoudao'],['minskin','stone'],[3,2,'rogue']], + stone_lifaji:['male','qun',2,['rogue_lifa'],['minskin','stone'],[2,2,'rogue']], + stone_shihualong:['male','qun',1,['rogue_fusheng'],['minskin','stone'],[3,2,'rogue']], + stone_xiushuihaidao:['male','qun',1,['rogue_jielue'],['minskin','stone'],[1,2,'rogue']], + stone_zousishangfan:['male','qun',3,['rogue_jiaoyi'],['minskin','stone'],[4,3,'rogue']], + + stone_beijunmushi:['male','qun',2,['priest_shengliao'],['minskin','stone'],[1,1,'priest']], + stone_guanliyuan:['male','qun',2,['priest_faxian'],['minskin','stone'],[2,1,'priest']], + stone_linghunjisi:['female','qun',4,['priest_hunwu'],['minskin','stone'],[4,2,'priest']], + stone_heianjiaotu:['male','qun',3,['priest_zhufu'],['minskin','stone'],[3,2,'priest']], + stone_guangyaozhizi:['male','qun',3,['priest_guangyao'],['minskin','stone'],[5,3,'priest']], + stone_longmianjiaoguan:['male','qun',2,['priest_xundao'],['minskin','stone'],[2,2,'priest']], + stone_shengdianzhishi:['male','qun',4,['priest_puzhao'],['minskin','stone'],[5,4,'priest']], + stone_suoxiaojishi:['male','qun',2,['priest_suoxiao'],['minskin','stone'],[2,2,'priest']], + stone_anyingzisi:['male','qun',3,['priest_shixin'],['minskin','stone'],[4,4,'priest']], + stone_guangmingquan:['male','qun',3,['priest_shengshui'],['minskin','stone'],[2,0,'priest']], + stone_muguangchulong:['male','qun',2,['priest_muguang'],['minskin','stone'],[1,1,'priest']], + stone_shenshengyongshi:['male','qun',3,['priest_shengguang'],['minskin','stone'],[4,3,'priest']], + + stone_zhongshi:['male','wei',1,['stone_zhongshi1'],['minskin','stone'],[1,2]], + stone_zhucangzhe:['male','wei',1,['stone_zhucangzhe1'],['minskin','stone'],[1,2]], + stone_huoqiangshou:['male','wei',3,['stone_huoqiangshou1'],['minskin','stone'],[3,1]], + + stone_lansaizhanshi:['male','shu',1,['stone_chongfeng'],['minskin','stone'],[1,2]], + stone_kutongsiseng:['male','shu',1,['stone_kutongsiseng1'],['minskin','stone'],[1,2]], + stone_yuanguanying:['male','shu',3,['stone_yuanguanying1'],['minskin','stone'],[3,1]], + + stone_dijieshicong:['male','wu',2,['stone_dijieshicong1'],['minskin','stone'],[1,1]], + stone_yaosaishouwei:['male','wu',2,['stone_yaosaishouwei1'],['minskin','stone'],[1,1]], + stone_famingjia:['male','wu',3,['stone_famingjia1'],['minskin','stone'],[3,1]], + + stone_chilundashi:['male','qun',2,['stone_chilundashi1'],['minskin','stone'],[1,1]], + stone_hanguangzhizhe:['male','qun',2,['stone_hanguangzhizhe1'],['minskin','stone'],[2,2]], + stone_aihaozhihun:['male','qun',3,['stone_aihaozhihun1'],['minskin','stone'],[3,1]], + + stone_fennuxiaoji:['male','qun',1,['stone_fennuxiaoji1'],['minskin','stone'],[1,2]], + stone_juxingchanchu:['male','qun',2,['stone_juxingchanchu1'],['minskin','stone'],[2,1]], + stone_wuyi:['male','qun',1,['jijiu'],['minskin','stone'],[2,2]], + stone_langren:['male','qun',1,['stone_qianxing'],['minskin','stone'],[1,2]], + stone_shishigui:['male','qun',2,['stone_shishigui1'],['minskin','stone'],[2,1]], + + stone_fatiaozhuru:['female','qun',1,['stone_fatiaozhuru1'],['minskin','stone'],[1,2]], + stone_mingguangjisi:['female','wu',2,['shushen'],['minskin','stone'],[2,1]], + stone_nianqingjisi:['female','wei',2,['stone_zhufu'],['minskin','stone'],[2,1]], + stone_aomishouwei:['female','qun',1,['biyue'],['minskin','stone'],[2,2]], + stone_yanjingshe:['female','qun',2,['stone_yanjingshe1'],['minskin','stone'],[3,2]], + stone_zhiyuzhe:['female','qun',3,['stone_zhiyu'],['minskin','stone'],[3,1]], + stone_mafengzhuru:['female','qun',1,['stone_mafengzhuru1'],['minskin','stone'],[1,2]], + + stone_shumiao:['none','wu',1,[],['minskin','stone','stonehidden'],[1,1]], + stone_shuren:['none','wu',2,['stone_chongfeng','stone_zibao'],['minskin','stone','stonehidden'],[2,2]], + stone_shurenx:['none','wu',2,[],['minskin','stone','stonehidden'],[2,2]], + stone_shurenxx:['none','wu',2,['chaofeng'],['minskin','stone','stonehidden'],[2,2]], + stone_youlinglang:['none','qun',2,['chaofeng'],['minskin','stone','stonehidden'],[2,2]], + stone_xiaojingling:['none','qun',1,['xuying'],['minskin','stone','stonehidden'],[1,1]], + stone_zhumo:['none','qun',2,[],['minskin','stone','stonehidden'],[2,2]], + stone_jingxiang:['none','qun',2,['stone_jingxiang','chaofeng'],['minskin','stone','stonehidden'],[2,0]], + stone_shengguanghuwei:['female','qun',2,['priest_shengguang'],['minskin','stone','stonehidden'],[1,1]], + stone_liegou:['none','qun',1,['stone_chongfeng'],['minskin','stone','stonehidden'],[1,2]], + stone_mianyang:['none','qun',1,['mage_mianyang'],['minskin','stone','stonehidden'],[1,0]], + stone_qingwa:['none','wu',1,['shaman_qingwa'],['minskin','stone','stonehidden'],[1,0]], + stone_shengjiachong:['none','qun',1,['chaofeng'],['minskin','stone','stonehidden'],[1,1]], + + stone_tuteng1:['none','qun',2,['shaman_tuteng','chaofeng'],['minskin','stone','stonehidden'],[2,0]], + stone_tuteng2:['none','qun',2,['shaman_tuteng','shaman_zhuore'],['minskin','stone','stonehidden'],[2,0]], + stone_tuteng3:['none','qun',2,['shaman_tuteng','shaman_fali'],['minskin','stone','stonehidden'],[2,0]], + stone_tuteng4:['none','qun',2,['shaman_tuteng','shaman_zhiliao'],['minskin','stone','stonehidden'],[2,0]], + stone_xinbing:['none','qun',2,[],['minskin','stone','stonehidden'],[2,0]], + + stone_siwangzhiyi:['male','qun',4,['stone_mieshi'],['minskin','stone','stonehidden','stonelegend'],[6,4]], + stone_alaikesita:['female','qun',4,['stone_fushi'],['minskin','stone','stonehidden','stonelegend'],[6,4]], + stone_yisela:['female','qun',4,['stone_chenshui'],['minskin','stone','stonehidden','stonelegend'],[6,2]], + stone_nuoziduomu:['male','qun',4,['stone_shixu'],['minskin','stone','stonehidden','stonelegend'],[6,4]], + stone_maligousi:['male','qun',4,['stone_mowang'],['minskin','stone','stonehidden','stonelegend'],[6,2]], + + stone_aolajier:['male','qun',4,['stone_chongfeng','shaman_fengnu','paladin_hudun','chaofeng'],['minskin','stone','stonehidden','stonelegend_shaman'],[6,4]], + stone_andongni:['male','qun',4,['stone_zhiyin'],['minskin','stone','stonehidden','stonelegend_mage'],[6,4]], + stone_jialakesi:['male','qun',6,['stone_bianshen'],['minskin','stone','stonehidden','stonelegend_warlock'],[6,0]], + stone_jialakesix:['male','qun',6,['stone_lianyu'],['modeimage','stonehidden','stonespecial']], + stone_kelushi:['male','qun',5,['stone_chongfeng'],['minskin','stone','stonehidden','stonelegend_hunter'],[6,5]], + stone_geluomashi:['male','qun',4,['stone_chongfeng','stone_jinu'],['minskin','stone','stonehidden','stonelegend_warrior'],[6,4]], + stone_aidewen:['male','qun',3,['stone_lianji'],['minskin','stone','stonehidden','stonelegend_rogue'],[6,3]], + stone_sainaliusi:['male','qun',3,['stone_shenyu'],['minskin','stone','stonehidden','stonelegend_druid'],[6,3]], + stone_fuding:['male','qun',3,['paladin_hudun','chaofeng','stone_fuchou'],['minskin','stone','stonehidden','stonelegend_paladin'],[6,3]], + stone_weilun:['male','qun',4,['stone_shenyou'],['minskin','stone','stonehidden','stonelegend_priest'],[6,6]], + } + }, + careerList:['mage','shaman','druid','paladin','rogue','priest','hunter','warrior','warlock'], + game:{ + reserveDead:true, + bannedcards:['lebu','guiyoujie','xietianzi','lingjiandai','jiguanshu','sifeizhenmian','fengxueren','chuansongmen'], + onwash:function(){ + if(_status.mode!='deck') return; + var list=[]; + for(var i=0;i'+i+'',buttons,clickButton); + ui.create.div('.menubutton.round',deckitem).dataset.career=lib.storage.deckList[i].career; + deckitem.name=i; + } + } + for(var i=0;i随机',buttons,clickButton); + ui.create.div('.menubutton.round',deckitem).dataset.career=lib.careerList[i]; + deckitem.name='random:'+lib.careerList[i]; + } + event.dialog.open(); + } + else{ + var bn=parseInt(get.config('battle_number')); + for(var i=0;ib) return 1; + if(a==b) return 0; + return -1; + }); + player.deck=name; + player.career=career; + if(!player.node.career){ + player.node.career=ui.create.div('.menubutton.round.identity',player); + player.node.career.dataset.career=career; + lib.setIntro(player.node.career); + } + if(!player.deckCards) player.deckCards=[]; + for(var i=0;i=2) return 1; + return 0; + } + } + } + }, + spell_linghunhongxi:{ + type:'stonecard', + stoneact:4, + career:'warlock', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + content:function(){ + 'step 0' + target.die(); + 'step 1' + player.recover(); + }, + ai:{ + order:7.5, + value:5, + useful:5, + result:{ + target:function(player,target){ + return -target.hp-target.countCards('h')/2; + } + } + } + }, + spell_fushishu:{ + type:'stonecard', + stoneact:2, + career:'warlock', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&!target.hasSkill('warlock_fushishu'); + }, + content:function(){ + target.addSkill('warlock_fushishu'); + }, + ai:{ + order:7.5, + value:5, + useful:5, + result:{ + target:function(player,target){ + return -target.hp-target.countCards('h')/2; + } + } + } + }, + + spell_fuchoudaji:{ + type:'stonecard', + fullimage:true, + enable:true, + stoneact:3, + career:'warrior', + filterTarget:function(card,player,target){ + return target.isMin(); + }, + selectTarget:-1, + content:function(){ + if(player.hp<=2){ + target.damage(3); + } + else{ + target.damage(); + } + }, + ai:{ + order:8.9, + value:5, + useful:5, + result:{ + target:-1.5 + }, + tag:{ + damage:1, + multitarget:1, + multineg:1, + } + } + }, + spell_yingyongdaji:{ + type:'stonecard', + stoneact:2, + career:'warrior', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.side!=player.side; + }, + content:function(){ + 'step 0' + player.damage(2,target); + 'step 1' + target.damage(2); + }, + ai:{ + order:8, + value:5, + useful:5, + result:{ + target:function(player,target){ + if(player.hujia>=2) return -1.5; + if(player.hujia==1){ + if(player.hp>3) return -1.5; + return 0; + } + return 0; + } + }, + tag:{ + damage:1, + } + } + }, + spell_zhandounuhuo:{ + type:'stonecard', + fullimage:true, + enable:function(event,player){ + for(var i=0;i=2) return -1.5; + } + } + return 0; + }, + tag:{ + damage:1 + } + } + } + }, + + spell_jinyingduijue:{ + type:'stonecard', + stoneact:4, + career:'paladin', + enable:function(card,player){ + var n1=player.countFellow(); + var n2=player.getEnemy().countFellow(); + return n1>0&&n2>0&&n1+n2>2; + }, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + selectTarget:-1, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + if(!targets.length){ + event.finish(); + return; + } + var maxf=[],maxe=[]; + for(var i=0;imaxf[0].hp){ + maxf.length=0; + maxf.push(targets[i]); + } + } + else{ + if(!maxe.length||targets[i].hp==maxe[0].hp){ + maxe.push(targets[i]); + } + else if(targets[i].hp>maxe[0].hp){ + maxe.length=0; + maxe.push(targets[i]); + } + } + } + if(maxf.length){ + targets.remove(maxf.randomGet()); + } + if(maxe.length){ + targets.remove(maxe.randomGet()); + } + targets.sort(lib.sort.seat); + event.targets=targets; + 'step 1' + if(event.targets.length){ + event.targets.shift().die(); + event.redo(); + } + }, + ai:{ + order:9, + value:2, + useful:2, + result:{ + player:function(player,target){ + return player.getEnemy().countFellow()-player.countFellow(); + } + } + } + }, + spell_zhihuizhufu:{ + type:'stonecard', + stoneact:1, + career:'paladin', + enable:function(card,player){ + return !player.isMin(); + }, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&!target.hasSkill('paladin_zhihuizhufu'); + }, + content:function(){ + target.addSkill('paladin_zhihuizhufu'); + target.storage.paladin_zhihuizhufu=player; + }, + ai:{ + order:2, + value:5, + useful:5, + result:{ + player:function(player,target){ + return target.hp; + } + } + } + }, + spell_shenshengfennu:{ + type:'stonecard', + stoneact:5, + career:'paladin', + enable:true, + fullimage:true, + filterTarget:true, + content:function(){ + 'step 0' + event.card=player.getDeckCards()[0]; + player.gain(event.card,'gain2','log'); + 'step 1' + var num=lib.card[event.card.name].stoneact; + if(num&&typeof num=='number'){ + target.damage(num); + } + }, + ai:{ + order:6, + value:2, + useful:2, + result:{ + target:-2 + }, + tag:{ + damage:2 + } + } + }, + spell_yongshizhufu:{ + type:'stonecard', + stoneact:2, + career:'paladin', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&target.countCards('h')>0; + }, + content:function(){ + target.draw(target.countCards('h')); + }, + ai:{ + order:4, + value:2, + useful:2, + result:{ + target:function(player,target){ + return Math.max(0,target.countCards('h')-1); + } + } + } + }, + spell_shenpan:{ + type:'stonecard', + stoneact:2, + career:'paladin', + enable:function(card,player){ + var num=player.getEnemy().countFellow(); + return num>0&&num>=player.countFellow(); + }, + fullimage:true, + notarget:true, + content:function(){ + var target=player.getEnemy().getFellow().randomGet(); + player.line(target); + target.die(); + }, + ai:{ + order:9, + value:4, + useful:4, + result:{ + player:1 + } + } + }, + spell_zhengqianghaosheng:{ + type:'stonecard', + stoneact:2, + career:'paladin', + enable:function(card,player){ + return !player.hasSkill('paladin_zhengqianghaosheng'); + }, + fullimage:true, + filterTarget:function(card,player,target){ + return player==target; + }, + selectTarget:-1, + content:function(){ + player.addSkill('paladin_zhengqianghaosheng'); + }, + ai:{ + order:3, + value:4, + useful:4, + result:{ + player:function(player){ + if(player.countFellow()>=2) return 1; + return 0; + } + } + } + }, + + spell_zhenyanshu:{ + type:'stonecard', + stoneact:1, + career:'priest', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + content:function(){ + target.maxHp++; + target.hp++; + target.update(); + player.drawDeck(); + }, + ai:{ + order:7, + value:3, + useful:3, + result:{ + target:function(player,target){ + return Math.max(1,10-target.hp); + } + } + } + }, + spell_enzeshu:{ + type:'stonecard', + stoneact:3, + career:'priest', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + content:function(){ + target.maxHp+=3; + target.hp+=3; + target.update(); + }, + ai:{ + order:5, + value:3, + useful:3, + result:{ + target:function(player,target){ + return Math.max(1,10-target.hp); + } + } + } + }, + spell_anyingxingtai:{ + type:'stonecard', + stoneact:2, + career:'priest', + chongzhu:true, + enable:function(event,player){ + if(player.career!='priest') return false; + return !player.storage.anyingxingtai||player.storage.anyingxingtai<2; + }, + fullimage:true, + filterTarget:function(card,player,target){ + return player==target; + }, + selectTarget:-1, + content:function(){ + if(typeof player.storage.anyingxingtai!='number'){ + player.storage.anyingxingtai=1; + } + else if(player.storage.anyingxingtai<2){ + player.storage.anyingxingtai=2; + } + player.markSkill('priest_anyingxingtai'); + }, + ai:{ + order:6.1, + value:3, + useful:3, + result:{ + player:1 + } + } + }, + spell_kuaisuzhiliao:{ + type:'stonecard', + stoneact:2, + career:'priest', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + if(player.hasFellowSkill('priest_hunwu')){ + return true; + } + return target.hp=2) return 1; + } + } + return 0; + } + } + } + }, + spell_heiandiyu:{ + fullimage:true, + type:'stonecard', + enable:true, + stoneact:4, + career:'druid', + filterTarget:function(card,player,target){ + return target.isMin(); + }, + multitarget:true, + targetprompt:['增加体力并摸牌'], + selectTarget:[0,1], + notarget:true, + content:function(){ + 'step 0' + if(targets.length){ + targets[0].maxHp++; + targets[0].hp++; + target.update(); + targets[0].draw(3); + event.finish(); + } + else{ + event.num=0; + } + 'step 1' + if(player.canAddFellow()&&event.num++<10){ + player.addFellowAuto('stone_xiaojingling'); + event.redo(); + } + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + return Math.max(1,target.hp-target.countCards('h')); + }, + } + } + }, + spell_ziyang:{ + type:'stonecard', + stoneact:3, + career:'druid', + enable:function(card,player){ + return player.deckCards&&!player.isMin(); + }, + fullimage:true, + filterTarget:function(card,player,target){ + return player==target; + }, + selectTarget:-1, + content:function(){ + 'step 0' + if(player.hasSkill('druid_ziyang')){ + player.drawDeck(3); + event.finish(); + } + else{ + player.chooseControl('获得行动值','摸牌').ai=function(){ + if(player.countCards('h')<=1) return '摸牌'; + return '获得行动值'; + }; + } + 'step 1' + if(result.control=='摸牌'){ + player.drawDeck(3); + } + else{ + player.addSkill('druid_ziyang'); + } + }, + ai:{ + order:1, + value:4, + useful:4, + result:{ + player:1 + } + } + }, + spell_xingchenzhuiluo:{ + type:'stonecard', + fullimage:true, + enable:true, + stoneact:6, + career:'druid', + targetprompt:['造成五点伤害'], + multitarget:true, + filterTarget:function(card,player,target){ + return target.side!=player.side&&target.isMin(); + }, + selectTarget:[0,1], + notarget:true, + content:function(){ + 'step 0' + if(targets.length){ + targets[0].damage(4); + event.finish(); + } + else{ + var list=player.getFellow(true); + if(list.length){ + list.sort(lib.sort.seat); + event.list=list; + player.line(list); + } + else{ + event.finish(); + } + } + 'step 1' + if(event.list.length){ + event.list.shift().damage(2); + event.redo(); + } + }, + ai:{ + order:7, + useful:5, + value:5, + result:{ + target:function(player,target){ + if(target==player.getEnemy()) return -2; + return -1; + } + }, + tag:{ + damage:2 + } + } + }, + spell_fennu:{ + type:'stonecard', + fullimage:true, + enable:true, + stoneact:2, + career:'druid', + filterTarget:function(card,player,target){ + return target.isMin(); + }, + content:function(){ + 'step 0' + player.chooseControl('两点','一点').prompt='造成两点伤害,或造成一点伤害并从牌库中获得一张牌'; + 'step 1' + if(result.control=='一点'){ + target.damage(); + } + else{ + target.damage(2); + event.finish(); + } + 'step 2' + player.drawDeck(); + }, + ai:{ + order:8, + value:5, + useful:5, + result:{ + target:-1 + }, + tag:{ + damage:2, + } + } + }, + spell_fugen:{ + type:'stonecard', + stoneact:2, + career:'druid', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + content:function(){ + 'step 0' + target.die(); + 'step 1' + var list=[]; + for(var i in lib.card){ + if(lib.card[i].stonehidden) continue; + if(lib.card[i].type=='stonecharacter'){ + list.push(i); + } + } + player.getEnemy().gain(game.createCard(list.randomGet()),'draw'); + }, + ai:{ + order:8.8, + value:5, + useful:5, + result:{ + target:function(player,target){ + return -target.hp-target.countCards('h')/2; + } + } + } + }, + + spell_mengun:{ + type:'stonecard', + stoneact:2, + career:'rogue', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&target.side!=player.side; + }, + content:function(){ + 'step 0' + target.die()._triggered=null; + event.name=target.name; + 'step 1' + player.getEnemy().gain(game.createCard(event.name+'_stonecharacter'),'gain2'); + }, + ai:{ + order:8.8, + value:5, + useful:5, + result:{ + target:function(player,target){ + return -target.hp-target.countCards('h')/2; + } + } + } + }, + spell_jipao:{ + type:'stonecard', + stoneact:3, + career:'rogue', + enable:function(card,player){ + return !player.isMin(); + }, + fullimage:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + if(!player.isMin()){ + player.drawDeck(4); + } + }, + ai:{ + order:1, + value:3, + useful:3, + result:{ + player:1 + } + } + }, + spell_beici:{ + type:'stonecard', + stoneact:0, + career:'rogue', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&target.hp==target.maxHp; + }, + content:function(){ + target.loseHp(); + }, + ai:{ + order:9, + result:{ + target:-1 + }, + value:6, + useful:6, + } + }, + spell_weijisifu:{ + type:'stonecard', + stoneact:2, + career:'rogue', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target==player.getEnemy(); + }, + selectTarget:-1, + content:function(){ + if(target.deckCards){ + var cards=[]; + for(var i=0;i<3;i++){ + cards.push(game.createCard('spell_zhumo')); + } + player.$give(cards,target); + for(var i=0;i0; + }, + stoneact:2, + career:'mage', + filterTarget:function(card,player,target){ + return target.side!=player.side&&target.isMin(); + }, + selectTarget:-1, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + if(!targets.length){ + event.finish(); + return; + } + var map=[]; + for(var i=0;i1) return target.hp; + return 0; + } + } + } + }, + spell_shihuawuqi:{ + type:'stonecard', + stoneact:1, + career:'shaman', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&!target.hasSkill('shaman_shihuawuqi'); + }, + content:function(){ + target.addSkill('shaman_shihuawuqi'); + }, + ai:{ + order:4, + value:4, + useful:4, + result:{ + target:function(player,target){ + if(target.isTurnedOver()) return 0; + var num=0; + if(target.hasSkill('shaman_fengnu')){ + num=3; + } + if(target.isMin()) return target.hp+num; + return 1.1; + } + } + } + }, + spell_xianzuzhaohuan:{ + type:'stonecard', + stoneact:2, + career:'shaman', + fullimage:true, + enable:true, + filterTarget:function(card,player,target){ + return !target.isMin(); + }, + multitarget:true, + multiline:true, + selectTarget:-1, + content:function(){ + 'step 0' + if(targets[0]){ + var hs=targets[0].getCards('h',function(card){ + return get.type(card)=='stonecharacter'; + }); + if(hs.length&&targets[0].canAddFellow()){ + targets[0].useCard(targets[0],hs.randomGet(),false).noActCount=true; + } + } + 'step 1' + if(targets[1]){ + var hs=targets[1].getCards('h',function(card){ + return get.type(card)=='stonecharacter'; + }); + if(hs.length&&targets[1].canAddFellow()){ + targets[1].useCard(targets[1],hs.randomGet(),false).noActCount=true; + } + } + }, + ai:{ + order:9, + value:5, + useful:5, + result:{ + player:function(player){ + var hs=player.getCards('h',function(card){ + return get.type(card)=='stonecharacter'; + }); + if(hs.length==0) return 0; + var enemy=player.getEnemy(); + if(enemy.countCards('h')<=1) return 1; + var num=0; + for(var i=0;i=3) return 1; + return 0; + } + } + } + }, + spell_xianzuzhihun:{ + type:'stonecard', + stoneact:2, + career:'shaman', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&!target.hasSkill('shaman_xianzuzhihun'); + }, + content:function(){ + target.addSkill('shaman_xianzuzhihun'); + }, + ai:{ + order:5, + value:4, + useful:4, + result:{ + target:function(player,target){ + if(lib.card[target.name+'_stonecharacter']){ + return lib.card[target.name+'_stonecharacter'].stoneact-1; + } + return 0; + } + } + } + }, + spell_xianzuzhishi:{ + type:'stonecard', + fullimage:true, + enable:true, + stoneact:0, + career:'shaman', + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + player.drawDeck(2); + player.addTempSkill('shaman_xianzuzhishi','phaseAfter'); + }, + ai:{ + order:10, + result:{ + player:1 + } + } + }, + spell_rongyanbaolie:{ + type:'stonecard', + fullimage:true, + enable:true, + stoneact:3, + career:'shaman', + filterTarget:true, + content:function(){ + 'step 0' + target.damage(3,'fire'); + 'step 1' + player.loseHp(); + }, + ai:{ + order:8, + value:6, + useful:5, + result:{ + target:-2 + }, + tag:{ + damage:2, + natureDamage:2, + fireDamage:2, + } + } + }, + + spell_shenshengxinxing:{ + type:'stonecard', + stoneact:5, + career:'priest', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + if(player.hasFellowSkill('priest_hunwu')||target.side!=player.side) return true; + return target.isDamaged(); + }, + selectTarget:-1, + content:function(){ + var num=1; + if(player.hasFellowSkill('stone_shenyou')){ + num=2; + } + if(player.side==target.side){ + if(player.hasFellowSkill('priest_hunwu')){ + target.loseHp(num); + } + else{ + target.recover(num); + } + } + else{ + target.damage(); + } + }, + ai:{ + order:7, + value:5, + useful:5, + result:{ + target:function(player,target){ + if(player.hasFellowSkill('priest_hunwu')) return -1; + if(player.side==target.side) return 1; + return -1; + } + }, + tag:{ + damage:1, + multitarget:1, + multineg:1 + } + } + }, + spell_shengguangzhadan:{ + type:'stonecard', + stoneact:2, + career:'priest', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&target.countCards('h')>0; + }, + selectTarget:-1, + content:function(){ + var num=1; + // if(player.hasFellowSkill('stone_shenyou')){ + // num=2; + // } + target.damage(target.countCards('h')*num); + }, + ai:{ + order:7, + value:5, + useful:5, + result:{ + target:function(player,target){ + return -Math.min(target.countCards('h'),target.hp); + } + }, + tag:{ + damage:1, + multitarget:1, + multineg:1 + } + } + }, + spell_maizang:{ + type:'stonecard', + stoneact:3, + career:'priest', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&target.side!=player.side; + }, + content:function(){ + 'step 0' + target.die()._triggered=null; + 'step 1' + if(player.deckCards){ + player.deckCards.push(game.createCard(target.name+'_stonecharacter')); + } + }, + ai:{ + order:7, + value:5, + useful:5, + result:{ + target:function(player,target){ + return -target.hp-target.countCards('h')/2; + } + } + } + }, + spell_xinlingshijie:{ + type:'stonecard', + stoneact:0, + career:'priest', + enable:function(event,player){ + return player.getEnemy().countCards('h')>0; + }, + fullimage:true, + filterTarget:function(card,player,target){ + return target==player.getEnemy(); + }, + selectTarget:-1, + content:function(){ + var card=target.getCards('h').randomGet(); + if(card){ + player.gain(game.createCard(card.name,card.suit,card.number,card.nature),'draw'); + } + }, + ai:{ + order:9.5, + value:5, + useful:5, + result:{ + player:1 + } + } + }, + spell_naluzhiguang:{ + type:'stonecard', + stoneact:1, + career:'priest', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + if(player.hasFellowSkill('priest_hunwu')){ + return true; + } + return target.hp0; + }, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + content:function(){ + target.damage(player.hujia); + }, + ai:{ + order:7.2, + value:5, + useful:5, + result:{ + target:-1.5, + tag:{ + damage:1 + } + } + } + }, + spell_zhansha:{ + type:'stonecard', + stoneact:1, + career:'warrior', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&target.hp=4) return 1.5; + if(target.hp>=3&&target.countCards('h')=2) return true; + } + } + return false; + }, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + selectTarget:-1, + content:function(){ + 'step 0' + targets.randomRemove(); + targets.sort(lib.sort.seat); + event.list=targets; + 'step 1' + if(event.list.length){ + event.list.shift().die(); + event.redo(); + } + }, + ai:{ + order:9, + value:5, + useful:5, + result:{ + target:-2 + } + } + }, + + spell_lierenyinji:{ + type:'stonecard', + stoneact:0, + career:'hunter', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target.isMin()&&target.maxHp>1; + }, + content:function(){ + target.loseMaxHp(target.maxHp-1); + }, + ai:{ + order:7, + value:5, + useful:5, + result:{ + target:function(player,target){ + return 1-target.hp; + } + } + } + }, + spell_kuaisusheji:{ + type:'stonecard', + stoneact:2, + career:'hunter', + enable:true, + fullimage:true, + filterTarget:true, + content:function(){ + target.damage(); + player.draw(); + }, + ai:{ + order:7, + value:5, + useful:5, + result:{ + target:-1.5, + }, + tag:{ + damage:1 + } + } + }, + spell_guanmenfanggou:{ + type:'stonecard', + stoneact:2, + career:'hunter', + enable:function(event,player){ + return player.getEnemy().countFellow()>0&&player.canAddFellow(); + }, + fullimage:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + 'step 0' + event.num=player.getEnemy().countFellow(); + 'step 1' + if(player.canAddFellow()&&event.num--){ + player.addFellowAuto('stone_liegou'); + event.redo(); + } + }, + ai:{ + order:7, + value:5, + useful:5, + result:{ + target:1 + } + } + }, + spell_zhaohuanchongwu:{ + type:'stonecard', + stoneact:2, + career:'hunter', + enable:function(event,player){ + return player.canAddFellow(); + }, + fullimage:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + player.addFellowAuto(lib.beastList.randomGet()); + }, + ai:{ + order:6, + value:5, + useful:5, + result:{ + player:1 + } + } + }, + spell_zidanshangtang:{ + type:'stonecard', + stoneact:1, + career:'hunter', + enable:true, + fullimage:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + content:function(){ + var list=['spell_lierenyinji','spell_guanmenfanggou','spell_duochongsheji','spell_kuaisusheji','spell_zhaohuanchongwu']; + player.gain(game.createCard(list.randomGet()),'draw'); + player.addTempSkill('hunter_zidanshangtang','phaseAfter'); + }, + ai:{ + order:7.5, + value:5, + useful:5, + result:{ + player:1 + } + } + }, + spell_duochongsheji:{ + type:'stonecard', + fullimage:true, + enable:function(event,player){ + for(var i=0;imaxHp){ + maxHp=game.players[i].hp; + } + } + } + if(list.length<2) return 0; + if(list.length==2&&target.hp>=4) return 0; + if(target.hp>maxHp) return 1; + return target.hp; + } + }, + } + }, + spell_xishengqiyue:{ + type:'stonecard', + fullimage:true, + enable:true, + stoneact:0, + career:'warlock', + filterTarget:function(card,player,target){ + if(!target.isMin()) return false; + if(ui.selected.targets.length){ + return target.side!=ui.selected.targets[0].side; + } + return true; + }, + selectTarget:2, + multitarget:true, + multiline:true, + content:function(){ + targets.sort(lib.sort.seat); + for(var i=0;i=2) return 1; + return 0; + } + }, + } + }, + spell_hengsao:{ + type:'stonecard', + fullimage:true, + enable:true, + stoneact:4, + career:'druid', + filterTarget:function(card,player,target){ + return target.side!=player.side; + }, + content:function(){ + 'step 0' + event.list=[]; + for(var i=0;i0; + }, + stoneact:4, + career:'paladin', + filterTarget:function(card,player,target){ + return target.side!=player.side&&target.isMin(); + }, + selectTarget:-1, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + if(!targets.length){ + event.finish(); + return; + } + var map=[]; + for(var i=0;i1||target.countCards('he')>0); + }, + content:function(){ + "step 0" + target.discard(target.getCards('he')); + "step 1" + if(target.maxHp>2){ + target.loseMaxHp(target.maxHp-2); + } + }, + ai:{ + result:{ + target:function(player,target){ + return Math.min(0,2-target.hp)-target.countCards('h')/2; + } + }, + order:7 + } + }, + spell_morizaihuo:{ + fullimage:true, + type:'stonecard', + enable:true, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + selectTarget:-1, + multiline:true, + multitarget:true, + content:function(){ + 'step 0' + targets.sort(lib.sort.seat); + event.list=targets; + 'step 1' + if(event.list.length){ + event.list.shift().die(); + event.redo(); + } + 'step 2' + player.recover(2) + }, + stoneact:5, + ai:{ + order:9, + result:{ + target:-1, + player:function(player){ + if(player.hp1; + }, + selectTarget:-1, + content:function(){ + target.loseMaxHp(target.maxHp-1); + }, + ai:{ + order:9.1, + result:{ + target:function(player,target){ + if(target.hp>1) return -1; + if(target.maxHp>1) return -0.1; + return 0; + } + } + } + }, + spell_jingshenkongzhi:{ + fullimage:true, + type:'stonecard', + enable:function(event,player){ + if(player.isMin()) return false; + return player.canAddFellow(); + }, + stoneact:6, + filterTarget:function(card,player,target){ + return target.isMin()&&target.side!=player.side; + }, + content:function(){ + target.getLeader().removeFellow(target); + target.side=player.side; + player.addFellow(target); + if(!target.isTurnedOver()){ + target.turnOver(); + } + }, + ai:{ + order:9.5, + result:{ + target:function(player,target){ + return -target.hp; + } + } + } + }, + spell_anyingkuangluan:{ + type:'stonecard', + fullimage:true, + enable:function(event,player){ + if(player.isMin()) return false; + return player.canAddFellow(); + }, + stoneact:4, + filterTarget:function(card,player,target){ + return target.isMin()&&target.side!=player.side; + }, + content:function(){ + target.getLeader().removeFellow(target); + target.side=player.side; + player.addFellow(target); + target.addSkill('spell_anyingkuangluan_die'); + }, + ai:{ + order:9.5, + result:{ + target:function(player,target){ + return -target.hp; + } + } + } + }, + spell_binghuan:{ + fullimage:true, + type:'stonecard', + enable:true, + stoneact:1, + filterTarget:function(card,player,target){ + return target.isMin(); + }, + selectTarget:-1, + content:function(){ + target.turnOver(); + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(target.isTurnedOver()) return 1; + return -1; + } + } + } + }, + spell_zhiliaozhichu:{ + fullimage:true, + type:'stonecard', + enable:true, + stoneact:1, + filterTarget:function(card,player,target){ + return target.isMin()&&target.side==player.side&& + (!target.hasSkill('chaofeng')||target.hp0){ + player.draw(dh); + } + }, + ai:{ + order:7, + value:1, + useful:1, + result:{ + target:function(player,target){ + var ne1=target.countCards('e'),ne2=player.countCards('e'); + var nh1=target.countCards('h'),nh2=player.countCards('h'); + if(nh10){ + target.discard(target.getCards('h').randomGets(dh)); + } + }, + ai:{ + order:1, + value:1, + useful:1, + result:{ + target:function(player,target){ + if(target.countCards('he')>=player.countCards('h')) return -1; + return 0; + } + } + } + }, + }, + skill:{ + stone_mieshi:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;i=player.maxHp-1) return [0,0]; + } + } + } + }, + stone_lianyu:{ + mark:true, + intro:{ + content:function(storage){ + return '地狱火的初始手牌数和体力值为'+(storage+2); + } + }, + ai:{ + threaten:function(player,target){ + return 1+target.storage.stone_lianyu; + }, + } + }, + stone_lianji:{ + trigger:{global:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + return event.player.side==player.side&&event.source!=player; + }, + content:function(){ + player.maxHp++; + player.hp++; + player.update(); + player.draw(); + }, + ai:{ + threaten:2 + } + }, + stone_shenyu:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + 'step 0' + var target=player.getLeader(); + var next=target.chooseControl('召唤树人','增强随从'); + next.prompt='召唤两个嘲讽树人,或令所有其他随从增加一点体力和体力上限并摸两张牌'; + next.ai=function(){ + if(target.countFellow()<=2) return '召唤树人'; + return '增强随从'; + } + 'step 1' + if(result.control=='增强随从'){ + var targets=player.getLeader().getFellow(); + targets.remove(player); + for(var i=0;i0; + }, + content:function(){ + player.addSkill('stone_chongfeng'); + if(player.isTurnedOver()){ + player.turnOver(); + } + } + }, + warrior_peilian:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;i1) return true; + } + return false; + }, + content:function(){ + "step 0" + event.chooser=player.getLeader(); + event.chooser.chooseTarget('缩小:令一名随从减少两点体力上限',function(card,playerx,target){ + return player!=target&&target.isMin()&&target.maxHp>1; + }).ai=function(target){ + if(get.attitude(player,target)>=0) return 0; + if(target.hp==1) return 0.01; + if(target.maxHp-target.hp>=2) return 0.01; + if(target.maxHp-target.hp==1){ + if(target.hp==2) return 1; + return 0.1; + } + switch(target.hp){ + case 1:return 0.01; + case 2:return 1; + case 3:return 2; + case 4:return 1.5; + case 5:return 1; + default:return 0.8; + } + }; + player.line(event.chooser); + "step 1" + if(result.bool){ + event.chooser.line(result.targets[0]); + result.targets[0].maxHp-=2; + if(result.targets[0].maxHp<1){ + result.targets[0].maxHp=1; + } + result.targets[0].update(); + } + } + }, + priest_shixin:{ + trigger:{global:'useSkillAfter'}, + forced:true, + unique:true, + filter:function(event,player){ + return event.career&&event.player.side==player.side; + }, + content:function(){ + 'step 0' + var target=player.getLeader(); + target.damage(); + player.line(target,'green'); + 'step 1' + var target=player.getEnemy(); + target.damage(); + player.line(target,'green'); + } + }, + priest_shengshui:{ + trigger:{player:'phaseBegin'}, + unique:true, + forced:true, + filter:function(event,player){ + for(var i=0;i0; + }, + content:function(){ + player.maxHp++; + player.hp++; + player.update(); + } + }, + + hunter_mishi:{ + trigger:{global:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + return event.player.side==player.side&&event.source!=player; + }, + content:function(){ + player.draw(); + } + }, + hunter_muyang:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + return player.getLeader().countFellow()>1&&player.getLeader().canAddFellow(); + }, + content:function(){ + var num=player.getLeader().countFellow()-1; + var list=[]; + for(var i in lib.character){ + if(lib.character[i][4].contains('stone')&& + !lib.character[i][4].contains('stonehidden')&& + lib.character[i][5]&&lib.character[i][5][0]==num){ + list.push(i); + } + } + var target=player.getLeader(); + if(list.length){ + target.addFellowAuto(list.randomGet()); + } + } + }, + hunter_juji:{ + unique:true + }, + hunter_dusha:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + 'step 0' + var list=[]; + var target=player.getLeader(); + for(var i=0;i0; + }, + content:function(){ + "step 0" + event.chooser=player.getLeader(); + event.chooser.chooseToDiscard('是否弃置一张装备牌令'+get.translation(player)+'摸三张牌?', + 'he',function(card){ + return get.type(card)=='equip'; + }).ai=function(card){ + return 7-get.value(card); + }; + "step 1" + if(result.bool){ + player.draw(3); + } + } + }, + rogue_jielue:{ + trigger:{global:'equipEnd'}, + unique:true, + forced:true, + filter:function(event,player){ + return event.player.side==player.side&&get.subtype(event.card)=='equip1'; + }, + content:function(){ + player.draw(2); + }, + ai:{ + threaten:1.3 + } + }, + rogue_fusheng:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;i1){ + return true; + } + } + }, + content:function(){ + var num=1; + for(var i=0;inum){ + num=game.players[i].hp; + } + } + player.hp=num; + player.maxHp=num; + player.update(); + } + }, + rogue_lifa:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + 'step 0' + var target=player.getLeader(); + if(target.getEquip(1)){ + target=target.getEnemy(); + player.line(target,'green'); + target.damage(); + } + else{ + player.line(target,'green'); + var equip1=get.cardPile(function(card){ + return get.subtype(card)=='equip1'; + }); + if(!equip1){ + equip1=game.createCard('qingnang'); + } + target.equip(equip1); + } + } + }, + rogue_shoudao:{ + trigger:{global:'phaseEnd'}, + forced:true, + direct:true, + filter:function(event,player){ + return event.player==player.getLeader()&&event.player.countFellow()>1; + }, + content:function(){ + 'step 0' + var players=get.players(); + var targets=[]; + for(var i=0;i1){ + return true; + } + } + return false; + }, + content:function(){ + "step 0" + var list=[]; + for(var i=0;i1){ + list.push(game.players[i]); + } + } + list.sort(lib.sort.seat); + event.list=list; + "step 1" + if(event.list.length){ + var current=event.list.shift(); + current.damage(2); + player.line(current,'green'); + event.redo(); + } + } + }, + paladin_tuxi:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + var leader=player.getLeader(); + return leader.hp2){ + return get.attitude(event.chooser,target)*(2-target.maxHp)/100; + } + return get.attitude(event.chooser,target)*(2-target.hp); + }; + player.line(event.chooser); + "step 1" + if(result.bool){ + event.chooser.line(result.targets[0]); + result.targets[0].hp=2; + result.targets[0].maxHp=2; + result.targets[0].update(); + } + } + }, + paladin_baowei:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;i0&&player.getEnemy().hasFellow(); + }, + content:function(){ + 'step 0' + var num=player.getLeader().countCards('e'); + var map=[]; + var targets=player.getEnemy().getFellow(); + event.targets=targets; + for(var i=0;i1; + }, + content:function(){ + var target=player.getLeader(); + var num=target.countFellow(); + if(num>1){ + target.actused-=num-1; + target.updateActCount(); + } + } + }, + druid_qicheng:{ + trigger:{player:'dieBegin'}, + forced:true, + unique:true, + content:function(){ + player.getLeader().addSkill('druid_qicheng2'); + }, + ai:{ + threaten:0.8 + } + }, + druid_qicheng2:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.player.hasSkill('druid_qicheng'); + }, + content:function(){ + game.delay(); + var list=[]; + for(var i in lib.character){ + if(lib.character[i][4].contains('stone')&& + !lib.character[i][4].contains('stonehidden')&& + lib.character[i][5]&&lib.character[i][5][0]==1){ + list.push(i); + } + } + player.addFellowAuto(list.randomGet()); + player.removeSkill('druid_qicheng2'); + } + }, + druid_renya:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + 'step 0' + player.getLeader().chooseControl('冲锋','潜行').ai=function(){ + if(Math.random()<0.5) return '潜行'; + return '冲锋'; + } + 'step 1' + if(result.control=='潜行'){ + player.maxHp++; + player.hp++; + player.update(); + player.addSkill('stone_qianxing'); + } + else{ + player.draw(); + player.addSkill('stone_chongfeng'); + if(player.isTurnedOver()){ + player.turnOver(); + } + } + } + }, + druid_yuehuo:{ + trigger:{global:'damageBegin'}, + forced:true, + unique:true, + filter:function(event){ + return event.card&&get.type(event.card)=='trick'&&event.notLink(); + }, + content:function(){ + trigger.num++; + }, + }, + + shaman_anhun:{ + trigger:{global:'dieAfter'}, + forced:true, + unique:true, + filter:function(event,player){ + return event.player.side==player.side; + }, + content:function(){ + player.line(player.getLeader(),'green'); + player.getLeader().drawDeck(); + } + }, + shaman_zoushi:{ + trigger:{global:'useCardAfter'}, + direct:true, + unique:true, + filter:function(event,player){ + return get.type(event.card)=='stonecharacter'&&event.player==player.getLeader(); + }, + content:function(){ + if(!player.storage.shaman_zoushi){ + player.storage.shaman_zoushi=true; + } + else{ + var list=[]; + for(var i=0;i3) num=3; + player.actused-=num; + player.updateActCount(); + player.removeSkill('spell_sijidaifa'); + } + }, + shaman_qingwa:{ + trigger:{player:'phaseDrawBefore'}, + forced:true, + unique:true, + popup:false, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + threaten:0.1 + } + }, + stone_jingxiang:{ + trigger:{player:'phaseDrawBefore'}, + forced:true, + unique:true, + popup:false, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card){ + if(card.name=='bingliang') return 0; + } + }, + noPhaseDelay:1 + } + }, + mage_mianyang:{ + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; + } + }, + ai:{ + threaten:0.1 + } + }, + priest_xundao:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + return player.getLeader().countCards('h',{type:'stonecharacter'})>0; + }, + content:function(){ + player.draw(); + player.addSkill('chaofeng'); + } + }, + priest_guangyao:{ + trigger:{player:'changeHp'}, + forced:true, + unique:true, + filter:function(event){ + return event.num!=0; + }, + content:function(){ + player.draw(Math.abs(trigger.num)); + }, + }, + priest_zhufu:{ + trigger:{player:'dieBegin'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;i0; + }, + content:function(){ + "step 0" + event.chooser=player.getLeader(); + event.chooser.chooseCardTarget({ + position:'e', + filterTarget:function(card,player,target){ + return player.side!=target.side; + }, + filterCard:true, + ai1:function(card){ + return 9-get.value(card); + }, + ai2:function(target){ + return get.damageEffect(target,player,player); + }, + prompt:'偷袭:弃置一张装备区内的牌并对一名敌方角色一点伤害' + }); + player.line(event.chooser); + "step 1" + if(result.bool){ + event.chooser.discard(result.cards); + event.chooser.line(result.targets[0]); + result.targets[0].damage(event.chooser); + } + } + }, + rogue_qiancang:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;i0; + }).ai=function(target){ + return target.countCards('he'); + }; + player.line(event.chooser); + "step 1" + if(result.bool){ + event.chooser.line(result.targets[0]); + game.delay(); + result.targets[0].discard(result.targets[0].getCards('he')); + } + } + }, + paladin_zhaochao:{ + trigger:{global:'useSkillAfter'}, + forced:true, + unique:true, + filter:function(event,player){ + return event.career&&event.player.side==player.side; + }, + content:function(){ + player.draw(2); + } + }, + paladin_buji:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;i1) return 'discard_card'; + return '造成伤害'; + }; + event.chooser.line(event.target); + game.delay(); + } + else{ + event.finish(); + } + "step 2" + if(result.control=='造成伤害'){ + event.target.damage(event.chooser); + } + else{ + event.target.discard(event.target.getCards('h')); + if(event.target.maxHp>2){ + event.target.loseMaxHp(event.target.maxHp-2); + } + } + } + }, + druid_yexingchengzhang:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + mark:true, + intro:{ + content:'下个出牌阶段开始时获得三点额外行动值', + }, + content:function(){ + player.actused-=3; + player.updateActCount(); + player.removeSkill('druid_yexingchengzhang'); + } + }, + druid_ziyang:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + mark:true, + intro:{ + content:'下个出牌阶段开始时获得四点额外行动值', + }, + content:function(){ + player.actused-=4; + player.updateActCount(); + player.removeSkill('druid_ziyang'); + } + }, + druid_chengzhang:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + var target=player.getLeader(); + target.actused--; + target.updateActCount(); + }, + group:'druid_chengzhang2' + }, + druid_chengzhang2:{ + trigger:{player:'dieBegin'}, + forced:true, + unique:true, + content:function(){ + player.getLeader().addSkill('druid_chengzhang3'); + } + }, + druid_chengzhang3:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.player.hasSkill('druid_chengzhang'); + }, + content:function(){ + if(player.countCards('h')){ + game.delay(); + player.chooseToDiscard('h',true); + } + player.removeSkill('druid_chengzhang3'); + } + }, + shaman_xueju:{ + trigger:{global:'useCard'}, + forced:true, + unique:true, + filter:function(event,player){ + return get.type(event.card)=='stonecharacter'&&event.player==player.getLeader(); + }, + content:function(){ + player.draw(); + } + }, + shaman_huoxi:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;iplayer.actcount) return false; + if(player.storage.anyingxingtai) return false; + return true; + }, + usable:1, + prompt:function(event){ + if(event.player.hasFellowSkill('priest_hunwu')) return '令目标流失一点体力'; + return '回复一点体力'; + }, + filterTarget:function(card,player,target){ + if(player.hasFellowSkill('priest_hunwu')) return true; + return target.hpplayer.actcount) return false; + if(!player.storage.anyingxingtai) return false; + return true; + }, + usable:1, + prompt:function(event,player){ + return '造成'+get.cnNumber(_status.event.player.storage.anyingxingtai)+'点伤害'; + }, + filterTarget:true, + content:function(){ + player.actused+=2; + player.updateActCount(); + event.parent.career='priest'; + var num=1; + // if(player.hasFellowSkill('stone_shenyou')){ + // num=2; + // } + target.damage(player.storage.anyingxingtai*num); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target); + } + } + } + }, + _mage_skill:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.career!='mage') return false; + if(player.getActCount()+2>player.actcount) return false; + return true; + }, + usable:1, + line:'fire', + filterTarget:function(card,player,target){ + return !target.career; + }, + content:function(){ + player.actused+=2; + player.updateActCount(); + target.damage('fire'); + event.parent.career='mage'; + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target,'fire'); + } + } + } + }, + _warlock_skill:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.hasSkill('stone_lianyu')) return false; + if(player.career!='warlock') return false; + if(player.getActCount()+2>player.actcount) return false; + return true; + }, + usable:1, + content:function(){ + player.actused+=2; + player.updateActCount(); + player.drawDeck(2); + event.parent.career='warlock'; + }, + ai:{ + order:0.5, + result:{ + player:1 + } + } + }, + _warlock_skillx:{ + enable:'phaseUse', + filter:function(event,player){ + if(!player.hasSkill('stone_lianyu')) return false; + if(player.career!='warlock') return false; + if(player.getActCount()+2>player.actcount) return false; + if(!player.canAddFellow()) return false; + return true; + }, + usable:1, + content:function(){ + 'step 0' + player.actused+=2; + player.updateActCount(); + event.parent.career='warlock'; + player.addFellowAuto('stone_diyuhuox'); + 'step 1' + var num=player.storage.stone_lianyu; + if(num&&get.itemtype(result)=='player'){ + result.maxHp+=num; + result.hp+=num; + result.directgain(get.cards(num)); + } + }, + ai:{ + order:0.5, + result:{ + player:1 + } + } + }, + _hunter_skill:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.career!='hunter') return false; + if(player.getActCount()+2>player.actcount) return false; + return true; + }, + usable:1, + prompt:function(event){ + if(event.player.hasFellowSkill('hunter_juji')) return '造成一点伤害'; + return '对敌方主将造成一点伤害'; + }, + selectTarget:function(){ + if(_status.event.player.hasFellowSkill('hunter_juji')) return 1; + return -1; + }, + filterTarget:function(card,player,target){ + if(player.hasFellowSkill('hunter_juji')) return target!=player; + return target.career&&target.side!=player.side; + }, + content:function(){ + player.actused+=2; + player.updateActCount(); + target.damage(); + event.parent.career='hunter'; + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + return get.damageEffect(target,player,target); + } + } + } + }, + _warrior_skill:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.hujia>=3) return false; + if(player.career!='warrior') return false; + if(player.getActCount()+2>player.actcount) return false; + return true; + }, + usable:1, + content:function(){ + player.actused+=2; + player.updateActCount(); + player.changeHujia(1); + event.parent.career='warrior'; + }, + ai:{ + order:2, + result:{ + player:1 + } + } + }, + _rogue_skill:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.career!='rogue') return false; + if(player.getActCount()+2>player.actcount) return false; + return true; + }, + usable:1, + content:function(){ + 'step 0' + player.actused+=2; + player.updateActCount(); + var equip1=get.cardPile(function(card){ + return get.subtype(card)=='equip1'; + }); + if(!equip1){ + equip1=game.createCard('qingnang'); + } + var equip4=get.cardPile(function(card){ + return get.type(card)=='equip'&&get.subtype(card)!='equip1'; + }); + if(!equip4){ + equip4=game.createCard('chitu'); + } + player.$gain(equip1); + setTimeout(function(){ + player.$gain(equip4); + },250); + game.delay(); + event.equip1=equip1; + event.equip4=equip4; + 'step 1' + player.equip(event.equip1); + game.delay(0.5); + 'step 2' + player.equip(event.equip4); + event.parent.career='rogue'; + }, + ai:{ + order:function(skill,player){ + if(!player.getEquip(1)&&player.countCards('e')<2){ + if(player.countCards('h','sha')&&player.getActCount()+3<=player.actcount){ + return 4; + } + return 0.1; + } + return 0; + }, + result:{ + player:function(player){ + if(player.countCards('e')<=2) return 1; + return 0; + } + } + } + }, + _druid_skill:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.career!='druid') return false; + if(player.getActCount()+2>player.actcount) return false; + return lib.filter.cardEnabled({name:'sha'},player); + }, + usable:1, + filterTarget:function(card,player,target){ + return player.canUse('sha',target,null,false); + }, + direct:true, + content:function(){ + player.actused+=2; + player.updateActCount(); + player.useCard({name:'sha'},targets,'_druid_skill',false).animate=false; + event.parent.career='druid'; + }, + ai:{ + order:function(){ + return get.order({name:'sha'})-0.1; + }, + result:{ + target:function(player,target){ + return get.effect(target,{name:'sha'},player,target); + } + } + } + }, + shaman_tuteng:{ + trigger:{player:'phaseDrawBefore'}, + forced:true, + popup:false, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + effect:{ + target:function(card){ + if(card.name=='bingliang') return 0; + } + }, + noPhaseDelay:1 + } + }, + shaman_zhiliao:{ + trigger:{player:'phaseEnd'}, + forced:true, + direct:true, + content:function(){ + 'step 0' + var players=get.players(); + var targets=[]; + for(var i=0;iplayer.actcount) return false; + return true; + }, + usable:1, + content:function(){ + player.actused+=2; + player.updateActCount(); + var name='stone_tuteng'+Math.ceil(Math.random()*4); + player.addFellowAuto(name); + event.parent.career='shaman'; + }, + ai:{ + order:2, + result:{ + player:1 + } + } + }, + _paladin_skill:{ + enable:'phaseUse', + filter:function(event,player){ + if(player.career!='paladin') return false; + if(!player.canAddFellow()) return false; + if(player.getActCount()+2>player.actcount) return false; + return true; + }, + usable:1, + content:function(){ + player.actused+=2; + player.updateActCount(); + player.addFellowAuto('stone_xinbing'); + event.parent.career='paladin'; + }, + ai:{ + order:2, + result:{ + player:1 + } + } + }, + chaofeng:{ + mark:true, + intro:{ + content:'已获得嘲讽' + } + }, + _chaofeng:{ + mod:{ + targetEnabled:function(card,player,target){ + if(target.hasSkill('chaofeng')) return; + if(card.name=='sha'){ + for(var i=0;i0; + }).ai=function(target){ + return target.countCards('he'); + }; + player.line(event.chooser); + "step 1" + if(result.bool){ + event.chooser.line(result.targets[0]); + game.delay(); + result.targets[0].discard(result.targets[0].getCards('he')); + } + } + }, + stone_huoqiangshou1:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + filter:function(event,player){ + for(var i=0;i0; + }, + content:function(){ + var enemy=player.getEnemy(); + var es=enemy.getCards('e'); + if(es.length){ + player.getLeader().line(enemy); + game.delay(); + enemy.discard(es.randomGet()); + // game.log(get.translation(event.enemy)+'将'+get.translation(es)+'收入手牌') + } + } + }, + stone_yaosaishouwei1:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + player.getLeader().addTempSkill('stone_yaosaishouwei2','phaseAfter'); + } + }, + stone_yaosaishouwei2:{ + mod:{ + maxHandcard:function(player,num){ + return num+2; + } + }, + }, + stone_famingjia1:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + player.getLeader().draw(2); + } + }, + stone_chilundashi1:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + player.addSkill('stone_chilundashi2'); + } + }, + stone_chilundashi2:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + trigger.num++; + player.removeSkill('stone_chilundashi2'); + } + }, + stone_hanguangzhizhe1:{ + trigger:{source:'fellow'}, + forced:true, + unique:true, + content:function(){ + var targets=[]; + for(var i=0;i0&&num>=player.getLeader().countFellow(); + }, + content:function(){ + var list=[]; + for(var i=0;i=player.getLeader().countFellow(); + }, + content:function(){ + "step 0" + event.chooser=player.getEnemy(); + event.chooser.chooseTarget('毒噬:选择己方一名随从令其死亡',function(card,playerx,target){ + return target.isMin()&&target.side!=player.side; + },true).ai=function(target){ + return -target.hp; + }; + player.line(event.chooser); + "step 1" + if(result.bool){ + event.chooser.line(result.targets[0]); + game.delay(); + result.targets[0].die(); + } + } + }, + stone_mafengzhuru1:{ + trigger:{player:'dieBegin'}, + forced:true, + filter:function(event){ + return event.source&&event.source.isMin(); + }, + content:function(){ + trigger.source.addSkill('stone_mafengzhuru2'); + }, + }, + stone_mafengzhuru2:{ + trigger:{global:'dieAfter'}, + forced:true, + popup:false, + unique:true, + filter:function(event,player){ + return player.hasSkill('stone_mafengzhuru2'); + }, + content:function(){ + player.loseHp(); + player.removeSkill('stone_mafengzhuru2'); + } + }, + stone_zhufu:{ + trigger:{global:'phaseEnd'}, + forced:true, + unique:true, + filter:function(event,player){ + if(event.player!=player.getLeader()) return false; + for(var i=0;iplayer.actcount) return false; + } + }, + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + priority:15, + filter:function(event,player){ + return !player.isMin(); + }, + content:function(){ + player.actused=0; + if(player.side){ + player.actcount=player.getEnemy().actcount+1; + } + else{ + player.actcount=player.getEnemy().actcount; + if(!_status.actcoin){ + _status.actcoin=true; + player.actused--; + } + } + if(player.actcount>6){ + if(get.config('mana_mode')=='inc'){ + player.actcount=6; + } + else{ + player.actcount-=4; + } + } + player.updateActCount(); + player.getEnemy().updateActCount('outphase'); + } + }, + _actcount2:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + filter:function(event,player){ + return !player.isMin()&&!event.noActCount&&_status.currentPhase==player; + }, + content:function(){ + var stoneact=get.info(trigger.card).stoneact; + if(typeof stoneact==='number'){ + player.actused+=stoneact-1; + } + player.updateActCount(); + } + }, + stonesha:{ + unique:true, + enable:['chooseToUse','chooseToRespond'], + filterCard:{type:'equip'}, + viewAs:{name:'sha'}, + nopop:true, + check:function(){return 1}, + filter:function(event,player){ + return player.countCards('h',{type:'equip'})>0; + }, + viewAsFilter:function(player){ + return player.countCards('h',{type:'equip'})>0; + }, + ai:{ + skillTagFilter:function(player){ + return player.countCards('h',{type:'equip'})>0; + }, + respondSha:true, + order:4, + useful:-1, + value:-1 + } + }, + stoneshan:{ + unique:true, + enable:['chooseToRespond'], + viewAs:{name:'shan'}, + filterCard:{type:['stonecharacter','stonecard']}, + mod:{ + cardEnabled:function(card){ + if(get.type(card)=='stonecard') return false; + }, + cardSavable:function(card){ + if(get.type(card)=='stonecard') return false; + }, + }, + nopop:true, + check:function(){return 1}, + filter:function(event,player){ + return player.countCards('h',{type:['stonecharacter','stonecard']})>0; + }, + viewAsFilter:function(player){ + return player.countCards('h',{type:['stonecharacter','stonecard']})>0; + }, + ai:{ + skillTagFilter:function(player){ + return player.countCards('h',{type:['stonecharacter','stonecard']})>0; + }, + respondShan:true, + order:4, + useful:-1, + value:-1 + } + }, + stonedraw:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + popup:false, + content:function(){ + trigger.num--; + }, + ai:{ + effect:{ + target:function(card){ + if(card.name=='bingliang'){ + return 0.6; + } + } + } + } + }, + _stonerage1:{ + trigger:{player:'damageEnd'}, + forced:true, + popup:false, + content:function(){ + if(player.isMin()){ + player.changeRage(3*trigger.num); + } + else{ + player.changeRage(6*trigger.num); + } + } + }, + _stonerage2:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + if(player.isMin()){ + player.changeRage(10); + } + else{ + player.changeRage(20); + } + } + }, + _stonerage3:{ + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return !player.isMin()&&player.getEnemy().countFellow()>player.countFellow(); + }, + content:function(){ + player.changeRage((player.getEnemy().countFellow()-player.countFellow())*10); + } + }, + _stonerage_add:{ + trigger:{player:'phaseBegin'}, + direct:true, + priority:10, + filter:function(event,player){ + if(!player.canAddFellow()){ + return false; + } + if(player==game.me){ + return _status.friendRage>=100; + } + else if(player==game.me.getEnemy()){ + return _status.enemyRage>=100; + } + return false; + }, + content:function(){ + 'step 0' + var list=[]; + var list2=[]; + for(var i in lib.character){ + if(lib.character[i][4].contains('stonelegend_'+player.career)){ + list.push(i); + } + else if(lib.character[i][4].contains('stonelegend')){ + list2.push(i); + } + } + var dialog=ui.create.dialog('hidden','召唤一名传说随从','
            消耗100怒气值和4点行动值
            ',[list.concat(list2),'character']); + var heilong=false; + var dc=player.getEnemy().countFellow()-player.countFellow(); + if(dc>2){ + heilong=true; + } + else if(dc==2){ + if(player.getEnemy().countFellow()>=3){ + heilong=Math.random()<0.5; + } + else if(player.actcount-player.getActCount()<=0){ + heilong=true; + } + else{ + dc=0; + for(var i=0;i5){ + heilong=true; + } + else{ + heilong=Math.random()<0.3; + } + } + } + var honglong=false; + if(!heilong){ + var num=0; + for(var i=0;i6){ + honglong=true; + } + else if(player.maxHp-player.hp>=3&&player.hp<=2){ + honglong=true; + } + } + player.chooseButton(dialog).ai=function(button){ + if(button.link=='stone_siwangzhiyi'){ + if(heilong) return 3; + return 0; + } + if(button.link=='stone_alaikesita'){ + if(honglong) return 2; + return 0; + } + return Math.random(); + } + 'step 1' + if(result.bool){ + player.$skill(get.translation(result.links[0]),'legend','metal'); + game.delay(2); + event.addname=result.links[0]; + player.changeRage(-100); + player.actused+=4; + player.updateActCount(); + } + else{ + event.finish(); + } + 'step 2' + if(event.addname){ + if(event.addname=='stone_jialakesi'){ + if(player.name=='stone_jialakesix'){ + player.hp=player.maxHp; + player.update(); + player.actused-=4; + player.updateActCount(); + player.storage.stone_lianyu++; + } + else{ + if(player.name2){ + player.storage.stone_lianyu=1; + } + else{ + player.storage.stone_lianyu=0; + } + player.init('stone_jialakesix'); + game.addVideo('reinit2',player,'stone_jialakesix'); + } + player.syncStorage('stone_lianyu'); + var card=game.createCard('stone_jialakesi_stonecharacter'); + card.node.info.remove(); + card.node.addinfo.remove(); + player.$give(card,player); + } + else{ + player.addFellowAuto(event.addname); + } + } + } + } + }, + translate:{ + shaman:'萨满', + mage:'法师', + priest:'牧师', + warrior:'战士', + warlock:'术士', + knight:'死亡骑士', + rogue:'潜行者', + paladin:'圣骑士', + hunter:'猎人', + druid:'德鲁伊', + + stone_siwangzhiyi:'死亡之翼', + stone_alaikesita:'阿莱克萨', + stone_yisela:'伊瑟拉', + stone_nuoziduomu:'诺兹多姆', + stone_maligousi:'玛里苟斯', + stone_aolajier:'奥拉基尔', + stone_andongni:'安东尼', + stone_jialakesi:'加拉克斯', + stone_jialakesix:'加拉克斯', + stone_kelushi:'克鲁什', + stone_geluomashi:'格罗玛什', + stone_aidewen:'艾德温', + stone_sainaliusi:'塞纳留斯', + stone_fuding:'弗丁', + stone_weilun:'维纶', + + stone_fushi:'缚誓', + stone_fushi_info:'你出场时,为所有友方角色回复所有体力值', + stone_mieshi:'灭世', + stone_mieshi_info:'你出场时,对所有其他随从造成两点伤害,然后弃置己方主将的所有手牌', + stone_shixu:'时序', + stone_shixu_info:'你出场的回合内,己方主将获得4点行动值', + stone_chenshui:'沉睡', + stone_chenshui_info:'在你的结束阶段,令己方主将获得一张梦境牌', + stone_mowang:'魔网', + stone_mowang_info:'己方法术对主将伤害+2,对随从伤害+4', + + stone_zhiyin:'指引', + stone_zhiyin_info:'每当己方主将使用一张法术牌,将一张火球术置于其手牌', + stone_bianshen:'变身', + stone_bianshen_info:'你出场时,若己方主将职业为术士,则代之成为新的主将;若己变身,则改为令你召唤的地狱火的初始手牌数和体力值+1', + stone_lianyu:'炼狱', + stone_lianyu_info:'你的职业技能改为召唤一个地狱火', + stone_lianji:'连击', + stone_lianji_info:'每当己方主将召唤一个随从,便增加一点体力和体力上限并摸一张牌', + stone_shenyu:'神谕', + stone_shenyu_info:'你出场时,己方主将可以选择一项:召唤两个嘲讽树人,或令所有其他随从增加一点体力和体力上限并摸两张牌', + stone_fuchou:'复仇', + stone_fuchou_info:'你死亡后,视为己方主将使用了一张复仇之怒', + stone_shenyou:'神佑', + stone_shenyou_info:'己方主将的职业技能和法术的治疗效果翻倍', + stone_jinu:'激怒', + stone_jinu_info:'摸牌阶段,若你己受伤,则额外摸两张牌', + + spell_shenshengxinxing:'神圣新星', + spell_shenshengxinxing_info:'对所有敌方角色造成一点伤害,令所有友方角色回复一点体力', + spell_shengguangzhadan:'圣光炸弹', + spell_shengguangzhadan_info:'对所有随从造成等同于其手牌数的伤害', + spell_maizang:'埋葬', + spell_maizang_info:'令一名敌方随从死亡(不触发死亡技能),并将一张与该随从同名的随从洗入你的牌库', + spell_xinlingshijie:'心灵视界', + spell_xinlingshijie_info:'将一张敌方主将手牌的复制置于你的手牌', + spell_naluzhiguang:'纳鲁之光', + spell_naluzhiguang_info:'恢复一点体力值,若目标仍处于受伤状态,则召唤一名圣光护卫', + spell_zhiliaozhihuan:'治疗之环', + spell_zhiliaozhihuan_info:'令所有随从回复三点体力', + + spell_zhenyanshu:'真言术', + spell_zhenyanshu_info:'令一名随从增加一点体力和体力上限;从牌库中获得一张牌', + spell_enzeshu:'恩泽术', + spell_enzeshu_info:'令一名随从增加三点体力和体力上限', + spell_anyingxingtai:'暗影形态', + priest_anyingxingtai:'暗影形态', + spell_anyingxingtai_info:'你的职业技能改为造成一点伤害,若已进入暗影形态,则改为造成两点伤害', + spell_kuaisuzhiliao:'快速治疗', + spell_kuaisuzhiliao_info:'回复两点体力', + spell_xinlinghanbao:'心灵撼爆', + spell_xinlinghanbao_info:'对敌方主将造成两点伤害', + spell_kongxinshu:'控心术', + spell_kongxinshu_info:'复制敌方牌库中的一张随从,将其置入战场', + + stone_shengguanghuwei:'圣光护卫', + priest_shengguang:'圣光', + priest_shengguang_info:'每当一名随从获得治疗,摸一张牌', + + spell_nuxi:'怒袭', + spell_nuxi_info:'造成一点伤害,获得两点护甲', + spell_dunpaimengji:'盾牌猛击', + spell_dunpaimengji_info:'对一名随从造成等同于你护甲值的伤害', + spell_zhansha:'斩杀', + spell_zhansha_info:'令一名已受伤的敌方随从死亡', + spell_nuhuozhongshao:'怒火中烧', + spell_nuhuozhongshao_info:'对一名随从造成一点伤害,然后令其摸两张牌', + spell_xuanfengzhan:'旋风斩', + spell_xuanfengzhan_info:'对所有随从造成一点伤害', + spell_juemingluandou:'绝命乱斗', + spell_juemingluandou_info:'随机保留一名随从,然后令所有其他随从死亡', + + spell_zhongnian:'重碾', + spell_zhongnian_info:'造成X点伤害,X为已受伤的友方角色数且不超过3', + spell_zhandounuhuo:'战斗怒火', + spell_zhandounuhuo_info:'从牌库中获得X张牌,X为已受伤的友方角色数', + spell_chongfeng:'冲锋', + spell_chongfeng_info:'令一名武将牌背面朝上的友方随从摸三张牌,然后将武将牌翻至正面', + spell_fuchoudaji:'复仇打击', + spell_fuchoudaji_info:'对所有随从造成一点伤害,若你的体力值不大于2,改为造成三点伤害', + spell_kuangbao:'狂暴', + spell_kuangbao_info:'令一名已受伤的友方随从摸四张牌', + spell_yingyongdaji:'英勇打击', + spell_yingyongdaji_info:'令一名敌方角色对你造成两点伤害,然后对其造成两点伤害', + + spell_dubiao:'毒镖', + spell_dubiao_info:'对一名随机敌方角色造成一点伤害', + spell_qiangfengsheji:'强风射击', + spell_qiangfengsheji_info:'对两名敌方随从各造成一点伤害,并弃置其两张手牌', + spell_tanxianmao:'探险帽', + hunter_tanxianmao:'探险帽', + hunter_tanxianmao_info:'你死亡时,将一张探险帽置入主将的手牌', + spell_tanxianmao_info:'令一名友方随从增加一点体力和体力上限并摸一张牌,当该随从死亡时,将一张探险帽置入你的手牌', + spell_shalumingling:'杀戮命令', + spell_shalumingling_info:'造成一点伤害,如果你控制任何野兽,则改为造成两点伤害', + spell_zhuizongshu:'追踪术', + spell_zhuizongshu_info:'从牌库中随机选择三张牌,获得其中的一张', + spell_tianjiangzhuqun:'天降蛛群', + spell_tianjiangzhuqun_info:'召唤三只结网蛛', + + spell_lierenyinji:'猎人印记', + spell_lierenyinji_info:'将一名随从的体力上限降至1', + spell_kuaisusheji:'快速射击', + spell_kuaisusheji_info:'造成一点伤害,摸一张牌', + spell_guanmenfanggou:'关门放狗', + spell_guanmenfanggou_info:'每有一名敌方随从,便召唤一只猎狗', + spell_zhaohuanchongwu:'动物伙伴', + spell_zhaohuanchongwu_info:'随机召唤一只野兽', + spell_zidanshangtang:'子弹上膛', + spell_zidanshangtang_info:'随机获得一张猎人职业法术牌,并获得技能【上膛】直到回合结束', + spell_duochongsheji:'多重射击', + spell_duochongsheji_info:'对两名随机敌方随从各造成两点伤害', + + stone_liegou:'猎狗', + hunter_zidanshangtang:'上膛', + hunter_zidanshangtang_bg:'膛', + hunter_zidanshangtang_info:'每当你使用一张法术牌,便随机获得一张猎人职业法术牌', + + spell_zuzhou:'诅咒', + spell_zuzhou_info:'将目标随从翻面,摸一张牌', + spell_xishengqiyue:'牺牲契约', + spell_xishengqiyue_info:'令双方各一名随从立即死亡', + spell_xiaoguibaopo:'小鬼爆破', + spell_xiaoguibaopo_info:'对一名随从造成1~3点伤害,每造成一点伤害,便召唤一只小鬼', + spell_anyinglieyan:'暗影裂焰', + spell_anyinglieyan_info:'杀死一名友方随从,并对所有敌方随从造成等于其体力值的伤害', + spell_liliangdaijia:'力量代价', + spell_liliangdaijia_info:'令一名友方随从摸4张牌,将体力值变为5,并在其下个回合结束后死亡', + spell_emozhinu:'恶魔之怒', + spell_emozhinu_info:'对所有随从造成两点伤害', + + spell_emozhixin:'恶魔之心', + spell_emozhixin_info:'对一名敌方随从造成四点伤害,或令一名友方随从摸四张牌', + spell_ansezhadan:'暗色炸弹', + spell_ansezhadan_info:'造成两点伤害', + spell_fushishu:'腐蚀术', + warlock_fushishu:'腐蚀', + warlock_fushishu_info:'下个回合结束后死亡', + spell_fushishu_info:'令一名敌方随从于其下个回合结束后死亡', + spell_heianqiyue:'黑暗契约', + spell_heianqiyue_info:'随机令两名敌方随从死亡,随机弃置两张手牌', + spell_linghunhongxi:'灵魂虹吸', + spell_linghunhongxi_info:'令一名随从死亡,回复一点体力', + spell_siwangchanrao:'死亡缠绕', + spell_siwangchanrao_info:'对一名随从造成一点伤害;若该随从死亡,从牌库中获得一张牌', + + spell_wuyashenxiang:'乌鸦神像', + spell_wuyashenxiang_info:'从三张法术牌或随从牌中选择一张加入手牌', + spell_huotigenxu:'活体根须', + spell_huotigenxu_info:'造成一点伤害,或召唤两个树苗', + spell_hengsao:'横扫', + spell_hengsao_info:'对一名敌方角色造成两点伤害,然后对其他敌方角色造成一点伤害', + spell_yexingchengzhang:'野性成长', + spell_yexingchengzhang_info:'下个出牌阶段开始时获得三点额外行动值', + spell_ziranzhili:'自然之力', + spell_ziranzhili_info:'召唤三个自爆树人', + spell_yemanpaoxiao:'野蛮咆哮', + spell_yemanpaoxiao_bg:'咆', + spell_yemanpaoxiao2:'咆哮', + spell_yemanpaoxiao_info:'所有友方角色造成的伤害+1,直到你的下个回合开始', + + spell_conglinzhihun:'丛林之魂', + druid_conglinzhihun:'树魂', + druid_conglinzhihun_info:'你死亡后召唤一个树人', + spell_conglinzhihun_info:'令所有友方随从获得技能树魂(你死亡后召唤一个树人)', + spell_ziyang:'滋养', + spell_ziyang_info:'下个出牌开始阶段获得四点额外行动值,或从牌库中获得三张牌', + spell_fugen:'腐根', + spell_fugen_info:'令一名随从死亡,将一张随机随从置入对手的手牌', + spell_xingchenzhuiluo:'星辰坠落', + spell_xingchenzhuiluo_info:'对一名敌方随从造成五点伤害,或对所有敌方随从造成两点伤害', + spell_fennu:'愤怒', + spell_fennu_info:'对一名随从造成两点伤害,或造成一点伤害并从牌库中获得一张牌', + spell_heiandiyu:'黑暗低语', + spell_heiandiyu_info:'召唤若干个小精灵直到你的随从数达到4;或令一名随从增加一点体力和体力上限并摸三张牌', + + druid_yexingchengzhang:'成长', + druid_yexingchengzhang_bg:'长', + druid_yexingchengzhang_info:'下个出牌阶段开始时获得三点额外行动值', + druid_ziyang:'滋养', + druid_ziyang_bg:'养', + druid_ziyang_info:'下个出牌阶段开始时获得四点额外行动值', + + stone_shumiao:'树苗', + stone_shuren:'自爆树人', + stone_shurenx:'树人', + stone_shurenxx:'嘲讽树人', + stone_zibao:'自爆', + stone_zibao_info:'结合结束后立即死亡', + + spell_cigu:'刺骨', + spell_cigu_info:'造成一点伤害,你可以弃置一张装备区内的牌令伤害+1', + spell_jianrenluanwu:'剑刃乱舞', + spell_jianrenluanwu_info:'弃置你的武器牌,并对所有敌方角色造成一点伤害', + spell_daoshan:'刀扇', + spell_daoshan_info:'对所有敌方随从造成一点伤害,从牌库中获得一张牌', + spell_sijidaifa:'伺机待发', + spell_sijidaifa_info:'你使用下一张法术牌时获得X点行动值,X为该法术的行动值消耗且不超过3', + spell_cisha:'刺杀', + spell_cisha_info:'杀死一名随从', + spell_modaoyou:'磨刀油', + spell_modaoyou_info:'令你下一次剑刃乱舞造成的伤害+1,并与一名随机友方随从各摸两张牌', + + spell_mengun:'闷棍', + spell_mengun_info:'令一名敌方随从死亡(不触发死亡技能),将一张该随从的复制置入对手的手牌', + spell_anzhongpohuai:'暗中破坏', + spell_anzhongpohuai_info:'随机杀死一名敌方随从,随机弃置敌方的一张装备牌', + spell_beici:'背刺', + spell_beici_info:'令一名未受伤的随从流失一点体力', + spell_weijisifu:'危机四伏', + spell_zhumo:'蛛魔', + stone_zhumo:'蛛魔', + spell_zhumo_info:'每当该牌被弃置,为你的对手召唤一只蛛魔', + spell_weijisifu_info:'将三张蛛魔牌洗入对手的牌库;每当一名角色弃置蛛魔牌,为其对手召唤一只蛛魔', + spell_piaoqie:'剽窃', + spell_piaoqie_info:'复制两张对手牌库中的牌加入你的手牌', + spell_jipao:'疾跑', + spell_jipao_info:'从牌库中获得四张牌', + + spell_fengxian:'奉献', + spell_fengxian_info:'对所有敌方角色造成一点伤害', + spell_fuchouzhinu:'复仇之怒', + spell_fuchouzhinu_info:'造成5点伤害,随机分配到所有敌方随从上', + spell_shengliaoshu:'圣疗术', + spell_shengliaoshu_info:'恢复两点体力,摸两张牌', + spell_fennuzhichui:'愤怒之锤', + spell_fennuzhichui_info:'造成一点伤害,从牌库中获得一张牌', + spell_zuozhandongyuan:'作战动员', + spell_zuozhandongyuan_info:'召唤两个新兵,随机装备一把武器', + spell_liliangzhufu:'力量祝福', + spell_liliangzhufu_info:'令一名随从摸两张牌', + + spell_jinyingduijue:'精英对决', + spell_jinyingduijue_info:'双方各保留体力值最高的一名随从,然后令其他随从死亡', + spell_shenpan:'审判', + spell_shenpan_info:'若你的对手随从数不少于你,则随机令一名敌方随从死亡', + spell_shenshengfennu:'神圣愤怒', + spell_shenshengfennu_info:'从牌库中获得一张牌,并造成等同于其行动值消耗的伤害', + spell_yongshizhufu:'勇士祝福', + spell_yongshizhufu_info:'令一名随从的手牌数翻倍', + spell_zhengqianghaosheng:'争强好胜', + paladin_zhengqianghaosheng:'争强好胜', + paladin_zhengqianghaosheng_info:'在你的下一准备阶段,令所有友方随从增加一点体力和体力上限并摸一张牌', + spell_zhengqianghaosheng_info:'在你的下一准备阶段,令所有友方随从增加一点体力和体力上限并摸一张牌', + spell_zhihuizhufu:'智慧祝福', + paladin_zhihuizhufu:'智慧祝福', + spell_zhihuizhufu_info:'选择一名随从,在其每个准备阶段,你从牌库中获得一张牌', + + spell_fengnu:'风怒', + shaman_fengnu:'风怒', + shaman_fengnu_info:'回合结束后,你获得一个额外回合', + spell_fengnu_info:'令一名随从获得技能风怒(回合结束后,你获得一个额外回合)', + spell_rongyanbaolie:'熔岩爆裂', + spell_rongyanbaolie_info:'造成三点火焰伤害,流失一点体力', + spell_shihuawuqi:'石化武器', + shaman_shihuawuqi:'充能', + shaman_shihuawuqi_info:'准备阶段,你摸三张牌', + spell_shihuawuqi_info:'令一名友方随从获得技能充能(准备阶段,你摸三张牌),直到你的下一回合开始', + spell_xianzuzhaohuan:'先祖召唤', + spell_xianzuzhaohuan_info:'双方各将手牌中的一张随机随从牌置入战场', + spell_xianzuzhihun:'先祖之魂', + shaman_xianzuzhihun:'转生', + shaman_xianzuzhihun_info:'你死亡后,召唤一个自身的复制', + spell_xianzuzhihun_info:'令一名随从获得技能转生(你死亡后,召唤一个自身的复制)', + spell_xianzuzhishi:'先祖知识', + shaman_xianzuzhishi:'先祖知识', + shaman_xianzuzhishi_info:'本回合手牌上限-1', + spell_xianzuzhishi_info:'从牌库中获得两张牌,本回合手牌上限-1(多次使用不叠加)', + + spell_lianhuanbaolie:'连环爆裂', + spell_lianhuanbaolie_info:'造成1~2点雷电伤害', + spell_shandianfengbao:'闪电风暴', + spell_shandianfengbao_info:'对所有敌方随从造成1~2点伤害', + spell_yaoshu:'妖术', + spell_yaoshu_info:'将一个随从变成一只青蛙', + spell_yexinglanghun:'野性狼魂', + spell_yexinglanghun_info:'召唤两个幽灵狼', + spell_shixue:'嗜血', + spell_shixue_info:'所有友方随从摸两张牌', + spell_chazhuangshandian:'叉状闪电', + spell_chazhuangshandian_info:'对两个随机敌方随从各造成一点雷电伤害', + + stone_qingwa:'青蛙', + stone_youlinglang:'幽灵狼', + stone_jingxiang:'镜像', + stone_jingxiang_info:'锁定技,你跳过摸牌阶段', + shaman_qingwa:'青蛙', + shaman_qingwa_info:'锁定技,你跳过摸牌阶段', + stone_xiaojingling:'小精灵', + + spell_laojiuhuoba:'老旧火把', + spell_laojiuhuoba_info:'造成一点伤害,将一张炽热火把置入你的牌库', + spell_chirehuoba:'炽热火把', + spell_chirehuoba_info:'造成两点火焰伤害', + spell_canying:'残影', + spell_canying_info:'复制你的所有随从,并将其置入你的手牌', + spell_yanbaoshu:'炎爆术', + spell_yanbaoshu_info:'造成四点火焰伤害(若目标为主将,伤害不能超过目标的当前体力值)', + spell_jingxiang:'镜像', + spell_jingxiang_info:'召唤两个具有嘲讽且摸牌阶段不摸牌的随从', + spell_aoshufeidan:'奥术飞弹', + spell_aoshufeidan_info:'造成3点伤害,随从分配到所有敌方随从上', + spell_hanbingpingzhang:'寒冰屏障', + mage_hanbingpingzhang:'寒冰屏障', + mage_hanbingpingzhang_info:'体力值不能降到2以内', + spell_hanbingpingzhang_info:'令一名角色的体力值不能降到2以内,直到你的下一回合开始', + + spell_hanbingjian:'寒冰箭', + spell_hanbingjian_info:'对一个随从造成两点伤害,然后将其翻面', + spell_lieyanfengbao:'烈焰风暴', + spell_lieyanfengbao_info:'对所有敌方随从造成两点伤害', + spell_baofengxue:'暴风雪', + spell_baofengxue_info:'对所有敌方随从造成一点伤害,然后将其翻面', + spell_aoshuzhihui:'奥术智慧', + spell_aoshuzhihui_info:'从牌库中获得两张牌', + spell_bianxingshu:'变形术', + spell_bianxingshu_info:'将一个随从变成一只绵羊', + spell_huoqiushu:'火球术', + spell_huoqiushu_info:'造成三点火焰伤害(若目标为主将,伤害不能超过目标的当前体力值)', + + stone_mianyang:'绵羊', + mage_mianyang:'绵羊', + mage_mianyang_info:'锁定技,你不能使用杀', + + stone_beijunmushi:'北郡牧师', + stone_guangyaozhizi:'光耀之子', + stone_longmianjiaoguan:'龙眠教官', + stone_linghunjisi:'灵魂祭司', + stone_guanliyuan:'管理员', + stone_heianjiaotu:'黑暗教徒', + + stone_shengdianzhishi:'圣殿执事', + stone_suoxiaojishi:'缩小技师', + stone_anyingzisi:'暗影子嗣', + stone_guangmingquan:'光明泉', + stone_muguangchulong:'暮光雏龙', + stone_shenshengyongshi:'神圣勇士', + + priest_puzhao:'普照', + priest_puzhao_info:'你出场时,己方主将可令一名其他友方随从增加两点体力和体力上限', + priest_suoxiao:'缩小', + priest_suoxiao_info:'你出场时,己方主将可令一名其他随从减少两点体力上限(不能小于1)', + priest_shengshui:'圣水', + priest_shengshui_info:'你跳过摸牌阶段;在你的准备阶段,令一名随机友方角色回复两点体力', + priest_muguang:'暮光', + priest_muguang_info:'你出场时,若主将手牌中有随从牌,则增加一点体力和体力上限', + priest_shixin:'蚀心', + priest_shixin_info:'每当己方主将使用一次职业技能,对双方主将各造成一点伤害', + + priest_shengliao:'圣疗', + priest_shengliao_info:'每当一名随从回复体力,己方主将从牌库中获得一张牌', + priest_guangyao:'光耀', + priest_guangyao_info:'每当你的体力值发生改变,摸一张牌', + priest_xundao:'训导', + priest_xundao_info:'你出场时,若己方主将手牌中有随从牌,则摸一张牌并获得嘲讽', + priest_hunwu:'魂舞', + priest_hunwu_info:'己方主将的职业技能及法术的治疗效果改为令目标流失等量体力', + priest_faxian:'发现', + priest_faxian_info:'你出场时,己方主将从三张随机随从牌中选择一张加入手牌', + priest_zhufu:'献身', + priest_zhufu_info:'你死亡时,令一名随机友方随从增加一点体力和体力上限', + + stone_daomufeizei:'盗墓匪贼', + stone_haidao:'海盗', + stone_haidaotoumu:'海盗头目', + stone_cike:'刺客', + stone_tegong:'特工', + stone_qiezei:'窃贼', + stone_heitieairen:'黑铁矮人', + + stone_duyanhaidao:'独眼海盗', + stone_gangtiewushi:'刚铁武师', + stone_lifaji:'理发机', + stone_shihualong:'石化龙', + stone_xiushuihaidao:'锈水海盗', + stone_zousishangfan:'走私商贩', + + rogue_duxing:'独行', + rogue_duxing_info:'每当敌方主将召唤一名随从,便获得潜行', + rogue_shoudao:'授道', + rogue_shoudao_info:'在己方主将的结束阶段,令一名随机友方随从增加一点体力和体力上限并摸一张牌', + rogue_lifa:'理发', + rogue_lifa_info:'为己方主将装备一把武器,若已有武器,改为对敌方主将造成一点伤害', + rogue_fusheng:'复生', + rogue_fusheng_info:'你出场时,体力值和体力上限变为X,X为场上体力最高的随从的体力值', + rogue_jielue:'劫掠', + rogue_jielue_info:'每当己方主将装备一把武器牌,摸两张牌', + rogue_jiaoyi:'交易', + rogue_jiaoyi_info:'你出场时,己方主将可以弃置一张装备牌令你摸三张牌', + + rogue_touqie:'偷窃', + rogue_touqie_info:'每当你造成一次伤害,己方主将从牌库中获得一张牌', + rogue_xunbao:'寻宝', + rogue_xunbao_info:'你死亡时,将一张伺机行发置于己方主将的手牌', + rogue_cisha:'刺杀', + rogue_cisha_info:'每当你对一名随从造成伤害,受伤害随从立即死亡', + rogue_touxi:'偷袭', + rogue_touxi_info:'你出场时,己方主将可弃置一张装备区内的牌并对一名敌方角色造成一点伤害', + rogue_qiancang:'潜藏', + rogue_qiancang_info:'你出场时,对所有未受伤害的敌方随从造成一点伤害', + rogue_zhaomu:'结伙', + rogue_zhaomu_info:'你出场时,召唤一个海盗', + + stone_zhihuiguan:'指挥官', + stone_jiangong:'监工', + stone_yuanhou:'猿猴', + stone_chidunshinv:'持盾侍女', + stone_zhujiashi:'铸甲师', + stone_kuangzhanshi:'狂战士', + + stone_heiyaoyaoshou:'黑曜妖兽', + stone_honglongyongshi:'红龙勇士', + stone_peilianshi:'陪练师', + stone_jingyingweishi:'精英卫士', + stone_shengjiachong:'圣甲虫', + stone_mengmaren:'猛犸人', + stone_zhifuzhe:'掷斧者', + + warrior_heiyao:'黑曜', + warrior_heiyao_info:'在己方主将的结束阶段,召唤一只圣甲虫', + warrior_peilian:'陪练', + warrior_peilian_info:'你出场时,己方主将可令一名其他随从获得嘲讽', + warrior_fenyong:'奋勇', + warrior_fenyong_info:'你出场时,若己方主将手牌中有随从牌,则获得冲锋', + warrior_chuanci:'穿刺', + warrior_chuanci_info:'每当你对一名敌方随从造成伤害,对另一名随机敌方随从造成等量的伤害', + warrior_zhifu:'掷斧', + warrior_zhifu_info:'每当你受到一次伤害,对敌方主将造成一点伤害', + + warrior_tongling:'统领', + warrior_tongling_info:'每当你召唤一个初始手牌数不大于2的随从,令其获得冲锋', + warrior_baoluan:'暴乱', + warrior_baoluan_info:'每当一名随从受到一次伤害,摸一张牌', + warrior_jiangong:'监工', + warrior_jiangong_info:'你出场时,己方主将可对一名随从造成一点伤害,然后令该随从摸两张牌', + warrior_zhujia:'铸甲', + warrior_zhujia_info:'每当你受到一次伤害,己方主将获得一点护甲', + warrior_tidun:'提盾', + warrior_tidun_info:'你出场时,己方主将获得两点护甲', + + stone_lieyanxiaogui:'烈焰小鬼', + stone_xiaoguishouling:'小鬼首领', + stone_kongjuzhanma:'恐惧战马', + stone_morishouwei:'末日守卫', + stone_xukongxingzhe:'虚空行者', + stone_diyuhuo:'地狱火', + stone_diyuhuox:'地狱火', + stone_xiaogui:'小鬼', + + stone_heishitanfan:'黑市摊贩', + stone_zhaohuanzhe:'召唤者', + stone_meimo:'魅魔', + stone_tongkunvwang:'痛苦女王', + stone_xukongkongmo:'虚空恐魔', + stone_fukongmoyan:'浮空魔眼', + + warlock_anyu:'暗语', + warlock_anyu_info:'你出场时,己方主将从三张随机的行动值消耗为1的牌中选择一张加入手牌', + warlock_zhaohuan:'召唤', + warlock_zhaohuan_info:'你死亡时,将手牌中的一张随机随从牌置入战场', + warlock_huanmeng:'幻梦', + warlock_huanmeng_info:'你出场时,己方主将随机弃置一张手牌', + warlock_tongku:'痛苦', + warlock_tongku_info:'每当你造成一次伤害,令己方主将回复一点体力', + warlock_tunshi:'吞噬', + warlock_tunshi_info:'你出场时,己方主将须令一名其他友方随从死亡,然后你获得其全部的手牌和体力值', + warlock_shijie:'视界', + warlock_shijie_info:'每当己方主将受到一次伤害,你增加一点体力和体力上限并摸一张牌', + + warlock_nonghuo:'弄火', + warlock_nonghuo_info:'你出场时,对己方主将造成1点火焰伤害', + warlock_zhaogui:'召鬼', + warlock_zhaogui_info:'每当你受到一次伤害,召唤一个小鬼', + warlock_yongsheng:'永生', + warlock_yongsheng_info:'你死亡后,召唤一匹恐惧战马', + warlock_yuhuo:'狱火', + warlock_yuhuo_info:'你出场时,对所有其他随从造成一点伤害', + warlock_zaihuo:'灾祸', + warlock_zaihuo_info:'你出场时,随机弃置主将的两张手牌', + + stone_hudunren:'护盾人', + stone_junxuguan:'军需官', + stone_yurenqishi:'鱼人骑士', + stone_chidunweishi:'持盾卫士', + stone_liewangshouwei:'列王守卫', + stone_longwangpeiou:'龙王配偶', + + stone_baoweizhe:'保卫者', + stone_guiqishi:'龟骑士', + stone_shenmiqishou:'神秘骑手', + stone_shixiangweishi:'石像卫士', + stone_xuefanzhanshi:'血帆战士', + stone_xunmashi:'训马师', + + paladin_baowei:'保卫', + paladin_baowei_info:'你出场时,己方主将可令一名其他随从获得一点护甲', + paladin_tuxi:'吐息', + paladin_tuxi_info:'你出场时,己方主将进行一次判定,若为红色,则回复一点体力', + paladin_miying:'秘影', + paladin_miying_info:'你出场时,依次将牌堆中的所有不重名的判定牌置入敌方主将的判定区', + paladin_huashi:'化石', + paladin_huashi_info:'你出场时,己方主将可将一名其他随从的体力值及体力上限变为2', + paladin_jinghua:'净化', + paladin_jinghua_info:'你出场时,对所有手牌数大于1的随从造成两点伤害', + paladin_moma:'秣马', + paladin_moma2:'秣马', + paladin_moma_info:'所有友方新兵摸牌阶段摸牌数+1', + + paladin_zhaohuan:'召唤', + paladin_zhaohuan2:'召唤', + paladin_zhaohuan_info:'你出场后,你的主将在使用下一张随从牌时获得两点行动值', + paladin_shouwei:'守卫', + paladin_shouwei_info:'你出场时,你的主将回复两点体力值', + paladin_chidun:'持盾', + paladin_chidun_info:'你出场时,己方主将可以弃置对方一名随从的所有牌', + paladin_buji:'补给', + paladin_buji_info:'你出场时,所有友方新兵增加一点体力和体力上限并摸两张牌', + paladin_hudun:'护盾', + paladin_hudun_info:'你出场时,获得一点护甲值', + paladin_zhaochao:'招潮', + paladin_zhaochao_info:'每当你的主将使用一次英雄技能,便摸两张牌', + + stone_shifazhe:'嗜法者', + stone_wushixuetu:'巫师学徒', + stone_shuiyuansu:'水元素', + stone_falifulong:'法力浮龙', + stone_yingxiongzhihun:'英雄之魂', + stone_huoyao:'火妖', + + stone_aoshushi:'奥术师', + stone_faqishi:'法骑士', + stone_fuhuokaijia:'复活铠甲', + stone_kaodalalong:'考达拉龙', + stone_yanshushi:'炎术士', + stone_xulingwushi:'虚灵巫师', + + mage_aoshu:'奥术', + mage_aoshu_info:'你出场时,将一张奥术智慧置入主将的手牌', + mage_jili:'激励', + mage_jili_info:'每当主将使用一次职业技能,摸一张牌', + mage_gushou:'固守', + mage_gushou_info:'每当己方主将受到多于1伤害时,防止其余伤害', + mage_yufa:'驭法', + mage_yufa_info:'每当己方主将使用一次职业技能,令其获得一点行动值', + mage_yanshu:'炎术', + mage_yanshu_info:'你出场时,造成X点火焰伤害,随机分配到敌方随从上,X为己方主将装备区内装备牌的数量', + mage_pingxu:'冯虚', + mage_pingxu_info:'你出场时,己方主将从三张随机法术牌中选择一张加入手牌', + + mage_shifa:'嗜法', + mage_shifa_info:'你出场时,将一张随机法术牌置入双方主将的手牌', + mage_minghuo:'冥火', + mage_minghuo_info:'你的主将的职业技能造成的伤害+1', + mage_tunfa:'吞法', + mage_tunfa_info:'每当己方主将使用一张法术牌,摸一张牌', + mage_lieyan:'烈焰', + mage_lieyan_info:'每当己方主将使用一张法术牌,对一名随机敌方角色造成一点火焰伤害', + mage_zhufa:'助法', + mage_zhufa_info:'每当己方主将使用一张法术牌,令其获得一点行动值', + mage_bingdong:'冰冻', + mage_bingdong_info:'每当你对一个随从造成伤害,该随从将武将牌翻至背面', + + stone_caoyuanshi:'草原狮', + stone_leiouke:'雷欧克', + stone_misha:'米莎', + stone_huofu:'霍弗', + stone_jiewangzhu:'结网蛛', + stone_xunshoushi:'驯兽师', + + stone_senlinlang:'森林狼', + stone_tujiu:'秃鹫', + stone_muyangren:'牧羊人', + stone_jujishou:'狙击手', + stone_damoshatuo:'大漠沙驼', + stone_huangjialeixiang:'皇家雷象', + + hunter_jiewang:'结网', + hunter_jiewang_info:'你死亡时,己方主将获得一张随机野兽牌', + hunter_xunshou:'驯兽', + hunter_xunshou_info:'你出场时,己方主将可选择一名其他友方随从令其增加一点体力和体力上限,摸两张牌并获得嘲讽', + hunter_nuhou:'怒吼', + hunter_nuhou_info:'当你死亡时,对所有敌方角色造成一点伤害', + hunter_zhanhuo:'战火', + hunter_zhanhuo2:'战火', + hunter_zhanhuo_info:'其他友方随从摸牌阶段的摸牌数+1', + + hunter_qunxi:'群袭', + hunter_qunxi_info:'你出场时,所有友方随从摸一张牌', + hunter_mishi:'觅食', + hunter_mishi_info:'每当己方主将召唤一个随从,摸一张牌', + hunter_dusha:'渡沙', + hunter_dusha_info:'你出场时,令双方主将各随机使用一张牌库中的1费随从牌(不计入行动值消耗)', + hunter_chuanlin:'穿林', + hunter_chuanlin_info:'你出场时,己方主将展示牌库中的一张随机随从牌并获得之', + hunter_muyang:'牧羊', + hunter_muyang_info:'你出场时,随机召唤一个行动值消耗为X的随从,X为其他友方随从数', + hunter_juji:'狙击', + hunter_juji_info:'你的职业技能可以指定随从为目标', + + stone_baoqishi:'豹骑士', + stone_conglinshouwei:'从林守卫', + stone_baohuzhishu:'保护之树', + stone_kuangyedoushi:'狂野斗士', + stone_liebao:'猎豹', + stone_zongxiong:'棕熊', + + stone_renyaqishi:'刃牙骑士', + stone_conglinxiaoshou:'丛林枭兽', + stone_huangyeqishi:'荒野骑士', + stone_xunmenglong:'迅猛龙', + stone_lindishuyao:'林地树妖', + stone_huoshanxiemu:'火山邪木', + + druid_renya:'刃牙', + druid_renya_info:'你出场时,己方主将可以选择一项:令你摸一张牌并将武将牌翻至正面,或令你增加一点体力上限并获得技能潜行', + druid_yuehuo:'月火', + druid_yuehuo_info:'所有锦囊牌造成的伤害+1', + druid_qicheng:'骑乘', + druid_qicheng_info:'你死亡时,随机召唤一个行动消耗为1的随从', + druid_chicheng:'驰骋', + druid_chicheng_info:'你出场时,己方主将获得X点行动值,X为其他友方随从数', + druid_yeyou:'夜游', + druid_yeyou_info:'双方主将各从牌库中获得一张牌', + druid_juhuo:'举火', + druid_juhuo_info:'己方主将回合内,每有一名随从死亡,令己方主将获得一点行动值', + + stone_chongfeng:'冲锋', + stone_chongfeng_info:'你出场时,立即将武将牌翻至正面', + druid_nuhuo:'怒火', + druid_nuhuo_info:'每当己方主将使用一次职业技能,便对一名随机敌人造成一点伤害', + druid_chengzhang:'成长', + druid_chengzhang2:'成长', + druid_chengzhang_info:'你出场时,己方主将获得一点行动值;你死亡时,己方主将需弃置一张手牌', + druid_huwei:'护卫', + druid_huwei_info:'你出场时,己方主将可以选择一项:对一名随从造成一点伤害,或弃置一名随从的所有牌并将其体力上限改为2', + + + stone_fachao:'法潮图腾', + stone_tutengyongshi:'图腾勇士', + stone_huoshe:'火舌图腾', + stone_huoyuansu:'火元素', + stone_tuyuansu:'土元素', + stone_wujiyuansu:'无羁元素', + stone_xuejuren:'穴居人', + stone_huoli:'活力图腾', + stone_tutengshi:'图腾师', + stone_shachuisaman:'砂槌萨满', + stone_huoyanweishi:'火焰卫士', + stone_wanshiyuansu:'顽石元素', + stone_shalinxingzhe:'砂鳞行者', + + shaman_anhun:'暗魂', + shaman_anhun_info:'每当一名友方随从死亡,令主将从牌库中获得一张牌', + shaman_zoushi:'走石', + shaman_zoushi_info:'每当己方主将使用一张随从牌,对一名随机敌方角色造成一点伤害', + shaman_zhuhuo:'逐火', + shaman_zhuhuo_info:'你出场时,摸1~3张牌', + shaman_peiyu:'培育', + shaman_peiyu_info:'你出场时,增加X点体力和体力上限,X为友方图腾数', + shaman_huoli:'活力', + shaman_huoli_info:'己方主将出牌阶段开始时,你令其获得一点行动值', + shaman_xueju:'穴居', + shaman_xueju_info:'每当己主将使用一张随从牌,摸一张牌', + shaman_huoxi:'火袭', + shaman_huoxi_info:'你出场时,己方主将可以对对方一名随从造成两点火焰伤害', + shaman_fachao:'法潮', + shaman_fachao_info:'己方主将在其每个回合结束阶从牌库中获得一张牌并回复一点体力', + shaman_huoshe:'火舌', + shaman_huoshe_info:'其他友方随从造成的伤害始终+1', + + shaman_jili:'激励', + shaman_jili_info:'己方主将的结束阶段,所有友方图腾摸一张牌', + shaman_tuteng:'图腾', + shaman_tuteng_info:'你跳过摸牌阶段', + shaman_fali:'空气', + shaman_fali_info:'已方主将的结束阶段,令所有手牌数不大于1的友方随从摸一张牌', + shaman_zhiliao:'治疗', + shaman_zhiliao_info:'在你的结束阶段,令所有友方随从回复一点体力', + shaman_zhuore:'灼热', + shaman_zhuore_info:'已方主将的结束阶段,对一名随机敌方随从造成一点伤害', + + _shaman_skill:'图腾', + _shaman_skill_info:'召唤一个随机图腾', + _mage_skill:'火冲', + _mage_skill_info:'对一名随从造成一点火焰伤害', + _priest_skill:'治疗', + _priest_skill_info:'回复一点体力', + _priest_skillx:'心刺', + _priest_skillx_info:'造成一点伤害', + _warrior_skill:'战甲', + _warrior_skill_info:'获得一点护甲(不能超过3点)', + _warlock_skill:'分流', + _warlock_skill_info:'从牌库中获得两张牌', + _warlock_skillx:'炼狱', + _warlock_skillx_info:'召唤一个地狱火', + _rogue_skill:'出鞘', + _rogue_skill_info:'装备一把武器和一个随机非武器装备', + _paladin_skill:'动员', + _paladin_skill_info:'召唤一名士兵', + _hunter_skill:'射击', + _hunter_skill_info:'对敌方主将造成一点伤害', + _druid_skill:'猛击', + _druid_skill_info:'视为使用一张不计入出杀次数的杀', + + stone_tuteng1:'石爪图腾', + stone_tuteng2:'灼热图腾', + stone_tuteng3:'空气图腾', + stone_tuteng4:'治疗图腾', + + stone_xinbing:'新兵', + + stone_zhongshi:'中士', + stone_zhongshi1:'叫嚣', + stone_zhongshi1_info:'你出场时,己方主将可以弃置对方一名随从的所有牌', + stone_zhucangzhe:'伫藏者', + stone_zhucangzhe1:'伫藏', + stone_zhucangzhe1_info:'你出场时,己方主将可以令己方一名其他角色摸一张牌', + stone_huoqiangshou:'火枪手', + stone_huoqiangshou1:'火枪', + stone_huoqiangshou1_info:'你出场时,己方主将可以对对方一名随从造成一点伤害', + + stone_lansaizhanshi:'蓝腮战士', + stone_kutongsiseng:'苦痛侍僧', + stone_kutongsiseng1:'苦痛', + stone_kutongsiseng2:'苦痛', + stone_kutongsiseng1_info:'你出场时,己方主将于本结束阶段摸一张牌', + stone_yuanguanying:'远古暗影', + stone_yuanguanying1:'暗影', + stone_yuanguanying1_info:'你出场时,己方主将可视为对一名敌方角色使用一张杀', + + stone_dijieshicong:'低阶侍从', + stone_dijieshicong1:'持枪', + stone_dijieshicong1_info:'你出场时,敌方主将随机弃置一张装备牌', + stone_yaosaishouwei:'要塞守卫', + stone_yaosaishouwei1:'守卫', + stone_yaosaishouwei1_info:'你出场时,己方主将本回合手牌上限+2', + stone_famingjia:'发明家', + stone_famingjia1:'发明', + stone_famingjia1_info:'你出场时,己方主将摸两张牌', + + stone_chilundashi:'齿轮大师', + stone_chilundashi1:'齿轮', + stone_chilundashi2:'齿轮', + stone_chilundashi1_info:'你出场后的第一个摸牌阶段摸牌数+1', + stone_hanguangzhizhe:'寒光智者', + stone_hanguangzhizhe1:'寒光', + stone_hanguangzhizhe1_info:'你出场时,所有其他随从各摸一张牌', + stone_aihaozhihun:'哀嚎之魂', + stone_aihaozhihun1:'哀嚎', + stone_aihaozhihun1_info:'你出场时,敌方随从弃置所有牌', + + stone_fennuxiaoji:'愤怒小鸡', + stone_fennuxiaoji1:'暴怒', + stone_fennuxiaoji1_info:'准备阶段,若你没有手牌,你摸两张牌', + stone_juxingchanchu:'巨型蟾蜍', + stone_juxingchanchu1:'毒液', + stone_juxingchanchu1_info:'你死亡时,己方主将可令一名敌方随从失去1点体力', + stone_shishigui:'食尸鬼', + stone_shishigui1:'食尸', + stone_shishigui1_info:'你死亡后,场上所有其他随从失去1点体力', + stone_wuyi:'巫医', + stone_langren:'狼人', + stone_qianxing:'潜行', + stone_qianxing_info:'在你的回合开始前,不能成为任何卡牌的目标', + + stone_mingguangjisi:'明光祭司', + stone_nianqingjisi:'年轻祭司', + stone_zhufu:'祝福', + stone_zhufu_info:'己方主将的结束阶段,你令一名随机的受伤友方随从回复一点体力', + stone_aomishouwei:'奥秘守卫', + stone_yanjingshe:'眼镜蛇', + stone_yanjingshe1:'毒噬', + stone_yanjingshe1_info:'你出场时,若敌方随从数不少于己方,则随机杀死一名随从', + stone_zhiyuzhe:'治愈者', + stone_zhiyu:'治愈', + stone_zhiyu_info:'你出场时,令所有友方随从回复一点体力', + stone_mafengzhuru:'麻风侏儒', + stone_mafengzhuru1:'麻风', + stone_mafengzhuru1_info:'杀死你的随从失去一点体力', + stone_fatiaozhuru:'发条侏儒', + stone_fatiaozhuru1:'发条', + stone_fatiaozhuru1_info:'结束阶段,若你没有手牌,你摸两张牌', + + stonesha:'进攻', + stonesha_info:'锁定技,你的装备牌均视为杀', + stoneshan:'格挡', + stoneshan_info:'锁定技,你的随从和法术牌均视为闪', + + stonecharacter:'随从', + spell_shengerpingdeng:'生而平等', + spell_shengerpingdeng_info:'将所有随从体力上限降为1', + spell_jingshenkongzhi:'精神控制', + spell_jingshenkongzhi_info:'将一名敌方随从吸收为己方', + spell_anyingkuangluan:'暗影狂乱', + spell_anyingkuangluan_info:'将一名敌方随从吸收为己方,并令其于下个回合结束后死亡', + spell_anyingkuangluan_die:'暗影狂乱', + spell_anyingkuangluan_die_info:'下个回合结束后死亡', + spell_binghuan:'冰环', + spell_binghuan_info:'将场上所有随从翻面', + spell_morizaihuo:'末日灾祸', + spell_morizaihuo_info:'令场上所有随从立即死亡,回复两点体力', + spell_zhiliaozhichu:'治疗之触', + spell_zhiliaozhichu_info:'令目标随从恢复所有体力值并获得嘲讽', + chaofeng:'嘲讽', + chaofeng_info:'同阵营的无嘲讽角色不以能成为杀的目标', + spell_wangzhezhufu:'王者祝福', + spell_wangzhezhufu_info:'令一名随从增加两点体力和体力上限并摸两张牌', + spell_diyulieyan:'地狱烈焰', + spell_diyulieyan_info:'所有角色失去一点体力', + spell_chenmo:'沉默', + spell_chenmo_info:'弃置一名随从的所有牌,并令其体力上限减至2', + spell_zhiliaoshui:'治疗水', + spell_zhiliaoshui_info:'出牌阶段对自己使用,恢复两点体力值;或于濒死阶段对一名角色使用,令目标恢复一点体力', + spell_yanmie:'极恶之咒', + spell_yanmie_info:'交换你与敌方主将的装备区,并摸若干张牌直到你的手牌数与敌方主将相等', + spell_xiaoshi:'消失', + spell_xiaoshi_info:'令敌方主将将所有装备区内的牌收入手牌,并弃置其若干张手牌,直到其手牌数与你相等', + + stonecard:'法术', + mode_stone_card_config:'炉石模式', + mode_stone_character_config:'炉石模式', + }, + help:{ + '炉石模式': + '
            构筑
            • 点击右上角的卡组管理构建卡组
            • 一套卡组共30张牌,由法术和随从牌构成,每个同名卡牌最多带两张'+ + '
            • 卡组管理器中,随从右上角的x/y表示登场状态为x牌y血'+ + '
            • 游戏开始时,双方摸三张牌并从牌库中获得一张牌,并可选择将手牌置换一次'+ + '
            • 每当主将摸X张牌时,若X至少为2,则其中的X-1张牌从牌堆中获得,1张牌从牌库中获得'+ + '
            • 每名角色使用一套卡组,卡组用完后会重新补满'+ + '
            • 卡组与职业绑定,每个职业有一个专属技能,每回合限用一次,消耗两点行动值
            '+ + '
            职业技能
            • 祭司:召唤一个随机图腾'+ + '
            • 法师:对一名随从造成一点火焰伤害'+ + '
            • 牧师:回复一点体力'+ + '
            • 战士:获得一点护甲(不能超过3点)'+ + '
            • 术士:牌库中摸两张牌'+ + '
            • 潜行者:装备一把武器和一个随机非武器装备'+ + '
            • 圣骑士:召唤一名士兵'+ + '
            • 猎人:对敌方主将造成一点伤害'+ + '
            • 德鲁伊:视为使用一张不计入出杀次数的杀
            '+ + '
            怒气值
            • 每当友方随从受到伤害获得3点怒气值,主将受到伤害获得6点怒气值'+ + '
            • 每有一个友方随从死亡,获得10点怒气值,主将死亡获得20点怒气值'+ + '
            • 结束阶段,若己方随从数少于对方会获得10X点怒气值,X为随从数之差'+ + '
            • 怒气值达到100时不再增加。准备阶段,若怒气值己满,可消耗全部怒气值和4点行动值并召唤一名传说随从
            '+ + '
            战斗
            • 场上有两名主将进行对抗,主将的体力上限+1'+ + '
            • 游戏牌堆移除了乐不思蜀等跳过出牌阶段以及包含翻面功能的卡牌'+ + '
            • 主将出牌阶段的出牌数量(行动值)有上限,从1开始递增,后手的首个回合有一点额外行动值,装备牌不计入出牌上限
            • 游戏每进行一轮,主将的出牌上限+1,直到增加至6'+ + '
            • 使用随从牌可召唤一个随从,随从出场时背面朝上。每一方在场的随从数不能超过4
            • 随从于摸牌阶段摸牌基数为1,随从的法术和随从牌均视为闪,装备牌均视为杀
            • '+ + '随从与其他所有角色相互距离基数为1
            • '+ + '主将杀死对方随从后获得一个额外的行动值并从牌库中获得一张牌,杀死己方随从无惩罚,随从杀死随从无效果'+ + '
            • 主将在随从满员时可重铸随从牌,但回合内总的重铸次数不能超过3;若重铸的牌为随从牌或法术牌,则摸牌改为获得一张随机法术牌'+ + '
            • 嘲讽:若一方阵营中有嘲讽角色,则同阵营的无嘲讽角色不以能成为杀目标'+ + '
            • 行动顺序为先主将后随从。主将或随从死亡后立即移出游戏,主将死亡后替补登场,替补登场时摸3+X张牌,X为对方存活的随从数,无替补时游戏结束' + } + }; }); diff --git a/mode/tafang.js b/mode/tafang.js index 12cd2b922..a61ac265d 100644 --- a/mode/tafang.js +++ b/mode/tafang.js @@ -1,1236 +1,1244 @@ 'use strict'; -game.import('mode',{ - name:'tafang', - canvasUpdates2:[], - start:function(){ - "step 0" - lib.init.css(lib.assetURL+'layout/mode','chess'); - lib.init.css(lib.assetURL+'layout/mode','tafang'); - game.loadMode('chess'); - "step 1" - for(var i in result.element){ - for(var j in result.element[i]){ - if(j!='dieAfter'){ - lib.element[i][j]=lib.init.eval(result.element[i][j]); - } - } - } - for(var i in result.ui){ - for(var j in result.ui[i]){ - ui[i][j]=lib.init.eval(result.ui[i][j]); - } - } - get.chessDistance=lib.init.eval(result.get.chessDistance); - get.rawAttitude=lib.init.eval(result.get.rawAttitude); - var toLoad=['addChessPlayer','addObstacle','removeObstacle','isChessNeighbour', - 'draw2','updateCanvas2','setChessInfo','modeSwapPlayer']; - for(var i=0;i.player'+pos+ - '{left:'+(14+i*148)+'px;top:'+(14+j*148)+'px}',0); - ui.chesssheet.sheet.insertRule('#arena.chess #chess>.card'+pos+ - '{left:'+(22+i*148)+'px;top:'+(22+j*148)+'px}',0); - ui.chesssheet.sheet.insertRule('#arena.chess #chess>.popup'+pos+ - '{left:'+(19+i*148)+'px;top:'+(142+j*148)+'px}',0); - } - } - - var grids=[]; - var gridnum=ui.chessheight*ui.chesswidth; - for(var i=0;i=8&&j!=0&&j!=ui.chesswidth-1) continue; - if(tafanglist.contains(j)){ - var cg=i*ui.chesswidth+j; - grids.remove(cg); - game.addObstacle(cg.toString(),false); - event.obs.push(cg.toString()); +game.import('mode',function(){ + var game=window.game; + var ui=window.ui; + var get=window.get; + var ai=window.ai; + var lib=window.lib; + var _status=window._status; + return { + name:'tafang', + canvasUpdates2:[], + start:function(){ + "step 0" + lib.init.css(lib.assetURL+'layout/mode','chess'); + lib.init.css(lib.assetURL+'layout/mode','tafang'); + game.loadMode('chess'); + "step 1" + for(var i in result.element){ + for(var j in result.element[i]){ + if(j!='dieAfter'){ + lib.element[i][j]=lib.init.eval(result.element[i][j]); } } } - for(var i=0;i.player'+pos+ + '{left:'+(14+i*148)+'px;top:'+(14+j*148)+'px}',0); + ui.chesssheet.sheet.insertRule('#arena.chess #chess>.card'+pos+ + '{left:'+(22+i*148)+'px;top:'+(22+j*148)+'px}',0); + ui.chesssheet.sheet.insertRule('#arena.chess #chess>.popup'+pos+ + '{left:'+(19+i*148)+'px;top:'+(142+j*148)+'px}',0); + } + } + + var grids=[]; + var gridnum=ui.chessheight*ui.chesswidth; + for(var i=0;i=8&&j!=0&&j!=ui.chesswidth-1) continue; + if(tafanglist.contains(j)){ + var cg=i*ui.chesswidth+j; + grids.remove(cg); + game.addObstacle(cg.toString(),false); + event.obs.push(cg.toString()); } } } - if(_status.friends.length==0){ - ui.fakeme.hide(); - this.node.handcards1.delete(); - this.node.handcards2.delete(); - game.me=ui.create.player(); - game.me.side=false; - game.addVideo('removeTafangPlayer'); + for(var i=0;icount){ - map[i][j].classList.add('unselectable'); - map[i][j].classList.remove('pointerdiv'); + else{ + map.xingdong=[]; + } + var updateSelected=function(){ + var count=10+_status.remainingCount; + var selected=dialog.querySelectorAll('.button.selected'); + var selectedZhaomu=0; + for(var i=0;i=5){ - map[i][j].classList.add('unselectable'); - map[i][j].classList.remove('pointerdiv'); - } - else if(i=='bufang'){ - var numbufang=0; - for(var k=0;k=3){ - map[i][j].classList.add('unselectable'); - break; + } + for(var i in map){ + for(var j=0;jcount){ + map[i][j].classList.add('unselectable'); + map[i][j].classList.remove('pointerdiv'); + } + else if(i=='zhaomu'&&_status.friends.length+selectedZhaomu>=5){ + map[i][j].classList.add('unselectable'); + map[i][j].classList.remove('pointerdiv'); + } + else if(i=='bufang'){ + var numbufang=0; + for(var k=0;k=3){ + map[i][j].classList.add('unselectable'); + break; + } } } } } + ui.dialog.content.firstChild.innerHTML='剩余行动点:'+count; } - ui.dialog.content.firstChild.innerHTML='剩余行动点:'+count; - } - var clickOrder=0; - event.custom.replace.button=function(button){ - if(!button.classList.contains('unselectable')|| - button.classList.contains('selected')){ - button.classList.toggle('selected'); - button._clickOrder=clickOrder++; - } - updateSelected(); - } - event.custom.add.window=function(clicked){ - if(clicked) return; - if(event.step>1) return; - for(var i in map){ - for(var j=0;j1) return; + for(var i in map){ + for(var j=0;j=5){ - event.control.childNodes[1].style.opacity=0.5; - event.control.childNodes[1].disabled=true; - if(_status.lastTafangCommand=='招募'){ - _status.lastTafangCommand='布防'; - } - } - _status.imchoosing=true; - ui.auto.hide(); - var eventdong=function(){ - var selected=dialog.querySelectorAll('.button.selected'); - event.bufang=[]; - event.zhaomu=[]; - event.xingdong=_status.friends.slice(0); - // var xingdongs=[]; - _status.remainingCount+=10; - for(var i=0;i0){ - game.pause(); - } - else{ - eventdong(); - } - 'step 1' - event.dialog.close(); - event.control.close(); - event.done.close(); - delete event.dialog; - delete event.control; - delete event.done; - 'step 2' - event.chooseObstacle=false; - if(event.bufang.length){ - event.obstacles=game.obstacles.slice(0); - for(var i=0;i=5){ + event.control.childNodes[1].style.opacity=0.5; + event.control.childNodes[1].disabled=true; + if(_status.lastTafangCommand=='招募'){ + _status.lastTafangCommand='布防'; + } } - event.chooseObstacle=true; - event.currentBufang=event.bufang.shift(); - event.dialog=ui.create.dialog('选择一个位置放置【'+get.translation(event.currentBufang)+'】'); - if(!_status.auto){ + _status.imchoosing=true; + ui.auto.hide(); + var eventdong=function(){ + var selected=dialog.querySelectorAll('.button.selected'); + event.bufang=[]; + event.zhaomu=[]; + event.xingdong=_status.friends.slice(0); + // var xingdongs=[]; + _status.remainingCount+=10; + for(var i=0;i0){ game.pause(); } else{ - event.obstacle=event.obstacles.randomGet(); + eventdong(); } - event.switchToAuto=function(){ - event.obstacle=event.obstacles.randomGet(); - game.resume(); - }; - } - else{ - delete event.bufang; - } - 'step 3' - if(event.dialog){ + 'step 1' event.dialog.close(); + event.control.close(); + event.done.close(); delete event.dialog; - } - if(event.chooseObstacle){ - game.removeObstacle(event.obstacle.dataset.position); - var mech=game.addChessPlayer(event.currentBufang,'treasure',0,event.obstacle.dataset.position); + delete event.control; + delete event.done; + 'step 2' event.chooseObstacle=false; - event.goto(2); - } - else{ - if(event.obstacles){ + if(event.bufang.length){ + event.obstacles=game.obstacles.slice(0); for(var i=0;i=0;k--){ - var pos=i+k*ui.chesswidth; - if(lib.posmap[pos]){ - lib.posmap[pos].moveDown(); + } + else{ + delete event.zhaomu; + } + 'step 5' + _status.imchoosing=false; + ui.auto.show(); + game.delay(); + if(event.dialog){ + event.dialog.close(); + delete event.dialog; + } + if(event.playergrids){ + for(var i=0;i=0;k--){ + var pos=i+k*ui.chesswidth; + if(lib.posmap[pos]){ + lib.posmap[pos].moveDown(); + } } } } } - } - if(shalldelay) game.delay(); - 'step 7' - event.justadded=[]; - if(_status.characterList.length){ - if(_status.enemies.length=10&&list1.length&&difficulty>1){ + // var enemy=game.addChessPlayer(_status.characterList.shift(),true,4,list1.randomRemove()); + // _status.enemies.push(enemy); + // event.justadded.push(enemy.name); + // } + // if(_status.turnCount>=20&&list1.length&&difficulty>1){ + // var enemy=game.addChessPlayer(_status.characterList.shift(),true,4,list1.randomRemove()); + // _status.enemies.push(enemy); + // event.justadded.push(enemy.name); + // } + // if(list1.length&&difficulty>2){ + // var enemy=game.addChessPlayer(_status.characterList.shift(),true,4,list1.randomRemove()); + // _status.enemies.push(enemy); + // event.justadded.push(enemy.name); + // } } - if(list1.length){ - var enemy=game.addChessPlayer(_status.characterList.shift(),true,4,list1.randomRemove()); - _status.enemies.push(enemy); - event.justadded.push(enemy.name); - if(game.players.length==1){ - ui.me.querySelector('.fakeme.player').show(); - game.setChessInfo(game.players[0]); + } + else{ + game.over(true); + } + 'step 8' + if(event.xingdong.length){ + var toact=event.xingdong.shift(); + if(game.players.contains(toact)){ + toact.phase(); + } + event.redo(); + } + else{ + event.xingdong=_status.enemies.slice(0); + } + 'step 9' + if(event.xingdong.length){ + var enemy=event.xingdong.shift(); + if(!event.justadded.contains(enemy.name)&&game.players.contains(enemy)){ + enemy.phase(); + } + event.redo(); + } + else{ + event.mechlist=game.treasures.slice(0); + } + 'step 10' + if(event.mechlist.length){ + var mech=event.mechlist.shift(); + var info=lib.skill[mech.name+'_skill']; + if(!info.filter||info.filter(mech)){ + var next=game.createEvent('chessMech'); + next.player=mech; + next.setContent(info.content); + mech.chessFocus(); + if(lib.config.animation&&!lib.config.low_performance){ + mech.$epic2(); } game.delay(); } - // var difficulty=get.config('tafang_difficulty'); - // if(_status.turnCount>=10&&list1.length&&difficulty>1){ - // var enemy=game.addChessPlayer(_status.characterList.shift(),true,4,list1.randomRemove()); - // _status.enemies.push(enemy); - // event.justadded.push(enemy.name); - // } - // if(_status.turnCount>=20&&list1.length&&difficulty>1){ - // var enemy=game.addChessPlayer(_status.characterList.shift(),true,4,list1.randomRemove()); - // _status.enemies.push(enemy); - // event.justadded.push(enemy.name); - // } - // if(list1.length&&difficulty>2){ - // var enemy=game.addChessPlayer(_status.characterList.shift(),true,4,list1.randomRemove()); - // _status.enemies.push(enemy); - // event.justadded.push(enemy.name); - // } - } - } - else{ - game.over(true); - } - 'step 8' - if(event.xingdong.length){ - var toact=event.xingdong.shift(); - if(game.players.contains(toact)){ - toact.phase(); - } - event.redo(); - } - else{ - event.xingdong=_status.enemies.slice(0); - } - 'step 9' - if(event.xingdong.length){ - var enemy=event.xingdong.shift(); - if(!event.justadded.contains(enemy.name)&&game.players.contains(enemy)){ - enemy.phase(); - } - event.redo(); - } - else{ - event.mechlist=game.treasures.slice(0); - } - 'step 10' - if(event.mechlist.length){ - var mech=event.mechlist.shift(); - var info=lib.skill[mech.name+'_skill']; - if(!info.filter||info.filter(mech)){ - var next=game.createEvent('chessMech'); - next.player=mech; - next.setContent(info.content); - mech.chessFocus(); - if(lib.config.animation&&!lib.config.low_performance){ - mech.$epic2(); + if(--mech.hp<=0){ + var next=game.createEvent('chessMechRemove'); + next.player=mech; + next.setContent('chessMechRemove'); } - game.delay(); + else{ + mech.update(); + } + event.redo(); } - if(--mech.hp<=0){ - var next=game.createEvent('chessMechRemove'); - next.player=mech; - next.setContent('chessMechRemove'); + 'step 11' + delete event.xingdong; + delete event.mechlist; + if(_status.turnCount>=_status.turnTotal){ + game.over(true); } else{ - mech.update(); + event.goto(0); + game.delay(); } - event.redo(); - } - 'step 11' - delete event.xingdong; - delete event.mechlist; - if(_status.turnCount>=_status.turnTotal){ - game.over(true); - } - else{ - event.goto(0); - game.delay(); - } - }); - }, - loadMap:function(){ - var next=game.createEvent('loadMap'); - next.setContent(function(){ - if(!lib.storage.map){ - lib.storage.map=['basic_small','basic_medium','basic_large']; - } - if(!lib.storage.newmap){ - lib.storage.newmap=[]; - } - var sceneview=ui.create.div('.storyscene'); - if(!lib.config.touchscreen&&lib.config.mousewheel){ - sceneview._scrollspeed=30; - sceneview._scrollnum=10; - sceneview.onmousewheel=function(){ - if(!this.classList.contains('lockscroll')){ - ui.click.mousewheel.apply(this,arguments); + }); + }, + loadMap:function(){ + var next=game.createEvent('loadMap'); + next.setContent(function(){ + if(!lib.storage.map){ + lib.storage.map=['basic_small','basic_medium','basic_large']; + } + if(!lib.storage.newmap){ + lib.storage.newmap=[]; + } + var sceneview=ui.create.div('.storyscene'); + if(!lib.config.touchscreen&&lib.config.mousewheel){ + sceneview._scrollspeed=30; + sceneview._scrollnum=10; + sceneview.onmousewheel=function(){ + if(!this.classList.contains('lockscroll')){ + ui.click.mousewheel.apply(this,arguments); + } + }; + } + lib.setScroll(sceneview); + var switchScene=function(){ + event.result=this.link; + sceneview.delete(); + setTimeout(game.resume,300); + } + var clickScene=function(e){ + if(this.classList.contains('unselectable')) return; + if(this._clicking) return; + if(e&&e.stopPropagation) e.stopPropagation(); + if(this.classList.contains('flipped')){ + return; } - }; - } - lib.setScroll(sceneview); - var switchScene=function(){ - event.result=this.link; - sceneview.delete(); - setTimeout(game.resume,300); - } - var clickScene=function(e){ - if(this.classList.contains('unselectable')) return; - if(this._clicking) return; - if(e&&e.stopPropagation) e.stopPropagation(); - if(this.classList.contains('flipped')){ - return; - } - if(this.classList.contains('glow3')){ - this.classList.remove('glow3'); - lib.storage.newmap.remove(this.name); - game.save('newmap',lib.storage.newmap); - } - var sceneNode=this.parentNode; - var current=document.querySelector('.flipped.scene'); - if(current){ - restoreScene(current,true); - } - this.content.innerHTML=''; - ui.create.div('.menubutton.large.enter','进入',this.content,switchScene).link=this.name; - sceneNode.classList.add('lockscroll'); - var node=this; - node._clicking=true; - setTimeout(function(){ - node._clicking=false; - },700); - sceneNode.dx=ui.window.offsetWidth/2-(-sceneNode.scrollLeft+this.offsetLeft+this.offsetWidth/2); - if(Math.abs(sceneNode.dx)<20){ - sceneNode.dx=0; - } - if(!sceneNode.sceneInterval&&sceneNode.dx){ - sceneNode.sceneInterval=setInterval(function(){ - var dx=sceneNode.dx; - if(Math.abs(dx)<=2){ - sceneNode.scrollLeft-=dx; - clearInterval(sceneNode.sceneInterval); - delete sceneNode.sceneInterval; - } - else{ - var ddx=dx/Math.sqrt(Math.abs(dx))*1.5; - sceneNode.scrollLeft-=ddx; - sceneNode.dx-=ddx; - } - },16); - } - node.style.transition='all ease-in 0.2s'; - node.style.transform='perspective(1600px) rotateY(90deg) scale(0.75)'; - var onEnd=function(){ - node.removeEventListener('webkitTransitionEnd',onEnd); - node.classList.add('flipped'); - sceneNode.classList.add('lockscroll'); - node.style.transition='all ease-out 0.4s'; - node.style.transform='perspective(1600px) rotateY(180deg) scale(1)' - }; - node.listenTransition(onEnd); - } - ui.click.scene=clickScene; - var restoreScene=function(node,forced){ - if(node._clicking&&!forced) return; - if(node.transformInterval){ - clearInterval(node.transformInterval); - delete node.transformInterval; - } - var sceneNode=node.parentNode; - node._clicking=true; - setTimeout(function(){ - node._clicking=false; - },700); - node.style.transition='all ease-in 0.2s'; - node.style.transform='perspective(1600px) rotateY(90deg) scale(0.75)'; - var onEnd=function(){ - node.removeEventListener('webkitTransitionEnd',onEnd); - node.classList.remove('flipped'); - if(!sceneNode.querySelector('.flipped')){ - sceneNode.classList.remove('lockscroll'); - } - node.style.transition='all ease-out 0.4s'; - node.style.transform='perspective(1600px) rotateY(0deg) scale(0.7)' - }; - node.listenTransition(onEnd); - } - ui.click.scene2=restoreScene; - var createScene=function(name){ - var scene=lib.tafang.map[name]; - var node=ui.create.div('.scene',clickScene); - node.style.transform='perspective(1600px) rotateY(0deg) scale(0.7)'; - node.name=name; - node.bgnode=ui.create.div('.background.player',node); - node.info=scene; - ui.create.div('.avatar.menu',node.bgnode); - node.namenode=ui.create.div('.name',node,(scene.name)); - if(lib.storage.map.contains(name)){ - if(lib.storage.newmap.contains(name)){ - node.classList.add('glow3'); - } - node.namenode.dataset.nature='soilm'; - } - else{ - node.classList.add('unselectable'); - node.namenode.innerHTML=('未开启'); - } - var content=ui.create.div('.menu',node); - lib.setScroll(content); - node.content=content; - sceneview.appendChild(node); - return node; - } - event.custom.add.window=function(){ - var current=document.querySelector('.flipped.scene'); - if(current){ - restoreScene(current); - } - } - for(var i in lib.tafang.map){ - createScene(i); - } - ui.window.appendChild(sceneview.animate('start')); - game.pause(); - }); - }, - }, - skill:{ - tafang_mech_weixingxianjing_skill:{ - filter:function(player){ - for(var i=0;i<_status.enemies.length;i++){ - if(!_status.enemies[i].isTurnedOver()&& - get.chessDistance(player,_status.enemies[i])<=2){ - return true; - } - } - return false; - }, - content:function(){ - var list=[]; - for(var i=0;i<_status.enemies.length;i++){ - if(!_status.enemies[i].isTurnedOver()&& - get.chessDistance(player,_status.enemies[i])<=2){ - list.push(_status.enemies[i]); - } - } - if(list.length){ - game.log('小型陷阱发动'); - var target=list.randomGet(); - target.turnOver(); - game.logv(player,'tafang_mech_weixingxianjing_skill',[target]).node.text.style.display='none'; - player.line(target,'green'); - } - } + if(this.classList.contains('glow3')){ + this.classList.remove('glow3'); + lib.storage.newmap.remove(this.name); + game.save('newmap',lib.storage.newmap); + } + var sceneNode=this.parentNode; + var current=document.querySelector('.flipped.scene'); + if(current){ + restoreScene(current,true); + } + this.content.innerHTML=''; + ui.create.div('.menubutton.large.enter','进入',this.content,switchScene).link=this.name; + sceneNode.classList.add('lockscroll'); + var node=this; + node._clicking=true; + setTimeout(function(){ + node._clicking=false; + },700); + sceneNode.dx=ui.window.offsetWidth/2-(-sceneNode.scrollLeft+this.offsetLeft+this.offsetWidth/2); + if(Math.abs(sceneNode.dx)<20){ + sceneNode.dx=0; + } + if(!sceneNode.sceneInterval&&sceneNode.dx){ + sceneNode.sceneInterval=setInterval(function(){ + var dx=sceneNode.dx; + if(Math.abs(dx)<=2){ + sceneNode.scrollLeft-=dx; + clearInterval(sceneNode.sceneInterval); + delete sceneNode.sceneInterval; + } + else{ + var ddx=dx/Math.sqrt(Math.abs(dx))*1.5; + sceneNode.scrollLeft-=ddx; + sceneNode.dx-=ddx; + } + },16); + } + node.style.transition='all ease-in 0.2s'; + node.style.transform='perspective(1600px) rotateY(90deg) scale(0.75)'; + var onEnd=function(){ + node.removeEventListener('webkitTransitionEnd',onEnd); + node.classList.add('flipped'); + sceneNode.classList.add('lockscroll'); + node.style.transition='all ease-out 0.4s'; + node.style.transform='perspective(1600px) rotateY(180deg) scale(1)' + }; + node.listenTransition(onEnd); + } + ui.click.scene=clickScene; + var restoreScene=function(node,forced){ + if(node._clicking&&!forced) return; + if(node.transformInterval){ + clearInterval(node.transformInterval); + delete node.transformInterval; + } + var sceneNode=node.parentNode; + node._clicking=true; + setTimeout(function(){ + node._clicking=false; + },700); + node.style.transition='all ease-in 0.2s'; + node.style.transform='perspective(1600px) rotateY(90deg) scale(0.75)'; + var onEnd=function(){ + node.removeEventListener('webkitTransitionEnd',onEnd); + node.classList.remove('flipped'); + if(!sceneNode.querySelector('.flipped')){ + sceneNode.classList.remove('lockscroll'); + } + node.style.transition='all ease-out 0.4s'; + node.style.transform='perspective(1600px) rotateY(0deg) scale(0.7)' + }; + node.listenTransition(onEnd); + } + ui.click.scene2=restoreScene; + var createScene=function(name){ + var scene=lib.tafang.map[name]; + var node=ui.create.div('.scene',clickScene); + node.style.transform='perspective(1600px) rotateY(0deg) scale(0.7)'; + node.name=name; + node.bgnode=ui.create.div('.background.player',node); + node.info=scene; + ui.create.div('.avatar.menu',node.bgnode); + node.namenode=ui.create.div('.name',node,(scene.name)); + if(lib.storage.map.contains(name)){ + if(lib.storage.newmap.contains(name)){ + node.classList.add('glow3'); + } + node.namenode.dataset.nature='soilm'; + } + else{ + node.classList.add('unselectable'); + node.namenode.innerHTML=('未开启'); + } + var content=ui.create.div('.menu',node); + lib.setScroll(content); + node.content=content; + sceneview.appendChild(node); + return node; + } + event.custom.add.window=function(){ + var current=document.querySelector('.flipped.scene'); + if(current){ + restoreScene(current); + } + } + for(var i in lib.tafang.map){ + createScene(i); + } + ui.window.appendChild(sceneview.animate('start')); + game.pause(); + }); + }, }, - tafang_mech_nengliangqiu_skill:{ - filter:function(player){ - for(var i=0;i<_status.friends.length;i++){ - if(get.chessDistance(player,_status.friends[i])<=3){ - return true; + skill:{ + tafang_mech_weixingxianjing_skill:{ + filter:function(player){ + for(var i=0;i<_status.enemies.length;i++){ + if(!_status.enemies[i].isTurnedOver()&& + get.chessDistance(player,_status.enemies[i])<=2){ + return true; + } + } + return false; + }, + content:function(){ + var list=[]; + for(var i=0;i<_status.enemies.length;i++){ + if(!_status.enemies[i].isTurnedOver()&& + get.chessDistance(player,_status.enemies[i])<=2){ + list.push(_status.enemies[i]); + } + } + if(list.length){ + game.log('小型陷阱发动'); + var target=list.randomGet(); + target.turnOver(); + game.logv(player,'tafang_mech_weixingxianjing_skill',[target]).node.text.style.display='none'; + player.line(target,'green'); } } - return false; }, - content:function(){ - var list1=[],list2=[]; - for(var i=0;i<_status.friends.length;i++){ - if(get.chessDistance(player,_status.friends[i])<=1){ - list2.push(_status.friends[i]); + tafang_mech_nengliangqiu_skill:{ + filter:function(player){ + for(var i=0;i<_status.friends.length;i++){ + if(get.chessDistance(player,_status.friends[i])<=3){ + return true; + } } - else if(get.chessDistance(player,_status.friends[i])<=3){ - list1.push(_status.friends[i]); + return false; + }, + content:function(){ + var list1=[],list2=[]; + for(var i=0;i<_status.friends.length;i++){ + if(get.chessDistance(player,_status.friends[i])<=1){ + list2.push(_status.friends[i]); + } + else if(get.chessDistance(player,_status.friends[i])<=3){ + list1.push(_status.friends[i]); + } + // else if(get.chessDistance(player,_status.friends[i])<=4){ + // list2.push(_status.friends[i]); + // } } - // else if(get.chessDistance(player,_status.friends[i])<=4){ - // list2.push(_status.friends[i]); - // } - } - if(list2.length){ - game.asyncDraw(list2,2); - player.line(list2,'green'); - } - if(list1.length){ - game.asyncDraw(list1); - player.line(list1,'green'); - } - if(list1.length||list2.length){ - game.log('能量球发动'); - game.logv(player,'tafang_mech_nengliangqiu_skill',list1.concat(list2)).node.text.style.display='none'; - } - } - }, - tafang_mech_mutong_skill:{ - filter:function(player){ - for(var i=0;i<_status.enemies.length;i++){ - if(get.chessDistance(player,_status.enemies[i])<=3){ - return true; + if(list2.length){ + game.asyncDraw(list2,2); + player.line(list2,'green'); + } + if(list1.length){ + game.asyncDraw(list1); + player.line(list1,'green'); + } + if(list1.length||list2.length){ + game.log('能量球发动'); + game.logv(player,'tafang_mech_nengliangqiu_skill',list1.concat(list2)).node.text.style.display='none'; } } - return false; }, - content:function(){ - var list=[]; - for(var i=0;i<_status.enemies.length;i++){ - if(get.chessDistance(player,_status.enemies[i])<=3){ - list.push(_status.enemies[i]); + tafang_mech_mutong_skill:{ + filter:function(player){ + for(var i=0;i<_status.enemies.length;i++){ + if(get.chessDistance(player,_status.enemies[i])<=3){ + return true; + } + } + return false; + }, + content:function(){ + var list=[]; + for(var i=0;i<_status.enemies.length;i++){ + if(get.chessDistance(player,_status.enemies[i])<=3){ + list.push(_status.enemies[i]); + } + } + if(list.length){ + game.log('木桶发动'); + var targets=list.randomGets(1); + game.logv(player,'tafang_mech_mutong_skill',targets).node.text.style.display='none'; + player.line(targets,'green'); + for(var i=0;i
            • 阻上敌人到达最下方的出口,坚持到给定的回合数即获得胜利
            • '+ - '每轮可获得10个行动点,用来布置机关、招募武将。场上每有一个友方武将,行动点数-1。游戏难度将影响不同操作消耗的行动点数。未用完的行动点将减半(向下取整)并累积到下一轮
            • '+ - '每一轮在最上方的一个随机位置增加一名敌人,若最上方已有角色,则将其下移一格
            • '+ - '战场上最多出现3个相同的机关,每个机关在置入战场3轮后消失。战场上最多招募5名友方角色。
            • '+ - '敌方角色到达底部出口时游戏失败,已方角色到达底部出口,将被移出游戏', - }, + tafang_mech_guangmingquan:['','',3,[],['boss'],3], + tafang_mech_nengliangqiu:['','',3,[],['boss'],3], + tafang_mech_jiguanren:['','',3,[],['boss'],3], + tafang_mech_weixingxianjing:['','',3,[],['boss'],4], + tafang_mech_mutong:['','',3,[],['boss'],4], + tafang_mech_gongchengche:['','',3,[],['boss'],4], + } + }, + cardPack:{ + mode_tafang:[] + }, + posmap:{}, + help:{ + '塔防模式': + '
              • 阻上敌人到达最下方的出口,坚持到给定的回合数即获得胜利
              • '+ + '每轮可获得10个行动点,用来布置机关、招募武将。场上每有一个友方武将,行动点数-1。游戏难度将影响不同操作消耗的行动点数。未用完的行动点将减半(向下取整)并累积到下一轮
              • '+ + '每一轮在最上方的一个随机位置增加一名敌人,若最上方已有角色,则将其下移一格
              • '+ + '战场上最多出现3个相同的机关,每个机关在置入战场3轮后消失。战场上最多招募5名友方角色。
              • '+ + '敌方角色到达底部出口时游戏失败,已方角色到达底部出口,将被移出游戏', + }, + }; }); diff --git a/mode/versus.js b/mode/versus.js index e70d81930..d006dee6a 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -1,4808 +1,4816 @@ 'use strict'; -game.import('mode',{ - name:'versus', - init:function(){ - if(get.config('versus_mode')=='jiange'){ - lib.characterPack.mode_versus={ - boss_liedixuande:['male','shu',5,['boss_lingfeng','boss_jizhen'],['jiangeboss','hiddenboss','bossallowed'],'shu'], - boss_gongshenyueying:['female','shu',4,['boss_gongshenjg','boss_jingmiao','boss_zhinang'],['jiangeboss','hiddenboss','bossallowed'],'shu'], - boss_tianhoukongming:['male','shu',4,['boss_biantian','bazhen'],['jiangeboss','hiddenboss','bossallowed'],'shu'], - boss_yuhuoshiyuan:['male','shu',4,['boss_yuhuojg','boss_qiwu','boss_tianyujg'],['jiangeboss','hiddenboss','bossallowed'],'shu'], - boss_qiaokuijunyi:['male','wei',4,['boss_huodi','boss_jueji'],['jiangeboss','hiddenboss','bossallowed'],'wei'], - boss_jiarenzidan:['male','wei',5,['boss_chiying','boss_jingfan'],['jiangeboss','hiddenboss','bossallowed'],'wei'], - boss_duanyuzhongda:['male','wei',5,['boss_fanshi','boss_xuanlei','boss_skonghun'],['jiangeboss','hiddenboss','bossallowed'],'wei'], - boss_juechenmiaocai:['male','wei',4,['boss_chuanyun','boss_leili','boss_fengxing'],['jiangeboss','hiddenboss','bossallowed'],'wei'], - - boss_jileibaihu:['male','shu',4,['boss_jiguan','boss_zhenwei','boss_benlei'],['jiangemech','hiddenboss','bossallowed'],'shu'], - boss_yunpingqinglong:['male','shu',4,['boss_jiguan','boss_mojianjg'],['jiangemech','hiddenboss','bossallowed'],'shu'], - boss_lingjiaxuanwu:['male','shu',5,['boss_jiguan','yizhong','boss_lingyu'],['jiangemech','hiddenboss','bossallowed'],'shu'], - boss_chiyuzhuque:['male','shu',5,['boss_jiguan','boss_yuhuojg','boss_tianyun'],['jiangemech','hiddenboss','bossallowed'],'shu'], - boss_fudibian:['male','wei',4,['boss_jiguan','boss_didongjg'],['jiangemech','hiddenboss','bossallowed'],'wei'], - boss_tuntianchiwen:['male','wei',5,['boss_jiguan','boss_tanshi','boss_tunshi'],['jiangemech','hiddenboss','bossallowed'],'wei'], - boss_shihuosuanni:['male','wei',3,['boss_jiguan','boss_lianyujg'],['jiangemech','hiddenboss','bossallowed'],'wei'], - boss_lieshiyazi:['male','wei',4,['boss_jiguan','boss_nailuo'],['jiangemech','hiddenboss','bossallowed'],'wei'], - }; - lib.characterIntro.boss_liedixuande=lib.characterIntro.liubei; - lib.characterIntro.boss_gongshenyueying=lib.characterIntro.huangyueying; - lib.characterIntro.boss_tianhoukongming=lib.characterIntro.shen_zhugeliang; - lib.characterIntro.boss_yuhuoshiyuan=lib.characterIntro.pangtong; - lib.characterIntro.boss_qiaokuijunyi=lib.characterIntro.zhenghe; - lib.characterIntro.boss_jiarenzidan=lib.characterIntro.caozhen; - lib.characterIntro.boss_duanyuzhongda=lib.characterIntro.simayi; - lib.characterIntro.boss_juechenmiaocai=lib.characterIntro.xiahouyuan; - } - }, - start:function(){ - "step 0" - _status.mode=get.config('versus_mode'); - if(_status.brawl&&_status.brawl.submode){ - _status.mode=_status.brawl.submode; - } - if(lib.config.test_game){ - _status.mode='standard'; - } - "step 1" - var playback=localStorage.getItem(lib.configprefix+'playback'); - if(playback){ - ui.create.me(); - ui.arena.style.display='none'; - ui.system.style.display='none'; - _status.playback=playback; - localStorage.removeItem(lib.configprefix+'playback'); - var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); - store.get(parseInt(playback)).onsuccess=function(e){ - if(e.target.result){ - game.playVideoContent(e.target.result.video); - } - else{ - alert('播放失败:找不到录像'); - game.reload(); - } - } - event.finish(); - return; - } - if(_status.connectMode){ - game.waitForPlayer(function(){ - switch(lib.configOL.versus_mode){ - case '1v1':lib.configOL.number=2;break; - case '2v2':lib.configOL.number=4;break; - case '3v3':lib.configOL.number=6;break; - case '4v4':lib.configOL.number=8;break; - } - }); - } - else if(_status.mode=='jiange'||_status.mode=='four'){ - if(_status.mode=='four'&&!get.config('enable_all_cards_four')){ - lib.card.list=lib.cardsFour; - } - game.prepareArena(8); - } - else if(_status.mode=='two'){ - game.prepareArena(4); - } - else if(_status.mode=='three'){ - if(!get.config('enable_all_cards')){ - lib.translate.wuzhong_info+='若对方存活角色多于己方,则额外摸一张牌'; - lib.translate.zhuge_info='锁定技,出牌阶段,你使用杀的次数上限+3'; - lib.card.list=lib.cardsThree; - } - ui.create.cardsAsync(); - game.finishCards(); - } - else{ - if(lib.storage.choice==undefined) game.save('choice',20); - if(lib.storage.zhu==undefined) game.save('zhu',true); - if(lib.storage.noreplace_end==undefined) game.save('noreplace_end',true); - if(get.config('first_less')==undefined) game.saveConfig('first_less',true,true); - if(lib.storage.autoreplaceinnerhtml==undefined) game.save('autoreplaceinnerhtml',true); - if(lib.storage.single_control==undefined) game.save('single_control',true); - if(lib.storage.number==undefined) game.save('number',3); - if(lib.storage.versus_reward==undefined) game.save('versus_reward',3); - if(lib.storage.versus_punish==undefined) game.save('versus_punish','弃牌'); - if(lib.storage.replace_number==undefined) game.save('replace_number',3); - - switch(lib.storage.seat_order){ - case '交叉':lib.storage.cross_seat=true;lib.storage.random_seat=false;break; - case '随机':lib.storage.cross_seat=false;lib.storage.random_seat=true;break; - default:lib.storage.cross_seat=false;lib.storage.random_seat=false; - } - game.save('only_zhu',true); - ui.wuxie.hide(); - ui.create.cardsAsync(); - game.finishCards(); - } - // game.delay(); - "step 2" - if(_status.connectMode){ - if(lib.configOL.versus_mode=='1v1'){ - game.randomMapOL('hidden'); - } - else{ - game.randomMapOL(); - } - } - else if(_status.mode=='four'){ - var list=[ - ['zhong','ezhong','ezhong','zhong','zhong','ezhong','ezhong','zhong'], - ['zhong','ezhong','zhong','ezhong','ezhong','zhong','ezhong','zhong'], - ['zhong','ezhong','ezhong','zhong','ezhong','zhong','zhong','ezhong'], - ['zhong','ezhong','zhong','ezhong','zhong','ezhong','zhong','ezhong'], - ['zhong','ezhong','ezhong','zhong','ezhong','zhong','ezhong','zhong'], - ].randomGet(); - var rand1=Math.floor(Math.random()*4); - var rand2=Math.floor(Math.random()*4); - for(var i=0;i=8){ - j-=8; - } - if(list[i][0]=='w'){ - game.players[j].side=true; - game.players[j].setIdentity('wei'); - game.players[j].identity='wei'; - } - else{ - game.players[j].side=false; - game.players[j].setIdentity('shu'); - game.players[j].identity='shu'; - } - if(list[i].indexOf('mech')!=-1){ - game.players[j].type='mech'; - } - else if(list[i].indexOf('boss')!=-1){ - game.players[j].type='boss'; - } - else{ - game.players[j].type='human'; - } - game.players[i].getId(); - } - game.chooseCharacterJiange(); - } - else if(_status.mode=='three'){ - game.chooseCharacterThree(); - } - else{ - game.chooseCharacter(); - } - if(!_status.connectMode&&_status.brawl&&_status.brawl.chooseCharacterBefore){ - _status.brawl.chooseCharacterBefore(); - } - "step 3" - var players=get.players(lib.sort.position); - var info=[]; - for(var i=0;i=4); - } - game.addVideo('init',null,info); - event.trigger('gameStart'); - if(_status.connectMode){ - if(_status.mode=='1v1'){ - _status.first_less=true; - game.gameDraw(_status.firstChoose.next); - game.phaseLoop(_status.firstChoose.next); - } - else if(_status.mode=='2v2'||_status.mode=='3v3'){ - _status.first_less=true; - var firstChoose=game.players.randomGet(); - if(firstChoose.next.side==firstChoose.side){ - firstChoose=firstChoose.next; - } - game.gameDraw(firstChoose); - if(lib.configOL.replace_handcard){ - game.replaceHandcards(firstChoose.previous); - } - game.phaseLoop(firstChoose); - } - else if(_status.mode=='4v4'){ - game.gameDraw(_status.firstAct,function(player){ - if(player==_status.firstAct.previousSeat){ - return 5; - } - return 4; - }); - game.replaceHandcards(_status.firstAct.previous,_status.firstAct.previous.previous); - game.phaseLoop(_status.firstAct); - } - event.finish(); - } - else{ - if(_status.mode=='two'){ - _status.first_less=true; - _status.first_less_forced=true; - var firstChoose=_status.firstAct; - game.gameDraw(firstChoose); - if(get.config('replace_handcard_two')){ - game.replaceHandcards(firstChoose.previous); - } - game.phaseLoop(firstChoose); - } - else if(_status.mode=='four'){ - game.gameDraw(_status.firstAct,function(player){ - if(player==_status.firstAct.previousSeat){ - return 5; - } - return 4; - }); - if(game.me==_status.firstAct.previous||game.me==_status.firstAct.previous.previous){ - game.me.chooseBool('是否置换手牌?'); - event.replaceCard=true; - } - } - else if(_status.mode=='jiange'){ - var firstAct; - for(var i=0;i1){ - for(var i=0;i=lib.storage.number){ - actcount=i-lib.storage.number; - } - else{ - actcount=i+lib.storage.number; - } - } - if(actcount>0){ - actcount--; - } - else{ - actcount=game.players.length-1; - } - firstAct=game.players[actcount]; - break; - } - } - } - else{ - firstAct=game.players[Math.floor(Math.random()*game.players.length)]; - } - } - game.gameDraw(firstAct,4); - _status.first_less=true; - _status.round=0; - if(lib.storage.single_control){ - game.addGlobalSkill('autoswap'); - if(game.players.length>2&&lib.config.show_handcardbutton){ - ui.versushs=ui.create.system('手牌',null,true); - lib.setPopped(ui.versushs,game.versusHoverHandcards,220); - } - } - _status.enemyCount=ui.create.system('杀敌: '+get.cnNumber(0,true),null,true); - _status.friendCount=ui.create.system('阵亡: '+get.cnNumber(0,true),null,true); - - lib.setPopped(_status.friendCount,game.versusHoverFriend); - lib.setPopped(_status.enemyCount,game.versusHoverEnemy); - - if(lib.storage.zhu){ - game.versusPhaseLoop(firstAct); - } - else{ - game.versusPhaseLoop(firstAct); - } - } - if(_status.mode!='four'){ - event.finish(); - } - } - "step 4" - if(event.replaceCard&&result.bool){ - var hs=game.me.getCards('h'); - for(var i=0;i侯选人数:'+lib.configOL.choice_num+'人'); - uiintro.add('
                替补人数:'+lib.configOL.replace_number+'人'); - } - else if(lib.configOL.versus_mode=='2v2'||lib.configOL.versus_mode=='3v3'){ - uiintro.add('
                四号位换牌:'+(lib.configOL.replace_handcard?'开启':'关闭')); - } - uiintro.add('
                出牌时限:'+lib.configOL.choose_timeout+'秒'); - uiintro.add('
                屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); - var last=uiintro.add('
                屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); - if(lib.configOL.banned.length){ - last=uiintro.add('
                禁用武将:'+get.translation(lib.configOL.banned)); - } - if(lib.configOL.bannedcards.length){ - last=uiintro.add('
                禁用卡牌:'+get.translation(lib.configOL.bannedcards)); - } - last.style.paddingBottom='8px'; - }, - getVideoName:function(){ - var str=get.translation(game.me.name); - if(game.me.name2){ - str+='/'+get.translation(game.me.name2); - } - var str2; - switch(_status.mode){ - case 'two':str2='欢乐成双';break; - case 'three':str2='统率三军';break; - case 'four':str2='对决 - 4v4';break; - default:str2='对决 - '+lib.storage.number+'v'+lib.storage.number - } - return [str,str2]; - }, - addRecord:function(bool){ - if(typeof bool=='boolean'){ - var data=lib.config.gameRecord.versus.data; - var identity=get.cnNumber(lib.storage.number)+'人'; - if(!data[identity]){ - data[identity]=[0,0]; - } - if(bool){ - data[identity][0]++; - } - else{ - data[identity][1]++; - } - var list=['一人','两人','三人']; - var str=''; - for(var i=0;i'; - } - } - lib.config.gameRecord.versus.str=str; - game.saveConfig('gameRecord',lib.config.gameRecord); - } - }, - chooseCharacterJiange:function(){ - var next=game.createEvent('chooseCharacter',false); - next.showConfig=true; - next.setContent(function(){ - 'step 0' - ui.arena.classList.add('choose-character'); - for(var i in lib.characterPack.mode_versus){ - lib.character[i]=lib.characterPack.mode_versus[i]; - if(!lib.character[i][4]){ - lib.character[i][4]=[]; - } - } - 'step 1' - for(var i in lib.skill){ - if(lib.skill[i].changeSeat){ - lib.skill[i]={}; - if(lib.translate[i+'_info']){ - lib.translate[i+'_info']='此模式下不可用'; - } - } - } - var list={ - weilist:[],shulist:[], - weimech:[],shumech:[], - weiboss:[],shuboss:[], - } - event.list=list; - if(lib.characterPack.boss){ - for(var i in lib.characterPack.boss){ - if(!lib.character[i]&&lib.characterPack.boss[i][4]){ - if(lib.characterPack.boss[i][4].contains('jiangeboss')|| - lib.characterPack.boss[i][4].contains('jiangemech')){ - lib.character[i]=lib.characterPack.boss[i]; - } - } - } - } - for(var i in lib.character){ - if(lib.character[i][4]){ - if(lib.character[i][4].contains('jiangeboss')){ - list[lib.character[i][1]+'boss'].push(i);continue; - } - else if(lib.character[i][4].contains('jiangemech')){ - list[lib.character[i][1]+'mech'].push(i);continue; - } - } - if(lib.filter.characterDisabled(i)) continue; - if(lib.character[i][1]=='wei'){ - list.weilist.push(i); - } - else if(lib.character[i][1]=='shu'){ - list.shulist.push(i); - } - } - var dialog; - switch(game.me.type){ - case 'human': - for(var i=0;i'; - td.link=i-1; - if(get.distance(_status.firstAct,game.me,'absolute')===i-1){ - td.classList.add('thundertext'); - } - td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ - if(_status.dragged) return; - if(_status.justdragged) return; - if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return; - var current=this.parentNode.querySelector('.thundertext'); - if(current){ - current.classList.remove('thundertext'); - } - this.classList.add('thundertext'); - _status.firstAct=game.me; - for(var i=0;i当前分数:
                '+(lib.storage.ladder.current+(_status.ladder_tmp?40:0))+'
                '); - uiintro.add('
                历史最高:
                '+lib.storage.ladder.top+'
                '); - uiintro.content.lastChild.style.paddingBottom='8px'; - return uiintro; - },180); - _status.ladder=true; - _status.ladder_mmr=0; - } - "step 1" - if(event.current==game.me||(event.four_assign&&event.current.side==game.me.side)){ - var dialog=event.xdialog; - if(!dialog){ - if(get.config('expand_dialog')){ - dialog=event.xdialog||ui.create.characterDialog(event.filterChoice,'expandall'); - } - else{ - dialog=event.xdialog||ui.create.characterDialog(event.filterChoice); - } - } - var names=[]; - for(var i=0;ib?1:-1; - } - if(lib.storage.choice=='∞'){ - list.sort(sortByGroup); - } - else{ - list.randomSort(); - } - _status.list=list; - var choice=(lib.storage.choice=='∞')?list.length:lib.storage.choice; - event.dialog=ui.create.dialog('选择角色',[list.slice(0,choice),'character']); - event.dialog.classList.add('fixed'); - // for(var i=0;i=dialog.versus_number.link+dialog.replace_number.link){ - event.fill.firstChild.innerHTML='开始'; - _status.choosefinished=true; - if(ui.cheat){ - ui.cheat.close(); - delete ui.cheat; - } - } - game.save('zhu',dialog.versus_zhu.link); - if(lib.storage.zhu){ - // dialog.versus_only_zhu.parentNode.classList.remove('disabled'); - dialog.versus_main_zhu.parentNode.classList.remove('disabled'); - } - else{ - // dialog.versus_only_zhu.parentNode.classList.add('disabled'); - dialog.versus_main_zhu.parentNode.classList.add('disabled'); - } - // game.save('only_zhu',dialog.versus_only_zhu.link); - game.save('main_zhu',dialog.versus_main_zhu.link); - game.save('assign_enemy',dialog.versus_assign_enemy.link); - game.save('seat_order',dialog.versus_seat_order.link); - // game.save('cross_seat',dialog.versus_cross_seat.link); - game.save('noreplace_end',dialog.versus_noreplace_end.link); - game.save('single_control',dialog.versus_single_control.link); - switch(lib.storage.seat_order){ - case '交叉':lib.storage.cross_seat=true;lib.storage.random_seat=false;break; - case '随机':lib.storage.cross_seat=false;lib.storage.random_seat=true;break; - default:lib.storage.cross_seat=false;lib.storage.random_seat=false; - } - game.saveConfig('first_less',dialog.versus_first_less.link,true); - game.save('number',dialog.versus_number.link); - game.save('versus_reward',dialog.versus_reward.link); - game.save('versus_punish',dialog.versus_punish.link); - game.save('replace_number',dialog.replace_number.link); - game.save('choice',dialog.choice.link); - var count,i; - if(dialog.buttons.length>lib.storage.choice){ - count=dialog.buttons.length-lib.storage.choice; - var removed=[]; - for(i=dialog.buttons.length-1;i>=0&&count>0;i--){ - if(dialog.buttons[i].classList.contains('target')==false&& - dialog.buttons[i].classList.contains('glow')==false){ - dialog.buttons[i].remove(); - _status.list.remove(dialog.buttons[i].link); - removed.push(dialog.buttons[i].link) - dialog.buttons.splice(i,1); - count--; - } - } - for(i=0;i=4){ - ui.arena.setNumber(parseInt(ui.arena.dataset.number)+1); - for(var i=0;i=4){ - // ui.fakemebg.show(); - game.onSwapControl(); - } - }); - }, - chooseCharacterOL:function(){ - switch(lib.configOL.versus_mode){ - case '1v1':game.chooseCharacterOL1();break; - case '2v2':game.chooseCharacterOL2();break; - case '3v3':game.chooseCharacterOL3();break; - case '4v4':game.chooseCharacterOL4();break; - } - }, - chooseCharacterOL4:function(){ - var next=game.createEvent('chooseCharacter',false); - next.setContent(function(){ - "step 0" - var list=[ - ['zhong','ezhong','ezhong','zhong','zhong','ezhong','ezhong','zhong'], - ['zhong','ezhong','zhong','ezhong','ezhong','zhong','ezhong','zhong'], - ['zhong','ezhong','ezhong','zhong','ezhong','zhong','zhong','ezhong'], - ['zhong','ezhong','zhong','ezhong','zhong','ezhong','zhong','ezhong'], - ['zhong','ezhong','ezhong','zhong','ezhong','zhong','ezhong','zhong'], - ].randomGet(); - var rand1=Math.floor(Math.random()*4); - var rand2=Math.floor(Math.random()*4); - for(var i=0;i0.4){ - return (rank>=6)?Math.random():-Math.random(); - } - else if(seed>0.1){ - return (rank>=4&&rank<6)?Math.random():-Math.random(); - } - else{ - return (rank<4)?Math.random():-Math.random(); - } - }).set('selected',_status.event.selected).set('dialog',event.videoId).set('seed',Math.random()); - "step 2" - event.selected.push(result.links[0]); - game.broadcastAll(function(player,name,zhu){ - player.classList.remove('selectedx'); - player.init(name); - if(player.node.name_seat){ - player.node.name_seat.remove(); - } - },event.current,result.links[0]); - if(event.current.identity=='zhu'){ - event.current.hp++; - event.current.maxHp++; - event.current.update(); - } - event.current.classList.remove('selectedx'); - for(var i=0;i=2*Math.max(game.friend.length,game.enemy.length)){ - _status.round=0; - for(var i=0;ib.countCards('j')) return 1; - return a.hp-b.hp; - }) - event.player=list[0]; - event.goto(0); - } - else{ - game.me.chooseTarget('选择要行动的角色',true,function(card,player,target){ - return (target.classList.contains('acted')==false&&target.side==game.me.side); - }).includeOut=true; - } - } - else{ - event.player=event.player.next; - event.goto(0); - } - "step 2" - event.player=result.targets[0]; - event.goto(0); - }); - }, - phaseLoopJiange:function(){ - var next=game.createEvent('phaseLoop'); - next.num=0; - next.setContent(function(){ - if(event.num>=8){ - event.num-=8; - } - var player=_status.actlist[event.num]; - if(player.isAlive()){ - player.phase(); - } - event.num++; - event.redo(); - }); - }, - replacePlayerOL:function(player){ - var next=game.createEvent('replacePlayer'); - next.source=player; - next.setContent('replacePlayerOL'); - }, - replacePlayer:function(player){ - var next=game.createEvent('replacePlayer'); - next.source=player; - next.setContent('replacePlayer'); - }, - replacePlayerTwo:function(player,character){ - var next=game.createEvent('replacePlayerTwo'); - next.source=player; - next.character=character; - next.setContent('replacePlayerTwo'); - }, - versusClickToSwap:function(e){ - if(_status.dragged) return; - if(this.link==game.me){ - if(!this.classList.contains('buttonclick')){ - this.animate('buttonclick'); - } - } - else if(_status.event.player==game.me&&!_status.auto){ - game.me.popup('请稍后再换人'); - e.stopPropagation(); - } - else{ - game.modeSwapPlayer(this.link); - } - }, - versusHoverEnemy:function(){ - var uiintro=ui.create.dialog('hidden'); - - if(_status.enemyDied.length){ - uiintro.add('已阵亡'); - uiintro.add([_status.enemyDied,'character']); - } - - uiintro.add('未上场'); - if(_status.enemy.length){ - uiintro.add([_status.enemy,'character']); - } - else{ - uiintro.add('(无)') - } - - return uiintro; - }, - versusHoverFriend:function(){ - var uiintro=ui.create.dialog('hidden'); - - if(_status.friendDied.length){ - uiintro.add('已阵亡'); - uiintro.add([_status.friendDied,'character']); - } - - uiintro.add('未上场'); - if(_status.friend.length){ - uiintro.add([_status.friend,'character']); - } - else{ - uiintro.add('(无)') - } - - return uiintro; - }, - versusHoverHandcards:function(){ - var uiintro=ui.create.dialog('hidden'); - var added=false; - for(var i=0;i0){ - return att+5; - } - return -1; - } - if(player.isTurnedOver()){ - return 5-att; - } - return -att; - }; - "step 1" - if(result.bool){ - player.logSkill('boss_didongjg',result.targets); - result.targets[0].turnOver(); - } - }, - ai:{ - threaten:1.7 - } - }, - boss_lianyujg:{ - trigger:{player:'phaseEnd'}, - unique:true, - content:function(){ - "step 0" - event.players=get.players(player); - "step 1" - if(event.players.length){ - var current=event.players.shift(); - if(current.isEnemyOf(player)){ - player.line(current,'fire'); - current.damage('fire'); - } - event.redo(); - } - }, - ai:{ - threaten:2 - } - }, - boss_mojianjg:{ - trigger:{player:'phaseUseBegin'}, - content:function(){ - var list=game.filterPlayer(function(current){ - return player.canUse('wanjian',current)&¤t.isEnemyOf(player); - }); - list.sort(lib.sort.seat); - player.useCard({name:'wanjian'},list); - }, - ai:{ - threaten:1.8 - } - }, - boss_qiwu:{ - audio:true, - trigger:{player:'useCard'}, - direct:true, - filter:function(event,player){ - if(get.suit(event.card)=='club'){ - return game.hasPlayer(function(current){ - return current.isFriendOf(player)&¤t.isDamaged(); - }); - } - return false; - }, - content:function(){ - "step 0" - var noneed=(trigger.card.name=='tao'&&trigger.targets[0]==player&&player.hp==player.maxHp-1); - player.chooseTarget(get.prompt('boss_qiwu'),function(card,player,target){ - return target.hp0){ - if(noneed&&player==target){ - num=0.5; - } - else if(target.hp==1){ - num+=3; - } - else if(target.hp==2){ - num+=1; - } - } - return num; - } - "step 1" - if(result.bool){ - player.logSkill('qiwu',result.targets); - result.targets[0].recover(); - } - }, - ai:{ - expose:0.3, - threaten:1.5 - } - }, - boss_tianyujg:{ - audio:true, - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.isEnemyOf(player)&&!current.isLinked(); - }); - }, - content:function(){ - "step 0" - event.targets=game.filterPlayer(); - event.targets.sort(lib.sort.seat); - "step 1" - if(event.targets.length){ - var target=event.targets.shift(); - if(!target.isLinked()&&target.isEnemyOf(player)){ - player.line(target,'green'); - target.link(); - } - event.redo(); - } - } - }, - boss_jueji:{ - audio:2, - trigger:{global:'phaseDrawBegin'}, - filter:function(event,player){ - if(event.player.isFriendOf(player)){ - return false; - } - return event.num>0&&event.player!=player&&event.player.hp=0; - }, - forced:true, - content:function(){ - 'step 0' - var targets=game.filterPlayer(function(current){ - return current.isEnemyOf(player); - }); - targets.sort(lib.sort.seat); - event.targets=targets; - player.line(targets,'thunder'); - event.num=targets.length; - 'step 1' - if(event.targets.length){ - event.targets.shift().damage('thunder'); - event.redo(); - } - 'step 2' - player.recover(event.num); - }, - ai:{ - threaten:function(player,target){ - if(target.hp==1) return 2; - if(target.hp==2&&game.players.length<8) return 1.5; - return 0.5; - }, - } - }, - boss_chiying:{ - audio:2, - trigger:{global:'damageBegin'}, - forced:true, - filter:function(event,player){ - if(event.num<=1) return false; - return event.player.isFriendOf(player); - }, - priority:-11, - content:function(){ - trigger.num=1; - } - }, - boss_jingfan:{ - global:'boss_jingfan2', - }, - boss_jingfan2:{ - mod:{ - globalFrom:function(from,to,distance){ - if(to.isEnemyOf(from)) return; - var players=game.filterPlayer(); - for(var i=0;i0){ - if(players[i].hp==1){ - return true; - } - num++; - if(num>=2) return true; - } - } - return false; - }, - content:function(){ - 'step 0' - player.turnOver(); - 'step 1' - var list=game.filterPlayer(function(current){ - return current.isDamaged()&¤t.isFriendOf(player); - }); - player.line(list,'green'); - event.targets=list; - 'step 2' - if(event.targets.length){ - event.targets.shift().recover(); - event.redo(); - } - }, - ai:{ - threaten:1.5, - effect:{ - target:function(card,player,target){ - if(card.name=='guiyoujie') return [0,1]; - } - } - }, - }, - boss_zhenwei:{ - global:'boss_zhenwei2', - ai:{ - threaten:1.5 - } - }, - boss_zhenwei2:{ - mod:{ - globalTo:function(from,to,distance){ - if(to.isFriendOf(from)) return; - var players=game.filterPlayer(); - for(var i=0;i0; - } - } - } - return num>=4; - }, - filter:function(event,player){ - var players=game.filterPlayer(); - for(var i=0;i0; - }, - content:function(){ - player.chooseToDiscard('h',true); - } - }, - boss_tunshi:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - var nh=player.countCards('h'); - return game.hasPlayer(function(current){ - return current.isEnemyOf(player)&¤t.countCards('h')>nh; - }); - }, - content:function(){ - 'step 0' - var nh=player.countCards('h'); - var targets=game.filterPlayer(function(current){ - return current.isEnemyOf(player)&¤t.countCards('h')>nh; - }); - targets.sort(lib.sort.seat); - event.targets=targets; - 'step 1' - if(event.targets.length){ - var current=event.targets.shift(); - current.damage('thunder'); - player.line(current,'thunder'); - event.redo(); - } - } - }, - boss_jiguan:{ - mod:{ - targetEnabled:function(card,player,target){ - if(card.name=='lebu'){ - return false; - } - } - } - }, - boss_gongshenjg:{ - audio:2, - trigger:{player:'phaseEnd'}, - mode:['versus'], - filter:function(event,player){ - if(_status.mode!='jiange') return false; - var players=game.filterPlayer(); - for(var i=0;i=8){ + j-=8; + } + if(list[i][0]=='w'){ + game.players[j].side=true; + game.players[j].setIdentity('wei'); + game.players[j].identity='wei'; + } + else{ + game.players[j].side=false; + game.players[j].setIdentity('shu'); + game.players[j].identity='shu'; + } + if(list[i].indexOf('mech')!=-1){ + game.players[j].type='mech'; + } + else if(list[i].indexOf('boss')!=-1){ + game.players[j].type='boss'; + } + else{ + game.players[j].type='human'; + } + game.players[i].getId(); + } + game.chooseCharacterJiange(); + } + else if(_status.mode=='three'){ + game.chooseCharacterThree(); + } + else{ + game.chooseCharacter(); + } + if(!_status.connectMode&&_status.brawl&&_status.brawl.chooseCharacterBefore){ + _status.brawl.chooseCharacterBefore(); + } + "step 3" + var players=get.players(lib.sort.position); + var info=[]; + for(var i=0;i=4); + } + game.addVideo('init',null,info); + event.trigger('gameStart'); + if(_status.connectMode){ + if(_status.mode=='1v1'){ + _status.first_less=true; + game.gameDraw(_status.firstChoose.next); + game.phaseLoop(_status.firstChoose.next); + } + else if(_status.mode=='2v2'||_status.mode=='3v3'){ + _status.first_less=true; + var firstChoose=game.players.randomGet(); + if(firstChoose.next.side==firstChoose.side){ + firstChoose=firstChoose.next; + } + game.gameDraw(firstChoose); + if(lib.configOL.replace_handcard){ + game.replaceHandcards(firstChoose.previous); + } + game.phaseLoop(firstChoose); + } + else if(_status.mode=='4v4'){ + game.gameDraw(_status.firstAct,function(player){ + if(player==_status.firstAct.previousSeat){ + return 5; + } + return 4; + }); + game.replaceHandcards(_status.firstAct.previous,_status.firstAct.previous.previous); + game.phaseLoop(_status.firstAct); + } + event.finish(); + } + else{ + if(_status.mode=='two'){ + _status.first_less=true; + _status.first_less_forced=true; + var firstChoose=_status.firstAct; + game.gameDraw(firstChoose); + if(get.config('replace_handcard_two')){ + game.replaceHandcards(firstChoose.previous); + } + game.phaseLoop(firstChoose); + } + else if(_status.mode=='four'){ + game.gameDraw(_status.firstAct,function(player){ + if(player==_status.firstAct.previousSeat){ + return 5; + } + return 4; + }); + if(game.me==_status.firstAct.previous||game.me==_status.firstAct.previous.previous){ + game.me.chooseBool('是否置换手牌?'); + event.replaceCard=true; + } + } + else if(_status.mode=='jiange'){ + var firstAct; + for(var i=0;i1){ + for(var i=0;i=lib.storage.number){ + actcount=i-lib.storage.number; + } + else{ + actcount=i+lib.storage.number; + } + } + if(actcount>0){ + actcount--; + } + else{ + actcount=game.players.length-1; + } + firstAct=game.players[actcount]; + break; + } + } + } + else{ + firstAct=game.players[Math.floor(Math.random()*game.players.length)]; + } + } + game.gameDraw(firstAct,4); + _status.first_less=true; + _status.round=0; + if(lib.storage.single_control){ + game.addGlobalSkill('autoswap'); + if(game.players.length>2&&lib.config.show_handcardbutton){ + ui.versushs=ui.create.system('手牌',null,true); + lib.setPopped(ui.versushs,game.versusHoverHandcards,220); + } + } + _status.enemyCount=ui.create.system('杀敌: '+get.cnNumber(0,true),null,true); + _status.friendCount=ui.create.system('阵亡: '+get.cnNumber(0,true),null,true); + + lib.setPopped(_status.friendCount,game.versusHoverFriend); + lib.setPopped(_status.enemyCount,game.versusHoverEnemy); + + if(lib.storage.zhu){ + game.versusPhaseLoop(firstAct); + } + else{ + game.versusPhaseLoop(firstAct); + } + } + if(_status.mode!='four'){ + event.finish(); + } + } + "step 4" + if(event.replaceCard&&result.bool){ + var hs=game.me.getCards('h'); + for(var i=0;i侯选人数:'+lib.configOL.choice_num+'人'); + uiintro.add('
                替补人数:'+lib.configOL.replace_number+'人'); + } + else if(lib.configOL.versus_mode=='2v2'||lib.configOL.versus_mode=='3v3'){ + uiintro.add('
                四号位换牌:'+(lib.configOL.replace_handcard?'开启':'关闭')); + } + uiintro.add('
                出牌时限:'+lib.configOL.choose_timeout+'秒'); + uiintro.add('
                屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); + var last=uiintro.add('
                屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); + if(lib.configOL.banned.length){ + last=uiintro.add('
                禁用武将:'+get.translation(lib.configOL.banned)); + } + if(lib.configOL.bannedcards.length){ + last=uiintro.add('
                禁用卡牌:'+get.translation(lib.configOL.bannedcards)); + } + last.style.paddingBottom='8px'; + }, + getVideoName:function(){ + var str=get.translation(game.me.name); + if(game.me.name2){ + str+='/'+get.translation(game.me.name2); + } + var str2; + switch(_status.mode){ + case 'two':str2='欢乐成双';break; + case 'three':str2='统率三军';break; + case 'four':str2='对决 - 4v4';break; + default:str2='对决 - '+lib.storage.number+'v'+lib.storage.number + } + return [str,str2]; + }, + addRecord:function(bool){ + if(typeof bool=='boolean'){ + var data=lib.config.gameRecord.versus.data; + var identity=get.cnNumber(lib.storage.number)+'人'; + if(!data[identity]){ + data[identity]=[0,0]; + } + if(bool){ + data[identity][0]++; + } + else{ + data[identity][1]++; + } + var list=['一人','两人','三人']; + var str=''; + for(var i=0;i'; + } + } + lib.config.gameRecord.versus.str=str; + game.saveConfig('gameRecord',lib.config.gameRecord); + } + }, + chooseCharacterJiange:function(){ + var next=game.createEvent('chooseCharacter',false); + next.showConfig=true; + next.setContent(function(){ + 'step 0' + ui.arena.classList.add('choose-character'); + for(var i in lib.characterPack.mode_versus){ + lib.character[i]=lib.characterPack.mode_versus[i]; + if(!lib.character[i][4]){ + lib.character[i][4]=[]; + } + } + 'step 1' + for(var i in lib.skill){ + if(lib.skill[i].changeSeat){ + lib.skill[i]={}; + if(lib.translate[i+'_info']){ + lib.translate[i+'_info']='此模式下不可用'; + } + } + } + var list={ + weilist:[],shulist:[], + weimech:[],shumech:[], + weiboss:[],shuboss:[], + } + event.list=list; + if(lib.characterPack.boss){ + for(var i in lib.characterPack.boss){ + if(!lib.character[i]&&lib.characterPack.boss[i][4]){ + if(lib.characterPack.boss[i][4].contains('jiangeboss')|| + lib.characterPack.boss[i][4].contains('jiangemech')){ + lib.character[i]=lib.characterPack.boss[i]; + } + } + } + } + for(var i in lib.character){ + if(lib.character[i][4]){ + if(lib.character[i][4].contains('jiangeboss')){ + list[lib.character[i][1]+'boss'].push(i);continue; + } + else if(lib.character[i][4].contains('jiangemech')){ + list[lib.character[i][1]+'mech'].push(i);continue; + } + } + if(lib.filter.characterDisabled(i)) continue; + if(lib.character[i][1]=='wei'){ + list.weilist.push(i); + } + else if(lib.character[i][1]=='shu'){ + list.shulist.push(i); + } + } + var dialog; + switch(game.me.type){ + case 'human': + for(var i=0;i'; + td.link=i-1; + if(get.distance(_status.firstAct,game.me,'absolute')===i-1){ + td.classList.add('thundertext'); + } + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return; + var current=this.parentNode.querySelector('.thundertext'); + if(current){ + current.classList.remove('thundertext'); + } + this.classList.add('thundertext'); + _status.firstAct=game.me; + for(var i=0;i当前分数:
                '+(lib.storage.ladder.current+(_status.ladder_tmp?40:0))+'
                '); + uiintro.add('
                历史最高:
                '+lib.storage.ladder.top+'
                '); + uiintro.content.lastChild.style.paddingBottom='8px'; + return uiintro; + },180); + _status.ladder=true; + _status.ladder_mmr=0; + } + "step 1" + if(event.current==game.me||(event.four_assign&&event.current.side==game.me.side)){ + var dialog=event.xdialog; + if(!dialog){ + if(get.config('expand_dialog')){ + dialog=event.xdialog||ui.create.characterDialog(event.filterChoice,'expandall'); + } + else{ + dialog=event.xdialog||ui.create.characterDialog(event.filterChoice); + } + } + var names=[]; + for(var i=0;ib?1:-1; + } + if(lib.storage.choice=='∞'){ + list.sort(sortByGroup); + } + else{ + list.randomSort(); + } + _status.list=list; + var choice=(lib.storage.choice=='∞')?list.length:lib.storage.choice; + event.dialog=ui.create.dialog('选择角色',[list.slice(0,choice),'character']); + event.dialog.classList.add('fixed'); + // for(var i=0;i=dialog.versus_number.link+dialog.replace_number.link){ + event.fill.firstChild.innerHTML='开始'; + _status.choosefinished=true; + if(ui.cheat){ + ui.cheat.close(); + delete ui.cheat; + } + } + game.save('zhu',dialog.versus_zhu.link); + if(lib.storage.zhu){ + // dialog.versus_only_zhu.parentNode.classList.remove('disabled'); + dialog.versus_main_zhu.parentNode.classList.remove('disabled'); + } + else{ + // dialog.versus_only_zhu.parentNode.classList.add('disabled'); + dialog.versus_main_zhu.parentNode.classList.add('disabled'); + } + // game.save('only_zhu',dialog.versus_only_zhu.link); + game.save('main_zhu',dialog.versus_main_zhu.link); + game.save('assign_enemy',dialog.versus_assign_enemy.link); + game.save('seat_order',dialog.versus_seat_order.link); + // game.save('cross_seat',dialog.versus_cross_seat.link); + game.save('noreplace_end',dialog.versus_noreplace_end.link); + game.save('single_control',dialog.versus_single_control.link); + switch(lib.storage.seat_order){ + case '交叉':lib.storage.cross_seat=true;lib.storage.random_seat=false;break; + case '随机':lib.storage.cross_seat=false;lib.storage.random_seat=true;break; + default:lib.storage.cross_seat=false;lib.storage.random_seat=false; + } + game.saveConfig('first_less',dialog.versus_first_less.link,true); + game.save('number',dialog.versus_number.link); + game.save('versus_reward',dialog.versus_reward.link); + game.save('versus_punish',dialog.versus_punish.link); + game.save('replace_number',dialog.replace_number.link); + game.save('choice',dialog.choice.link); + var count,i; + if(dialog.buttons.length>lib.storage.choice){ + count=dialog.buttons.length-lib.storage.choice; + var removed=[]; + for(i=dialog.buttons.length-1;i>=0&&count>0;i--){ + if(dialog.buttons[i].classList.contains('target')==false&& + dialog.buttons[i].classList.contains('glow')==false){ + dialog.buttons[i].remove(); + _status.list.remove(dialog.buttons[i].link); + removed.push(dialog.buttons[i].link) + dialog.buttons.splice(i,1); + count--; + } + } + for(i=0;i=4){ + ui.arena.setNumber(parseInt(ui.arena.dataset.number)+1); + for(var i=0;i=4){ + // ui.fakemebg.show(); + game.onSwapControl(); + } + }); + }, + chooseCharacterOL:function(){ + switch(lib.configOL.versus_mode){ + case '1v1':game.chooseCharacterOL1();break; + case '2v2':game.chooseCharacterOL2();break; + case '3v3':game.chooseCharacterOL3();break; + case '4v4':game.chooseCharacterOL4();break; + } + }, + chooseCharacterOL4:function(){ + var next=game.createEvent('chooseCharacter',false); + next.setContent(function(){ + "step 0" + var list=[ + ['zhong','ezhong','ezhong','zhong','zhong','ezhong','ezhong','zhong'], + ['zhong','ezhong','zhong','ezhong','ezhong','zhong','ezhong','zhong'], + ['zhong','ezhong','ezhong','zhong','ezhong','zhong','zhong','ezhong'], + ['zhong','ezhong','zhong','ezhong','zhong','ezhong','zhong','ezhong'], + ['zhong','ezhong','ezhong','zhong','ezhong','zhong','ezhong','zhong'], + ].randomGet(); + var rand1=Math.floor(Math.random()*4); + var rand2=Math.floor(Math.random()*4); + for(var i=0;i0.4){ + return (rank>=6)?Math.random():-Math.random(); + } + else if(seed>0.1){ + return (rank>=4&&rank<6)?Math.random():-Math.random(); + } + else{ + return (rank<4)?Math.random():-Math.random(); + } + }).set('selected',_status.event.selected).set('dialog',event.videoId).set('seed',Math.random()); + "step 2" + event.selected.push(result.links[0]); + game.broadcastAll(function(player,name,zhu){ + player.classList.remove('selectedx'); + player.init(name); + if(player.node.name_seat){ + player.node.name_seat.remove(); + } + },event.current,result.links[0]); + if(event.current.identity=='zhu'){ + event.current.hp++; + event.current.maxHp++; + event.current.update(); + } + event.current.classList.remove('selectedx'); + for(var i=0;i=2*Math.max(game.friend.length,game.enemy.length)){ + _status.round=0; + for(var i=0;ib.countCards('j')) return 1; + return a.hp-b.hp; + }) + event.player=list[0]; + event.goto(0); + } + else{ + game.me.chooseTarget('选择要行动的角色',true,function(card,player,target){ + return (target.classList.contains('acted')==false&&target.side==game.me.side); + }).includeOut=true; + } + } + else{ + event.player=event.player.next; + event.goto(0); + } + "step 2" + event.player=result.targets[0]; + event.goto(0); + }); + }, + phaseLoopJiange:function(){ + var next=game.createEvent('phaseLoop'); + next.num=0; + next.setContent(function(){ + if(event.num>=8){ + event.num-=8; + } + var player=_status.actlist[event.num]; + if(player.isAlive()){ + player.phase(); + } + event.num++; + event.redo(); + }); + }, + replacePlayerOL:function(player){ + var next=game.createEvent('replacePlayer'); + next.source=player; + next.setContent('replacePlayerOL'); + }, + replacePlayer:function(player){ + var next=game.createEvent('replacePlayer'); + next.source=player; + next.setContent('replacePlayer'); + }, + replacePlayerTwo:function(player,character){ + var next=game.createEvent('replacePlayerTwo'); + next.source=player; + next.character=character; + next.setContent('replacePlayerTwo'); + }, + versusClickToSwap:function(e){ + if(_status.dragged) return; + if(this.link==game.me){ + if(!this.classList.contains('buttonclick')){ + this.animate('buttonclick'); + } + } + else if(_status.event.player==game.me&&!_status.auto){ + game.me.popup('请稍后再换人'); + e.stopPropagation(); + } + else{ + game.modeSwapPlayer(this.link); + } + }, + versusHoverEnemy:function(){ + var uiintro=ui.create.dialog('hidden'); + + if(_status.enemyDied.length){ + uiintro.add('已阵亡'); + uiintro.add([_status.enemyDied,'character']); + } + + uiintro.add('未上场'); + if(_status.enemy.length){ + uiintro.add([_status.enemy,'character']); + } + else{ + uiintro.add('(无)') + } + + return uiintro; + }, + versusHoverFriend:function(){ + var uiintro=ui.create.dialog('hidden'); + + if(_status.friendDied.length){ + uiintro.add('已阵亡'); + uiintro.add([_status.friendDied,'character']); + } + + uiintro.add('未上场'); + if(_status.friend.length){ + uiintro.add([_status.friend,'character']); + } + else{ + uiintro.add('(无)') + } + + return uiintro; + }, + versusHoverHandcards:function(){ + var uiintro=ui.create.dialog('hidden'); + var added=false; + for(var i=0;i0){ + return att+5; + } + return -1; + } + if(player.isTurnedOver()){ + return 5-att; + } + return -att; + }; + "step 1" + if(result.bool){ + player.logSkill('boss_didongjg',result.targets); + result.targets[0].turnOver(); + } + }, + ai:{ + threaten:1.7 + } + }, + boss_lianyujg:{ + trigger:{player:'phaseEnd'}, + unique:true, + content:function(){ + "step 0" + event.players=get.players(player); + "step 1" + if(event.players.length){ + var current=event.players.shift(); + if(current.isEnemyOf(player)){ + player.line(current,'fire'); + current.damage('fire'); + } + event.redo(); + } + }, + ai:{ + threaten:2 + } + }, + boss_mojianjg:{ + trigger:{player:'phaseUseBegin'}, + content:function(){ + var list=game.filterPlayer(function(current){ + return player.canUse('wanjian',current)&¤t.isEnemyOf(player); + }); + list.sort(lib.sort.seat); + player.useCard({name:'wanjian'},list); + }, + ai:{ + threaten:1.8 + } + }, + boss_qiwu:{ + audio:true, + trigger:{player:'useCard'}, + direct:true, + filter:function(event,player){ + if(get.suit(event.card)=='club'){ + return game.hasPlayer(function(current){ + return current.isFriendOf(player)&¤t.isDamaged(); + }); + } + return false; + }, + content:function(){ + "step 0" + var noneed=(trigger.card.name=='tao'&&trigger.targets[0]==player&&player.hp==player.maxHp-1); + player.chooseTarget(get.prompt('boss_qiwu'),function(card,player,target){ + return target.hp0){ + if(noneed&&player==target){ + num=0.5; + } + else if(target.hp==1){ + num+=3; + } + else if(target.hp==2){ + num+=1; + } + } + return num; + } + "step 1" + if(result.bool){ + player.logSkill('qiwu',result.targets); + result.targets[0].recover(); + } + }, + ai:{ + expose:0.3, + threaten:1.5 + } + }, + boss_tianyujg:{ + audio:true, + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.isEnemyOf(player)&&!current.isLinked(); + }); + }, + content:function(){ + "step 0" + event.targets=game.filterPlayer(); + event.targets.sort(lib.sort.seat); + "step 1" + if(event.targets.length){ + var target=event.targets.shift(); + if(!target.isLinked()&&target.isEnemyOf(player)){ + player.line(target,'green'); + target.link(); + } + event.redo(); } } - if(!event.isMine()||event.cards2.length==0){ + }, + boss_jueji:{ + audio:2, + trigger:{global:'phaseDrawBegin'}, + filter:function(event,player){ + if(event.player.isFriendOf(player)){ + return false; + } + return event.num>0&&event.player!=player&&event.player.hp=0; + }, + forced:true, + content:function(){ + 'step 0' + var targets=game.filterPlayer(function(current){ + return current.isEnemyOf(player); + }); + targets.sort(lib.sort.seat); + event.targets=targets; + player.line(targets,'thunder'); + event.num=targets.length; + 'step 1' + if(event.targets.length){ + event.targets.shift().damage('thunder'); + event.redo(); + } + 'step 2' + player.recover(event.num); + }, + ai:{ + threaten:function(player,target){ + if(target.hp==1) return 2; + if(target.hp==2&&game.players.length<8) return 1.5; + return 0.5; + }, + } + }, + boss_chiying:{ + audio:2, + trigger:{global:'damageBegin'}, + forced:true, + filter:function(event,player){ + if(event.num<=1) return false; + return event.player.isFriendOf(player); + }, + priority:-11, + content:function(){ + trigger.num=1; + } + }, + boss_jingfan:{ + global:'boss_jingfan2', + }, + boss_jingfan2:{ + mod:{ + globalFrom:function(from,to,distance){ + if(to.isEnemyOf(from)) return; + var players=game.filterPlayer(); + for(var i=0;i0){ + if(players[i].hp==1){ + return true; + } + num++; + if(num>=2) return true; + } + } + return false; + }, + content:function(){ + 'step 0' + player.turnOver(); + 'step 1' + var list=game.filterPlayer(function(current){ + return current.isDamaged()&¤t.isFriendOf(player); + }); + player.line(list,'green'); + event.targets=list; + 'step 2' + if(event.targets.length){ + event.targets.shift().recover(); + event.redo(); + } + }, + ai:{ + threaten:1.5, + effect:{ + target:function(card,player,target){ + if(card.name=='guiyoujie') return [0,1]; + } + } + }, + }, + boss_zhenwei:{ + global:'boss_zhenwei2', + ai:{ + threaten:1.5 + } + }, + boss_zhenwei2:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.isFriendOf(from)) return; + var players=game.filterPlayer(); + for(var i=0;i0; + } + } + } + return num>=4; + }, + filter:function(event,player){ + var players=game.filterPlayer(); + for(var i=0;i0; + }, + content:function(){ + player.chooseToDiscard('h',true); + } + }, + boss_tunshi:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + var nh=player.countCards('h'); + return game.hasPlayer(function(current){ + return current.isEnemyOf(player)&¤t.countCards('h')>nh; + }); + }, + content:function(){ + 'step 0' + var nh=player.countCards('h'); + var targets=game.filterPlayer(function(current){ + return current.isEnemyOf(player)&¤t.countCards('h')>nh; + }); + targets.sort(lib.sort.seat); + event.targets=targets; + 'step 1' + if(event.targets.length){ + var current=event.targets.shift(); + current.damage('thunder'); + player.line(current,'thunder'); + event.redo(); + } + } + }, + boss_jiguan:{ + mod:{ + targetEnabled:function(card,player,target){ + if(card.name=='lebu'){ + return false; + } + } + } + }, + boss_gongshenjg:{ + audio:2, + trigger:{player:'phaseEnd'}, + mode:['versus'], + filter:function(event,player){ + if(_status.mode!='jiange') return false; + var players=game.filterPlayer(); + for(var i=0;i0&&target.hasJudge('lebu')){ + return 0.1; + } + if(player.countCards('h')>player.hp){ + if(target==player) return Math.max(1,att-2); + } + if(target==player) return att+5; + return att; + } + } + "step 2" + if(result&&result.targets&&result.targets.length){ + event.target=result.targets[0]; + } + if(event.cards2.length){ + player.line(event.target,'green'); + event.target.gain(event.cards2,'gain2','log'); + } + }, + ai:{ + threaten:1.3 + } + }, + boss_biantian4:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + for(var i=0;i0&&target.hasJudge('lebu')){ - return 0.1; - } - if(player.countCards('h')>player.hp){ - if(target==player) return Math.max(1,att-2); - } - if(target==player) return att+5; - return att; + "step 2" + if(result.bool&&result.targets&&result.targets.length){ + player.line(result.targets,'green'); + result.targets[0].loseHp(); } + "step 3" + player.gain(event.cards); + player.$draw(event.cards); + game.delay(); + }, + ai:{ + threaten:1.4 } - "step 2" - if(result&&result.targets&&result.targets.length){ - event.target=result.targets[0]; - } - if(event.cards2.length){ - player.line(event.target,'green'); - event.target.gain(event.cards2,'gain2','log'); - } - }, - ai:{ - threaten:1.3 - } - }, - boss_biantian4:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - content:function(){ - for(var i=0;i-3) return 0; - var eff=get.damageEffect(target,player,player,'fire'); - if(eff>0){ - return eff+target.countCards('e')/2; - } - return 0; - } - "step 1" - if(result.bool){ - player.logSkill('boss_tianyun',result.targets,'fire'); - player.loseHp(); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - "step 2" - if(event.target){ - event.target.damage(2,'fire'); - } - "step 3" - if(event.target){ - var es=event.target.getCards('e'); - if(es.length){ - event.target.discard(es); - } - } - }, - ai:{ - threaten:2 - } - }, - versus_ladder:{ - trigger:{global:['damageEnd','recoverEnd','dieEnd','gainEnd','phaseDiscardEnd']}, - forced:true, - popup:false, - silent:true, - filter:function(event,player){ - if(!_status.ladder) return false; - if(event._ladder_mmr_counted) return false; - if(!event.source) return false; - return event.source==game.me||event.player==game.me; - }, - content:function(){ - switch(event.triggername){ - case 'damageEnd':{ - if(trigger.source.side!=trigger.player.side){ - if(trigger.source==game.me){ - _status.ladder_mmr+=0.5*Math.max(1,trigger.num); - } - else{ - _status.ladder_mmr+=0.2*Math.max(1,trigger.num); - } - } - break; - } - case 'recoverEnd':{ - if(trigger.source!=trigger.player){ - if(trigger.source==game.me){ - if(trigger.player.side==game.me.side){ - _status.ladder_mmr+=0.5*trigger.num; - } - else{ - _status.ladder_mmr-=0.3*trigger.num; - } - } - } - else{ - _status.ladder_mmr+=0.3*trigger.num; - } - break; - } - case 'dieEnd':{ - if(trigger.source==game.me&&trigger.player.side!=game.me.side){ - _status.ladder_mmr+=2; - } - break; - } - case 'gainEnd':{ - if(trigger.cards&&trigger.cards.length){ - if(trigger.source==game.me&&trigger.player!=game.me){ - if(trigger.player.side==game.me.side){ - _status.ladder_mmr+=0.3*trigger.cards.length; - } - else{ - _status.ladder_mmr-=0.1*trigger.cards.length; - } - } - else{ - if(trigger.source){ - if(trigger.source.side!=game.me.side){ - _status.ladder_mmr+=0.3*trigger.cards.length; - } - } - else{ - _status.ladder_mmr+=0.1*trigger.cards.length; - } - } - } - break; - } - case 'phaseDiscardEnd':{ - if(trigger.player==player){ - if(trigger.cards&&trigger.cards.length){ - _status.ladder_mmr-=0.2*trigger.cards.length; - } - } - break; - } - } - trigger._ladder_mmr_counted=true; - } - } - }, - element:{ - content:{ - replacePlayer:function(){ - "step 0" - var list=(source.side==game.me.side)?_status.friend:_status.enemy; - if(list.length==0){ - // if(game.friend.contains(source)){ - // game.over(false); - // } - // else{ - // game.over(true); - // } - game.friend.remove(source); - game.enemy.remove(source); - if(game.friend.length==0) game.over(false); - else if(game.enemy.length==0) game.over(true); - if(game.friendZhu&&game.friendZhu.classList.contains('dead')&&game.friend.length){ - game.friendZhu=game.friend[0]; - game.friendZhu.setIdentity(_status.color+'Zhu'); - } - if(game.enemyZhu&&game.enemyZhu.classList.contains('dead')&&game.enemy.length){ - game.enemyZhu=game.enemy[0]; - game.enemyZhu.setIdentity(!_status.color+'Zhu'); - } - event.finish(); - return; - } - if(source.side==game.me.side&&list.length>1&&(game.me==game.friendZhu||(lib.storage.zhu&&lib.storage.single_control))&& - !_status.auto){ - event.dialog=ui.create.dialog('选择替补角色',[list,'character']); - event.filterButton=function(){return true;}; - event.player=game.me; - event.forced=true; - event.custom.replace.confirm=function(){ - event.character=ui.selected.buttons[0].link; - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - game.resume(); - } - game.check(); - game.pause(); - } - else{ - event.character=list[Math.floor(Math.random()*list.length)]; - } - "step 1" - game.uncheck(); - _status.friend.remove(event.character); - _status.enemy.remove(event.character); - source.revive(null,false); - game.additionaldead.push({ - name:source.name, - stat:source.stat - }); - game.addVideo('reinit',source,[event.character,get.translation(source.side+'Color')]); - source.uninit(); - source.init(event.character); - game.log(source,'出场'); - source.node.identity.dataset.color=get.translation(source.side+'Color'); - source.draw(4); - _status.event.parent.parent.parent.untrigger(false,source); - var evt=_status.event.parent.parent.parent; - for(var i=0;i<100;i++){ - evt=evt.parent; - if(evt.player==source){ - evt.finish(); - } - if(evt.name=='phase'){ - break; - } - } - if(lib.storage.single_control){ - game.onSwapControl(); - } - "step 2" - // if(_status.currentPhase==source){ - // source.skip('phase'); - // } - }, - replacePlayerTwo:function(){ - 'step 0' - game.delay(); - 'step 1' - source.revive(null,false); - game.additionaldead.push({ - name:source.name, - stat:source.stat - }); - game.addVideo('reinit',source,[event.character,get.translation(source.side+'Color')]); - source.uninit(); - source.init(event.character); - game.log(source,'出场'); - // source.node.identity.dataset.color=source.side+'zhu'; - source.draw(4); - _status.event.parent.parent.parent.untrigger(false,source); - var evt=_status.event.parent.parent.parent; - for(var i=0;i<100;i++){ - evt=evt.parent; - if(evt.player==source){ - evt.finish(); - } - if(evt.name=='phase'){ - break; - } - } - }, - replacePlayerOL:function(){ - 'step 0' - game.delay(); - 'step 1' - if(event.source.side==game.me.side){ - if(_status.friend.length==1){ - event.directresult=_status.friend[0]; - } - else if(event.source==game.me){ - if(_status.auto){ - event.directresult=_status.friend.randomGet(); - } - } - else{ - if(!event.source.isOnline()){ - event.directresult=_status.friend.randomGet(); - } - } - } - else{ - if(_status.enemy.length==1){ - event.directresult=_status.enemy[0]; - } - else{ - if(!event.source.isOnline()){ - event.directresult=_status.enemy.randomGet(); - } - } - } - if(!event.directresult){ - if(event.source==game.me){ - event.dialog=ui.create.dialog('选择替补角色',[_status.friend,'character']); - event.filterButton=function(){return true}; - event.player=game.me; - event.forced=true; - event.custom.replace.confirm=function(){ - event.directresult=ui.selected.buttons[0].link; - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - game.resume(); - } - event.switchToAuto=function(){ - event.directresult=_status.friend.randomGet(); - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - }; - game.check(); - game.pause(); - } - else{ - event.source.send(function(player){ - if(_status.auto){ - _status.event._result=_status.friend.randomGet(); - } - else{ - var next=game.createEvent('replacePlayer'); - next.source=player; - next.setContent(function(){ - event.dialog=ui.create.dialog('选择替补角色',[_status.friend,'character']); - event.filterButton=function(){return true}; - event.player=event.source; - event.forced=true; - event.custom.replace.confirm=function(){ - event.result=ui.selected.buttons[0].link; - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - game.resume(); - game.uncheck(); - } - event.switchToAuto=function(){ - event.result=_status.friend.randomGet(); - event.dialog.close(); - if(ui.confirm) ui.confirm.close(); - delete event.player; - game.uncheck(); - }; - game.check(); - game.pause(); - }); - } - game.resume(); - },event.source); - event.source.wait(); - game.pause(); - } - } - 'step 2' - game.uncheck(); - if(!event.directresult){ - if(event.resultOL){ - event.directresult=event.resultOL[source.playerid]; - } - if(!event.directresult||event.directresult=='ai'){ - if(source.side==game.me.side){ - event.directresult=_status.friend.randomGet(); - } - else{ - event.directresult=_status.enemy.randomGet(); - } - } - } - var name=event.directresult; - var color=source.node.identity.dataset.color; - game.additionaldead.push({ - name:source.name, - stat:source.stat - }); + }, + boss_yuhuojg:{ + audio:true, + trigger:{player:'damageBefore'}, + filter:function(event){ + return event.nature=='fire'; + }, + forced:true, + content:function(){ + trigger.untrigger(); + trigger.finish(); + }, + ai:{ + nofire:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'fireDamage')) return 0; + } + } + } + }, + boss_tianyun:{ + trigger:{player:'phaseEnd'}, + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('boss_tianyun'),function(card,player,target){ + return target.isEnemyOf(player); + }).ai=function(target){ + if(player.hp<=1) return 0; + if(get.attitude(player,target)>-3) return 0; + var eff=get.damageEffect(target,player,player,'fire'); + if(eff>0){ + return eff+target.countCards('e')/2; + } + return 0; + } + "step 1" + if(result.bool){ + player.logSkill('boss_tianyun',result.targets,'fire'); + player.loseHp(); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" + if(event.target){ + event.target.damage(2,'fire'); + } + "step 3" + if(event.target){ + var es=event.target.getCards('e'); + if(es.length){ + event.target.discard(es); + } + } + }, + ai:{ + threaten:2 + } + }, + versus_ladder:{ + trigger:{global:['damageEnd','recoverEnd','dieEnd','gainEnd','phaseDiscardEnd']}, + forced:true, + popup:false, + silent:true, + filter:function(event,player){ + if(!_status.ladder) return false; + if(event._ladder_mmr_counted) return false; + if(!event.source) return false; + return event.source==game.me||event.player==game.me; + }, + content:function(){ + switch(event.triggername){ + case 'damageEnd':{ + if(trigger.source.side!=trigger.player.side){ + if(trigger.source==game.me){ + _status.ladder_mmr+=0.5*Math.max(1,trigger.num); + } + else{ + _status.ladder_mmr+=0.2*Math.max(1,trigger.num); + } + } + break; + } + case 'recoverEnd':{ + if(trigger.source!=trigger.player){ + if(trigger.source==game.me){ + if(trigger.player.side==game.me.side){ + _status.ladder_mmr+=0.5*trigger.num; + } + else{ + _status.ladder_mmr-=0.3*trigger.num; + } + } + } + else{ + _status.ladder_mmr+=0.3*trigger.num; + } + break; + } + case 'dieEnd':{ + if(trigger.source==game.me&&trigger.player.side!=game.me.side){ + _status.ladder_mmr+=2; + } + break; + } + case 'gainEnd':{ + if(trigger.cards&&trigger.cards.length){ + if(trigger.source==game.me&&trigger.player!=game.me){ + if(trigger.player.side==game.me.side){ + _status.ladder_mmr+=0.3*trigger.cards.length; + } + else{ + _status.ladder_mmr-=0.1*trigger.cards.length; + } + } + else{ + if(trigger.source){ + if(trigger.source.side!=game.me.side){ + _status.ladder_mmr+=0.3*trigger.cards.length; + } + } + else{ + _status.ladder_mmr+=0.1*trigger.cards.length; + } + } + } + break; + } + case 'phaseDiscardEnd':{ + if(trigger.player==player){ + if(trigger.cards&&trigger.cards.length){ + _status.ladder_mmr-=0.2*trigger.cards.length; + } + } + break; + } + } + trigger._ladder_mmr_counted=true; + } + } + }, + element:{ + content:{ + replacePlayer:function(){ + "step 0" + var list=(source.side==game.me.side)?_status.friend:_status.enemy; + if(list.length==0){ + // if(game.friend.contains(source)){ + // game.over(false); + // } + // else{ + // game.over(true); + // } + game.friend.remove(source); + game.enemy.remove(source); + if(game.friend.length==0) game.over(false); + else if(game.enemy.length==0) game.over(true); + if(game.friendZhu&&game.friendZhu.classList.contains('dead')&&game.friend.length){ + game.friendZhu=game.friend[0]; + game.friendZhu.setIdentity(_status.color+'Zhu'); + } + if(game.enemyZhu&&game.enemyZhu.classList.contains('dead')&&game.enemy.length){ + game.enemyZhu=game.enemy[0]; + game.enemyZhu.setIdentity(!_status.color+'Zhu'); + } + event.finish(); + return; + } + if(source.side==game.me.side&&list.length>1&&(game.me==game.friendZhu||(lib.storage.zhu&&lib.storage.single_control))&& + !_status.auto){ + event.dialog=ui.create.dialog('选择替补角色',[list,'character']); + event.filterButton=function(){return true;}; + event.player=game.me; + event.forced=true; + event.custom.replace.confirm=function(){ + event.character=ui.selected.buttons[0].link; + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + game.resume(); + } + game.check(); + game.pause(); + } + else{ + event.character=list[Math.floor(Math.random()*list.length)]; + } + "step 1" + game.uncheck(); + _status.friend.remove(event.character); + _status.enemy.remove(event.character); + source.revive(null,false); + game.additionaldead.push({ + name:source.name, + stat:source.stat + }); + game.addVideo('reinit',source,[event.character,get.translation(source.side+'Color')]); + source.uninit(); + source.init(event.character); + game.log(source,'出场'); + source.node.identity.dataset.color=get.translation(source.side+'Color'); + source.draw(4); + _status.event.parent.parent.parent.untrigger(false,source); + var evt=_status.event.parent.parent.parent; + for(var i=0;i<100;i++){ + evt=evt.parent; + if(evt.player==source){ + evt.finish(); + } + if(evt.name=='phase'){ + break; + } + } + if(lib.storage.single_control){ + game.onSwapControl(); + } + "step 2" + // if(_status.currentPhase==source){ + // source.skip('phase'); + // } + }, + replacePlayerTwo:function(){ + 'step 0' + game.delay(); + 'step 1' + source.revive(null,false); + game.additionaldead.push({ + name:source.name, + stat:source.stat + }); + game.addVideo('reinit',source,[event.character,get.translation(source.side+'Color')]); + source.uninit(); + source.init(event.character); + game.log(source,'出场'); + // source.node.identity.dataset.color=source.side+'zhu'; + source.draw(4); + _status.event.parent.parent.parent.untrigger(false,source); + var evt=_status.event.parent.parent.parent; + for(var i=0;i<100;i++){ + evt=evt.parent; + if(evt.player==source){ + evt.finish(); + } + if(evt.name=='phase'){ + break; + } + } + }, + replacePlayerOL:function(){ + 'step 0' + game.delay(); + 'step 1' + if(event.source.side==game.me.side){ + if(_status.friend.length==1){ + event.directresult=_status.friend[0]; + } + else if(event.source==game.me){ + if(_status.auto){ + event.directresult=_status.friend.randomGet(); + } + } + else{ + if(!event.source.isOnline()){ + event.directresult=_status.friend.randomGet(); + } + } + } + else{ + if(_status.enemy.length==1){ + event.directresult=_status.enemy[0]; + } + else{ + if(!event.source.isOnline()){ + event.directresult=_status.enemy.randomGet(); + } + } + } + if(!event.directresult){ + if(event.source==game.me){ + event.dialog=ui.create.dialog('选择替补角色',[_status.friend,'character']); + event.filterButton=function(){return true}; + event.player=game.me; + event.forced=true; + event.custom.replace.confirm=function(){ + event.directresult=ui.selected.buttons[0].link; + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + game.resume(); + } + event.switchToAuto=function(){ + event.directresult=_status.friend.randomGet(); + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + }; + game.check(); + game.pause(); + } + else{ + event.source.send(function(player){ + if(_status.auto){ + _status.event._result=_status.friend.randomGet(); + } + else{ + var next=game.createEvent('replacePlayer'); + next.source=player; + next.setContent(function(){ + event.dialog=ui.create.dialog('选择替补角色',[_status.friend,'character']); + event.filterButton=function(){return true}; + event.player=event.source; + event.forced=true; + event.custom.replace.confirm=function(){ + event.result=ui.selected.buttons[0].link; + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + game.resume(); + game.uncheck(); + } + event.switchToAuto=function(){ + event.result=_status.friend.randomGet(); + event.dialog.close(); + if(ui.confirm) ui.confirm.close(); + delete event.player; + game.uncheck(); + }; + game.check(); + game.pause(); + }); + } + game.resume(); + },event.source); + event.source.wait(); + game.pause(); + } + } + 'step 2' + game.uncheck(); + if(!event.directresult){ + if(event.resultOL){ + event.directresult=event.resultOL[source.playerid]; + } + if(!event.directresult||event.directresult=='ai'){ + if(source.side==game.me.side){ + event.directresult=_status.friend.randomGet(); + } + else{ + event.directresult=_status.enemy.randomGet(); + } + } + } + var name=event.directresult; + var color=source.node.identity.dataset.color; + game.additionaldead.push({ + name:source.name, + stat:source.stat + }); - game.broadcastAll(function(source,name,color){ - _status.friend.remove(name); - _status.enemy.remove(name); - source.revive(null,false); - source.uninit(); - source.init(name); - source.node.identity.dataset.color=color; - if(source==game.me){ - ui.arena.classList.remove('selecting'); - } - },source,name,color); - game.log(source,'出场'); + game.broadcastAll(function(source,name,color){ + _status.friend.remove(name); + _status.enemy.remove(name); + source.revive(null,false); + source.uninit(); + source.init(name); + source.node.identity.dataset.color=color; + if(source==game.me){ + ui.arena.classList.remove('selecting'); + } + },source,name,color); + game.log(source,'出场'); - source.draw(4); - _status.event.parent.parent.parent.untrigger(false,source); - game.addVideo('reinit',source,[name,color]); - }, - }, - player:{ - dieAfter:function(source){ - if(_status.connectMode){ - if(_status.mode=='1v1'||_status.mode=='3v3'){ - game.broadcastAll(function(dead){ - if(dead.side==game.me.side){ - _status.friendDied.push(dead.name); - _status.friendCount.innerHTML='阵亡: '+get.cnNumber(_status.friendDied.length,true); - } - else{ - _status.enemyDied.push(dead.name); - _status.enemyCount.innerHTML='杀敌: '+get.cnNumber(_status.enemyDied.length,true); - } - },this); - if(this.side==game.me.side){ - if(_status.friend.length==0){ - game.over(false); - return; - } - } - else{ - if(_status.enemy.length==0){ - game.over(true); - return; - } - } - game.replacePlayerOL(this); - } - else if(_status.mode=='2v2'){ - if(_status.replacetwo){ + source.draw(4); + _status.event.parent.parent.parent.untrigger(false,source); + game.addVideo('reinit',source,[name,color]); + }, + }, + player:{ + dieAfter:function(source){ + if(_status.connectMode){ + if(_status.mode=='1v1'||_status.mode=='3v3'){ + game.broadcastAll(function(dead){ + if(dead.side==game.me.side){ + _status.friendDied.push(dead.name); + _status.friendCount.innerHTML='阵亡: '+get.cnNumber(_status.friendDied.length,true); + } + else{ + _status.enemyDied.push(dead.name); + _status.enemyCount.innerHTML='杀敌: '+get.cnNumber(_status.enemyDied.length,true); + } + },this); + if(this.side==game.me.side){ + if(_status.friend.length==0){ + game.over(false); + return; + } + } + else{ + if(_status.enemy.length==0){ + game.over(true); + return; + } + } + game.replacePlayerOL(this); + } + else if(_status.mode=='2v2'){ + if(_status.replacetwo){ - } - var friend; - for(var i=0;i=side2.length+2){ - game.me.showGiveup(); - } - } - } - return; - } - else if(_status.mode=='two'){ - var friend; - for(var i=0;i=side2.length+2){ + game.me.showGiveup(); + } + } + } + return; + } + else if(_status.mode=='two'){ + var friend; + for(var i=0;i2)){ - if(game.friend.contains(this)){ - game.over(false); - } - else{ - game.over(true); - } - } - else if(game.friend.length==1&&this==game.friend[0]&&_status.friend.length==0){ - game.over(false); - } - else if(game.enemy.length==1&&this==game.enemy[0]&&_status.enemy.length==0){ - game.over(true); - } - else{ - if(source){ - if(source.side!=this.side){ - if(lib.storage.versus_reward){ - source.draw(lib.storage.versus_reward); - } - } - else{ - if(lib.storage.versus_punish=='弃牌'){ - source.discard(source.getCards('he')); - } - else if(lib.storage.versus_punish=='摸牌'&&lib.storage.versus_reward){ - source.draw(lib.storage.versus_reward); - } - } - } - else{ - game.delay(); - } - game.replacePlayer(this); - } - } - } - } - }, - get:{ - rawAttitude:function(from,to){ - if(from.side==to.side){ - if(to.identity=='zhu'){ - if(_status.connectMode){ - if(_status.mode=='4v4') return 10; - } - else{ - if(lib.storage.main_zhu||_status.mode=='four') return 10; - } - } - return 6; - } - else{ - if(to.identity=='zhu'){ - if(_status.connectMode){ - if(_status.mode=='4v4') return -10; - } - else{ - if(lib.storage.main_zhu||_status.mode=='four') return -10; - } - } - return -6; - } - }, - }, - help:{ - '对决模式': - '
                2v2 替补模式
                • 选将时额外选择一名替补武将,阵亡时使用自己的替补武将上场,无替补时改为用队友的替补武将,两人均无替补时游戏结束'+ - '
                • 杀死敌方武将摸3张牌,杀死友方武将弃置所有牌
                '+ - '
                4v4
                • 双方各有一名主公和三名忠臣,杀死对方主公获胜
                • '+ - '8号位游戏开始时额外摸一张牌,7、8号位可在游戏开始时置换一次手牌
                • '+ - '杀死对方忠臣摸2+x张牌,x为对方(含刚被杀的忠臣)与己方的存活人数之差;主公杀死己方忠臣须弃置所有牌', - } + var list=(this.side==game.me.side)?_status.friend:_status.enemy; + if((list.length==0&&lib.storage.noreplace_end)|| + (lib.storage.zhu&&lib.storage.main_zhu&&this.identity=='zhu'&&game.players.length>2)){ + if(game.friend.contains(this)){ + game.over(false); + } + else{ + game.over(true); + } + } + else if(game.friend.length==1&&this==game.friend[0]&&_status.friend.length==0){ + game.over(false); + } + else if(game.enemy.length==1&&this==game.enemy[0]&&_status.enemy.length==0){ + game.over(true); + } + else{ + if(source){ + if(source.side!=this.side){ + if(lib.storage.versus_reward){ + source.draw(lib.storage.versus_reward); + } + } + else{ + if(lib.storage.versus_punish=='弃牌'){ + source.discard(source.getCards('he')); + } + else if(lib.storage.versus_punish=='摸牌'&&lib.storage.versus_reward){ + source.draw(lib.storage.versus_reward); + } + } + } + else{ + game.delay(); + } + game.replacePlayer(this); + } + } + } + } + }, + get:{ + rawAttitude:function(from,to){ + if(from.side==to.side){ + if(to.identity=='zhu'){ + if(_status.connectMode){ + if(_status.mode=='4v4') return 10; + } + else{ + if(lib.storage.main_zhu||_status.mode=='four') return 10; + } + } + return 6; + } + else{ + if(to.identity=='zhu'){ + if(_status.connectMode){ + if(_status.mode=='4v4') return -10; + } + else{ + if(lib.storage.main_zhu||_status.mode=='four') return -10; + } + } + return -6; + } + }, + }, + help:{ + '对决模式': + '
                  2v2 替补模式
                  • 选将时额外选择一名替补武将,阵亡时使用自己的替补武将上场,无替补时改为用队友的替补武将,两人均无替补时游戏结束'+ + '
                  • 杀死敌方武将摸3张牌,杀死友方武将弃置所有牌
                  '+ + '
                  4v4
                  • 双方各有一名主公和三名忠臣,杀死对方主公获胜
                  • '+ + '8号位游戏开始时额外摸一张牌,7、8号位可在游戏开始时置换一次手牌
                  • '+ + '杀死对方忠臣摸2+x张牌,x为对方(含刚被杀的忠臣)与己方的存活人数之差;主公杀死己方忠臣须弃置所有牌', + } + }; });