From 1f946fc4bc70d218ede2039c3e8dfd996d624f5c Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Wed, 6 Sep 2023 21:26:50 -0700 Subject: [PATCH] Keep compatible. --- card/mtg.js | 2 +- card/yongjian.js | 2 +- character/gwent.js | 2 +- game/game.js | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/card/mtg.js b/card/mtg.js index 96c4f01a0..6914b720c 100644 --- a/card/mtg.js +++ b/card/mtg.js @@ -495,7 +495,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ content:function(){ player.recast(cards,null,(player,cards)=>{ var cardsToGain=[]; - for(let repetition=0;repetitionget.type(card,'trick')=='trick'); if(card) cardsToGain.push(card); } diff --git a/card/yongjian.js b/card/yongjian.js index 7e549d9a2..0dd8bac01 100644 --- a/card/yongjian.js +++ b/card/yongjian.js @@ -598,7 +598,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ player.showCards(cards,`${get.translation(player)}对${(targets=>{ if(get.itemtype(targets)=='player') targets=[targets]; if(targets[0]!=player) return get.translation(targets); - const selfTargets=targets.slice(); + var selfTargets=targets.slice(); selfTargets[0]='自己'; return get.translation(selfTargets); })(logs)}发动了【${get.skillTranslation(event.name,player)}】`); diff --git a/character/gwent.js b/character/gwent.js index 6dfd606f3..a74cad30c 100644 --- a/character/gwent.js +++ b/character/gwent.js @@ -1375,7 +1375,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:(event,player)=>get.type(event.card)!='equip'&&player.hasCard(card=>get.color(card)==get.color(trigger.card)&&player.canRecast(card),'h'), content:function(){ 'step 0' - let cards=player.getCards('h',card=>get.suit(card)==get.suit(trigger.card)&&player.canRecast(card)); + 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)); if(!cards.length){ event.finish(); diff --git a/game/game.js b/game/game.js index 36c7d2c54..ca4340a54 100644 --- a/game/game.js +++ b/game/game.js @@ -12850,7 +12850,7 @@ var i,j,k; for(i in character){ if(character[i].character){ - const characterPack=lib.characterPack[i]; + var characterPack=lib.characterPack[i]; if(characterPack) Object.assign(characterPack,character[i].character); else lib.characterPack[i]=character[i].character; } @@ -12902,7 +12902,7 @@ } } for(i in card){ - const cardPack=lib.cardPack[i]?lib.cardPack[i]:lib.cardPack[i]=[]; + var cardPack=lib.cardPack[i]?lib.cardPack[i]:lib.cardPack[i]=[]; if(card[i].card){ for(var j in card[i].card){ if(!card[i].card[j].hidden&&card[i].translate[j+'_info']){ @@ -18547,9 +18547,9 @@ if(lib.config.background_speak){ if(lib.character[player.name]&&lib.character[player.name][4].some(tag=>/^die:.+$/.test(tag))){ - const tag=lib.character[player.name][4].find(tag=>/^die:.+$/.test(tag)); - const reg=new RegExp("^ext:(.+)?/"); - const match=tag.match(/^die:(.+)$/); + var tag=lib.character[player.name][4].find(tag=>/^die:.+$/.test(tag)); + var reg=new RegExp("^ext:(.+)?/"); + var match=tag.match(/^die:(.+)$/); if(match){ let path=match[1]; if(reg.test(path)) path=path.replace(reg,(_o,p)=>`../extension/${p}/`);