diff --git a/card/extra.js b/card/extra.js index d48f3e986..85f2fe584 100755 --- a/card/extra.js +++ b/card/extra.js @@ -60,8 +60,8 @@ card.extra={ if(lib.config.mode=='stone'&&!player.isMin()){ if(player.getActCount()+1>=player.actcount) return false; } - var shas=target.get('h','sha'); - if(player.num('h','sha')>1){ + var shas=player.get('h','sha'); + if(shas.length>1){ if(player.num('e','zhuge')) return 0; if(player.skills.contains('paoxiao')) return 0; if(player.skills.contains('fengnu')) return 0; diff --git a/character/extra.js b/character/extra.js index 31a5885ed..f166a50fd 100755 --- a/character/extra.js +++ b/character/extra.js @@ -10,6 +10,91 @@ character.extra={ shen_lvbu:['male','qun',5,['baonu','wuqian','shenfen']], }, skill:{ + qinyin:{ + audio:2, + trigger:{player:'phaseDiscardEnd'}, + direct:true, + filter:function(event,player){ + return event.cards&&event.cards.length>1 + }, + content:function(){ + "step 0" + if(typeof event.count!='number'){ + // event.count=trigger.cards.length-1; + event.count=1; + } + var recover=0,lose=0; + for(var i=0;i0){ + if(game.players[i].hp<2){ + lose--; + recover+=0.5; + } + lose--; + recover++; + } + else if(ai.get.attitude(player,game.players[i])<0){ + if(game.players[i].hp<2){ + lose++; + recover-=0.5; + } + lose++; + recover--; + } + } + else{ + if(ai.get.attitude(player,game.players[i])>0){ + lose--; + } + else if(ai.get.attitude(player,game.players[i])<0){ + lose++; + } + } + } + } + var prompt='是否发动【琴音】(剩余'+get.cnNumber(event.count)+'次)'; + player.chooseControl('失去体力','回复体力','cancel', + ui.create.dialog('是否发动【琴音】?','hidden')).ai=function(){ + // console.log(lose,recover); + if(lose>recover&&lose>0) return 0; + if(lose0) return 1; + return 2; + } + "step 1" + if(result.bool==false||result.control=='cancel'){ + event.finish(); + } + else{ + player.logSkill('qinyin'); + event.bool=(result.control=='回复体力'); + event.num=0; + event.players=game.players.slice(0); + } + "step 2" + if(event.num1){ + event.count--; + event.goto(0); + } + }, + ai:{ + expose:0.1, + threaten:2 + } + }, lianpo:{ audio:true, trigger:{source:'dieAfter'}, diff --git a/character/mountain.js b/character/mountain.js index 70d5eea84..951e6c08d 100755 --- a/character/mountain.js +++ b/character/mountain.js @@ -970,6 +970,9 @@ character.mountain={ var add=false; for(var j=0;j1 - }, - content:function(){ - "step 0" - if(typeof event.count!='number'){ - // event.count=trigger.cards.length-1; - event.count=1; - } - var recover=0,lose=0; - for(var i=0;i0){ - if(game.players[i].hp<2){ - lose--; - recover+=0.5; - } - lose--; - recover++; - } - else if(ai.get.attitude(player,game.players[i])<0){ - if(game.players[i].hp<2){ - lose++; - recover-=0.5; - } - lose++; - recover--; - } - } - else{ - if(ai.get.attitude(player,game.players[i])>0){ - lose--; - } - else if(ai.get.attitude(player,game.players[i])<0){ - lose++; - } - } - } - } - var prompt='是否发动【琴音】(剩余'+get.cnNumber(event.count)+'次)'; - player.chooseControl('失去体力','回复体力','cancel', - ui.create.dialog('是否发动【琴音】?','hidden')).ai=function(){ - // console.log(lose,recover); - if(lose>recover&&lose>0) return 0; - if(lose0) return 1; - return 2; - } - "step 1" - if(result.bool==false||result.control=='cancel'){ - event.finish(); - } - else{ - player.logSkill('qinyin'); - event.bool=(result.control=='回复体力'); - event.num=0; - event.players=game.players.slice(0); - } - "step 2" - if(event.num1){ - event.count--; - event.goto(0); - } - }, - ai:{ - expose:0.1, - threaten:2 - } - }, wangchen:{ trigger:{player:'phaseDiscardEnd'}, direct:true, diff --git a/character/yijiang.js b/character/yijiang.js index 74da3fe07..cc7faf89a 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -899,7 +899,7 @@ character.yijiang={ target.draw(); } else{ - player.discardPlayerCard(target,'he',true); + target.discard(target.get('h').randomGet()); } } }, @@ -5491,7 +5491,7 @@ character.yijiang={ huaiyi:'怀异', huaiyi_info:'出牌阶段限一次,你可以展示所有手牌,若其中包含不止一种颜色,则你选择一种颜色并弃置该颜色的所有手牌,然后你可以获得至多X名角色的各一张牌(X为你以此法弃置的手牌数)。若你以此法获得的牌不少于两张,则你失去1点体力', yaoming:'邀名', - yaoming_info:'每回合限一次,当你造成或受到伤害后,你可以选择一项:1. 弃置手牌数大于你的一名角色的一张牌;2. 令手牌数小于你的一名角色摸一张牌', + yaoming_info:'每回合限一次,当你造成或受到伤害后,你可以选择一项:1. 弃置手牌数大于你的一名角色的一张手牌;2. 令手牌数小于你的一名角色摸一张牌', anguo:'安国', anguo_info:'出牌阶段限一次,你可以选择一名其他角色装备区里的一张牌,令其将此牌收回手牌。然后若该角色攻击范围内的角色数因此减少,则你摸一张牌', yanzhu:'宴诛', diff --git a/mode/stone.js b/mode/stone.js index 41f9cb105..92a106f5a 100755 --- a/mode/stone.js +++ b/mode/stone.js @@ -364,7 +364,8 @@ mode.stone={ } lib.card[name]={ image:'character/'+i, - stoneact:lib.character[i][5][0] + stoneact:lib.character[i][5][0], + career:lib.character[i][5][2]||null }; for(j in lib.card.stonecharacter){ lib.card[name][j]=lib.card.stonecharacter[j];