From 8df4345a656d04363d7a3f5c1c3fc9f4c870498f Mon Sep 17 00:00:00 2001 From: libccy Date: Sun, 5 Nov 2017 16:19:43 +0800 Subject: [PATCH] fix --- card/standard.js | 2 ++ character/extra.js | 4 ++-- character/sp.js | 2 +- game/game.js | 21 +++++++++++++++++---- game/update.js | 2 +- mode/guozhan.js | 33 ++++++++++++++++++++++++++++----- 6 files changed, 51 insertions(+), 13 deletions(-) diff --git a/card/standard.js b/card/standard.js index 29f3a6ed3..e40401008 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1524,8 +1524,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){ bagua_skill:{ trigger:{player:'chooseToRespondBegin'}, filter:function(event,player){ + console.log(123); if(event.responded) return false; if(!event.filterCard({name:'shan'})) return false; + if(!lib.filter.cardRespondable({name:'sha'},player,event)) return false; var evt=event.getParent(); if(evt.player&&evt.player.hasSkillTag('unequip',false,evt.card)) return false; return true; diff --git a/character/extra.js b/character/extra.js index bc345d55c..9bfdc28be 100644 --- a/character/extra.js +++ b/character/extra.js @@ -864,10 +864,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.yeyan=true; if(cards.length==4){ player.loseHp(3); - target.damage('fire',3); + target.damage('fire',3,'nocard'); } else{ - target.damage('fire'); + target.damage('fire','nocard'); } }, intro:{ diff --git a/character/sp.js b/character/sp.js index 3f3fa4c02..3f7b46702 100644 --- a/character/sp.js +++ b/character/sp.js @@ -701,7 +701,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ norespond:true, skillTagFilter:function(player,tag,arg){ if(tag=='norespond'&&Array.isArray(arg)){ - if(get.distance(player,arg[1])<=1) return true; + if(get.distance(arg[1],player)<=1) return true; } return false; } diff --git a/game/game.js b/game/game.js index bb5297183..e5226ceff 100644 --- a/game/game.js +++ b/game/game.js @@ -11766,6 +11766,9 @@ else{ checkShow=false; } + if(lib.skill[skill].textAnimation){ + checkShow=false; + } player.$skill(lib.skill[skill].animationStr||lib.translate[skill],lib.skill[skill].skillAnimation,lib.skill[skill].animationColor,checkShow); } else{ @@ -15084,7 +15087,13 @@ return next; }, viewHandcards:function(target){ - return this.viewCards(get.translation(target)+'的手牌',target.getCards('h')); + var cards=target.getCards('h'); + if(cards.length){ + return this.viewCards(get.translation(target)+'的手牌',cards); + } + else{ + return false; + } }, canMoveCard:function(withatt){ var player=this; @@ -16175,6 +16184,9 @@ else{ checkShow=false; } + if(lib.skill[name].textAnimation){ + checkShow=false; + } this.$skill(lib.skill[name].animationStr||lib.translate[name],lib.skill[name].skillAnimation,lib.skill[name].animationColor,checkShow); } else if(!nopop) this.popup(get.skillTranslation(name,this)); @@ -20215,9 +20227,10 @@ if(typeof filter=='function') return filter(card,player,event); } }, - cardRespondable:function(card,player){ - if(_status.event.name!='chooseToRespond') return true; - var source=_status.event.getParent().player; + cardRespondable:function(card,player,event){ + event=event||_status.event; + if(event.name!='chooseToRespond') return true; + var source=event.getParent().player; if(source!=player){ if(source.hasSkillTag('norespond',false,[card,player],true)){ return false; diff --git a/game/update.js b/game/update.js index fd02d3533..ec41c8f6c 100644 --- a/game/update.js +++ b/game/update.js @@ -5,7 +5,7 @@ window.noname_update={ '原7武将、新张宝', '诸侯伐董、神之试炼', '武将称号', - 'bug修复(父魂、截辎、穿心、先辅、魔箭)' + 'bug修复(父魂、截辎、穿心、先辅、魔箭、鹰扬、闪袭、伏骑)' ], files:[ // 'game/game.js', diff --git a/mode/guozhan.js b/mode/guozhan.js index b394a7be2..7de00d825 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -1235,13 +1235,36 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ filter:function(event){ return !event.iwhile; }, + direct:true, content:function(){ - if(player==trigger.player){ - trigger.num1+=3; - } - else{ - trigger.num2+=3; + 'step 0' + player.chooseControl('点数+3','点数-3','cancel2').set('prompt',get.prompt('yingyang')).set('ai',function(){ + if(_status.event.small) return 1; + else return 0; + }).set('small',trigger.small); + 'step 1' + if(result.index!=2){ + player.logSkill('yingyang'); + if(result.index==0){ + game.log(player,'拼点牌点数+3'); + if(player==trigger.player){ + trigger.num1+=3; + } + else{ + trigger.num2+=3; + } + } + else{ + game.log(player,'拼点牌点数-3'); + if(player==trigger.player){ + trigger.num1-=3; + } + else{ + trigger.num2-=3; + } + } } + } }, gzqianxi:{