commit
1aa712619d
|
@ -167,9 +167,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
var list=lib.config.mode_config.identity.identity.lastItem.slice();
|
||||
list.removeArray(game.filterPlayer().map(i=>{
|
||||
let identity=i.identity;
|
||||
if(identity=='mingzhong') identity='zhong';
|
||||
return identity;
|
||||
var identity=i.identity;
|
||||
return identity=='mingzhong'?'zhong':identity;
|
||||
})).unique();
|
||||
player.chooseButton([
|
||||
'###炼魄:请选择一个身份###<div class="text center">你选择的身份对应的阵营角色数于本轮内视为+1</div>',
|
||||
|
|
16
game/game.js
16
game/game.js
|
@ -12335,6 +12335,10 @@
|
|||
unknown5:'六号位',
|
||||
unknown6:'七号位',
|
||||
unknown7:'八号位',
|
||||
unknown8:'九号位',
|
||||
unknown9:'十号位',
|
||||
unknown10:'十一号位',
|
||||
unknown11:'十二号位',
|
||||
|
||||
feichu_equip1:"已废除",
|
||||
feichu_equip1_info:"武器栏已废除",
|
||||
|
@ -43556,6 +43560,7 @@
|
|||
//创建身份牌实例
|
||||
identityCard:function(identity,position,noclick){
|
||||
const card=ui.create.card(position,'noclick',noclick);
|
||||
card.removeEventListener(lib.config.touchscreen?'touchend':'click',ui.click.card);
|
||||
card.classList.add('button');
|
||||
card._customintro=uiintro=>uiintro.add(`${get.translation(`${identity}${2}`)}的身份牌`);
|
||||
const fileName=`image/card/identity_${identity}.jpg`;
|
||||
|
@ -58154,6 +58159,11 @@
|
|||
},
|
||||
};
|
||||
const get={
|
||||
/**
|
||||
* 根据座次数n(从0开始)获取对应的“n+1号位”翻译
|
||||
* @param {number} seat
|
||||
*/
|
||||
seatTranslation:seat=>`${get.cnNumber(seat+1,true)}号位`,
|
||||
/**
|
||||
* @param {number} numberOfPlayers
|
||||
* @returns {string[]}
|
||||
|
@ -58441,7 +58451,8 @@
|
|||
if(every) return testingNaturesList.every((natures,index)=>naturesList.slice(index+1).every(testingNatures=>testingNatures.length==natures.length&&testingNatures.every(nature=>natures.includes(nature))));
|
||||
return testingNaturesList.every((natures,index)=>{
|
||||
const comparingNaturesList=naturesList.slice(index+1);
|
||||
return natures.some(nature=>comparingNaturesList.every(testingNatures=>testingNatures.includes(nature)));
|
||||
if(natures.length) return natures.some(nature=>comparingNaturesList.every(testingNatures=>testingNatures.includes(nature)));
|
||||
return comparingNaturesList.every(testingNatures=>!testingNatures.length);
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
@ -58472,7 +58483,8 @@
|
|||
if(every) return testingNaturesList.every((natures,index)=>naturesList.slice(index+1).every(testingNatures=>testingNatures.every(nature=>!natures.includes(nature))));
|
||||
return testingNaturesList.every((natures,index)=>{
|
||||
const comparingNaturesList=naturesList.slice(index+1);
|
||||
return natures.some(nature=>comparingNaturesList.every(testingNatures=>testingNatures.some(testingNature=>testingNature!=nature)));
|
||||
if(natures.length) return natures.some(nature=>comparingNaturesList.every(testingNatures=>!testingNatures.length||testingNatures.some(testingNature=>testingNature!=nature)));
|
||||
return comparingNaturesList.every(testingNatures=>testingNatures.length);
|
||||
});
|
||||
},
|
||||
//判断一张牌是否为明置手牌
|
||||
|
|
|
@ -192,7 +192,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.gameDraw(event.playerx);
|
||||
game.broadcastAll(function(player){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].name='unknown'+get.distance(player,game.players[i],'absolute');
|
||||
game.players[i].name=get.seatTranslation(get.distance(player,game.players[i],'absolute'));
|
||||
game.players[i].node.name_seat=ui.create.div('.name.name_seat',get.verticalStr(lib.translate[game.players[i].name]),game.players[i]);
|
||||
// if(game.players[i]==game.me){
|
||||
// lib.translate[game.players[i].name]+='(你)';
|
||||
|
|
|
@ -1660,7 +1660,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(!game.players[i].node.name_seat){
|
||||
game.players[i].node.name_seat=ui.create.div('.name.name_seat',get.verticalStr(lib.translate['unknown'+get.distance(_status.firstAct,game.players[i],'absolute')]),game.players[i]);
|
||||
game.players[i].node.name_seat=ui.create.div('.name.name_seat',get.verticalStr(get.seatTranslation(_status.firstAct,game.players[i],'absolute')),game.players[i]);
|
||||
game.players[i].node.name_seat.style.opacity=1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue