diff --git a/audio/skill/tongqu1.mp3 b/audio/skill/tongqu1.mp3 new file mode 100644 index 000000000..faa825d06 Binary files /dev/null and b/audio/skill/tongqu1.mp3 differ diff --git a/audio/skill/tongqu2.mp3 b/audio/skill/tongqu2.mp3 new file mode 100644 index 000000000..b37f6341b Binary files /dev/null and b/audio/skill/tongqu2.mp3 differ diff --git a/card/extra.js b/card/extra.js index 54f8c056e..1533feea0 100644 --- a/card/extra.js +++ b/card/extra.js @@ -664,7 +664,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ player.updateMarks(); }, }, - huogong2:{}, + huogong2:{charlotte:true}, jiu:{ trigger:{player:'useCard1'}, filter:function(event){ diff --git a/card/guozhan.js b/card/guozhan.js index f28f87f5c..abee94516 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -644,7 +644,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ },targets); } } - }, + },/* contentBefore:function(){ if(get.mode()=='guozhan'){ var evt=event.getParent(); @@ -655,11 +655,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ evt.targets.push(player); } } - }, + },*/ content:function(){ 'step 0' if(get.mode()!='guozhan'){ - if(player==target) target.draw(game.players.length); + if(player==target) target.draw(game.filterPlayer().length); else target.chooseDrawRecover(true); event.finish(); } @@ -1830,8 +1830,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ lulitongxin_info:'出牌阶段,对所有大势力角色或所有小势力角色使用。若目标角色:不处于“连环状态”,其横置;处于“连环状态”,其摸一张牌', lulitongxin_info_versus:'出牌阶段,对所有敌方角色或所有己方角色使用。若目标角色:为敌方角色且不处于“连环状态”,其横置;为己方角色且处于“连环状态”,其摸一张牌。', lianjunshengyan:'联军盛宴', - lianjunshengyan_info:'出牌阶段,对你和你选择的除你的势力外的一个势力的所有角色。若目标角色:为你,你选择摸Y张牌并回复X-Y点体力(X为该势力的角色数,Y∈[0,X]);不为你,其摸一张牌,然后重置。', - lianjunshengyan_info_boss:'出牌阶段,对场上所有角色使用。你摸X张牌(X为目存活角色数),其他角色依次选择回复1点体力或摸一张牌。', + lianjunshengyan_info:'出牌阶段,对你和你选择的除你的势力外的一个势力的所有角色使用。若目标角色:为你,你选择摸Y张牌并回复X-Y点体力(X为该势力的角色数,Y∈[0,X]);不为你,其摸一张牌,然后重置。', + lianjunshengyan_info_boss:'出牌阶段,对场上所有角色使用。你摸X张牌(X为存活角色数),其他角色依次选择回复1点体力或摸一张牌。', chiling:'敕令', chiling_info:'出牌阶段,对所有没有势力的角色使用。目标角色选择一项:1、明置一张武将牌,然后摸一张牌;2、弃置一张装备牌;3、失去1点体力。当【敕令】因判定或弃置而置入弃牌堆时,系统将之移出游戏并将【诏书】置于牌堆底,然后系统于当前回合结束后视为对所有没有势力的角色使用【敕令】。', diaohulishan:'调虎离山', diff --git a/character/mobile.js b/character/mobile.js index ed2b6bcb2..bc8fb1196 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -14900,7 +14900,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var switchToAuto=function(){ game.pause(); game.countChoose(); - setTimeout(function(){ + event.timeout=setTimeout(function(){ _status.imchoosing=false; event._result={ bool:true, @@ -14947,6 +14947,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var skip=function(){ if(event.pingcai_delayed){ delete event.pingcai_delayed; + clearTimeout(event.timeout); event._result={ bool:true, }; diff --git a/character/rank.js b/character/rank.js index 76b108eaf..096aac82b 100644 --- a/character/rank.js +++ b/character/rank.js @@ -272,6 +272,7 @@ window.noname_character_rank={ 'ol_puyuan', 'ns_limi', 'jin_zhouchu', + 'huojun', 'key_misuzu', 'key_sunohara', 'key_umi', @@ -810,6 +811,7 @@ window.noname_character_rank={ 'niufu', 're_liufeng', 'huzhao', + 'guanhai', ], b:[ 'diy_feishi', @@ -1406,6 +1408,7 @@ window.noname_character_rank={ 'shen_sunquan', 'shen_machao', 'tw_shen_guanyu', + 'huojun', 'key_tomoya', 'key_masato', 'key_shiorimiyuki', @@ -2023,6 +2026,7 @@ window.noname_character_rank={ 'caoxiancaohua', 'huzhao', 're_liufeng', + 'guanhai', ], junk:[ 'sunshao', diff --git a/character/refresh.js b/character/refresh.js index 179ff2fa0..5bd9e9b7c 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -4045,8 +4045,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player,name){ if(name=='damageEnd') return true; if(!event.card) return false; - var evt=event.getParent(); - return evt&&evt.card==event.card&&evt.type=='card'&&evt.targets&&evt.targets.length==1; + if(player.hasHistory('useSkill',function(evt){ + return evt.skill=='gzquanji'&&evt.event.triggername==name; + })) return false; + return true; }, content:function(){ 'step 0' @@ -4104,7 +4106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ result:{ target:function(player,target){ if(target!=player) return 0; - if(player.needsToDiscard()&&!player.getEquip('zhuge')&&!player.hasSkill('new_paoxiao')) return 0; + if(player.getExpansions('gzquanji').length<=1||(player.needsToDiscard()&&!player.getEquip('zhuge')&&!player.hasSkill('new_paoxiao'))) return 0; return 1; } }, @@ -4118,7 +4120,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var card=lib.skill.gzpaiyi_backup.card; player.loseToDiscardpile(card); "step 1" - target.draw(2); + var num=player.getExpansions('gzquanji').length; + if(num>0) target.draw(num); "step 2" if(target.countCards('h')>player.countCards('h')){ target.damage(); @@ -12459,10 +12462,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinjiefan:'解烦', xinjiefan_info:'限定技,出牌阶段,你可以选择一名角色,令攻击范围内含有该角色的所有角色依次选择一项:1.弃置一张武器牌;2.令其摸一张牌。然后若游戏轮数为1,则你于此回合结束时恢复此技能。', gzquanji:'权计', - gzquanji_info:'当你受到伤害后或当你使用牌指定唯一目标并对其造成伤害后,你可以摸一张牌,然后你将一张牌置于武将牌上,称为“权”;你的手牌上限+X(X为“权”的数量)。', + gzquanji_info:'每回合每项各限一次。当你受到伤害后或造成伤害后,你可以摸一张牌,然后你将一张牌置于武将牌上,称为“权”;你的手牌上限+X(X为“权”的数量)。', gzpaiyi:'排异', gzpaiyi_backup:'排异', - gzpaiyi_info:'出牌阶段限两次。你可以移去一张“权”,然后选择一名角色并令其摸两张牌。若其手牌数大于你,则你对其造成1点伤害。', + gzpaiyi_info:'出牌阶段限一次。你可以移去一张“权”并选择一名角色。令其摸X张牌(X为你的“权”数且至多为7)。然后若其手牌数大于你,则你对其造成1点伤害。', ol_zhurong:'界祝融', changbiao:'长标', changbiao_info:'出牌阶段限一次,你可以将任意张手牌当做【杀】使用(无距离限制)。若你因此【杀】对目标角色造成过伤害,则你于出牌阶段结束时摸X张牌(X为此【杀】对应的实体牌数量)。', diff --git a/character/sp.js b/character/sp.js index ea4ec7dd3..4bfc99fd8 100755 --- a/character/sp.js +++ b/character/sp.js @@ -10,7 +10,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_tianzhu:["wutugu","yanbaihu","shamoke","panfeng","zhugedan",'huangzu','gaogan',"tadun"], sp_nvshi:["lingju","guanyinping","zhangxingcai","mayunlu","dongbai","zhaoxiang",'ol_zhangchangpu','ol_xinxianying',"daxiaoqiao"], sp_shaowei:["simahui","zhangbao","zhanglu","zhugeguo","xujing","zhangling",'huangchengyan','ol_puyuan'], - sp_huben:["caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","fanjiangzhangda"], + sp_huben:["caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","fanjiangzhangda","huojun"], sp_liesi:['mizhu','weizi'], sp_default:["sp_diaochan","sp_zhaoyun","sp_sunshangxiang","sp_caoren","sp_jiangwei","sp_machao","sp_caiwenji","jsp_guanyu","jsp_huangyueying","sp_pangde","sp_jiaxu","yuanshu",'sp_zhangliao','sp_ol_zhanghe','sp_menghuo'], sp_qifu:["caoying",'panshu',"caochun","yuantanyuanshang",'caoshuang','wolongfengchu','guansuo','baosanniang','fengfangnv','jin_zhouchu'], @@ -28,6 +28,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ + huojun:['male','shu',4,['qiongshou','fenrui']], caoxiancaohua:['female','qun',3,['huamu','qianmeng','liangyuan','jisi']], jin_zhouchu:['male','jin',4,['shanduan','yilie']], zhaoyǎn:['male','wei',4,['tongxie']], @@ -649,6 +650,117 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //霍峻 + qiongshou:{ + audio:2, + trigger:{ + player:'enterGame', + global:'phaseBefore', + }, + forced:true, + filter:function(event,player){ + if(event.name=='phase'&&game.phaseNumber!=0) return false; + return player.countDisabled()<5; + }, + content:function(){ + for(var i=1;i<6;i++){ + if(!player.isDisabled(i)) player.disableEquip(i); + } + player.draw(4); + }, + mod:{ + maxHandcard:function(player,num){ + return num+4; + }, + }, + ai:{ + halfneg:true, + combo:'fenrui', + threaten:3.2, + }, + }, + fenrui:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + onremove:true, + filter:function(event,player){ + var es=player.countCards('e'); + return (player.countDisabled()>0&&player.countCards('he')>0)||(!player.storage.fenrui&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e')0&&player.countCards('he')>0){ + var str='弃置一张牌,恢复一个装备栏并使用一张对应装备牌'; + player.chooseToDiscard('he',get.prompt('fenrui'),str).set('ai',function(card){ + return 7-get.value(card); + }).logSkill='fenrui'; + } + else event.goto(3); + 'step 1' + if(result.bool){ + player.chooseToEnable().set('ai',function(){ + var player=_status.event.player; + var list=[2,5,1,3,4]; + for(var i of list){ + if(player.isDisabled(i)) return 'equip'+i; + } + }); + } + else{ + var es=player.countCards('e'); + if(player.storage.fenrui||!game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e')0&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e')target.countCards('e'); + }).set('ai',function(target){ + var player=_status.event.player; + var num=player.countCards('h')-target.countCards('h'); + if(get.attitude(player,target)>=0) return 0; + if(num>=Math.min(2,player.hp,target.hp)) return get.damageEffect(target,player,player); + return 0; + }); + } + else event.finish(); + 'step 4' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('fenrui_animate',target); + player.storage.fenrui=true; + player.unmarkSkill('fenrui'); + game.delayx(); + target.damage(player.countCards('e')-target.countCards('e')); + } + }, + group:'fenrui_animate', + mark:true, + intro:{content:'王炸尚未使用'}, + subSkill:{ + animate:{ + skillAnimation:true, + animationColor:'fire', + }, + }, + }, //曹宪曹华 huamu:{ audio:2, @@ -9267,23 +9379,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ logTarget:function(){ return _status.currentPhase; }, + preHidden:true, content:function(){ "step 0" event.count=trigger.num; "step 1" event.count--; var source=_status.currentPhase; - if(source.hasSkill('rehengjiang2')){ - source.storage.rehengjiang2++; - source.storage.rehengjiang3.push(player); - source.storage.rehengjiang3.sortBySeat(source); - source.updateMarks(); - } - else{ - source.storage.rehengjiang3=[player]; - source.storage.rehengjiang2=1; - source.addTempSkill('rehengjiang2'); - } + source.addTempSkill('rehengjiang2'); + source.addMark('rehengjiang2',1,false); + player.addTempSkill('rehengjiang3'); "step 2" if(event.count){ player.chooseBool(get.prompt2('rehengjiang',_status.currentPhase)).set('ai',function(){ @@ -9305,6 +9410,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ rehengjiang2:{ mark:true, charlotte:true, + onremove:true, intro:{ content:'手牌上限-#' }, @@ -9313,34 +9419,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return num-player.storage.rehengjiang2; } }, - onremove:function(player){ - delete player.storage.rehengjiang2; - delete player.storage.rehengjiang3; - }, - trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ - if(event.cards&&event.cards.length) return false; - var players=player.storage.rehengjiang3; - for(var i=0;i0&&evt.getParent('phaseDiscard').player==event.player; + })) return false; + return true; + }, + logTarget:'player', content:function(){ - var players=player.storage.rehengjiang3; - var list=[]; - for(var i=0;i0) player.draw(num); + }, }, shuangren:{ trigger:{player:'phaseUseBegin'}, @@ -15545,7 +15643,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ check:function(event,player){ var num=game.countPlayer(function(current){ if(current.isLinked()&¤t.countCards('he')){ - return get.attitude(player,current); + return get.effect(current,{name:'guohe_copy2'},player,player); } }); return num<0; @@ -15589,13 +15687,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, audio:2, + filter:function(event,player){ + return !player.isLinked()&&game.hasPlayer(function(current){ + return current!=player&¤t.isLinked(); + }) + }, filterTarget:function(card,player,target){ return player!=target&&!target.isLinked(); }, + selectTarget:function(){ + return [1,Math.max(1,_status.event.player.getDamagedHp())]; + }, content:function(){ - "step 0" if(!target.isLinked()) target.link(); - "step 1" + }, + contentAfter:function(){ if(!player.isLinked()) player.link(); }, ai:{ @@ -18460,6 +18566,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huangchengyan:['huangchengyan','dc_huangchengyan'], puyuan:['puyuan','ol_puyuan'], huangzu:['dc_huangzu','huangzu'], + huojun:['huojun','tw_huojun'], }, translate:{ "xinfu_lingren":"凌人", @@ -18783,6 +18890,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸一张牌。', rehengjiang:'横江', rehengjiang2:'横江', + rehengjiang3:'横江', rehengjiang_info:'当你受到1点伤害后,你可以令当前回合角色本回合的手牌上限-1。然后若其弃牌阶段内没有弃牌,则你摸X张牌(X为你本回合内对其发动过〖横江〗的次数)。', shuangren:'双刃', shuangren_info:'出牌阶段开始时,你可以与一名角色拼点。若你赢,你视为对其或与其势力相同的另一名角色使用一张【杀】(不计入出牌阶段的次数限制);若你没赢,你本回合内不能对其他角色使用牌。', @@ -19127,7 +19235,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yongjue_info:'每回合限一次。当其他角色于回合内使用的【杀】结算完成后,若你不是此【杀】的目标角色,则你可以获得之。', guixiu_info:'当你成为【杀】的目标后,若你的手牌数小于体力值,则你可以摸一张牌。', fenming_info:'结束阶段开始时,若你处于横置状态,你可以弃置所有处于横置状态的角色的各一张牌。', - duanxie_info:'出牌阶段限一次,你可以令一名其他角色横置,若如此做,你横置。', + duanxie_info:'出牌阶段限一次,你可以令至多X名其他角色横置(X为你已损失的体力值且至少为1),然后你横置。', xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌,然后你摸一张牌;2.受到你对其造成的1点伤害。', sijian_info:'当你失去最后的手牌时,你可以弃置一名其他角色的一张牌。', suishi_info:'当其他角色进入濒死状态时,伤害来源可以令你摸一张牌;当其他角色死亡时,伤害来源可以令你失去1点体力', @@ -19431,6 +19539,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liangyuan_info:'每轮每项各限一次。你可以将场上所有的“灵杉”/“玉树”置于处理区,然后将这些牌当做【酒】/【桃】使用。', jisi:'羁肆', jisi_info:'限定技。准备阶段,你可以令一名其他角色获得你武将牌上的一个已发动过的其他技能。然后你弃置所有手牌,并视为对其使用一张【杀】(无距离关系的限制)。', + huojun:'霍峻', + qiongshou:'穷守', + qiongshou_info:'锁定技。①游戏开始时,你废除所有装备栏并摸四张牌。②你的手牌上限+4。', + fenrui:'奋锐', + fenrui_info:'结束阶段,你可以弃置一张牌并恢复一个装备栏。系统检索一张对应的装备牌,你使用之。然后你可以选择一名装备区内牌数小于你的其他角色,对其造成X点伤害(X为你与其装备区内的牌数之差,且每局限一次)。', sp_tianji:'天极·皇室宗亲', sp_sibi:'四弼·辅国文曲', diff --git a/character/sp2.js b/character/sp2.js index a768cf4a6..86c73c6ab 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'sp2', connect:true, character:{ + guanhai:['male','qun',4,['suoliang','qinbao']], huzhao:['male','wei',3,['midu','xianwang']], niufu:['male','qun','4/7',['dcxiaoxi','xiongrao']], bianxi:['male','wei',4,['dunxi']], @@ -178,6 +179,65 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, skill:{ + //管亥 + suoliang:{ + audio:2, + trigger:{source:'damageSource'}, + logTarget:'player', + usable:1, + filter:function(event,player){ + return event.player!=player&&event.player.maxHp>0&&event.player.countCards('he')>0; + }, + check:function(event,player){ + return get.attitude(player,event.player)<=0; + }, + content:function(){ + 'step 0' + var target=trigger.player; + event.target=target; + player.choosePlayerCard(target,true,'he',[1,target.maxHp],'选择'+get.translation(target)+'的至多'+get.cnNumber(target.maxHp)+'张牌'); + 'step 1' + if(result.bool){ + var cards=result.cards.filter(function(card){ + var suit=get.suit(card,target); + if(suit!='heart'&&suit!='club') return false; + return lib.filter.canBeGained(card,target,player) + }); + if(cards.length) player.gain(cards,target,'giveAuto','bySelf'); + else{ + var cards=result.cards.filter(function(card){ + return lib.filter.canBeDiscarded(card,target,player) + }); + if(cards.length) target.discard(cards,'notBySelf'); + } + } + }, + }, + qinbao:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return (event.card.name=='sha'||get.type(event.card,null,false)=='trick')&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>=player.countCards('h'); + }); + }, + content:function(){ + var hs=player.countCards('h'); + trigger.directHit.addArray(game.filterPlayer(function(current){ + return current!=player&¤t.countCards('h')>=hs; + })); + }, + ai:{ + threaten:1.4, + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + return player.countCards('h',function(card){ + return !ui.selected.cards.contains(card); + })<=arg.target.countCards('h'); + }, + }, + }, //胡昭 midu:{ audio:2, @@ -661,9 +721,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - target:function(player,target){ + player:function(player,target){ var eff=get.recoverEffect(target,player,player); - if(target.getDamagedHp()>1) eff+=get.effect(target,{name:'wuzhong'},player,target)/2; + if(target.getDamagedHp()>1) eff+=get.effect(target,{name:'wuzhong'},player,player)/2; return eff; }, }, @@ -714,21 +774,54 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, subSkill:{ gain:{ - trigger:{global:'loseAfter'}, + trigger:{global:['loseAfter','cardsDiscardAfter']}, forced:true, - logTarget:'player', + logTarget:()=>_status.currentPhase, filter:function(event,player){ - if(event.type!='discard'||event.player!=_status.currentPhase) return false; + var current=_status.currentPhase; + if(!current) return false; + if(event.name=='cardsDiscard'){ + var evtx=event.getParent(); + if(evtx.name!='orderingDiscard') return false; + var evtx2=(evtx.relatedEvent||evtx.getParent()); + return current.hasHistory('lose',function(evtx3){ + var evtx4=evtx3.relatedEvent||evtx3.getParent(); + if(evtx2!=evtx4) return false; + for(var i in evtx3.gaintag_map){ + if(evtx3.gaintag_map[i].contains('dcliuzhuan_tag')) return true; + } + }); + } + if(event.player!=current||event.position!=ui.discardPile) return false; for(var i in event.gaintag_map){ if(event.gaintag_map[i].contains('dcliuzhuan_tag')) return true; } return false; }, content:function(){ - var cards=trigger.hs.filter(function(i){ - return trigger.gaintag_map[i.cardid]&&trigger.gaintag_map[i.cardid].contains('dcliuzhuan_tag'); + var cards,current=_status.currentPhase; + if(trigger.name=='lose') cards=trigger.hs.filter(function(i){ + return trigger.gaintag_map[i.cardid]&&trigger.gaintag_map[i.cardid].contains('dcliuzhuan_tag')&&get.position(i,true)=='d'; }); - if(cards.length>0) player.gain(cards,'gain2'); + else{ + var evtx=trigger.getParent();; + var evtx2=(evtx.relatedEvent||evtx.getParent()); + var bool=false; + var history=current.getHistory('lose',function(evtx3){ + var evtx4=evtx3.relatedEvent||evtx3.getParent(); + if(evtx2!=evtx4) return false; + for(var i in evtx3.gaintag_map){ + if(evtx3.gaintag_map[i].contains('dcliuzhuan_tag')) return true; + } + }); + cards=trigger.cards.filter(function(i){ + for(var evt of history){ + if(evt.gaintag_map[i.cardid]&&evt.gaintag_map[i.cardid].contains('dcliuzhuan_tag')&&get.position(i,true)=='d') return true; + } + return false; + }); + } + if(cards&&cards.length>0) player.gain(cards,'gain2'); }, }, mark:{ @@ -2417,7 +2510,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' player.addToExpansion(result.cards,target,'give').gaintag.add('yuanyu'); 'step 3' - if(event.count>0&&target.countCards('he')>0&&player.hasSkill('yuanyu_damage')) event.goto(1); + if(event.count>0&&target.countCards('h')>0&&player.hasSkill('yuanyu_damage')) event.goto(1); }, }, }, @@ -17214,6 +17307,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ bianxi:'小说《三国演义》里的人物。汜水关守将,并州人氏。原是黄巾余党,后投曹操,拨来守汜水关。善使流星锤。在镇国寺设下伏兵欲谋害千里寻兄的关羽,但是寺中僧人普净暗示加以解救。最后被关羽斩杀。', niufu:'牛辅,东汉末年武将,东汉相国董卓的女婿。曾任中郎将,征讨白波军,不能取胜。董卓被杀时,牛辅别屯于陕地。吕布派李肃前去征讨牛辅,被牛辅击败。后来,牛辅营中有士兵半夜背叛出逃,造成内乱,牛辅以为整营皆叛,于是带着金银珠宝,独与亲信胡赤儿等五六人逾城北渡河。赤儿等人以绳索系在牛辅腰间将其从城头放下,但赤儿等因为谋财而在离地面数丈高的地方就松开了绳子使得牛辅重重摔在地上腰部受伤,而后赤儿与诸胡人将牛辅斩首,将其首级送去长安。', huzhao:'胡昭(162年-250年),字孔明,颍川(治今河南禹州)人。汉末三国时期隐士、书法家。胡昭善长隶书,与钟繇、邯郸淳、卫觊、韦诞齐名。有“钟氏小巧,胡氏豪放”之说,世人并称“钟胡”。', + guanhai:'管亥(生卒年不详),青州黄巾军渠帅,率军侵略北海,围北海相孔融于都昌。孔融派遣太史慈突围而出,前往平原向刘备求援,刘备率军来到,击退管亥。《三国演义》中管亥在单挑中为关羽斩杀。', }, characterTitle:{ wulan:'#b对决限定武将', @@ -18172,7 +18266,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dczhubi_info:'当有♦牌因弃置而进入弃牌堆后,你可以令系统从牌堆/弃牌堆中检索一张【无中生有】,并将此牌置于牌堆顶。', dcliuzhuan:'流转', dcliuzhuan_tag:'转', - dcliuzhuan_info:'锁定技。①其他角色于其回合内不于摸牌阶段而获得的牌称为“转”。②你不能成为实体牌中包含“转”的牌的目标。③当有“转”因弃置而进入弃牌堆后,你获得之。', + dcliuzhuan_info:'锁定技。①其他角色于其回合内不于摸牌阶段而获得的牌称为“转”。②你不能成为实体牌中包含“转”的牌的目标。③当有“转”直接进入弃牌堆或经由处理区进入弃牌堆后,你获得之。', xiahoulingnv:'夏侯令女', fuping:'浮萍', fuping_info:'①其他角色对你使用的结算结束后,若你未因此技能记录过此牌的名称且你有未废除的装备栏,则你可以废除一个装备栏,记录此牌的名称。②每回合每种牌名限一次。你可以将一张非基本牌当做〖浮萍①〗记录过的基本牌或锦囊牌使用或打出。③若你的所有装备栏均已被废除,则你使用牌无距离限制。', @@ -18191,6 +18285,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ midu_info:'出牌阶段限一次。你可以选择一项:⒈废除任意个装备栏,并令一名角色摸等量的牌。⒉恢复一个已经被废除的装备栏,然后你获得〖活墨〗直到下回合开始。', xianwang:'贤望', xianwang_info:'锁定技。若你有被废除的装备栏,则其他角色至你的距离+1;若废除的装备栏数大于2,则改为距离+2。', + guanhai:'管亥', + suoliang:'索粮', + suoliang_info:'每回合限一次。当你对其他角色造成伤害后,你可以选择其的至多X张牌(X为其体力上限且至多为5)。若这些牌中有♥或♣牌,则你获得这些牌;否则你弃置这些牌。', + qinbao:'侵暴', + qinbao_info:'锁定技。当你使用【杀】或普通锦囊牌时,你令所有手牌数不小于你的角色不能响应此牌。', sp_whlw:"文和乱武", sp_zlzy:"逐鹿中原", diff --git a/character/yijiang.js b/character/yijiang.js index 1a37f19fb..bbbe2f798 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -380,7 +380,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'bingyi', trigger:{player:'loseAfter'}, filter:function(event,player){ - return event.type=='discard'&&player.countCards('h')>0&&!player.hasSkill('olbingyi_blocker',null,null,false); + return event.type=='discard'&&event.cards2.length>0&&player.countCards('h')>0&&!player.hasSkill('olbingyi_blocker',null,null,false); }, prompt2:function(event,player){ var str='展示所有手牌,然后',hs=player.getCards('h'); @@ -3002,6 +3002,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ markcount:'expansion', }, frequent:true, + locked:false, content:function(){ player.addToExpansion(get.cards(),'gain2').gaintag.add('bizhuan'); }, @@ -3912,7 +3913,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } else{ - if(event.num10; }, + preHidden:true, content:function(){ trigger.targets.push(player); game.log(player,'也成为了',trigger.card,'的目标'); @@ -3173,7 +3177,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ pozhu:{ enable:'phaseUse', viewAsFilter:function(player){ - return !player.hasSkill('pozhu3')&&player.countCards('hs')>0; + return !player.hasSkill('pozhu3',null,null,false)&&player.countCards('hs')>0; }, viewAs:{name:'chuqibuyi'}, filterCard:true, @@ -3195,7 +3199,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('pozhu3'); }, }, - pozhu3:{}, + pozhu3:{charlotte:true}, xijue:{ audio:2, trigger:{ @@ -3488,7 +3492,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterFilter:{}, dynamicTranslate:{}, perfectPair:{ - jin_simayi:['jin_zhangchunhua','shibao'], + jin_simayi:['jin_zhangchunhua','shibao','duyu'], jin_simazhao:['jin_wangyuanji'], jin_simashi:['jin_xiahouhui','jin_yanghuiyu'], }, diff --git a/game/asset.js b/game/asset.js index 67c44aa5a..f96246a25 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.9.116.2', + 'v1.9.116.3', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -5070,6 +5070,8 @@ window.noname_asset_list=[ 'image/card/zhuangshu_trick.png', 'image/card/zhuangshu_equip.png', + 'image/character/guanhai.jpg', + 'image/character/huojun.jpg', 'image/character/bianxi.jpg', 'image/character/huzhao.jpg', 'image/character/niufu.jpg', diff --git a/game/game.js b/game/game.js index 056b9a65d..56e110e98 100644 --- a/game/game.js +++ b/game/game.js @@ -1,5 +1,9 @@ "use strict"; (function(){ + if(!localStorage.getItem('noname_alerted')){ + localStorage.setItem('noname_alerted',true); + alert('无名杀官方发布地址仅有GitHub仓库!\n其他所有的所谓“无名杀”社群(包括但不限于绝大多数“官方”QQ群、QQ频道等)均为粉丝自发组织,与无名杀官方无关!'); + } var _status={ paused:false, paused2:false, @@ -2827,7 +2831,7 @@ node.style.fontFamily=link; } else{ - node.style.fontFamily="'STHeiti','SimHei','Microsoft JhengHei','Microsoft YaHei','WenQuanYi Micro Hei',Helvetica,Arial,sans-serif"; + node.style.fontFamily="'STHeiti','SimHei','Microsoft JhengHei','Microsoft YaHei','WenQuanYi Micro Hei','Suits',Helvetica,Arial,sans-serif"; } node.style.fontSize='20px'; }, @@ -6665,6 +6669,7 @@ globalId:0, }, help:{ + '关于游戏':'
关于无名杀
  • 无名杀官方发布地址仅有GitHub仓库!
    点击前往Github仓库
  • 其他所有的所谓“无名杀”社群(包括但不限于绝大多数“官方”QQ群、QQ频道等)均为粉丝自发组织,与无名杀官方无关!', '游戏操作':'
    • 长按/鼠标悬停/右键单击显示信息。
    • 触屏模式中,双指点击切换暂停;下划显示菜单,上划切换托管。
    • 键盘快捷键
      '+ '
      A切换托管
      W切换不询问无懈
      空格暂停
    • 编辑牌堆
      在卡牌包中修改牌堆后,将自动创建一个临时牌堆,在所有模式中共用,当保存当前牌堆后,临时牌堆被清除。每个模式可设置不同的已保存牌堆,设置的牌堆优先级大于临时牌堆。
    ', '游戏命令':'
    变量名
    • 场上角色
      game.players
    • 阵亡角色
      game.dead'+ @@ -7594,6 +7599,7 @@ lib.configMenu.appearence.config.cardtext_font.item[i]=pack.font[i]; lib.configMenu.appearence.config.global_font.item[i]=pack.font[i]; ui.css.fontsheet.sheet.insertRule("@font-face {font-family: '"+i+"'; src: url('"+lib.assetURL+"font/"+i+".ttf');}",0); + if(lib.config.suits_font) ui.css.fontsheet.sheet.insertRule("@font-face {font-family: '"+i+"'; src: url('"+lib.assetURL+"font/suits.ttf');}",0); } if(lib.config.suits_font) ui.css.fontsheet.sheet.insertRule("@font-face {font-family: 'Suits'; src: url('"+lib.assetURL+"font/suits.ttf');}",0); lib.configMenu.appearence.config.cardtext_font.item.default='默认'; @@ -7660,9 +7666,10 @@ } var alerted=false; for(var i=0;i=4) return false; + if(_status.mode=='yingbian') return player.hasCard(function(i){ + return get.is.yingbian(i); + },'hs'); + return player.hasCard(function(card){ + return card.hasTag('lianheng'); + },'hs'); + }, + chooseButton:{ + dialog:function(event,player){ + var list=['lianjunshengyan','huoshaolianying','xietianzi','lulitongxin']; + if(_status.mode=='yingbian') list=['zhujinqiyuan','chuqibuyi','shuiyanqijunx','dongzhuxianji']; + list.removeArray(player.getStorage('gzwanyi2')); + return ui.create.dialog('婉嫕',[list,'vcard'],'hidden'); + }, + filter:function(button,player){ + return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent()); + }, + check:function(button){ + return _status.event.player.getUseValue({name:button.link[2]}); + }, + backup:function(links){ + return { + audio:'wanyi', + popname:true, + viewAs:{ + name:links[0][2], + }, + filterCard:function(card){ + if(_status.mode=='yingbian') return get.is.yingbian(card); + return card.hasTag('lianheng'); + }, + check:function(card){ + return 1/Math.max(1,get.value(card)); + }, + position:'hs', + onuse:function(links,player){ + if(!player.storage.gzwanyi2) player.storage.gzwanyi2=[]; + player.storage.gzwanyi2.add(links.card.name); + player.addTempSkill('gzwanyi2'); + }, + } + }, + prompt:function(links){ + if(_status.mode=='yingbian') return '将一张应变牌当做'+get.translation(links[0][2])+'使用'; + return '将一张合纵牌当做'+get.translation(links[0][2])+'使用'; + }, + }, + subSkill:{backup:{}}, + ai:{order:8,result:{player:1}}, + }, + gzwanyi2:{onremove:true}, + gzmaihuo:{ + audio:'maihuo', + limited:true, + trigger:{global:'useCardToTarget'}, + logTarget:'player', + filter:function(event,player){ + return event.card.name=='sha'&&event.target.isIn()&&event.target.isFriendOf(player); + }, + preHidden:true, + skillAnimation:true, + animationColor:'thunder', + check:function(event,player){ + var source=event.player,targets=event.targets,card=event.card; + for(var target of targets){ + if(target.hasShan()||get.effect(target,card,player,player)>=0) continue; + if(player.hp<=1||target.hp<=(event.getParent().baseDamage||1)) return true; + } + return false; + }, + content:function(){ + player.awakenSkill('gzmaihuo'); + trigger.targets.length=0; + trigger.getParent().triggeredTargets2.length=0; + player.addSkill('gzmaihuo_effect'); + player.markAuto('gzmaihuo_effect',[trigger.player]); + trigger.player.addMark('gzmaihuo_mark',1,false); + }, + subSkill:{ + effect:{ + audio:'maihuo', + trigger:{global:'phaseBegin'}, + forced:true, + charlotte:true, + popup:false, + filter:function(event,player){ + return player.getStorage('gzmaihuo_effect').contains(event.player)&&event.player.canUse('sha',player,false); + }, + content:function(){ + 'step 0' + var target=trigger.player; + player.unmarkAuto('gzmaihuo_effect',[target]); + target.removeMark('gzmaihuo_mark',1,false); + target.useCard({name:'sha',isCard:true},player,'gzmaihuo_effect',false); + 'step 1' + if(!player.getStorage('gzmaihuo_effect').length) player.removeSkill('gzmaihuo_effect'); + }, + group:'gzmaihuo_remove', + }, + remove:{ + trigger:{player:'damageBegin2'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.getParent().skill=='gzmaihuo_effect'; + }, + content:function(){ + trigger.cancel(); + player.draw(2); + if(player.checkMainSkill('gzmaihuo',false)){ + player.removeCharacter(0); + } + else if(player.checkViceSkill('gzmaihuo',false)){ + player.changeVice(); + } + }, + }, + mark:{ + marktext:'祸', + intro:{ + content:'mark', + onunmark:true, + }, + }, + }, + }, + //羊徽瑜 + gzcaiyuan:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + preHidden:true, + filter:function(event,player){ + var num1=player.countCards('h'),num2=num1; + player.getHistory('gain',function(evt){ + num2-=evt.cards.length; + }); + player.getHistory('lose',function(evt){ + if(evt.hs) num2+=evt.hs.length; + }); + return num1>=num2; + }, + content:function(){ + player.chooseDrawRecover(2,true); + }, + }, + //左棻 + gzzhaosong:{ + audio:'zhaosong', + enable:'phaseUse', + preHidden:['gzzhaosong_dying','gzzhaosong_sha'], + filter:function(event,player){ + return !player.getStorage('gzzhaosong').contains('效果②')&&game.hasPlayer((current)=>lib.skill.gzzhaosong.filterTarget(null,player,current)); + }, + filterTarget:function(card,player,target){ + return target!=player&&(target.isUnseen(2)||target.countCards('h')>0); + }, + content:function(){ + player.markAuto('gzzhaosong',['效果②']); + if(target.isUnseen(2)) player.viewCharacter(target,2); + if(target.countCards('hej')>0) player.gainPlayerCard(target,'hej','visible'); + }, + ai:{ + order:11, + result:{ + player:function(player,target){ + return get.effect(target,{name:'zhibi'},player,player)+get.effect(target,{name:'shunshou_copy'},player,player); + }, + }, + }, + group:['gzzhaosong_dying','gzzhaosong_sha'], + subSkill:{ + dying:{ + audio:'gzzhaosong', + trigger:{global:'dying'}, + logTarget:'player', + filter:function(event,player){ + return !player.getStorage('gzzhaosong').contains('效果①')&&event.player.isDying()&&event.player.hp<=0; + }, + prompt2:'令该角色回复至2点体力并摸一张牌', + check:function(event,player){ + return event.player.isFriendOf(player)&&get.attitude(player,event.player)>0; + }, + content:function(){ + player.markAuto('gzzhaosong',['效果①']); + var target=trigger.player,num=2-target.hp; + if(num>0) target.recover(num); + target.draw(); + }, + }, + sha:{ + audio:'gzzhaosong', + trigger:{global:'useCard2'}, + direct:true, + filter:function(event,player){ + if(event.card.name!='sha'||player.getStorage('gzzhaosong').contains('效果③')) return false; + return game.hasPlayer(function(current){ + return !event.targets.contains(current)&&lib.filter.filterTarget(event.card,event.player,current); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget([1,2],get.prompt('gzzhaosong'),'为'+get.translation(trigger.card)+'增加至多两个目标',function(card,player,target){ + var event=_status.event.getTrigger(); + return !event.targets.contains(target)&&lib.filter.filterTarget(event.card,event.player,target); + }).set('ai',function(target){ + var event=_status.event.getTrigger(); + return get.effect(target,event.card,event.player,_status.event.player); + }).set('goon',game.countPlayer(function(current){ + return !trigger.targets.contains(current)&&lib.filter.filterTarget(trigger.card,trigger.player,current)&&get.effect(current,trigger.card,trigger.player,player)>0; + })>=Math.min(2,game.countPlayer(function(current){ + return !trigger.targets.contains(current)&&lib.filter.filterTarget(trigger.card,trigger.player,current); + }))).setHiddenSkill('gzzhaosong_sha'); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + } + else event.finish(); + 'step 2' + var targets=result.targets; + player.markAuto('gzzhaosong',['效果③']); + player.logSkill('gzzhaosong_sha',targets); + trigger.targets.addArray(targets); + }, + }, + }, + }, + gzlisi:{ + audio:2, + trigger:{global:'dieAfter'}, + filter:function(event,player){ + return event.player.isFriendOf(player)&&player.getStorage('gzzhaosong').length>0; + }, + direct:true, + content:function(){ + 'step 0' + var list=player.getStorage('gzzhaosong').slice(0); + list.push('cancel2'); + player.chooseControl(list).set('prompt',get.prompt('gzlisi')).set('prompt2','恢复〖诏颂〗的一个已发动的选项'); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('gzlisi'); + player.unmarkAuto('gzzhaosong',[result.control]) + } + }, + }, + //杨艳 + gzxuanbei:{ + audio:'xuanbei', + trigger:{player:'showCharacterAfter'}, + filter:function(event,player){ + return !player.storage.gzxuanbei&&event.toShow.contains('gz_yangyan'); + }, + forced:true, + locked:false, + content:function(){ + 'step 0' + player.storage.gzxuanbei=true; + var cards=[]; + while(cards.length<2){ + var card=get.cardPile2(function(card){ + if(cards.contains(card)) return false; + return card.hasTag('lianheng')||get.is.yingbian(card); + }); + if(!card) break; + else cards.push(card); + } + if(cards.length) player.gain(cards,'gain2'); + if(cards.length<2) player.draw(2-cards.length); + 'step 1' + player.addTempSkill('gzxuanbei_effect'); + }, + group:'gzxuanbei_change', + subSkill:{ + effect:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return get.cardtag(event.card,'lianheng'); + }, + content:function(){ + player.draw(); + }, + ai:{forceYingbian:true}, + mark:true, + intro:{content:'使用应变牌时直接获得强化,使用合纵牌时摸一张牌。'}, + }, + change:{ + audio:'xuanbei', + trigger:{player:'die'}, + direct:true, + forceDie:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('gzxuanbei'),'令一名其他角色变更副将',lib.filter.notMe).set('forceDie',true).set('ai',function(target){ + var player=_status.event.player; + var rank=get.guozhanRank(target.name2,target)<=3; + var att=get.attitude(player,target); + if(att>0){ + return (4-rank)*att; + } + return -(rank-6)*att; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('gzxuanbei_change',target); + game.delayx(); + target.changeVice(); + } + }, + }, + }, + }, + //司马师 + gzyimie:{ + audio:'yimie', + inherit:'yimie', + round:1, + init:function(player){ + if(player.checkMainSkill('gzyimie')){ + player.removeMaxHp(2); + } + }, + }, + gztairan:{ + audio:'tairan', + trigger:{player:'phaseUseBegin'}, + check:function(event,player){ + return player.isDamaged()&&player.hasCard(function(card){ + return 5.5-get.value(card); + },'he'); + }, + content:function(){ + 'step 0' + var list=[],num=0; + if(player.isHealthy()||!player.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'gztairan'); + },'he')) num=1; + event.num=num; + for(var i=num;i<=player.hp;i++){ + list.push(i+'点'); + } + player.chooseControl(list).set('prompt','###请先失去任意点体力###此回合结束时,你将恢复等量的体力'); + 'step 1' + var num1=result.index+num; + event.num1=num1; + if(num1>0) player.loseHp(num1); + 'step 2' + if(player.isDamaged()&&player.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'gztairan') + },'he')){ + var next=player.chooseToDiscard('he',[1,player.getDamagedHp()],'然后请弃置任意张牌','此回合结束时,你将摸等量的牌。').set('ai',function(card){ + return 5.5-get.value(card); + }); + if(event.num1==0) next.set('forced',true); + } + 'step 3' + var num2=0; + if(result.bool) num2=result.cards.length; + var storage=[event.num1,num2]; + player.addTempSkill('gztairan_effect'); + player.storage.gztairan_effect=storage; + }, + subSkill:{ + effect:{ + audio:'tairan', + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + var storage=player.storage.gztairan_effect; + return storage&&storage.length==2&&(storage[1]>0||player.isDamaged()); + }, + forced:true, + charlotte:true, + onremove:true, + content:function(){ + var storage=player.storage.gztairan_effect; + if(storage[0]>0) player.recover(storage[0]); + if(storage[1]>0) player.draw(storage[1]); + }, + }, + }, + }, + //杜预 + gzsanchen:{ + audio:'sanchen', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var stat=player.getStat('sanchen'); + return game.hasPlayer(function(current){ + return (!stat||!stat.contains(current)); + }); + }, + filterTarget:function(card,player,target){ + var stat=player.getStat('sanchen'); + return (!stat||!stat.contains(target)); + }, + content:function(){ + 'step 0' + var stat=player.getStat(); + if(!stat.sanchen) stat.sanchen=[]; + stat.sanchen.push(target); + target.draw(3); + 'step 1' + if(!target.countCards('he')) event.finish(); + else target.chooseToDiscard('he',true,3).set('ai',function(card){ + var list=ui.selected.cards.map(function(i){ + return get.type2(i); + }); + if(!list.contains(get.type2(card))) return 7-get.value(card); + return -get.value(card); + }); + 'step 2' + if(result.bool&&result.cards&&result.cards.length){ + var list=[]; + for(var i of result.cards) list.add(get.type2(i)); + if(list.length==result.cards.length){ + target.draw(); + player.getStat('skill').sanchen--; + player.addMark('gzsanchen',1); + } + } + else{ + target.draw(); + player.getStat('skill').sanchen--; + player.addMark('gzsanchen',1); + } + }, + ai:{ + order:9, + threaten:1.7, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nogain')) return 0.1; + return Math.sqrt(target.countCards('he')); + }, + }, + }, + marktext:'陈', + intro:{ + name2:'陈', + content:'mark', + }, + }, + gzpozhu:{ + audio:'pozhu', + enable:'phaseUse', + mainSkill:true, + init:function(player){ + if(player.checkMainSkill('gzpozhu')){ + player.removeMaxHp(); + } + }, + viewAsFilter:function(player){ + return !player.hasSkill('pozhu3',null,null,false)&&player.countMark('gzsanchen')>0&&player.countCards('hs')>0; + }, + viewAs:{name:'chuqibuyi'}, + filterCard:true, + position:'hs', + check:function(card){ + return 7-get.value(card); + }, + onuse:function(result,player){ + player.removeMark('gzsanchen',1); + }, + group:'gzpozhu2', + }, + gzpozhu2:{ + trigger:{player:'useCardAfter'}, + silent:true, + filter:function(event,player){ + return event.skill=='gzpozhu'&&!player.getHistory('sourceDamage',function(evt){ + return evt.card==event.card; + }).length; + }, + content:function(){ + player.addTempSkill('pozhu3'); + }, + }, + //钟琰 + gzbolan:{ + audio:'bolan', + global:'gzbolan_global', + enable:'phaseUse', + usable:1, + content:function(){ + 'step 0' + if((event.num&&event.num>0)||!_status.characterlist.length){ + event.finish(); + return; + } + var character=_status.characterlist.randomGet(); + var groups,double=get.is.double(character,true); + if(double) groups=double.slice(0); + else groups=[lib.character[character][1]]; + event.groups=groups; + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,character){ + ui.create.dialog(get.translation(player)+'发动了【博览】',[[character],'character']).videoId=id; + },player,event.videoId,character); + game.delay(3); + 'step 1' + game.broadcastAll('closeDialog',event.videoId); + var list1=['wei','shu','wu','qun','jin'],list2=['gzqice','tiaoxin','gzzhiheng','new_chuli','gzsanchen']; + var skills=[]; + for(var i=0;i0) return 3; + if(player.isHealthy()) return 1; + return -1; + }, + }, + }, + }, + }, + }, + //司马昭 + gzchoufa:{ + audio:'choufa', + inherit:'choufa', + content:function(){ + 'step 0' + player.choosePlayerCard(target,'h',true); + 'step 1' + player.showCards(result.cards,get.translation(player)+'对'+get.translation(target)+'发动了【筹伐】'); + var type=get.type2(result.cards[0],target),hs=target.getCards('h',function(card){ + return card!=result.cards[0]&&get.type2(card,target)!=type; + }); + if(hs.length){ + target.addGaintag(hs,'xinchoufa'); + target.addTempSkill('xinchoufa2'); + } + }, + }, + //张春华 + gzhuishi:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + filter:function(event,player){ + return ui.discardPile.childNodes.length>0; + }, + preHidden:true, + prompt:function(){ + return get.prompt('huishi')+'(可观看牌数:'+lib.skill.gzhuishi.getNum()+')'; + }, + check:function(event,player){ + return lib.skill.gzhuishi.getNum()>3; + }, + getNum:function(){ + var list=[]; + list.push(ui.discardPile.lastChild); + if(list[0].previousSibling) list.push(list[0].previousSibling); + var num=0; + for(var i of list){ + var name=get.translation(i.name); + if(name=='挟令') name='挟天子以令诸侯'; + num+=name.length; + } + return num; + }, + content:function(){ + 'step 0' + trigger.changeToZero(); + var cards=game.cardsGotoOrdering(get.cards(lib.skill.gzhuishi.getNum())).cards; + var num=Math.ceil(cards.length/2); + var next=player.chooseToMove('慧识:将'+get.cnNumber(num)+'张牌置于牌堆底并获得其余的牌',true); + next.set('list',[ + ['牌堆顶的展示牌',cards], + ['牌堆底'], + ]); + next.set('filterMove',function(from,to,moved){ + if(moved[0].contains(from)&&to==1) return moved[1].length<_status.event.num; + return true; + }); + next.set('filterOk',function(moved){ + return moved[1].length==_status.event.num; + }); + next.set('num',num); + next.set('processAI',function(list){ + var cards=list[0][1].slice(0).sort(function(a,b){ + return get.value(b)-get.useful(a); + }); + return [cards,cards.splice(cards.length-_status.event.num)]; + }); + 'step 1' + if(result.bool){ + var list=result.moved; + if(list[0].length) player.gain(list[0],'gain2'); + while(list[1].length) ui.cardPile.appendChild(list[1].shift().fix()); + } + }, + }, + gzqingleng:{ + audio:2, + trigger:{global:'phaseEnd'}, + direct:true, + preHidden:true, + filter:function(event,player){ + var target=event.player; + return target!=player&&target.isIn()&&target.isUnseen(2)&&player.countCards('he')>0&&player.canUse({name:'sha',nature:'ice'},target,false); + }, + content:function(){ + 'step 0' + player.chooseCard('he',get.prompt('gzqingleng',trigger.player),'将一张牌当做冰【杀】对其使用',function(card,player){ + return player.canUse(get.autoViewAs({name:'sha',nature:'ice'},[card]),_status.event.target,false); + }).set('target',trigger.player).set('ai',function(card){ + if(get.effect(_status.event.target,get.autoViewAs({name:'sha',nature:'ice'},[card]),player)<=0) return false; + return 6-get.value(card); + }).setHiddenSkill(event.name); + 'step 1' + if(result.bool){ + player.useCard(get.autoViewAs({name:'sha',nature:'ice'},result.cards),result.cards,false,trigger.player,'gzqingleng'); + if(trigger.player.isUnseen()){ + player.draw(); + } + } + }, + }, + //司马懿 + gzquanbian:{ + audio:'quanbian', + preHidden:true, + trigger:{player:['useCard','respond']}, + filter:function(event,player){ + if(player.hasSkill('gzquanbian_blocker')) return false; + var phase=event.getParent('phaseUse'); + if(!phase||phase.player!=player) return false; + var suit=get.suit(event.card); + if(!lib.suit.contains(suit)||!lib.skill.quanbian.hasHand(event)) return false; + return player.getHistory('useCard',function(evt){ + return evt!=event&&get.suit(evt.card)==suit&&lib.skill.quanbian.hasHand(evt)&&evt.getParent('phaseUse')==phase; + }).length+player.getHistory('respond',function(evt){ + return evt!=event&&get.suit(evt.card)==suit&&lib.skill.quanbian.hasHand(evt)&&evt.getParent('phaseUse')==phase; + }).length==0; + }, + content:function(){ + 'step 0' + var cards=get.cards(player.maxHp); + for(var i=cards.length-1;i>=0;i--){ + ui.cardPile.insertBefore(cards[i],ui.cardPile.firstChild); + } + game.updateRoundNumber(); + player.chooseButton(['权变:选择获得一张牌',cards],true).set('ai',function(button){ + var player=_status.event.player,card=button.link; + var suit=get.suit(card,false),val=get.value(card); + if(player.hasHistory('useCard',function(evt){ + return get.suit(evt.card,false)==suit; + })||player.hasHistory('respond',function(evt){ + return get.suit(evt.card,false)==suit; + })) return val; + return val+8; + }); + 'step 1' + if(result.bool){ + var card=result.links[0]; + player.gain(card,'gain2'); + var suit=get.suit(card,false); + if(player.hasHistory('useCard',function(evt){ + return get.suit(evt.card,false)==suit; + })||player.hasHistory('respond',function(evt){ + return get.suit(evt.card,false)==suit; + })) player.addTempSkill('gzquanbian_blocker'); + } + }, + subSkill:{blocker:{charlotte:true}}, + }, + gzxiongzhi:{ + audio:'xiongzhi', + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'thunder', + content:function(){ + 'step 0' + player.awakenSkill('gzxiongzhi'); + event.cards=game.cardsGotoOrdering(get.cards(player.maxHp)).cards.slice(0); + 'step 1' + var card=cards.shift(); + event.card=card; + player.showCards(card); + if(!player.hasUseTarget(card)){ + if(cards.length>0) event.redo(); + else event.finish(); + } + 'step 2' + var next=player.chooseUseTarget(card,true); + if(get.info(card).updateUsable=='phaseUse') next.addCount=false; + 'step 3' + if(result.bool&&cards.length>0) event.goto(1); + }, + ai:{ + order:1, + result:{ + player:function(player){ + if(!player.hasSkill('smyyingshi')) return 1; + var cards=[]; + for(var i=0;i=3) return false; - return event.cards2&&event.cards2.filterInD('d').length>0; + return event.player.countGainableCards(player,'he')>0; }, + logTarget:'player', content:function(){ 'step 0' player.addTempSkill('gzsuzhi_count'); player.addMark('gzsuzhi_count',1,false); if(trigger.delay==false) game.delay(); 'step 1' - var cards=trigger.cards2.filterInD('d'); - if(cards.length==1){ - event._result={ - bool:true, - links:cards, - } - } - else player.chooseButton(['夙智:选择获得一张牌',cards],true); - 'step 2' - if(result.bool) player.gain(result.links[0],'gain2'); + player.gainPlayerCard(trigger.player,'he',true); }, }, count:{ @@ -3175,10 +3927,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(player.hasHistory('damage',function(evt){ return evt.card==trigger.card; })&&game.hasPlayer(function(current){ - return current.isFriendOf(player)&&!current.hasMark('yinyang_mark'); + return current.isFriendOf(player)&&(!current.hasMark('yexinjia_mark')&&!current.hasMark('xianqu_mark')&&!current.hasMark('yinyang_mark')&&!current.hasMark('zhulianbihe_mark')) })){ - player.chooseTarget('是否令一名己方角色获得“阴阳鱼”标记?',function(card,player,target){ - return target.isFriendOf(player)&&!target.hasMark('yinyang_mark'); + player.chooseTarget('是否令一名己方角色获得“阴阳鱼”标记?',function(card,player,current){ + return current.isFriendOf(player)&&(!current.hasMark('yexinjia_mark')&&!current.hasMark('xianqu_mark')&&!current.hasMark('yinyang_mark')&&!current.hasMark('zhulianbihe_mark')); }).set('ai',function(target){ return get.attitude(_status.event.player,target)*Math.sqrt(1+target.needsToDiscard()); }); @@ -3199,14 +3951,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ forced:true, preHidden:true, filter:function(event,player){ - return event.num==1||player.countCards('h')>0; + return event.num==1||player.countCards('he')>0; }, check:function(event,player){ return event.num==1; }, content:function(){ - if(trigger.num==1) player.draw(2); - else player.chooseToDiscard(true,player.countCards('h')); + if(trigger.num==1) player.draw(); + else player.chooseToDiscard(true,'he',2); }, }, gzzhuosheng:{ @@ -3545,7 +4297,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ preHidden:true, content:function(){ 'step 0' - player.chooseTarget('请选择【雉盗】的目标','本回合内只能对自己和该角色使用牌,且第一次对其造成伤害时摸一张牌',lib.filter.notMe).set('ai',function(target){ + player.chooseTarget('请选择【雉盗】的目标','本回合内只能对自己和该角色使用牌,且第一次对其造成伤害时摸一张牌',lib.filter.notMe,true).set('ai',function(target){ var player=_status.event.player; return (1-get.sgn(get.attitude(player,target)))*Math.max(1,get.distance(player,target)); }); @@ -3584,12 +4336,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, gzyjili:{ audio:2, - init:function(player,skill){ - if(player.checkViceSkill(skill)&&!player.viceChanged) player.removeMaxHp(); - }, - viceSkill:true, forced:true, - preHidden:true, + preHidden:['gzyjili_remove'], trigger:{target:'useCardToTargeted'}, filter:function(event,player){ if(get.color(event.card)!='red'||event.targets.length!=1) return false; @@ -3612,11 +4360,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{player:'damageBegin2'}, forced:true, filter:function(event,player){ - return player.getHistory('damage').length==1; + var evt=false; + for(var i of lib.phaseName){ + evt=event.getParent(i); + if(evt&&evt.player) break; + } + return evt&&evt.player&&player.getHistory('damage',function(evtx){ + return evtx.getParent(evt.name)==evt; + }).length==1; }, content:function(){ trigger.cancel(); - player.removeCharacter(1); + player.removeCharacter(player.name1=='gz_yanbaihu'?0:1); }, }, }, @@ -4607,10 +5362,50 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ audio:2, mod:{ globalTo:function(from,to,distance){ - return distance+Math.max(1,to.countCards('e')); + return distance+to.countCards('e'); }, }, }, + gzrelixia:{ + audio:'gzlixia', + trigger:{global:'phaseZhunbeiBegin'}, + noHidden:true, + forced:true, + filter:function(event,player){ + return player!=event.player&&!event.player.isFriendOf(player)&&!player.inRangeOf(event.player); + }, + logTarget:'player', + content:function(){ + 'step 0' + var target=trigger.player; + event.target=target; + if(player.countDiscardableCards(target,'e')){ + player.draw(); + event.finish(); + return; + } + var str=get.translation(player); + target.chooseControl().set('prompt',str+'发动了【礼下】,请选择一项').set('choiceList',[ + '令'+str+'摸一张牌', + '弃置'+str+'装备区内的一张牌并失去1点体力', + ]).set('ai',function(){ + var player=_status.event.player,target=_status.event.getParent().player; + if(player.hp<=1||get.attitude(player,target)>=0) return 0; + if(target.countCards('e',function(card){ + return get.value(card,target)>=7-player.hp; + })>0) return 1; + var dist=get.distance(player,target,'attack'); + if(dist>1&&dist-target.countCards('e')<=1) return true; + return 0; + }); + 'step 1' + if(result.index==0) player.draw(); + else{ + target.discardPlayerCard(player,'e',true); + target.loseHp(); + } + }, + }, gzlixia:{ audio:2, trigger:{global:'phaseZhunbeiBegin'}, @@ -6107,7 +6902,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ result:{ player:function(player){ if(player.isUnseen()&&player.wontYe()){ - if(get.population(player._group)>=game.players.length/4) return 1; + if(get.population(player.group)>=game.players.length/4) return 1; return Math.random()>0.7?1:0; } else return 1; @@ -7279,40 +8074,45 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ content:function(){ "step 0" player.chooseTarget(get.prompt2('gzfangzhu'),function(card,player,target){ - return player!=target + return player!=target; }).setHiddenSkill('gzfangzhu').ai=function(target){ if(target.hasSkillTag('noturn')) return 0; - var player=_status.event.player; - if(get.attitude(_status.event.player,target)==0) return 0; - if(get.attitude(_status.event.player,target)>0){ - if(target.classList.contains('turnedover')) return 1000-target.countCards('h'); - if(player.getDamagedHp()<3) return -1; - return 100-target.countCards('h'); + var player=_status.event.player,att=get.attitude(player,target); + if(att==0) return 0; + if(att>0){ + if(target.isTurnedOver()) return 1000-target.countCards('h'); + return -1; } else{ - if(target.classList.contains('turnedover')) return -1; + if(target.isTurnedOver()) return -1; if(player.getDamagedHp()>=3) return -1; - return 1+target.countCards('h'); + return target.countCards('h')+1; } } "step 1" if(result.bool){ - player.logSkill('gzfangzhu',result.targets); - event.target=result.targets[0]; - event.target.chooseToDiscard('he').set('ai',function(card){ + var target=result.targets[0]; + event.target=target; + player.logSkill('gzfangzhu',target); + var num=player.getDamagedHp(); + if(num>0) target.chooseToDiscard('he',num,'放逐:弃置'+get.cnNumber(num)+'张牌并失去1点体力','或者点击“取消”不弃牌,改为摸'+get.cnNumber(num)+'张牌并叠置').set('ai',function(card){ var player=_status.event.player; if(player.isTurnedOver()) return -1; return (player.hp*player.hp)-Math.max(1,get.value(card)); - }).set('prompt','弃置一张牌并失去一点体力;或选择不弃置,将武将牌翻面并摸'+(player.getDamagedHp())+'张牌。'); + }); + else{ + target.turnOver(); + event.finish(); + } } else event.finish(); "step 2" if(result.bool){ - event.target.loseHp(); + target.loseHp(); } else{ - event.target.draw(player.getDamagedHp()); - event.target.turnOver(); + target.draw(player.getDamagedHp()); + target.turnOver(); } }, ai:{ @@ -7379,7 +8179,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return lib.character[player.name2][3].contains(skill)&&!lib.skill[skill].charlotte&&!get.is.locked(skill,player); }, mark:true, - marktext:'主', + marktext:'副', intro:{ content:function(storage,player,skill){ var list=player.getSkills(null,null,false).filter(function(i){ @@ -9360,6 +10160,36 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(event.list.length) event.goto(1); }, }, + gzyicheng:{ + audio:'yicheng', + trigger:{ + global:['useCardToPlayered','useCardToTargeted'], + }, + preHidden:true, + frequent:true, + direct:true, + filter:function(event,player){ + if(event.card.name!='sha') return false; + if(event.name=='useCardToPlayered'&&!event.isFirstTarget) return false; + var target=lib.skill.gzyicheng.logTarget(event,player); + if(target==player) return true; + return target.inline(player)&&target.isAlive()&&player.hasSkill('gzyicheng'); + }, + logTarget:function(event,player){ + return event.name=='useCardToPlayered'?event.player:event.target; + }, + content:function(){ + 'step 0' + var target=lib.skill.gzyicheng.logTarget(trigger,player); + event.target=target; + target.chooseBool(get.prompt('gzyicheng'),'摸一张牌,然后弃置一张牌').set('frequentSkill','gzyicheng'); + 'step 1' + if(result.bool){ + target.draw(); + target.chooseToDiscard('he',true); + } + }, + }, yicheng:{ audio:2, trigger:{global:'useCardToTargeted'}, @@ -9409,6 +10239,71 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } }, + gzhuyuan:{ + audio:'huyuan', + trigger:{player:'phaseJieshuBegin'}, + direct:true, + preHidden:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterCard:true, + filterTarget:function(card,player,target){ + if(player==target) return false; + var card=ui.selected.cards[0]; + if(get.type(card)!='equip') return true; + return target.isEmpty(get.subtype(card)); + }, + prompt:get.prompt2('huyuan'), + ai1:function(card){ + var player=_status.event.player; + if(get.type(card)!='equip') return 0; + return 6-get.value(card); + }, + ai2:function(target){ + var player=_status.event.player,card=ui.selected.cards[0]; + return get.effect(target,card,player,player); + }, + }).setHiddenSkill('huyuan'); + 'step 1' + if(result.bool){ + var target=result.targets[0],card=result.cards[0]; + player.logSkill('huyuan',target); + if(get.type(card)=='equip'){ + player.$give(card,target,false); + game.delayx(); + target.equip(card); + } + else{ + target.gain(card,player,'giveAuto'); + event.finish(); + } + } + else event.finish(); + 'step 2' + if(game.hasPlayer(function(current){ + return current.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,player,current); + },'ej'); + })){ + player.chooseTarget('是否弃置场上的一张牌?',function(card,player,target){ + return target.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,player,target); + },'ej'); + }); + } + else event.finish(); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'thunder'); + player.discardPlayerCard(target,true,'ej'); + } + }, + }, huyuan:{ audio:2, trigger:{player:'phaseJieshuBegin'}, @@ -9471,7 +10366,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ mod:{ globalTo:function(from,to,distance){ if(game.hasPlayer(function(current){ - return current.hasSkill('heyi')&¤t.inline(to)&¤t!=to; + return current.hasSkill('heyi')&¤t.inline(to); })){ return distance+1; } @@ -10173,8 +11068,52 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ priority:19, forced:true, popup:false, + filter:function(event,player){ + return player.isUnseen(2)&&!player.hasSkillTag('nomingzhi',false,null,true); + }, content:function(){ - "step 0" + 'step 0' + if(player.phaseNumber==1&&player.isUnseen(0)&&(_status.connectMode?!lib.configOL.junzhu:get.config('junzhu'))){ + var name=player.name1; + if(name.indexOf('gz_')!=0||!lib.junList.contains(name.slice(3))){ + event.goto(3); + } + else{ + event.junzhu_name='gz_jun_'+name.slice(3); + player.chooseBool('是否将主武将牌替换为“'+get.translation(event.junzhu_name)+'”?'); + } + } + else event.goto(3); + 'step 1' + if(result.bool){ + var to=event.junzhu_name; + event.maxHp=player.maxHp; + player.reinit(player.name1,to,4); + if(lib.skill[to]) game.trySkillAudio(to,player); + player.showCharacter(0); + var group=lib.character[to][1]; + var yelist=game.filterPlayer(function(current){ + if(current.identity!='ye') return false; + if(current==player) return true; + return current.group==group; + }); + if(yelist.length>0){ + player.line(yelist,'green'); + game.log(yelist,'失去了野心家身份'); + game.broadcastAll(function(list,group){ + for(var i=0;ievent.maxHp) player.recover(player.maxHp-event.maxHp); + 'step 3' var choice=1; for(var i=0;ievent.maxHp) player.recover(player.maxHp-event.maxHp); - } - }, gz_jun_liubei:{audio:true}, gz_jun_caocao:{audio:true}, gz_jun_sunquan:{audio:true}, @@ -10380,6 +11266,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, getConfig:function(player,target){ + if(target==player||!target.isUnseen()) return false; var config={}; var skills=player.getSkills(); for(var i=0;i0){ + target.chooseControl(list,'cancel2').set('prompt','是否响应'+get.translation(player)+'发起的阵法召唤?').set('ai',function(){ + return Math.random()<0.5?0:1; + }); } else event.goto(3); } else event.goto(3); 'step 2' - if(result.control=='明置主将'){ - event.current.showCharacter(0); - } - else if(result.control=='明置副将'){ - event.current.showCharacter(1); + if(result.control!='cancel2'){ + if(result.control=='明置'+get.translation(target.name1)){ + target.showCharacter(0); + } + else{ + target.showCharacter(1); + } } 'step 3' if(event.list.length) event.goto(1); @@ -11023,8 +11918,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ for(var i=0;i0){ + num--; + if(typeof this.singleHp=='boolean'){ + if(this.singleHp){ + this.singleHp=false; + } + else{ + this.singleHp=true; + this.maxHp--; + } } else{ - this.singleHp=true; this.maxHp--; } } - else{ - this.maxHp--; - } this.update(); }, hideCharacter:function(num,log){ @@ -12843,7 +13806,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.addVideo('showCharacter',this,num); if(this.identity=='unknown'||((num==0||num==2)&&lib.character[this.name1][1]=='ye')){ this.group=this.getGuozhanGroup(num); - this._group=this.group; if((num==0||num==2)&&lib.character[this.name1][1]=='ye'){ this.identity='ye'; if(!this._ye){ @@ -12964,7 +13926,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(get.zhu(this,null,true)) return true; return get.totalPopulation(group)+1<=get.population()/2; }, - perfectPair:function(){ + perfectPair:function(choosing){ if(_status.connectMode){ if(!lib.configOL.zhulian) return false; } @@ -12975,9 +13937,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var name2=this.name2; if(name1.indexOf('gz_shibing')==0) return false; if(name2.indexOf('gz_shibing')==0) return false; - if(lib.character[name1][1]!='ye'&&lib.character[name2][1]!='ye'&&lib.character[name1][1]!=lib.character[name2][1]) return false; if(get.is.jun(this.name1)) return true; - var list=['re','diy','sp','jsp','shen','jg','xin','old','gz','ol']; + if(choosing&&lib.character[name1][1]!='ye'&&lib.character[name2][1]!='ye'&&lib.character[name1][1]!=lib.character[name2][1]) return false; + var list=['re','diy','sp','jsp','shen','jg','xin','old','ol','sb','sc','gz']; for(var i=0;i=max) return -5; + if(from_p>=max) return -2-to_p; if(max>=game.players.length/2){ if(to_p<=from_p){ return 0.5;