This commit is contained in:
libccy 2017-02-15 13:50:18 +08:00
parent c554b60b5e
commit 6d66d45551
6 changed files with 173 additions and 23 deletions

View File

@ -1600,13 +1600,13 @@ card.gujian={
yuheng_plus_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力', yuheng_plus_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力',
yuheng_pro_skill_info:'出牌阶段,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力', yuheng_pro_skill_info:'出牌阶段,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力',
shujinsan:'舒筋散', shujinsan:'舒筋散',
shujinsan_info:'对任意角色使用,目标可弃置任意张牌,并摸等量的牌', shujinsan_info:'出牌阶段对任意角色使用,目标可弃置任意张牌,并摸等量的牌',
mutoumianju:'木头面具', mutoumianju:'木头面具',
mutoumianju_info:'你可以将一张手牌当作杀使用', mutoumianju_info:'你可以将一张手牌当作杀使用',
mutoumianju_skill:'木杀', mutoumianju_skill:'木杀',
mutoumianju_skill_info:'你可以将一张手牌当作杀使用', mutoumianju_skill_info:'你可以将一张手牌当作杀使用',
heilonglinpian:'黑龙鳞片', heilonglinpian:'黑龙鳞片',
heilonglinpian_info:'对自己使用,获得一点护甲,直到下一回合开始,你的防御距离+1', heilonglinpian_info:'出牌阶段对自己使用,获得一点护甲,直到下一回合开始,你的防御距离+1',
food:'食物', food:'食物',
chunbing:'春饼', chunbing:'春饼',

View File

@ -140,10 +140,11 @@ window.characterRank={
'hs_alleria', 'hs_alleria',
're_lusu', 're_lusu',
'hs_fuding', 'hs_fuding',
'zhugejin', 'wangji',
], ],
am:[ am:[
'old_wangyi', 'old_wangyi',
'zhugejin',
'hs_totemic', 'hs_totemic',
'swd_duanmeng', 'swd_duanmeng',
'pal_wenhui', 'pal_wenhui',
@ -231,6 +232,7 @@ window.characterRank={
'dianwei', 'dianwei',
're_lidian', 're_lidian',
'wangyi', 'wangyi',
'swd_weida',
], ],
bp:[ bp:[
'lifeng', 'lifeng',
@ -354,8 +356,6 @@ window.characterRank={
'jsp_guanyu', 'jsp_guanyu',
'wenpin', 'wenpin',
'sp_lvmeng', 'sp_lvmeng',
'wangji',
'swd_weida',
'swd_lilian', 'swd_lilian',
'hs_lreno', 'hs_lreno',
'hs_zhouzhuo', 'hs_zhouzhuo',

View File

@ -3172,6 +3172,7 @@
init:'combat', init:'combat',
item:{ item:{
combat:'自由', combat:'自由',
three:'统率',
leader:'君主', leader:'君主',
}, },
restart:true, restart:true,
@ -21577,7 +21578,7 @@
if(!list){ if(!list){
list=[]; list=[];
for(var i in lib.character){ for(var i in lib.character){
if(typeof func){ if(typeof func=='function'){
if(!func(i)) continue; if(!func(i)) continue;
} }
else{ else{
@ -35814,32 +35815,37 @@
tr=document.createElement('tr'); tr=document.createElement('tr');
table.appendChild(tr); table.appendChild(tr);
td=document.createElement('td'); td=document.createElement('td');
td.innerHTML='攻击'; td.innerHTML='范围';
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td'); td=document.createElement('td');
td.innerHTML='进攻'; td.innerHTML='距离';
tr.appendChild(td);
td=document.createElement('td');
td.innerHTML='防御';
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td'); td=document.createElement('td');
td.innerHTML='手牌'; td.innerHTML='手牌';
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td');
td.innerHTML='轮数';
tr.appendChild(td);
tr=document.createElement('tr'); tr=document.createElement('tr');
table.appendChild(tr); table.appendChild(tr);
td=document.createElement('td'); td=document.createElement('td');
td.innerHTML=node.getAttackRange(); td.innerHTML=get.numStr(node.getAttackRange());
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td'); td=document.createElement('td');
td.innerHTML=node.getGlobalFrom(); if(node==game.me||!game.me){
tr.appendChild(td); td.innerHTML='-';
td=document.createElement('td'); }
td.innerHTML=node.getGlobalTo(); else if(game.me){
td.innerHTML=get.numStr(Math.max(1,game.me.distanceTo(node)));
}
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td'); td=document.createElement('td');
td.innerHTML=node.num('h'); td.innerHTML=node.num('h');
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td');
td.innerHTML=node.stat.length-1;
tr.appendChild(td);
table.style.width='calc(100% - 20px)'; table.style.width='calc(100% - 20px)';
table.style.marginLeft='10px'; table.style.marginLeft='10px';

View File

@ -36,6 +36,7 @@ mode.boss={
} }
} }
} }
lib.translate.restart='返回';
lib.init.css(lib.assetURL+'layout/mode','boss'); lib.init.css(lib.assetURL+'layout/mode','boss');
game.delay(0.1); game.delay(0.1);
"step 1" "step 1"

View File

@ -79,6 +79,28 @@ mode.chess={
game.leaderView(); game.leaderView();
break; break;
} }
case 'three':{
if(lib.config.continue_name_chess){
event._result={
friend:lib.config.continue_name_versus_three.friend,
enemy:lib.config.continue_name_versus_three.enemy,
}
_status.color=lib.config.continue_name_versus_three.color;
game.saveConfig('continue_name_chess');
}
else{
game.chooseCharacterDouble({
update:function(i){
switch(i){
case 0:return '主帅';
case 1:return '副帅';
default:return '前锋';
}
}
});
}
break;
}
case 'combat':{ case 'combat':{
if(lib.storage.test){ if(lib.storage.test){
lib.config.game_speed='vfast'; lib.config.game_speed='vfast';
@ -98,6 +120,10 @@ mode.chess={
} }
"step 2" "step 2"
ui.arena.classList.add('chess'); ui.arena.classList.add('chess');
if(_status.mode=='three'){
_status.mylist=result.friend;
_status.enemylist=result.enemy;
}
var mylistmap,enemylistmap; var mylistmap,enemylistmap;
if(event.video){ if(event.video){
var videocontent; var videocontent;
@ -129,7 +155,10 @@ mode.chess={
var num=Math.round((_status.mylist.length+_status.enemylist.length)/2); var num=Math.round((_status.mylist.length+_status.enemylist.length)/2);
var friend,enemy; var friend,enemy;
var side; var side;
if(_status.mode=='leader'){ if(_status.mode=='three'){
side=!_status.color;
}
else if(_status.mode=='leader'){
side=true; side=true;
} }
else{ else{
@ -391,7 +420,7 @@ mode.chess={
ui.create.me(); ui.create.me();
ui.create.fakeme(); ui.create.fakeme();
if(!event.video&&_status.mode=='combat'&&get.config('zhu')&&!_status.vsboss&&game.players.length>2){ if(!event.video&&((_status.mode=='combat'&&get.config('zhu')&&!_status.vsboss&&game.players.length>2)||_status.mode=='three')){
game.friendZhu=event.friendZhu; game.friendZhu=event.friendZhu;
game.friendZhu.hp++; game.friendZhu.hp++;
game.friendZhu.maxHp++; game.friendZhu.maxHp++;
@ -409,7 +438,7 @@ mode.chess={
} }
} }
if(get.config('main_zhu')&&event.friendViceZhu){ if((get.config('main_zhu')||_status.mode=='three')&&event.friendViceZhu){
game.friendViceZhu=event.friendViceZhu; game.friendViceZhu=event.friendViceZhu;
game.friendViceZhu.node.identity.firstChild.innerHTML='仕'; game.friendViceZhu.node.identity.firstChild.innerHTML='仕';
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
@ -480,7 +509,10 @@ mode.chess={
event.trigger('gameStart'); event.trigger('gameStart');
game.gameDraw(p); game.gameDraw(p);
game.me.classList.add('current_action'); game.me.classList.add('current_action');
if(_status.mode=='leader'){ if(_status.mode=='three'){
game.phaseLoopThree(_status.color?game.enemyZhu:game.friendZhu);
}
else if(_status.mode=='leader'){
game.phaseLoopOrdered(p); game.phaseLoopOrdered(p);
} }
else if(get.config('seat_order')=='指定'){ else if(get.config('seat_order')=='指定'){
@ -1575,6 +1607,18 @@ mode.chess={
} }
}, },
controlOver:function(){ controlOver:function(){
if(_status.mode=='three'){
ui.create.control('再战',function(){
game.saveConfig('continue_name_chess',{
friend:_status.friendBackup,
enemy:_status.enemyBackup,
color:_status.color
});
game.saveConfig('mode',lib.config.mode);
localStorage.setItem(lib.configprefix+'directstart',true);
game.reload();
});
}
ui.create.control('返回',game.reload); ui.create.control('返回',game.reload);
if(_status.mode!='leader') return; if(_status.mode!='leader') return;
if(_status.enterArena){ if(_status.enterArena){
@ -1611,6 +1655,105 @@ mode.chess={
} }
} }
}, },
phaseLoopThree:function(player){
var next=game.createEvent('phaseLoop');
next.player=player;
next.swap=function(player){
if(player.side==game.me.side){
return game.enemyZhu;
}
else{
return game.me;
}
},
next.setContent(function(){
'step 0'
player.classList.add('acted');
player.phase();
'step 1'
if(player!=game.friendZhu&&player!=game.enemyZhu){
for(var i=0;i<game.players.length;i++){
if(game.players[i].side==player.side&&game.players[i]!=game.friendZhu&&
game.players[i]!=game.enemyZhu&&
game.players[i]!=player&&!game.players[i].classList.contains('acted')){
game.players[i].classList.add('acted');
game.players[i].phase();
break;
}
}
}
'step 2'
var target=event.swap(player);
var swap=[],swap2=[];
for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue;
if(!game.players[i].classList.contains('acted')){
if(game.players[i].side==target.side){
swap.push(game.players[i]);
}
else{
swap2.push(game.players[i]);
}
}
}
if(swap.length==0){
if(swap2.length){
target=event.swap(target);
swap=swap2;
}
else{
for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue;
game.players[i].classList.remove('acted');
}
event.redo();
game.delay();
return;
}
}
if(swap.length==1){
event.directresult=swap[0];
}
else{
var rand=Math.random();
var next=target.chooseTarget('选择行动的角色',true,function(card,player,target2){
return target2.side==target.side&&!target2.classList.contains('acted');
});
next._triggered=null;
next.includeOut=true;
next.ai=function(target2){
var num=0;
if(target2.num('j')){
num-=5;
}
if(target2!=game.friendZhu&&target2!=game.enemyZhu){
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=game.friendZhu&&game.players[i]!=game.enemyZhu&&
game.players[i]!=target2&&game.players[i].side==target2.side&&game.players[i].num('j')){
num-=2;
}
}
}
if(rand<1/3){
num+=1/(target2.hp+1);
}
else if(rand<2/3){
num+=target2.num('h')/5;
}
return num;
}
}
'step 3'
if(event.directresult){
event.player=event.directresult;
delete event.directresult;
}
else if(result.bool){
event.player=result.targets[0];
}
event.goto(0);
});
},
phaseLoopOrdered:function(player){ phaseLoopOrdered:function(player){
var next=game.createEvent('phaseLoop'); var next=game.createEvent('phaseLoop');
next.player=player; next.player=player;

View File

@ -2237,7 +2237,7 @@ mode.versus={
else{ else{
return game.me; return game.me;
} }
}, };
next.setContent(function(){ next.setContent(function(){
'step 0' 'step 0'
player.classList.add('acted'); player.classList.add('acted');
@ -2299,8 +2299,8 @@ mode.versus={
} }
if(target2.identity!='zhu'){ if(target2.identity!='zhu'){
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].identity!='zhu'&&game.players[i]!=target&& if(game.players[i].identity!='zhu'&&game.players[i]!=target2&&
game.players[i].side==target.side){ game.players[i].side==target2.side&&game.players[i].num('j')){
num-=2; num-=2;
} }
} }