diff --git a/character/huicui.js b/character/huicui.js index a9844eda1..82d577a32 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -11092,6 +11092,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhangchu:['zhangchu','jsrg_zhangchu'], xianglang:['xianglang','mb_xianglang'], chengui:['chengui','mb_chengui'], + liuyong:['liuyong','jsrg_liuyong'], + zhangxuan:['zhangxuan','jsrg_zhangxuan'], + gaoxiang:['gaoxiang','jsrg_gaoxiang'], }, translate:{ re_panfeng:'潘凤', diff --git a/character/jsrg.js b/character/jsrg.js index 3b785c45c..130295914 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -8,6 +8,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jiangshanrugu_qi:['jsrg_liuhong','jsrg_hejin','jsrg_sunjian','jsrg_huangfusong','jsrg_xushao','jsrg_dongbai','jsrg_qiaoxuan','jsrg_yangbiao','jsrg_kongrong','jsrg_zhujun','jsrg_liubei','jsrg_wangyun','jsrg_liuyan','jsrg_caocao','jsrg_nanhualaoxian'], jiangshanrugu_cheng:['jsrg_sunce','jsrg_xuyou','jsrg_lvbu','jsrg_zhanghe','jsrg_zoushi','jsrg_guanyu','jsrg_chendeng','jsrg_zhenji','jsrg_zhangliao','jsrg_xugong','jsrg_chunyuqiong'], jiangshanrugu_zhuan:['jsrg_guojia','jsrg_zhangfei','jsrg_machao','jsrg_lougui','jsrg_zhangren','jsrg_huangzhong','jsrg_xiahourong','jsrg_sunshangxiang','jsrg_pangtong','jsrg_hansui','jsrg_zhangchu','jsrg_xiahouen','jsrg_fanjiangzhangda'], + jiangshanrugu_he:['jsrg_zhugeliang','jsrg_jiangwei','jsrg_luxun','jsrg_zhaoyun','jsrg_simayi','jsrg_guoxun','jsrg_sunlubansunluyu','jsrg_caofang','jsrg_sunjun','jsrg_liuyong','jsrg_weiwenzhugezhi','jsrg_zhangxuan','jsrg_gaoxiang','jsrg_guozhao'], }, }, character:{ @@ -53,14 +54,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jsrg_zhangchu:['female','qun',3,['jsrghuozhong','jsrgrihui']], jsrg_xiahouen:['male','wei',4,['jsrghujian','jsrgshili'],['die_audio:tw_xiahouen']], jsrg_fanjiangzhangda:['male','wu',5,['jsrgfushan']], + //合 + jsrg_zhugeliang:['male','shu',3,['jsrgwentian','jsrgchushi','jsrgyinlve']], + jsrg_jiangwei:['male','shu',4,['jsrgjinfa','jsrgfumou','jsrgxuanfeng'],['border:wei']], + jsrg_luxun:['male','wu',3,['jsrgyoujin','jsrgdailao','jsrgzhubei']], + jsrg_zhaoyun:['male','shu',4,['jsrglonglin','jsrgzhendan']], + jsrg_simayi:['male','wei',4,['jsrgyingshi','jsrgtuigu']], + jsrg_guoxun:['male','wei',4,['jsrgeqian','jsrgfusha']], + jsrg_sunlubansunluyu:['female','wu',3,['jsrgdaimou','jsrgfangjie']], + jsrg_caofang:['male','wei','3/4',['jsrgzhaotu','jsrgjingju','jsrgweizhui']], + jsrg_sunjun:['male','wu',4,['jsrgyaoyan','jsrgbazheng']], + jsrg_liuyong:['male','shu',3,['jsrgdanxin','jsrgfengxiang']], + jsrg_weiwenzhugezhi:['male','wu',4,['jsrgfuhai']], + jsrg_zhangxuan:['female','wu',4,['jsrgtongli','jsrgshezang']], + jsrg_gaoxiang:['male','shu',4,['jsrgchiying']], + jsrg_guozhao:['female','wei',3,['jsrgpianchong','jsrgzunwei']], }, characterIntro:{ qiaoxuan:'桥玄(110年-184年6月6日),一作乔玄,字公祖。梁国睢阳县(今河南省商丘市睢阳区)人。东汉时期名臣。桥玄年轻时曾任睢阳县功曹,因坚持追究陈国相羊昌的恶行而闻名。后被举为孝廉,历任洛阳左尉、齐相及上谷、汉阳太守、司徒长史、将作大匠。汉桓帝末年,出任度辽将军,击败鲜卑、南匈奴、高句丽侵扰,保境安民。汉灵帝初年,迁任河南尹、少府、大鸿胪。建宁三年(170年),迁司空。次年,拜司徒。光和元年(178年),升任太尉。桥玄有感于国势日衰,于是称病请辞,改任太中大夫。光和七年(184年),桥玄去世,年七十五。桥玄性格刚强,不阿权贵,待人谦俭,尽管屡历高官,但不因为自己处在高位而有所私请。他为官清廉,去世后连下葬的钱都没有,被时人称为名臣。', lougui:'娄圭,字子伯,荆州南阳郡(治今河南南阳)人。曹魏时期著名谋士、将军,娄圭年轻时与曹操有交情,曾经随曹操平定冀州,南征刘表,击破马超,立有功劳,连曹操都感叹他的计谋。 后来曹操和他的儿子们一起出去游玩,娄圭当时也一起随行。因言语不当,被南郡(治今湖北荆州)人习授举报,曹操认为有意诽谤,遭杀害。在小说《三国演义》里,娄圭被设定为京兆人(今陕西西安),隐居终南山,道号“梦梅居士”。于第59回登场。', xiahourong:'夏侯荣(207年—219年) ,字幼权,名将夏侯渊之子。建安二十四年(219年)汉中之战,父亲夏侯渊战死后,夏侯荣不愿逃跑,随后拔剑冲入敌阵,战死。', + guoxun:'郭脩(?~253年),一作郭循,字孝先,凉州西平人,三国时期曹魏官员。原为曹魏中郎,被蜀汉将领姜维俘虏后降蜀汉,任左将军,后来刺杀了蜀汉大将军费祎。被曹魏追封为长乐乡侯,谥曰威侯。', + caofang:'曹芳(232年-274年),字兰卿,沛国谯县(今安徽省亳州市)人。三国时期曹魏第三位皇帝(239年1月22日-254年10月17日在位),疑为魏武帝曹操曾孙,任城威王曹彰之孙,任城王曹楷之子。太和六年(232年),生于任城王府。青龙三年(235年),选为魏明帝曹叡养子,册封齐王。景初三年(239年),立为皇太子,同日魏明帝曹叡病死,曹芳正式即位,由大将军曹爽和太尉司马懿共同辅政。正始十年,经历高平陵之变,曹爽倒台,政权落入司马氏手中。嘉平六年(254年),中书令李丰和光禄大夫张缉图谋废掉司马师,改立夏侯玄为大将军。司马师平定叛乱后,将曹芳废为齐王,拥戴高贵乡公曹髦继位。西晋建立后,册封邵陵县公。泰始十年(274年),曹芳病逝,终年四十三岁,谥号为厉。', + sunjun:'孙峻(219年-256年10月19日),字子远,扬州吴郡富春(今浙江省杭州市)人,昭义中郎将孙静曾孙,定武中郎将孙暠之孙,散骑侍郎孙恭之子。三国时期吴国宗室、权臣。孙峻从小弓马娴熟,胆量非凡。孙权晚年时,孙峻担任武卫都尉,掌握军权,然后又任侍中,开始涉足朝政。孙权临终前,孙峻接受遗诏同诸葛恪、滕胤共同辅佐朝政。此后,其身兼武卫将军,一直主持宫廷的值班、守卫等要害部门,并被封为都乡侯。孙峻生性喜好专断,容不下诸葛恪,于是与吴主孙亮密谋发动政变,在酒宴中设伏兵杀死诸葛恪。孙峻谋杀诸葛恪之后,升任丞相、大将军,督察内外一切军务,假节,晋封富春侯。此后,孙峻独揽朝政。孙峻在任职期间,滥施刑杀,淫乱宫女,和全公主孙鲁班私通。五凤元年(254年),吴侯孙英企图谋杀孙峻,后来事情被泄露,孙英自杀。时隔一年,吴国将军孙仪、张怡、林恂等人乘蜀国使节来访之机,共同谋划诛杀孙峻。后被孙峻发觉,孙仪自杀,林恂等被认为有罪诛死。太平元年(256年),孙峻梦见被诸葛恪所击,因惊悸恐惧发病而死,时年38岁。', + sunlubansunluyu:'孙鲁班,孙权之女。孙鲁班与孙权二子孙和不睦。孙权长子孙登死后,孙和被立为太子。孙鲁班向孙权进谗言废孙和太子之位,孙和被废后忧愤而死。
孙鲁育,又名小虎,孙权与步练师之女。吴后期,孙鲁班诬陷孙鲁育参与谋反,于是孙峻杀害了孙鲁育。', jsrg_caocao:'初平元年二月,董卓徙天子都长安,焚洛阳宫室,众诸侯畏卓兵强,莫敢进。操怒斥众人:“为人臣而临此境,当举义兵以诛暴乱,大众已合,诸君何疑?此一战而天下定矣!”遂引兵汴水,遇卓将徐荣,大破之。操迎天子,攻吕布,伐袁术,安汉室,拜为征西将军。是时,袁绍兼四州之地,将攻许都。操欲扫清寰宇,兴复汉室,遂屯兵官渡。既克绍,操曰:“若天命在吾,吾为周文王矣。”', jsrg_sunce:'建安五年,操、绍相拒于官渡,孙策欲阴袭许昌,迎汉帝,遂密治兵,部署诸将。未发,会为许贡门客所刺,将计就计,尽托江东于权,诈死以待天时。八月,操、绍决战,孙策亲冒矢石,斩将刈旗,得扬、豫之地。曹操败走冀、青,刘备远遁荆、益。而后历时七年,孙策三分天下已有其二,帝于洛阳,建霸王未竟之功业。权表求吴王,封为仲帝,共治天下。', - jsrg_guojia:'初平元年二月,郭嘉拜见袁绍,闻曹操怒斥众诸侯,乃对曰:“董卓于汴水或有埋伏,慎之!”曹操未从,果败于徐荣。三月,曹操与郭嘉论天下事:“使孤成大业者,必此人也。”郭嘉从破袁绍,讨谭、尚,连战数克,计定辽东。时年三十八,征乌桓归途郭嘉因劳染疾,命悬之际竟意外饮下柳皮醋水而愈。建安十三年,曹操屯兵赤壁,郭嘉识破连环之计,议上中下三策,可胜刘备。尚未献策,曹操便决意采纳上策,“奉孝之才,足胜孤百倍,卿言上策,如何不取?”由此,赤壁战后曹操尽得天下。' + jsrg_guojia:'初平元年二月,郭嘉拜见袁绍,闻曹操怒斥众诸侯,乃对曰:“董卓于汴水或有埋伏,慎之!”曹操未从,果败于徐荣。三月,曹操与郭嘉论天下事:“使孤成大业者,必此人也。”郭嘉从破袁绍,讨谭、尚,连战数克,计定辽东。时年三十八,征乌桓归途郭嘉因劳染疾,命悬之际竟意外饮下柳皮醋水而愈。建安十三年,曹操屯兵赤壁,郭嘉识破连环之计,议上中下三策,可胜刘备。尚未献策,曹操便决意采纳上策,“奉孝之才,足胜孤百倍,卿言上策,如何不取?”由此,赤壁战后曹操尽得天下。', + jsrg_zhugeliang:'建兴六年春,汉丞相诸葛亮使赵云、邓芝为先锋,马谡为副将拒箕谷,牵制曹真主力。自率三十万大军攻祁山,三郡叛魏应亮,关中响震。曹叡命张郃拒亮,亮使定军山降将姜维与郃战于街亭,张郃久攻不下。后曹真强攻赵云军,赵云死战,坚守箕谷,马谡、邓芝当场战死忠勇殉国。……既克张郃,曹真溃逃,曹叡弃守长安,迁都邺城。十月,司马懿击退孙权,回援曹真。而后三年,丞相所到之处,无不望风而降,皆箪食壶浆,以迎汉军。尽收豫、徐、兖、并之地,建兴十年春,司马懿父子三人死于诸葛武侯火计,同年,孙权上表称臣,至此四海清平,大汉一统。而后诸葛亮荐蒋琬为丞相,姜维为大将军,自回隆中归隐,后主挽留再三,皆不受。魏延亦辞官相随,侍奉左右。后主时有不决之事,便往隆中拜访相父,均未得面,童子答曰外出云游,遗数锦囊,拆而视之,皆治国之良策也。', }, characterTitle:{ }, @@ -71,10 +92,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ allowDuplicate:true, blankCard:true, fullimage:true, + wuxieable:false, effect:function(){ 'step 0' - var card=event.cards[0]; - player.chooseUseTarget(card,`蓄谋:是否使用${get.translation(card)}?`,`请选择要使用的目标。若不使用此牌,则判定区内的所有“蓄谋”牌都将被置入弃牌堆。`); + var card=get.autoViewAs(event.cards[0]); + card.storage.xumou_jsrg=true; + player.chooseUseTarget(card,event.cards,`蓄谋:是否使用${get.translation(card)}?`,`请选择要使用的目标。若不使用此牌,则判定区内的所有“蓄谋”牌都将被置入弃牌堆。`); 'step 1' if(!result.bool){ var cards=player.getCards('j',card=>{ @@ -82,6 +105,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); if(cards.length>0) player.loseToDiscardpile(cards); } + else{ + player.addTempSkill('xumou_jsrg_temp','phaseChange'); + player.markAuto('xumou_jsrg_temp',[event.cards[0].name]) + } }, }, ying:{ @@ -113,6 +140,1847 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //江山如故·合 + //蓄谋临时禁用 + xumou_jsrg_temp:{ + charlotte:true, + onremove:true, + mod:{ + cardEnabled(card,player){ + if(!card.storage||!card.storage.xumou_jsrg) return; + if(player.getStorage('xumou_jsrg_temp').includes(get.name(card,false))) return false; + }, + }, + }, + //404诸葛亮 + jsrgwentian:{ + audio:2, + trigger:{ + player:['phaseZhunbeiBegin','phaseJudgeBegin','phaseDrawBegin','phaseUseBegin','phaseDiscardBegin','phaseJieshuBegin'], + }, + usable:1, + prompt2:'观看牌堆顶的五张牌,将其中一张交给其他角色,并将其余牌置于牌堆顶或牌堆底', + group:'jsrgwentian_viewas', + async content(event,trigger,player){ + const cards=get.cards(5); + game.cardsGotoOrdering(cards); + const {result}=await player.chooseButton([ + '问天:将一张牌交给一名其他角色', + cards + ],true); + if(result.bool){ + const {result:result2}=await player.chooseTarget(`将${get.translation(result.links)}交给一名其他角色`,lib.filter.notMe,true).set('ai',target=>{ + return get.attitude(get.player(),target); + }); + if(result2.bool){ + cards.removeArray(result.links); + const target=result2.targets[0]; + player.line(target,'green'); + await target.gain(result.links,'gain2').set('giver',player); + } + } + const next=player.chooseToMove(); + next.set('list',[ + ['牌堆顶',cards.filterInD()], + ['牌堆底'], + ]); + next.set('prompt','问天:点击将牌移动到牌堆顶或牌堆底'); + next.processAI=list=>{ + const cards=list[0][1],player=_status.event.player; + const top=[]; + const judges=player.getCards('j'); + let stopped=false; + if(!player.hasWuxie()){ + for(let i=0;ijudge(b)-judge(a)); + if(judge(cards[0])<0){ + stopped=true;break; + } + else{ + top.unshift(cards.shift()); + } + } + } + let bottom; + if(!stopped){ + cards.sort((a,b)=>get.value(b,player)-get.value(a,player)); + while(cards.length){ + if(get.value(cards[0],player)<=5) break; + top.unshift(cards.shift()); + } + } + bottom=cards; + return [top,bottom]; + } + const {result:{moved}}=await next; + const top=moved[0]; + const bottom=moved[1]; + top.reverse(); + game.cardsGotoPile( + top.concat(bottom), + ['top_cards',top], + (event,card)=>{ + if(event.top_cards.includes(card)) return ui.cardPile.firstChild; + return null; + } + ); + player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下'); + game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶'); + game.asyncDelayx(); + }, + subSkill:{ + viewas:{ + audio:'jsrgwentian', + enable:'chooseToUse', + filter:function(event,player){ + for(const name of ['wuxie','huogong']){ + if(event.filterCard({name},player,event)) return true; + } + return false; + }, + hiddenCard:function(player,name){ + if(player.isTempBanned('jsrgwentian')) return false; + return name=='wuxie'; + }, + viewAs:function(cards,player){ + const event=get.event(),filter=event._backup.filterCard; + for(const name of ['wuxie','huogong']){ + if(filter({name},player,event)) return {name}; + } + return null; + }, + filterCard:()=>false, + selectCard:-1, + prompt:function(){ + const player=get.player(); + const event=get.event(),filter=event._backup.filterCard; + let str='将牌堆顶的牌当【'; + for(const name of ['wuxie','huogong']){ + if(filter({name},player,event)){ + str+=get.translation(name); break; + } + } + str+='】使用'; + return str; + }, + precontent(){ + player.logSkill('jsrgwentian'); + const cards=get.cards(); + event.result.cards=cards; + delete event.result.skill; + game.cardsGotoOrdering(cards); + const color=event.result.card.name=='wuxie'?'black':'red'; + if(get.color(cards,false)!=color){ + player.tempBanSkill('jsrgwentian'); + } + } + } + } + }, + jsrgchushi:{ + audio:2, + enable:'phaseUse', + usable:1, + filter(event,player){ + const zhu=get.zhu(player); + if(!zhu||!zhu.isZhu2()) return false; + return !player.isZhu2(); + }, + async content(event,trigger,player){ + player.chooseToDebate(game.filterPlayer(current=>{ + return current==player||current.isZhu2(); + })).set('callback',async event=>{ + const result=event.debateResult; + if(result.bool&&result.opinion){ + const {opinion,targets}=result; + targets.sortBySeat(); + if(opinion=='red'){ + do{ + for(const current of targets){ + await current.draw(); + } + } + while(targets.map(current=>{ + return current.countCards('h'); + }).reduce((p,c)=>{ + return p+c; + },0)<7); + } + else{ + player.addMark('jsrgchushi_add',1,false); + player.addTempSkill('jsrgchushi_add','roundStart'); + } + } + }) + }, + subSkill:{ + add:{ + audio:'jsrgchushi', + trigger:{source:'damageBegin1'}, + filter:function(event){ + return event.hasNature('linked'); + }, + forced:true, + charlotte:true, + onremove:true, + async content(_,trigger,player){ + trigger.num+=player.countMark('jsrgchushi_add'); + }, + ai:{ + damageBonus:true, + skillTagFilter:function(player,tag,arg){ + if(tag==='damageBonus') return arg&&arg.card&&game.hasNature(arg.card,'linked'); + } + }, + intro:{ + content:'造成的属性伤害+#', + } + } + } + }, + jsrgyinlve:{ + audio:2, + trigger:{ + global:'damageBegin4', + }, + filter:function(event,player){ + return event.player.isIn()&&['fire','thunder'].some(n=>!player.hasSkill(`jsrgyinlve_${n}`)&&event.hasNature(n)); + }, + check:function(event,player){ + if(get.damageEffect(event.player,event.source,player,get.natureList(event.nature))<-5) return true; + return false; + }, + logTarget:'player', + async content(event,trigger,player){ + trigger.cancel(); + const natures=['fire','thunder']; + let index; + if(natures.every(n=>!player.hasSkill(`jsrgyinlve_${n}`)&&trigger.hasNature(n))){ + const {result}=await player.chooseControl(['摸牌阶段','弃牌阶段']).set('prompt','请选择要新回合内仅有的阶段'); + index=result.index; + } + else index=[0,1].find(i=>!player.hasSkill(`jsrgyinlve_${natures[i]}`)&&trigger.hasNature(natures[i])); + player.addTempSkill(`jsrgyinlve_${natures[index]}`,'roundStart'); + player.insertPhase().set('phaseList',[['phaseDraw','phaseDiscard'][index]]); + }, + subSkill:{ + fire:{charlotte:true}, + thunder:{charlotte:true}, + } + }, + //姜维 + jsrgjinfa:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:true, + position:'h', + discard:false, + lose:false, + delay:false, + check:function(){ + return 1+Math.random(); + }, + async content(event,trigger,player){ + await player.showCards(event.cards); + player.chooseToDebate(game.filterPlayer(current=>{ + return current.maxHp<=player.maxHp; + })).set('callback',async (event)=>{ + const result=event.debateResult; + if(result.bool&&result.opinion){ + const {cards:fixedCards}=event.getParent('jsrgjinfa'); + const color=get.color(fixedCards); + const {opinion,targets}=result; + if(opinion==color){ + const {result}=await player.chooseTarget('是否令至多两名参与议事的角色将手牌摸至体力上限?',[1,2],(card,player,target)=>{ + return get.event('targets').includes(target); + }).set('targets',targets).set('ai',target=>{ + const player=get.player(); + const att=get.attitude(player,target); + if(att<=0) return -1; + return att*Math.sqrt(Math.max(0.1,target.maxHp-target.countCards('h'))); + }); + if(result.bool){ + const targets=result.targets; + targets.sortBySeat(); + player.line(targets,'green'); + for(const current of targets){ + if(current.countCards('h'){ + if(!get.event('change')) return 'cancel2'; + const controls=get.event('controls'); + const groups=['wei','shu'].filter(g=>controls.includes(g)); + if(groups.length) return groups.randomGet(); + return controls.randomGet(); + }).set('change',['wei','shu'].includes(player.group)?(Math.random()<0.5):true); + if(control!='cancel2'){ + player.popup(control+'2',get.groupnature(control,'raw')); + player.changeGroup(control); + } + } + }); + }, + ai:{ + order:function(item,player){ + if(player.countCards('h')==1) return 10; + return 1; + }, + result:{ + player:1, + }, + } + }, + jsrgfumou:{ + audio:2, + trigger:{global:'chooseToDebateAfter'}, + groupSkill:true, + forced:true, + locked:false, + filter:function(event,player){ + if(player.group!='wei') return false; + if(!event.targets.includes(player)) return false; + if(event.red.some(i=>i[0]==player)) return event.black.length; + if(event.black.some(i=>i[0]==player)) return event.red.length; + return false; + }, + async content(event,trigger,player){ + const targets=[]; + if(trigger.red.some(i=>i[0]==player)) targets.addArray(trigger.black.map(i=>i[0])); + if(trigger.black.some(i=>i[0]==player)) targets.addArray(trigger.red.map(i=>i[0])); + player.line(targets,'thunder'); + targets.forEach(target=>{ + target.addTempSkill('jsrgfumou_forbid'); + target.markAuto('jsrgfumou_forbid',['red','black'].filter(color=>{ + return trigger[color].some(i=>i[0]==target); + })) + }); + game.broadcastAll(targets=>{ + lib.skill.jsrgfumou_backup.targets=targets; + },targets); + const next=player.chooseToUse(); + next.set('openskilldialog',`是否将一张【影】当【出其不意】对一名与你意见不同的角色使用?`); + next.set('norestore',true); + next.set('_backupevent','jsrgfumou_backup'); + next.set('custom',{ + add:{}, + replace:{window:function(){}} + }); + next.backup('jsrgfumou_backup'); + }, + subSkill:{ + backup:{ + filterCard:function(card){ + return get.itemtype(card)=='card'&&get.name(card)=='ying'; + }, + viewAs:{ + name:'chuqibuyi', + }, + selectCard:1, + position:'hs', + log:false, + filterTarget:function(card,player,target){ + const targets=lib.skill.jsrgfumou_backup.targets; + if(!targets.includes(target)||ui.selected.targets.containsSome(targets)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }, + ai1:function(card){ + return 6-get.value(card); + }, + precontent:function(){ + delete event.result.skill; + }, + }, + forbid:{ + charlotte:true, + onremove:true, + mod:{ + cardEnabled:function(card,player){ + if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false; + }, + cardRespondable:function(card,player){ + if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false; + }, + cardSavable:function(card,player){ + if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false; + }, + }, + mark:true, + intro:{ + content:'本回合不能使用或打出$牌', + }, + } + } + }, + jsrgxuanfeng:{ + audio:2, + enable:'chooseToUse', + filterCard:{name:'ying'}, + position:'hs', + groupSkill:true, + locked:false, + viewAs:{ + name:'sha', + nature:'stab', + storage:{jsrgxuanfeng:true}, + }, + viewAsFilter(player){ + if(player.group!='shu') return false; + if(!player.countCards('hs','ying')) return false; + }, + prompt:'将一张【影】当无距离和次数限制的刺【杀】使用', + check(card){ + const val=get.value(card); + return 5-val; + }, + mod:{ + targetInRange:function(card,player,target){ + if(card.storage&&card.storage.jsrgxuanfeng) return true; + }, + cardUsable:function(card){ + if(card.storage&&card.storage.jsrgxuanfeng) return Infinity; + } + }, + ai:{ + order:2, + } + }, + //陆逊 + jsrgyoujin:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter(event,player){ + return game.hasPlayer(current=>{ + return player.canCompare(current); + }); + }, + direct:true, + async content(event,trigger,player){ + const {result}=await player.chooseTarget(get.prompt2('jsrgyoujin'),(card,player,target)=>{ + return player.canCompare(target); + }).set('ai',target=>{ + if(!get.event('goon')) return 0; + return -get.attitude(get.player(),target); + }).set('goon',player.countCards('hs',['shan','caochuan'])||player.getHp()>=3); + if(!result.bool) return event.finish(); + const {targets}=result,target=targets[0]; + player.logSkill('jsrgyoujin',target); + const {result:result2}=await player.chooseToCompare(target).set('small',true); + player.addTempSkill('jsrgyoujin_forbid'); + player.markAuto('jsrgyoujin_forbid',[result2.num1]); + target.addTempSkill('jsrgyoujin_forbid'); + target.markAuto('jsrgyoujin_forbid',[result2.num2]); + if(!result2.tie){ + const targets=[target,player]; + if(result2.bool) targets.reverse(); + const sha=new lib.element.VCard({name:'sha'}); + if(targets[0].canUse(sha,targets[1],false)){ + targets[0].useCard(sha,targets[1],false); + } + } + }, + subSkill:{ + forbid:{ + charlotte:true, + onremove:true, + mod:{ + cardEnabled2:function(card,player){ + if(get.itemtype(card)=='card'&&player.getStorage('jsrgyoujin_forbid').some(num=>num>get.number(card))) return false; + }, + }, + mark:true, + intro:{ + content:'本回合不能使用或打出点数小于$的手牌', + }, + } + } + }, + jsrgdailao:{ + audio:2, + enable:'phaseUse', + filter(event,player){ + return !player.hasCard(card=>{ + return player.hasUseTarget(card); + }); + }, + async content(event,trigger,player){ + await player.showHandcards(); + await player.draw(2); + const evt=event.getParent('phase'); + if(evt){ + game.resetSkills(); + _status.event=evt; + _status.event.finish(); + _status.event.untrigger(true); + } + }, + ai:{ + order:0.0001, + result:{player:1}, + } + }, + jsrgzhubei:{ + audio:2, + trigger:{source:'damageBegin1'}, + forced:true, + init(player){ + player.addSkill('jsrgzhubei_record'); + }, + filter(event,player){ + return event.player.hasHistory('damage',evt=>{ + return evt.source==player; + }); + }, + logTarget:'player', + async content(event,trigger,player){ + trigger.num++; + }, + subSkill:{ + record:{ + trigger:{ + global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + charlotte:true, + silent:true, + filter(event,player){ + return game.hasPlayer(current=>{ + if(current.countCards('h')) return false; + const evt=event.getl(current); + return evt&&evt.hs&&evt.hs.length; + }); + }, + async content(event,trigger,player){ + game.countPlayer(current=>{ + if(current.countCards('h')) return false; + const evt=trigger.getl(current); + if(evt&&evt.hs&&evt.hs.length) current.addTempSkill('jsrgzhubei_lost'); + }); + }, + }, + lost:{charlotte:true}, + }, + mod:{ + cardUsableTarget(card,player,target){ + if(target.hasSkill('jsrgzhubei_lost')) return true; + }, + }, + }, + //赵云 + jsrglonglin:{ + audio:2, + trigger:{ + global:'useCardToPlayered', + }, + usable:1, + filter(event,player){ + if(event.player==player) return false; + if(event.card.name!='sha') return false; + return event.isFirstTarget&&event.player.isPhaseUsing(); + }, + direct:true, + async content(event,trigger,player){ + const juedou=new lib.element.VCard({name:'juedou',storage:{jsrglonglin:true}}); + const {result}=await player.chooseToDiscard(get.prompt2('jsrglonglin'),'he').set('ai',card=>{ + if(get.event('goon')) return 5-get.value(card); + return 0; + }).set('goon',(trigger.player.canUse(juedou,player)?Math.max(0,get.effect(player,juedou,trigger.player,trigger.player)):0)+trigger.targets.map(target=>{ + return get.effect(target,trigger.card,trigger.player,player); + }).reduce((p,c)=>{ + return p+c; + },0)<-4).set('logSkill',['jsrglonglin',trigger.player]); + if(result.bool){ + trigger.targets.length=0; + trigger.all_excluded=true; + game.asyncDelayx(); + if(trigger.player.canUse(juedou,player)){ + const {result}=await trigger.player.chooseBool(`是否视为对${get.translation(player)}使用一张【决斗】?`).set('choice',get.effect(player,juedou,trigger.player,trigger.player)>=0); + if(result.bool){ + player.addTempSkill('jsrglonglin_source'); + trigger.player.useCard(juedou,player); + } + } + } + }, + subSkill:{ + source:{ + trigger:{source:'damageSource'}, + charlotte:true, + forced:true, + popup:false, + filter(event,player){ + return event.card&&event.card.storage&&event.card.storage.jsrglonglin; + }, + async content(event,trigger,player){ + player.line(trigger.player); + trigger.player.addTempSkill('jsrglonglin_forbid'); + } + }, + forbid:{ + mod:{ + cardEnabled:function(card,player){ + if(!card.cards) return; + if(card.cards.some(cardx=>get.position(cardx)=='h')) return false; + }, + cardSavable:function(card,player){ + if(!card.cards) return; + if(card.cards.some(cardx=>get.position(cardx)=='h')) return false; + }, + }, + charlotte:true, + mark:true, + intro:{ + content:'不能使用手牌', + }, + }, + }, + }, + jsrgzhendan:{ + audio:2, + trigger:{ + player:'damageEnd', + global:'roundStart', + }, + filter(event,player){ + let count=0; + let roundCount=1+(event.name!='damage'); + const curLen=player.actionHistory.length; + for(let i=curLen-1;i>=0;i--){ + if(roundCount==1&&game.hasPlayer(current=>{ + const history=current.actionHistory[i]; + if(!history.isMe||history.isSkipped) return false; + return true; + })){ + count++; + } + if(player.actionHistory[i].isRound) roundCount--; + if(roundCount<=0) break; + } + if(!player.storage.jsrgzhendan_mark&&count>0) return true; + return false; + }, + forced:true, + locked:false, + group:'jsrgzhendan_viewas', + async content(event,trigger,player){ + let count=0; + let roundCount=1+(trigger.name!='damage'); + const curLen=player.actionHistory.length; + for(let i=curLen-1;i>=0;i--){ + if(roundCount==1&&game.hasPlayer(current=>{ + const history=current.actionHistory[i]; + if(!history.isMe||history.isSkipped) return false; + return true; + })){ + count++; + } + if(player.actionHistory[i].isRound) roundCount--; + if(roundCount<=0) break; + } + count=Math.min(5,count); + await player.draw(count); + if(trigger.name=='damage'){ + player.tempBanSkill('jsrgzhendan','roundStart'); + player.storage.jsrgzhendan_mark=true; + player.when({global:'roundStart'}).assign({ + lastDo:true, + }).then(()=>{ + delete player.storage.jsrgzhendan_mark; + }); + } + }, + subSkill:{ + viewas:{ + audio:'jsrgzhendan', + enable:['chooseToUse','chooseToRespond'], + filter(event,player){ + if(event.type=='wuxie') return false; + if(!_status.connectMode&&!player.countCards('hs',card=>{ + return get.type2(card)!='basic'; + })) return false; + return get.inpileVCardList(info=>{ + if(info[0]!='basic') return false; + return event.filterCard({name:info[2],nature:info[3]},player,event); + }).length; + }, + chooseButton:{ + dialog(event,player){ + const vcards=get.inpileVCardList(info=>{ + if(info[0]!='basic') return false; + return event.filterCard({name:info[2],nature:info[3]},player,event); + }); + return ui.create.dialog('镇胆',[vcards,'vcard']); + }, + check(button){ + if(get.event().getParent().type!='phase') return 1; + return get.player().getUseValue({name:button.link[2],nature:button.link[3]}); + }, + backup(links,player){ + return { + audio:'jsrgzhendan', + popname:true, + viewAs:{name:links[0][2],nature:links[0][3]}, + filterCard(card,player){ + return get.type2(card)!='basic'; + }, + selectCard:1, + position:'hs', + } + }, + prompt(links,player){ + return '将一张非基本手牌当'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用或打出'; + } + }, + hiddenCard(player,name){ + return get.type(name)=='basic'&&player.countCards('hs')>0; + }, + ai:{ + respondSha:true, + respondShan:true, + skillTagFilter(player){ + return player.countCards('hs')>0; + }, + order:0.5, + result:{ + player(player){ + if(get.event().dying){ + return get.attitude(player,get.event().dying); + } + return 1; + }, + }, + }, + }, + viewas_backup:{}, + } + }, + //司马懿 + jsrgyingshi:{ + audio:2, + trigger:{player:'turnOverAfter'}, + async content(event,trigger,player){ + const number=(game.dead.length>2)?5:3; + const cards=get.bottomCards(number); + game.cardsGotoOrdering(cards); + const next=player.chooseToMove(); + next.set('list',[ + ['牌堆顶'], + ['牌堆底',cards.reverse()], + ]); + next.set('prompt','鹰眎:点击将牌移动到牌堆顶或牌堆底'); + next.processAI=list=>{ + const cards=list[0][1],player=_status.event.player; + const top=[]; + const judges=player.getCards('j'); + let stopped=false; + if(!player.hasWuxie()){ + for(let i=0;ijudge(b)-judge(a)); + if(judge(cards[0])<0){ + stopped=true;break; + } + else{ + top.unshift(cards.shift()); + } + } + } + let bottom; + if(!stopped){ + cards.sort((a,b)=>get.value(b,player)-get.value(a,player)); + while(cards.length){ + if(get.value(cards[0],player)<=5) break; + top.unshift(cards.shift()); + } + } + bottom=cards; + return [top,bottom]; + } + const {result:{moved}}=await next; + const top=moved[0]; + const bottom=moved[1]; + top.reverse(); + game.cardsGotoPile( + top.concat(bottom), + ['top_cards',top], + (event,card)=>{ + if(event.top_cards.includes(card)) return ui.cardPile.firstChild; + return null; + } + ); + player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下'); + game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶'); + game.asyncDelayx(); + }, + }, + jsrgtuigu:{ + audio:2, + trigger:{player:'phaseBegin'}, + prompt2(event,player){ + const num=Math.floor(game.countPlayer()/2); + return `你翻面,令你本回合的手牌上限+${num},摸${get.cnNumber(num)}张牌,视为使用一张【解甲归田】(目标角色不能使用这些牌直到其下回合结束)。`; + }, + group:['jsrgtuigu_insert','jsrgtuigu_recover'], + async content(event,trigger,player){ + await player.turnOver(); + const num=Math.floor(game.countPlayer()/2); + player.addTempSkill('jsrgtuigu_handcard'); + player.addMark('jsrgtuigu_handcard',num,false); + await player.draw(num); + const jiejia=new lib.element.VCard({name:'jiejia',storage:{jsrgtuigu:true}}); + if(player.hasUseTarget(jiejia)){ + player.addTempSkill('jsrgtuigu_block'); + player.chooseUseTarget(jiejia,true); + } + }, + subSkill:{ + insert:{ + audio:'jsrgtuigu', + trigger:{global:'roundStart'}, + filter(event,player){ + const curLen=player.actionHistory.length; + if(curLen<=2) return false; + for(let i=curLen-2;i>=0;i--){ + const history=player.actionHistory[i]; + if(history.isMe&&!history.isSkipped) return false; + if(history.isRound) break; + } + return true; + }, + forced:true, + locked:false, + async content(event,trigger,player){ + const evt=trigger; + player.insertPhase(); + if(evt.player!=player&&!evt._finished){ + evt.finish(); + evt._triggered=5; + evt.player.insertPhase(); + } + }, + }, + recover:{ + audio:'jsrgtuigu', + trigger:{ + player:'loseAfter', + global:['gainAfter','equipAfter','addJudgeAfter','loseAsyncAfter','addToExpansionAfter'], + }, + filter(event,player){ + const evt=event.getl(player); + return evt&&evt.es&&evt.es.length>0; + }, + forced:true, + locked:false, + async content(event,trigger,player){ + player.recover(); + } + }, + handcard:{ + markimage:'image/card/handcard.png', + intro:{ + content(storage,player){ + return '手牌上限+'+storage; + } + }, + charlotte:true, + mod:{ + maxHandcard(player,num){ + return num+player.countMark('jsrgtuigu_handcard'); + } + }, + }, + block:{ + trigger:{global:'gainAfter'}, + filter(event,player){ + if(event.getParent().name!='jiejia') return false; + const card=event.getParent(2).card; + if(card&&card.storage&&card.storage.jsrgtuigu) return true; + return false; + }, + charlotte:true, + forced:true, + silent:true, + async content(event,trigger,player){ + trigger.player.addGaintag(trigger.cards,'jsrgtuigu'); + trigger.player.addTempSkill('jsrgtuigu_blocked',{player:'phaseAfter'}); + } + }, + blocked:{ + mod:{ + cardEnabled2(card){ + if(get.itemtype(card)=='card'&&card.hasGaintag('jsrgtuigu')) return false; + }, + }, + charlotte:true, + forced:true, + popup:false, + onremove(player){ + player.removeGaintag('jsrgtuigu'); + }, + }, + } + }, + //郭循 + jsrgeqian:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + filter(event,player){ + if(!event.isFirstTarget||event.targets.length!=1||event.target==player) return false; + if(event.card.name=='sha') return true; + return event.getParent(3).name=='xumou_jsrg'; + }, + prompt2(event,player){ + return `令${get.translation(event.card)}不计入次数限制,且你获得${get.translation(event.target)}一张牌,然后其可以令你本回合至其的距离+2`; + }, + group:'jsrgeqian_prepare', + async content(event,trigger,player){ + if(trigger.addCount!==false){ + trigger.addCount=false; + var stat=player.getStat().card,name=trigger.card.name; + if(typeof stat[name]=='number') stat[name]--; + } + await player.gainPlayerCard(trigger.target,'he',true); + const {result:{bool}}=await trigger.target.chooseBool(`是否令${get.translation(player)}至你的距离于本回合内+2?`).set('ai',()=>true); + if(bool){ + player.addTempSkill('jsrgeqian_distance'); + if(!player.storage.jsrgeqian_distance) player.storage.jsrgeqian_distance={}; + const id=trigger.target.playerid; + if(typeof player.storage.jsrgeqian_distance[id]!='number') player.storage.jsrgeqian_distance[id]=0; + player.storage.jsrgeqian_distance[id]+=2; + player.markSkill('jsrgeqian_distance'); + } + }, + subSkill:{ + prepare:{ + audio:'jsrgeqian', + trigger:{player:'phaseJieshuBegin'}, + filter(event,player){ + return player.countCards('h'); + }, + direct:true, + async content(event,trigger,player){ + while(true){ + const {result:{bool,cards}}=await player.chooseCard(get.prompt('jsrgeqian'),'你可以蓄谋任意次').set('ai',card=>{ + const player=get.player(); + if(player.hasValueTarget(card)) return player.getUseValue(card); + return 0; + }); + if(!bool) break; + player.addJudge({name:'xumou_jsrg'},cards); + } + }, + }, + distance:{ + onremove:true, + charlotte:true, + mod:{ + globalFrom(player,target,distance){ + if(!player.storage.jsrgeqian_distance) return; + const dis=player.storage.jsrgeqian_distance[target.playerid]; + if(typeof dis=='number') return distance+dis; + }, + }, + intro:{ + content(storage,player){ + if(!storage) return; + const map=(_status.connectMode?lib.playerOL:game.playerMap); + let str=`你本回合:`; + for(const id in storage){ + str+='
  • 至'+get.translation(map[id])+'的距离+'+storage[id]; + } + return str; + } + } + }, + } + }, + jsrgfusha:{ + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'fire', + filter(event,player){ + return game.countPlayer(current=>{ + return player.inRange(current); + })==1; + }, + filterTarget(card,player,target){ + return player.inRange(target); + }, + selectTarget:-1, + async content(event,trigger,player){ + player.awakenSkill('jsrgfusha'); + event.target.damage(Math.min(game.countPlayer(),player.getAttackRange())); + }, + ai:{ + order:1, + result:{ + target:-2, + }, + }, + }, + //大小虎 + jsrgdaimou:{ + audio:2, + trigger:{ + global:'useCardToPlayer', + }, + filter(event,player){ + if(event.card.name!='sha') return false; + if(event.target!=player) return !player.hasSkill('jsrgdaimou_other'); + return !player.hasSkill('jsrgdaimou_me')&&player.hasCard(card=>{ + return (card.viewAs||card.name)=='xumou_jsrg'&&lib.filter.cardDiscardable(card,player,'jsrgdaimou'); + },'j'); + }, + direct:true, + async content(event,trigger,player){ + if(trigger.target==player){ + player.logSkill('jsrgdaimou'); + player.addTempSkill('jsrgdaimou_me'); + const {result:{bool,links}}=await player.chooseButton([ + '殆谋:请弃置区域里的一张蓄谋牌', + player.getCards('j',card=>{ + return (card.viewAs||card.name)=='xumou_jsrg'; + }) + ],true).set('filterButton',button=>{ + return lib.filter.cardDiscardable(button.link,get.player(),'jsrgdaimou'); + }).set('ai',button=>{ + const player=get.player(); + return 1/Math.max(0.01,player.getUseValue(button.link)); + }); + if(bool){ + player.discard(links); + } + } + else{ + const {result:{bool}}=await player.chooseBool(get.prompt('jsrgdaimou'),'你可以用牌堆顶的牌蓄谋').set('ai',()=>true); + if(bool){ + player.logSkill('jsrgdaimou'); + player.addTempSkill('jsrgdaimou_other'); + player.addJudge({name:'xumou_jsrg'},get.cards()); + } + } + }, + subSkill:{ + me:{charlotte:true}, + other:{charlotte:true}, + }, + }, + jsrgfangjie:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + async content(event,trigger,player){ + if(!player.hasCard(card=>{ + return (card.viewAs||card.name)=='xumou_jsrg'; + },'j')){ + player.logSkill('jsrgfangjie'); + await player.recover(); + await player.draw(); + } + else{ + const {result:{bool,links}}=await player.chooseButton([ + '是否弃置区域里的任意张蓄谋牌并失去〖芳洁〗?', + player.getCards('j',card=>{ + return (card.viewAs||card.name)=='xumou_jsrg'; + }) + ],[1,Infinity]).set('filterButton',button=>{ + return lib.filter.cardDiscardable(button.link,get.player(),'jsrgdaimou'); + }).set('ai',()=>0); + if(bool){ + player.logSkill('jsrgfangjie'); + await player.discard(links); + player.removeSkillLog('jsrgfangjie'); + } + } + }, + }, + //曹芳 + jsrgzhaotu:{ + audio:2, + enable:'chooseToUse', + viewAs:{name:'lebu'}, + position:'hes', + filterCard(card,player){ + return get.color(card)=='red'&&get.type2(card)!='trick'; + }, + onuse(result,player){ + player.tempBanSkill('jsrgzhaotu',null,false); + result.targets[0].insertPhase(); + result.targets[0].addTempSkill('jsrgzhaotu_handcard',{player:'phaseAfter'}); + result.targets[0].addMark('jsrgzhaotu_handcard',2,false); + }, + subSkill:{ + handcard:{ + intro:{ + content(storage,player){ + return '手牌上限-'+storage; + } + }, + charlotte:true, + mod:{ + maxHandcard(player,num){ + return num-player.countMark('jsrgzhaotu_handcard'); + } + }, + }, + }, + ai:{ + order:5, + result:{ + target(player,target){ + if(player.hasSkill('jsrgjingju')||player.hasZhuSkill('jsrgweizhui')) return get.attitude(player,target); + return -1; + }, + }, + }, + }, + jsrgjingju:{ + audio:2, + enable:'chooseToUse', + filter(event,player){ + if(event.type=='wuxie'||event.jsrgjingju) return false; + if(!player.canMoveCard(null,false,game.filterPlayer(i=>i!=player),player,card=>{ + return get.position(card)=='j'; + })) return false; + return get.inpileVCardList(info=>{ + if(info[0]!='basic') return false; + return event.filterCard({name:info[2],nature:info[3]},player,event); + }).length; + }, + chooseButton:{ + dialog:function(event,player){ + const vcards=get.inpileVCardList(info=>{ + if(info[0]!='basic') return false; + return event.filterCard({name:info[2],nature:info[3]},player,event); + }); + return ui.create.dialog('惊惧',[vcards,'vcard'],'hidden'); + }, + check:function(button){ + if(get.event().getParent().type!='phase') return 1; + return get.player().getUseValue({name:button.link[2],nature:button.link[3]}); + }, + backup:function(links,player){ + return { + filterCard:()=>false, + viewAs:{ + name:links[0][2], + nature:links[0][3], + isCard:true, + }, + selectCard:-1, + precontent(){ + 'step 0' + player.moveCard(`惊惧:将其他角色判定区里的牌移动至你的判定区`,game.filterPlayer(i=>i!=player),player,card=>{ + return get.position(card)=='j'; + }).set('logSkill','jsrgjingju'); + 'step 1' + if(result.bool){ + delete event.result.skill; + } + else{ + event.getParent().jsrgjingju=true; + event.getParent().goto(0); + delete event.getParent().openskilldialog; + event.finish(); + } + 'step 2' + game.delayx(); + }, + } + }, + prompt:function(links,player){ + return '选择'+get.translation(links[0][3]||'')+'【'+get.translation(links[0][2])+'】的目标'; + } + }, + ai:{ + order:function(){ + const player=get.player(),event=_status.event; + if(player.canMoveCard(null,false,game.filterPlayer(),player,card=>{ + return get.position(card)=='j'; + })){ + if(event.type=='dying'){ + if(event.filterCard({name:'tao'},player,event)){ + return 0.5; + } + } + else{ + if(event.filterCard({name:'tao'},player,event)||event.filterCard({name:'shan'},player,event)){ + return 4; + } + if(event.filterCard({name:'sha'},player,event)){ + return 2.9; + } + } + } + return 0; + }, + save:true, + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag,arg){ + return player.canMoveCard(null,false,game.filterPlayer(),player,card=>{ + return get.position(card)=='j'; + }) + }, + result:{ + player:function(player){ + if(get.event().type=='dying'){ + return get.attitude(player,get.event().dying); + } + return 1; + } + } + } + }, + jsrgweizhui:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + zhuSkill:true, + direct:true, + filter(event,player){ + return player!=event.player&&event.player.group=='wei'&&event.player.isIn()&&player.hasZhuSkill('jsrgweizhui',event.player); + }, + async content(event,trigger,player){ + const {result:{bool,cards}}=await trigger.player.chooseCard(`是否响应${get.translation(player)}的主公技【危坠】?`,'将一张黑色手牌当【过河拆桥】对其使用',(card,player)=>{ + if(get.color(card)!='black') return false; + return player.canUse(get.autoViewAs({name:'guohe'},[card]),get.event('target')); + }).set('target',player).set('ai',card=>{ + if(get.effect(get.event('target'),get.autoViewAs({name:'guohe'},[card]),player)<=0) return 0; + return 6-get.value(card); + }); + if(bool){ + trigger.player.logSkill('jsrgweizhui',player); + trigger.player.useCard(get.autoViewAs({name:'guohe'},cards),cards,player); + } + }, + }, + //孙峻 + jsrgyaoyan:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + prompt:'是否发动【邀宴】?', + logTarget:()=>game.filterPlayer(), + async content(event,trigger,player){ + const targets=game.filterPlayer(); + const toDebateList=[]; + while(targets.length){ + const current=targets.shift(); + const {result:{bool}}=await current.chooseBool(`是否响应${get.translation(player)}的【邀宴】,于回合结束参与议事?`).set('ai',()=>Math.random()<0.5); + if(bool){ + toDebateList.add(current); + current.popup('同意','wood'); + game.log(current,'#g同意','参加',player,'的议事'); + } + else{ + current.popup('拒绝','fire'); + game.log(current,'#r拒绝','参加',player,'的议事'); + } + } + if(toDebateList.length){ + player.addTempSkill('jsrgyaoyan_hold'); + player.markAuto('jsrgyaoyan_hold',toDebateList); + } + }, + subSkill:{ + hold:{ + trigger:{player:'phaseEnd'}, + charlotte:true, + forced:true, + popup:false, + onremove:true, + filter(event,player){ + return player.getStorage('jsrgyaoyan_hold').some(i=>i.isIn()); + }, + async content(event,trigger,player){ + player.chooseToDebate(player.getStorage('jsrgyaoyan_hold').filter(i=>i.isIn())).set('callback',async event=>{ + const {bool,opinion,targets}=event.debateResult; + if(bool&&opinion){ + if(opinion=='red'){ + const notDebated=game.filterPlayer().removeArray(targets); + if(notDebated.length){ + const {result}=await player.chooseTarget('获得任意名未议事的角色的各一张手牌',[1,Infinity],true,(card,player,target)=>{ + return get.event('targets').includes(target)&&target.countGainableCards(player,'h'); + }).set('targets',notDebated).set('ai',target=>{ + const player=get.player(); + const att=get.attitude(player,target); + return -att; + }); + if(result.bool){ + const targets=result.targets; + targets.sortBySeat(); + player.line(targets,'green'); + for(const current of targets){ + await player.gainPlayerCard(current,'h',true); + } + } + } + } + else{ + const {result:{bool,targets:targets2}}=await player.chooseTarget('是否对一名议事的角色造成2点伤害?',(card,player,target)=>{ + return get.event('targets').includes(target); + }).set('targets',targets).set('ai',target=>{ + const player=get.player(); + const eff=get.damageEffect(target,player,player); + return eff; + }); + if(bool){ + player.line(targets2[0]); + targets2[0].damage(2); + } + } + } + }); + }, + } + } + }, + jsrgbazheng:{ + audio:2, + trigger:{global:'debateShowOpinion'}, + filter(event,player){ + if(!event.targets.includes(player)) return false; + const damagedPlayers=player.getHistory('sourceDamage').map(evt=>evt.player).toUniqued(); + let dissent; + const colors=['red','black']; + for(const color of colors){ + if(event[color].some(i=>i[0]==player)){ + dissent=colors.find(i=>i!=color); + break; + } + } + return event[dissent].some(i=>damagedPlayers.includes(i[0])); + }, + forced:true, + locked:false, + direct:true, + async content(event,trigger,player){ + let myOpinion,dissent; + const colors=['red','black']; + for(const color of colors){ + if(trigger[color].some(i=>i[0]==player)){ + myOpinion=color; + dissent=colors.find(i=>i!=color); + break; + } + } + const damagedPlayers=player.getHistory('sourceDamage').map(evt=>evt.player).toUniqued(); + let dissident=[]; + for(let i=0;iget.suit(card)=='heart')){ + await get.owner(trigger.cards.find(card=>get.suit(card)=='heart')).recover(); + } + player.addTempSkill('jsrgdanxin_distance'); + if(!player.storage.jsrgdanxin_distance) player.storage.jsrgdanxin_distance={}; + const id=targets[0].playerid; + if(typeof player.storage.jsrgdanxin_distance[id]!='number') player.storage.jsrgdanxin_distance[id]=0; + player.storage.jsrgdanxin_distance[id]++; + player.markSkill('jsrgdanxin_distance'); + }, + }, + distance:{ + onremove:true, + charlotte:true, + mod:{ + globalFrom(player,target,distance){ + if(!player.storage.jsrgdanxin_distance) return; + const dis=player.storage.jsrgdanxin_distance[target.playerid]; + if(typeof dis=='number') return distance+dis; + }, + }, + intro:{ + content(storage,player){ + if(!storage) return; + const map=(_status.connectMode?lib.playerOL:game.playerMap); + let str=`你本回合:`; + for(const id in storage){ + str+='
  • 至'+get.translation(map[id])+'的距离+'+storage[id]; + } + return str; + } + } + }, + } + }, + jsrgfengxiang:{ + audio:'fengxiang', + trigger:{player:'damageEnd'}, + forced:true, + direct:true, + filter(event,player){ + return game.hasPlayer(current=>{ + return current.countCards('e'); + }) + }, + async content(event,trigger,player){ + const {result:{bool,targets}}=await player.chooseTarget('封乡:与一名其他角色交换装备区里的所有牌',(card,player,target)=>{ + return target.countCards('e')+player.countCards('e')>0&&player!=target; + },true).set('ai',target=>{ + const player=get.player(); + const att=get.attitude(player,target); + const delta=get.value(target.getCards('e'),player)-get.value(player.getCards('e'),player); + if(att>0){ + if(delta<0) delta+=att/3; + } + else{ + if(delta<0) delta-=att/3; + } + return delta; + }); + if(bool){ + player.logSkill('jsrgfengxiang',targets[0]); + const num=player.countCards('e'); + await player.swapEquip(targets[0]); + const delta=num-player.countCards('e'); + if(delta>0) player.draw(delta); + } + }, + }, + jsrgfuhai:{ + audio:'xinfu_fuhai', + enable:'phaseUse', + usable:1, + filter(event,player){ + return game.hasPlayer(current=>{ + return current.countCards('h')&¤t!=player; + }) + }, + filterTarget(card,player,target){ + return target.countCards('h')&&target!=player; + }, + selectTarget:-1, + multitarget:true, + multiline:true, + async content(event,trigger,player){ + const targets=event.targets.sortBySeat(); + const next=player.chooseCardOL(targets,'请展示一张手牌',true).set('ai',card=>{ + return -get.value(card); + }).set('aiCard',target=>{ + const hs=target.getCards('h'); + return {bool:true,cards:[hs.randomGet()]}; + }); + next._args.remove('glow_result'); + const {result}=await next; + const cards=[]; + const videoId=lib.status.videoId++; + for(let i=0;i{ + var dialog=ui.create.dialog(get.translation(player)+'发动了【浮海】',cards); + dialog.videoId=id; + const getName=(target)=>{ + if(target._tempTranslate) return target._tempTranslate; + var name=target.name; + if(lib.translate[name+'_ab']) return lib.translate[name+'_ab']; + return get.translation(name); + } + for(let i=0;iincrease){ + increase=number; + flag=true; + } + else increase=Infinity; + if(numberget.event('choice')).set('choice',clock>anticlock?0:1) + player.draw(index==0?clock:anticlock); + }, + ai:{ + order:8, + result:{player:1}, + } + }, + //张嫙 + jsrgtongli:{ + audio:'tongli', + trigger:{player:'useCardToPlayered'}, + filter(event,player){ + if(!event.isFirstTarget) return false; + const type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + const hs=player.getCards('h'); + if(!hs.length) return false; + const evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + const num1=player.getHistory('useCard',evtx=>{ + return evtx.getParent('phaseUse')==evt; + }).length; + if(hs.length{ + let str='奢葬'; + if(player==game.me&&!_status.auto){ + str+=':获得任意张花色各不相同的牌'; + } + const dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,videoId,cards); + const time=get.utc(); + game.addVideo('showCards',player,['奢葬',get.cardsInfo(event.cards)]); + game.addVideo('delay',null,2); + const list=[]; + for(const i of cards) list.add(get.suit(i,false)); + const next=player.chooseButton([1,list.length]); + next.set('dialog',event.videoId); + next.set('filterButton',function(button){ + for(var i=0;i0){ + await game.asyncDelay(0,time2); + } + game.broadcastAll('closeDialog',videoId); + player.gain(result.links,'gain2'); + } + }, + }, + jsrgchiying:{ + audio:'dcchiying', + enable:'phaseUse', + usable:1, + filterTarget:true, + async content(event,trigger,player){ + const target=event.target; + const targets=game.filterPlayer(current=>target.inRange(current)&¤t!=player).sortBySeat(player); + if(!targets.length) return event.finish(); + while(targets.length){ + const current=targets.shift(); + if(current.countCards('he')) await current.chooseToDiscard('驰应:请弃置一张牌','he',true); + } + let cards=[]; + game.getGlobalHistory('cardMove',evt=>{ + if(evt.getParent(3)==event){ + cards.addArray(evt.cards.filter(card=>get.type(card)=='basic')); + } + }); + if(cards.length<=target.getHp()){ + cards=cards.filterInD('d'); + if(cards.length) target.gain(cards,'gain2'); + } + }, + ai:{ + order:6, + result:{ + target(player,target){ + const targets=game.filterPlayer(current=>target.inRange(current)&¤t!=player); + let eff=0; + for(const targetx of targets){ + const effx=get.effect(targetx,{name:'guohe_copy2'},player,target); + if(get.attitude(player,targetx)<0) effx/=2; + eff+=effx; + } + return eff*(get.attitude(player,target)<=0?0.75:1); + } + } + } + }, + //郭照 + jsrgpianchong:{ + audio:'pianchong', + trigger:{global:'phaseJieshuBegin'}, + filter(event,player){ + return player.getHistory('lose').length; + }, + frequent:true, + async content(event,trigger,player){ + player.judge().set('callback',()=>{ + const red=[],black=[]; + game.getGlobalHistory('cardMove',evt=>{ + if(evt.name!='cardsDiscard'){ + if(evt.name!='lose'||evt.position!=ui.discardPile) return false; + } + const cards=evt.cards.filter(card=>get.position(card,true)=='d'); + red.addArray(cards.filter(i=>get.color(i,false)=='red')); + black.addArray(cards.filter(i=>get.color(i,false)=='black')); + }); + if(event.judgeResult.color=='red'&&red.length){ + player.draw(red.length); + } + else if(event.judgeResult.color=='black'&&black.length){ + player.draw(black.length); + } + }) + }, + }, + jsrgzunwei:{ + audio:'zunwei', + enable:'phaseUse', + usable:1, + filter(event,player){ + const storage=player.getStorage('jsrgzunwei'); + return storage.length<3&&game.hasPlayer(current=>{ + return player.isDamaged()&¤t.getHp()>player.getHp()&&!storage.includes(2)|| + current.countCards('h')>player.countCards('h')&&!storage.includes(0)|| + current.countCards('e')>player.countCards('e')&&!storage.includes(1); + }); + }, + chooseButton:{ + dialog(event,player){ + const list=[ + '选择手牌数大于你的一名角色', + '选择装备数大于你的一名角色', + '选择体力值大于你的一名角色', + ]; + const choiceList=ui.create.dialog('尊位:请选择一项','forcebutton','hidden'); + choiceList.add([list.map((item,i)=>{ + if(player.getStorage('jsrgzunwei').includes(i)) item=`${item}`; + return [i,item]; + }),'textbutton']) + return choiceList; + }, + filter(button){ + const player=get.player(); + if(player.getStorage('jsrgzunwei').includes(button.link)) return false; + if(button.link==2){ + if(!player.isDamaged()) return false; + return game.hasPlayer(current=>{ + return current.getHp()>player.getHp(); + }); + } + if(button.link==0){ + return game.hasPlayer(current=>{ + return current.countCards('h')>player.countCards('h'); + }); + } + if(button.link==1){ + return game.hasPlayer(current=>{ + return current.countCards('e')>player.countCards('e'); + }); + } + }, + backup(links){ + const next=get.copy(lib.skill.jsrgzunwei.backups[links[0]]); + next.audio='zunwei'; + next.filterCard=function(){return false}; + next.selectCard=-1; + return next; + }, + check(button){ + const player=get.player(); + switch(button.link){ + case 2:{ + const target=game.findPlayer(function(current){ + return current.isMaxHp(); + }); + return (Math.min(target.hp,player.maxHp)-player.hp)*2; + } + case 0:{ + const target=game.findPlayer(function(current){ + return current.isMaxHandcard(); + }); + return Math.min(5,target.countCards('h')-player.countCards('h'))*0.8; + } + case 1:{ + const target=game.findPlayer(function(current){ + return current.isMaxEquip(); + }); + return (target.countCards('e')-player.countCards('e'))*1.4; + } + } + }, + prompt(links){ + return [ + '选择一名手牌数大于你的其他角色,将手牌数摸至与其相同(至多摸五张)', + '选择一名装备区内牌数大于你的其他角色,将其装备区里的牌移至你的装备区,直到你装备数不小于其', + '选择一名体力值大于你的其他角色,将体力值回复至与其相同', + ][links[0]]; + }, + }, + backups:[ + { + filterTarget(card,player,target){ + return target.countCards('h')>player.countCards('h'); + }, + async content(event,trigger,player){ + player.draw(Math.min(5,event.target.countCards('h')-player.countCards('h'))); + if(!player.storage.jsrgzunwei) player.storage.jsrgzunwei=[]; + player.storage.jsrgzunwei.add(0); + }, + ai:{ + order:10, + result:{ + player:function(player,target){ + return Math.min(5,target.countCards('h')-player.countCards('h')); + }, + }, + }, + }, + { + filterTarget(card,player,target){ + return target.countCards('e')>player.countCards('e'); + }, + async content(event,trigger,player){ + if(!player.storage.jsrgzunwei) player.storage.jsrgzunwei=[]; + player.storage.jsrgzunwei.add(1); + const target=event.target; + do{ + if(!target.countCards('e',card=>{ + return player.canEquip(card); + })) break; + const {result:{bool,links}}=await player.chooseButton([ + `尊位:将${get.translation(target)}的一张装备牌移至你的区域内`, + target.getCards('e') + ],true).set('filterButton',button=>{ + return get.player().canEquip(button.link); + }).set('ai',get.buttonValue); + if(bool){ + target.$give(links[0],player,false); + await player.equip(links[0]); + } + } + while(player.countCards('e')player.hp; + }, + async content(event,trigger,player){ + player.recover(event.target.hp-player.hp); + if(!player.storage.jsrgzunwei) player.storage.jsrgzunwei=[]; + player.storage.jsrgzunwei.add(2); + }, + ai:{ + order:10, + result:{ + player:function(player,target){ + return (Math.min(target.hp,player.maxHp)-player.hp); + }, + }, + }, + }, + ], + ai:{ + order:10, + result:{ + player:1, + }, + }, + subSkill:{ + backup:{}, + } + }, //江山如故·转 //404郭嘉 jsrgqingzi:{ @@ -935,7 +2803,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai1:function(card){ var player=get.player(); var maxVal=5.5; - if(get.name(card,false)=='ying'&&player.hasSkill('jsrgchuaxin')) maxVal-=3; + if(get.name(card,false)=='ying'&&player.hasSkill('jsrgchuanxin')) maxVal-=3; return maxVal-get.value(card); }, precontent:function(){ @@ -6329,6 +8197,94 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jsrg_fanjiangzhangda_prefix:'转', jsrgfushan:'负山', jsrgfushan_info:'出牌阶段开始时,所有其他角色可以依次交给你一张牌并令你此阶段使用【杀】的次数上限+1。此阶段结束时,若你使用【杀】的次数未达到上限且此阶段以此法交给你牌的角色均存活,你失去2点体力,否则你将手牌摸至体力上限。', + jsrg_zhugeliang:'梦诸葛亮', + jsrg_zhugeliang_prefix:'梦', + jsrgwentian:'问天', + jsrgwentian_info:'①你可以将牌堆顶的牌当【无懈可击】/【火攻】使用,若此牌不为黑色/红色,〖问天〗于本回合失效。②每回合限一次。你的一个阶段开始时,你可以观看牌堆顶的五张牌,然后将其中一张牌交给一名其他角色,将其余牌以任意顺序置于牌堆顶或牌堆底。', + jsrgchushi:'出师', + jsrgchushi_info:'出牌阶段限一次。若你不为主公,你可以与主公议事。若结果为:红色,你与其各摸一张牌,若你与其手牌数之和小于7,重复此流程;黑色,当你于本轮内造成属性伤害时,此伤害+1。', + jsrgyinlve:'隐略', + jsrgyinlve_info:'每轮各限一次。当一名角色受到火焰/雷电伤害时,你可以防止此伤害,然后于当前回合结束后执行一个只有摸牌/弃牌阶段的回合。', + jsrg_jiangwei:'合姜维', + jsrg_jiangwei_prefix:'合', + jsrgjinfa:'矜伐', + jsrgjinfa_info:'出牌阶段限一次。你可以展示一张手牌,然后令所有体力上限不大于你的角色议事。若结果与此牌颜色:相同,你令其中至多两名角色将手牌摸至体力上限;不同,你获得两张【影】。然后若没有其他角色与你意见相同,你可以变更势力。', + jsrgfumou:'复谋', + jsrgfumou_info:'魏势力技。当你议事结算结束后,与你意见不同的角色本回合不能使用或打出与其意见颜色相同的牌,你可以将一张【影】当【出其不意】对一名与你意见不同的角色使用。', + jsrgxuanfeng:'选锋', + jsrgxuanfeng_info:'蜀势力技。你可以将一张【影】当无距离和次数限制的刺【杀】使用。', + jsrg_luxun:'合陆逊', + jsrg_luxun_prefix:'合', + jsrgyoujin:'诱进', + jsrgyoujin_info:'出牌阶段开始时,你可以与一名角色拼点,你与其本回合不能使用或打出点数小于自己拼点牌的手牌,且赢的角色视为对没赢的角色使用一张【杀】。', + jsrgdailao:'待劳', + jsrgdailao_info:'出牌阶段,若你没有可以使用的手牌,你可以展示所有手牌并摸两张牌,然后结束此回合。', + jsrgzhubei:'逐北', + jsrgzhubei_info:'锁定技。①当你对本回合受到过伤害的角色造成伤害时,此伤害+1。②你对本回合失去过最后手牌的角色使用牌无次数限制。', + jsrg_zhaoyun:'合赵云', + jsrg_zhaoyun_prefix:'合', + jsrglonglin:'龙临', + jsrglonglin_info:'其他角色于其出牌阶段内首次使用【杀】指定第一个目标后,你可以弃置一张牌令此【杀】无效,然后其可以视为对你使用一张【决斗】,你以此法造成伤害后,其本阶段不能再使用手牌。', + jsrgzhendan:'镇胆', + jsrgzhendan_info:'①你可以将一张非基本手牌当任意基本牌使用或打出。②当你受到伤害后,你摸X张牌并令该技能本轮失效(X为本轮所有角色执行过的回合数且至多为5)。③一轮游戏开始时,若上一轮该技能未因〖镇胆②〗失效过,你摸Y张牌(Y为上一轮所有角色执行过的回合数且至多为5)。', + jsrg_simayi:'合司马懿', + jsrg_simayi_prefix:'合', + jsrgyingshi:'鹰眎', + jsrgyingshi_info:'当你翻面时,你可以观看牌堆底的三张牌(若死亡角色数大于2则改为五张),然后将其中任意数量的牌以任意顺序置于牌堆顶,其余以任意顺序置于牌堆底。', + jsrgtuigu:'蜕骨', + jsrgtuigu_info:'①回合开始时,你可以翻面并令你本回合的手牌上限+X,然后摸X张牌并视为使用一张【解甲归田】(X为存活角色数的一半,向下取整),目标角色不能使用以此法得到的牌直到其回合结束。②一轮游戏开始时,若你上一轮未执行过回合,你获得一个额外的回合。③当你失去装备牌里的牌后,你回复1点体力。', + jsrg_guoxun:'合郭循', + jsrg_guoxun_prefix:'合', + jsrgeqian:'遏前', + jsrgeqian_info:'①结束阶段,你可以蓄谋任意次。②当你使用【杀】或蓄谋牌指定其他角色为唯一目标后,你可以令此牌不计入次数限制并获得目标一张牌,然后其可以令你本回合至其的距离+2。', + jsrgfusha:'伏杀', + jsrgfusha_info:'限定技。出牌阶段,若你的攻击范围内仅有一名角色,你可以对其造成X点伤害(X为你的攻击范围,至多为游戏人数)。', + jsrg_sunlubansunluyu:'合孙鲁班孙鲁育', + jsrg_sunlubansunluyu_prefix:'合', + jsrgdaimou:'殆谋', + jsrgdaimou_info:'每回合各限一次。当一名角色使用【杀】指定其他角色/你为目标时,你可以用牌堆顶的牌蓄谋/你须弃置你区域里的一张蓄谋牌。', + jsrgfangjie:'芳洁', + jsrgfangjie_info:'准备阶段,若你没有蓄谋牌,你回复1点体力并摸一张牌,否则你可以弃置你区域里的任意张蓄谋牌并失去〖芳洁〗。', + jsrg_caofang:'合曹芳', + jsrg_caofang_prefix:'合', + jsrgzhaotu:'诏图', + jsrgzhaotu_info:'每轮限一次。你可以将一张红色非锦囊牌当【乐不思蜀】使用,然后当前回合结束后,目标执行一个手牌上限-2的额外回合。', + jsrgjingju:'惊惧', + jsrgjingju_info:'当你需要使用任意一种基本牌时,你可以将其他角色判定区里的一张牌移动至你的判定区,视为你使用之。', + jsrgweizhui:'危坠', + jsrgweizhui_info:'主公技。其他魏势力角色的结束阶段,其可以将一张黑色手牌当【过河拆桥】对你使用。', + jsrg_sunjun:'合孙峻', + jsrg_sunjun_prefix:'合', + jsrgyaoyan:'邀宴', + jsrgyaoyan_info:'准备阶段,你可以令所有角色依次选择是否于回合结束时议事,若议事结果为:红色,你获得任意名未议事的角色各一张手牌;黑色,你可以对一名议事的角色造成2点伤害。', + jsrgbazheng:'霸政', + jsrgbazheng_info:'当你参与的议事展示意见时,本回合受到过你伤害的角色意见视为与你相同。', + jsrg_liuyong:'合刘永', + jsrg_liuyong_prefix:'合', + jsrgdanxin:'丹心', + jsrgdanxin_info:'你可以将一张牌当【推心置腹】使用,你展示以此法交出与得到的牌,以此法得到♥牌的角色回复1点体力,然后你至目标角色的距离+1直到回合结束。', + jsrgfengxiang:'封乡', + jsrgfengxiang_info:'锁定技。当你受到伤害后,你与一名其他角色交换装备区里的所有牌。若你装备区里的牌因此减少,你摸等同于减少牌数的牌。', + jsrg_weiwenzhugezhi:'合卫温诸葛直', + jsrg_weiwenzhugezhi_prefix:'合', + jsrgfuhai:'浮海', + jsrgfuhai_info:'出牌阶段限一次。你可以令所有有手牌的其他角色同时展示一张手牌,然后你选择一个方向并摸X张牌(X为该方向上的角色展示的点数连续严格递增或严格递减的牌数,至少为1)。', + jsrg_zhangxuan:'合张嫙', + jsrg_zhangxuan_prefix:'合', + jsrgtongli:'同礼', + jsrgtongli_info:'当你于出牌阶段内使用基本牌或普通锦囊牌指定第一个目标后,若你手牌中的花色数和你于本阶段内使用过的牌数相等,则你可以展示所有手牌,令此牌额外结算一次。', + jsrgshezang:'奢葬', + jsrgshezang_info:'每轮限一次。当你或你回合内的其他角色进入濒死状态时,你可以亮出牌堆顶的四张牌,获得其中任意张花色各不相同的牌。', + jsrg_gaoxiang:'合高翔', + jsrg_gaoxiang_prefix:'合', + jsrgchiying:'驰应', + jsrgchiying_info:'出牌阶段限一次。你可以选择一名角色,令其攻击范围内的其他角色依次弃置一张牌。若以此法弃置的基本牌数不大于其体力值,其获得这些基本牌。', + jsrg_guozhao:'合郭照', + jsrg_guozhao_prefix:'合', + jsrgpianchong:'偏宠', + jsrgpianchong_info:'一名角色的结束阶段,若你于此回合内失去过牌,你可以判定。若结果为红色/黑色,你摸此回合进入弃牌堆的红色/黑色牌数量的牌。', + jsrgzunwei:'尊位', + jsrgzunwei_info:'出牌阶段限一次。你可以选择一名其他角色并选择执行一项,然后移除该选项:1.将手牌数摸至与该角色相同(最多摸五张);2.将其装备牌移至你的装备区,直到你装备区的牌数不少于其;3.将体力值回复至与该角色相同。', xumou_jsrg:'蓄谋', xumou_jsrg_info:'“蓄谋”牌可在判定区内重复存在。判定阶段开始时,你选择一项:⒈使用此牌对应的实体牌,然后本阶段不能再使用此牌名的牌;⒉将所有的“蓄谋”牌置入弃牌堆。', @@ -6336,6 +8292,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jiangshanrugu_qi:'江山如故·起', jiangshanrugu_cheng:'江山如故·承', jiangshanrugu_zhuan:'江山如故·转', + jiangshanrugu_he:'江山如故·合', }, }; }); diff --git a/character/mobile.js b/character/mobile.js index 07b1b1fe0..37218e870 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -15391,7 +15391,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhanggong:['zhanggong','re_zhanggong'], baosanniang:['xin_baosanniang','re_baosanniang','baosanniang'], heqi:['re_heqi','heqi'], - weiwenzhugezhi:['weiwenzhugezhi','re_weiwenzhugezhi'], + weiwenzhugezhi:['weiwenzhugezhi','re_weiwenzhugezhi','jsrg_weiwenzhugezhi'], xugong:['xugong','re_xugong','jsrg_xugong'], liuzan:['re_liuzan','liuzan'], sufei:['yj_sufei','sp_sufei','xf_sufei'], diff --git a/character/shenhua.js b/character/shenhua.js index 95ce88be9..222262139 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -7714,7 +7714,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dongzhuo:['dongzhuo','ol_dongzhuo','re_dongzhuo','sp_dongzhuo','yj_dongzhuo'], dengai:['dengai','ol_dengai','re_dengai'], sp_ol_zhanghe:['sp_ol_zhanghe','yj_zhanghe','sp_zhanghe','jsrg_zhanghe'], - jiangwei:['jiangwei','ol_jiangwei','re_jiangwei','sb_jiangwei'], + jiangwei:['jiangwei','ol_jiangwei','re_jiangwei','sb_jiangwei','jsrg_jiangwei'], liushan:['liushan','ol_liushan','re_liushan'], sunce:['sunce','re_sunce','re_sunben','sb_sunce'], zhangzhang:['zhangzhang','ol_zhangzhang','re_zhangzhang'], diff --git a/character/sp.js b/character/sp.js index 57854724a..5c3e0ab60 100755 --- a/character/sp.js +++ b/character/sp.js @@ -13360,7 +13360,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, direct:true, filter:function(event,player){ - return player!=event.player&&!event.player.isDisabledJudge()&&event.player.countCards('he')&&!event.player.countCards('j'); + return player!=event.player&&!event.player.isDisabledJudge()&&event.player.countCards('he')&&!event.player.countCards('j',{type:'delay'}); }, content:function(){ 'step 0' @@ -26332,7 +26332,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ retuogu:'托孤', retuogu_info:'一名角色死亡时,你可以令其选择其武将牌上的一个技能(主公技,限定技,觉醒技,隐匿技、使命技等特殊技能除外),然后你获得其选择的技能并失去上次因〖托孤〗获得的技能。', shanzhuan:'擅专', - shanzhuan_info:'当你对其他角色造成伤害后,若其判定区没有牌,则你可以将其的一张牌置于其的判定区。若此牌不为延时锦囊牌且此牌为:红色,此牌视为【乐不思蜀】;黑色,此牌视为【兵粮寸断】。回合结束时,若你本回合内未造成伤害,你可摸一张牌。', + shanzhuan_info:'①当你对其他角色造成伤害后,若其判定区没有延时类锦囊牌,则你可以将其的一张牌置于其的判定区。若此牌不为延时锦囊牌且此牌为:红色,此牌视为【乐不思蜀】;黑色,此牌视为【兵粮寸断】。②回合结束时,若你本回合内未造成伤害,你可摸一张牌。', spniluan:'逆乱', spniluan_info:'出牌阶段,你可以将一张黑色牌当做【杀】使用。此【杀】使用结算完成后,若你未因此【杀】造成过伤害,则你令此【杀】不计入使用次数。', spweiwu:'违忤', diff --git a/character/standard.js b/character/standard.js index a026971f6..ba5e193e6 100755 --- a/character/standard.js +++ b/character/standard.js @@ -2325,7 +2325,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterReplace:{ caocao:['caocao','re_caocao','sb_caocao','dc_caocao'], guojia:['guojia','re_guojia','ps1059_guojia','ps2070_guojia'], - simayi:['simayi','re_simayi','ps_simayi','ps2068_simayi'], + simayi:['simayi','re_simayi','jsrg_simayi','ps_simayi','ps2068_simayi'], jin_simayi:['jin_simayi','junk_simayi','ps_jin_simayi'], zhenji:['zhenji','re_zhenji','sb_zhenji','yj_zhenji'], xuzhu:['xuzhu','re_xuzhu'], @@ -2335,15 +2335,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liubei:['liubei','re_liubei','sb_liubei','dc_liubei','junk_liubei'], guanyu:['guanyu','re_guanyu','ps_guanyu','old_guanyu'], zhangfei:['zhangfei','re_zhangfei','old_zhangfei','xin_zhangfei','sb_zhangfei','tw_zhangfei','jsrg_zhangfei','yj_zhangfei'], - zhaoyun:['zhaoyun','re_zhaoyun','old_zhaoyun','sb_zhaoyun','ps2063_zhaoyun','ps2067_zhaoyun'], + zhaoyun:['zhaoyun','re_zhaoyun','old_zhaoyun','sb_zhaoyun','jsrg_zhaoyun','ps2063_zhaoyun','ps2067_zhaoyun'], sp_zhaoyun:['sp_zhaoyun','jsp_zhaoyun'], machao:['machao','re_machao','sb_machao','ps_machao'], sp_machao:['sp_machao','dc_sp_machao','jsrg_machao','old_machao'], - zhugeliang:['zhugeliang','re_zhugeliang','ps2066_zhugeliang','ps_zhugeliang','sb_zhugeliang'], + zhugeliang:['zhugeliang','re_zhugeliang','sb_zhugeliang','jsrg_zhugeliang','ps2066_zhugeliang','ps_zhugeliang'], huangyueying:['huangyueying','re_huangyueying','junk_huangyueying','sb_huangyueying'], sunquan:['sunquan','re_sunquan','sb_sunquan','dc_sunquan'], zhouyu:['zhouyu','re_zhouyu','sb_zhouyu','ps1062_zhouyu','ps2080_zhouyu'], - luxun:['luxun','re_luxun'], + luxun:['luxun','re_luxun','jsrg_luxun'], lvmeng:['lvmeng','re_lvmeng','sb_lvmeng'], huanggai:['huanggai','re_huanggai','sb_huanggai'], daqiao:['daqiao','re_daqiao','sb_daqiao'], diff --git a/character/xianding.js b/character/xianding.js index 5b240138a..a958de99c 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -13524,7 +13524,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fengfangnv:['fengfangnv','re_fengfangnv'], luotong:['dc_luotong','luotong'], dc_wangchang:['dc_wangchang','tw_wangchang'], - guozhao:['guozhao','xin_guozhao'], + guozhao:['guozhao','xin_guozhao','jsrg_guozhao'], dingshangwan:['dingshangwan','ol_dingshangwan'], }, translate:{ diff --git a/image/character/jsrg_caofang.jpg b/image/character/jsrg_caofang.jpg new file mode 100644 index 000000000..c9260f90b Binary files /dev/null and b/image/character/jsrg_caofang.jpg differ diff --git a/image/character/jsrg_gaoxiang.jpg b/image/character/jsrg_gaoxiang.jpg new file mode 100644 index 000000000..d2abd8ec8 Binary files /dev/null and b/image/character/jsrg_gaoxiang.jpg differ diff --git a/image/character/jsrg_guoxun.jpg b/image/character/jsrg_guoxun.jpg new file mode 100644 index 000000000..9dab9d780 Binary files /dev/null and b/image/character/jsrg_guoxun.jpg differ diff --git a/image/character/jsrg_guozhao.jpg b/image/character/jsrg_guozhao.jpg new file mode 100644 index 000000000..cf5826644 Binary files /dev/null and b/image/character/jsrg_guozhao.jpg differ diff --git a/image/character/jsrg_jiangwei.jpg b/image/character/jsrg_jiangwei.jpg new file mode 100644 index 000000000..29b66240e Binary files /dev/null and b/image/character/jsrg_jiangwei.jpg differ diff --git a/image/character/jsrg_liuyong.jpg b/image/character/jsrg_liuyong.jpg new file mode 100644 index 000000000..57363374f Binary files /dev/null and b/image/character/jsrg_liuyong.jpg differ diff --git a/image/character/jsrg_luxun.jpg b/image/character/jsrg_luxun.jpg new file mode 100644 index 000000000..30d02d27a Binary files /dev/null and b/image/character/jsrg_luxun.jpg differ diff --git a/image/character/jsrg_simayi.jpg b/image/character/jsrg_simayi.jpg new file mode 100644 index 000000000..e16231af7 Binary files /dev/null and b/image/character/jsrg_simayi.jpg differ diff --git a/image/character/jsrg_sunjun.jpg b/image/character/jsrg_sunjun.jpg new file mode 100644 index 000000000..659080375 Binary files /dev/null and b/image/character/jsrg_sunjun.jpg differ diff --git a/image/character/jsrg_sunlubansunluyu.jpg b/image/character/jsrg_sunlubansunluyu.jpg new file mode 100644 index 000000000..86656bc1a Binary files /dev/null and b/image/character/jsrg_sunlubansunluyu.jpg differ diff --git a/image/character/jsrg_weiwenzhugezhi.jpg b/image/character/jsrg_weiwenzhugezhi.jpg new file mode 100644 index 000000000..f75f46082 Binary files /dev/null and b/image/character/jsrg_weiwenzhugezhi.jpg differ diff --git a/image/character/jsrg_zhangxuan.jpg b/image/character/jsrg_zhangxuan.jpg new file mode 100644 index 000000000..6e877f117 Binary files /dev/null and b/image/character/jsrg_zhangxuan.jpg differ diff --git a/image/character/jsrg_zhaoyun.jpg b/image/character/jsrg_zhaoyun.jpg new file mode 100644 index 000000000..3168751e0 Binary files /dev/null and b/image/character/jsrg_zhaoyun.jpg differ diff --git a/image/character/jsrg_zhugeliang.jpg b/image/character/jsrg_zhugeliang.jpg new file mode 100644 index 000000000..4b16a866b Binary files /dev/null and b/image/character/jsrg_zhugeliang.jpg differ diff --git a/noname/game/index.js b/noname/game/index.js index f38cd8cb7..ad55dc55f 100644 --- a/noname/game/index.js +++ b/noname/game/index.js @@ -6017,7 +6017,18 @@ export class Game extends Uninstantable { if (info.usable && get.skillCount(skills2[i]) >= info.usable) enable = false; if (info.chooseButton && _status.event.noButton) enable = false; if (info.round && (info.round - (game.roundNumber - player.storage[skills2[i] + '_roundcount']) > 0)) enable = false; - if (player.storage[`temp_ban_${skills2[i]}`] === true) enable = false; + for (const item in player.storage) { + if (item.startsWith('temp_ban_')) { + if(player.storage[item] !== true) continue; + const skillName = item.slice(9); + if (lib.skill[skillName]) { + const skills=game.expandSkills([skillName]); + if(skills.includes(skills2[i])) { + enable = false; break; + } + } + } + } } if (enable) { if (event.isMine() || !event._aiexclude.includes(skills2[i])) { diff --git a/noname/get/index.js b/noname/get/index.js index f38faf096..cf07f4b35 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -3014,7 +3014,16 @@ export class Get extends Uninstantable { var js = node.getCards('j'); for (var i = 0; i < js.length; i++) { if (js[i].viewAs && js[i].viewAs != js[i].name) { - uiintro.add('
    ' + js[i].outerHTML + '
    ' + lib.translate[js[i].viewAs] + ':' + lib.translate[js[i].viewAs + '_info'] + '
    '); + let html = js[i].outerHTML; + let cardInfo = lib.card[js[i].viewAs], showCardIntro=true; + if (cardInfo.blankCard) { + var cardOwner = get.owner(js[i]); + if (cardOwner && !cardOwner.isUnderControl(true)) showCardIntro = false; + } + if (!showCardIntro) { + html=ui.create.button(js[i],'blank').outerHTML; + } + uiintro.add('
    ' + html + '
    ' + lib.translate[js[i].viewAs] + ':' + lib.translate[js[i].viewAs + '_info'] + '
    '); } else { uiintro.add('
    ' + js[i].outerHTML + '
    ' + lib.translate[js[i].name + '_info'] + '
    '); @@ -3484,7 +3493,7 @@ export class Get extends Uninstantable { const defaultYingbianEffect = get.defaultYingbianEffect(node.link || node); if (lib.yingbian.prompt.has(defaultYingbianEffect)) yingbianEffects.push(defaultYingbianEffect); } - if (yingbianEffects.length) uiintro.add(`
    应变:${yingbianEffects.map(value => lib.yingbian.prompt.get(value)).join(';')}
    `); + if (yingbianEffects.length && showCardIntro) uiintro.add(`
    应变:${yingbianEffects.map(value => lib.yingbian.prompt.get(value)).join(';')}
    `); } if (lib.translate[name + '_append']) { uiintro.add('
    ' + lib.translate[name + '_append'] + '
    '); diff --git a/noname/library/element/content.js b/noname/library/element/content.js index 59d53f4cf..62ccb6803 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -476,6 +476,9 @@ export const Content = { else black.push([target, card]); } event.red = red; event.black = black; + event.trigger('debateShowOpinion'); + 'step 2' + var red = event.red, black = event.black; if (red.length) { game.log(red.map(function (i) { return i[0]; @@ -528,7 +531,7 @@ export const Content = { dialog.open(); }, get.translation(player), event.videoId, red, black); game.delay(4); - 'step 2'; + 'step 3'; game.broadcastAll('closeDialog', event.videoId); var opinion = null; if (event.red.length > event.black.length) opinion = 'red'; @@ -542,7 +545,7 @@ export const Content = { black: event.black, targets: event.targets }; - 'step 3'; + 'step 4'; if (event.callback) { var next = game.createEvent('debateCallback', false); next.player = player; diff --git a/noname/library/index.js b/noname/library/index.js index 3d407ab8e..59f0324b3 100644 --- a/noname/library/index.js +++ b/noname/library/index.js @@ -9691,7 +9691,16 @@ export class Library extends Uninstantable { if (typeof info.usable == 'number' && player.hasSkill('counttrigger') && player.storage.counttrigger && player.storage.counttrigger[skill] >= info.usable) return false; if (info.round && (info.round - (game.roundNumber - player.storage[skill + '_roundcount']) > 0)) return false; - if (player.storage[`temp_ban_${skill}`] === true) return false; + for (const item in player.storage) { + if (item.startsWith('temp_ban_')) { + if(player.storage[item] !== true) continue; + const skillName = item.slice(9); + if (lib.skill[skillName]) { + const skills=game.expandSkills([skillName]); + if(skills.includes(skill)) return false; + } + } + } return true; }, characterDisabled: function (i, libCharacter) { @@ -12781,6 +12790,10 @@ export class Library extends Uninstantable { color: '#c3f9ff', nature: 'thundermm', }], + ['合', { + color: '#c3f9ff', + nature: 'thundermm', + }], ['转', { color: '#c3f9ff', nature: 'thundermm',