diff --git a/card/extra.js b/card/extra.js index 0ecde2150..f2a2a7b4d 100644 --- a/card/extra.js +++ b/card/extra.js @@ -1077,7 +1077,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ ["diamond",13,"hualiu"], ["club",1,"baiyin"], ["spade",2,"tengjia"], - ["club",2,"tengjia",'fire'], + ["club",2,"tengjia"], ["spade",1,"guding"], ["diamond",1,"zhuque"], diff --git a/card/gujian.js b/card/gujian.js index 484341589..7997e6ca8 100644 --- a/card/gujian.js +++ b/card/gujian.js @@ -1,1935 +1,1935 @@ -'use strict'; -game.import('card',function(lib,game,ui,get,ai,_status){ - return { - 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=3; - target.addSkill('luyugeng'); - }, - ai:{ - order:2, - value:4, - result:{ - target:1 - } - } - }, - jinlianzhu:{ - type:'trick', - fullskin:true, - filterTarget:true, - global:'g_jinlianzhu', - content:function(){ - var evt=event.getParent(3)._trigger; - evt.cancel() - 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.isMinHp()) return 2; - if(target.isMinHp()) 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'); - }, - 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=2; - 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.isMinHp()) 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.storage.molicha=card; - target.storage.molicha_markcount=4; - target.addSkill('molicha'); - }, - ai:{ - order:2, - value:4, - result:{ - target: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=4; - 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, - toself:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - modTarget:true, - content:function(){ - target.changeHujia(); - target.addTempSkill('heilonglinpian',{player:'phaseBegin'}); - }, - ai:{ - value:[6,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:6 - } - }, - yuheng_plus:{ - fullskin:true, - type:'equip', - subtype:'equip5', - nopower:true, - unique:true, - nomod:true, - epic:true, - cardimage:'yuheng', - skills:['yuheng_plus_skill'], - ai:{ - equipValue:7 - } - }, - yuheng_pro:{ - fullskin:true, - type:'equip', - subtype:'equip5', - nopower:true, - unique:true, - nomod:true, - legend:true, - cardimage:'yuheng', - skills:['yuheng_pro_skill'], - ai:{ - equipValue:8 - } - }, - shatang:{ - fullskin:true, - type:'trick', - enable:true, - filterTarget:true, - cardcolor:'red', - cardnature:'fire', - content:function(){ - 'step 0' - target.damage('fire'); - 'step 1' - target.changeHujia(); - }, - ai:{ - value:[4,1], - useful:2, - order:2, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nofire')) return 1.5; - if(target.hasSkillTag('maixie_hp')) return 0; - if(target.hp==1) return -1; - return -1/Math.sqrt(target.hp+1); - } - }, - tag:{ - damage:1, - fireDamage:1, - natureDamage:1 - } - } - }, - shujinsan:{ - fullskin:true, - type:'trick', - 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], - tag:{ - norepeat:1 - }, - result:{ - target:function(player,target){ - if(target==player){ - var cards=player.getCards('he'); - var num=-1; - for(var i=0;i2){ - if(player.needsToDiscard()) return 1/target.hp; - return 0; - } - if(target.hp>0){ - return 2/target.hp; - } - return 0; - } - } - } - }, - yunvyuanshen:{ - fullskin:true, - type:'basic', - enable:true, - logv:false, - filterTarget:function(card,player,target){ - return !target.hasSkill('yunvyuanshen_skill'); - }, - content:function(){ - target.storage.yunvyuanshen_skill=game.createCard('yunvyuanshen'); - target.addSkill('yunvyuanshen_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:9, - useful:4, - value:7 - }, - order:2, - result:{ - target:function(player,target){ - return 1/Math.sqrt(1+target.hp); - }, - }, - } - }, - bingpotong:{ - fullskin:true, - type:'jiguan', - enable:true, - wuxieable:true, - filterTarget:function(card,player,target){ - return target.countCards('h')>0; - }, - selectTarget:[1,3], - content:function(){ - "step 0" - if(target.countCards('h')==0||player.countCards('h')==0){ - event.finish(); - return; - } - player.chooseCard('请展示一张手牌',true).set('ai',function(){ - var num=0; - var rand=_status.event.rand; - 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; - }).set('rand', Math.random()<0.5).prompt2='若与'+get.translation(target)+'展示的牌相同,你弃置展示的牌,'+get.translation(target)+'失去一点体力'; - "step 1" - event.card1=result.cards[0]; - target.chooseCard('请展示一张手牌',true).set('ai',function(card){ - var num=0; - var rand=_status.event.rand; - 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; - }).set('rand', Math.random()<0.5).prompt2='若与'+get.translation(player)+'展示的牌相同,'+get.translation(player)+'弃置展示的牌,你失去一点体力'; - "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(); - event.parent.cancelled=true; - } - 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'); - // } - }, - 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:'bingpotong'})){ - return -10; - } - if(_status.event.skill){ - var viewAs=get.info(_status.event.skill).viewAs; - if(viewAs=='bingpotong') return -10; - if(viewAs&&viewAs.name=='bingpotong') return -10; - } - } - return 0; - }, - target:function(player,target){ - if(player.countCards('h')<=1) return 0; - return -1.5; - } - }, - tag:{ - loseHp:1 - } - } - }, - feibiao:{ - type:'jiguan', - enable:true, - fullskin:true, - wuxieable:true, - outrange:{globalFrom:2}, - filterTarget:function(card,player,target){ - return target!=player; - }, - 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 - } - } - }, - longxugou:{ - type:'jiguan', - enable:true, - fullskin:true, - wuxieable:true, - filterTarget:function(card,player,target){ - return target!=player&&target.countGainableCards(player,'e'); - }, - content:function(){ - 'step 0' - var es=target.getGainableCards(player,'e') - if(es.length){ - player.choosePlayerCard('e',target,true).set('es',es).set('filterButton',function(button){ - return _status.event.es.contains(button.link); - }); - } - else{ - event.finish(); - } - 'step 1' - if(result.bool){ - target.$give(result.links[0],player); - target.lose(result.links[0],ui.special); - event.card=result.links[0]; - game.delay(); - } - else{ - event.finish(); - } - 'step 2' - if(event.card&&get.position(event.card)=='s'){ - player.equip(event.card); - } - }, - ai:{ - basic:{ - order:9, - value:6, - useful:4, - }, - result:{ - target:-1 - }, - tag:{ - loseCard:1, - gain: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'))){ - return -get.sgn(get.attitude(player,current)); - } - }); - } - } - } - }, - shenhuofeiya:{ - type:'jiguan', - enable:true, - fullskin:true, - wuxieable:true, - filterTarget:function(card,player,target){ - return target!=player; - }, - changeTarget:function(player,targets){ - game.filterPlayer(function(current){ - return get.distance(targets[0],current,'pure')==1; - },targets); - }, - cardcolor:'red', - cardnature:'fire', - 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; - if(target.hasSkillTag('noShan')){ - return -1; - } - 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; - } - if(get.attitude(viewer,target)<=0){ - return 0; - } - }, - order:7, - tag:{ - respond:1, - respondShan:1, - damage:1, - natureDamage:1, - fireDamage:1, - multitarget:1, - multineg:1, - }, - result:{ - player:function(player,target){ - return game.countPlayer(function(current){ - if(current==target||(get.distance(target,current,'pure')==1)){ - return get.sgn(get.effect(current,{name:'chiyuxi'},player,player)); - } - }); - } - } - } - }, - // 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.hp>=player.hp; - }, - content:function(){ - 'step 0' - target.draw(); - 'step 1' - target.loseHp(); - }, - ai:{ - order:2, - value:[5,1], - useful:[4,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(){ - if(player.getEnemies().contains(target)){ - target.getDebuff(); - } - else{ - target.getBuff(); - } - }, - ai:{ - order:4, - value:5, - result:{ - player:function(player,target){ - if(get.attitude(player,target)==0) return 0; - return 1; - } - } - } - }, - liufengsan:{ - type:'trick', - enable:true, - fullskin:true, - filterTarget:true, - content:function(){ - var list=[]; - for(var i=0;i<2;i++){ - list.push(game.createCard('shan')); - } - target.gain(list,'gain2'); - }, - ai:{ - order:4.5, - value:[5,1], - tag:{ - gain:1, - norepeat:1 - }, - result:{ - target:function(player,target){ - if(target==player){ - if(!target.hasShan()) return 2; - var num=target.needsToDiscard(2); - if(num==0) return 1.5; - if(num==1) return 1; - return 0.5; - } - else{ - switch(target.countCards('h')){ - case 0:return 2; - case 1:return 1.5; - case 2:return 1; - default:return 0.5; - } - } - } - } - } - }, - shihuifen:{ - type:'trick', - fullskin:true, - filterTarget:true, - global:'g_shihuifen', - content:function(){ - 'step 0' - var next=_status.currentPhase.chooseToRespond({name:'shan'}); - next.set('prompt2','否则本回合无法对其他角色使用卡牌'); - '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:{ - ziyangdan:{ - trigger:{player:'phaseBegin'}, - silent:true, - init:function(player){ - player.storage.ziyangdan=3; - }, - onremove:true, - content:function(){ - if(player.hujia>0){ - player.changeHujia(-1); - } - player.storage.ziyangdan--; - if(player.hujia==0||player.storage.ziyangdan==0){ - player.removeSkill('ziyangdan'); - } - }, - ai:{ - threaten:0.8 - } - }, - luyugeng:{ - mark:'card', - enable:'phaseUse', - usable:1, - nopop:true, - filterCard:{type:'basic'}, - filter:function(event,player){ - return player.countCards('h',{type:'basic'}); - }, - intro:{ - content:function(storage,player){ - return '出牌阶段限一次,你可以弃置一张基本牌并发现一张牌,持续两回合(剩余'+player.storage.luyugeng_markcount+'回合)' - } - }, - content:function(){ - player.discoverCard(); - }, - group:'luyugeng_count', - subSkill:{ - count:{ - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - content:function(){ - player.storage.luyugeng_markcount--; - if(player.storage.luyugeng_markcount==0){ - delete player.storage.luyugeng; - delete player.storage.luyugeng_markcount; - player.removeSkill('luyugeng'); - } - else{ - player.updateMarks(); - } - }, - } - } - }, - xiajiao:{ - mark:'card', - trigger:{player:['phaseUseBefore','phaseEnd']}, - forced:true, - popup:false, - nopop:true, - filter:function(event,player){ - return !player.hasSkill('xiajiao3'); - }, - intro:{ - content:function(storage,player){ - return '你在摸牌阶段额外摸一张牌,然后弃置一张牌(剩余'+player.storage.xiajiao_markcount+'回合)' - } - }, - content:function(){ - player.storage.xiajiao_markcount--; - if(player.storage.xiajiao_markcount==0){ - delete player.storage.xiajiao; - delete player.storage.xiajiao_markcount; - player.removeSkill('xiajiao'); - } - else{ - player.updateMarks(); - } - player.addTempSkill('xiajiao3'); - }, - group:'xiajiao_draw', - subSkill:{ - draw:{ - trigger:{player:'phaseDrawBegin'}, - forced:true, - content:function(){ - trigger.num++; - player.addTempSkill('xiajiao2'); - } - } - } - }, - xiajiao2:{ - trigger:{player:'phaseDrawAfter'}, - silent:true, - content:function(){ - player.chooseToDiscard('he',true); - } - }, - xiajiao3:{}, - mizhilianou:{ - mark:'card', - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '你可以将一张红桃牌当作桃使用(剩余'+player.storage.mizhilianou_markcount+'回合)' - } - }, - content:function(){ - player.storage.mizhilianou_markcount--; - if(player.storage.mizhilianou_markcount==0){ - delete player.storage.mizhilianou; - delete player.storage.mizhilianou_markcount; - player.removeSkill('mizhilianou'); - } - else{ - player.updateMarks(); - } - }, - group:'mizhilianou_use', - subSkill:{ - use:{ - enable:'chooseToUse', - filterCard:{suit:'heart'}, - position:'he', - viewAs:{name:'tao'}, - viewAsFilter:function(player){ - return player.countCards('he',{suit:'heart'})>0; - }, - prompt:'将一张红桃牌当桃使用', - check:function(card){return 10-get.value(card)}, - ai:{ - skillTagFilter:function(player){ - return player.countCards('he',{suit:'heart'})>0; - }, - save:true, - respondTao: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 '当你下一次受到杀造成的伤害时,令伤害-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; - }, - forced:true, - content:function(){ - trigger.num--; - delete player.storage.gudonggeng; - delete player.storage.gudonggeng_markcount; - player.removeSkill('gudonggeng'); - } - } - }, - 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.isMinHp()){ - 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.isMinHp()){ - 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,player,target){ - if(player!=target&&get.color(card)=='black'){ - 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'); - player.logSkill('molicha'); - } - else{ - player.updateMarks(); - } - } - }, - 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 '出牌阶段结束时,你摸一张牌(剩余'+player.storage.tanhuadong_markcount+'回合)' - } - }, - content:function(){ - 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(); - } - }, - group:'tanhuadong_draw', - subSkill:{ - draw:{ - trigger:{player:'phaseUseEnd'}, - forced:true, - content:function(){ - player.draw(); - } - } - } - }, - mapodoufu:{ - mark:'card', - trigger:{player:'phaseEnd'}, - forced:true, - popup:false, - nopop:true, - intro:{ - content:function(storage,player){ - return '结束阶段,你随机弃置一名随机敌人的一张随机牌(剩余'+player.storage.mapodoufu_markcount+'回合)' - } - }, - content:function(){ - var list=player.getEnemies(); - for(var i=0;i=3){ - card.init([card.suit,card.number,'yuheng_plus',card.nature]); - player.addTempSkill('yuheng_plus_temp'); - } - } - }, - ai:{ - order:9, - result:{ - player:1 - } - } - }, - yuheng_plus_temp:{}, - yuheng_plus_skill:{ - enable:'phaseUse', - usable:1, - filterCard:{color:'black'}, - check:function(card){ - return 8-get.value(card); - }, - filter:function(event,player){ - // if(player.hasSkill('yuheng_plus_temp')) return false; - if(!player.countCards('h',{color:'black'})) return false; - var enemies=player.getEnemies(); - for(var i=0;i=7){ - card.init([card.suit,card.number,'yuheng_pro',card.nature]); - } - } - }, - ai:{ - order:9, - result:{ - player:1 - } - } - }, - yuheng_pro_skill:{ - enable:'phaseUse', - filterCard:{color:'black'}, - check:function(card){ - return 8-get.value(card); - }, - filter:function(event,player){ - if(!player.countCards('h',{color:'black'})) return false; - var enemies=player.getEnemies(); - for(var i=0;i=3){ - card.init([card.suit,card.number,'yuheng_plus',card.nature]); - player.addTempSkill('yuheng_plus_temp'); - } - } - }, - ai:{ - order:9, - result:{ - player:1 - } - } - }, - shihuifen:{ - mark:true, - intro:{ - content:'使用卡牌无法指定其他角色为目标' - }, - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target) return false; - } - } - }, - g_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; - } - }, - g_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; - } - }, - }, - 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_ab:'散花', - bingpotong_info:'出牌阶段对至多3名角色使用,你与每个目标依次同时展示一张手牌,若颜色相同,你弃置展示的手牌,目标失去一点体力并终止结算', - feibiao:'飞镖', - feibiao_info:'出牌阶段,对一名距离1以外的角色使用,令其弃置一张黑色手牌或流失一点体力', - - dinvxuanshuang:'帝女玄霜', - dinvxuanshuang_skill:'帝女玄霜', - dinvxuanshuang_info:'对一名濒死状态的角色使用,目标回复一点体力,然后可以弃置任意张牌并摸等量的牌', - yunvyuanshen:'玉女元参', - yunvyuanshen_skill:'玉女元参', - yunvyuanshen_info:'出牌阶段对一名角色使用,目标在下一次进入濒死状态时回复一点体力', - ziyangdan:'紫阳丹', - ziyangdan_info:'出牌阶段对一名角色使用,目标获得3点护甲,此后每个准备阶段失去1点护甲,直到首次失去所有护甲或累计以此法失去3点护甲', - 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', - shatang:'沙棠', - shatang_info:'出牌阶段对一名角色使用,对目标造成一点火焰伤害,然后目标获得一点护甲', - - food:'食物', - chunbing:'春饼', - chunbing_info:'你的手牌上限+1,持续五回合', - gudonggeng:'骨董羹', - gudonggeng_info:'当你下一次受到杀造成的伤害时,令伤害-1,持续三回合', - yougeng:'酉羹', - yougeng_info:'准备阶段,若你的体力值为全场最少或之一,你回复一点体力,持续两回合', - liyutang:'鲤鱼汤', - liyutang_info:'结束阶段,若你的体力值为全场最少或之一,你获得一点护甲,持续两回合', - mizhilianou:'蜜汁藕', - mizhilianou_info:'你可以将一张红桃牌当作桃使用,持续四回合', - xiajiao:'虾饺', - xiajiao_info:'你在摸牌阶段额外摸一张牌,然后弃置一张牌,持续三回合', - tanhuadong:'昙花冻', - tanhuadong_info:'出牌阶段结束时,你摸一张牌,持续三回合', - qingtuan:'青团', - qingtuan_info:'你在回合内使用首张杀时摸一张牌,持续两回合', - luyugeng:'鲈鱼羹', - luyugeng_info:'出牌阶段限一次,你可以弃置一张基本牌并发现一张牌,持续三回合', - yuanbaorou:'元宝肉', - yuanbaorou_info:'你在出牌阶段可以额外使用一张杀,持续四回合', - molicha:'茉莉茶', - molicha_info:'你不能成为其他角色的黑色牌的目标,持续四回合', - mapodoufu:'麻婆豆腐', - mapodoufu_info:'结束阶段,你弃置一名随机敌人的一张随机牌,持续两回合', - }, - 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'], - - ['club',8,'feibiao','poison'], - ['diamond',9,'feibiao','poison'], - - ['spade',3,'bingpotong','poison'], - ['club',12,'bingpotong','poison'], - - ['club',5,'shihuifen'], - ['club',1,'shihuifen'], - ['spade',13,'shihuifen'], - - ['diamond',6,'shujinsan'], - ['spade',2,'shujinsan'], - - ['diamond',6,'ziyangdan'], - ['heart',1,'ziyangdan'], - - // ['diamond',7,'dinvxuanshuang'], - ['heart',9,'dinvxuanshuang'], - - ['spade',9,'qiankunbiao'], - ['club',13,'qiankunbiao'], - - ['diamond',9,'shenhuofeiya'], - ['spade',7,'longxugou'], - - ['heart',9,'jinlianzhu'], - ['spade',7,'jinlianzhu'], - - ['heart',6,'liutouge'], - ['club',6,'liutouge'], - - ['club',6,'liufengsan'], - ['club',3,'liufengsan'], - - ['heart',13,'shatang','fire'] - ] - }; -}); +'use strict'; +game.import('card',function(lib,game,ui,get,ai,_status){ + return { + 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=3; + target.addSkill('luyugeng'); + }, + ai:{ + order:2, + value:4, + result:{ + target:1 + } + } + }, + jinlianzhu:{ + type:'trick', + fullskin:true, + filterTarget:true, + global:'g_jinlianzhu', + content:function(){ + var evt=event.getParent(3)._trigger; + evt.cancel() + 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.isMinHp()) return 2; + if(target.isMinHp()) 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'); + }, + 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(){ + if(target==targets[0]&&cards.length) target.$gain2(cards); + target.storage.mapodoufu=card; + target.storage.mapodoufu_markcount=2; + target.addSkill('mapodoufu'); + }, + ai:{ + order:1, + 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.isMinHp()) 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.storage.molicha=card; + target.storage.molicha_markcount=4; + target.addSkill('molicha'); + }, + ai:{ + order:2, + value:4, + result:{ + target: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=4; + 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, + toself:true, + filterTarget:function(card,player,target){ + return target==player; + }, + selectTarget:-1, + modTarget:true, + content:function(){ + target.changeHujia(); + target.addTempSkill('heilonglinpian',{player:'phaseBegin'}); + }, + ai:{ + value:[6,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:6 + } + }, + yuheng_plus:{ + fullskin:true, + type:'equip', + subtype:'equip5', + nopower:true, + unique:true, + nomod:true, + epic:true, + cardimage:'yuheng', + skills:['yuheng_plus_skill'], + ai:{ + equipValue:7 + } + }, + yuheng_pro:{ + fullskin:true, + type:'equip', + subtype:'equip5', + nopower:true, + unique:true, + nomod:true, + legend:true, + cardimage:'yuheng', + skills:['yuheng_pro_skill'], + ai:{ + equipValue:8 + } + }, + shatang:{ + fullskin:true, + type:'trick', + enable:true, + filterTarget:true, + cardcolor:'red', + cardnature:'fire', + content:function(){ + 'step 0' + target.damage('fire'); + 'step 1' + target.changeHujia(); + }, + ai:{ + value:[4,1], + useful:2, + order:2, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nofire')) return 1.5; + if(target.hasSkillTag('maixie_hp')) return 0; + if(target.hp==1) return -1; + return -1/Math.sqrt(target.hp+1); + } + }, + tag:{ + damage:1, + fireDamage:1, + natureDamage:1 + } + } + }, + shujinsan:{ + fullskin:true, + type:'trick', + 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], + tag:{ + norepeat:1 + }, + result:{ + target:function(player,target){ + if(target==player){ + var cards=player.getCards('he'); + var num=-1; + for(var i=0;i2){ + if(player.needsToDiscard()) return 1/target.hp; + return 0; + } + if(target.hp>0){ + return 2/target.hp; + } + return 0; + } + } + } + }, + yunvyuanshen:{ + fullskin:true, + type:'basic', + enable:true, + logv:false, + filterTarget:function(card,player,target){ + return !target.hasSkill('yunvyuanshen_skill'); + }, + content:function(){ + target.storage.yunvyuanshen_skill=game.createCard('yunvyuanshen'); + target.addSkill('yunvyuanshen_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:9, + useful:4, + value:7 + }, + order:2, + result:{ + target:function(player,target){ + return 1/Math.sqrt(1+target.hp); + }, + }, + } + }, + bingpotong:{ + fullskin:true, + type:'jiguan', + enable:true, + wuxieable:true, + filterTarget:function(card,player,target){ + return target.countCards('h')>0; + }, + selectTarget:[1,3], + content:function(){ + "step 0" + if(target.countCards('h')==0||player.countCards('h')==0){ + event.finish(); + return; + } + player.chooseCard('请展示一张手牌',true).set('ai',function(){ + var num=0; + var rand=_status.event.rand; + 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; + }).set('rand', Math.random()<0.5).prompt2='若与'+get.translation(target)+'展示的牌相同,你弃置展示的牌,'+get.translation(target)+'失去一点体力'; + "step 1" + event.card1=result.cards[0]; + target.chooseCard('请展示一张手牌',true).set('ai',function(card){ + var num=0; + var rand=_status.event.rand; + 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; + }).set('rand', Math.random()<0.5).prompt2='若与'+get.translation(player)+'展示的牌相同,'+get.translation(player)+'弃置展示的牌,你失去一点体力'; + "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(); + event.parent.cancelled=true; + } + 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'); + // } + }, + 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:'bingpotong'})){ + return -10; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='bingpotong') return -10; + if(viewAs&&viewAs.name=='bingpotong') return -10; + } + } + return 0; + }, + target:function(player,target){ + if(player.countCards('h')<=1) return 0; + return -1.5; + } + }, + tag:{ + loseHp:1 + } + } + }, + feibiao:{ + type:'jiguan', + enable:true, + fullskin:true, + wuxieable:true, + outrange:{globalFrom:2}, + filterTarget:function(card,player,target){ + return target!=player; + }, + 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 + } + } + }, + longxugou:{ + type:'jiguan', + enable:true, + fullskin:true, + wuxieable:true, + filterTarget:function(card,player,target){ + return target!=player&&target.countGainableCards(player,'e'); + }, + content:function(){ + 'step 0' + var es=target.getGainableCards(player,'e') + if(es.length){ + player.choosePlayerCard('e',target,true).set('es',es).set('filterButton',function(button){ + return _status.event.es.contains(button.link); + }); + } + else{ + event.finish(); + } + 'step 1' + if(result.bool){ + target.$give(result.links[0],player); + target.lose(result.links[0],ui.special); + event.card=result.links[0]; + game.delay(); + } + else{ + event.finish(); + } + 'step 2' + if(event.card&&get.position(event.card)=='s'){ + player.equip(event.card); + } + }, + ai:{ + basic:{ + order:9, + value:6, + useful:4, + }, + result:{ + target:-1 + }, + tag:{ + loseCard:1, + gain: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'))){ + return -get.sgn(get.attitude(player,current)); + } + }); + } + } + } + }, + shenhuofeiya:{ + type:'jiguan', + enable:true, + fullskin:true, + wuxieable:true, + filterTarget:function(card,player,target){ + return target!=player; + }, + changeTarget:function(player,targets){ + game.filterPlayer(function(current){ + return get.distance(targets[0],current,'pure')==1; + },targets); + }, + cardcolor:'red', + cardnature:'fire', + 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; + if(target.hasSkillTag('noShan')){ + return -1; + } + 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; + } + if(get.attitude(viewer,target)<=0){ + return 0; + } + }, + order:7, + tag:{ + respond:1, + respondShan:1, + damage:1, + natureDamage:1, + fireDamage:1, + multitarget:1, + multineg:1, + }, + result:{ + player:function(player,target){ + return game.countPlayer(function(current){ + if(current==target||(get.distance(target,current,'pure')==1)){ + return get.sgn(get.effect(current,{name:'chiyuxi'},player,player)); + } + }); + } + } + } + }, + // 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.hp>=player.hp; + }, + content:function(){ + 'step 0' + target.draw(); + 'step 1' + target.loseHp(); + }, + ai:{ + order:2, + value:[5,1], + useful:[4,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(){ + if(player.getEnemies().contains(target)){ + target.getDebuff(); + } + else{ + target.getBuff(); + } + }, + ai:{ + order:4, + value:5, + result:{ + player:function(player,target){ + if(get.attitude(player,target)==0) return 0; + return 1; + } + } + } + }, + liufengsan:{ + type:'trick', + enable:true, + fullskin:true, + filterTarget:true, + content:function(){ + var list=[]; + for(var i=0;i<2;i++){ + list.push(game.createCard('shan')); + } + target.gain(list,'gain2'); + }, + ai:{ + order:4.5, + value:[5,1], + tag:{ + gain:1, + norepeat:1 + }, + result:{ + target:function(player,target){ + if(target==player){ + if(!target.hasShan()) return 2; + var num=target.needsToDiscard(2); + if(num==0) return 1.5; + if(num==1) return 1; + return 0.5; + } + else{ + switch(target.countCards('h')){ + case 0:return 2; + case 1:return 1.5; + case 2:return 1; + default:return 0.5; + } + } + } + } + } + }, + shihuifen:{ + type:'trick', + fullskin:true, + filterTarget:true, + global:'g_shihuifen', + content:function(){ + 'step 0' + var next=_status.currentPhase.chooseToRespond({name:'shan'}); + next.set('prompt2','否则本回合无法对其他角色使用卡牌'); + '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:{ + ziyangdan:{ + trigger:{player:'phaseBegin'}, + silent:true, + init:function(player){ + player.storage.ziyangdan=3; + }, + onremove:true, + content:function(){ + if(player.hujia>0){ + player.changeHujia(-1); + } + player.storage.ziyangdan--; + if(player.hujia==0||player.storage.ziyangdan==0){ + player.removeSkill('ziyangdan'); + } + }, + ai:{ + threaten:0.8 + } + }, + luyugeng:{ + mark:'card', + enable:'phaseUse', + usable:1, + nopop:true, + filterCard:{type:'basic'}, + filter:function(event,player){ + return player.countCards('h',{type:'basic'}); + }, + intro:{ + content:function(storage,player){ + return '出牌阶段限一次,你可以弃置一张基本牌并发现一张牌,持续两回合(剩余'+player.storage.luyugeng_markcount+'回合)' + } + }, + content:function(){ + player.discoverCard(); + }, + group:'luyugeng_count', + subSkill:{ + count:{ + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + content:function(){ + player.storage.luyugeng_markcount--; + if(player.storage.luyugeng_markcount==0){ + delete player.storage.luyugeng; + delete player.storage.luyugeng_markcount; + player.removeSkill('luyugeng'); + } + else{ + player.updateMarks(); + } + }, + } + } + }, + xiajiao:{ + mark:'card', + trigger:{player:['phaseUseBefore','phaseEnd']}, + forced:true, + popup:false, + nopop:true, + filter:function(event,player){ + return !player.hasSkill('xiajiao3'); + }, + intro:{ + content:function(storage,player){ + return '你在摸牌阶段额外摸一张牌,然后弃置一张牌(剩余'+player.storage.xiajiao_markcount+'回合)' + } + }, + content:function(){ + player.storage.xiajiao_markcount--; + if(player.storage.xiajiao_markcount==0){ + delete player.storage.xiajiao; + delete player.storage.xiajiao_markcount; + player.removeSkill('xiajiao'); + } + else{ + player.updateMarks(); + } + player.addTempSkill('xiajiao3'); + }, + group:'xiajiao_draw', + subSkill:{ + draw:{ + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + trigger.num++; + player.addTempSkill('xiajiao2'); + } + } + } + }, + xiajiao2:{ + trigger:{player:'phaseDrawAfter'}, + silent:true, + content:function(){ + player.chooseToDiscard('he',true); + } + }, + xiajiao3:{}, + mizhilianou:{ + mark:'card', + trigger:{player:'phaseAfter'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '你可以将一张红桃牌当作桃使用(剩余'+player.storage.mizhilianou_markcount+'回合)' + } + }, + content:function(){ + player.storage.mizhilianou_markcount--; + if(player.storage.mizhilianou_markcount==0){ + delete player.storage.mizhilianou; + delete player.storage.mizhilianou_markcount; + player.removeSkill('mizhilianou'); + } + else{ + player.updateMarks(); + } + }, + group:'mizhilianou_use', + subSkill:{ + use:{ + enable:'chooseToUse', + filterCard:{suit:'heart'}, + position:'he', + viewAs:{name:'tao'}, + viewAsFilter:function(player){ + return player.countCards('he',{suit:'heart'})>0; + }, + prompt:'将一张红桃牌当桃使用', + check:function(card){return 10-get.value(card)}, + ai:{ + skillTagFilter:function(player){ + return player.countCards('he',{suit:'heart'})>0; + }, + save:true, + respondTao: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 '当你下一次受到杀造成的伤害时,令伤害-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; + }, + forced:true, + content:function(){ + trigger.num--; + delete player.storage.gudonggeng; + delete player.storage.gudonggeng_markcount; + player.removeSkill('gudonggeng'); + } + } + }, + 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.isMinHp()){ + 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.isMinHp()){ + 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,player,target){ + if(player!=target&&get.color(card)=='black'){ + 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'); + player.logSkill('molicha'); + } + else{ + player.updateMarks(); + } + } + }, + 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 '出牌阶段结束时,你摸一张牌(剩余'+player.storage.tanhuadong_markcount+'回合)' + } + }, + content:function(){ + 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(); + } + }, + group:'tanhuadong_draw', + subSkill:{ + draw:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + content:function(){ + player.draw(); + } + } + } + }, + mapodoufu:{ + mark:'card', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + popup:false, + nopop:true, + intro:{ + content:function(storage,player){ + return '结束阶段,你随机弃置一名随机敌人的一张随机牌(剩余'+player.storage.mapodoufu_markcount+'回合)' + } + }, + content:function(){ + var list=player.getEnemies(); + for(var i=0;i=3){ + card.init([card.suit,card.number,'yuheng_plus',card.nature]); + player.addTempSkill('yuheng_plus_temp'); + } + } + }, + ai:{ + order:9, + result:{ + player:1 + } + } + }, + yuheng_plus_temp:{}, + yuheng_plus_skill:{ + enable:'phaseUse', + usable:1, + filterCard:{color:'black'}, + check:function(card){ + return 8-get.value(card); + }, + filter:function(event,player){ + // if(player.hasSkill('yuheng_plus_temp')) return false; + if(!player.countCards('h',{color:'black'})) return false; + var enemies=player.getEnemies(); + for(var i=0;i=7){ + card.init([card.suit,card.number,'yuheng_pro',card.nature]); + } + } + }, + ai:{ + order:9, + result:{ + player:1 + } + } + }, + yuheng_pro_skill:{ + enable:'phaseUse', + filterCard:{color:'black'}, + check:function(card){ + return 8-get.value(card); + }, + filter:function(event,player){ + if(!player.countCards('h',{color:'black'})) return false; + var enemies=player.getEnemies(); + for(var i=0;i=3){ + card.init([card.suit,card.number,'yuheng_plus',card.nature]); + player.addTempSkill('yuheng_plus_temp'); + } + } + }, + ai:{ + order:9, + result:{ + player:1 + } + } + }, + shihuifen:{ + mark:true, + intro:{ + content:'使用卡牌无法指定其他角色为目标' + }, + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target) return false; + } + } + }, + g_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; + } + }, + g_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; + } + }, + }, + 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_ab:'散花', + bingpotong_info:'出牌阶段对至多3名角色使用,你与每个目标依次同时展示一张手牌,若颜色相同,你弃置展示的手牌,目标失去一点体力并终止结算', + feibiao:'飞镖', + feibiao_info:'出牌阶段,对一名距离1以外的角色使用,令其弃置一张黑色手牌或流失一点体力', + + dinvxuanshuang:'帝女玄霜', + dinvxuanshuang_skill:'帝女玄霜', + dinvxuanshuang_info:'对一名濒死状态的角色使用,目标回复一点体力,然后可以弃置任意张牌并摸等量的牌', + yunvyuanshen:'玉女元参', + yunvyuanshen_skill:'玉女元参', + yunvyuanshen_info:'出牌阶段对一名角色使用,目标在下一次进入濒死状态时回复一点体力', + ziyangdan:'紫阳丹', + ziyangdan_info:'出牌阶段对一名角色使用,目标获得3点护甲,此后每个准备阶段失去1点护甲,直到首次失去所有护甲或累计以此法失去3点护甲', + 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', + shatang:'沙棠', + shatang_info:'出牌阶段对一名角色使用,对目标造成一点火焰伤害,然后目标获得一点护甲', + + food:'食物', + chunbing:'春饼', + chunbing_info:'你的手牌上限+1,持续五回合', + gudonggeng:'骨董羹', + gudonggeng_info:'当你下一次受到杀造成的伤害时,令伤害-1,持续三回合', + yougeng:'酉羹', + yougeng_info:'准备阶段,若你的体力值为全场最少或之一,你回复一点体力,持续两回合', + liyutang:'鲤鱼汤', + liyutang_info:'结束阶段,若你的体力值为全场最少或之一,你获得一点护甲,持续两回合', + mizhilianou:'蜜汁藕', + mizhilianou_info:'你可以将一张红桃牌当作桃使用,持续四回合', + xiajiao:'虾饺', + xiajiao_info:'你在摸牌阶段额外摸一张牌,然后弃置一张牌,持续三回合', + tanhuadong:'昙花冻', + tanhuadong_info:'出牌阶段结束时,你摸一张牌,持续三回合', + qingtuan:'青团', + qingtuan_info:'你在回合内使用首张杀时摸一张牌,持续两回合', + luyugeng:'鲈鱼羹', + luyugeng_info:'出牌阶段限一次,你可以弃置一张基本牌并发现一张牌,持续三回合', + yuanbaorou:'元宝肉', + yuanbaorou_info:'你在出牌阶段可以额外使用一张杀,持续四回合', + molicha:'茉莉茶', + molicha_info:'你不能成为其他角色的黑色牌的目标,持续四回合', + mapodoufu:'麻婆豆腐', + mapodoufu_info:'结束阶段,你弃置一名随机敌人的一张随机牌,持续两回合', + }, + 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'], + + ['club',8,'feibiao','poison'], + ['diamond',9,'feibiao','poison'], + + ['spade',3,'bingpotong','poison'], + ['club',12,'bingpotong','poison'], + + ['club',5,'shihuifen'], + ['club',1,'shihuifen'], + ['spade',13,'shihuifen'], + + ['diamond',6,'shujinsan'], + ['spade',2,'shujinsan'], + + ['diamond',6,'ziyangdan'], + ['heart',1,'ziyangdan'], + + // ['diamond',7,'dinvxuanshuang'], + ['heart',9,'dinvxuanshuang'], + + ['spade',9,'qiankunbiao'], + ['club',13,'qiankunbiao'], + + ['diamond',9,'shenhuofeiya'], + ['spade',7,'longxugou'], + + ['heart',9,'jinlianzhu'], + ['spade',7,'jinlianzhu'], + + ['heart',6,'liutouge'], + ['club',6,'liutouge'], + + ['club',6,'liufengsan'], + ['club',3,'liufengsan'], + + ['heart',13,'shatang','fire'] + ] + }; +}); diff --git a/card/standard.js b/card/standard.js index ce71cad15..a01f85b00 100644 --- a/card/standard.js +++ b/card/standard.js @@ -598,7 +598,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ for(var i=0;i0; + }, + position:'he', + mod:{ + selectTarget:function(card,player,range){ + if(card.name=='mapodoufu'&&range[1]!=-1) range[1]++; + }, + }, + check:function(card){ + var player=_status.event.player; + if(game.countPlayer(function(current){ + return player.canUse('mapodoufu',current)&&get.effect(current,{name:'mapodoufu'},player,player)>0; + })>1) return 6-get.value(card); + return 4-get.value(card); + }, + }, + kanade_benzhan:{ + trigger:{global:['useCard','respond']}, + direct:true, + filter:function(event,player){ + return Array.isArray(event.respondTo)&&event.respondTo[0]!=event.player&&[event.respondTo[0],event.player].contains(player); + }, + content:function(){ + 'step 0' + event.type=get.type(trigger.card)=='basic'; + var prompt=event.type?'令一名角色摸两张牌或弃置两张牌':'令一名角色回复1点体力或对其造成1点伤害'; + player.chooseTarget(get.prompt('kanade_benzhan'),prompt).set('ai',function(target){ + var player=_status.event.player; + if(_status.event.getParent().type){ + var att=get.attitude(player,target); + if(target.hasSkillTag('nogain')) return -att; + if(target.countCards('he')==1&&att<0) att/=2; + return Math.abs(att)*(1+0.1*(Math.min(0,5-target.countCards('h')))) + } + return Math.max(get.recoverEffect(target,player,player),get.damageEffect(target,player,player)) + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('kanade_benzhan',target,'thunder'); + var trans=get.translation(target); + var list; + if(event.type){ + if(!target.countCards('h')) event._result={index:0}; + else list=['令'+trans+'摸两张牌','令'+trans+'弃置两张牌']; + } + else{ + if(target.isHealthy()) event._result={index:1}; + else list=['令'+trans+'回复1点体力','对'+trans+'造成1点伤害']; + } + player.chooseControl().set('choiceList',list).set('choice',function(){ + if(event.type) return (get.attitude(player,target)>0)?0:1; + return (get.recoverEffect(target,player,player)>get.damageEffect(target,player,player))?0:1; + }()).set('ai',function(){ + return _status.event.choice; + }); + } + else event.finish(); + 'step 2' + player.addExpose(0.2); + if(event.type){ + if(result.index==0) target.draw(2); + else target.chooseToDiscard(2,'he',true); + } + else{ + if(result.index==0) target.recover(); + else target.damage(); + } + }, + }, + yuzuru_wuxin:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterTarget:function(){ + if(ui.selected.cards.length) return false; + return true; + }, + filterCard:function(){ + if(ui.selected.targets.length) return false; + return lib.filter.cardDiscardable.apply(this,arguments); + }, + selectTarget:function(){ + if(!ui.selected.cards.length) return [1,1]; + return [0,1]; + }, + selectCard:function(){ + if(!ui.selected.cards.length) return [0,2]; + return [2,2]; + }, + prompt:get.prompt2('yuzuru_wuxin'), + ai1:function(card){ + var player=_status.event.player; + if(player.hp>3) return 0; + return player.getDamagedHp()*2-get.value(card); + }, + ai2:function(target){ + if(player.hp<4||target.hasSkillTag('nogain')) return 0; + return get.attitude(_status.event.player,target); + }, + }); + 'step 1' + if(result.bool){ + if(result.cards.length){ + player.logSkill('yuzuru_wuxin'); + player.discard(result.cards); + player.recover(); + } + else{ + var target=result.targets[0]; + player.logSkill('yuzuru_wuxin',target,{color:[194,117,92]}); + player.loseHp(); + target.draw(2); + } + } + }, + }, + yuzuru_deyi:{ + derivation:['yuzuru_kunfen','yuzuru_quji','yuzuru_wangsheng','yuzuru_kunfen_rewrite','yuzuru_quji_rewrite'], + trigger:{global:'dieAfter'}, + forced:true, + unique:true, + juexingji:true, + skillAnimation:true, + animationColor:'orange', + content:function(){ + player.awakenSkill('yuzuru_deyi'); + player.removeSkill('yuzuru_wuxin'); + player.addSkillLog('yuzuru_kunfen'); + player.addSkillLog('yuzuru_quji'); + player.addSkillLog('yuzuru_wangsheng'); + player.loseMaxHp(); + player.recover(); + }, + }, + yuzuru_kunfen:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + content:function(){ + 'step 0' + if(!player._yuzuru_sss) player.loseHp(); + player.draw(2); + 'step 1' + if(player.countCards('he')<2) event.finish(); + else{ + player.chooseCardTarget({ + selectCard:2, + filterTarget:lib.filter.notMe, + prompt:'是否交给一名其他角色两张牌?', + position:'he', + ai1:function(card){ + var player=_status.event.player; + if(player.maxHp-player.hp==1&&card.name=='du') return 30; + var check=player.countCards('h')-2; + if(check<1) return 0; + if(player.hp>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; + }, + }); + } + 'step 2' + if(result.bool) result.targets[0].gain(result.cards,player,'giveAuto'); + }, + }, + yuzuru_quji:{ + audio:2, + enable:'phaseUse', + usable:1, + position:'he', + filterCard:true, + selectCard:function(){ + var player=_status.event.player; + return player.getDamagedHp(); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.hp0){ + player.chooseCardTarget({ + selectCard:[1,Infinity], + filterTarget:lib.filter.notMe, + prompt:'将任意张牌交给一名其他角色,或点【取消】。', + position:'he', + ai1:function(card){ + var player=_status.event.player; + if(get.suit(card,false)=='heart'&&game.hasPlayer(function(current){ + return current.hasSkill('kanade_mapo')&&get.attitude(player,current)>0; + })) return 1; + return 0; + }, + ai2:function(kanade){ + if(kanade.hasSkill('kanade_mapo')&&get.attitude(_status.event.player,kanade)>0) return 2; + return 0; + }, + }); + } + else event.goto(2); + 'step 1' + if(result.bool) result.targets[0].gain(result.cards,player,'giveAuto'); + 'step 2' + player.loseMaxHp(); + 'step 3' + if(player.hp<2) player.recover(2-player.hp); + }, + }, + ao_xishi:{ + trigger:{ + player:['useCard','respond'], + target:'useCardToTargeted', + }, + forced:true, + filter:function(event,player,name){ + return (name=='useCard'||name=='respond'||event.player!=player)&&get.suit(event.card)=='diamond'; + }, + content:function(){player.draw()}, + }, + ao_kuihun:{ + trigger:{global:'dying'}, + logTarget:'player', + line:'thunder', + filter:function(event,player){ + return player!=event.player; + }, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + if(!trigger.player.countCards('h')) event.finish(); + else player.chooseButton(['选择一张牌作为「蝶」',trigger.player.getCards('h')]).set('ai',function(button){ + var val=get.buttonValue(button); + if(get.attitude(_status.event.player,get.owner(button.link))>0) return -val; + return val; + }); + 'step 2' + if(result.bool){ + trigger.player.lose(result.links,ui.special,'visible','toStorage'); + trigger.player.$give(result.links,player,false); + player.markAuto('ao_diegui',result.links); + game.log(result.links,'飞向了',player); + } + }, + locked:false, + mod:{ + targetInRange:function(card,player){ + var list=player.getStorage('ao_diegui'); + for(var i=0;i2; + }, + content:function(){ + player.awakenSkill('ao_shixin'); + player.removeSkill('ao_kuihun'); + player.addSkill('ao_diegui'); + player.gainMaxHp(); + player.recover(); + }, + }, + ao_diegui:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.getStorage('ao_diegui').length>0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('蝶归',player.storage.ao_diegui,'hidden'); + }, + backup:function(links,player){ + return { + card:links, + filterCard:function(){return false}, + selectCard:-1, + filterTarget:true, + delay:false, + content:lib.skill.ao_diegui.contentx, + line:'thunder', + ai:{ + result:{ + target:function(player,target){ + if(target!=player&&target.hasSkillTag('nogain')) return 0; + var num=1; + if(target.isTurnedOver()) num+=2; + if(target.isLinked()) num+=0.5; + return num; + }, + } + }, + } + }, + prompt:function(links,player){ + return '选择一名角色,令其获得'+get.translation(links[0])+',摸两张牌并将武将牌复原。' + }, + }, + contentx:function(){ + 'step 0' + target.gain(lib.skill.ao_diegui_backup.card,player,'give','fromStorage'); + player.unmarkAuto('ao_diegui',lib.skill.ao_diegui_backup.card); + target.draw(2); + 'step 1' + target.link(false); + 'step 2' + target.turnOver(false); + }, + intro:{name:'七影蝶',content:'cards',onunmark:'throw'}, + ai:{order:1,result:{player:1}}, + }, ayato_jianshen:{ mod:{ cardnature:function(card,player){ @@ -7846,6 +8254,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ key_tomoya:'冈崎朋也', key_nagisa:'古河渚', key_ayato:'直井文人', + key_ao:'空门苍', + key_yuzuru:'音无结弦', + sp_key_kanade:'SP立华奏', lucia_duqu:'毒躯', lucia_duqu_info:'锁定技,①当你对其他角色造成伤害或受到其他角色的伤害时,你和对方各获得一张花色点数随机的【毒】。
②当你因【毒】失去体力时,你改为回复等量的体力。
③当你处于濒死状态时,你可以使用一张【毒】(每回合限一次)。', lucia_zhenren:'振刃', @@ -8009,6 +8420,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ayato_jianshen_info:'锁定技,你手牌中的【杀】均视为神属性。', ayato_zonghuan:'纵幻', ayato_zonghuan_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后选择一项:将其中的一张牌置入弃牌堆,或以该角色的视角使用其中的一张,然后摸一张牌。', + ao_xishi:'习事', + ao_xishi_info:'锁定技,当你使用或打出♦牌时,或其他角色使用♦牌指定你为目标后,你摸一张牌。', + ao_kuihun:'窥魂', + ao_kuihun_info:'其他角色进入濒死状态时,你可以摸一张牌,然后观看其手牌并将其中一张牌置于你的武将牌上,称为「蝶」。你使用与一张「蝶」花色相同的牌时无距离和次数限制。你的手牌上限+X(X为蝶数)。', + ao_shixin:'释心', + ao_shixin_info:'觉醒技,准备阶段,若你的「蝶」中包含至少三种花色,则你加1点体力上限并回复1点体力,失去〖窥魂〗并获得〖蝶归〗。', + ao_diegui:'蝶归', + ao_diegui_backup:'蝶归', + ao_diegui_info:'出牌阶段限一次,你可以将一张「蝶」交给一名角色,该角色摸两张牌并复原武将牌。', + yuzuru_wuxin:'无心', + yuzuru_wuxin_info:'结束阶段,你可以选择一项:失去1点体力并令一名角色摸两张牌,或弃置两张牌并回复1点体力。', + yuzuru_deyi:'得义', + yuzuru_deyi_info:'觉醒技,当有其他角色死亡后,你减1点体力上限并回复1点体力,失去技能〖无心〗,获得技能〖往生〗〖困奋〗和〖去疾〗。', + yuzuru_wangsheng:'往生', + yuzuru_wangsheng_info:'觉醒技,当你即将死亡时,你防止此次死亡。你可以将任意张牌交给一名其他角色,然后减1点体力上限并将体力回复至2点,修改技能〖困奋〗和〖去疾〗。', + yuzuru_kunfen:'困奋', + yuzuru_kunfen_info:'锁定技,结束阶段,你失去1点体力并摸两张牌。然后你可以将两张牌交给一名其他角色。', + yuzuru_quji:'去疾', + yuzuru_quji_info:'出牌阶段限一次,你可以弃置X张牌并选择至多等量已受伤的其他角色,这些角色各回复1点体力。若你以此法弃置了黑色牌,则你失去1点体力。(X为你已损失的体力值)', + yuzuru_kunfen_rewrite:'困奋·改', + yuzuru_kunfen_rewrite_info:'锁定技,结束阶段,你摸两张牌。然后你可以将两张牌交给一名其他角色。', + yuzuru_quji_rewrite:'去疾·改', + yuzuru_quji_rewrite_info:'出牌阶段限一次,你可以弃置X张牌并选择至多等量已受伤的其他角色,这些角色各回复1点体力。(X为你已损失的体力值)', + kanade_mapo:'麻婆', + kanade_mapo_info:'你可以将一张♥牌当做【麻婆豆腐】使用。你使用的【麻婆豆腐】可以多指定一个目标。', + kanade_benzhan:'奔战', + kanade_benzhan_info:'当你使用或打出牌响应其他角色,或其他角色使用或打出牌响应你后,若此牌为:基本牌,你可令一名角色弃置两张牌或令一名角色摸两张牌;非基本牌,你可对一名角色造成1点伤害或令一名其他角色回复1点体力。', yj_caoang:'SP曹昂', diff --git a/character/old.js b/character/old.js index 5cff958c9..f4c96c125 100755 --- a/character/old.js +++ b/character/old.js @@ -5,18 +5,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterSort:{ old:{ old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","xiaoqiao"], - old_refresh:["old_zhangfei","old_huatuo"], + old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun"], old_yijiang1:["masu","xushu","fazheng","yujin","xin_yujin","old_xusheng","old_lingtong","ol_yujin"], old_yijiang2:["old_madai","old_zhonghui","old_wangyi","old_guanzhang"], old_yijiang3:["liru","old_zhuran","ol_manchong","old_fuhuanghou","old_caochong"], old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan"], old_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"], old_yijiang67:["ol_xinxianying","ol_zhangrang","ol_liuyu"], - old_sp:["old_lingju","old_maliang","old_machao","zhangliang","jsp_caoren","ol_guansuo","old_zhangxingcai","old_huangfusong","ol_maliang","panfeng"], + old_sp:["old_lingju","old_maliang","old_machao","zhangliang","jsp_caoren","ol_guansuo","old_zhangxingcai","old_huangfusong","ol_maliang","panfeng","old_wangyun"], old_mobile:["old_caochun","old_majun"], }, }, character:{ + old_wangyun:['male','qun',4,['wylianji','moucheng']], panfeng:['male','qun',4,['kuangfu']], xiaoqiao:['female','wu',3,['tianxiang','hongyan']], weiyan:['male','shu',4,['kuanggu']], @@ -29,7 +30,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ old_caochong:['male','wei',3,['oldrenxin','oldchengxiang']], yuji:['male','qun',3,['old_guhuo'],['forbidai']], zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']], - old_zhangfei:['male','shu',4,['paoxiao','retishen']], + old_zhangfei:['male','shu',4,['paoxiao','new_tishen']], + old_zhaoyun:['male','shu',4,['longdan','new_yajiao']], old_huatuo:['male','qun',3,['jijiu','chulao']], jsp_caoren:['male','wei',4,['kuiwei','yanzheng']], old_caochun:['male','wei',4,['shanjia']], @@ -878,6 +880,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ old_huangfusong:'旧皇甫嵩', ol_maliang:'旧马良', ol_liuyu:'OL刘虞', + old_wangyun:'旧王允', + old_zhaoyun:'旧赵云', old_fuhun:'父魂', old_fuhun_info:'摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得技能“武圣”、“咆哮”,直到回合结束。', diff --git a/character/refresh.js b/character/refresh.js index d52a184ed..d9242ea9f 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -36,8 +36,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_zhangliao:['male','wei',4,['new_retuxi']], re_xuzhu:['male','wei',4,['new_reluoyi']], re_xiahoudun:['male','wei',4,['reganglie','new_qingjian']], - re_zhangfei:['male','shu',4,['new_repaoxiao','new_tishen']], - re_zhaoyun:['male','shu',4,['longdan','new_yajiao']], + re_zhangfei:['male','shu',4,['olpaoxiao','oltishen']], + re_zhaoyun:['male','shu',4,['ollongdan','olyajiao']], re_guanyu:['male','shu',4,['new_rewusheng','new_yijue']], re_machao:['male','shu',4,['mashu','retieji']], re_xushu:['male','shu',4,['zhuhai','qianxin']], @@ -103,6 +103,278 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sunben:['zhouyu','taishici','daqiao'], }, skill:{ + ollongdan:{ + audio:'longdan_sha', + audioname:['re_zhaoyun','sp_zhaoyun'], + enable:['chooseToUse','chooseToRespond'], + prompt:'将杀当做闪,或将闪当做杀,或将桃当做酒,或将酒当做桃使用或打出', + viewAs:function(cards,player){ + var name=false; + switch(get.name(cards[0],player)){ + case 'sha':name='shan';break; + case 'shan':name='sha';break; + case 'tao':name='jiu';break; + case 'jiu':name='tao';break; + } + if(name) return {name:name}; + return null; + }, + check:function(card){ + var player=_status.event.player; + if(_status.event.type=='phase'){ + var max=0; + var name2; + var list=['sha','tao','jiu']; + var map={sha:'shan',tao:'jiu',jiu:'tao'} + for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + var temp=get.order({name:name}); + if(temp>max){ + max=temp; + name2=map[name]; + } + } + } + if(name2==get.name(card,player)) return 1; + return 0; + } + return 1; + }, + filterCard:function(card,player,event){ + event=event||_status.event; + var filter=event._backup.filterCard; + var name=get.name(card,player); + if(name=='sha'&&filter({name:'shan',cards:[card]},player,event)) return true; + if(name=='shan'&&filter({name:'sha',cards:[card]},player,event)) return true; + if(name=='tao'&&filter({name:'jiu',cards:[card]},player,event)) return true; + if(name=='jiu'&&filter({name:'tao',cards:[card]},player,event)) return true; + return false; + }, + filter:function(event,player){ + var filter=event.filterCard; + if(filter({name:'sha'},player,event)&&player.countCards('h','shan')) return true; + if(filter({name:'shan'},player,event)&&player.countCards('h','sha')) return true; + if(filter({name:'tao'},player,event)&&player.countCards('h','jiu')) return true; + if(filter({name:'jiu'},player,event)&&player.countCards('h','tao')) return true; + return false; + }, + ai:{ + respondSha:true, + respondShan:true, + save:true, + skillTagFilter:function(player,tag){ + var name; + switch(tag){ + case 'respondSha':name='shan';break; + case 'respondShan':name='sha';break; + case 'save':name='jiu';break; + } + if(!player.countCards('h',name)) return false; + }, + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0; + var list=['sha','tao','jiu']; + var map={sha:'shan',tao:'jiu',jiu:'tao'} + for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + var temp=get.order({name:name}); + if(temp>max) max=temp; + } + } + if(max>0) max+=0.3; + return max; + } + return 4; + }, + }, + }, + olyajiao:{ + audio:'yajiao', + trigger:{player:'loseAfter'}, + frequent:true, + filter:function(event,player){ + return player!=_status.currentPhase&&event.hs&&event.hs.length>0&&['useCard','respond'].contains(event.getParent().name); + }, + content:function(){ + "step 0" + event.card=get.cards()[0]; + game.cardsGotoOrdering(event.card); + event.videoId=lib.status.videoId++; + var judgestr=get.translation(player)+'发动了【涯角】'; + game.addVideo('judge1',player,[get.cardInfo(event.card),judgestr,event.videoId]); + game.broadcastAll(function(player,card,str,id,cardid){ + var event; + if(game.online){ + event={}; + } + else{ + event=_status.event; + } + if(game.chess){ + event.node=card.copy('thrown','center',ui.arena).animate('start'); + } + else{ + event.node=player.$throwordered(card.copy(),true); + } + if(lib.cardOL) lib.cardOL[cardid]=event.node; + event.node.cardid=cardid; + event.node.classList.add('thrownhighlight'); + ui.arena.classList.add('thrownhighlight'); + event.dialog=ui.create.dialog(str); + event.dialog.classList.add('center'); + event.dialog.videoId=id; + },player,event.card,judgestr,event.videoId,get.id()); + + game.log(player,'展示了',event.card); + game.delay(2); + if(get.type(event.card,'trick')==get.type(trigger.getParent().card,'trick')){ + player.chooseTarget('选择获得此牌的角色').set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.du){ + if(target.hasSkillTag('nodu')) return 0; + return -att; + } + if(att>0){ + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }).set('du',event.card.name=='du'); + } + else{ + event.disbool=true; + player.chooseTarget('是否弃置攻击范围内包含你的一名角色区域内的一张牌?',function(card,player,target){ + return target.inRange(player)&&target.countDiscardableCards(player,'hej')>0; + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'guohe'},player,player); + }); + } + "step 1" + if(event.disbool){ + if(result.bool){ + player.line(result.targets[0],'green'); + player.discardPlayerCard(result.targets[0],'hej',true); + } + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(id,card){ + var dialog=get.idDialog(id); + if(dialog){ + dialog.close(); + } + if(card.clone){ + card.clone.delete(); + } + ui.arena.classList.remove('thrownhighlight'); + },event.videoId,event.card); + ui.arena.classList.remove('thrownhighlight'); + } + else if(result.targets){ + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + 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)]); + ui.arena.classList.remove('thrownhighlight'); + game.broadcast(function(card,target,id){ + var dialog=get.idDialog(id); + if(dialog){ + dialog.close(); + } + ui.arena.classList.remove('thrownhighlight'); + if(card.clone){ + card.clone.moveDelete(target); + } + },event.card,result.targets[0],event.videoId); + } + else{ + game.addVideo('deletenode',player,[get.cardInfo(event.node)]); + event.node.delete(); + game.broadcast(function(id){ + var dialog=get.idDialog(id); + if(dialog){ + dialog.close(); + } + if(card.clone){ + card.clone.delete(); + } + ui.arena.classList.remove('thrownhighlight'); + },event.videoId,event.card); + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + ui.arena.classList.remove('thrownhighlight'); + } + }, + ai:{ + effect:{ + target:function(card,player){ + if(get.tag(card,'respond')&&player.countCards('h')>1) return [1,0.2]; + } + } + } + }, + olpaoxiao:{ + audio:"paoxiao", + audioname:['re_zhangfei','guanzhang','xiahouba'], + trigger:{player:'shaMiss'}, + forced:true, + content:function(){ + player.addTempSkill('olpaoxiao2'); + player.addMark('olpaoxiao2',1,false); + }, + mod:{ + cardUsable:function (card,player,num){ + if(card.name=='sha') return Infinity; + }, + }, + }, + olpaoxiao2:{ + trigger:{source:'damageBegin1'}, + forced:true, + audio:'paoxiao', + audioname:['re_zhangfei','guanzhang','xiahouba'], + filter:function(event,player){ + return player.countMark('olpaoxiao2')>0; + }, + onremove:true, + content:function(){ + trigger.num+=player.countMark('olpaoxiao2'); + player.removeSkill('olpaoxiao2'); + }, + intro:{content:'本回合内下一次使用【杀】造成伤害时令伤害值+#'}, + }, + oltishen:{ + audio:'retishen', + unique:true, + mark:true, + skillAnimation:true, + animationColor:'soil', + limited:true, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + if(player.storage.oltishen) return false; + return player.isDamaged(); + }, + check:function(event,player){ + if(player.hp<=2||player.getDamagedHp()>2) return true; + if(player.getDamagedHp()<=1) return false; + return player.getDamagedHp()0; + })) return 3; + return -3; + } + if(!game.hasPlayer(function(current){ + return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; + })) return -6; + return 4-get.value(target.getEquip(1)); + }, + }, + }, + }, + xinmoucheng:{ + trigger:{player:'phaseZhunbeiBegin'}, + audio:'moucheng', + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'gray', + derivation:'xinjingong', + unique:true, + filter:function(event,player){ + return player.countMark('xinlianji')>2; + }, + content:function(){ + player.awakenSkill('xinmoucheng'); + player.addSkill('xinjingong'); + player.removeSkill('xinlianji'); + }, + }, + xinjingong:{ + audio:'jingong', + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('he',function(card){ + return card.name=='sha'||get.type(card)=='equip'; + }); + }, + delay:false, + usable:1, + content:function(){ + 'step 0' + var list=get.inpile('trick').randomGets(2); + if(Math.random()<0.5){ + list.push('wy_meirenji'); + } + else{ + list.push('wy_xiaolicangdao'); + } + for(var i=0;i0; }, logTarget:'player', - check:function(event,player){ - if(get.attitude(player,event.player)>=0) return true; - if(player.hasSkill('funan_jiexun')) return true; - if(event.cards.length>1) return true; - return get.value(event.cards[0])>get.value(event.respondTo[1]); - }, content:function(){ 'step 0' if(!player.hasSkill('funan_jiexun')){ @@ -7282,7 +7276,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:2, position:'h', audio:2, - derivation:['new_rewusheng','new_repaoxiao'], + derivation:['new_rewusheng','olpaoxiao'], viewAs:{name:'sha'}, prompt:'将两张手牌当杀使用或打出', check:function(card){ @@ -7297,7 +7291,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondSha:true, order:function(item,player){ - if(player.hasSkill('new_rewusheng')&&player.hasSkill('new_repaoxiao')){ + if(player.hasSkill('new_rewusheng')&&player.hasSkill('olpaoxiao')){ return 1; } if(player.countCards('h')<4){ @@ -7317,7 +7311,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ player.addTempSkill('new_rewusheng'); - player.addTempSkill('new_repaoxiao'); + player.addTempSkill('olpaoxiao'); player.addTempSkill('fuhun3'); } }, diff --git a/game/asset.js b/game/asset.js index 4170a80e4..03113ae70 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.9.99.3', + 'v1.9.100', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -3045,6 +3045,11 @@ window.noname_asset_list=[ 'image/character/key_ayato.jpg', 'image/character/key_nagisa.jpg', 'image/character/key_tomoya.jpg', + 'image/character/key_ao.jpg', + 'image/character/key_yuzuru.jpg', + 'image/character/old_wangyun.jpg', + 'image/character/old_zhaoyun.jpg', + 'image/character/sp_key_kanade.jpg', 'image/character/baiwuchang.jpg', 'image/character/baosanniang.jpg', diff --git a/game/game.js b/game/game.js index 49a06fc7c..62fb1b042 100644 --- a/game/game.js +++ b/game/game.js @@ -15468,7 +15468,7 @@ game.expandSkills(skills); for(var i=0;i=info.usable) enable=false; if(info.chooseButton&&_status.event.noButton) enable=false; if(info.round&&(info.round-(game.roundNumber-player.storage[skills2[i]+'_roundcount'])>0)) enable=false; @@ -30950,7 +30983,7 @@ if(skillinfo&&skillinfo.multitarget&&!skillinfo.multiline){ _status.multitarget=true; } - if((skillinfo&&skillinfo.viewAs)||!_status.event.skill){ + if((skillinfo&&skillinfo.viewAs&&typeof skillinfo.viewAs!='function')||!_status.event.skill){ var cardinfo=get.info(get.card()); if(cardinfo&&cardinfo.multitarget&&!cardinfo.multiline){ _status.multitarget=true; @@ -32100,7 +32133,7 @@ } return; } - if(info.viewAs){ + if(info.viewAs&&typeof info.viewAs!='function'){ if(typeof info.viewAs=='string'){ info.viewAs={name:info.viewAs}; } @@ -45636,7 +45669,8 @@ } if(event.skill){ event.result.skill=event.skill; - event.result.card=get.copy(get.info(event.skill).viewAs); + if(typeof get.info(event.skill).viewAs=='function') event.result.card=get.info(event.skill).viewAs(event.result.cards,event.player); + else event.result.card=get.copy(get.info(event.skill).viewAs); if(event.result.cards.length==1&&event.result.card){ event.result.card.suit=get.suit(event.result.cards[0]); event.result.card.number=get.number(event.result.cards[0]); @@ -47819,6 +47853,7 @@ if(skill&&!zhu.hasSkill(skill)) return null; return zhu; } + if(!game.zhu) return null; if(skill&&!game.zhu.hasSkill(skill)) return null; if(game.zhu.isZhu) return game.zhu; } @@ -48626,6 +48661,7 @@ card:function(original){ if(_status.event.skill){ var card=get.info(_status.event.skill).viewAs; + if(typeof card=='function') card=card(ui.selected.cards,_status.event.player); if(card){ return get.autoViewAs(card,ui.selected.cards,_status.event.player); } diff --git a/game/update.js b/game/update.js index d182d0208..75604b8cb 100644 --- a/game/update.js +++ b/game/update.js @@ -1,32 +1,35 @@ window.noname_update={ - version:'1.9.99.3', - update:'1.9.99.2', + version:'1.9.100', + update:'1.9.99.3', changeLog:[ + '新界赵云,界张飞,王允', + '立华奏,音无结弦', 'bug修复', ], files:[ - //'card/extra.js', + 'card/extra.js', //'card/huanlekapai.js', - 'card/sp.js', + //'card/sp.js', 'card/standard.js', //'card/swd.js', //'card/mtg.js', + 'card/gujian.js', //'card/guozhan.js', //'card/gwent.js', //'card/yunchou.js', //'card/zhenfa.js', - //'card/zhulu.js', + 'card/zhulu.js', 'character/diy.js', - 'character/extra.js', + //'character/extra.js', //'character/hearth.js', //'character/gujian.js', //'character/gwent.js', //'character/hearth.js', - 'character/mobile.js', + //'character/mobile.js', //'character/mtg.js', 'character/old.js', 'character/refresh.js', - 'character/shenhua.js', + //'character/shenhua.js', 'character/sp.js', //'character/tw.js', //'character/standard.js', @@ -43,10 +46,10 @@ window.noname_update={ //'mode/guozhan.js', //'mode/chess.js', //'mode/tafang.js', - //'mode/single.js', + 'mode/single.js', //'mode/stone.js', - 'mode/brawl.js', - 'mode/versus.js', + //'mode/brawl.js', + //'mode/versus.js', //'mode/boss.js', 'game/game.js', //'game/NoSleep.js', diff --git a/image/character/key_ao.jpg b/image/character/key_ao.jpg new file mode 100644 index 000000000..c9e54cef7 Binary files /dev/null and b/image/character/key_ao.jpg differ diff --git a/image/character/key_yuzuru.jpg b/image/character/key_yuzuru.jpg new file mode 100644 index 000000000..4243be521 Binary files /dev/null and b/image/character/key_yuzuru.jpg differ diff --git a/image/character/old_wangyun.jpg b/image/character/old_wangyun.jpg new file mode 100644 index 000000000..4fd6c1c70 Binary files /dev/null and b/image/character/old_wangyun.jpg differ diff --git a/image/character/old_zhaoyun.jpg b/image/character/old_zhaoyun.jpg new file mode 100644 index 000000000..7140cd5ba Binary files /dev/null and b/image/character/old_zhaoyun.jpg differ diff --git a/image/character/sp_key_kanade.jpg b/image/character/sp_key_kanade.jpg new file mode 100644 index 000000000..eebb6aa30 Binary files /dev/null and b/image/character/sp_key_kanade.jpg differ diff --git a/mode/single.js b/mode/single.js index 73de58e44..76d1289ee 100644 --- a/mode/single.js +++ b/mode/single.js @@ -3,24 +3,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return { name:'single', changbanCharacter:[ - "key_kyousuke", - "xf_yiji","caozhang","sunquan", - "re_caocao","re_guojia","re_xuzhu","re_zhangliao","re_xiahoudun","re_simayi","re_lidian", - "re_zhangfei","re_zhaoyun","re_zhouyu","re_ganning","re_lvbu","re_gongsunzan","re_diaochan", - "re_xiahouyuan","re_huangzhong","re_weiyan","re_dianwei","re_pangde","re_yanwen","pangtong", - "re_zhurong","sunjian","jiaxu","dengai","jiangwei","sunce", - "wangji","kuailiangkuaiyue","wangping","yl_luzhi","chendao","lukang", - "xin_masu","lingtong","xusheng","wangyi","xunyou","madai","handang", - "guohuai","caochong","guanping","liufeng","zhuran","xin_liru", - "hanhaoshihuan","wuyi","guyong","caoxiu","liuchen","sunxiu","gongsunyuan", - "guohuanghou","xinxianying","qinmi","xushi","xuezong","ol_yujin", - "lvdai","wangcan","zhoufang","guosi","zhangji","fanchou", - "zhanggong","shamoke","mangyachang","huangfusong","xf_huangquan","xf_tangzi","xf_sufei","liuqi", - "lifeng","lingcao","sunru","re_jikang","zhuling", - "sp_caiwenji","caoang","sp_caoren","fuwan","guanyinping","jsp_guanyu","huangjinleishi", - "sp_jiangwei","litong","mayunlu","sp_pangde","wanglang","xiahouba", - "yuanshu","yuejin","sp_zhangfei","zhugejin","panfeng","chenlin", - "jiling","mateng","tw_dingfeng","kaisa", + "key_rei","key_yoshino","key_noda","key_nagisa", + "re_caocao","re_caozhang","re_diaochan","re_ganning","re_gongsunzan","re_guojia","re_huangyueying","re_lidian","re_lvbu", + "re_simayi","sunquan","re_xiahoudun","re_xushu","yuanshu","xf_yiji","re_zhangfei","re_zhangliao","re_xuzhu", + "re_zhaoyun","re_zhouyu","re_zhugeliang","ol_xiahouyuan","re_huangzhong","re_weiyan","dianwei","te_yanwen","re_pangde", + "re_zhurong","re_sunjian","jiaxu","dengai","re_jiangwei","re_sunben","wangji","wangping","guanqiujian","chendao","ol_yujin", + "re_caozhi","xin_masu","re_lingtong","xusheng","re_gaoshun","xunyou","guanzhang","madai","handang","caochong", + "re_guohuai","guanping","liufeng","re_zhuran","xin_liru","hanhaoshihuan","guyong","zhuhuan","caoxiu","liuchen","re_zhangyi", + "re_quancong","sunxiu","sundeng","guohuanghou","re_jikang","xuezong","qinmi","lvdai","re_zhangliang","lingcao", + "sunru","zhuling","sp_caoren","fanchou","fuwan","sp_ganning","guanyinping","guosi","heqi","sp_jiangwei","litong", + "re_panfeng","sp_pangde","xf_sufei","xf_tangzi","xiahouba","xujing","yuejin","sp_zhangfei","zhangji","zhangyì","dongcheng", ], singlePile:[ ['spade',5,'sha'],