diff --git a/card/standard.js b/card/standard.js index 0bc73c609..362e13ec1 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1693,7 +1693,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ onremove:true, trigger:{ player:['damage','damageCancelled','damageZero'], - target:['shaMiss','useCardToExcluded','shaEnd'], + source:['damage','damageCancelled','damageZero'], + target:['shaMiss','useCardToExcluded','useCardToEnd'], global:['useCardEnd'], }, charlotte:true, diff --git a/character/diy.js b/character/diy.js index 9ef16aaef..77da88fff 100755 --- a/character/diy.js +++ b/character/diy.js @@ -71,13 +71,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ns_yuanxi:['male','qun',4,['nsshengyan','nsdaizhan']], ns_caoshuang:['male','wei',4,['nsjiquan','nsfuwei']], - ns_lijue:['male','qun','4/6',['nsfeixiong','nscesuan']], - ns_zhangji:['male','qun',4,['nslulve']], - ns_fanchou:['male','qun',4,['nsyangwu']], - ns_jiaxu:['male','qun',3,['nsyice','luanwu']], ns_zhangwei:['female','shu',3,['nsqiyue','nsxuezhu']], - ns_chendao:['male','shu',4,['nsjianglie']], - yj_caoang:['male','wei',4,['yjxuepin']], diy_wenyang:['male','wei','4/6',['lvli','choujue']], // diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']], // diy_hanlong:['male','wei',4,['siji','ciqiu']], @@ -176,7 +170,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao"], diy_default:["diy_feishi","diy_liuyan","diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","diy_liufu","diy_xizhenxihong","diy_liuzan","diy_zaozhirenjun","diy_yangyi","diy_tianyu"], diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori","key_kyoko","key_shizuru","key_shiorimiyuki","key_miki","key_shiori","key_kaori","sp_key_yuri","key_akiko","key_abyusa","key_godan","key_yuu","key_ryoichi","key_kotori","key_jojiro","key_shiroha","key_shizuku"], - diy_official:["ns_chendao","yj_caoang","ns_jiaxu","ns_lijue","ns_zhangji","ns_fanchou"], diy_trashbin:['old_jiakui','ol_guohuai','junk_zhangrang'], }, }, @@ -6541,230 +6534,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, - nsyangwu:{ - enable:'phaseUse', - usable:1, - filterCard:{suit:'heart'}, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>player.countCards('h'); - }, - filter:function(event,player){ - var info=lib.skill.nsyangwu; - return player.countCards('h',info.filterCard)&&game.hasPlayer(function(target){ - return info.filterTarget(null,player,target); - }); - }, - check:function(card){ - var num=0; - var player=_status.event.player; - game.countPlayer(function(current){ - if(current!=player&&get.attitude(player,current)<0) num=Math.max(num,current.countCards('h')-player.countCards('h')); - }); - return Math.ceil((num+1)/2)*2+4-get.value(card); - }, - content:function(){ - var num=Math.ceil((target.countCards('h')-player.countCards('h'))/2); - if(num) player.gainPlayerCard(target,true,'h',num,'visible'); - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - return player.countCards('h')-target.countCards('h'); - }, - }, - }, - }, - nslulve:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.countCards('e')>0&¤t.countCards('e')<=player.countCards('he'); - }); - }, - filterCard:function(){ - if(ui.selected.targets.length) return false; - return true; - }, - position:'he', - selectCard:[1,Infinity], - complexSelect:true, - complexCard:true, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('e')>0&&ui.selected.cards.length==target.countCards('e'); - }, - check:function(card){ - var player=_status.event.player; - if(game.hasPlayer(function(current){ - return current!=player&¤t.countCards('e')>0&&ui.selected.cards.length==current.countCards('e')&&get.damageEffect(current,player,player)>0; - })) return 0; - switch(ui.selected.cards.length){ - case 0:return 8-get.value(card); - case 1:return 6-get.value(card); - case 2:return 3-get.value(card); - default:return 0; - } - }, - content:function(){ - target.damage('nocard'); - }, - ai:{ - damage:true, - order:2, - result:{ - target:function(player,target){ - return get.damageEffect(target,player); - } - }, - expose:0.3 - } - }, - nsfeixiong:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('h')>0&&game.hasPlayer(function(current){ - return current!=player&&player.canCompare(current); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('nsfeixiong'),function(card,player,target){ - return player!=target&&player.canCompare(target); - }).set('ai',function(target){ - var player=_status.event.player; - var hs=player.getCards('h').sort(function(a,b){ - return b.number-a.number; - }); - var ts=target.getCards('h').sort(function(a,b){ - return b.number-a.number; - }); - if(!hs.length||!ts.length) return 0; - if(hs[0].number>ts[0].number) return get.damageEffect(target,player,player); - return 0; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('nsfeixiong',target); - player.chooseToCompare(target); - } - else event.finish(); - 'step 2' - if(!result.tie){ - var targets=[player,target]; - if(result.bool) targets.reverse(); - targets[0].damage(targets[1]); - } - }, - }, - nscesuan:{ - trigger:{player:'damageBegin3'}, - forced:true, - content:function(){ - 'step 0' - trigger.cancel(); - event.lose=player.loseMaxHp(); - 'step 1' - if(event.lose&&event.lose.loseHp) player.draw(); - }, - ai:{ - filterDamage:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.player){ - if(arg.player.hasSkillTag('jueqing',false,player)) return false; - } - }, - }, - }, - nsyice:{ - trigger:{ - player:'loseAfter', - global:'cardsDiscardAfter', - }, - filter:function(event,player){ - if(event.name=='lose'){ - if(event.type!='discard') return false; - } - else{ - var evt=event.getParent(); - if(evt.name!='orderingDiscard'||!evt.relatedEvent||evt.relatedEvent.player!=player||!['useCard','respond'].contains(evt.relatedEvent.name)) return false; - } - return (event.cards2||event.cards).filterInD('d').length>0; - }, - forced:true, - content:function(){ - 'step 0' - var evt=trigger.getParent().relatedEvent; - if((trigger.name=='discard'&&!trigger.delay)||evt&&evt.name=='respond') game.delayx(); - 'step 1' - var cards=(trigger.cards2||trigger.cards).filterInD('d'); - player.$gain2(cards); - if(cards.length==1) event._result={bool:true,links:cards}; - else{ - var dialog=['遗策:选择要放置的卡牌','
(从左到右为从旧到新,后选择的后置入)
',cards]; - var cards2=player.getStorage('nsyice'); - if(cards2.length){ - dialog.push('
原有“策”
'); - dialog.push(cards2); - } - player.chooseButton(dialog,true,cards.length).set('filterButton',function(button){ - return _status.event.cards.contains(button.link); - }).set('cards',cards); - } - 'step 2' - game.cardsGotoSpecial(result.links); - player.markAuto('nsyice',result.links); - game.delayx(); - 'step 3' - var storage=player.storage.nsyice; - var bool=false; - for(var i=0;ii;j--){ - if(get.number(storage[i])==get.number(storage[j])){ - bool=true; - break; - } - } - if(bool) break; - } - if(bool){ - event.cards=storage.slice(0); - event.cards=storage.splice(i,j-i+1); - player.unmarkAuto('nsyice',event.cards); - } - else event.finish(); - 'step 4' - var cardsx=[]; - cardsx.push(cards.shift()); - cardsx.push(cards.pop()); - if(cards.length) player.gain(cards,'gain2'); - event.cards=cardsx; - 'step 5' - player.chooseButton(['将一张牌置于牌堆顶,将另一张牌置于牌堆底',cards],true); - 'step 6' - ui.cardPile.insertBefore(result.links[0].fix(),ui.cardPile.firstChild); - cards.remove(result.links[0]); - ui.cardPile.appendChild(cards[0].fix()); - game.updateRoundNumber(); - if(_status.dying.length) event.finish(); - 'step 7' - player.chooseTarget('对一名角色造成1点伤害',true).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - 'step 8' - if(result.bool){ - var target=result.targets[0]; - player.line(target); - target.damage('nocard'); - } - }, - marktext:'策', - intro:{content:'cards'}, - }, junktaoluan:{ audio:'taoluan', enable:'chooseToUse', @@ -7015,67 +6784,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, junktaoluan_backup:{}, - yjxuepin:{ - enable:'phaseUse', - usable:1, - filterTarget:function(event,player,target){ - return player.inRange(target); - }, - content:function(){ - 'step 0' - player.loseHp(); - 'step 1' - if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,2,'he',true); - else event.finish(); - 'step 2' - if(result.bool&&result.cards.length==2&&get.type2(result.cards[0],result.cards[0].original=='h'?target:false)==get.type2(result.cards[1],result.cards[1].original=='h'?target:false)) player.recover(); - }, - ai:{ - order:4, - result:{ - player:function(player,target){ - if(player.hp==1) return -4; - if(target.countCards('e')>1) return 0; - if(player.hp>2||target.countCards('h')>1) return -0.5; - return -2; - }, - target:function(player,target){ - return -2; - }, - }, - }, - }, - nsjianglie:{ - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return event.card.name=='sha'&&event.target.countCards('h')>0; - }, - check:function(event,player){ - return get.attitude(player,event.target)<0; - }, - logTarget:'target', - content:function(){ - 'step 0' - trigger.target.showHandcards(); - 'step 1' - var cards=trigger.target.getCards('h'); - var list=[]; - for(var i=0;i=get.value(player.getCards('h',{color:'black'}))) return 'black'; - return 'red'; - }); - } - 'step 2' - trigger.target.discard(trigger.target.getCards('h',{color:result.control})); - }, - }, + ns_chuanshu:{ audio:["xingshuai",2], trigger:{ @@ -11753,6 +11462,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return str; }, }, + characterReplace:{ + key_yuri:['key_yuri','sp_key_yuri'], + kanade:['sp_key_kanade','kanade'], + }, translate:{ diy_liufu:'刘馥', diy_xizhenxihong:'习珍习宏', @@ -12238,12 +11951,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nszhihuang_info:'每回合限一次,当主公使用牌时,你可以移去一张“威”,然后获得此牌。锁定技,若你的手牌数大于主公,则你使用牌造成的伤害+1。', diy_wenyang:'文鸯', - yj_caoang:'SP曹昂', - yjxuepin:'血拼', - yjxuepin_info:'出牌阶段限一次,你可以选择攻击范围内的一名角色并失去1点体力。你弃置其两张牌。若这两张牌类型相同,你回复1点体力。', - ns_chendao:'SP陈到', - nsjianglie:'将烈', - nsjianglie_info:'当你使用【杀】指定目标后,你可以令其展示所有手牌,然后弃置其中一种颜色的牌。', ns_zhangwei:'张葳', nsqiyue:'骑钺', nsqiyue_info:'锁定技,当有角色的武将牌状态改变后,你摸一张牌。', @@ -12480,24 +12187,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ns_caimao:'蔡瑁', nsdingzhou:'定州', nsdingzhou_info:'出牌阶段限一次,你可以选择一名区域内有牌的其他角色。你随机获得其区域内的一张牌,然后摸一张牌。若你以此法获得了两张颜色不同的牌,则你失去1点体力。', - ns_jiaxu:'贾诩', - nsyice:'遗策', - nsyice_info:'锁定技,当你使用/打出/弃置的牌进入弃牌堆后,你将这些牌以任意顺序置于你的武将牌上,称为“策”。若这些“策”中有点数相同的牌,则你获得这两张牌中的所有牌,将这两张牌置于牌堆两端。若场上没有处于濒死状态的角色,则你对一名角色造成1点伤害。', - ns_lijue:'李傕', - ns_zhangji:'张济', - nsfeixiong:'飞熊', - nsfeixiong_info:'出牌阶段开始时,你可以和一名其他角色拼点。赢的角色对没赢的角色造成1点伤害。', - nscesuan:'策算', - nscesuan_info:'锁定技,当你受到伤害时,你防止此伤害并失去一点体力上限。若你因以此法失去体力上限导致体力值减少,则你摸一张牌。', - nslulve:'掳掠', - nslulve_info:'出牌阶段限一次,你可以弃置X张牌并选择一名装备区内有牌的其他角色,然后对其造成1点伤害(X为其装备区内的牌数)。', - ns_fanchou:'樊稠', - nsyangwu:'扬武', - nsyangwu_info:'出牌阶段限一次,你可以弃置一张♥手牌并选择一名手牌数大于你的其他角色。你观看其手牌并获得其中的X张牌(X为其与你手牌数之差的一半且向上取整)。', diy_tieba:'吧友设计', diy_default:'常规', diy_key:'论外', - diy_official:'其他官方武将', diy_yijiang:'设计比赛2020', diy_fakenews:'假新闻', diy_trashbin:'垃圾桶', diff --git a/character/extra.js b/character/extra.js index fd65840e4..33b9aa33c 100755 --- a/character/extra.js +++ b/character/extra.js @@ -15,6 +15,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ extra_key:['key_kagari','key_shiki'], extra_ol:['ol_zhangliao','shen_caopi','shen_zhenji'], extra_offline:['shen_diaochan'], + extra_mini:['mini_zhugeliang','mini_lvbu'], }, }, character:{ @@ -39,6 +40,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ol_zhangliao:['male','shen',4,['olduorui','olzhiti'],['wei']], shen_caopi:['male','shen',5,['chuyuan','dengji'],['wei']], shen_zhenji:['female','shen',4,['shenfu','qixian'],['wei']], + + mini_zhugeliang:['male','shen',3,['qixing','minikuangfeng','minidawu'],['shu']], + mini_lvbu:['male','shen',6,['miniwuqian','minishenfen']], }, characterIntro:{ shen_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。', @@ -49,12 +53,190 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterTitle:{ //shen_ganning:"体力上限:6", }, + characterReplace:{ + shen_zhangliao:['shen_zhangliao','ol_zhangliao'], + shen_zhugeliang:['shen_zhugeliang','mini_zhugeliang'], + shen_lvbu:['shen_lvbu','mini_lvbu'], + }, characterFilter:{ shen_diaochan:function(mode){ return mode=='identity'||mode=='doudizhu'||mode=='single'||(mode=='versus'&&_status.mode!='standard'&&_status.mode!='three'); }, }, skill:{ + miniwuqian:{ + audio:'wuqian', + trigger:{ + player:'useCardToPlayered', + }, + filter:function(event,player){ + return (event.card.name=='sha'||event.card.name=='juedou')&&player==_status.currentPhase&& + player.getHistory('useCard',function(evt){ + return (evt.card.name=='sha'||evt.card.name=='juedou'); + }).indexOf(event.getParent())==0; + }, + forced:true, + logTarget:'target', + content:function(){ + trigger.target.addTempSkill('qinggang2'); + trigger.target.storage.qinggang2.add(trigger.card); + if(trigger.card.name=='sha'){ + var id=trigger.target.playerid; + var map=trigger.getParent().customArgs; + if(!map[id]) map[id]={}; + if(typeof map[id].shanRequired=='number'){ + map[id].shanRequired++; + } + else{ + map[id].shanRequired=2; + } + } + else{ + var id=trigger.target.playerid; + var idt=trigger.target.playerid; + var map=trigger.getParent().customArgs; + if(!map[idt]) map[idt]={}; + if(!map[idt].shaReq) map[idt].shaReq={}; + if(!map[idt].shaReq[id]) map[idt].shaReq[id]=1; + map[idt].shaReq[id]++; + } + }, + ai:{ + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.name=='sha'&&!player.countUsed('sha')) return true; + return false; + } + } + }, + minishenfen:{ + audio:'ol_shenfen', + enable:'phaseUse', + skillAnimation:true, + animationColor:'metal', + limited:true, + content:function(){ + "step 0" + player.awakenSkill('minishenfen'); + player.loseHp(3); + event.delay=false; + event.targets=game.filterPlayer(); + event.targets.remove(player); + event.targets.sort(lib.sort.seat); + player.line(event.targets,'green'); + event.targets2=event.targets.slice(0); + event.targets3=event.targets.slice(0); + "step 1" + if(event.targets2.length){ + event.targets2.shift().damage('nocard'); + event.redo(); + } + "step 2" + if(event.targets.length){ + event.current=event.targets.shift() + if(event.current.countCards('e')) event.delay=true; + event.current.discard(event.current.getCards('e')).delay=false; + } + "step 3" + if(event.delay) game.delay(0.5); + event.delay=false; + if(event.targets.length) event.goto(2); + "step 4" + if(event.targets3.length){ + var target=event.targets3.shift(); + target.chooseToDiscard(4,'h',true).delay=false; + if(target.countCards('h')) event.delay=true; + } + "step 5" + if(event.delay) game.delay(0.5); + event.delay=false; + if(event.targets3.length) event.goto(4); + }, + ai:{ + order:10, + result:{ + player:function(player){ + if(player.hp<5||player.hasUnknown()) return 0; + return game.countPlayer(function(current){ + if(current!=player){ + return get.sgn(get.damageEffect(current,player,player)); + } + }); + } + } + } + }, + minikuangfeng:{ + audio:'kuangfeng', + trigger:{player:'phaseUseEnd'}, + direct:true, + filter:function(event,player){ + return player.getStorage('qixing').length>0; + }, + content:function(){ + 'step 0' + player.chooseTarget([1,Math.min(game.players.length,player.getStorage('qixing').length)],get.prompt2('minikuangfeng')).set('ai',function(target){ + var player=_status.event.player; + var eff=get.damageEffect(target,player,player); + if(target.hp==1||!ui.selected.targets.length) return eff; + return 0; + }); + 'step 1' + if(result.bool){ + event.targets=result.targets; + player.chooseButton(['请选择要移去的“星”',player.getStorage('qixing')],true,result.targets.length).set('ai',function(button){ + return -get.value(button.link); + }); + } + else event.finish(); + 'step 2' + var cards=result.links; + player.logSkill('minikuangfeng',targets); + player.$throw(cards,2000); + player.unmarkAuto('qixing',cards); + game.cardsDiscard(cards); + for(var i of targets) i.damage(); + }, + }, + minidawu:{ + audio:'dawu', + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.getStorage('qixing').length>0; + }, + content:function(){ + 'step 0' + player.chooseButton([get.prompt('minidawu'),player.getStorage('qixing')]).set('ai',function(button){ + return 1/Math.max(0.01,get.value(button.link)); + }); + 'step 1' + if(result.bool){ + var cards=result.links; + player.logSkill('minidawu'); + player.$throw(cards,2000); + player.unmarkAuto('qixing',cards); + game.cardsDiscard(cards); + player.addTempSkill('minidawu2',{player:'phaseBegin'}); + } + }, + }, + minidawu2:{ + audio:'dawu', + trigger:{player:'damageBegin3'}, + forced:true, + charlotte:true, + content:function(){ + trigger.num--; + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')&&(card.name!='sha'||!player.hasSkill('jiu'))) return 'zerotarget'; + }, + }, + }, + }, meihun:{ audio:2, trigger:{ @@ -959,17 +1141,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 2" if(event.targets.length){ event.current=event.targets.shift() + if(event.current.countCards('e')) event.delay=true; event.current.discard(event.current.getCards('e')).delay=false; } "step 3" - game.delay(0.5); + if(event.delay) game.delay(0.5); + event.delay=false; if(event.targets.length) event.goto(2); "step 4" if(event.targets3.length){ - event.targets3.shift().chooseToDiscard(4,'h',true).delay=false; + var target=event.targets3.shift(); + target.chooseToDiscard(4,'h',true).delay=false; + if(target.countCards('h')) event.delay=true; } "step 5" - game.delay(0.5); + if(event.delay) game.delay(0.5); + event.delay=false; if(event.targets3.length) event.goto(4); "step 6" player.turnOver(); @@ -3608,6 +3795,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huoxin_control:'惑心', huoxin:'惑心', huoxin_info:'出牌阶段限一次,你可以展示两张花色相同的手牌并分别交给两名其他角色,然后令这两名角色拼点,没赢的角色获得1个“魅惑”标记。拥有2个或更多“魅惑”的角色回合即将开始时,该角色移去其所有“魅惑”,此回合改为由你操控。', + mini_zhugeliang:'SP神诸葛亮', + minikuangfeng:'狂风', + minikuangfeng_info:'出牌阶段结束时,你可选择任意名角色并将等量的“星”置入弃牌堆,然后对这些角色各造成1点伤害。', + minidawu:'大雾', + minidawu2:'大雾', + minidawu_info:'结束阶段,你可以将一张“星”置入弃牌堆。当你于下回合开始前受到伤害时,此伤害-1。', + mini_lvbu:'SP神吕布', + miniwuqian:'无前', + miniwuqian_info:'锁定技,当你于回合内使用【杀】或【决斗】指定目标后,若此牌是你本回合内使用的第一张【杀】或【决斗】,则你令其每次响应此牌需要使用的【闪】或打出的【杀】的数量+1,且令其防具无效直到此牌对其结束。', + minishenfen:'神愤', + minishenfen_info:'限定技,出牌阶段,你可以失去3点体力,对所有其他角色各造成1点伤害。这些角色弃置装备区内的所有牌,然后弃置四张手牌。', key_kagari:'篝', kagari_zongsi:'纵丝', @@ -3628,6 +3826,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ extra_key:'神话再临·论外', extra_ol:'神话再临OL', extra_offline:'神话再临·线下', + extra_mini:'欢乐三国杀', }, }; }); diff --git a/character/mobile.js b/character/mobile.js index 6f7621e4b..73be2b5e0 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -6056,6 +6056,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return '你可以将两张牌(其中至少一张为基本牌)当做任意基本牌使用或打出。'; }, }, + characterReplace:{ + caochun:['caochun','old_caochun'], + majun:['majun','old_majun'], + zhanggong:['zhanggong','re_zhanggong'], + baosanniang:['xin_baosanniang','re_baosanniang','baosanniang'], + heqi:['re_heqi','heqi'], + weiwenzhugezhi:['weiwenzhugezhi','re_weiwenzhugezhi'], + xugong:['xugong','re_xugong'], + liuzan:['re_liuzan','liuzan'], + sufei:['sp_sufei','xf_sufei'], + jiakui:['jiakui','old_jiakui'], + }, translate:{ liuzan:'手杀留赞', re_sp_zhugeliang:"手杀卧龙", diff --git a/character/rank.js b/character/rank.js index 4aa9b0b58..33afc8eca 100644 --- a/character/rank.js +++ b/character/rank.js @@ -253,6 +253,7 @@ window.noname_character_rank={ 'key_shiroha', 'key_shiori', 'key_iwasawa', + 'mini_zhugeliang', ], am:[ 'diy_caiwenji', @@ -435,6 +436,7 @@ window.noname_character_rank={ 'ns_caoshuang', 'key_shizuku', 'luyusheng', + 'mini_lvbu', ], bp:[ 'chess_diaochan', @@ -615,6 +617,8 @@ window.noname_character_rank={ 'nashime', 'ns_huangchengyan', 'ns_yuanxi', + 'mini_sunquan', + 'mini_zuoci', ], b:[ 'diy_feishi', @@ -1217,6 +1221,9 @@ window.noname_character_rank={ 'liubian', 'simashi', 'yanghuiyu', + 'mini_zuoci', + 'mini_lvbu', + 'mini_zhugeliang', 'key_haruko', 'key_akiko', 'key_sunohara', @@ -1483,6 +1490,7 @@ window.noname_character_rank={ 'ns_zhangji', 'ns_fanchou', 'xin_zhuran', + 'mini_sunquan', ], junk:[ 'sunshao', diff --git a/character/refresh.js b/character/refresh.js index 8e11618bc..d6087ec11 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -5452,14 +5452,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.judgeResult.color=='black') event.getParent().orderingCards.remove(card); }); "step 1" - if(result.judge>0){ + if(result.bool){ event.cards.push(result.card); player.chooseBool('是否再次发动【洛神】?').set('frequentSkill','reluoshen'); } else{ for(var i=0;i阴:出牌阶段限一次,你可以将一张牌交给一名手牌数最多的角色,然后对其造成一点伤害,若该角色因此死亡,则你可以令一名角色将手牌摸至四张。阳:其他角色对你造成伤害后,你可以观看该角色的手牌,然后交给其一张牌,当前角色回合结束时,若此牌仍在该角色的区域内,你将手牌摸至四张。'; }, }, + characterReplace:{ + caoren:['caoren','sp_caoren','jsp_caoren','old_caoren'], + xiahouyuan:['ol_xiahouyuan','re_xiahouyuan','xiahouyuan'], + huangzhong:['re_huangzhong','huangzhong'], + weiyan:['ol_weiyan','re_weiyan','weiyan'], + zhoutai:['zhoutai','old_zhoutai'], + xiaoqiao:['ol_xiaoqiao','re_xiaoqiao','xiaoqiao'], + yuji:['xin_yuji','re_yuji','yuji'], + zhangjiao:['re_zhangjiao','sp_zhangjiao','zhangjiao'], + dianwei:['dianwei','re_dianwei'], + xunyu:['re_xunyu','xunyu'], + sp_zhugeliang:['ol_sp_zhugeliang','re_sp_zhugeliang','sp_zhugeliang'], + pangtong:['ol_pangtong','re_jsp_pangtong','sp_pangtong','re_pangtong','pangtong'], + taishici:['re_taishici','sp_taishici','taishici'], + re_yuanshao:['ol_yuanshao','re_yuanshao','xin_yuanshao'], + pangde:['ol_pangde','sp_pangde','re_pangde','pangde'], + yanwen:['re_yanwen','yanwen'], + caopi:['caopi','re_caopi'], + xuhuang:['re_xuhuang','yj_xuhuang','xuhuang'], + menghuo:['re_menghuo','menghuo'], + zhurong:['re_zhurong','zhurong'], + sunjian:['ol_sunjian','re_sunjian','sunjian'], + jiaxu:['jiaxu','ns_jiaxu'], + dongzhuo:['ol_dongzhuo','re_dongzhuo','dongzhuo'], + dengai:['re_dengai','ol_dengai','dengai'], + zhanghe:['zhanghe','sp_zhanghe','yj_zhanghe'], + jiangwei:['re_jiangwei','sp_jiangwei','jiangwei'], + liushan:['ol_liushan','re_liushan','liushan'], + sunce:['re_sunben','re_sunce','sunce'], + zhangzhang:['re_zhangzhang','zhangzhang'], + zuoci:['re_zuoci','mini_zuoci','zuoci'], + caiwenji:['re_caiwenji','sp_caiwenji','caiwenji'], + xuyou:['sp_xuyou','xuyou'], + guanqiujian:['guanqiujian','re_guanqiujian','old_guanqiujian'], + chendao:['chendao','ns_chendao'], + zhugezhan:['zhugezhan','old_zhugezhan'], + }, translate:{ "feichu_equip1":"已废除", "feichu_equip1_info":"武器栏已废除", diff --git a/character/sp.js b/character/sp.js index 19b45cb27..1eafe19fc 100755 --- a/character/sp.js +++ b/character/sp.js @@ -5853,7 +5853,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ if(!player.hasZhuSkill('shichou'))return false; if(player.countCards('he')<2) return false; - return !player.storage.shichou; + return game.hasPlayer(function(current){ + return current!=player&¤t.group=='shu'; + }); }, init:function(player){ if(player.hasZhuSkill('shichou')){ @@ -14384,7 +14386,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:get.name(judging), nature:get.nature(judging), suit:suit, - number:2, + number:5, }) }; list.sort(function(a,b){ @@ -14403,7 +14405,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.log(player,'将判定结果改为了','#y'+get.translation(result.control+2)+5); trigger.fixedResult={ suit:result.control, - color:get.color({name:result.control}), + color:get.color({suit:result.control}), number:5, }; } @@ -14680,6 +14682,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return str; }, }, + characterReplace:{ + caoshuang:['caoshuang','ns_caoshuang'], + caoang:['caoang','yj_caoang','tw_caoang'], + caohong:['caohong','tw_caohong'], + xiahouba:['re_xiahouba','xiahouba'], + maliang:['maliang','re_maliang','ol_maliang','old_maliang'], + dingfeng:['dingfeng','tw_dingfeng'], + zumao:['zumao','tw_zumao'], + beimihu:['tw_beimihu','beimihu'], + panfeng:['re_panfeng','panfeng'], + sunluyu:['sunluyu','re_sunluyu'], + simazhao:['simazhao','sp_simazhao'], + wangyuanji:['wangyuanji','sp_wangyuanji'], + wangyun:['re_wangyun','wangyun','old_wangyun'], + zhangliang:['re_zhangliang','zhangliang'], + lingju:['lingju','old_lingju'], + guansuo:['guansuo','old_guansuo'], + zhangxingcai:['old_zhangxingcai'], + }, translate:{ "xinfu_lingren":"凌人", "xinfu_lingren_info":"每回合限一次。当你于出牌阶段使用带有「伤害」这一标签的基本牌或普通锦囊牌指定目标后,你可以猜测其中的一个目标的手牌中是否有基本牌,锦囊牌或装备牌。若你猜中的项目数:≥1,此牌对该角色的伤害+1;≥2,你摸两张牌;≥3,你获得技能〖奸雄〗和〖行殇〗直到下回合开始。", diff --git a/character/sp2.js b/character/sp2.js index 46e13ff28..8afd58058 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -57,6 +57,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lvkuanglvxiang:['male','qun',4,['liehou','qigong']], leitong:['male','shu',4,['kuiji']], wulan:['male','shu',4,['wlcuorui']], + ns_lijue:['male','qun','4/6',['nsfeixiong','nscesuan']], + ns_zhangji:['male','qun',4,['nslulve']], + ns_fanchou:['male','qun',4,['nsyangwu']], + ns_jiaxu:['male','qun',3,['nsyice','luanwu']], + ns_chendao:['male','shu',4,['nsjianglie']], + yj_caoang:['male','wei',4,['yjxuepin']], + mini_sunquan:['male','wu',4,['minizhiheng','jiuyuan'],['zhu']], + mini_zuoci:['male','qun',3,['minishendao','minixinsheng']], }, characterSort:{ sp2:{ @@ -70,9 +78,423 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_guandu:["sp_zhanghe","xunchen","sp_shenpei","gaolan","lvkuanglvxiang","chunyuqiong","sp_xuyou"], sp_huangjin:['liuhong','zhujun','re_hejin','hansui'], sp_decade:['wulan','leitong','huaman','wangshuang','wenyang','re_liuzan','re_sunluyu','caobuxing','ol_xinxianying','ol_yujin','re_maliang','xin_baosanniang','liubian'], + sp_mini:["mini_sunquan","mini_zuoci"], + sp_luanwu:["ns_lijue","ns_zhangji","ns_fanchou"], + sp_yongjian:["ns_chendao","yj_caoang"], + sp_s:["ns_jiaxu"], } }, skill:{ + minishendao:{ + audio:'rehuashen', + trigger:{ + global:"judge", + }, + direct:true, + content:function(){ + "step 0" + var str='你的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+',是否修改判定结果?'; + player.chooseControl('spade','heart','diamond','club','cancel2').set('prompt',str).set('ai',function(){ + //return '取消'; + var judging=_status.event.judging; + var trigger=_status.event.getTrigger(); + var res1=trigger.judge(judging); + var list=lib.suit.slice(0); + var attitude=get.attitude(player,trigger.player); + if(attitude==0) return 0; + var getj=function(suit){ + return trigger.judge({ + name:get.name(judging), + nature:get.nature(judging), + suit:suit, + number:get.number(judging), + }) + }; + list.sort(function(a,b){ + return (getj(b)-getj(a))*get.sgn(attitude); + }); + if((getj(list[0])-res1)*attitude>0) return list[0]; + return 'cancel2'; + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.control!='cancel2'){ + player.logSkill('minishendao'); + //player.line(trigger.player); + player.popup(result.control+2); + game.log(player,'将判定结果改为了','#y'+get.translation(result.control+2)); + trigger.fixedResult={ + suit:result.control, + color:get.color({suit:result.control}), + }; + } + }, + ai:{ + rejudge:true, + tag:{ + rejudge:0.3, + }, + }, + }, + minixinsheng:{ + audio:'rexinsheng', + trigger:{player:'damageEnd'}, + frequent:true, + content:function(){ + "step 0" + event.cards=get.cards(3); + game.cardsGotoOrdering(event.cards); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + var str; + if(player==game.me&&!_status.auto){ + str='新生:获取花色各不相同的牌'; + } + else{ + str='新生'; + } + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + event.time=get.utc(); + game.addVideo('showCards',player,['新生',get.cardsInfo(event.cards)]); + game.addVideo('delay',null,2); + "step 1" + var next=player.chooseButton([0,3],true); + next.set('dialog',event.videoId); + next.set('filterButton',function(button){ + for(var i=0;i0){ + game.delay(0,time); + } + "step 3" + game.broadcastAll('closeDialog',event.videoId); + var cards2=event.cards2; + player.gain(cards2,'log','gain2'); + }, + }, + minizhiheng:{ + audio:'zhiheng', + trigger:{player:'phaseUseEnd'}, + direct:true, + filter:function(event){ + return event.player.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.chooseToDiscard('h',get.prompt('minizhiheng'),'弃置任意张手牌,若如此做,将手牌摸至四张',[1,player.countCards('h')]).set('ai',function(card){ + var num=4-player.countCards('h'); + var val=6.1+Math.max(0,num); + var cs=player.countCards('h',function(card){ + return get.value(card)>=val; + }); + if(cs>=4) return 0; + return val-get.value(card) + }).logSkill='minizhiheng'; + 'step 1' + if(result.bool) player.drawTo(4); + }, + }, + nsyangwu:{ + enable:'phaseUse', + usable:1, + filterCard:{suit:'heart'}, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>player.countCards('h'); + }, + filter:function(event,player){ + var info=lib.skill.nsyangwu; + return player.countCards('h',info.filterCard)&&game.hasPlayer(function(target){ + return info.filterTarget(null,player,target); + }); + }, + check:function(card){ + var num=0; + var player=_status.event.player; + game.countPlayer(function(current){ + if(current!=player&&get.attitude(player,current)<0) num=Math.max(num,current.countCards('h')-player.countCards('h')); + }); + return Math.ceil((num+1)/2)*2+4-get.value(card); + }, + content:function(){ + var num=Math.ceil((target.countCards('h')-player.countCards('h'))/2); + if(num) player.gainPlayerCard(target,true,'h',num,'visible'); + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + return player.countCards('h')-target.countCards('h'); + }, + }, + }, + }, + nslulve:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countCards('e')>0&¤t.countCards('e')<=player.countCards('he'); + }); + }, + filterCard:function(){ + if(ui.selected.targets.length) return false; + return true; + }, + position:'he', + selectCard:[1,Infinity], + complexSelect:true, + complexCard:true, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('e')>0&&ui.selected.cards.length==target.countCards('e'); + }, + check:function(card){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e')>0&&ui.selected.cards.length==current.countCards('e')&&get.damageEffect(current,player,player)>0; + })) return 0; + switch(ui.selected.cards.length){ + case 0:return 8-get.value(card); + case 1:return 6-get.value(card); + case 2:return 3-get.value(card); + default:return 0; + } + }, + content:function(){ + target.damage('nocard'); + }, + ai:{ + damage:true, + order:2, + result:{ + target:function(player,target){ + return get.damageEffect(target,player); + } + }, + expose:0.3 + } + }, + nsfeixiong:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('h')>0&&game.hasPlayer(function(current){ + return current!=player&&player.canCompare(current); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('nsfeixiong'),function(card,player,target){ + return player!=target&&player.canCompare(target); + }).set('ai',function(target){ + var player=_status.event.player; + var hs=player.getCards('h').sort(function(a,b){ + return b.number-a.number; + }); + var ts=target.getCards('h').sort(function(a,b){ + return b.number-a.number; + }); + if(!hs.length||!ts.length) return 0; + if(hs[0].number>ts[0].number) return get.damageEffect(target,player,player); + return 0; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('nsfeixiong',target); + player.chooseToCompare(target); + } + else event.finish(); + 'step 2' + if(!result.tie){ + var targets=[player,target]; + if(result.bool) targets.reverse(); + targets[0].damage(targets[1]); + } + }, + }, + nscesuan:{ + trigger:{player:'damageBegin3'}, + forced:true, + content:function(){ + 'step 0' + trigger.cancel(); + event.lose=player.loseMaxHp(); + 'step 1' + if(event.lose&&event.lose.loseHp) player.draw(); + }, + ai:{ + filterDamage:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.player){ + if(arg.player.hasSkillTag('jueqing',false,player)) return false; + } + }, + }, + }, + nsyice:{ + trigger:{ + player:'loseAfter', + global:'cardsDiscardAfter', + }, + filter:function(event,player){ + if(event.name=='lose'){ + if(event.type!='discard') return false; + } + else{ + var evt=event.getParent(); + if(evt.name!='orderingDiscard'||!evt.relatedEvent||evt.relatedEvent.player!=player||!['useCard','respond'].contains(evt.relatedEvent.name)) return false; + } + return (event.cards2||event.cards).filterInD('d').length>0; + }, + forced:true, + content:function(){ + 'step 0' + var evt=trigger.getParent().relatedEvent; + if((trigger.name=='discard'&&!trigger.delay)||evt&&evt.name=='respond') game.delayx(); + 'step 1' + var cards=(trigger.cards2||trigger.cards).filterInD('d'); + player.$gain2(cards); + if(cards.length==1) event._result={bool:true,links:cards}; + else{ + var dialog=['遗策:选择要放置的卡牌','
(从左到右为从旧到新,后选择的后置入)
',cards]; + var cards2=player.getStorage('nsyice'); + if(cards2.length){ + dialog.push('
原有“策”
'); + dialog.push(cards2); + } + player.chooseButton(dialog,true,cards.length).set('filterButton',function(button){ + return _status.event.cards.contains(button.link); + }).set('cards',cards); + } + 'step 2' + game.cardsGotoSpecial(result.links); + player.markAuto('nsyice',result.links); + game.delayx(); + 'step 3' + var storage=player.storage.nsyice; + var bool=false; + for(var i=0;ii;j--){ + if(get.number(storage[i])==get.number(storage[j])){ + bool=true; + break; + } + } + if(bool) break; + } + if(bool){ + event.cards=storage.slice(0); + event.cards=storage.splice(i,j-i+1); + player.unmarkAuto('nsyice',event.cards); + } + else event.finish(); + 'step 4' + var cardsx=[]; + cardsx.push(cards.shift()); + cardsx.push(cards.pop()); + if(cards.length) player.gain(cards,'gain2'); + event.cards=cardsx; + 'step 5' + player.chooseButton(['将一张牌置于牌堆顶,将另一张牌置于牌堆底',cards],true); + 'step 6' + ui.cardPile.insertBefore(result.links[0].fix(),ui.cardPile.firstChild); + cards.remove(result.links[0]); + ui.cardPile.appendChild(cards[0].fix()); + game.updateRoundNumber(); + if(_status.dying.length) event.finish(); + 'step 7' + player.chooseTarget('对一名角色造成1点伤害',true).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + 'step 8' + if(result.bool){ + var target=result.targets[0]; + player.line(target); + target.damage('nocard'); + } + }, + marktext:'策', + intro:{content:'cards'}, + }, + yjxuepin:{ + enable:'phaseUse', + usable:1, + filterTarget:function(event,player,target){ + return player.inRange(target); + }, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,2,'he',true); + else event.finish(); + 'step 2' + if(result.bool&&result.cards.length==2&&get.type2(result.cards[0],result.cards[0].original=='h'?target:false)==get.type2(result.cards[1],result.cards[1].original=='h'?target:false)) player.recover(); + }, + ai:{ + order:4, + result:{ + player:function(player,target){ + if(player.hp==1) return -4; + if(target.countCards('e')>1) return 0; + if(player.hp>2||target.countCards('h')>1) return -0.5; + return -2; + }, + target:function(player,target){ + return -2; + }, + }, + }, + }, + nsjianglie:{ + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha'&&event.target.countCards('h')>0; + }, + check:function(event,player){ + return get.attitude(player,event.target)<0; + }, + logTarget:'target', + content:function(){ + 'step 0' + trigger.target.showHandcards(); + 'step 1' + var cards=trigger.target.getCards('h'); + var list=[]; + for(var i=0;i=get.value(player.getCards('h',{color:'black'}))) return 'black'; + return 'red'; + }); + } + 'step 2' + trigger.target.discard(trigger.target.getCards('h',{color:result.control})); + }, + }, sicong:{ audio:2, enable:'phaseUse', @@ -6086,6 +6508,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return '出牌阶段开始时,你可以展示牌堆顶的三张牌。你可弃置任意张手牌,并可获得任意张点数之和不大于你弃置的牌点数之和的牌。'; }, }, + characterReplace:{ + lijue:['lijue','ns_lijue'], + fanchou:['fanchou','ns_fanchou'], + zhangji:['zhangji','ns_zhangji'], + zhangchangpu:['ol_zhangchangpu','zhangchangpu'], + huangfusong:['huangfusong','old_huangfusong'], + wenyang:['wenyang','diy_wenyang'], + }, translate:{ lijue:"李傕", zhangji:"张济", @@ -6408,6 +6838,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sicong_info:'出牌阶段限一次,你可以弃置任意张点数之和为13的牌,然后摸两倍数量的牌。以此法获得的牌中,黑色牌本回合无距离和次数限制,红色牌本回合不计入手牌上限。', xianzhao:'先兆', xianzhao_info:'当你受到伤害后,你可以进行一次判定,然后若你弃置任意张点数之和与判定结果点数相同的牌,你回复1点体力。', + yj_caoang:'SP曹昂', + yjxuepin:'血拼', + yjxuepin_info:'出牌阶段限一次,你可以选择攻击范围内的一名角色并失去1点体力。你弃置其两张牌。若这两张牌类型相同,你回复1点体力。', + ns_chendao:'SP陈到', + nsjianglie:'将烈', + nsjianglie_info:'当你使用【杀】指定目标后,你可以令其展示所有手牌,然后弃置其中一种颜色的牌。', + ns_jiaxu:'☆贾诩', + nsyice:'遗策', + nsyice_info:'锁定技,当你使用/打出/弃置的牌进入弃牌堆后,你将这些牌以任意顺序置于你的武将牌上,称为“策”。若这些“策”中有点数相同的牌,则你获得这两张牌中的所有牌,将这两张牌置于牌堆两端。若场上没有处于濒死状态的角色,则你对一名角色造成1点伤害。', + ns_lijue:'SP李傕', + ns_zhangji:'SP张济', + nsfeixiong:'飞熊', + nsfeixiong_info:'出牌阶段开始时,你可以和一名其他角色拼点。赢的角色对没赢的角色造成1点伤害。', + nscesuan:'策算', + nscesuan_info:'锁定技,当你受到伤害时,你防止此伤害并失去一点体力上限。若你因以此法失去体力上限导致体力值减少,则你摸一张牌。', + nslulve:'掳掠', + nslulve_info:'出牌阶段限一次,你可以弃置X张牌并选择一名装备区内有牌的其他角色,然后对其造成1点伤害(X为其装备区内的牌数)。', + ns_fanchou:'SP樊稠', + nsyangwu:'扬武', + nsyangwu_info:'出牌阶段限一次,你可以弃置一张♥手牌并选择一名手牌数大于你的其他角色。你观看其手牌并获得其中的X张牌(X为其与你手牌数之差的一半且向上取整)。', + mini_sunquan:'SP孙权', + minizhiheng:'制衡', + minizhiheng_info:'出牌阶段结束时,你可以弃置任意张手牌。若如此做,你将手牌摸至四张。', + mini_zuoci:'SP左慈', + minishendao:'神道', + minishendao_info:'你的判定牌生效前,你可以将判定结果改为任意花色。', + minixinsheng:'新生', + minixinsheng_info:'当你受到伤害后,你可以展示牌堆顶的三张牌,然后获得其中每种花色的牌各一张。', sp_whlw:"文和乱武", sp_zlzy:"逐鹿中原", @@ -6419,6 +6877,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_guandu:'官渡之战', sp_huangjin:'黄巾之乱', sp_decade:'其他新服武将', + sp_mini:'欢乐三国杀', + sp_luanwu:'文和乱武·线下', + sp_yongjian:'用间篇', + sp_s:'线下S系列', }, }; }); diff --git a/character/standard.js b/character/standard.js index a7eddcee0..6635bbeb5 100755 --- a/character/standard.js +++ b/character/standard.js @@ -2678,6 +2678,36 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, + characterReplace:{ + caocao:['re_caocao','caocao'], + guojia:['re_guojia','rguojia'], + simayi:['re_simayi','simayi'], + zhenji:['re_zhenji','zhenji'], + xuzhu:['re_xuzhu','xuzhu'], + zhangliao:['re_zhangliao','sp_zhangliao','yj_zhangliao','zhangliao'], + xiahoudun:['re_xiahoudun','sp_xiahoudun','xin_xiahoudun','xiahoudun'], + liubei:['re_liubei','sp_liubei','liubei'], + guanyu:['re_guanyu','jsp_guanyu','guanyu'], + zhangfei:['re_zhangfei','sp_zhangfei','old_zhangfei','zhangfei'], + zhaoyun:['re_zhaoyun','sp_zhaoyun','jsp_zhaoyun','old_zhaoyun','zhaoyun'], + machao:['re_machao','sp_machao','machao','old_machao'], + zhugeliang:['re_zhugeliang','zhugeliang'], + huangyueying:['re_huangyueying','jsp_huangyueying','huangyueying'], + sunquan:['re_sunquan','mini_sunquan','sunquan'], + zhouyu:['re_zhouyu','zhouyu'], + luxun:['re_luxun','luxun'], + lvmeng:['re_lvmeng','sp_lvmeng','lvmeng'], + huanggai:['re_huanggai','huanggai'], + daqiao:['re_daqiao','sp_daqiao','daqiao'], + sunshangxiang:['re_sunshangxiang','sp_sunshangxiang','sunshangxiang'], + ganning:['re_ganning','yj_ganning','sp_ganning','ganning'], + lvbu:['re_lvbu','lvbu'], + diaochan:['re_diaochan','sp_diaochan','ganning'], + huatuo:['re_huatuo','old_huatuo','huatuo'], + huaxiong:['re_huaxiong','old_huaxiong','huaxiong','ol_huaxiong'], + yuanshu:['yl_yuanshu','yuanshu','re_yuanshu','old_yuanshu','ol_yuanshu'], + gongsunzan:['re_gongsunzan','xin_gongsunzan','sp_gongsunzan','gongsunzan'], + }, translate:{ caocao:'曹操', hujia:'护驾', diff --git a/character/yijiang.js b/character/yijiang.js index f736c2040..b99fa75e7 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -12052,6 +12052,52 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return '其他角色使用或打出牌响应你使用的牌时,你可令其获得你使用的牌(其本回合不能使用或打出这些牌),然后你获得其使用或打出的牌。'; }, }, + characterReplace:{ + caozhi:['re_caozhi','caozhi'], + yujin:['yujin_yujin','re_yujin','ol_yujin','xin_yujin','yujin'], + xushu:['re_xushu','xin_xushu','xushu'], + fazheng:['xin_fazheng','fazheng'], + masu:['xin_masu','re_masu','masu'], + xusheng:['xin_xusheng','re_xusheng','xusheng'], + wuguotai:['re_wuguotai','wuguotai'], + lingtong:['xin_lingtong','re_lingtong','lingtong'], + gaoshun:['gaoshun','re_gaoshun'], + zhonghui:['re_zhonghui','zhonghui','old_zhonghui'], + wangyi:['wangyi','old_wangyi'], + caozhang:['re_caozhang','xin_caozhang','caozhang'], + guanzhang:['guanzhang','old_guanzhang'], + madai:['old_madai','madai'], + liaohua:['xin_liaohua','re_liaohua','liaohua'], + bulianshi:['re_bulianshi','bulianshi','old_bulianshi'], + handang:['re_handang','handang'], + chengpu:['re_chengpu','chengpu','xin_chengpu'], + liubiao:['re_liubiao','xin_liubiao','liubiao'], + manchong:['re_manchong','manchong'], + caochong:['caochong','old_caochong'], + guohuai:['guohuai','re_guohuai','ol_guohuai'], + jianyong:['re_jianyong','xin_jianyong','jianyong'], + panzhangmazhong:['re_panzhangmazhong','panzhangmazhong'], + yufan:['re_yufan','yufan'], + zhuran:['re_zhuran','xin_zhuran','zhuran','old_zhuran'], + liru:['re_liru','xin_liru','liru'], + fuhuanghou:['fuhuanghou','old_fuhuanghou'], + chenqun:['chenqun','old_chenqun'], + hanhaoshihuan:['re_hanhaoshihuan','hanhaoshihuan'], + caozhen:['caozhen','old_caozhen'], + wuyi:['re_wuyi','wuyi'], + sunluban:['re_sunluban','sunluban'], + zhuhuan:['zhuhuan','old_zhuhuan'], + caoxiu:['re_caoxiu','caoxiu','old_caoxiu'], + xiahoushi:['xiahoushi','sp_xiahoushi'], + zhangyi:['re_zhangyi','zhangyi'], + quancong:['re_quancong','quancong','old_quancong'], + sunxiu:['re_sunxiu','sunxiu'], + zhuzhi:['zhuzhi','old_zhuzhi'], + liuyu:['liuyu','old_liuyu'], + zhangrang:['zhangrang','ol_zhangrang','junk_zhangrang'], + jikang:['re_jikang','jikang'], + xinxianying:['xinxianying','ol_xinxianying','sp_xinxianying'], + }, translate:{ old_huaxiong:'华雄', yufan:'虞翻', diff --git a/game/asset.js b/game/asset.js index 256f60a18..10eace126 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.9.106.2.2', + 'v1.9.106.3', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -3491,6 +3491,10 @@ window.noname_asset_list=[ 'image/character/xin_zhuran.jpg', 'image/character/yanghuiyu.jpg', 'image/character/key_shizuku.jpg', + 'image/character/mini_lvbu.jpg', + 'image/character/mini_sunquan.jpg', + 'image/character/mini_zhugeliang.jpg', + 'image/character/mini_zuoci.jpg', 'image/character/baiwuchang.jpg', 'image/character/baosanniang.jpg', @@ -4476,8 +4480,8 @@ window.noname_asset_list=[ 'image/emotion/throw_emotion/shoukao2.png', 'image/emotion/throw_emotion/wine1.png', 'image/emotion/throw_emotion/wine2.png', - 'image/emotion/throw_emotion/yuxis1.png', - 'image/emotion/throw_emotion/yuxis2.png', + 'image/emotion/throw_emotion/yuxisx1.png', + 'image/emotion/throw_emotion/yuxisx2.png', 'image/mode/boss/card/chixueqingfeng.png', 'image/mode/boss/card/chiyanzhenhunqin.png', diff --git a/game/config.js b/game/config.js index d0672905d..874f73277 100644 --- a/game/config.js +++ b/game/config.js @@ -229,6 +229,8 @@ window.config={ // ['jiushi','kuiwei'], ['zishu','xinfu_songsang'], ['zishu','shenxing'], + ['minishendao','luoshen'], + ['minishendao','reluoshen'], ['akane_quanqing','lianying'], ['akane_quanqing','relianying'], ['akane_quanqing','shangshi'], diff --git a/game/game.js b/game/game.js index 3384a66a9..9ef27c326 100644 --- a/game/game.js +++ b/game/game.js @@ -45,6 +45,7 @@ characterPack:{}, characterFilter:{}, characterSort:{}, + characterReplace:{}, dynamicTranslate:{}, cardPack:{}, onresize:[], @@ -9779,7 +9780,7 @@ egg:'鸡蛋', wine:'酒杯', shoe:'拖鞋', - yuxis:'玉玺', + yuxisx:'玉玺', shoukao:'枷锁', junk:'平凡', common:'普通', @@ -24525,7 +24526,7 @@ return true; }, characterDisabled:function(i,libCharacter){ - if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) return true; + if(!lib.character[i]||lib.character[i][4]&&lib.character[i][4].contains('forbidai')) return true; if(lib.character[i][4]&&lib.character[i][4].contains('unseen')) return true; if(lib.config.forbidai.contains(i)) return true; if(lib.characterFilter[i]&&!lib.characterFilter[i](get.mode())) return true; @@ -24584,6 +24585,7 @@ }, characterDisabled2:function(i){ var info=lib.character[i]; + if(!info) return true; if(info[4]){ if(info[4].contains('boss')) return true; if(info[4].contains('hiddenboss')) return true; @@ -43183,7 +43185,7 @@ node.link=item; break; - case 'character':case 'player': + case 'character':case 'player':case 'characterx': if(node){ node.classList.add('button'); node.classList.add('character'); @@ -43192,79 +43194,117 @@ else{ node=ui.create.div('.button.character',position); } + node._link=item; + if(_status.noReplaceCharacter&&type=='characterx') type='character'; + if(type=='characterx'){ + if(lib.characterReplace[item]&&lib.characterReplace[item].length) item=lib.characterReplace[item][0]; + } node.link=item; - if(type=='character'){ - node.setBackground(item,'character'); - node.node={ - name:ui.create.div('.name',node), - hp:ui.create.div('.hp',node), - intro:ui.create.div('.intro',node), - group:ui.create.div('.identity',node) - } - var infoitem=lib.character[item]; - if(!infoitem){ - for(var itemx in lib.characterPack){ - if(lib.characterPack[itemx][item]){ - infoitem=lib.characterPack[itemx][item];break; + if(type=='character'||type=='characterx'){ + if(type=='characterx'&&lib.characterReplace[node._link]&&lib.characterReplace[node._link].length>1) node._replaceButton=true; + var func=function(node,item){ + node.setBackground(item,'character'); + if(node.node){ + node.node.name.remove(); + node.node.hp.remove(); + node.node.group.remove(); + node.node.intro.remove(); + if(node.node.replaceButton) node.node.replaceButton.remove(); + } + node.node={ + name:ui.create.div('.name',node), + hp:ui.create.div('.hp',node), + group:ui.create.div('.identity',node), + intro:ui.create.div('.intro',node), + }; + var infoitem=lib.character[item]; + if(!infoitem){ + for(var itemx in lib.characterPack){ + if(lib.characterPack[itemx][item]){ + infoitem=lib.characterPack[itemx][item];break; + } } } - } - node.node.name.innerHTML=get.slimName(item); - if(lib.config.buttoncharacter_style=='default'||lib.config.buttoncharacter_style=='simple'){ - if(lib.config.buttoncharacter_style=='simple'){ + node.node.name.innerHTML=get.slimName(item); + if(lib.config.buttoncharacter_style=='default'||lib.config.buttoncharacter_style=='simple'){ + if(lib.config.buttoncharacter_style=='simple'){ + node.node.group.style.display='none'; + } + node.node.name.dataset.nature=get.groupnature(infoitem[1]); + node.node.group.dataset.nature=get.groupnature(infoitem[1],'raw'); + node.classList.add('newstyle'); + ui.create.div(node.node.hp); + var textnode=ui.create.div('.text',get.numStr(infoitem[2]),node.node.hp); + if(infoitem[2]==0){ + node.node.hp.hide(); + } + else if(get.infoHp(infoitem[2])<=3){ + node.node.hp.dataset.condition='mid'; + } + else{ + node.node.hp.dataset.condition='high'; + } + } + else{ + var hp=get.infoHp(infoitem[2]); + var maxHp=get.infoMaxHp(infoitem[2]); + if(maxHp>14){ + if(typeof infoitem[2]=='string') node.node.hp.innerHTML=infoitem[2]; + else node.node.hp.innerHTML=get.numStr(infoitem[2]); + node.node.hp.classList.add('text'); + } + else{ + for(var i=0;i=hp) next.classList.add('exclude'); + } + } + } + if(node.node.hp.childNodes.length==0){ + node.node.name.style.top='8px'; + } + if(node.node.name.querySelectorAll('br').length>=4){ + node.node.name.classList.add('long'); + if(lib.config.buttoncharacter_style=='old'){ + node.addEventListener('mouseenter',ui.click.buttonnameenter); + node.addEventListener('mouseleave',ui.click.buttonnameleave); + } + } + node.node.intro.innerHTML=lib.config.intro; + if(!noclick){ + lib.setIntro(node); + } + if(infoitem[1]){ + node.node.group.innerHTML='
'+get.translation(infoitem[1])+'
'; + node.node.group.style.backgroundColor=get.translation(infoitem[1]+'Color'); + } + else{ node.node.group.style.display='none'; } - node.node.name.dataset.nature=get.groupnature(infoitem[1]); - node.node.group.dataset.nature=get.groupnature(infoitem[1],'raw'); - node.classList.add('newstyle'); - ui.create.div(node.node.hp); - var textnode=ui.create.div('.text',get.numStr(infoitem[2]),node.node.hp); - if(infoitem[2]==0){ - node.node.hp.hide(); + if(node._replaceButton){ + var intro=ui.create.div('.button.replaceButton',node); + node.node.replaceButton=intro; + intro.innerHTML='切换'; + intro._node=node; + intro.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + _status.tempNoButton=true; + var node=this._node; + var list=lib.characterReplace[node._link]; + var link=node.link; + var index=list.indexOf(link); + if(index==list.length-1) index=0; + else index++; + link=list[index]; + node.link=link; + node.refresh(node,link); + setTimeout(function(){ + delete _status.tempNoButton; + },200); + }); } - else if(get.infoHp(infoitem[2])<=3){ - node.node.hp.dataset.condition='mid'; - } - else{ - node.node.hp.dataset.condition='high'; - } - } - else{ - var hp=get.infoHp(infoitem[2]); - var maxHp=get.infoMaxHp(infoitem[2]); - if(maxHp>14){ - if(typeof infoitem[2]=='string') node.node.hp.innerHTML=infoitem[2]; - else node.node.hp.innerHTML=get.numStr(infoitem[2]); - node.node.hp.classList.add('text'); - } - else{ - for(var i=0;i=hp) next.classList.add('exclude'); - } - } - } - if(node.node.hp.childNodes.length==0){ - node.node.name.style.top='8px'; - } - if(node.node.name.querySelectorAll('br').length>=4){ - node.node.name.classList.add('long'); - if(lib.config.buttoncharacter_style=='old'){ - node.addEventListener('mouseenter',ui.click.buttonnameenter); - node.addEventListener('mouseleave',ui.click.buttonnameleave); - } - } - node.node.intro.innerHTML=lib.config.intro; - if(!noclick){ - lib.setIntro(node); - } - if(infoitem[1]){ - node.node.group.innerHTML='
'+get.translation(infoitem[1])+'
'; - node.node.group.style.backgroundColor=get.translation(infoitem[1]+'Color'); - } - else{ - node.node.group.style.display='none'; - } + }; + node.refresh=func; + node.refresh(node,item); } else{ node.node={ @@ -47773,6 +47813,14 @@ }, }; var get={ + sourceCharacter:function(str){ + if(str){ + for(var i in lib.characterReplace){ + if(lib.characterReplace[i].contains(str)) return i; + } + } + return str; + }, isLuckyStar:function(player){ if(player&&player.hasSkillTag('luckyStar')) return true; if(_status.connectMode) return false; @@ -50496,7 +50544,7 @@ table.style.width='100%'; table.style.position='relative'; var listi=['wine','shoe']; - if(game.me.storage.zhuSkill_shanli) listi=['yuxis','shoukao']; + if(game.me.storage.zhuSkill_shanli) listi=['yuxisx','shoukao']; for(var i=0;i.card>.info>span, transform: none !important; text-shadow: black 0 0 2px, black 0 0 3px; } + +.button.replaceButton, +.button.replaceButton.text{ + left: 2px; + top: auto; + text-align: center; + width: 42px; + right: auto; + bottom: 3px; + background-image: linear-gradient(rgba(150, 47, 47, 1), rgba(132, 43, 43, 1)); + border-radius: 3px; +} +.button.replaceButton>div{ + width: 10px; + height: 10px; +} /*--------确认--------*/ #control { text-align: center; @@ -3356,7 +3372,7 @@ div:not(.handcards)>.card>.info>span, #arena.selecting:not(.video) #me .card:not(.selectable)>.info, #arena.selecting:not(.video) #me .card:not(.selectable)>.range, #arena.selecting:not(.video) #me .card:not(.selectable)>.addinfo, -#arena.selecting:not(.video) .dialog:not(.noselect) .button:not(.selectable):not(.noclick), +#arena.selecting:not(.video) .dialog:not(.noselect) .button:not(.selectable):not(.noclick):not(.replaceButton), .dead,.likedead { opacity: 0.6; } diff --git a/mode/brawl.js b/mode/brawl.js index c4d4e0136..fffe84cf4 100644 --- a/mode/brawl.js +++ b/mode/brawl.js @@ -1602,6 +1602,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ chooseCharacterFixed:true, chooseCharacter:function(list,player){ game.versusVideoName='同姓之争'; + _status.noReplaceCharacter=true; if(player.side==game.me.side){ if(_status.brawl.mylist){ return _status.brawl.mylist.randomGets(2); @@ -1750,6 +1751,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, chooseCharacter:function(){ + _status.noReplaceCharacter=true; if(game.me==game.zhu){ return ['re_caocao']; } @@ -1926,6 +1928,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ submode:'two', chooseCharacterFixed:true, chooseCharacterBefore:function(){ + _status.noReplaceCharacter=true; game.versusVideoName='家族之争'; var map={ wei:[], diff --git a/mode/doudizhu.js b/mode/doudizhu.js index 7b6d31d89..649cae82f 100644 --- a/mode/doudizhu.js +++ b/mode/doudizhu.js @@ -211,9 +211,22 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var i; event.list=[]; event.list2=[]; + var list4=[]; if(!event.map) event.map={}; + for(i in lib.characterReplace){ + var ix=lib.characterReplace[i]; + for(var j=0;j4){ game.zhu.maxHp++; @@ -1946,7 +2015,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(game.players[i].special_identity){ str+='('+get.translation(game.players[i].special_identity)+')'; } - list.push([game.players[i],[str,[event.list.randomRemove(num+num3),'character']],selectButton,true]); + list.push([game.players[i],[str,[event.list.randomRemove(num+num3),'characterx']],selectButton,true]); } } game.me.chooseButtonOL(list,function(player,result){ @@ -1957,16 +2026,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ for(var i in result){ if(result[i]&&result[i].links){ for(var j=0;j