This commit is contained in:
libccy 2017-02-26 15:06:56 +08:00
parent fb3ab4b439
commit 705b75b269
4 changed files with 85 additions and 17 deletions

View File

@ -2653,6 +2653,14 @@
guozhan:{ guozhan:{
name:'国战', name:'国战',
connect:{ connect:{
update:function(config,map){
if(config.connect_onlyguozhan){
map.connect_junzhu.show();
}
else{
map.connect_junzhu.hide();
}
},
connect_player_number:{ connect_player_number:{
name:'游戏人数', name:'游戏人数',
init:'8', init:'8',
@ -2698,6 +2706,13 @@
restart:true, restart:true,
intro:'开启后将禁用非国战专属武将' intro:'开启后将禁用非国战专属武将'
}, },
connect_junzhu:{
name:'替换君主',
init:true,
frequent:true,
restart:true,
intro:'开启后将使用国战君主替换原武将牌'
},
connect_ban_weak:{ connect_ban_weak:{
name:'屏蔽弱将', name:'屏蔽弱将',
init:false, init:false,
@ -2710,6 +2725,14 @@
}, },
}, },
config:{ config:{
update:function(config,map){
if(config.onlyguozhan){
map.junzhu.show();
}
else{
map.junzhu.hide();
}
},
guozhan_mode:{ guozhan_mode:{
name:'游戏模式', name:'游戏模式',
init:'normal', init:'normal',
@ -2764,6 +2787,13 @@
restart:true, restart:true,
intro:'开启后将禁用非国战专属武将' intro:'开启后将禁用非国战专属武将'
}, },
junzhu:{
name:'替换君主',
init:true,
frequent:true,
restart:true,
intro:'开启后将使用国战君主替换原武将牌'
},
double_hp:{ double_hp:{
name:'双将体力上限', name:'双将体力上限',
init:'pingjun', init:'pingjun',
@ -10070,6 +10100,11 @@
player:{ player:{
init:function(character,character2,skill){ init:function(character,character2,skill){
if(!lib.character[character]) return; if(!lib.character[character]) return;
if(get.is.jun(character2)){
var tmp=character;
character=character2;
character2=tmp;
}
if(character2==false){ if(character2==false){
skill=false; skill=false;
character2=null; character2=null;
@ -35095,6 +35130,13 @@
var select=get.select(func); var select=get.select(func);
return select[0]==1&&select[1]==1; return select[0]==1&&select[1]==1;
}, },
jun:function(name){
if(typeof name=='string'&&name.indexOf('gz_jun_')==0&&
lib.junList&&lib.junList.contains(name.slice(7))){
return true;
}
return false;
},
versus:function(){ versus:function(){
return !_status.connectMode&&get.mode()=='versus'&&_status.mode=='three'; return !_status.connectMode&&get.mode()=='versus'&&_status.mode=='three';
}, },

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -249,6 +249,9 @@ mode.guozhan={
gz_chendong:['male','wu',4,['duanxie','fenming']], gz_chendong:['male','wu',4,['duanxie','fenming']],
gz_sp_dongzhuo:['male','qun',4,['hengzheng','baoling']], gz_sp_dongzhuo:['male','qun',4,['hengzheng','baoling']],
gz_zhangren:['male','qun',4,['chuanxin','fengshi']], gz_zhangren:['male','qun',4,['chuanxin','fengshi']],
gz_jun_liubei:['male','shu',4,[]],
gz_jun_zhangjiao:['male','qun',4,[]],
} }
}, },
characterIntro:{ characterIntro:{
@ -1717,7 +1720,7 @@ mode.guozhan={
} }
} }
else{ else{
if(hasunknown){ if(hasunknown&&!get.zhu()){
var players=game.players.concat(game.dead); var players=game.players.concat(game.dead);
var num=0; var num=0;
for(var i=0;i<players.length;i++){ for(var i=0;i<players.length;i++){
@ -1883,7 +1886,15 @@ mode.guozhan={
if(i.indexOf('gz_shibing')==0) continue; if(i.indexOf('gz_shibing')==0) continue;
if(chosen.contains(i)) continue; if(chosen.contains(i)) continue;
if(lib.filter.characterDisabled(i)) continue; if(lib.filter.characterDisabled(i)) continue;
if(get.config('onlyguozhan')&&!lib.characterPack.mode_guozhan[i]) continue; if(get.config('onlyguozhan')){
if(!lib.characterPack.mode_guozhan[i]) continue;
if(get.config('junzhu')){
if(lib.junList.contains(i.slice(3))) continue;
}
else{
if(lib.junList.contains(i.slice(7))) continue;
}
}
if(lib.character[i][2]==3||lib.character[i][2]==4||lib.character[i][2]==5) if(lib.character[i][2]==3||lib.character[i][2]==4||lib.character[i][2]==5)
event.list.push(i); event.list.push(i);
} }
@ -1933,15 +1944,18 @@ mode.guozhan={
event.ai(game.me,list); event.ai(game.me,list);
ui.arena.classList.remove('selecting'); ui.arena.classList.remove('selecting');
}; };
if(get.config('onlyguozhan')){ event.dialogxx=ui.create.characterDialog(function(i){
event.dialogxx=ui.create.characterDialog(function(i){ if(i.indexOf('gz_shibing')==0) return true;
if(i.indexOf('gz_shibing')==0) return true; if(get.config('onlyguozhan')){
if(!lib.characterPack.mode_guozhan[i]) return true; if(!lib.characterPack.mode_guozhan[i]) return true;
},get.config('onlyguozhanexpand')?'expandall':undefined); if(get.config('junzhu')){
} if(lib.junList.contains(i.slice(3))) return true;
else{ }
event.dialogxx=ui.create.characterDialog(); else{
} if(lib.junList.contains(i.slice(7))) return true;
}
}
},get.config('onlyguozhanexpand')?'expandall':undefined);
ui.create.cheat2=function(){ ui.create.cheat2=function(){
ui.cheat2=ui.create.control('自由选将',function(){ ui.cheat2=ui.create.control('自由选将',function(){
if(this.dialog==_status.event.dialog){ if(this.dialog==_status.event.dialog){
@ -2258,10 +2272,8 @@ mode.guozhan={
_zhenfazhaohuan:'阵法召唤', _zhenfazhaohuan:'阵法召唤',
_zhenfazhaohuan_info:'由拥有阵法技的角色发起,满足此阵法技条件的未确定势力角色均可按逆时针顺序一次明置其一张武将牌(响应阵法召唤),以发挥阵法技的效果', _zhenfazhaohuan_info:'由拥有阵法技的角色发起,满足此阵法技条件的未确定势力角色均可按逆时针顺序一次明置其一张武将牌(响应阵法召唤),以发挥阵法技的效果',
liefeng:'', gz_jun_liubei:'君刘备',
liefeng_info:'', gz_jun_zhangjiao:'君张角',
xuanlve:'',
xuanlve_info:'',
gzshoucheng:'守成', gzshoucheng:'守成',
gzshoucheng_info:'当与你势力相同的一名角色于其回合外失去最后手牌时,你可以令其摸一张牌', gzshoucheng_info:'当与你势力相同的一名角色于其回合外失去最后手牌时,你可以令其摸一张牌',
@ -2338,6 +2350,7 @@ mode.guozhan={
gzxiaoguo:'骁果', gzxiaoguo:'骁果',
gzxiaoguo_info:'其他角色的结束阶段开始时你可以弃置一张基本牌令该角色选择一项1.弃置一张装备牌2.受到你对其造成的1点伤害。', gzxiaoguo_info:'其他角色的结束阶段开始时你可以弃置一张基本牌令该角色选择一项1.弃置一张装备牌2.受到你对其造成的1点伤害。',
}, },
junList:['liubei','zhangjiao'],
guozhanPile:[ guozhanPile:[
["spade",7,"sha"], ["spade",7,"sha"],
["spade",8,"sha"], ["spade",8,"sha"],
@ -2704,10 +2717,23 @@ mode.guozhan={
game.addVideo('showCharacter',this,num); game.addVideo('showCharacter',this,num);
if(this.identity=='unknown'){ if(this.identity=='unknown'){
this.group=lib.character[this.name1][1]; this.group=lib.character[this.name1][1];
// this.node.identity.style.backgroundColor=get.translation(this.group+'Color'); if(get.is.jun(this.name1)){
if(get.totalPopulation(this.group)+1>get.population()/2) this.identity='ye'; this.identity=this.group;
var yelist=[];
for(var i=0;i<game.players.length;i++){
if(game.players[i].identity=='ye'&&game.players[i]._group==this.group){
yelist.push(game.players[i]);
}
}
game.broadcastAll(function(list,group){
for(var i=0;i<list.length;i++){
list[i].identity=group;
list[i].setIdentity();
}
},yelist,this.group);
}
else if(get.totalPopulation(this.group)+1>get.population()/2) this.identity='ye';
else this.identity=this.group; else this.identity=this.group;
// this.node.identity.dataset.color=this.identity;
this.setIdentity(this.identity); this.setIdentity(this.identity);
this.ai.shown=1; this.ai.shown=1;
this.node.identity.classList.remove('guessing'); this.node.identity.classList.remove('guessing');