From a9c083cecf315b92de1fff427c6e8afd74c94a57 Mon Sep 17 00:00:00 2001 From: libccy Date: Thu, 20 Apr 2017 02:01:49 +0800 Subject: [PATCH] ny --- card/sp.js | 27 +++++++++++----- character/hearth.js | 76 ++++++++++++++++++++++++++++++--------------- game/game.js | 2 +- game/update.js | 2 +- 4 files changed, 73 insertions(+), 34 deletions(-) diff --git a/card/sp.js b/card/sp.js index 4e8a35c80..65f06bb23 100644 --- a/card/sp.js +++ b/card/sp.js @@ -7,6 +7,18 @@ game.import('card',function(lib,game,ui,get,ai,_status){ jinchan:{ fullskin:true, type:'trick', + notarget:true, + content:function(){ + var evt=event.getParent(3)._trigger; + if(evt.jinchan){ + var type=get.type(evt.card,'trick'); + if(type=='basic'||type=='trick'){ + evt.untrigger(); + evt.finish(); + } + } + player.draw(2); + }, ai:{ useful:function(){ var player=_status.event.player; @@ -20,6 +32,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } return 1; }, + result:{ + player:1 + }, value:5 } }, @@ -533,14 +548,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - player.showHandcards(get.translation(player)+'发动了【金蝉脱壳】'); + player.chooseToUse({name:'jinchan'},'是否对'+get.translation(trigger.card)+'使用【金蝉脱壳】?').set('ai1',function(card){ + return _status.event.bool; + }).set('bool',-ai.get.effect(player,trigger.card,trigger.player,player)); + trigger.jinchan=true; 'step 1' - var type=get.type(trigger.card,'trick'); - if(type=='basic'||type=='trick'){ - trigger.untrigger(); - trigger.finish(); - } - player.draw(2); + delete trigger.jinchan; } }, _jinchan2:{ diff --git a/character/hearth.js b/character/hearth.js index dcba8b6a6..c5f3af1cd 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -49,7 +49,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hs_kcthun:['male','qun',4,['luanji','xianji']], hs_anomalus:['male','wei',4,['mobao']], hs_blingtron:['male','shu',3,['zengli','xiubu']], - hs_yogg:['male','wu',3,['kuangluan','qianhou']], + hs_yogg:['male','wu',4,['qianhou']], hs_xialikeer:['female','shu',3,['duxin']], hs_pyros:['female','shu',2,['pyuhuo']], hs_kalimosi:['male','wu',4,['kqizhou']], @@ -77,7 +77,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hs_fandral:['male','shu',4,['nuyan','chouhuo']], hs_hallazeal:['male','wei',4,['shengteng','yuansu']], - hs_enzoth:['male','qun',3,['mengye']], + hs_enzoth:['male','qun',4,['mengye']], hs_walian:['male','shu',4,['wzhanyi']], // hs_pengpeng:['male','qun',4,['zhadan']], // hs_yashaji:['male','wei',3,[]], @@ -297,33 +297,41 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, mengye:{ trigger:{player:'phaseEnd'}, - forced:true, + direct:true, filter:function(event,player){ - var enemies=player.getEnemies(); - for(var i=0;i0; + }).ai=function(target){ + if(target.hasSkillTag('nodu')) return ai.get.attitude(player,target)*1.5; + if(target.hasCard(function(card){ + return card.name!='du'; + })){ + return -ai.get.attitude(player,target); } + return -ai.get.attitude(player,target)/5; } - if(enemies.length){ - var target=enemies.randomGet(); - player.line(target,'green'); - var card=target.getCards('h').randomGet(); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('mengye',target); + var card=target.getCards('h',function(card){ + return card.name!='du'; + }).randomGet(); if(card){ card.init([card.suit,card.number,'du']); - game.log(target,'将一张手牌转化为',{name:'du'}); } + target.changeHujia(); + game.log(target,'将一张手牌转化为',{name:'du'}); } }, ai:{ - threaten:1.1 + threaten:1.5 } }, mengye_old:{ @@ -698,6 +706,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseBegin'}, forced:true, content:function(){ + 'step 0' var list=[]; for(var i=0;i