diff --git a/character/extra.js b/character/extra.js index 98101efc3..54c253ab6 100755 --- a/character/extra.js +++ b/character/extra.js @@ -78,18 +78,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shen_jiaxu:['le_shen_jiaxu','shen_jiaxu'], }, characterFilter:{ - shen_diaochan:function(mode){ + shen_diaochan(mode){ return mode=='identity'||mode=='doudizhu'||mode=='single'||(mode=='versus'&&_status.mode!='standard'&&_status.mode!='three'); }, - shen_dengai:function(mode){ + shen_dengai(mode){ if(['boss','chess','tafang','stone'].includes(mode)) return false; if(mode=='versus') return _status.mode!='three'; return true; }, - le_shen_jiaxu:function(mode){ + le_shen_jiaxu(mode){ return mode=='identity'&&_status.mode!='purple'; }, }, + /** @type { SMap } */ skill:{ //神鲁肃 dingzhou:{ @@ -327,16 +328,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wuling:{ audio:2, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(target=>lib.skill.wuling.filterTarget(null,player,target)); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.hasSkill('wuling_wuqinxi'); }, usable:2, prompt:'选择一名角色,向其传授“五禽戏”', group:'wuling_die', - content:function(){ + content(){ 'step 0' target.addAdditionalSkill(`wuling_${player.playerid}`,'wuling_wuqinxi'); var next=player.chooseToMove(`五灵:调整向${get.translation(target)}传授的“五禽戏”顺序`); @@ -391,7 +392,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ '猿:当你获得此效果时,你选择一名其他角色,获得其装备区里的一张牌。', '鹤:当你获得此效果时,你摸三张牌。', ], - updateMark:function(player){ + updateMark(player){ var wuqinxi=player.storage.wuling_wuqinxi; if(!wuqinxi) return; var prevMark=wuqinxi.shift(); @@ -426,7 +427,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, intro:{ markcount:()=>0, - mark:function(dialog,storage){ + mark(dialog,storage){ const wuqinxiMap=lib.skill.wuling.wuqinxiMap; const str=`
  • 当前效果:${storage[0]}
  • ${wuqinxiMap.find(str=>storage[0]==str[0]).slice(2)}
    `; dialog.addText(str,false); @@ -439,7 +440,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, mod:{ - targetEnabled:function(card,player,target){ + targetEnabled(card,player,target){ if(get.type(card)=='delay'&&target.storage.wuling_wuqinxi&&target.storage.wuling_wuqinxi[0]=='鹿') return false; }, }, @@ -447,7 +448,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ source:'damageBegin1', player:['phaseZhunbeiBegin','damageBegin4','wuling_change'], }, - filter:function(event,player,name){ + filter(event,player,name){ const wuqinxi=player.storage.wuling_wuqinxi&&player.storage.wuling_wuqinxi[0]; if(!wuqinxi) return false; if(event.name=='phaseZhunbei') return true; @@ -474,7 +475,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, onremove:true, - content:function(){ + content(){ 'step 0' var wuqinxi=player.storage.wuling_wuqinxi[0]; if(trigger.name=='phaseZhunbei'){ @@ -531,7 +532,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ const wuqinxi=target.storage.wuling_wuqinxi; if(!wuqinxi||!wuqinxi.length) return; const curWuqinxi=wuqinxi[0]; @@ -551,13 +552,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xiong:{charlotte:true}, die:{ trigger:{player:'die'}, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(current=>current.additionalSkills[`wuling_${player.playerid}`]); }, forced:true, locked:false, forceDie:true, - content:function(){ + content(){ var targets=game.filterPlayer(current=>{ return current.additionalSkills[`wuling_${player.playerid}`]; }); @@ -568,16 +569,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, youyi:{ - init:function(player){ + init(player){ player.storage.renku=true; }, audio:2, enable:'phaseUse', - filter:function(event,player){ - return _status.renku.length; + filter(event,player){ + return _status.renku.length>0; }, prompt:'将仁区所有牌置入弃牌堆,令所有角色各回复1点体力', - content:function(){ + content(){ 'step 0' var cards=_status.renku.slice(); game.cardsDiscard(cards).fromRenku=true; @@ -591,11 +592,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ targets.forEach(target=>target.recover()); }, ai:{ - order:function(item,player){ + order(item,player){ return get.order({name:'taoyuan'},player); }, result:{ - player:function(player){ + player(player){ return Math.max(0,game.filterPlayer().reduce((num,target)=>num+get.recoverEffect(target,player,player),0)); }, }, @@ -605,13 +606,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ put:{ audio:'youyi', trigger:{player:'phaseDiscardEnd'}, - filter:function(event,player){ + filter(event,player){ return lib.skill.twlijian.getCards(event).length; }, - prompt2:function(event,player){ + prompt2(event,player){ return '将'+get.translation(lib.skill.twlijian.getCards(event))+'置入仁区'; }, - content:function(){ + content(){ var cards=lib.skill.twlijian.getCards(trigger); game.log(player,'将',cards,'置于了仁库'); game.cardsGotoSpecial(cards,'toRenku'); @@ -629,7 +630,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!game.hasPlayer(i=>i.hasSkill('jxlianpo'),true)) game.removeGlobalSkill('jxlianpo_global'); }, trigger:{global:'dieAfter'}, - filter:function(event,player){ + filter(event,player){ if(lib.skill.jxlianpo.getMax().length<=1) return false; return event.source&&event.source.isIn(); }, @@ -675,7 +676,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return identities; }, group:'jxlianpo_show', - content:function*(event,map){ + *content(event,map){ var source=map.trigger.source; source.draw(2); source.recover(); @@ -687,7 +688,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.translation(i+'2'); }).join('、')}`, }, - $createButton:function(item,type,position,noclick,node){ + $createButton(item,type,position,noclick,node){ node=ui.create.identityCard(item,position,noclick); node.link=item; return node; @@ -696,7 +697,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ show:{ audio:'jxlianpo', trigger:{global:'roundStart'}, - filter:function(event,player){ + filter(event,player){ var list=lib.config.mode_config.identity.identity.lastItem.slice(); list.removeArray(game.filterPlayer().map(i=>{ let identity=i.identity; @@ -706,7 +707,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return list.length; }, forced:true, - content:function(){ + content(){ 'step 0' var list=lib.config.mode_config.identity.identity.lastItem.slice(); list.removeArray(game.filterPlayer().map(i=>{ @@ -753,13 +754,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, global:{ mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ if(!lib.skill.jxlianpo.getMax().includes('fan')) return; return num-game.countPlayer(current=>{ return current!=player&¤t.hasSkill('jxlianpo'); }); }, - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha'){ if(!lib.skill.jxlianpo.getMax().includes('fan')) return; return num+game.countPlayer(current=>{ @@ -767,20 +768,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); } }, - attackRange:function(player,num){ + attackRange(player,num){ if(!lib.skill.jxlianpo.getMax().includes('fan')) return; return num+game.countPlayer(current=>{ return current.hasSkill('jxlianpo'); }); }, - cardSavable:function(card,player,target){ + cardSavable(card,player,target){ if(card.name=='tao'&&!player.hasSkill('jxlianpo')){ if(!lib.skill.jxlianpo.getMax().includes('zhu')) return; if(player==target) return; return false; } }, - playerEnabled:function(card,player,target){ + playerEnabled(card,player,target){ if(card.name=='tao'&&!player.hasSkill('jxlianpo')){ if(!lib.skill.jxlianpo.getMax().includes('zhu')) return; if(player==target) return; @@ -803,18 +804,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jxzhaoluan:{ audio:2, trigger:{global:'dieBegin'}, - filter:function(event,player){ + filter(event,player){ return event.getParent().name=='dying'&&event.player.isIn(); }, limited:true, skillAnimation:true, animationColor:'metal', logTarget:'player', - check:function(event,player){ + check(event,player){ if(event.source&&event.source.isIn()&&get.attitude(player,event.source)>0&&player.identity=='fan') return false; return get.attitude(player,event.player)>3.5; }, - content:function*(event,map){ + *content(event,map){ var player=map.player,trigger=map.trigger; var target=trigger.player; player.awakenSkill('jxzhaoluan'); @@ -840,21 +841,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ effect:{ audio:'jxzhaoluan', enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.getStorage('jxzhaoluan_effect').some(i=>i.isIn()); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !player.getStorage('jxzhaoluan_hit').includes(target); }, line:false, locked:true, charlotte:true, - promptfunc:function(){ + promptfunc(){ var bodies=_status.event.player.getStorage('jxzhaoluan_effect').filter(i=>i.isIn()); return `选择一名角色,你令${get.translation(bodies)}${bodies.length>1?'中的一人':''}减1点体力上限,然后你对选择的角色造成1点伤害。`; }, delay:false, - content:function(){ + content(){ 'step 0' var bodies=player.getStorage('jxzhaoluan_effect').filter(i=>i.isIn()); if(bodies.length==1) event._result={bool:true,targets:bodies}; @@ -887,7 +888,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:9, result:{ - player:function(player){ + player(player){ var bodies=player.getStorage('jxzhaoluan_effect').filter(i=>i.isIn()); var body; if(bodies.length==1) body=bodies[0]; @@ -895,7 +896,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(get.attitude(player,body)>4&&!body.isDamaged()&&body.getHp()<=2) return -10; return 0; }, - target:function(player,target){ + target(player,target){ return Math.sign(get.damageEffect(target,player,target)); } } @@ -910,10 +911,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.hasEnabledSlot(2); }, - content:function(){ + content(){ player.disableEquip(2); player.expandEquip(1); }, @@ -921,10 +922,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qiexie:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countEmptySlot(1)>0; }, - content:function(){ + content(){ 'step 0' if(!_status.characterlist){ lib.skill.pingjian.initList(); @@ -985,7 +986,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ for(var card of cards) player.equip(card); } }, - $createButton:function(item,type,position,noclick,node){ + $createButton(item,type,position,noclick,node){ node=ui.create.buttonPresets.character(item,'character',position,noclick); const info=lib.character[item]; const skills=info[3].filter(function(skill){ @@ -1032,12 +1033,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return node; }, - video:function(player,info){ + video(player,info){ for(var name of info[0]){ lib.skill.qiexie.createCard(name); } }, - createCard:function(name){ + createCard(name){ if(!_status.postReconnect.qiexie) _status.postReconnect.qiexie=[ function(list){ for(var name of list) lib.skill.qiexie.createCard(name); @@ -1055,7 +1056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subtype:'equip1', enable:true, selectTarget:-1, - filterCard:function(card,player,target){ + filterCard(card,player,target){ if(player!=target) return false; return target.canEquip(card,true); }, @@ -1119,10 +1120,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.cards.some(card=>card.name.indexOf('qiexie_')==0) }, - content:function(){ + content(){ for(var card of trigger.cards){ if(card.name.indexOf('qiexie_')==0){ card._destroy=true; @@ -1137,17 +1138,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, cuijue:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0;//&&game.hasPlayer(target=>lib.skill.cuijue.filterTarget('SB',player,target)); }, filterCard:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player.getStorage('cuijue_used').includes(target)||!player.inRange(target)) return false; var distance=get.distance(player,target); return !game.hasPlayer(current=>(current!=target&&player.inRange(current)&&get.distance(player,current)>distance)); }, selectTarget:[0,1], - filterOk:function(){ + filterOk(){ var player=_status.event.player; if(game.hasPlayer(target=>lib.skill.cuijue.filterTarget('SB',player,target))) return ui.selected.targets.length>0; return true; @@ -1169,7 +1170,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ui.selected.cards.remove(card); return goon-get.value(card); }, - content:function(){ + content(){ if(target){ player.addTempSkill('cuijue_used','phaseUseAfter'); player.markAuto('cuijue_used',[target]); @@ -1197,10 +1198,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:['phaseUseBegin','phaseUseEnd']}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&player.getStorage('dctuoyu').length>0; }, - content:function(){ + content(){ 'step 0' var hs=player.getCards('h'),tags=['dctuoyu_fengtian','dctuoyu_qingqu','dctuoyu_junshan']; var storage=player.getStorage('dctuoyu'); @@ -1311,13 +1312,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ effect:{ mod:{ - targetInRange:function(card,player,target){ + targetInRange(card,player,target){ if(!card.cards) return; for(var i of card.cards){ if(i.hasGaintag('dctuoyu_qingqu_tag')) return true; } }, - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(!card.cards) return; for(var i of card.cards){ if(i.hasGaintag('dctuoyu_qingqu_tag')) return Infinity; @@ -1326,7 +1327,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ var tags=['dctuoyu_fengtian_tag','dctuoyu_qingqu_tag','dctuoyu_junshan_tag'],card=event.card; return player.hasHistory('lose',function(evt){ if(evt.getParent()!=event) return false; @@ -1338,7 +1339,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }); }, - content:function(){ + content(){ var tags=['dctuoyu_fengtian_tag','dctuoyu_qingqu_tag','dctuoyu_junshan_tag'],card=trigger.card; player.hasHistory('lose',function(evt){ if(evt.getParent()!=trigger) return false; @@ -1370,7 +1371,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, dcxianjin:{ - init:function(player){ + init(player){ var num=game.getAllGlobalHistory('changeHp',evt=>{ return evt.getParent().name=='damage'&&(evt.getParent().player==player||(evt.getParent().source&&evt.getParent().source==player)); }).concat(game.getAllGlobalHistory('changeHp',evt=>{ @@ -1384,11 +1385,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'damageEnd', source:'damageSource', }, - filter:function(event,player){ + filter(event,player){ return player.countMark('dcxianjin')%2==0; }, forced:true, - content:function(){ + content(){ 'step 0' var tags=['dctuoyu_fengtian','dctuoyu_qingqu','dctuoyu_junshan']; tags.removeArray(player.getStorage('dctuoyu')); @@ -1420,7 +1421,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, firstDo:true, - content:function(){ + content(){ player.addMark('dcxianjin',1,false); }, }, @@ -1430,14 +1431,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'dccuixin', audio:2, trigger:{global:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ return player.getStorage('dctuoyu').length==3; }, forced:true, juexingji:true, skillAnimation:true, animationColor:'orange', - content:function(){ + content(){ 'step 0' player.awakenSkill('dcqijing'); player.loseMaxHp(); @@ -1479,7 +1480,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dccuixin:{ audio:2, trigger:{player:'useCardAfter'}, - filter:function(event,player){ + filter(event,player){ if(!event._dccuixin||get.type(event.card,false)=='delay'||get.type(event.card,false)=='equip') return false; var card={ name:event.card.name, @@ -1493,7 +1494,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, direct:true, - content:function(){ + content(){ 'step 0' var card={ name:trigger.card.name, @@ -1533,12 +1534,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ popup:false, firstDo:true, charlotte:true, - filter:function(event,player){ + filter(event,player){ if(!event.isFirstTarget||event.getParent().skill=='dccuixin') return false; if(event.targets.length==0) return false; return event.targets.includes(player.getNext())||event.targets.includes(player.getPrevious()); }, - content:function(){ + content(){ var list=[]; if(trigger.targets.includes(player.getNext())) list.push('getPrevious'); if(trigger.targets.includes(player.getPrevious())) list.push('getNext'); @@ -1560,7 +1561,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, intro:{ - markcount:function(storage){ + markcount(storage){ return storage.length; }, content:'本回合已使用$花色的牌', @@ -1569,7 +1570,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jingce:{ audio:'shelie', trigger:{player:['phaseJieshuBegin','useCard1']}, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('twshelie_round')||player!=_status.currentPhase) return false; var list=[]; player.getHistory('useCard',function(evt){ @@ -1587,7 +1588,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, locked:false, - content:function(){ + content(){ 'step 0' player.addTempSkill('twshelie_round','roundStart'); player.chooseControl('摸牌阶段','出牌阶段').set('prompt','涉猎:请选择要执行的额外阶段'); @@ -1609,16 +1610,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ twgongxin:{ audio:'gongxin', enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.countCards('h'); }); }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h'); + filterTarget(card,player,target){ + return target!=player&&target.countCards('h')>0; }, usable:1, - content:function(){ + content(){ 'step 0' event.num=target.getCards('h').reduce(function(arr,card){ return arr.add(get.suit(card,player)),arr; @@ -1675,7 +1676,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:10, expose:0.25, result:{ - target:function(player,target){ + target(player,target){ return -target.countCards('h'); }, }, @@ -1683,7 +1684,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, twgongxin2:{ mod:{ - cardEnabled2:function(card,player){ + cardEnabled2(card,player){ if(player.getStorage('twgongxin2').includes(get.color(card))) return false; }, }, @@ -1698,7 +1699,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:['useCard','respond'] }, forced:true, - filter:function(event,player){ + filter(event,player){ return typeof get.number(event.card)=='number'; }, marktext:'黄', @@ -1706,11 +1707,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'黄(异兆/肆军)', name2:'黄', content:'mark', - markcount:function(storage,player){ + markcount(storage,player){ return (storage||0).toString().slice(-2); }, }, - content:function(){ + content(){ 'step 0' event.num=player.countMark('yizhao'); player.addMark('yizhao',get.number(trigger.card)); @@ -1724,14 +1725,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(Math.floor((get.number(card)+player.countMark('yizhao')%10)/10)==1) return num+10; }, }, ai:{ threaten:1.5, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')) return [1,0.1]; } } @@ -1740,11 +1741,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sijun:{ audio:2, trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ + filter(event,player){ return player.countMark('yizhao')>ui.cardPile.childNodes.length; }, check:()=>true, - content:function(){ + content(){ 'step 0' player.removeMark('yizhao',player.countMark('yizhao')); game.washCard(); @@ -1782,10 +1783,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sanshou:{ audio:2, trigger:{player:'damageBegin4'}, - check:function(event,player){ + check(event,player){ return get.damageEffect(player,event.source,player,event.nature)<=0; }, - content:function(){ + content(){ 'step 0' var cards=game.cardsGotoOrdering(get.cards(3)).cards; event.cards=cards; @@ -1800,7 +1801,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(card.name=='shandian'||card.name=='fulei') return [0,0.1]; if(!get.tag(card,'damage')) return; var types=[],bool=0; @@ -1815,12 +1816,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return game.hasGlobalHistory('cardMove',evt=>evt.washCard)&&game.hasPlayer(current=>current!=player); }, skillAnimation:true, animationColor:'metal', - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('tianjie'),'选择至多三名其他角色,依次对这些角色造成X点雷电伤害(X为其手牌中【闪】的数量,至少为1)',[1,3]).set('ai',target=>{ var player=_status.event.player; @@ -1842,7 +1843,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:5, - filter:function(event,player){ + filter(event,player){ var count=player.getStat('skill').shencai; if(count&&count>player.countMark('shencai')) return false; return true; @@ -1850,7 +1851,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterTarget:lib.filter.notMe, onremove:true, prompt:'选择一名其他角色进行地狱审判', - content:function(){ + content(){ var next=target.judge(); next.callback=lib.skill.shencai.contentx; }, @@ -1858,7 +1859,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:8, result:{target:-1}, }, - contentx:function(){ + contentx(){ var card=event.judgeResult.card; var player=event.getParent(2).player; var target=event.getParent(2).target; @@ -1894,7 +1895,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ respond:'打出', distance:'距离', }, - getStr:function(node){ + getStr(node){ var str='',name=node.name; if(lib.translate[name+'_info']){ if(lib.card[name].type&&lib.translate[lib.card[name].type]) str+=(''+get.translation(lib.card[name].type)+'牌|'); @@ -1940,12 +1941,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'笞', trigger:{player:'damageEnd'}, forced:true, - content:function(){ + content(){ player.loseHp(trigger.num); }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'damage')&¤t<0) return 1.6; }, }, @@ -1962,10 +1963,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'杖', trigger:{target:'useCardToTargeted'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'; }, - content:function(){ + content(){ trigger.directHit.add(player); game.log(player,'不可响应',trigger.card); }, @@ -1980,7 +1981,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ ai:{ directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(!arg||!arg.card||arg.card.name!='sha') return false; if(!arg.target||!arg.target.hasSkill('shencai_weapon')) return false; return true; @@ -1995,7 +1996,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, forced:true, - filter:function(event,player){ + filter(event,player){ if(!player.hasCard(function(card){ return lib.filter.cardDiscardable(card,player,'shencai_respond'); },'h')) return false; @@ -2004,7 +2005,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ evt=event.getl(player); return evt&&evt.hs&&evt.hs.length>0; }, - content:function(){ + content(){ var cards=player.getCards('h',function(card){ return lib.filter.cardDiscardable(card,player,'shencai_respond'); }); @@ -2022,7 +2023,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'流', trigger:{player:'phaseJieshuBegin'}, forced:true, - content:function(){ + content(){ player.turnOver(); }, intro:{ @@ -2036,16 +2037,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, marktext:'死', mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num-player.countMark('shencai_death'); }, }, trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countMark('shencai_death')>game.countPlayer(); }, - content:function(){ + content(){ player.die(); }, intro:{ @@ -2063,23 +2064,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xunshi:{ audio:2, mod:{ - cardname:function(card){ + cardname(card){ if(lib.skill.xunshi.isXunshi(card)) return 'sha'; }, - cardnature:function(card){ + cardnature(card){ if(lib.skill.xunshi.isXunshi(card)) return false; }, - suit:function(card){ + suit(card){ if(lib.skill.xunshi.isXunshi(card)) return 'none'; }, - targetInRange:function(card){ + targetInRange(card){ if(get.color(card)=='none') return true; }, - cardUsable:function(card){ + cardUsable(card){ if(get.color(card)=='none') return Infinity; }, }, - isXunshi:function(card){ + isXunshi(card){ var info=lib.card[card.name]; if(!info||(info.type!='trick'&&info.type!='delay')) return false; if(info.notarget) return false; @@ -2097,10 +2098,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'useCard2'}, forced:true, - filter:function(event,player){ + filter(event,player){ return get.color(event.card)=='none'; }, - content:function(){ + content(){ 'step 0' if(player.countMark('shencai')<4&&player.hasSkill('shencai',null,null,false)) player.addMark('shencai',1,false); if(trigger.addCount!==false){ @@ -2143,26 +2144,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, twwushen:{ mod:{ - cardname:function(card,player,name){ + cardname(card,player,name){ if(get.suit(card)=='heart') return 'sha'; }, - cardnature:function(card,player){ + cardnature(card,player){ if(get.suit(card)=='heart') return false; }, - targetInRange:function(card){ + targetInRange(card){ if(get.suit(card)=='heart') return true; }, - cardUsable:function(card){ + cardUsable(card){ if(card.name=='sha'&&get.suit(card)=='heart') return Infinity; } }, audio:'wushen', trigger:{player:'useCard2'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&(get.suit(event.card)=='heart'||!player.hasSkill('twwushen_phase',null,null,false)); }, - logTarget:function(event,player){ + logTarget(event,player){ if(get.suit(event.card)=='heart'){ var targets=game.filterPlayer(function(current){ return !event.targets.includes(current)&¤t.hasMark('twwuhun')&&lib.filter.targetEnabled(event.card,player,current); @@ -2173,7 +2174,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return null; }, - content:function(){ + content(){ if(!player.hasSkill('twwushen_phase',null,null,false)){ trigger.directHit.addArray(game.players); player.addTempSkill('twwushen_phase',['phaseZhunbeiAfter','phaseJudgeAfter','phaseDrawAfter','phaseUseAfter','phaseDiscardAfter','phaseJieshuAfter']) @@ -2196,7 +2197,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ return arg.card.name=='sha'&&!player.hasSkill('twwushen_phase',null,null,false); }, }, @@ -2210,12 +2211,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'soil', locked:true, - check:function(event,player){ + check(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.hasMark('twwuhun')&&get.attitude(player,current)<0; }); }, - content:function(){ + content(){ 'step 0' player.judge(function(card){ var name=get.name(card,false); @@ -2261,17 +2262,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ source:'damageSource', }, forced:true, - filter:function(event,player,name){ + filter(event,player,name){ if(event.player==event.source) return false; var target=lib.skill.twwuhun_gain.logTarget(event,player); if(!target||!target.isIn()) return false; return name=='damageEnd'||target.hasMark('twwuhun'); }, - logTarget:function(event,player){ + logTarget(event,player){ if(player==event.player) return event.source; return event.player; }, - content:function(){ + content(){ var target=lib.skill.twwuhun_gain.logTarget(trigger,player); target.addMark('twwuhun',player==trigger.source?1:trigger.num); game.delayx(); @@ -2306,15 +2307,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shouli:{ audio:2, mod:{ - cardUsable:function(card){ + cardUsable(card){ if(card.storage&&card.storage.shouli) return Infinity; }, }, enable:['chooseToUse','chooseToRespond'], - hiddenCard:function(player,name){ + hiddenCard(player,name){ if(player!=_status.currentPhase&&(name=='sha'||name=='shan')) return true; }, - filter:function(event,player){ + filter(event,player){ if(event.responded||event.shouli||event.type=='wuxie') return false; if(game.hasPlayer(function(current){ return current.getCards('e',card=>get.is.attackingMount(card)).length>0; @@ -2332,7 +2333,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, delay:false, locked:false, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ var event=_status.event,evt=event; if(event._backup) evt=event._backup; var equip3=target.getCards('e',card=>get.is.defendingMount(card,false)); @@ -2355,7 +2356,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }) }, prompt:'将场上的一张坐骑牌当做【杀】或【闪】使用或打出', - content:function(){ + content(){ 'step 0' var evt=event.getParent(2); evt.set('shouli',true); @@ -2423,7 +2424,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ evt.set('norestore',true); evt.set('custom',{ add:{}, - replace:{window:function(){}} + replace:{window(){}} }); } else{ @@ -2448,7 +2449,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondSha:true, respondShan:true, - skillTagFilter:function(player,tag){ + skillTagFilter(player,tag){ var func=get.is[tag=='respondSha'?'attackingMount':'defendingMount']; return game.hasPlayer(function(current){ return current.hasCard(card=>func(card,false),'e'); @@ -2456,7 +2457,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, order:2, result:{ - player:function(player,target){ + player(player,target){ var att=Math.max(8,get.attitude(player,target)); if(_status.event.type!='phase') return 9-att; if(!player.hasValueTarget({name:'sha'})) return 0; @@ -2471,7 +2472,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'damageBegin1'}, forced:true, mark:true, - content:function(){ + content(){ trigger.num++; game.setNature(trigger,'thunder'); }, @@ -2504,11 +2505,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, locked:false, - filter:function(event,player){ + filter(event,player){ return event.name!='phase'||game.phaseNumber==0; }, logTarget:()=>game.filterPlayer(), - content:function(){ + content(){ 'step 0' var targets=game.filterPlayer().sortBySeat(player.getNext()); event.targets=targets; @@ -2532,7 +2533,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, shouli_backup:{ sourceSkill:'shouli', - precontent:function(){ + precontent(){ 'step 0' delete event.result.skill; var cards=event.result.card.cards; @@ -2548,7 +2549,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.addTempSkill('shouli_thunder'); player.addTempSkill('shouli_thunder'); }, - filterCard:function(){return false}, + filterCard(){return false}, prompt:'请选择【杀】的目标', selectCard:-1, }, @@ -2556,7 +2557,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:['useCard','respond']}, frequent:true, - filter:function(event,player){ + filter(event,player){ var suit=get.suit(event.card); if(!lib.suit.includes(suit)||player.hasCard(function(card){ return get.suit(card,player)==suit; @@ -2567,7 +2568,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },'e') }) }, - content:function(){ + content(){ var suit=get.suit(trigger.card); player.draw(game.countPlayer(function(current){ return current.countCards('e',function(card){ @@ -2614,7 +2615,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, charlotte:true, equipSkill:true, - filter:function(event,player){ + filter(event,player){ var evt=event.getl(player); if(!evt||!evt.es||!evt.es.length) return false; for(var i of evt.es){ @@ -2622,7 +2623,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - getEffect:function(player,target){ + getEffect(player,target){ if(player==target) return 0; var getRaw=function(){ var att=get.attitude(player,target); @@ -2650,7 +2651,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return getRaw()*get.attitude(player,target); }, - content:function(){ + content(){ 'step 0' var num=0,recover=0; var evt=trigger.getl(player); @@ -2701,14 +2702,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'enterGame', }, forced:true, - filter:function(event,player){ + filter(event,player){ if(player.storage.dili) return false; if(event.name!='phase') return true; if(game.phaseNumber==0) return true; //让神山识能够获得东吴命运线 return player.name=='key_shiki'; }, - content:function(){ + content(){ player.storage.dili=true; var skill=['dili_shengzhi','dili_chigang','dili_qionglan','dili_quandao','dili_jiaohui','dili_yuanlv'].randomGet(); player.addSkill(skill); @@ -2720,7 +2721,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ var num=get.number(event.card); if(typeof num!='number') return false; if(num<=1) return false; @@ -2734,18 +2735,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return true; }, - content:function(){ + content(){ trigger.directHit.addArray(game.filterPlayer(function(current){ return current!=player; })); }, - init:function(player,skill){ + init(player,skill){ player.markAuto('yuheng_current',['gzyinghun','hongde','rebingyi']); }, mark:true, ai:{ directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ if(arg&&arg.card){ var num=get.number(arg.card); if(typeof num!='number') return false; @@ -2760,7 +2761,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, intro:{ name:'命运线:圣质', - content:function(storage,player){ + content(storage,player){ var finished=[],unfinished=['gzyinghun','hongde','rebingyi']; if(player.storage.yuheng){ for(var i=0;i0) game.cardsDiscard(cards); var type=get.subtype(trigger.card); @@ -2979,7 +2980,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:true, intro:{ name:'命运线:渊虑', - content:function(storage,player){ + content(storage,player){ var finished=[],unfinished=['xinfu_guanchao','drlt_jueyan','lanjiang']; if(player.storage.yuheng){ for(var i=0;i=9; }, - content:function(){ + content(){ 'step 0' player.unmarkSkill('jiufa'); event.cards=get.cards(9); @@ -3171,10 +3172,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, popup:false, firstDo:true, - filter:function(event,player){ + filter(event,player){ return !player.getStorage('jiufa').includes(event.card.name); }, - content:function(){ + content(){ trigger.jiufa_counted=true; player.markAuto('jiufa',[trigger.card.name]); }, @@ -3185,7 +3186,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:['loseAfter','cardsDiscardAfter','loseAsyncAfter']}, forced:true, - filter:function(event,player){ + filter(event,player){ if(event.name.indexOf('lose')==0){ if(event.getlx===false||event.position!=ui.discardPile) return false; } @@ -3201,7 +3202,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ var num=0; for(var i of trigger.cards){ var owner=false; @@ -3217,10 +3218,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ maxHp:{ trigger:{player:['tianrenAfter','gainMaxHpAfter','loseMaxHpAfter']}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countMark('tianren')>=player.maxHp; }, - content:function(){ + content(){ player.removeMark('tianren',player.maxHp); player.gainMaxHp(); player.draw(2); @@ -3234,10 +3235,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ limited:true, skillAnimation:true, animationColor:'ice', - filter:function(event,player){ + filter(event,player){ return player.maxHp>9; }, - content:function(){ + content(){ 'step 0' player.awakenSkill('pingxiang'); player.loseMaxHp(9); @@ -3257,7 +3258,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - order:function(){ + order(){ return get.order({ name:'sha', nature:'fire', @@ -3265,7 +3266,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, result:{ - player:function(player){ + player(player){ if(player.hasValueTarget({ name:'sha', nature:'fire', @@ -3280,7 +3281,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ marktext:'襄', intro:{content:'手牌上限基数改为体力上限'}, mod:{ - maxHandcardBase:function(player){ + maxHandcardBase(player){ return player.maxHp; }, }, @@ -3291,10 +3292,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ groupSkill:true, trigger:{player:['phaseUseBegin','phaseUseEnd']}, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.group=='shen'; }, - content:function(){ + content(){ 'step 0' player.draw(2).gaintag=['hina_shenshi']; player.addSkill('hina_shenshi_yingbian'); @@ -3317,7 +3318,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 3' game.delayx(); }, - onremove:function(player){ + onremove(player){ player.removeGaintag('hina_shenshi'); }, group:'hina_shenshi_yingbian', @@ -3360,13 +3361,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yingba:{ audio:2, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(num>0&&_status.event&&_status.event.type=='phase'&&get.tag(card,'recover')){ if(player.needsToDiscard()) return num/3; return 0; } }, - targetInRange:function(card,player,target){ + targetInRange(card,player,target){ if(target.hasMark('yingba_mark')) return true; } }, @@ -3374,7 +3375,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filter:(event,player)=>(game.hasPlayer((current)=>(current!=player&¤t.maxHp>1))), filterTarget:(card,player,target)=>(target!=player&&target.maxHp>1), - content:function(){ + content(){ 'step 0' target.loseMaxHp(); 'step 1' @@ -3388,11 +3389,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:3, order:11, result:{ - player:function(player,target){ + player(player,target){ if(player.maxHp==1) return -2.5; return -0.25; }, - target:function(player,target){ + target(player,target){ if(target.isHealthy()) return -2; if(!target.hasMark('yingba_mark')) return -1; return -0.2; @@ -3408,7 +3409,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ onunmark:true, }, mod:{ - maxHandcard:function(player,numx){ + maxHandcard(player,numx){ var num=player.countMark('yingba_mark'); if(num) return numx+num*game.countPlayer(function(current){ return current.hasSkill('yingba'); @@ -3422,11 +3423,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCardToPlayered'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.target&&event.target.hasMark('yingba_mark'); }, logTarget:'target', - content:function(){ + content(){ trigger.directHit.add(trigger.target); if(player.getHistory('gain',function(evt){ return evt.getParent(2).name=='scfuhai'; @@ -3435,7 +3436,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:['scfuhai_die'], ai:{ directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ return arg&&arg.target&&arg.target.hasMark('yingba_mark') }, }, @@ -3443,15 +3444,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usea:{ trigger:{player:'useCardAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return lib.skill.scfuhai_usea.logTarget(event,player).length>0; }, - logTarget:function(event,player){ + logTarget(event,player){ return event.targets.filter(function(i){ return i.hasMark('yingba_mark'); }); }, - content:function(){ + content(){ var num=0; for(var i of trigger.targets){ var numx=i.countMark('yingba_mark'); @@ -3466,10 +3467,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ die:{ trigger:{global:'die'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.player.countMark('yingba_mark')>0; }, - content:function(){ + content(){ player.gainMaxHp(trigger.player.countMark('yingba_mark')); player.draw(trigger.player.countMark('yingba_mark')); }, @@ -3479,23 +3480,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ pinghe:{ audio:2, mod:{ - maxHandcardBase:function(player){ + maxHandcardBase(player){ return player.getDamagedHp(); }, }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'recover')&&_status.event.type=='phase'&&!player.needsToDiscard()) return 0.2; } } }, trigger:{player:'damageBegin2'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.source&&event.source!=player&&player.maxHp>1&&player.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' player.chooseCardTarget({ prompt:'请选择【冯河】的牌和目标', @@ -3503,13 +3504,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:true, forced:true, filterTarget:lib.filter.notMe, - ai1:function(card){ + ai1(card){ if(get.tag(card,'recover')&&!game.hasPlayer(function(current){ return get.attitude(current,player)>0&&!current.hasSkillTag('nogain'); })) return 0; return 1/Math.max(0.1,get.value(card)); }, - ai2:function(target){ + ai2(target){ var player=_status.event.player,att=get.attitude(player,target); if(target.hasSkillTag('nogain')) att/=9; return 4+att; @@ -3536,10 +3537,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)&&!lib.inpile.includes('qizhengxiangsheng'); }, - content:function(){ + content(){ game.addGlobalSkill('tianzuo_global'); var cards=[]; for(var i=2;i<10;i++){ @@ -3557,15 +3558,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{target:'useCardToBefore'}, forced:true, priority:15, - filter:function(event,player){ + filter(event,player){ return event.card&&event.card.name=='qizhengxiangsheng'; }, - content:function(){ + content(){ trigger.cancel(); }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(card&&card.name=='qizhengxiangsheng') return 'zeroplayertarget'; }, } @@ -3575,10 +3576,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardToPlayered'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.card.name=='qizhengxiangsheng'; }, - content:function(){ + content(){ 'step 0' var target=trigger.target; event.target=target; @@ -3607,12 +3608,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ rewrite:{ audio:'tianzuo', trigger:{global:'useCardToTargeted'}, - filter:function(event,player){ + filter(event,player){ return event.card.name=='qizhengxiangsheng'; }, logTarget:'target', prompt2:'观看其手牌并修改“奇正相生”标记', - content:function(){ + content(){ 'step 0' var target=trigger.target; event.target=target; @@ -3656,11 +3657,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{global:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(!event.card.isCard||!event.cards||event.cards.length!==1) return false; return event.card.name=='qizhengxiangsheng'||get.zhinangs().includes(event.card.name)||player.getStorage('dinghan').includes(event.card.name); }, - content:function(){ + content(){ player.draw(); }, subSkill:{ @@ -3691,11 +3692,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=='useCardToTarget'&&get.type(event.card,null,false)!='trick') return false; return !player.getStorage('dinghan').includes(event.card.name); }, - content:function(){ + content(){ player.markAuto('dinghan',[trigger.card.name]);if(trigger.name=='addJudge'){ trigger.cancel(); var owner=get.owner(trigger.card); @@ -3716,7 +3717,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ add:{ trigger:{player:'phaseBegin'}, direct:true, - content:function(){ + content(){ 'step 0' var dialog=[get.prompt('dinghan')];list1=player.getStorage('dinghan'),list2=lib.inpile.filter(function(i){ return get.type2(i,false)=='trick'&&!list1.includes(i); @@ -3761,10 +3762,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{target:'useCardToTarget'}, forced:true, logTarget:'player', - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&event.player.hp>player.hp; }, - content:function(){ + content(){ 'step 0' player.judge(function(result){ if(get.suit(result)=='heart') return 2; @@ -3781,7 +3782,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target,current,isLink){ + target(card,player,target,current,isLink){ if(card.name=='sha'&&!isLink&&player.hp>target.hp) return 0.5; }, }, @@ -3802,12 +3803,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ remove:{ audio:'tspowei3', trigger:{global:'damageEnd'}, - filter:function(event,player){ + filter(event,player){ return event.player&&event.player.isIn()&&event.player.hasMark('dulie'); }, forced:true, logTarget:'player', - content:function(){ + content(){ trigger.player.removeMark('dulie',trigger.player.countMark('dulie')); }, }, @@ -3815,11 +3816,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'tspowei3', trigger:{global:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return event.player!=player&&event.player.hasMark('dulie')&& (player.countCards('h')>0||player.hp>=event.player.hp&&event.player.countCards('h')>0); }, - content:function(){ + content(){ 'step 0' var list=[],target=trigger.player,choiceList=[ '弃置一张牌并对其造成1点伤害', @@ -3861,7 +3862,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ inRange:{ charlotte:true, mod:{ - inRangeOf:function(from,to){ + inRangeOf(from,to){ if(from==_status.currentPhase) return true; }, }, @@ -3873,13 +3874,13 @@ 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; }, - logTarget:function(event,player){ + logTarget(event,player){ return game.filterPlayer((current)=>current!=player&&!current.hasMark('dulie')); }, - content:function(){ + content(){ var list=game.filterPlayer((current)=>current!=player&&!current.hasMark('dulie')).sortBySeat(); for(var i of list) i.addMark('dulie',1,false); }, @@ -3888,10 +3889,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'tspowei3', trigger:{player:'phaseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer((current)=>current!=player&¤t.hasMark('dulie')); }, - content:function(){ + content(){ var list=game.filterPlayer((current)=>current!=player&¤t.hasMark('dulie')).sortBySeat(); var map={}; for(var i of list){ @@ -3912,12 +3913,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, skillAnimation:true, animationColor:'metal', - filter:function(event,player){ + filter(event,player){ return !game.hasPlayer(function(current){ return current.hasMark('dulie'); }); }, - content:function(){ + content(){ game.log(player,'成功完成使命'); player.awakenSkill('tspowei'); player.addSkillLog('shenzhu'); @@ -3927,7 +3928,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'tspowei2', trigger:{player:'dying'}, forced:true, - content:function(){ + content(){ 'step 0' game.log(player,'使命失败'); player.awakenSkill('tspowei'); @@ -3946,10 +3947,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCardAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&event.card.isCard&&event.cards.length==1; }, - content:function(){ + content(){ 'step 0' player.chooseControl().set('choiceList',[ '摸一张牌,且本回合使用【杀】的次数上限+1', @@ -3971,7 +3972,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ charlotte:true, onremove:true, mod:{ - cardUsable:function(card,player,num){ + cardUsable(card,player,num){ if(card.name=='sha') return num+player.countMark('shenzhu_more'); }, }, @@ -3979,7 +3980,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ less:{ charlotte:true, mod:{ - cardEnabled:function(card){ + cardEnabled(card){ if(card.name=='sha') return false; } }, @@ -3990,7 +3991,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCard2'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.card.name!='sha'||player.hp<=1) return false; var evt=event.getParent('phaseUse'); return evt&&evt.player==player&&player.getHistory('useCard',function(evtx){ @@ -3999,7 +4000,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return !event.targets.includes(current)&&lib.filter.filterTarget(event.card,player,current); }); }, - content:function(){ + content(){ 'step 0' var num=Math.min(player.hp-1,game.countPlayer(function(current){ return !trigger.targets.includes(current)&&lib.filter.filterTarget(trigger.card,player,current); @@ -4028,10 +4029,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.maxHp<10; }, - content:function(){ + content(){ 'step 0' event.cards=[]; event.suits=[]; @@ -4066,7 +4067,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 4' if(target.isMaxHandcard()) player.loseMaxHp(); }, - callback:function(){ + callback(){ 'step 0' var evt=event.getParent(2); event.getParent().orderingCards.remove(event.judgeResult.card); @@ -4091,11 +4092,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.maxHp<10; }, filterTarget:true, - content:function(){ + content(){ 'step 0' target.draw(); 'step 1' @@ -4125,7 +4126,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:0.5, result:{ target:0.2, - player:function(player,target){ + player(player,target){ var list=[],hs=target.getCards('h'); for(var i of hs) list.add(get.suit(i,target)); if(list.length==0) return 0; @@ -4143,12 +4144,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, skillAnimation:true, animationColor:'gray', - filter:function(event,player){ + filter(event,player){ return !game.hasPlayer(function(current){ return current.getAllHistory('damage').length==0; }); }, - content:function(){ + content(){ 'step 0' player.awakenSkill('stianyi'); player.gainMaxHp(2); @@ -4171,7 +4172,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ var target=player.storage.zuoxing; if(!target||!target.isIn()||target.maxHp<2) return false; for(var i of lib.inpile){ @@ -4180,17 +4181,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var list=[]; for(var i of lib.inpile){ if(get.type(i)=='trick'&&event.filterCard({name:i,isCard:true},player,event)) list.push(['锦囊','',i]); } return ui.create.dialog('佐幸',[list,'vcard']); }, - check:function(button){ + check(button){ return _status.event.player.getUseValue({name:button.link[2],isCard:true}); }, - backup:function(links,player){ + backup(links,player){ return { viewAs:{ name:links[0][2], @@ -4199,7 +4200,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:()=>false, selectCard:-1, popname:true, - precontent:function(){ + precontent(){ player.logSkill('zuoxing'); var target=player.storage.zuoxing; target.loseMaxHp(); @@ -4207,7 +4208,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, } }, - prompt:function(links,player){ + prompt(links,player){ return '请选择'+get.translation(links[0][2])+'的目标'; }, }, @@ -4217,12 +4218,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'sghuishi', inherit:'sghuishi', filterTarget:true, - prompt:function(){ + prompt(){ var player=_status.event.player; if(player.maxHp>=game.players.length) return '选择一名角色。若其拥有未发动过的觉醒技,则你解除其中一个觉醒技的发动限制;否则其摸四张牌。然后你减2点体力上限。'; return '令一名角色摸四张牌,然后你减2点体力上限。'; }, - content:function(){ + content(){ 'step 0' player.awakenSkill('resghuishi'); var list=target.getSkills(null,false,false).filter(function(skill){ @@ -4256,7 +4257,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:0.1, expose:0.2, result:{ - target:function(player,target){ + target(player,target){ if(target!=player&&player.hasUnknown()||player.maxHp<(player.getDamagedHp()>1?5:6)) return 0; if(target==player&&player.hasSkill('resghuishi')&&game.hasPlayer(function(current){ return current.getAllHistory('damage').length==0; @@ -4279,7 +4280,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'water', filterTarget:lib.filter.notMe, - content:function(){ + content(){ 'step 0' player.awakenSkill('sghuishi'); var list=target.getSkills(null,false,false).filter(function(skill){ @@ -4307,7 +4308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:0.1, expose:0.2, result:{ - target:function(player,target){ + target(player,target){ if(player.hasUnknown()||player.maxHp<5) return 0; var list=target.getSkills(null,false,false).filter(function(skill){ var info=lib.skill[skill]; @@ -4321,7 +4322,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, zhanjiang:{ trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ + filter(event,player){ var players=game.filterPlayer(); for(var i=0;i0){ @@ -4329,7 +4330,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - content:function(){ + content(){ var players=game.filterPlayer(); for(var i=0;i4; var evt=event.getl(player); if(!evt||!evt.hs||evt.hs.length==0||player.countCards('h')>=4) return false; @@ -4373,7 +4374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ var num=4-player.countCards('h'); if(num>0) player.draw(num); else player.chooseToDiscard('h',true,-num); @@ -4386,13 +4387,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target:'useCardToTargeted', }, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.name!='phaseJieshu'&&event.card.name!='sha') return false; return game.hasPlayer(function(current){ return current!=player&¤t.countCards('h'); }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('meihun'),function(card,player,target){ return target!=player&&target.countCards('h')>0; @@ -4434,7 +4435,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ if(game.countPlayer()<3) return false; for(var i of lib.suit){ if(player.countCards('h',{suit:i})>1) return true; @@ -4443,7 +4444,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, complexCard:true, position:'h', - filterCard:function(card,player){ + filterCard(card,player){ if(!ui.selected.cards.length){ var suit=get.suit(card); return player.countCards('h',function(card2){ @@ -4460,11 +4461,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:false, discard:false, lose:false, - check:function(card){ + check(card){ return 6-get.value(card); }, targetprompt:['拼点发起人','拼点目标'], - content:function(){ + content(){ 'step 0' var list=[]; for(var i=0;i1; }, logTarget:'player', skillAnimation:true, animationColor:'key', - content:function(){ + content(){ trigger.player.removeMark('huoxin',trigger.player.countMark('huoxin')); trigger.player._trueMe=player; game.addGlobalSkill('autoswap'); @@ -4535,10 +4536,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forceDie:true, forced:true, silent:true, - content:function(){ + content(){ player.removeSkill('huoxin2'); }, - onremove:function(player){ + onremove(player){ if(player==game.me){ if(!game.notMe) game.swapPlayerAuto(player._trueMe) else delete game.notMe; @@ -4551,7 +4552,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'roundStart'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('shiki_omusubi'),lib.filter.notMe).set('ai',function(target){ var player=_status.event.player; @@ -4593,7 +4594,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kagari_zongsi:{ enable:'phaseUse', usable:1, - content:function(){ + content(){ 'step 0' var controls=[]; if(ui.cardPile.hasChildNodes()) controls.push('选择牌堆中的一张牌'); @@ -4729,18 +4730,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, enable:'phaseUse', usable:1, - filter:function(event,player){ - return player.countCards('h',lib.skill.caopi_xingdong.filterCard); + filter(event,player){ + return player.countCards('h',lib.skill.caopi_xingdong.filterCard)>0; }, - 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' @@ -4762,7 +4763,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; @@ -4788,7 +4789,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseEnd'}, direct:true, - content:function(){ + content(){ 'step 0' event.logged=false; event.targets=[]; @@ -4853,7 +4854,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, qixian:{ mod:{ - maxHandcardBase:function(player,num){ + maxHandcardBase(player,num){ return 7; }, }, @@ -4861,12 +4862,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chuyuan:{ audio:2, trigger:{global:'damageEnd'}, - filter:function(event,player){ + filter(event,player){ return event.player.isIn()&&player.getExpansions('chuyuan').length=3; }, - content:function(){ + content(){ player.awakenSkill(event.name); player.addSkill('tianxing'); player.addSkill('new_rejianxiong'); @@ -4913,10 +4914,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('chuyuan').length>=3; }, - content:function(){ + content(){ 'step 0' player.awakenSkill(event.name); player.loseMaxHp(); @@ -4938,7 +4939,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'drlt_zhiti', global:'olzhiti2', mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ if(game.hasPlayer(function(current){ return current.isDamaged(); })) return num+1; @@ -4946,7 +4947,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:['phaseDrawBegin2','phaseEnd']}, forced:true, - filter:function(event,player){ + filter(event,player){ var num=event.name=='phase'?5:3; if(num==3?event.numFixed:!game.hasPlayer(function(current){ return current.hasEnabledSlot(); @@ -4956,7 +4957,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })>=num; }, direct:true, - content:function(){ + content(){ 'step 0' if(trigger.name=='phaseDraw'){ player.logSkill('olzhiti'); @@ -4988,7 +4989,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, olzhiti2:{ mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ if(player.isDamaged()) return num-game.countPlayer(function(current){ return current.hasSkill('olzhiti')&¤t.inRange(player); }) @@ -5000,7 +5001,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ source:'damageSource' }, - filter:function(event,player){ + filter(event,player){ if(!player.isPhaseUsing()||event.player.isDead()) return false; for(var i in event.player.disabledSkills){ if(event.player.disabledSkills[i].includes('olduorui2')) return false; @@ -5022,7 +5023,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return list.length>0; }, - check:function(event,player){ + check(event,player){ if(get.attitude(_status.event.player,event.player)>=0) return false; if(event.getParent('phaseUse').skipped) return true; var nd=player.needsToDiscard(); @@ -5031,7 +5032,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })==0; }, logTarget:'player', - content:function(){ + content(){ 'step 0' var list=[]; var listm=[]; @@ -5058,14 +5059,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, olduorui2:{ - onremove:function(player,skill){ + onremove(player,skill){ player.enableSkill(skill); }, locked:true, mark:true, charlotte:true, intro:{ - content:function(storage,player,skill){ + content(storage,player,skill){ var list=[]; for(var i in player.disabledSkills){ if(player.disabledSkills[i].includes(skill)) list.push(i); @@ -5084,12 +5085,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ new_wuhun:{ audio:'wuhun2', trigger:{player:'damageEnd'}, - filter:function(event,player){ + filter(event,player){ return event.source&&event.source.isIn(); }, forced:true, logTarget:'source', - content:function(){ + content(){ trigger.source.addMark('new_wuhun',trigger.num); }, group:'new_wuhun_die', @@ -5125,7 +5126,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ die:{ audio:'wuhun2', trigger:{player:'die'}, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.hasMark('new_wuhun'); }); @@ -5135,7 +5136,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forceDie:true, skillAnimation:true, animationColor:'soil', - content:function(){ + content(){ 'step 0' var num=0; for(var i=0;i1) return true; var num=game.countPlayer(function(current){ if(current.countCards('he')&¤t!=player&&get.attitude(player,current)<=0){ @@ -5187,7 +5188,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return num>=2; }, - content:function (){ + content (){ "step 0" var targets=game.filterPlayer(); targets.remove(player); @@ -5246,12 +5247,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ maixie:true, "maixie_hp":true, - threaten:function (player,target){ + threaten (player,target){ if(target.hp==1) return 2.5; return 1; }, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')&&target.hp>(player.hasSkillTag('damageBonus',true,{ card:card, target:target @@ -5278,13 +5279,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ol_shenfen:{ audio:2, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.countMark('baonu')>=6; }, usable:1, skillAnimation:true, animationColor:'metal', - content:function(){ + content(){ "step 0" event.delay=false; player.removeMark('baonu',6); @@ -5326,7 +5327,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ combo:'baonu', order:10, result:{ - player:function(player){ + player(player){ return game.countPlayer(function(current){ if(current!=player){ return get.sgn(get.damageEffect(current,player,player)); @@ -5340,13 +5341,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', derivation:'wushuang', - filter:function(event,player){ + filter(event,player){ return player.countMark('baonu')>=2&&game.hasPlayer(target=>lib.skill.ol_wuqian.filterTarget(null,player,target)); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&!target.hasSkill('ol_wuqian_targeted'); }, - content:function(){ + content(){ player.removeMark('baonu',2); player.addTempSkill('wushuang'); player.popup('无双'); @@ -5356,7 +5357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:9, result:{ - target:function(player,target){ + target(player,target){ if(player.countCards('hs',card=>{ if(!player.getCardUsable({name:card.name})) return false; if(!player.canUse(card,target)) return false; @@ -5379,7 +5380,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ ai:{ unequip2:true, - skillTagFilter:function(player){ + skillTagFilter(player){ if(!_status.baonuCheck) return false; }, }, @@ -5390,10 +5391,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCard'}, forced:true, - filter:function(event){ + filter(event){ return get.type(event.card)=='trick'; }, - content:function(){ + content(){ 'step 0' if(player.hasMark('baonu')){ player.chooseControlList([ @@ -5420,7 +5421,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - player_use:function(card,player){ + player_use(card,player){ if (get.type(card)=='trick'&&get.value(card)<6){ return [0,-2]; } @@ -5432,14 +5433,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseDiscardEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ var cards=[]; player.getHistory('lose',function(evt){ if(evt.type=='discard'&&evt.getParent('phaseDiscard')==event) cards.addArray(evt.cards2); }); return cards.length>1; }, - content:function(){ + content(){ "step 0" event.forceDie=true; if(typeof event.count!='number'){ @@ -5519,10 +5520,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'phaseAfter'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.getStat('kill')>0; }, - content:function(){ + content(){ player.insertPhase(); } }, @@ -5536,10 +5537,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'phaseBefore', }, forced:true, - filter:function(event){ + filter(event){ return (event.name!='damage'&&(event.name!='phase'||game.phaseNumber==0))||event.num>0; }, - content:function(){ + content(){ player.addMark('baonu',trigger.name=='damage'?trigger.num:2); }, intro:{ @@ -5556,13 +5557,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, unique:true, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.storage.baonu>=6; }, skillAnimation:true, animationColor:'metal', limited:true, - content:function(){ + content(){ "step 0" player.awakenSkill('shenfen'); player.storage.baonu-=6; @@ -5590,7 +5591,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - player:function(player){ + player(player){ return game.countPlayer(function(current){ if(current!=player){ return get.sgn(get.damageEffect(current,player,player)); @@ -5604,17 +5605,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', derivation:'wushuang', - filter:function(event,player){ + filter(event,player){ return player.storage.baonu>=2&&!player.hasSkill('wushuang'); }, - content:function(){ + content(){ player.storage.baonu-=2; player.addTempSkill('wushuang'); }, ai:{ order:5, result:{ - player:function(player){ + player(player){ if(!player.storage.shenfen) return 0; var cards=player.getCards('h','sha'); if(cards.length){ @@ -5637,10 +5638,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'renjie2', notemp:true, //mark:true, - filter:function(event){ + filter(event){ return event.num>0; }, - content:function(){ + content(){ player.addMark('renjie',trigger.num); }, intro:{ @@ -5652,7 +5653,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ maixie_hp:true, combo:'sbaiyin', effect:{ - target:function(card,player,target){ + target(card,player,target){ if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; if(get.tag(card,'damage')){ if(target.hp==target.maxHp){ @@ -5664,7 +5665,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 0.7; } }, - player:function(card,player){ + player(card,player){ if(_status.currentPhase!=player) return; if(_status.event.name!='chooseToUse'||_status.event.player!=player) return; if(get.type(card)=='basic') return; @@ -5694,12 +5695,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'loseAsyncAfter', }, forced:true, - filter:function(event,player){ + filter(event,player){ if(event.type!='discard'||event.getlx===false) return false; var evt=event.getParent('phaseDiscard'),evt2=event.getl(player); return evt&&evt2&&evt.name=='phaseDiscard'&&evt.player==player&&evt2.cards2&&evt2.cards2.length>0; }, - content:function(){ + content(){ player.addMark('renjie',trigger.getl(player).cards2.length); }, }, @@ -5711,10 +5712,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, unique:true, audio:2, - filter:function(event,player){ + filter(event,player){ return player.countMark('renjie')>=4; }, - content:function(){ + content(){ player.loseMaxHp(); player.addSkill('jilue'); player.awakenSkill('sbaiyin'); @@ -5732,10 +5733,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:1, trigger:{global:'judge'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('hes')>0&&player.hasMark('renjie'); }, - content:function(){ + content(){ "step 0" player.chooseCard('是否弃置一枚“忍”,并发动〖鬼才〗?','hes',function(card){ var player=_status.event.player; @@ -5790,10 +5791,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'damageEnd'}, direct:true, //priority:-1, - filter:function(event,player){ + filter(event,player){ return player.hasMark('renjie'); }, - content:function(){ + content(){ "step 0" player.chooseTarget('是否弃置一枚“忍”,并发动【放逐】?',function(card,player,target){ return player!=target @@ -5832,10 +5833,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['shen_simayi'], enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.hasMark('renjie'); }, - content:function(){ + content(){ player.removeMark('renjie',1); player.addTempSkill('rewansha'); }, @@ -5862,7 +5863,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jilue_zhiheng:{ audio:1, mod:{ - aiOrder:function(player,card,num){ + aiOrder(player,card,num){ if(num<=0||get.itemtype(card)!='card'||get.type(card)!='equip') return num; let eq=player.getEquip(get.subtype(card)); if(eq&&get.equipValue(card)-get.equipValue(eq)=8; @@ -5889,7 +5890,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 6-get.value(card) }, - content:function(){ + content(){ 'step 0' player.removeMark('renjie',1); player.discard(cards); @@ -5905,12 +5906,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(event.num+cards.length); }, ai:{ - order:function(item,player){ + order(item,player){ if(player.hasCard((i)=>get.value(i)>Math.max(6,9-player.hp),'he')) return 1; return 10; }, result:{ - player:function(player){ + player(player){ var num=0; var cards=player.getCards('he'); for(var i=0;iget.name(card)!=='tao','h'); }, }, @@ -5932,10 +5933,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jilue_jizhi:{ audio:1, trigger:{player:'useCard'}, - filter:function(event,player){ + filter(event,player){ return (get.type(event.card,'trick')=='trick'&&event.card.isCard&&player.hasMark('renjie')); }, - content:function(){ + content(){ 'step 0' player.removeMark('renjie',1); player.draw(); @@ -5958,7 +5959,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('jilue_jizhi_clear'); }, }, @@ -5968,26 +5969,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, wushen:{ mod:{ - cardname:function(card,player,name){ + cardname(card,player,name){ if(get.suit(card)=='heart') return 'sha'; }, - cardnature:function(card,player){ + cardnature(card,player){ if(get.suit(card)=='heart') return false; }, - targetInRange:function(card){ + targetInRange(card){ if(get.suit(card)=='heart') return true; }, - cardUsable:function(card){ + cardUsable(card){ if(card.name=='sha'&&get.suit(card)=='heart') return Infinity; } }, audio:2, trigger:{player:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&get.suit(event.card)=='heart'; }, - content:function(){ + content(){ trigger.directHit.addArray(game.players); if(trigger.addCount!==false){ trigger.addCount=false; @@ -5998,12 +5999,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'respondSha')&¤t<0) return 0.6 } }, directHit_ai:true, - skillTagFilter:function(player,tag,arg){ + skillTagFilter(player,tag,arg){ return arg.card.name=='sha'&&get.suit(arg.card)=='heart'; }, } @@ -6011,7 +6012,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wuhun:{ audio:'wuhun2', trigger:{player:'die'}, - filter:function(event){ + filter(event){ return event.source&&event.source.isIn(); }, forced:true, @@ -6019,12 +6020,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'soil', logTarget:'source', - content:function(){ + content(){ var num=trigger.source.getHp(); if(num>0) trigger.source.loseHp(num); }, ai:{ - threaten:function(player,target){ + threaten(player,target){ if(target.hp==1){ if(player.getHp()<=0) return 100; return 0.2; @@ -6032,7 +6033,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 0.8; }, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(player.getHp()<=0) return; if(!target.hasFriend()) return; if(target.hp<=1&&get.tag(card,'damage')) return [1,0,0,-2]; @@ -6043,7 +6044,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ guixin:{ audio:2, trigger:{player:'damageEnd'}, - check:function(event,player){ + check(event,player){ if(player.isTurnedOver()||event.num>1) return true; var num=game.countPlayer(function(current){ if(current.countCards('he')&¤t!=player&&get.attitude(player,current)<=0){ @@ -6055,7 +6056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); return num>=2; }, - content:function(){ + content(){ 'step 0' event.count=trigger.num; 'step 1' @@ -6076,12 +6077,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ maixie:true, maixie_hp:true, - threaten:function(player,target){ + threaten(player,target){ if(target.hp==1) return 2.5; return 0.5; }, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')&&target.hp>(player.hasSkillTag('damageBonus',true,{ card:card, target:target @@ -6114,10 +6115,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, locked:false, - filter:function(event,player){ + filter(event,player){ return (event.name!='phase'||game.phaseNumber==0); }, - content:function(){ + content(){ "step 0" player.addToExpansion(get.cards(7),'draw').gaintag.add('qixing'); "step 1" @@ -6153,7 +6154,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, intro:{ markcount:'expansion', - mark:function(dialog,content,player){ + mark(dialog,content,player){ var content=player.getExpansions('qixing'); if(content&&content.length){ if(player==game.me||player.isUnderControl()){ @@ -6164,7 +6165,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - content:function(content,player){ + content(content,player){ var content=player.getExpansions('qixing'); if(content&&content.length){ if(player==game.me||player.isUnderControl()){ @@ -6180,10 +6181,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qixing2:{ trigger:{player:'phaseDrawAfter'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('qixing').length>0&&player.countCards('h')>0; }, - content:function(){ + content(){ "step 0" var cards=player.getExpansions('qixing'); if(!cards.length||!player.countCards('h')){ @@ -6220,11 +6221,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dawu:{ trigger:{player:'phaseJieshuBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('qixing').length; }, audio:2, - content:function(){ + content(){ "step 0" var num=Math.min(game.countPlayer(),player.getExpansions('qixing').length); player.chooseTarget(get.prompt('dawu'),'令至多'+get.cnNumber(num)+'名角色获得“大雾”标记', @@ -6269,29 +6270,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nofire:true, nodamage:true, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'damage')&&!get.tag(card,'thunderDamage')) return 'zeroplayertarget'; } }, }, intro:{ - content:function(storage){ + content(storage){ return `共有${storage.length}枚标记`; }, } }, dawu3:{ trigger:{global:'damageBegin4'}, - filter:function(event,player){ + filter(event,player){ return !event.hasNature('thunder')&&event.player.getStorage('dawu2').includes(player); }, forced:true, charlotte:true, logTarget:'player', - content:function(){ + content(){ trigger.cancel(); }, - onremove:function(player){ + onremove(player){ game.countPlayer2(current=>{ if(current.getStorage('dawu2').includes(player)){ current.unmarkAuto('dawu2',[player]); @@ -6305,10 +6306,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseJieshuBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.getExpansions('qixing').length; }, - content:function(){ + content(){ "step 0" player.chooseTarget(get.prompt('kuangfeng'),'令一名角色获得“狂风”标记').ai=function(target){ return -1; @@ -6336,13 +6337,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kuangfeng2:{ charlotte:true, intro:{ - content:function(storage){ + content(storage){ return `共有${storage.length}枚标记`; }, }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'fireDamage')&¤t<0) return 1.5; } } @@ -6350,16 +6351,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kuangfeng3:{ trigger:{global:'damageBegin3'}, - filter:function(event,player){ + filter(event,player){ return event.hasNature('fire')&&event.player.getStorage('kuangfeng2').includes(player); }, charlotte:true, forced:true, logTarget:'player', - content:function(){ + content(){ trigger.num++; }, - onremove:function(player){ + onremove(player){ game.countPlayer2(current=>{ if(current.getStorage('kuangfeng2').includes(player)){ current.unmarkAuto('kuangfeng2',player); @@ -6375,11 +6376,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:3, animationColor:'metal', skillAnimation:'legend', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ var length=ui.selected.cards.length; return (length==0||length==4); }, - filterCard:function(card){ + filterCard(card){ var suit=get.suit(card); for(var i=0;i=1) return [0,0]; if(!target.hasFriend()) return; if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp>1) return [0,1]; } }, - threaten:function(player,target){ + threaten(player,target){ if(target.hp==1) return 2; return 0.5; }, @@ -6496,105 +6497,105 @@ game.import('character',function(lib,game,ui,get,ai,_status){ longhun1:{ audio:true, enable:['chooseToUse','chooseToRespond'], - prompt:function(){ + prompt(){ return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张红桃牌当作桃使用'; }, position:'hes', - check:function(card,event){ + check(card,event){ if(_status.event.player.hp>1) return 0; return 10-get.value(card); }, - selectCard:function(){ + selectCard(){ return Math.max(1,_status.event.player.hp); }, viewAs:{name:'tao'}, - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countCards('hes',{suit:'heart'})>=player.hp; }, - filterCard:function(card){ + filterCard(card){ return get.suit(card)=='heart'; } }, longhun2:{ audio:true, enable:['chooseToUse','chooseToRespond'], - prompt:function(){ + prompt(){ return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张方片当作火杀使用或打出'; }, position:'hes', - check:function(card,event){ + check(card,event){ if(_status.event.player.hp>1) return 0; return 10-get.value(card); }, - selectCard:function(){ + selectCard(){ return Math.max(1,_status.event.player.hp); }, viewAs:{name:'sha',nature:'fire'}, - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countCards('hes',{suit:'diamond'})>=player.hp; }, - filterCard:function(card){ + filterCard(card){ return get.suit(card)=='diamond'; } }, longhun3:{ audio:true, enable:['chooseToUse','chooseToRespond'], - prompt:function(){ + prompt(){ return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张黑桃牌当作无懈可击使用'; }, position:'hes', - check:function(card,event){ + check(card,event){ if(_status.event.player.hp>1) return 0; return 7-get.value(card); }, - selectCard:function(){ + selectCard(){ return Math.max(1,_status.event.player.hp); }, viewAs:{name:'wuxie'}, - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countCards('hes',{suit:'spade'})>=player.hp; }, - filterCard:function(card){ + filterCard(card){ return get.suit(card)=='spade'; } }, longhun4:{ audio:true, enable:['chooseToUse','chooseToRespond'], - prompt:function(){ + prompt(){ return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张梅花牌当作闪使用或打出'; }, position:'hes', - check:function(card,event){ + check(card,event){ if(_status.event.player.hp>1) return 0; return 10-get.value(card); }, - selectCard:function(){ + selectCard(){ return Math.max(1,_status.event.player.hp); }, - viewAsFilter:function(player){ + viewAsFilter(player){ return player.countCards('hes',{suit:'club'})>=player.hp; }, viewAs:{name:'shan'}, - filterCard:function(card){ + filterCard(card){ return get.suit(card)=='club'; } }, juejing:{ mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return 2+num; } }, audio:true, trigger:{player:'phaseDrawBegin2'}, //priority:-5, - filter:function(event,player){ + filter(event,player){ return !event.numFixed&&player.hp0) return true; if(name=='wuxie') return player.countCards('hes',{suit:'spade'})>0; if(name=='tao') return player.countCards('hes',{suit:'heart'})>0; @@ -6731,11 +6732,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard'}, forced:true, popup:false, - filter:function(event){ + filter(event){ var evt=event; return ['sha','tao'].includes(evt.card.name)&&evt.skill=='relonghun'&&evt.cards&&evt.cards.length==2; }, - content:function(){ + content(){ trigger.baseDamage++; } }, @@ -6743,17 +6744,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:['useCardAfter','respondAfter']}, forced:true, popup:false, - logTarget:function(){ + logTarget(){ return _status.currentPhase; }, - autodelay:function(event){ + autodelay(event){ return event.name=='respond'?0.5:false; }, - filter:function(evt,player){ + filter(evt,player){ return ['shan','wuxie'].includes(evt.card.name)&&evt.skill=='relonghun'&& evt.cards&&evt.cards.length==2&&_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.countDiscardableCards(player,'he'); }, - content:function(){ + content(){ //game.log(trigger.card) //game.log(trigger.cards) player.line(_status.currentPhase,'green'); @@ -6766,7 +6767,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'longhun', enable:['chooseToUse','chooseToRespond'], prompt:'将♦牌当做杀,♥牌当做桃,♣牌当做闪,♠牌当做无懈可击使用或打出', - viewAs:function(cards,player){ + viewAs(cards,player){ var name=false; var nature=null; switch(get.suit(cards[0],player)){ @@ -6778,7 +6779,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(name) return {name:name,nature:nature}; return null; }, - check:function(card){ + check(card){ var player=_status.event.player; if(_status.event.type=='phase'){ var max=0; @@ -6803,7 +6804,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 1; }, position:'hes', - filterCard:function(card,player,event){ + filterCard(card,player,event){ event=event||_status.event; var filter=event._backup.filterCard; var name=get.suit(card,player); @@ -6813,7 +6814,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(name=='heart'&&filter({name:'tao',cards:[card]},player,event)) return true; return false; }, - filter:function(event,player){ + filter(event,player){ var filter=event.filterCard; if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true; if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true; @@ -6821,14 +6822,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true; return false; }, - precontent:function(){ + precontent(){ delete event.result.skill; player.logSkill('longhun'+(4-lib.suit.indexOf(get.suit(event.result.cards[0],player)))); }, ai:{ respondSha:true, respondShan:true, - skillTagFilter:function(player,tag){ + skillTagFilter(player,tag){ var name; switch(tag){ case 'respondSha':name='diamond';break; @@ -6837,7 +6838,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(!player.countCards('hes',{suit:name})) return false; }, - order:function(item,player){ + order(item,player){ if(player&&_status.event.type=='phase'){ var max=0; var list=['sha','tao']; @@ -6857,7 +6858,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 2; }, }, - hiddenCard:function(player,name){ + hiddenCard(player,name){ if(name=='wuxie'&&_status.connectMode&&player.countCards('hes')>0) return true; if(name=='wuxie') return player.countCards('hes',{suit:'spade'})>0; if(name=='tao') return player.countCards('hes',{suit:'heart'})>0; @@ -6865,24 +6866,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xinjuejing:{ mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return 2+num; } }, audio:2, trigger:{player:['dying','dyingAfter']}, forced:true, - content:function(){ + content(){ player.draw(); } }, shelie:{ audio:2, trigger:{player:'phaseDrawBegin1'}, - filter:function(event,player){ + filter(event,player){ return !event.numFixed; }, - content:function(){ + content(){ "step 0" trigger.changeToZero(); event.cards=get.cards(5); @@ -6941,10 +6942,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['re_lvmeng','gexuan'], enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('h'); }, - content:function(){ + content(){ 'step 0' var cards=target.getCards('h'); player.chooseButton(2,[ @@ -6970,7 +6971,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ threaten:1.5, result:{ - target:function(player,target){ + target(player,target){ return -target.countCards('h'); } }, @@ -6984,7 +6985,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhuanhuanji:true, marktext:'☯', intro:{ - content:function(storage,player,skill){ + content(storage,player,skill){ if(player.storage.nzry_longnu==true) return '锁定技,出牌阶段开始时,你减1点体力上限并摸一张牌,然后本阶段内你的锦囊牌均视为雷杀且无使用次数限制'; return '锁定技,出牌阶段开始时,你失去1点体力并摸一张牌,然后本阶段内你的红色手牌均视为火杀且无距离限制'; }, @@ -6994,7 +6995,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'phaseUseBegin' }, forced:true, - content:function(){ + content(){ 'step 0' player.changeZhuanhuanji('nzry_longnu'); if(player.storage.nzry_longnu!=true){ @@ -7015,19 +7016,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ '1':{ mod:{ - cardname:function(card,player){ + cardname(card,player){ if(get.color(card)=='red') return 'sha'; }, - cardnature:function(card,player){ + cardnature(card,player){ if(get.color(card)=='red') return 'fire'; }, - targetInRange:function(card){ + targetInRange(card){ if(get.color(card)=='red') return true; }, }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'respondSha')&¤t<0) return 0.6 } }, @@ -7036,19 +7037,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, '2':{ mod:{ - cardname:function(card,player){ + cardname(card,player){ if(['trick','delay'].includes(lib.card[card.name].type)) return 'sha'; }, - cardnature:function(card,player){ + cardnature(card,player){ if(['trick','delay'].includes(lib.card[card.name].type)) return 'thunder'; }, - cardUsable:function(card,player){ + cardUsable(card,player){ if(card.name=='sha'&&game.hasNature(card,'thunder')) return Infinity; }, }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'respondSha')&¤t<0) return 0.6 } }, @@ -7068,7 +7069,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"g_nzry_jieying", ai:{ effect:{ - target:function(card){ + target(card){ if(card.name=='tiesuo') return 'zeroplayertarget'; }, }, @@ -7082,11 +7083,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'phaseBefore', }, forced:true, - filter:function(event,player){ + filter(event,player){ if(event.name=='link') return player.isLinked(); return (event.name!='phase'||game.phaseNumber==0)&&!player.isLinked(); }, - content:function(){ + content(){ if(trigger.name!='link') player.link(true); else trigger.cancel(); }, @@ -7097,12 +7098,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'phaseJieshuBegin', }, direct:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&&!current.isLinked(); }); }, - content:function(){ + content(){ "step 0" player.chooseTarget(true,'请选择【结营】的目标',function(card,player,target){ return target!=player&&!target.isLinked(); @@ -7123,7 +7124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, "g_nzry_jieying":{ mod:{ - maxHandcard:function (player,num){ + maxHandcard (player,num){ if(game.countPlayer(function(current){return current.hasSkill('nzry_jieying')})>0&&player.isLinked()) return num+2; }, }, @@ -7140,7 +7141,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ source:"damageSource", }, forced:true, - content:function(){ + content(){ player.addMark('nzry_junlve',trigger.num); }, }, @@ -7150,7 +7151,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"phaseUseBegin", }, direct:true, - content:function(){ + content(){ 'step 0' if(player.countMark('nzry_junlve')%2==1){ player.chooseTarget('是否发动【摧克】,对一名角色造成1点伤害?').ai=function(target){ @@ -7195,7 +7196,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "nzry_dinghuo":{ audio:2, limited:true, - init:function (player){ + init (player){ player.storage.nzry_dinghuo=false; }, intro:{ @@ -7206,22 +7207,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'metal', enable:'phaseUse', - filter:function (event,player){ + filter (event,player){ return !player.storage.nzry_dinghuo&&player.countMark('nzry_junlve')>0; }, - check:function (event,player){ + check (event,player){ var num=game.countPlayer(function(current){return get.attitude(player,current)<0&¤t.isLinked()}); return player.storage.nzry_junlve>=num&&num==game.countPlayer(function(current){return get.attitude(player,current)<0}); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.isLinked(); }, - selectTarget:function(){ + selectTarget(){ return [1,_status.event.player.countMark('nzry_junlve')]; }, multiline:true, multitarget:true, - content:function (){ + content (){ 'step 0' player.awakenSkill('nzry_dinghuo'); player.storage.nzry_dinghuo=true; @@ -7242,7 +7243,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:1, fireAttack:true, result:{ - target:function(player,target){ + target(player,target){ if(target.hasSkillTag('nofire')) return 0; if(lib.config.mode=='versus') return -1; if(player.hasUnknown()) return 0; @@ -7253,17 +7254,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, "drlt_duorui":{ audio:2, - init:function(player,skill){ + init(player,skill){ if(!player.storage.drlt_duorui) player.storage.drlt_duorui=[]; }, trigger:{ source:'damageSource' }, - filter:function(event,player){ + filter(event,player){ if(player.storage.drlt_duorui.length) return false; return event.player.isIn()&&_status.currentPhase==player; }, - check:function(event,player){ + check(event,player){ if(get.attitude(_status.event.player,event.player)>=0) return false; if(player.hasEnabledSlot()&&!player.hasEnabledSlot(5)) return false; return true; @@ -7272,7 +7273,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'bifa','buqu','gzbuqu','songci','funan','xinfu_guhuo','reguhuo','huashen','rehuashen','old_guhuo','shouxi','xinpojun','taoluan','xintaoluan','yinbing','xinfu_yingshi','zhenwei','zhengnan','xinzhengnan','zhoufu', ], logTarget:'player', - content:function(){ + content(){ 'step 0' var list=[]; var listm=[]; @@ -7314,31 +7315,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, "duorui_clear":{ trigger:{global:['phaseAfter','dieAfter'],}, - filter:function(event,player){ + filter(event,player){ if(!player.storage.drlt_duorui_player||!player.storage.drlt_duorui) return false; return player.storage.drlt_duorui_player==event.player&&player.storage.drlt_duorui.length; }, silent:true, forced:true, popup:false, - content:function(){ + content(){ player.removeSkill(player.storage.drlt_duorui[0]); delete player.storage.drlt_duorui_player; player.storage.drlt_duorui=[]; }, }, "drlt_duorui1":{ - init:function(player,skill){ + init(player,skill){ player.disableSkill(skill,player.storage.drlt_duorui); }, - onremove:function(player,skill){ + onremove(player,skill){ player.enableSkill(skill); }, locked:true, mark:true, charlotte:true, intro:{ - content:function(storage,player,skill){ + content(storage,player,skill){ var list=[]; for(var i in player.disabledSkills){ if(player.disabledSkills[i].includes(skill)) list.push(i); @@ -7365,10 +7366,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'juedouAfter' }, forced:true, - filter:function(event,player){ + filter(event,player){ return event.targets&&event.targets.includes(player)&&event.turn!=player&&player.hasDisabledSlot(); }, - content:function(){ + content(){ player.chooseToEnable(); }, }, @@ -7378,10 +7379,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'juedouAfter', }, forced:true, - filter:function(event,player){ + filter(event,player){ return event.turn!=player&&player.hasDisabledSlot(); }, - content:function(){ + content(){ player.chooseToEnable(); }, }, @@ -7391,10 +7392,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'chooseToCompareAfter' }, forced:true, - filter:function(event,player){ + filter(event,player){ return event.result.bool==true&&player.hasDisabledSlot(); }, - content:function(){ + content(){ 'step 0' player.chooseToEnable(); }, @@ -7405,10 +7406,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'chooseToCompareAfter' }, forced:true, - filter:function(event,player){ + filter(event,player){ return (event.targets!=undefined&&event.targets.includes(player)||event.target==player)&&event.result.bool==false&&player.hasDisabledSlot(); }, - content:function(){ + content(){ player.chooseToEnable(); }, }, @@ -7418,10 +7419,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:['damageEnd'] }, forced:true, - filter:function(event,player){ + filter(event,player){ return player.hasDisabledSlot(); }, - content:function(){ + content(){ player.chooseToEnable(); }, }, @@ -7429,7 +7430,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, g_drlt_zhiti:{ mod:{ - maxHandcard:function (player,num){ + maxHandcard (player,num){ if(player.maxHp>player.hp&&game.countPlayer(function(current){ return current!=player&¤t.hasSkill('drlt_zhiti')&¤t.inRange(player); })) return num-1; @@ -7440,11 +7441,11 @@ 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 target!=player&&target.countCards('h')>0; //return target!=player; }, - content:function(){ + content(){ 'step 0' event.list1=[]; event.list2=[]; @@ -7526,7 +7527,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:13, result:{ - target:function(target,player){ + target(target,player){ return -1; }, }, @@ -7534,7 +7535,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, 'drlt_poxi1':{ mod:{ - maxHandcard:function (player,num){ + maxHandcard (player,num){ return num-1; }, }, @@ -7546,12 +7547,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'mark', }, mod:{ - cardUsable:function (card,player,num){ + cardUsable (card,player,num){ if(player.hasMark('drlt_jieying_mark')&&card.name=='sha') return num+game.countPlayer(function(current){ return current.hasSkill('drlt_jieying'); }); }, - maxHandcard:function (player,num){ + maxHandcard (player,num){ if(player.hasMark('drlt_jieying_mark')) return num+game.countPlayer(function(current){ return current.hasSkill('drlt_jieying'); }); @@ -7562,19 +7563,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'phaseDrawBegin2' }, forced:true, - filter:function(event,player){ + filter(event,player){ return !event.numFixed&&player.hasMark('drlt_jieying_mark')&&game.hasPlayer(function(current){ return current.hasSkill('drlt_jieying'); }); }, - content:function(){ + content(){ trigger.num+=game.countPlayer(function(current){ return current.hasSkill('drlt_jieying'); }); }, ai:{ nokeep:true, - skillTagFilter:function(player){ + skillTagFilter(player){ if(!player.hasMark('drlt_jieying_mark')) return false; }, }, @@ -7591,12 +7592,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'phaseBegin' }, forced:true, - filter:function(event,player){ + filter(event,player){ return !game.hasPlayer(function(current){ return current.hasMark('drlt_jieying_mark'); }); }, - content:function(){ + content(){ player.addMark('drlt_jieying_mark',1); }, }, @@ -7606,10 +7607,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"phaseJieshuBegin", }, direct:true, - filter:function(event,player){ + filter(event,player){ return player.hasMark('drlt_jieying_mark'); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('drlt_jieying'),"将“营”交给一名角色;其摸牌阶段多摸一张牌,出牌阶段使用【杀】的次数上限+1且手牌上限+1。该角色回合结束后,其移去“营”标记,然后你获得其所有手牌。",function(card,player,target){ return target!=player; @@ -7641,11 +7642,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'phaseEnd', }, forced:true, - filter:function(event,player){ + filter(event,player){ return player!=event.player&&event.player.hasMark('drlt_jieying_mark')&&event.player.isIn(); }, logTarget:'player', - content:function(){ + content(){ if(trigger.player.countCards('h')>0){ trigger.player.give(trigger.player.getCards('h'),player); } @@ -7662,7 +7663,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ type:'equip', subtype:'equip1', distance:{attackFrom:-5}, - onLose:function(){ + onLose(){ card.fix(); card.remove(); card.destroyed=true; @@ -7670,13 +7671,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('changandajian_destroy'); }, ai:{ - value:function(card,player){ + value(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; return 8; }, - equipValue:function(card,player){ + equipValue(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; @@ -7693,7 +7694,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'shen_sunquan', type:'equip', subtype:'equip2', - onLose:function(){ + onLose(){ card.fix(); card.remove(); card.destroyed=true; @@ -7701,13 +7702,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('changandajian_destroy'); }, ai:{ - value:function(card,player){ + value(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; return 8; }, - equipValue:function(card,player){ + equipValue(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; @@ -7725,7 +7726,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ type:'equip', subtype:'equip3', distance:{globalTo:2}, - onLose:function(){ + onLose(){ card.fix(); card.remove(); card.destroyed=true; @@ -7733,13 +7734,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('changandajian_destroy'); }, ai:{ - value:function(card,player){ + value(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; return 8; }, - equipValue:function(card,player){ + equipValue(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; @@ -7757,7 +7758,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ type:'equip', subtype:'equip4', distance:{globalFrom:-2}, - onLose:function(){ + onLose(){ card.fix(); card.remove(); card.destroyed=true; @@ -7765,13 +7766,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('changandajian_destroy'); }, ai:{ - value:function(card,player){ + value(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; return 8; }, - equipValue:function(card,player){ + equipValue(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; @@ -7789,7 +7790,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ type:'equip', subtype:'equip5', skills:['changandajian_equip5'], - onLose:function(){ + onLose(){ card.fix(); card.remove(); card.destroyed=true; @@ -7797,13 +7798,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('changandajian_destroy'); }, ai:{ - value:function(card,player){ + value(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; return 8; }, - equipValue:function(card,player){ + equipValue(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; @@ -7821,7 +7822,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ type:'equip', subtype:'equip6', distance:{globalTo:2,globalFrom:-2}, - onLose:function(){ + onLose(){ card.fix(); card.remove(); card.destroyed=true; @@ -7829,13 +7830,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('changandajian_destroy'); }, ai:{ - value:function(card,player){ + value(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; return 8; }, - equipValue:function(card,player){ + equipValue(card,player){ if(game.hasPlayer(function(current){ return lib.skill.changandajian_destroy.getEffect(player,current)>0; })) return 0; @@ -7852,7 +7853,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fullskin:true, derivation:'shen_xunyu', filterTarget:lib.filter.notMe, - content:function(){ + content(){ 'step 0' if(!event.qizheng_name){ if(player.isIn()) player.chooseControl('奇兵','正兵').set('prompt','请选择'+get.translation(target)+'的标记').set('choice',function(){ @@ -7926,7 +7927,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ respondSha:1, }, result:{ - target:function(player,target){ + target(player,target){ var e1=1.5*get.sgn(get.damageEffect(target,player,target)); var e2=0; if(target.countGainableCards(player,'h')>0&&!target.hasSkillTag('noh')) e2=-1; @@ -7946,7 +7947,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, dynamicTranslate:{ - nzry_longnu:function(player){ + nzry_longnu(player){ if(player.hasSkill('nzry_longnu_2')) return '转换技,锁定技,阴:出牌阶段开始时,你失去1点体力并摸一张牌,然后本阶段内你的红色手牌均视为火【杀】且无距离限制。阳:出牌阶段开始时,你减1点体力上限并摸一张牌,然后本阶段内你的锦囊牌均视为雷【杀】且无使用次数限制。'; if(player.hasSkill('nzry_longnu_1')) return '转换技,锁定技,阴:出牌阶段开始时,你失去1点体力并摸一张牌,然后本阶段内你的红色手牌均视为火【杀】且无距离限制。阳:出牌阶段开始时,你减1点体力上限并摸一张牌,然后本阶段内你的锦囊牌均视为雷【杀】且无使用次数限制。'; if(player.storage.nzry_longnu==true) return '转换技,锁定技,阴:出牌阶段开始时,你失去1点体力并摸一张牌,然后本阶段内你的红色手牌均视为火【杀】且无距离限制。阳:出牌阶段开始时,你减1点体力上限并摸一张牌,然后本阶段内你的锦囊牌均视为雷【杀】且无使用次数限制。'; diff --git a/character/gujian.js b/character/gujian.js index 59d40f8cc..2cc5f1207 100644 --- a/character/gujian.js +++ b/character/gujian.js @@ -60,7 +60,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gjqt_xieyi', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' var choice=null; var targets=game.filterPlayer(function(current){ @@ -116,7 +116,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gjqt_xieyi', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' var choice='liufengsan'; if(game.hasPlayer(function(current){ @@ -153,7 +153,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gjqt_xieyi', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' var choice='liutouge'; player.chooseVCardButton('选择一张牌视为使用之',['bingpotong','liutouge','mianlijinzhen']).set('ai',function(button){ @@ -179,7 +179,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gjqt_xieyi', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' var choice=null; if(player.getUseValue('longxugou')>0){ @@ -203,7 +203,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:5, result:{ - player:function(player){ + player(player){ if(player.getUseValue('feibiao')>0) return 1; if(player.getUseValue('qiankunbiao')>0) return 1; if(player.getUseValue('longxugou')>0) return 1; @@ -220,18 +220,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ for(var i=0;iplayer.storage.yunyou.length; }, delay:0, - content:function(){ + content(){ var list=get.inpile('land'); for(var i=0;i0; }, - check:function(card){ + check(card){ return 7-get.value(card); }, group:'xuanci_sha', @@ -438,7 +438,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sha:{ trigger:{player:'useCardToAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(event.card.name=='feibiao'){ return event.target.isIn()&&player.canUse('sha',event.target,false); } @@ -446,7 +446,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, logTarget:'target', autodelay:0.5, - content:function(){ + content(){ player.useCard(trigger.target,{name:'sha'},false).line=false; } } @@ -455,15 +455,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xianju:{ trigger:{global:'roundStart'}, forced:true, - init:function(player){ + init(player){ if(game.roundNumber%2==1){ player.addTempSkill('qianxing','roundStart'); } }, - filter:function(event,player){ + filter(event,player){ return game.roundNumber%2==1; }, - content:function(){ + content(){ if(game.roundNumber%2==1){ player.addTempSkill('qianxing','roundStart'); } @@ -483,10 +483,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gain:{ trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return game.roundNumber%2==0; }, - content:function(){ + content(){ var list=get.typeCard('jiguan'); for(var i=0;iplayer.storage.lingyan.length/13) return false; return get.cardPile2(event.card.name)?true:false; }, - content:function(){ + content(){ var card=get.cardPile2(trigger.card.name); if(card){ player.gain(card,'gain2'); @@ -609,7 +609,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tongtian:{ trigger:{player:['useCardAfter','respondAfter']}, forced:true, - filter:function(event,player){ + filter(event,player){ var name=event.card.name; var enemies=player.getEnemies(); for(var i=0;i0) { player.markSkill('yange'); } }, - filter:function(event,player){ + filter(event,player){ return player.storage.yange>0; }, - content:function(){ + content(){ 'step 0' player.chooseTarget(function(card,player,target){ return player!=target; @@ -791,7 +791,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'gameStart',player:'enterGame'}, forced:true, popup:false, - content:function(){ + content(){ player.storage.yange=game.countPlayer(function(current){ return current.isEnemiesOf(player); }); @@ -801,7 +801,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ exit:{ trigger:{player:'phaseAfter'}, silent:true, - content:function(){ + content(){ player.exitSubPlayer(true); if(lib.filter.filterTrigger(trigger,player,'phaseAfter','lianjing')) game.createTrigger('phaseAfter','lianjing',player,trigger); } @@ -816,11 +816,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseAfter'}, direct:true, round:2, - filter:function(event,player){ + filter(event,player){ if(event.skill) return false; return true; }, - content:function(){ + content(){ 'step 0' player.chooseTarget([1,2],get.prompt2('lianjing'),function(card,player,target){ return player!=target; @@ -871,7 +871,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delay(); } }, - content_phase:function(){ + content_phase(){ 'step 0' event.forceDie=true; event.list=[player].concat(player.storage.lianjing_targets); @@ -902,7 +902,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ round:3, trigger:{player:'phaseEnd'}, direct:true, - content:function(){ + content(){ 'step 0' var goon=false; if(player.countCards('he',function(card){ @@ -983,14 +983,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhenying:{ trigger:{player:['useCard','respond']}, forced:true, - filter:function(event,player){ + filter(event,player){ if(!event.card.isCard) return false; if(event.cards[0]&&event.cards[0].zhenying_link) return false; if(get.color(event.card)!='black') return false; if(['delay','equip'].includes(get.type(event.card))) return false; return true; }, - content:function(){ + content(){ var fake=game.createCard(trigger.card); fake.zhenying_link=true; player.gain(fake,'draw')._triggered=null; @@ -1004,21 +1004,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:{ trigger:{player:['useCardAfter','respondAfter']}, forced:true, - filter:function(event,player){ + filter(event,player){ if(get.is.converted(event)) return false; if(!player.countCards('he')) return false; if(event.cards[0]&&event.cards[0].zhenying_link) return true; return false; }, popup:false, - content:function(){ + content(){ player.chooseToDiscard('he',true); } }, lose:{ trigger:{global:'phaseAfter'}, silent:true, - content:function(){ + content(){ var hs=player.getCards('h',function(card){ return card.zhenying_link?true:false; }); @@ -1032,13 +1032,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lingnu:{ trigger:{source:'damageEnd'}, forced:true, - init:function(player){ + init(player){ player.storage.lingnu={}; }, ai:{ threaten:1.3 }, - filter:function(event,player){ + filter(event,player){ var num=0; for(var i in player.storage.lingnu){ num++; @@ -1046,7 +1046,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return event.num>0; }, - content:function(){ + content(){ var check=function(list){ for(var i=0;i0; }, - filter:function(event,player){ + filter(event,player){ return event.player.isMinHandcard(); }, logTarget:'player', - content:function(){ + content(){ trigger.player.draw(); }, ai:{ @@ -1171,16 +1171,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xfanghua:{ trigger:{target:'useCardToBegin'}, priority:-1, - filter:function(event,player){ + filter(event,player){ return get.color(event.card)=='red'&&player.isDamaged(); }, frequent:true, - content:function(){ + content(){ player.recover(); }, ai:{ effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.color(card)=='red'&&target.isDamaged()) return [1,1]; } } @@ -1188,7 +1188,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, duhun:{ enable:'chooseToUse', - filter:function(event,player){ + filter(event,player){ if(event.type!='dying') return false; if(player!=event.dying) return false; if(player.maxHp<=1) return false; @@ -1196,10 +1196,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return true; }, // alter:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('h')>0&&target.hp>0&&target.hp<=player.maxHp; }, - content:function(){ + content(){ 'step 0' player.chooseToCompare(target); 'step 1' @@ -1225,7 +1225,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ order:1, - skillTagFilter:function(player){ + skillTagFilter(player){ if(player.maxHp<=1) return false; if(player.hp>0) return false; if(player.countCards('h')==0) return false; @@ -1245,10 +1245,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ count:{ trigger:{player:'useCard'}, silent:true, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase==player; }, - content:function(){ + content(){ if(!player.storage.yunyin){ player.storage.yunyin=[]; } @@ -1261,12 +1261,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ set:{ trigger:{player:'phaseAfter'}, silent:true, - content:function(){ + content(){ delete player.storage.yunyin; } } }, - filter:function(event,player){ + filter(event,player){ if(!player.storage.yunyin) return true; var hs=player.getCards('h'); for(var i=0;i{ + filter(event,player){ + return event.player!=player&&event.player.isAlive()&&player.countCards('he',{color:'red'})>0&&event.player.getHistory('useCard',evt=>{ return evt.targets&&evt.targets.some(i=>i!==event.player); }).length===0; }, direct:true, - content:function(){ + content(){ "step 0" var next=player.chooseToDiscard('he','魅影:是否弃置一张红色牌视为对'+get.translation(trigger.player)+'使用一张杀?'); next.logSkill=['meiying',trigger.player]; @@ -1669,24 +1669,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jianwu:{ trigger:{player:'shaBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return get.distance(event.target,player,'attack')>1; }, - content:function(){ + content(){ trigger.directHit=true; } }, zuizhan:{ trigger:{player:'useCard'}, popup:false, - filter:function(event,player){ + filter(event,player){ if(event.card.name!='sha') return false; return game.hasPlayer(function(current){ return (event.targets.includes(current)==false&¤t!=player&& lib.filter.targetEnabled(event.card,player,current)) }); }, - content:function(){ + content(){ var list=game.filterPlayer(function(current){ return (trigger.targets.includes(current)==false&¤t!=player&& lib.filter.targetEnabled(trigger.card,player,current)) @@ -1703,10 +1703,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xidie:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>player.hp; }, - content:function(){ + content(){ "step 0" var next=player.chooseToDiscard(get.prompt('xidie'),[1,Math.min(3,player.countCards('h')-player.hp)]); next.ai=function(card){ @@ -1723,24 +1723,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xidie2:{ trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.storage.xidie>0; }, - content:function(){ + content(){ player.draw(player.storage.xidie); player.storage.xidie=0; } }, meihu:{ trigger:{player:'damageEnd'}, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.source)<4; }, - filter:function(event,player){ + filter(event,player){ return event.source&&event.source!=player&&event.source.countCards('h')>0; }, logTarget:'source', - content:function(){ + content(){ "step 0" trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌',true).ai=function(card){ return -get.value(card); @@ -1754,7 +1754,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ maixie_defend:true, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return [1,-1.5]; return [1,0,0,-0.5]; @@ -1765,34 +1765,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xlqianhuan:{ trigger:{player:'phaseAfter'}, - check:function(event,player){ + check(event,player){ return player.hp==1||player.isTurnedOver(); }, - filter:function(event,player){ + filter(event,player){ return player.hp1||player.countCards('h',{color:'black'})>1; }, direct:true, - content:function(){ + content(){ "step 0" var next=player.chooseToDiscard(get.prompt('fumo',trigger.source),2,function(card){ if(get.damageEffect(trigger.source,player,player,'thunder')<=0) return 0; @@ -1821,7 +1821,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fanyin:{ trigger:{player:'phaseEnd'}, direct:true, - content:function(){ + content(){ "step 0" player.chooseTarget(get.prompt('fanyin'),function(card,player,target){ // if(player==target) return false; @@ -1886,10 +1886,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mingkong:{ trigger:{player:'damageBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')==0&&event.num>=1; }, - content:function(){ + content(){ if(trigger.num>=1){ trigger.num--; } @@ -1900,7 +1900,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')&&target.countCards('h')==0){ if(player.hasSkillTag('jueqing',false,target)) return; return 0.1; @@ -1915,10 +1915,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ popup:false, audio:false, vanish:true, - filter:function(event,player){ + filter(event,player){ return player.storage.mingkong?true:false; }, - content:function(){ + content(){ player.draw(); player.storage.mingkong=false; player.removeSkill('mingkong2'); @@ -1927,7 +1927,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuehua:{ trigger:{player:['useCardAfter','respondAfter','discardAfter']}, frequent:true, - filter:function(event,player){ + filter(event,player){ if(player==_status.currentPhase) return false; if(event.cards){ for(var i=0;i0; + filter(event,player){ + return Boolean(event.nature)&&player.countCards('he')>0; }, direct:true, priority:-5, - content:function(){ + content(){ "step 0" var next=player.chooseToDiscard(get.prompt('qinglan',trigger.player),'he'); next.logSkill=['qinglan',trigger.player]; @@ -1998,13 +1998,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fanshi:{ trigger:{player:'phaseDiscardAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getStat('damage')>0; }, - check:function(event,player){ + check(event,player){ return player.hp==player.maxHp; }, - content:function(){ + content(){ "step 0" player.loseHp(); "step 1" @@ -2015,24 +2015,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.maxHp>player.hp&&player.countCards('he',{color:'red'})>0; }, // alter:true, - content:function(){ + content(){ "step 0" player.chooseCardTarget({ position:'he', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target; }, - filterCard:function(card,player){ + filterCard(card,player){ return get.color(card)=='red'&&lib.filter.cardDiscardable(card,player); }, - ai1:function(card){ + ai1(card){ return 9-get.value(card); }, - ai2:function(target){ + ai2(target){ return get.damageEffect(target,player,player,'fire'); }, prompt:get.prompt('xuelu') @@ -2060,13 +2060,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ maixie:true, expose:0.2, - threaten:function(player,target){ + threaten(player,target){ if(target.hp==1) return 3; if(target.hp==2) return 1.5; return 0.5; }, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(!target.hasFriend()) return; if(get.tag(card,'damage')){ if(target.hp==target.maxHp) return [0,1]; @@ -2079,10 +2079,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xiuhua_old:{ changeSeat:true, trigger:{player:'shaHit'}, - filter:function(event,player){ + filter(event,player){ return event.target!=player.previous; }, - content:function(){ + content(){ game.swapSeat(trigger.target,player,true,true); } }, @@ -2092,10 +2092,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ animationColor:'fire', derivation:'juejing', // alter:true, - filter:function(event,player){ + filter(event,player){ return !player.storage.shahun&&player.hp<=0; }, - content:function(){ + content(){ "step 0" var cards=player.getCards('hej'); player.discard(cards); @@ -2119,7 +2119,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ save:true, - skillTagFilter:function(player){ + skillTagFilter(player){ if(player.storage.shahun) return false; if(player.hp>0) return false; }, @@ -2131,10 +2131,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shahun2:{ trigger:{player:'phaseAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.storage.shahun?true:false; }, - content:function(){ + content(){ if(player.storage.shahun>1){ player.storage.shahun--; game.addVideo('storage',player,['shahun',player.storage.shahun]); @@ -2146,16 +2146,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yanjia_old:{ enable:'chooseToUse', - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{type:'equip'})>0; }, - filterCard:function(card){ + filterCard(card){ return get.type(card)=='equip'; }, position:'he', viewAs:{name:'wuzhong'}, prompt:'将一张装备牌当无中生有使用', - check:function(card){ + check(card){ var player=_status.currentPhase; if(player.countCards('he',{subtype:get.subtype(card)})>1){ return 11-get.equipValue(card); @@ -2174,20 +2174,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, changeSeat:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target&&player.next!=target&&player.canUse('sha',target,false); }, - filter:function(event,player){ + filter(event,player){ var min=Math.max(1,player.maxHp-player.hp); return lib.filter.filterCard({name:'sha'},player); }, - content:function(){ + content(){ game.swapSeat(player,target,true,true); player.useCard({name:'sha'},target,false); }, ai:{ result:{ - target:function(player,target){ + target(player,target){ return get.effect(target,{name:'sha'},player,target); }, }, @@ -2197,7 +2197,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qianjun:{ trigger:{player:'useCard'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.card.name!='sha') return false; if(event.targets.length!=1) return false; if(!player.countCards('he')) return false; @@ -2206,7 +2206,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player!=current&&target!=current&&get.distance(target,current)<=1; }); }, - content:function(){ + content(){ "step 0" event.targets=game.filterPlayer(function(current){ var target=trigger.targets[0]; @@ -2243,23 +2243,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xuanning1:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h',{type:'basic'})>0&&player.storage.xuanning!=3; }, - filterCard:function(card){ + filterCard(card){ return get.type(card)=='basic'; }, - check:function(card){ + check(card){ return 7-get.useful(card); }, - content:function(){ + content(){ player.storage.xuanning=3; player.markSkill('xuanning'); game.addVideo('storage',player,['xuanning',player.storage.xuanning]); }, ai:{ result:{ - player:function(player){ + player(player){ var num=player.countCards('h'); if(num>player.hp+1) return 1; if(player.storage.xuanning>=2) return 0; @@ -2274,14 +2274,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xuanning2:{ trigger:{player:'damageEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(player.storage.xuanning){ return (event.source&&event.source.countCards('he')>0); } return false; }, logTarget:'source', - content:function(){ + content(){ var he=trigger.source.getCards('he'); if(he.length){ trigger.source.discard(he.randomGet()); @@ -2299,11 +2299,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liuguang:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(player.storage.xuanning) return true; return false; }, - content:function(){ + content(){ "step 0" player.chooseTarget(function(card,player,target){ return player!=target; @@ -2356,24 +2356,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yangming:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ if(player.storage.yangming2>0) return false; return player.countCards('h',{color:'red'})>0; }, - filterCard:function(card){ + filterCard(card){ return get.color(card)=='red'; }, - content:function(){ + content(){ player.storage.yangming2=2; player.addSkill('yangming2'); game.addVideo('storage',player,['yangming2',player.storage.yangming2]); }, - check:function(card){ + check(card){ return 6-get.value(card); }, ai:{ result:{ - player:function(player){ + player(player){ if(player.countCards('h')<=player.hp&&player.hp==player.maxHp){ return 0; } @@ -2388,7 +2388,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseUseEnd'}, direct:true, mark:true, - content:function(){ + content(){ "step 0" player.storage.yangming2--; game.addVideo('storage',player,['yangming2',player.storage.yangming2]); @@ -2424,16 +2424,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhaolu:{ unique:true, mark:true, - check:function(){ + check(){ return false; }, - init:function(player){ + init(player){ player.storage.zhaolu=Math.min(5,game.players.length); game.addVideo('storage',player,['zhaolu',player.storage.zhaolu]); }, trigger:{player:['phaseEnd','damageEnd'],global:'dieAfter'}, forced:true, - content:function(){ + content(){ var num=2; if(typeof trigger.num=='number') num=2*trigger.num; if(trigger.name=='phase') num=1; @@ -2460,10 +2460,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ animationColor:'fire', enable:'phaseUse', line:'fire', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target; }, - content:function(){ + content(){ 'step 0' target.damage(2,'fire'); player.awakenSkill('jiehuo'); @@ -2473,7 +2473,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - player:function(player,target){ + player(player,target){ if(player.hp>1) return false; if(target.hp>2) return false; if(get.attitude(player,target)>=0) return false; @@ -2487,11 +2487,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forbid:['infinity'], skillAnimation:true, animationColor:'fire', - init:function(player){ + init(player){ player.storage.jiehuo=false; }, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ //if(player.maxHp<=1) return false; return !player.storage.jiehuo }, @@ -2500,11 +2500,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, // mark:true, line:'fire', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target; }, selectTarget:-1, - content:function(){ + content(){ if(!player.storage.jiehuo2){ player.storage.jiehuo2=player.maxHp; player.addSkill('jiehuo2'); @@ -2517,7 +2517,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseUseEnd'}, forced:true, popup:false, - content:function(){ + content(){ player.die(); } }, @@ -2533,7 +2533,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ noh:true, threaten:0.8, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(card.name=='bingliang') return 0; if(card.name=='lebu') return 1.5; if(card.name=='guohe'){ @@ -2550,24 +2550,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ priority:10, forced:true, popup:false, - check:function(){ + check(){ return false; }, - content:function(){ + content(){ trigger.cancel(); } }, yuling2:{ trigger:{player:['loseEnd','drawEnd'],global:'gameDrawAfter'}, - check:function(event,player){ + check(event,player){ return player.countCards('h')<2; }, priority:10, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')<5; }, - content:function(){ + content(){ player.draw(5-player.countCards('h')); } }, @@ -2575,19 +2575,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'gainEnd'}, priority:10, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>5; }, - check:function(event,player){ + check(event,player){ return player.countCards('h')<2; }, - content:function(){ + content(){ player.chooseToDiscard(true,player.countCards('h')-5); } }, yuling4:{ mod:{ - cardEnabled:function(card,player){ + cardEnabled(card,player){ if(_status.currentPhase!=player) return; var num=2; if(get.is.altered('yuling')) num=1; @@ -2598,14 +2598,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuling5:{ trigger:{player:['useCardAfter','phaseBegin']}, silent:true, - content:function(){ + content(){ player.storage.yuling=player.maxHp+2-player.countUsed(); } }, yuling6:{ trigger:{player:'phaseAfter'}, silent:true, - content:function(){ + content(){ delete player.storage.yuling; } }, diff --git a/character/gwent.js b/character/gwent.js index 0a8cacf42..6fa8fe5d9 100644 --- a/character/gwent.js +++ b/character/gwent.js @@ -85,13 +85,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sqlongyin:{ trigger:{player:'phaseBeginStart'}, forced:true, - check:function(){ + check(){ return false; }, - init:function(player){ + init(player){ player.storage.sqlongyin='sqlongwu'; }, - content:function(){ + content(){ var list=['sqlongnu','sqlonghuo','sqlongwu']; var map={ sqlongwu:'gw_saqiya', @@ -112,7 +112,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'sqlongyin', trigger:{player:'phaseBegin'}, frequent:true, - content:function(){ + content(){ 'step 0' player.discoverCard(ui.cardPile.childNodes,function(button){ var card=button.link; @@ -152,11 +152,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'sqlongyin', enable:'phaseUse', usable:1, - filter:function(event,player){ - return player.countCards('h'); + filter(event,player){ + return player.countCards('h')>0; }, delay:false, - content:function(){ + content(){ 'step 0' var hs=player.getCards('h'); player.discard(hs).set('delay',false); @@ -198,10 +198,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'sqlongyin', trigger:{player:'phaseEnd'}, frequent:true, - filter:function(event,player){ - return player.countCards('h'); + filter(event,player){ + return player.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' var max=1; var map={}; @@ -225,7 +225,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jielue:{ trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ + filter(event,player){ var list=player.getFriends(); for(var i=0;i1; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player==target||!ui.selected.cards.length) return false; return lib.filter.targetEnabled3({name:ui.selected.cards[0].name},player,target); }, @@ -731,7 +731,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectTarget:2, multitarget:true, delay:0, - content:function(){ + content(){ 'step 0' player.draw(); 'step 1' @@ -747,11 +747,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // draw:{ // trigger:{global:'damageAfter'}, // silent:true, - // filter:function(event,player){ + // filter(event,player){ // var evt=event.getParent(3); // return evt.name=='gwminxiang'&&evt.player==player; // }, - // content:function(){ + // content(){ // trigger.getParent(3).draw+=trigger.num; // } // } @@ -759,7 +759,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:8, result:{ - target:function(player,target){ + target(player,target){ if(!ui.selected.cards.length) return 0; return get.effect(target,{name:ui.selected.cards[0].name},target,target); } @@ -771,13 +771,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwlangshi:{ trigger:{source:'damageEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.parent.name=='gwlangshi') return false; return game.hasPlayer(function(current){ return current!=event.player&¤t!=player&¤t.hp>=event.player.hp; }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt2('gwlangshi'),function(card,player,target){ return target!=trigger.player&&target!=player&&target.hp>=trigger.player.hp; @@ -795,7 +795,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, gwjingtian:{ - clickable:function(player){ + clickable(player){ player.addTempSkill('gwjingtian2'); player.directgain(get.cards()); player.$draw(); @@ -808,15 +808,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.check(); } }, - clickableFilter:function(player){ + clickableFilter(player){ return player.storage.gwjingtian>0&&!player.hasSkill('gwjingtian2'); }, - init:function(player){ + init(player){ player.storage.gwjingtian=0; }, trigger:{player:'phaseDrawBefore'}, forced:true, - content:function(){ + content(){ trigger.cancel(); player.storage.gwjingtian+=3; player.updateMark('gwjingtian',true); @@ -824,7 +824,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'gwjingtian_ai', mark:true, intro:{ - mark:function(dialog,content,player){ + mark(dialog,content,player){ if(player.isUnderControl(true)){ if(_status.gameStarted&&player.storage.gwjingtian>0&&!player.hasSkill('gwjingtian2')){ dialog.add(ui.create.div('.menubutton.pointerdiv','点击发动',function(){ @@ -847,7 +847,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dialog.addText('剩余'+content+'次'); } }, - content:function(content,player){ + content(content,player){ if(player.isUnderControl(true)){ var list=[]; var num=Math.min(9,ui.cardPile.childElementCount); @@ -864,11 +864,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ ai:{ trigger:{global:'drawAfter'}, - filter:function(event,player){ + filter(event,player){ return (_status.auto||!player.isUnderControl(true))&&player.storage.gwjingtian>0&&!player.hasSkill('gwjingtian2'); }, popup:false, - check:function(event,player){ + check(event,player){ var value=0,card=ui.cardPile.firstChild; if(card){ value=get.value(card); @@ -878,7 +878,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.storage.gwjingtian>3&&value>3) return true; return false; }, - content:function(){ + content(){ lib.skill.gwjingtian.clickable(player); } } @@ -890,12 +890,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, //direct:true, //delay:0, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current.countCards('h'); }) }, - content:function(){ + content(){ 'step 0' var targets=game.filterPlayer(function(current){ return current.countCards('h'); @@ -976,17 +976,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwweitu:{ trigger:{player:'discardAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.hujia<3; }, - content:function(){ + content(){ player.changeHujia(); // var num=Math.min(trigger.cards.length,3-player.hujia); // if(num>0){ // player.changeHujia(); // } }, - init:function(player){ + init(player){ player.storage.gwweitu=0; }, intro:{ @@ -998,7 +998,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger: {player: 'changeHujiaAfter'}, filter: (event) => event.num < 0, forced:true, - content:function(){ + content(){ player.storage.gwweitu++; if(player.storage.gwweitu>=3){ player.storage.gwweitu-=3; @@ -1017,13 +1017,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ threaten:0.7, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'discard')&&target.hujia<3&& target.countCards('he')&¤t<0){ return 0; } }, - player:function(card,player){ + player(card,player){ if(player.hujia>=3) return; if(_status.event.name!='chooseToUse'||_status.event.player!=player) return; if(get.type(card)=='basic') return; @@ -1041,13 +1041,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:true, discard:false, prepare:'give', - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h'); + filterTarget(card,player,target){ + return target!=player&&target.countCards('h')>0; }, - check:function(card){ + check(card){ return 7-get.value(card); }, - content:function(){ + content(){ 'step 0' target.gain(cards,player); event.card=cards[0]; @@ -1140,7 +1140,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:1.5, order:9, result:{ - target:function(player,target){ + target(player,target){ return -Math.sqrt(target.countCards('h')); } } @@ -1149,7 +1149,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwfutian:{ trigger:{player:'damageBefore'}, forced:true, - content:function(){ + content(){ trigger.cancel(); }, ai:{ @@ -1157,12 +1157,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nothunder:true, nodamage:true, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'damage')) return [0,0]; } }, }, - init:function(player){ + init(player){ player.storage.gwfutian=0; }, intro:{ @@ -1175,12 +1175,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:{ trigger:{player:'phaseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.countCards('h'); }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget('覆天:弃置一名角色的一张手牌',function(card,player,target){ return target!=player&&target.countCards('h'); @@ -1219,7 +1219,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwzhongmo:{ trigger:{player:'phaseDrawBefore'}, forced:true, - content:function(){ + content(){ trigger.cancel(); var list=['bronze','silver','gold']; list.randomRemove(); @@ -1238,7 +1238,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwyewu:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ if(!player.countCards('he')) return false; var targets=player.getEnemies(); for(var i=0;iget.type(event.card)!='equip'&&player.hasCard(card=>get.color(card)==get.color(trigger.card)&&player.canRecast(card),'h'), - content:function(){ + content(){ 'step 0' var cards=player.getCards('h',card=>get.suit(card)==get.suit(trigger.card)&&player.canRecast(card)); if(!cards.length) cards=player.getCards('h',card=>get.color(card)==get.color(trigger.card)&&player.canRecast(card)); @@ -1384,7 +1384,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwfengshi:{ trigger:{player:'phaseEnd'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseControlList(get.prompt('gwfengshi'),['为自己施加一个随机负面效果,并对两名随机敌人施加一个随机负面效果','为自己施加两个随机正面效果,并对一名随机敌人施加一个随机正面效果'],function(){ if(player.getEnemies().length<2) return 1; @@ -1422,12 +1422,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwchenshui:{ trigger:{player:'damageBefore',source:'damageBefore'}, forced:true, - init:function(player){ + init(player){ player.storage.gwchenshui=0; }, mark:true, intro:{ - content:function(storage){ + content(storage){ if(!storage){ return '未发动过沉睡效果'; } @@ -1436,11 +1436,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - logTarget:function(event,player){ + logTarget(event,player){ if(player==event.source) return event.player; return event.source; }, - content:function(){ + content(){ trigger.cancel(); player.storage.gwchenshui++; player.updateMarks(); @@ -1456,13 +1456,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ juexing:{ trigger:{player:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ return player.storage.gwchenshui>=3; }, skillAnimation:true, animationStr:'觉醒', forced:true, - content:function(){ + content(){ 'step 0' player.removeSkill('gwchenshui'); player.setAvatar('gw_laomaotou','gw_laomaotou2'); @@ -1482,7 +1482,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ threaten:0.6, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return; if(!target.countCards('he')) return 'zeroplayertarget'; @@ -1494,10 +1494,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwliedi:{ trigger:{source:'damageBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.player!=player&&player.distanceTo(event.player)>=2; }, - content:function(){ + content(){ trigger.num+=Math.floor(Math.max(1,player.distanceTo(trigger.player))/2); }, group:['gwliedi_sleep','gwliedi_damage'], @@ -1506,17 +1506,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ damage:{ trigger:{source:'damageEnd'}, silent:true, - filter:function(event,player){ + filter(event,player){ return event.player!=player; }, - content:function(){ + content(){ player.storage.gwliedi=-1; }, }, sleep:{ trigger:{player:'phaseEnd'}, silent:true, - content:function(){ + content(){ if(player.storage.gwliedi!=1){ if(player.storage.gwliedi==-1){ player.storage.gwliedi=0; @@ -1538,10 +1538,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ julian:{ trigger:{player:'phaseUseBegin'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return !player.isMaxHandcard(); }, - content:function(){ + content(){ var num=0; for(var i=0;i0&&!player.hasSkill('huangshu2'); }, - content:function(){ + content(){ "step 0" player.chooseCard(get.prompt2('huanshu')).ai=function(card){ return 6-get.value(card); @@ -1654,7 +1654,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, huanshu2:{ intro:{ - content:function(storage,player){ + content(storage,player){ if(player.isUnderControl(true)){ return '当一名敌方角色使用'+get.translation(get.color(storage))+'锦囊牌时,移去'+get.translation(storage)+',取消锦囊的效果,并摸两张牌'; } @@ -1662,7 +1662,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return '当一名敌方角色使用与“幻术”牌颜色相同的锦囊牌时,移去“幻术”牌,取消锦囊的效果,并摸两张牌'; } }, - onunmark:function(storage,player){ + onunmark(storage,player){ if(storage){ storage.discard(); delete player.storage.huanshu2; @@ -1671,12 +1671,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{global:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getEnemies().includes(event.player)&& get.type(event.card,'trick')=='trick'&&get.color(event.card)==get.color(player.storage.huanshu2); }, mark:true, - content:function(){ + content(){ 'step 0' game.delayx(); player.addExpose(0.1); @@ -1693,7 +1693,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huanshu3:{ trigger:{player:'phaseBegin'}, forced:true, - content:function(){ + content(){ player.$throw(player.storage.huanshu2); game.log(player,'弃置了',player.storage.huanshu2); player.removeSkill('huanshu2'); @@ -1701,24 +1701,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, gwjieyin:{ group:'gwjieyin_reset', - init:function(player){ + init(player){ player.storage.gwjieyin=[]; }, enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.storage.gwjieyin.length<3; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ return ui.create.dialog('结印',[[['','','gw_wenyi'],['','','gw_yanziyaoshui'],['','','gw_kunenfayin']],'vcard'],'hidden'); }, - filter:function(button,player){ + filter(button,player){ if(player.storage.gwjieyin.includes(button.link[2])){ return false; } return true; }, - check:function(button){ + check(button){ var player=_status.event.player; if(button.link[2]=='gw_yanziyaoshui'){ if(game.hasPlayer(function(current){ @@ -1754,19 +1754,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 1; } }, - backup:function(links,player){ + backup(links,player){ return { - filterCard:function(){return false}, + filterCard(){return false}, selectCard:-1, viewAs:{name:links[0][2]}, popname:true, - onuse:function(result,player){ + onuse(result,player){ player.logSkill('gwjieyin'); player.storage.gwjieyin.add(result.card.name); } } }, - prompt:function(links,player){ + prompt(links,player){ return '选择'+get.translation(links[0][2])+'的目标'; } }, @@ -1774,7 +1774,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ reset:{ trigger:{player:'phaseBegin'}, silent:true, - content:function(){ + content(){ if(typeof player.storage.gwjieyin_round=='number'){ var num=game.roundNumber-player.storage.gwjieyin_round; if(num&&num%2==0){ @@ -1796,7 +1796,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhengjun:{ - init:function(player){ + init(player){ player.storage.zhengjun=[]; player.storage.zhengjun_one=[]; }, @@ -1805,7 +1805,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'已经使用或打出过至少两张同名牌的牌有:$' }, - content:function(){ + content(){ 'step 0' player.markSkill('zhengjun'); player.gainMaxHp(); @@ -1817,7 +1817,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ one:{ trigger:{player:['useCard','respondAfter']}, silent:true, - content:function(){ + content(){ if(player.storage.zhengjun_one.includes(trigger.card.name)){ if(!player.storage.zhengjun.includes(trigger.card.name)){ player.storage.zhengjun.add(trigger.card.name); @@ -1832,10 +1832,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ draw:{ trigger:{player:'phaseEnd'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.storage.zhengjun.length>=1; }, - content:function(){ + content(){ 'step 0' if(player.storage.zhengjun.length==1){ player.draw(); @@ -1863,31 +1863,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, gwxuezhan:{ trigger:{player:'phaseBegin'}, - filter:function(event,player){ + filter(event,player){ return player.isMinHandcard(); }, frequent:true, - content:function(){ + content(){ player.gain(game.createCard('gw_shizizhaohuan'),'gain2'); } }, jielue_old:{ trigger:{player:'useCard'}, frequent:true, - oncancel:function(event,player){ + oncancel(event,player){ player.addTempSkill('jielue2'); }, usable:1, - filter:function(event,player){ + filter(event,player){ if(event.card.isCard){ return !player.hasSkill('jielue2')&&get.type(event.card)=='basic'&&!event.card.storage.jielue; } return false; }, - check:function(event,player){ + check(event,player){ return get.value(event.card)>3; }, - content:function(){ + content(){ var card1=game.createCard(trigger.card); var card2=game.createCard(trigger.card); card1.storage.jielue=true; @@ -1902,10 +1902,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ bolang:{ trigger:{player:'phaseBegin'}, frequent:true, - init:function(player){ + init(player){ player.storage.bolang=[]; }, - content:function(){ + content(){ 'step 0' var cards=[]; for(var i=0;i0; }, - content:function(){ + content(){ var hs=target.getCards('he'); if(hs.length){ var card=hs.randomGet(); @@ -1999,7 +1999,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:['phaseBegin','damageEnd']}, forced:true, - content:function(){ + content(){ var card=player.storage.gwjushi2; var target=player.storage.gwjushi3; if(trigger.name=='damage'){ @@ -2030,7 +2030,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwfengchi:{ trigger:{player:'phaseUseBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var list=get.gainableSkills(function(info){ if(typeof info.enable=='string') return info.enable=='phaseUse'; @@ -2089,7 +2089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lingji:{ enable:'phaseUse', usable:1, - content:function(){ + content(){ 'step 0' player.draw(2); 'step 1' @@ -2132,10 +2132,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:['damageBefore']}, forced:true, mark:true, - filter:function(event,player){ + filter(event,player){ return game.roundNumber%3!=0; }, - content:function(){ + content(){ trigger.cancel(); }, group:['gwjinyan_gain'], @@ -2143,10 +2143,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gain:{ trigger:{player:'phaseBegin'}, frequent:true, - filter:function(){ + filter(){ return game.roundNumber%3==0; }, - content:function(){ + content(){ var list=get.typeCard('spell_gold'); if(list.length){ player.gain(game.createCard(list.randomGet()),'gain2'); @@ -2155,18 +2155,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - threaten:function(){ + threaten(){ if(game.roundNumber%3==0) return 1.6; return 0.8; }, nofire:true, nothunder:true, nodamage:true, - skillTagFilter:function(){ + skillTagFilter(){ if(game.roundNumber%3==0) return false; }, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(game.roundNumber%3!=0&&get.tag(card,'damage')){ return [0,0]; } @@ -2177,7 +2177,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwshenyu:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(game.hasPlayer(function(current){ return current.isDamaged(); })){ @@ -2192,7 +2192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ 'step 0' var list=[]; for(var i=0;i0; }, - content:function(){ + content(){ 'step 0' var att=get.attitude(trigger.player,player); trigger.player.chooseCard('he','是否交给'+get.translation(player)+'一张牌?').ai=function(card){ @@ -2352,15 +2352,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hupeng:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0; }, filterCard:true, - check:function(card){ + check(card){ return 7-get.value(card); }, filterTarget:true, - content:function(){ + content(){ 'step 0' var att=get.attitude(player,target); player.chooseVCardButton('选择令'+get.translation(target)+'获得的牌',['gw_dudayuanshuai1','gw_dudayuanshuai2'],true).ai=function(button){ @@ -2380,7 +2380,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:1.5, order:6, result:{ - target:function(player,target){ + target(player,target){ var nh=target.countCards('h'); if(get.attitude(player,target)>0){ if(!nh) return 3; @@ -2405,25 +2405,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, hupeng2:{ mod:{ - cardDiscardable:function(card,player){ + cardDiscardable(card,player){ if(card.name=='gw_dudayuanshuai2') return false; }, - cardEnabled:function(card,player){ + cardEnabled(card,player){ if(card.name=='gw_dudayuanshuai2') return false; }, - cardUsable:function(card,player){ + cardUsable(card,player){ if(card.name=='gw_dudayuanshuai2') return false; }, - cardRespondable:function(card,player){ + cardRespondable(card,player){ if(card.name=='gw_dudayuanshuai2') return false; }, - cardSavable:function(card,player){ + cardSavable(card,player){ if(card.name=='gw_dudayuanshuai2') return false; }, }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(target.countCards('h','gw_dudayuanshuai1')&&get.attitude(player,target)<0){ return 0.4; } @@ -2434,10 +2434,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hupeng3:{ trigger:{player:'phaseEnd'}, silent:true, - filter:function(event,player){ - return player.countCards('h','gw_dudayuanshuai2'); + filter(event,player){ + return player.countCards('h','gw_dudayuanshuai2')>0; }, - content:function(){ + content(){ var hs=player.getCards('h'); var hs2=player.getCards('h','gw_dudayuanshuai2'); hs.remove(hs2); @@ -2451,12 +2451,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{target:'useCardToBefore'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ if(event.player==player) return false; var num=player.countCards('h','gw_dudayuanshuai1'); return num>0; }, - content:function(){ + content(){ 'step 0' player.chooseToUse({name:'gw_dudayuanshuai1'},'是否对'+get.translation(trigger.card)+'使用【杜达元帅】?').set('ai1',function(card){ return _status.event.bool; @@ -2468,25 +2468,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, hunmo:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return lib.skill.hunmo.filterTarget(null,player,current); }); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(target==player) return false; if(target.hasSkill('hunmo2')) return false; var nh=player.countCards('h'); var nh2=target.countCards('h'); if(nh<2) return nh2<2; - return nh2>=2&&target.countDiscardableCards(player,'h'); + return nh2>=2&&target.countDiscardableCards(player,'h')>0; }, - prompt:function(event){ + prompt(event){ var nh=event.player.countCards('h'); if(nh<2) return '选择一名手牌数小于2的其他角色,观看牌堆顶的两张牌,你获得一张并交给其另一张'; return '选择一名手牌数大于2的其他角色,你弃置一张手牌,然后观看并弃置其一张手牌'; }, - content:function(){ + content(){ 'step 0' target.addTempSkill('hunmo2'); var nh=player.countCards('h'); @@ -2515,14 +2515,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delay(); }, ai:{ - order:function(){ + order(){ var player=_status.event.player; if(player.countCards('h')<2) return 11; return 6; }, threaten:1.2, result:{ - target:function(player,target){ + target(player,target){ if(player.countCards('h')<2) return 1; if(player.hasCard(function(card){ return get.value(card)<=5 @@ -2536,11 +2536,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ draw:{ trigger:{player:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ return player.getStat('skill').hunmo>=3; }, frequent:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('魂墨:造成1点伤害')).ai=function(target){ return get.damageEffect(target,player,player); @@ -2559,10 +2559,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shuijian:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' var targets=player.getEnemies(); var num=0; @@ -2590,11 +2590,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yunhuo:{ trigger:{player:'phaseBegin'}, - filter:function(event,player){ + filter(event,player){ return game.roundNumber%4==0&&event.skill!='yunhuo'; }, forced:true, - content:function(){ + content(){ 'step 0' player.insertPhase(); event.list=player.getEnemies().sortBySeat(); @@ -2619,10 +2619,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filterCard:true, position:'he', - check:function(card){ + check(card){ return 8-get.value(card) }, - content:function(){ + content(){ 'step 0' var list=get.typeCard('spell_silver').randomGets(3); if(!list.length){ @@ -2645,7 +2645,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwtianbian:{ trigger:{player:'phaseUseBegin'}, direct:true, - content:function(){ + content(){ 'step 0' var num1=0,num2=0; var choice; @@ -2719,18 +2719,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwxiaoshou:{ enable:'phaseUse', usable:2, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.isMaxHp(); }, - check:function(card){return 7-get.value(card);}, + check(card){return 7-get.value(card);}, position:'he', filterCard:true, - content:function(){ + content(){ target.damage(); }, ai:{ result:{ - target:function(player,target){ + target(player,target){ return get.damageEffect(target,player); }, }, @@ -2739,14 +2739,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kuanglie:{ trigger:{player:'useCardToBegin'}, - filter:function(event,player){ - return event.target&&event.target!=player&&event.target.countCards('he')&&get.color(event.card)=='black'; + filter(event,player){ + return event.target&&event.target!=player&&event.target.countCards('he')>0&&get.color(event.card)=='black'; }, - init:function(player){ + init(player){ player.storage.kuanglie=0; }, forced:true, - content:function(){ + content(){ trigger.target.randomDiscard(); player.storage.kuanglie++; if(player.storage.kuanglie%2==0){ @@ -2758,11 +2758,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwjiquan:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('he'); + filterTarget(card,player,target){ + return target!=player&&target.countCards('he')>0; }, selectTarget:[1,Infinity], - content:function(){ + content(){ 'step 0' player.gainPlayerCard(target,'he',true); 'step 1' @@ -2772,7 +2772,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:1.4, order:7, result:{ - target:function(player,target){ + target(player,target){ if(player.getEquip('tengjia')||player.getEquip('bagua')) return -1; if(get.effect(player,{name:'sha'},target,player)>=0) return -1; if(!player.hasShan()){ @@ -2798,10 +2798,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, position:'he', filterCard:true, - check:function(card){ + check(card){ return 7-get.value(card) }, - content:function(){ + content(){ 'step 0' var list=player.getEnemies(); list.sortBySeat(); @@ -2828,10 +2828,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nuhou:{ trigger:{player:'damageEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0; }, - content:function(){ + content(){ 'step 0' player.chooseToDiscard(get.prompt2('nuhou'),'he').set('ai',function(card){ return 8-get.useful(card); @@ -2853,7 +2853,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ maixie_hp:true, maixie_defend:true, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')){ var nh=target.countCards('he'); if(player.hasSkillTag('jueqing',false,target)||nh==0) return [1,-2]; @@ -2870,7 +2870,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ position:'he', filterCard:true, selectCard:[1,3], - check:function(card){ + check(card){ if(!ui.selected.cards.length){ return 8-get.value(card) } @@ -2889,7 +2889,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 0; }, - content:function(){ + content(){ player.draw(3); if(cards.length>=2){ player.addTempSkill('shewu_dist'); @@ -2908,7 +2908,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ dist:{ mod:{ - targetInRange:function(){ + targetInRange(){ return true; } } @@ -2918,10 +2918,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwzhanjiang:{ trigger:{global:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return !player.hasSkill('gwzhanjiang2')&&event.player!=player; }, - content:function(){ + content(){ 'step 0' var bool=(get.effect(trigger.player,{name:'sha'},player,player)>0&& Math.abs(get.attitude(player,trigger.player))>1&& @@ -2978,27 +2978,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwzhanjiang2:{}, gwzhanjiang3:{ trigger:{player:'useCard'}, - filter:function(event){ + filter(event){ return event.card.name=='sha'&&event.getParent(2).name=='gwzhanjiang'; }, forced:true, popup:false, - content:function(){ + content(){ player.draw(); } }, gwchuanxin_old:{ trigger:{player:'shaAfter'}, - filter:function(event,player){ + filter(event,player){ if(player.storage.gwchuanxin&&player.storage.gwchuanxin.length>=4) return false; return event.target.isAlive(); }, - check:function(event,player){ + check(event,player){ return get.effect(event.target,{name:'sha'},player,player)>0 }, logTarget:'target', logLine:false, - content:function(){ + content(){ 'step 0' event.card=get.cards()[0]; player.showCards(event.card,get.translation(player)+'对'+get.translation(trigger.player)+'发动了【穿心】'); @@ -3012,17 +3012,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ count1:{ trigger:{global:'phaseBegin'}, silent:true, - content:function(){ + content(){ player.storage.gwchuanxin=[]; } }, count2:{ trigger:{player:'useCard'}, silent:true, - // filter:function(event){ + // filter(event){ // return event.card&&event.card.name=='sha'; // }, - content:function(){ + content(){ for(var i=0;i0 }, logTarget:'target', // logLine:false, - content:function(){ + content(){ 'step 0' var cards=get.cards(); player.showCards(cards,get.translation(player)+'发动了【穿心】'); @@ -3054,7 +3054,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - attackFrom:function(from,to,distance){ + attackFrom(from,to,distance){ return distance-from.hp+1; } } @@ -3062,13 +3062,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fengjian:{ trigger:{player:'useCard'}, direct:true, - filter:function(event,player){ + filter(event,player){ var type=get.type(event.card,'trick'); return type=='trick'&&game.hasPlayer(function(current){ return player.canUse('sha',current,false)&&!event.targets.includes(current); }); }, - content:function(){ + content(){ "step 0" player.chooseTarget(get.prompt('fengjian'),function(card,player,target){ return player.canUse('sha',target,false)&&!trigger.targets.includes(target); @@ -3096,10 +3096,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // trigger:{source:'damageEnd'}, // forced:true, // popup:false, - // filter:function(event,player){ + // filter(event,player){ // return event.getParent(3).name=='fengjian'; // }, - // content:function(){ + // content(){ // player.tempHide(); // } // } @@ -3108,7 +3108,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huandie:{ trigger:{player:'phaseBegin'}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('huandie'),[0,game.countPlayer()],function(card,player,target){ return target!=player; @@ -3133,17 +3133,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:{ trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current.countCards('h')>current.hp; }); }, - logTarget:function(){ + logTarget(){ return game.filterPlayer(function(current){ return current.countCards('h')>current.hp; }).sortBySeat(); }, - content:function(){ + content(){ 'step 0' var list=game.filterPlayer(function(current){ return current.countCards('h')>current.hp; @@ -3164,7 +3164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, forceunique:true, intro:{ - content:function(storage,player){ + content(storage,player){ var name=get.translation(player); if(storage==1){ return '每当一名角色('+name+'除外)受到一次伤害,该角色失去1点体力,'+name+'回复1点体力'; @@ -3177,7 +3177,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - content:function(){ + content(){ 'step 0' var next=player.chooseControl('选项一','选项二','cancel2',function(){ if(Math.random()<0.65) return 0; @@ -3208,7 +3208,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xuezhou_hp:{ trigger:{source:'damageEnd',player:'damageEnd'}, - filter:function(event,player){ + filter(event,player){ if(!_status.xuezhou) return false; if(player==_status.xuezhou) return false; if(!player.isIn()||!_status.xuezhou.isIn()) return false; @@ -3220,7 +3220,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, silent:true, - content:function(){ + content(){ 'step 0' game.delayx(); _status.currentPhase.addTempSkill('xuezhou_hp2'); @@ -3236,10 +3236,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fayin:{ trigger:{player:'shaBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0; }, - content:function(){ + content(){ 'step 0' var target=trigger.target; var bool=get.attitude(player,target)<0; @@ -3269,10 +3269,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwbaquan:{ 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' var hs=target.getCards('h'); player.gain(hs,target); @@ -3314,7 +3314,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:11, result:{ - target:function(player,target){ + target(player,target){ return -Math.sqrt(target.countCards('h')); } } @@ -3323,11 +3323,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hunmo_old:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.countCards('h')!=Math.min(3,player.hp); }, selectTarget:[1,3], - content:function(){ + content(){ var dh=Math.min(3,player.hp)-target.countCards('h'); if(dh>0){ target.draw(dh,false); @@ -3342,7 +3342,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:11, result:{ - target:function(player,target){ + target(player,target){ var dh=Math.min(3,player.hp)-target.countCards('h'); if(dh<0){ dh+=get.sgn(get.effect(target,{name:'sha'},player,target)); @@ -3355,7 +3355,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hunmo_old2:{ trigger:{player:['phaseBegin','phaseEnd']}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('hunmo'),[1,game.countPlayer()],function(card,player,target){ return target.countCards('h')!=Math.min(3,target.hp); @@ -3389,7 +3389,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, huihun:{ trigger:{player:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ if(!player.storage.huihun) return false; for(var i=0;i1){ if(i==0) return 5; return 1; @@ -3543,7 +3543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(i==0) return 7.3; return 4; }, - value:function(card,player,i){ + value(card,player,i){ if(player.hp>1){ if(i==0) return 5; return 1; @@ -3552,11 +3552,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 4; }, }, - order:function(){ + order(){ return get.order({name:'sha'})+0.2; }, result:{ - target:function(player,target){ + target(player,target){ if(target&&target.isDying()) return 2; if(lib.config.mode=='stone'&&!player.isMin()){ if(player.getActCount()+1>=player.actcount) return false; @@ -3597,16 +3597,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, derivation:'gw_diandian', image:'character:gw_yioufeisisp', - enable:function(){ + enable(){ return game.countPlayer()>2; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player; }, selectTarget:2, multitarget:true, multiline:true, - content:function(){ + content(){ 'step 0' targets[0].useCard({name:'sha'},targets[1],'noai'); 'step 1' @@ -3614,7 +3614,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ targets[1].useCard({name:'sha'},targets[0],'noai'); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3624,7 +3624,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - target:function(player,target){ + target(player,target){ return get.effect(target,{name:'sha'},target,target); } } @@ -3637,10 +3637,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gw_diandian', image:'character:gw_luoqi', enable:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player.canUse('sha',target,false); }, - content:function(){ + content(){ 'step 0' player.useCard({name:'sha'},target,false).animate=false; 'step 1' @@ -3657,7 +3657,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.redo(); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3667,7 +3667,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - target:function(player,target){ + target(player,target){ return get.effect(target,{name:'sha'},player,target); } } @@ -3681,7 +3681,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_jieluote', enable:true, filterTarget:true, - content:function(){ + content(){ if(target.isMaxHp()&&target.hp>2){ target.damage(2); } @@ -3689,7 +3689,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.damage(); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3702,7 +3702,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ damage:1 }, result:{ - player:function(player,target){ + player(player,target){ var eff=get.damageEffect(target,player,player); if(eff>0){ eff=Math.sqrt(eff); @@ -3735,7 +3735,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_yenaifa', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' event.targets=player.getEnemies().randomGets(3).sortBySeat(); 'step 1' @@ -3746,7 +3746,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' game.delay(); }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3768,7 +3768,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_telisi', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' event.targets=player.getFriends().randomGets(3); event.targets.add(player); @@ -3781,7 +3781,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' game.delay(); }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3803,7 +3803,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_hengsaite', enable:true, notarget:true, - content:function(){ + content(){ var targets=game.filterPlayer(function(current){ return player.canUse('wanjian',current); }).sortBySeat(); @@ -3812,7 +3812,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.useCard({name:'wanjian'},targets); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3822,7 +3822,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - player:function(player,target){ + player(player,target){ var targets=game.filterPlayer(function(current){ return player.canUse('wanjian',current); }); @@ -3844,10 +3844,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:true, filterTarget:true, selectTarget:[1,2], - content:function(){ + content(){ target.changeHujia(); }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3857,7 +3857,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - target:function(player,target){ + target(player,target){ var num=1/Math.sqrt(target.hp+1); if(target.hasSkillTag('maixie_hp')){ num*=0.7; @@ -3878,11 +3878,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_laduoweide', enable:true, filterTarget:true, - content:function(){ + content(){ target.addTempSkill('fengyin',{player:'phaseAfter'}); target.damage(); }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3892,7 +3892,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - target:function(player,target){ + target(player,target){ var num=1/Math.sqrt(target.hp+1); if(target.hasSkillTag('maixie_hp')){ num*=1.5; @@ -3909,13 +3909,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gw_diandian', image:'character:gw_enxier', enable:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return Math.abs(target.countCards('h')-player.countCards('h'))<=1; }, - content:function(){ + content(){ player.swapHandcards(target); }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -3925,7 +3925,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - target:function(player,target){ + target(player,target){ var dh=target.countCards('h')-player.countCards('h'); if(dh>0) return -1; if(dh==0&&player.needsToDiscard()) return -0.5; @@ -3941,13 +3941,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gw_diandian', image:'character:gw_fulisi', enable:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('h'); }, selectTarget:[1,3], multitarget:true, multiline:true, - content:function(){ + content(){ 'step 0' var dialog=ui.create.dialog('弃置至多2张手牌','hidden'); for(var i=0;i=player.countCards('h')&&player.canUse('juedou',target); }, - content:function(){ + content(){ 'step 0' player.useCard({name:'juedou'},target).animate=false; 'step 1' @@ -4080,7 +4080,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.useCard({name:'juedou'},target); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -4090,7 +4090,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - target:function(player,target){ + target(player,target){ return get.effect(target,{name:'juedou'},player,target); } } @@ -4103,14 +4103,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gw_diandian', image:'character:gw_haluo', enable:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.isMinHp(); }, selectTarget:-1, - content:function(){ + content(){ target.damage(); }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -4134,22 +4134,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gw_diandian', image:'character:gw_dagong', enable:true, - content:function(){ + content(){ target.addSkill('gw_ciguhanshuang'); target.addSkill('gw_birinongwu'); target.addSkill('gw_qinpendayu'); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.hasSkill('gw_ciguhanshuang')|| !target.hasSkill('gw_qinpendayu')|| !target.hasSkill('gw_birinongwu'); }, - changeTarget:function(player,targets){ + changeTarget(player,targets){ game.filterPlayer(function(current){ return get.distance(targets[0],current,'pure')==1; },targets); }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -4159,7 +4159,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - target:function(player,target){ + target(player,target){ return get.effect(target,{name:'gw_ciguhanshuang'},player,target); } } @@ -4173,7 +4173,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_gaier', enable:true, filterTarget:true, - content:function(){ + content(){ 'step 0' var str1='令'+get.translation(target); var str2='1点体力和体力上限' @@ -4191,7 +4191,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.loseMaxHp(true); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -4201,7 +4201,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - player:function(player,target){ + player(player,target){ var num=1; if(target.hasSkillTag('maixie_hp')){ num=1.5; @@ -4218,11 +4218,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'gw_diandian', image:'character:gw_airuiting', enable:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player; }, selectTarget:-1, - content:function(){ + content(){ 'step 0' target.chooseToUse({name:'sha'},'使用一张杀,或失去1点体力'); 'step 1' @@ -4230,7 +4230,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.loseHp(); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -4240,7 +4240,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ value:10, order:1, result:{ - target:function(player,target){ + target(player,target){ if(target.hasSha()){ if(Math.random()<0.5) return 1; return 0; @@ -4263,7 +4263,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_aisinie', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' player.recover(); 'step 1' @@ -4279,7 +4279,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.gain(game.createCard(result.links[0][2]),'gain2'); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -4301,7 +4301,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_falanxisika', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' var list=get.typeCard('spell_gold'); list.remove('gw_huangjiashenpan'); @@ -4322,7 +4322,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.useCard(game.createCard(result.links[0][2])); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -4344,7 +4344,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ image:'character:gw_huoge', enable:true, notarget:true, - content:function(){ + content(){ 'step 0' event.cards=get.cards(6); player.chooseCardButton(event.cards,[1,2],'选择至多两牌依次使用之').set('filterButton',function(button){ @@ -4369,7 +4369,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.redo(); } }, - contentAfter:function(){ + contentAfter(){ var evt=_status.event.getParent('phaseUse'); if(evt&&evt.name=='phaseUse'){ evt.skipped=true; @@ -4391,7 +4391,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ addinfo:'杀', autoViewAs:'sha', ai:{ - order:function(){ + order(){ return get.order({name:'sha'})+0.5; } } @@ -4404,7 +4404,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ addinfo:'酒', autoViewAs:'jiu', ai:{ - order:function(){ + order(){ return get.order({name:'jiu'})+0.5; } } @@ -4416,7 +4416,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, addinfo:'小伙伴', notarget:true, - content:function(){ + content(){ var evt=event.getParent(3)._trigger; if(evt.gw_dudayuanshuai1){ evt.cancel(); diff --git a/character/hearth.js b/character/hearth.js index a44086369..68ad2a36d 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -222,7 +222,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hshuanyu:{ trigger:{player:'damageEnd'}, frequent:true, - content:function(){ + content(){ if(!lib.characterPack.hearth){ player.draw(); return; @@ -248,7 +248,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(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; if(!target.hasFriend()) return; @@ -263,7 +263,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wxuying:{ trigger:{player:'phaseBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var cards=player.getCards('h',function(card){ return card.name=='hsfashu_anyingjingxiang'||card._wxuying; @@ -285,7 +285,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lose:{ trigger:{player:'loseAfter'}, silent:true, - content:function(){ + content(){ for(var i=0;i1) return false; if(event.targets[0]==player) return false; return get.type2(event.card)=='trick'; }, - content:function(){ + content(){ var list=get.inpile2('trick'); while(list.length){ var name=list.randomRemove(); @@ -704,7 +704,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, hshuanling_old2:{ trigger:{player:'useCard'}, - filter:function(event,player){ + filter(event,player){ // if(get.is.converted(event)) return false; if(!player.countCards('he')) return false; // if(!event.targets||!event.targets.includes(player)) return false; @@ -717,7 +717,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, direct:true, - content:function(){ + content(){ 'step 0' var bool1=(trigger.targets.length>1); var bool2=game.hasPlayer(function(current){ @@ -765,20 +765,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num2>2) num2=2; player.chooseCardTarget({ selectCard:[1,num], - selectTarget:function(){ + selectTarget(){ return ui.selected.cards.length; }, position:'he', prompt:event.unchosen?get.prompt('hshuanling'):null, prompt2:'弃置任意张牌,并为'+get.translation(trigger.card)+'增加等量的目标', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !trigger.targets.includes(target)&&lib.filter.targetEnabled2(trigger.card,trigger.player,target); }, - ai1:function(card){ + ai1(card){ if(ui.selected.cards.length>=num2) return 0; return get.value(trigger.card)-get.value(card)-1; }, - ai2:function(target){ + ai2(target){ var trigger=_status.event.getTrigger(); return get.effect(target,trigger.card,trigger.player,_status.event.player); } @@ -795,22 +795,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num2>2) num2=2; player.chooseCardTarget({ selectCard:[1,num], - selectTarget:function(){ + selectTarget(){ return ui.selected.cards.length; }, prompt:event.unchosen?get.prompt('hshuanling'):null, prompt2:'弃置任意张牌,并为'+get.translation(trigger.card)+'减少等量的目标', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return trigger.targets.includes(target); }, - ai1:function(card){ + ai1(card){ if(!player.needsToDiscard(0,(i,player)=>{ return !ui.selected.cards.includes(i)&&!player.canIgnoreHandcard(i); })) return 0; if(ui.selected.cards.length>=num2) return 0; return Math.max(5,get.value(trigger.card))-get.value(card)-1; }, - ai2:function(target){ + ai2(target){ var trigger=_status.event.getTrigger(); return -get.effect(target,trigger.card,trigger.player,_status.event.player); } @@ -846,13 +846,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ asyouzhang:{ trigger:{player:'phaseEnd'}, frequent:true, - filter:function(event,player){ + filter(event,player){ if(player.countCards('h',{type:'basic'})==0) return true; if(player.countCards('h',{type:['trick','delay']})==0) return true; if(player.countCards('h',{type:'equip'})==0) return true; return false; }, - content:function(){ + content(){ 'step 0' if(player.countCards('h',{type:'basic'})==0){ var card=get.cardPile(function(card){ @@ -921,17 +921,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ylyuchu:{ trigger:{player:'recoverAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('subplayer')) return false; return player.storage.ylyuchu.length<3; }, - init:function(player){ + init(player){ if(!player.storage.ylyuchu) player.storage.ylyuchu=[]; }, ai:{ threaten:0.7 }, - // onremove:function(player){ + // onremove(player){ // delete player.storage.ylyuchu; // delete player.storage.ylyuchu2; // delete player.storage.ylyuchu3; @@ -942,10 +942,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ swap:{ trigger:{player:'phaseEnd'}, silent:true, - filter:function(event,player){ + filter(event,player){ return player.storage.ylyuchu.length; }, - content:function(){ + content(){ var list=game.filterPlayer(); list.remove(player); player.storage.ylyuchu2=list.randomGets(player.storage.ylyuchu.length); @@ -956,7 +956,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'phaseBefore'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('subplayer')) return false; if(player.storage.ylyuchu2&&player.storage.ylyuchu3){ var idx=player.storage.ylyuchu2.indexOf(event.player); @@ -967,7 +967,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ if(player.storage.ylyuchu2&&player.storage.ylyuchu3){ var idx=player.storage.ylyuchu2.indexOf(trigger.player); var target=player.storage.ylyuchu3[idx]; @@ -983,17 +983,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, priority:-60, - content:function(){ + content(){ player.exitSubPlayer(); } }, draw:{ trigger:{player:'phaseDrawBegin'}, silent:true, - filter:function(event){ + filter(event){ return event.num>0; }, - content:function(){ + content(){ trigger.num--; } }, @@ -1002,15 +1002,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, priority:-60, - filter:function(event,player){ + filter(event,player){ return event.player!=player; }, - content:function(){ + content(){ player.insertPhase(null,true); } } }, - content:function(){ + content(){ 'step 0' event.num=trigger.num; 'step 1' @@ -1024,7 +1024,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skill:skill, // intro:'下个敌方回合开始前,随机切换至此随从', intro2:'当前回合结束后进行一个额外回合并切换回本体', - onremove:function(player){ + onremove(player){ player.storage.ylyuchu.remove(skill); delete lib.skill[skill]; } @@ -1038,20 +1038,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsaiqi:{ trigger:{player:'useCard'}, forced:true, - init:function(player){ + init(player){ player.storage.nsaiqi=[]; }, intro:{ content:'cards' }, - filter:function(event,player){ + filter(event,player){ if(ui.cardPile.firstChild&&ui.cardPile.firstChild.vanishtag.includes('nsaiqi')){ return false; } return true; }, onremove:'lose', - content:function(){ + content(){ var cards=get.cards(3); for(var i=0;i=9; }, - content:function(){ + content(){ 'step 0' player.draw(); 'step 1' @@ -1089,15 +1089,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hsnitai:{ trigger:{player:'phaseUseBegin'}, forced:true, - video:function(player,data){ + video(player,data){ var skills=data[0]; var name=data[1]; lib.skill.hsnitai.process(skills,name); }, - onremove:function(player){ + onremove(player){ player.removeSkill('hsnitai_card'); }, - process:function(skills,name){ + process(skills,name){ var cardname='hsnitai_'+name; lib.translate[cardname]=lib.translate[name]; lib.translate[cardname+'_info']='出牌阶段对自己使用,获得'+get.translation(name)+'的一个技能(替换前一个以此法获得的技能,效果持续2回合)'; @@ -1117,11 +1117,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, skills:skills, derivation:'hs_barnes', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player==target; }, selectTarget:-1, - content:function(){ + content(){ 'step 0' var list=lib.card[card.name].skills; for(var i=0;i【'+lib.translate[skill]+'】
    '+ @@ -1250,7 +1250,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseUseBegin'}, priority:-10, silent:true, - content:function(){ + content(){ if(player.storage.hsnitai_card_count>0){ player.storage.hsnitai_card_count--; } @@ -1266,13 +1266,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filterCard:{suit:'heart'}, position:'he', - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{suit:'heart'})>0; }, - check:function(card){ + check(card){ return 7-get.value(card); }, - content:function(){ + content(){ var targets=player.getFriends(); if(targets.length){ targets.push(player); @@ -1301,7 +1301,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hsyanxin:{ trigger:{player:'drawBegin'}, priority:-5, - filter:function(event,player){ + filter(event,player){ if(game.fixedPile) return false; if(event.num<=0) return false; if(ui.cardPile.childNodes.length==0) return false; @@ -1310,7 +1310,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, popup:false, - content:function(){ + content(){ var card=ui.cardPile.firstChild; if(lib.inpile.includes(card.name)){ for(var i=1;i0; }, position:'he', - init:function(player){ + init(player){ player.storage.hstianqi=[]; }, onremove:true, - filterCard:function(card,player){ + filterCard(card,player){ if(get.position(card)=='h'){ if(player.getEquip(1)&&player.getEquip(2)&& player.getEquip(3)&&player.getEquip(4)){ @@ -1349,7 +1349,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return true; } }, - check:function(card){ + check(card){ var player=_status.event.player; if(get.position(card)=='e'){ if(card.name.indexOf('hstianqi_')==0){ @@ -1375,7 +1375,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'cards' }, - content:function(){ + content(){ 'step 0' event.position=get.position(cards[0]); player.discard(cards); @@ -1426,10 +1426,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, skillAnimation:true, animationColor:'legend', - filter:function(event,player){ + filter(event,player){ return player.storage.hstianqi.length==4; }, - content:function(){ + content(){ 'step 0' game.delay(); 'step 1' @@ -1446,7 +1446,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - threaten:function(player,target){ + threaten(player,target){ if(target.storage.hstianqi.length==4) return 20; if(target.storage.hstianqi.length==3) return 2; return 1; @@ -1460,31 +1460,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hstianqi_dalian:{ trigger:{source:'damageEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.isDamaged(); }, - content:function(){ + content(){ player.recover(trigger.num); } }, hstianqi_shali:{ trigger:{player:'recoverEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.num>0; }, - content:function(){ + content(){ player.changeHujia(trigger.num); } }, ysjqisha:{ trigger:{source:'damageEnd',player:'damageEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ if(event._notrigger.includes(event.player)) return false; return (event.source!=player&&event.source.isIn())||(event.player!=player&&event.player.isIn()); }, - content:function(){ + content(){ var target=trigger.source; if(target==player){ target=trigger.player; @@ -1512,10 +1512,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0; }, - content:function(){ + content(){ game.delay(0.5); player.chooseToDiscard(true,'he'); } @@ -1527,12 +1527,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'useCard'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.getRand()<0.5&&event.targets&&event.targets.length==1&&game.hasPlayer(function(current){ return current!=event.targets[0]&&lib.filter.targetEnabled2(event.card,player,current); }); }, - content:function(){ + content(){ 'step 0' game.delay(); 'step 1' @@ -1553,13 +1553,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, trigger:{source:'damageBegin',player:'useCardToBefore'}, - filter:function(event,player){ + filter(event,player){ if(event.name=='damage') return event.notLink()&&(event.card?true:false); var info=get.info(event.card); if(info.multitarget&&event.targets&&event.targets.includes(player)) return false; return event.getRand()<0.65; }, - content:function(){ + content(){ if(trigger.name=='damage'){ trigger.num++; } @@ -1574,7 +1574,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'锁定技,你不能成为非敌方角色的卡牌目标' }, mod:{ - targetEnabled:function(card,player,target){ + targetEnabled(card,player,target){ if(!player.getEnemies().includes(target)) return false; } } @@ -1587,7 +1587,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ priority:5, trigger:{player:'drawBegin'}, forced:true, - content:function(){ + content(){ trigger.num--; } }, @@ -1598,10 +1598,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{global:'recoverAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getEnemies().includes(event.player); }, - content:function(){ + content(){ player.loseHp(); } }, @@ -1611,7 +1611,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'锁定技,你的手牌上限-2' }, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num-2; } } @@ -1621,15 +1621,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yindan:{ enable:'phaseUse', filterCard:{suit:'spade'}, - check:function(card){ + check(card){ return 8-get.value(card); }, usable:1, - filter:function(event,player){ - return player.countCards('he',{suit:'spade'}); + filter(event,player){ + return player.countCards('he',{suit:'spade'})>0; }, position:'he', - content:function(){ + content(){ 'step 0' player.loseHp(); 'step 1' @@ -1642,7 +1642,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:7, result:{ - player:function(player,target){ + player(player,target){ if(player.hp>=3) return 1; if(player.hp==2&&game.hasPlayer(function(current){ return get.damageEffect(current,player,player,'fire')>0&¤t.hp==1; @@ -1656,16 +1656,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, hllingxi:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(target){ return lib.skill.hllingxi.filterTarget(null,player,target); }); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(target.hasSkill('hllingxi_used')) return false; return target!=player&&target.isDamaged()&&target.countCards('he')>=2; }, - content:function(){ + content(){ 'step 0' target.chooseToDiscard('he',2,true); 'step 1' @@ -1678,10 +1678,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ end:{ trigger:{player:'phaseEnd'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.isDamaged(); }, - content:function(){ + content(){ player.recover(); } } @@ -1689,7 +1689,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:6, result:{ - target:function(player,target){ + target(player,target){ var nc=target.countCards('he'); if(target.hasSkillTag('maixie_hp')){ if(nc>=3) return 1; @@ -1716,10 +1716,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhaochao:{ trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.getEnemies().length>0; }, - content:function(){ + content(){ 'step 0' event.targets=player.getEnemies(); player.addSkill('zhaochao2'); @@ -1738,17 +1738,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhaochao2:{ trigger:{player:'shaMiss'}, silent:true, - filter:function(event){ + filter(event){ return event.getParent(2).name=='zhaochao'; }, - content:function(){ + content(){ player.storage.zhaochao2=true; } }, xiyong:{ trigger:{player:'phaseEnd'}, frequent:true, - content:function(){ + content(){ 'step 0' player.draw(); 'step 1' @@ -1780,7 +1780,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ srjici:{ trigger:{source:'damageEnd'}, forced:true, - content:function(){ + content(){ player.draw(); if(trigger.player&&trigger.player.isIn()&&!trigger._notrigger.includes(trigger.player)){ trigger.player.randomDiscard(); @@ -1793,13 +1793,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yinzong:{ trigger:{player:'loseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ for(var i=0;i0){ @@ -2000,21 +2000,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, shouwang:{ enable:'chooseToUse', - filter:function(event,player){ + filter(event,player){ return event.type=='dying'&&event.dying&&!event.dying.hasSkill('shouwang2'); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target==_status.event.dying; }, selectTarget:-1, - content:function(){ + content(){ target.recover(); target.changeHujia(); target.addSkill('shouwang2') }, ai:{ order:6, - skillTagFilter:function(player){ + skillTagFilter(player){ if(!_status.event.dying||_status.event.dying.hasSkill('shouwang2')) return false; }, save:true, @@ -2034,23 +2034,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qingtian:{ trigger:{player:'damageBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.isMaxHp(true); }, - check:function(){ + check(){ return false; }, - content:function(){ + content(){ trigger.num++; } }, qingtian_old:{ trigger:{player:'recoverBefore'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.hp>0&&event.num>0; }, - content:function(){ + content(){ trigger.cancel(); player.changeHujia(trigger.num); }, @@ -2061,11 +2061,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qianfu:{ trigger:{player:'dieBefore'}, forced:true, - filter:function(event,player){ + filter(event,player){ return !player.hasSkill('qianfu2')&&player.maxHp>0; }, unique:true, - content:function(){ + content(){ trigger.cancel(); player.addSkill('qianfu2'); player.hp=1; @@ -2083,16 +2083,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'你防止非火焰伤害,不能使用或打出卡牌,并始终跳过你的回合' }, mod:{ - cardEnabled:function(card,player){ + cardEnabled(card,player){ return false; }, - cardUsable:function(card,player){ + cardUsable(card,player){ return false; }, - cardRespondable:function(card,player){ + cardRespondable(card,player){ return false; }, - cardSavable:function(card,player){ + cardSavable(card,player){ return false; }, }, @@ -2100,20 +2100,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ damage:{ trigger:{player:'damageBefore'}, - filter:function(event){ + filter(event){ if(event.nature!='fire') return true; return false; }, mark:true, forced:true, - content:function(){ + content(){ trigger.cancel(); }, ai:{ nothunder:true, nodamage:true, effect:{ - target:function(card,player,target,current){ + target(card,player,target,current){ if(get.tag(card,'damage')&&!get.tag(card,'fireDamage')) return [0,0]; } }, @@ -2123,17 +2123,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseBefore'}, forced:true, popup:false, - content:function(){ + content(){ trigger.cancel(); } }, revive:{ trigger:{player:['changeHp','loseMaxHpAfter']}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.hp>=3||player.isHealthy(); }, - content:function(){ + content(){ player.removeSkill('qianfu2'); player.draw(3); player.setAvatar('hs_selajin','hs_selajin'); @@ -2144,10 +2144,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shimo:{ trigger:{global:'damageAfter'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.player!=player&&get.distance(player,event.player)<=1; }, - content:function(){ + content(){ if(player.isDamaged()){ player.recover(); } @@ -2160,10 +2160,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard'}, forced:true, usable:3, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase==player&&get.type(event.card,'trick')=='trick'; }, - content:function(){ + content(){ var list=get.inpile('trick','trick'); player.gain(game.createCard(list.randomGet()),'draw'); if(player.storage.counttrigger&&player.storage.counttrigger.lieyang>=3){ @@ -2176,16 +2176,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, lieyang2:{ mod:{ - cardEnabled:function(card){if(get.type(card,'trick')=='trick') return false} + cardEnabled(card){if(get.type(card,'trick')=='trick') return false} } }, zhuilie:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ - return player.countCards('he'); + filter(event,player){ + return player.countCards('he')>0; }, - content:function(){ + content(){ 'step 0' player.chooseToDiscard('he',get.prompt('zhuilie')).set('ai',function(card){ if(player.hp>=4||(player.hasSha()&&player.hasShan())){ @@ -2221,13 +2221,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, skillAnimation:true, forceunique:true, - filter:function(){ + filter(){ return game.roundNumber>=3; }, - check:function(event,player){ + check(event,player){ return player.hp<=2; }, - content:function(){ + content(){ 'step 0' var list=get.gainableCharacters(function(info){ return info[2]>=5; @@ -2253,7 +2253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kekao:{ trigger:{player:'phaseEnd'}, direct:true, - content:function(){ + content(){ 'step 0' var list=[]; for(var i in lib.card){ @@ -2288,10 +2288,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jinhua:{ trigger:{target:'useCardToBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player==event.player&&get.type(event.card,'trick')=='trick'&&event.card.isCard; }, - content:function(){ + content(){ 'step 0' var list=get.gainableSkills(); list.remove(player.getSkills()); @@ -2344,7 +2344,7 @@ 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,'trick')=='trick'&&player==target) return [1,1]; } } @@ -2353,10 +2353,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kqizhou:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.storage.kqizhou; }, - content:function(){ + content(){ 'step 0' delete player.storage.kqizhou; var list=[['','','hsqizhou_feng'], @@ -2386,10 +2386,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ add:{ trigger:{player:'useCard'}, silent:true, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase==player&&get.type(event.card,'trick')=='trick'; }, - content:function(){ + content(){ player.storage.kqizhou=true; } } @@ -2397,10 +2397,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jingcu:{ enable:'phaseUse', - filter:function(event,player){ + filter(event,player){ return player.maxHp>1; }, - content:function(){ + content(){ 'step 0' player.loseMaxHp(true); 'step 1' @@ -2410,7 +2410,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:1.5, threaten:1.4, result:{ - player:function(player){ + player(player){ if(player.isDamaged()) return 1; if(player.hp>=3&&!player.needsToDiscard(2)) return 1; return 0; @@ -2421,10 +2421,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shengzhang:{ trigger:{player:'phaseDiscardEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.cards&&event.cards.length>0; }, - content:function(){ + content(){ player.gainMaxHp(true); } }, @@ -2434,11 +2434,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ animationColor:'fire', trigger:{player:'dying'}, priority:10, - filter:function(event,player){ + filter(event,player){ return player.storage.pyuhuo!='over'; }, forced:true, - content:function(){ + content(){ 'step 0' player.discard(player.getCards('hej')); 'step 1' @@ -2463,7 +2463,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - threaten:function(player,target){ + threaten(player,target){ if(target.storage.pyuhuo=='mid') return 0.6; if(target.storage.pyuhuo=='over') return 1; return 0.4; @@ -2473,12 +2473,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mengye:{ trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.countCards('h'); }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('mengye'),function(card,player,target){ return target.countCards('h')>0; @@ -2513,7 +2513,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseAfter'}, priority:-50, direct:true, - filter:function(event,player){ + filter(event,player){ if(get.mode()=='identity'&&_status.mode=='zhong'&& game.zhu&&!game.zhu.isZhu&&player==game.zhong){ return false; @@ -2523,7 +2523,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return !player.isTurnedOver(); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('mengye'),function(card,player,target){ if(target==player){ @@ -2583,7 +2583,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'由$控制本回合行动' }, - init:function(player){ + init(player){ player.ai.modAttitudeFrom=function(from,to){ return get.attitude(player.storage.mengye2,to); } @@ -2592,7 +2592,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return att; } }, - onremove:function(player){ + onremove(player){ delete player.ai.modAttitudeFrom; delete player.ai.modAttitudeTo; delete player.storage.mengye2; @@ -2602,7 +2602,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:['phaseAfter','dieBegin']}, forced:true, popup:false, - content:function(){ + content(){ player.storage.mengye2.in('mengye'); if(player==game.me&&player.storage.mengye3){ game.swapPlayerAuto(player.storage.mengye2); @@ -2618,7 +2618,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lianzhan:{ trigger:{source:'damageEnd'}, forced:true, - content:function(){ + content(){ if(player.getStat().damage>trigger.num){ player.gainMaxHp(); player.recover(); @@ -2635,14 +2635,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kuixin:{ trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ if(current==player) return false; var nh=current.countCards('h'); return nh&&nh>=player.countCards('h'); }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('kuixin'),function(card,player,target){ if(target==player) return false; @@ -2670,16 +2670,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fuhua:{ enable:'phaseUse', filterCard:{name:'du'}, - check:function(){return 1}, - filterTarget:function(card,player,target){ + check(){return 1}, + filterTarget(card,player,target){ return !target.hasSkill('moxie')&&!target.hasSkill('fuhua2'); }, - filter:function(event,player){ - return player.countCards('h','du'); + filter(event,player){ + return player.countCards('h','du')>0; }, discard:false, prepare:'give', - content:function(){ + content(){ 'step 0' target.gain(cards,player); var choice=1; @@ -2705,7 +2705,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:8, expos:0.2, result:{ - player:function(player,target){ + player(player,target){ if(player.countCards('h')<=2) return 0; if(get.attitude(target,player)>0) return 1; if(get.effect(target,{name:'juedou'},player,player)>0) return 1.5; @@ -2718,16 +2718,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseEnd'}, forced:true, priority:1, - filter:function(event,player){ + filter(event,player){ return player.storage.fuhua2.isIn()&&player.countCards('h')>0; }, mark:'character', intro:{ - content:function(storage){ + content(storage){ return '每个结束阶段需交给'+get.translation(storage)+'一张手牌'; } }, - content:function(){ + content(){ 'step 0' player.chooseCard('h',true,'交给'+get.translation(player.storage.fuhua2)+'一张手牌'); 'step 1' @@ -2744,10 +2744,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'dieAfter'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.player==player.storage.fuhua2; }, - content:function(){ + content(){ player.removeSkill('fuhua2'); } } @@ -2757,11 +2757,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'damageBefore'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ var evt=event.getParent(3); return evt.name=='fuhua'&&evt.target==event.source; }, - content:function(){ + content(){ trigger.getParent(3).target.storage.fuhua_failed=true; } }, @@ -2769,7 +2769,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'loseHpBegin'}, forced:true, filter:(event)=>event.type=='du', - content:function(){ + content(){ trigger.cancel(); player.draw(2); }, @@ -2783,10 +2783,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ use:{ trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, - content:function(){ + content(){ var hs=player.getCards('h'); for(var i=0;iplayer.hp; }); }, - logTarget:function(event,player){ + logTarget(event,player){ return game.filterPlayer(function(current){ return current.hp>player.hp; }); }, - content:function(){ + content(){ 'step 0' event.targets=game.filterPlayer(function(current){ return current.hp>player.hp; @@ -2856,10 +2856,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gfuhun:{ trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&!player.isTurnedOver(); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('gfuhun'),function(card,player,target){ return target!=player&&target.countCards('h')>0; @@ -2889,7 +2889,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qianhou:{ trigger:{player:'phaseBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var list=[]; for(var i=0;i0; }, - content:function(){ + content(){ "step 0" var next=player.chooseToDiscard(get.prompt('zhongji',trigger.player),{color:'black'}); next.logSkill=['zhongji',trigger.player]; @@ -2987,7 +2987,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fuwen:{ trigger:{player:'phaseDiscardEnd'}, frequent:true, - filter:function(event,player){ + filter(event,player){ if(event.cards){ for(var i=0;i0; }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('jinzhou'),function(card,player,target){ return target!=player&&!target.hasSkill('fengyin'); @@ -3035,14 +3035,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ midian:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('h',{type:['trick','delay']})>0; }, filterCard:{type:['trick','delay']}, - check:function(card){ + check(card){ return 10-get.value(card); }, - content:function(){ + content(){ var list=get.inpile('trick','trick'); var list2=[]; for(var i=0;i<3;i++){ @@ -3061,10 +3061,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xingluo:{ trigger:{player:'phaseBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return !player.isMaxHandcard(); }, - content:function(){ + content(){ 'step 0' var nh=player.countCards('h'); var num=game.countPlayer(function(current){ @@ -3117,26 +3117,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yuelu:{ enable:'chooseToUse', - filter:function(event,player){ - return event.type=='dying'&&player.countCards('he',{color:'black'}); + filter(event,player){ + return event.type=='dying'&&player.countCards('he',{color:'black'})>0; }, // alter:true, filterCard:{color:'black'}, position:'he', - check:function(card){ + check(card){ return 11-get.value(card); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target==_status.event.dying; }, selectTarget:-1, - content:function(){ + content(){ target.recover(); if(!get.is.altered('yuelu')) target.changeHujia(); }, ai:{ order:10, - skillTagFilter:function(player){ + skillTagFilter(player){ if(player.countCards('he',{color:'black'})==0) return false; }, save:true, @@ -3150,7 +3150,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', filterCard:true, position:'he', - check:function(card){ + check(card){ var player=_status.event.player; var num=0; if(player.hasSkill('yushou_misha')) num+=1.5; @@ -3158,11 +3158,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.hasSkill('yushou_leiouke')) num+=1.5; return 5-num-get.value(card); }, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('yushou_misha')&&player.hasSkill('yushou_huofu')&&player.hasSkill('yushou_leiouke')) return false; return true; }, - content:function(){ + content(){ if(!lib.character.stone_misha){ lib.character.stone_misha=['male','shu',3,['lschaofeng'],['minskin','stone','mode:stone'],[3,3,'hunter']]; } @@ -3194,7 +3194,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yushou_lose:{ trigger:{player:'phaseBegin'}, silent:true, - content:function(){ + content(){ var list=['yushou_misha','yushou_huofu','yushou_leiouke']; var skills=player.getSkills(); for(var i=0;i=1; }, - content:function(){ + content(){ player.changeHujia(); }, ai:{ effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return; return 0.6; @@ -3230,10 +3230,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ viewAs:{name:'juedou'}, filterCard:{color:'black'}, position:'he', - viewAsFilter:function(player){ + viewAsFilter(player){ if(!player.countCards('he',{color:'black'})) return false; }, - check:function(card){ + check(card){ return 6-get.value(card); }, ai:{ @@ -3246,7 +3246,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageBegin'}, forced:true, usable:1, - content:function(){ + content(){ trigger.num++; } }, @@ -3256,49 +3256,49 @@ game.import('character',function(lib,game,ui,get,ai,_status){ count:{ trigger:{player:'useCard'}, silent:true, - filter:function(event,player){ + filter(event,player){ return event.card.name.indexOf('hsqingyu_')==0; }, - content:function(){ + content(){ player.storage.qingzun++; player.updateMarks(); } }, draw1:{ trigger:{player:'phaseBegin'}, - filter:function(event,player){ + filter(event,player){ if(get.is.altered('qingzun')) return player.storage.qingzun>=3; return player.storage.qingzun>=2; }, frequent:true, - content:function(){ + content(){ player.draw(); } }, draw2:{ trigger:{player:'phaseEnd'}, - filter:function(event,player){ + filter(event,player){ if(get.is.altered('qingzun')) return player.storage.qingzun>=9; return player.storage.qingzun>=6; }, frequent:true, - content:function(){ + content(){ player.draw(); } }, }, mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+player.storage.qingzun; } }, - init:function(player){ + init(player){ player.storage.qingzun=0; }, mark:true, marktext:'玉', intro:{ - content:function(storage,player){ + content(storage,player){ if(!storage) return '未使用过青玉牌'; var str='手牌上限+'+storage; var num1,num2; @@ -3324,7 +3324,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ayuling:{ trigger:{player:'damageEnd'}, frequent:true, - content:function(){ + content(){ var list=['feibiao','hufu','zhao','zhanfang','shandian']; player.gain(game.createCard('hsqingyu_'+list.randomGet()),'draw'); }, @@ -3332,7 +3332,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(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; if(!target.hasFriend()) return; @@ -3348,15 +3348,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, position:'he', - filterCard:function(card){ + filterCard(card){ return get.suit(card)=='spade'; }, viewAs:{name:'wuzhong'}, - viewAsFilter:function(player){ + viewAsFilter(player){ if(!player.countCards('he',{suit:'spade'})) return false; }, prompt:'将一张黑桃牌当作无中生有使用', - check:function(card){return 7-get.value(card)}, + check(card){return 7-get.value(card)}, ai:{ threaten:1.4, order:9, @@ -3364,13 +3364,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, bzhuiji:{ trigger:{global:'dieAfter'}, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.source)<=0; }, - filter:function(event,player){ + filter(event,player){ return event.source&&event.source.isAlive()&&event.source!=player; }, - content:function(){ + content(){ player.draw(2); player.useCard({name:'juedou'},trigger.source); }, @@ -3383,10 +3383,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:2, filterCard:true, - check:function(card){ + check(card){ return 7-get.value(card); }, - content:function(){ + content(){ 'step 0' var list=get.inpile('trick'); list=list.randomGets(3); @@ -3410,17 +3410,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lianjin:{ enable:'phaseUse', usable:1, - filterCard:function(card){ + filterCard(card){ return get.type(card)!='hsyaoshui'; }, - check:function(card){ + check(card){ return 8-get.value(card) }, position:'he', // discard:false, // lose:false, // delay:false, - content:function(){ + content(){ 'step 0' var names=[]; var inpile=lib.inpile.slice(0); @@ -3497,7 +3497,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'hs_kazhakusi', multitarget:true, multiline:true, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ var info=get.info(card); var names=info.names; for(var i=0;i0; }, - content:function(){ + content(){ player.gain(game.createCard(trigger.target.getCards('h').randomGet()),'draw'); } }, @@ -3613,12 +3613,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'shaMiss'}, frequent:true, usable:1, - filter:function(event){ + filter(event){ return event.target.hasCard(function(card){ return !get.info(card).unique; },'e'); }, - content:function(){ + content(){ player.gain(game.createCard(trigger.target.getCards('e',function(card){ return !get.info(card).unique; }).randomGet()),'draw'); @@ -3629,22 +3629,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yingxi:{ trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return !player.getStat('damage')&&player.countCards('he',{color:'black'})>0; }, - content:function(){ + content(){ 'step 0' player.chooseCardTarget({ prompt:get.prompt('yingxi'), filterCard:{color:'black'}, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return lib.filter.targetEnabled({name:'sha'},player,target); }, position:'he', - ai1:function(card){ + ai1(card){ return 8-get.value(card); }, - ai2:function(target){ + ai2(target){ return get.effect(target,{name:'sha'},player,player); } }); @@ -3659,23 +3659,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'shaBegin'}, forced:true, popup:false, - filter:function(event,player){ + filter(event,player){ return event.skill=='yingxi'&&event.target.isHealthy(); }, - content:function(){ + content(){ trigger.directHit=true; } }, hsguimou:{ trigger:{player:'damageEnd'}, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.source)<=0; }, - filter:function(event,player){ + filter(event,player){ return event.source&&event.source.isAlive()&&event.source!=player&&event.source.countCards('h')>0; }, logTarget:'source', - content:function(){ + content(){ var card=trigger.source.getCards('h').randomGet(); if(card){ player.gain(card,trigger.source); @@ -3694,7 +3694,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ maixie_hp:true, maixie_defend:true, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; if(!target.hasFriend()) return false; if(get.tag(card,'damage')&&player.countCards('h')>1) return [1,0,0,-1]; @@ -3705,7 +3705,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ peiyu:{ trigger:{player:['phaseBegin']}, direct:true, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('peiyu'),function(card,player,target){ for(var i=1;i<=8;i++){ @@ -3730,7 +3730,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ peiyu2:{ trigger:{player:'damageAfter'}, silent:true, - content:function(){ + content(){ player.removeAdditionalSkill('peiyu'); } }, @@ -3739,10 +3739,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:true, position:'he', filterTarget:true, - check:function(card){ + check(card){ return 6-get.value(card); }, - content:function(){ + content(){ 'step 0' var rand=['tuteng1','tuteng2','tuteng3','tuteng4', 'tuteng5','tuteng6','tuteng7','tuteng8']; @@ -3858,7 +3858,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ expose:0.2, order:5, result:{ - target:function(player,target){ + target(player,target){ for(var i=1;i<=8;i++){ if(target.hasSkill('tuteng'+i)) return 0; } @@ -3872,7 +3872,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'dieBegin'}, forced:true, popup:false, - content:function(){ + content(){ game.countPlayer(function(current){ for(var j in current.storage.peiyu){ if(current.storage.peiyu[j]==player){ @@ -3884,10 +3884,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, wzhanyi:{ trigger:{player:'phaseUseBefore'}, - check:function(event,player){ + check(event,player){ return player.countCards('h')+2<=player.hp; }, - content:function(){ + content(){ 'step 0' event.cards=get.cards(3); trigger.cancel(); @@ -3917,10 +3917,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shengteng:{ trigger:{source:'damageEnd'}, forced:true, - filter:function(event){ + filter(event){ return event.card&&get.type(event.card)=='trick'; }, - content:function(){ + content(){ player.gainMaxHp(true); player.recover(); }, @@ -3928,17 +3928,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuansu:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.maxHp-player.hp>=3; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player.canUse('yuansuhuimie',target); }, selectTarget:-1, multitarget:true, multiline:true, line:'thunder', - content:function(){ + content(){ player.maxHp=player.hp; player.update(); targets.sort(lib.sort.seat); @@ -3951,7 +3951,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, skillAnimation:true, animationColor:'fire', - filter:function(event,player){ + filter(event,player){ if(player.storage.nuyan&&player.storage.nuyan.length){ var num=0; for(var i=0;i1) return 1; return 0; } @@ -4058,14 +4058,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nuyan:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{color:'red'})>0 }, - init:function(player){ + init(player){ player.storage.nuyan=[]; }, chooseButton:{ - dialog:function(event,player){ + dialog(event,player){ var list=[]; for(var i=0;i0; }, - content:function(){ + content(){ var list=[]; for(var i=0;i=2; }, - content:function(){ + content(){ player.recover(player.maxHp); player.goMad('phaseAfter'); } @@ -4318,7 +4318,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kuangluan3:{ trigger:{player:'phaseBegin'}, silent:true, - content:function(){ + content(){ player.storage.kuangluan=[]; player.unmarkSkill('kuangluan'); } @@ -4326,10 +4326,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xiubu:{ trigger:{player:'equipEnd'}, frequent:true, - filter:function(event){ + filter(event){ return lib.inpile.includes(event.card.name)&&get.subtype(event.card)=='equip1'&&typeof lib.cardType.hslingjian=='number'; }, - content:function(){ + content(){ var num=1; var info=get.info(trigger.card); if(info&&info.distance&&typeof info.distance.attackFrom=='number'){ @@ -4353,11 +4353,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zengli:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&!target.isMin(); }, delay:false, - content:function(){ + content(){ 'step 0' var list=[]; for(var i=0;i=0) return false; if(player.hp>2) return true; if(player.hp<2) return false; return player.hp>=event.player.hp; }, - content:function(){ + content(){ 'step 0' trigger.player.loseHp(); 'step 1' @@ -4557,7 +4557,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, delay:false, unique:true, - content:function(){ + content(){ 'step 0' var list=get.gainableSkills(); list.remove('maoxian'); @@ -4611,14 +4611,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delay(); }, intro:{ - content:function(storage,player){ + content(storage,player){ return '当前技能:'+get.translation(player.additionalSkills.maoxian); } }, ai:{ order:11, result:{ - player:function(player){ + player(player){ if(player.getStat().skill.maoxian) return 0; return 1; } @@ -4631,7 +4631,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, delay:false, unique:true, - getSkills:function(player,current){ + getSkills(player,current){ var names=[]; var list=[]; var map={}; @@ -4663,10 +4663,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return [list,map]; }, - onremove:function(player){ + onremove(player){ player.removeAdditionalSkill('maoxian'); }, - content:function(){ + content(){ 'step 0' var lm=lib.skill.maoxian.getSkills(player,player.additionalSkills.maoxian); var list=lm[0]; @@ -4710,7 +4710,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:11, result:{ - player:function(player){ + player(player){ if(player.getStat().skill.maoxian) return 0; return 1; } @@ -4719,13 +4719,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yiwen:{ trigger:{target:'useCardToBegin'}, - filter:function(event,player){ + filter(event,player){ return event.targets&&event.targets.length==1&& event.target!=event.player&&_status.currentPhase==event.player&& !event.player.hasSkill('yiwen2')&&!get.info(event.card).unique; }, forced:true, - content:function(){ + content(){ player.gain(game.createCard(trigger.card),'gain2'); trigger.player.addTempSkill('yiwen2'); }, @@ -4737,7 +4737,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tanbao_old:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ if(player.hp==player.maxHp) return false; var hs=player.getCards('h'); if(hs.length==0) return false; @@ -4753,7 +4753,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return true; }, - content:function(){ + content(){ 'step 0' player.showHandcards(); 'step 1' @@ -4771,17 +4771,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:10, filterCard:true, position:'he', - check:function(card){ + check(card){ if(_status.event.player.hp==1){ return 7-get.value(card); } return 6-get.value(card); }, selectCard:3, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>=3; }, - content:function(){ + content(){ 'step 0' event.cards=get.cards(3); if(!event.isMine()) player.showCards(event.cards); @@ -4815,7 +4815,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qianghuax:{ enable:'phaseUse', usable:1, - filterCard:function(card){ + filterCard(card){ var type=get.type(card,'trick'); for(var i=0;i0; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(get.color(card)=='red'){ return player.canUse('chiyuxi',target); } @@ -5168,11 +5168,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:true, position:'he', log:'notarget', - check:function(card){ + check(card){ return 6-get.value(card); }, multitarget:true, - content:function(){ + content(){ if(get.color(cards[0])=='black'){ player.useCard({name:'jingleishan'},cards,targets); } @@ -5183,7 +5183,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:9.1, result:{ - target:function(player,target){ + target(player,target){ var card=ui.selected.cards[0]; if(card&&get.color(card)=='black'){ return get.effect(target,{name:'jingleishan'},player,target); @@ -5196,7 +5196,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shifa:{ trigger:{player:'phaseUseBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var list=[]; var target=player.getEnemies().randomGet(); @@ -5223,11 +5223,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCard'}, frequent:true, usable:3, - filter:function(event,player){ + filter(event,player){ if(_status.currentPhase!=player) return false; return (get.type(event.card)=='trick'&&event.card.isCard); }, - content:function(){ + content(){ player.draw(); } } @@ -5240,7 +5240,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ oldshifa:{ trigger:{player:'phaseUseBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var list=[]; var target=player.getEnemies().randomGet(); @@ -5266,11 +5266,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ draw:{ trigger:{player:'useCard'}, frequent:true, - filter:function(event,player){ + filter(event,player){ if(_status.currentPhase!=player) return false; return (get.type(event.card)=='trick'&&event.card.isCard); }, - content:function(){ + content(){ player.draw(); } } @@ -5283,21 +5283,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuanzheng:{ trigger:{player:'useCardToBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ return event.target&&event.target!=player&&get.distance(player,event.target)>1&&event.target.countCards('he')>0; }, - content:function(){ + content(){ player.discardPlayerCard(trigger.target,get.prompt('yuanzheng',trigger.target),'hej').logSkill=['yuanzheng',trigger.target]; } }, yuanzheng_old:{ trigger:{player:'useCardToBegin'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(event.getParent(2).name=='yuanzheng') return false; return event.target&&event.target!=player&&get.distance(player,event.target,'attack')>1; }, - content:function(){ + content(){ 'step 0' player.chooseControl('draw_card','出杀','cancel2',function(){ if(get.effect(trigger.target,{name:'sha'},player,player)>0){ @@ -5327,15 +5327,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mark:true, skillAnimation:true, animationColor:'fire', - init:function(player){ + init(player){ player.storage.byuhuo=false; }, - filter:function(event,player){ + filter(event,player){ if(player.hp>0) return false; if(player.storage.byuhuo) return false; return true; }, - content:function(){ + content(){ player.storage.byuhuo=true; player.addSkill('byuhuo2'); player.maxHp=2; @@ -5346,12 +5346,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - threaten:function(player,target){ + threaten(player,target){ if(!target.storage.byuhuo) return 0.6; } }, intro:{ - content:function(storage,player){ + content(storage,player){ if(storage){ if(player.hasSkill('byuhuo2')){ return '不能成为其他角色卡牌的目标;在下一准备阶段,对所有其他角色造成2点火焰伤害'; @@ -5367,7 +5367,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ byuhuo2:{ trigger:{player:'phaseBegin'}, forced:true, - content:function(){ + content(){ 'step 0' var targets=game.filterPlayer(); targets.remove(player); @@ -5387,7 +5387,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mod:{ - targetEnabled:function(card,player,target){ + targetEnabled(card,player,target){ if(player!=target) return false; } } @@ -5397,7 +5397,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filterTarget:true, selectTarget:[1,Infinity], - content:function(){ + content(){ 'step 0' if(target==targets[0]){ game.asyncDraw(targets); @@ -5412,7 +5412,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - target:function(player,target){ + target(player,target){ if(target.countCards('j')) return 2; switch(target.countCards('he')){ case 0:return 0; @@ -5430,7 +5430,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filterTarget:true, selectTarget:[1,Infinity], - content:function(){ + content(){ 'step 0' if(target==targets[0]){ game.asyncDraw(targets,2); @@ -5445,7 +5445,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - target:function(player,target){ + target(player,target){ if(target.countCards('j')) return 2; switch(target.countCards('he')){ case 0:return 0; @@ -5461,7 +5461,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ duzhang:{ trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ var stat=player.getStat('card'); for(var i in stat){ if(typeof stat[i]=='number'&&get.type(i,'trick')=='trick'){ @@ -5470,7 +5470,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return true; }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('duzhang'),function(card,player,target){ return target!=player; @@ -5486,7 +5486,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, duzhang2:{ mod:{ - cardEnabled:function(card){ + cardEnabled(card){ if(get.type(card,'trick')=='trick') return false; } }, @@ -5499,10 +5499,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hannu:{ trigger:{player:'damageEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0; }, - content:function(){ + content(){ 'step 0' var nh=player.countCards('h'); if(nh){ @@ -5521,7 +5521,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(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; if(!target.hasFriend()) return; @@ -5544,7 +5544,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chuidiao:{ trigger:{player:'phaseEnd'}, forced:true, - content:function(){ + content(){ var num=Math.floor(Math.random()*3); if(num) player.draw(num); }, @@ -5552,27 +5552,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hhudun:{ trigger:{global:'phaseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return !player.hujia; }, - content:function(){ + content(){ player.changeHujia(); }, group:'hhudun_hujia', subSkill:{ hujia:{ trigger:{player:'damageEnd'}, - filter:function(event){ + filter(event){ return event.hujia==event.num; }, forced:true, - content:function(){ + content(){ player.draw(); } } }, ai:{ - threaten:function(player,target){ + threaten(player,target){ if(target.hujia){ return 0.5; } @@ -5586,7 +5586,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, forced:true, trigger:{player:'gainAfter'}, - filter:function(event,player){ + filter(event,player){ if(event.parent.parent.name=='phaseDraw') return false; if(event.parent.name=='fenlie') return false; if(!event.cards) return false; @@ -5596,7 +5596,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, usable:2, - content:function(){ + content(){ var cards=[]; for(var i=0;i0; } else{ - return event.source&&event.source!=player&&event.source.countCards('e'); + return event.source&&event.source!=player&&event.source.countCards('e')>0; } }, - logTarget:function(event,player){ + logTarget(event,player){ if(player==event.player){ return event.source; } @@ -5665,7 +5665,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.player; } }, - content:function(){ + content(){ var target=(player==trigger.player)?trigger.source:trigger.player; if(target){ var cards=target.getCards('e'); @@ -5679,7 +5679,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xiaorong:{ mod:{ - ignoredHandcard:function(card,player){ + ignoredHandcard(card,player){ if(get.type(card)=='equip'){ return true; } @@ -5687,10 +5687,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseEnd'}, forced:true, - filter:function(event,player){ - return player.countCards('h',{type:'equip'}); + filter(event,player){ + return player.countCards('h',{type:'equip'})>0; }, - content:function(){ + content(){ var cards=player.getCards('h',{type:'equip'}); if(cards.length){ player.lose(cards)._triggered=null; @@ -5711,7 +5711,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ effect:{ - player:function(card,player){ + player(card,player){ if(_status.currentPhase!=player) return; if(get.type(card)=='equip'&&get.equipValueNumber(card)<7){ if(player.needsToDiscard(2)) return; @@ -5727,17 +5727,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ begin:{ trigger:{global:'phaseUseBegin'}, silent:true, - content:function(){ + content(){ trigger.player.storage.shixu_begin=get.time(); } }, end:{ trigger:{global:'phaseUseEnd'}, silent:true, - filter:function(event,player){ + filter(event,player){ return typeof event.player.storage.shixu_begin=='number'; }, - content:function(){ + content(){ trigger.player.storage.shixu=get.time()-trigger.player.storage.shixu_begin; delete trigger.player.storage.shixu_begin; } @@ -5745,14 +5745,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:{ trigger:{global:'phaseEnd'}, forced:true, - check:function(event,player){ + check(event,player){ return get.attitude(player,event.player)<0; }, - filter:function(event,player){ + filter(event,player){ return typeof event.player.storage.shixu=='number'&& event.player.storage.shixu>3000&&event.player.countCards('he')>0&&event.player.isAlive(); }, - content:function(){ + content(){ player.line(trigger.player,'green'); trigger.player.chooseToDiscard('he',true,Math.floor(trigger.player.storage.shixu/3000)); delete trigger.player.storage.shixu; @@ -5764,10 +5764,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseAfter'}, forced:true, priority:-50, - filter:function(event,player){ + filter(event,player){ return event.skill!='jixuan'; }, - content:function(){ + content(){ player.draw(); player.insertPhase(); }, @@ -5777,7 +5777,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, qianghua:{ trigger:{player:'useCardAfter'}, - filter:function(event,player){ + filter(event,player){ if(event.parent.name=='qianghua') return false; if(player.storage.qianghua>=1) return false; if(_status.currentPhase!=player) return false; @@ -5797,11 +5797,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return true; }, - check:function(event,player){ + check(event,player){ if(get.tag({name:event.card.name},'norepeat')) return false; return true; }, - content:function(){ + content(){ player.storage.qianghua++; var card=game.createCard(trigger.card.name,trigger.card.suit,trigger.card.number,trigger.card.nature); player.useCard(card,(trigger._targets||trigger.targets).slice(0)); @@ -5814,7 +5814,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clear:{ trigger:{player:'phaseBefore'}, silent:true, - content:function(){ + content(){ player.storage.qianghua=0; } } @@ -5824,14 +5824,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ biri:{ trigger:{global:'useCard'}, priority:15, - filter:function(event,player){ + filter(event,player){ return event.card.name=='sha'&&event.player!=player&& get.distance(player,event.targets[0])<=1&& player.countCards('h','shan')>0&& event.targets.includes(player)==false&&event.targets.length==1; }, direct:true, - content:function(){ + content(){ "step 0" var effect=0; for(var i=0;i0; }, - content:function(){ + content(){ trigger.num--; player.removeSkill('stuxi2'); } @@ -5909,26 +5909,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageEnd'}, forced:true, usable:1, - filter:function(event,player){ + filter(event,player){ if(!lib.card.hslingjian_jinjilengdong){ return false; } return true; }, - content:function(){ + content(){ player.gain(game.createCard('hslingjian_jinjilengdong'),'gain2'); } }, bingdong_old:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return !player.isTurnedOver(); }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.isTurnedOver()&&player!=target; }, - content:function(){ + content(){ 'step 0' if(!player.isTurnedOver()){ player.turnOver(); @@ -5942,7 +5942,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:1, expose:0.2, result:{ - target:function(player,target){ + target(player,target){ if(get.attitude(player,target)<-3&&player.identity!='zhu'){ return -1; } @@ -5954,10 +5954,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ luoshi:{ trigger:{player:'damageEnd'}, forced:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0||(event.source&&event.source.countCards('he')>0); }, - content:function(){ + content(){ 'step 0' var hs=player.getCards('he'); if(hs.length){ @@ -5978,10 +5978,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ronghuo:{ trigger:{player:'useCardToBefore'}, priority:7, - filter:function(event,player){ + filter(event,player){ if(event.card.name=='sha'&&!event.card.nature) return true; }, - check:function(event,player){ + check(event,player){ var att=get.attitude(player,event.target); if(event.target.hasSkillTag('nofire')){ return att>0; @@ -5989,7 +5989,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return att<=0; }, forced:true, - content:function(){ + content(){ trigger.card.nature='fire'; player.addSkill('ronghuo2'); player.storage.ronghuo=trigger.card; @@ -5999,17 +5999,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'useCardAfter'}, forced:true, popup:false, - content:function(){ + content(){ delete player.storage.ronghuo.nature; } }, fushi:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.hp0){ if(num>3){ @@ -6319,7 +6319,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ threaten:1.8, - order:function(name,player){ + order(name,player){ var max=true,num=0; var players=game.filterPlayer(); for(var i=0;i0){ target.draw(num); @@ -6365,7 +6365,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ threaten:1.8, - order:function(name,player){ + order(name,player){ var max=true,num=0; var players=game.filterPlayer(); for(var i=0;i0) return false; }, @@ -6431,7 +6431,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ result:{ player:10 }, - threaten:function(player,target){ + threaten(player,target){ if(target.storage.chongsheng>0) return 0.6; } }, @@ -6443,13 +6443,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, // alter:true, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')<(get.is.altered('guozai')?3:4); }, - init:function(player){ + init(player){ player.storage.guozai2=0; }, - content:function(){ + content(){ var num=(get.is.altered('guozai')?3:4)-player.countCards('h'); player.draw(num); player.addSkill('guozai2'); @@ -6470,7 +6470,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseUseEnd'}, forced:true, - content:function(){ + content(){ player.chooseToDiscard('he',true,player.storage.guozai2); player.storage.guozai2=0; player.removeSkill('guozai2'); @@ -6479,13 +6479,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ guozaix:{ enable:'phaseUse', usable:2, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')<4; }, - init:function(player){ + init(player){ player.storage.guozaix2=0; }, - content:function(){ + content(){ var num=4-player.countCards('h'); player.draw(num); player.addSkill('guozaix2'); @@ -6506,7 +6506,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseUseEnd'}, forced:true, - content:function(){ + content(){ player.chooseToDiscard('he',true,player.storage.guozaix2); player.storage.guozaix2=0; player.removeSkill('guozaix2'); @@ -6516,12 +6516,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageEnd'}, forced:true, // alter:true, - filter:function(event,player){ + filter(event,player){ if(event._notrigger.includes(event.player)) return false; return event.card&&get.color(event.card)=='black'&& !event.player.isTurnedOver()&&event.player.isAlive(); }, - content:function(){ + content(){ trigger.player.turnOver(); if(get.is.altered('hanshuang')) trigger.player.draw(); player.loseHp(); @@ -6529,7 +6529,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ threaten:1.5, effect:{ - player:function(card,player,target,current){ + player(card,player,target,current){ if(get.color(card)=='black'&&get.tag(card,'damage')){ return [1,0,1,-2]; } @@ -6541,18 +6541,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageEnd'}, forced:true, // alter:true, - filter:function(event,player){ + filter(event,player){ if(event._notrigger.includes(event.player)) return false; return event.card&&get.color(event.card)=='black'&& !event.player.isTurnedOver()&&event.player.isAlive(); }, - content:function(){ + content(){ trigger.player.turnOver(); }, ai:{ threaten:1.5, effect:{ - player:function(card,player,target,current){ + player(card,player,target,current){ if(get.color(card)=='black'&&get.tag(card,'damage')){ return [1,0,1,-2]; } @@ -6567,10 +6567,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'dieAfter'}, forced:true, globalFixed:true, - filter:function(event,player){ + filter(event,player){ return event.player.hasSkill('bingshi')&&event.player.isDead(); }, - content:function(){ + content(){ trigger.player.line(player,'thunder'); player.damage('nosource','thunder').animate=false; player.$damage(trigger.player); @@ -6587,10 +6587,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huanwu:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.storage.huanwu; }, - content:function(){ + content(){ target.gainMaxHp(); target.recover(); target.draw(2); @@ -6608,7 +6608,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ threaten:1.2, result:{ - target:function(player,target){ + target(player,target){ return 1/target.hp; } }, @@ -6618,33 +6618,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, fengnu:{ mod:{ - cardUsable:function(card){ + cardUsable(card){ if(get.info(card)&&get.info(card).forceUsable) return; return Infinity; }, - targetInRange:function(){ + targetInRange(){ if(!get.is.altered('fengnu')) return true; } }, // alter:true, trigger:{player:'useCard'}, - filter:function(event,player){ + filter(event,player){ if(_status.currentPhase!=player) return false; return player.countUsed(event.card)>1; }, forced:true, usable:3, - content:function(){ + content(){ player.draw(); } }, shengdun:{ trigger:{player:'phaseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return !player.hujia; }, - content:function(){ + content(){ player.changeHujia(); player.update(); }, @@ -6653,10 +6653,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseBegin'}, silent:true, priority:10, - init2:function(player){ + init2(player){ player.markSkill('shengdun'); }, - content:function(){ + content(){ if(player.storage.shengdun){ player.markSkill('shengdun'); } @@ -6670,10 +6670,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shengdun_old2:{ trigger:{player:'damageBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return event.num>0&&!player.storage.shengdun; }, - content:function(){ + content(){ trigger.num--; player.storage.shengdun=true; player.unmarkSkill('shengdun'); @@ -6682,10 +6682,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jingmeng:{ trigger:{player:'useCard'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase==player&&player.countUsed()==1; }, - content:function(){ + content(){ var type=get.type(trigger.card); var card=get.cardPile2(function(card){ return get.type(card)==type; @@ -6701,7 +6701,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kuixin_old:{ trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ var nh=player.countCards('h'); var nm=1; return game.hasPlayer(function(current){ @@ -6710,7 +6710,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }); }, - content:function(){ + content(){ 'step 0' var nh=player.countCards('h'); var nm=1; @@ -6750,10 +6750,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hswuji:{ trigger:{player:'phaseUseEnd'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.countUsed()>0; }, - content:function(){ + content(){ player.draw(player.countUsed()); }, ai:{ @@ -6762,12 +6762,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, bingshuang:{ trigger:{source:'damageEnd'}, - filter:function(event,player){ + filter(event,player){ if(event._notrigger.includes(event.player)) return false; return event.card&&get.type(event.card)=='trick'&& event.player.isAlive()&&!event.player.isTurnedOver(); }, - check:function(event,player){ + check(event,player){ if(event.player.hasSkillTag('noturn')) return; if(event.player.isTurnedOver()){ return get.attitude(player,event.player)>0; @@ -6775,7 +6775,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.attitude(player,event.player)<=0; }, logTarget:'player', - content:function(){ + content(){ trigger.player.draw(2); trigger.player.turnOver(); } @@ -6784,44 +6784,44 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'discardAfter'}, frequent:true, usable:1, - filter:function(event,player){ + filter(event,player){ if(!event.cards) return false; for(var i=0;i0; }, - content:function(){ + content(){ trigger.player.recover(); player.addTempSkill('shengyan2'); }, @@ -6859,10 +6859,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, // alter:true, - filter:function(event,player){ + filter(event,player){ return !player.isTurnedOver()&&player.countCards('h')<=player.hp; }, - content:function(){ + content(){ player.draw(get.is.altered('liechao')?3:4); player.turnOver(); player.skip('phaseDiscard'); @@ -6876,17 +6876,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, qingliu:{ trigger:{player:'damageBefore'}, - filter:function(event){ + filter(event){ return event.nature=='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 0; } } @@ -6895,24 +6895,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhongjia:{ trigger:{player:'damageEnd'}, forced:true, - filter:function(event){ + filter(event){ return event.num>0; }, - content:function(){ + content(){ player.changeHujia(); }, ai:{ nohujia:true, maixie:true, maixie_hp:true, - skillTagFilter:function(player){ + skillTagFilter(player){ return player.hp>player.countCards('h')&&player.hp>1; }, - threaten:function(player,target){ + threaten(player,target){ if(!target.hujia) return 0.8; }, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; return 0.8; @@ -6924,25 +6924,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dunji:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.hujia?true:false; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target&&get.distance(player,target,'attack')<=1; }, - selectTarget:function(){ + selectTarget(){ return [1,_status.event.player.hujia]; }, - contentBefore:function(){ + contentBefore(){ player.changeHujia(-targets.length); }, - content:function(){ + content(){ target.damage(); }, ai:{ order:9, result:{ - target:function(player,target){ + target(player,target){ var eff=get.damageEffect(target,player,target)+0.5; if(eff>0&&eff<=0.5) return 0; return eff; @@ -6953,10 +6953,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fengxing:{ trigger:{player:'loseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase!=player&&!player.hasSkill('fengxing2')&&player.countCards('he')>0; }, - content:function(){ + content(){ 'step 0' player.addTempSkill('fengxing2'); player.chooseToDiscard('he',get.prompt('fengxing')).set('ai',function(card){ @@ -6975,17 +6975,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fengxian:{ enable:'phaseUse', usable:1, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.countCards('h')>0; }, selectTarget:-1, - content:function(){ + content(){ target.chooseToDiscard(true); }, ai:{ order:8, result:{ - target:function(player,target){ + target(player,target){ var nh=target.countCards('h'); switch(nh){ case 0:return 0; @@ -7001,16 +7001,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qiaodong:{ enable:['chooseToUse','chooseToRespond'], filterCard:{type:'equip'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{type:'equip'})>0; }, viewAs:{name:'shan'}, position:'he', prompt:'将一张装备牌当闪使用或打出', - check:function(){return 1}, + check(){return 1}, ai:{ respondShan:true, - skillTagFilter:function(player){ + skillTagFilter(player){ if(!player.countCards('he',{type:'equip'})) return false; } } @@ -7019,10 +7019,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseEnd'}, forced:true, priority:-1, - filter:function(event,player){ + filter(event,player){ return player.countCards('he')>0; }, - content:function(){ + content(){ player.discard(player.getCards('he')); player.removeSkill('hsmengjing_mengye'); }, @@ -7036,13 +7036,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:{subtype:'equip2'}, position:'he', usable:1, - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{subtype:'equip2'})>0; }, - check:function(card){ + check(card){ return 7-get.value(card); }, - content:function(){ + content(){ player.changeHujia(); }, ai:{ @@ -7052,7 +7052,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, // mod:{ - // globalFrom:function(from,to,distance){ + // globalFrom(from,to,distance){ // return distance-from.hujia; // } // }, @@ -7061,14 +7061,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', filterCard:{subtype:'equip2'}, position:'he', - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{subtype:'equip2'})>0; }, - check:function(card){ + check(card){ if(get.position(card)=='e') return 0; return 7-get.value(card); }, - content:function(){ + content(){ player.changeHujia(); }, ai:{ @@ -7081,12 +7081,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shijie:{ trigger:{player:'phaseEnd'}, direct:true, - filter:function(event,player){ + filter(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.countCards('h'); }); }, - content:function(){ + content(){ 'step 0' player.chooseTarget(get.prompt('shijie'),function(card,player,target){ return player!=target&&target.countCards('h')>0; @@ -7111,20 +7111,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shengguang:{ enable:'phaseUse', filterCard:{color:'red'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{color:'red'})>0; }, position:'he', usable:1, - check:function(card){ + check(card){ return 9-get.value(card) }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ if(player.storage.anying) return true; if(target.hp>=target.maxHp) return false; return true; }, - content:function(){ + content(){ if(player.storage.anying){ target.loseHp(); } @@ -7135,7 +7135,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:9, result:{ - target:function(player,target){ + target(player,target){ if(player.storage.anying) return -1; if(target.hp==1) return 5; if(player==target&&player.countCards('h')>player.hp) return 5; @@ -7149,7 +7149,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinci:{ enable:'phaseUse', filterCard:{color:'black'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('he',{color:'black'})>0; }, position:'he', @@ -7158,11 +7158,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'已进入暗影形态' }, - check:function(card){ + check(card){ return 9-get.value(card) }, filterTarget:true, - content:function(){ + content(){ target.loseHp(); }, ai:{ @@ -7180,15 +7180,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:'epic', animationColor:'thunder', derivation:'xinci', - filter:function(event,player){ + filter(event,player){ return !player.storage.anying&&player.countCards('he',{color:'black'})>0; }, filterCard:{color:'black'}, position:'he', - check:function(card){ + check(card){ return 5-get.value(card); }, - content:function(){ + content(){ player.storage.anying=true; player.awakenSkill('anying'); player.removeSkill('shengguang'); @@ -7197,7 +7197,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - player:function(player){ + player(player){ if(player.hasUnknown()) return 0; return !game.hasPlayer(function(current){ return get.attitude(player,current)>0&¤t.isDamaged()&¤t.hp<=2; @@ -7209,7 +7209,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huanjue:{ trigger:{player:'useCard1'}, frequent:true, - filter:function(event,player){ + filter(event,player){ if(event._huanjue) return false; if(event.targets.length!=1) return false; var target=event.targets[0]; @@ -7222,7 +7222,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - // check:function(event,player){ + // check(event,player){ // var eff=get.effect(event.targets[0],event.card,event.player,player); // if(eff<=0) return true; // if(get.value(event.card,event.player,'raw')<5){ @@ -7230,11 +7230,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // } // return false; // }, - // prompt2:function(event,player){ + // prompt2(event,player){ // return '发现一张牌代替你对'+get.translation(event.targets[0])+'使用的'+get.translation(event.card); // }, autodelay:true, - content:function(){ + content(){ 'step 0' var list=[],list1=[],list2=[]; for(var i=0;i0; }, - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target&&!target.hasSkill('mdzhoufu2'); }, prepare:'throw', discard:false, - content:function(){ + content(){ target.$gain2(cards); target.storage.mdzhoufu2=cards[0]; target.addSkill('mdzhoufu2'); @@ -7545,7 +7545,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addVideo('storage',target,['mdzhoufu2',get.cardInfo(cards[0]),'card']); ui.special.appendChild(cards[0]); }, - check:function(card){ + check(card){ if(get.suit(card)=='spade'){ return 6-get.value(card); } @@ -7568,7 +7568,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, priority:10, mark:'card', - content:function(){ + content(){ "step 0" player.storage.mdzhoufu2.discard(); player.$throw(player.storage.mdzhoufu2); @@ -7600,19 +7600,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, zuzhou_old:{ trigger:{player:'damageEnd',source:'damageEnd'}, - check:function(event,player){ + check(event,player){ var target=(player==event.player)?event.source:event.player; return get.attitude(player,target)<0; }, - filter:function(event,player){ + filter(event,player){ var target=(player==event.player)?event.source:event.player; return target.isAlive(); }, - prompt:function(event,player){ + prompt(event,player){ var target=(player==event.player)?event.source:event.player; return get.prompt('zuzhou',target); }, - content:function(){ + content(){ "step 0" event.target=(player==trigger.player)?trigger.source:trigger.player; event.target.judge(function(card){ @@ -7631,13 +7631,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xianzhi:{ trigger:{global:'judgeBegin'}, frequent:true, - filter:function(){ + filter(){ return ui.cardPile.childNodes.length>1; }, - check:function(){ + check(){ return false; }, - content:function(){ + content(){ 'step 0' var str=''; if(trigger.card) str=get.translation(trigger.card.viewAs||trigger.card.name); @@ -7672,13 +7672,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, usable:1, // alter:true, - filter:function(event,player){ + filter(event,player){ if(event.responded) return false; return game.hasPlayer(function(current){ return current!=player&¤t.countCards('h'); }); }, - content:function(){ + content(){ "step 0" player.chooseTarget(get.prompt('jingxiang'),function(card,player,target){ if(target==player) return false; @@ -7722,7 +7722,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondShan:true, effect:{ - target:function(card){ + target(card){ if(get.tag(card,'respondShan')) return 0.4; if(get.tag(card,'respondSha')) return 0.4; } @@ -7732,15 +7732,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wlianji:{ trigger:{player:'phaseEnd'}, frequent:true, - filter:function(event,player){ + filter(event,player){ return player.countUsed()>player.hp; }, - content:function(){ + content(){ player.draw(2); }, - init:function(player){player.storage.jingce=true}, + init(player){player.storage.jingce=true}, intro:{ - content:function(storage,player){ + content(storage,player){ if(_status.currentPhase==player) return '已使用'+player.countUsed()+'张牌'; } } @@ -7748,7 +7748,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mengun:{ trigger:{global:'useCardToBefore'}, priority:12, - filter:function(event,player){ + filter(event,player){ if(event.player==player) return false; if(_status.currentPhase!=event.player) return false; if(event.player.hasSkill('mengun2')) return false; @@ -7757,7 +7757,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.type(event.card)=='basic'; }, direct:true, - content:function(){ + content(){ "step 0" var val=get.value(trigger.card); var suit=get.suit(trigger.card); @@ -7793,13 +7793,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mengun2:{ mark:'card', mod:{ - cardEnabled:function(card,player){ + cardEnabled(card,player){ if(card==player.storage.mengun2) return false; }, }, intro:{ content:'card', - onunmark:function(storage,player){ + onunmark(storage,player){ delete player.storage.mengun2; } }, @@ -7807,25 +7807,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jianren:{ enable:'phaseUse', usable:1, - filter:function(event,player){ + filter(event,player){ return player.getEquip(1)?true:false; }, - filterCard:function(card,player){ + filterCard(card,player){ return card==player.getEquip(1); }, position:'e', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player; }, selectCard:-1, selectTarget:-1, - content:function(){ + content(){ target.damage(); }, ai:{ order:9, result:{ - target:function(player,target){ + target(player,target){ return get.damageEffect(target,player,target); } } @@ -7833,12 +7833,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jihuo:{ trigger:{player:'phaseAfter'}, - filter:function(event,player){ + filter(event,player){ return player.countCards('h')>0&&event.skill!='jihuo'; }, direct:true, priority:-50, - content:function(){ + content(){ "step 0" var next=player.chooseToDiscard(get.prompt('jihuo')); next.ai=get.unuseful2; @@ -7855,7 +7855,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tzhenji:{ trigger:{player:'discardAfter'}, direct:true, - filter:function(event,player){ + filter(event,player){ if(player.hasSkill('tzhenji2')){ return false; } @@ -7866,7 +7866,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return false; }, - content:function(){ + content(){ "step 0"; player.chooseTarget(get.prompt('tzhenji')).ai=function(target){ var bool=get.attitude(player,target)>0; @@ -7889,7 +7889,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:1.2, expose:0.3, effect:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'loseCard')&&target.countCards('he')){ return 0.7; } @@ -7900,11 +7900,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tzhenji2:{}, tzhenji_old:{ trigger:{player:['useCard','respondEnd']}, - filter:function(event){ + filter(event){ return get.suit(event.card)=='spade'; }, direct:true, - content:function(){ + content(){ "step 0"; player.chooseTarget(get.prompt('tzhenji_old')).ai=function(target){ return get.damageEffect(target,player,player,'thunder')-1; @@ -7938,7 +7938,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ expose:0.2, threaten:1.2, effect_old:{ - target:function(card,player,target){ + target(card,player,target){ if(get.tag(card,'respondShan')){ var hastarget=game.hasPlayer(function(current){ return get.attitude(player,current)<0; @@ -7966,7 +7966,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tuteng_s:{ trigger:{player:'phaseUseBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ var rand=['tuteng1','tuteng2','tuteng3','tuteng4']; for(var i=0;i0; }, - content:function(){ + content(){ trigger.num--; player.removeSkill('tuteng3'); }, @@ -8308,10 +8312,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageBegin'}, forced:true, usable:1, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase==player&&event.card&&get.type(event.card)=='trick'&&event.notLink(); }, - content:function(){ + content(){ trigger.num++; } }, @@ -8323,7 +8327,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseEnd'}, forced:true, - content:function(){ + content(){ player.draw(); } }, @@ -8335,11 +8339,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{source:'damageBegin'}, forced:true, - filter:function(event,player){ + filter(event,player){ return _status.currentPhase==player&&event.card&&event.card.name=='sha'&&event.notLink(); }, usable:1, - content:function(){ + content(){ trigger.num++; } }, @@ -8351,12 +8355,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseEnd'}, 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('活力图腾:令一名其他角色回复1点体力',function(card,player,target){ return target!=player&&target.hp=player.hp) return -1; if(player.hp<=2){ @@ -8406,7 +8410,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, effect:{ - target:function(card){ + target(card){ if(get.tag(card,'damage')||get.tag(card,'loseHp')){ return 1.5; } @@ -8417,18 +8421,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, fenliu2:{ mod:{ - maxHandcard:function(player,num){ + maxHandcard(player,num){ return num+1; } } }, hongxi:{ trigger:{global:'dieAfter'}, - filter:function(event,player){ + filter(event,player){ return player.hp0; }, - content:function(){ + content(){ var cards=[]; var hs=target.getCards('h'); var es=target.getCards('e'); @@ -8752,7 +8756,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ useful:3, value:6, result:{ - target:function(player,target){ + target(player,target){ var num=0; if(target.countCards('h')) num--; if(target.countCards('e')) num--; @@ -8768,7 +8772,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:true, derivation:'hs_aya', filterTarget:true, - content:function(){ + content(){ target.gainMaxHp(); target.draw(); }, @@ -8777,7 +8781,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ useful:3, value:4, result:{ - target:function(player,target){ + target(player,target){ if(target.hp==target.maxHp){ if(target.maxHp<3) return 2; if(target.maxHp==3) return 1.5; @@ -8795,7 +8799,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:true, derivation:'hs_aya', filterTarget:true, - content:function(){ + content(){ target.changeHujia(); }, ai:{ @@ -8803,7 +8807,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ useful:3, value:6, result:{ - target:function(player,target){ + target(player,target){ return 2/Math.max(1,Math.sqrt(target.hp)); }, }, @@ -8816,7 +8820,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:true, derivation:'hs_aya', filterTarget:true, - content:function(){ + content(){ target.damage('thunder'); }, ai:{ @@ -8840,7 +8844,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fullimage:true, vanish:true, derivation:'hs_aya', - onEquip:function(){ + onEquip(){ player.draw(); }, ai:{ @@ -8855,16 +8859,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, enable:true, derivation:'hs_xialikeer', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.countCards('e')>0; }, - content:function(){ + content(){ target.discard(target.getCards('e').randomGets(2)); }, ai:{ order:5, result:{ - target:function(player,target){ + target(player,target){ if(target.hasSkillTag('noe')) return 0; if(target.countCards('e')>1) return -1.5; return -1; @@ -8879,16 +8883,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, enable:true, derivation:'hs_xialikeer', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.hasSkill('qianxing'); }, - content:function(){ + content(){ target.tempHide(); }, ai:{ order:2, result:{ - target:function(player,target){ + target(player,target){ if(player!=target&&get.distance(player,target,'absolute')<=1) return 0; var num=1; if(target==player){ @@ -8908,12 +8912,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, enable:true, derivation:'hs_xialikeer', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target==player; }, selectTarget:-1, modTarget:true, - content:function(){ + content(){ target.draw(2); }, ai:{ @@ -8932,7 +8936,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:'hs_xialikeer', range:{attack:1}, filterTarget:true, - content:function(){ + content(){ target.damage('fire'); }, ai:{ @@ -8955,16 +8959,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, enable:true, derivation:'hs_xialikeer', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.hasSkill('hsdusu_shinancao'); }, - content:function(){ + content(){ target.addSkill('hsdusu_shinancao'); }, ai:{ order:7, result:{ - target:function(player,target){ + target(player,target){ if(target.hp>1){ if(target.countCards('h')>2) return 1; return 0.5; @@ -8982,11 +8986,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:true, gainable:false, derivation:'hs_yelise', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target==player; }, selectTarget:-1, - content:function(){ + content(){ target.addSkill('hsbaowu_cangbaotu'); target.draw(); }, @@ -9006,11 +9010,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:true, gainable:false, derivation:'hs_yelise', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target==player; }, selectTarget:-1, - content:function(){ + content(){ 'step 0' var cards=target.getCards(); if(cards.length){ @@ -9044,7 +9048,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:10, result:{ - player:function(player){ + player(player){ if(player.countCards('h')>1) return 1; if(player.hp==1) return 1; return 0; @@ -9058,17 +9062,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ type:'hsshenqi', fullimage:true, vanish:true, - enable:function(card,player){ + enable(card,player){ return !player.isTurnedOver(); }, derivation:'hs_lafamu', filterTarget:true, - content:function(){ + content(){ target.gainMaxHp(); target.recover(); target.draw(4); }, - contentAfter:function(){ + contentAfter(){ if(!player.isTurnedOver()){ player.turnOver(); } @@ -9076,7 +9080,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:5, result:{ - target:function(player,target){ + target(player,target){ if(target.hp<=1) return 2; if(target.countCards('h')0; }, selectTarget:-1, - content:function(){ + content(){ if(target.countCards('hej')) player.gainPlayerCard(target,'hej',true); }, - contentAfter:function(){ + contentAfter(){ if(!player.isTurnedOver()){ player.turnOver(); } @@ -9162,7 +9166,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:true, derivation:'hs_ysera', filterTarget:true, - content:function(){ + content(){ target.damage(); }, ai:{ @@ -9183,11 +9187,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, enable:true, derivation:'hs_ysera', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return player!=target; }, selectTarget:-1, - content:function(){ + content(){ target.loseHp(); var he=target.getCards('he'); if(he.length){ @@ -9210,7 +9214,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:true, derivation:'hs_ysera', filterTarget:true, - content:function(){ + content(){ target.draw(); target.addSkill('hsmengjing_mengye'); }, @@ -9219,7 +9223,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ useful:5, value:10, result:{ - target:function(player,target){ + target(player,target){ if(target.hasSkill('hsmengjing_mengye')) return 0.5; return -target.countCards('he'); } @@ -9232,10 +9236,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, enable:true, derivation:'hs_ysera', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return !target.hasJudge('lebu')||target.countCards('e')>0; }, - content:function(){ + content(){ 'step 0' var es=target.getCards('e'); if(es.length){ @@ -9251,7 +9255,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ useful:5, value:10, result:{ - target:function(player,target){ + target(player,target){ var num=target.hp-target.countCards('he')-2; if(num>-1) return -1; if(target.hp<3) num--; @@ -9268,10 +9272,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, enable:true, derivation:'hs_ysera', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target.hp0; })){ @@ -9433,10 +9437,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ vanish:true, enable:true, derivation:'hs_hajiasha', - filterTarget:function(card,player,target){ + filterTarget(card,player,target){ return target!=player&&target.countCards('he'); }, - content:function(){ + content(){ 'step 0' target.chooseCard('he',true); 'step 1' @@ -9448,7 +9452,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:8.6, value:8, result:{ - target:function(player,target){ + target(player,target){ return -1/Math.sqrt(1+target.countCards('he')); } } diff --git a/node_modules/noname-typings/Card.d.ts b/node_modules/noname-typings/Card.d.ts index 07d0ce051..2fe33d972 100644 --- a/node_modules/noname-typings/Card.d.ts +++ b/node_modules/noname-typings/Card.d.ts @@ -5,7 +5,7 @@ declare type CardBaseUIData = { nature?: string; //用于某些方法,用于过滤卡牌的额外结构 - type?: string; + type?: string | string[]; subtype?: string; color?: string; diff --git a/node_modules/noname-typings/Skill.d.ts b/node_modules/noname-typings/Skill.d.ts index d08893f3e..370a6452b 100644 --- a/node_modules/noname-typings/Skill.d.ts +++ b/node_modules/noname-typings/Skill.d.ts @@ -291,6 +291,9 @@ declare interface Mod { aiValue?(player: Player, card: Card, num: number): number | void; aiUseful?(player: Player, card: Card, num: number): number | void; + + attackRange?(player: Player, num: number): number | void; + } /** 技能 */ @@ -790,7 +793,7 @@ declare interface Skill { * * 也可以是个自定义的方法 */ - content?: string | ThreeParmFun; + content?: string | ((storage: GameStorageItem, player: Player, skill: string) => string | void); /** * 标记数 * @@ -808,7 +811,7 @@ declare interface Skill { * * 注:该参数原本只在把整个标记移除时执行,后续可能自己扩展; */ - onunmark?: TwoParmFun | string; + onunmark?: TwoParmFun | string | boolean; // id?:string; //id名字需带“subplayer”,用于特殊模式显示信息用 }; @@ -937,9 +940,9 @@ declare interface Skill { * * 若不是字符串,则执行该方法 */ - prepare?: string | ThreeParmFun; + prepare?: string | ((cards: Card[], player: Player, targets: Target[]) => string | void); /** 在lose事件中使用,触发执行“lose_卡牌名”事件的content */ - onLose?: ContentFunc | ContentFunc[]; + onLose?: OldContentFuncByAll | OldContentFuncByAll[]; /** * 在lose事件中使用,必须要失去的卡牌为“equips”(装备牌),有onLose才生效。 * 若符合以上条件,则检测该牌是否需要后续触发执行“lose_卡牌名”事件,既上面配置的onLose @@ -1033,7 +1036,7 @@ declare interface Skill { * 指向线的颜色枚举: * fire(橙红色FF9244),thunder(浅蓝色8DD8FF),green(青色8DFFD8), */ - line?: string | { color: number[] }; + line?: string | { color: number[] } | boolean; /** 是否显示多条指引线 */ multiline?: boolean; @@ -1109,7 +1112,7 @@ declare interface Skill { * * 为数组时,这个数组就是选择目标数的区间 */ - selectTarget?: number | Select | NoneParmFum; + selectTarget?: number | Select | (() => number | Select); /** * 选择的牌需要满足的条件 * @@ -1147,11 +1150,8 @@ declare interface Skill { ignoreMod?: boolean; /** * 选择的目标需要满足的条件 - * @param card - * @param player - * @param target */ - filterTarget?(card: Card, player: Player, target: Player): boolean; + filterTarget?: ((card: Card, player: Player, target: Player) => boolean) | boolean; /** * 指定位置: * 'h':手牌区, 'e':装备区, 'j':判定区 @@ -1211,7 +1211,7 @@ declare interface Skill { * @param player * @param name */ - hiddenCard?(player: Player, name: string): boolean; + hiddenCard?(player: Player, name: string): boolean | void; /** 录像相关,game.videoContent.skill中相关 */ video?(player: Player, data: string | any[]): void; @@ -1282,7 +1282,7 @@ declare interface Skill { * * 若没有配置prompt,显示该配置的提示 */ - logTarget?: string | TwoParmFun; + logTarget?: string | TwoParmFun; /** * 是否通过logTarget显示触发者的目标日志; * @@ -1365,9 +1365,9 @@ declare interface Skill { * * 无参,简洁写法; */ - check?: OneParmFun; - check?: TwoParmFun; - check?: NoneParmFum; + check?: (card: Card) => number | boolean | void; + check?: (event: GameEventPromise, player: Player) => number | boolean | void; + check?: () => number | boolean | void; // check?(...any:any):number|boolean; // /** ai用于检测的方法:用于主动使用触发技能 */ // check?(card:Card):number|boolean; @@ -1593,7 +1593,7 @@ declare interface SkillAI { * 嘲讽值: * 嘲讽值越大的角色越容易遭受到敌方的攻击,默认为1,一般在0~4中取值即可(缔盟threaten值为3) */ - threaten?: number | TwoParmFun; + threaten?: number | ((player: Player, target: Target) => number | void); /** * 态度: * 态度只由identity决定。不同身份对不同身份的att不同。 @@ -1669,14 +1669,14 @@ declare interface SkillAI { * 返回结果的字符串:"zeroplayer","zerotarget","zeroplayertarget",指定最终结果的:对使用者的收益值,对目标的收益值为0 * @param result1 即当前ai.result.player的结果 */ - player?(card: Card, player: Player, target: Player, result1: number): string | number | number[] | void; + player?(card: Card, player: Player, target: Player, result1: number): string | number | number[] | void | boolean; /** * 一名角色以你为牌的目标时对你的影响(牌/技能对你的影响) * * 返回结果的字符串:"zeroplayer","zerotarget","zeroplayertarget",指定最终结果的:对使用者的收益值,对目标的收益值为0 * @param result2 即当前ai.result.target的结果 */ - target?(card: Card, player: Player, target: Player, result2: number): string | number | number[] | void; + target?(card: Card, player: Player, target: Player, result2: number): string | number | number[] | void | boolean; }; /** * 收益: @@ -1694,21 +1694,21 @@ declare interface SkillAI { * 没有返回值则不选; * 注:写了这个就不用写player(player){}了,因为player可以在这里进行判断......先继续研究好,再下定论; */ - target?: ThreeParmFun | number; + target?: number | ((player: Player, taregt: Player, card: Card) => number | void | boolean); /** * 主要用于get.effect_use中,优先于上面的target; */ - target_use?: ThreeParmFun | number; + target_use?: number | ((player: Player, taregt: Player, card: Card) => number | void) | boolean; /** * ai是否发动此技能(对玩家(自身)的收益): * 返回正,发动,否则不发动; * 注:最终 */ - player?: ThreeParmFun | number; + player?: number | ((player: Player, taregt: Player, card: Card) => number | void | boolean); /** * 主要用于get.effect_use中,优先于上面的player; */ - player_use?: ThreeParmFun | number; + player_use?: number | ((player: Player, taregt: Player, card: Card) => number | void | boolean); /** * 取值为true时,不默认为“equip(装备)”卡牌,默认设置“card.ai.result.target”方法 diff --git a/noname/library/element/player.js b/noname/library/element/player.js index 044bc67b3..e0e9fb040 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -181,6 +181,11 @@ export class Player extends HTMLDivElement { */ // @ts-ignore this.hp; + /** + * @type { number } + */ + // @ts-ignore + this.hujia; throw new Error('Do not call this method'); } build(noclick) {