diff --git a/character/refresh.js b/character/refresh.js index ad9c5e15f..9e211d0a5 100644 --- a/character/refresh.js +++ b/character/refresh.js @@ -424,18 +424,21 @@ character.refresh={ audio:2, trigger:{player:'damageEnd'}, filter:function(event,player){ - return (event.source!=undefined); + return (event.source!=undefined&&event.num>0); }, check:function(event,player){ return (ai.get.attitude(player,event.source)<=0); }, + logTarget:'source', content:function(){ "step 0" + event.num=trigger.num; + "step 1" player.judge(function(card){ if(get.color(card)=='red') return 2; return 1; }) - "step 1" + "step 2" if(result.judge==1&&trigger.source.num('he')){ player.discardPlayerCard(trigger.source,'he',true); } @@ -444,6 +447,17 @@ character.refresh={ trigger.source.damage(); } } + event.num--; + if(event.num>0){ + player.chooseBool('是否继续发动?'); + } + else{ + event.finish(); + } + "step 3" + if(result.bool){ + event.goto(1); + } }, ai:{ expose:0.4 diff --git a/character/shenhua.js b/character/shenhua.js index 8e1ae993e..e4f958ee8 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -88,7 +88,7 @@ character.shenhua={ case '五':num=5;break; case '六':num=6;break; } - player.storage.qimou=num; + player.storage.qimou2=num; player.loseHp(num); player.addTempSkill('qimou2','phaseAfter'); }, @@ -127,17 +127,17 @@ character.shenhua={ }, qimou2:{ onremove:function(player){ - delete player.storage.qimou; + delete player.storage.qimou2; }, mod:{ cardUsable:function(card,player,num){ - if(typeof player.storage.qimou=='number'&&card.name=='sha'){ - return num+player.storage.qimou; + if(typeof player.storage.qimou2=='number'&&card.name=='sha'){ + return num+player.storage.qimou2; } }, globalFrom:function(from,to,distance){ - if(typeof from.storage.qimou=='number'){ - return distance-from.storage.qimou; + if(typeof from.storage.qimou2=='number'){ + return distance-from.storage.qimou2; } } } @@ -145,12 +145,14 @@ character.shenhua={ xinkuanggu:{ trigger:{source:'damageEnd'}, filter:function(event,player){ - return get.distance(player,event.player)<=1; + return get.distance(player,event.player)<=1&&event.num>0; }, direct:true, audio:'kuanggu', content:function(){ 'step 0' + event.num=trigger.num; + 'step 1' var controls=['draw_card','cancel2']; if(player.hp0){ + event.goto(1); + } } } }, diff --git a/character/xianjian.js b/character/xianjian.js index 5c5d362f8..b3fbe4c39 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -31,13 +31,83 @@ character.xianjian={ // pal_tangyurou:['male','wei',4,[]], // pal_longyou:['male','wei',4,[]], // pal_xiaoman:['male','wei',4,[]], - // - // pal_xiahoujinxuan:['male','wei',4,[]], + + // pal_xiahoujinxuan:['male','shu',3,['lingyan','danqing']], // pal_muchanglan:['male','wei',4,[]], // pal_xia:['male','wei',4,[]], // pal_jiangcheng:['male','wei',4,[]], }, skill:{ + lingyan:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + console.log(event.card.name); + return lib.skill.lingyan.filterx(event.card)&&event.target==player; + }, + direct:true, + filterx:function(card){ + if(!lib.inpile.contains(card.name)) return false; + var info=get.info(card); + if(info.type!='equip') return false; + if(info.nomod) return false; + return true; + }, + group:'lingyan_lose', + content:function(){ + 'step 0' + var list=['equip1','equip2','equip3','equip4','equip5','cancelx']; + var list2=[]; + var subtype=get.subtype(trigger.card); + list.remove(subtype); + for(var i=0;i<4;i++){ + if(!player.get('e',subtype[5])){ + list2.push(list[i]); + } + } + player.chooseControl(list,function(){ + if(!player.get('e',subtype[5])) return 'cancelx'; + return list2.randomGet(); + }).prompt=get.prompt('灵砚:是否改变装备牌的位置?'); + 'step 1' + if(result.control!='cancelx'){ + player.logSkill('lingyan'); + var name=trigger.card.name+'_lingyan_'+result.control; + if(!lib.card[name]){ + lib.card[name]=get.copy(get.info(trigger.card)); + lib.card[name].subtype=result.control; + lib.card[name].vanish=true; + lib.card[name].epic=true; + lib.translate[name]=lib.translate[trigger.card.name]; + lib.translate[name+'_info']=lib.translate[trigger.card.name+'_info']; + } + trigger.card.storage.lingyan=trigger.card.name; + trigger.card.init([trigger.card.suit,trigger.card.number,name,trigger.card.nature]); + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(lib.skill.lingyan.filterx(card)&&target.num('e')<5){ + return [1,3]; + } + } + } + } + }, + lingyan_lose:{ + trigger:{player:'loseEnd'}, + forced:true, + popup:false, + silent:true, + content:function(){ + for(var i=0;i