Keep compatible.
This commit is contained in:
parent
7f25ec94f1
commit
1f946fc4bc
|
@ -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;repetition<cards.length;repetition++){
|
||||
for(var repetition=0;repetition<cards.length;repetition++){
|
||||
var card=get.cardPile(card=>get.type(card,'trick')=='trick');
|
||||
if(card) cardsToGain.push(card);
|
||||
}
|
||||
|
|
|
@ -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)}】`);
|
||||
|
|
|
@ -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();
|
||||
|
|
10
game/game.js
10
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}/`);
|
||||
|
|
Loading…
Reference in New Issue