From 4df0a66db97f703b7ef0bfdf1a7e253cf45cac85 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 16 May 2017 22:31:29 +0800 Subject: [PATCH 1/3] v1.9.28.3 --- game/game.js | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/game/game.js b/game/game.js index 5fa5ccb87..43b4f0b40 100644 --- a/game/game.js +++ b/game/game.js @@ -7118,12 +7118,23 @@ lib.skilllist.add(character[i][j][k][3][l]); } } + if(j=='skill'&&k[0]=='_'&&(!lib.config.characters.contains(i)||(lib.config.mode=='connect'&&!character[i].connect))){ + continue; + } if(j=='translate'&&k==i){ lib[j][k+'_character_config']=character[i][j][k]; } else{ if(lib[j][k]==undefined){ - lib[j][k]=character[i][j][k]; + if(j=='skill'&&lib.config.mode=='connect'&&!character[i].connect){ + lib[j][k]={ + nopop:character[i][j][k].nopop, + derivation:character[i][j][k].derivation + }; + } + else{ + lib[j][k]=character[i][j][k]; + } if(j=='card'&&lib[j][k].derivation){ if(!lib.cardPack.mode_derivation){ lib.cardPack.mode_derivation=[k]; @@ -7213,14 +7224,24 @@ } else{ for(k in card[i][j]){ - if(j=='skill'&&k[0]=='_'&&!lib.config.cards.contains(i)){ + if(j=='skill'&&k[0]=='_'&&(!lib.config.cards.contains(i)||(lib.config.mode=='connect'&&!card[i].connect))){ continue; } if(j=='translate'&&k==i){ lib[j][k+'_card_config']=card[i][j][k]; } else{ - if(lib[j][k]==undefined) lib[j][k]=card[i][j][k]; + if(lib[j][k]==undefined){ + if(j=='skill'&&lib.config.mode=='connect'&&!card[i].connect){ + lib[j][k]={ + nopop:card[i][j][k].nopop, + derivation:card[i][j][k].derivation + }; + } + else{ + lib[j][k]=card[i][j][k]; + } + } else console.log('dublicate '+j+' in card '+i+':\n'+k+'\n'+lib[j][k]+'\n'+card[i][j][k]); if(j=='card'&&lib[j][k].derivation){ if(!lib.cardPack.mode_derivation){ From bd1f0679a91d94226186ec393c9e2c10061a9418 Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 16 May 2017 22:31:54 +0800 Subject: [PATCH 2/3] 3 --- game/update.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/update.js b/game/update.js index a35ecb014..e1642ff93 100644 --- a/game/update.js +++ b/game/update.js @@ -1,5 +1,5 @@ window.noname_update={ - version:'1.9.28.2', + version:'1.9.28.3', update:'1.9.28', changeLog:[ 'bug修复', From 6de33ba7f4f6aaecc715fece0d3e3409e50fdca7 Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 17 May 2017 00:52:28 +0800 Subject: [PATCH 3/3] z --- character/gwent.js | 161 +++++++++++++++++++++++++++++++++++++++++- character/rank.js | 1 + character/xianjian.js | 8 +-- game/game.js | 20 ++++++ 4 files changed, 185 insertions(+), 5 deletions(-) diff --git a/character/gwent.js b/character/gwent.js index b05e69731..f77199d74 100644 --- a/character/gwent.js +++ b/character/gwent.js @@ -38,7 +38,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // gw_sanhanya:['male','wu',4,[]], gw_shanhu:['female','qun',3,['shuijian']], // gw_zhangyujushou:['male','wu',4,[]], - // gw_zhuoertan:['male','wu',4,[]], + gw_zhuoertan:['male','wu',3,['hupeng']], }, characterIntro:{ gw_huoge:'那个老年痴呆?不知道他是活着还是已经被制成标本了!', @@ -54,6 +54,125 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gw_yioufeisi:'国王还是乞丐,两者有何区别,人类少一个算一个', }, skill:{ + hupeng:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + check:function(card){ + return 7-ai.get.value(card); + }, + filterTarget:true, + content:function(){ + 'step 0' + var att=get.attitude(player,target); + player.chooseVCardButton('选择令'+get.translation(target)+'获得的牌',['gw_dudayuanshuai1','gw_dudayuanshuai2'],true).ai=function(button){ + if(att>0){ + return button.link[2]=='gw_dudayuanshuai1'?1:-1; + } + else{ + return button.link[2]=='gw_dudayuanshuai2'?1:-1; + } + } + 'step 1' + if(result.bool){ + target.gain(game.createCard(result.links[0][2]),'gain2'); + } + }, + ai:{ + threaten:1.5, + order:6, + result:{ + target:function(player,target){ + var nh=target.countCards('h'); + if(get.attitude(player,target)>0){ + if(!nh) return 3; + if(!target.needsToDiscard(1)){ + if(nh==1) return 2.5; + return 2; + } + if(!target.needsToDiscard()) return 1; + return 0.1; + } + else{ + if(!nh) return -0.05; + if(target.hp==1) return -1; + if(target.hp==2) return -2.5; + if(target.hp==3) return -2; + return -0.5; + } + } + } + }, + global:['hupeng2','hupeng3','hupeng4'] + }, + hupeng2:{ + mod:{ + cardDiscardable:function(card,player){ + if(card.name=='gw_dudayuanshuai2') return false; + }, + cardEnabled:function(card,player){ + if(card.name=='gw_dudayuanshuai2') return false; + }, + cardUsable:function(card,player){ + if(card.name=='gw_dudayuanshuai2') return false; + }, + cardRespondable:function(card,player){ + if(card.name=='gw_dudayuanshuai2') return false; + }, + cardSavable:function(card,player){ + if(card.name=='gw_dudayuanshuai2') return false; + }, + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(target.countCards('h','gw_dudayuanshuai1')&&get.attitude(player,target)<0){ + return 0.4; + } + } + } + } + }, + hupeng3:{ + trigger:{player:'phaseEnd'}, + forced:true, + silent:true, + popup:false, + filter:function(event,player){ + return player.countCards('h','gw_dudayuanshuai2'); + }, + content:function(){ + var hs=player.getCards('h'); + var hs2=player.getCards('h','gw_dudayuanshuai2'); + hs.remove(hs2); + if(hs.length){ + hs2.addArray(hs.randomGets(hs2.length)); + } + player.discard(hs2); + } + }, + hupeng4:{ + trigger:{target:'useCardToBefore'}, + forced:true, + popup:false, + filter:function(event,player){ + if(event.player==player) return false; + var num=player.countCards('h','gw_dudayuanshuai1'); + return num>0; + }, + content:function(){ + 'step 0' + player.chooseToUse({name:'gw_dudayuanshuai1'},'是否对'+get.translation(trigger.card)+'使用【杜达元帅】?').set('ai1',function(card){ + return _status.event.bool; + }).set('bool',-get.effect(player,trigger.card,trigger.player,player)); + trigger.gw_dudayuanshuai1=true; + 'step 1' + delete trigger.gw_dudayuanshuai1; + } + }, hunmo:{ enable:'phaseUse', filter:function(event,player){ @@ -1031,6 +1150,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, + card:{ + gw_dudayuanshuai1:{ + type:'special', + fullimage:true, + derivation:'gw_zhuoertan', + vanish:true, + addinfo:'小伙伴', + notarget:true, + content:function(){ + var evt=event.getParent(3)._trigger; + if(evt.gw_dudayuanshuai1){ + evt.untrigger(); + evt.finish(); + } + if(evt.cards){ + player.gain(evt.cards,'gain2'); + } + }, + ai:{ + value:10, + useful:9, + result:{ + player:1 + }, + } + }, + gw_dudayuanshuai2:{ + type:'special', + fullimage:true, + derivation:'gw_zhuoertan', + vanish:true, + addinfo:'捣蛋鬼', + }, + }, translate:{ gw_huoge:'霍格', gw_aisinie:'埃丝涅', @@ -1065,6 +1218,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gw_zhangyujushou:'章鱼巨兽', gw_zhuoertan:'卓尔坦', + gw_dudayuanshuai1:'杜达元帅', + gw_dudayuanshuai1_info:'当你成为其他角色使用牌的目标时,你可以使用此牌取消之,然后获得对你使用的牌', + gw_dudayuanshuai2:'杜达元帅', + gw_dudayuanshuai2_info:'你不能使用、打出或弃置此牌;结束阶段,若此牌在你手牌中,你弃置之并随机弃置一张手牌', + hupeng:'呼朋', + hupeng_info:'出牌阶段限一次,你可以弃置一张牌并将一张杜达元帅置入一名角色的手牌', shuijian:'水箭', shuijian_info:'准备阶段,你可以弃置一张手牌视为对所有敌方角色使用一张万箭齐发', yunhuo:'陨火', diff --git a/character/rank.js b/character/rank.js index 5d0f837f0..f39bd0bb6 100644 --- a/character/rank.js +++ b/character/rank.js @@ -56,6 +56,7 @@ window.noname_character_rank={ 'swd_shuwaner', ], a:[ + 'gw_zhuoertan', 'gw_gaier', 'pal_mingxiu', 'pal_yueqi', diff --git a/character/xianjian.js b/character/xianjian.js index 514812a8e..b864225f8 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -466,13 +466,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.clearSkills(); trigger.player.clearSkills(); 'step 1' - var hs=player.get('hej'); + var hs=player.getCards('hej'); player.$throw(hs); - player.lose(player.get('hej'))._triggered=null; + player.lose(player.getCards('hej'))._triggered=null; 'step 2' - var hs=trigger.player.get('hej'); + var hs=trigger.player.getCards('hej'); trigger.player.$throw(hs); - trigger.player.lose(trigger.player.get('hej'))._triggered=null; + trigger.player.lose(trigger.player.getCards('hej'))._triggered=null; 'step 3' game.asyncDraw([player,trigger.player],3); }, diff --git a/game/game.js b/game/game.js index 43b4f0b40..3ac802b1b 100644 --- a/game/game.js +++ b/game/game.js @@ -8520,6 +8520,7 @@ }, translate:{ 'default':"默认", + special:'特殊', zhenfa:'阵法', mode_derivation_card_config:'衍生', mode_banned_card_config:'禁卡', @@ -13897,6 +13898,25 @@ if(prompt==undefined) prompt='请选择卡牌'; return this.chooseButton(forced,select,'hidden',[prompt,cards,'hidden']); }, + chooseVCardButton:function(){ + var list,prompt,forced,select,notype=false; + for(var i=0;i