diff --git a/mode/guozhan.js b/mode/guozhan.js index 7986f4fae..25e2b353d 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -209,6 +209,84 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ derivation:'guozhan', }, }, + aozhanRank:{ + '8':[], + '7':[], + '6':[], + '5':[ + 'gz_lukang','gz_caoren','gz_lvfan', + 'gz_machao','gz_ganfuren','gz_madai', + 'gz_jiling','gz_pangde', + ], + '4':[ + 'gz_re_lidian','gz_yuejin','gz_huangzhong', + 'gz_menghuo','gz_sunshangxiang','gz_lvmeng', + 'gz_lvbu', + ], + '3':[ + 'gz_simayi','gz_luxun','gz_wuguotai', + 'gz_caiwenji', + ], + '2':[ + 'gz_re_lusu','gz_zhangzhang', + ], + '1':[ + 'gz_caocao','gz_guojia','gz_xiahoudun', + 'gz_xunyu','gz_caopi','gz_liubei', + 'gz_fazheng','gz_dongzhuo','gz_yuji', + 'gz_liqueguosi','gz_huanggai', + ], + }, + guozhanRank:{ + '8':[ + 'gz_xunyou','gz_re_lidian','gz_caopi', + 'gz_shamoke','gz_lifeng','gz_wangping', + 'gz_xiaoqiao','gz_zhoutai','gz_lvfan', + 'gz_beimihu','gz_mateng','gz_jiaxu', + ], + '7':[ + 'gz_zhanghe','gz_jianggan','gz_simayi', + 'gz_weiyan','gz_huangyueying','gz_zhugeliang', + 'gz_lingtong','gz_sunshangxiang','gz_sunce', + 'gz_re_yuanshao','gz_yuanshu','gz_hetaihou', + ], + '6':[ + 'gz_zhenji','gz_guojia','gz_yujin', + 'gz_jiangwei','gz_zhangfei','gz_sp_zhugeliang', + 'gz_zhouyu','gz_lingcao','gz_daqiao', + 'gz_yuji','gz_caiwenji','gz_diaochan', + ], + '5':[ + 'gz_zhangliao','gz_caocao','gz_xuhuang', + 'gz_liushan','gz_pangtong','gz_zhaoyun', + 'gz_re_lusu','gz_sunquan','gz_ganning', + 'gz_zhangxiu','gz_liqueguosi','gz_huatuo', + ], + '4':[ + 'gz_dianwei','gz_dengai','gz_xunyu', + 'gz_madai','gz_liubei','gz_mifuren', + 'gz_wuguotai','gz_luxun','gz_taishici', + 'gz_zhangjiao','gz_zuoci','gz_pangde', + ], + '3':[ + 'gz_xiahoudun','gz_yuejin','gz_caoren', + 'gz_machao','gz_masu','gz_fazheng', + 'gz_zhangzhang','gz_lvmeng','gz_huanggai', + 'gz_jiling','gz_lvbu','gz_dongzhuo', + ], + '2':[ + 'gz_cuimao','gz_xiahouyuan','gz_caohong', + 'gz_zhurong','gz_zhurong','gz_jiangfei', + 'gz_xusheng','gz_dingfeng','gz_sunjian', + 'gz_zhangren','gz_kongrong','gz_yanwen', + ], + '1':[ + 'gz_zangba','gz_bianfuren','gz_xuzhu', + 'gz_menghuo','gz_ganfuren','gz_guanyu', + 'gz_lukang','gz_jiangqing','gz_chendong', + 'gz_zoushi','gz_panfeng','gz_tianfeng', + ], + }, characterSort:{ mode_guozhan:{ guozhan_default:["gz_caocao","gz_simayi","gz_xiahoudun","gz_zhangliao","gz_xuzhu","gz_guojia","gz_zhenji","gz_xiahouyuan","gz_zhanghe","gz_xuhuang","gz_caoren","gz_dianwei","gz_xunyu","gz_caopi","gz_yuejin","gz_liubei","gz_guanyu","gz_zhangfei","gz_zhugeliang","gz_zhaoyun","gz_machao","gz_huangyueying","gz_huangzhong","gz_weiyan","gz_pangtong","gz_sp_zhugeliang","gz_liushan","gz_menghuo","gz_zhurong","gz_ganfuren","gz_sunquan","gz_ganning","gz_lvmeng","gz_huanggai","gz_zhouyu","gz_daqiao","gz_luxun","gz_sunshangxiang","gz_sunjian","gz_xiaoqiao","gz_taishici","gz_zhoutai","gz_re_lusu","gz_zhangzhang","gz_dingfeng","gz_huatuo","gz_lvbu","gz_diaochan","gz_re_yuanshao","gz_yanwen","gz_jiaxu","gz_pangde","gz_zhangjiao","gz_caiwenji","gz_mateng","gz_kongrong","gz_jiling","gz_tianfeng","gz_panfeng","gz_zoushi",], @@ -1023,8 +1101,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ global:'g_jianan', }, g_jianan:{ - trigger:{player:'phaseBegin'}, - filter:function(event,player){ + trigger:{player:['phaseBegin','phaseBefore','dieBegin']}, + filter:function(event,player,name){ + if(name!='phaseBegin') return get.is.jun(player)&&player.identity=='wei'; + return this.filter2.apply(this,arguments); + }, + filter2:function(event,player){ if(!get.zhu(player,'jianan')) return false; if(!player.countCards('he')) return false; if(get.is.jun(player)&&player.isUnseen(1)) return false; @@ -1033,6 +1115,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ direct:true, content:function(){ 'step 0' + if(event.triggername!='phaseBegin'){ + event.trigger('jiananUpdate'); + event.finish(); + return; + } var skills=['new_retuxi','qiaobian','gzxiaoguo','gzjieyue','new_duanliang']; game.countPlayer(function(current){ if(current==player) return; @@ -1046,11 +1133,28 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ else{ event.skills=skills; var next=player.chooseToDiscard(); - next.prompt='是否弃置一张牌并发动【五子良将纛】?' - next.prompt2=get.translation('wuziliangjiangdao_info'); + var str=''; + for(var i=0;i1) rank=4; + if(skills.contains('gzjieyue')&&player.countCards('h',function(card){ + return get.value(card)<7; + })>1) rank=5; + if(skills.contains('qiaobian')&&player.countCards('h')>4) rank=6; + if((get.guozhanRank(player.name1)3) return 'qiaobian'; + if(skills.contains('gzjieyue')&&player.countCards('h',function(card){ + return get.value(card)<7; + })) return 'gzjieyue'; + if(skills.contains('new_retuxi')) return 'new_retuxi'; + return skills.randomGet(); + }).prompt="选择获得其中的一个技能直到下回合开始"; } 'step 3' var link=result.control; - player.addTempSkill(link,{player:"phaseBefore"}); - player.addTempSkill("jianan_eff",{player:"phaseBefore"}); + player.addTempSkill(link,"jiananUpdate"); + player.addTempSkill("jianan_eff","jiananUpdate"); game.log(player,"获得了技能","#g【"+get.translation(result.control)+"】"); }, }, @@ -4069,8 +4183,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var shunshou=false; var guohe=false; var juedou=false; + var huoshao=false; for(var i=0;i0) huoshao=true; if(players[i].hp==1&&get.damageEffect(players[i],player,player)>0&&!players[i].hasSha()){ juedou=true; } @@ -4082,10 +4198,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } } + if(huoshao&&button.link[2]=='huoshaolianying') return 3.5; if(juedou&&button.link[2]=='juedou') return 3; if(guohe&&button.link[2]=='guohe') return 2; if(shunshou&&button.link[2]=='shunshou') return 1.5; - if(button.link[2]=='wuzhong') return 1; + if(button.link[2]=='wuzhong'||button.link[2]=='yuanjiao') return 1; return 0; }, backup:function(links,player){ @@ -4134,7 +4251,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ for(var i=0;i