pal
This commit is contained in:
parent
ab2b3b0fd6
commit
39d148567c
|
@ -2221,9 +2221,7 @@ card.swd={
|
||||||
filter:function(event){
|
filter:function(event){
|
||||||
return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive();
|
return event.card&&event.card.name=='sha'&&event.player&&event.player.isAlive();
|
||||||
},
|
},
|
||||||
logTarget:function(event){
|
logTarget:'player',
|
||||||
return event.player;
|
|
||||||
},
|
|
||||||
content:function(){
|
content:function(){
|
||||||
trigger.player.draw(2);
|
trigger.player.draw(2);
|
||||||
trigger.player.turnOver();
|
trigger.player.turnOver();
|
||||||
|
@ -2240,9 +2238,7 @@ card.swd={
|
||||||
filter:function(event){
|
filter:function(event){
|
||||||
return event.card&&event.card.name=='sha'&&event.source&&event.source.isAlive();
|
return event.card&&event.card.name=='sha'&&event.source&&event.source.isAlive();
|
||||||
},
|
},
|
||||||
logTarget:function(event){
|
logTarget:'source',
|
||||||
return event.source;
|
|
||||||
},
|
|
||||||
content:function(){
|
content:function(){
|
||||||
player.line(trigger.source,'green');
|
player.line(trigger.source,'green');
|
||||||
trigger.source.draw(2);
|
trigger.source.draw(2);
|
||||||
|
|
|
@ -2590,9 +2590,7 @@ character.hearth={
|
||||||
}
|
}
|
||||||
return ai.get.attitude(player,event.player)<=0;
|
return ai.get.attitude(player,event.player)<=0;
|
||||||
},
|
},
|
||||||
logTarget:function(event){
|
logTarget:'player',
|
||||||
return event.player;
|
|
||||||
},
|
|
||||||
content:function(){
|
content:function(){
|
||||||
trigger.player.draw(2);
|
trigger.player.draw(2);
|
||||||
trigger.player.turnOver();
|
trigger.player.turnOver();
|
||||||
|
|
|
@ -58,6 +58,9 @@ window.characterRank={
|
||||||
'ow_luxiao',
|
'ow_luxiao',
|
||||||
],
|
],
|
||||||
a:[
|
a:[
|
||||||
|
'pal_longkui',
|
||||||
|
'pal_nangonghuang',
|
||||||
|
'pal_xingxuan',
|
||||||
'hs_walian',
|
'hs_walian',
|
||||||
'hs_fandral',
|
'hs_fandral',
|
||||||
'hs_totemic',
|
'hs_totemic',
|
||||||
|
|
|
@ -3097,10 +3097,10 @@ character.shenhua={
|
||||||
fangquan:'放权',
|
fangquan:'放权',
|
||||||
ruoyu:'若愚',
|
ruoyu:'若愚',
|
||||||
qiaobian:'巧变',
|
qiaobian:'巧变',
|
||||||
qiaobian1:'巧变-判定',
|
qiaobian1:'巧变·判定',
|
||||||
qiaobian2:'巧变-摸牌',
|
qiaobian2:'巧变·摸牌',
|
||||||
qiaobian3:'巧变-出牌',
|
qiaobian3:'巧变·出牌',
|
||||||
qiaobian4:'巧变-弃牌',
|
qiaobian4:'巧变·弃牌',
|
||||||
tuntian:'屯田',
|
tuntian:'屯田',
|
||||||
tuntian_bg:'田',
|
tuntian_bg:'田',
|
||||||
zaoxian:'凿险',
|
zaoxian:'凿险',
|
||||||
|
|
|
@ -5,9 +5,9 @@ character.xianjian={
|
||||||
pal_zhaoliner:['female','wei',3,['huimeng','tianshe']],
|
pal_zhaoliner:['female','wei',3,['huimeng','tianshe']],
|
||||||
pal_linyueru:['female','wei',3,['guiyuan','qijian']],
|
pal_linyueru:['female','wei',3,['guiyuan','qijian']],
|
||||||
|
|
||||||
pal_wangxiaohu:['male','qun',4,[]],
|
// pal_wangxiaohu:['male','qun',4,[]],
|
||||||
pal_sumei:['female','shu',3,[]],
|
// pal_sumei:['female','shu',3,[]],
|
||||||
pal_shenqishuang:['female','wei',3,[]],
|
// pal_shenqishuang:['female','wei',3,[]],
|
||||||
|
|
||||||
|
|
||||||
pal_jingtian:['male','wu',3,['sajin','jubao']],
|
pal_jingtian:['male','wu',3,['sajin','jubao']],
|
||||||
|
@ -17,10 +17,10 @@ character.xianjian={
|
||||||
pal_changqing:['male','wei',4,['luanjian','tianfu']],
|
pal_changqing:['male','wei',4,['luanjian','tianfu']],
|
||||||
|
|
||||||
pal_nangonghuang:['male','wei',3,['zhaoyao','sheling','zhangmu']],
|
pal_nangonghuang:['male','wei',3,['zhaoyao','sheling','zhangmu']],
|
||||||
pal_wenhui:['female','shu',4,[]],
|
// pal_wenhui:['female','shu',4,[]],
|
||||||
pal_wangpengxu:['female','shu',3,['duxinshu','feixu']],
|
pal_wangpengxu:['female','shu',3,['duxinshu','feixu']],
|
||||||
pal_xingxuan:['male','wei',3,['feizhua','leiyu','lingxue']],
|
pal_xingxuan:['male','wei',3,['feizhua','leiyu','lingxue']],
|
||||||
pal_leiyuange:['male','wei',3,[]],
|
// pal_leiyuange:['male','wei',3,[]],
|
||||||
|
|
||||||
pal_yuntianhe:['male','wu',4,['longxi','zhuyue','guanri']],
|
pal_yuntianhe:['male','wu',4,['longxi','zhuyue','guanri']],
|
||||||
pal_hanlingsha:['female','shu',3,['tannang','tuoqiao']],
|
pal_hanlingsha:['female','shu',3,['tannang','tuoqiao']],
|
||||||
|
@ -30,6 +30,142 @@ character.xianjian={
|
||||||
|
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
sheling:{
|
||||||
|
trigger:{global:['useCardAfter','respondAfter','discardAfter']},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(player!=_status.currentPhase||player==event.player) return false;
|
||||||
|
if(event.cards){
|
||||||
|
for(var i=0;i<event.cards.length;i++){
|
||||||
|
if(get.position(event.cards[i])=='d') return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
frequent:'check',
|
||||||
|
check:function(event){
|
||||||
|
for(var i=0;i<event.cards.length;i++){
|
||||||
|
if(get.position(event.cards[i])=='d'&&event.cards[i].name=='du') return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
usable:3,
|
||||||
|
content:function(){
|
||||||
|
var cards=[];
|
||||||
|
for(var i=0;i<trigger.cards.length;i++){
|
||||||
|
if(get.position(trigger.cards[i])=='d'){
|
||||||
|
cards.push(trigger.cards[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.gain(cards,'gain2');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
zhaoyao:{
|
||||||
|
trigger:{global:'phaseDrawBegin'},
|
||||||
|
filter:function(event,player){
|
||||||
|
return event.player!=player&&event.player.num('h')>0&&player.num('h')>0;
|
||||||
|
},
|
||||||
|
check:function(event,player){
|
||||||
|
if(ai.get.attitude(player,event.player)>=0) return false;
|
||||||
|
var hs=player.get('h');
|
||||||
|
if(hs.length<event.player.num('h')) return false;
|
||||||
|
for(var i=0;i<hs.length;i++){
|
||||||
|
var val=ai.get.value(hs[0]);
|
||||||
|
if(hs[i].number>=10&&val<=6) return true;
|
||||||
|
if(hs[i].number>=8&&val<=3) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
logTarget:'player',
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
player.chooseToCompare(trigger.player);
|
||||||
|
'step 1'
|
||||||
|
if(result.bool){
|
||||||
|
player.draw(2);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.finish();
|
||||||
|
}
|
||||||
|
'step 2'
|
||||||
|
player.chooseCard('将两张牌置于牌堆顶(先选择的在上)',2,true);
|
||||||
|
'step 3'
|
||||||
|
if(result.bool){
|
||||||
|
player.lose(result.cards,ui.special);
|
||||||
|
event.cards=result.cards;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.finish();
|
||||||
|
}
|
||||||
|
'step 4'
|
||||||
|
game.delay();
|
||||||
|
var nodes=[];
|
||||||
|
for(var i=0;i<event.cards.length;i++){
|
||||||
|
var cardx=ui.create.card();
|
||||||
|
cardx.classList.add('infohidden');
|
||||||
|
cardx.classList.add('infoflip');
|
||||||
|
nodes.push(cardx);
|
||||||
|
}
|
||||||
|
player.$throw(nodes,700,'nobroadcast');
|
||||||
|
game.log(player,'将'+get.cnNumber(event.cards.length)+'张牌置于牌堆顶');
|
||||||
|
'step 5'
|
||||||
|
for(var i=event.cards.length-1;i>=0;i--){
|
||||||
|
ui.cardPile.insertBefore(event.cards[i],ui.cardPile.firstChild);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
expose:0.2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
zhangmu:{
|
||||||
|
trigger:{player:'chooseToRespondBegin'},
|
||||||
|
filter:function(event,player){
|
||||||
|
if(event.responded) return false;
|
||||||
|
if(!event.filterCard({name:'shan'})) return false;
|
||||||
|
return player.num('h','shan')>0;
|
||||||
|
},
|
||||||
|
direct:true,
|
||||||
|
check:function(event,player){
|
||||||
|
if(ai.get.damageEffect(player,event.player,player)>=0) return false;
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
"step 0"
|
||||||
|
var goon=(ai.get.damageEffect(player,trigger.player,player)<=0);
|
||||||
|
player.chooseCard('是否发动【障目】?',{name:'shan'}).ai=function(){
|
||||||
|
return goon?1:0;
|
||||||
|
}
|
||||||
|
"step 1"
|
||||||
|
if(result.bool){
|
||||||
|
player.showCards(result.cards);
|
||||||
|
trigger.untrigger();
|
||||||
|
trigger.responded=true;
|
||||||
|
trigger.result={bool:true,card:{name:'shan'}}
|
||||||
|
player.addSkill('zhangmu_ai');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
effect:{
|
||||||
|
target:function(card,player,target,effect){
|
||||||
|
if(get.tag(card,'respondShan')&&effect<0){
|
||||||
|
if(target.hasSkill('zhangmu_ai')) return 0;
|
||||||
|
if(target.num('h')>=2) return 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
zhangmu_ai:{
|
||||||
|
trigger:{player:'loseAfter'},
|
||||||
|
forced:true,
|
||||||
|
popup:false,
|
||||||
|
silent:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
return player.num('h','shan')==0;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
player.removeSkill('zhangmu_ai');
|
||||||
|
}
|
||||||
|
},
|
||||||
leiyu:{
|
leiyu:{
|
||||||
trigger:{player:'phaseEnd'},
|
trigger:{player:'phaseEnd'},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
|
@ -1753,7 +1889,7 @@ character.xianjian={
|
||||||
zhaoyao:'招摇',
|
zhaoyao:'招摇',
|
||||||
zhaoyao_info:'其他角色的摸牌阶段开始时,你可以与其拼点,若你赢,你摸两张牌,然后将两张牌置于牌堆顶',
|
zhaoyao_info:'其他角色的摸牌阶段开始时,你可以与其拼点,若你赢,你摸两张牌,然后将两张牌置于牌堆顶',
|
||||||
sheling:'摄灵',
|
sheling:'摄灵',
|
||||||
sheling_info:'其他角色于你的回合内失去牌时,你可以获得之(每回合最多发动三次)',
|
sheling_info:'其他角色于你的回合内因使用、打出或弃置而失去牌时,你可以获得之(每回合最多发动三次)',
|
||||||
fenxing:'分形',
|
fenxing:'分形',
|
||||||
fenxing_info:'锁定技,回合开始阶段,你有50%概率变身为另一形态',
|
fenxing_info:'锁定技,回合开始阶段,你有50%概率变身为另一形态',
|
||||||
guijiang:'鬼降',
|
guijiang:'鬼降',
|
||||||
|
|
|
@ -5237,7 +5237,7 @@ character.yijiang={
|
||||||
cards.push(trigger.cards[i]);
|
cards.push(trigger.cards[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.chooseCardButton(cards,[1,cards.length],'是否发动【纵玄】?').set('ai',function(){
|
player.chooseCardButton(cards,[1,cards.length],'纵玄:将弃置的牌按任意顺序置于牌堆顶(先选择的在上)').set('ai',function(){
|
||||||
return -1;
|
return -1;
|
||||||
});
|
});
|
||||||
"step 1"
|
"step 1"
|
||||||
|
@ -5650,6 +5650,7 @@ character.yijiang={
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
frequent:'check',
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
for(var i=0;i<event.cards.length;i++){
|
for(var i=0;i<event.cards.length;i++){
|
||||||
if(get.suit(event.cards[i])=='club'&&get.position(event.cards[i])=='d'){
|
if(get.suit(event.cards[i])=='club'&&get.position(event.cards[i])=='d'){
|
||||||
|
@ -5678,6 +5679,7 @@ character.yijiang={
|
||||||
luoying2:{
|
luoying2:{
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{global:'judgeAfter'},
|
trigger:{global:'judgeAfter'},
|
||||||
|
frequent:'check',
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
return event.result.card.name!='du';
|
return event.result.card.name!='du';
|
||||||
},
|
},
|
||||||
|
@ -7424,6 +7426,7 @@ character.yijiang={
|
||||||
luoying:'落英',
|
luoying:'落英',
|
||||||
luoying1:'落英',
|
luoying1:'落英',
|
||||||
luoying2:'落英',
|
luoying2:'落英',
|
||||||
|
luoying2_noconf:'落英·判定',
|
||||||
jiushi:'酒诗',
|
jiushi:'酒诗',
|
||||||
jiushi1:'酒诗',
|
jiushi1:'酒诗',
|
||||||
jiushi2:'酒诗',
|
jiushi2:'酒诗',
|
||||||
|
|
49
game/game.js
49
game/game.js
|
@ -16199,7 +16199,7 @@
|
||||||
var hidden=player.hiddenSkills.slice(0);
|
var hidden=player.hiddenSkills.slice(0);
|
||||||
game.expandSkills(hidden);
|
game.expandSkills(hidden);
|
||||||
if(hidden.contains(event.skill)){
|
if(hidden.contains(event.skill)){
|
||||||
if(!get.info(event.skill).direct){
|
if(!info.direct){
|
||||||
event.trigger('triggerHidden');
|
event.trigger('triggerHidden');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -16215,29 +16215,46 @@
|
||||||
event.trigger('triggerBefore');
|
event.trigger('triggerBefore');
|
||||||
}
|
}
|
||||||
"step 2"
|
"step 2"
|
||||||
|
var info=get.info(event.skill);
|
||||||
if(event.cancelled){
|
if(event.cancelled){
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!event.revealed&&!get.info(event.skill).forced){
|
if(!event.revealed&&!info.forced){
|
||||||
if(get.info(event.skill).direct&&player.isUnderControl()){
|
var checkFrequent=function(info){
|
||||||
|
if(typeof info.frequent=='boolean') return info.frequent;
|
||||||
|
if(typeof info.frequent=='function') return info.frequent(trigger,player);
|
||||||
|
if(info.frequent=='check'&&typeof info.check=='function') return info.check(trigger,player);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(info.direct&&player.isUnderControl()){
|
||||||
game.modeSwapPlayer(player);
|
game.modeSwapPlayer(player);
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
}
|
}
|
||||||
else if(get.info(event.skill).frequent&&!lib.config.autoskilllist.contains(event.skill)){
|
else if(checkFrequent(info)&&!lib.config.autoskilllist.contains(event.skill)){
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
}
|
}
|
||||||
else if(get.info(event.skill).direct&&player==game.me&&!_status.auto){
|
else if(info.direct&&player==game.me&&!_status.auto){
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
}
|
}
|
||||||
else if(get.info(event.skill).direct&&player.isOnline()){
|
else if(info.direct&&player.isOnline()){
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var str;
|
var str;
|
||||||
var check=get.info(event.skill).check;
|
var check=info.check;
|
||||||
if(get.info(event.skill).prompt) str=get.info(event.skill).prompt;
|
if(info.prompt) str=info.prompt;
|
||||||
else str='是否发动【'+get.skillTranslation(event.skill,player)+'】?';
|
else{
|
||||||
|
if(typeof info.logTarget=='string'){
|
||||||
|
str='是否对'+get.translation(trigger[info.logTarget])+'发动【'+get.skillTranslation(event.skill,player)+'】?';
|
||||||
|
}
|
||||||
|
else if(typeof info.logTarget=='function'){
|
||||||
|
str='是否对'+get.translation(info.logTarget(trigger,player))+'发动【'+get.skillTranslation(event.skill,player)+'】?';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
str='是否发动【'+get.skillTranslation(event.skill,player)+'】?';
|
||||||
|
}
|
||||||
|
}
|
||||||
if(typeof str=='function'){str=str(trigger,player)}
|
if(typeof str=='function'){str=str(trigger,player)}
|
||||||
player.chooseBool(str).ai=function(){
|
player.chooseBool(str).ai=function(){
|
||||||
return !check||check(trigger,player);
|
return !check||check(trigger,player);
|
||||||
|
@ -16274,7 +16291,12 @@
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(info.logTarget){
|
if(info.logTarget){
|
||||||
player.logSkill(event.skill,info.logTarget(trigger,player));
|
if(typeof info.logTarget=='string'){
|
||||||
|
player.logSkill(event.skill,trigger[info.logTarget]);
|
||||||
|
}
|
||||||
|
else if(typeof info.logTarget=='function'){
|
||||||
|
player.logSkill(event.skill,info.logTarget(trigger,player));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.logSkill(event.skill);
|
player.logSkill(event.skill);
|
||||||
|
@ -19640,11 +19662,12 @@
|
||||||
}
|
}
|
||||||
game.saveConfig('autoskilllist',list);
|
game.saveConfig('autoskilllist',list);
|
||||||
};
|
};
|
||||||
|
var skilllistexpanded=game.expandSkills(lib.skilllist);
|
||||||
for(var i in lib.skill){
|
for(var i in lib.skill){
|
||||||
if(!lib.skilllist.contains(i)) continue;
|
if(!skilllistexpanded.contains(i)) continue;
|
||||||
if(lib.skill[i].frequent&&lib.translate[i]){
|
if(lib.skill[i].frequent&&lib.translate[i]){
|
||||||
lib.configMenu.skill.config[i]={
|
lib.configMenu.skill.config[i]={
|
||||||
name:lib.translate[i],
|
name:lib.translate[i+'_noconf']||lib.translate[i],
|
||||||
init:true,
|
init:true,
|
||||||
type:'autoskill',
|
type:'autoskill',
|
||||||
onclick:clickAutoSkill
|
onclick:clickAutoSkill
|
||||||
|
@ -25908,7 +25931,7 @@
|
||||||
var nodex;
|
var nodex;
|
||||||
for(i in lib.skill){
|
for(i in lib.skill){
|
||||||
if(lib.skill[i].frequent&&lib.translate[i]){
|
if(lib.skill[i].frequent&&lib.translate[i]){
|
||||||
lib.translate[i+'_forbid_config']=lib.translate[i];
|
lib.translate[i+'_forbid_config']=lib.translate[i+'_noconf']||lib.translate[i];
|
||||||
nodex=ui.create.switcher(i+'_forbid',
|
nodex=ui.create.switcher(i+'_forbid',
|
||||||
!lib.config.autoskilllist.contains(i),ui.click.autoskill);
|
!lib.config.autoskilllist.contains(i),ui.click.autoskill);
|
||||||
nodex.link=i;
|
nodex.link=i;
|
||||||
|
|
|
@ -8,16 +8,20 @@ window.noname_update={
|
||||||
'game/asset.js',
|
'game/asset.js',
|
||||||
'game/game.js',
|
'game/game.js',
|
||||||
'character/swd.js',
|
'character/swd.js',
|
||||||
|
'character/rank.js',
|
||||||
'character/sp.js',
|
'character/sp.js',
|
||||||
'character/yijiang.js',
|
'character/yijiang.js',
|
||||||
'character/yxs.js',
|
'character/yxs.js',
|
||||||
'character/hearth.js',
|
'character/hearth.js',
|
||||||
'character/xianjian.js',
|
'character/xianjian.js',
|
||||||
'character/refresh.js',
|
'character/refresh.js',
|
||||||
|
'character/shenhua.js',
|
||||||
'card/extra.js',
|
'card/extra.js',
|
||||||
'card/swd.js',
|
'card/swd.js',
|
||||||
'card/standard.js',
|
'card/standard.js',
|
||||||
'card/hearth.js',
|
'card/hearth.js',
|
||||||
|
'mode/guozhan.js',
|
||||||
|
'mode/identity.js',
|
||||||
'layout/mobile/layout.css',
|
'layout/mobile/layout.css',
|
||||||
],
|
],
|
||||||
'1.8.19.7':[],
|
'1.8.19.7':[],
|
||||||
|
|
|
@ -114,6 +114,38 @@ mode.guozhan={
|
||||||
game.phaseLoop(player);
|
game.phaseLoop(player);
|
||||||
},
|
},
|
||||||
game:{
|
game:{
|
||||||
|
getCharacterChoice:function(list,num){
|
||||||
|
var choice=list.splice(0,num);
|
||||||
|
var map={wei:[],shu:[],wu:[],qun:[]};
|
||||||
|
for(var i=0;i<choice.length;i++){
|
||||||
|
var group=lib.character[choice[i]][1];
|
||||||
|
if(map[group]){
|
||||||
|
map[group].push(choice[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(var i in map){
|
||||||
|
if(map[i].length<2){
|
||||||
|
if(map[i].length==1){
|
||||||
|
console.log(map[i][0]);
|
||||||
|
choice.remove(map[i][0]);
|
||||||
|
list.push(map[i][0]);
|
||||||
|
}
|
||||||
|
delete map[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(choice.length<num){
|
||||||
|
for(var i=0;i<list.length;i++){
|
||||||
|
if(map[lib.character[list[i]][1]]){
|
||||||
|
choice.push(list[i]);
|
||||||
|
list.splice(i--,1);
|
||||||
|
if(choice.length>=num){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return choice;
|
||||||
|
},
|
||||||
getState:function(){
|
getState:function(){
|
||||||
var state={};
|
var state={};
|
||||||
for(var i in lib.playerOL){
|
for(var i in lib.playerOL){
|
||||||
|
@ -411,7 +443,8 @@ mode.guozhan={
|
||||||
event.list.push(i);
|
event.list.push(i);
|
||||||
}
|
}
|
||||||
event.list.randomSort();
|
event.list.randomSort();
|
||||||
var list=event.list.splice(0,parseInt(get.config('choice_num')));
|
// var list=event.list.splice(0,parseInt(get.config('choice_num')));
|
||||||
|
var list=game.getCharacterChoice(event.list,parseInt(get.config('choice_num')));
|
||||||
if(_status.auto){
|
if(_status.auto){
|
||||||
event.ai(game.me,list);
|
event.ai(game.me,list);
|
||||||
}
|
}
|
||||||
|
@ -489,7 +522,8 @@ mode.guozhan={
|
||||||
}
|
}
|
||||||
event.list=event.list.concat(list);
|
event.list=event.list.concat(list);
|
||||||
event.list.randomSort();
|
event.list.randomSort();
|
||||||
list=event.list.splice(0,parseInt(get.config('choice_num')));
|
// list=event.list.splice(0,parseInt(get.config('choice_num')));
|
||||||
|
list=game.getCharacterChoice(event.list,parseInt(get.config('choice_num')));
|
||||||
var buttons=ui.create.div('.buttons');
|
var buttons=ui.create.div('.buttons');
|
||||||
var node=_status.event.dialog.buttons[0].parentNode;
|
var node=_status.event.dialog.buttons[0].parentNode;
|
||||||
_status.event.dialog.buttons=ui.create.buttons(list,'character',buttons);
|
_status.event.dialog.buttons=ui.create.buttons(list,'character',buttons);
|
||||||
|
@ -608,7 +642,7 @@ mode.guozhan={
|
||||||
return (lib.character[button.link][1]==lib.character[ui.selected.buttons[0].link][1]);
|
return (lib.character[button.link][1]==lib.character[ui.selected.buttons[0].link][1]);
|
||||||
};
|
};
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
list2.push([game.players[i],['选择角色',[list.randomRemove(num),'character']],2,
|
list2.push([game.players[i],['选择角色',[game.getCharacterChoice(list,num),'character']],2,
|
||||||
true,function(){return Math.random()},filterButton]);
|
true,function(){return Math.random()},filterButton]);
|
||||||
}
|
}
|
||||||
game.me.chooseButtonOL(list2,function(player,result){
|
game.me.chooseButtonOL(list2,function(player,result){
|
||||||
|
|
|
@ -291,7 +291,7 @@ mode.identity={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRoomInfo:function(uiintro){
|
getRoomInfo:function(uiintro){
|
||||||
uiintro.add('<div class="text chat">游戏模式:'+(lib.configOL.identity_mode=='zhong'?'明忠':'普通'));
|
uiintro.add('<div class="text chat">游戏模式:'+(lib.configOL.identity_mode=='zhong'?'明忠':'标准'));
|
||||||
uiintro.add('<div class="text chat">双将模式:'+(lib.configOL.double_character?'开启':'关闭'));
|
uiintro.add('<div class="text chat">双将模式:'+(lib.configOL.double_character?'开启':'关闭'));
|
||||||
if(lib.configOL.identity_mode!='zhong'){
|
if(lib.configOL.identity_mode!='zhong'){
|
||||||
uiintro.add('<div class="text chat">双内奸:'+(lib.configOL.double_nei?'开启':'关闭'));
|
uiintro.add('<div class="text chat">双内奸:'+(lib.configOL.double_nei?'开启':'关闭'));
|
||||||
|
|
Loading…
Reference in New Issue