From f48a9aaea08e77f21fd865af232d107ee8ca6a2e Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 22 Feb 2017 15:41:30 +0800 Subject: [PATCH] l --- card/gujian.js | 2 +- card/swd.js | 2 +- card/yunchou.js | 1 + character/hearth.js | 58 ++++++++++++++++++++++++++++++++++++++++++- character/swd.js | 36 +++++++++++++++++++++++++-- character/xianjian.js | 40 ++++++++--------------------- character/yxs.js | 2 +- game/game.js | 10 ++++++-- 8 files changed, 114 insertions(+), 37 deletions(-) diff --git a/card/gujian.js b/card/gujian.js index 0b447db85..42559cc3e 100644 --- a/card/gujian.js +++ b/card/gujian.js @@ -1535,7 +1535,7 @@ card.gujian={ 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'); + return player.hasCard('shihuifen')||player.hasSkillTag('shihuifen'); }, content:function(){ player.chooseToUse(get.prompt('shihuifen',trigger.player).replace(/发动/,'使用'),function(card,player){ diff --git a/card/swd.js b/card/swd.js index ad3620cf8..0cd1962a3 100644 --- a/card/swd.js +++ b/card/swd.js @@ -5094,7 +5094,7 @@ card.swd={ ['diamond',8,'lingjiandai'], ['club',2,'jiguanshu'], - ['spade',2,'jiguanshu'], + // ['spade',2,'jiguanshu'], // ['heart',2,'jiguanshu'], ['diamond',2,'jiguanshu'], diff --git a/card/yunchou.js b/card/yunchou.js index 564b3e0d5..c385f085e 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -408,6 +408,7 @@ card.yunchou={ event.source=info.source; event.source.storage.youdishenru=player; event.source.addSkill('youdishenru'); + player.line(event.source,'green'); 'step 1' var next=event.source.chooseToUse({name:'sha'},player,-1,'对'+get.translation(player)+'使用一张杀,或受到一点伤害'); next.ai2=function(){ diff --git a/character/hearth.js b/character/hearth.js index 2d0c41ab0..d0125ac4e 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -3748,6 +3748,62 @@ character.hearth={ } }, kuixin:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return Math.abs(target.num('h')-player.num('h'))<=1; + }, + content:function(){ + var cards0=target.get('h'); + var cards1=player.get('h'); + target.gain(cards1,player); + player.gain(cards0,target); + target.$giveAuto(cards0,player); + player.$giveAuto(cards1,target); + }, + ai:{ + order:function(){ + var player=_status.event.player; + if(player.hasCard(function(card){ + return ai.get.value(card)>=8; + })){ + return 0; + } + var nh=player.num('h'); + if(game.hasPlayer(function(current){ + return ai.get.attitude(player,current)<=0&¤t.num('h')==nh+1; + })){ + return 9; + } + return 1; + }, + result:{ + player:function(player,target){ + var att=ai.get.attitude(player,target); + if(att>0) return 0; + if(player.hasCard(function(card){ + return ai.get.value(card)>=8; + })){ + return 0; + } + var n1=target.num('h'),n2=player.num('h'); + var num=0; + if(n1-n2==1){ + num=1; + } + if(player.num('h','du')){ + if(n1==n2) num=0.5; + else num=0.1; + } + if(att==0){ + num/=2; + } + return num; + } + } + } + }, + kuixin_old:{ trigger:{player:'phaseEnd'}, direct:true, filter:function(event,player){ @@ -6171,7 +6227,7 @@ character.hearth={ jingmeng:'镜梦', jingmeng_info:'每当你于回合内使用第一张牌时,你可以从牌堆中随机获得一张与之类型相同的牌', kuixin:'窥心', - kuixin_info:'结束阶段,你可以将你的手牌与一名其他角色交换(手牌数之差不能多于1)', + kuixin_info:'出牌阶段限一次,你可以将你的手牌与一名其他角色交换(手牌数之差不能多于1)', lianzhan:'连斩', lianzhan_info:'出牌阶段结束时,你可以摸X张牌,X为你本回合使用的卡牌数', yanshu:'炎舞', diff --git a/character/swd.js b/character/swd.js index 32ccab89d..4e446125f 100644 --- a/character/swd.js +++ b/character/swd.js @@ -4744,7 +4744,39 @@ character.swd={ } }, dunxing:{ - inherit:'tuoqiao' + direct:true, + filter:function(event,player){ + if(event.player==player) return false; + return player.num('he')>0; + }, + trigger:{target:'useCardToBefore'}, + content:function(){ + "step 0" + var next=player.chooseToDiscard('he',get.prompt(event.name)); + next.logSkill=event.name; + next.ai=function(card){ + if(get.tag(trigger.card,'multitarget')&&!get.tag(card,'multineg')) return 0; + if(ai.get.effect(player,trigger.card,trigger.player,player)<0){ + return 7-ai.get.value(card); + } + return 0; + } + next.prompt2='弃置一张牌并进行一次判定,若结果不为红桃则'+get.translation(trigger.card)+'失效'; + "step 1" + if(result.bool){ + player.judge(function(card){ + return get.suit(card)=='heart'?-1:1; + }); + } + else{ + event.finish(); + } + "step 2" + if(result.suit!='heart'){ + trigger.untrigger(); + trigger.finish(); + } + } }, qiaoxie:{ group:['qiaoxie2','qiaoxie3'], @@ -8966,7 +8998,7 @@ character.swd={ wanjun:'万钧', wanjun_info:'你可以将一张装备牌当作南蛮入侵使用', dunxing:'遁形', - // dunxing_info:'锁定技,体力值比你多的角色无法在回合内对你使用卡牌', + dunxing_info:'当你成为其他角色卡牌的目标时,你可以弃置一张牌并进行一次判定,若不为红桃,则取消之', guiying:'鬼影', guiying_info:'你可以将一张黑色牌当偷梁换柱使用', shehun:'摄魂', diff --git a/character/xianjian.js b/character/xianjian.js index ab9337969..4545885f3 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -2348,35 +2348,17 @@ character.xianjian={ } }, tuoqiao:{ - direct:true, - filter:function(event,player){ - if(event.player==player) return false; - return player.num('h')>0; + enable:'chooseToUse', + filterCard:{color:'black'}, + position:'he', + viewAs:{name:'shihuifen'}, + viewAsFilter:function(player){ + return player.num('he',{color:'black'})>0; }, - trigger:{target:'useCardToBefore'}, - content:function(){ - "step 0" - var next=player.chooseToDiscard(get.prompt('tuoqiao')); - next.logSkill=event.name; - next.ai=function(card){ - if(ai.get.effect(player,trigger.card,trigger.player,player)<0){ - return 7-ai.get.value(card); - } - return 0; - } - "step 1" - if(result.bool){ - player.judge(function(card){ - return get.suit(card)=='heart'?-1:1; - }); - } - else{ - event.finish(); - } - "step 2" - if(result.suit!='heart'){ - trigger.untrigger(); - trigger.finish(); + ai:{ + shihuifen:true, + skillTagFilter:function(player){ + return player.num('he',{color:'black'})>0; } } }, @@ -2632,7 +2614,7 @@ character.xianjian={ tannang:'探囊', tannang_info:'出牌阶段限一次,你可以将一张梅花手牌当顺手牵羊使用;你的顺手牵羊无距离限制', tuoqiao:'脱壳', - tuoqiao_info:'当你成为其他角色卡牌的目标时,你可以弃置一张手牌并进行一次判定,若不为红桃,则取消之', + tuoqiao_info:'你可以将一张黑色牌当作石灰粉使用', xiaoyao:'逍遥', xiaoyao_info:'每当你成为其他角色的卡牌目标,你可以弃置一张与之花色相同的手牌取消之', tianjian:'天剑', diff --git a/character/yxs.js b/character/yxs.js index 13d8c4891..5d8df9b11 100644 --- a/character/yxs.js +++ b/character/yxs.js @@ -2654,7 +2654,7 @@ character.yxs={ wlianhuan:'连环', wlianhuan_info:'你使用杀造成伤害时,可以弃置一张装备区内的牌并令伤害+1', liebo:'裂帛', - liebo_info:'出牌阶段限一次,你可以使用任意张手牌与一名其他角色交换对应数量的手牌,或与一名其他角色交换全部手牌(牌差不能超过1)', + liebo_info:'出牌阶段限一次,你可以使用任意张手牌与一名其他角色交换对应数量的手牌', yaoji:'妖姬', yaoji_info:'每当你受到一次伤害,你可以将一张乐不思蜀置入伤害来源的判定区', guimian:'鬼面', diff --git a/game/game.js b/game/game.js index 4954b5195..df289079b 100644 --- a/game/game.js +++ b/game/game.js @@ -34420,16 +34420,22 @@ } if(fullright){ fullwidth+=124; + if(game.layout=='long2'&&ui.arena.dataset.number=='8'){ + fullwidth+=game.me.offsetLeft; + } } else{ fullwidth+=154; } if(game.layout!='default'&&game.layout!='newlayout'&&ui.arena.offsetWidth/2>=fullwidth){ if(fullright){ - stayleft._offset=-ui.arena.offsetWidth/2+135; + stayleft._offset=Math.ceil(-ui.arena.offsetWidth/2)+135; + if(game.layout=='long2'&&ui.arena.dataset.number=='8'){ + stayleft._offset+=game.me.offsetLeft; + } } else{ - stayleft._offset=-ui.arena.offsetWidth/2+165; + stayleft._offset=Math.ceil(-ui.arena.offsetWidth/2)+165; } stayleft.style.transform='translateX('+stayleft._offset+'px)'; }