From 67cabb26c1b15546ed7187b2bb24ded0a9c4cba1 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Mon, 23 Mar 2020 17:11:24 +0800 Subject: [PATCH] Add files via upload --- card/extra.js | 1 + card/standard.js | 5 +- character/extra.js | 11 +- character/refresh.js | 10 +- character/shenhua.js | 80 +- character/sp.js | 158 ++- character/xinghuoliaoyuan.js | 21 +- character/yijiang.js | 8 +- character/yxs.js | 8 +- game/asset.js | 11 +- game/game.js | 83 +- game/update.js | 22 +- mode/guozhan.js | 4 +- mode/identity.js | 1 + mode/single.js | 2486 +++++++++++++++++----------------- 15 files changed, 1513 insertions(+), 1396 deletions(-) diff --git a/card/extra.js b/card/extra.js index 9d8655b2c..75ca9551b 100644 --- a/card/extra.js +++ b/card/extra.js @@ -141,6 +141,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ !current.hasSkillTag('filterDamage',null,{ player:player, card:card, + jiu:true, })&& get.effect(current,card,target)>0); })){ diff --git a/card/standard.js b/card/standard.js index 79f05812a..b15c240a4 100644 --- a/card/standard.js +++ b/card/standard.js @@ -162,10 +162,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return 3; }, result:{ - target:function(player,target){ + target:function(player,target,card){ if(player.hasSkill('jiu')&&!target.hasSkillTag('filterDamage',null,{ player:player, - card:{name:'sha'}, + card:card, + jiu:true, })){ if(get.attitude(player,target)>0){ return -7; diff --git a/character/extra.js b/character/extra.js index 46630d932..1ba5778a6 100755 --- a/character/extra.js +++ b/character/extra.js @@ -797,7 +797,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:true, trigger:{player:'useCard'}, filter:function(event,player){ - return (get.type(event.card,'trick')=='trick'&&event.card.isCard&&player.hasMark('renjie')); + return (get.type(event.card)=='trick'&&event.card.isCard&&player.hasMark('renjie')); }, init:function(player){ player.storage.jilue_jizhi=0; @@ -2431,14 +2431,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }; }; if(event.list1.length&&event.list2.length){ - target.discard(event.list2).delay=false; player.discard(event.list1).delay=false; - game.delay(); - } - else{ target.discard(event.list2); - player.discard(event.list1); } + else if(event.list2.length){ + target.discard(event.list2); + } + else player.discard(event.list1); }; 'step 2' if(event.list1.length+event.list2.length==4){ diff --git a/character/refresh.js b/character/refresh.js index f21f94402..b88858e76 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -234,6 +234,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ trigger.num-=trigger.getParent(2).jiu_add; }, + ai:{ + filterDamage:true, + skillTagFilter:function(player,tag,arg){ + return arg&&arg.jiu==true; + }, + }, }, repojun:{ audio:2, @@ -3032,7 +3038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard'}, frequent:true, filter:function(event){ - return (get.type(event.card)=='trick'&&event.card.isCard); + return (get.type(event.card,'trick')=='trick'&&event.card.isCard); }, init:function(player){ player.storage.rejizhi=0; @@ -4487,7 +4493,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 0" player.chooseTarget(get.prompt('fenwei'), [1,trigger.targets.length],function(card,player,target){ - return _status.event.contains(target); + return _status.event.targets.contains(target); }).set('ai',function(target){ var trigger=_status.event.getTrigger(); if(game.phaseNumber>game.players.length*2&&trigger.targets.length>=game.players.length-1&&!trigger.excluded.contains(target)){ diff --git a/character/shenhua.js b/character/shenhua.js index b611f9c7d..29ca5fe7e 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -461,7 +461,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:"phaseJieshuBegin", }, - group:["drlt_zhenggu2"], direct:true, content:function(){ "step 0" @@ -476,57 +475,48 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(result.bool){ var target=result.targets[0]; - player.line(target,'thunder'); player.logSkill('drlt_zhenggu',target); - target.addSkill('drlt_zhenggu2'); - player.storage.drlt_zhenggu1=target; - target.storage.drlt_zhenggu=player; - }else{ - event.finish(); - }; + player.addSkill("drlt_zhenggu2"); + target.addSkill("drlt_zhenggu_mark"); + target.storage.drlt_zhenggu_mark.push(player); + target.markSkill("drlt_zhenggu_mark"); + lib.skill.drlt_zhenggu.sync(player,target); + } + }, + sync:function(player,target){ + var num=player.countCards('h'); + var num2=target.countCards('h'); + if(num0) num1=num-player.countCards('h'); - if(num-player.countCards('h')<0) num1=num-player.countCards('h'); - if(num1!=0){ - pl.line(player,'thunder'); - pl.logSkill('drlt_zhenggu',player); - } - if(num1<0) player.chooseToDiscard('h',-num1,true); - if(num1>0) player.draw(num1); - } - delete player.storage.drlt_zhenggu; - }; - if(player.storage.drlt_zhenggu1!=undefined){ - var pl=player.storage.drlt_zhenggu1; - if(pl.isAlive()){ - var num=pl.countCards('h'); - var num1=0; - var num2=Math.min(5,player.countCards('h')); - if(num2-num>0) num1=num2-num; - if(num2-num<0) num1=num2-num; - if(num1<0) pl.chooseToDiscard('h',-num1,true); - if(num1>0) pl.draw(num1); - } - delete player.storage.drlt_zhenggu1; - }; + trigger.player.storage.drlt_zhenggu_mark.remove(player); + if(trigger.player.storage.drlt_zhenggu_mark.length==0) trigger.player.unmarkSkill('drlt_zhenggu_mark'); + lib.skill.drlt_zhenggu.sync(player,trigger.player); + }, + }, + drlt_zhenggu_mark:{ + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + marktext:'镇', + intro:{ + name:'镇骨', + content:'已成为$〖镇骨〗的目标', }, }, "xinfu_zuilun":{ @@ -995,7 +985,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:1, position:'he', filterTarget:function(card,player,target){ - return player!=target&&trigger.targets.contains(target); + return player!=target&&_status.event.targets.contains(target); }, ai1:function(card){ if(card.name=='du') return 20; @@ -1011,6 +1001,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return att-3; }, prompt:get.prompt2('drlt_congjian'), + targets:trigger.targets, }); 'step 1' if(result.bool){ @@ -5124,7 +5115,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })){ player.chooseTarget(function(card,player,target){ var source=_status.event.source; - return target!=source&&source.inRange(target)<=1; + return target!=source&&source.inRange(target); },true).set('ai',function(target){ return get.damageEffect(target,_status.event.source,player); }).set('source',target); @@ -6803,6 +6794,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "drlt_huairou":"怀柔", "drlt_huairou_info":"出牌阶段,你可以重铸装备牌", "drlt_zhenggu":"镇骨", + drlt_zhenggu2:"镇骨", "drlt_zhenggu_info":"结束阶段,你可以选择一名其他角色,你的回合结束后和该角色的下个回合结束时,其将手牌摸至或弃至X张。(X为你的手牌数且至多为5)", "drlt_zhenrong":"徵荣", "drlt_zhenrong_info":"当你对其他角色造成伤害后,若其手牌比你多,你可以将其一张牌置于你的武将牌上,称为“荣”", diff --git a/character/sp.js b/character/sp.js index a210d0c4c..2f2368b1c 100755 --- a/character/sp.js +++ b/character/sp.js @@ -25,8 +25,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ character:{ sp_gongsunzan:['male','qun',4,['spyicong','sptuji']], sp_simazhao:['male','wei',3,['spzhaoxin','splanggu']], - sp_wangyuanji:['male','wei',3,['spfuluan','spshude']], - sp_xinxianying:['male','wei',3,['spmingjian','spyinzhi']], + sp_wangyuanji:['female','wei',3,['spfuluan','spshude']], + sp_xinxianying:['female','wei',3,['spmingjian','spyinzhi']], sp_liuxie:['male','qun',3,['sphuangen','sphantong']], huangfusong:['male','qun',4,['xinfenyue']], @@ -1065,12 +1065,79 @@ game.import('character',function(lib,game,ui,get,ai,_status){ neifa:{ audio:2, trigger:{player:'phaseUseBegin'}, + direct:true, content:function(){ 'step 0' - player.draw(); + _status.noclearcountdown=true; + if(game.hasPlayer(function(current){ + return current.countGainableCards(player,'ej')>0; + })){ + player.chooseControl('cancel2').set('choiceList',[ + '摸两张牌,然后弃置一张牌', + '获得场上的一张牌,然后弃置一张牌', + ]).set('prompt',get.prompt('neifa')).set('ai',function(){ + if(game.hasPlayer(function(current){ + var att=get.attitude(player,current); + if(att==0) return false; + if(att<0) return current.countCards('e',function(card){ + return get.value(card)>0; + })>0; + return current.countCards('ej',function(card){ + return get.position(card)=='j'||get.value(card)<=0; + })>0; + })) return 1; + return 0; + }); + } + else{ + player.chooseControl('ok','cancel2').set('prompt',get.prompt2('neifa')); + } 'step 1' - player.chooseToDiscard(true,'he'); + if(result.control=='cancel2'){ + delete _status.noclearcountdown; + if(!_status.noclearcountdown){ + game.stopCountChoose(); + } + event.finish(); + return; + } + else if(result.index==1){ + player.chooseTarget('请选择一名角色,获得其装备区或判定区内的一张牌',true,function(card,player,target){ + return target.countGainableCards(player,'ej')>0; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att>0&&target.countCards('e',function(card){ + return get.position(card)=='j'||get.value(card)<=0; + })) return 2*att; + else if(att<0&&target.countCards('e',function(card){ + return get.value(card)>0; + })) return -att; + return -1; + }); + } + else{ + delete _status.noclearcountdown; + if(!_status.noclearcountdown){ + game.stopCountChoose(); + } + player.logSkill('neifa'); + player.draw(2); + event.goto(3) + } 'step 2' + delete _status.noclearcountdown; + if(!_status.noclearcountdown){ + game.stopCountChoose(); + } + if(result.bool){ + var target=result.targets[0]; + player.logSkill('neifa',target); + player.gainPlayerCard(target,'ej',true); + } + 'step 3' + player.chooseToDiscard(true,'he'); + 'step 4' if(result.bool&&result.cards&&result.cards.length){ var name=get.type(result.cards[0])=='basic'?'neifa_basic':'neifa_nobasic'; player.addTempSkill(name); @@ -1151,6 +1218,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, filter:function(event,player){ if(get.type(event.card)!='trick') return false; + if(event.targets&&event.targets.length>0) return true; var info=get.info(event.card); if(info.allowMultiple==false) return false; if(event.targets&&!info.multitarget){ @@ -1164,15 +1232,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - var prompt2='为'+get.translation(trigger.card)+'额外指定一个目标' + var prompt2='为'+get.translation(trigger.card)+'增加或减少一个目标' player.chooseTarget(get.prompt('neifa'),function(card,player,target){ var player=_status.event.player; - if(_status.event.targets.contains(target)) return false; + if(_status.event.targets.contains(target)) return true; return lib.filter.targetEnabled2(_status.event.card,player,target)&&lib.filter.targetInRange(_status.event.card,player,target); }).set('prompt2',prompt2).set('ai',function(target){ var trigger=_status.event.getTrigger(); var player=_status.event.player; - return get.effect(target,trigger.card,player,player); + return get.effect(target,trigger.card,player,player)*(_status.event.targets.contains(target)?-1:1); }).set('targets',trigger.targets).set('card',trigger.card); 'step 1' if(result.bool){ @@ -1185,7 +1253,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' if(event.targets){ player.logSkill('neifa',event.targets); - trigger.targets.addArray(event.targets); + if(trigger.targets.contains(event.targets[0])) trigger.targets.removeArray(event.targets); + else trigger.targets.addArray(event.targets); } }, group:'neifa_use', @@ -1939,7 +2008,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' player.chooseTarget(get.prompt2('lskuizhu'),function(card,player,target){ return target!=player&&target.isMaxHp(); - }).ai=function(){return -1}; + }).ai=function(target){ + var player=_status.event.player; + var ts=Math.min(5,target.countCards('h')); + var delta=ts-player.countCards('h'); + if(delta<=0) return 0; + if(get.attitude(player,target)<1) return false; + return target.countCards('he',function(card){ + return lib.skill.zhiheng.check(card)>0; + })>1?delta:0; + }; 'step 1' if(result.bool){ var target=result.targets[0]; @@ -1959,10 +2037,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); return; } - target.chooseToDiscard(true,'h',[1,player.countCards('h')],'弃置至多'+get.cnNumber(player.countCards('h'))+'张手牌,并获得'+get.translation(player)+'等量的手牌').ai=lib.skill.zhiheng.check; + target.chooseToDiscard(true,'h',[1,player.countCards('h')],'弃置至多'+get.cnNumber(player.countCards('h'))+'张手牌,并获得'+get.translation(player)+'等量的手牌').ai=function(card){ + if(ui.selected.cards.length>1) return -1; + return lib.skill.zhiheng.check.apply(this,arguments) + }; 'step 4' if(result.bool&&result.cards&&result.cards.length&&player.countGainableCards(target,'h')>0){ - target.gainPlayerCard(player,'h',true,result.cards.length) + target.gainPlayerCard(player,'h',true,result.cards.length).visible=true; } 'step 5' if(result.bool&&result.cards&&result.cards.length>1){ @@ -1977,6 +2058,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 6' if(result.bool&&result.targets&&result.targets.length){ + player.line(result.targets[0]); result.targets[0].damage(target); } else{ @@ -6861,11 +6943,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'orange', forceunique:true, - filter:function(event,player){ - return player.storage.fanghun2>0; - }, + //filter:function(event,player){ + // return player.storage.fanghun2>0; + //}, prompt:function(event,player){ - var num=player.storage.fanghun2; + var num=Math.max(2,player.storage.fanghun2||0); var mode=get.mode(); if(mode!='chess'&&mode!='tafang'&&mode!='stone'){ num=Math.min(num,game.players.length+game.dead.length); @@ -6873,7 +6955,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.prompt('fuhan')+'(体力上限:'+num+')'; }, check:function(event,player){ - var num=player.storage.fanghun2; + var num=Math.max(2,player.storage.fanghun2||0); if(num==1) return false; if(player.hp<=1) return true; if(num==2) return false; @@ -6883,7 +6965,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' if(player.storage.fanghun) player.draw(player.storage.fanghun); - event.num=player.storage.fanghun2; + event.num=Math.max(2,player.storage.fanghun2||0); var list; if(_status.characterlist){ list=[]; @@ -6925,7 +7007,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ _status.characterlist.remove(result.links[0]); } 'step 2' - if(player.isMinHp()) player.recover(); + player.recover(); } }, fanghun:{ @@ -6946,8 +7028,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.card&&event.card.name=='sha'; }, content:function(){ - player.storage.fanghun++; - player.storage.fanghun2++; + player.storage.fanghun+=trigger.num; + player.storage.fanghun2+=trigger.num; player.markSkill('fanghun'); }, group:['fanghun_sha','fanghun_shan','fanghun_draw'], @@ -9083,7 +9165,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var card=event.card; if(card.name=='sha') return true; - if(get.color(card)=='black'&&get.type(card)=='trick') return true; + if(get.color(card)=='black'&&get.type(card,'trick')=='trick') return true; return false; }, content:function(){ @@ -9155,8 +9237,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger.player.markSkill('zhenwei2'); //event.trigger("addCardToStorage"); } - trigger.getParent().excluded.add(trigger.target); - trigger.player.addSkill('zhenwei2'); + trigger.targets.length=0; } game.delay(); }, @@ -12630,13 +12711,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'phaseUseBegin'}, filter:function(event,player){ - return event.player!=player&&player.countCards('h')>0; + return (get.mode()!='guozhan'||event.player!=player)&&player.countCards('h')>0; }, direct:true, content:function(){ "step 0" var nono=(Math.abs(get.attitude(player,trigger.player))<3); - if(get.damageEffect(trigger.player,player,player)<=0){ + if(player==trigger.player||get.damageEffect(trigger.player,player,player)<=0){ nono=true } else if(trigger.player.hp>2){ @@ -12663,7 +12744,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } "step 2" - if(result.bool) trigger.player.damage(); + if(result.bool&&trigger.player!=player) trigger.player.damage(); }, ai:{ threaten:2, @@ -12672,6 +12753,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, qiluan:{ audio:'qiluan2', + group:'qiluan_draw', + subfrequent:['draw'], trigger:{global:'phaseEnd'}, frequent:true, filter:function(event,player){ @@ -12684,7 +12767,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ player.draw(3*player.getStat('kill')); } - } + }, + subSkill:{ + draw:{ + trigger:{global:'dieAfter'}, + frequent:true, + filter:function(event,player){ + return get.mode()!='guozhan'&&player!=event.source; + }, + content:function(){player.draw()}, + }, + }, }, qiluan2:{ audio:2, @@ -14762,7 +14855,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinfenyue:'奋钺', xinfenyue_info:'出牌阶段限X次(X为与你不同阵营的存活角色数),你可以与一名其他角色拼点,若你赢,根据你拼点牌的点数依次执行以下效果:不大于5,你获得其一张牌;不大于9,你获得牌堆里的一张【杀】; 不大于K,视为你对其使用一张雷【杀】。', neifa:'内伐', - neifa_info:'出牌阶段开始时,你可以摸一张牌,然后弃置一张牌。若弃置的牌是基本牌,本回合你不能使用锦囊和装备牌,且【杀】的使用次数+X且目标+1;若弃置的不是基本牌,本回合你不能使用基本牌,且普通锦囊牌的目标+1,前两次使用装备牌时摸X张牌(X为你发动〖内伐〗弃牌后手牌中不能使用的牌的数量且最多为5)。', + neifa_info:'出牌阶段开始时,你可以摸两张牌或获得场上的一张牌,然后弃置一张牌。若弃置的牌是基本牌,本回合你不能使用锦囊和装备牌,且【杀】的使用次数+X且目标+1;若弃置的不是基本牌,本回合你不能使用基本牌,且普通锦囊牌的目标+1,前两次使用装备牌时摸X张牌(X为你发动〖内伐〗弃牌后手牌中不能使用的牌的数量且最多为5)。', neifa_use:'内伐', hmmanyi:'蛮裔', hmmanyi_info:'锁定技,【南蛮入侵】对你无效。', @@ -15056,9 +15149,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ duanbing:'短兵', duanbing_info:'当你使用【杀】选择目标后,你可以令一名距离为1的其他角色也成为此牌的目标。', fanghun:'芳魂', - fanghun_info:'当你使用【杀】造成伤害或受到【杀】的伤害后,你获得1个“梅影”标记;你可以移去1个“梅影”标记来发动〖龙胆〗并摸一张牌。', + fanghun_info:'当你使用【杀】造成伤害或受到【杀】的伤害后,你获得X个“梅影”标记(X为伤害点数);你可以移去1个“梅影”标记来发动〖龙胆〗并摸一张牌。', fuhan:'扶汉', - fuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记并摸等量的牌,随机观看五名未登场的蜀势力角色,将武将牌替换为其中一名角色,并将体力上限数调整为本局游戏中移去“梅影”标记的数量(至多为游戏开始时的角色数),然后若你是体力值最低的角色,你回复1点体力。', + fuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记并摸等量的牌,随机观看五名未登场的蜀势力角色,将武将牌替换为其中一名角色,并将体力上限数调整为本局游戏中移去“梅影”标记的数量(至多为游戏开始时的角色数),然后回复1点体力。', yjixi:'觊玺', yjixi_info:'觉醒技,结束阶段,若你连续三回合没有因〖庸肆〗而失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能〖妄尊〗;摸两张牌并获得当前主公的主公技。', xinyongsi:'庸肆', @@ -15399,9 +15492,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qiangwu_info:'出牌阶段,你可以进行判定。若如此做,直到回合结束,你使用点数小于判定结果的【杀】时不受距离限制,且你使用点数大于判定结果的【杀】时不计入出牌阶段的使用次数限制。', shenxian_info:'每名角色的回合限一次,你的回合外,当有其他角色因弃置而失去基本牌时,你可以摸一张牌。', oldshenxian_info:'你的回合外,每当有其他角色因弃置而失去基本牌时,你可以摸一张牌。', - qiluan_info:'一名角色的回合结束时,你可以摸3X张牌。(X为你本回合内杀死过的角色数)', + qiluan_info:'一名角色的回合结束时,你可以摸3X张牌(X为你本回合内杀死过的角色数)。一名其他角色死亡后,若其不是你杀死的,则你可以摸一张牌。', qiluan_info_guozhan:'一名角色的回合结束时,若你于回合内杀死过角色,则你可以摸三张牌。', - zhendu_info:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。', + zhendu_info:'一名角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若该角色不是你,你对其造成一点伤害。', + zhendu_info_guozhan:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。', shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。', zniaoxiang_info:'锁定技,当你使用【杀】指定目标后,你令目标角色响应此【杀】所需要使用的【闪】的数目+1。', shoucheng_info:'当一名其他角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。', diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 8072dd0a8..795ed2374 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -74,27 +74,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"useCardEnd", }, check:function (event,player){ - return 18-get.value(event.card)-player.maxHp*2; + return get.value(event.card)-player.maxHp*2-18>0; }, filter:function (event,player){ - if(!player.isPhaseUsing()) return false; - if(event.cards){ - if(get.type(event.card)!='trick') return false; - for(var i=0;i0; }, content:function (){ - var list=[]; - for(var i=0;i0; }, content:function(){ "step 0" - var next=player.chooseToDiscard('he','是否弃置一张黑色牌并收回'+get.translation(trigger.card)+'?',{color:'black'}); + var next=player.chooseToDiscard('he','是否弃置一张黑色牌并收回'+get.translation(trigger.cards.filterInD())+'?',{color:'black'}); next.ai=function(card){ return get.value(trigger.card)-get.value(card); } next.logSkill='jieyong'; "step 1" if(result.bool){ - player.gain(trigger.card,'gain2'); + player.gain(trigger.cards.filterInD(),'gain2','log'); player.addTempSkill('jieyong2',['phaseAfter','phaseBegin']); } }, @@ -3111,7 +3111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhulu_info:'回合外,当有普通锦囊牌结算完毕后,你可以立即弃掉一张相同花色手牌或装备区的牌,获得这张锦囊牌。', jieyong:'节用', jieyong2:'节用', - jieyong_info:'你使用的卡牌进入弃牌堆后,你可以弃置一张黑色牌并重新获得之(每回合限一次)', + jieyong_info:'你使用的卡牌结算完成后,你可以弃置一张黑色牌并重新获得之。(每回合限一次)', shangtong:'尚同', shangtong_info:'每当你令其他角色恢复1点血量或掉1点血量时,你可以摸1张牌(摸牌上限为4)', feiming:'非命', diff --git a/game/asset.js b/game/asset.js index f7e030cb6..45f2de5b1 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - '1.9.98.4', + '1.9.98.4.1', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -2359,6 +2359,15 @@ window.noname_asset_list=[ 'audio/skill/zhongzuo1.mp3', 'audio/skill/zhongzuo2.mp3', 'audio/skill/buyi_re_wuguotai1.mp3', + 'audio/skill/busuan1.mp3', + 'audio/skill/busuan2.mp3', + 'audio/skill/gxlianhua1.mp3', + 'audio/skill/gxlianhua2.mp3', + 'audio/skill/mingjie1.mp3', + 'audio/skill/tuiyan1.mp3', + 'audio/skill/tuiyan2.mp3', + 'audio/skill/zhafu1.mp3', + 'audio/skill/zhafu2.mp3', 'font/huangcao.ttf', 'font/shousha.ttf', diff --git a/game/game.js b/game/game.js index 5cf9d6db7..4e186ada4 100644 --- a/game/game.js +++ b/game/game.js @@ -32,7 +32,7 @@ }, updateURL:'https://raw.githubusercontent.com/libccy/noname', mirrorURL:'https://nakamurayuri.coding.net/p/noname/d/noname/git/raw', - hallURL:'noname.pub', + hallURL:'noname.mobi', assetURL:'', changeLog:[], updates:[], @@ -995,7 +995,7 @@ editbg.call(node.lastChild); } } - }).inputNode.accept='image/jpeg'; + }).inputNode.accept='image/*'; var editbg=function(){ this.classList.toggle('active'); var page=this.parentNode.parentNode; @@ -1255,7 +1255,7 @@ }); }); } - }).inputNode.accept='image/jpeg,image/png'; + }).inputNode.accept='image*'; deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){ if(confirm('确定删除自定义图片?(此操作不可撤销)')){ game.deleteDB('image','card_style'); @@ -1379,14 +1379,14 @@ }); }); } - }).inputNode.accept='image/jpeg,image/png'; + }).inputNode.accept='image/*'; ui.create.filediv('.menubutton.deletebutton.addbutton','添加翻转图片',node,function(file){ if(file){ game.putDB('image','cardback_style2',file,function(){ node.classList.add('hideadd'); }); } - }).inputNode.accept='image/jpeg,image/png'; + }).inputNode.accept='image/*'; deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){ if(confirm('确定删除自定义图片?(此操作不可撤销)')){ game.deleteDB('image','cardback_style'); @@ -1530,7 +1530,7 @@ }); }); } - }).inputNode.accept='image/jpeg,image/png'; + }).inputNode.accept='image/*'; deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){ if(confirm('确定删除自定义图片?(此操作不可撤销)')){ game.deleteDB('image','hp_style1'); @@ -1709,7 +1709,7 @@ }); }); } - }).inputNode.accept='image/jpeg,image/png'; + }).inputNode.accept='image/*'; deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){ if(confirm('确定删除自定义图片?(此操作不可撤销)')){ game.deleteDB('image','player_style'); @@ -1834,7 +1834,7 @@ }); }); } - }).inputNode.accept='image/jpeg,image/png'; + }).inputNode.accept='image/*'; deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){ if(confirm('确定删除自定义图片?(此操作不可撤销)')){ game.deleteDB('image','border_style'); @@ -2024,7 +2024,7 @@ }); }); } - }).inputNode.accept='image/jpeg,image/png'; + }).inputNode.accept='image/*'; deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){ if(confirm('确定删除自定义图片?(此操作不可撤销)')){ game.deleteDB('image','menu_style'); @@ -2143,7 +2143,7 @@ }); }); } - }).inputNode.accept='image/jpeg,image/png'; + }).inputNode.accept='image/*'; deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){ if(confirm('确定删除自定义图片?(此操作不可撤销)')){ game.deleteDB('image','control_style'); @@ -13345,17 +13345,17 @@ if(att>0){ if(!_status.event.nojudge&&target.countCards('j')) return 10; if(target.countCards('e',function(card){ - return get.value(card)<0&&game.hasPlayer(function(current){ - return get.attitude(player,current)<0&¤t.isEmpty(get.subtype(card)) + return get.value(card,target)<0&&game.hasPlayer(function(current){ + return current!=target&&get.attitude(player,current)<0&¤t.isEmpty(get.subtype(card)) }); })>0) return 9; } else if(att<0){ if(game.hasPlayer(function(current){ - if(get.attitude(player,current)>0){ + if(current!=target&&get.attitude(player,current)>0){ var es=target.getCards('e'); for(var i=0;i0&¤t.isEmpty(get.subtype(es[i]))) return true; + if(get.value(es[i],target)>0&¤t.isEmpty(get.subtype(es[i]))) return true; } } })){ @@ -13368,8 +13368,8 @@ var i; var att2=get.attitude(player,ui.selected.targets[0]); for(i=0;i'); + if(!_status.chatValue) _status.chatValue=''; + var node=uiintro.add(''); node.style.paddingTop=0; node.style.marginBottom='16px'; input=node.firstChild; input.style.width='calc(100% - 20px)'; + input.onchange=function(){ + _status.chatValue=input.value; + } input.onkeydown=function(e){ if(e.keyCode==13&&input.value){ var player=game.me; @@ -43525,6 +43545,7 @@ lib.element.player.chat.call(player,str); } input.value=''; + _status.chatValue=''; } e.stopPropagation(); } diff --git a/game/update.js b/game/update.js index d99043f89..a6091068e 100644 --- a/game/update.js +++ b/game/update.js @@ -1,12 +1,12 @@ window.noname_update={ - version:'1.9.98.4', - update:'1.9.98.3.2', + version:'1.9.98.4.1', + update:'1.9.98.4', changeLog:[ - 'SP贴纸', + '何太后,二袁,赵襄调整', 'bug修复', ], files:[ - //'card/extra.js', + 'card/extra.js', //'card/huanlekapai.js', //'card/sp.js', 'card/standard.js', @@ -16,13 +16,13 @@ window.noname_update={ //'card/gwent.js', //'card/zhenfa.js', //'card/zhulu.js', - 'character/diy.js', + //'character/diy.js', 'character/extra.js', //'character/hearth.js', //'character/gujian.js', //'character/gwent.js', //'character/hearth.js', - 'character/mobile.js', + //'character/mobile.js', //'character/mtg.js', //'character/old.js', 'character/refresh.js', @@ -30,22 +30,22 @@ window.noname_update={ 'character/sp.js', //'character/tw.js', //'character/standard.js', - 'character/swd.js', + //'character/swd.js', //'character/xianjian.js', - //'character/xinghuoliaoyuan.js', + 'character/xinghuoliaoyuan.js', 'character/yijiang.js', 'character/yxs.js', //'extension/boss/extension.js', //'layout/default/layout.css', //'layout/nova/layout.css', - //'mode/identity.js', + 'mode/identity.js', //'mode/doudizhu.js', 'mode/guozhan.js', //'mode/chess.js', //'mode/tafang.js', - //'mode/single.js', + 'mode/single.js', //'mode/stone.js', - 'mode/brawl.js', + //'mode/brawl.js', //'mode/versus.js', //'mode/boss.js', 'game/game.js', diff --git a/mode/guozhan.js b/mode/guozhan.js index d20e59371..015fdb933 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -3804,7 +3804,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }; for(var i=0;i0){ num++; if(num>=3){ return 1; diff --git a/mode/identity.js b/mode/identity.js index acd1fab33..29df16669 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -2470,6 +2470,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ break; case 'nei': if(identity2=='zhu'&&game.players.length==2) return -10; + if(identity2!='zhu'&&game.players.length==3) return -8; var strategy=get.aiStrategy(); if(strategy==4){ if(from==to) return 10; diff --git a/mode/single.js b/mode/single.js index c979273da..73de58e44 100644 --- a/mode/single.js +++ b/mode/single.js @@ -1,1243 +1,1243 @@ -'use strict'; -game.import('mode',function(lib,game,ui,get,ai,_status){ - return { - name:'single', - changbanCharacter:[ - "key_kyousuke", - "xf_yiji","caozhang","sunquan", - "re_caocao","re_guojia","re_xuzhu","re_zhangliao","re_xiahoudun","re_simayi","re_lidian", - "re_zhangfei","re_zhaoyun","re_zhouyu","re_ganning","re_lvbu","re_gongsunzan","re_diaochan", - "re_xiahouyuan","re_huangzhong","re_weiyan","re_dianwei","re_pangde","re_yanwen","pangtong", - "re_zhurong","sunjian","jiaxu","dengai","jiangwei","sunce", - "wangji","kuailiangkuaiyue","wangping","yl_luzhi","chendao","lukang", - "xin_masu","lingtong","xusheng","wangyi","xunyou","madai","handang", - "guohuai","caochong","guanping","liufeng","zhuran","xin_liru", - "hanhaoshihuan","wuyi","guyong","caoxiu","liuchen","sunxiu","gongsunyuan", - "guohuanghou","xinxianying","qinmi","xushi","xuezong","ol_yujin", - "lvdai","wangcan","zhoufang","guosi","zhangji","fanchou", - "zhanggong","shamoke","mangyachang","huangfusong","xf_huangquan","xf_tangzi","xf_sufei","liuqi", - "lifeng","lingcao","sunru","re_jikang","zhuling", - "sp_caiwenji","caoang","sp_caoren","fuwan","guanyinping","jsp_guanyu","huangjinleishi", - "sp_jiangwei","litong","mayunlu","sp_pangde","wanglang","xiahouba", - "yuanshu","yuejin","sp_zhangfei","zhugejin","panfeng","chenlin", - "jiling","mateng","tw_dingfeng","kaisa", - ], - singlePile:[ - ['spade',5,'sha'], - ['spade',7,'sha'], - ['spade',8,'sha'], - ['spade',10,'sha'], - ['heart',10,'sha'], - ['heart',11,'sha'], - ['club',4,'sha'], - ['club',5,'sha'], - ['club',6,'sha'], - ['club',8,'sha'], - ['club',9,'sha'], - ['club',10,'sha'], - ['club',11,'sha'], - ['diamond',6,'sha'], - ['diamond',9,'sha'], - ['diamond',11,'sha'], - ['heart',2,'shan'], - ['heart',5,'shan'], - ['diamond',2,'shan'], - ['diamond',3,'shan'], - ['diamond',7,'shan'], - ['diamond',8,'shan'], - ['diamond',10,'shan'], - ['diamond',11,'shan'], - ['heart',3,'tao'], - ['heart',4,'tao'], - ['heart',9,'tao'], - ['diamond',12,'tao'], - ['club',12,'bingliang'], - ['spade',3,'guohe'], - ['diamond',12,'guohe'], - ['club',3,'guohe'], - ['club',1,'juedou'], - ['spade',1,'juedou'], - ['heart',6,'lebu'], - ['spade',1,'nanman'], - ['club',7,'shuiyanqijunx'], - ['spade',4,'shunshou'], - ['spade',11,'shunshou'], - ['diamond',4,'shunshou'], - ['heart',1,'wanjian'], - ['heart',5,'wuxie'], - ['club',5,'wuxie'], - ['heart',7,'wuzhong'], - ['heart',8,'wuzhong'], - ['diamond',5,'guanshi'], - ['spade',9,'hanbing'], - ['spade',6,'qinggang'], - ['spade',12,'zhangba'], - ['diamond',1,'zhuge'], - ['spade',2,'bagua'], - ['club',2,'renwang'], - ], - characterSingle:{ - caocao:['male','wei',4,['jianxiong'],['zhu']], - simayi:['male','wei',3,['fankui','guicai']], - xiahoudun:['male','wei',4,['ganglie']], - zhangliao:['male','wei',4,['retuxi']], - xuzhu:['male','wei',4,['luoyi','xiechan']], - guojia:['male','wei',3,['tiandu','yiji']], - zhenji:['female','wei',3,['luoshen','sgqingguo']], - liubei:['male','shu',4,['sgrenwang'],['zhu']], - guanyu:['male','shu',4,['wusheng','huwei']], - zhangfei:['male','shu',4,['paoxiao']], - zhugeliang:['male','shu',3,['guanxing','kongcheng']], - zhaoyun:['male','shu',4,['longdan']], - machao:['male','shu',4,['xiaoxi','tieji']], - huangyueying:['female','shu',3,['jizhi','cangji']], - sunquan:['male','wu',4,['sgzhiheng'],['zhu']], - ganning:['male','wu',4,['qixi']], - lvmeng:['male','wu',4,['shenju','botu']], - huanggai:['male','wu',4,['kurou']], - zhouyu:['male','wu',3,['yingzi','fanjian']], - daqiao:['female','wu',3,['guose','wanrong']], - luxun:['male','wu',3,['qianxun','lianying']], - sunshangxiang:['female','wu',3,['xiaoji','yinli']], - //huatuo:['male','qun',3,['qingnang','jijiu']], - lvbu:['male','qun',4,['wushuang']], - diaochan:['female','qun',3,['pianyi','biyue']], - - xiahouyuan:['male','wei',4,['shensu','suzi']], - old_caoren:['male','wei',4,['jushou']], - huangzhong:['male','shu',4,['liegong']], - weiyan:['male','shu',4,['sgkuanggu']], - xiaoqiao:['female','wu',3,['tianxiang','hongyan']], - old_zhoutai:['male','wu',4,['gzbuqu']], - zhangjiao:['male','qun',3,['leiji','guidao'],['zhu']], - - dianwei:['male','wei',4,['qiangxi']], - yanwen:['male','qun',4,['shuangxiong']], - pangde:['male','qun',4,['xiaoxi','mengjin']], - - menghuo:['male','shu',4,['manyi','zaiqi']], - zhurong:['female','shu',4,['manyi','lieren']], - xuhuang:['male','wei',4,['sgduanliang']], - sunjian:['male','wu',4,['gzyinghun']], - - jiangwei:['male','shu',4,['tiaoxin']], - - hejin:['male','qun',4,['mouzhu','yanhuo']], - hansui:['male','qun',4,['xiaoxi','niluan']], - niujin:['male','wei',4,['cuorui','liewei']], - }, - startBefore:function(){ - - }, - onreinit:function(){ - _status.mode=_status.connectMode?lib.configOL.single_mode:get.config('single_mode'); - if(_status.mode!='normal') return; - for(var i in lib.characterSingle){ - lib.character[i]=lib.characterSingle[i]; - if(!lib.character[i][4]){ - lib.character[i][4]=[]; - } - } - for(var j in lib.singleTranslate) lib.translate[j]=lib.singleTranslate[j]; - }, - start:function(){ - "step 0" - var playback=localStorage.getItem(lib.configprefix+'playback'); - if(playback){ - ui.create.me(); - ui.arena.style.display='none'; - ui.system.style.display='none'; - _status.playback=playback; - localStorage.removeItem(lib.configprefix+'playback'); - var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); - store.get(parseInt(playback)).onsuccess=function(e){ - if(e.target.result){ - game.playVideoContent(e.target.result.video); - } - else{ - alert('播放失败:找不到录像'); - game.reload(); - } - } - event.finish(); - } - else if(!_status.connectMode){ - game.prepareArena(2); - } - "step 1" - if(_status.connectMode){ - game.waitForPlayer(function(){ - lib.configOL.number=2; - }); - } - "step 2" - _status.mode=_status.connectMode?lib.configOL.single_mode:get.config('single_mode'); - if(_status.mode=='normal'){ - lib.card.list=lib.singlePile.slice(0); - game.fixedPile=true; - game.broadcastAll(function(singleTranslate,characterSingle){ - _status.mode='normal'; - for(var j in singleTranslate) lib.translate[j]=singleTranslate[j]; - _status.characterlist=[]; - for(var i in characterSingle){ - lib.character[i]=characterSingle[i]; - if(!lib.character[i][4]){ - lib.character[i][4]=[]; - } - _status.characterlist.push(i); - } - },lib.singleTranslate,lib.characterSingle); - } - else if(_status.mode=='changban'){ - _status.characterlist=[]; - for(var i=0;i'; - for(var i=0;i'; - } - } - } - lib.config.gameRecord.single.str=str; - game.saveConfig('gameRecord',lib.config.gameRecord); - } - }, - getState:function(){ - var state={}; - for(var i in lib.playerOL){ - var player=lib.playerOL[i]; - state[i]={identity:player.identity}; - } - return state; - }, - updateState:function(state){ - for(var i in state){ - var player=lib.playerOL[i]; - if(player){ - player.identity=state[i].identity; - } - } - }, - getRoomInfo:function(uiintro){ - if(lib.configOL.bannedcards.length){ - uiintro.add('
禁用卡牌:'+get.translation(lib.configOL.bannedcards)); - } - uiintro.style.paddingBottom='8px'; - }, - getVideoName:function(){ - var str=get.translation(game.me.name); - if(game.me.name2){ - str+='/'+get.translation(game.me.name2); - } - var name=[ - str, - get.translation(_status.mode+2)+' - '+lib.translate[game.me.identity+'2'] - ]; - return name; - }, - showIdentity:function(){}, - checkResult:function(){ - game.over(game.me.isAlive()); - }, - checkOnlineResult:function(player){ - return player.isAlive(); - }, - chooseCharacterDianjiang:function(){ - var next=game.createEvent('chooseCharacter',false); - next.showConfig=true; - next.setContent(function(){ - "step 0" - ui.arena.classList.add('choose-character'); - lib.init.onfree(); - "step 1" - game.me.chooseControl('先手','后手').prompt='请选择自己的行动顺序'; - "step 2" - var map=result.control=='先手'?['zhu','fan']:['fan','zhu']; - game.me.identity=map[0]; - game.me.next.identity=map[1]; - game.me.showIdentity(); - game.me.next.showIdentity(); - "step 3" - event.flipassign=true; - event.videoId=lib.status.videoId++; - var list=[]; - for(var i in lib.character){ - if(lib.filter.characterDisabled(i)) continue; - list.push(i); - } - _status.characterlist=list; - var filter=function(name){ - return !_status.characterlist.contains(name); - }; - var dialog=ui.create.characterDialog('heightset',filter,'expandall').open(); - dialog.videoId=event.videoId; - - game.me.chooseButton(true).set('ai',function(button){ - return Math.random(); - }).set('dialog',event.videoId); - "step 4" - game.me.init(result.links[0]); - game.me.chooseButton(true).set('ai',function(button){ - return Math.random(); - }).set('dialog',event.videoId); - "step 5" - game.me.next.init(result.links[0]); - setTimeout(function(){ - ui.arena.classList.remove('choose-character'); - },500); - }); - }, - chooseCharacter:function(){ - if(_status.mode=='dianjiang'){ - game.chooseCharacterDianjiang(); - return; - } - var next=game.createEvent('chooseCharacter',false); - next.showConfig=true; - next.setContent(function(){ - "step 0" - ui.arena.classList.add('choose-character'); - var num=[0,1].randomGet(); - game.players[num].identity='zhu'; - game.players[1-num].identity='fan'; - game.broadcastAll(function(p,t){ - p.enemy=t;t.enemy=p; - },game.players[0],game.players[1]); - for(var i=0;i=12; - })&&get.effect(target,{name:'juedou'},player,player)>0) return -1; - return 0; - }, - }, - }, - }, - huwei:{ - audio:2, - trigger:{ - player:'enterGame', - global:'gameDrawAfter', - }, - direct:true, - content:function(){ - player.chooseUseTarget('shuiyanqijunx',get.prompt('huwei'),'视为使用一张【水淹七军】').logSkill='huwei'; - }, - }, - sgkuanggu:{ - audio:'kuanggu', - trigger:{source:'damageSource'}, - frequent:true, - filter:function(event,player){ - return player.isDamaged(); - }, - content:function(){ - 'step 0' - player.judge(function(result){ - return get.color(result)=='black'?2:-2; - }); - 'step 1' - if(result.bool==true) player.recover(); - }, - }, - suzi:{ - audio:2, - trigger:{global:'loseAfter'}, - filter:function(event,player){ - if(event.getParent().name!='die') return false; - for(var i=0;i0; - }, - forceDie:true, - skillAnimation:true, - animationColor:'orange', - content:function(){ - var cards=player.getCards('e'); - player.cangji_yozuru=cards; - player.lose(cards,ui.special); - player.addSkill('cangji_yozuru'); - }, - subSkill:{ - yozuru:{ - sub:true, - charlotte:true, - superCharlotte:true, - trigger:{player:'enterGame'}, - forced:true, - popup:false, - //onremove:true, - content:function(){ - var cards=player.cangji_yozuru.slice(0); - for(var i=0;i游戏规则
  • 选将阶段
    双方在游戏开始时由系统随机分配身份。分配到先手身份的玩家优先出牌,分配到后手身份的玩家优先选将。
    双方各自随机获得3名暗置武将,同时从将池中随机选出6名明置武将,由后手玩家开始,按照一次1张-2张-2张-1张的顺序,轮流选择获得明置武将。之后双方各从自己的6名武将中选择2名分别作为主将和副将进行游戏。
  • 胜利条件
    对方死亡。'+ - '
  • 双将规则
    双将主将决定角色的性别和势力,体力上限为主副将体力上限的平均值,向下取整。体力上限为3的角色可在游戏开始后更换一次起始手牌。
  • 牌堆
    牌堆中移除【木牛流马】【闪电】,♣花色的【藤甲】和【无懈可击 ♦️Q】️
', - } - }; -}); +'use strict'; +game.import('mode',function(lib,game,ui,get,ai,_status){ + return { + name:'single', + changbanCharacter:[ + "key_kyousuke", + "xf_yiji","caozhang","sunquan", + "re_caocao","re_guojia","re_xuzhu","re_zhangliao","re_xiahoudun","re_simayi","re_lidian", + "re_zhangfei","re_zhaoyun","re_zhouyu","re_ganning","re_lvbu","re_gongsunzan","re_diaochan", + "re_xiahouyuan","re_huangzhong","re_weiyan","re_dianwei","re_pangde","re_yanwen","pangtong", + "re_zhurong","sunjian","jiaxu","dengai","jiangwei","sunce", + "wangji","kuailiangkuaiyue","wangping","yl_luzhi","chendao","lukang", + "xin_masu","lingtong","xusheng","wangyi","xunyou","madai","handang", + "guohuai","caochong","guanping","liufeng","zhuran","xin_liru", + "hanhaoshihuan","wuyi","guyong","caoxiu","liuchen","sunxiu","gongsunyuan", + "guohuanghou","xinxianying","qinmi","xushi","xuezong","ol_yujin", + "lvdai","wangcan","zhoufang","guosi","zhangji","fanchou", + "zhanggong","shamoke","mangyachang","huangfusong","xf_huangquan","xf_tangzi","xf_sufei","liuqi", + "lifeng","lingcao","sunru","re_jikang","zhuling", + "sp_caiwenji","caoang","sp_caoren","fuwan","guanyinping","jsp_guanyu","huangjinleishi", + "sp_jiangwei","litong","mayunlu","sp_pangde","wanglang","xiahouba", + "yuanshu","yuejin","sp_zhangfei","zhugejin","panfeng","chenlin", + "jiling","mateng","tw_dingfeng","kaisa", + ], + singlePile:[ + ['spade',5,'sha'], + ['spade',7,'sha'], + ['spade',8,'sha'], + ['spade',10,'sha'], + ['heart',10,'sha'], + ['heart',11,'sha'], + ['club',4,'sha'], + ['club',5,'sha'], + ['club',6,'sha'], + ['club',8,'sha'], + ['club',9,'sha'], + ['club',10,'sha'], + ['club',11,'sha'], + ['diamond',6,'sha'], + ['diamond',9,'sha'], + ['diamond',11,'sha'], + ['heart',2,'shan'], + ['heart',5,'shan'], + ['diamond',2,'shan'], + ['diamond',3,'shan'], + ['diamond',7,'shan'], + ['diamond',8,'shan'], + ['diamond',10,'shan'], + ['diamond',11,'shan'], + ['heart',3,'tao'], + ['heart',4,'tao'], + ['heart',9,'tao'], + ['diamond',12,'tao'], + ['club',12,'bingliang'], + ['spade',3,'guohe'], + ['diamond',12,'guohe'], + ['club',3,'guohe'], + ['club',1,'juedou'], + ['spade',1,'juedou'], + ['heart',6,'lebu'], + ['spade',1,'nanman'], + ['club',7,'shuiyanqijunx'], + ['spade',4,'shunshou'], + ['spade',11,'shunshou'], + ['diamond',4,'shunshou'], + ['heart',1,'wanjian'], + ['heart',5,'wuxie'], + ['club',5,'wuxie'], + ['heart',7,'wuzhong'], + ['heart',8,'wuzhong'], + ['diamond',5,'guanshi'], + ['spade',9,'hanbing'], + ['spade',6,'qinggang'], + ['spade',12,'zhangba'], + ['diamond',1,'zhuge'], + ['spade',2,'bagua'], + ['club',2,'renwang'], + ], + characterSingle:{ + caocao:['male','wei',4,['jianxiong'],['zhu']], + simayi:['male','wei',3,['fankui','guicai']], + xiahoudun:['male','wei',4,['ganglie']], + zhangliao:['male','wei',4,['retuxi']], + xuzhu:['male','wei',4,['luoyi','xiechan']], + guojia:['male','wei',3,['tiandu','yiji']], + zhenji:['female','wei',3,['luoshen','sgqingguo']], + liubei:['male','shu',4,['sgrenwang'],['zhu']], + guanyu:['male','shu',4,['wusheng','huwei']], + zhangfei:['male','shu',4,['paoxiao']], + zhugeliang:['male','shu',3,['guanxing','kongcheng']], + zhaoyun:['male','shu',4,['longdan']], + machao:['male','shu',4,['xiaoxi','tieji']], + huangyueying:['female','shu',3,['jizhi','cangji']], + sunquan:['male','wu',4,['sgzhiheng'],['zhu']], + ganning:['male','wu',4,['qixi']], + lvmeng:['male','wu',4,['shenju','botu']], + huanggai:['male','wu',4,['kurou']], + zhouyu:['male','wu',3,['yingzi','fanjian']], + daqiao:['female','wu',3,['guose','wanrong']], + luxun:['male','wu',3,['qianxun','lianying']], + sunshangxiang:['female','wu',3,['xiaoji','yinli']], + //huatuo:['male','qun',3,['qingnang','jijiu']], + lvbu:['male','qun',4,['wushuang']], + diaochan:['female','qun',3,['pianyi','biyue']], + + xiahouyuan:['male','wei',4,['shensu','suzi']], + old_caoren:['male','wei',4,['jushou']], + huangzhong:['male','shu',4,['liegong']], + weiyan:['male','shu',4,['sgkuanggu']], + xiaoqiao:['female','wu',3,['tianxiang','hongyan']], + old_zhoutai:['male','wu',4,['gzbuqu']], + zhangjiao:['male','qun',3,['leiji','guidao'],['zhu']], + + dianwei:['male','wei',4,['qiangxi']], + yanwen:['male','qun',4,['shuangxiong']], + pangde:['male','qun',4,['xiaoxi','mengjin']], + + menghuo:['male','shu',4,['manyi','zaiqi']], + zhurong:['female','shu',4,['manyi','lieren']], + xuhuang:['male','wei',4,['sgduanliang']], + sunjian:['male','wu',4,['gzyinghun']], + + jiangwei:['male','shu',4,['tiaoxin']], + + hejin:['male','qun',4,['mouzhu','yanhuo']], + hansui:['male','qun',4,['xiaoxi','niluan']], + niujin:['male','wei',4,['cuorui','liewei']], + }, + startBefore:function(){ + + }, + onreinit:function(){ + _status.mode=_status.connectMode?lib.configOL.single_mode:get.config('single_mode'); + if(_status.mode!='normal') return; + for(var i in lib.characterSingle){ + lib.character[i]=lib.characterSingle[i]; + if(!lib.character[i][4]){ + lib.character[i][4]=[]; + } + } + for(var j in lib.singleTranslate) lib.translate[j]=lib.singleTranslate[j]; + }, + start:function(){ + "step 0" + var playback=localStorage.getItem(lib.configprefix+'playback'); + if(playback){ + ui.create.me(); + ui.arena.style.display='none'; + ui.system.style.display='none'; + _status.playback=playback; + localStorage.removeItem(lib.configprefix+'playback'); + var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); + store.get(parseInt(playback)).onsuccess=function(e){ + if(e.target.result){ + game.playVideoContent(e.target.result.video); + } + else{ + alert('播放失败:找不到录像'); + game.reload(); + } + } + event.finish(); + } + else if(!_status.connectMode){ + game.prepareArena(2); + } + "step 1" + if(_status.connectMode){ + game.waitForPlayer(function(){ + lib.configOL.number=2; + }); + } + "step 2" + _status.mode=_status.connectMode?lib.configOL.single_mode:get.config('single_mode'); + if(_status.mode=='normal'){ + lib.card.list=lib.singlePile.slice(0); + game.fixedPile=true; + game.broadcastAll(function(singleTranslate,characterSingle){ + _status.mode='normal'; + for(var j in singleTranslate) lib.translate[j]=singleTranslate[j]; + _status.characterlist=[]; + for(var i in characterSingle){ + lib.character[i]=characterSingle[i]; + if(!lib.character[i][4]){ + lib.character[i][4]=[]; + } + _status.characterlist.push(i); + } + },lib.singleTranslate,lib.characterSingle); + } + else if(_status.mode=='changban'){ + _status.characterlist=[]; + for(var i=0;i'; + for(var i=0;i'; + } + } + } + lib.config.gameRecord.single.str=str; + game.saveConfig('gameRecord',lib.config.gameRecord); + } + }, + getState:function(){ + var state={}; + for(var i in lib.playerOL){ + var player=lib.playerOL[i]; + state[i]={identity:player.identity}; + } + return state; + }, + updateState:function(state){ + for(var i in state){ + var player=lib.playerOL[i]; + if(player){ + player.identity=state[i].identity; + } + } + }, + getRoomInfo:function(uiintro){ + if(lib.configOL.bannedcards.length){ + uiintro.add('
禁用卡牌:'+get.translation(lib.configOL.bannedcards)); + } + uiintro.style.paddingBottom='8px'; + }, + getVideoName:function(){ + var str=get.translation(game.me.name); + if(game.me.name2){ + str+='/'+get.translation(game.me.name2); + } + var name=[ + str, + get.translation(_status.mode+2)+' - '+lib.translate[game.me.identity+'2'] + ]; + return name; + }, + showIdentity:function(){}, + checkResult:function(){ + game.over(game.me.isAlive()); + }, + checkOnlineResult:function(player){ + return player.isAlive(); + }, + chooseCharacterDianjiang:function(){ + var next=game.createEvent('chooseCharacter',false); + next.showConfig=true; + next.setContent(function(){ + "step 0" + ui.arena.classList.add('choose-character'); + lib.init.onfree(); + "step 1" + game.me.chooseControl('先手','后手').prompt='请选择自己的行动顺序'; + "step 2" + var map=result.control=='先手'?['zhu','fan']:['fan','zhu']; + game.me.identity=map[0]; + game.me.next.identity=map[1]; + game.me.showIdentity(); + game.me.next.showIdentity(); + "step 3" + event.flipassign=true; + event.videoId=lib.status.videoId++; + var list=[]; + for(var i in lib.character){ + if(lib.filter.characterDisabled(i)) continue; + list.push(i); + } + _status.characterlist=list; + var filter=function(name){ + return !_status.characterlist.contains(name); + }; + var dialog=ui.create.characterDialog('heightset',filter).open(); + dialog.videoId=event.videoId; + + game.me.chooseButton(true).set('ai',function(button){ + return Math.random(); + }).set('dialog',event.videoId); + "step 4" + game.me.init(result.links[0]); + game.me.chooseButton(true).set('ai',function(button){ + return Math.random(); + }).set('dialog',event.videoId); + "step 5" + game.me.next.init(result.links[0]); + setTimeout(function(){ + ui.arena.classList.remove('choose-character'); + },500); + }); + }, + chooseCharacter:function(){ + if(_status.mode=='dianjiang'){ + game.chooseCharacterDianjiang(); + return; + } + var next=game.createEvent('chooseCharacter',false); + next.showConfig=true; + next.setContent(function(){ + "step 0" + ui.arena.classList.add('choose-character'); + var num=[0,1].randomGet(); + game.players[num].identity='zhu'; + game.players[1-num].identity='fan'; + game.broadcastAll(function(p,t){ + p.enemy=t;t.enemy=p; + },game.players[0],game.players[1]); + for(var i=0;i=12; + })&&get.effect(target,{name:'juedou'},player,player)>0) return -1; + return 0; + }, + }, + }, + }, + huwei:{ + audio:2, + trigger:{ + player:'enterGame', + global:'gameDrawAfter', + }, + direct:true, + content:function(){ + player.chooseUseTarget('shuiyanqijunx',get.prompt('huwei'),'视为使用一张【水淹七军】').logSkill='huwei'; + }, + }, + sgkuanggu:{ + audio:'kuanggu', + trigger:{source:'damageSource'}, + frequent:true, + filter:function(event,player){ + return player.isDamaged(); + }, + content:function(){ + 'step 0' + player.judge(function(result){ + return get.color(result)=='black'?2:-2; + }); + 'step 1' + if(result.bool==true) player.recover(); + }, + }, + suzi:{ + audio:2, + trigger:{global:'loseAfter'}, + filter:function(event,player){ + if(event.getParent().name!='die') return false; + for(var i=0;i0; + }, + forceDie:true, + skillAnimation:true, + animationColor:'orange', + content:function(){ + var cards=player.getCards('e'); + player.cangji_yozuru=cards; + player.lose(cards,ui.special); + player.addSkill('cangji_yozuru'); + }, + subSkill:{ + yozuru:{ + sub:true, + charlotte:true, + superCharlotte:true, + trigger:{player:'enterGame'}, + forced:true, + popup:false, + //onremove:true, + content:function(){ + var cards=player.cangji_yozuru.slice(0); + for(var i=0;i游戏规则
  • 选将阶段
    双方在游戏开始时由系统随机分配身份。分配到先手身份的玩家优先出牌,分配到后手身份的玩家优先选将。
    双方各自随机获得3名暗置武将,同时从将池中随机选出6名明置武将,由后手玩家开始,按照一次1张-2张-2张-1张的顺序,轮流选择获得明置武将。之后双方各从自己的6名武将中选择2名分别作为主将和副将进行游戏。
  • 胜利条件
    对方死亡。'+ + '
  • 双将规则
    双将主将决定角色的性别和势力,体力上限为主副将体力上限的平均值,向下取整。体力上限为3的角色可在游戏开始后更换一次起始手牌。
  • 牌堆
    牌堆中移除【木牛流马】【闪电】,♣花色的【藤甲】和【无懈可击 ♦️Q】️
', + } + }; +});