diff --git a/card/hearth.js b/card/hearth.js index 9e43c6835..31a039d03 100644 --- a/card/hearth.js +++ b/card/hearth.js @@ -577,9 +577,6 @@ card.hearth={ return 0; } } - if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){ - return 0; - } if(player.hasSkillTag('notricksource')) return 0; if(target.hasSkillTag('notrick')) return 0; if(card.name=='tao') return 0; diff --git a/card/standard.js b/card/standard.js index 964d7e0ea..f2da81ee6 100755 --- a/card/standard.js +++ b/card/standard.js @@ -829,6 +829,13 @@ card.standard={ if(hs1.length>hs2.length+1){ return -2; } + var hsx=target.get('h'); + if(hsx.length>2&&hs2.length==0&&hsx[0].number<6){ + return -2; + } + if(hsx.length>3&&hs2.length==0){ + return -2; + } if(hs1.length>hs2.length&&(!hs2.length||hs1[0].number>hs2[0].number)){ return -2; } @@ -1613,7 +1620,8 @@ card.standard={ }, source:target, source2:targets, - id:id + id:id, + id2:id2 }); if(game.online){ _status.event._resultid=id; diff --git a/card/swd.js b/card/swd.js index 5cd0431f6..3949cadda 100755 --- a/card/swd.js +++ b/card/swd.js @@ -335,7 +335,6 @@ card.swd={ if(target==players[0]) return 2; return 0.5; }, - player:1, }, } }, @@ -794,16 +793,14 @@ card.swd={ }, xianluhui:{ fullskin:true, - type:'basic', + type:'trick', enable:true, selectTarget:-1, - filterTarget:true, - targetDelay:false, - content:function(){ - target.recover(); + filterTarget:function(card,player,target){ + return target.isDamaged(); }, - contentAfter:function(){ - game.asyncDraw(targets); + content:function(){ + target.draw(Math.min(3,target.maxHp-target.hp)); }, ai:{ basic:{ @@ -813,12 +810,9 @@ card.swd={ }, result:{ target:function(player,target){ - target.hp0&&zhu.num('h')>0); + if(player.group!='wu'||player.num('h')==0) return false; + return game.hasPlayer(function(target){ + return target!=player&&target.hasZhuSkill('zhiba',player)&&target.num('h')>0; + }); }, filterTarget:function(card,player,target){ - return player!=target&&target.isZhu&&target.get('s').contains('zhiba'); + return target!=player&&target.hasZhuSkill('zhiba',player)&&target.num('h')>0; }, usable:1, content:function(){ "step 0" + if(target.storage.hunzi){ + target.chooseBool('是否拒绝制霸拼点?').set('choice',ai.get.attitude(target,player)<=0); + } + else{ + event.forced=true; + } + "step 1" + if(!event.forced&&!result.bool){ + game.log(target,'拒绝了拼点'); + target.chat('拒绝'); + event.finish(); + return; + } player.chooseToCompare(target,function(card){ if(card.name=='du') return 20; var player=get.owner(card); @@ -737,7 +762,7 @@ character.shenhua={ } return get.number(card); }); - "step 1" + "step 2" if(result.bool==false){ target.gain([result.player,result.target]); target.$gain2([result.player,result.target]); @@ -1462,21 +1487,44 @@ character.shenhua={ songwei:{ unique:true, global:'songwei2', + zhuSkill:true, }, songwei2:{ audio:2, forceaudio:true, trigger:{player:'judgeEnd'}, filter:function(event,player){ - var zhu=get.zhu('songwei'); - if(!zhu) return false; - return (player!=zhu&&player.group=='wei'&&get.color(event.result.card)=='black'); - }, - check:function(event,player){ - return ai.get.attitude(player,get.zhu('songwei'))>0; + if(player.group!='wei') return false; + if(get.color(event.result.card)!='black') return false; + return game.hasPlayer(function(target){ + return player!=target&&target.hasZhuSkill('songwei',player); + }); }, + direct:true, content:function(){ - get.zhu('songwei').draw(); + 'step 0' + var list=[]; + for(var i=0;i0); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.logSkill('songwei',event.current); + event.current.draw(); + } + event.goto(1); } }, duanliang:{ @@ -1840,35 +1888,54 @@ character.shenhua={ }, baonue:{ unique:true, - global:'baonue2' + global:'baonue2', + zhuSkill:true, }, baonue2:{ audio:2, forceaudio:true, trigger:{source:'damageEnd'}, filter:function(event,player){ - var zhu=get.zhu('baonue'); - if(!zhu) return false; - return (player!=zhu&&player.group=='qun'&&zhu.hp0; + if(player.group!='qun') return false; + return game.hasPlayer(function(target){ + return player!=target&&target.hp0); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + player.logSkill('baonue',event.current); + player.judge(function(card){ + if(get.suit(card)=='spade') return 4; + return 0; + }); + } + else{ + event.goto(1); + } + 'step 3' + if(result.suit=='spade'){ + event.current.recover(); + } + event.goto(1); } }, luanwu:{ @@ -2435,14 +2502,15 @@ character.shenhua={ xueyi:{ mod:{ maxHandcard:function(player,num){ - if(player.isZhu){ + if(player.hasZhuSkill('xueyi')){ for(var i=0;i0)) + if(player.group!='qun') return false; + if(player.num('h','shan')+player.num('h','shandian')==0) return 0; + return game.hasPlayer(function(target){ + return target!=player&&target.hasZhuSkill('huangtian',player); + }); }, filterCard:function(card){ return (card.name=='shan'||card.name=='shandian') }, filterTarget:function(card,player,target){ - return player!=target&&target.isZhu&&target.get('s').contains('huangtian'); + return target!=player&&target.hasZhuSkill('huangtian',player); }, usable:1, forceaudio:true, diff --git a/character/sp.js b/character/sp.js index 768040558..b1ded6043 100755 --- a/character/sp.js +++ b/character/sp.js @@ -7,7 +7,7 @@ character.sp={ caohong:['male','wei',4,['yuanhu']], xiahouba:['male','shu',4,['baobian']], gongsunzan:['male','qun',4,['yicong']], - yuanshu:['male','qun',4,['yongsi']], + yuanshu:['male','qun',4,['yongsi','weidi']], sp_diaochan:['female','qun',3,['lihun','biyue']], sp_zhaoyun:['male','qun',3,['longdan','chongzhen']], jsp_zhaoyun:['male','qun',3,['chixin','yicong','suiren']], @@ -85,6 +85,26 @@ character.sp={ guansuo:['guanyu'], }, skill:{ + weidi:{ + init:function(player){ + var mode=get.mode(); + if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ + player.additionalSkills.weidi=function(player){ + var list=[]; + var zhu=get.zhu(player); + if(zhu&&zhu!=player&&zhu.skills){ + for(var i=0;ihs2.length+1){ + if(hs1.length>hs2.length){ return 0; } - if(hs1.length-1>hs2.length&&(!hs2.length||hs1[0].number>hs2[0].number)){ + var hsx=target.get('h'); + if(hsx.length>2&&hs2.length<=1&&hsx[0].number<6){ + return 0; + } + if(hsx.length>3&&hs2.length<=1){ + return 0; + } + if(hs1.length>hs2.length-1&&hs1.length>0&&(hs2.length<=1||hs1[0].number>hs2[0].number)){ return 0; } return -1; @@ -6212,6 +6276,8 @@ character.sp={ yanbaihu:'严白虎', wanglang:'王朗', + weidi:'伪帝', + weidi_info:'锁定技,你视为拥有当前主公的主公技', juesi:'决死', juesi_info:'出牌阶段,你可以弃置一张杀并选择你攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是杀且你的体力值不大于该角色,你视为对其使用决斗', zhenlue:'缜略', diff --git a/character/standard.js b/character/standard.js index 00422cd79..85b1d0396 100755 --- a/character/standard.js +++ b/character/standard.js @@ -45,10 +45,11 @@ character.standard={ hujia:{ audio:2, unique:true, + zhuSkill:true, trigger:{player:'chooseToRespondBegin'}, filter:function(event,player){ if(event.responded) return false; - if(!player.isZhu) return false; + if(!player.hasZhuSkill('jianxiong')) return false; if(event.filterCard({name:'shan'})==false) return false; for(var i=0;i0) return false; if(event.player.group!='wu') return false; return true; diff --git a/character/xianjian.js b/character/xianjian.js index 0eed84929..9a3ac10c5 100755 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -128,6 +128,7 @@ character.xianjian={ if(ai.get.damageEffect(player,event.player,player)>=0) return false; return true; }, + usable:1, content:function(){ "step 0" var goon=(ai.get.damageEffect(player,trigger.player,player)<=0); @@ -1879,7 +1880,7 @@ character.xianjian={ pal_xuanxiao:'玄霄', zhangmu:'障目', - zhangmu_info:'每回合限一次,当使用需要使用或打出一张闪时,你可以展示一张闪,视为使用或打出了此闪', + zhangmu_info:'每回合限一次,当你需要使用或打出一张闪时,你可以展示一张闪,视为使用或打出了此闪', feizhua:'飞爪', feizhua_info:'当你使用一张杀时,你可以将目标两侧的角色追加为额外目标', leiyu:'雷狱', diff --git a/character/yijiang.js b/character/yijiang.js index c3dcc3e48..e970c5b94 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -2353,21 +2353,19 @@ character.yijiang={ }, zhaofu:{ unique:true, - global:'zhaofu2' + global:'zhaofu2', + zhuSkill:true }, zhaofu2:{ mod:{ attackTo:function(from,to,distance){ if(from.group!='wu') return; - var zhu; for(var i=0;i0) return false; - if(!player.isZhu) return false; + if(!player.hasZhuSkill('xingshuai')) return false; for(var i=0;i0){ var triggerevent=event.getTrigger(); - if(ui.tempnowuxie._origin==triggerevent.parent.id){ + if(triggerevent){ + if(ui.tempnowuxie._origin==triggerevent.parent.id){ + event.result={ + bool:false + } + if(triggerevent.targets&&triggerevent.num==triggerevent.targets.length-1){ + ui.tempnowuxie.close(); + } + return; + } + } + else if(ui.tempnowuxie._origin==_status.event.id2){ event.result={ bool:false } - if(triggerevent.targets&&triggerevent.num==triggerevent.targets.length-1){ - ui.tempnowuxie.close(); - } return; } - } if(!_status.connectMode&&lib.config.wuxie_self&&event.getParent().state){ var tw=event.getTrigger().parent; @@ -8083,6 +8090,9 @@ else if(this.additionalSkills[i]&&typeof this.additionalSkills[i]=='string'){ skills.add(this.additionalSkills[i]); } + else if(typeof this.additionalSkills[i]=='function'){ + skills.addArray(this.additionalSkills[i](this)); + } } if(arg2) skills=skills.concat(this.hiddenSkills); if(arg3!==false){ @@ -10175,6 +10185,20 @@ hasSkill:function(skill){ return game.expandSkills(this.get('s')).contains(skill); }, + hasZhuSkill:function(skill,player){ + if(!this.hasSkill(skill)) return false; + var mode=get.mode(); + if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){ + if(mode!='identity'){ + if(player&&this.side!=player.side) return false; + } + if(this.isZhu) return true; + for(var i in this.storage){ + if(i.indexOf('zhuSkill_')==0&&this.storage[i].contains(skill)) return true; + } + } + return false; + }, hasSkillTag:function(tag,hidden){ var skills=game.expandSkills(this.get('s',hidden)); for(var i=0;i