From 31213874d509c5a39c34011926981150ee90f84b Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Fri, 20 Sep 2019 23:10:34 +0800 Subject: [PATCH] v1.9.93(Part 2) --- card/extra.js | 340 +++++++++++++++++++++++++++++++++++++++++++++++ card/sp.js | 339 +--------------------------------------------- card/standard.js | 2 +- 3 files changed, 342 insertions(+), 339 deletions(-) diff --git a/card/extra.js b/card/extra.js index 3ad82a7d1..6f856a4aa 100644 --- a/card/extra.js +++ b/card/extra.js @@ -4,6 +4,43 @@ game.import('card',function(lib,game,ui,get,ai,_status){ name:'extra', connect:true, card:{ + muniu:{ + fullskin:true, + type:'equip', + subtype:'equip5', + nomod:true, + onEquip:function(){ + player.markSkill('muniu_skill6'); + }, + forceDie:true, + onLose:function(){ + player.unmarkSkill('muniu_skill6'); + if((event.getParent(2)&&event.getParent(2).name!='swapEquip')&&event.parent.type!='equip'&&card&&card.cards&&card.cards.length){ + player.$throw(card.cards,1000); + player.popup('muniu'); + game.log(card,'掉落了',card.cards); + while(card.cards.length){ + var card2=card.cards.shift(); + if(card2.parentNode.id=='special'){ + card2.discard(); + } + } + } + }, + clearLose:true, + equipDelay:false, + loseDelay:false, + skills:['muniu_skill','muniu_skill2','muniu_skill6','muniu_skill7'], + ai:{ + equipValue:function(card){ + if(card.card) return 7+card.card.length; + return 7; + }, + basic:{ + equipValue:7 + } + } + }, jiu:{ audio:true, fullskin:true, @@ -382,6 +419,295 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + muniu_skill:{ + enable:'phaseUse', + usable:1, + filterCard:true, + check:function(card){ + if(card.name=='du') return 20; + var player=_status.event.player; + var nh=player.countCards('h'); + if(!player.needsToDiscard()){ + if(nh<3) return 0; + if(nh==3) return 5-get.value(card); + return 7-get.value(card); + } + return 10-get.useful(card); + }, + discard:false, + lose:true, + sync:function(muniu){ + if(game.online){ + return; + } + if(!muniu.cards){ + muniu.cards=[]; + } + for(var i=0;i0; + }, + prepare:function(cards,player){ + player.$give(1,player,false); + }, + content:function(){ + "step 0" + for(var i=0;i=3&&get.attitude(current,player)>=3){ + return true; + } + }); + players.sort(lib.sort.seat); + var choice=players[0]; + var next=player.chooseTarget('是否移动木牛流马?',function(card,player,target){ + return !target.isMin()&&player!=target&&target.isEmpty(5); + }); + next.set('ai',function(target){ + return target==_status.event.choice?1:-1; + }); + next.set('choice',choice); + "step 1" + if(result.bool){ + var card=player.getEquip(5); + result.targets[0].equip(card); + player.$give(card,result.targets[0]); + player.line(result.targets,'green'); + game.delay(); + } + else{ + player.updateMarks(); + } + }, + ai:{ + save:true, + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag){ + var muniu=player.getEquip(5); + if(!muniu||!muniu.cards) return false; + for(var i=0;i1) return -2; + if(get.select(get.info(button.link).selectTarget)[1]==-1){ + if(get.type(button.link)=='delay') return -1; + if(get.type(button.link)=='equip'){ + var current=player.getCards('e',{subtype:get.subtype(button.link)})[0]; + if(current&&get.equipValue(current)>=get.equipValue(button.link)) return -1; + return 1; + } + if(get.tag(button.link,'multitarget')) return -1; + if(button.link.name=='huoshaolianying') return -1; + } + if(button.link.name=='jiu'){ + if(get.effect(player,{name:'jiu'},player)>0){ + return 1; + } + return -1; + } + return 1; + }, + backup:function(links,player){ + return { + filterCard:function(){return false}, + selectCard:-1, + viewAs:links[0], + onuse:function(result,player){ + var muniu=player.getEquip(5); + if(muniu&&muniu.cards){ + muniu.cards.remove(result.card); + lib.skill.muniu_skill.sync(muniu); + } + player.updateMarks(); + } + } + }, + prompt:function(links,player){ + return '选择'+get.translation(links)+'的目标'; + } + }, + ai:{ + order:4, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); + return 1; + } + }, + useful:-1, + value:-1 + } + }, + muniu_skill6:{ + mark:true, + intro:{ + content:function(storage,player){ + var muniu=player.getEquip(5); + if(!muniu||!muniu.cards||!muniu.cards.length) return '共有〇张牌'; + if(player.isUnderControl(true)){ + return get.translation(muniu.cards); + } + else{ + return '共有'+get.cnNumber(muniu.cards.length)+'张牌'; + } + }, + mark:function(dialog,storage,player){ + var muniu=player.getEquip(5); + if(!muniu||!muniu.cards||!muniu.cards.length) return '共有〇张牌'; + if(player.isUnderControl(true)){ + dialog.addAuto(muniu.cards); + } + else{ + return '共有'+get.cnNumber(muniu.cards.length)+'张牌'; + } + }, + markcount:function(storage,player){ + var muniu=player.getEquip(5); + if(muniu&&muniu.cards) return muniu.cards.length; + return 0; + } + } + }, + muniu_skill7:{ + filter:function(){return false}, + hiddenCard:function(player,name){ + var muniu=player.getEquip(5); + if(!muniu.cards) return false; + lib.skill.muniu_skill.sync(muniu); + for(var i=0;i0; - }, - prepare:function(cards,player){ - player.$give(1,player,false); - }, - content:function(){ - "step 0" - for(var i=0;i=3&&get.attitude(current,player)>=3){ - return true; - } - }); - players.sort(lib.sort.seat); - var choice=players[0]; - var next=player.chooseTarget('是否移动木牛流马?',function(card,player,target){ - return !target.isMin()&&player!=target&&target.isEmpty(5); - }); - next.set('ai',function(target){ - return target==_status.event.choice?1:-1; - }); - next.set('choice',choice); - "step 1" - if(result.bool){ - var card=player.getEquip(5); - result.targets[0].equip(card); - player.$give(card,result.targets[0]); - player.line(result.targets,'green'); - game.delay(); - } - else{ - player.updateMarks(); - } - }, - ai:{ - save:true, - respondSha:true, - respondShan:true, - skillTagFilter:function(player,tag){ - var muniu=player.getEquip(5); - if(!muniu||!muniu.cards) return false; - for(var i=0;i1) return -2; - if(get.select(get.info(button.link).selectTarget)[1]==-1){ - if(get.type(button.link)=='delay') return -1; - if(get.type(button.link)=='equip'){ - var current=player.getCards('e',{subtype:get.subtype(button.link)})[0]; - if(current&&get.equipValue(current)>=get.equipValue(button.link)) return -1; - return 1; - } - if(get.tag(button.link,'multitarget')) return -1; - if(button.link.name=='huoshaolianying') return -1; - } - if(button.link.name=='jiu'){ - if(get.effect(player,{name:'jiu'},player)>0){ - return 1; - } - return -1; - } - return 1; - }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - selectCard:-1, - viewAs:links[0], - onuse:function(result,player){ - var muniu=player.getEquip(5); - if(muniu&&muniu.cards){ - muniu.cards.remove(result.card); - lib.skill.muniu_skill.sync(muniu); - } - player.updateMarks(); - } - } - }, - prompt:function(links,player){ - return '选择'+get.translation(links)+'的目标'; - } - }, - ai:{ - order:4, - result:{ - player:function(player){ - if(_status.event.dying) return get.attitude(player,_status.event.dying); - return 1; - } - }, - useful:-1, - value:-1 - } - }, - muniu_skill6:{ - mark:true, - intro:{ - content:function(storage,player){ - var muniu=player.getEquip(5); - if(!muniu||!muniu.cards||!muniu.cards.length) return '共有〇张牌'; - if(player.isUnderControl(true)){ - return get.translation(muniu.cards); - } - else{ - return '共有'+get.cnNumber(muniu.cards.length)+'张牌'; - } - }, - mark:function(dialog,storage,player){ - var muniu=player.getEquip(5); - if(!muniu||!muniu.cards||!muniu.cards.length) return '共有〇张牌'; - if(player.isUnderControl(true)){ - dialog.addAuto(muniu.cards); - } - else{ - return '共有'+get.cnNumber(muniu.cards.length)+'张牌'; - } - }, - markcount:function(storage,player){ - var muniu=player.getEquip(5); - if(muniu&&muniu.cards) return muniu.cards.length; - return 0; - } - } - }, - muniu_skill7:{ - filter:function(){return false}, - hiddenCard:function(player,name){ - var muniu=player.getEquip(5); - if(!muniu.cards) return false; - lib.skill.muniu_skill.sync(muniu); - for(var i=0;i0; })){ return 1; }