From 3a236f6ac53880138ed2a05f49cc357b44721b3b Mon Sep 17 00:00:00 2001 From: libccy Date: Sat, 17 Sep 2016 12:09:38 +0800 Subject: [PATCH] 1 --- card/swd.js | 18 ++++- character/sp.js | 6 +- character/swd.js | 111 +++++++++++++++++++++++---- game/game.js | 193 ++++++++++++++++++++++++----------------------- mode/stone.js | 2 + 5 files changed, 215 insertions(+), 115 deletions(-) diff --git a/card/swd.js b/card/swd.js index 3139ee680..0063a5399 100644 --- a/card/swd.js +++ b/card/swd.js @@ -2577,7 +2577,9 @@ card.swd={ yiluan:{ enable:'phaseUse', usable:1, - filterTarget:true, + filterTarget:function(card,player,target){ + return get.distance(player,target,'attack')<=1; + }, content:function(){ 'step 0' var card=get.cards(0); @@ -3105,6 +3107,8 @@ card.swd={ _lingjianduanzao:{ enable:'phaseUse', position:'he', + discard:false, + losetrigger:false, prompt:function(event){ var lingjians=[],types=[]; var hs=event.player.get('he'); @@ -3312,7 +3316,13 @@ card.swd={ } return false; }, + prepare:function(cards,player){ + player.$throw(cards); + }, content:function(){ + for(var i=0;i2){ + if(game.players[i].hp==1) return 1; + if(game.players[i].hp==2) num++; + } + } + if(player.hasUnknown()) return 0; + if(num>1) return 1; + return 0; + } + }, + }, + intro:{ + content:'limited' + } + }, + jinlin2:{ + trigger:{player:'phaseBegin'}, + forced:true, + popup:false, + content:function(){ + if(player.hujia>0){ + player.changeHujia(-1); + } + player.storage.jinlin2--; + if(player.hujia==0||player.storage.jinlin2==0){ + player.removeSkill('jinlin2'); + delete player.storage.jinlin2; + } + }, + }, + lingyue:{ + trigger:{player:'shaBegin'}, + check:function(event,player){ + return ai.get.attitude(player,event.target)<0; + }, + filter:function(event,player){ + return event.target.num('he')>0; + }, + content:function(){ + trigger.target.chooseToDiscard('he',true); + } + }, + fengze:{ + enable:'phaseUse', + filterCard:true, + selectCard:2, + position:'he', + viewAs:{name:'taoyuan'}, + filter:function(event,player){ + return player.num('he',{color:'black'})>=2; + }, + audio:true, + prompt:'将两张黑色牌当作桃园结义使用', + check:function(card){ + return 6-ai.get.useful(card) + } + }, zaowu:{ enable:'chooseToUse', filter:function(event,player){ @@ -4495,15 +4583,10 @@ character.swd={ return 8-ai.get.value(card); }, content:function(){ - if(player.num('e')){ - var list=get.typeCard('hslingjian'); - if(list.length){ - player.gain(game.createCard(list.randomGet()),'gain'); - } - } - else{ - player.gain(game.createCard(get.inpile('equip').randomGet()),'gain'); - } + var card=game.createCard(get.inpile('equip').randomGet()); + player.equip(card); + player.$gain2(card); + game.delay(); }, ai:{ result:{ @@ -7740,9 +7823,11 @@ character.swd={ swd_xiyan:'犀衍', fengze:'风泽', - fengze_info:'出牌阶段限一次,你可以将两张黑色牌当作桃园结义使用', + fengze_info:'出牌阶段,你可以将两张黑色牌当作桃园结义使用', + lingyue:'凌月', + lingyue_info:'每当你使用一张杀,你可以令目标弃置一张牌', jinlin:'金鳞', - jinlin_info:'限定技,出牌阶段,你可以令至多3名角色各获得3点护甲,获得护甲的角色于每个回合开始阶段失去1点护甲直到首次失去所有护甲', + jinlin_info:'限定技,出牌阶段,你可以令任意名角色各获得3点护甲,获得护甲的角色于每个回合开始阶段失去1点护甲直到首次失去所有护甲或累计以此法失去3点护甲', huanxia:'幻霞', huanxia_info:'你可以将一张红色牌当作杀使用,若此杀未造成伤害,你可以在其进入弃牌堆后收回此牌', jingjie:'镜界', @@ -8117,7 +8202,7 @@ character.swd={ swd_wuxie_info:'锁定技,你不能成为其他角色的延时锦囊的目标', qingcheng_info:'回合结束阶段,你可以进行判定,若为红色则可以继续判定,最多判定3次,判定结束后将判定成功的牌收入手牌', xianjiang_old_info:'出牌阶段,你可以将一张装备牌永久转化为任意一张其它装备牌,一张牌在一个阶段只能转化一次', - xianjiang_info:'出牌阶段限一次,你可以弃置一张锦囊牌,若你装备区内没有牌,你获得一张装备牌,否则你获得一张零件牌', + xianjiang_info:'出牌阶段限一次,你可以弃置一张锦囊牌并随机装备一件装备', shengong_info:'每当你需要打出一张杀或闪时,你可以弃置一名其他角色装备区内的一张武器牌或防具牌,视为打出一张杀或闪,然后该角色摸一张牌,你弃一张牌', ningjian_info:'你可以将一张红色牌当闪、黑色牌当杀使用或打出', taixu_info:'限定技,你可以弃置你的所有牌(至少1张),并对一名体力值大于1为其他角色造成X点火焰伤害,X为你已损失的体力值且至少为1', diff --git a/game/game.js b/game/game.js index 1de659a0d..ce2cb3a31 100644 --- a/game/game.js +++ b/game/game.js @@ -4727,6 +4727,98 @@ window.lib=lib; window._status=_status; }, + c:function(){ + (function(){ + var a=0,b=0,c=0,d=0; + var sa=0,sb=0,sc=0,sd=0; + for(var i in lib.character){ + switch(lib.character[i][1]){ + case 'wei':a++;if(lib.config.forbidall.contains(i)) sa++;break; + case 'shu':b++;if(lib.config.forbidall.contains(i)) sb++;break; + case 'wu':c++;if(lib.config.forbidall.contains(i)) sc++;break; + case 'qun':d++;if(lib.config.forbidall.contains(i)) sd++;break; + } + } + console.log('魏:'+(a-sa)+'/'+a); + console.log('蜀:'+(b-sb)+'/'+b); + console.log('吴:'+(c-sc)+'/'+c); + console.log('群:'+(d-sd)+'/'+d); + console.log(((a+b+c+d)-(sa+sb+sc+sd))+'/'+(a+b+c+d)); + }()); + (function(){ + var a=0,b=0,c=0,d=0; + var aa=0,bb=0,cc=0,dd=0; + var sa=0,sb=0,sc=0,sd=0; + var sha=0,shan=0,tao=0,jiu=0,wuxie=0,heisha=0,hongsha=0; + var num={1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0}; + for(var i in lib.card){ + if(typeof lib.card[i]=='object'){ + switch(lib.card[i].type){ + case 'basic':a++;break; + case 'trick':b++;break; + case 'equip':c++;break; + default:d++;break; + } + } + } + for(var i=0;i0; @@ -9094,6 +9095,7 @@ mode.stone={ if(get.type(card)=='stonecard') return false; }, }, + nopop:true, check:function(){return 1}, filter:function(event,player){ return player.num('h',{type:['stonecharacter','stonecard']})>0;