diff --git a/card/ex.js b/card/ex.js deleted file mode 100755 index 71428cf76..000000000 --- a/card/ex.js +++ /dev/null @@ -1,112 +0,0 @@ -'use strict'; -card.ex={ - connect:true, - card:{ - hanbing:{ - fullskin:true, - type:"equip", - subtype:"equip1", - distance:{attackFrom:-1}, - skills:['hanbing_skill'], - ai:{ - basic:{ - equipValue:2 - } - }, - }, - renwang:{ - fullskin:true, - type:"equip", - subtype:"equip2", - skills:['renwang_skill'], - ai:{ - basic:{ - equipValue:8 - }, - }, - }, - }, - skill:{ - hanbing_skill:{ - trigger:{player:'shaHit'}, - direct:true, - audio:true, - filter:function(event){ - return event.target.get('he').length>0; - }, - content:function(){ - "step 0" - player.choosePlayerCard('是否发动【寒冰剑】?','he',trigger.target,Math.min(2,trigger.target.num('he')),function(button){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var eff=ai.get.damageEffect(trigger.target,player,player); - if(ai.get.attitude(player,trigger.target)>0){ - if(eff>=0) return false; - return 10-ai.get.buttonValue(button); - } - if(eff<=0) return ai.get.buttonValue(button); - if(trigger.target.hp==1) return false; - if(player.skills.contains('jiu')||player.skills.contains('tianxianjiu')|| - player.skills.contains('luoyi2')||player.skills.contains('reluoyi2')) return false; - if(_status.event.dialog.buttons.length<2) return -1; - var num=0; - for(var i=0;i<_status.event.dialog.buttons.length;i++){ - if(ai.get.buttonValue(_status.event.dialog.buttons[i])>1.5) num++; - } - if(num>=2) return ai.get.buttonValue(button)-1.5; - }); - "step 1" - if(result.bool){ - trigger.untrigger(); - var cards=[]; - for(var i=0;i0; + }, + content:function(){ + "step 0" + player.choosePlayerCard('是否发动【寒冰剑】?','he',trigger.target,Math.min(2,trigger.target.num('he')),function(button){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var eff=ai.get.damageEffect(trigger.target,player,player); + if(ai.get.attitude(player,trigger.target)>0){ + if(eff>=0) return false; + return 10-ai.get.buttonValue(button); + } + if(eff<=0) return ai.get.buttonValue(button); + if(trigger.target.hp==1) return false; + if(player.skills.contains('jiu')||player.skills.contains('tianxianjiu')|| + player.skills.contains('luoyi2')||player.skills.contains('reluoyi2')) return false; + if(_status.event.dialog.buttons.length<2) return -1; + var num=0; + for(var i=0;i<_status.event.dialog.buttons.length;i++){ + if(ai.get.buttonValue(_status.event.dialog.buttons[i])>1.5) num++; + } + if(num>=2) return ai.get.buttonValue(button)-1.5; + }); + "step 1" + if(result.bool){ + trigger.untrigger(); + var cards=[]; + for(var i=0;i0; + }, + content:function(){ + target.discard(target.get('he').randomGet()); + }, + ai:{ + order:6.5, + result:{ + target:-1, + }, + useful:[2,0.5], + value:[2,0.5], + } + }, + hslingjian_zhongxinghujia:{ + type:'hslingjian', + fullimage:true, + vanish:true, + enable:true, + derivation:true, + filterTarget:true, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i0; + }, + content:function(){ + var es=target.get('e'); + target.gain(es); + target.$gain2(es); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noe')) return target.num('e')*2; + return -target.num('e'); + } + }, + useful:[2,0.5], + value:[2,0.5], + tag:{ + loseCard:1, + } + } + }, + hslingjian_jinjilengdong:{ + type:'hslingjian', + fullimage:true, + vanish:true, + enable:true, + derivation:true, + filterTarget:function(card,player,target){ + return !target.isTurnedOver()&&target!=player; + }, + content:function(){ + target.draw(2); + target.turnOver(); + }, + ai:{ + order:2, + result:{ + target:-1, + }, + useful:[2,0.5], + value:[2,0.5], + } + }, + hslingjian_shengxiuhaojiao:{ + type:'hslingjian', + fullimage:true, + vanish:true, + enable:true, + derivation:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('hslingjian_chaofeng'); + }, + content:function(){ + target.addTempSkill('hslingjian_chaofeng',{player:'phaseBegin'}); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(get.distance(player,target,'absolute')<=1) return 0; + if(target.num('h')<=target.hp) return -0.1; + return -1; + } + }, + useful:[2,0.5], + value:[2,0.5], + } + }, + hslingjian_yinmilichang:{ + type:'hslingjian', + fullimage:true, + vanish:true, + enable:true, + derivation:true, + filterTarget:function(card,player,target){ + return player!=target&&!target.hasSkill('hslingjian_yinshen'); + }, + content:function(){ + target.addTempSkill('hslingjian_yinshen',{player:'phaseBegin'}); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + if(get.distance(player,target,'absolute')<=1) return 0; + if(target.hp==1) return 2; + if(target.hp==2&&target.num('h')<=2) return 1.2; + return 1; + } + }, + useful:[2,0.5], + value:[2,0.5], + } + }, xingjunyan:{ fullskin:true, type:'equip', @@ -638,6 +935,748 @@ card.swd={ }, }, skill:{ + hslingjian_xuanfengzhiren_equip1:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.player.num('he'); + }, + content:function(){ + trigger.player.discard(trigger.player.get('he').randomGet()); + } + }, + hslingjian_xuanfengzhiren_equip2:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.source&&event.source.num('he'); + }, + content:function(){ + trigger.source.discard(trigger.source.get('he').randomGet()); + } + }, + hslingjian_xuanfengzhiren_equip3:{ + trigger:{player:'loseAfter'}, + forced:true, + filter:function(event,player){ + return _status.currentPhase!=player&&!player.hasSkill('hslingjian_xuanfengzhiren_equip3_dist'); + }, + content:function(){ + player.addTempSkill('hslingjian_xuanfengzhiren_equip3_dist','phaseAfter'); + } + }, + hslingjian_xuanfengzhiren_equip3_dist:{ + mod:{ + globalTo:function(from,to,distance){ + return distance+1; + } + } + }, + hslingjian_xuanfengzhiren_equip4:{ + trigger:{player:'loseAfter'}, + forced:true, + filter:function(event,player){ + return _status.currentPhase==player&&!player.hasSkill('hslingjian_xuanfengzhiren_equip4_dist'); + }, + content:function(){ + player.addTempSkill('hslingjian_xuanfengzhiren_equip4_dist','phaseAfter'); + } + }, + hslingjian_xuanfengzhiren_equip4_dist:{ + mod:{ + globalFrom:function(from,to,distance){ + return distance-1; + } + } + }, + hslingjian_xuanfengzhiren_equip5:{ + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + filter:function(event,player){ + return player.num('he')>0; + }, + filterTarget:function(card,player,target){ + return target.num('he')>0; + }, + check:function(card){ + return 5-ai.get.value(card); + }, + content:function(){ + target.discard(target.get('he').randomGet()); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + var dh=player.num('he')-target.num('he'); + if(dh>0){ + return -Math.sqrt(dh); + } + return 0; + } + } + } + }, + hslingjian_zhongxinghujia_equip1:{ + trigger:{source:'damageEnd'}, + check:function(event,player){ + return !player.get('e','2'); + }, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + var card=game.createCard(get.inpile('equip2').randomGet()); + player.equip(card); + player.$draw(card); + game.delay(); + } + }, + hslingjian_zhongxinghujia_equip2:{ + trigger:{player:'damageEnd'}, + check:function(event,player){ + return ai.get.attitude(player,event.source)<0; + }, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.source&&event.source.get('e','2'); + }, + content:function(){ + player.line(trigger.source,'green'); + trigger.source.discard(trigger.source.get('e','2')); + } + }, + hslingjian_zhongxinghujia_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.get('e','2')) return distance+1; + } + } + }, + hslingjian_zhongxinghujia_equip4:{ + mod:{ + globalFrom:function(from,to,distance){ + if(from.get('e','2')) return distance-1; + } + } + }, + hslingjian_zhongxinghujia_equip5:{ + enable:'phaseUse', + usable:1, + filterCard:true, + position:'he', + filterTarget:true, + selectCard:2, + filter:function(event,player){ + return player.num('he')>=2; + }, + check:function(card){ + return 5-ai.get.value(card); + }, + content:function(){ + var card=game.createCard(get.inpile('equip2').randomGet()); + target.equip(card); + target.$draw(card); + game.delay(); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(target.get('e','2')) return 0; + return 1; + } + } + } + }, + hslingjian_jinjilengdong_equip1:{ + trigger:{source:'damageEnd'}, + check:function(event,player){ + if(event.player.isTurnedOver()){ + return ai.get.attitude(player,event.player)>0; + } + return ai.get.attitude(player,event.player)<=0; + }, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive(); + }, + logTarget:function(event){ + return event.player; + }, + content:function(){ + trigger.player.draw(2); + trigger.player.turnOver(); + } + }, + hslingjian_jinjilengdong_equip2:{ + trigger:{player:'damageEnd'}, + check:function(event,player){ + if(event.player.isTurnedOver()){ + return ai.get.attitude(player,event.source)>0; + } + return ai.get.attitude(player,event.source)<=0; + }, + filter:function(event){ + return event.card&&event.card.name=='sha'&&event.source&&event.source.isAlive(); + }, + logTarget:function(event){ + return event.source; + }, + content:function(){ + player.line(trigger.source,'green'); + trigger.source.draw(2); + trigger.source.turnOver(); + } + }, + hslingjian_jinjilengdong_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.isTurnedOver()) return distance+2; + } + } + }, + hslingjian_jinjilengdong_equip4:{ + mod:{ + globalFrom:function(from,to,distance){ + if(from.isTurnedOver()) return distance-2; + } + } + }, + hslingjian_jinjilengdong_equip5:{ + trigger:{player:'phaseAfter'}, + direct:true, + filter:function(event,player){ + return !player.isTurnedOver(); + }, + content:function(){ + "step 0" + player.chooseTarget('是否发动【冰冻】?',function(card,player,target){ + return player!=target&&!target.isTurnedOver(); + }).ai=function(target){ + return Math.max(0,-ai.get.attitude(player,target)-2); + }; + "step 1" + if(result.bool){ + player.logSkill('hslingjian_jinjilengdong_equip5',result.targets); + player.turnOver(); + result.targets[0].turnOver(); + game.asyncDraw([player,result.targets[0]],2); + } + }, + }, + hslingjian_yinmilichang_equip1:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + 'step 0' + player.chooseTarget('是否发动【隐力】?',function(card,player,target){ + return target!=player&&!target.hasSkill('hslingjian_yinshen'); + }).ai=function(target){ + var att=ai.get.attitude(player,target); + if(get.distance(player,target,'absolute')<=1) return 0; + if(target.hp==1) return 2*att; + if(target.hp==2&&target.num('h')<=2) return 1.2*att; + return att; + } + 'step 1' + if(result.bool){ + player.logSkill('hslingjian_yinmilichang_equip1',result.targets); + result.targets[0].addTempSkill('hslingjian_yinshen',{player:'phaseBegin'}); + } + } + }, + hslingjian_yinmilichang_equip2:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + return !player.hasSkill('hslingjian_yinshen'); + }, + content:function(){ + player.addTempSkill('hslingjian_yinshen','phaseAfter'); + } + }, + hslingjian_yinmilichang_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.hp==1) return distance+1; + } + } + }, + hslingjian_yinmilichang_equip4:{ + mod:{ + globalFrom:function(from,to,distance){ + if(from.hp==1) return distance-1; + } + } + }, + hslingjian_yinmilichang_equip5:{ + mod:{ + targetEnabled:function(card,player,target,now){ + if(target.num('h')==0){ + if(card.name=='sha'||card.name=='juedou') return false; + } + } + }, + ai:{ + noh:true, + skillTagFilter:function(player,tag){ + if(tag=='noh'){ + if(player.num('h')!=1) return false; + } + } + } + }, + hslingjian_xingtigaizao_equip1:{ + trigger:{source:'damageEnd'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + player.draw(); + } + }, + hslingjian_xingtigaizao_equip2:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event){ + return event.card&&event.card.name=='sha'; + }, + content:function(){ + player.draw(); + } + }, + hslingjian_xingtigaizao_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + return distance+1; + }, + globalFrom:function(from,to,distance){ + return distance+1; + } + } + }, + hslingjian_xingtigaizao_equip4:{ + mod:{ + globalTo:function(from,to,distance){ + return distance-1; + }, + globalFrom:function(from,to,distance){ + return distance-1; + } + } + }, + hslingjian_xingtigaizao_equip5:{ + mod:{ + maxHandcard:function(player,num){ + return num-1; + } + }, + trigger:{player:'phaseDrawBegin'}, + forced:true, + content:function(){ + trigger.num++; + } + }, + hslingjian_shengxiuhaojiao_equip1:{ + trigger:{player:'shaBegin'}, + forced:true, + filter:function(event,player){ + return event.target.hasSkill('hslingjian_chaofeng'); + }, + content:function(){ + trigger.directHit=true; + } + }, + hslingjian_shengxiuhaojiao_equip2:{ + mod:{ + targetEnabled:function(card,player,target){ + if(player.hasSkill('hslingjian_chaofeng')) return false; + } + } + }, + hslingjian_shengxiuhaojiao_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.hp0; + }).ai=function(target){ + return -ai.get.attitude(player,target); + }; + "step 1" + if(result.bool){ + player.line(result.targets,'green'); + player.discardPlayerCard(result.targets[0],'he',true); + } + } + }, + hslingjian_shijianhuisu_equip2:{ + onLose:function(){ + player.draw(); + } + }, + hslingjian_shijianhuisu_equip3:{ + mod:{ + globalTo:function(from,to,distance){ + if(to.num('e')==1) return distance+1; + } + } + }, + hslingjian_shijianhuisu_equip4:{ + mod:{ + globalFrom:function(from,to,distance){ + if(from.num('e')==1) return distance-1; + } + } + }, + hslingjian_shijianhuisu_equip5:{ + enable:'phaseUse', + usable:1, + filterCard:true, + selectCard:1, + filterTarget:function(card,player,target){ + return player!=target&&target.num('he')>0; + }, + position:'he', + content:function(){ + var es=target.get('e'); + target.gain(es); + target.$gain2(es); + }, + check:function(card){ + return 4-ai.get.value(card); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noe')) return target.num('e')*2; + return -target.num('e'); + } + }, + } + }, + mujiaren_skill:{ + enable:'phaseUse', + filter:function(event,player){ + return player.num('h',{type:'hslingjian'})>=2; + }, + filterCard:{type:'hslingjian'}, + selectCard:2, + content:function(){ + player.gain(game.createCard('jiguanshu')); + }, + ai:{ + order:7, + result:{ + player:function(player){ + for(var i=0;i0)){ + return 1; + } + return 0; + } + } + } + } + }, + _lingjianduanzao:{ + enable:'phaseUse', + position:'he', + prompt:function(event){ + var lingjians=[],types=[]; + var hs=event.player.get('h'); + for(var i=0;i'; + } + } + return str; + }, + check:function(card){ + return 1+ai.get.value(card); + }, + filterCard:function(card){ + var type=get.type(card); + if(type=='equip'&&!lib.inpile.contains(card.name)) return false; + for(var i=0;i2){ + str2=str2.slice(0,2); + } + lib.translate[name]=str+str2; + str2=lib.translate[equip.name+'_info']||''; + if(str2[str2.length-1]=='.'||str2[str2.length-1]=='。'){ + str2=str2.slice(0,str2.length-1); + } + for(var i=0;i0; - }, - content:function(){ - target.discard(target.get('he').randomGet()); - }, - ai:{ - order:6.5, - result:{ - target:-1, - }, - useful:[2,0.5], - value:[2,0.5], - } - }, - hslingjian_zhongxinghujia:{ - type:'hslingjian', - fullimage:true, - vanish:true, - enable:true, - derivation:true, - filterTarget:true, - content:function(){ - 'step 0' - var list=[]; - for(var i=0;i0; - }, - content:function(){ - var es=target.get('e'); - target.gain(es); - target.$gain2(es); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - if(target.hasSkillTag('noe')) return target.num('e')*2; - return -target.num('e'); - } - }, - useful:[2,0.5], - value:[2,0.5], - tag:{ - loseCard:1, - } - } - }, - hslingjian_jinjilengdong:{ - type:'hslingjian', - fullimage:true, - vanish:true, - enable:true, - derivation:true, - filterTarget:function(card,player,target){ - return !target.isTurnedOver()&&target!=player; - }, - content:function(){ - target.draw(2); - target.turnOver(); - }, - ai:{ - order:2, - result:{ - target:-1, - }, - useful:[2,0.5], - value:[2,0.5], - } - }, - hslingjian_shengxiuhaojiao:{ - type:'hslingjian', - fullimage:true, - vanish:true, - enable:true, - derivation:true, - filterTarget:function(card,player,target){ - return !target.hasSkill('hslingjian_chaofeng'); - }, - content:function(){ - target.addTempSkill('hslingjian_chaofeng',{player:'phaseBegin'}); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(get.distance(player,target,'absolute')<=1) return 0; - if(target.num('h')<=target.hp) return -0.1; - return -1; - } - }, - useful:[2,0.5], - value:[2,0.5], - } - }, - hslingjian_yinmilichang:{ - type:'hslingjian', - fullimage:true, - vanish:true, - enable:true, - derivation:true, - filterTarget:function(card,player,target){ - return player!=target&&!target.hasSkill('hslingjian_yinshen'); - }, - content:function(){ - target.addTempSkill('hslingjian_yinshen',{player:'phaseBegin'}); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - if(get.distance(player,target,'absolute')<=1) return 0; - if(target.hp==1) return 2; - if(target.hp==2&&target.num('h')<=2) return 1.2; - return 1; - } - }, - useful:[2,0.5], - value:[2,0.5], - } - }, }, skill:{ - hslingjian_xuanfengzhiren_equip1:{ - trigger:{source:'damageEnd'}, - forced:true, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.player.num('he'); - }, - content:function(){ - trigger.player.discard(trigger.player.get('he').randomGet()); - } - }, - hslingjian_xuanfengzhiren_equip2:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.source&&event.source.num('he'); - }, - content:function(){ - trigger.source.discard(trigger.source.get('he').randomGet()); - } - }, - hslingjian_xuanfengzhiren_equip3:{ - trigger:{player:'loseAfter'}, - forced:true, - filter:function(event,player){ - return _status.currentPhase!=player&&!player.hasSkill('hslingjian_xuanfengzhiren_equip3_dist'); - }, - content:function(){ - player.addTempSkill('hslingjian_xuanfengzhiren_equip3_dist','phaseAfter'); - } - }, - hslingjian_xuanfengzhiren_equip3_dist:{ - mod:{ - globalTo:function(from,to,distance){ - return distance+1; - } - } - }, - hslingjian_xuanfengzhiren_equip4:{ - trigger:{player:'loseAfter'}, - forced:true, - filter:function(event,player){ - return _status.currentPhase==player&&!player.hasSkill('hslingjian_xuanfengzhiren_equip4_dist'); - }, - content:function(){ - player.addTempSkill('hslingjian_xuanfengzhiren_equip4_dist','phaseAfter'); - } - }, - hslingjian_xuanfengzhiren_equip4_dist:{ - mod:{ - globalFrom:function(from,to,distance){ - return distance-1; - } - } - }, - hslingjian_xuanfengzhiren_equip5:{ - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - filter:function(event,player){ - return player.num('he')>0; - }, - filterTarget:function(card,player,target){ - return target.num('he')>0; - }, - check:function(card){ - return 5-ai.get.value(card); - }, - content:function(){ - target.discard(target.get('he').randomGet()); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - var dh=player.num('he')-target.num('he'); - if(dh>0){ - return -Math.sqrt(dh); - } - return 0; - } - } - } - }, - hslingjian_zhongxinghujia_equip1:{ - trigger:{source:'damageEnd'}, - check:function(event,player){ - return !player.get('e','2'); - }, - filter:function(event){ - return event.card&&event.card.name=='sha'; - }, - content:function(){ - var card=game.createCard(get.inpile('equip2').randomGet()); - player.equip(card); - player.$draw(card); - game.delay(); - } - }, - hslingjian_zhongxinghujia_equip2:{ - trigger:{player:'damageEnd'}, - check:function(event,player){ - return ai.get.attitude(player,event.source)<0; - }, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.source&&event.source.get('e','2'); - }, - content:function(){ - player.line(trigger.source,'green'); - trigger.source.discard(trigger.source.get('e','2')); - } - }, - hslingjian_zhongxinghujia_equip3:{ - mod:{ - globalTo:function(from,to,distance){ - if(to.get('e','2')) return distance+1; - } - } - }, - hslingjian_zhongxinghujia_equip4:{ - mod:{ - globalFrom:function(from,to,distance){ - if(from.get('e','2')) return distance-1; - } - } - }, - hslingjian_zhongxinghujia_equip5:{ - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - filterTarget:true, - selectCard:2, - filter:function(event,player){ - return player.num('he')>=2; - }, - check:function(card){ - return 5-ai.get.value(card); - }, - content:function(){ - var card=game.createCard(get.inpile('equip2').randomGet()); - target.equip(card); - target.$draw(card); - game.delay(); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(target.get('e','2')) return 0; - return 1; - } - } - } - }, - hslingjian_jinjilengdong_equip1:{ - trigger:{source:'damageEnd'}, - check:function(event,player){ - if(event.player.isTurnedOver()){ - return ai.get.attitude(player,event.player)>0; - } - return ai.get.attitude(player,event.player)<=0; - }, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive(); - }, - logTarget:function(event){ - return event.player; - }, - content:function(){ - trigger.player.draw(2); - trigger.player.turnOver(); - } - }, - hslingjian_jinjilengdong_equip2:{ - trigger:{player:'damageEnd'}, - check:function(event,player){ - if(event.player.isTurnedOver()){ - return ai.get.attitude(player,event.source)>0; - } - return ai.get.attitude(player,event.source)<=0; - }, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.source&&event.source.isAlive(); - }, - logTarget:function(event){ - return event.source; - }, - content:function(){ - player.line(trigger.source,'green'); - trigger.source.draw(2); - trigger.source.turnOver(); - } - }, - hslingjian_jinjilengdong_equip3:{ - mod:{ - globalTo:function(from,to,distance){ - if(to.isTurnedOver()) return distance+2; - } - } - }, - hslingjian_jinjilengdong_equip4:{ - mod:{ - globalFrom:function(from,to,distance){ - if(from.isTurnedOver()) return distance-2; - } - } - }, - hslingjian_jinjilengdong_equip5:{ - trigger:{player:'phaseAfter'}, - direct:true, - filter:function(event,player){ - return !player.isTurnedOver(); - }, - content:function(){ - "step 0" - player.chooseTarget('是否发动【冰冻】?',function(card,player,target){ - return player!=target&&!target.isTurnedOver(); - }).ai=function(target){ - return Math.max(0,-ai.get.attitude(player,target)-2); - }; - "step 1" - if(result.bool){ - player.logSkill('hslingjian_jinjilengdong_equip5',result.targets); - player.turnOver(); - result.targets[0].turnOver(); - game.asyncDraw([player,result.targets[0]],2); - } - }, - }, - hslingjian_yinmilichang_equip1:{}, - hslingjian_yinmilichang_equip2:{}, - hslingjian_yinmilichang_equip3:{}, - hslingjian_yinmilichang_equip4:{}, - hslingjian_yinmilichang_equip5:{}, - hslingjian_xingtigaizao_equip1:{}, - hslingjian_xingtigaizao_equip2:{}, - hslingjian_xingtigaizao_equip3:{}, - hslingjian_xingtigaizao_equip4:{}, - hslingjian_xingtigaizao_equip5:{}, - hslingjian_shengxiuhaojiao_equip1:{}, - hslingjian_shengxiuhaojiao_equip2:{}, - hslingjian_shengxiuhaojiao_equip3:{}, - hslingjian_shengxiuhaojiao_equip4:{}, - hslingjian_shengxiuhaojiao_equip5:{}, - hslingjian_shijianhuisu_equip1:{}, - hslingjian_shijianhuisu_equip2:{}, - hslingjian_shijianhuisu_equip3:{}, - hslingjian_shijianhuisu_equip4:{}, - hslingjian_shijianhuisu_equip5:{}, - mujiaren_skill:{ - enable:'phaseUse', - filter:function(event,player){ - return player.num('h',{type:'hslingjian'})>=2; - }, - filterCard:{type:'hslingjian'}, - selectCard:2, - content:function(){ - player.gain(game.createCard('jiguanshu')); - }, - ai:{ - order:7, - result:{ - player:function(player){ - for(var i=0;i0)){ - return 1; - } - return 0; - } - } - } - } - }, - _lingjianduanzao:{ - enable:'phaseUse', - position:'he', - prompt:function(event){ - var lingjians=[],types=[]; - var hs=event.player.get('h'); - for(var i=0;i'; - } - } - return str; - }, - check:function(card){ - return 1+ai.get.value(card); - }, - filterCard:function(card){ - var type=get.type(card); - if(!ui.selected.cards.length){ - return type=='equip'&&lib.inpile.contains(card.name); - } - return type=='hslingjian'; - }, - process:function(cards){ - if(cards.length==3){ - cards.sort(function(a,b){ - if(a.name2){ - str2=str2.slice(0,2); - } - lib.translate[name]=str+str2; - str2=lib.translate[equip.name+'_info']||''; - if(str2[str2.length-1]=='.'||str2[str2.length-1]=='。'){ - str2=str2.slice(0,str2.length-1); - } - for(var i=0;i1) return true; - var att=ai.get.attitude(player,event.player); - if(player.hp==player.maxHp) return att>0; - return att>=0; - } - else{ - if(player.hp==1||event.num>1) return true; - if(player.hp==2) return ai.get.attitude(player,event.player)>=-2; - return ai.get.attitude(player,event.player)>=0; - } + if(player.hp==1&&event.player.hp>1) return true; + var eff=ai.get.damageEffect(event.player,player,player); + if(player.hp==player.maxHp) return eff<0; + return eff<=0; }, content:function(){ trigger.untrigger(); @@ -8065,7 +8055,7 @@ character.swd={ guxing_info:'出牌阶段,你可以将最后至多X张手牌当杀使用,此杀无视距离且可以指定至多3个目标,每造成一次伤害,你摸一张牌,X为你已损失的体力值且至少为1。', tianlun_info:'任意一名角色的判定生效前,你可以弃置一张场上角色的判定牌代替之', hlongyin_info:'出牌阶段,你可以弃置任意张颜色相同且点数不同的牌,并获得逆时针座位距离与卡牌点数相同的角色区域内的一张牌。每阶段限一次', - lanzhi_info:'你对一名其他角色造成伤害时,你可以防止此伤害,然后回复一点体力', + lanzhi_info:'每当你即将造成伤害,你可以防止此伤害,然后回复一点体力', lanzhi_old_info:'每当你即将造成伤害,可以防止此伤害,然后摸两张牌。每回合限发动一次。', tianhuo_info:'出牌阶段,你可以令所有角色弃置其判定区域内的牌,并受到没有来源的等量火焰伤害,每阶段限一次', huanyin_info:'锁定技,每当你成为其他角色的卡牌的目标时,你进行一次判定,若为黑桃则取消之,若为红桃你摸一张牌', diff --git a/game/game.js b/game/game.js index ba3de99a3..a116fdd90 100755 --- a/game/game.js +++ b/game/game.js @@ -9708,6 +9708,7 @@ this.unmarkSkill(skill); this.skills.remove(skill); this.checkConflict(); + delete this.tempSkills[skill]; if(lib.skill[skill]&&lib.skill[skill].onremove){ lib.skill[skill].onremove(this); } @@ -14592,6 +14593,23 @@ ui.updatehl(); } }, + newcard:function(content){ + if(content){ + lib.translate[content.name]=content.translate; + lib.translate[content.name+'_info']=content.info; + lib.card[content.name]={}; + lib.card[content.name].cardimage=content.card + for(var i in lib.card[content.card]){ + lib.card[content.name][i]=lib.card[content.card][i]; + } + if(content.legend){ + lib.card[content.name].legend=true; + } + else if(content.epic){ + lib.card[content.name].epic=true; + } + } + }, playAudio:function(str){ game.playAudio(str,'video'); }, @@ -20818,6 +20836,7 @@ node.mode=mode; var list=[]; for(var i=0;i