diff --git a/card/gujian.js b/card/gujian.js index e21a04e37..a8e2a1d5b 100644 --- a/card/gujian.js +++ b/card/gujian.js @@ -463,6 +463,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ ai:{ order:1.5, value:[4,1], + norepeat:1, result:{ target:function(player,target){ if(target==player){ diff --git a/card/gwent.js b/card/gwent.js index bd58744f5..e6d3d7fa5 100644 --- a/card/gwent.js +++ b/card/gwent.js @@ -1027,7 +1027,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ filterTarget:true, content:function(){ 'step 0' - target.chooseToDiscard('h',2,true); + target.chooseToDiscard('h',2,true).delay=false; 'step 1' target.draw(); }, diff --git a/card/swd.js b/card/swd.js index 301b25c93..c95b39ed9 100644 --- a/card/swd.js +++ b/card/swd.js @@ -3326,69 +3326,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){ delete player.storage.kongxin; }, }, - lianyao_hujia:{ - mode:['identity','guozhan'], - enable:'phaseUse', - usable:1, - filter:function(event,player){ - if(player!=game.me) return false; - var card=player.getEquip('lianyaohu'); - if(card.storage.shouhua&&card.storage.shouhua.length) return true; - return false; - }, - content:function(){ - "step 0" - var list=[]; - var card=player.getEquip('lianyaohu'); - for(var i=0;i1){ + if(trigger.target.isIn()){ + return 9-get.value(card); + } + return 4-get.value(card); + } + return 0; + } + 'step 1' + if(result.bool){ + player.logSkill('junchi'); + player.gain(result.cards,trigger.player); + if(get.position(result.cards[0])=='h'){ + trigger.player.$giveAuto(result.cards,player); + } + else{ + trigger.player.$give(result.cards,player); + } + trigger.player.addExpose(0.2); + trigger.player.line(player,'green'); + } + else{ + event.finish(); + } + 'step 2' + if(trigger.target.isIn()){ + var next=player.chooseToUse('是否对'+get.translation(trigger.target)+'使用一张牌?',trigger.target,-1).set('targetRequired',true); + next.filterCard=function(card){ + return player.canUse(card,trigger.target,false)&&!get.info(card).multitarget; + }; + next.oncard=function(){ + player.recover(); + trigger.player.draw(); + } + } + } + }, hupeng:{ enable:'phaseUse', usable:1, @@ -278,7 +359,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, content:function(){ 'step 0' - player.addSkill('yunhuo2'); + player.insertPhase(); event.list=player.getEnemies().sortBySeat(); 'step 1' if(event.list.length){ @@ -296,17 +377,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delayx(); } }, - yunhuo2:{ - trigger:{player:'phaseAfter'}, - forced:true, - popup:false, - silent:true, - priority:-50, - content:function(){ - player.insertPhase(); - player.removeSkill('yunhuo2'); - } - }, yinzhang:{ enable:'phaseUse', usable:1, @@ -604,8 +674,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.targets.length){ event.current=event.targets.shift(); if(event.current.hasSha()){ - event.current.addTempSkill('gwzhanjiang3','gwzhanjiangAfter'); - event.current.chooseToUse({name:'sha'},'是否对'+get.translation(trigger.player)+'使用一张杀?',trigger.player,-1); + event.current.chooseToUse({name:'sha'},'是否对'+get.translation(trigger.player)+'使用一张杀?',trigger.player,-1).oncard=function(card,player){ + player.draw(); + }; } else{ event.redo(); @@ -1218,6 +1289,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gw_zhangyujushou:'章鱼巨兽', gw_zhuoertan:'卓尔坦', + junchi:'骏驰', + junchi_info:'每当一名其他角色使用一张杀,若目标不是你,你可以对杀的目标使用一张牌,然后摸一张牌;每当一名其他角色使用一张金卡,你可以在此回合结束后获得一个额外回合', + junchi_old_info:'当一名其他角色使用杀对一个目标结算后,该角色可以交给你一张牌,然后你可以对杀的目标使用一张牌,若如此做,你回复一点体力,杀的使用者摸一张牌', gw_dudayuanshuai1:'杜达元帅', gw_dudayuanshuai1_info:'当你成为其他角色使用牌的目标时,你可以使用此牌取消之,然后获得对你使用的牌', gw_dudayuanshuai2:'杜达元帅', diff --git a/character/sp.js b/character/sp.js index 657e86703..5caee34fe 100644 --- a/character/sp.js +++ b/character/sp.js @@ -1179,7 +1179,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 1; } var geteff=function(current){ - return get.effect(current,{name:'sha'},player,player)>0; + return player.canUse('sha',current,false,true)&&get.effect(current,{name:'sha'},player,player)>0; } if(player.hasSha()&&geteff(target)){ var num=game.countPlayer(function(current){ diff --git a/character/swd.js b/character/swd.js index cbbc40a7a..8ef2f6eef 100644 --- a/character/swd.js +++ b/character/swd.js @@ -910,9 +910,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - target.draw(); + target.chooseToDiscard(2,'h',true).delay=false; 'step 1' - target.chooseToDiscard(2,'h',true); + target.draw(); }, selectTarget:-1, ai:{ @@ -9546,7 +9546,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ miedao_info:'锁定技,摸牌阶段,你额外摸X张牌;弃牌阶段,你至少须弃X张牌(不足则全弃),X为你已损失的体力值。', senluo:'森罗', - senluo_info:'出牌阶段限一次,若你的手牌数为全场最少或之一,你可以令所有有手牌的其他角色摸一张牌并弃置两张手牌', + senluo_info:'出牌阶段限一次,若你的手牌数为全场最少或之一,你可以令所有有手牌的其他角色弃置两张手牌然后摸一张牌', polang:'破浪', polang_info:'每当你造成一次伤害,可以一张对方的装备牌', jikong:'亟空', diff --git a/character/yxs.js b/character/yxs.js index 1394c0333..21405dc04 100644 --- a/character/yxs.js +++ b/character/yxs.js @@ -332,7 +332,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ result:{ target:function(player,target){ if(target.hp==1&&target.maxHp>=3){ - return get.recoverEffect(target,player,player); + return get.recoverEffect(target,player,target); } return 0; } diff --git a/game/game.js b/game/game.js index e76e7f1ef..a9bfd7e8d 100644 --- a/game/game.js +++ b/game/game.js @@ -11040,6 +11040,9 @@ } } event.id=get.id(); + if(event.oncard){ + event.oncard(event.card,event.player); + } event.trigger('useCard'); event._oncancel=function(){ game.broadcastAll(function(id){ @@ -11471,6 +11474,9 @@ } else{ player.gain(cards); + if(event.$draw){ + player.$draw(cards.length); + } } event.result=cards; }, @@ -14380,7 +14386,7 @@ } } if(result.card||!result.skill){ - this.useCard(result.card,result.cards,result.targets,result.skill); + this.useCard(result.card,result.cards,result.targets,result.skill).oncard=event.oncard; } else if(result.skill){ this.useSkill(result.skill,result.cards,result.targets); @@ -14526,6 +14532,10 @@ else if(typeof arguments[i]=='boolean'){ next.animate=arguments[i]; } + else if(arguments[i]=='nodelay'){ + next.animate=false; + next.$draw=true; + } else if(arguments[i]=='visible'){ next.visible=true; } @@ -35716,8 +35726,10 @@ } if(node.node.name.querySelectorAll('br').length>=4){ node.node.name.classList.add('long'); - node.addEventListener('mouseenter',ui.click.buttonnameenter); - node.addEventListener('mouseleave',ui.click.buttonnameleave); + if(lib.config.buttoncharacter_style=='old'){ + node.addEventListener('mouseenter',ui.click.buttonnameenter); + node.addEventListener('mouseleave',ui.click.buttonnameleave); + } } node.node.intro.innerHTML=lib.config.intro; if(!noclick){ diff --git a/game/update.js b/game/update.js index dcd90cfc9..de1b3ac34 100644 --- a/game/update.js +++ b/game/update.js @@ -26,7 +26,7 @@ window.noname_update={ // 'theme/music/style.css', // 'theme/woodden/style.css', // 'theme/simple/style.css', - // 'layout/default/layout.css', + 'layout/default/layout.css', // 'layout/default/phone.css', // 'layout/default/menu.css', // 'theme/style/cardback/*', diff --git a/layout/default/layout.css b/layout/default/layout.css index 2b7148893..314bff3de 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -1668,6 +1668,10 @@ div:not(.handcards)>.card>.info>span, } .button.newstyle>.name{ top: 8px; + max-height: 80px; +} +.button.newstyle>.name.long{ + top: 6px; } .button.newstyle>.hp, .button.newstyle>.hp.text{