From 5347ccba0677d3f4260066d109bed1653c765137 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 14 Nov 2017 15:05:51 +0800 Subject: [PATCH] 3 --- character/standard.js | 68 ++++++++++++++++++++++--------------------- game/config.js | 2 +- game/game.js | 3 ++ 3 files changed, 39 insertions(+), 34 deletions(-) diff --git a/character/standard.js b/character/standard.js index 5e804b10a..931f58964 100644 --- a/character/standard.js +++ b/character/standard.js @@ -367,42 +367,45 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ "step 0" - player.draw(2*trigger.num); + event.cards=get.cards(2*trigger.num); "step 1" - event.cards=result; + if(event.cards.length>1){ + player.chooseCardButton('将“遗计”牌分配给任意角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + if(ui.selected.buttons.length==0) return 1; + return 0; + }); + } + else if(event.cards.length==1){ + event._result={links:event.cards.slice(0),bool:true}; + } + else{ + event.finish(); + } "step 2" - player.chooseCardTarget({ - filterCard:function(card){ - return _status.event.getParent().cards.contains(card); - }, - selectCard:[1,event.cards.length], - filterTarget:function(card,player,target){ - return player!=target; - }, - ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); - }, - ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return 1-att; - } - return att-4; - }, - prompt:'请选择要送人的卡牌' - }); - "step 3" if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(result.cards,player); - player.$give(result.cards.length,result.targets[0]); - for(var i=0;i0){ + return att/(1+target.countCards('h')); + } + else{ + return att/100; + } + }).set('enemy',get.value(event.togive[0])<0); + } + "step 3" + if(result.targets.length){ + result.targets[0].gain(event.togive,'draw'); + player.line(result.targets[0],'green'); + game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); + event.goto(1); } }, ai:{ @@ -422,7 +425,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ num=0.5; } } - console.log(num); if(target.hp>=4) return [1,num*2]; if(target.hp==3) return [1,num*1.5]; if(target.hp==2) return [1,num*0.5]; diff --git a/game/config.js b/game/config.js index 1779f52d2..8244e4260 100644 --- a/game/config.js +++ b/game/config.js @@ -216,7 +216,7 @@ window.config={ ['qingnang','yiji'], ['qingnang','reyiji'], ['qingjian','tuntian'], - ['yiji','tuntian'], + // ['yiji','tuntian'], ['reyiji','tuntian'], ['tuntian','guidao'], ['tuntian','tiandao'], diff --git a/game/game.js b/game/game.js index 471bba25e..98fb0d7da 100644 --- a/game/game.js +++ b/game/game.js @@ -44059,6 +44059,9 @@ } var skills=node.getSkills(false,false); + for(var i in node.forbiddenSkills){ + skills.add(i); + } skills=skills.slice(0); var skills2=game.filterSkills(skills,node); if(node==game.me&&node.hiddenSkills.length){