bugfix++
This commit is contained in:
parent
ab87506a79
commit
55f1dbf273
|
@ -479,7 +479,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
if (get.attitude(current, target) > 0) return current.countCards('hs', 'tao');
|
if (get.attitude(current, target) > 0) return current.countCards('hs', 'tao');
|
||||||
}),
|
}),
|
||||||
dis = 1,
|
dis = 1,
|
||||||
t = _status.currentPhase;
|
t = _status.currentPhase||game.me;
|
||||||
while (t !== target) {
|
while (t !== target) {
|
||||||
let att = get.attitude(player, t);
|
let att = get.attitude(player, t);
|
||||||
if (Math.abs(att) < 2) dis += 0.45;
|
if (Math.abs(att) < 2) dis += 0.45;
|
||||||
|
|
|
@ -100,19 +100,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
logTarget:'source',
|
logTarget:'source',
|
||||||
global:'jxlianpo_global',
|
global:'jxlianpo_global',
|
||||||
getMax:()=>{
|
getMax:()=>{
|
||||||
var identities=[],population=0;
|
const map={
|
||||||
game.countPlayer(current=>{
|
zhu:game.countPlayer(current=>{
|
||||||
var curPopulation=1+current.getFriends().length+game.countPlayer(currentx=>{
|
const identity=current.identity;
|
||||||
return currentx.countMark(`jxlianpo_mark_${current.identity}`);
|
let num=0;
|
||||||
});
|
if(identity=='zhu'||identity=='zhong'||identity=='mingzhong') num++;
|
||||||
|
num+=current.countMark('jxlianpo_mark_zhong');
|
||||||
|
return num;
|
||||||
|
}),
|
||||||
|
fan:game.countPlayer(current=>{
|
||||||
|
let num=0;
|
||||||
|
if(current.identity=='fan') num++;
|
||||||
|
num+=current.countMark('jxlianpo_mark_fan');
|
||||||
|
return num;
|
||||||
|
}),
|
||||||
|
nei:(game.hasPlayer(current=>current.identity=='nei')?0:1)+game.countPlayer(current=>{
|
||||||
|
return current.countMark('jxlianpo_mark_nei');
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
let population=0,identities=[];
|
||||||
|
for(let i in map){
|
||||||
|
let curPopulation=map[i]
|
||||||
if(curPopulation>=population){
|
if(curPopulation>=population){
|
||||||
if(curPopulation>population) identities=[];
|
if(curPopulation>population) identities=[];
|
||||||
var identity=current.identity;
|
identities.add(i);
|
||||||
if(identity=='zhong') identity='zhu';
|
|
||||||
identities.add(identity);
|
|
||||||
population=curPopulation;
|
population=curPopulation;
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
return identities;
|
return identities;
|
||||||
},
|
},
|
||||||
group:'jxlianpo_show',
|
group:'jxlianpo_show',
|
||||||
|
@ -141,14 +155,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{global:'roundStart'},
|
trigger:{global:'roundStart'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
var list=lib.config.mode_config.identity.identity.lastItem.slice();
|
var list=lib.config.mode_config.identity.identity.lastItem.slice();
|
||||||
list.removeArray(game.filterPlayer().map(i=>i.identity));
|
list.removeArray(game.filterPlayer().map(i=>{
|
||||||
|
let identity=i.identity;
|
||||||
|
if(identity=='mingzhong') identity='zhong';
|
||||||
|
return identity;
|
||||||
|
}));
|
||||||
return list.length;
|
return list.length;
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var list=lib.config.mode_config.identity.identity.lastItem.slice();
|
var list=lib.config.mode_config.identity.identity.lastItem.slice();
|
||||||
list.removeArray(game.filterPlayer().map(i=>i.identity)).unique();
|
list.removeArray(game.filterPlayer().map(i=>{
|
||||||
|
let identity=i.identity;
|
||||||
|
if(identity=='mingzhong') identity='zhong';
|
||||||
|
return identity;
|
||||||
|
})).unique();
|
||||||
player.chooseButton([
|
player.chooseButton([
|
||||||
'###炼魄:请选择一个身份###<div class="text center">你选择的身份对应的阵营角色数于本轮内视为+1</div>',
|
'###炼魄:请选择一个身份###<div class="text center">你选择的身份对应的阵营角色数于本轮内视为+1</div>',
|
||||||
[list,function(item,type,position,noclick,node){
|
[list,function(item,type,position,noclick,node){
|
||||||
|
|
|
@ -42565,7 +42565,7 @@
|
||||||
identityCard:function(identity,position,info,noclick){
|
identityCard:function(identity,position,info,noclick){
|
||||||
const card=ui.create.card(position,info,noclick);
|
const card=ui.create.card(position,info,noclick);
|
||||||
card._customintro=function(uiintro){
|
card._customintro=function(uiintro){
|
||||||
uiintro.add(`${get.translation(item+2)}的身份牌`);
|
uiintro.add(`${get.translation(identity+2)}的身份牌`);
|
||||||
}
|
}
|
||||||
const fileName=`image/card/identity_${identity}.jpg`;
|
const fileName=`image/card/identity_${identity}.jpg`;
|
||||||
new Promise((resolve,reject)=>{
|
new Promise((resolve,reject)=>{
|
||||||
|
|
Loading…
Reference in New Issue