diff --git a/character/clan.js b/character/clan.js index 0b229f327..a42d8925b 100644 --- a/character/clan.js +++ b/character/clan.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { //clan n.宗派;(尤指苏格兰的)宗族,氏族,家族;庞大的家族;帮派;小集团 @@ -38,7 +38,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'qice', audio:2, trigger:{player:'useCardAfter'}, - filter:function(event,player){ + filter(event,player){ const storage=player.storage.clanbaichu||{}; if(Object.values(storage).includes(event.card.name)) return true; const suit=get.suit(event.card); @@ -48,7 +48,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return !(key in storage) }, forced:true, - content:function(){ + content(){ 'step 0' var storage=player.storage.clanbaichu||{},suit=get.suit(trigger.card); if(suit!='none'){ @@ -92,10 +92,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, intro:{ - markcount:(storage)=>{ + markcount(storage){ return Object.keys(storage).length; }, - content:function(storage){ + content(storage){ if(!storage) return '当前暂无记录'; const keys=Object.keys(storage).map(i=>i.split('+')); keys.sort((a,b)=>{ @@ -114,7 +114,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', filterTarget:lib.filter.notMe, usable:1, - content:function(){ + content(){ 'step 0' var str=get.translation(player); target.chooseControl().set('choiceList',[ @@ -140,7 +140,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:9, result:{ - target:function(player,target){ + target(player,target){ var cards=player.getCards('hs',card=>{ if(get.name(card,player)!='sha'&&get.type(card,player)!='trick') return false; return player.hasValueTarget(card); @@ -165,7 +165,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, intro:{ - content:function(storage,player){ + content(storage,player){ var str=''; for(var i=0;i{ return player.getStorage('clanqiuxin_effect').some(list=>list[0]==target&&list[1]==0); @@ -191,7 +191,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, popup:false, - content:function(){ + content(){ 'step 0' var list; if(trigger.card.name=='sha') list=player.getStorage('clanqiuxin_effect').filter(listx=>trigger.targets.includes(listx[0])&&listx[1]==0); @@ -235,7 +235,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, clanjianyuan:{ inherit:'clanchenya', - filter:function(event,player){ + filter(event,player){ for(var phase of lib.phaseName){ var evt=event.getParent(phase); if(evt&&evt.name==phase){ @@ -244,7 +244,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' var num=0; for(var phase of lib.phaseName){ @@ -267,13 +267,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanjiejian:{ audio:2, trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ + filter(event,player){ if(!event.isFirstTarget||get.type(event.card)=='equip') return false; return get.cardNameLength(event.card)==player.getHistory('useCard').indexOf(event.getParent())+1; }, direct:true, locked:false, - content:function(){ + content(){ 'step 0' var num=get.cardNameLength(trigger.card); event.num=num; @@ -290,7 +290,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ threaten:3, effect:{ - player:(card,player,target)=>{ + player(card,player,target){ if(!target||typeof card!=='object'||player._clanjiejian_mod_temp||get.type(card)==='equip'|| get.attitude(player,target)<=0||get.cardNameLength(card)!==player.getHistory('useCard').length+1) return; let targets=[target],evt=_status.event.getParent('useCard'); @@ -301,7 +301,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(typeof card=='object'&&get.type(card)!=='equip'){ let cs=get.cardNameLength(card)-player.getHistory('useCard').length-1; if(cs<0) return num; @@ -320,12 +320,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanhuanghan:{ audio:2, trigger:{player:'damageEnd'}, - filter:function(event,player){ + filter(event,player){ if(!event.card) return false; var num=get.cardNameLength(event.card); return typeof num=='number'&&num>0; }, - check:function(event,player){ + check(event,player){ let num=get.cardNameLength(event.card)-player.getDamagedHp(); if(num>=0) return true; if(num<-1) return false; @@ -334,7 +334,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).length) return true; return false; }, - content:function(){ + content(){ 'step 0' player.draw(get.cardNameLength(trigger.card)); if(player.isDamaged()) player.chooseToDiscard(player.getDamagedHp(),'he',true); @@ -348,7 +348,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ threaten:3, effect:{ - target:(card,player,target)=>{ + target(card,player,target){ if(!get.tag(card,'damage')||player.hasSkillTag('jueqing',false,target)) return; let num=get.cardNameLength(card)-target.getDamagedHp(); if(num>0) return [1,num+0.1]; @@ -359,7 +359,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //族钟会 clanyuzhi:{ mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(card.name=='tao') return num/114514; }, }, @@ -367,7 +367,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'roundStart'}, direct:true, locked:true, - content:function(){ + content(){ 'step 0' player.unmarkSkill('clanyuzhi'); var num1=0,num2=0,num3=0,bool=true; @@ -430,13 +430,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanxieshu:{ audio:2, trigger:{player:'damageEnd',source:'damageSource'}, - filter:function(event,player){ + filter(event,player){ if(!event.card) return false; var num=get.cardNameLength(event.card); - return typeof num=='number'&&num>0&&player.countCards('he'); + return typeof num=='number'&&num>0&&player.countCards('he')>0; }, direct:true, - content:function(){ + content(){ 'step 0' var num=get.cardNameLength(trigger.card),str=''; if(player.getDamagedHp()>0) str+=('并摸'+get.cnNumber(player.getDamagedHp())+'张牌'); @@ -456,7 +456,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //族王浑 clanfuxun:{ mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(player.isPhaseUsing()&&get.type(card)=='equip'&&get.equipValue(card,player)>0) return num+3; }, }, @@ -469,17 +469,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, delay:false, - selectCard:function(){ + selectCard(){ var player=_status.event.player; if(ui.selected.targets.length&&!ui.selected.targets[0].countGainableCards(player,'h')) return 1; return [0,1]; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player==target) return false; if(!ui.selected.cards.length) return target.countGainableCards(player,'h')>0; return true; }, - check:function(card){ + check(card){ var player=_status.event.player; var evtx=_status.event.getParent('phaseUse'); var targets=game.filterPlayer(target=>target!=player&&lib.skill.clanfuxun.ai.result.target(player,target)!=0); @@ -500,7 +500,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(card.name=='du') return 20; return -1; }, - content:function(){ + content(){ 'step 0' if(cards.length){ player.give(cards,target); @@ -549,13 +549,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ next.set('_backupevent','clanfuxun_backup'); next.set('custom',{ add:{}, - replace:{window:function(){}} + replace:{window(){}} }); next.backup('clanfuxun_backup'); } }, ai:{ - order:function(item,player){ + order(item,player){ var evtx=_status.event.getParent('phaseUse'); if(game.hasPlayer(current=>{ if(current==player||!evtx||get.attitude(player,current)==0) return false; @@ -568,7 +568,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 2; }, result:{ - target:function(player,target){ + target(player,target){ var evtx=_status.event.getParent('phaseUse'); var num=get.sgn(get.attitude(player,target)); var targets=game.filterPlayer(current=>{ @@ -589,19 +589,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, subSkill:{ backup:{ - filterCard:function(card){ + filterCard(card){ return get.itemtype(card)=='card'; }, position:'hes', filterTarget:lib.filter.filterTarget, selectCard:1, - check:function(card){ + check(card){ var player=_status.event.player; if(player.hasSkill('clanzhongliu')&&get.position(card)!='h') return 10-get.value(card); return 5-get.value(card); }, log:false, - precontent:function(){ + precontent(){ delete event.result.skill; }, }, @@ -612,7 +612,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:['useSkillAfter','logSkill'], }, - filter:function(event,player){ + filter(event,player){ if(event.type!='player') return false; var skill=event.sourceSkill||event.skill; var info=get.info(skill); @@ -623,11 +623,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!match||match.every(value=>value!='出牌阶段限一次')) return false; return event.player.countCards('h')>0; }, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.player)>0; }, logTarget:'player', - content:function(){ + content(){ 'step 0' var num=trigger.player.countCards('h'); trigger.player.chooseCard('是否重铸任意张牌名字数为'+num+'的牌?',[1,Infinity],'he',(card,player)=>_status.event.cards.includes(card)&&player.canRecast(card)).set('ai',card=>{ @@ -650,16 +650,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'☯', intro:{ markcount:()=>0, - content:function(storage){ + content(storage){ return '限定技,转换技。你可以将一张'+((storage||0)%2?'黑色牌当【过河拆桥】':'红色牌当【顺手牵羊】')+'使用。'; }, }, - viewAs:function(cards,player){ + viewAs(cards,player){ var storage=player.storage.clanjiexuan; var name=(storage||0)%2?'guohe':'shunshou'; return {name:name}; }, - check:function(card){ + check(card){ var player=_status.event.player; var storage=player.storage.clanjiexuan; var name=(storage||0)%2?'guohe':'shunshou'; @@ -667,18 +667,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return (get.value({name:name},player)-get.value(card))*fix; }, position:'hes', - filterCard:function(card,player){ + filterCard(card,player){ var storage=player.storage.clanjiexuan; return get.color(card)==((storage||0)%2?'black':'red'); }, - prompt:function(){ + prompt(){ var storage=_status.event.player.storage.clanjiexuan; if((storage||0)%2) return '将一张黑色牌当【过河拆桥】使用'; return '将一张红色牌当【顺手牵羊】使用'; }, skillAnimation:true, animationColor:'thunder', - precontent:function(){ + precontent(){ 'step 0' var skill='clanjiexuan'; player.logSkill(skill); @@ -687,7 +687,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delete event.result.skill; }, ai:{ - order:function(item,player){ + order(item,player){ player=player||_status.event.player; var storage=_status.event.player.storage.clanjiexuan; var name=(storage||0)%2?'guohe':'shunshou'; @@ -696,10 +696,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, clanmingjie:{ - init:function(player){ + init(player){ player.addSkill('clanmingjie_record'); }, - initSkill:function(skill){ + initSkill(skill){ if(!lib.skill[skill]){ lib.skill[skill]={ charlotte:true, @@ -711,18 +711,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lib.translate[skill+'_bg']='戒'; } }, - onremove:function(player){ + onremove(player){ player.removeSkill('clanmingjie_record'); }, audio:2, enable:'phaseUse', limited:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.hasSkill('clanmingjie_'+player.playerid); }, skillAnimation:true, animationColor:'thunder', - content:function(){ + content(){ player.awakenSkill('clanmingjie'); player.addSkill('clanmingjie_effect'); var skill='clanmingjie_'+player.playerid; @@ -733,7 +733,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - target:function(player,target){ + target(player,target){ if(player.hasSkill('clanzhongliu')||player.hp==1){ if(!player.hasCard(card=>{ var info=get.info(card); @@ -763,7 +763,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, audio:'clanmingjie', trigger:{player:'useCard2'}, - filter:function(event,player){ + filter(event,player){ var card=event.card; var info=get.info(card); if(info.allowMultiple==false) return false; @@ -776,7 +776,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('clanmingjie_effect'),'令任意【铭戒】目标角色成为'+get.translation(trigger.card)+'的目标',function(card,player,target){ var trigger=_status.event.getTrigger(); @@ -800,7 +800,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ targeted:{ charlotte:true, trigger:{global:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ var cards=player.getStorage('clanmingjie_record').slice(); cards=cards.filterInD('d'); if(!cards.length) return false; @@ -824,7 +824,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, popup:false, - content:function(){ + content(){ 'step 0' var cards=player.getStorage('clanmingjie_record').slice(); cards=cards.filterInD('d'); @@ -855,7 +855,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:['shaMiss','eventNeutralized','useCard1','phaseAfter'], }, - filter:function(event,player){ + filter(event,player){ if(event.name=='useCard'){ return get.suit(event.card)=='spade'; } @@ -865,7 +865,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, silent:true, forced:true, - content:function(){ + content(){ 'step 0' if(trigger.name=='phase'){ delete player.storage.clanmingjie_record; @@ -885,30 +885,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:true, marktext:'☯', intro:{ - content:function(storage){ + content(storage){ return '转换技。出牌阶段限一次,你可以观看'+(storage?'一名角色的至多四张手':'牌堆顶的至多四张')+'牌,然后可以使用其中的一张牌。'; }, }, - filter:function(event,player){ + filter(event,player){ if(player.storage.clanguangu) return game.hasPlayer(current=>{ return current.countCards('h'); }); return true; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var dialog=ui.create.dialog('观骨:选择观看牌堆的牌数','hidden'); if(player.storage.clanguangu) dialog.forceDirect=true; return dialog; }, - chooseControl:function(event,player){ + chooseControl(event,player){ var list=[1,2,3,4].map(i=>{ return get.cnNumber(i,true); }); list.push('cancel2'); return list; }, - check:function(button,player){ + check(button,player){ var ret; if(!player.hasSkill('clanxiaoyong')) ret=4; else{ @@ -922,22 +922,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return get.cnNumber(ret,true); }, - backup:function(result,player){ + backup(result,player){ return { audio:'clanguangu', filterCard:()=>false, selectCard:-1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player.storage.clanguangu) return true; return false; }, - selectTarget:function(){ + selectTarget(){ var player=_status.event.player; if(player.storage.clanguangu) return 1; return -1; }, num:result.index+1, - content:function(){ + content(){ 'step 0' player.changeZhuanhuanji('clanguangu'); if(!targets.length){ @@ -1025,14 +1025,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - target:function(player,target){ + target(player,target){ return -Math.min(target.countCards('h'),4)/2; }, }, } } }, - prompt:function(result){ + prompt(result){ if(result.index>0) return '点击“确定”以观看牌堆顶牌'; return '观骨:选择观看牌的目标'; }, @@ -1052,7 +1052,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:'useCard', }, - filter:function(event,player){ + filter(event,player){ var len=get.cardNameLength(event.card); if(player.hasHistory('useCard',function(evt){ return evt!=event&&get.cardNameLength(evt.card)==len; @@ -1074,13 +1074,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, forced:true, - content:function(){ + content(){ 'step 0' delete player.getStat().skill.clanguangu; game.log(player,'重置了','#g【观骨】'); }, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(!player.hasSkill('clanguangu')||!player.getStat().skill.clanguangu) return; var history=player.getAllHistory('useSkill',evt=>{ return evt.skill=='clanguangu_backup'; @@ -1112,14 +1112,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ limited:true, skillAnimation:true, animationColor:'water', - filter:function(event,player){ + filter(event,player){ return (event.player==player||event.player.hasClan('颍川钟氏'))&&event.player.hp<=0&&!event.player.isLinked(); }, logTarget:'player', - check:function(event,player){ + check(event,player){ return lib.skill.wanlan.check(event,player); }, - content:function(){ + content(){ 'step 0' player.awakenSkill('clanbaozu'); 'step 1' @@ -1132,11 +1132,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0; }, filterTarget:lib.filter.notMe, - content:function(){ + content(){ 'step 0' var num=player.countCards('h'); var str='是否交给其'+get.cnNumber(num)+'张牌,然后视为你对其使用一张【酒】?或者点击“取消”,令其交给你一张牌,然后其视为对你使用一张雷【杀】。'; @@ -1172,12 +1172,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - order:function(item,player){ + order(item,player){ return get.order({name:'jiu'})+0.01; }, threaten:2, result:{ - target:function(player,target){ + target(player,target){ if(player.hasCard(card=>{ return get.value(card)<5&&!['shan','tao','jiu','wuxie','caochuan'].includes(get.name(card)); },'he')) return -1; @@ -1192,7 +1192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard'}, forced:true, clanSkill:true, - filter:function(event,player){ + filter(event,player){ if(!event.cards.length) return true; return !game.hasPlayer2(current=>{ if(!current.hasClan('太原王氏')&¤t!=player) return false; @@ -1201,7 +1201,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }); }, - content:function(){ + content(){ 'step 0' var skills=player.getStockSkills(true,true); game.expandSkills(skills); @@ -1253,7 +1253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:true, marktext:'☯', intro:{ - content:function(storage){ + content(storage){ var str='转换技。每名角色A的出牌阶段限一次。'; if(!storage) str+='A可以重铸一张牌,然后你可以重铸一张牌。若这两张牌颜色不同,则你的手牌上限-1。'; else str+='A可以令你选择一名在你或A攻击范围内的另一名其他角色B,然后A和你可依次选择是否对B使用一张【杀】。若这两张【杀】颜色相同,则你的手牌上限+1'; @@ -1269,21 +1269,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:(event,player)=>game.hasPlayer(current=>lib.skill.clanlianzhu_global.filterTarget(null,player,current)), filterCard:(card,player)=>game.hasPlayer(current=>current.hasSkill('clanlianzhu')&&!current.hasSkill('clanlianzhu_targeted')&&!current.storage.clanlianzhu)&&player.canRecast(card), selectCard:[0,1], - check:function(card){ + check(card){ return 5-get.value(card); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.hasSkill('clanlianzhu')&&!target.hasSkill('clanlianzhu_targeted')&&(!target.storage.clanlianzhu||target.storage.clanlianzhu&&game.hasPlayer(current=>{ if(current==player||current==target) return false; return current.inRangeOf(player)||current.inRangeOf(target); })); }, - selectTarget:function(){ + selectTarget(){ var player=_status.event.player; var count=game.countPlayer(current=>lib.skill.clanlianzhu_global.filterTarget(null,player,current)); return count==1?-1:1; }, - filterOk:function(){ + filterOk(){ var target=ui.selected.targets[0]; if(!target) return false; if(!target.storage.clanlianzhu){ @@ -1295,7 +1295,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, delay:false, - prompt:function(){ + prompt(){ var player=_status.event.player; var bocchi=[],kita=[]; game.countPlayer(function(target){ @@ -1334,7 +1334,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ str+='。'; return str; }, - content:function(){ + content(){ 'step 0' target.addTempSkill('clanlianzhu_targeted','phaseUseAfter'); if(target.storage.clanlianzhu) event.goto(4); @@ -1385,11 +1385,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:4.1, result:{ - player:function(player,target){ + player(player,target){ if(!target.storage.clanlianzhu&&player.hasCard(card=>get.value(card)<5,'he')) return 1; return 0; }, - target:function(player,target){ + target(player,target){ if(target.storage.clanlianzhu&&player.hasSha()) return 1; return 0; } @@ -1403,11 +1403,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanfangzhen:{ audio:2, trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>!current.isLinked()); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('clanfangzhen'),(card,player,target)=>{ return !target.isLinked(); @@ -1493,10 +1493,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, locked:false, charlotte:true, - filter:function(event,player){ + filter(event,player){ return player.getStorage('clanfangzhen_remove').includes(game.roundNumber); }, - content:function(){ + content(){ player.removeSkill('clanfangzhen'); } } @@ -1505,11 +1505,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanliuju:{ audio:2, trigger:{player:'phaseUseEnd'}, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>player.canCompare(current)); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('clanliuju'),'与一名其他角色拼点,输的角色可以使用任意张拼点牌中的非基本牌',(card,player,target)=>{ return player.canCompare(target); @@ -1580,12 +1580,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', viewAs:{name:'wugu'}, filterCard:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player==target) return false; return player.canUse(card,target); }, selectTarget:[1,Infinity], - check:function(card){ + check(card){ return 6-get.value(card); }, position:'he', @@ -1593,7 +1593,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanSkill:true, skillAnimation:true, animationColor:'soil', - precontent:function(){ + precontent(){ player.logSkill('clanxumin'); player.awakenSkill('clanxumin'); delete event.result.skill; @@ -1608,11 +1608,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanlianhe:{ audio:2, trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>!current.isLinked()); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('clanlianhe'),2,(card,player,target)=>{ return !target.isLinked(); @@ -1638,12 +1638,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ locked:false, popup:false, onremove:true, - filter:function(event,player){ + filter(event,player){ return player.getStorage('clanlianhe_effect').includes(event.player); }, marktext:'连', intro:{content:'已选择目标:$'}, - content:function(){ + content(){ 'step 0' player.unmarkAuto('clanlianhe_effect',[trigger.player]); if(trigger.name=='die') event.finish(); @@ -1681,11 +1681,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanhuanjia:{ audio:2, trigger:{player:'phaseUseEnd'}, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>player.canCompare(current)); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('clanhuanjia'),'与一名其他角色拼点,赢的角色可以使用一张拼点牌。若此牌未造成过伤害,你获得另一张拼点牌,否则你失去一个技能',(card,player,target)=>{ return player.canCompare(target); @@ -1781,7 +1781,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardAfter'}, direct:true, forced:true, - filter:function(event,player){ + filter(event,player){ if(!game.hasPlayer(current=>current!=player)) return false; var card=event.card,type=get.type2(card); for(var i=player.actionHistory.length-1; i>=0; i--){ @@ -1794,10 +1794,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return true; }, - getNum:function(player){ + getNum(player){ return (player.countCards('ej')>0)+(player.isDamaged())+(Math.max(0,player.hp){ @@ -1833,11 +1833,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ reverseOrder:true, - skillTagFilter:function(player){ + skillTagFilter(player){ if(player.getHistory('useCard',evt=>get.type(evt.card)=='equip').length>0) return false; }, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(player==target&&get.type(card)=='equip'&&!player.getHistory('useCard',evt=>get.type(evt.card)=='equip').length==0) return [1,3]; }, }, @@ -1850,7 +1850,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, forced:true, - filter:function(event,player){ + filter(event,player){ var history=player.getAllHistory('useSkill',evt=>evt.skill=='clansankuang'); if(!history.length) return false; var target=history[0].targets[0]; @@ -1858,7 +1858,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var evt=event.getl(target); return evt&&evt.hs&&evt.hs.length; }, - content:function(){ + content(){ player.recover(); } }, @@ -1870,10 +1870,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, locked:false, - filter:function(event,player){ + filter(event,player){ return (event.card.name=='sha'||get.type(event.card)=='trick')&&player.countCards('h',event.card.name)>0; }, - content:function(){ + content(){ var cards=player.getCards('h',trigger.card.name); player.showCards(cards,get.translation(player)+'发动了【神君】'); player.markSkill('clanshenjun'); @@ -1887,10 +1887,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, marktext:'君', intro:{ - markcount:function(storage,player){ + markcount(storage,player){ return player.countCards('h',card=>card.hasGaintag('clanshenjun')); }, - mark:function(dialog,content,player){ + mark(dialog,content,player){ var cards=player.getCards('h',card=>card.hasGaintag('clanshenjun')); if(cards.length){ dialog.addAuto(cards); @@ -1901,12 +1901,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ viewAs:{ trigger:{global:['phaseZhunbeiEnd','phaseJudgeEnd','phaseDrawEnd','phaseUseEnd','phaseDiscardEnd','phaseJieshuEnd']}, - filter:function(event,player){ + filter(event,player){ return player.countCards('h',card=>card.hasGaintag('clanshenjun'))>0; }, forced:true, charlotte:true, - content:function(){ + content(){ 'step 0' var cards=player.getCards('h',card=>card.hasGaintag('clanshenjun')); var list=[],names=[]; @@ -1950,21 +1950,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ next.set('_backupevent','clanshenjun_backup'); next.set('custom',{ add:{}, - replace:{window:function(){}} + replace:{window(){}} }); next.backup('clanshenjun_backup'); } } }, backup:{ - filterCard:function(card){ + filterCard(card){ return get.itemtype(card)=='card'; }, position:'hes', filterTarget:lib.filter.filterTarget, check:(card)=>6-get.value(card), log:false, - precontent:function(){ + precontent(){ delete event.result.skill; }, } @@ -1976,7 +1976,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:['damageEnd','recoverEnd','loseHpEnd'], }, forced:true, - filter:function(event,player){ + filter(event,player){ if(game.getGlobalHistory('changeHp',evt=>evt.player==player).length!=1) return false; var cards=player.getCards('h'),map={}; if(!cards.length) return false; @@ -1992,7 +1992,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ list.sort((a,b)=>b[1]-a[1]); return list[0][0]=='trick'&&(list.length==1||list[0][1]>list[1][1]); }, - content:function(){ + content(){ player.showHandcards(get.translation(player)+'发动了【八龙】'); player.drawTo(game.countPlayer()); } @@ -2002,10 +2002,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target&&target.isDamaged(); }, - content:function(){ + content(){ 'step 0' target.recover(); 'step 1' @@ -2026,7 +2026,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:2, expose:0.2, result:{ - target:function(player,target){ + target(player,target){ var eff=get.recoverEffect(target,player,player); if(eff>0) return 1; else if(get.effect(target,{name:'sha',nature:'ice',isCard:true},player,player)>eff) return -1; @@ -2038,7 +2038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanshangshen:{ audio:2, trigger:{global:'damageEnd'}, - filter:function(event,player){ + filter(event,player){ if(!event.hasNature()||!event.player.isIn()) return false; return game.countPlayer2(current=>{ return current.hasHistory('damage',evt=>{ @@ -2047,12 +2047,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })==0; }, logTarget:'player', - check:function(event,player){ + check(event,player){ if(get.attitude(player,event.player)<=2) return false; if(event.player.countCards('h')>=4) return false; return true; }, - content:function(){ + content(){ player.executeDelayCardEffect('shandian'); trigger.player.drawTo(4); }, @@ -2060,7 +2060,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, clanfenchai:{ audio:2, - init:function(player){ + init(player){ if(player.getStorage('clanfenchai').length>0) return; var history=player.getHistory('useSkill',evt=>{ if(evt.type!='player') return false; @@ -2088,7 +2088,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:(storage,player)=>'对象:'+get.translation(storage), }, group:'clanfenchai_audio', - filter:function(event,player){ + filter(event,player){ if(event.type!='player') return false; var targets=event.targets; if(!targets||!targets.length) return false; @@ -2097,7 +2097,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.getStorage('clanfenchai').length!=0) return false; return targets.filter(i=>player.differentSexFrom(i)).length>0; }, - content:function(){ + content(){ player.markAuto('clanfenchai',trigger.targets.filter(i=>player.differentSexFrom(i))); }, subSkill:{ @@ -2105,14 +2105,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'clanfenchai', forced:true, trigger:{player:'judge'}, - filter:function(event,player){ + filter(event,player){ return player.getStorage('clanfenchai').length; }, - content:function(){} + content(){} } }, mod:{ - suit:function(card,suit){ + suit(card,suit){ var player=get.owner(card)||_status.event.player; if(!player||!player.judging||player.judging[0]!=card) return; var storage=player.getStorage('clanfenchai'); @@ -2125,22 +2125,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanlieshi:{ audio:2, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return !player.isDisabledJudge()||player.countCards('h',card=>['sha','shan'].includes(get.name(card)))>0; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var dialog=ui.create.dialog('烈誓:选择一项','hidden'); dialog.add([lib.skill.clanlieshi.choices.slice(),'textbutton']); return dialog; }, - filter:function(button,player){ + filter(button,player){ var link=button.link; if(link=='damage') return !player.isDisabledJudge(); var num=player.countCards('h',link); return num>0&&num==player.getDiscardableCards(player,'h').filter(i=>get.name(i)==link).length; }, - check:function(button){ + check(button){ var player=_status.event.player; switch (button.link){ case 'damage': @@ -2155,12 +2155,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 0.9+Math.random(); } }, - backup:function(links){ + backup(links){ var next=get.copy(lib.skill['clanlieshi_backupx']); next.choice=links[0]; return next; }, - prompt:function(links){ + prompt(links){ if(links[0]=='damage') return '废除判定区并受到1点火焰伤害'; return '弃置所有【'+get.translation(links[0])+'】'; }, @@ -2171,7 +2171,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ['sha','弃置所有【杀】'], ], ai:{ - order:function(item,player){ + order(item,player){ if(!player) return; var eff=get.damageEffect(player,player,player,'fire'),disabled=!player.isDisabledJudge(); if((player.countCards('h','sha')==1||player.countCards('h','shan')==1)&&eff<0&&!disabled) return 8; @@ -2195,7 +2195,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:()=>false, filterTarget:()=>false, multitarget:true, - content:function(){ + content(){ 'step 0' var choice=lib.skill.clanlieshi_backup.choice; event.choice=choice; @@ -2276,7 +2276,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCardAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(!lib.suit.includes(get.suit(event.card))) return false; var card=event.card,suit=get.suit(card); for(var i=player.actionHistory.length-1; i>=0; i--){ @@ -2290,7 +2290,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.targets&&event.targets.length==1&&!event.targets[0].isLinked()|| player.hasCard(card=>get.suit(card)==get.suit(event.card)&&player.canRecast(card),'h'); }, - content:function(){ + content(){ 'step 0' if(trigger.targets&&trigger.targets.length==1){ trigger.targets[0].link(true); @@ -2306,10 +2306,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'dying'}, forced:true, check:()=>true, - filter:function(event){ + filter(event){ return event.player.countCards('h')<4; }, - content:function(){ + content(){ player.drawTo(4); } }, @@ -2317,14 +2317,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, audioname:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan','clan_xunyou'], trigger:{player:'useCardAfter'}, - filter:function(event,player){ + filter(event,player){ return get.type(event.card,null,false)=='trick'&&!get.tag(event.card,'damage')&&event.cards.filterInD().length>0&&player.getHistory('useCard',evt=>{ return get.type(evt.card,null,false)=='trick'&&!get.tag(evt.card,'damage'); }).indexOf(event)==0; }, forced:true, clanSkill:true, - content:function(){ + content(){ 'step 0' var skills=player.getSkills(null,false,false).filter(skill=>{ var info=get.info(skill); @@ -2372,24 +2372,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanzhanding:{ audio:2, enable:'chooseToUse', - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countCards('hes')>0; }, viewAs:{name:'sha'}, filterCard:true, position:'hes', selectCard:[1,Infinity], - check:function(card){ + check(card){ return 6-ui.selected.cards.length-get.value(card); }, - onuse:function(links,player){ + onuse(links,player){ lib.skill.chenliuwushi.change(player,-1); player.addTempSkill('clanzhanding_effect'); }, ai:{ order:1, respondSha:true, - skillTagFilter:function(player){ + skillTagFilter(player){ return player.countCards('hes')>0; }, }, @@ -2398,10 +2398,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardAfter'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.skill=='clanzhanding'; }, - content:function(){ + content(){ if(player.hasHistory('sourceDamage',function(evt){ return evt.card==trigger.card; })){ @@ -2421,33 +2421,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:2, - filter:function(event,player){ + filter(event,player){ var num1=player.countCards('h'),num2=player.getHandcardLimit(); return num1!=num2; }, - selectCard:function(){ + selectCard(){ var player=_status.event.player; var num1=player.countCards('h'),num2=player.getHandcardLimit(); if(num1>num2) return num1-num2; return [0,1]; }, - filterCard:function(card,player){ + filterCard(card,player){ var num1=player.countCards('h'),num2=player.getHandcardLimit(); return num1>num2; }, - check:function(card){ + check(card){ var player=_status.event.player; if(player.countCards('h',function(card){ return lib.skill.clanyirong.checkx(card)>0; })+1<(player.countCards('h')-player.getHandcardLimit())) return 0; return lib.skill.clanyirong.checkx(card); }, - checkx:function(card){ + checkx(card){ var num=1; if(_status.event.player.getUseValue(card,null,true)<=0) num=1.5; return (15-get.value(card))*num; }, - prompt:function(){ + prompt(){ var player=_status.event.player; var num1=player.countCards('h'),num2=player.getHandcardLimit(); var str=''; @@ -2465,7 +2465,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ str+=''; return str; }, - content:function(){ + content(){ 'step 0' if(cards.length){ lib.skill.chenliuwushi.change(player,1); @@ -2479,7 +2479,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lib.skill.chenliuwushi.change(player,-1); }, ai:{ - order:function(item,player){ + order(item,player){ var num=player.getHandcardLimit(),numx=((_status.event.getParent().phaseIndex||0)+1); if(num==5&&numx==4&&player.getStat('skill').clanyirong) return 0; if(player.countCards('h')==num+1&&num!=2&&(num<=4||num>4&&numx>4)) return 10; @@ -2495,12 +2495,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'phaseChange', }, forced:true, - filter:function(event,player){ + filter(event,player){ if(event.phaseList[event.num].startsWith('phaseUse')) return false; var num1=player.getHandcardLimit()-1,num2=event.num; return num1==num2; }, - content:function(){ + content(){ trigger.phaseList[trigger.num]='phaseUse|clanguixiang'; game.delayx(); }, @@ -2510,19 +2510,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanSkill:true, audioname:['clan_wuxian','clan_wuban','clan_wukuang'], trigger:{player:'phaseBegin'}, - isMax:function(player){ + isMax(player){ var num=player.getHandcardLimit(); return !game.hasPlayer(function(current){ return current!=player&¤t.getHandcardLimit()>num; }); }, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return (current==player||current.hasClan('陈留吴氏'))&&!lib.skill.clanmuyin.isMax(current); }); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('clanmuyin'),'令一名陈留吴氏角色的手牌上限+1',function(card,player,current){ return (current==player||current.hasClan('陈留吴氏'))&&!lib.skill.clanmuyin.isMax(current); @@ -2540,7 +2540,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, chenliuwushi:{ charlotte:true, - change:function(player,num){ + change(player,num){ player.addSkill('chenliuwushi'); var info=player.storage; if(typeof info.chenliuwushi!='number') info.chenliuwushi=0; @@ -2551,14 +2551,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else game.log(player,'的手牌上限','#g'+num); }, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ var add=player.storage.chenliuwushi; if(typeof add=='number') return num+add; }, }, markimage:'image/card/handcard.png', intro:{ - content:function(num,player){ + content(num,player){ var str='
  • 手牌上限'; if(num>=0) str+='+'; str+=num; @@ -2584,15 +2584,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wanglun:'王沦(233年-257年)字太冲,出身太原晋阳王姓世族(今山西省太原市),王昶三子,王浑、王深之弟,王湛之兄。醇粹简远,崇尚老庄之学,心思平淡。二十多时被举荐为孝廉,没有前往,后任大将军参军。257年,诸葛诞不满司马氏篡权而在寿春起义,王沦跟随司马昭征讨,遭遇疾疫去世,时年二十五,时人惜之,司马昭为他流泪。其兄著诔文《表德论》,表述其德行,说“因为畏惧帝王的典章制度,不能写墓志铭,于是撰写过往的事迹,刻在墓的背面。”', }, dynamicTranslate:{ - clanlianzhu:function(player){ + clanlianzhu(player){ if(player.storage.clanlianzhu) return '转换技。每名角色A的出牌阶段限一次。阴:A可以重铸一张牌,然后你可以重铸一张牌。若这两张牌颜色不同,则你的手牌上限-1;阳:A可以令你选择一名在你或A攻击范围内的另一名其他角色B,然后A和你可依次选择是否对B使用一张【杀】。若这两张【杀】颜色相同,则你的手牌上限+1。'; return '转换技。每名角色A的出牌阶段限一次。阴:A可以重铸一张牌,然后你可以重铸一张牌。若这两张牌颜色不同,则你的手牌上限-1;阳:A可以令你选择一名在你或A攻击范围内的另一名其他角色B,然后A和你可依次选择是否对B使用一张【杀】。若这两张【杀】颜色相同,则你的手牌上限+1。'; }, - clanguangu:function(player){ + clanguangu(player){ if(player.storage.clanguangu) return '转换技,出牌阶段限一次。阴:你可以观看牌堆顶的至多四张牌;阳:你可以观看一名角色的至多四张手牌。然后你可以使用其中的一张牌。'; return '转换技,出牌阶段限一次。阴:你可以观看牌堆顶的至多四张牌;阳:你可以观看一名角色的至多四张手牌。然后你可以使用其中的一张牌。'; }, - clanjiexuan:function(player){ + clanjiexuan(player){ if(player.storage.clanjiexuan) return '限定技,转换技。阴:你可以将一张红色牌当【顺手牵羊】使用;阳:你可以将一张黑色牌当【过河拆桥】使用。'; return '限定技,转换技。阴:你可以将一张红色牌当【顺手牵羊】使用;阳:你可以将一张黑色牌当【过河拆桥】使用。'; }, diff --git a/character/collab.js b/character/collab.js index 5475eb79e..e4626689d 100644 --- a/character/collab.js +++ b/character/collab.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'collab', @@ -25,7 +25,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_mushun:['male','qun',4,['moukui']], }, characterFilter:{ - old_lingju:function(mode){ + old_lingju(mode){ return mode=='identity'; } }, @@ -45,7 +45,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:1, - content:function*(event,map){ + *content(event,map){ var player=map.player,num=game.countPlayer(); var result=yield player.chooseControl().set('choiceList',[ '摸'+get.cnNumber(num)+'张牌,本回合手牌上限+'+parseFloat(num), @@ -111,7 +111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ onremove:true, intro:{content:'手牌上限+#'}, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('dcshuangbi_effect'); }, }, @@ -124,7 +124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'damageBegin4'}, forced:true, group:'dcsantou_gain', - content:function*(event,map){ + *content(event,map){ var player=map.player,trigger=map.trigger; var source=trigger.source; trigger.cancel(); @@ -152,11 +152,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'enterGame', }, forced:true, - filter:function(event,player){ + filter(event,player){ if(player.maxHp>=3) return false; return (event.name!='phase'||game.phaseNumber==0); }, - content:function*(event,map){ + *content(event,map){ var player=map.player; yield player.gainMaxHp(3-player.maxHp); var num=3-player.getHp(true); @@ -166,11 +166,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ filterDamage:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(arg&&arg.player&&arg.player.hasSkillTag('jueqing',false,player)) return false; }, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(player.hasSkillTag('jueqing',false,target)) return; if(player._dcsantou_temp) return; if(get.tag(card,'damage')){ @@ -210,7 +210,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcfaqi:{ audio:2, trigger:{player:'useCardAfter'}, - filter:function(event,player){ + filter(event,player){ if(get.type(event.card)!='equip') return false; if(!player.isPhaseUsing()) return false; for(const name of lib.inpile){ @@ -220,7 +220,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, direct:true, - content:function*(event,map){ + *content(event,map){ var player=map.player; var list=get.inpileVCardList(info=>{ if(info[0]!='trick') return false; @@ -250,7 +250,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:'damageEnd', }, - content:function (){ + content(){ 'step 0' if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){ player.gain(trigger.cards,'gain2'); @@ -261,10 +261,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, marktext:'雄', intro:{ - markcount:function(storage,player){ + markcount(storage,player){ return player.countMark('dcjianxiong')+1; }, - content:function(storage,player){ + content(storage,player){ return '摸牌数为'+(player.countMark('dcjianxiong')+1); }, }, @@ -272,7 +272,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ maixie:true, maixie_hp:true, effect:{ - target:function (card,player,target){ + target (card,player,target){ if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; if(get.tag(card,'damage')&&player!=target){ var cards=card.cards,evt=_status.event; @@ -293,7 +293,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcrende:{ audio:'rerende', enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>{ return lib.skill.dcrende.filterTarget(null,player,current); }); @@ -301,11 +301,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, delay:false, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player.getStorage('dcrende_targeted').includes(target)) return false; return player!=target&&target.countGainableCards(player,'h')>1; }, - content:function(){ + content(){ 'step 0' player.addTempSkill('dcrende_targeted','phaseUseAfter'); player.markAuto('dcrende_targeted',[target]); @@ -372,11 +372,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ fireAttack:true, - order:function(skill,player){ + order(skill,player){ return 10; }, result:{ - target:function(player,target){ + target(player,target){ if(target.hasSkillTag('noh')) return -0.1; return -2; } @@ -397,11 +397,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lose:false, delay:false, selectCard:[1,Infinity], - filter:function(event,player){ + filter(event,player){ var skill=player.getStat().skill; return !skill.dczhiheng||skill.dczhiheng<1+player.getStorage('dczhiheng_hit').length; }, - check:function(card){ + check(card){ var player=_status.event.player; if(get.position(card)=='h'&&!player.countCards('h','du')&&(player.hp>2||!player.countCards('h',function(card){ return get.value(card)>=8; @@ -411,7 +411,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 6-get.value(card) }, group:'dczhiheng_add', - content:function(){ + content(){ 'step 0' player.discard(cards); event.num=1; @@ -433,10 +433,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, locked:false, - filter:function(event,player){ + filter(event,player){ return !player.getStorage('dczhiheng_hit').includes(event.player); }, - content:function(){ + content(){ player.addTempSkill('dczhiheng_hit'); player.markAuto('dczhiheng_hit',[trigger.player]); } @@ -449,7 +449,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:true, marktext:'衡', intro:{ - markcount:function(storage){ + markcount(storage){ if(storage) return storage.length; return 0; }, @@ -458,7 +458,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - order:function(item,player){ + order(item,player){ if(player.hasCard((i)=>{ return get.value(i)>Math.max(6,9-player.hp); },'he')) return 1; @@ -468,7 +468,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:1 }, nokeep:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(tag==='nokeep') return (!arg||arg&&arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&player.countSkill('dczhiheng')<1+player.getStorage('dczhiheng_hit').length&&player.hasCard((card)=>{ return get.name(card)!=='tao'; },'h'); @@ -481,7 +481,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:1, - content:function(){ + content(){ 'step 0' var list=[]; for(var i in lib.skill.dcbianzhuang.characterMap){ @@ -522,13 +522,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:16, result:{ - player:function(player){ + player(player){ if(player.hasValueTarget('sha',false)) return 1; return 0; }, }, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(player==target&&player.isPhaseUsing()&&get.type(card)=='equip'){ if(player.hasValueTarget('sha',false)&&typeof player.getStat('skill').dcbianzhuang=='number') return [1,3]; } @@ -539,10 +539,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ refresh:{ trigger:{player:'useCardAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return get.type2(event.card,false)=='equip'&&typeof player.getStat('skill').dcbianzhuang=='number'; }, - content:function(){ + content(){ var stat=player.getStat('skill'); delete stat.dcbianzhuang; }, @@ -569,10 +569,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseDrawAfter'}, direct:true, locked:false, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' player.chooseCard('h',get.prompt('dctongliao'),'选择一张牌标记为“通辽”',function(card,player){ if(card.hasGaintag('dctongliao')) return false; @@ -592,7 +592,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(get.itemtype(card)=='card'&&card.hasGaintag('dctongliao')) return num+0.6; }, }, @@ -603,7 +603,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:['loseAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter:function(event,player){ + filter(event,player){ var evt=event.getl(player); if(!evt||!evt.hs||!evt.hs.length) return false; if(event.name=='lose'){ @@ -621,7 +621,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, forced:true, - content:function(){ + content(){ var num=0; var cards=trigger.getl(player).hs,ids=[]; if(trigger.name=='lose'){ @@ -647,17 +647,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:3, trigger:{player:'useCardAfter'}, frequent:true, - filter:function(event,player){ + filter(event,player){ if(player.getStorage('dcwudao_effect').includes(get.type2(event.card,false))) return false; var history=player.getHistory('useCard'),index=history.indexOf(event); if(index<1) return false; var evt=history[index-1]; return get.type2(event.card,false)==get.type2(evt.card,false); }, - prompt2:function(event){ + prompt2(event){ return '令你本回合使用'+get.translation(get.type2(event.card,false))+'牌时不可被响应且伤害+1'; }, - content:function(){ + content(){ player.addTempSkill('dcwudao_effect'); player.markAuto('dcwudao_effect',[get.type2(trigger.card,false)]) }, @@ -667,17 +667,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, onremove:true, - filter:function(event,player){ + filter(event,player){ return player.getStorage('dcwudao_effect').includes(get.type2(event.card,false)); }, - content:function(){ + content(){ if(get.tag(trigger.card,'damage')>0) trigger.baseDamage++; trigger.directHit.addArray(game.filterPlayer()); }, intro:{content:'已经悟到了$牌'}, ai:{ directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(arg&&arg.card&&player.getStorage('dcwudao_effect').includes(get.type2(arg.card))) return true; return false; }, @@ -690,7 +690,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseJudgeBefore'}, direct:true, - content:function(){ + content(){ "step 0" var check=player.countCards('h')>2; player.chooseTarget(get.prompt("clbjisu"),"跳过判定阶段和摸牌阶段,视为对一名其他角色使用一张【杀】",function(card,player,target){ @@ -711,17 +711,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clbshuiyong:{ audio:2, trigger:{player:'damageBegin4'}, - filter:function(event){ + filter(event){ return event.hasNature('fire'); }, forced:true, - content:function(){ + content(){ trigger.cancel(); }, ai:{ nofire:true, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'fireDamage')) return 'zerotarget'; } } @@ -732,10 +732,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseDrawBegin2'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return !event.numFixed; }, - content:function(){ + content(){ var num=1+Math.floor(player.countCards('e')/2); trigger.num+=num; }, @@ -747,7 +747,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ locked:false, viewAs:{name:'jiu'}, check:card=>6.5-get.value(card), - filterCard:function(card){ + filterCard(card){ var info=get.info(card); if(!info||(info.type!='trick'&&info.type!='delay')) return false; if(info.notarget) return false; @@ -763,7 +763,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - viewAsFilter:function(player){ + viewAsFilter(player){ if(_status.connectMode&&player.countCards('hs')>0) return true; return player.hasCard(lib.skill.dclbjiuxian.filterCard,'hs') }, @@ -771,7 +771,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:(item,player)=>get.order({name:'jiu'},player), }, mod:{ - cardUsable:function(card){ + cardUsable(card){ if(card.name=='jiu') return Infinity; }, }, @@ -782,27 +782,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //frequent:true, //direct:true, locked:false, - filter:function(event,player){ + filter(event,player){ var history=player.getAllHistory('useCard'),index=history.indexOf(event); if(index<1) return false; var evt=history[index-1]; return get.is.yayun(get.translation(event.card.name),get.translation(evt.card.name)); }, - filterx:function(event){ + filterx(event){ if(event.targets.length==0) return false; var type=get.type(event.card); if(type!='basic'&&type!='trick') return false; return true; }, - prompt2:function(event,player){ + prompt2(event,player){ if(lib.skill.dcshixian.filterx(event)) return '摸一张牌并令'+get.translation(event.card)+'额外结算一次?'; return '摸一张牌。'; }, - check:function(event,player){ + check(event,player){ if(lib.skill.dcshixian.filterx(event)) return !get.tag(event.card,'norepeat'); return true; }, - content:function(){ + content(){ player.draw(); if(lib.skill.dcshixian.filterx(trigger)){ trigger.effectCount++; @@ -810,7 +810,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(typeof card=='object'&&!get.tag(card,'norepeat')){ var history=player.getAllHistory('useCard'); if(history.length>0){ @@ -820,7 +820,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - init:function(player){ + init(player){ player.addSkill('dcshixian_yayun'); var history=player.getAllHistory('useCard'); if(history.length){ @@ -829,7 +829,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }),'dcshixian_yayun'); } }, - onremove:function(player){ + onremove(player){ player.removeSkill('dcshixian_yayun'); player.removeGaintag('dcshixian_yayun'); }, @@ -837,12 +837,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yayun:{ charlotte:true, trigger:{player:'useCard1'}, - filter:function(event,player){ - return player.countCards('h'); + filter(event,player){ + return player.countCards('h')>0; }, direct:true, priority:11+45+14+19+19+810, - content:function(){ + content(){ 'step 0' player.removeGaintag('dcshixian_yayun'); 'step 1' @@ -858,14 +858,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'damageBegin4'}, usable:1, - filter:function(event,player){ + filter(event,player){ return event.source&&event.source.isIn(); }, logTarget:'source', - check:function(event,player){ + check(event,player){ return get.attitude(player,event.source)>=0||player.hp<=Math.max(2,event.num); }, - content:function(){ + content(){ 'step 0' trigger.cancel(); 'step 1' @@ -876,7 +876,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ filterDamage:true, - skillTagFilter:function(player){ + skillTagFilter(player){ return !player.storage.counttrigger||!player.storage.counttrigger.dclonggong; }, }, @@ -884,7 +884,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcsitian:{ audio:2, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ var colorx=false,hs=player.getCards('he'); if(hs.length<2) return false; for(var card of hs){ @@ -896,7 +896,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - filterCard:function(card,player){ + filterCard(card,player){ var color=get.color(card,player); if(color=='none') return false; return !ui.selected.cards.length||get.color(ui.selected.cards[0])!=color; @@ -905,7 +905,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ complexCard:true, prompt:'弃置两张颜色不同的牌并改变天气', check:(card)=>4.5-get.value(card), - content:function(){ + content(){ 'step 0' var list=['烈日','雷电','大浪','暴雨','大雾'].randomGets(2); player.chooseButton(true,[ @@ -929,7 +929,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:8, result:{ - player:function(player){ + player(player){ var num1=0,num2=0; game.countPlayer(function(current){ if(player==current) return; @@ -946,10 +946,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return get.type2(event.card,false)=='basic'; }, - content:function(){ + content(){ trigger.targets.length=0; trigger.all_excluded=true; player.removeSkill('dcsitian_dawu'); @@ -965,14 +965,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ weathers:{ 烈日:{ description:'你对其他角色造成1点火属性伤害。', - content:function(){ + content(){ var targets=game.filterPlayer(current=>current!=player).sortBySeat(); player.line(targets,'fire'); for(var target of targets){ target.damage('fire'); } }, - ai:function(player){ + ai(player){ var effect=0; game.countPlayer(function(current){ if(current==player) return; @@ -983,7 +983,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, 雷电:{ description:'你令其他角色各进行一次判定。若结果为♠2~9,则其受到3点无来源雷属性伤害。', - content:function(){ + content(){ 'step 0' var targets=game.filterPlayer(current=>current!=player).sortBySeat(); player.line(targets,'thunder'); @@ -1026,7 +1026,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(targets.length>0) event.goto(1); }, - ai:function(player){ + ai(player){ var effect=0; game.countPlayer(function(current){ if(current==player) return; @@ -1037,7 +1037,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, 大浪:{ description:'你弃置其他角色装备区内的所有牌(装备区内没有牌的角色改为失去1点体力)。', - content:function(){ + content(){ 'step 0' var targets=game.filterPlayer(current=>current!=player).sortBySeat(); player.line(targets,'green'); @@ -1056,7 +1056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(targets.length>0) event.redo(); }, - ai:function(player){ + ai(player){ var effect=0; game.countPlayer(function(current){ if(current==player) return; @@ -1072,7 +1072,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, 暴雨:{ description:'你弃置一名角色的所有手牌。若其没有手牌,则改为令其失去1点体力。', - content:function(){ + content(){ 'step 0' player.chooseTarget('请选择【暴雨】的目标','令目标角色弃置所有手牌。若其没有手牌,则其改为失去1点体力。').set('ai',function(current){ var es=current.getCards('h'),player=_status.event.player; @@ -1096,7 +1096,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - ai:function(player){ + ai(player){ return Math.max.apply(Math,game.filterPlayer(function(current){ return current!=player }).map(function(current){ @@ -1111,12 +1111,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, 大雾:{ description:'你令所有其他角色获得如下效果:当其使用下一张基本牌时,取消之。', - content:function(){ + content(){ var targets=game.filterPlayer(current=>current!=player).sortBySeat(); player.line(targets); for(var target of targets) target.addSkill('dcsitian_dawu'); }, - ai:function(player){ + ai(player){ var effect=0; game.countPlayer(function(current){ if(current==player||current.hasSkill('dcsitian_dawu')) return; @@ -1132,7 +1132,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ locked:true, ai:{ viewHandcard:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(player==arg) return false; }, }, @@ -1141,17 +1141,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{source:'damageBegin2'}, logTarget:'player', - filter:function(event,player){ + filter(event,player){ return player!=event.player&&!player.hasHistory('useSkill',function(evt){ return evt.skill=='dccibei'&&evt.targets.includes(event.player); }); }, - check:function(event,player){ + check(event,player){ var target=event.player; if(get.attitude(player,target)>=0) return true; return (!player.getStat('skill').ruyijingubang_skill||player.storage.ruyijingubang_skill==1); }, - content:function(){ + content(){ trigger.cancel(); player.draw(5); }, @@ -1166,35 +1166,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'enterGame', }, forced:true, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0)&&player.hasEquipableSlot(1)&&!player.getEquips('ruyijingubang').length; }, - content:function(){ + content(){ var card=game.createCard2('ruyijingubang','heart',9); player.$gain2(card,false); game.delayx(); player.equip(card); }, mod:{ - canBeGained:function(card,source,player){ + canBeGained(card,source,player){ if(player.getEquips('ruyijingubang').includes(card)) return false; }, - canBeDiscarded:function(card,source,player){ + canBeDiscarded(card,source,player){ if(player.getEquips('ruyijingubang').includes(card)) return false; }, - canBeReplaced:function(card,player){ + canBeReplaced(card,player){ if(player.getEquips('ruyijingubang').includes(card)) return false; }, - cardname:function(card){ + cardname(card){ if(get.subtype(card,false)=='equip1') return 'sha'; }, - cardnature:function(card){ + cardnature(card){ if(get.subtypes(card,false).includes('equip1')) return false; }, - cardDiscardable:function(card,player){ + cardDiscardable(card,player){ if(player.getEquips('ruyijingubang').includes(card)) return false; }, - cardEnabled2:function(card,player){ + cardEnabled2(card,player){ if(player.getEquips('ruyijingubang').includes(card)) return false; }, }, @@ -1203,12 +1203,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ blocker:{ trigger:{player:['loseBefore','disableEquipBefore']}, forced:true, - filter:function(event,player){ + filter(event,player){ if(event.name=='disableEquip') return (event.slots.includes('equip1')); var cards=player.getEquips('ruyijingubang'); return event.cards.some(card=>cards.includes(card)); }, - content:function(){ + content(){ if(trigger.name=='lose'){ trigger.cards.removeArray(player.getEquips('ruyijingubang')); } @@ -1224,7 +1224,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, chooseButton:{ - dialog:function(){ + dialog(){ var dialog=ui.create.dialog( '如意金箍棒:选择变化攻击范围', [[ @@ -1238,19 +1238,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ); return dialog; }, - filter:function(button,player){ + filter(button,player){ return button.link!=player.storage.ruyijingubang_skill; }, - check:function(button){ + check(button){ if(button.link==1||button.link==3) return 1; return 0; }, - backup:function(links,player){ + backup(links,player){ return { audio:'dcruyi', num:links[0], popup:'如意金箍棒', - content:function(){ + content(){ var num=lib.skill.ruyijingubang_skill_backup.num; player.storage.ruyijingubang_skill=num; var cards=player.getEquips(1); @@ -1266,18 +1266,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(player.storage.ruyijingubang_skill==1&&card.name=='sha') return Infinity; }, }, ai:{ order:1, directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ return player.storage.ruyijingubang_skill==3; }, effect:{ - player:function(card,player,target,current){ + player(card,player,target,current){ if(get.tag(card,'damage')>0&&player!=target){ if(player.getStat('skill').ruyijingubang_skill&&player.storage.ruyijingubang_skill!=1) return; if(player.hasSkill('dccibei')&&!player.hasHistory('useSkill',function(evt){ @@ -1289,7 +1289,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, result:{ - player:function(player){ + player(player){ if(player.storage.ruyijingubang_skill==1){ if(!player.hasSha()) return 1; return 0; @@ -1303,7 +1303,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, intro:{ name:'如意金箍棒', - content:function(storage){ + content(storage){ if(!storage) storage=3; return '
  • 攻击范围:'+storage+'
  • '+['你使用【杀】无次数限制。','你使用的【杀】伤害+1。','你使用的【杀】不可被响应。','你使用【杀】选择目标后,可以增加一个额外目标。'][storage-1] }, @@ -1317,7 +1317,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard2'}, direct:true, locked:true, - filter:function(event,player){ + filter(event,player){ if(event.card.name!='sha') return false; var num=player.storage.ruyijingubang_skill; if(!num||num==1) return false; @@ -1330,7 +1330,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' var num=player.storage.ruyijingubang_skill; if(num==4){ @@ -1372,18 +1372,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardToPlayer'}, forced:true, group:'dcnutao_add', - filter:function(event,player){ + filter(event,player){ if(get.type2(event.card)!='trick') return false; return event.isFirstTarget&&event.targets.some(i=>i!=player); }, - content:function(){ + content(){ var target=trigger.targets.filter(i=>i!=player).randomGet(); player.line(target,'thunder'); target.damage('thunder'); }, ai:{ effect:{ - player:function(card,player,target){ + player(card,player,target){ if(player!==target&&get.type2(card)==='trick'){ let tars=[target]; if(ui.selected.targets.length) tars.addArray(ui.selected.targets.filter(i=>i!==player&&i!==target)); @@ -1397,11 +1397,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ add:{ audio:'dcnutao', trigger:{source:'damageSource'}, - filter:function(event,player){ + filter(event,player){ return event.nature=='thunder'&&player.isPhaseUsing(); }, forced:true, - content:function(){ + content(){ player.addTempSkill('dcnutao_sha','phaseUseAfter'); player.addMark('dcnutao_sha',1,false); } @@ -1414,7 +1414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'此阶段使用【杀】的次数上限+#', }, mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha') return num+player.countMark('dcnutao_sha'); }, } @@ -1425,7 +1425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ spduanzhi:{ trigger:{target:'useCardToTargeted'}, logTarget:'player', - check:function(event,player){ + check(event,player){ var target=event.player; if(get.attitude(player,target)>=-2||target.countCards('he',function(card){ return get.value(card,target)>5; @@ -1449,10 +1449,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&event.player.countDiscardableCards(player,'he')>0; }, - content:function(){ + content(){ player.discardPlayerCard(trigger.player,true,'he',[1,2]); player.loseHp(); }, @@ -1460,7 +1460,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ spduyi:{ enable:'phaseUse', usable:1, - content:function(){ + content(){ 'step 0' event.card=get.cards()[0]; game.cardsGotoOrdering(event.card); @@ -1494,7 +1494,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, spduyi2:{ mod:{ - cardEnabled2:function(card){ + cardEnabled2(card){ if(get.position(card)=='h') return false; }, }, @@ -1507,7 +1507,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'zhuikong', trigger:{player:'phaseDiscardBegin'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseDrawRecover('###'+get.prompt('spcangni')+'###摸两张牌或回复1点体力,然后将武将牌翻面',2).logSkill='spcangni'; 'step 1' @@ -1522,17 +1522,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'loseAsyncAfter', }, usable:1, - filter:function(event,player){ + filter(event,player){ return player.isTurnedOver()&&player!=_status.currentPhase&&event.getg(player).length>0; }, - check:function(event,player){ + check(event,player){ return get.attitude(player,_status.currentPhase)>0; }, - logTarget:function(){ + logTarget(){ return _status.currentPhase; }, prompt2:'令该角色摸一张牌', - content:function(){ + content(){ _status.currentPhase.draw(); }, }, @@ -1542,13 +1542,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'loseAfter', global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter:function(event,player){ + filter(event,player){ if(event.name=='gain'&&player==event.player) return false; var evt=event.getl(player); if(!evt||!evt.cards2||!evt.cards2.length) return false; return player.isTurnedOver()&&player!=_status.currentPhase&&_status.currentPhase.countCards('he')>0; }, - check:function(event,player){ + check(event,player){ var target=_status.currentPhase; var att=get.attitude(player,target); if(target.countCards('e',function(card){ @@ -1556,11 +1556,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })) return att>0; return att<0; }, - logTarget:function(){ + logTarget(){ return _status.currentPhase; }, prompt2:'令该角色弃置一张牌', - content:function(){ + content(){ _status.currentPhase.chooseToDiscard('he',true); }, }, @@ -1570,7 +1570,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'qiuyuan', enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&game.countPlayer()>2; }, filterCard:true, @@ -1582,11 +1582,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:false, discard:false, lose:false, - check:function(card){ + check(card){ if(card.name=='sha') return 4; return 4-get.value(card); }, - content:function(){ + content(){ 'step 0' player.give(cards,targets[0]); 'step 1' @@ -1608,7 +1608,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:1, expose:0.1, result:{ - target:function(player,target){ + target(player,target){ var card=ui.selected.cards[0]; if(!card) return 0; if(ui.selected.targets.length==0){ @@ -1627,13 +1627,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'moukui', trigger:{global:'phaseZhunbeiBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&event.player.hp>=player.hp&&player.countCards('h',function(card){ if(_status.connectMode) return true; return get.name(card,player)=='sha'; })>0; }, - content:function(){ + content(){ 'step 0' player.chooseCard('h',get.prompt('spfengyin',trigger.player),'交给该角色一张【杀】并令其跳过出牌阶段和弃牌阶段',function(card,player){ return get.name(card,player)=='sha'; @@ -1657,20 +1657,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, spchizhong:{ mod:{ - maxHandcardBase:function(player,num){ + maxHandcardBase(player,num){ return player.maxHp; }, }, trigger:{global:'dieAfter'}, forced:true, - content:function(){ + content(){ player.gainMaxHp(); }, }, fenxin_old:{ mode:['identity'], trigger:{source:'dieBegin'}, - init:function(player){ + init(player){ player.storage.fenxin=false; }, intro:{ @@ -1682,12 +1682,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ limited:true, audio:2, mark:true, - filter:function(event,player){ + filter(event,player){ if(player.storage.fenxin) return false; return event.player.identity!='zhu'&&player.identity!='zhu'&& player.identity!='mingzhong'&&event.player.identity!='mingzhong'; }, - check:function(event,player){ + check(event,player){ if(player.identity==event.player.identity) return Math.random()<0.5; var stat=get.situation(); switch(player.identity){ @@ -1707,10 +1707,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - prompt:function(event,player){ + prompt(event,player){ return '焚心:是否与'+get.translation(event.player)+'交换身份?'; }, - content:function(){ + content(){ game.broadcastAll(function(player,target,shown){ var identity=player.identity; player.identity=target.identity; @@ -1751,7 +1751,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return (player.storage.ruyijingubang_skill||3); } }, - onEquip:function(){ + onEquip(){ if(!card.storage.ruyijingubang_skill) card.storage.ruyijingubang_skill=3; player.storage.ruyijingubang_skill=card.storage.ruyijingubang_skill; player.markSkill('ruyijingubang_skill'); @@ -1759,7 +1759,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, dynamicTranslate:{ - dcjianxiong:function(player){ + dcjianxiong(player){ return '当你受到伤害后,你可以摸'+get.cnNumber(player.countMark('dcjianxiong')+1)+'张牌并获得对你造成伤害的牌,然后你令此技能摸牌数+1(至多为5)。'; }, }, @@ -1806,7 +1806,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcruyi:'如意', dcruyi_info:'锁定技。①游戏开始时,你将【如意金箍棒】置入装备区。②你手牌区内的武器牌均视为【杀】,且你不是武器牌的合法目标。③当你即将失去【如意金箍棒】或即将废除武器栏时,取消之。④你不能将装备区内的【如意金箍棒】当做其他牌使用或打出。', ruyijingubang:'如意金箍棒', - ruyijingubang_skill:'如意', + // ruyijingubang_skill:'如意', ruyijingubang_skill:'如意金箍棒', ruyijingubang_effect:'如意金箍棒', ruyijingubang_info:'出牌阶段限一次。你可以将此牌的实际攻击范围调整为1~4内的任意整数。你根据此牌的实际攻击范围拥有对应的效果:
  • ⑴你使用【杀】无次数限制。
  • ⑵你使用的【杀】伤害+1。
  • ⑶你使用的【杀】不可被响应。
  • ⑷你使用【杀】选择目标后,可以增加一个额外目标。', diff --git a/character/ddd.js b/character/ddd.js index 509e4ebbc..dbffc114c 100644 --- a/character/ddd.js +++ b/character/ddd.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'ddd', @@ -66,17 +66,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // ddd_liuchong:'#g', ddd_luoxian:'#g绝代倾国倾城貌', }, + /** @type { importCharacterConfig['skill'] } */ skill:{ //牵招 dddyuanzhen:{ audio:2, trigger:{player:'useCardToPlayered'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.target!=player&&get.distance(player,event.target)!=1&&event.isFirstTarget&&event.targets.length==1; }, logTarget:'target', - content:function*(event,map){ + *content(event,map){ const player=map.player,trigger=map.trigger,target=trigger.target; let result; game.delayex(); @@ -93,13 +94,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddzhishu:{ audio:2, trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ + filter(event,player){ return player.canMoveCard(null,true); }, - check:function(event,player){ + check(event,player){ return player.canMoveCard(true,true); }, - content:function*(event,map){ + *content(event,map){ const player=map.player; let result=yield player.moveCard(); const targets=result.targets; @@ -111,11 +112,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddxiaxing:{ audio:2, enable:'chooseToUse', - hiddenCard:function(player,name){ + hiddenCard(player,name){ if(player.hasSkill('dddxiaxing_used')) return false; return name=='tao'; }, - filter:function(event,player){ + filter(event,player){ if(event.type!='dying') return false; if(!player.countCards('he')) return false; const evt=get.event().getParent('_save'); @@ -131,11 +132,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:false, lose:false, group:['dddxiaxing_begin','dddxiaxing_viewas'], - prompt:function(){ + prompt(){ const evt=get.event().getParent('_save'); return `将一张牌置于牌堆顶,视为${get.translation(evt.dying)}使用一张【桃】`; }, - content:function*(event,map){ + *content(event,map){ const player=map.player,cards=event.cards; player.addTempSkill('dddxiaxing_used','roundStart'); game.log(player,'将一张牌置于了牌堆顶'); @@ -155,7 +156,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:4, result:{ - player:function(player){ + player(player){ if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; }, @@ -165,12 +166,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ begin:{ audio:2, trigger:{global:'phaseZhunbeiBegin'}, - filter:function(event,player){ + filter(event,player){ if(!player.countCards('he')) return false; return !player.hasSkill('dddxiaxing_used'); }, direct:true, - content:function*(event,map){ + *content(event,map){ const player=map.player,trigger=map.trigger,target=trigger.player; let result=yield player.chooseCard(get.prompt('dddxiaxing'),`将一张牌置于牌堆顶,视为${get.translation(target)}使用一张【酒】`,'he').set('ai',card=>{ if(get.event('goon')) return 5-get.value(card); @@ -191,7 +192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ viewas:{ audio:'dddxiaxing', enable:'chooseToUse', - filter:function(event,player){ + filter(event,player){ if(event.type=='wuxie'||!player.hasMark('dddxiaxing')) return false; for(const name of ['sha','shan']){ if(event.filterCard({name:name,isCard:true},player,event)) return true; @@ -199,7 +200,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ const vcards=[]; for(const name of ['sha','shan']){ const card={name:name,isCard:true}; @@ -209,7 +210,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dialog.direct=true; return dialog; }, - backup:function(links,player){ + backup(links,player){ return { filterCard:()=>false, selectCard:-1, @@ -218,18 +219,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ isCard:true, }, popname:true, - precontent:function(){ + precontent(){ player.logSkill('dddxiaxing_viewas'); player.clearMark('dddxiaxing'); }, } }, - prompt:function(links,player){ + prompt(links,player){ return '侠行:移去“侠”标记,视为使用一张【'+get.translation(links[0][2])+'】'; } }, ai:{ - order:function(item,player){ + order(item,player){ const event=get.event(); if(event.filterCard({name:'sha'},player,event)){ if(!player.hasShan()&&!game.hasPlayer(function(current){ @@ -243,7 +244,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, respondSha:true, respondShan:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(!player.hasMark('dddxiaxing')) return false; if(arg!='use') return false; }, @@ -258,11 +259,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddjuxian:{ enable:'phaseUse', usable:2, - filter:function(event,player){ + filter(event,player){ return !player.hasSkill('dddjuxian_ban'); }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var dialog=ui.create.dialog('聚贤:请选择一项','hidden'); dialog.add([[ ['top','展示一张牌,然后将此牌置于牌堆顶'], @@ -270,16 +271,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ],'textbutton']); return dialog; }, - filter:function(button,player){ + filter(button,player){ return !player.hasSkill('dddjuxian_'+button.link,null,null,false); }, - check:function(button){ + check(button){ return 1; }, - backup:function(links){ + backup(links){ return get.copy(lib.skill['dddjuxian_'+links[0]]); }, - prompt:function(links){ + prompt(links){ if(links[0]=='top') return '展示一张牌,然后将此牌置于牌堆顶'; return '展示一张牌,然后将此牌交给一名其他角色'; }, @@ -300,7 +301,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, delay:false, lose:false, - content:function*(event,map){ + *content(event,map){ const player=map.player,cards=event.cards; player.addTempSkill('dddjuxian_top','phaseUseAfter'); player.showCards(cards); @@ -343,7 +344,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, delay:false, lose:false, - content:function*(event,map){ + *content(event,map){ const player=map.player,cards=event.cards,target=event.targets[0]; player.addTempSkill('dddjuxian_hand','phaseUseAfter'); player.showCards(cards); @@ -370,7 +371,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseJieshuBegin'}, direct:true, - content:function*(event,map){ + *content(event,map){ const player=map.player; let result=yield player.chooseTarget(get.prompt2('dddjungui')); if(!result.bool) return event.finish(); @@ -411,7 +412,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCardAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(get.type(event.card)!='equip') return false; if(get.subtype(event.card)!='equip1') return false; const range=player.getAttackRange(); @@ -420,7 +421,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, direct:true, - content:function*(event,map){ + *content(event,map){ const player=map.player; let result=yield player.chooseTarget('精彀:对一名其他角色造成1点伤害',true,lib.filter.notMe).set('ai',target=>{ var player=get.player(); @@ -436,7 +437,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddmoyan:{ audio:2, trigger:{global:'roundStart'}, - content:function*(event,map){ + *content(event,map){ const player=map.player; const cards=game.cardsGotoOrdering(get.cards(3)).cards; yield player.showCards(cards,`${get.translation(player)}发动了【末焱】`); @@ -456,13 +457,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target:{ onremove:true, trigger:{player:'damageBegin3'}, - filter:function(event,player){ + filter(event,player){ const info=player.getStorage('dddmoyan_target'); return info[0]&&info[0].isIn()&&info[0].countCards('h')<=info[1]; }, forced:true, charlotte:true, - content:function(){ + content(){ trigger.increase('num'); }, }, @@ -472,11 +473,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddshilie:{ audio:2, enable:'chooseToUse', - hiddenCard:function(player,name){ + hiddenCard(player,name){ if(!player.countCards('h')) return false; return name=='sha'||name=='shan'; }, - filter:function(event,player){ + filter(event,player){ if(event.type=='wuxie'||!_status.currentPhase) return false; if(!player.countCards('h')||player.hasSkill('dddshilie_used',null,null,false)) return false; for(var name of ['sha','shan']){ @@ -485,7 +486,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var vcards=[]; for(var name of ['sha','shan']){ var card={name:name,isCard:true}; @@ -495,12 +496,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dialog.direct=true; return dialog; }, - check:function(button){ + check(button){ return 1; }, - backup:function(links,player){ + backup(links,player){ return { - filterCard:function(card){ + filterCard(card){ return !get.is.shownCard(card); }, filterOk:()=>{ @@ -517,7 +518,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, popname:true, ignoreMod:true, - ai1:function(card){ + ai1(card){ const need=get.player().getHp()+(_status.currentPhase?_status.currentPhase.getHp():0); let num=0; for(var i=0;i=2) str+='然后你受到1点火属性伤害并重置此技能。'; return str; }, - check:function(event,player){ + check(event,player){ if(player.countMark('dddyeshen')>=2&&get.damageEffect(player,player,player,'fire')<0) return false; return get.attitude(player,event.player)>0; }, - content:function(){ + content(){ 'step 0' event.target=trigger.player; var cards=get.bottomCards(3-player.countMark('dddyeshen')); @@ -662,7 +663,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'linkAfter'}, direct:true, usable:1, - filter:function(event,player){ + filter(event,player){ var num=game.countPlayer(current=>current.isLinked()); if(event.player.isLinked()){ return player.countCards('he')>=num&&game.hasPlayer(current=>current.isDamaged()); @@ -671,7 +672,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return num>0; } }, - content:function(){ + content(){ 'step 0' if(trigger.player.isLinked()){ var num=game.countPlayer(current=>current.isLinked()); @@ -719,23 +720,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ddddiedang:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ if(player.storage.ddddiedang) return player.countCards('he')>=3; return true; }, filterCard:true, position:'he', - selectCard:function(){ + selectCard(){ var player=_status.event.player; return player.storage.ddddiedang?3:0; }, - prompt:function(){ + prompt(){ var player=_status.event.player; if(player.storage.ddddiedang) return '弃置三张牌,然后摸一张牌'; return '摸三张牌,然后弃置一张牌'; }, check:card=>5-get.value(card), - content:function(){ + content(){ 'step 0' if(player.storage.ddddiedang){ player.draw(); @@ -750,7 +751,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - player:function(player){ + player(player){ if(ui.selected.cards.length){ var num=1+player.countCards('h',card=>!ui.selected.cards.includes(card)); if(!game.hasPlayer(current=>{ @@ -768,12 +769,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddanliu:{ trigger:{player:'phaseJieshuBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&game.hasPlayer(function(current){ return current!=player&¤t.countCards('h')>0; }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('dddanliu'),function(card,player,target){ return target!=player&&target.countCards('h')>0; @@ -856,12 +857,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhuSkill:true, trigger:{player:'phaseZhunbeiBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.hasZhuSkill('dddguiying')&&game.hasPlayer(function(current){ return current!=player&¤t.group=='wu'&&player.hasZhuSkill('dddguiying',current)&¤t.countCards('h')>0; }); }, - gainEffect:function(player){ + gainEffect(player){ var gainers=game.filterPlayer(current=>current.countCards('ej')); if(!gainers.length) return 0; var min=Math.min.apply(Math,gainers.map((current)=>{ @@ -900,7 +901,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })); })) }, - content:function(){ + content(){ 'step 0' event.targets=game.filterPlayer(function(current){ return current!=player&¤t.group=='wu'&&player.hasZhuSkill('dddguiying',current); @@ -1004,7 +1005,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //王伉吕凯 dddbingjian:{ enable:['chooseToUse','chooseToRespond'], - filter:function(event,player){ + filter(event,player){ if(event.type=='wuxie') return false; if(player.countMark('dddbingjian_used')>=2) return false; if(player.countCards('h')==2) return false; @@ -1017,7 +1018,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },player,event) }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ return ui.create.dialog( '并肩', // [[ @@ -1029,7 +1030,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ) }, // select:2, - filter:function(button,player){ + filter(button,player){ if(ui.selected.buttons.length){ if(typeof button.link==typeof ui.selected.buttons[0].link) return false; } @@ -1041,11 +1042,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ isCard:true, }); }, - check:function(button){ + check(button){ // if(typeof button.link=='number') return button.link; return 1; }, - backup:function(links,player){ + backup(links,player){ // if(typeof links[0]=='number') links.reverse(); var skill={ viewAs:{ @@ -1075,7 +1076,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return skill; }, - prompt:function(links,player){ + prompt(links,player){ // if(typeof links[0]=='number') links.reverse(); var num=2-player.countCards('h'); if(num>0){ @@ -1088,7 +1089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ pretao:true, - order:function(item,player){ + order(item,player){ if(player.countCards('h')<4) return get.order({name:'sha'},player)+0.2; return 1; }, @@ -1096,7 +1097,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:1, }, }, - content_draw:function(){ + content_draw(){ 'step 0' delete event.result.skill; player.logSkill('dddbingjian'); @@ -1115,7 +1116,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.draw(lib.skill.dddbingjian_backup.draw); } }, - content_discard:function(){ + content_discard(){ 'step 0' delete event.result.skill; player.logSkill('dddbingjian'); @@ -1143,7 +1144,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.discardPlayerCard(target,'he',true,event.num); } }, - content_draw_old:function(){ + content_draw_old(){ 'step 0' delete event.result.skill; player.logSkill('dddbingjian'); @@ -1164,7 +1165,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delayx(); } }, - content_discard_old:function(){ + content_discard_old(){ 'step 0' delete event.result.skill; player.logSkill('dddbingjian'); @@ -1202,13 +1203,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ blocker:{ charlotte:true, mod:{ - cardEnabled:function(card,player){ + cardEnabled(card,player){ if(player.getStorage('dddbingjian_blocker').includes(card.name)) return false; }, - cardRespondable:function(card,player){ + cardRespondable(card,player){ if(player.getStorage('dddbingjian_blocker').includes(card.name)) return false; }, - cardSavable:function(card,player){ + cardSavable(card,player){ if(player.getStorage('dddbingjian_blocker').includes(card.name)) return false; }, }, @@ -1227,14 +1228,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddtongyu:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('hs')>0; }, viewAs:{ name:'wugu', }, selectCard:[1,4], - filterCard:function(card){ + filterCard(card){ var suit=get.suit(card); if(suit=='none') return false; if(!ui.selected.cards.length) return true; @@ -1246,10 +1247,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ complexCard:true, position:'hs', prompt:'将任意张花色不同的牌当做【五谷丰登】使用', - check:function(card){ + check(card){ return 5-get.value(card); }, - precontent:function(){ + precontent(){ if(!event.result.card.storage) event.result.card.storage={}; event.result.card.storage.chooseDirection=true; event.result.card.storage.extraCardsNum=event.result.cards.length; @@ -1264,10 +1265,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, charlotte:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.skill=='dddtongyu'&&event.isFirstTarget; }, - content:function(){ + content(){ 'step 0' event.targets=trigger.targets.slice().sortBySeat(_status.currentPhase||player); 'step 1' @@ -1303,12 +1304,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ give:{ trigger:{player:'wuguRemained'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.skill!='dddtongyu'||event.remained.filterInD().length==0) return false; var list=event.getParent().dddtongyu_targets; return list.some(target=>target.isIn()); }, - content:function(){ + content(){ 'step 0' event.cards=trigger.remained.filterInD(); player.chooseTarget('仝御:令一名角色获得'+get.translation(event.cards),function(card,player,target){ @@ -1332,7 +1333,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:true, intro:{content:'本回合不能使用或打出手牌'}, mod:{ - cardEnabled2:function(card){ + cardEnabled2(card){ return false; }, }, @@ -1342,14 +1343,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddzhilian:{ trigger:{global:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ var targets=game.filterPlayer2(function(current){ return current.getHistory('useCard').length+current.getHistory('respond').length>0; }); if(!targets.includes(player)||!targets.some(target=>target!=player&&target.hasSex('male'))) return false; return targets.length==2&&!targets.some(target=>!target.isIn()); }, - content:function(){ + content(){ 'step 0' var targets=game.filterPlayer(function(current){ return current.getHistory('useCard').length+current.getHistory('respond').length>0; @@ -1414,7 +1415,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lose:false, filter:(event,player)=>game.hasPlayer(current=>lib.skill.dddjijian.filterTarget(null,player,current)), filterTarget:(card,player,target)=>(target!=player&&target.hasSex('male')), - content:function(){ + content(){ 'step 0' player.showCards(cards); player.give(cards,target); @@ -1483,7 +1484,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:4, result:{ - player:function(player,target){ + player(player,target){ if(get.attitude(player,target)>0&&player.hasCard(card=>get.name(card)=='sha','h')) return target.countCards('h'); return 0.1/target.countCards('h'); }, @@ -1495,7 +1496,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filter:(event,player)=>game.hasPlayer(current=>lib.skill.dddjijian_old.filterTarget(null,player,current)), filterTarget:(card,player,target)=>(target!=player&&target.hasSex('male')&&target.countCards('h')>0), - content:function(){ + content(){ 'step 0' target.chooseCard('h',true,[1,2],'请展示一至两张手牌').set('ai',function(card){ var player=_status.event.player,source=_status.event.getParent().player; @@ -1621,7 +1622,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:4, result:{ - player:function(player,target){ + player(player,target){ if(get.attitude(player,target)>0&&player.hasCard(card=>get.name(card)=='sha','h')) return target.countCards('h'); return 0.1/target.countCards('h'); }, @@ -1632,7 +1633,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, - filter:function(event,player){ + filter(event,player){ if(!player.isPhaseUsing()) return false; var boolh=!player.hasSkill('dddzhengjun_handcard',null,false,false),boole=(!player.hasSkill('dddzhengjun_equip')&&player.canMoveCard(null,true)); var hs=player.countCards('h'),es=player.countCards('e'); @@ -1658,7 +1659,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, direct:true, - content:function*(event,map){ + *content(event,map){ var player=map.player,trigger=map.trigger; var boolh=!player.hasSkill('dddzhengjun_handcard',null,false,false),hs=player.countCards('h'); if(boolh&&game.hasPlayer(function(current){ @@ -1716,7 +1717,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - content_old:function(){ + content_old(){ 'step 0' var boolh=!player.hasSkill('dddzhengjun_handcard',null,false,false),hs=player.countCards('h'); if(boolh&&game.hasPlayer(function(current){ @@ -1771,7 +1772,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hp:{ trigger:{global:['damageEnd','loseHpEnd','recoverEnd']}, direct:true, - filter:function(event,player){ + filter(event,player){ if(player.hp!=event.player.hp) return false; if(event.hujia&&event.hujia==event.num) return false; if(!game.hasPlayer(current=>current.getHp()==player.getHp()&¤t!=player)) return false; @@ -1784,7 +1785,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('dddzhengjun'),'令一名体力值与你相等的其他角色回复或失去1点体力',function(card,player,target){ return target.getHp()==player.getHp()&&player!=target; @@ -1815,13 +1816,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"useCard2", }, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.card.name!='sha'||!player.isPhaseUsing()) return false; return game.hasPlayer(function(current){ return !event.targets.includes(current)&&lib.filter.targetEnabled2(event.card,player,current); }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget( get.prompt('dddxianxi'), @@ -1857,7 +1858,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"useCardAfter", }, forced:true, - filter:function(event,player){ + filter(event,player){ if(!event._dddxianxi_map||!event._dddxianxi_map[player.playerid]) return false; for(var target of event._dddxianxi_map[player.playerid]){ if(!target.hasHistory('damage',function(evt){ @@ -1866,7 +1867,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' var targets=trigger._dddxianxi_map[player.playerid].filter(function(target){ return !target.hasHistory('damage',function(evt){ @@ -1899,7 +1900,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:["phaseZhunbeiSkipped","phaseZhunbeiCancelled","phaseDrawSkipped","phaseDrawCancelled","phaseJudgeSkipped","phaseJudgeCancelled","phaseUseSkipped","phaseUseCancelled","phaseDiscardSkipped","phaseDiscardCancelled","phaseJieshuSkipped","phaseJieshuCancelled"], }, frequent:true, - content:function (){ + content (){ 'step 0' player.judge(function(card){ var name=get.name(card,false); @@ -1927,7 +1928,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:["loseAfter","loseAsyncAfter"], }, direct:true, - filter:function (event,player){ + filter (event,player){ if(event.type!='discard') return false; var cards=event.getd(); for(var i of cards){ @@ -1940,7 +1941,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function (){ + content (){ 'step 0' if(!event.cards) event.cards=[]; var cards=trigger.getd().filter(function(i){ @@ -1983,7 +1984,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:"useCardAfter", }, - content:function(){ + content(){ player.draw(); player.when({player:'useCardAfter',global:'phaseAfter'}).filter(evt=>evt!=trigger).then(()=>{ if(trigger.name=='useCard') player.chooseToDiscard('he',true); @@ -1994,7 +1995,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:'useCardAfter', }, - filter:function(event,player){ + filter(event,player){ if(player==event.player) return false; const evt=event.getParent('phaseUse'); if(!evt||evt.player!=event.player) return false; @@ -2003,7 +2004,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },event).length==2; }, direct:true, - content:function*(event,map){ + *content(event,map){ const player=map.player,trigger=map.trigger,target=trigger.player; let result=yield player.chooseCard('he',get.prompt('dddshijian',target),`交给${get.translation(target)}一张牌,然后其本回合使用下一张牌指定目标时,你令此牌额外结算一次或摸一张牌。`).set('ai',card=>{ if(get.event('goon')) return 6-get.value(card); @@ -2018,14 +2019,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ extra:{ trigger:{global:'useCardToPlayer'}, - filter:function(event,player){ + filter(event,player){ if(!event.isFirstTarget) return false; return player.getStorage('dddshijian_extra').includes(event.player); }, charlotte:true, forced:true, onremove:true, - content:function*(event,map){ + *content(event,map){ const player=map.player,trigger=map.trigger,target=trigger.player; if(trigger.targets&&trigger.targets.length){ let result=yield player.chooseControl(['额外结算','摸一张牌']).set('prompt','实荐:请选择一项').set('prompt2',`令${get.translation(trigger.card)}额外结算一次,或摸一张牌`).set('ai',()=>{ @@ -2047,14 +2048,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:"useCardAfter", }, - filter:function (event,player){ + filter (event,player){ var evt=event.getParent('phaseUse'); if(!evt||evt.player!=player) return false; return player.getHistory('useCard',function(evtx){ return evtx.getParent('phaseUse')==evt; },event).length==1; }, - content:function (){ + content (){ player.draw(2); player.addTempSkill('dddxuyu_old_discard','phaseUseAfter'); }, @@ -2063,7 +2064,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:"useCardAfter", }, - filter:function (event,player){ + filter (event,player){ if(!player.countCards('he')) return false; var evt=event.getParent('phaseUse'); if(!evt||evt.player!=player) return false; @@ -2073,7 +2074,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, charlotte:true, - content:function (){ + content (){ player.chooseToDiscard('he',true); }, sub:true, @@ -2084,7 +2085,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:"useCardAfter", }, - filter:function (event,player){ + filter (event,player){ if(player==event.player) return false; var evt=event.getParent('phaseUse'); if(!evt||evt.player!=event.player) return false; @@ -2093,10 +2094,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },event).length==3; }, logTarget:"player", - check:function(event,player){ + check(event,player){ return get.attitude(player,event.player)>0; }, - content:function (){ + content (){ trigger.player.draw(); player.addTempSkill('dddshijian_old_draw','phaseUseAfter'); }, @@ -2105,7 +2106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:"useCardAfter", }, - filter:function (event,player){ + filter (event,player){ if(!event.player.countCards('he')) return false; var evt=event.getParent('phaseUse'); if(!evt||evt.player!=event.player) return false; @@ -2115,7 +2116,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, charlotte:true, - content:function (){ + content (){ player.draw(2); }, sub:true, @@ -2127,7 +2128,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"phaseEnd", }, direct:true, - filter:function (event,player){ + filter (event,player){ if(!game.getGlobalHistory('changeHp').some(evt=>evt.player==player)) return false; return game.getGlobalHistory('cardMove').some(function(evt){ if(evt.name!='cardsDiscard'){ @@ -2136,7 +2137,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return evt.cards.some(card=>get.position(card,true)=='d'); }); }, - content:function (){ + content (){ 'step 0' player.chooseTarget(get.prompt('dddtaisi'),'你可以令一名角色获得一张于本回合内进入弃牌堆的牌。若该角色于本回合内对你造成过伤害,则你摸两张牌。').set('ai',function(target){ var player=_status.event.player,att=get.attitude(player,target); @@ -2179,19 +2180,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ limited:true, skillAnimation:true, animationColor:"thunder", - filter:function (event,player){ + filter (event,player){ return player.hasCard({color:'red'},'he'); }, filterCard:{ color:"red", }, - filterTarget:function (card,player,target){ + filterTarget (card,player,target){ return player!=target; }, discard:false, delay:false, lose:false, - content:function (){ + content (){ 'step 0' event.count=1; player.awakenSkill('dddquche'); @@ -2226,16 +2227,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseCardTarget({ prompt:'是否将一张黑色牌当做【杀】使用?', position:'he', - filterCard:function(card,player){ + filterCard(card,player){ if(get.color(card)!='black') return false; var card=get.autoViewAs({name:'sha'},[card]); return lib.filter.cardEnabled(card,player); }, - selectTarget:function(){ + selectTarget(){ var card=get.autoViewAs({name:'sha'},ui.selected.cards); return lib.filter.selectTarget(card,_status.event.player); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ var card=get.autoViewAs({name:'sha'},ui.selected.cards); return lib.filter.targetEnabled(card,player,target)&&lib.filter.targetInRange(card,player,target); }, @@ -2255,7 +2256,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, mod:{ - globalFrom:function (from,to,distance){ + globalFrom (from,to,distance){ return distance-from.countMark('dddquche_effect'); }, }, @@ -2269,7 +2270,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:"limited", }, - init:function (player,skill){ + init (player,skill){ player.storage[skill]=false; }, }, @@ -2280,7 +2281,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, filter:(event,player)=>player.hasZhuSkill('dddqianlong'), - content:function (){ + content (){ player.draw(3); }, group:"dddqianlong_cancel", @@ -2291,12 +2292,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, popup:false, - filter:function (event,player){ + filter (event,player){ if(!player.hasZhuSkill('dddqianlong')) return false; var evt=event.getParent(); return evt&&evt.name=='die'&&evt.source==player; }, - content:function (){ + content (){ trigger.cancel(); }, sub:true, @@ -2308,13 +2309,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"phaseBegin", }, logTarget:"player", - filter:function (event,player){ + filter (event,player){ return player!=event.player&&player.countCards('h')>0&&event.player.countCards('h')>0; }, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.player)<=0; }, - content:function (){ + content (){ 'step 0' event.target=trigger.player; player.addTempSkill('ddddongcha_effect'); @@ -2337,10 +2338,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"phaseEnd", }, forced:true, - filter:function (event,player){ + filter (event,player){ return player.getExpansions('ddddongcha_effect').length>0; }, - content:function (){ + content (){ 'step 0' var cards=player.getExpansions('ddddongcha_effect'); if(cards.length>0){ @@ -2373,7 +2374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, dddzhijie:{ enable:"chooseToUse", - filter:function (event,player){ + filter (event,player){ if(event.type=='phase') return false; var cards=player.getExpansions('ddddongcha_effect'); if(cards.length<2) return false; @@ -2388,7 +2389,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(wuxie&&event.filterCard({name:'wuxie'},player,event)) return true; return false; }, - hiddenCard:function (player,name){ + hiddenCard (player,name){ if(name!='shan'&&name!='wuxie') return false; var cards=player.getExpansions('ddddongcha_effect'); if(cards.length<2) return false; @@ -2404,11 +2405,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, chooseButton:{ - dialog:function (event,player){ + dialog (event,player){ return ui.create.dialog('智解',player.getExpansions('ddddongcha_effect'),'hidden') }, select:2, - filter:function (button,player){ + filter (button,player){ if(!ui.selected.buttons.length) return true; var evt=_status.event.getParent(),buttons=ui.selected.buttons; return evt.filterCard(get.autoViewAs({ @@ -2416,7 +2417,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },[button.link,buttons[0].link])); }, check:()=>1, - backup:function (links,player){ + backup (links,player){ return { viewAs:{name:(get.color(links[0])==get.color(links[1]))?'shan':'wuxie'}, cards:links, @@ -2424,7 +2425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ position:'x', filterCard:(card)=>lib.skill['dddzhijie_backup'].cards.includes(card), popname:true, - precontent:function(){ + precontent(){ player.addTempSkill('dddzhijie_draw'); }, } @@ -2433,7 +2434,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ combo:"ddddongcha", respondShan:true, - skillTagFilter:function (player){ + skillTagFilter (player){ return lib.skill['dddzhijie'].hiddenCard(player,'shan'); }, order:10, @@ -2452,10 +2453,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, charlotte:true, popup:false, - filter:function (event,player){ + filter (event,player){ return event.skill=='dddzhijie_backup'; }, - content:function (){ + content (){ player.draw(2); }, sub:true, @@ -2467,12 +2468,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"phaseBegin", }, direct:true, - filter:function (event,player){ + filter (event,player){ return player!=event.player&&event.player.hp>0&&player.countCards('h',function(card){ return !get.is.shownCard(card); })>=event.player.hp; }, - content:function (){ + content (){ 'step 0' var target=trigger.player; player.chooseCard('h',target.hp,get.prompt('dddqiahua',target),'选择明置'+get.cnNumber(target.hp)+'张手牌,然后'+get.translation(target)+'获得技能〖恂恂〗直到本回合结束。',function(card){ @@ -2502,10 +2503,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, dddfusi:{ mod:{ - ignoredHandcard:function (card,player){ + ignoredHandcard (card,player){ if(get.is.shownCard(card)) return true; }, - cardDiscardable:function (card,player,name){ + cardDiscardable (card,player,name){ if(name=='phaseDiscard'&&get.is.shownCard(card)) return false; }, }, @@ -2523,7 +2524,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, dddfusi_global:{ mod:{ - cardEnabled2:function(card,player){ + cardEnabled2(card,player){ var source=_status.currentPhase; if(!source||source==player||!source.hasSkill('dddfusi')||source.countCards('h')==0||source.hasCard(function(card){ return !get.is.shownCard(card); @@ -2532,7 +2533,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, enable:"chooseToUse", - filter:function (event,player){ + filter (event,player){ if(event._dddfusi_refused||player.hasSkill('dddfusi_refused')) return false; var players=game.filterPlayer(function(current){ return current!=player&¤t.hasSkill('dddfusi'); @@ -2546,7 +2547,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - hiddenCard:function (player,name){ + hiddenCard (player,name){ if(player.hasSkill('dddfusi_refused')) return false; var players=game.filterPlayer(function(current){ return current!=player&¤t.hasSkill('dddfusi'); @@ -2561,7 +2562,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, chooseButton:{ - dialog:function (event,player){ + dialog (event,player){ var dialog=ui.create.dialog('腹笥','hidden'); var players=game.filterPlayer(function(current){ return current!=player&¤t.hasSkill('dddfusi'); @@ -2580,21 +2581,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return dialog; }, - filter:function (button,player){ + filter (button,player){ var card=get.autoViewAs(button.link),evt=_status.event.getParent(); return evt.filterCard(card,player,evt); }, - check:function (button){ + check (button){ if(_status.event.getParent().type!='phase') return 1; return _status.event.player.getUseValue(get.autoViewAs(button.link),null,true); }, - backup:function (links,player){ + backup (links,player){ return { card:links[0], viewAs:get.autoViewAs(links[0]), filterCard:()=>false, selectCard:-1, - precontent:function(){ + precontent(){ 'step 0' var card=lib.skill['dddfusi_global_backup'].card; event.card=card; @@ -2635,14 +2636,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, } }, - prompt:function (links,player){ + prompt (links,player){ return '请选择'+get.translation(links[0])+'的目标'; }, }, ai:{ order:10, result:{ - player:function (player,target){ + player (player,target){ if(!game.hasPlayer(function(current){ return current!=player&¤t.hasSkill('dddfusi')&&get.attitude(player,current)>=0; })) return 0; @@ -2652,7 +2653,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, respondSha:true, respondShan:true, - skillTagFilter:function (player,tag,arg){ + skillTagFilter (player,tag,arg){ var name; switch(tag){ case 'respondSha':name='sha';break; @@ -2665,22 +2666,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddtuoji:{ trigger:{global:'useCardAfter'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return event.card.storage&&event.card.storage._dddfusi_owner==player&&!player.hasCard(function(card){ return !get.is.shownCard(card); },'h'); }, - content:function(){ + content(){ player.draw(3); }, }, dddchashi:{ trigger:{global:'phaseUseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&player.countCards('he')>0; }, - content:function*(event,map){ + *content(event,map){ const player=map.player,trigger=map.trigger,target=trigger.player; const valuableCards=target.getCards('hs',card=>target.hasValueTarget(card)); let result=yield player.chooseToDiscard(get.prompt('dddchashi',target),'弃置一张牌,若其使用的下一张牌的花色或类型与此牌相同,你与其各摸一张牌','he').set('logSkill',['dddchashi',target]).set('ai',card=>{ @@ -2696,7 +2697,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('dddchashi_effect','phaseUseAfter'); target.addTempSkill('dddchashi_ai',{player:['phaseUseAfter','useCard1']}); }, - content_old:function(){ + content_old(){ 'step 0' var target=trigger.player,history=target.getHistory('useCard',function(evt){ return evt.getParent('phaseUse')==trigger; @@ -2743,7 +2744,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'useCard'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ var storage=player.getStorage('dddchashi'); if(!storage||!storage.length) return false; if(event.player!=storage[1]||!event.player.isIn()) return false; @@ -2756,14 +2757,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // }).indexOf(event)!=0) return false; return true; }, - content:function(){ + content(){ var storage=player.getStorage('dddchashi'); // storage[1].gain(storage[0],player,'give'); // player.draw(); game.asyncDraw([player,storage[1]].sortBySeat(_status.currentPhase)); player.removeSkill('dddchashi_effect'); }, - onremove:function(player,storage){ + onremove(player,storage){ delete player.storage['dddchashi']; // player.removeGaintag('dddchashi'); }, @@ -2775,10 +2776,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, dddqice:{ trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ + filter(event,player){ return !player.storage['dddqice']; }, - content:function(){ + content(){ player.draw(2); // player.addTempSkill('dddqice_effect'); player.setStorage('dddqice',true); @@ -2791,7 +2792,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseJieshuBegin'}, forced:true, charlotte:true, - content:function(){ + content(){ 'step 0' var list=[]; player.getHistory('useCard',function(evt){ @@ -2831,7 +2832,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'gameDrawBegin'}, forced:true, - content:function(){ + content(){ var me=player; var numx=trigger.num; trigger.num=typeof numx=='function'?function(player){ @@ -2851,10 +2852,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'水', intro:{ name:'水相', - markcount:function(storage,player){ + markcount(storage,player){ return ''+player.getExpansions('dddmiaoxing_1').length+'/'+player.getExpansions('dddmiaoxing_2').length; }, - mark:function(dialog,content,player){ + mark(dialog,content,player){ var content1=player.getExpansions('dddmiaoxing_1'); var content2=player.getExpansions('dddmiaoxing_2'); if(content1&&content1.length||content2&&content2.length){ @@ -2876,10 +2877,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'phaseBefore', }, forced:true, - filter:function(event,player){ + filter(event,player){ return game.phaseNumber==0&&player._dddmiaoxing; }, - content:function(){ + content(){ 'step 0' delete player._dddmiaoxing; var cardsx=player.getCards('h'),num=Math.ceil(cardsx.length/3); @@ -2905,7 +2906,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ balance:{ trigger:{player:'phaseDrawAfter'}, forced:true, - content:function(){ + content(){ 'step 0' var forced=player.getExpansions('dddmiaoxing_1').length!=player.countCards('h')&& player.getExpansions('dddmiaoxing_2').length!=player.countCards('h'); @@ -2985,11 +2986,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddfushi:{ audio:2, trigger:{player:['useCardAfter','respondAfter']}, - filter:function(event,player){ + filter(event,player){ return get.type(event.card)=='basic'&&!player.hasSkill('dddfushi_used'); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseControl('第一组','第二组','cancel2').set('dialog',[ get.prompt('dddfushi'), @@ -3067,11 +3068,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:['phaseDrawBegin1','phaseDiscardBegin']}, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.name=='phaseDraw'&&event.numFixed) return false; - return lib.inpile.filter(i=>get.type(i)=='trick').removeArray(player.getStorage('dddfenji')).length; + return lib.inpile.filter(i=>get.type(i)=='trick').removeArray(player.getStorage('dddfenji')).length > 0; }, - content:function(){ + content(){ 'step 0' var cards=lib.inpile.filter(i=>{ return get.type(i)=='trick'&&!player.getStorage('dddfenji').includes(i); @@ -3123,7 +3124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, onremove:['dddxiaheng','dddxiaheng_del'], intro:{content:'已因此技能对$造成过伤害'}, - content:function(){ + content(){ 'step 0' event.targets=[]; player.chooseTarget('侠横:令一名角色弃置两张牌',true).set('ai',target=>{ @@ -3181,7 +3182,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:'roundStart', }, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>{ var history=current.actionHistory; for(var i=history.length-2;i>=0;i--){ @@ -3194,7 +3195,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }); }, - prompt2:function(event,player){ + prompt2(event,player){ var num=game.countPlayer(current=>{ var history=current.actionHistory; for(var i=history.length-2;i>=0;i--){ @@ -3208,7 +3209,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return '观看并分配牌堆顶的'+get.cnNumber(num)+'张牌'; }, - content:function(){ + content(){ 'step 0' var num=game.countPlayer(current=>{ var history=current.actionHistory; @@ -3279,10 +3280,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'dddfengzheng', enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>current.hasSkill('dddfengzheng')); }, - filterCard:function(card,player){ + filterCard(card,player){ var num=0; for(var i=0;iget.number(i,false)==number); }, - content:function(){ + content(){ 'step 0' player.chooseControl('摸牌','弃牌').set('prompt','玉律:令'+get.translation(_status.currentPhase)+'摸一张牌或弃置一张牌').set('ai',()=>{ return get.attitude(_status.event.player,_status.currentPhase)>0?'摸牌':'弃牌'; @@ -3399,11 +3400,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'enterGame', }, forced:true, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0); }, group:'dddyulv_old_enter', - content:function(){ + content(){ 'step 0' player.chooseControl(Array.from({length:13},(_,i)=>get.strNumber(i+1))).set('prompt','玉律:声明一个点数').set('ai',()=>_status.event.controls.randomGet()); 'step 1' @@ -3420,13 +3421,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter']}, forced:true, direct:true, - filter:function(event,player){ + filter(event,player){ var cards=event.getd(); if(!cards.length||!player.storage['dddyulv_old']) return false; if(!_status.currentPhase||!_status.currentPhase.isIn()) return false; return cards.some(i=>get.number(i,false)==player.storage['dddyulv_old']); }, - content:function(){ + content(){ 'step 0' player.chooseControl('摸牌','弃牌').set('prompt','玉律:令'+get.translation(_status.currentPhase)+'摸一张牌或弃置一张牌').set('ai',()=>{ return get.attitude(_status.event.player,_status.currentPhase)>0?'摸牌':'弃牌'; @@ -3470,13 +3471,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player.canCompare(target); }, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' player.chooseToCompare([target]).setContent(lib.skill['dddfenye'].chooseToCompareFenye); 'step 1' @@ -3505,7 +3506,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(event.targets.length&&event.players.length) event.goto(2); }, - chooseToCompareFenye:function(){ + chooseToCompareFenye(){ "step 0" var target=event.targets[0]; event.targets.unshift(player); @@ -3735,7 +3736,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 11" event.cards.add(event.card1); }, - contentx:function(){ + contentx(){ 'step 0' var player=game.me; event.player=player; @@ -3752,7 +3753,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ player.chooseCardTarget({ targets:targets, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return _status.event.targets.includes(target); }, selectCard:1, @@ -3760,7 +3761,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ position:'h', _global_waiting:true, ai1:event.ai, - ai2:function(target){ + ai2(target){ var player=_status.event.player,sgn=-1; if(player.hasCard(card=>get.number(card)>10&&get.value(card)<5)) sgn=1; return sgn*get.attitude(player,target); @@ -3783,7 +3784,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - $compareFenye:function(players,cards1,targets,cards2){ + $compareFenye(players,cards1,targets,cards2){ game.broadcast(function(players,cards1,targets,cards2){ lib.skill['dddfenye'].$compareFenye(players,cards1,targets,cards2); },players,cards1,targets,cards2); @@ -3899,12 +3900,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:'phaseZhunbeiBegin', }, - filter:function(event,player){ + filter(event,player){ return player.countMark('dddshichao')+1<=game.countPlayer(); }, onremove:true, forced:true, - content:function(){ + content(){ 'step 0' var N=player.countMark('dddshichao')+1; player.chooseTarget('逝潮:选择一名手牌数第'+get.cnNumber(N)+'大的角色',true,(card,player,target)=>{ @@ -3945,16 +3946,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ up:{ trigger:{source:'damageBegin2'}, - filter:function(event,player){ + filter(event,player){ return player.getStorage('dddshichao_up').includes(event.player); }, charlotte:true, - check:function(event,player){ + check(event,player){ var eff=get.damageEffect(event.player,player,player); return event.player.hasSkill('dddshichao')&&eff<0||event.num==1&&eff<13; }, logTarget:'player', - content:function(){ + content(){ 'step 0' trigger.cancel(); if(trigger.player.hasSkill('dddshichao')){ @@ -3964,7 +3965,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, clear:{ charlotte:true, - onremove:function(player){ + onremove(player){ game.filterPlayer(current=>{ current.unmarkAuto('dddshichao_up',[player]); }); @@ -3977,7 +3978,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'roundStart'}, forced:true, - content:function(){ + content(){ 'step 0' if(!game.hasPlayer(current=>current.hasMark('dddyouxue'))) player.addMark('dddyouxue'); if(!game.hasPlayer(current=>!current.hasMark('dddyouxue'))) event.finish(); @@ -4007,7 +4008,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddchengjing:{ audio:2, trigger:{global:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ if(!event.player.hasMark('dddyouxue')) return false; return event.player.hasHistory('useCard',evt=>{ if(!['basic','trick'].includes(get.type(evt.card))) return false; @@ -4019,7 +4020,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ locked:false, group:'dddchengjing_use', logTarget:'player', - content:function*(event,map){ + *content(event,map){ const player=map.player,trigger=map.trigger,target=trigger.player; let history=target.getHistory('useCard').reverse(); let cards=[]; @@ -4049,10 +4050,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filterCard:true, position:'hes', - filter:function(event,player){ - return player.getExpansions('dddchengjing').length; + filter(event,player){ + return player.getExpansions('dddchengjing').length>0; }, - viewAs:function(cards,player){ + viewAs(cards,player){ const card=player.getExpansions('dddchengjing')[0]; return new lib.element.VCard({ name:get.name(card,false), @@ -4061,14 +4062,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, popname:true, - prompt:function(){ + prompt(){ const card=get.player().getExpansions('dddchengjing')[0]; return '将一张牌当'+get.translation({ name:get.name(card,false), nature:get.nature(card,false) })+'使用'; }, - precontent:function(){ + precontent(){ player.when('useCardAfter').filter(evt=>evt.card.storage.dddchengjing).then(()=>{ var cards=trigger.cards.filterInD('od'); if(!cards.length){event.finish();return}; @@ -4092,7 +4093,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'roundStart'}, forced:true, - content:function(){ + content(){ 'step 0' var vpos=player.hasMark('dddyouxue_old')?game.filterPlayer2(i=>i.getSeatNum()==player.countMark('dddyouxue_old'))[0]:player; event.vpos=vpos; @@ -4130,7 +4131,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, firstDo:true, charlotte:true, - filter:function(event,player,name){ + filter(event,player,name){ if(event.skill) return false; var vseat=player.countMark('dddyouxue_old'); if(name!='phaseBefore'){ @@ -4147,7 +4148,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.player==player; } }, - content:function(){ + content(){ if(event.triggername=='phaseBefore'){ trigger.finish(); trigger.untrigger(true); @@ -4167,10 +4168,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, usable:1, enable:'phaseUse', - filter:function(event,player){ - return player.countCards('hes')&&player.countMark('dddyouxue_old')&&lib.skill['dddchengjing_old'].getList(player).length; + filter(event,player){ + return player.countCards('hes')>0&&player.countMark('dddyouxue_old')>0&&lib.skill['dddchengjing_old'].getList(player).length>0; }, - getList:function(player){ + getList(player){ var vpos=player.hasMark('dddyouxue_old')?game.filterPlayer2(i=>i.getSeatNum()==player.countMark('dddyouxue_old'))[0]:player; if(!vpos||!vpos.isIn()) return []; var vcard=[]; @@ -4189,7 +4190,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return vcard; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var list=lib.skill['dddchengjing_old'].getList(player); list.sort((a,b)=>{ return 100*(lib.inpile.indexOf(a[2])-lib.inpile.indexOf(b[2]))+lib.inpile_nature.indexOf(a[3])-lib.inpile_nature.indexOf(b[3]); @@ -4199,10 +4200,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }) return ui.create.dialog('承经',[list,'vcard']); }, - filter:function(button,player){ + filter(button,player){ return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent()); }, - check:function(button){ + check(button){ if(_status.event.getParent().type!='phase') return 1; var player=_status.event.player; return player.getUseValue({ @@ -4210,12 +4211,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nature:button.link[3], }); }, - backup:function(links,player){ + backup(links,player){ return { filterCard:true, audio:'dddchengjing_old', popname:true, - check:function(card){ + check(card){ return 8-get.value(card); }, position:'hes', @@ -4224,12 +4225,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nature:links[0][3], storage:{'dddchengjing_old':true} }, - precontent:function(){ + precontent(){ player.addTempSkill('dddchengjing_old_effect'); }, } }, - prompt:function(links,player){ + prompt(links,player){ return '将一张牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; } }, @@ -4246,10 +4247,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'useCardAfter'}, charlotte:true, direct:true, - filter:function(event,player){ + filter(event,player){ return event.card&&event.card.storage&&event.card.storage['dddchengjing_old']; }, - content:function(){ + content(){ 'step 0' var damaged=game.hasPlayer2(current=>current.hasHistory('damage',evt=>evt.card==trigger.card)); event.damaged=damaged; @@ -4276,18 +4277,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseDrawBegin2'}, charlotte:true, forced:true, - filter:function(event,player){ - return player.countMark('dddchengjing_old_draw0')||player.countMark('dddchengjing_old_draw1'); + filter(event,player){ + return player.countMark('dddchengjing_old_draw0')>0||player.countMark('dddchengjing_old_draw1')>0; }, - content:function(){ + content(){ trigger.num+=player.countMark('dddchengjing_old_draw0')-player.countMark('dddchengjing_old_draw1'); }, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('dddchengjing_old_limit0')-player.countMark('dddchengjing_old_limit1'); } }, - onremove:function(player){ + onremove(player){ delete player.storage['dddchengjing_old_draw0']; delete player.storage['dddchengjing_old_draw1']; delete player.storage['dddchengjing_old_limit0']; @@ -4297,7 +4298,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'承', intro:{ name:'承经', - content:function(storage,player){ + content(storage,player){ var str=''; if(player.countMark('dddchengjing_old_draw0')||player.countMark('dddchengjing_old_draw1')){ var num=player.countMark('dddchengjing_old_draw0')-player.countMark('dddchengjing_old_draw1'); @@ -4319,14 +4320,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, dddduanbing:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.canAddJudge('bingliang')&&player.hasCard((card)=>lib.skill['dddduanbing'].filterCard(card,player),'he'); }, - filterCard:function(card,player){ + filterCard(card,player){ if(get.color(card)!='black'||get.type2(card)=='trick') return false; return player.canAddJudge(get.autoViewAs({name:'bingliang'},[card])); }, - check:function(card){ + check(card){ return 8.2-get.value(card); }, discard:false, @@ -4335,7 +4336,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prepare:'throw', group:'dddduanbing_effect', position:'he', - content:function(){ + content(){ 'step 0' player.addJudge({name:'bingliang'},cards); 'step 1' @@ -4349,11 +4350,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },false,'nodistance'); }, ai:{ - order:function(item,player){ + order(item,player){ return get.order({name:'sha'})-0.1; }, result:{ - player:function(player){ + player(player){ return player.getUseValue({name:'sha'},false) }, }, @@ -4362,19 +4363,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ effect:{ trigger:{source:'damageSource'}, charlotte:true, - filter:function(event,player){ + filter(event,player){ if(event.getParent().type!='card'||!event.player.isIn()) return false; return player.hasCard(card=>{ return (card.viewAs||card.name)=='bingliang'&&event.player.canAddJudge(card); },'j'); }, prompt:(event)=>('是否将【兵粮寸断】转移给'+get.translation(event.player)+'?'), - check:function(event,player){ + check(event,player){ return player.hasCard(card=>{ return (card.viewAs||card.name)=='bingliang'&&event.player.canAddJudge(card)&&get.effect(event.player,card,player,player)>=0; },'j'); }, - content:function(){ + content(){ var cards=player.getCards('j',card=>{ return (card.viewAs||card.name)=='bingliang'&&trigger.player.canAddJudge(card); }); @@ -4394,7 +4395,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'gameDrawBegin'}, forced:true, group:'dddxiaoxing_remove', - init:function(player,skill){ + init(player,skill){ if(game.online) return; var bool=get.event().getParent('phaseLoop',true); if(!bool) return; @@ -4403,7 +4404,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(3); } }, - content:function(){ + content(){ var me=player; var numx=trigger.num; trigger.num=typeof numx=='function'?function(player){ @@ -4427,14 +4428,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'dying'}, forced:true, // direct:true, - // filter:function(event,player){ + // filter(event,player){ // return event.source&&event.source.isIn()&&event.source.getEquips(1).length>0; // }, - content:function(){ + content(){ player.removeSkill('dddxiaoxing'); game.log(player,'失去了技能','#g【枭行】'); }, - content_old:function(){ + content_old(){ 'step 0' trigger.source.chooseBool(get.prompt('dddxiaoxing',player),'废除武器栏,令其失去〖枭行〗').set('ai',()=>{ if(_status.event.maybe) return Math.random()<0.5; @@ -4454,14 +4455,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddlangzhi:{ audio:2, trigger:{player:'phaseJieshuBegin'}, - logTarget:function(event,player){ + logTarget(event,player){ return game.filterPlayer(current=>player.inRange(current)&¤t.countCards('he')); }, prompt:'是否发动【狼志】?', - prompt2:function(event,player){ + prompt2(event,player){ return `展示${get.translation(game.filterPlayer(current=>player.inRange(current)&¤t.countCards('he')))}的各一张牌,然后选择一项:1.用任意张牌替换其中等量张牌;2.获得所有展示牌,失去〖狼志〗。` }, - content:function(){ + content(){ 'step 0' event.targets=game.filterPlayer(current=>player.inRange(current)&¤t.countCards('he')); event.cards=[]; @@ -4561,7 +4562,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // global:['discardBegin','drawBegin'], global:'dieAfter', }, - filter:function(event,player){ + filter(event,player){ if(!event.source||!event.source.isIn()||event.source.group!='qun') return false; if(!event.souce.countCards('he')<2) return false; if(!player.hasZhuSkill('dddfuyi',event.source)) return false; @@ -4570,7 +4571,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return skills.length; }, - filter_old:function(event,player){ + filter_old(event,player){ var evt=event.getParent(); if(evt.name!='die'||evt.source!=event.player||event.player==player) return false; if(!player.hasZhuSkill('dddfuyi',event.player)) return false; @@ -4579,7 +4580,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, direct:true, global:'dddfuyi_sha', - content:function(){ + content(){ 'step 0' trigger.source.chooseCard('是否响应'+get.translation(player)+'的【附义】?','弃置两张牌,令其获得其武将牌上的一个技能','he',2,lib.filter.cardDiscardable).set('ai',()=>{ if(get.attitude(_status.event.player,_status.event.getParent().player)<=2) return 0; @@ -4608,7 +4609,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var skill=result.control; player.addSkillLog(skill); }, - content_old:function(){ + content_old(){ 'step 0' var str='取消此次奖惩,令其获得'; var skills=player.getSkills('dddxiaoxing',null,false,false); @@ -4656,7 +4657,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ sha:{ mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha'){ if(player.group!='qun') return; return num+game.countPlayer(current=>{ @@ -4672,11 +4673,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddzhuanshe:{ audio:2, trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')&&event.player!=player; }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseCard(get.prompt2('dddzhuanshe',trigger.player)).set('ai',card=>{ var target=_status.event.getTrigger().player; @@ -4699,7 +4700,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ effect:{ audio:'dddzhuanshe', trigger:{global:'useCard2'}, - filter:function(event,player){ + filter(event,player){ if(!player.getStorage('dddzhuanshe_effect').includes(event.card.name)) return false; if(event.player!=_status.currentPhase) return false; var type=get.type(event.card,null,false); @@ -4719,7 +4720,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'dddzhuanshe_damage', charlotte:true, onremove:true, - content:function(){ + content(){ 'step 0' var prompt2='为'+get.translation(trigger.card)+'增加一个目标' player.chooseTarget(get.prompt('dddzhuanshe_effect'),function(card,player,target){ @@ -4749,7 +4750,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ damage:{ audio:'dddzhuanshe', trigger:{global:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ var list=player.getStorage('dddzhuanshe_effect').slice(); event.player.getHistory('useCard',evt=>{ list.remove(evt.card.name); @@ -4759,10 +4760,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, logTarget:'player', prompt2:'对其造成1点伤害', - check:function(event,player){ + check(event,player){ return get.damageEffect(event.player,player,player)>=0; }, - content:function(){ + content(){ trigger.player.damage(player); } } @@ -4771,12 +4772,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddweiqiu:{ audio:2, trigger:{global:'recoverBefore'}, - filter:function(event,player){ + filter(event,player){ return !player.countCards('h'); }, forced:true, direct:true, - content:function(){ + content(){ trigger.player.logSkill('dddweiqiu',player); trigger.cancel(); player.draw(); @@ -4786,10 +4787,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddlianer:{ audio:2, trigger:{player:'useCardAfter'}, - filter:function(event,player){ + filter(event,player){ return event.cards.filterInD('od').length&&get.color(event.card)=='red'; }, - content:function(){ + content(){ 'step 0' var cards=trigger.cards.filterInD('od'); event.cards=cards; @@ -4802,7 +4803,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(get.itemtype(card)=='card'&&get.color(card)=='red'){ if(!player.storage['dddlianer_ceiling']) return; var numx=get.number(card); @@ -4817,17 +4818,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ onremove:true, charlotte:true, mod:{ - cardEnabled:function(card,player){ + cardEnabled(card,player){ if(!player.storage['dddlianer_ceiling']) return; var num=get.number(card); if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false; }, - cardRespondable:function(card,player){ + cardRespondable(card,player){ if(!player.storage['dddlianer_ceiling']) return; var num=get.number(card); if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false; }, - cardSavable:function(card,player){ + cardSavable(card,player){ if(!player.storage['dddlianer_ceiling']) return; var num=get.number(card); if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false; @@ -4839,14 +4840,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddanzhi:{ audio:2, trigger:{global:'phaseBegin'}, - filter:function(event,player){ + filter(event,player){ var evts=game.getAllGlobalHistory('everything',evt=>['useCard','respond'].includes(evt.name)); if(!evts.length) return false; const color=get.color(evts.lastItem.card,false); return color=='black' }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('dddanzhi'),'选择一名角色,此回合其第一次成为黑色牌的目标时,此牌对其无效').set('ai',target=>{ return get.attitude(_status.event.player,target); @@ -4861,12 +4862,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ effect:{ trigger:{target:'useCardToTarget'}, - filter:function(event,player){ + filter(event,player){ return get.color(event.card)=='black'; }, forced:true, charlotte:true, - content:function(){ + content(){ trigger.targets.remove(player); trigger.getParent().triggeredTargets2.remove(player); trigger.untrigger(); @@ -4885,7 +4886,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, onremove:true, - filter:function(event,player){ + filter(event,player){ var num=player.countMark('dddshixing'); if(event.name=='changeHp'){ if(event.player.hasSex('female')){ @@ -4905,10 +4906,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return true; }, - content:function(){ + content(){ lib.skill['dddshixing'].applyChange(player); }, - applyChange:function(player){ + applyChange(player){ player.removeAdditionalSkill('dddshixing'); var bool1=game.hasPlayer(current=>!current.isDamaged()&¤t.hasSex('female')), bool2=game.getGlobalHistory('useCard',evt=>get.type2(evt.card)=='trick').length==0; @@ -4924,12 +4925,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ddddanggu:{ audio:2, trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ + filter(event,player){ return game.countPlayer(current=>current.isLinked())current.group=='qun'); }, forced:true, group:'ddddanggu_negative', - content:function(){ + content(){ 'step 0' if(!event.loop) event.loop=0; var num=game.countPlayer(current=>current.group=='qun')-game.countPlayer(current=>current.isLinked()); @@ -4945,7 +4946,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ targets.forEach(i=>i.link()); } }, - discard:function(){ + discard(){ "step 0" game.log(player,'进入了弃牌阶段'); event.num=Math.max(0,player.countCards('he',card=>!player.canIgnoreHandcard(card))-player.getHandcardLimit()); @@ -4964,12 +4965,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ negative:{ trigger:{global:'phaseDiscardBegin'}, - filter:function(event,player){ + filter(event,player){ return event.player!=player&&event.player.isLinked(); }, forced:true, logTarget:'player', - content:function(){ + content(){ trigger.setContent(lib.skill['ddddanggu'].discard); }, } @@ -4984,12 +4985,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'enterGame', }, forced:true, - filter:function(event,player){ + filter(event,player){ if(!player.hasZhuSkill('dddfuzong')) return false; return (event.name!='phase'||game.phaseNumber==0); }, group:'dddfuzong_discard', - content:function(){ + content(){ player.draw(game.countPlayer(current=>{ return current.group=='qun'; })); @@ -4997,14 +4998,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ discard:{ trigger:{global:'die'}, - filter:function(event,player){ + filter(event,player){ if(!player.hasZhuSkill('dddfuzong')) return false; return event.player.group=='qun'; }, zhuSkill:true, forced:true, logTarget:'player', - content:function(){ + content(){ trigger.player.discardPlayerCard(player,'he',true).set('forceDie',true); }, } @@ -5016,7 +5017,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseDrawBegin1'}, zhuanhuanji:true, direct:true, - content:function(){ + content(){ 'step 0' if(player.hasMark('dddxuanlun_del')) event._result={bool:true}; else player.chooseBool(get.prompt('dddlanghuai'),'展示手牌(无牌则不展示),并改为摸其中'+(!player.storage['dddlanghuai']?'包含':'缺少')+'花色数的牌').set('ai',()=>_status.event.bool).set('bool',function(){ @@ -5054,7 +5055,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, mark:true, intro:{ - content:function(storage,player){ + content(storage,player){ return '摸牌阶段,你可展示手牌(无牌则不展示),并改为摸其中'+(!storage?'包含':'缺少')+'花色数的牌。'; }, }, @@ -5063,7 +5064,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dddxuanlun:{ audio:2, trigger:{player:'damageEnd'}, - content:function(){ + content(){ player.draw(4); player.addTempSkill('dddxuanlun_choose'); }, @@ -5071,7 +5072,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ maixie:true, maixie_hp:true, result:{ - effect:function (card,player,target){ + effect (card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; if(!target.hasFriend()) return; @@ -5093,11 +5094,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseEnd'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ if(player.hasMark('dddxuanlun_del')&&!player.countCards('h')) return false; return true; }, - content:function(){ + content(){ 'step 0' var choices=[]; var choiceList=['将四张牌以任意顺序置于牌堆顶或底','删去此项和〖朗怀〗中的“可”,直到你发动〖朗怀〗']; @@ -5194,7 +5195,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:['recoverBegin','useCard'], }, - filter:function(event,player){ + filter(event,player){ if(event.player==player) return false; if(event.name=='recover') return player.isDamaged(); return get.type(event.card,false)=='equip'&&event.cards.some(i=>get.position(i,true)=='o'&&player.canEquip(i,true)); @@ -5203,12 +5204,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'legend', logTarget:'player', - check:function(event,player){ + check(event,player){ if(get.attitude(player,event.player)>=0) return false; if(event.name=='recover') return get.recoverEffect(event.player,player,player)current.isMaxEquip(true)&¤t.countGainableCards(player,'he'))||game.hasPlayer(current=>current.getHp()==1); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('dddbailei'),(card,player,target)=>{ return target.isMaxEquip(true)&&target.countGainableCards(player,'he')||target.getHp()==1; @@ -5298,24 +5299,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, dynamicTranslate:{ - dddxiaheng:function(player){ + dddxiaheng(player){ return '锁定技。出牌阶段开始时,你选择一名角色,其弃置两张牌,然后你对一名角色造成1点伤害。'+(player.storage['dddxiaheng_del']?'':'。“若两名角色:均不为你,你失去一点体力上限;为同一名角色,你失去一点体力;然后若以此法对包括你在内三名不同的角色造成伤害,删除双引号里的描述内容”'); }, - dddshichao:function(player){ + dddshichao(player){ return '锁定技,准备阶段,你选择一名手牌数为全场第('+(1+player.countMark('dddshichao'))+')大的角色,将手牌数调整至与其相等且至多等于主公的体力上限;其于你的下回合开始前对你造成伤害时,其可防止之,然后令()内的数字+1。'; }, - dddlanghuai:function(player){ + dddlanghuai(player){ return '转换技,摸牌阶段,你'+(player.hasMark('dddxuanlun_del')?'':'可')+'展示手牌(无牌则不展示),并改为摸其中'+(!player.storage['dddlanghuai']?'包含':'缺少')+'花色数的牌。'; }, - dddxuanlun:function(player){ + dddxuanlun(player){ var deleted=player.hasMark('dddxuanlun_del'); return '你受到伤害后,你可摸四张牌;你发动此技能的回合结束时,'+(deleted?'你':'须选择一项:')+'将四张牌以任意顺序置于牌堆顶或底'+(deleted?'。':';或删去此项和“朗怀”中的“可”,直到你发动“朗怀”。'); }, - ddddiedang:function(player){ + ddddiedang(player){ if(player.storage.ddddiedang) return '出牌阶段限一次,你可以弃置三张牌,然后摸一张牌;然后若你的手牌数为全场最多或最少,则你交换上述描述中的“弃置”和“摸”。' return '出牌阶段限一次,你可以摸三张牌,然后弃置一张牌;然后若你的手牌数为全场最多或最少,则你交换上述描述中的“摸”和“弃置”。'; }, - dddyeshen:function(player){ + dddyeshen(player){ return '一名角色的结束阶段,你可以亮出牌堆底'+get.cnNumber(3-player.countMark('dddyeshen'))+'张牌,令其将其中一张黑色牌当做最大目标数为牌名字数的【铁索连环】使用或重铸,其余牌置于牌堆顶,然后此技能亮出牌数-1;若减至零张或其中没有黑色牌,你复原此技能并对自己造成1点火焰伤害。'; }, }, diff --git a/character/diy.js b/character/diy.js index c5bf168a2..6584de17d 100755 --- a/character/diy.js +++ b/character/diy.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'diy', @@ -193,22 +193,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ junk_xuyou:["male","qun",3,["nzry_chenglve","junkshicai","nzry_cunmu"]], }, characterFilter:{ - key_jojiro:function(mode){ + key_jojiro(mode){ return mode=='chess'||mode=='tafang'; }, - key_yuu:function(mode){ + key_yuu(mode){ return mode=='identity'||mode=='doudizhu'||mode=='single'||(mode=='versus'&&_status.mode!='standard'&&_status.mode!='three'); }, - key_tomoya:function(mode){ + key_tomoya(mode){ return mode!='chess'&&mode!='tafang'&&mode!='stone'; }, - key_sunohara:function(mode){ + key_sunohara(mode){ return mode!='guozhan'; }, - ns_duangui:function(mode){ + ns_duangui(mode){ return mode=='identity'&&_status.mode=='normal'; }, - diy_liuyan:function(mode){ + diy_liuyan(mode){ return mode!='chess'&&mode!='tafang'; } }, @@ -383,7 +383,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterTarget:true, selectTarget:[1,3], derivation:'key_kano', - content:function(){ + content(){ 'step 0' target.draw(); 'step 1' @@ -398,7 +398,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.lose(card,'toRenku'); } }, - contentAfter:function(){ + contentAfter(){ if(player.isIn()&&_status.renku.length&&function(){ var cards=_status.renku; if(cards.length==1) return true; @@ -414,7 +414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - player:function(player,target){ + player(player,target){ if(player.hasSkill('kano_poyu')) return 2; return 0; }, @@ -429,7 +429,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'key_kamome', skills:['kamome_suitcase'], ai:{ - equipValue:function(card){ + equipValue(card){ return 7; }, basic:{ @@ -447,7 +447,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ attackFrom:-5, }, ai:{ - equipValue:function(card){ + equipValue(card){ return 7; }, basic:{ @@ -462,7 +462,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'key_miki', skills:['miki_binoculars'], ai:{ - equipValue:function(card){ + equipValue(card){ return 7; }, basic:{ @@ -474,20 +474,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fullskin:true, type:'delay', wuxieable:false, - modTarget:function(card,player,target){ + modTarget(card,player,target){ return lib.filter.judge(card,player,target); }, - enable:function(card,player){ + enable(card,player){ return player.canAddJudge(card); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return (lib.filter.judge(card,player,target)&&player==target); }, - judge:function(card){ + judge(card){ if(get.color(card)=='red') return 0; return -4; }, - effect:function(){ + effect(){ var source=cards[0].storage.nsfuzhou_source; if(!source||!source.isIn()) return; source.line(player,'thunder'); @@ -558,7 +558,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:event=>{ return event.name!='phase'||game.phaseNumber==0; }, - content:function(){ + content(){ 'step 0' player.drawTo(8); 'step 1' @@ -566,12 +566,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(hs.length>0) player.addShownCards(hs,'visible_fuuko_xingdiao'); }, mod:{ - ignoredHandcard:function(card){ + ignoredHandcard(card){ if(card.hasGaintag('visible_fuuko_xingdiao')){ return true; } }, - cardDiscardable:function(card,player,name){ + cardDiscardable(card,player,name){ if(name=='phaseDiscard'&&card.hasGaintag('visible_fuuko_xingdiao')){ return false; } @@ -593,7 +593,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ const num=game.countPlayer(current=>lib.skill.fuuko_xingdiao_gain.filterTarget(null,_status.event.player,current)); return num>1?1:-1; }, - content:function(){ + content(){ 'step 0' target.markAuto('fuuko_xingdiao',[player]); var cards=target.getCards('h',card=>card.hasGaintag('visible_fuuko_xingdiao')); @@ -621,7 +621,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:['gainAfter','equipAfter','addJudgeAfter','loseAsyncAfter','addToExpansionAfter'], }, forced:true, - filter:function(event,player){ + filter(event,player){ const evt=event.getl(player); if(!evt.hs.length) return false; for(let i in evt.gaintag_map){ @@ -629,7 +629,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ var evt=trigger.getl(player),gains=[],draws=0; var map=evt.gaintag_map; var cards=evt.hs.filter(card=>{ @@ -651,14 +651,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ effect:{ mod:{ - targetInRange:function(card){ + targetInRange(card){ if(!card.cards||!card.cards.length) return; for(var i of card.cards){ if(!i.hasGaintag('fuuko_chuanyuan')) return; } return true; }, - cardUsable:function(card){ + cardUsable(card){ if(!card.cards||!card.cards.length) return; for(var i of card.cards){ if(!i.hasGaintag('fuuko_chuanyuan')) return; @@ -671,7 +671,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, firstDo:true, - filter:function(event,player){ + filter(event,player){ if(event.addCount===false) return false; return player.hasHistory('lose',evt=>{ if(evt.getParent()!=event) return false; @@ -681,7 +681,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); //return false; }, - content:function(){ + content(){ trigger.addCount=false; player.getStat('card')[trigger.card.name]--; }, @@ -692,10 +692,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ iriya_yinji:{ trigger:{player:'phaseUseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')<17; }, - content:function(){ + content(){ player.drawTo(17).gaintag=['iriya_yinji_tag']; player.addSkill('iriya_yinji_tag'); }, @@ -703,7 +703,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tag:{ charlotte:true, mod:{ - cardEnabled:function(card){ + cardEnabled(card){ if(get.itemtype(card)=='card'){ if(card.hasGaintag('iriya_yinji_tag')) return false; } @@ -711,10 +711,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(card.cards.some(card=>card.hasGaintag('iriya_yinji_tag'))) return false; } }, - aiValue:function(player,card,num){ + aiValue(player,card,num){ if(get.itemtype(card)=='card'&&card.hasGaintag('iriya_yinji_tag')) return num/10000; }, - aiUseful:function(player,card,num){ + aiUseful(player,card,num){ if(get.itemtype(card)=='card'&&card.hasGaintag('iriya_yinji_tag')) return num/10000; }, }, @@ -727,7 +727,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:[2,Infinity], promptfunc:()=>'出牌阶段,你可以按照斗地主牌型弃置至少两张牌,且其他角色可以依次对其进行一轮响应。最后一名进行响应的角色可以根据对应牌型执行对应效果。', position:'he', - getType:function(cards,player){ + getType(cards,player){ var nums=cards.map(card=>{ var num=get.number(card,player); if(num<=2) return num+13; @@ -802,10 +802,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return null; }, - filterOk:function(){ + filterOk(){ return Array.isArray(lib.skill.iriya_haozhi.getType(ui.selected.cards,_status.event.player)); }, - check:function(card){ + check(card){ var player=_status.event.player; //收益都一样 多一牌不如少一牌 var types=['炸弹','三顺','单顺','双顺','三张','对子']; @@ -950,7 +950,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, //响应AI - respondAI:function(card){ + respondAI(card){ if(!_status.event.goon) return 0; var type=_status.event.type,player=_status.event.player; var getNum=function(card,player){ @@ -1060,7 +1060,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - content:function(){ + content(){ 'step 0' var players=game.filterPlayer().sortBySeat(player.getNext()); event.players=players; @@ -1152,7 +1152,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ next.setContent(lib.skill.iriya_haozhi['content'+type]); } }, - content1:function(){ + content1(){ 'step 0' player.chooseTarget([1,2],'是否令至多两名角色各摸一张牌?').set('ai',function(target){ var player=_status.event.player,att=get.attitude(player,target); @@ -1167,7 +1167,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delayex(); } }, - content2:function(){ + content2(){ 'step 0' player.chooseTarget([1,3],'是否弃置至多三名角色的各一张牌?',function(card,player,target){ return target!=player&&target.hasCard(function(card){ @@ -1189,7 +1189,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //player.recover(); player.draw(); }, - content3:function(){ + content3(){ 'step 0' event.count=0; 'step 1' @@ -1222,7 +1222,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 4' if(event.count>0) player.draw(event.count); }, - content4:function(){ + content4(){ 'step 0' event.count=0; 'step 1' @@ -1256,7 +1256,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 4' if(event.count>0) player.recover(event.count); }, - content5:function(){ + content5(){ 'step 0' player.chooseTarget([1,3],'是否令至多三名其他角色翻面?',lib.filter.notMe).set('ai',function(target){ var player=_status.event.player,att=get.attitude(player,target); @@ -1284,7 +1284,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.damage('fire'); } }, - content6:function(){ + content6(){ 'step 0' player.chooseTarget('是否对一名其他角色进行核打击?','你对该角色造成2点雷属性伤害,然后该角色翻面,弃置装备区内的所有牌和四张手牌。',lib.filter.notMe).set('ai',function(target){ var player=_status.event.player,att=get.attitude(player,target); @@ -1324,7 +1324,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard2'}, forced:true, onremove:true, - content:function(){ + content(){ 'step 0' var num=player.countMark('iriya_haozhi_extra'); player.removeSkill('iriya_haozhi_extra'); @@ -1376,10 +1376,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //远野美凪&远野小满 minagi_peiquan:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.hasCard((card)=>card.hasGaintag('minagi_tag'),'h'); }, - filterCard:function(card){ + filterCard(card){ return card.hasGaintag('minagi_tag'); }, position:'h', @@ -1392,7 +1392,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ const player=_status.event.player; return get.type(card,false)=='equip'&&game.hasPlayer(current=>player.canGift(card,current,true)&&!current.refuseGifts(card,player)&&get.effect(current,card,player,player)>0)?2:1+Math.random(); }, - content:function(){ + content(){ 'step 0' player.gift(cards,target); 'step 1' @@ -1464,10 +1464,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'enterGame', }, forced:true, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0)&&player.countCards('h')>0; }, - content:function(){ + content(){ var hs=player.getCards('h'); player.addGaintag(hs,'minagi_tag'); }, @@ -1477,7 +1477,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ minagi_huanliu:{ trigger:{player:'phaseZhunbeiBegin'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(lib.filter.notMe,get.prompt('minagi_huanliu'),'和一名其他角色进行“协力”,并获得“远野小满”的所有对应技能').set('ai',function(target){ return get.threaten(target)*Math.sqrt(1+target.countCards('h'))*((target.isTurnedOver()||target.hasJudge('lebu'))?0.1:1); @@ -1508,10 +1508,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseJieshuBegin'}, forced:true, logTarget:'player', - filter:function(event,player){ + filter(event,player){ return player.checkCooperationStatus(event.player,'minagi_huanliu')&&player.countCards('h')>0; }, - content:function(){ + content(){ game.log(player,'和',trigger.player,'的协力成功'); var hs=player.getCards('h'); player.addGaintag(hs,'minagi_tag'); @@ -1524,7 +1524,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ michiru_sheyuan:{ charlotte:true, enable:'chooseToUse', - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('michiru_sheyuan_round')) return false; var hs=player.getCards('h'); if(!hs.length) return false; @@ -1546,7 +1546,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - hiddenCard:function(player,name){ + hiddenCard(player,name){ var type=get.type(name); if(type!='basic'&&type!='trick') return false; if(player.hasSkill('michiru_sheyuan_round')) return false; @@ -1560,7 +1560,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return true; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var list=[],hs=player.getCards('h'); for(var name of lib.inpile){ var type=get.type(name); @@ -1576,7 +1576,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return ui.create.dialog('舍愿',[list,'vcard'],'hidden'); }, - check:function(button){ + check(button){ var player=_status.event.player; var card={ name:button.link[2], @@ -1585,7 +1585,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(_status.event.getParent().type=='phase') return player.getUseValue(card,null,true); return 1; }, - backup:function(links,player){ + backup(links,player){ return { viewAs:{ name:links[0][2], @@ -1594,24 +1594,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:true, position:'h', selectCard:-1, - onuse:function(result,player){ + onuse(result,player){ player.addTempSkill('michiru_sheyuan_round','roundStart'); }, } }, - prompt:function(links,player){ + prompt(links,player){ return '将所有手牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用,然后摸等量的牌'; }, }, ai:{ respondSha:true, respondShan:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ return lib.skill.michiru_sheyuan.hiddenCard(player,'s'+tag.slice(8)); }, order:1, result:{ - player:function(player){ + player(player){ if(_status.event.dying) return get.attitude(player,_status.event.dying); return 1; }, @@ -1623,10 +1623,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardAfter'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.skill=='michiru_sheyuan_backup'; }, - content:function(){ + content(){ player.draw(trigger.cards.length); }, }, @@ -1637,25 +1637,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tomoyo_wuwei:{ enable:['chooseToUse','chooseToRespond'], viewAs:{name:'sha'}, - viewAsFilter:function(player){ + viewAsFilter(player){ var storage=player.getStorage('tomoyo_wuwei_mark'); return player.hasCard(function(card){ return !storage.includes(get.suit(card)); },'hs'); }, position:'hs', - filterCard:function(card,player){ + filterCard(card,player){ var storage=player.getStorage('tomoyo_wuwei_mark'); return !storage.includes(get.suit(card)); }, - check:function(card){ + check(card){ return 5-get.value(card); }, - onuse:function(result,player){ + onuse(result,player){ player.markAuto('tomoyo_wuwei_mark',[get.suit(result.card,false)]); player.addTempSkill('tomoyo_wuwei_mark'); }, - onrespond:function(event,player){ + onrespond(event,player){ player.markAuto('tomoyo_wuwei_mark',[get.suit(event.card,false)]); player.addTempSkill('tomoyo_wuwei_mark'); }, @@ -1668,10 +1668,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ combo:{ trigger:{global:'useCardAfter'}, direct:true, - filter:function(event,player){ + filter(event,player){ return event.card.name=='shan'&&player.inRangeOf(event.player)&&player.canUse('sha',event.player,false); }, - content:function(){ + content(){ player.chooseToUse('武威:是否对'+get.translation(trigger.player)+'使用一张【杀】?',function(card,player,event){ if(get.name(card)!='sha') return false; return lib.filter.filterCard.apply(this,arguments); @@ -1684,10 +1684,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dutySkill:true, trigger:{player:'phaseZhunbeiBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer((current)=>player.inRange(current)); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('tomoyo_zhengfeng'),'令一名攻击范围内的角色进行判定。其于你的下回合开始前使用与判定结果颜色相同的牌时,你摸一张牌。',function(card,player,target){ return player.inRange(target); @@ -1718,7 +1718,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, mod:{ - inRangeOf:function(source,player){ + inRangeOf(source,player){ var list=player.getStorage('tomoyo_zhengfeng_tomoyo'); for(var obj of list){ if(obj.target==source) return true; @@ -1727,7 +1727,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{global:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ var color=get.color(event.card); if(color=='none') return false; var list=player.getStorage('tomoyo_zhengfeng_tomoyo'); @@ -1736,11 +1736,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ player.draw(); }, intro:{ - mark:function(dialog,students,player){ + mark(dialog,students,player){ if(!students||!students.length) return '全校风纪良好!'; var str=''; for(var i of students){ @@ -1755,7 +1755,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, after:{ trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ + filter(event,player){ return !player.hasHistory('useSkill',function(evt){ return evt.skill=='tomoyo_zhengfeng'; }); @@ -1764,10 +1764,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt2:'你可以减1点体力上限并失去〖武威〗,摸两张牌并回复1点体力,然后获得技能〖长誓〗。', skillAnimation:true, animationColor:'gray', - check:function(event,player){ + check(event,player){ return (player.hp*1.1+player.countCards('h'))<3; }, - content:function(){ + content(){ 'step 0' game.log(player,'放弃了身为学生会长的使命'); player.awakenSkill('tomoyo_zhengfeng'); @@ -1788,12 +1788,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:['gainAfter','loseAsyncAfter'], }, forced:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&&event.getg(current).length>1&&player.inRangeOf(current); }); }, - content:function(){ + content(){ player.draw(); }, group:'tomoyo_changshi_recover', @@ -1801,10 +1801,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ recover:{ trigger:{global:'recoverAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.player.isAlive()&&player.inRangeOf(event.player); }, - content:function(){ + content(){ player.changeHujia(1); }, }, @@ -1813,7 +1813,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //天宫希优 kiyu_yuling:{ mod:{ - targetEnabled:function(card){ + targetEnabled(card){ var info=get.info(card); if(!info||(info.type!='trick'&&info.type!='delay')) return; if(info.range) return false; @@ -1822,17 +1822,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{target:'useCardToTargeted'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&event.player.countCards('he')>0; }, logTarget:'player', - content:function(){ + content(){ trigger.player.chooseToDiscard('he',true,get.distance(trigger.player,player)); }, ai:{ threaten:0.7, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(card.name=='sha') return 0.7; }, }, @@ -1842,7 +1842,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseUseEnd'}, charlotte:true, unique:true, - filter:function(event,player){ + filter(event,player){ return !player.hasSkill('kiyu_rexianyu_round',null,null,false)&&player.hasHistory('useCard',function(evt){ var type=get.type(evt.card); if(type!='basic'&&type!='trick') return false; @@ -1850,7 +1850,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, direct:true, - content:function(){ + content(){ 'step 0' var history=player.getHistory('useCard',function(evt){ var type=get.type(evt.card); @@ -1891,7 +1891,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ round:{charlotte:true}, lastrun:{ enable:'chooseToUse', - onChooseToUse:function(event){ + onChooseToUse(event){ if(!game.online&&event.type=='phase'){ var evtx=event.getParent(); var num=event.player.getHistory('useCard',function(evt){ @@ -1900,7 +1900,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.set('rexianyu_num',num); } }, - filter:function(event,player){ + filter(event,player){ if(!player.countCards('hs')) return false; var num=event.rexianyu_num,list=player.storage.kiyu_rexianyu_lastrun; if(!Array.isArray(list)||typeof num!='number'||list.length<=num) return false; @@ -1910,14 +1910,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, onremove:true, - viewAs:function(cards,player){ + viewAs(cards,player){ var num=_status.event.rexianyu_num,list=player.storage.kiyu_rexianyu_lastrun; if(!Array.isArray(list)||typeof num!='number'||list.length<=num) return {name:'sha'}; var card=get.copy(list[num]); delete card.isCard; return card; }, - prompt:function(){ + prompt(){ var player=_status.event.player; var num=_status.event.rexianyu_num,list=player.storage.kiyu_rexianyu_lastrun; if(!Array.isArray(list)||typeof num!='number'||list.length<=num) return '无可用牌'; @@ -1930,7 +1930,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:true, position:'h', popname:true, - check:function(card){ + check(card){ var player=_status.event.player; var num=_status.event.rexianyu_num,list=player.storage.kiyu_rexianyu_lastrun; return player.getUseValue(list[num],null,true)-player.getUseValue(card,null,true); @@ -1941,7 +1941,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:12, result:{ - player:function(player){ + player(player){ var lunarq=player.storage.amamiya_kiyu; if(lunarq&&get.attitude(player,lunarq)<=0) return -1; return 1; @@ -1953,12 +1953,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardAfter'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ if(event.skill!='kiyu_rexianyu_lastrun') return false; var lunarq=player.storage.amamiya_kiyu; return get.itemtype(lunarq)=='player'&&lunarq.isAlive(); }, - content:function(){ + content(){ var lunarq=player.storage.amamiya_kiyu; lunarq.draw(); player.addTempSkill('kiyu_rexianyu_wolf'); @@ -1969,7 +1969,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('kiyu_rexianyu_wolf'); }, }, @@ -1982,11 +1982,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseUseBegin'}, charlotte:true, round:1, - filter:function(event,player){ + filter(event,player){ return event.player.countCards('h')>0; }, logTarget:'player', - check:function(event,player){ + check(event,player){ var target=event.player; var next=target.next; if(target.getSeatNum()>next.getSeatNum()) return true; @@ -1995,7 +1995,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })<2) return false; return true; }, - content:function(){ + content(){ 'step 0' var target=trigger.player,cards=target.getCards('h'); var next=player.chooseToMove('先预:预测'+get.translation(target)+'使用牌的顺序',true); @@ -2023,7 +2023,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, charlotte:true, onremove:true, - content:function(){ + content(){ var num=0,index=-1,target=trigger.player; var cards=player.getStorage('kiyu_xianyu_lastrun'); var history=target.getHistory('useCard',function(event){ @@ -2054,7 +2054,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('kiyu_xianyu_effect'); }, }, @@ -2064,10 +2064,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //樱庭星罗 seira_xinghui:{ trigger:{player:'phaseZhunbeiBegin'}, - check:function(event,player){ + check(event,player){ return !player.getExpansions('seira_xinghui').length; }, - content:function(){ + content(){ 'step 0' game.delayx(); 'step 1' @@ -2138,10 +2138,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, intro:{ markcount:'expansion', - content:function(storage,player){ + content(storage,player){ return '共有'+get.cnNumber(player.getExpansions('seira_xinghui').length)+'张牌'; }, - onunmark:function(storage,player){ + onunmark(storage,player){ player.removeSkill('seira_xinghui_hoshikuzu'); }, }, @@ -2150,10 +2150,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageBegin1'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('seira_xinghui').length>0; }, - content:function(){ + content(){ trigger.num++; game.log(player,'造成了','#y暴击伤害'); }, @@ -2162,10 +2162,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ draw:{ trigger:{player:'drawBefore'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('seira_xinghui').length>0; }, - content:function(){ + content(){ var cards=player.getExpansions('seira_xinghui'); var num=Math.min(cards.length,trigger.num); trigger.num-=num; @@ -2176,10 +2176,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ judge:{ trigger:{player:'judgeBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('seira_xinghui').length>0; }, - content:function(){ + content(){ trigger.directresult=player.getExpansions('seira_xinghui')[0]; }, }, @@ -2193,7 +2193,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ multitarget:true, multiline:true, line:{color:[253, 153, 182]}, - content:function(){ + content(){ game.countPlayer(function(current){ if(!targets.includes(current)){ current.removeSkill('seira_yinyuan'); @@ -2214,10 +2214,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ seira_yinyuan:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.hasSkill('seira_yinyuan',null,null,false)&&target.countCards('hej')>0; }, - content:function(){ + content(){ player.gainPlayerCard(target,true,'hej'); target.recover(); }, @@ -2226,12 +2226,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:9, viewHandcard:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(player==arg) return false; return player.hasSkill('seira_yinyuan')&&arg.hasSkill('seira_yinyuan'); }, result:{ - player:function(player,target){ + player(player,target){ var effect=get.effect(target,{name:'shunshou_copy'},player,player); if(target.isDamaged()){ if(effect<0) effect/=2; @@ -2246,7 +2246,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsxingyun:{ audio:2, enable:'chooseToUse', - getSixiang:function(card){ + getSixiang(card){ if(typeof card=='string') card={name:card}; if(card.name=='shan') return '玄武'; var type=get.type(card,null,false); @@ -2256,7 +2256,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(type=='trick') return '青龙'; return false; }, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('nsxingyun_round')) return false; var list=player.getStorage('nsxingyun'); if(list.length>=4) return false; @@ -2273,7 +2273,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var map={青龙:[],朱雀:[],白虎:[],玄武:[]}; var list=player.getStorage('nsxingyun'); for(var i of lib.inpile){ @@ -2295,35 +2295,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return ui.create.dialog.apply(ui.create,dialog); }, - filter:function(button,player){ + filter(button,player){ return _status.event.getParent().filterCard({ name:button.link[2], nature:button.link[3], },player,_status.event.getParent()); }, - check:function(button){ + check(button){ if(_status.event.getParent().type!='phase') return 1; return _status.event.player.getUseValue({ name:button.link[2], nature:button.link[3], },false); }, - backup:function(links,player){ + backup(links,player){ return { selectCard:1, filterCard:true, popname:true, position:'hs', - check:function(card){ + check(card){ return 7-get.value(card); }, viewAs:{name:links[0][2],nature:links[0][3]}, - precontent:function(){ + precontent(){ player.addTempSkill('nsxingyun_round'); }, } }, - prompt:function(links,player){ + prompt(links,player){ return '将一张手牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; } }, @@ -2340,11 +2340,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardAfter'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.skill=='nsxingyun_backup'&&event.cards.length==1 &&lib.skill.nsxingyun.getSixiang(event.card)!=lib.skill.nsxingyun.getSixiang(event.cards[0])&&!player.getStorage('nsxingyun').includes(lib.skill.nsxingyun.getSixiang(event.card)); }, - content:function(){ + content(){ 'step 0' player.draw(2); player.markAuto('nsxingyun',[lib.skill.nsxingyun.getSixiang(trigger.card)]); @@ -2361,12 +2361,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nshanlang:{ trigger:{player:'phaseZhunbeiBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&game.hasPlayer( (current)=>player!=current&&player.canCompare(current) ); }, - content:function(){ + content(){ 'step 0' var goon=player.hasCard(function(card){ return get.value(card)<=7; @@ -2401,7 +2401,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(card) target.gain(card,'gain2'); } }, - callback:function(){ + callback(){ var list=[[player,event.num1],[target,event.num2]],evt=event.getParent(2); for(var i of list){ if(i[1]>evt.max_num){ @@ -2417,7 +2417,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //钟离牧 nskuanhuai:{ trigger:{player:'phaseUseBegin'}, - content:function(){ + content(){ 'step 0' var card=get.discardPile(function(card){ return get.type(card)!='basic'; @@ -2431,10 +2431,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ blocker:{ charlotte:true, mod:{ - cardEnabled:function(card){ + cardEnabled(card){ if(get.type(card)=='basic') return false; }, - cardSavable:function(card){ + cardSavable(card){ if(get.type(card)=='basic') return false; }, }, @@ -2443,7 +2443,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseDiscardEnd'}, charlotte:true, direct:true, - filter:function(event,player){ + filter(event,player){ return player.hasHistory('lose',function(evt){ if(evt.type!='discard'||evt.getParent('phaseDiscard')!=event) return false; for(var i of evt.cards2){ @@ -2452,7 +2452,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }); }, - content:function(){ + content(){ 'step 0' var cards=[]; player.getHistory('lose',function(evt){ @@ -2485,11 +2485,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsdingbian:{ trigger:{player:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(player!=_status.currentPhase) return false; return get.type(event.card)!='basic'; }, - content:function(){ + content(){ 'step 0' player.addTempSkill('nsdingbian_mark'); player.addMark('nsdingbian_mark',1,false); @@ -2544,18 +2544,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, subSkill:{ mark:{ - onremove:function(player){ + onremove(player){ delete player.storage.nsdingbian_mark; delete player.storage.nsdingbian_ignore; }, mod:{ maxHandcard:(player,num)=>num-player.countMark('nsdingbian_mark'), - ignoredHandcard:function(card,player){ + ignoredHandcard(card,player){ if(player.getStorage('nsdingbian_ignore').includes(get.name(card,player))){ return true; } }, - cardDiscardable:function(card,player,name){ + cardDiscardable(card,player,name){ if(name=='phaseDiscard'&&player.getStorage('nsdingbian_ignore').includes(get.name(card,player))){ return false; } @@ -2568,19 +2568,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //李密 nstuilun:{ trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ + filter(event,player){ return player.hp>1&&player.countCards('h')>1&&player.hasCard(function(card){ return lib.filter.cardDiscardable(card,player,'nstuilun'); },'h'); }, prompt2:'失去任意点体力(至多失去至1点)并弃置任意张手牌(至多弃置至一张)。', - check:function(event,player){ + check(event,player){ if(game.hasPlayer(function(current){ return current!=player&¤t.hp>=player.hp; })) return true; return false; }, - content:function(){ + content(){ 'step 0' if(player.hp==2) event._result={index:0}; else{ @@ -2608,10 +2608,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseBegin'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return player.hp0&&player.countCards('h')0&&player.hasUseTarget({name:'jiu'},null,true); }, - content:function(){ + content(){ 'step 0' var suit=get.suit(trigger.card),cards=trigger.cards.filterInD(); var str='弃置一张牌并视为使用一张【酒】'; @@ -2714,7 +2714,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsxiaoye:{ trigger:{global:'phaseJieshuBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.hasHistory('useCard',function(evt){ return evt.card.name=='jiu'; })&&event.player.hasHistory('useCard',function(evt){ @@ -2725,7 +2725,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }) }, - content:function(){ + content(){ 'step 0' var list=[]; trigger.player.getHistory('useCard',function(evt){ @@ -2755,10 +2755,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, selectTarget:[1,Infinity], filterTarget:true, - contentBefore:function(){ + contentBefore(){ event.getParent()._nsshimeng_count=[0,0]; }, - content:function(){ + content(){ 'step 0' if(!target.isIn()){ event.finish(); @@ -2777,7 +2777,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.draw(); } }, - contentAfter:function(){ + contentAfter(){ var list=event.getParent()._nsshimeng_count; if(list[0]1||player.countCards('hs',['tao','jiu'])) return 1; @@ -2805,7 +2805,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tenzen_fenghuan:{ trigger:{global:'useCardAfter'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(player==event.player||event.targets.length!=1||event.targets[0]!=player||!event.player.isIn()|| (event.card.name!='sha'&&(get.type(event.card,null,false)!='trick'||!get.tag(event.card,'damage')))) return false; if(!player.canUse({ @@ -2823,7 +2823,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' var num=get.number(trigger.card)*2; var card={ @@ -2857,14 +2857,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, tenzen_retianquan:{ trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&(player.hp>0||player.hasCard(function(card){ return lib.filter.cardDiscardable(card,player,'tenzen_retianquan'); },'he')); }, logTarget:'target', usable:1, - check:function(event,player){ + check(event,player){ if(get.attitude(player,event.target)>=0) return false; if(player.hp>player.maxHp/2) return true; if(player.hasCard(function(card){ @@ -2873,7 +2873,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return true; }, prompt2:'你可失去1点体力或弃置一张牌,展示牌堆顶的三张牌(若你的体力值小于体力上限的50%,则改为展示五张牌)。每有一张基本牌,其所需使用的【闪】的数量便+1。然后若此牌造成过伤害,则你获得展示牌中的所有非基本牌。', - content:function(){ + content(){ 'step 0' player.chooseToDiscard('弃置一张牌,或点「取消」失去1点体力','he').set('goon',(player.hp>player.maxHp/2)).set('ai',function(card){ var val=get.value(card); @@ -2921,10 +2921,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ satomi_luodao:{ trigger:{player:'useCardToPlayered'}, logTarget:'target', - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&event.target.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' var target=trigger.target; event.target=target; @@ -2942,15 +2942,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, satomi_daohai:{ trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ + filter(event,player){ return player.hasHistory('lose',function(evt){ return evt.type=='discard'&&evt.cards2.length>0; })&&player.hasUseTarget({name:'wugu'}); }, - check:function(event,player){ + check(event,player){ return player.getUseValue({name:'wugu'})+player.getUseValue({name:'lebu'})>0; }, - content:function(){ + content(){ 'step 0' player.chooseUseTarget('wugu',true); 'step 1' @@ -2967,16 +2967,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(cards.length){ player.chooseCardTarget({ prompt:'是否将得到的牌当做【乐不思蜀】使用?', - filterCard:function(card){ + filterCard(card){ return _status.event.cards.includes(card); }, cards:cards, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ var card=get.autoViewAs({name:'lebu'},ui.selected.cards); return player.canUse(card,target); }, ai1:()=>1, - ai2:function(target){ + ai2(target){ var player=_status.event.player,card=get.autoViewAs({name:'lebu'},ui.selected.cards); return get.effect(target,{name:'lebu'},player,player); }, @@ -2995,7 +2995,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ if(player!=_status.currentPhase) return false; var index=player.getHistory('useCard').indexOf(event),history=player.actionHistory; for(var i=history.length-2;i>=0;i--){ @@ -3006,11 +3006,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ player.draw(); }, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.hujia; }, }, @@ -3020,7 +3020,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:['erika_yousheng_achieve','erika_yousheng_fail','erika_yousheng_mamori'], trigger:{global:'useCardToTarget'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.getStorage('erika_yousheng').includes(event.target)&& (event.card.name=='sha'||(get.type2(event.card,false)=='trick'&&get.tag(event.card,'damage')>0))&& (player.countMark('erika_yousheng_ruka')+1)<=player.countCards('he'); @@ -3028,7 +3028,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'已保护$', }, - content:function(){ + content(){ 'step 0' var num=(player.countMark('erika_yousheng_ruka')+1); player.chooseToDiscard('he',num,get.prompt('erika_yousheng',trigger.target),'弃置'+(num)+'张牌,并转移'+get.translation(trigger.card)).logSkill=['erika_yousheng',trigger.target]; @@ -3051,10 +3051,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, skillAnimation:'legend', animationColor:'water', - filter:function(event,player){ + filter(event,player){ return player.storage.erika_yousheng&&event.num<0&&!player.hujia; }, - content:function(){ + content(){ 'step 0' player.awakenSkill('erika_yousheng'); game.log(player,'成功完成使命'); @@ -3073,10 +3073,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fail:{ trigger:{global:'damageEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getStorage('erika_yousheng').includes(event.player)&&event.card&&(event.card.name=='sha'||(get.type2(event.card,false)=='trick'&&get.tag(event.card,'damage')>0)); }, - content:function(){ + content(){ player.awakenSkill('erika_yousheng'); game.log(player,'使命失败'); var num=player.hujia; @@ -3091,7 +3091,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'wood', direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('erika_yousheng'),[1,2],lib.filter.notMe,'选择至多两名其他角色。你减2点体力上限并获得3点护甲。').set('ai',function(ruka){ return -1; @@ -3110,10 +3110,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'useCardAfter'}, direct:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return event['erika_yousheng_'+player.playerid]&&event.cards.filterInD().length>0; }, - content:function(){ + content(){ 'step 0' player.chooseTarget('是否令一名原目标角色获得'+get.translation(trigger.cards.filterInD())+'?',function(card,player,target){ return _status.event.targets.includes(target); @@ -3131,7 +3131,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liyingxia_sanli:{ trigger:{target:'useCardToTargeted'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(event.player==player||event.player!=_status.currentPhase) return false; var index=event.player.getHistory('useCard',function(evt){ return evt.targets.includes(player); @@ -3140,7 +3140,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return index<2&&index>-1; }, logTarget:'player', - content:function(){ + content(){ 'step 0' var index=trigger.player.getHistory('useCard',function(evt){ return evt.targets.includes(player); @@ -3161,10 +3161,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liyingxia_zhenjun:{ trigger:{player:'phaseJieshuBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.group=='key'; }, - content:function(){ + content(){ 'step 0' var num=player.getHistory('useCard',function(evt){ return evt.card.name=='sha'||(get.type(evt.card)=='trick'&&get.tag(evt.card,'damage')>0); @@ -3189,7 +3189,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:true, filter:(event,player)=>(player==_status.currentPhase), intro:{content:'下回合首次造成的伤害+1'}, - content:function(){ + content(){ trigger.num++; player.removeSkill(event.name); }, @@ -3199,10 +3199,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liyingxia_wumai:{ trigger:{global:'roundStart'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.group=='shu'&&(player.getStorage('liyingxia_wumai').length<4||game.hasPlayer((current)=>current.isDamaged())); }, - content:function(){ + content(){ 'step 0' var list=lib.skill.liyingxia_wumai.derivation.slice(0); list.removeArray(player.getStorage('liyingxia_wumai')); @@ -3232,12 +3232,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kano_liezhen:{ trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ + filter(event,player){ return player.getHistory('useCard').length>0; }, direct:true, frequent:true, - content:function(){ + content(){ 'step 0' var history=player.getHistory('useCard'); if(history.length>1){ @@ -3270,20 +3270,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' if(result.bool) player.chooseUseTarget(result.links[0][2],true).logSkill='kano_liezhen'; }, - init:function(player){ + init(player){ player.storage.renku=true; }, }, kano_poyu:{ trigger:{target:'useCardToTargeted'}, charlotte:true, - filter:function(event,player){ + filter(event,player){ return _status.renku.length>0&&(event.card.name=='sha'||get.type(event.card)=='trick'&&get.tag(event.card,'damage')>0); }, - check:function(trigger,player){ + check(trigger,player){ return get.effect(player,trigger.card,trigger.player,player)<0; }, - content:function(){ + content(){ 'step 0' player.judge(); 'step 1' @@ -3311,17 +3311,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.updateRenku(); } }, - init:function(player){ + init(player){ player.storage.renku=true; }, }, mia_shihui:{ trigger:{player:'phaseDrawBegin1'}, forced:true, - filter:function(event,player){ + filter(event,player){ return !event.numFixed; }, - content:function(){ + content(){ trigger.changeToZero(); var num=0;all=player.getAllHistory(); if(all.length>1){ @@ -3341,10 +3341,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ recover:{ trigger:{player:'phaseJieshuBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.isDamaged()||player.countCards('he')>0; }, - content:function(){ + content(){ player.chooseToDiscard('he',true); player.recover(); }, @@ -3358,10 +3358,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, dutySkill:true, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0); }, - content:function(){ + content(){ 'step 0' player.draw(); 'step 1' @@ -3390,7 +3390,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:['gainAfter','loseAsyncAfter'], }, forced:true, - filter:function(event,player){ + filter(event,player){ var card=player.storage.mia_qianmeng; if(event.name=='gain'){ var source=event.player,cards=event.getg(source); @@ -3404,7 +3404,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, skillAnimation:true, animationColor:'key', - content:function(){ + content(){ 'step 0' game.log(player,'成功完成使命'); player.awakenSkill('mia_qianmeng'); @@ -3420,10 +3420,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'die'}, direct:true, forceDie:true, - filter:function(event,player){ + filter(event,player){ return get.itemtype(player.storage.mia_qianmeng)=='card'; }, - content:function(){ + content(){ 'step 0' game.log(player,'使命失败'); player.chooseTarget(get.prompt('mia_qianmeng'),'令一名角色获得牌堆中所有点数为'+player.storage.mia_qianmeng.number+'的牌',lib.filter.notMe); @@ -3445,10 +3445,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mia_fengfa:{ trigger:{player:'phaseDrawBegin2'}, forced:true, - filter:function(event,player){ + filter(event,player){ return !event.numFixed; }, - content:function(){ + content(){ var num=0;all=player.getAllHistory(); if(all.length>1){ for(var i=all.length-2;i>=0;i--){ @@ -3464,25 +3464,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kyou_zhidian:{ locked:false, mod:{ - targetInRange:function(card){ + targetInRange(card){ if(card.kyou_zhidian) return true; }, - aiOrder:function(player,card,numx){ + aiOrder(player,card,numx){ var num=_status.event._kyou_zhidian_baseValue; if(num>0&&get.type2(card)=='trick'&&player.getUseValue(card)get.type2(card)=='trick')>0; }, - filterCard:function(card){ + filterCard(card){ return get.type2(card)=='trick'; }, - onChooseToUse:function(event){ + onChooseToUse(event){ event._kyou_zhidian_baseValue=event.player.getUseValue({name:'sha'}); }, - check:function(card){ + check(card){ var num=_status.event._kyou_zhidian_baseValue,player=_status.event.player; return num-player.getUseValue(card); }, @@ -3503,11 +3503,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, locked:false, - filter:function(event,player){ + filter(event,player){ return event.isFirstTarget&&event.card.name=='sha'; }, logTarget:'target', - content:function(){ + content(){ 'step 0' var list=['不可被响应','无视防具','伤害+1','不计入次数']; list.remove(player.storage.kyou_zhidian); @@ -3553,10 +3553,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ limited:true, skillAnimation:true, animationColor:'thunder', - filter:function(event,player){ + filter(event,player){ return player.hp<=event.num; }, - content:function(){ + content(){ player.awakenSkill('kyou_duanfa'); if(player.countCards('h')>0) player.chooseToDiscard('h',true,player.countCards('h')); player.recover(); @@ -3568,11 +3568,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{target:'useCardToTargeted'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ if(event.card.name=='sha') return true; return get.type(event.card,false)=='trick'&&get.tag(event.card,'damage')>0; }, - content:function(){ + content(){ player.draw(); }, }, @@ -3584,10 +3584,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return player.hasEnabledSlot(1); }, - content:function(){ + content(){ if(player.hasEmptySlot(1)){ var card=get.cardPile2(function(card){ return get.subtype(card)=='equip1'&&!get.cardtag(card,'gifts')&&player.canUse(card,player); @@ -3600,10 +3600,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kotarou_rewrite:{ enable:'phaseUse', charlotte:true, - filter:function(event,player){ + filter(event,player){ return !player.hasSkill('kotarou_rewrite_block'); }, - content:function(){ + content(){ 'step 0' player.getHistory('custom').push({kotarou_rewrite:true}); player.chooseControl().set('choiceList',[ @@ -3679,7 +3679,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:4, result:{ - player:function(player){ + player(player){ if(player.getHistory('custom',function(evt){ return evt&&evt.kotarou_rewrite==true; }).length>=2) return 0; @@ -3692,7 +3692,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ onremove:true, trigger:{source:'damageBegin1'}, forced:true, - content:function(){ + content(){ trigger.num+=player.countMark('kotarou_rewrite_damage'); player.removeSkill('kotarou_rewrite_damage'); }, @@ -3703,7 +3703,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ onremove:true, trigger:{player:'recoverBegin'}, forced:true, - content:function(){ + content(){ trigger.num+=player.countMark('kotarou_rewrite_recover'); player.removeSkill('kotarou_rewrite_recover'); }, @@ -3713,10 +3713,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kotarou_rewrite_sha:{ onremove:true, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('kotarou_rewrite_sha'); }, - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha') return num+player.countMark('kotarou_rewrite_sha'); } }, @@ -3727,7 +3727,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseEnd'}, forced:true, charlotte:true, - content:function(){ + content(){ player.removeSkill('kotarou_rewrite'); player.removeSkill('kotarou_aurora'); if(player.maxHp>3) player.loseMaxHp(player.maxHp-3) @@ -3737,7 +3737,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:'damageEnd', }, - filter:function(event,player){ + filter(event,player){ if(!event.card||(event.card.name!='sha'&&event.card.name!='juedou')) return false; var hairi=event.source; if(hairi&&(hairi==player||player.inRangeOf(hairi))&&hairi.isIn()&&(hairi.name1!='key_shizuku'&&hairi.name2!='key_shizuku')) return true; @@ -3745,7 +3745,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return (hairi&&(hairi==player||player.inRange(hairi))&&hairi.isIn()&&(hairi.name1!='key_shizuku'&&hairi.name2!='key_shizuku')); }, frequent:true, - content:function(){ + content(){ 'step 0' player.draw(); 'step 1' @@ -3763,7 +3763,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'expansion', onunmark:'expansion', }, - onremove:function(player,skill){ + onremove(player,skill){ var cards=player.getExpansions(skill); if(cards.length) player.loseToDiscardpile(cards); }, @@ -3771,14 +3771,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ counter:{ trigger:{target:'useCardToTargeted'}, - filter:function(event,player){ + filter(event,player){ if(player==event.player||!player.getExpansions('tenzen_yixing').length) return false; return event.targets.length==1&&(event.card.name=='sha'||get.type(event.card)=='trick'); }, - prompt2:function(event){ + prompt2(event){ return '获得一张“兴”,且'+get.translation(event.card)+'结算完成后可以弃置两张牌,视为对'+get.translation(event.player)+'使用一张同名牌'; }, - check:function(event,player){ + check(event,player){ if(!player.storage.tenzen_lingyu&&player.getExpansions('tenzen_yixing').length<3) return false; var card={ name:event.card.name, @@ -3787,7 +3787,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return player.canUse(card,event.player,false)&&get.effect(event.player,card,player,player)>0; }, - content:function(){ + content(){ 'step 0' player.chooseButton(['选择获得一张“兴”',player.getExpansions('tenzen_yixing')],true); 'step 1' @@ -3803,7 +3803,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - content_extra:function(){ + content_extra(){ 'step 0' var card=event.getParent().card; event.card={ @@ -3827,10 +3827,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'water', - filter:function(event,player){ + filter(event,player){ return player.getExpansions('tenzen_yixing').length>=player.hp; }, - content:function(){ + content(){ player.awakenSkill('tenzen_lingyu'); player.storage.tenzen_lingyu=true; player.loseMaxHp(); @@ -3840,15 +3840,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, tenzen_tianquan:{ trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ + filter(event,player){ return (event.card.name=='sha'||event.card.name=='juedou')&&event.targets.length==1&&player.getExpansions('tenzen_yixing').length>1; }, logTarget:'target', usable:1, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.target)<0; }, - content:function(){ + content(){ 'step 0' //player.viewHandcards(trigger.target); player.chooseButton(['选择移去两张“兴”',player.getExpansions('tenzen_yixing')],true,2); @@ -3901,16 +3901,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kyouko_rongzhu:{ trigger:{global:'gainEnd'}, - filter:function(event,player){ + filter(event,player){ if(player==event.player||event.getParent().name=='kyouko_rongzhu') return false; var evt=event.getl(player); return evt&&evt.cards2&&evt.cards2.length>0; }, logTarget:'player', - check:function(event,player){ + check(event,player){ return get.attitude(player,event.player)>0; }, - content:function(){ + content(){ 'step 0' player.draw(); 'step 1' @@ -3939,7 +3939,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ me:{ mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('kyouko_rongzhu_me'); }, }, @@ -3948,7 +3948,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, notme:{ mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha') return num+player.countMark('kyouko_rongzhu_notme'); }, }, @@ -3960,18 +3960,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kyouko_gongmian:{ enable:'phaseUse', prompt:'出牌阶段,你可以选择一名未以此法选择过的角色,若其手牌:大于你,你获得其一张牌,然后交给其一张牌;小于你,其交给你一张牌,然后你交给其一张牌;等于你,你与其各摸一张牌。', - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&&lib.skill.kyouko_gongmian.filterTarget(null,player,current); }); }, - filterTarget:function(card,kyouko,hina){ + filterTarget(card,kyouko,hina){ if(kyouko==hina||kyouko.getStorage('kyouko_gongmian').includes(hina)) return false; var hs=hina.countCards('he'); if(hs==0) return kyouko.countCards('h')==0; return true; }, - content:function(){ + content(){ 'step 0' player.markAuto('kyouko_gongmian',targets); var hs=player.countCards('h'),ts=target.countCards('h'); @@ -4010,7 +4010,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:6, result:{ - target:function(player,target){ + target(player,target){ if(player.getHistory('custom',function(evt){ return evt.kyouko_gongmian==true; }).length) return 0; @@ -4022,14 +4022,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kyouko_gongmian_use:{ trigger:{player:'phaseUseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.getHistory('custom',function(evt){ return evt.kyouko_gongmian==true; }).length>0&&game.hasPlayer(function(current){ return current!=player&¤t.countGainableCards(player,'hej')>0; }); }, - content:function(){ + content(){ 'step 0' event.num=player.getHistory('custom',function(evt){ return evt.kyouko_gongmian==true; @@ -4071,7 +4071,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kyouko_gongmian_discard:{ trigger:{player:'phaseDiscardBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ var hs=player.countCards('h'); return hs>0&&player.getHistory('custom',function(evt){ return evt.kyouko_gongmian==true; @@ -4079,7 +4079,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return current!=player&¤t.countCards('h')0; }, - filterCard:function(card,player){ + filterCard(card,player){ if(!player) player=_status.event.player; return game.hasPlayer(function(current){ return current!=player&¤t.canEquip(card); }); }, position:'e', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.canEquip(ui.selected.cards[0]); }, - check:function(card){ + check(card){ if(get.value(card)<=0) return 10; var player=_status.event.player; if(game.hasPlayer(function(current){ @@ -4335,7 +4335,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 0; }, - promptfunc:function(){ + promptfunc(){ var players=game.filterPlayer(function(current){ return current.hasSkill('kotomi_chuanxiang'); }); @@ -4344,7 +4344,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prepare:'give', discard:false, lose:false, - content:function(){ + content(){ 'step 0' target.equip(cards[0]); var list=game.filterPlayer(function(current){ @@ -4359,7 +4359,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:8, result:{ - target:function(player,target){ + target(player,target){ var card=ui.selected.cards[0]; if(!card) return 0; var eff=get.effect(target,card,player,target); @@ -4372,20 +4372,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ asara_shelu:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0&&game.hasPlayer(function(current){ return current!=player&¤t.countCards('h')>0; }); }, filterCard:true, position:'he', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('h')>0; }, - check:function(card){ + check(card){ return 6-get.value(card); }, - content:function(){ + content(){ 'step 0' if(!target.countCards('h')) event.finish(); else player.choosePlayerCard(target,'h',true); @@ -4417,7 +4417,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yukito_kongwu:{ enable:'phaseUse', usable:1, - content:function(){ + content(){ "step 0" if(_status.connectMode) event.time=lib.configOL.choose_timeout; event.videoId=lib.status.videoId++; @@ -4566,7 +4566,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, { prompt:'对一名角色造成1点伤害', - filter:function(player,ai){ + filter(player,ai){ if(!ai) return true; return game.hasPlayer(function(current){ return get.damageEffect(current,player,player)>0; @@ -4575,7 +4575,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, { prompt:'令一名已受伤的角色回复1点体力', - filter:function(player,ai){ + filter(player,ai){ return game.hasPlayer(function(current){ if(current.isDamaged()) return !ai||get.recoverEffect(current,player,player)>0; }); @@ -4583,7 +4583,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, { prompt:'弃置一名角色区域内的两张牌', - filter:function(player,ai){ + filter(player,ai){ return game.hasPlayer(function(current){ return current.countDiscardableCards(player,'hej',function(card){ if(!ai) return true; @@ -4594,7 +4594,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, { prompt:'移动场上的一张牌', - filter:function(player,ai){ + filter(player,ai){ return player.canMoveCard(ai); }, }, @@ -4608,16 +4608,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yukito_yaxiang:{ enable:'chooseToUse', limited:true, - filter:function(event,player){ + filter(event,player){ return event.type=='dying'&&(player.name1=='key_yukito'||player.name2=='key_yukito'); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target==_status.event.dying; }, selectTarget:-1, skillAnimation:true, animationColor:'key', - content:function(){ + content(){ 'step 0' player.awakenSkill('yukito_yaxiang'); player.reinit('key_yukito','key_crow'); @@ -4634,7 +4634,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ save:true, order:4, result:{ - target:function(player,target){ + target(player,target){ if(get.attitude(player,target)<4) return false; if(player.countCards('h',function(card){ var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); @@ -4656,7 +4656,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'key', direct:true, - content:function(){ + content(){ 'step 0' var str='你的'+(trigger.judgestr||'')+'判定为'+ get.translation(trigger.player.judging[0])+',是否发动【终愿】修改判定结果?'; @@ -4794,16 +4794,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chihaya_liewu:{ derivation:'chihaya_huairou', mod:{ - cardUsable:function(card){ + cardUsable(card){ if(card.name=='sha') return Infinity; }, - targetInRange:function(card){ + targetInRange(card){ if(card.name=='sha') return true; }, }, trigger:{player:'useCard2'}, direct:true, - filter:function(event,player){ + filter(event,player){ var card=event.card; var info=get.info(card); if(info.type!='trick'||info.allowMultiple==false) return false; @@ -4816,7 +4816,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' var prompt2='为'+get.translation(trigger.card)+'增加一个目标'; player.chooseTarget(get.prompt('chihaya_liewu'),function(card,player,target){ @@ -4846,12 +4846,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chihaya_liewu2:{ trigger:{player:'disableEquipAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return !player.hasEnabledSlot()&&!player._chihaya_liewu; }, skillAnimation:true, animationColor:'orange', - content:function(){ + content(){ player._chihaya_liewu=true; player.loseMaxHp(4); player.addSkill('chihaya_huairou'); @@ -4863,11 +4863,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ position:'he', filter:(event,player)=>player.hasCard(card=>lib.skill.chihaya_huairou.filterCard(card,player),lib.skill.chihaya_huairou.position), filterCard:(card,player)=>get.type(card)=='equip'&&player.canRecast(card), - check:function(card){ + check(card){ if(!_status.event.player.hasEquipableSlot(get.subtype(card))) return 5; return 3-get.value(card); }, - content:function(){ + content(){ player.recast(cards); }, discard:false, @@ -4886,22 +4886,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhuanhuanji:true, mark:true, intro:{ - content:function(storage,player){ + content(storage,player){ return storage?'每轮限一次,你可以废除你的一个装备栏,视为使用一张基本牌。':'每轮限一次,你可以加1点体力上限,视为使用一张普通锦囊牌。'; }, }, marktext:'☯', - init:function(player){ + init(player){ player.storage.chihaya_youfeng=false; }, - hiddenCard:function(player,name){ + hiddenCard(player,name){ if(player.storage.chihaya_youfeng&&!player.hasEnabledSlot()) return false; if(player.hasSkill('chihaya_youfeng_'+(player.storage.chihaya_youfeng||false))) return false; var type=get.type(name); if(player.storage.chihaya_youfeng) return type=='basic'; return type=='trick'; }, - filter:function(event,player){ + filter(event,player){ if(player.storage.chihaya_youfeng&&!player.hasEnabledSlot()) return false; if(player.hasSkill('chihaya_youfeng_'+(player.storage.chihaya_youfeng||false))) return false; var type=player.storage.chihaya_youfeng?'basic':'trick'; @@ -4912,7 +4912,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ const dialog=ui.create.dialog('游凤','hidden'); const equips=[]; if(player.storage.chihaya_youfeng){ @@ -4936,15 +4936,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dialog.add([list,'vcard']); return dialog; }, - filter:function(button){ + filter(button){ if(ui.selected.buttons.length&&typeof button.link==typeof ui.selected.buttons[0].link) return false; return true; }, - select:function(){ + select(){ if(_status.event.player.storage.chihaya_youfeng) return 2; return 1; }, - check:function(button){ + check(button){ var player=_status.event.player; if(typeof button.link=='number'){ if(!player.hasEmptySlot(button.link)){ @@ -4990,9 +4990,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return player.getUseValue(card)-4; }, - backup:function(links,player){ + backup(links,player){ if(links.length==1) return { - filterCard:function(){return false}, + filterCard(){return false}, selectCard:-1, viewAs:{ name:links[0][2], @@ -5000,7 +5000,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ isCard:true, }, popname:true, - precontent:function(){ + precontent(){ player.logSkill('chihaya_youfeng'); player.gainMaxHp(); delete event.result.skill; @@ -5013,7 +5013,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var name=links[1][2]; var nature=links[1][3]; return { - filterCard:function(){return false}, + filterCard(){return false}, selectCard:-1, equip:equip, viewAs:{ @@ -5022,7 +5022,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ isCard:true, }, popname:true, - precontent:function(){ + precontent(){ player.logSkill('chihaya_youfeng'); player.disableEquip(lib.skill.chihaya_youfeng_backup.equip); delete event.result.skill; @@ -5031,7 +5031,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, } }, - prompt:function(links,player){ + prompt(links,player){ if(links.length==1) return '增加1点体力上限,视为使用'+(get.translation(links[0][3])||'')+get.translation(links[0][2]); if(typeof links[1]=='number') links.reverse(); var equip='equip'+links[0]; @@ -5043,7 +5043,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondSha:true, respondShan:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(arg=='respond') return false; if(!player.storage.chihaya_youfeng||player.hasSkill('chihaya_youfeng_true')) return false; }, @@ -5057,16 +5057,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chihaya_youfeng_false:{charlotte:true}, rumi_shuwu:{ mod:{ - cardUsable:function(card){ + cardUsable(card){ if(card.name=='sha') return Infinity; }, - targetInRange:function(card){ + targetInRange(card){ if(card.name=='sha') return true; }, }, trigger:{player:'useCard2'}, direct:true, - filter:function(event,player){ + filter(event,player){ var card=event.card; var info=get.info(card); if(info.type!='trick'||info.allowMultiple==false) return false; @@ -5079,7 +5079,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' var prompt2='为'+get.translation(trigger.card)+'增加一个目标'; player.chooseTarget(get.prompt('rumi_shuwu'),function(card,player,target){ @@ -5109,7 +5109,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ rumi_shuwu2:{ trigger:{player:'phaseUseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(player.hp<=3) return true; if(player.getHistory('useCard',function(evt){ return evt.card.name=='sha'&&evt.addCount!==false&&evt.getParent('phaseUse')==event; @@ -5119,7 +5119,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).length==0) return true; return false; }, - content:function(){ + content(){ var num=0; if(player.hp<=3) num++; if(player.getHistory('useCard',function(evt){ @@ -5135,7 +5135,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, rumi_shuwu3:{ mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('rumi_shuwu3'); }, }, @@ -5143,20 +5143,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, sakuya_junbu:{ mod:{ - targetInRange:function(card,player){ + targetInRange(card,player){ if(player.countDisabledSlot()>=1) return true; }, - cardUsable:function(card,player){ + cardUsable(card,player){ if(player.countDisabledSlot()>=2) return Infinity; }, }, trigger:{player:'useCard2'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(player.countDisabledSlot()>=4) return true; return lib.skill.sakuya_junbu.filter2.apply(this,arguments); }, - filter2:function(event,player){ + filter2(event,player){ if(player.countDisabledSlot()<3) return false; var card=event.card; var info=get.info(card); @@ -5170,7 +5170,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' if(player.countDisabledSlot()>=4){ trigger.directHit.addArray(game.players); @@ -5208,11 +5208,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageBegin1'}, forced:true, sub:true, - filter:function(event,player){ + filter(event,player){ return !player.hasEnabledSlot()&&event.getParent().type=='card'; }, logTarget:'player', - content:function(){ + content(){ player.loseHp(); trigger.num++; }, @@ -5223,10 +5223,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseUseEnd'}, direct:true, noHidden:true, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&player.hasSkill('hiroto_huyu')&&!player.hasSkill('hiroto_zonglve')&&event.player.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' trigger.player.chooseCard(2,'h','是否对'+get.translation(player)+'发动【虎驭】?','将两张手牌交给该角色,然后令其获得〖纵略〗并于下回合获得该角色得到的所有牌').set('goon',function(){ var source=trigger.player; @@ -5253,7 +5253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, charlotte:true, - content:function(){ + content(){ player.removeSkill('hiroto_huyu2'); player.removeSkill('hiroto_zonglve'); player.removeGaintag('hiroto_huyu2'); @@ -5277,7 +5277,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hiroto_huyu_gain:{ trigger:{player:'gainBegin'}, silent:true, - filter:function(event,player){ + filter(event,player){ if(player==_status.currentPhase) event.gaintag.add('hiroto_huyu2'); return false; }, @@ -5285,12 +5285,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hiroto_zonglve:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&game.hasPlayer(function(current){ return current!=player&¤t.countCards('h')>0; }); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('h')>0; }, filterCard:true, @@ -5299,7 +5299,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ position:'h', discard:false, lose:false, - content:function(){ + content(){ 'step 0' player.choosePlayerCard(true,target,'h'); 'step 1' @@ -5317,7 +5317,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else player.gainPlayerCard(target,true,2,'hej'); }, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+3; }, }, @@ -5334,12 +5334,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'water', - filter:function(event,player){ + filter(event,player){ return player.phaseNumber>1&&!player.getHistory('lose',function(evt){ return evt.getParent(2).name=='hiroto_huyu2'; }).length; }, - content:function(){ + content(){ player.awakenSkill('hiroto_tuolao'); player.draw(3); player.removeSkill('hiroto_huyu'); @@ -5349,7 +5349,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shizuku_sizhi:{ audio:2, enable:'phaseUse', - getResult:function(cards){ + getResult(cards){ var l=cards.length; var all=Math.pow(l,2); var list=[]; @@ -5374,7 +5374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return list; }, usable:1, - filterCard:function(card){ + filterCard(card){ var num=0; for(var i=0;i0&&get.distance(event.player,player)<=1; }, - content:function(){ + content(){ 'step 0' event.num=game.countGroup(); player.addToExpansion(get.cards(event.num)).gaintag.add('shiroha_yuzhao'); @@ -5612,16 +5612,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ source:'damageBegin1', }, direct:true, - filter:function(event,player,name){ + filter(event,player,name){ if(!player.storage.shiroha_jiezhao&&player.hasSkill('shiroha_guying_temp')) return false; if(name=='damageBegin3') return true; return player!=event.player; }, - locked:function(skill,player){ + locked(skill,player){ if(!player||!player.storage.shiroha_jiezhao) return true; return false; }, - content:function(){ + content(){ 'step 0' var num=event.triggername=='damageBegin3'?-1:1; event.num=num; @@ -5648,10 +5648,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shiroha_jiezhao:{ trigger:{global:'judge'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('shiroha_yuzhao').length&&event.player.isIn(); }, - content:function(){ + content(){ "step 0" var list=player.getExpansions('shiroha_yuzhao'); player.chooseButton([get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+get.translation(trigger.player.judging[0])+ @@ -5724,7 +5724,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jojiro_shensu1:{ trigger:{player:'phaseJudgeBefore'}, direct:true, - content:function(){ + content(){ "step 0" var check= player.countCards('h')>2; player.chooseTarget(get.prompt("jojiro_shensu"),"跳过判定阶段和摸牌阶段,视为对一名其他角色使用一张【杀】",function(card,player,target){ @@ -5746,28 +5746,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jojiro_shensu2:{ trigger:{player:'phaseUseBefore'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{type:'equip'})>0; }, - content:function(){ + content(){ "step 0" var check=player.needsToDiscard(); player.chooseCardTarget({ prompt:get.prompt('jojiro_shensu'), prompt2:"弃置一张装备牌并跳过出牌阶段,视为对一名其他角色使用一张【杀】", - filterCard:function(card,player){ + filterCard(card,player){ return get.type(card)=='equip'&&lib.filter.cardDiscardable(card,player) }, position:'he', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player==target) return false; return player.canUse({name:'sha'},target,false); }, - ai1:function(card){ + ai1(card){ if(_status.event.check) return 0; return 6-get.value(card); }, - ai2:function(target){ + ai2(target){ if(_status.event.check) return 0; return get.effect(target,{name:'sha'},_status.event.player); }, @@ -5785,7 +5785,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jojiro_shensu4:{ trigger:{player:'phaseDiscardBefore'}, direct:true, - content:function(){ + content(){ "step 0" var check=player.needsToDiscard()||player.isTurnedOver()||(player.hasSkill('shebian')&&player.canMoveCard(true,true)); player.chooseTarget(get.prompt('jojiro_shensu'),"跳过弃牌阶段并将武将牌翻面,视为对一名其他角色使用一张【杀】",function(card,player,target){ @@ -5808,10 +5808,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseEnd'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return player.getHistory('skipped').length>0; }, - content:function(){ + content(){ 'step 0' var num=player.getHistory('skipped').length; event.num=num; @@ -5828,10 +5828,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0); }, - content:function(){ + content(){ var list=['wei','shu','wu','qun','jin']; for(var i of list){ if(!player.hasMark('kotori_yumo_'+i)){ @@ -5845,12 +5845,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kotori_yumo_damage:{ trigger:{global:'damageEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ var name='kotori_yumo_'+event.player.group; return lib.skill[name]&&!player.hasMark(name); }, popup:false, - content:function(){ + content(){ game.log(player,'对',trigger.player,'发动了','#g【驭魔】'); var group=trigger.player.group; player.popup('驭魔',get.groupnature(group)); @@ -5861,14 +5861,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kotori_yumo_gain:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ var list=['wei','shu','wu','qun','key','jin']; for(var i in list){ if(player.hasMark('kotori_yumo_'+list[i])) return true; } return false; }, - content:function(){ + content(){ 'step 0' var list=['wei','shu','wu','qun','key','jin']; var list2=[]; @@ -5899,22 +5899,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kotori_skill_wei:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0; }, - content:function(){ + content(){ 'step 0' player.chooseCardTarget({ prompt:get.prompt2(event.name), filterCard:lib.filter.cardDiscardable, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target; }, position:'he', - ai1:function(card){ + ai1(card){ return 6-get.value(card); }, - ai2:function(target){ + ai2(target){ return 1/(1+target.countCards('he'))*-get.attitude(_status.event.player,target); }, }); @@ -5931,34 +5931,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kotori_skill_shu:{ mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha') return num+1; }, }, trigger:{player:'phaseUseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getHistory('useCard',function(evt){ return evt.card&&evt.card.name=='sha'&&evt.getParent('phaseUse')==event; }).length>1; }, - content:function(){player.draw()}, + content(){player.draw()}, }, kotori_skill_wu:{ trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')!=player.hp; }, - content:function(){player.draw()}, + content(){player.draw()}, }, kotori_skill_qun:{ trigger:{player:'phaseDiscardBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return (player.getDamagedHp()>1||player.countCards('h')-player.getHp()>1); }, - content:function(){ + content(){ var num=0; if(player.getDamagedHp()>1) num++; if(player.countCards('h')-player.getHp()>1) num++; @@ -5969,7 +5969,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kotori_skill_key:{ enable:'phaseUse', usable:1, - content:function(){ + content(){ "step 0" player.draw(); "step 1" @@ -5985,7 +5985,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - player:function(player){ + player(player){ return player.hp-1; }, }, @@ -5993,7 +5993,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kotori_skill_jin:{ trigger:{player:'phaseDrawEnd'}, - filter:function(event,player){ + filter(event,player){ var hs=player.getCards('h'); return hs.length>0&&player.getHistory('gain',function(evt){ if(evt.getParent().name!='draw'||evt.getParent('phaseDraw')!=event) return false; @@ -6003,7 +6003,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }).length>0; }, - check:function(event,player){ + check(event,player){ var hs=player.getCards('h'),cards=[],suits=[]; player.getHistory('gain',function(evt){ if(evt.getParent().name!='draw'||evt.getParent('phaseDraw')!=event) return false; @@ -6016,7 +6016,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return cards.length==suits.length; }, - content:function(){ + content(){ var hs=player.getCards('h'),cards=[],suits=[]; player.getHistory('gain',function(evt){ if(evt.getParent().name!='draw'||evt.getParent('phaseDraw')!=trigger) return false; @@ -6034,7 +6034,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kotori_qunxin_temp:{ onremove:true, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('kotori_qunxin_temp'); }, }, @@ -6066,7 +6066,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kotori_huazhan:{ charlotte:true, enable:'chooseToUse', - filter:function(event,player){ + filter(event,player){ var bool=false; var list=['wei','shu','wu','qun','key','jin']; for(var i of list){ @@ -6077,10 +6077,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return bool&&event.filterCard({name:'kaihua',isCard:true},player,event); }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ return ui.create.dialog('###花绽###'+lib.translate.kotori_huazhan_info); }, - chooseControl:function(event,player){ + chooseControl(event,player){ var list=['wei','shu','wu','qun','key','jin']; var list2=[]; for(var i of list){ @@ -6089,7 +6089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ list2.push('cancel2'); return list2; }, - check:function(){ + check(){ var player=_status.event.player; var list=['wei','shu','wu','qun','key','jin']; var list2=[]; @@ -6105,13 +6105,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })) return 'kotori_yumo_shu'; return 'cancel2'; }, - backup:function(result,player){ + backup(result,player){ return { markname:result.control, viewAs:{name:'kaihua',isCard:true}, - filterCard:function(){return false}, + filterCard(){return false}, selectCard:-1, - precontent:function(){ + precontent(){ delete event.result.skill; var name=lib.skill.kotori_huazhan_backup.markname; if(!player.storage.kotori_huazhan2) player.storage.kotori_huazhan2=[]; @@ -6128,7 +6128,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - player:function(player){ + player(player){ if(player.countCards('he',function(card){ if(get.type(card,player)=='equip') return get.value(card)<6; return get.value(card)<5; @@ -6144,17 +6144,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'loseAfter', global:['gainAfter','equipAfter','addJudgeAfter','loseAsyncAfter','addToExpansionAfter'], }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&(target.hasSex('female')||target.countCards('hej')>0); }, - filter:function(event,player){ + filter(event,player){ var evt=event.getl(player); return evt&&evt.es&&evt.es.length>0&&game.hasPlayer(function(target){ return lib.skill.ryoichi_baoyi.filterTarget; }); }, forced:true, - content:function(){ + content(){ 'step 0' event.count=trigger.getl(player).es.length; player.draw(event.count); @@ -6184,16 +6184,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ryoichi_tuipi:{ mod:{ - targetEnabled:function(card){ + targetEnabled(card){ if(card.name=='shunshou'||card.name=='guohe') return false; }, }, trigger:{player:'phaseDiscardBegin'}, forced:true, - content:function(){ + content(){ trigger.setContent(lib.skill.ryoichi_tuipi.phaseDiscardContent); }, - phaseDiscardContent:function(){ + phaseDiscardContent(){ "step 0" event.num=Math.max(0,player.countCards('he',card=>!player.canIgnoreHandcard(card))-player.getHandcardLimit()); if(event.num<=0) event.finish(); @@ -6211,28 +6211,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yuu_lveduo:{ mod:{ - cardEnabled:function(card,player){ + cardEnabled(card,player){ if(player.isTurnedOver()) return false; }, - cardRespondable:function(card,player){ + cardRespondable(card,player){ if(player.isTurnedOver()) return false; }, - cardSavable:function(card,player){ + cardSavable(card,player){ if(player.isTurnedOver()) return false; }, }, trigger:{global:'phaseBeginStart'}, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&!event.player._trueMe&&!player.getStorage('yuu_lveduo').includes(event.player)&&!player.isTurnedOver()&&!player.hasSkill('yuu_lveduo4'); }, charlotte:true, - check:function(event,player){ + check(event,player){ if(get.attitude(player,event.player)>0) return false; if(event.player.hasJudge('lebu')||!event.player.needsToDiscard()) return false; return true; }, logTarget:'player', - content:function(){ + content(){ 'step 0' player.turnOver(); 'step 1' @@ -6260,10 +6260,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forceDie:true, forced:true, silent:true, - filter:function(event,player){ + filter(event,player){ return !player.isTurnedOver(); }, - content:function(){ + content(){ var target=game.findPlayer(function(current){ return current._trueMe==player; }); @@ -6313,10 +6313,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forceDie:true, forced:true, silent:true, - content:function(){ + content(){ player.removeSkill('yuu_lveduo3'); }, - onremove:function(player){ + onremove(player){ if(player._trueMe&&player._trueMe.isTurnedOver()) player._trueMe.turnOver(); }, }, @@ -6324,7 +6324,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ godan_yuanyi:{ trigger:{player:'phaseBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var num=game.roundNumber; if(num&&typeof num=='number') player.draw(Math.min(3,num)); @@ -6341,10 +6341,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'soil', - filter:function(event,player){ + filter(event,player){ return event.num<0&&player.hp<4; }, - content:function(){ + content(){ player.awakenSkill('godan_xiaoyuan'); player.loseMaxHp(3); player.draw(3); @@ -6356,24 +6356,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageBegin2'}, skillAnimation:true, animationColor:'water', - filter:function(event,player){ + filter(event,player){ return player!=event.player&&!player.storage.abyusa_jueqing_rewrite; }, - prompt2:function(event,player){ + prompt2(event,player){ var num=get.cnNumber(2*event.num,true); return '令即将对其造成的伤害翻倍至'+num+'点,并令自己失去'+get.cnNumber(event.num)+'点体力'; }, - check:function(event,player){ + check(event,player){ return player.hp>event.num&&event.player.hp>event.num&&!event.player.hasSkillTag('filterDamage',null,{ player:player, card:event.card, })&&get.attitude(player,event.player)<0; }, - locked:function(skill,player){ + locked(skill,player){ return player&&player.storage.abyusa_jueqing_rewrite; }, logTarget:'player', - content:function(){ + content(){ player.loseHp(trigger.num); trigger.num*=2; player.storage.abyusa_jueqing_rewrite=true; @@ -6386,17 +6386,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageBefore'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return player.storage.abyusa_jueqing_rewrite==true; }, - check:function(){return false;}, - content:function(){ + check(){return false;}, + content(){ trigger.cancel(); trigger.player.loseHp(trigger.num); }, ai:{ jueqing:true, - skillTagFilter:function(player){ + skillTagFilter(player){ return player.storage.abyusa_jueqing_rewrite==true; }, } @@ -6406,10 +6406,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ akiko_dongcha:{ trigger:{global:'phaseBefore'}, forced:true, - filter:function(event,player){ + filter(event,player){ return get.mode()=='identity'&&game.phaseNumber==0; }, - content:function(){ + content(){ var func=function(){ game.countPlayer(function(current){ current.setIdentity(); @@ -6422,7 +6422,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ viewHandcard:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(player==arg) return false; }, }, @@ -6431,27 +6431,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.isDamaged(); }, - content:function(){ + content(){ player.draw(player.getDamagedHp()); }, mod:{ - globalTo:function(from,to,num){ + globalTo(from,to,num){ return num+to.getDamagedHp(); }, }, }, kaori_siyuan:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.countCards('he',lib.skill.kaori_siyuan.filterCard); }, - filterCard:function(card){ + filterCard(card){ return ['equip','delay'].includes(get.type(card,false)); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player==target) return false; var card=ui.selected.cards[0]; if(get.type(card,false)=='delay') return target.canAddJudge({name:card.name}); @@ -6460,7 +6460,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, prepare:'give', - content:function(){ + content(){ 'step 0' var card=cards[0]; if(get.type(card,false)=='equip') target.equip(card); @@ -6489,7 +6489,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:10 }, result:{ - target:function(player,target){ + target(player,target){ var card=ui.selected.cards[0]; if(card) return get.effect(target,card,target,target); return 0; @@ -6501,7 +6501,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseJieshuBegin'}, direct:true, locked:true, - filter:function(event,player){ + filter(event,player){ return event.player!=player&&event.player.getHistory('useCard',function(evt){ return evt.isPhaseUsing()&&['basic','trick'].includes(get.type(evt.card))&&player.hasUseTarget({ name:evt.card.name, @@ -6510,7 +6510,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }).length>0; }, - content:function(){ + content(){ 'step 0' var list=[]; trigger.player.getHistory('useCard',function(evt){ @@ -6538,7 +6538,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, shiori_huijuan_discard:{ trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ + filter(event,player){ var num=0; var stat=player.stat; for(var i=stat.length-2;i--;i>=0){ @@ -6548,7 +6548,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return num>=Math.max(2,game.countPlayer()/2); }, forced:true, - content:function(){ + content(){ 'step 0' if(!player.countDiscardableCards(player,'ej')) event._result={bool:false}; else player.discardPlayerCard(player,'ej').set('ai',function(button){ @@ -6567,15 +6567,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'enterGame', }, forced:true, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0); }, - content:function(){ + content(){ player.equip(game.createCard2('miki_hydrogladiator','club',6)); player.equip(game.createCard2('miki_binoculars','diamond',6)); }, mod:{ - canBeDiscarded:function(card){ + canBeDiscarded(card){ if(get.position(card)=='e'&&['equip1','equip5'].includes(get.subtype(card))) return false; }, }, @@ -6585,12 +6585,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, miki_zhiluo:{ trigger:{global:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ return !event.player.countCards('e')&&player.inRange(event.player); }, direct:true, locked:true, - content:function(){ + content(){ 'step 0' if(!player.canUse('sha',trigger.player,false)) event._result={index:0}; else player.chooseControl().set('prompt','制裸:请选择一项').set('choiceList',[ @@ -6615,12 +6615,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, locked:true, popup:'海德洛', - filter:function(event,player){ + filter(event,player){ return event.getParent().name=='sha'&&game.hasPlayer(function(current){ return (current==event.player||current!=player&&get.distance(current,event.player)<=1)&¤t.countDiscardableCards(player,'he')>0; }); }, - content:function(){ + content(){ 'step 0' var list=[]; var choiceList=[]; @@ -6669,7 +6669,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ locked:true, ai:{ viewHandcard:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(player==arg) return false; }, }, @@ -6677,11 +6677,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kud_qiaoshou:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return !player.getExpansions('kud_qiaoshou_equip').length&&player.countCards('h')>0; }, chooseButton:{ - dialog:function(){ + dialog(){ var list=[]; var list2=['pyzhuren_heart','pyzhuren_diamond','pyzhuren_club','pyzhuren_spade','pyzhuren_shandian','rewrite_zhuge']; list2.addArray(lib.inpile); @@ -6691,7 +6691,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return ui.create.dialog('巧手:选择一种装备牌',[list,'vcard'],'hidden'); }, - check:function(button){ + check(button){ var player=_status.event.player; var name=button.link[2]; if(get.subtype(name)=='equip4'||player.getEquip(name)) return 0; @@ -6718,12 +6718,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ default: return 0; } }, - backup:function(links){ + backup(links){ var next=get.copy(lib.skill.kud_qiaoshou_backupx); next.cardname=links[0][2]; return next; }, - prompt:function(links){ + prompt(links){ return '将一张手牌置于武将牌上,然后视为装备'+get.translation(links[0][2]); }, }, @@ -6741,10 +6741,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, delay:false, - check:function(event,player){ + check(event,player){ return 6-get.value(card); }, - content:function(){ + content(){ 'step 0' player.addToExpansion(cards,player,'give').gaintag.add('kud_qiaoshou_equip'); 'step 1' @@ -6766,30 +6766,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kud_qiaoshou_equip:{ charlotte:true, mod:{ - globalFrom:function(from,to,distance){ + globalFrom(from,to,distance){ var info=lib.card[from.storage.kud_qiaoshou_equip2]; if(info&&info.distance&&info.distance.globalFrom) return distance+info.distance.globalFrom; }, - globalTo:function(from,to,distance){ + globalTo(from,to,distance){ var info=lib.card[to.storage.kud_qiaoshou_equip2]; if(info&&info.distance&&info.distance.globalTo) return distance+info.distance.globalTo; }, - attackRange:function(from,distance){ + attackRange(from,distance){ var info=lib.card[from.storage.kud_qiaoshou_equip2]; if(info&&info.distance&&info.distance.attackFrom) return distance-info.distance.attackFrom; }, - attackTo:function(from,to,distance){ + attackTo(from,to,distance){ var info=lib.card[to.storage.kud_qiaoshou_equip2]; if(info&&info.distance&&info.distance.attackTo) return distance+info.distance.attackTo; }, }, - onremove:function(player,skill){ + onremove(player,skill){ var cards=player.getExpansions(skill); if(cards.length) player.loseToDiscardpile(cards); }, intro:{ markcount:'expansion', - mark:function(dialog,storage,player){ + mark(dialog,storage,player){ dialog.add(player.getExpansions('kud_qiaoshou_equip')); dialog.addText('当前装备:'+get.translation(player.storage.kud_qiaoshou_equip2)); var str2=lib.translate[player.storage.kud_qiaoshou_equip2+'_info']; @@ -6798,7 +6798,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else dialog.addText(str2); } }, - onunmark:function(storage,player){ + onunmark(storage,player){ player.removeAdditionalSkill('kud_qiaoshou_equip'); delete player.storage.kud_qiaoshou_equip2; player.addEquipTrigger(); @@ -6808,10 +6808,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kud_qiaoshou_end:{ trigger:{player:'phaseJieshuBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&!player.getExpansions('kud_qiaoshou_equip').length; }, - content:function(){ + content(){ 'step 0' var list=[]; var list2=['rewrite_bagua','rewrite_renwang','rewrite_tengjia','rewrite_baiyin']; @@ -6863,13 +6863,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kud_buhui:{ enable:'chooseToUse', - filter:function(event,player){ + filter(event,player){ return event.type=='dying'&&player==event.dying&&(player.getExpansions('kud_qiaoshou_equip').length+player.countCards('e'))>0; }, skillAnimation:true, limited:true, animationColor:'gray', - content:function(){ + content(){ 'step 0' player.awakenSkill('kud_buhui'); var cards=player.getCards('e').concat(player.getExpansions('kud_qiaoshou_equip')); @@ -6888,7 +6888,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:1, }, save:true, - skillTagFilter:function(player,tag,target){ + skillTagFilter(player,tag,target){ return player==target; }, }, @@ -6900,14 +6900,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:['phaseJieshuBegin','recoverEnd','damageEnd','phaseDrawBegin2','phaseZhunbeiBegin']}, forced:true, character:true, - filter:function(event,player){ + filter(event,player){ if(event.name=='phaseZhunbei') return true; if(['damage','recover'].includes(event.name)) return event.num>0; var num=player.countMark('misuzu_hengzhou'); if(event.name=='phaseDraw') return num>0&&!event.numFixed; return num>3; }, - content:function(){ + content(){ var num=player.countMark('misuzu_hengzhou'); if(trigger.name=='phaseDraw') trigger.num+=num; else if(trigger.name=='phaseJieshu'){ @@ -6923,7 +6923,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, marktext:'诅', mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('misuzu_hengzhou'); }, }, @@ -6937,20 +6937,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'tao', isCard:true, }, - viewAsFilter:function(player){ + viewAsFilter(player){ return !player.hasJudge('lebu')&&player.countCards('hes',function(card){ return get.color(card)=='red'&&get.type(card,'trick')!='trick'; }); }, - filterCard:function(card){ + filterCard(card){ return get.color(card)=='red'&&get.type(card,'trick')!='trick'; }, - check:function(card){ + check(card){ return 7+(_status.event.dying||_status.event.player).getDamagedHp()-get.value(card); }, ignoreMod:true, position:'hes', - precontent:function(){ + precontent(){ player.logSkill('misuzu_nongyin'); player.$throw(event.result.cards); player.addJudge({name:'lebu'},event.result.cards); @@ -6970,11 +6970,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, direct:true, - filter:function(event,player){ + filter(event,player){ var evt=event.getl(player); return evt&&evt.js&&evt.js.length>0&&!player.hasSkill('misuzu_zhongxing_haruko'); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('misuzu_zhongxing'),'令一名角色选择摸两张牌或回复1点体力').set('ai',function(card){ return get.attitude(_status.event.player,card); @@ -6994,7 +6994,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, equipSkill:true, - content:function(){ + content(){ trigger.cancel(); }, }, @@ -7004,12 +7004,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:['equipAfter','addJudgeAfter','phaseBefore','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, forced:true, - filter:function(event,player){ + filter(event,player){ if(typeof event.getl!='function') return (event.name!='phase'||game.phaseNumber==0); var evt=event.getl(player); return evt&&evt.player==player&&evt.es&&evt.es.length; }, - content:function(){ + content(){ if(trigger.getl) player.draw(2*trigger.getl(player).es.length); else player.equip(game.createCard2('kamome_suitcase','spade',1)); }, @@ -7017,7 +7017,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ noe:true, reverseEquip:true, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,3]; } } @@ -7026,7 +7026,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kamome_huanmeng:{ trigger:{player:'phaseZhunbeiBegin'}, frequent:true, - content:function(){ + content(){ "step 0" var num=1+player.countCards('e'); var cards=get.cards(num); @@ -7098,15 +7098,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'☯', mark:true, intro:{ - content:function(storage,player){ + content(storage,player){ return '转换技。每回合限一次,当你受到或造成伤害后,'+(!storage?'你可将两张牌交给一名其他角色,然后其交给你一张牌。':'你可将一张牌交给一名其他角色,然后其交给你两张牌。'); }, }, - filter:function(event,player){ + filter(event,player){ var num=player.storage.kamome_jieban?1:2; return player.countCards('he')>=num&&!player.hasSkill('kamome_jieban_phase'); }, - content:function(){ + content(){ 'step 0' event.num=player.storage.kamome_jieban?1:2; player.chooseCardTarget({ @@ -7116,7 +7116,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:event.num, prompt:get.prompt('kamome_jieban'), prompt2:event.num==2?'将两张牌交给一名其他角色,然后其交给你一张牌。':'将一张牌交给一名其他角色,然后其交给你两张牌。', - ai1:function(card){ + ai1(card){ if(card.name=='du') return 20; var val=get.value(card); var player=_status.event.player; @@ -7126,7 +7126,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 6-val; }, - ai2:function(target){ + ai2(target){ var player=_status.event.player; var att=get.attitude(player,target); if(ui.selected.cards[0].name=='du') return -2*att; @@ -7172,15 +7172,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kamome_jieban_phase:{charlotte:true}, nao_duyin:{ trigger:{global:'phaseBegin'}, - filter:function(event,player){ + filter(event,player){ return event.player!=player&&(!player.storage.nao_duyin||!player.storage.nao_duyin.includes(event.player)); }, logTarget:'player', charlotte:true, - check:function(){ + check(){ return false; }, - content:function(){ + content(){ 'step 0' player.chooseToDiscard('he','弃置一张牌,或将武将牌翻面').set('ai',function(card){ if(_status.event.player.isTurnedOver()) return 0; @@ -7201,10 +7201,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'$不能使用牌指定你为目标,对$使用牌没有距离和次数限制', }, mod:{ - targetEnabled:function(card,player,target){ + targetEnabled(card,player,target){ if(target.storage.nao_duyin2&&target.storage.nao_duyin2.includes(player)) return false; }, - targetInRange:function(card,player,target){ + targetInRange(card,player,target){ if(player.storage.nao_duyin2&&player.storage.nao_duyin2.includes(target)) return true; }, }, @@ -7212,7 +7212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ firstDo:true, silent:true, onremove:true, - filter:function(event,player){ + filter(event,player){ if(player.storage.nao_duyin2){ for(var i of player.storage.nao_duyin2){ if(event.targets.includes(i)) return true; @@ -7220,7 +7220,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ if(trigger.addCount!==false){ trigger.addCount=false; var stat=player.getStat(); @@ -7230,16 +7230,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nao_wanxin:{ trigger:{global:'phaseEnd'}, - hasHistory:function(player){ + hasHistory(player){ return player.getHistory('damage').length>0; }, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return lib.skill.nao_wanxin.hasHistory(current); }); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('nao_wanxin'),function(card,player,target){ return _status.event.yuus.includes(target); @@ -7272,30 +7272,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nao_shouqing2:{ enable:'phaseUse', - viewAs:function(){ + viewAs(){ return {name:'tao'} }, filterCard:{name:'tao'}, ignoreMod:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.isDamaged()&&target.hasSkill('nao_shouqing'); }, - selectTarget:function(){ + selectTarget(){ return game.countPlayer(function(current){ return lib.skill.nao_shouqing2.filterTarget(null,_status.event.player,current); })>1?1:-1; }, - filter:function(event,player){ + filter(event,player){ return player.countCards('hs','tao')&&game.hasPlayer(function(current){ return lib.skill.nao_shouqing2.filterTarget(null,player,current) }); }, position:'hs', - onuse:function(links,player){ + onuse(links,player){ player.addSkill('nao_shouqing3'); player.addMark('nao_shouqing3',1,false); }, - prompt:function(){ + prompt(){ var list=game.filterPlayer(function(current){ return lib.skill.nao_shouqing2.filterTarget(null,_status.event.player,current); }); @@ -7310,17 +7310,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'手牌上限+#', }, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('nao_shouqing3'); }, }, trigger:{player:'useCardAfter'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.skill=='nao_shouqing2'; }, - content:function(){ + content(){ player.draw(); }, }, @@ -7328,12 +7328,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:['damageEnd','recoverEnd']}, direct:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.isDamaged(); }) }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('shiorimiyuki_banyin'),'令一名其他角色回复1点体力',lib.filter.notMe).set('ai',function(target){ var player=_status.event.player; @@ -7351,7 +7351,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseUseBegin'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseControl('一张','两张','三张','cancel2').set('prompt',get.prompt2('shiorimiyuki_tingxian')).set('ai',function(){ var player=_status.event.player; @@ -7377,19 +7377,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, charlotte:true, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(get.itemtype(card)=='card'&&card.hasGaintag('shiorimiyuki_tingxian')) return num+2; }, - aiValue:function(player,card,num){ + aiValue(player,card,num){ if(get.itemtype(card)=='card'&&card.hasGaintag('shiorimiyuki_tingxian')) return 0; }, }, - filter:function(event,player){ + filter(event,player){ return player.countCards('h',function(card){ return card.hasGaintag('shiorimiyuki_tingxian'); })>0; }, - content:function(){ + content(){ player.loseHp(player.countCards('h',function(card){ return card.hasGaintag('shiorimiyuki_tingxian'); })); @@ -7400,7 +7400,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'chooseToUse', charlotte:true, prompt:'展示一张♦/♣/♥/♠手牌,然后视为使用一张雷杀/闪/桃/无懈可击', - viewAs:function(cards,player){ + viewAs(cards,player){ var name=false; var nature=null; switch(get.suit(cards[0],player)){ @@ -7412,7 +7412,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(name) return {name:name,nature:nature,isCard:true}; return null; }, - check:function(card){ + check(card){ var player=_status.event.player; if(_status.event.type=='phase'){ var max=0; @@ -7437,7 +7437,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 1; }, ignoreMod:true, - filterCard:function(card,player,event){ + filterCard(card,player,event){ event=event||_status.event; var filter=event._backup.filterCard; var name=get.suit(card,player); @@ -7447,7 +7447,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(name=='heart'&&filter({name:'tao'},player,event)) return true; return false; }, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('shizuru_nianli_round')) return false; var filter=event.filterCard; if(filter({name:'sha',nature:'thunder'},player,event)&&player.countCards('h',{suit:'diamond'})) return true; @@ -7456,7 +7456,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(filter({name:'wuxie'},player,event)&&player.countCards('h',{suit:'spade'})) return true; return false; }, - precontent:function(){ + precontent(){ player.logSkill('shizuru_nianli'); player.addTempSkill('shizuru_nianli_round','roundStart'); player.showCards(get.translation(player)+'发动了【念力】',event.result.cards.slice(0)); @@ -7471,7 +7471,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondSha:true, respondShan:true, - skillTagFilter:function(player,tag){ + skillTagFilter(player,tag){ if(player.hasSkill('shizuru_nianli_round')) return false; var name; switch(tag){ @@ -7481,7 +7481,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(!player.countCards('h',{suit:name})) return false; }, - order:function(item,player){ + order(item,player){ if(player&&_status.event.type=='phase'){ var max=0; var list=['sha','tao']; @@ -7501,7 +7501,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 2; }, }, - hiddenCard:function(player,name){ + hiddenCard(player,name){ if(name=='wuxie') return player.countCards('h',function(card){ return _status.connectMode||get.suit(card)=='spade'; })>0&&!player.hasSkill('shizuru_nianli_round'); @@ -7518,10 +7518,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardAfter'}, lastDo:true, silent:true, - filter:function(event,player){ + filter(event,player){ return event.getParent().shizuru_nianli==true; }, - content:function(){ + content(){ player.getHistory('useCard').remove(trigger); }, }, @@ -7531,10 +7531,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:['useCard','respond']}, usable:1, direct:true, - filter:function(event,player){ + filter(event,player){ return Array.isArray(event.respondTo)&&event.respondTo[0]!=event.player&&[event.respondTo[0],event.player].includes(player); }, - content:function(){ + content(){ 'step 0' event.type=get.type(trigger.card)=='basic'; var prompt=event.type?'令一名角色摸两张牌或弃置两张牌':'令一名角色回复1点体力或对其造成1点伤害'; @@ -7589,7 +7589,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kyoko_juwu:{ trigger:{global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter']}, direct:true, - filter:function(event,player){ + filter(event,player){ if(player==_status.currentPhase) return false; var cards=event.getd(); if(!cards.length) return false; @@ -7599,7 +7599,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' if(trigger.delay==false) game.delay(); 'step 1' @@ -7618,7 +7618,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kyoko_zhengyi:{ group:['kyoko_jingce','kyoko_shelie','kyoko_zhiheng'], - count:function(player){ + count(player){ var list=[]; player.countCards('e',function(card){ list.add(get.suit(card,player)); @@ -7628,7 +7628,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kyoko_jingce:{ trigger:{player:['phaseUseEnd','phaseJieshuBegin']}, - filter:function(event,player){ + filter(event,player){ var num=lib.skill.kyoko_zhengyi.count(player); if(!num||(event.name=='phaseUse')==(num>3)) return false; return player.getHistory('useCard',function(evt){ @@ -7636,7 +7636,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).length>=player.hp; }, frequent:true, - content:function(){ + content(){ 'step 0' if(trigger.name=='phaseUse'){ player.draw(2); @@ -7666,10 +7666,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kyoko_shelie:{ audio:2, trigger:{player:'phaseDrawBegin1'}, - filter:function(event,player){ + filter(event,player){ return !event.numFixed&&lib.skill.kyoko_zhengyi.count(player)>1; }, - content:function(){ + content(){ "step 0" trigger.changeToZero(); event.cards=get.cards(5); @@ -7722,10 +7722,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, position:'he', - filter:function(event,player){ + filter(event,player){ return lib.skill.kyoko_zhengyi.count(player)>2; }, - prompt:function(){ + prompt(){ var str='弃置任意张牌并摸等量的牌'; if(lib.skill.kyoko_zhengyi.count(_status.event.player)>3) str+=',若弃置了所有手牌则多摸一张牌。'; return str; @@ -7735,14 +7735,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lose:false, delay:false, selectCard:[1,Infinity], - check:function(card){ + check(card){ var player=_status.event.player; if(get.position(card)=='h'){ return 8-get.value(card); } return 6-get.value(card) }, - content:function(){ + content(){ 'step 0' player.discard(cards); event.num=1; @@ -7768,14 +7768,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseDrawBegin'}, forced:true, logTarget:'player', - filter:function(event,player){ + filter(event,player){ return event.player!=player&&event.player.isFriendOf(player); }, - content:function(){trigger.num++}, + content(){trigger.num++}, }, yuzuru_bujin2:{ mod:{ - globalFrom:function(from,to,num){ + globalFrom(from,to,num){ return num-game.countPlayer(function(current){ return current!=from&¤t.hasSkill('yuzuru_bujin')&¤t.isFriendOf(from); }); @@ -7785,10 +7785,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mio_tuifu:{ trigger:{global:'damageBegin1'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.source&&event.source.sameSexAs(event.player) }, - content:function(){ + content(){ player.draw(); }, }, @@ -7799,13 +7799,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, skillAnimation:true, animationColor:'water', - filter:function(event,player){ + filter(event,player){ return player.isDamaged(); }, - check:function(event,player){ + check(event,player){ return player.hp<=1||player.getDamagedHp()>1; }, - content:function(){ + content(){ player.awakenSkill(event.name); var num=player.maxHp-player.hp; player.recover(num); @@ -7820,14 +7820,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ midori_nonghuan:{ enable:'phaseUse', charlotte:true, - filter:function(event,player){ + filter(event,player){ return (player.getStat('skill').midori_nonghuan||0)0; }, - content:function(){ + content(){ 'step 0' var stat=player.getStat(); if(!stat.midori_nonghuan) stat.midori_nonghuan=[]; @@ -7858,10 +7858,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:9, result:{ - player:function(){ + player(){ return lib.card.shunshou.ai.result.player.apply(this,arguments); }, - target:function(){ + target(){ return lib.card.shunshou.ai.result.target.apply(this,arguments); }, }, @@ -7874,13 +7874,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, skillAnimation:true, animationColor:'water', - filter:function(event,player){ + filter(event,player){ return player.isDamaged(); }, - check:function(event,player){ + check(event,player){ return player.hp<=1||player.getDamagedHp()>1; }, - content:function(){ + content(){ player.awakenSkill(event.name); var num=player.maxHp-player.hp; player.recover(num); @@ -7898,16 +7898,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'chooseToUse', viewAs:{name:'mapodoufu'}, filterCard:{suit:'heart'}, - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countCards('hes',{suit:'heart'})>0; }, position:'hes', mod:{ - selectTarget:function(card,player,range){ + selectTarget(card,player,range){ if(card.name=='mapodoufu'&&range[1]!=-1) range[1]++; }, }, - check:function(card){ + check(card){ var player=_status.event.player; if(game.countPlayer(function(current){ return player.canUse('mapodoufu',current)&&get.effect(current,{name:'mapodoufu'},player,player)>0; @@ -7920,10 +7920,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:['useCard','respond']}, direct:true, usable:1, - filter:function(event,player){ + filter(event,player){ return Array.isArray(event.respondTo)&&event.respondTo[0]!=event.player&&[event.respondTo[0],event.player].includes(player); }, - content:function(){ + content(){ 'step 0' event.type=get.type(trigger.card)=='basic'; var prompt=event.type?'令一名角色摸两张牌或弃置两张牌':'令一名角色回复1点体力或对其造成1点伤害'; @@ -7978,22 +7978,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuzuru_wuxin:{ trigger:{player:'phaseJieshuBegin'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseCardTarget({ - filterTarget:function(){ + filterTarget(){ if(ui.selected.cards.length) return false; return true; }, - filterCard:function(){ + filterCard(){ if(ui.selected.targets.length) return false; return lib.filter.cardDiscardable.apply(this,arguments); }, - selectTarget:function(){ + selectTarget(){ if(!ui.selected.cards.length) return [1,1]; return [0,0]; }, - selectCard:function(){ + selectCard(){ if(ui.selected.targets.length) return [0,0]; if(!ui.selected.cards.length) return [0,2]; return [2,2]; @@ -8001,12 +8001,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:get.prompt2('yuzuru_wuxin'), complexCard:true, complexTarget:true, - ai1:function(card){ + ai1(card){ var player=_status.event.player; if(player.hp>3) return 0; return (player.getDamagedHp()*2)-get.value(card); }, - ai2:function(target){ + ai2(target){ if(player.hp<4||target.hasSkillTag('nogain')) return 0; return get.attitude(_status.event.player,target); }, @@ -8035,7 +8035,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'orange', - content:function(){ + content(){ player.awakenSkill('yuzuru_deyi'); player.removeSkill('yuzuru_wuxin'); player.addSkillLog('yuzuru_kunfen'); @@ -8048,7 +8048,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuzuru_kunfen:{ trigger:{player:'phaseJieshuBegin'}, forced:true, - content:function(){ + content(){ 'step 0' if(!player.storage._yuzuru_sss) player.loseHp(); player.draw(2); @@ -8060,7 +8060,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterTarget:lib.filter.notMe, prompt:'是否交给一名其他角色两张牌?', position:'he', - ai1:function(card){ + ai1(card){ var player=_status.event.player; if(player.maxHp-player.hp==1&&card.name=='du') return 30; var check=player.countCards('h')-2; @@ -8068,7 +8068,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.hp>1&&check<2) return 0; return get.unuseful(card)+9; }, - ai2:function(target){ + ai2(target){ var att=get.attitude(_status.event.player,target); if(ui.selected.cards.length==1&&ui.selected.cards[0].name=='du') return 1-att; return att-2; @@ -8085,26 +8085,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, position:'he', filterCard:true, - selectCard:function(){ + selectCard(){ var player=_status.event.player; return player.getDamagedHp(); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.hp0; })) return 1; return 0; }, - ai2:function(kanade){ + ai2(kanade){ if(kanade.hasSkill('kanade_mapo')&&get.attitude(_status.event.player,kanade)>0) return 2; return 0; }, @@ -8170,19 +8170,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target:'useCardToTargeted', }, forced:true, - filter:function(event,player,name){ + filter(event,player,name){ return (name=='useCard'||name=='respond'||event.player!=player)&&get.suit(event.card)=='diamond'; }, - content:function(){player.draw()}, + content(){player.draw()}, }, ao_kuihun:{ trigger:{global:'dying'}, logTarget:'player', line:'thunder', - filter:function(event,player){ + filter(event,player){ return player!=event.player; }, - content:function(){ + content(){ 'step 0' player.draw(); 'step 1' @@ -8202,19 +8202,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, locked:false, mod:{ - targetInRange:function(card,player){ + targetInRange(card,player){ var list=player.getExpansions('ao_diegui'); for(var i=0;i2; }, - content:function(){ + content(){ player.awakenSkill('ao_shixin'); player.removeSkill('ao_kuihun'); player.addSkill('ao_diegui'); @@ -8246,17 +8246,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ao_diegui:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('ao_diegui').length>0; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ return ui.create.dialog('蝶归',player.getExpansions('ao_diegui'),'hidden'); }, - backup:function(links,player){ + backup(links,player){ return { card:links, - filterCard:function(){return false}, + filterCard(){return false}, selectCard:-1, filterTarget:true, delay:false, @@ -8264,7 +8264,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ line:'thunder', ai:{ result:{ - target:function(player,target){ + target(player,target){ if(target!=player&&target.hasSkillTag('nogain')) return 0; var num=1; if(target.isTurnedOver()) num+=2; @@ -8275,11 +8275,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, } }, - prompt:function(links,player){ + prompt(links,player){ return '选择一名角色,令其获得'+get.translation(links[0])+',摸两张牌并将武将牌复原。' }, }, - contentx:function(){ + contentx(){ 'step 0' player.give(lib.skill.ao_diegui_backup.card,target,'visible'); target.draw(2); @@ -8293,7 +8293,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'expansion', markcount:'expansion', }, - onremove:function(player,skill){ + onremove(player,skill){ var cards=player.getExpansions(skill); if(cards.length) player.loseToDiscardpile(cards); }, @@ -8301,7 +8301,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ayato_jianshen:{ mod:{ - cardnature:function(card,player){ + cardnature(card,player){ if(get.name(card)=='sha') return 'kami'; }, }, @@ -8310,10 +8310,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ayato_zonghuan:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' player.chooseButton(['请选择'+get.translation(target)+'的一张手牌',target.getCards('h')],true).set('ai',get.buttonValue); 'step 1' @@ -8410,18 +8410,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nagisa_tiandu:{ trigger:{player:'judgeEnd'}, charlotte:true, - frequent:function(event){ + frequent(event){ if(event.result.card.name=='du') return false; return true; }, - check:function(event){ + check(event){ if(event.result.card.name=='du') return false; return true; }, - filter:function(event,player){ + filter(event,player){ return get.position(event.result.card,true)=='o'; }, - content:function(){ + content(){ player.gain(trigger.result.card,'gain2'); } }, @@ -8429,7 +8429,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:['gainAfter','loseAfter','loseAsyncAfter','damageEnd'], }, - filter:function(event,player){ + filter(event,player){ var source=_status.currentPhase; if(event.name=='damage'){ return event.player.isAlive()&&event.player!=source; @@ -8473,7 +8473,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, direct:true, - content:function(){ + content(){ 'step 0' var targets=[],source=_status.currentPhase; if(trigger.name=='gain'){ @@ -8532,29 +8532,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:true, locked:true, intro:{ - content:function(s){ + content(s){ return '计算与其他角色的距离时始终从'+(s?'逆':'顺')+'时针计算' }, }, - content:function(){ + content(){ player.draw(); player.storage.tomoya_shangxian=!player.storage.tomoya_shangxian; }, ai:{ left_hand:true, right_hand:true, - skillTagFilter:function(player,tag){ + skillTagFilter(player,tag){ return (player.storage.tomoya_shangxian==true)==(tag=='left_hand'); }, }, }, tomoya_wangjin:{ trigger:{global:'phaseJieshuBegin'}, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&!player.hasSkill('tomoya_wangjin_'+player.inRange(event.player)); }, logTarget:'player', - check:function(event,player){ + check(event,player){ var target=event.player; var bool=player.inRange(target); if(!bool){ @@ -8577,7 +8577,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(temp.hp=2&&!temp.hasSkillTag('nogain')) return false; } }, - content:function(){ + content(){ 'step 0' event.bool=player.inRange(trigger.player); player.addTempSkill('tomoya_wangjin_'+event.bool,'roundStart'); @@ -8616,14 +8616,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"gainAfter", }, forced:true, - filter:function(event,player){ + filter(event,player){ return get.itemtype(event.source)=='player'&&event.bySelf!=true; }, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.source)>0; }, logTarget:"source", - content:function(){ + content(){ trigger.source.draw(); }, }, @@ -8631,26 +8631,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', viewAs:{name:'juedou'}, - filter:function(event,player){ + filter(event,player){ return (player.getStat('skill').noda_xunxin||0)0; }, - content:function(){ + content(){ 'step 0' event.giver=trigger.turn; event.gainner=event.giver==player?trigger.target:player; @@ -8662,32 +8662,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hinata_qiulve:{ audio:2, enable:['chooseToUse','chooseToRespond'], - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countCards('hes',function(card){ return get.type(card)!='basic'; })>0; }, viewAs:{name:'sha'}, - filterCard:function(card,player){ + filterCard(card,player){ return get.type(card)!='basic'; }, locked:false, position:'hes', - check:function(card){ + check(card){ var val=get.value(card); if(val>=6) return 0; if(get.color(card)=='black') return 12-val; return 6-val; }, mod:{ - targetInRange:function(card,player,target){ + targetInRange(card,player,target){ if(_status.event.skill=='hinata_qiulve') return true; }, }, group:'hinata_qiulve_clear', ai:{ respondSha:true, - skillTagFilter:function(player){ + skillTagFilter(player){ return player.countCards('hes',function(card){ return get.type(card)!='basic'; })>0; @@ -8698,10 +8698,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard1'}, firstDo:true, silent:true, - filter:function(event,player){ + filter(event,player){ return event.skill=='hinata_qiulve'; }, - content:function(){ + content(){ if(get.color(trigger.card)=='red') trigger.directHit.addArray(game.players); else if(trigger.addCount!==false){ trigger.addCount=false; @@ -8714,19 +8714,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'useCardAfter'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&event.targets&&event.targets.includes(player)&&(_status.connectMode||player.hasSha()); }, - content:function(){ + content(){ 'step 0' player.chooseToUse({ logSkill:'hinata_ehou', preTarget:trigger.player, prompt:'是否发动【扼喉】,对'+get.translation(trigger.player)+'使用一张【杀】?', - filterCard:function(card,player){ + filterCard(card,player){ return get.name(card)=='sha'&&lib.filter.filterCard.apply(this,arguments); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target==_status.event.preTarget&&lib.filter.filterTarget.apply(this,arguments); }, addCount:false, @@ -8740,7 +8740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hisako_yinbao:{ audio:2, trigger:{player:['damageEnd','recoverAfter']}, - content:function(){ + content(){ 'step 0' player.judge(function(card){ return get.suit(card)=='spade'?2:-2; @@ -8767,10 +8767,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, charlotte:true, silent:true, - filter:function(event,player){ + filter(event,player){ return !event.directresult; }, - content:function(){ + content(){ var tempcard=false,temp=-Infinity; for(var i=0;i=3; }, - content:function(){ + content(){ player.awakenSkill('riki_mengzhong'); player.removeSkill('riki_spwenji'); player.gainMaxHp(); @@ -8877,7 +8877,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"phaseUseBegin", }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('riki_chongzhen'),function(card,player,target){ return player.canCompare(target); @@ -8918,15 +8918,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuiko_fenglun:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&game.hasPlayer(function(current){ return player.canCompare(current); }); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player.canCompare(target); }, - content:function(){ + content(){ 'step 0' player.chooseToCompare(target); 'step 1' @@ -8939,19 +8939,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yuiko_fenglun2:{ mod:{ - cardUsable:function(){return Infinity}, - targetInRange:function(){return true}, + cardUsable(){return Infinity}, + targetInRange(){return true}, }, }, yuiko_dilve:{ enable:"chooseCard", - check:function(){ + check(){ return 20; }, - filter:function(event){ + filter(event){ return event.type=='compare'&&!event.directresult; }, - onCompare:function(player){ + onCompare(player){ return game.cardsGotoOrdering(get.bottomCards()).cards; }, group:'yuiko_dilve_gain', @@ -8961,14 +8961,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:['chooseToCompareAfter','compareMultipleAfter'], target:['chooseToCompareAfter','compareMultipleAfter'] }, - filter:function(event,player){ + filter(event,player){ if(event.preserve) return false; return [event.card1,event.card2].filterInD('od').length>0; }, - prompt2:function(event,player){ + prompt2(event,player){ return '获得'+get.translation([event.card1,event.card2].filterInD('od')); }, - content:function(){ + content(){ player.gain([trigger.card1,trigger.card2].filterInD('od'),'gain2','log'); } }, @@ -8980,16 +8980,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target:'useCardToTargeted', }, forced:true, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'; }, - content:function(){ + content(){ if(trigger.name=='useCard') trigger.directHit.addArray(game.players); else trigger.directHit.add(player); }, ai:{ directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ return arg.card.name=='sha'; }, }, @@ -8998,7 +8998,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ doruji_feiqu_ai:{ ai:{ directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ return arg.card.name=='sha'&&(arg.target.hasSkill('doruji_feiqu')||arg.target.hasSkill('godan_feiqu')); }, }, @@ -9006,27 +9006,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ akane_jugu:{ audio:2, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.maxHp; } }, trigger:{global:'phaseBefore',player:'enterGame'}, forced:true, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0); }, - content:function(){ + content(){ player.draw(player.maxHp); } }, akane_quanqing:{ enable:'phaseUse', filterCard:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&player.inRange(target); }, position:'he', - check:function(card){ + check(card){ var val=get.value(card); var num=card.number; if(num>10) return 8-val; @@ -9035,7 +9035,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num>6) return 6-val; return 3-val; }, - content:function(){ + content(){ 'step 0' var num=cards[0].number; var trans=get.translation(target); @@ -9059,7 +9059,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:4, result:{ - target:function(player,target){ + target(player,target){ var card=ui.selected.cards[0]; if(card){ if(card.number>10) return get.damageEffect(target,player,target); @@ -9083,10 +9083,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ log:false, delay:false, lose:false, - prepare:function(cards,player,targets){ + prepare(cards,player,targets){ targets[0].logSkill('akane_yifu'); }, - prompt:function(){ + prompt(){ var player=_status.event.player; var list=game.filterPlayer(function(target){ return target!=player&&target.hasZhuSkill('akane_yifu',player); @@ -9095,7 +9095,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(list.length>1) str+='中的一人'; return str; }, - filter:function(event,player){ + filter(event,player){ if(player.group!='key') return false; if(player.countCards('h')==0) return 0; return game.hasPlayer(function(target){ @@ -9103,10 +9103,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, filterCard:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.hasZhuSkill('akane_yifu',player)&&!target.hasSkill('akane_yifu3'); }, - content:function(){ + content(){ 'step 0' player.give(cards,target); target.addTempSkill('akane_yifu3','phaseUseEnd'); @@ -9130,7 +9130,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ akane_yifu3:{charlotte:true}, sasami_miaobian:{ derivation:['sasami_gongqing','sasami_funan','sasami_baoqiu'], - init2:function(player){ + init2(player){ if(player.hp<=3) player.addSkill('sasami_gongqing'); if(player.hp<=2) player.addSkill('sasami_funan'); if(player.hp<=1) player.addSkill('sasami_baoqiu'); @@ -9138,7 +9138,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'changeHp'}, firstDo:true, silent:true, - content:function(){ + content(){ lib.skill.sasami_miaobian.init2(player); }, }, @@ -9152,18 +9152,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:["damageBegin3","damageBegin4"], }, forced:true, - filter:function (event,player,name){ + filter (event,player,name){ if(!event.source) return false; var range=event.source.getAttackRange(); if(name=='damageBegin3') return range>3; return event.num>1&&range<3; }, - content:function (){ + content (){ trigger.num=event.triggername=='damageBegin4'?1:trigger.num+1; }, ai:{ filterDamage:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(arg&&arg.player){ if(arg.player.hasSkillTag('jueqing',false,player)) return false; if(arg.player.getAttackRange()<3) return true; @@ -9176,7 +9176,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:['respond','useCard']}, line:{color:[173,149,206]}, - filter:function(event,player){ + filter(event,player){ if(!event.respondTo) return false; if(event.player==player) return false; if(player!=event.respondTo[0]) return false; @@ -9189,7 +9189,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else return event.cards.filterInD('od').length>0; }, logTarget:'player', - content:function(){ + content(){ 'step 0' if(!player.hasSkill('sasami_funan_jiexun')){ var cards=[] @@ -9205,12 +9205,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, subSkill:{ use:{ - onremove:function(player){ + onremove(player){ player.removeGaintag('sasami_funan'); }, charlotte:true, mod:{ - cardEnabled2:function(card,player){ + cardEnabled2(card,player){ if(get.itemtype(card)=='card'&&card.hasGaintag('sasami_funan')){ return false; } @@ -9221,18 +9221,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, rin_baoqiu:{ mod:{ - attackRange:function(rin,ball){ + attackRange(rin,ball){ return ball+2; }, }, trigger:{player:'useCardToPlayered'}, forced:true, logTarget:'target', - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'; }, line:{color:[194,117,92]}, - content:function(){ + content(){ 'step 0' player.judge(function(){return 0}); 'step 1' @@ -9268,10 +9268,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, group:'sunohara_chengshuang_phase', forced:true, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0); }, - content:function(){ + content(){ 'step 0' var evt=event.getParent('phase'); if(evt&&evt.player==player) evt.sunohara_chengshuang=true; @@ -9286,7 +9286,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, mark:true, intro:{ - content:function(storage,player){ + content(storage,player){ if(player.sex=='unknown'||player.sex=='double') return '当前性别未确定'; return '当前性别:'+get.translation(player.sex); }, @@ -9296,15 +9296,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:'phaseBegin', }, - filter:function(event,player){ + filter(event,player){ if(event.sunohara_chengshuang) return false; return game.phaseNumber>1; }, - prompt2:function(event,player){ + prompt2(event,player){ if(player.sex=='unknown'||player.sex=='double') return '选择自己的性别'; return '将自己的性别变更为'+(player.sex=='male'?'女性':'男性'); }, - content:function(){ + content(){ 'step 0' if(player.sex=='unknown'||player.sex=='double') player.chooseControl('male','female').set('prompt','成双:请选择自己的性别'); else event._result={control:player.sex=='male'?'female':'male'}; @@ -9320,11 +9320,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sunohara_tiaoyin:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countGainableCards(player,'hej')>0; }, selectCard:[1,4], - filterCard:function(card){ + filterCard(card){ for(var i=0;i0) player.gainPlayerCard(target,'hej','visible'); }, - contentAfter:function(){ + contentAfter(){ var bool=false; for(var i=0;i0; }, frequent:true, - content:function(){ + content(){ 'step 0' var cards=trigger.cards.filterInD('od'); player.gain(cards,'gain2','log'); @@ -9421,10 +9421,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ markcount:'expansion', }, mod:{ - attackRange:function(from,num){ + attackRange(from,num){ return num+from.getExpansions('shiina_qingshen').length; }, - maxHandcard:function(from,num){ + maxHandcard(from,num){ return num+from.getExpansions('shiina_qingshen').length; }, }, @@ -9437,11 +9437,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ animalList:['key_inari','key_doruji'], trigger:{global:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(lib.skill.shiina_feiyan.animalList.includes(event.player.name)) return false; return player.getExpansions('shiina_qingshen').length>0&&player.inRange(event.player); }, - content:function(){ + content(){ 'step 0' player.chooseButton([get.prompt('shiina_feiyan',trigger.player),player.getExpansions('shiina_qingshen')]).set('goon',get.attitude(player,trigger.player)<0?1:-1).set('ai',function(){return _status.event.goon}); 'step 1' @@ -9470,14 +9470,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:1, shaRelated:true, trigger:{player:'useCardToPlayered'}, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.target)<0; }, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&event.getParent().skill=='shiina_feiyan'; }, logTarget:'target', - content:function(){ + content(){ "step 0" player.judge(function(){return 0}); if(!trigger.target.hasSkill('fengyin')){ @@ -9503,10 +9503,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, inari_baiwei:{ enable:['chooseToUse','chooseToRespond'], - hiddenCard:function(player,name){ + hiddenCard(player,name){ return name!='du'&&get.type(name)=='basic'&&player.countCards('hes',{suit:'diamond'})>0; }, - filter:function(event,player){ + filter(event,player){ if(event.type=='wuxie'||!player.countCards('hse',{suit:'diamond'})) return false; for(var i=0;i0; }, }, @@ -9593,7 +9593,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:1, filterCard:{suit:'diamond'}, popname:true, - check:function(card){ + check(card){ return 1/Math.max(0.1,get.value(card)); }, position:'hse', @@ -9601,7 +9601,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:10, result:{player:1}, respondShan:true, - skillTagFilter:function(player){ + skillTagFilter(player){ return player.countCards('hse',{suit:'diamond'})>0; }, }, @@ -9610,17 +9610,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:['useCardAfter','respondAfter']}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.skill&&event.skill.indexOf('inari_baiwei')==0; }, - content:function(){player.draw()}, + content(){player.draw()}, }, inari_huhun:{ mod:{ - suit:function(card,suit){ + suit(card,suit){ if(suit=='club') return 'diamond'; }, - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+1; }, } @@ -9634,12 +9634,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, skillAnimation:true, animationColor:'metal', - filter:function(event,player){ + filter(event,player){ return event.type!='saya_powei'&&game.hasPlayer(function(current){ return current.hp>player.hp; }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('saya_powei'),function(card,saya,kyousuke){ return kyousuke.hp>saya.hp; @@ -9664,7 +9664,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ next.setContent(lib.skill.saya_powei.content2); } }, - content2:function(){ + content2(){ 'step 0' event.count=0; event.stat=true; @@ -9699,10 +9699,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseBegin'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.type=='saya_powei'&&player==event.getParent().playertrue; }, - content:function(){ + content(){ 'step 0' player.judge(function(card){ return get.color(card)=='red'?5:0; @@ -9719,11 +9719,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ saya_shouji:{ audio:2, trigger:{player:'useCardAfter'}, - filter:function(event,player){ + filter(event,player){ return !player.getStat('skill').saya_shouji&&event.cards.filterInD().length>0; }, direct:true, - content:function(){ + content(){ 'step 0' var goon=function(){ var num=0; @@ -9759,7 +9759,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' target.chooseToUse({ cards:cards, - filterCard:function(card){ + filterCard(card){ if(get.itemtype(card)!='card'||!_status.event.cards||!_status.event.cards.includes(card)) return false; return lib.filter.filterCard.apply(this,arguments); }, @@ -9772,11 +9772,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ haruka_shuangche:{ audio:2, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return !player.hasSkill('haruka_kanata'); }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var list=[]; for(var i=0;i0) return 0; if(['wugu','zhulu_card'].includes(button.link[2])) return 0; @@ -9801,27 +9801,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(effect>0) return effect; return 0; }, - backup:function(links,player){ + backup(links,player){ return { audio:'haruka_shuangche', - filterCard:function(){return false}, + filterCard(){return false}, selectCard:-1, popname:true, - check:function(card){ + check(card){ return 6-get.value(card); }, position:'he', viewAs:{name:links[0][2],nature:links[0][3],isCard:true}, } }, - prompt:function(links,player){ + prompt(links,player){ return '请选择'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'的目标'; } }, ai:{ order:1, result:{ - player:function(player){ + player(player){ var cards=player.getCards('he').sort(function(a,b){ return get.value(a)-get.value(b); }); @@ -9845,10 +9845,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kanata_shuangche:{ trigger:{player:'useCardAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.skill=='haruka_shuangche_backup'; }, - content:function(){ + content(){ 'step 0' var num=player.getStat('skill').haruka_shuangche||1; player.chooseToDiscard('###双掣:请选择一项###选择弃置'+get.cnNumber(num)+'张牌,或失去1点体力且令〖双掣〗失效至回合结束',num,'he').set('ai',function(card){ @@ -9870,10 +9870,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:5, trigger:{target:'useCardToTargeted'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')0; }, - content:function(){ + content(){ 'step 0' player.chooseCard('he',[1,player.countCards('he')],get.prompt2('tsumugi_huilang')).set('ai',function(card){ if(get.position(card)!='h') return -1; @@ -9905,16 +9905,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, marktext:'隐', intro:{content:'隐藏于回廊之牌',markcount:'expansion'}, - onremove:function(player,skill){ + onremove(player,skill){ var cards=player.getExpansions(skill); if(cards.length) player.loseToDiscardpile(cards); }, trigger:{player:'phaseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('tsumugi_huilang2').length>0; }, - content:function(){ + content(){ 'step 0' var cards=player.getExpansions('tsumugi_huilang2'); event.num=cards.length; @@ -9943,20 +9943,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'useCardToPlayered', target:'useCardToTargeted', }, - filter:function(event,player){ + filter(event,player){ if(!(event.card.name=='juedou'||(event.card.name=='sha'&&get.color(event.card)=='red'))) return false; return player==event.target||event.getParent().triggeredTargets3.length==1; }, frequent:true, - content:function(){ + content(){ player.draw(); }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(card.name=='sha'&&get.color(card)=='red') return [1,0.6]; }, - player:function(card,player,target){ + player(card,player,target){ if(card.name=='sha'&&get.color(card)=='red') return [1,1]; } } @@ -9966,7 +9966,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseUseBegin'}, direct:true, locked:true, - content:function(){ + content(){ 'step 0' var list=[]; if(player.storage._ichiban_no_takaramono) list.push('cancel2'); @@ -9997,14 +9997,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yui_lieyin0:{ mod:{ - cardname:function(card){ + cardname(card){ if(get.color(card)=='red') return 'sha'; }, }, }, yui_lieyin1:{ mod:{ - cardname:function(card){ + cardname(card){ if(card.name=='sha') return 'juedou'; }, }, @@ -10016,7 +10016,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'key', - filter:function(event,player){ + filter(event,player){ var num=0; if(player.hp<=1) num++; if(game.dead.length>0) num++; @@ -10027,7 +10027,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return draw>=3; }, - content:function(){ + content(){ player.awakenSkill('yui_takaramono'); player.addSkill('yui_yinhang'); player.storage._ichiban_no_takaramono=true; @@ -10041,7 +10041,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ locked:true, direct:true, line:{color:[253, 153, 182]}, - content:function(){ + content(){ 'step 0' event.count=Math.abs(trigger.num); 'step 1' @@ -10065,7 +10065,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yoshino_jueyi:{ trigger:{player:'phaseUseBegin'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(lib.filter.notMe,get.prompt2('yoshino_jueyi')).set('ai',function(target){ var player=_status.event.player; @@ -10101,7 +10101,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yoshino_fail:{ mod:{ - targetEnabled:function(card,player,target){ + targetEnabled(card,player,target){ if(player==_status.currentPhase) return false; }, }, @@ -10109,26 +10109,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kengo_weishang:{ locked:false, mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha'&&player.hasDisabledSlot(1)) return num+1; }, - globalFrom:function(from,to,distance){ + globalFrom(from,to,distance){ if(from.hasDisabledSlot(4)) return distance-1; }, - globalTo:function(from,to,distance){ + globalTo(from,to,distance){ if(to.hasDisabledSlot(3)) return distance+1; }, }, enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ var list=['equip1','equip2','equip3','equip4','equip5']; for(var i=0;i0; }, logTarget:'target', - content:function(){ + content(){ trigger.target.chooseToDiscard('he',true); }, }, @@ -10171,15 +10171,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:true, position:'hes', prompt:'将一张牌当做闪使用或打出', - viewAsFilter:function(player){ + viewAsFilter(player){ return player.hasDisabledSlot(2)&&player.countCards('hes')>0; }, - check:function(card){ + check(card){ return 1/Math.max(0.1,get.value(card)); }, ai:{ respondShan:true, - skillTagFilter:function(player){ + skillTagFilter(player){ return player.hasDisabledSlot(2)&&player.countCards('he')>0; }, }, @@ -10187,10 +10187,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kengo_guidui:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countDisabledSlot()>0; }, - content:function(){ + content(){ var list=[]; for(var i=1;i<=5;i++){ for(var j=0;j0; }, - content:function(){ + content(){ var list=[]; var list2=[]; var cards=trigger.getd(); @@ -10298,7 +10298,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:{ onremove:true, intro:{ - content:function(s){ + content(s){ var str='本回合已经进入过弃牌堆的卡牌的花色:'; for(var i=0;i=0?0:1).set('ai',function(){return _status.event.choice}); 'step 1' @@ -10357,7 +10357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - player:function(card,player,target){ + player(card,player,target){ if(target&&get.attitude(player,target)>0&&get.tag(card,'damage')) return 'zeroplayertarget'; }, }, @@ -10366,14 +10366,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yusa_yanyi:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return get.distance(player,target)<=player.hp; }, - selectTarget:function(){ + selectTarget(){ return [1,Math.max(_status.event.player.getAttackRange())]; }, line:'thunder', - content:function(){ + content(){ 'step 0' if(target.isHealthy()){ player.draw(); @@ -10407,10 +10407,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - player:function(player,target){ + player(player,target){ return target.isHealthy()?1:0; }, - target:function(player,target){ + target(player,target){ if(target.isHealthy()) return 0; return get.recoverEffect(target,player,target); }, @@ -10420,20 +10420,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yusa_misa:{ charlotte:true, trigger:{player:'useSkillAfter'}, - filter:function(event,player){ + filter(event,player){ return event.skill=='yusa_yanyi'&&!player.storage.dualside_over&&Array.isArray(player.storage.dualside); }, - content:function(){ + content(){ player.turnOver(); }, }, misa_yusa:{ charlotte:true, trigger:{player:'misa_yehuoAfter'}, - filter:function(event,player){ + filter(event,player){ return event.bool===true&&!player.storage.dualside_over&&Array.isArray(player.storage.dualside); }, - content:function(){ + content(){ player.turnOver(); }, }, @@ -10443,11 +10443,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, locked:true, line:{color:[236,137,52]}, - filter:function(event,player){ + filter(event,player){ var target=event.player; return player.inRange(target)&&player.countCards('he')>=get.distance(player,target); }, - content:function(){ + content(){ 'step 0' var next=player.chooseToDiscard('he',get.distance(player,trigger.player)||1,get.prompt2('misa_yehuo',trigger.player)); next.set('logSkill',['misa_yehuo',trigger.player,'fire']); @@ -10483,29 +10483,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsqiyue:{ trigger:{global:['turnOverEnd','linkEnd','showCharacterEnd','hideCharacterEnd','removeCharacterEnd']}, forced:true, - content:function(){player.draw()}, + content(){player.draw()}, }, nsxuezhu:{ trigger:{player:'damageEnd',source:'damageSource'}, - filter:function(event,player){ + filter(event,player){ return event.player.isIn(); }, logTarget:'player', - content:function(){ + content(){ trigger.player.draw(2); trigger.player.turnOver(); }, - check:function(event,player){ + check(event,player){ return !event.player.isTurnedOver()||get.attitude(player,event.player)>0; }, }, yukine_wenzhou:{ trigger:{global:'phaseUseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return event.player.countCards('he')>0; }, - content:function(){ + content(){ "step 0" event.forceDie=true; var ask=trigger.player.chooseCard('he',get.prompt('yukine_wenzhou')); @@ -10563,22 +10563,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, charlotte:true, - filter:function(event,player){ + filter(event,player){ return player.storage.yukine_magic&&player.storage.yukine_magic.includes(event.card.name); }, - content:function(){ + content(){ trigger.directHit.addArray(game.filterPlayer(function(current){ if(player!=current) return true; return !player.hasSkill('yukine_wenzhou'); })); }, onremove:true, - init:function(player,skill){ + init(player,skill){ if(!player.storage[skill]) player.storage[skill]=[]; }, ai:{ directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ return player.storage.yukine_magic&&player.storage.yukine_magic.includes(arg.card.name); }, }, @@ -10589,13 +10589,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target:'useCardToTarget', }, forced:true, - filter:function(event,player,name){ + filter(event,player,name){ if(name=='useCardToTarget'&&player==event.player) return false; if(get.color(event.card)!='red') return false; if(get.tag(event.card,'damage')) return false; return ['basic','trick'].includes(get.type(event.card)); }, - content:function(){ + content(){ 'step 0' var info=get.info(trigger.card); var bool=true; @@ -10627,11 +10627,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, skillAnimation:true, chargingSkill:true, - filter:function(event,player){ + filter(event,player){ return player.hp>0; }, animationColor:'metal', - content:function(){ + content(){ 'step 0' player.addSkill('riki_xueshang'); var map={}; @@ -10666,10 +10666,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, charlotte:true, - filter:function(event,player){ + filter(event,player){ return event.getParent(2).name=='komari_xueshang'&&event.getParent(2).player==player; }, - content:function(){ + content(){ player.removeSkill('komari_xueshang'); player.gainMaxHp(true); player.recover(); @@ -10680,19 +10680,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, selectCard:2, complexCard:true, - filter:function(summer,umi){ + filter(summer,umi){ return umi.countCards('h')>1; }, - check:function(ingredient){ + check(ingredient){ return 7-get.value(ingredient); }, - filterCard:function(ingredient){ + filterCard(ingredient){ if(ui.selected.cards.length) return get.suit(ingredient)!=get.suit(ui.selected.cards[0]); return true; }, line:{color:[251, 193, 217]}, filterTarget:lib.filter.notMe, - content:function(){ + content(){ 'step 0' player.draw(); 'step 1' @@ -10703,7 +10703,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:2, result:{ - target:function(umi,takahara){ + target(umi,takahara){ if(umi.hp>2&&takahara.isDamaged()) return 2.2; if(umi.hp==2&&!takahara.hasSkillTag('nogain')) return 2; if(umi.hp<2) return get.damageEffect(takahara,umi,umi,'fire'); @@ -10713,13 +10713,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, umi_lunhui:{ trigger:{global:'phaseAfter'}, - filter:function(summer,umi){ + filter(summer,umi){ return summer.player!=umi&&umi.countCards('h')0; }, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.player)>1; }, logTarget:'player', - content:function(){ + content(){ 'step 0' player.gain(trigger.player.getCards('j'),trigger.player,'give','bySelf'); 'step 1' @@ -10865,7 +10865,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseUseBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var card=get.cardPile(function(card){ return card.name=='sha'||get.type(card)=='trick'; @@ -10879,18 +10879,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, locked:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h',lib.skill.yuri_xingdong.filterCard); }, - filterCard:function(card){ + filterCard(card){ return card.name=='sha'||get.type(card)=='trick'; }, - check:function(card){return 1}, + check(card){return 1}, filterTarget:lib.filter.notMe, discard:false, lose:false, delay:0, - content:function(){ + content(){ 'step 0' player.give(cards,target); 'step 1' @@ -10913,7 +10913,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:12, result:{ - target:function(player,target){ + target(player,target){ var card=ui.selected.cards[0]; if(target.hasSkill('pingkou')) return 1; if(!card) return 0; @@ -10941,7 +10941,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, limited:true, mark:false, - init:function(player){ + init(player){ if(player.hasZhuSkill('yuri_wangxi')){ player.markSkill('yuri_wangxi'); player.storage.yuri_wangxi=false; @@ -10951,7 +10951,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, skillAnimation:true, animationColor:'thunder', - filter:function(event,player){ + filter(event,player){ if(get.mode()!='identity') return false; if(!player.hasZhuSkill('yuri_wangxi')) return false; if(event.player.isIn()) return false; @@ -10959,7 +10959,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var evt=event.getParent('yuri_xingdong'); return evt&&evt.name=='yuri_xingdong'&&evt.player==player; }, - content:function(){ + content(){ 'step 0' trigger.player.chooseBool('是否发动'+get.translation(player)+'的【忘隙】?').forceDie=true; 'step 1' @@ -10991,24 +10991,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nk_shekong:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, filterCard:true, - selectCard:function(){ + selectCard(){ if(ui.selected.targets.length) return [1,ui.selected.targets[0].countCards('he')]; return [1,Infinity]; }, - filterTarget:function(event,player,target){ + filterTarget(event,player,target){ return target!=player&&target.countCards('he')>=Math.max(1,ui.selected.cards.length); }, - check:function(card){ + check(card){ if(!game.hasPlayer(function(current){ return current!=_status.event.player&&get.attitude(_status.event.player,current)<0&¤t.countCards('he')>ui.selected.cards.length; })) return 0; return 6-get.value(card); }, - content:function(){ + content(){ 'step 0' event.cardsx=cards.slice(0); var num=get.cnNumber(cards.length); @@ -11066,10 +11066,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ silent:true, popup:false, lastDo:true, - filter:function(event){ + filter(event){ return event.name=='draw'||!event.directresult; }, - content:function(){ + content(){ if(trigger.name=='draw'){ if(trigger.bottom) trigger.bottom=false; else trigger.bottom=true; @@ -11084,13 +11084,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, charlotte:true, - filter:function(event,player,onrewrite){ + filter(event,player,onrewrite){ if(onrewrite=='loseHpBefore'){ return event.type=='du'; } return event.source!=undefined&&event.source!=event.player; }, - content:function(){ + content(){ var onrewrite=event.triggername; if(onrewrite=='loseHpBefore'){ trigger.cancel(); @@ -11110,10 +11110,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseJieshuBegin'}, forced:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('e')>0; }, - content:function(){ + content(){ 'step 0' var es=player.getCards('e'); event.count=es.length; @@ -11148,7 +11148,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ complexCard:true, charlotte:true, prompt:"将4张花色各不同的牌交一名角色并令你与其获得【铁骑】和【激昂】直到各自回合结束", - check:function(card){ + check(card){ if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; if(!ui.selected.cards.length&&card.name=='du') return 20; var player=get.owner(card); @@ -11170,14 +11170,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 10-get.value(card); }, - filterCard:function(card,player){ + filterCard(card,player){ var suit=get.suit(card,player); for(var i=0;i0; }, - logTarget:function(event,player){ + logTarget(event,player){ if(player==event.source) return event.player; return event.source; }, - check:function(event,player){ + check(event,player){ var target=lib.skill.nsqingde.logTarget(event,player); return get.attitude(player,target)<=0; }, - content:function(){ + content(){ 'step 0' var target=lib.skill.nsqingde.logTarget(trigger,player); event.target=target @@ -11381,7 +11381,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(target.storage.counttrigger&&target.storage.counttrigger.nsqingde) return; var num=get.number(card); if(typeof num=='number'){ @@ -11403,7 +11403,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsyidi:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, filterCard:true, @@ -11411,7 +11411,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, delay:false, - check:function(card){ + check(card){ var player=_status.event.player; if(get.type(card,player)=='basic'){ if(game.hasPlayer(function(current){ @@ -11427,7 +11427,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })) return 5+Math.random(); return 4-get.value(card); }, - content:function(){ + content(){ 'step 0' player.give(cards,target,'visible'); if(get.type(cards[0],player)!='basic'){ @@ -11440,7 +11440,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:7, result:{ - player:function(player,target){ + player(player,target){ if(!ui.selected.cards.length||get.type(ui.selected.cards[0],player)=='basic') return 0; if(get.value(ui.selected.cards[0])<4) return 2; return 0.5; @@ -11452,15 +11452,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsfuzhou:{ enable:'phaseUse', usable:2, - filter:function(event,player){ + filter(event,player){ if(!player.storage.nstaiping&&player.getStat('skill').nsfuzhou) return false; return player.countCards('he',{color:'black'})>0; }, filterCard:{color:'black'}, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.hasJudge('nsfuzhou_card'); }, - check:function(card){ + check(card){ return 8-get.value(card); }, prepare:'give', @@ -11468,7 +11468,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, delay:false, - content:function(){ + content(){ 'step 0' target.addJudge({name:'nsfuzhou_card'},cards[0]); cards[0].storage.nsfuzhou_source=player; @@ -11478,7 +11478,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:5, result:{ - target:function(player,target){ + target(player,target){ if(player.storage.nsfuzhou_draw){ if(get.attitude(player,target)>0&&player.countCards('he',function(card){ return get.color(card)=='red'; @@ -11497,26 +11497,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.storage.nsfuzhou_num; }, }, intro:{ - content:function(num){ + content(num){ return '手牌上限'+(num<0?'':'+')+num; }, } }, nsguidao:{ trigger:{global:'judge'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('hes',function(card){ if(player.storage.nstaiping||(_status.connectMode&&get.position(card)!='e')) return true; return get.color(card)=='black'; })>0; }, direct:true, - content:function(){ + content(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ get.translation(trigger.player.judging[0])+','+get.prompt('nsguidao'),'hes',function(card,player){ @@ -11572,14 +11572,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'thunder', - filter:function(event,player){ + filter(event,player){ return player.getAllHistory('sourceDamage',function(evt){ return evt.getParent().name=='nsfuzhou_card'; }).length>1||player.getAllHistory('gain',function(evt){ return evt.getParent(2).name=='nsfuzhou_card'; }).length>1; }, - content:function(){ + content(){ player.awakenSkill('nstaiping'); player.storage.nstaiping=true; if(player.getAllHistory('sourceDamage',function(evt){ @@ -11594,13 +11594,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsweiyuan:{ trigger:{player:'useCardToTargeted'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player!=event.target&&event.targets&&event.targets.length==1&&event.target.isIn() &&player.isPhaseUsing()&&!player.hasSkill('nsweiyuan2')&&game.hasPlayer(function(current){ return current!=player&¤t!=event.target; }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('nsweiyuan'),function(card,player,target){ return target!=player&&target!=_status.event.getTrigger().target; @@ -11639,14 +11639,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', charlotte:true, mod:{ - cardUsable:function(){ + cardUsable(){ if(_status.event.skill=='nsweiyuan_use_backup') return Infinity; }, - targetInRange:function(){ + targetInRange(){ if(_status.event.skill=='nsweiyuan_use_backup') return true; }, }, - onChooseToUse:function(event){ + onChooseToUse(event){ if(game.online||event.type!='phase') return; var list=[]; event.player.getHistory('useCard',function(evt){ @@ -11666,45 +11666,45 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); event.set('nsweiyuan_list',list); }, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&event.nsweiyuan_list&&event.nsweiyuan_list.length>0; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ return ui.create.dialog('围援',[event.nsweiyuan_list.map(function(i){ return i.split('咕'); }),'vcard']); }, - filter:function(button,player){ + filter(button,player){ return lib.filter.cardEnabled({ name:button.link[2], nature:button.link[3], },player); }, - check:function(button){ + check(button){ return _status.event.player.getUseValue({ name:button.link[2], nature:button.link[3], },false); }, - backup:function(links,player){ + backup(links,player){ return { popname:true, position:'h', filterCard:true, - ai1:function(card){ + ai1(card){ return 7-get.value(card); }, viewAs:{ name:links[0][2], nature:links[0][3], }, - onuse:function(links,player){ + onuse(links,player){ player.removeSkill('nsweiyuan_use'); }, } }, - prompt:function(links,player){ + prompt(links,player){ return '将一张手牌当做'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'使用'; }, }, @@ -11717,14 +11717,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsjuxian:{ trigger:{player:'damageBegin2'}, - filter:function(event,player){ + filter(event,player){ return !player.hasSkill('nsjuxian2'); }, - check:function(event,player){ + check(event,player){ if(player.countCards('h')+2>=player.maxHp) return !event.source||!event.source.countCards('he')||get.attitude(player,event.source)>0; return true; }, - content:function(){ + content(){ 'step 0' player.addSkill('nsjuxian2'); player.draw(2); @@ -11740,7 +11740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseDrawBefore'}, forced:true, charlotte:true, - content:function(){ + content(){ player.removeSkill('nsjuxian2'); trigger.cancel(); game.log(player,'跳过了','#y摸牌阶段'); @@ -11753,11 +11753,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, locked:false, - filter:function(event,player){ + filter(event,player){ if(event.name!='damage') return event.getg(player).length>1; return true; }, - content:function(){ + content(){ player.addMark('nsdiewu',1); }, intro:{ @@ -11769,16 +11769,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'chooseToUse', viewAs:{name:'sha',isCard:true}, prompt:'视为使用一张【杀】', - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countMark('nsdiewu')>0; }, filterCard:()=>false, selectCard:-1, - onuse:function(links,player){ + onuse(links,player){ player.removeMark('nsdiewu',1); }, ai:{ - order:function(){ + order(){ var player=_status.event.player; if(!player.storage.nspojian&&player.countMark('nsdiewu')<=player.hp) return 0; return get.order({name:'sha'})+0.1; @@ -11788,16 +11788,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shan:{ enable:'chooseToUse', viewAs:{name:'shan',isCard:true}, - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countMark('nsdiewu')>0&&!player.storage.nspojian; }, filterCard:()=>false, selectCard:-1, - onuse:function(links,player){ + onuse(links,player){ player.removeMark('nsdiewu',1); }, ai:{ - order:function(){ + order(){ var player=_status.event.player; if(player.hp>1&&player.countMark('nsdiewu')<=player.hp) return 0; return get.order({name:'shan'})-0.2; @@ -11808,11 +11808,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageEnd'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ var evt=event.getParent(); return evt&&evt.type=='card'&&evt.skill=='nsdiewu_sha'; }, - content:function(){ + content(){ player.draw(); }, }, @@ -11820,7 +11820,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondSha:true, respondShan:true, - skillTagFilter:function(player,tag){ + skillTagFilter(player,tag){ if(tag=='respondShan'&&player.storage.nspojian) return false; return player.countMark('nsdiewu')>0; }, @@ -11828,10 +11828,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nslingying:{ mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha') return num+1; }, - targetInRange:function(card){ + targetInRange(card){ if(card.name=='sha') return true; }, }, @@ -11842,10 +11842,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'fire', - filter:function(event,player){ + filter(event,player){ return player.countMark('nsdiewu')>=player.hp; }, - content:function(){ + content(){ player.awakenSkill('nspojian'); player.storage.nspojian=true; player.loseMaxHp(); @@ -11859,7 +11859,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsguolie:{ trigger:{player:'phaseDrawBefore'}, - check:function(event,player){ + check(event,player){ var h1=player.getUseValue({name:'sha'},false); var h2=player.getUseValue({name:'guohe'}); return player.countCards('h',function(card){ @@ -11867,31 +11867,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return h2>0; })>2; }, - content:function(){ + content(){ trigger.cancel(); player.addTempSkill('nsguolie2'); }, }, nsguolie2:{ mod:{ - cardname:function(card,player){ + cardname(card,player){ var color=get.color(card,player); if(color=='red') return 'sha'; if(color=='black') return 'guohe'; }, - cardnature:function(){ + cardnature(){ return false; }, - cardUsable:function(){ + cardUsable(){ return Infinity; }, - targetInRange:function(){ + targetInRange(){ return true; }, }, trigger:{player:'phaseJieshuBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ var cards=[]; game.getGlobalHistory('cardMove',function(evt){ if(evt.player==player) return; @@ -11901,7 +11901,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return cards.length>0; }, - content:function(){ + content(){ var cards=[]; game.getGlobalHistory('cardMove',function(evt){ if(evt.player==player) return; @@ -11921,14 +11921,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!game.hasPlayer(i=>i.hasSkill('nslongyue'),true)) game.removeGlobalSkill('nslongyue_ai'); }, trigger:{global:'useCard'}, - filter:function(event,player){ + filter(event,player){ return get.type(event.card,'trick')=='trick'&&event.player.getHistory('useCard').indexOf(event)==0; }, logTarget:'player', - check:function(event,player){ + check(event,player){ return get.attitude(player,event.player)>0; }, - content:function(){ + content(){ trigger.player.draw(); }, ai:{ @@ -11937,7 +11937,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nslongyue_ai:{ mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(!player.getHistory('useCard').length&&get.type(card)=='trick'&&game.hasPlayer(function(current){ return current.hasSkill('nslongyue')&&get.attitude(player,current)>=0; })) return num+6; @@ -11956,13 +11956,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nszhenyin:{ trigger:{global:'judge'}, usable:1, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase&&_status.currentPhase.countCards('h')>0; }, - logTarget:function(){ + logTarget(){ return _status.currentPhase; }, - check:function(event,player){ + check(event,player){ var target=_status.currentPhase; var judge=event.judge(event.player.judging[0]); var max=0; @@ -11982,7 +11982,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(att<0) return max<=0; return false; }, - content:function(){ + content(){ "step 0" if(!_status.currentPhase.countCards('h',function(card){ var player=_status.currentPhase; @@ -12051,16 +12051,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsxianhai:{ trigger:{global:'damageSource'}, - filter:function(event,player){ + filter(event,player){ return event.source&&event.source!=player&&event.source.isIn()&&event.source==_status.currentPhase&& (event.source.getStat('damage')||0)>(player.getLastStat('damage')||0)&& !player.hasSkill('nsxianhai_round'); }, - check:function(event,player){ + check(event,player){ return player.maxHp>1&&get.attitude(player,event.source)<-4; }, logTarget:'source', - content:function(){ + content(){ 'step 0' player.addTempSkill('nsxianhai_round','roundStart'); player.loseMaxHp(); @@ -12104,14 +12104,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsxingchu:{ trigger:{global:'die'}, forceDie:true, - filter:function(event,player){ + filter(event,player){ return player==event.player||player==event.source; }, limited:true, skillAnimation:true, animationColor:'wood', direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('nsxingchu')).set('ai',function(target){ return get.attitude(_status.event.player,target); @@ -12130,13 +12130,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsshengyan:{ trigger:{player:'judgeEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase&&_status.currentPhase.isIn()&&(!player.storage.nsshengyan2||!player.storage.nsshengyan2.includes(event.result.suit)); }, - logTarget:function(){ + logTarget(){ return _status.currentPhase; }, - content:function(){ + content(){ player.addTempSkill('nsshengyan2'); if(!player.storage.nsshengyan2) player.storage.nsshengyan2=[]; _status.currentPhase.addTempSkill('nsshengyan3'); @@ -12147,7 +12147,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsshengyan2:{onremove:true}, nsshengyan3:{ mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.countMark('nsshengyan3'); }, }, @@ -12160,26 +12160,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsdaizhan:{ trigger:{player:'phaseZhunbeiBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return (!player.hasJudge('lebu')||!player.hasJudge('bingliang'))&&player.countCards('he',function(card){ if(_status.connectMode) return true; return get.type(card,'trick')!='trick'; }); }, - content:function(){ + content(){ var next=player.chooseToUse(); next.set('norestore',true); next.set('_backupevent','nsdaizhanx'); next.set('custom',{ add:{}, - replace:{window:function(){}} + replace:{window(){}} }); next.backup('nsdaizhanx'); }, }, nsdaizhanx:{ chooseButton:{ - dialog:function(){ + dialog(){ var list=['lebu','bingliang']; var list2=[]; for(var i of list){ @@ -12187,10 +12187,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return ui.create.dialog(get.prompt('nsdaizhan'),[list2,'vcard'],'hidden'); }, - filter:function(button,player){ + filter(button,player){ return !player.hasJudge(button.link[2]) }, - check:function(button){ + check(button){ if(button.link[2]=='lebu') return 0; var player=_status.event.player; var delta=player.getHandcardLimit()+player.countCards('j')*2+2-player.hp; @@ -12200,20 +12200,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })) return Math.random(); return 0; }, - backup:function(links,player){ + backup(links,player){ return { - filterCard:function(card,player){ + filterCard(card,player){ return get.itemtype(card)=='card'&&get.type(card,'trick')!='trick'&&player.canAddJudge({name:links[0][2],cards:[card]}); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player==target; }, - check:function(card){ + check(card){ return 8-get.value(card); }, viewAs:{name:links[0][2]}, position:'he', - precontent:function(){ + precontent(){ player.addTempSkill('nsdaizhany'); event.result.skill='nsdaizhan'; }, @@ -12224,7 +12224,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }; }, - prompt:function(links){ + prompt(links){ return '将一张牌当做'+get.translation(links[0][2])+'对自己使用'; }, }, @@ -12233,10 +12233,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseEnd'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')0; }, - locked:function(skill,player){ + locked(skill,player){ return player&&player.storage.nsfuwei; }, - content:function(){ + content(){ 'step 0' var target=(event.triggername=='damageSource'?trigger.source:trigger.player); event.target=target; @@ -12274,7 +12274,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delayx(); }, mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha') return num+player.getExpansions('nsjiquan_mark').length; }, }, @@ -12293,10 +12293,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'thunder', - filter:function(event,player){ + filter(event,player){ return player.getExpansions('nsjiquan_mark').length>4; }, - content:function(){ + content(){ player.awakenSkill('nsfuwei'); player.storage.nsfuwei=true; player.addSkill('nsdiemou'); @@ -12308,10 +12308,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsdiemou:{ trigger:{player:'phaseUseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('nsjiquan_mark').length>game.players.length; }, - content:function(){ + content(){ var cards=player.getExpansions('nsjiquan_mark'); player.draw(cards.length); player.loseMaxHp(); @@ -12323,18 +12323,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'nszhihuang_damage', trigger:{global:'useCard'}, usable:1, - filter:function(event,player){ + filter(event,player){ return event.player==get.zhu(player)&&player.getExpansions('nsjiquan_mark').length>0&&event.cards&&event.cards.filterInD().length>0; }, - prompt2:function(event){ + prompt2(event){ return '移去一张“威”并获得'+get.translation(event.cards.filterInD()); }, - check:function(event,player){ + check(event,player){ if(['equip','delay'].includes(get.type(event.card))) return get.attitude(player,event.player)<0; return get.value(event.cards.filterInD())>0; }, logTarget:'player', - content:function(){ + content(){ 'step 0' var cards=player.getExpansions('nsjiquan_mark'); if(cards.length==1) event._result={ @@ -12350,11 +12350,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nszhihuang_damage:{ trigger:{source:'damageBegin1'}, forced:true, - filter:function(event,player){ + filter(event,player){ var zhu=get.zhu(player); return zhu&&player.countCards('h')>zhu.countCards('h')&&event.getParent().type=='card'; }, - content:function(){ + content(){ trigger.num++; }, }, @@ -12362,15 +12362,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ junkshicai:{ audio:'nzry_shicai_2', trigger:{player:'useCardAfter'}, - filter:function(event,player){ + filter(event,player){ if(!event.cards.filterInD('oe').length) return false; return player.getHistory('useCard',evt=>get.type2(evt.card)==get.type2(event.card)).indexOf(event)==0; }, - prompt2:function(event,player){ + prompt2(event,player){ const cards=event.cards.filterInD('oe'); return '你可以将'+get.translation(cards)+(cards.length>1?'以任意顺序':'')+'置于牌堆顶,然后摸一张牌'; }, - content:function(){ + content(){ 'step 0' event.cards=trigger.cards.filterInD('oe'); var lose_list=[]; @@ -12409,7 +12409,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ reverseOrder:true, - skillTagFilter:function(player){ + skillTagFilter(player){ if(player.getHistory('useCard',function(evt){ return get.type(evt.card)=='equip'; }).length>0) return false; @@ -12421,7 +12421,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'langmie', trigger:{global:'phaseJieshuBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(player==event.player||player.countCards('he')==0) return false; var num=0; if(event.player.hasHistory('sourceDamage',function(evt){ @@ -12438,7 +12438,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return true; }); }, - content:function(){ + content(){ 'step 0' var list=[],num=0,target=trigger.player; event.target=target; @@ -12496,22 +12496,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ junkwangxi:{ audio:'wangxi', trigger:{player:'damageEnd',source:'damageSource'}, - filter:function(event){ + filter(event){ if(event._notrigger.includes(event.player)) return false; return event.num&&event.source&&event.player&& event.player.isIn()&&event.source.isIn()&&event.source!=event.player; }, - check:function(event,player){ + check(event,player){ if(player.isPhaseUsing()) return true; if(event.player==player) return get.attitude(player,event.source)>-5; return get.attitude(player,event.player)>-5; }, - logTarget:function(event,player){ + logTarget(event,player){ if(event.player==player) return event.source; return event.player; }, preHidden:true, - content:function(){ + content(){ 'step 0' event.count=trigger.num; event.target=lib.skill.junkwangxi.logTarget(trigger,player); @@ -12553,10 +12553,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'jizhi', trigger:{player:'useCard'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return get.type(event.card)=='trick'&&event.card.isCard; }, - content:function(){ + content(){ 'step 0' var card=get.cards()[0]; event.card=card; @@ -12581,11 +12581,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, junkqicai:{ mod:{ - targetInRange:function(card,player,target,now){ + targetInRange(card,player,target,now){ var type=get.type(card); if(type=='trick'||type=='delay') return true; }, - canBeDiscarded:function(card){ + canBeDiscarded(card){ if(get.position(card)=='e'&&!['equip3','equip4','equip6'].includes(get.subtype(card))) return false; }, }, @@ -12594,7 +12594,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'rende', enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, filterTarget:lib.filter.notMe, @@ -12604,7 +12604,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, delay:false, - content:function(){ + content(){ 'step 0' event.num=cards.length; event.targets=targets.slice(0); @@ -12617,7 +12617,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt2:'操作提示:请先选择要分配的手牌,然后再选择一名角色,该角色将获得你选择的所有手牌。', filterCard:true, selectCard:[1,Infinity], - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&!_status.event.getParent().targets.includes(target); }, }); @@ -12637,12 +12637,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, //十周年削弱版张让 junktaoluan:{ - hiddenCard:function(player,name){ + hiddenCard(player,name){ return !player.getStorage('junktaoluan').includes(name)&&player.countCards('hes',card=>!player.getStorage('junktaoluan2').includes(get.suit(card)))>0&&!player.hasSkill('junktaoluan3')&&lib.inpile.includes(name); }, audio:'taoluan', enable:'chooseToUse', - filter:function(event,player){ + filter(event,player){ return !player.hasSkill('junktaoluan3')&&player.countCards('hes',card=>{ return lib.inpile.some(name=>{ if(player.getStorage('junktaoluan2').includes(get.suit(card))) return false; @@ -12659,7 +12659,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })>0; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var list=[]; for(var name of lib.inpile){ if(get.type(name)=='basic'||get.type(name)=='trick'){ @@ -12672,28 +12672,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return ui.create.dialog('滔乱',[list,'vcard']); }, - filter:function(button,player){ + filter(button,player){ return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent()); }, - check:function(button){ + check(button){ var player=_status.event.player; var card={name:button.link[2],nature:button.link[3]}; if(player.countCards('hes',cardx=>cardx.name==card.name)) return 0; return _status.event.getParent().type=='phase'?player.getUseValue(card):1; }, - backup:function(links,player){ + backup(links,player){ return { - filterCard:function(card,player){ + filterCard(card,player){ return !player.getStorage('junktaoluan2').includes(get.suit(card)); }, audio:'taoluan', popname:true, - check:function(card){ + check(card){ return 7-get.value(card); }, position:'hse', viewAs:{name:links[0][2],nature:links[0][3]}, - onuse:function(result,player){ + onuse(result,player){ player.markAuto('junktaoluan2',[get.suit(result.cards[0],player)]); var evt=_status.event.getParent('phase'); if(evt&&evt.name=='phase'&&!evt.junktaoluan){ @@ -12710,7 +12710,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, } }, - prompt:function(links,player){ + prompt(links,player){ return '将一张牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; } }, @@ -12719,7 +12719,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ save:true, respondSha:true, respondShan:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(!player.countCards('hes',card=>!player.getStorage('junktaoluan2').includes(get.suit(card)))||player.hasSkill('taoluan3')) return false; if(tag=='respondSha'||tag=='respondShan'){ if(arg=='respond') return false; @@ -12728,7 +12728,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return !player.getStorage('taoluan').includes('tao')||(!player.getStorage('taoluan').includes('jiu')&&arg==player); }, result:{ - player:function(player){ + player(player){ var players=game.filterPlayer(); for(var i=0;i0){ @@ -12747,11 +12747,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, charlotte:true, - filter:function(event,player){ + filter(event,player){ if(!game.hasPlayer(current=>current!=player)) return false; return event.skill=='junktaoluan_backup'; }, - content:function(){ + content(){ 'step 0' player.chooseTarget(true,function(card,player,target){ return target!=player; @@ -12792,7 +12792,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseEnd'}, forced:true, popup:false, - content:function(){ + content(){ player.loseHp(); }, }, @@ -12801,7 +12801,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nshuaishuang:{ trigger:{player:'phaseJieshuBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var card=get.cardPile(function(card){ return card.name=='tao'; @@ -12818,12 +12818,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsfengli:{ trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&game.hasPlayer(function(current){ return current!=player&&!current.hasSkill('nsfengli_use'); }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('nsfengli'),function(card,player,target){ return target!=player&&!target.hasSkill('nsfengli_use'); @@ -12842,7 +12842,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, group:['nsfengli_draw','nsfengli_clear'], - onremove:function(player){ + onremove(player){ player.removeSkill('nsfengli2'); }, }, @@ -12853,7 +12853,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, direct:true, charlotte:true, - filter:function(event,player,name){ + filter(event,player,name){ if(event.name=='hideShownCards'){ const hs=player.countCards('h'); return game.hasPlayer(current=>current.countCards('h')current.countCards('h')0) player.hideShownCards(cards); player.removeSkill('nsfengli2'); }, }, nsfengli2:{ - onremove:function(player){ + onremove(player){ player.removeGaintag('nsfengli2'); game.countPlayer(function(current){ if(current.storage.nsfengli_use==player) current.removeSkill('nsfengli_use'); @@ -12921,7 +12921,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, nsfengli_use:{ - hiddenCard:function(player,name){ + hiddenCard(player,name){ if(player==_status.currentPhase) return false; var target=player.storage.nsfengli_use; var cards=target.getShownCards(); @@ -12933,7 +12933,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:['chooseToUse','chooseToRespond'], charlotte:true, onremove:true, - filter:function(event,player){ + filter(event,player){ if(player==_status.currentPhase) return false; var target=player.storage.nsfengli_use; var cards=target.getShownCards(); @@ -12947,12 +12947,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var target=player.storage.nsfengli_use; var cards=target.getShownCards(); return ui.create.dialog('奉礼',cards); }, - filter:function(button,player){ + filter(button,player){ var evt=_status.event.getParent(); var target=player.storage.nsfengli_use; return evt.filterCard({ @@ -12961,13 +12961,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ isCard:true, },player,evt); }, - check:function(button){ + check(button){ var player=_status.event.player; var evt=_status.event.getParent(); if(evt.dying) return get.attitude(player,evt.dying); return 1; }, - backup:function(links,player){ + backup(links,player){ var target=player.storage.nsfengli_use; return { viewAs:{ @@ -12978,7 +12978,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ card:links[0], filterCard:()=>false, selectCard:-1, - precontent:function(){ + precontent(){ var card=lib.skill.nsfengli_use_backup.card; var target=player.storage.nsfengli_use; event.target=target; @@ -12992,7 +12992,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ hasSha:true, hasShan:true, - skillTagFilter:function(player,tag){ + skillTagFilter(player,tag){ var name='s'+tag.slice(4); return lib.skill.nsfengli_use.hiddenCard(player,name); }, @@ -13014,14 +13014,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, skillAnimation:true, animationColor:"water", - filter:function (event,player){ + filter (event,player){ return event.player.hp<=0&&event.player!=player; }, - check:function (event,player){ + check (event,player){ return get.attitude(player,event.player)>0; }, logTarget:"player", - content:function (){ + content (){ 'step 0' trigger.player.chooseControl('releiji','guidao').set('prompt',''+get.translation(trigger.player)+'获得一项技能'); goon=true; @@ -13049,10 +13049,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"gameStart", player:["phaseEnd","enterGame"], }, - //filter:function (event,player){ + //filter (event,player){ // return player.isAlive(); //}, - content:function (){ + content (){ var n=[1,2].randomGet(); if(n==1){ player.addTempSkill("releiji",{player:"phaseUseBegin"}); @@ -13074,11 +13074,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:"damageBefore", }, - filter:function (event,player){ + filter (event,player){ if(!event.nature) return false; return true; }, - content:function (){ + content (){ trigger.cancel(); //event.finish(); }, @@ -13104,10 +13104,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, popup:false, - filter:function (event,player){ + filter (event,player){ return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn()&&event.num>0; }, - content:function (){ + content (){ 'step 0' game.delayx(); 'step 1' @@ -13126,10 +13126,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, silent:true, onremove:true, - filter:function (event,player){ + filter (event,player){ return player.storage.ns_chuanshu2&&player.storage.ns_chuanshu2.isIn(); }, - content:function (){ + content (){ 'step 0' game.delayx(); 'step 1' @@ -13147,13 +13147,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:"phaseUse", usable:1, priority:10, - filter:function (event,player){ + filter (event,player){ return (ui.cardPile.childElementCount+ui.discardPile.childElementCount)>=2; }, - filterTarget:function (card,player,target){ + filterTarget (card,player,target){ return player!=target; }, - content:function (){ + content (){ "step 0" event.cards=get.cards(2); player.showCards(event.cards); @@ -13179,7 +13179,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:0.5, order:13, result:{ - target:function (player,target){ + target (player,target){ return get.damageEffect(target,player); }, }, @@ -13187,7 +13187,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsanruo:{ unique:true, - init:function(player){ + init(player){ if(!player.node.handcards1.cardMod){ player.node.handcards1.cardMod={}; } @@ -13209,7 +13209,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ); } }, - onremove:function(player){ + onremove(player){ player.node.handcards1.classList.remove('nsanruo'); player.node.handcards2.classList.remove('nsanruo'); delete player.node.handcards1.cardMod.nsanruo; @@ -13221,20 +13221,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsxunshan:{ mod:{ - selectTarget:function(card,player,range){ + selectTarget(card,player,range){ if(!player.hasSkill('nsanruo')) return; if(_status.auto) return; if(get.position(card)!='h'||get.owner(card)!=player) return; if(get.info(card).multitarget) return; if(card.name=='sha'||get.type(card)=='trick') range[1]=game.countPlayer(); }, - // playerEnabled:function(card,player,target,current){ + // playerEnabled(card,player,target,current){ // if(current==false) return; // var filter=get.info(card).modTarget; // if(typeof filter=='boolean'&&filter) return 'forceEnable'; // if(typeof filter=='function'&&filter(card,player,target)) return 'forceEnable'; // } - // targetInRange:function(card,player){ + // targetInRange(card,player){ // if(_status.auto) return; // if(get.position(card)!='h'||get.owner(card)!=player) return; // if(get.info(card).multitarget) return; @@ -13250,7 +13250,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, zhuSkill:true, unique:true, - filter:function(event,player){ + filter(event,player){ if(!player.hasZhuSkill('nskaicheng')) return false; if(!player.hasCard(function(card){ if(get.info(card).multitarget) return false; @@ -13262,15 +13262,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return current!=player&¤t.group=='qun'; }); }, - filterCard:function(card){ + filterCard(card){ if(get.info(card).multitarget) return false; return card.name=='sha'||get.type(card)=='trick'; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target&&target.group=='qun'; }, lose:false, - content:function(){ + content(){ 'step 0' target.chooseBool(function(){ return get.attitude(target,player)>0; @@ -13315,18 +13315,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsjuanli:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('h'); }, - filter:function(event,player){ + filter(event,player){ return player.countCards('h'); }, - init:function(player){ + init(player){ player.storage.nsjuanli_win=[]; player.storage.nsjuanli_lose=[]; }, intro:{ - content:function(storage,player){ + content(storage,player){ var str=''; if(player.storage.nsjuanli_win.length){ str+=get.translation(player.storage.nsjuanli_win)+'与你距离-1直到与你下次赌牌'; @@ -13341,7 +13341,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, onremove:['nsjuanli_win','nsjuanli_lose'], - content:function(){ + content(){ 'step 0' player.storage.nsjuanli_win.remove(target); player.storage.nsjuanli_lose.remove(target); @@ -13414,7 +13414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - globalTo:function(from,to,distance){ + globalTo(from,to,distance){ if(to.storage.nsjuanli_win&&to.storage.nsjuanli_win.includes(from)){ return distance-1; } @@ -13426,7 +13426,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:4, result:{ - target:function(player,target){ + target(player,target){ if(target.isHealthy()){ return -1/(1+target.hp); } @@ -13441,18 +13441,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{target:'useCardToBefore'}, forced:true, priority:15, - check:function(event,player){ + check(event,player){ return get.effect(event.target,event.card,event.player,player)<0; }, - filter:function(event,player){ + filter(event,player){ return get.type(event.card,'trick')=='trick'&&get.distance(event.player,player)>1; }, - content:function(){ + content(){ trigger.cancel(); }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.type(card,'trick')=='trick'&&get.distance(player,target)>1) return 'zeroplayertarget'; }, } @@ -13462,7 +13462,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardAfter'}, forced:true, usable:2, - filter:function(event,player){ + filter(event,player){ if(event.parent.name=='nsguhuo') return false; if(event.card==event.cards[0]){ var type=get.type(event.card,'trick'); @@ -13484,7 +13484,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return true; }, - content:function(){ + content(){ var type=get.type(trigger.card,'trick'); var names=[]; var card=get.cardPile(function(card){ @@ -13521,10 +13521,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsbaiyi:{ trigger:{player:'phaseDiscardBefore'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.storage.nsqinxue&&player.storage.nsqinxue.length; }, - content:function(){ + content(){ 'step 0' trigger.cancel(); var num=player.storage.nsqinxue.length; @@ -13565,16 +13565,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsqinxue:{ trigger:{player:'useCard'}, - init:function(player){ + init(player){ player.storage.nsqinxue=[]; }, forced:true, - filter:function(event,player){ + filter(event,player){ var type=get.type(event.card,'trick'); if(player.storage.nsqinxue.includes(type)) return false; return ['basic','trick','equip'].includes(type); }, - content:function(){ + content(){ var type=null; var type0=get.type(trigger.card,'trick'); switch(type0){ @@ -13595,7 +13595,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clear:{ trigger:{global:'phaseAfter'}, silent:true, - content:function(){ + content(){ player.storage.nsqinxue=[]; } } @@ -13603,19 +13603,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsfuge:{ trigger:{player:'phaseAfter'}, - filter:function(event,player){ + filter(event,player){ return !player.storage.nsfuge; }, - init:function(player){ + init(player){ lib.onwash.push(function(){ delete player.storage.nsfuge; }); }, skillAnimation:true, - check:function(event,player){ + check(event,player){ return player.hp==1||player.maxHp-player.hp>=2; }, - content:function(){ + content(){ player.storage.nsfuge=true; player.insertPhase(); }, @@ -13624,11 +13624,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ draw:{ trigger:{player:'phaseDrawBegin'}, silent:true, - filter:function(event,player){ + filter(event,player){ var evt=event.getParent('phase'); return evt&&evt.skill=='nsfuge'; }, - content:function(){ + content(){ trigger.num+=player.maxHp-player.hp; } } @@ -13637,12 +13637,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsbaiming:{ trigger:{player:'useCard'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(player.additionalSkills.nsbaiming) return false; return event.card&&event.card.name=='sha'&&player.storage.nsbaiming&&player.storage.nsbaiming.length>0; }, group:'nsbaiming_clear', - init:function(player){ + init(player){ var check=function(list){ for(var i=0;i0; }, usable:1, selectCard:[1,Infinity], - check:function(card){ + check(card){ var player=_status.event.player; if(player.countCards('h')>=8&&game.hasPlayer(function(current){ return current.isDamaged()&&get.attitude(player,current)>3; @@ -13790,7 +13790,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, discard:false, prepare:'give2', - content:function(){ + content(){ target.gain(cards,player); var num=Math.floor(cards.length/2); if(num>=3){ @@ -13800,13 +13800,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.loseHp(num); } }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player; }, ai:{ order:10, result:{ - target:function(player,target){ + target(player,target){ if(ui.selected.cards.length>=6){ if(target.isDamaged()) return 2; return 1; @@ -13821,11 +13821,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nstanbing:{ trigger:{player:'phaseDrawBegin'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseToDiscard('h',get.prompt2('nstanbing')).set('ai',function(card){ if(!player.needsToDiscard(1)){ @@ -13842,12 +13842,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ sha:{ mod:{ - cardEnabled:function(card,player){ + cardEnabled(card,player){ if(card.name=='sha'){ return false; } }, - cardUsable:function(card,player){ + cardUsable(card,player){ if(card.name=='sha'){ return false; } @@ -13858,11 +13858,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nswangfeng:{ trigger:{global:'judge'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{color:'red'})>0; }, direct:true, - content:function(){ + content(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ get.translation(trigger.player.judging[0])+','+get.prompt('nswangfeng'),'he',function(card){ @@ -13912,12 +13912,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterCard:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target&&!target.hasSkill('nsfuhuo2'); }, prepare:'throw', discard:false, - content:function(){ + content(){ target.$gain2(cards); target.storage.nsfuhuo2=cards[0]; target.addSkill('nsfuhuo2'); @@ -13925,14 +13925,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ui.special.appendChild(cards[0]); target.syncStorage('nsfuhuo2'); }, - check:function(card){ + check(card){ return 6-get.value(card) }, ai:{ expose:0.1, order:4, result:{ - target:function(player,target){ + target(player,target){ if(target.hasSkillTag('maixie')) return 0; return -1; } @@ -13943,7 +13943,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ die:{ trigger:{player:'dieBegin'}, silent:true, - content:function(){ + content(){ for(var i=0;i0; }, - check:function(event,player){ + check(event,player){ if(player.hasShan()||player.hujia>0) return false; var nh=player.countCards('h'); if(player.hp==1){ @@ -14069,7 +14069,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ var cards=player.getCards('h'); player.discard(cards); player.changeHujia(cards.length); @@ -14080,10 +14080,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clear:{ trigger:{player:'phaseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.storage.nsbaquan&&player.hujia>0; }, - content:function(){ + content(){ player.changeHujia(-player.hujia); game.log(player,'失去了所有护甲'); delete player.storage.nsbaquan; @@ -14094,10 +14094,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nschangshi:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.identity=='fan'; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(target==player) return false; if(ui.selected.targets.length){ return target.hp!=ui.selected.targets[0].hp; @@ -14106,7 +14106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, multitarget:true, selectTarget:2, - content:function(){ + content(){ var tmp=targets[0].hp; targets[0].hp=targets[1].hp; targets[1].hp=tmp; @@ -14122,7 +14122,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - target:function(player,target){ + target(player,target){ if(target==game.zhu) return -1; if(get.attitude(player,target)>3){ var num=game.zhu.hp-target.hp; @@ -14143,13 +14143,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsjianning:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.identity=='nei'; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.countCards('h')=8; })&&player.countCards('h')-target.countCards('h')<=1){ @@ -14174,7 +14174,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, nscuanquan:{ - init:function(player){ + init(player){ player.storage.nscuanquan=0; }, forced:true, @@ -14183,7 +14183,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'thunder', trigger:{player:'damageAfter'}, - filter:function(event,player){ + filter(event,player){ return player.identity=='zhong'&&player.storage.nscuanquan==3&&game.zhu&&game.zhu.isZhu; }, group:'nscuanquan_count', @@ -14191,15 +14191,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ count:{ trigger:{player:'damageEnd'}, silent:true, - content:function(){ + content(){ player.storage.nscuanquan++; } } }, - logTarget:function(){ + logTarget(){ return [game.zhu]; }, - content:function(){ + content(){ player.awakenSkill('nscuanquan'); var tmp=player.maxHp; player.identity='zhu'; @@ -14219,14 +14219,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, skillAnimation:true, animationColor:'water', - filter:function(event,player){ + filter(event,player){ return event.player.hp<=0&&event.player!=player; }, logTarget:'player', - check:function(event,player){ + check(event,player){ return get.attitude(player,event.player)>1; }, - content:function(){ + content(){ 'step 0' player.awakenSkill('nstianji'); player.loseMaxHp(); @@ -14246,10 +14246,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterCard:true, - check:function(card){ + check(card){ return 9-get.value(card); }, - filter:function(event,player){ + filter(event,player){ // if(!player.storage.nstuiyan2_done&&player.getStat().skill.nsbugua_use){ // return false; // } @@ -14262,7 +14262,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:1 } }, - content:function(){ + content(){ 'step 0' player.throwDice(); 'step 1' @@ -14332,23 +14332,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nstuiyan:{ trigger:{player:'useCard'}, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase==player&&event.getParent('phaseUse',true)&&!player.hasSkill('nstuiyan_fail')&& typeof player.storage.nstuiyan=='number'&&event.card.number>player.storage.nstuiyan; }, frequent:true, priority:2, - content:function(){ + content(){ player.draw(); }, - onremove:function(player){ + onremove(player){ delete player.storage.nstuiyan; delete player.storage.nstuiyan_done; delete player.storage.nstuiyan2; delete player.storage.nstuiyan2_done; }, intro:{ - mark:function(dialog,content,player){ + mark(dialog,content,player){ if(player.storage.nstuiyan_done){ dialog.addText('推演摸牌已结束'); } @@ -14362,7 +14362,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dialog.addText('总点数:'+player.storage.nstuiyan2); } }, - content:function(storage,player){ + content(storage,player){ var str=''; if(player.storage.nstuiyan_done){ str+='推演摸牌已结束;' @@ -14378,7 +14378,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return str; }, - markcount:function(storage,player){ + markcount(storage,player){ if(player.storage.nstuiyan2_done){ if(player.storage.nstuiyan_done){ return 0; @@ -14397,10 +14397,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ bugua:{ trigger:{player:'useCardAfter'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h'); }, - content:function(){ + content(){ 'step 0' player.removeSkill('nstuiyan_bugua'); player.chooseToDiscard('he','推演:是否发动一次【卜卦】?').set('ai',function(card){ @@ -14416,10 +14416,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard'}, silent:true, priority:-1, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase==player&&event.getParent('phaseUse',true)&&typeof event.card.number=='number'; }, - content:function(){ + content(){ if(typeof player.storage.nstuiyan2!='number'){ player.storage.nstuiyan2=0; } @@ -14440,7 +14440,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clear:{ trigger:{player:['phaseUseAfter','phaseAfter']}, silent:true, - content:function(){ + content(){ delete player.storage.nstuiyan; delete player.storage.nstuiyan_done; delete player.storage.nstuiyan2; @@ -14457,7 +14457,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsshijun:{ trigger:{source:'damageBegin'}, forced:true, - content:function(){ + content(){ trigger.num++; trigger.nsshijun=true; }, @@ -14465,10 +14465,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hp:{ trigger:{source:'damageAfter'}, silent:true, - filter:function(event){ + filter(event){ return event.nsshijun; }, - content:function(){ + content(){ player.loseHp(); } } @@ -14478,7 +14478,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nszhaoxin:{ mark:true, intro:{ - mark:function(dialog,content,player){ + mark(dialog,content,player){ var hs=player.getCards('h'); if(hs.length){ dialog.addSmall(hs); @@ -14487,7 +14487,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dialog.addText('无手牌'); } }, - content:function(content,player){ + content(content,player){ var hs=player.getCards('h'); if(hs.length){ return get.translation(hs); @@ -14500,7 +14500,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsxiuxin:{ mod:{ - targetEnabled:function(card,player,target){ + targetEnabled(card,player,target){ var suit=get.suit(card); if(suit&&!target.countCards('h',{suit:suit})){ return false; @@ -14512,21 +14512,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, global:'nscangxi2', zhuSkill:true, - init:function(player){ + init(player){ player.storage.nscangxi=0; }, intro:{ content:'手牌上限+#' }, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.storage.nscangxi; } } }, nscangxi2:{ trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ + filter(event,player){ if(!event.cards||event.cards.length<=1) return false; if(player.group!='wu') return false; return game.hasPlayer(function(target){ @@ -14534,7 +14534,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, direct:true, - content:function(){ + content(){ 'step 0' var list=game.filterPlayer(function(current){ return current!=player&¤t.hasZhuSkill('nscangxi',player); @@ -14621,13 +14621,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'metal', unique:true, - check:function(){ + check(){ return false; }, - filter:function(event,player){ + filter(event,player){ return ui.discardPile.childElementCount>0; }, - content:function(){ + content(){ 'step 0' player.awakenSkill('nswulie'); player.loseMaxHp(); @@ -14645,13 +14645,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ end:{ trigger:{player:'phaseEnd'}, - check:function(){ + check(){ return false; }, - filter:function(event,player){ + filter(event,player){ return ui.discardPile.childElementCount>0; }, - content:function(){ + content(){ 'step 0' player.loseMaxHp(); 'step 1' @@ -14671,10 +14671,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterCard:{type:'basic'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('h',{type:'basic'}); }, - content:function(){ + content(){ 'step 0' var equip=null, trick=null; for(var i=0;i0){ return game.hasPlayer(function(current){ return current.hp>player.hp; @@ -14751,7 +14751,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' player.chooseTarget('恭俭:将置的牌交给一名体力值大于你的角色',function(card,player,target){ return target.hp>player.hp; @@ -14768,11 +14768,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nscaijian:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ var nh=player.countCards('h'); return nh&&nh<=player.maxHp; }, - content:function(){ + content(){ 'step 0' player.showHandcards(); event.num=player.countCards('h'); @@ -14811,7 +14811,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'damageBefore'}, forced:true, priority:15, - filter:function(event,player){ + filter(event,player){ if(get.type(event.card,'trick')=='trick'){ if(event.getParent(2).name=='useCard'){ return event.getParent(2).targets.length==1; @@ -14820,13 +14820,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ trigger.cancel(); }, ai:{ notrick:true, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.type(card)=='trick'&&get.tag(card,'damage')&&!get.tag(card,'multitarget')){ return 'zeroplayertarget'; } @@ -14838,10 +14838,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ cancel:{ trigger:{target:'useCardToAfter'}, silent:true, - filter:function(event,player){ + filter(event,player){ return get.type(event.card,'trick')=='trick'&&_status.currentPhase==event.player&&event.player!=player; }, - content:function(){ + content(){ player.addTempSkill('nsdongcha_disable'); } }, @@ -14850,15 +14850,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, priority:15, onremove:true, - filter:function(event,player){ + filter(event,player){ return (event.player==_status.currentPhase&&get.type(event.card,'trick')=='trick'); }, - content:function(){ + content(){ trigger.cancel(); }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.type(card,'trick')=='trick'&&_status.currentPhase==player) return 'zeroplayertarget'; } } @@ -14869,7 +14869,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsjianxiong:{ trigger:{target:'useCardToBefore'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseToUse(function(card){ return !get.info(card).multitarget; @@ -14886,10 +14886,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ damage:{ trigger:{source:'damageAfter'}, silent:true, - filter:function(event,player){ + filter(event,player){ return event.getParent(4).name=='nsjianxiong'; }, - content:function(){ + content(){ trigger.getParent(4).damaged=true; } } @@ -14897,7 +14897,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'nsjianxiong_damage', ai:{ effect:{ - player:function(card,player,target){ + player(card,player,target){ if(_status.currentPhase!=player) return; if(get.tag(card,'damage')&&!player.needsToDiscard(1)&&target.hp>1){ return 'zeroplayertarget'; @@ -14909,14 +14909,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsxionglue:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h',{color:'black'}); }, - check:function(card){ + check(card){ return 7-get.value(card); }, filterCard:{color:'black'}, - content:function(){ + content(){ 'step 0' var list=get.inpile('trick'); list=list.randomGets(3); @@ -14943,7 +14943,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nshuanhuo:{ trigger:{player:['loseHpAfter','damageAfter']}, - filter:function(event,player){ + filter(event,player){ if(game.countPlayer(function(current){ return current!=player&&!current.isUnseen(2); })<2) return false; @@ -14953,7 +14953,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, skillAnimation:true, animationColor:'thunder', - content:function(){ + content(){ 'step 0' player.chooseTarget(2,get.prompt2('nshuanhuo'),function(card,player,target){ return target!=player&&!target.isUnseen(2); @@ -14988,7 +14988,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsyaowang:{ trigger:{player:'phaseBegin'}, direct:true, - createDialog:function(player,target,onlylist){ + createDialog(player,target,onlylist){ var names=[]; var list=[]; if(target.name1&&!target.isUnseen(0)) names.add(target.name1); @@ -15033,7 +15033,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dialog.add(ui.create.div('.placeholder')); return dialog; }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('nsyaowang'),function(card,player,target){ var names=[]; @@ -15113,11 +15113,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsjianshu:{ trigger:{player:'shaBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return !event.directHit&&player.getEquip(1); }, priority:-1, - content:function(){ + content(){ if(typeof trigger.shanRequired=='number'){ trigger.shanRequired++; } @@ -15129,23 +15129,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nscangjian:{ trigger:{source:'damageEnd'}, direct:true, - filter:function(event){ + filter(event){ return event.player.isIn()&&event.player.countCards('e'); }, - content:function(){ + content(){ player.gainPlayerCard(trigger.player,'e',get.prompt('nscangjian',trigger.player)).logSkill=['nscangjian',trigger.player]; } }, nsyunxing:{ trigger:{global:'dieAfter'}, forced:true, - check:function(event,player){ + check(event,player){ return event.player.group=='wei'||(event.player.group=='wu'&&player.hp==1); }, - filter:function(event,player){ + filter(event,player){ return ['wei','shu','wu','qun'].includes(event.player.group); }, - content:function(){ + content(){ 'step 0' switch(trigger.player.group){ case 'wei':player.draw();break; @@ -15187,7 +15187,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ self:{ trigger:{player:'dieBegin'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('nsyunxing'),function(card,player,target){ return target!=player; @@ -15217,10 +15217,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsguanxing:{ trigger:{player:'phaseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.hp>0; }, - content:function(){ + content(){ 'step 0' event.cards=get.cards(game.countPlayer()); event.chosen=[]; @@ -15305,10 +15305,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, limited:true, enable:'phaseUse', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player; }, - content:function(){ + content(){ "step 0" player.awakenSkill('nshaoling'); event.targets=game.filterPlayer(); @@ -15348,7 +15348,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:5, result:{ - target:function(player,target){ + target(player,target){ var players=game.filterPlayer(); if(player.hp>1){ if(game.phaseNumber0; }, threaten:1.5, @@ -15385,17 +15385,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nscaiyi:{ trigger:{global:'drawAfter'}, - check:function(event,player){ + check(event,player){ if(get.attitude(player,event.player)>=0) return false; if(get.effect(event.player,{name:'sha'},player,player)<=0) return false; if(get.effect(player,{name:'sha'},event.player,player)>=0) return true; return player.hasShan()&&player.hp>=event.player.hp; }, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&Array.isArray(event.result)&&event.result.length>0; }, logTarget:'player', - content:function(){ + content(){ 'step 0' player.viewCards(get.translation(trigger.player)+'摸到的牌',trigger.result); if(!event.isMine()){ @@ -15419,10 +15419,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nspinmin:{ trigger:{player:'dieBefore'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.maxHp>0; }, - content:function(){ + content(){ trigger.cancel(); player.hp=1; player.update(); @@ -15447,14 +15447,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsshishou:{ trigger:{player:'loseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(_status.currentPhase!=player) return false; for(var i=0;i=4){ return false; @@ -15475,7 +15475,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'save')){ if(_status.currentPhase==player) return 0; if(target.maxHp>1&&player!=target) return 0; @@ -15490,10 +15490,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsduijue:{ trigger:{player:'phaseUseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h'); }, - content:function(){ + content(){ "step 0" var color={ black:player.countCards('h',function(card){ @@ -15522,16 +15522,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', viewAs:{name:'juedou'}, usable:2, - filter:function(event,player){ + filter(event,player){ return player.hasCard(function(card){ return get.color(card)!=player.storage.nsduijue_use; },'hs'); }, position:'hs', - filterCard:function(card,player){ + filterCard(card,player){ return get.color(card)!=player.storage.nsduijue_use; }, - check:function(card){ + check(card){ return 8-get.value(card); }, ai:{ @@ -15544,10 +15544,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsshuangxiong:{ trigger:{player:'juedouBegin',target:'juedouBegin'}, - check:function(event,player){ + check(event,player){ return player.isTurnedOver(); }, - content:function(){ + content(){ player.turnOver(); } }, @@ -15555,15 +15555,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'chooseToRespond', filterCard:true, viewAs:{name:'sha'}, - viewAsFilter:function(player){ + viewAsFilter(player){ if(!player.countCards('hs')) return false; }, position:'hs', prompt:'将一张手牌当杀打出', - check:function(card){return 7-get.value(card)}, + check(card){return 7-get.value(card)}, ai:{ respondSha:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(arg!='respond') return false; if(!player.countCards('hs')) return false; }, @@ -15571,10 +15571,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsjihui:{ trigger:{global:'discardAfter'}, - filter:function(event,player){ + filter(event,player){ return event.cards.length>=3; }, - content:function(){ + content(){ player.insertPhase(); player.storage.nsjihui_use=_status.currentPhase; player.addSkill('nsjihui_use'); @@ -15588,15 +15588,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseAfter'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.skill=='nsjihui'; }, onremove:true, - content:function(){ + content(){ player.removeSkill('nsjihui_use'); }, mod:{ - playerEnabled:function(card,player,target){ + playerEnabled(card,player,target){ if(player!=target&&player.storage.nsjihui_use!=target) return false; } } @@ -15606,10 +15606,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsmouyun:{ enable:'phaseUse', round:2, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.isMinHp()&&target!=player&&target.isDamaged(); }, - content:function(){ + content(){ if(target.isDamaged()){ player.discardPlayerCard(target,'hej',target.maxHp-target.hp,true); } @@ -15617,7 +15617,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - target:function(player,target){ + target(player,target){ return target.hp-target.maxHp; } } @@ -15627,7 +15627,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forbid:['guozhan'], unique:true, forceunique:true, - init:function(player){ + init(player){ if(player.storage.nscongjun_show) return false; var change=function(target){ if(target==player){ @@ -15659,13 +15659,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ show:{ trigger:{global:'useCard'}, - filter:function(event,player){ + filter(event,player){ return player.getEnemies().includes(event.player)&&event.card.name=='wuxie'&&event.getRand()<0.1; }, direct:true, skillAnimation:true, animationColor:'thunder', - content:function(){ + content(){ 'step 0' game.delay(0.5); 'step 1' @@ -15681,7 +15681,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nstaiping_nh:{ trigger:{player:'damageEnd'}, - filter:function(event,player){ + filter(event,player){ return !event.nshuanxian&&player.getSubPlayers('nshuanxian').length; }, direct:true, @@ -15690,7 +15690,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ maixie:true, maixie_hp:true }, - content:function(){ + content(){ 'step 0' event.num=trigger.num; 'step 1' @@ -15761,7 +15761,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gain:{ trigger:{player:'subPlayerDie'}, forced:true, - filter:function(event,player){ + filter(event,player){ var left=player.storage.nshuanxian_left; if(left&&player.hasSkill(left)) return false; var right=player.storage.nshuanxian_right; @@ -15769,7 +15769,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!player.storage.nshuanxian_damage) return false; return true; }, - content:function(){ + content(){ player.addSkill('releiji'); player.addSkill('guidao'); } @@ -15777,7 +15777,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ die:{ trigger:{player:'dieBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(game.countPlayer()<=2) return false; var left=player.storage.nshuanxian_left; if(left&&player.hasSkill(left)) return true; @@ -15785,7 +15785,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(right&&player.hasSkill(right)) return true; return false; }, - content:function(){ + content(){ 'step 0' var str; var left=player.storage.nshuanxian_left; @@ -15837,7 +15837,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nosub:true, unique:true, group:['nshuanxian_left','nshuanxian_right','nshuanxian_damage','nshuanxian_swap','nshuanxian_draw'], - content:function(){ + content(){ player.storage.nshuanxian_right=player.addSubPlayer({ name:'ns_nanhua_right', skills:['nshuanxian_left','nshuanxian_draw','nshuanxian_swap'], @@ -15847,14 +15847,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skill:'nshuanxian', intro:'你的本体回合结束后,切换至此随从并进行一个额外的回合;若你的上家与下家不同,在你的下家的准备阶段,切换至此随从', intro2:'当前回合结束后切换回本体', - onremove:function(player){ + onremove(player){ delete player.storage.nshuanxian_right; } }); }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')){ if(!target.hasFriend()) return; if(target.hp<=2) return; @@ -15867,10 +15867,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, // mod:{ - // globalFrom:function(from,to,distance){ + // globalFrom(from,to,distance){ // // }, - // globalTo:function(from,to,distance){ + // globalTo(from,to,distance){ // // } // }, @@ -15879,17 +15879,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chosen:{}, leftdist:{ mod:{ - globalFrom:function(from,to,distance){ + globalFrom(from,to,distance){ }, - globalTo:function(from,to,distance){ + globalTo(from,to,distance){ } } }, rightdist:{ mod:{ - globalFrom:function(from,to,distance){ + globalFrom(from,to,distance){ }, - globalTo:function(from,to,distance){ + globalTo(from,to,distance){ } } }, @@ -15897,11 +15897,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseBegin'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.player!=player; }, priority:20, - content:function(){ + content(){ var next=player.getNext(); var prev=player.getPrevious(); var left=player.storage.nshuanxian_left; @@ -15932,10 +15932,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ damage:{ trigger:{player:'damageEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return !player.storage.nshuanxian_damage; }, - content:function(){ + content(){ player.storage.nshuanxian_damage=true; player.storage.nshuanxian_left=player.addSubPlayer({ name:'ns_nanhua_left', @@ -15946,7 +15946,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skill:'nshuanxian', intro:'你的本体回合开始前,切换至此随从并进行一个额外的回合;若你的上家与下家不同,在你的上家的准备阶段,切换至此随从', intro2:'当前回合结束后切换回本体', - onremove:function(player){ + onremove(player){ delete player.storage.nshuanxian_left; } }); @@ -15956,10 +15956,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ draw:{ trigger:{player:'phaseDrawBegin'}, silent:true, - filter:function(event){ + filter(event){ return event.num>0; }, - content:function(){ + content(){ trigger.num--; } }, @@ -15968,7 +15968,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, priority:40, - filter:function(event,player){ + filter(event,player){ if(event.skill=='nshuanxian_middle') return false; if(event.skill=='nshuanxian_right') return false; var left=player.storage.nshuanxian_left; @@ -15981,7 +15981,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.hasSkill(left); } }, - content:function(){ + content(){ if(player.hasSkill('subplayer')){ var left=player.storage.nshuanxian_left; if(left&&player.storage.subplayer.skills.includes(left)){ @@ -16001,11 +16001,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, priority:-40, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('nshuanxian_chosen')) return false; return true; }, - content:function(){ + content(){ player.exitSubPlayer(); player.insertPhase(null,true); } @@ -16015,14 +16015,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, priority:-40, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('nshuanxian_chosen')) return false; if(player.hasSkill('subplayer')) return false; var right=player.storage.nshuanxian_right; if(!right) return false; return player.hasSkill(right); }, - content:function(){ + content(){ player.callSubPlayer(player.storage.nshuanxian_right); player.insertPhase(null,true); player.addTempSkill('nshuanxian_chosen',['phaseBegin','phaseCancelled']); @@ -16033,16 +16033,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, priority:-40, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('nshuanxian_chosen')) return false; return true; }, - content:function(){ + content(){ if(player.hasSkill('subplayer')){ player.exitSubPlayer(); } }, - content_old:function(){ + content_old(){ 'step 0' var controls=['本体']; var left=player.storage.nshuanxian_left; @@ -16103,18 +16103,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsnongquan:{ enable:'phaseUse', // usable:4, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')==1&&player.canUse('wuzhong',player); }, direct:true, delay:0, - content:function(){ + content(){ player.useCard({name:'wuzhong'},player.getCards('h'),player,'nsnongquan'); }, ai:{ order:10, result:{ - player:function(player,target){ + player(player,target){ return 10-get.value(player.getCards('h')[0]); } } @@ -16122,11 +16122,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsdufu:{ trigger:{source:'damageBefore'}, - check:function(event,player){ + check(event,player){ return event.player.hasSkillTag('maixie'); }, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('nsdufu'),function(card,player,target){ return target!=player; @@ -16146,13 +16146,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yiesheng:{ enable:'phaseUse', filterCard:{color:'black'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('h',{color:'black'})>0; }, selectCard:[1,Infinity], prompt:'弃置任意张黑色手牌并摸等量的牌', - check:function(card){return 5-get.value(card)}, - content:function(){ + check(card){return 5-get.value(card)}, + content(){ player.draw(cards.length); }, ai:{ @@ -16166,10 +16166,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:["liangji",2], enable:"phaseUse", usable:1, - filterTarget:function (card,player,target){ + filterTarget (card,player,target){ return target!=player&&!target.hasSkill('liangji_1'); }, - content:function (){ + content (){ 'step 0' player.chooseCard('h','环计:将一张牌置于'+get.translation(target)+'的武将牌上',true).set('ai',function(card){ if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ @@ -16190,7 +16190,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - target:function (player,target){ + target (player,target){ if(get.attitude(player,target)>0){ return Math.sqrt(target.countCards('he')); } @@ -16209,7 +16209,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:"cards", }, - content:function (){ + content (){ 'step 0' var cards=player.storage.liangji_1; if(cards){ @@ -16235,14 +16235,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ locked:false, notemp:true, marktext:"功", - init:function (player){ + init (player){ player.storage.jugong=[]; }, - filter:function (event,player){ + filter (event,player){ return event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.notLink() &&_status.currentPhase!=player; }, - content:function (){ + content (){ "step 0" player.draw(); "step 1" @@ -16270,10 +16270,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:"damageBegin", }, - filter:function (event,player){ + filter (event,player){ return player.storage.jugong.length>1; }, - content:function (){ + content (){ "step 0" player.chooseCardButton('移去两张“功”',2,player.storage.jugong,true); "step 1" @@ -16304,7 +16304,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function (card,player,target){ + target (card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; if(!target.hasFriend()) return; @@ -16323,10 +16323,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"phaseDrawBegin", }, frequent:true, - filter:function (event,player){ + filter (event,player){ return player.storage.jugong.length>0; }, - content:function (){ + content (){ 'step 0' if(player.storage.jugong.length>2) player.loseHp(); 'step 1' @@ -16342,20 +16342,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsxinsheng:{ trigger:{source:'damageEnd'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.isHealthy(); }, - content:function(){ + content(){ player.gainMaxHp(trigger.num,true); player.draw(trigger.num); } }, nsdunxing:{ trigger:{player:'damageBefore'}, - filter:function(event,player){ + filter(event,player){ return player.isDamaged(); }, - content:function(){ + content(){ trigger.cancel(); player.loseMaxHp(trigger.num,true); player.draw(trigger.num); @@ -16367,10 +16367,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filterCard:{type:'basic'}, position:'hs', - filter:function(event,player){ + filter(event,player){ return player.countCards('hs',{type:'basic'})>0; }, - check:function(card){ + check(card){ return 6-get.value(card); }, group:'liangce2' @@ -16378,10 +16378,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liangce2:{ trigger:{global:'wuguRemained'}, direct:true, - filter:function(event){ + filter(event){ return event.remained.filterInD().length>0; }, - content:function(){ + content(){ 'step 0' var du=0; for(var i=0;iplayer.hasCard(card=>lib.skill.diyjuntun.filterCard(card,player),'he'), position:'he', filterCard:(card,player)=>get.type(card)=='equip'&&player.canRecast(card), - check:function(card){ + check(card){ var player=_status.event.player; var he=player.getCards('he'); var subtype=get.subtype(card); @@ -16481,7 +16481,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 0; }, - content:function(){ + content(){ player.recast(cards); }, discard:false, @@ -16502,13 +16502,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filterCard:true, position:'he', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return lib.filter.cardEnabled({name:'diaobingqianjiang'},target); }, - check:function(card){ + check(card){ return 6-get.value(card); }, - content:function(){ + content(){ var list=game.filterPlayer(); list.sortBySeat(target); target.useCard({name:'diaobingqianjiang'},list); @@ -16516,7 +16516,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - player:function(player,target){ + player(player,target){ if(get.attitude(player,target)<=1) return 0; return game.countPlayer(function(current){ return get.effect(current,{name:'diaobingqianjiang'},target,player); @@ -16527,14 +16527,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, liduan:{ trigger:{global:'gainAfter'}, - filter:function(event,player){ + filter(event,player){ if(event.player==player) return false; if(_status.currentPhase==event.player) return false; if(event.cards.length!=1) return false; return get.type(event.cards[0])=='equip'&&get.position(event.cards[0])=='h'&&event.player.hasUseTarget(event.cards[0]); }, logTarget:'player', - check:function(event,player){ + check(event,player){ var att=get.attitude(player,event.player); var subtype=get.subtype(event.cards[0]); if(att>0){ @@ -16545,7 +16545,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.player.countCards('e',{subtype:subtype})>0; } }, - content:function(){ + content(){ 'step 0' var bool=false; var subtype=get.subtype(trigger.cards[0]); @@ -16587,24 +16587,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jinyan:{ mod:{ - cardEnabled:function(card,player){ + cardEnabled(card,player){ if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; }, - cardUsable:function(card,player){ + cardUsable(card,player){ if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; }, - cardRespondable:function(card,player){ + cardRespondable(card,player){ if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; }, - cardSavable:function(card,player){ + cardSavable(card,player){ if(_status.event.skill!='jinyan'&&player.hp<=2&&get.type(card,'trick')=='trick'&&get.color(card)=='black') return false; }, }, enable:['chooseToUse','chooseToRespond'], - filterCard:function(card){ + filterCard(card){ return get.type(card,'trick')=='trick'&&get.color(card)=='black'; }, - viewAsFilter:function(player){ + viewAsFilter(player){ if(player.hp>2) return false; if(!player.hasCard(function(card){ return get.type(card,'trick')=='trick'&&get.color(card)=='black'; @@ -16612,10 +16612,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, viewAs:{name:'sha'}, prompt:'将一张黑色锦囊牌当作杀使用或打出', - check:function(){return 1}, + check(){return 1}, ai:{ respondSha:true, - skillTagFilter:function(player){ + skillTagFilter(player){ if(player.hp>2) return false; if(!player.hasCard(function(card){ return get.type(card,'trick')=='trick'&&get.color(card)=='black'; @@ -16625,11 +16625,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, fuchou:{ trigger:{target:'shaBefore'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0; }, direct:true, - content:function(){ + content(){ 'step 0' var bool=false; if(!player.hasShan()&&get.effect(player,trigger.card,trigger.player,player)<0){ @@ -16663,18 +16663,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'fuchou2' }, fuchou2:{ - init:function(player){ + init(player){ player.storage.fuchou2=[]; }, forced:true, trigger:{global:'phaseAfter'}, - filter:function(event,player){ + filter(event,player){ for(var i=0;i0); var next=player.chooseToDiscard('he',{type:'equip'},get.prompt('youzhan',trigger.target)); @@ -16739,10 +16739,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kangyin:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('he')>0; }, - content:function(){ + content(){ 'step 0' player.loseHp(); 'step 1' @@ -16774,7 +16774,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:7, result:{ - target:function(player,target){ + target(player,target){ if(player.hp>=4) return -1; if(player.hp==3&&!player.needsToDiscard()) return -1; return 0; @@ -16789,17 +16789,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, onremove:true, mod:{ - globalFrom:function(from,to,distance){ + globalFrom(from,to,distance){ return distance-from.storage.kangyin2; }, - selectTarget:function(card,player,range){ + selectTarget(card,player,range){ if(card.name=='sha'&&range[1]!=-1) range[1]+=player.storage.kangyin2; }, } }, duoqi:{ trigger:{global:'discardAfter'}, - filter:function(event,player){ + filter(event,player){ if(_status.currentPhase==player) return false; if(!player.storage.zhucheng||!player.storage.zhucheng.length) return false; var evt=event.getParent('phaseUse'); @@ -16807,7 +16807,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, direct:true, - content:function(){ + content(){ 'step 0' var bool=false; if(get.attitude(player,trigger.player)<0&&trigger.player.needsToDiscard()){ @@ -16841,10 +16841,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, zhucheng:{ trigger:{player:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ return !player.storage.zhucheng||!player.storage.zhucheng.length; }, - check:function(event,player){ + check(event,player){ if(player.storage.zhucheng&&player.storage.zhucheng.length){ if(!player.hasShan()) return false; if(player.storage.zhucheng.length>=2) return false; @@ -16854,7 +16854,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'cards' }, - content:function(){ + content(){ if(player.storage.zhucheng&&player.storage.zhucheng.length){ player.gain(player.storage.zhucheng,'gain2'); delete player.storage.zhucheng; @@ -16868,7 +16868,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(card.name=='sha'&&player.storage.zhucheng&&player.storage.zhucheng.length){ if(player.storage.zhucheng.length>=2){ if(!player.hasFriend()&&player.countCards('he')-20; }, - content:function(){ + content(){ 'step 0' var bool=false; if(get.effect(player,trigger.card,trigger.player,trigger.player)>=0){ @@ -16925,25 +16925,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diy_jiaoxia:{ //audio:['jiaoxia',2], trigger:{target:'useCardToBegin'}, - filter:function(event,player){ + filter(event,player){ return event.card&&get.color(event.card)=='red'; }, frequent:true, - content:function(){ + content(){ player.draw(); }, ai:{ - effect:function(card,player,target){ + effect(card,player,target){ if(get.color(card)=='red') return [1,1]; }, } }, zaiqix:{ trigger:{player:'phaseDrawBefore'}, - filter:function(event,player){ + filter(event,player){ return player.hp1){ player.draw(trigger.num); } @@ -17045,7 +17045,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, discard:false, - filter:function(event,player){ + filter(event,player){ var cards=player.getCards('he',{color:'black'}); for(var i=0;i0) return false; }, save:true, result:{ player:4, - target:function(player,target){ + target(player,target){ if(target.hp==target.maxHp) return 2; return 4; } }, - threaten:function(player,target){ + threaten(player,target){ if(!target.storage.guihan) return 0.8; } } @@ -17137,24 +17137,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ luweiyan:{ enable:'phaseUse', usable:1, - filterCard:function(card){ + filterCard(card){ return get.type(card)!='basic'; }, position:'hse', - filter:function(event,player){ + filter(event,player){ return player.hasCard(function(card){ return get.type(card)!='basic'; },'hes'); }, viewAs:{name:'shuiyanqijun'}, prompt:'将一张非基本牌当水淹七军使用', - check:function(card){return 8-get.value(card)}, + check(card){return 8-get.value(card)}, group:'luweiyan2' }, luweiyan2:{ trigger:{player:'useCardAfter'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.skill!='luweiyan') return false; for(var i=0;i0; }, - content:function(){ + content(){ trigger.source.discard(trigger.source.getCards('he',{color:'red'})); }, ai:{ expose:0.1, result:{ threaten:0.8, - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')&&get.attitude(target,player)<0){ return [1,0,0,-player.countCards('he',{color:'red'})]; } @@ -17213,10 +17213,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diyguhuo:{ trigger:{player:'phaseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('hej')>0; }, - content:function(){ + content(){ "step 0" player.draw(2); "step 1" @@ -17231,7 +17231,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card){ + target(card){ if(get.type(card)=='delay') return [0,0.5]; } } @@ -17240,18 +17240,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diychanyuan:{ trigger:{player:'dieBegin'}, forced:true, - filter:function(event){ + filter(event){ return event.source!=undefined; }, - content:function(){ + content(){ trigger.source.loseMaxHp(true); }, ai:{ - threaten:function(player,target){ + threaten(player,target){ if(target.hp==1) return 0.2; }, result:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(target.hp<=1&&get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return [1,-5]; return [1,0,0,-2]; @@ -17264,10 +17264,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageBefore'}, direct:true, priority:10, - filter:function(event){ + filter(event){ return event.nature!='fire'; }, - content:function(){ + content(){ "step 0" player.chooseToDiscard(get.prompt('zonghuo')).ai=function(card){ var att=get.attitude(player,trigger.player); @@ -17290,10 +17290,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shaoying:{ trigger:{source:'damageAfter'}, direct:true, - filter:function(event){ + filter(event){ return event.nature=='fire'; }, - content:function(){ + content(){ "step 0" player.chooseTarget(get.prompt('shaoying'),function(card,player,target){ return get.distance(trigger.player,target)<=1&&trigger.player!=target; @@ -17322,16 +17322,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tiangong:{ group:['tiangong2'], trigger:{player:'damageBefore'}, - filter:function(event){ + filter(event){ if(event.nature=='thunder') return true; }, forced:true, - content:function(){ + content(){ trigger.cancel(); }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(card.name=='tiesuo') return 0; if(get.tag(card,'thunderDamage')) return 0; } @@ -17341,13 +17341,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, tiangong2:{ trigger:{source:'damageAfter'}, - filter:function(event){ + filter(event){ if(event.nature=='thunder') return true; }, forced:true, popup:false, priority:1, - content:function(){ + content(){ player.draw(); }, }, @@ -17358,10 +17358,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mode:['identity'], trigger:{global:'dieBefore'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.player!=game.zhu&&_status.currentPhase==player; }, - content:function(){ + content(){ trigger.player.identity='fan'; trigger.player.setIdentity('fan'); trigger.player.identityShown=true; @@ -17369,11 +17369,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nsshuaiyan:{ trigger:{global:'recoverAfter'}, - filter:function(event,player){ + filter(event,player){ return event.player!=player&&_status.currentPhase!=player; }, logTarget:'player', - content:function(){ + content(){ "step 0" var att=get.attitude(trigger.player,player); var bool=0; @@ -17405,7 +17405,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, moshou:{ mod:{ - targetEnabled:function(card,player,target,now){ + targetEnabled(card,player,target,now){ if(card.name=='bingliang'||card.name=='lebu') return false; } }, @@ -17413,7 +17413,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ siji:{ trigger:{player:'phaseDiscardEnd'}, frequent:true, - filter:function(event,player){ + filter(event,player){ if(event.cards){ for(var i=0;i=trigger.player.hp){ @@ -17445,7 +17445,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - player:function(card,player,target){ + player(card,player,target){ if(card.name=='sha'&&target.isHealthy()&&get.attitude(player,target)>0){ return [1,-2]; } @@ -17458,34 +17458,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, silent:true, firstDo:true, - content:function(){ + content(){ player.die(); }, popup:false, }, juedao:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.isLinked()==false; }, filterCard:true, - check:function(card){ + check(card){ return 6-get.value(card); }, - content:function(){ + content(){ if(player.isLinked()==false) player.link(); }, ai:{ link:true, order:2, result:{ - player:function(player){ + player(player){ if(player.isLinked()) return 0; return 1; }, }, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(card.name=='tiesuo'){ if(target.isLinked()){ return [0,-0.5]; @@ -17498,10 +17498,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - globalFrom:function(from,to,distance){ + globalFrom(from,to,distance){ if(from.isLinked()) return distance+1; }, - globalTo:function(from,to,distance){ + globalTo(from,to,distance){ if(to.isLinked()) return distance+1; }, } @@ -17509,7 +17509,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ geju:{ trigger:{player:'phaseBegin'}, frequent:true, - filter:function(event,player){ + filter(event,player){ var list=[]; var players=game.filterPlayer(); for(var i=0;i0; }, - content:function(){ + content(){ var list=[]; var players=game.filterPlayer(); for(var i=0;i=target.hp) return -0.9; if(player.hp<=2) return -10; return -2; }, - target:function(player,target){ + target(player,target){ if(player.hp<=1) return 0; return get.damageEffect(target,player); } @@ -17589,10 +17589,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsdingzhou:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('hej')>0; }, - content:function(){ + content(){ 'step 0' var cards=target.getCards('hej'); if(get.isLuckyStar(player)){ @@ -17622,12 +17622,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseBegin'}, forced:true, keepSkill:true, - filter:function(event,player){ + filter(event,player){ return player.hasCard(function(card){ return lib.filter.cardDiscardable(card,player,'junkyuheng'); },'he'); }, - content:function(){ + content(){ 'step 0' player.chooseToDiscard('he',true,[1,4],function(card,player){ if(!ui.selected.cards.length) return true; @@ -17654,10 +17654,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'yuheng', trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.additionalSkills.junkyuheng&&player.additionalSkills.junkyuheng.length>0; }, - content:function(){ + content(){ player.draw(player.additionalSkills.junkyuheng.length); game.log(player,'失去了以下技能:','#g'+get.translation(player.additionalSkills.junkyuheng)); player.removeAdditionalSkill('junkyuheng'); @@ -17672,7 +17672,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'wood', - filter:function(event,player){ + filter(event,player){ if(event.skill!='junkyuheng') return false; var skills=player.getSkills(null,false,false).filter(function(i){ var info=get.info(i); @@ -17680,7 +17680,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return skills.length>player.maxHp; }, - content:function(){ + content(){ 'step 0' player.awakenSkill('junkdili'); player.loseMaxHp(); @@ -17741,14 +17741,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'dili_shengzhi', trigger:{player:['logSkill','useSkillAfter']}, forced:true, - filter:function(event,player){ + filter(event,player){ if(event.type!='player') return false; var skill=event.sourceSkill||event.skill; if(get.is.locked(skill)) return false; var info=get.info(skill); return !info.charlotte; }, - content:function(){ + content(){ player.addTempSkill('junkshengzhi_effect'); }, subSkill:{ @@ -17762,7 +17762,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, popup:false, firstDo:true, - content:function(){ + content(){ if(trigger.addCount!==false){ trigger.addCount=false; player.getStat().card[trigger.card.name]--; @@ -17778,10 +17778,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'dili_quandao', trigger:{player:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'||get.type(event.card,null,false)=='trick'; }, - content:function(){ + content(){ 'step 0' var filter1=function(card){ return get.name(card)=='sha'; @@ -17804,7 +17804,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhuanhuanji:true, mark:true, marktext:'☯', - content:function(){ + content(){ player.changeZhuanhuanji('junkchigang'); trigger.cancel(); var next=player[player.storage.junkchigang?'phaseDraw':'phaseUse'](); @@ -17813,13 +17813,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.type(card)=='delay') return 'zerotarget'; }, }, }, intro:{ - content:function(storage){ + content(storage){ return '转换技,锁定技。判定阶段开始前,你取消此阶段。然后你获得一个额外的'+(storage?'出牌阶段':'摸牌阶段')+'。' }, }, @@ -17828,7 +17828,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'dcmanzhi', trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, direct:true, - filter:function(event,player){ + filter(event,player){ var nums=[]; game.countPlayer(current=>{ nums.add(current.hp); @@ -17844,7 +17844,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' var nums=[]; game.countPlayer(current=>{ @@ -17916,46 +17916,46 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, dynamicTranslate:{ - nsjiquan:function(player){ + nsjiquan(player){ if(player.storage.nsfuwei) return '锁定技,与你距离1以内的其他角色造成或受到伤害后,你将其区域内的一张牌置于你的武将牌上(称为“威”)。你使用【杀】的次数上限+X(X为“威”数)。'; return '与你距离1以内的其他角色造成或受到伤害后,你可以将其区域内的一张牌置于你的武将牌上(称为“威”)。你使用【杀】的次数上限+X(X为“威”数)。'; }, - abyusa_jueqing:function(player){ + abyusa_jueqing(player){ if(player.storage.abyusa_jueqing_rewrite) return '锁定技,你即将造成的伤害均视为失去体力。'; return '当你对其他角色造成伤害时,你可以令此伤害值+X。若如此做,你失去X点体力,并于此伤害结算完成后修改〖绝情〗(X为伤害值)。'; }, - tomoya_shangxian:function(player){ + tomoya_shangxian(player){ if(player.storage.tomoya_shangxian) return '锁定技,你计算与其他角色的距离时始终从顺时针方向计算。出牌阶段开始时,你可摸一张牌,并改变此方向。'; return '锁定技,你计算与其他角色的距离时始终从逆时针方向计算。出牌阶段开始时,你可摸一张牌,并改变此方向。'; }, - yui_lieyin:function(player){ + yui_lieyin(player){ if(player.storage._ichiban_no_takaramono) return '锁定技,出牌阶段开始时,你可选择一项:①本阶段内的红色牌均视为【杀】;②本阶段内的【杀】均视为【决斗】。'; return '锁定技,出牌阶段开始时,你选择一项:①本阶段内的红色牌均视为【杀】;②本阶段内的【杀】均视为【决斗】。'; }, - yuzuru_kunfen:function(player){ + yuzuru_kunfen(player){ if(player.storage._yuzuru_sss) return '锁定技,结束阶段,你摸两张牌。然后你可以将两张牌交给一名其他角色。'; return '锁定技,结束阶段,你失去1点体力并摸两张牌。然后你可以将两张牌交给一名其他角色。'; }, - yuzuru_quji:function(player){ + yuzuru_quji(player){ if(player.storage._yuzuru_sss) return '出牌阶段限一次,你可以弃置X张牌并选择至多等量已受伤的其他角色,这些角色各回复1点体力。(X为你已损失的体力值)'; return '出牌阶段限一次,你可以弃置X张牌并选择至多等量已受伤的其他角色,这些角色各回复1点体力。若你以此法弃置了黑色牌,则你失去1点体力。(X为你已损失的体力值)'; }, - kamome_jieban:function(player){ + kamome_jieban(player){ if(player.storage.kamome_jieban) return '转换技。每回合限一次,当你受到或造成伤害后,阴:你可将两张牌交给一名其他角色,然后其交给你一张牌。阳:你可将一张牌交给一名其他角色,然后其交给你两张牌。'; return '转换技。每回合限一次,当你受到或造成伤害后,阴:你可将两张牌交给一名其他角色,然后其交给你一张牌。阳:你可将一张牌交给一名其他角色,然后其交给你两张牌。'; }, - shiroha_guying:function(player){ + shiroha_guying(player){ var str='当你受到伤害/对其他角色造成伤害时,你'; if(!player.storage.shiroha_jiezhao) str='锁定技,每回合限一次,'+str; if(player.storage.shiroha_jiezhao) str+='可'; str+='进行判定。若结果为红色/黑色,此伤害-1/+1。'; return str; }, - nsdiewu:function(player){ + nsdiewu(player){ if(player.storage.nspojian) return '当你获得两张或更多的牌后/受到伤害后,你获得一个“蝶舞”标记;你可移去一枚“蝶舞”标记,然后视为使用一张【杀】。当你以此法使用【杀】造成伤害后,则你摸一张牌。'; return '当你获得两张或更多的牌后/受到伤害后,你获得一个“蝶舞”标记;你可移去一枚“蝶舞”标记,然后视为使用一张【杀】或【闪】。当你以此法使用【杀】造成伤害后,则你摸一张牌。'; }, - nsfuzhou:function(player){ + nsfuzhou(player){ var str='出牌阶段限'; str+=(player.storage.nstaiping?'两':'一'); str+='次。你可以将一张黑色牌置于一名角色的判定区内,称为“符”。其于判定阶段进行“符”判定,若判定结果为:黑色,其受到'; @@ -17964,11 +17964,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ str+=(player.storage.nsfuzhou_draw?'该角色回复1点体力并摸一张牌,且本回合的手牌上限+1。':'且该角色本回合手牌上限减1。'); return str; }, - nsguidao:function(player){ + nsguidao(player){ if(player.storage.nstaiping) return '一名角色的判定牌生效前,你可以打出一张牌替换之。'; return '一名角色的判定牌生效前,你可以打出一张黑色牌替换之。'; }, - junkchigang:function(player){ + junkchigang(player){ if(player.storage.junkchigang) return '转换技,锁定技。判定阶段开始前,你取消此阶段。然后你获得一个额外的:阴,摸牌阶段;阳,出牌阶段。'; return '转换技,锁定技。判定阶段开始前,你取消此阶段。然后你获得一个额外的:阴,摸牌阶段;阳,出牌阶段。'; }, diff --git a/character/extra.js b/character/extra.js index 85b9e5782..f6a092371 100755 --- a/character/extra.js +++ b/character/extra.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'extra', diff --git a/character/gujian.js b/character/gujian.js index a8c239e0e..59d40f8cc 100644 --- a/character/gujian.js +++ b/character/gujian.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'gujian', diff --git a/character/gwent.js b/character/gwent.js index 166110f24..0a8cacf42 100644 --- a/character/gwent.js +++ b/character/gwent.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'gwent', diff --git a/character/hearth.js b/character/hearth.js index 21c82f354..a44086369 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'hearth', diff --git a/character/huicui.js b/character/huicui.js index 5d1479d71..3b48a38b6 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'huicui', diff --git a/character/jiange.js b/character/jiange.js index 0a7413a72..11b6e25cb 100644 --- a/character/jiange.js +++ b/character/jiange.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'jiange', diff --git a/character/jsrg.js b/character/jsrg.js index 7234198a9..042f0199f 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'jsrg', diff --git a/character/mobile.js b/character/mobile.js index c7a38fd83..4ea58ec39 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'mobile', diff --git a/character/mtg.js b/character/mtg.js index b2d784bba..8502b8ac5 100644 --- a/character/mtg.js +++ b/character/mtg.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'mtg', diff --git a/character/offline.js b/character/offline.js index 088f1832a..c75cc3276 100644 --- a/character/offline.js +++ b/character/offline.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'offline', diff --git a/character/old.js b/character/old.js index 6ee6d9349..9544cadbc 100755 --- a/character/old.js +++ b/character/old.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'old', diff --git a/character/onlyOL.js b/character/onlyOL.js index f3735db30..f2ad57c92 100644 --- a/character/onlyOL.js +++ b/character/onlyOL.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'onlyOL', diff --git a/character/ow.js b/character/ow.js index 19d95445a..623cf5ab0 100644 --- a/character/ow.js +++ b/character/ow.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'ow', diff --git a/character/refresh.js b/character/refresh.js index 31492b4ce..ebde74109 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'refresh', diff --git a/character/sb.js b/character/sb.js index 8f30a4ca6..a6c1d00e8 100644 --- a/character/sb.js +++ b/character/sb.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { //strategy and battle, "sb" in short diff --git a/character/shenhua.js b/character/shenhua.js index 412fc771f..24e1acb88 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'shenhua', diff --git a/character/shiji.js b/character/shiji.js index c3417ddac..f678ec0b1 100644 --- a/character/shiji.js +++ b/character/shiji.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'shiji', diff --git a/character/sp.js b/character/sp.js index 84e49c35a..1445d4886 100755 --- a/character/sp.js +++ b/character/sp.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'sp', diff --git a/character/sp2.js b/character/sp2.js index 15f3537a5..887b94d17 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'sp2', diff --git a/character/standard.js b/character/standard.js index 752085525..10deb1d94 100755 --- a/character/standard.js +++ b/character/standard.js @@ -93,9 +93,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ganning:['lingtong','xf_sufei'], guanyu:['zhangfei','liaohua'], }, - /** - * @type { { [key: string]: Skill } } - */ skill:{ //标准版甘夫人 stdshushen:{ diff --git a/character/swd.js b/character/swd.js index 959662988..affefb1ae 100644 --- a/character/swd.js +++ b/character/swd.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'swd', diff --git a/character/tw.js b/character/tw.js index 83b78585e..65d3176ec 100644 --- a/character/tw.js +++ b/character/tw.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'tw', diff --git a/character/xiake.js b/character/xiake.js index 5b430cc0c..4875b6b7d 100644 --- a/character/xiake.js +++ b/character/xiake.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'xiake', diff --git a/character/xianding.js b/character/xianding.js index 1aea633f0..44b24a035 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'xianding', diff --git a/character/xianjian.js b/character/xianjian.js index c524ff1bf..c477aa476 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'xianjian', diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 2cd815872..1ca9bfdc4 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'xinghuoliaoyuan', diff --git a/character/yijiang.js b/character/yijiang.js index 516fdbe34..a21f089f5 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'yijiang', @@ -8106,7 +8106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.$throw(cardx,1000,'nobroadcast'); },target); if(player == game.me){ - game.delay(0.5); + await game.asyncDelay(0.5); } } }; diff --git a/character/yingbian.js b/character/yingbian.js index 571bcaf8d..033269ff1 100644 --- a/character/yingbian.js +++ b/character/yingbian.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'yingbian', diff --git a/character/yxs.js b/character/yxs.js index 96719ef67..89a7beae0 100644 --- a/character/yxs.js +++ b/character/yxs.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'yxs', diff --git a/character/zhuogui.js b/character/zhuogui.js index e85e7d38c..e9f0cedc5 100644 --- a/character/zhuogui.js +++ b/character/zhuogui.js @@ -1,4 +1,4 @@ -'use strict'; +import { game } from '../noname.js'; game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'zhuogui', diff --git a/game/entry.js b/game/entry.js index fdb22bb60..977122c0f 100644 --- a/game/entry.js +++ b/game/entry.js @@ -17,7 +17,7 @@ }); */ -import { game, get, lib, boot } from "../noname.js" +import { game, get, lib, boot } from "../noname.js"; import { userAgent } from "../noname/util/index.js"; const coreAndVersion = get.coreInfo(); diff --git a/game/game.js b/game/game.js index a1cde798c..9ca14d25d 100644 --- a/game/game.js +++ b/game/game.js @@ -1,7 +1,7 @@ "use strict"; new Promise(resolve => { - // 客户端自带core.js的请注意跟进 + // 客户端自带core.js的请注意跟进core.js版本 if ('__core-js_shared__' in window) resolve(null); else { const nonameInitialized = localStorage.getItem('noname_inited'); @@ -88,15 +88,15 @@ new Promise(resolve => { else { const script = document.createElement('script') script.type = "module"; - script.src = `${assetURL}game/entry.js` - script.async = true - script.onerror = (event) => { - console.error(event) + script.src = `${assetURL}game/entry.js`; + script.async = true; + script.onerror = event => { + console.error(event); const message = `您使用的浏览器或《无名杀》客户端加载内容失败!\n目前使用的浏览器UA信息为:\n${userAgent}\n若您使用的客户端为自带内核的旧版“兼容版”,请及时更新客户端版本!\n若您使用的客户端为手机端的非兼容版《无名杀》,请尝试更新手机的WebView内核,或者更换为1.8.2版本及以上的兼容版!\n若您是直接使用浏览器加载index.html进行游戏,请改为运行文件夹内的“noname-server.exe”(或使用VSCode等工具启动Live Server),以动态服务器的方式启动《无名杀》!`; console.error(message); alert(message); - exit() + exit(); } - document.head.appendChild(script) + document.head.appendChild(script); } }); diff --git a/node_modules/noname-typings/Skill.d.ts b/node_modules/noname-typings/Skill.d.ts index 9c1b70514..d08893f3e 100644 --- a/node_modules/noname-typings/Skill.d.ts +++ b/node_modules/noname-typings/Skill.d.ts @@ -207,7 +207,7 @@ declare interface Mod { canBeDiscarded?(card: Card, player: Player, target: Player, eventName: string): boolean | void; /** 过滤可以获得的牌 */ canBeGained?(card: Card, player: Player, target: Player, eventName: string): boolean | void; - + canBeReplaced?(card: Card, source: Player, player: Player): boolean | void; /** * 改变花色 */ @@ -237,7 +237,7 @@ declare interface Mod { * * callback就是作为以上事件的content使用 */ - callback?: ContentFuncByAll; + callback?: ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll; //无懈相关:主要在_wuxie中,(此时应时无懈询问阶段),检测触发卡牌以下对应mod /* @@ -265,7 +265,7 @@ declare interface Mod { /** 改变卡牌名字 用于get.name*/ cardname?(card: Card, player: Player): string | void; /** 改变卡牌伤害属性 用于get.nature*/ - cardnature?(card: Card, player: Player): string | void; + cardnature?(card: Card, player: Player): string | void | boolean; /** 对特定角色使用牌的次数限制(用于优化【对特定角色使用牌无次数限制】的机制)【v1.9.105】 */ cardUsableTarget?(card: Card, player: Player, target: Player): boolean | void; @@ -281,6 +281,8 @@ declare interface Mod { /** 在目标范围内,即player是否在source的攻击范围内 */ inRangeOf?(from: Player, to: Player): boolean | void; + maxHandcardBase?(player: Player, num: number): number | void; + /** * 强制判断卡牌能否重铸 * 【v1.9.108.6~】 @@ -509,13 +511,13 @@ declare interface Skill { * 其执行时机和chooseButton一致,当chooseButton不存在时且game.online为false,则会执行这个 * @param config */ - precontent?: ContentFuncByAll; + precontent?: ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll; /** * 在content之前触发内容 * * 在useSkill中使用,主动触发技能content之前 */ - contentBefore?: ContentFuncByAll; + contentBefore?: ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll; /** * 触发内容(技能内容) * @@ -529,13 +531,13 @@ declare interface Skill { * 注:此时的content,已经为触发该技能的效果而创建的,该技能执行中的事件,此时的event一般是不具备 * 触发信息,触发的信息,主要在trigger触发事件中获取。 */ - content?: ContentFuncByAll; + content?: ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll; /** * 在content之后触发内容 * * 在useSkill中使用,主动触发技能content之后 */ - contentAfter?: ContentFuncByAll; + contentAfter?: ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll; //技能初始化与移除: /** @@ -651,7 +653,7 @@ declare interface Skill { /** 增加显示的信息,这部分时增加,“n轮后”前面部分 */ addintro?(storage: SMap, player: Player): string; /** 延迟的时间 */ - delay?: number; + delay?: number | boolean; /** * 锁定技 * @@ -738,9 +740,10 @@ declare interface Skill { /** 标记显示内容 */ intro?: { /** 自定义mark弹窗的显示内容 */ - mark?: ThreeParmFun; + mark?: ThreeParmFun; /** 用于info.mark为“character”,添加,移除标记时,log显示的标记名(好像意义不大) */ name?: string | TwoParmFun; + name2?: string | TwoParmFun; /** * 标记显示内容? * 为cards时显示标记内的牌. @@ -793,7 +796,7 @@ declare interface Skill { * * 主要在player.updateMark时使用,实际顶替this.storage[i+'_markcount']获取标记数 */ - markcount?: number | TwoParmFun | string; + markcount?: number | TwoParmFun | string; /** 是否不启用技能标记计数 */ nocount?: boolean; /** @@ -857,7 +860,7 @@ declare interface Skill { * * 【v1.9.102】扩展:可以使用函数式viewAs,目前核心支持使用地方:backup,ok; */ - viewAs?: string | CardBaseUIData | TwoParmFun; + viewAs?: string | CardBaseUIData | TwoParmFun; /** * 视为技按钮出现条件(即发动条件) * @param player @@ -1006,7 +1009,7 @@ declare interface Skill { * @param player * @param name 触发名,为event.triggername,目前只有在lib.filter.filterTrigger中才传该值,即被动触发,主动触发不检测该值,目前暂未完善 */ - filter?(event: GameEventPromise, player: Player, name?: string): boolean | void; + filter?(event: GameEventPromise, player: Player, name?: string): boolean | void | null; /** * 选择的目标武将牌上出现什么字。 * @@ -1362,7 +1365,9 @@ declare interface Skill { * * 无参,简洁写法; */ - check?: OneParmFun | TwoParmFun | NoneParmFum; + check?: OneParmFun; + check?: TwoParmFun; + check?: NoneParmFum; // check?(...any:any):number|boolean; // /** ai用于检测的方法:用于主动使用触发技能 */ // check?(card:Card):number|boolean; @@ -1578,7 +1583,7 @@ declare interface SkillAI { * ai发动技能的优先度 【也用于卡牌的优先度】 * 要具体比什么先发发动,可以使用函数返回结果 */ - order?: number | TwoParmFun; + order?: number | TwoParmFun; /** * 发动技能是身份暴露度(0~1,相当于概率) * 取值范围为0~1,用于帮助AI判断身份,AI中未写expose其他AI将会无法判断其身份 diff --git a/node_modules/noname-typings/type.d.ts b/node_modules/noname-typings/type.d.ts index 2ef629b1f..0dca19485 100644 --- a/node_modules/noname-typings/type.d.ts +++ b/node_modules/noname-typings/type.d.ts @@ -39,10 +39,25 @@ type SkillOrCard = string | NameType | Card; type CCards = SAAType; /** 技能content */ -declare type ContentFuncByAll = { - // (event: GameEventPromise, step: number, source: Player, player: Player, target: Player, targets: Player[], card: Card, cards: Card[], skill: string, forced: boolean, num: number, trigger: GameEventPromise, result: Result): any, - (event: GameEventPromise, trigger: GameEventPromise, player: Player): Promise; -} +declare type ContentFuncByAll = (event: GameEventPromise, trigger: GameEventPromise, player: Player) => Promise; + +declare type GeneratorContentFuncByAll = (event: GameEventPromise, map: { + event: GameEventPromise, + step: number, + source: Player, + player: Player, + target: Player, + targets: Player[], + card: Card, + cards: Card[], + skill: string, + forced: boolean, + num: number, + trigger: GameEventPromise, + result: Result + }) => Generator; + +declare type OldContentFuncByAll = () => void declare type Game = typeof import('../../noname/game/index.js').Game; declare type Library = typeof import('../../noname/library/index.js').Library; @@ -67,5 +82,601 @@ declare type GameHistory = import('../../noname/game/index.js').GameHistory; declare type CodeMirror = typeof import('../../game/codemirror.js').default; declare type Sex = 'male' | 'female' | 'dobule' | 'none'; -declare type Character = [Sex, string, number | string, string[], string[]]; -declare type Select = [number, number]; \ No newline at end of file +declare type Character = [Sex, string, number | string, string[], string[]] | [Sex, string, number | string, string[]]; +declare type Select = [number, number]; + +/** + * 导入武将包的配置 + */ +declare interface importCharacterConfig { + /** 武将包名 */ + name: string; + /** + * 设置该武将包是否可以联机 + */ + connect?: boolean; + /** + * 设置联机武将禁用列表 + * */ + connectBanned?: string[]; + /** + * 设置武将基本配置信息 + */ + character: SMap; + /** + * 设置武将介绍 + * */ + characterIntro?: SMap; + /** + * 设置武将标题(用于写称号或注释) + * */ + characterTitle?: SMap; + /** + * 设置技能 + * */ + skill?: SMap; + /** + * 设置珠联璧合武将 + * */ + perfectPair?: SMap; + /** + * 设置指定武将的过滤方法(传入一个mode,用于过滤玩法模式) + * */ + characterFilter?: SMap>; + /** + * 设置在武将包界面分包 + */ + characterSort?: SMap>; + /** + * 设置该武将包独有的卡牌(或者是特殊卡牌) + * + * */ + card?: SMap; + /** + * 设置自定义卡牌类型的排序用的优先级 + * */ + cardType?: SMap; + /** + * 设置动态翻译(本地化)【v1.9.105】 + * + * 指定lib.dynamicTranslate.xxx为一个函数 即可让技能xxx显示的描述随玩家状态而变化 并实现技能修改等 + * + * Player:指技能拥有者 + */ + dynamicTranslate?: SMap>; + /** + * 选择武将时,武将左下角可进行替换的武将配置【v1.9.106.3】 + * + * */ + characterReplace?: SMap; + + translate?: SMap; + /** + * 对应lib.element + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + element?: SMap; + /** + * 对应ai + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + ai?: SMap; + /** + * 对应ui + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + ui?: SMap; + /** + * 对应game + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + game?: SMap; + + /** + * 类型:键值对 + * + * 作用:对应get + * 若里面是项目内的同名字段,将覆盖原方法 + */ + get?: SMap; + /** + * 帮助内容将显示在菜单-选项-帮助中 + * + * 游戏编辑器的帮助代码基本示例结构: + * + * "帮助条目": + * ```jsx + *
      + *
    • 列表1-条目1 + *
    • 列表1-条目2 + *
    + *
      + *
    1. 列表2-条目1 + *
    2. 列表2-条目2 + * + * ``` + * (目前可显示帮助信息:mode,extension,card卡包,character武将包) + */ + help?: SMap; + + [key: string]: any; +} +/** + * 导入卡牌包的配置 + */ +declare interface importCardConfig { + /** 卡牌包名 */ + name: string; + /** + * 设置该卡包是否可以联机 + * */ + connect?: boolean; + /** + * 设置卡牌 + * */ + card: SMap; + /** + * 设置卡牌技能 + * */ + skill: SMap; + /** + * 设置从牌堆添加指定卡牌 + * */ + list: CardBaseUIData[]; + /** 卡牌翻译 */ + translate: SMap | string; + /** + * 帮助内容将显示在菜单-选项-帮助中 + * + * 游戏编辑器的帮助代码基本示例结构: + * + * "帮助条目": + * ```jsx + *
        + *
      • 列表1-条目1 + *
      • 列表1-条目2 + *
      + *
        + *
      1. 列表2-条目1 + *
      2. 列表2-条目2 + * + * ``` + * (目前可显示帮助信息:mode,extension,card卡包,character武将包) + */ + help?: SMap; + + [key: string]: any; +} + +/** + * 导入玩法模式的配置 + */ +declare interface importModeConfig { + /** 模式名 */ + name: string; + /** 技能(主要是放些该模式下特有的技能) */ + skill?: SMap; + /** + * 武将包 + */ + characterPack?: SMap>; + /** + * 武将分类排序 + */ + characterSort?: SMap>; + /** 卡牌(主要是放些该模式下特有的卡牌) */ + card?: SMap; + /** + * 卡包 + */ + cardPack?: SMap>; + /** + * mode的init方法(若有,init是最早启动的方法) + */ + init?(): void; + /** + * mode的start启动方法 + */ + start(): void; + /** + * mode的start启动之前的处理方法 + */ + startBefore?(): void; + /** + * 重新初始化 + * + * 在lib.client.reinit中, + * + * game.loadModeAsync,读取mode时启用这个初始化。 + * + * 具体作用:有待考究 + */ + onreinit?(): void; + /** + * 对应lib.element + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + element?: SMap; + /** + * 对应ai + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + ai?: SMap; + /** + * 对应ui + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + ui?: SMap; + /** + * 对应game + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + game?: SMap; + + /** + * 类型:键值对 + * + * 作用:对应get + * 若里面是项目内的同名字段,将覆盖原方法 + */ + get?: SMap; + /** + * 帮助内容将显示在菜单-选项-帮助中 + * + * 游戏编辑器的帮助代码基本示例结构: + * + * "帮助条目": + * ```jsx + *
          + *
        • 列表1-条目1 + *
        • 列表1-条目2 + *
        + *
          + *
        1. 列表2-条目1 + *
        2. 列表2-条目2 + * + * ``` + * (目前可显示帮助信息:mode,extension,card卡包,character武将包) + */ + help?: SMap; + + [key: string]: any; +} + +/** + * 导入武将的配置 + */ +declare interface importPlayerConfig { + /** 武将包名 */ + name: string; + /** 禁用此扩展的模式 */ + forbid: string[]; + /** 可使用模式 */ + mode: string[]; + //自定义是实现核心初始化方法 + init?(): void; + arenaReady?(): void; + /** + * 对应lib.element + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + element?: SMap; + /** + * 对应ai + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + ai?: SMap; + /** + * 对应ui + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + ui?: SMap; + /** + * 对应game + * + * 若里面是项目内的同名字段,将覆盖原方法 + */ + game?: SMap; + + /** + * 类型:键值对 + * + * 作用:对应get + * 若里面是项目内的同名字段,将覆盖原方法 + */ + get?: SMap; + + [key: string]: any; +} + +/** + * 导入扩展的配置 + */ +declare interface importExtensionConfig { + /** 扩展名 */ + name: string; + /** 用于解析用的key,不直接参与游戏逻辑,参与自己定义的解析流程,统一该包的前缀 */ + key?: string; + /** + * 是否可编辑该扩展(需要打开显示制作扩展) + * + * (都满足条件,则可以开启“编辑此扩展”功能) + */ + editable?: boolean; + /** + * 该扩展菜单的配置 + * + * 名字:"extension_" + key + * + * 内容: value + * + * (也是游戏编辑器中的选项代码部分) + */ + config?: SMap; + /** + * 联机配置(目前扩展已经不能联机) + * + * 特殊接口:update + */ + connect?: SMap; + /** + * 扩展的包信息。 + * + * 包括卡牌,技能,人物的代码以及中文翻译 + */ + package: PackageData; + /** + * 函数执行时机为游戏数据加载之后、界面加载之前 + * + * (游戏编辑器中的主代码部分) + * + * 注:即选择了玩法模式之后加载的内容部分; + * @param config 扩展选项/配置 + * @param pack 扩展定义的武将、卡牌和技能等 + */ + content?(config: SMap, pack: PackageData): void; + /** + * 函数执行时机为游戏数据加载之前,且不受禁用扩展的限制,除添加模式外请慎用 + * + * (也是游戏编辑器中的启动代码部分) + * + * 注:game.import添加扩展时就加载,即当前游戏加载菜单界面时就已经加载; + * + * 注2:当前扩展联机时,需要直接再此扩展;为了方便扩展,大部分扩展直接在这里扩展; + * @param data 保存在lib.config中”extension_扩展名“为前缀的配置 + */ + precontent?(data?: SMap): void; + /** 删除该扩展后调用 */ + onremove?(): void; + /** + * 帮助内容将显示在菜单-选项-帮助中 + * + * 游戏编辑器的帮助代码基本示例结构: + * + * "帮助条目": + * ```jsx + *
            + *
          • 列表1-条目1 + *
          • 列表1-条目2 + *
          + *
            + *
          1. 列表2-条目1 + *
          2. 列表2-条目2 + * + * ``` + * (目前可显示帮助信息:mode,extension,card卡包,character武将包) + */ + help?: SMap; + /** 相关文件名 */ + files?: { + character?: string[], + card?: string[], + skill?: string[] + }; + /** + * 【特殊】用于game.addMode添加时, + * 用于显示模式icon,所有的图片路径的imgsrc,指定外层扩展文件名; + */ + extension?: string; + /** + * 对应lib.element, + * 若里面是项目内的同名字段,将覆盖原方法 + */ + element?: SMap; + /** + * 对应ai + */ + ai?: SMap; + /** + * 对应ui + */ + ui?: SMap; + /** + * 对应game + */ + game?: SMap; + /** + * 对应get + */ + get?: SMap; + /** + * 可以继续加入更多对象: + * 这些对象会对应附加在lib中,或替换对应lib位置的对象: + * 例如:translate,help,skill... ... 或者其他自定义的... + */ + [key: string]: any; +} + +/** + * 菜单的选项的配置 + * + * config的功能菜单的node._link.config,就是该config + * 内部代码略复杂,太多UI相关逻辑,看不懂(等日后精进,再继续再战) + */ +declare interface SelectConfigData { + /** 功能名 */ + name: string; + /** + * 【核心】初始化时默认的选项/配置/模式(对应下面item的key) + */ + init?: boolean | string; + /** + * 【核心】二级菜单配置(当前config内容的菜单) + */ + item?: SMap | NoneParmFum>; + /** + * 功能说明 + * + * 若没有,也不是其他特殊的选项,则显示“设置 + name” + */ + intro?: string | NoneParmFum; + + /** + * 显示bar(添加了“withbar”,有一定的居中效果,即当前menu的头部或者尾部) + * + * @param node 创建出来的visualBar节点 + * @param item item选项 + * @param create 即内部自定义的createNode方法,一般不直接使用该方法,目前来看,可以内部重新定义覆盖该方法,自己达成创建item列表的方式 + * @param switcher 当前config的item的node节点 + */ + visualBar?: (node: HTMLDivElement, item: SMap, create: OneParmFun, switcher?: HTMLDivElement) => void + /** + * 显示菜单 + * 显示一个以3列为一行的显示列表(内部实现) + * @param node 当前配置项的节点 + * @param item 当前node的node._link + * @param name item选项 + * @param config 当前的config + */ + visualMenu?: (node: HTMLDivElement, link: any, name: string, config: SelectConfigData) => void; + /** + * 文本菜单 + * 当前不存在visualMenu的话,则创建item列表节点,若有该属性则执行 + * @param node + * @param link + */ + textMenu?(node: HTMLDivElement, link: string, config: SelectConfigData): void; + + /** + * 清理游戏,核心选项,应该默认是false(undefined)<--该功能不知是否存在 + * + * 若没有nopointer配置(false/undefined),则设置“pointerspan” + * + * 通“click”,即当前整个node都可以点击<--这个应该才是真实的功能 + */ + clear?: boolean; + /** 指定该项没有功能,仅展示,项目内多用于描述上 */ + nopointer?: boolean; + /** + * 点击触发事件 + * + * 若有返回值false,则当前点击事件的toggle切换无效 + */ + onclick?(item: any): void | boolean; + onclick?(link: any, node: HTMLDivElement): void | boolean; + + /** 当前没有onclick方法时,除了默认game.saveConfig保存数据配置key的数据,可以使用该方法进行数据处理啊 */ + onsave?(reslut: any): void; + + /** + * 输入框 + * + * 其输入框的默认值是当前的init属性 + */ + input?: boolean; + /** 取值true,若没有设置可以进行input输入 */ + fixed?: boolean; + /** 设置input节点的onblur事件的回调(焦点离开输出框) */ + onblur?(): void; + + /** + * 用于扩展菜单lib.extensionMenu中(目前未见使用) + */ + onswitch?(bool: boolean): void; + + /** 核心,更新方法 */ + update?(config: SMap, map: SMap): any; + + /** + * 在玩法模式选择中: + * 是否需要“重启”游戏,若为true,则“启”按钮会高亮(添加“glowing”) + * 在选项中: + * 每次改变该选项,都会重置当前的ui选项(增加,减少一些功能项) + */ + restart?: boolean | NoneParmFum; + /** 应该与unfrequent功能时一致的,相反判断,直接显示出来的功能项 */ + frequent?: boolean, + /** 加入更多中(随着下拉出现),用得较多 */ + unfrequent?: boolean; + /** 不明,用得很少 */ + content?(bool: boolean): void; + + /** 内部属性,记录当前配置的key */ + _name?: string; +} + +/** + * 扩展的包信息 + * 游戏自带编辑器的代码编辑区域的扩展结构: + * (主要是通过系统内部自带编译器编辑的代码,导入逻辑其实基本一致) + */ +declare interface PackageData { + /** 扩展制作作者名 */ + author?: string, + /** 扩展描述 */ + intro?: string, + /** 讨论地址 */ + diskURL?: string, + /** 网盘地址 */ + forumURL?: string, + /** 扩展版本 */ + version?: string, + + /** 武将导入信息 */ + character?: { + character: SMap; + translate: SMap; + }; + /** 卡牌导入信息 */ + card?: { + card: SMap; + translate: SMap; + list: CardBaseUIData[]; + }; + /** 技能导入信息 */ + skill?: { + skill: SMap; + translate: SMap; + }; + + /** 相关文件名(扩展所使用的一些图片) */ + files?: { + character: string[]; + card: string[]; + skill: string[]; + } + + /** 主代码中,pack.code包括以下属性: */ + code?: { + /** 扩展的config配置信息 */ + config?: SMap; + /** 扩展主代码 */ + content?: (config: SMap, pack: PackageData) => void; + /** 扩展帮助信息 */ + help?: SMap; + /** 扩展启动代码 */ + precontent?: (data?: SMap) => void; + } +} + diff --git a/noname/game/index.js b/noname/game/index.js index f69281020..528a7a36c 100644 --- a/noname/game/index.js +++ b/noname/game/index.js @@ -1674,7 +1674,8 @@ export class Game extends Uninstantable { // 某种意义上,改不了,得重写 // 等正式用import导入再说 /** - * @param { string } type + * @overload + * @param { 'character' } type * @param {( * lib: Library, * game: typeof Game, @@ -1682,9 +1683,60 @@ export class Game extends Uninstantable { * get: Get, * ai: AI, * _status: Status - * ) => any } content + * ) => importCharacterConfig } content + * @param {*} [url] + */ + /** + * @overload + * @param { 'card' } type + * @param {( + * lib: Library, + * game: typeof Game, + * ui: UI, + * get: Get, + * ai: AI, + * _status: Status + * ) => importCardConfig } content + * @param {*} [url] + */ + /** + * @overload + * @param { 'mode' } type + * @param {( + * lib: Library, + * game: typeof Game, + * ui: UI, + * get: Get, + * ai: AI, + * _status: Status + * ) => importModeConfig } content + * @param {*} [url] + */ + /** + * @overload + * @param { 'player' } type + * @param {( + * lib: Library, + * game: typeof Game, + * ui: UI, + * get: Get, + * ai: AI, + * _status: Status + * ) => importPlayerConfig } content + * @param {*} [url] + */ + /** + * @overload + * @param { 'extension' } type + * @param {( + * lib: Library, + * game: typeof Game, + * ui: UI, + * get: Get, + * ai: AI, + * _status: Status + * ) => importExtensionConfig } content * @param {*} [url] - * @returns */ static import(type, content, url) { if (type == 'extension') { @@ -8438,11 +8490,11 @@ export class Game extends Uninstantable { * 此方法用于对所有targets按顺序执行一个async函数。 * * @param { Player[] } targets 需要执行async方法的目标 - * @param { AsyncFunction } asyncFunc 需要执行的async方法 - * @param { sort } function 排序器,默认为lib.sort.seat + * @param { (player: Player, i: number) => Promise } asyncFunc 需要执行的async方法 + * @param { (a: Player, b: Player) => number } sort 排序器,默认为lib.sort.seat */ static async doAsyncInOrder(targets,asyncFunc,sort){ - if(!sort)sort = lib.sort.seat; + if(!sort) sort = lib.sort.seat; let sortedTargets = targets.sort(sort); for(let i=0;i num) this.removeMark(name, count - num, log); else if (count < num) this.addMark(name, num - count, log); } + /** + * @param {*} i + * @returns { number } + */ countMark(i) { if (this.storage[i] == undefined) return 0; if (typeof this.storage[i] == 'number') return this.storage[i]; @@ -5652,6 +5666,9 @@ export class Player extends HTMLDivElement { }; return next; } + /** + * @returns { boolean } + */ canAddJudge(card) { if (this.isDisabledJudge()) return false; let name; @@ -6544,7 +6561,7 @@ export class Player extends HTMLDivElement { var range; var select = get.copy(info.selectTarget); if (select == undefined) { - if (info.filterTarget == undefined) return true; + if (info.filterTarget == undefined) return 1; range = [1, 1]; } else if (typeof select == 'number') range = [select, select];