This commit is contained in:
parent
ba4e88b01b
commit
7caa54ea8f
|
@ -597,6 +597,7 @@ card.hearth={
|
||||||
enable:true,
|
enable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
filterTarget:true,
|
filterTarget:true,
|
||||||
|
reverseOrder:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
target.chooseToDiscard([1,2],'he').ai=function(card){
|
target.chooseToDiscard([1,2],'he').ai=function(card){
|
||||||
|
|
|
@ -453,6 +453,26 @@ card.standard={
|
||||||
"step 0"
|
"step 0"
|
||||||
game.delay();
|
game.delay();
|
||||||
"step 1"
|
"step 1"
|
||||||
|
if(get.is.versus()){
|
||||||
|
player.chooseControl('顺时针','逆时针',function(event,player){
|
||||||
|
if(player.next.side==player.side) return '逆时针';
|
||||||
|
return '顺时针';
|
||||||
|
}).set('prompt','选择'+get.translation(card)+'的结算方向');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.goto(3);
|
||||||
|
}
|
||||||
|
"step 2"
|
||||||
|
if(result&&result.control=='顺时针'){
|
||||||
|
var evt=event.getParent();
|
||||||
|
evt.fixedSeat=true;
|
||||||
|
get.sortSeat(evt.targets);
|
||||||
|
evt.targets.reverse();
|
||||||
|
if(evt.targets[evt.targets.length-1]==player){
|
||||||
|
evt.targets.unshift(evt.targets.pop());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"step 3"
|
||||||
ui.clear();
|
ui.clear();
|
||||||
var cards=get.cards(game.players.length);
|
var cards=get.cards(game.players.length);
|
||||||
var dialog=ui.create.dialog('五谷丰登',cards,true);
|
var dialog=ui.create.dialog('五谷丰登',cards,true);
|
||||||
|
@ -565,6 +585,10 @@ card.standard={
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
if(get.is.versus()){
|
||||||
|
if(target==player) return 1.5;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
var num=0;
|
var num=0;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(game.players[i].ai.shown==0) num++;
|
if(game.players[i].ai.shown==0) num++;
|
||||||
|
@ -585,6 +609,7 @@ card.standard={
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
|
reverseOrder:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target.hp<target.maxHp;
|
return target.hp<target.maxHp;
|
||||||
},
|
},
|
||||||
|
@ -617,6 +642,7 @@ card.standard={
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player;
|
return target!=player;
|
||||||
},
|
},
|
||||||
|
reverseOrder:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
var next=target.chooseToRespond({name:'sha'});
|
var next=target.chooseToRespond({name:'sha'});
|
||||||
|
@ -675,6 +701,7 @@ card.standard={
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
|
reverseOrder:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player;
|
return target!=player;
|
||||||
},
|
},
|
||||||
|
@ -741,6 +768,18 @@ card.standard={
|
||||||
},
|
},
|
||||||
modTarget:true,
|
modTarget:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
|
if(get.is.versus()){
|
||||||
|
if(game.friend.contains(target)){
|
||||||
|
if(game.friend.length<game.enemy.length){
|
||||||
|
target.draw(3);return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(game.friend.length>game.enemy.length){
|
||||||
|
target.draw(3);return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
target.draw(2);
|
target.draw(2);
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -1325,7 +1364,12 @@ card.standard={
|
||||||
zhuge_skill:{
|
zhuge_skill:{
|
||||||
mod:{
|
mod:{
|
||||||
cardUsable:function(card,player,num){
|
cardUsable:function(card,player,num){
|
||||||
if(card.name=='sha') return Infinity;
|
if(card.name=='sha'){
|
||||||
|
if(get.is.versus()){
|
||||||
|
return num+3;
|
||||||
|
}
|
||||||
|
return Infinity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -593,6 +593,7 @@ card.swd={
|
||||||
enable:true,
|
enable:true,
|
||||||
wuxieable:true,
|
wuxieable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
|
reverseOrder:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player;
|
return target!=player;
|
||||||
},
|
},
|
||||||
|
@ -1452,6 +1453,7 @@ card.swd={
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
|
reverseOrder:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target.isDamaged();
|
return target.isDamaged();
|
||||||
},
|
},
|
||||||
|
@ -1791,6 +1793,7 @@ card.swd={
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
|
reverseOrder:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player;
|
return target!=player;
|
||||||
},
|
},
|
||||||
|
@ -1853,6 +1856,7 @@ card.swd={
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
|
reverseOrder:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player;
|
return target!=player;
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,6 +11,26 @@ card.yunchou={
|
||||||
game.delay();
|
game.delay();
|
||||||
player.draw();
|
player.draw();
|
||||||
"step 1"
|
"step 1"
|
||||||
|
if(get.is.versus()){
|
||||||
|
player.chooseControl('顺时针','逆时针',function(event,player){
|
||||||
|
if(player.next.side==player.side) return '逆时针';
|
||||||
|
return '顺时针';
|
||||||
|
}).set('prompt','选择'+get.translation(card)+'的结算方向');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.goto(3);
|
||||||
|
}
|
||||||
|
"step 2"
|
||||||
|
if(result&&result.control=='顺时针'){
|
||||||
|
var evt=event.getParent();
|
||||||
|
evt.fixedSeat=true;
|
||||||
|
get.sortSeat(evt.targets);
|
||||||
|
evt.targets.reverse();
|
||||||
|
if(evt.targets[evt.targets.length-1]==player){
|
||||||
|
evt.targets.unshift(evt.targets.pop());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"step 3"
|
||||||
ui.clear();
|
ui.clear();
|
||||||
var cards=get.cards(Math.ceil(game.players.length/2));
|
var cards=get.cards(Math.ceil(game.players.length/2));
|
||||||
var dialog=ui.create.dialog('调兵遣将',cards,true);
|
var dialog=ui.create.dialog('调兵遣将',cards,true);
|
||||||
|
@ -627,6 +647,7 @@ card.yunchou={
|
||||||
content:function(){
|
content:function(){
|
||||||
if(target.num('e')) target.chooseToDiscard('e',true);
|
if(target.num('e')) target.chooseToDiscard('e',true);
|
||||||
},
|
},
|
||||||
|
reverseOrder:true,
|
||||||
ai:{
|
ai:{
|
||||||
order:9,
|
order:9,
|
||||||
result:{
|
result:{
|
||||||
|
|
|
@ -6332,19 +6332,29 @@ character.sp={
|
||||||
}
|
}
|
||||||
check=(num>=2);
|
check=(num>=2);
|
||||||
}
|
}
|
||||||
player.chooseTarget(get.prompt('hongyuan'),[1,2],function(card,player,target){
|
if(get.is.versus()){
|
||||||
return player!=target;
|
event.versus=true;
|
||||||
},
|
player.chooseBool(get.prompt('hongyuan'));
|
||||||
function(target){
|
}
|
||||||
if(!_status.event.check) return 0;
|
else{
|
||||||
return ai.get.attitude(_status.event.player,target);
|
player.chooseTarget(get.prompt('hongyuan'),[1,2],function(card,player,target){
|
||||||
}).set('check',check);
|
return player!=target;
|
||||||
|
},function(target){
|
||||||
|
if(!_status.event.check) return 0;
|
||||||
|
return ai.get.attitude(_status.event.player,target);
|
||||||
|
}).set('check',check);
|
||||||
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('hongyuan',result.targets);
|
var targets;
|
||||||
// for(var i=0;i<result.targets.length;i++){
|
if(event.versus){
|
||||||
// result.targets[i].draw();
|
targets=game.friend.slice(0);
|
||||||
// }
|
targets.remove(player);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
targets=result.target;
|
||||||
|
}
|
||||||
|
player.logSkill('hongyuan',targets);
|
||||||
game.asyncDraw(result.targets);
|
game.asyncDraw(result.targets);
|
||||||
trigger.num--;
|
trigger.num--;
|
||||||
}
|
}
|
||||||
|
|
96
game/game.js
96
game/game.js
|
@ -1122,6 +1122,11 @@
|
||||||
init:true,
|
init:true,
|
||||||
unfrequent:true,
|
unfrequent:true,
|
||||||
},
|
},
|
||||||
|
seperate_control:{
|
||||||
|
name:'分离选项条',
|
||||||
|
init:true,
|
||||||
|
unfrequent:true,
|
||||||
|
},
|
||||||
blur_ui:{
|
blur_ui:{
|
||||||
name:'模糊效果',
|
name:'模糊效果',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -2804,11 +2809,13 @@
|
||||||
}
|
}
|
||||||
if(config.versus_mode=='three'){
|
if(config.versus_mode=='three'){
|
||||||
map.enable_all_three.show();
|
map.enable_all_three.show();
|
||||||
|
map.enable_all_cards.show();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
map.enable_all_three.hide();
|
map.enable_all_three.hide();
|
||||||
|
map.enable_all_cards.hide();
|
||||||
}
|
}
|
||||||
if(config.versus_mode=='jiange'||config.versus_mode=='two'){
|
if(config.versus_mode=='jiange'||config.versus_mode=='two'||config.versus_mode=='three'){
|
||||||
map.free_choose.show();
|
map.free_choose.show();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -2867,6 +2874,12 @@
|
||||||
frequent:true,
|
frequent:true,
|
||||||
restart:true,
|
restart:true,
|
||||||
},
|
},
|
||||||
|
enable_all_cards:{
|
||||||
|
name:'启用全部卡牌',
|
||||||
|
init:false,
|
||||||
|
frequent:true,
|
||||||
|
restart:true,
|
||||||
|
},
|
||||||
four_assign:{
|
four_assign:{
|
||||||
name:'代替队友选将',
|
name:'代替队友选将',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -6039,6 +6052,31 @@
|
||||||
},
|
},
|
||||||
element:{
|
element:{
|
||||||
content:{
|
content:{
|
||||||
|
reverseOrder:function(){
|
||||||
|
"step 0"
|
||||||
|
game.delay();
|
||||||
|
"step 1"
|
||||||
|
var choice;
|
||||||
|
if(get.tag(card,'multineg')){
|
||||||
|
choice=(player.previous.side==player.side)?'逆时针':'顺时针';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
choice=(player.next.side==player.side)?'逆时针':'顺时针';
|
||||||
|
}
|
||||||
|
player.chooseControl('顺时针','逆时针',function(event,player){
|
||||||
|
return _status.event.choice||'逆时针';
|
||||||
|
}).set('prompt','选择'+get.translation(card)+'的结算方向').set('choice',choice);
|
||||||
|
"step 2"
|
||||||
|
if(result&&result.control=='顺时针'){
|
||||||
|
var evt=event.getParent();
|
||||||
|
evt.fixedSeat=true;
|
||||||
|
get.sortSeat(evt.targets);
|
||||||
|
evt.targets.reverse();
|
||||||
|
if(evt.targets[evt.targets.length-1]==player){
|
||||||
|
evt.targets.unshift(evt.targets.pop());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
addJudgeCard:function(){
|
addJudgeCard:function(){
|
||||||
target.addJudge(card,cards);
|
target.addJudge(card,cards);
|
||||||
},
|
},
|
||||||
|
@ -7693,7 +7731,15 @@
|
||||||
event.dialog.open();
|
event.dialog.open();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.controlbar=ui.create.control(event.controls);
|
if(event.seperate||lib.config.seperate_control){
|
||||||
|
event.controlbars=[];
|
||||||
|
for(var i=0;i<event.controls.length;i++){
|
||||||
|
event.controlbars.push(ui.create.control([event.controls[i]]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.controlbar=ui.create.control(event.controls);
|
||||||
|
}
|
||||||
if(event.dialog){
|
if(event.dialog){
|
||||||
if(Array.isArray(event.dialog)){
|
if(Array.isArray(event.dialog)){
|
||||||
event.dialog=ui.create.dialog.apply(this,event.dialog);
|
event.dialog=ui.create.dialog.apply(this,event.dialog);
|
||||||
|
@ -7736,6 +7782,11 @@
|
||||||
_status.imchoosing=false;
|
_status.imchoosing=false;
|
||||||
if(event.dialog&&event.dialog.close) event.dialog.close();
|
if(event.dialog&&event.dialog.close) event.dialog.close();
|
||||||
if(event.controlbar) event.controlbar.close();
|
if(event.controlbar) event.controlbar.close();
|
||||||
|
if(event.controlbars){
|
||||||
|
for(var i=0;i<event.controlbars.length;i++){
|
||||||
|
event.controlbars[i].close();
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
chooseBool:function(){
|
chooseBool:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
@ -8321,9 +8372,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
if(get.info(card).contentBefore){
|
var info=get.info(card);
|
||||||
|
if(info.contentBefore){
|
||||||
var next=game.createEvent(card.name+'ContentBefore');
|
var next=game.createEvent(card.name+'ContentBefore');
|
||||||
next.setContent(get.info(card).contentBefore);
|
next.setContent(info.contentBefore);
|
||||||
|
next.targets=targets;
|
||||||
|
next.card=card;
|
||||||
|
next.cards=cards;
|
||||||
|
next.player=player;
|
||||||
|
}
|
||||||
|
else if(info.reverseOrder&&get.is.versus){
|
||||||
|
var next=game.createEvent(card.name+'ContentBefore');
|
||||||
|
next.setContent('reverseOrder');
|
||||||
next.targets=targets;
|
next.targets=targets;
|
||||||
next.card=card;
|
next.card=card;
|
||||||
next.cards=cards;
|
next.cards=cards;
|
||||||
|
@ -8351,9 +8411,9 @@
|
||||||
}
|
}
|
||||||
if(num==0&&next.targets.length>1){
|
if(num==0&&next.targets.length>1){
|
||||||
if(!info.multitarget){
|
if(!info.multitarget){
|
||||||
lib.tempSortSeat=player;
|
if(!event.fixedSeat){
|
||||||
targets.sort(lib.sort.seat);
|
get.sortSeat(targets,player);
|
||||||
delete lib.tempSortSeat;
|
}
|
||||||
for(var i=0;i<targets.length;i++){
|
for(var i=0;i<targets.length;i++){
|
||||||
targets[i].animate('target');
|
targets[i].animate('target');
|
||||||
}
|
}
|
||||||
|
@ -10859,11 +10919,16 @@
|
||||||
var next=game.createEvent('chooseControl');
|
var next=game.createEvent('chooseControl');
|
||||||
next.controls=[];
|
next.controls=[];
|
||||||
for(var i=0;i<arguments.length;i++){
|
for(var i=0;i<arguments.length;i++){
|
||||||
if(arguments[i]=='dialogcontrol'){
|
if(typeof arguments[i]=='string'){
|
||||||
next.dialogcontrol=true;
|
if(arguments[i]=='dialogcontrol'){
|
||||||
}
|
next.dialogcontrol=true;
|
||||||
else if(typeof arguments[i]=='string'){
|
}
|
||||||
next.controls.push(arguments[i]);
|
else if(arguments[i]=='seperate'){
|
||||||
|
next.seperate=true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
next.controls.push(arguments[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(get.objtype(arguments[i])=='array'){
|
else if(get.objtype(arguments[i])=='array'){
|
||||||
next.controls=next.controls.concat(arguments[i]);
|
next.controls=next.controls.concat(arguments[i]);
|
||||||
|
@ -20054,7 +20119,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(lib.config.mode=='versus'){
|
else if(lib.config.mode=='versus'){
|
||||||
if(_status.mode=='standard'){
|
if(_status.mode=='standard'||_status.mode=='three'){
|
||||||
ui.create.control('再战',function(){
|
ui.create.control('再战',function(){
|
||||||
game.saveConfig('continue_name_versus',{
|
game.saveConfig('continue_name_versus',{
|
||||||
friend:_status.friendBackup,
|
friend:_status.friendBackup,
|
||||||
|
@ -27956,7 +28021,7 @@
|
||||||
if(get.is.phoneLayout()){
|
if(get.is.phoneLayout()){
|
||||||
newlined.style.marginTop='';
|
newlined.style.marginTop='';
|
||||||
packsource.innerHTML='筛选';
|
packsource.innerHTML='筛选';
|
||||||
filternode=ui.create.div('.popup-container.filter-character');
|
filternode=ui.create.div('.popup-container.filter-character.modenopause');
|
||||||
ui.create.div(filternode);
|
ui.create.div(filternode);
|
||||||
filternode.listen(function(e){
|
filternode.listen(function(e){
|
||||||
if(this.classList.contains('removing')) return;
|
if(this.classList.contains('removing')) return;
|
||||||
|
@ -32055,6 +32120,9 @@
|
||||||
};
|
};
|
||||||
var get={
|
var get={
|
||||||
is:{
|
is:{
|
||||||
|
versus:function(){
|
||||||
|
return !_status.connectMode&&get.mode()=='versus'&&_status.mode=='three';
|
||||||
|
},
|
||||||
mobileMe:function(player){
|
mobileMe:function(player){
|
||||||
return (game.layout=='mobile'||game.layout=='long')&&!game.chess&&player.dataset.position==0;
|
return (game.layout=='mobile'||game.layout=='long')&&!game.chess&&player.dataset.position==0;
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,6 +44,9 @@ table{table-layout: fixed;}
|
||||||
position: absolute;
|
position: absolute;
|
||||||
transition: all 1s;
|
transition: all 1s;
|
||||||
}
|
}
|
||||||
|
#window.modepaused>div:not(.modenopause):not(#arena):not(.popped){opacity: 0.3;}
|
||||||
|
#window.modepaused>#arena>#roundmenu{opacity: 0.3;}
|
||||||
|
#window.shortcutpaused.modepaused>.modenopause.popup-container:not(.filter-character){opacity: 0.3;}
|
||||||
#window.shortcutpaused>div:not(.background):not(#shortcut):not(#system):not(#arena):not(.hidden):not(.removing):not(.dialog):not(.centermenu):not(.popup-container){opacity: 0.3 !important}
|
#window.shortcutpaused>div:not(.background):not(#shortcut):not(#system):not(#arena):not(.hidden):not(.removing):not(.dialog):not(.centermenu):not(.popup-container){opacity: 0.3 !important}
|
||||||
#window.shortcutpaused>#arena>div:not(#timer):not(.removing):not(.hidden):not(#autonode){opacity: 0.3 !important}
|
#window.shortcutpaused>#arena>div:not(#timer):not(.removing):not(.hidden):not(#autonode){opacity: 0.3 !important}
|
||||||
#window.systempaused>#system{opacity: 0.3 !important;}
|
#window.systempaused>#system{opacity: 0.3 !important;}
|
||||||
|
@ -1669,6 +1672,9 @@ div:hover>.intro{opacity: 1;}
|
||||||
border-radius:8px;
|
border-radius:8px;
|
||||||
color: white !important;
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
.shadowed2{
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
|
||||||
|
}
|
||||||
#window[data-radius_size='reduce'] .shadowed{
|
#window[data-radius_size='reduce'] .shadowed{
|
||||||
border-radius:4px;
|
border-radius:4px;
|
||||||
}
|
}
|
||||||
|
@ -2214,6 +2220,16 @@ div:hover>.wunature{
|
||||||
.glow3{
|
.glow3{
|
||||||
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 10px, rgba(0, 133, 255, 0) 0 0 40px, rgba(0, 133, 255, 0.8) 0 0 60px !important
|
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 10px, rgba(0, 133, 255, 0) 0 0 40px, rgba(0, 133, 255, 0.8) 0 0 60px !important
|
||||||
}
|
}
|
||||||
|
.selectedx3{
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(255, 0, 0, 0.8) 0 0 10px, rgba(255, 0, 0, 0) 0 0 40px, rgba(255, 0, 0, 0.8) 0 0 60px !important
|
||||||
|
}
|
||||||
|
.glow4{
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 10px, rgba(0, 133, 255, 0) 0 0 40px, rgba(0, 133, 255, 0.8) 0 0 40px !important
|
||||||
|
}
|
||||||
|
.selectedx4{
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(255, 0, 0, 0.6) 0 0 10px, rgba(255, 0, 0, 0) 0 0 40px, rgba(255, 0, 0, 0.8) 0 0 40px !important
|
||||||
|
}
|
||||||
|
|
||||||
.player:not(.glow_phase)>.avatar.glow2,
|
.player:not(.glow_phase)>.avatar.glow2,
|
||||||
.button.glow2:not(.selected){
|
.button.glow2:not(.selected){
|
||||||
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 10px, rgba(10, 155, 67, 1) 0 0 10px !important
|
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 10px, rgba(10, 155, 67, 1) 0 0 10px !important
|
||||||
|
|
627
mode/versus.js
627
mode/versus.js
|
@ -47,6 +47,14 @@ mode.versus={
|
||||||
game.prepareArena(4);
|
game.prepareArena(4);
|
||||||
}
|
}
|
||||||
else if(_status.mode=='three'){
|
else if(_status.mode=='three'){
|
||||||
|
if(!get.config('enable_all_cards')){
|
||||||
|
lib.translate.wuzhong_info+='若对方存活角色多于己方,则额外摸一张牌';
|
||||||
|
lib.translate.zhuge_info='锁定技,出牌阶段,你使用杀的次数上限+3';
|
||||||
|
lib.card.list=lib.cardsThree;
|
||||||
|
}
|
||||||
|
ui.create.cards();
|
||||||
|
game.finishCards();
|
||||||
|
ui.auto.hide();
|
||||||
ui.wuxie.hide();
|
ui.wuxie.hide();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -200,6 +208,9 @@ mode.versus={
|
||||||
if(_status.mode=='four'||_status.mode=='jiange'||_status.connectMode||_status.mode=='two'){
|
if(_status.mode=='four'||_status.mode=='jiange'||_status.connectMode||_status.mode=='two'){
|
||||||
info.push(false);
|
info.push(false);
|
||||||
}
|
}
|
||||||
|
else if(_status.mode=='three'){
|
||||||
|
info.push(true);
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
info.push(lib.storage.single_control&&lib.storage.control_all&&game.players.length>=4);
|
info.push(lib.storage.single_control&&lib.storage.control_all&&game.players.length>=4);
|
||||||
}
|
}
|
||||||
|
@ -278,6 +289,22 @@ mode.versus={
|
||||||
game.gameDraw(firstAct);
|
game.gameDraw(firstAct);
|
||||||
game.phaseLoopJiange();
|
game.phaseLoopJiange();
|
||||||
}
|
}
|
||||||
|
else if(_status.mode=='three'){
|
||||||
|
var firstAct;
|
||||||
|
if(_status.color){
|
||||||
|
firstAct=game.enemyZhu;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
firstAct=game.friendZhu;
|
||||||
|
}
|
||||||
|
game.gameDraw(firstAct,4);
|
||||||
|
game.addGlobalSkill('versus_swap');
|
||||||
|
if(lib.config.show_handcardbutton){
|
||||||
|
ui.versushs=ui.create.system('手牌',null,true);
|
||||||
|
lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
|
||||||
|
}
|
||||||
|
game.phaseLoopThree(firstAct);
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
var firstAct;
|
var firstAct;
|
||||||
if(lib.storage.zhu){
|
if(lib.storage.zhu){
|
||||||
|
@ -1060,17 +1087,18 @@ mode.versus={
|
||||||
event.nodes.push(ui.create.div('.shadowed.reduce_radius'));
|
event.nodes.push(ui.create.div('.shadowed.reduce_radius'));
|
||||||
event.nodes[i].style.left='50%';
|
event.nodes[i].style.left='50%';
|
||||||
event.nodes[i].style.top='50%';
|
event.nodes[i].style.top='50%';
|
||||||
|
event.nodes[i].style.transitionDuration='0.2s';
|
||||||
|
event.nodes[i].animate('start');
|
||||||
}
|
}
|
||||||
event.moveAvatar=function(node,i){
|
event.moveAvatar=function(node,i){
|
||||||
event.moveNode(node,i);
|
if(!node.moved){
|
||||||
if(node.linknode){
|
event.blank.push(node.index);
|
||||||
if(!node.moved){
|
|
||||||
event.blank.push(node.linknode.index);
|
|
||||||
}
|
|
||||||
node.linknode.show();
|
|
||||||
}
|
}
|
||||||
node.linknode=event.nodes[i];
|
event.nodes[node.index].show();
|
||||||
node.linknode.hide();
|
event.moveNode(node,i);
|
||||||
|
setTimeout(function(){
|
||||||
|
event.nodes[node.index].hide();
|
||||||
|
},400);
|
||||||
};
|
};
|
||||||
event.aiMove=function(){
|
event.aiMove=function(){
|
||||||
var list=[];
|
var list=[];
|
||||||
|
@ -1136,57 +1164,165 @@ mode.versus={
|
||||||
event.nodes[i].style.width=width+'px';
|
event.nodes[i].style.width=width+'px';
|
||||||
event.nodes[i].style.height=height+'px';
|
event.nodes[i].style.height=height+'px';
|
||||||
if(event.avatars[i]){
|
if(event.avatars[i]){
|
||||||
event.moveNode(event.avatars[i],i+8);
|
event.moveNode(event.avatars[i],event.avatars[i].index);
|
||||||
event.avatars[i].style.width=width+'px';
|
event.avatars[i].style.width=width+'px';
|
||||||
event.avatars[i].style.height=height+'px';
|
event.avatars[i].style.height=height+'px';
|
||||||
event.avatars[i].linknode=event.nodes[i+8];
|
event.avatars[i].nodename.style.fontSize=Math.max(14,Math.round(width/5.6))+'px';
|
||||||
event.nodes[i+8].hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
lib.onresize.push(event.resize);
|
lib.onresize.push(event.resize);
|
||||||
event.clickAvatar=function(){
|
event.clickAvatar=function(){
|
||||||
if(this.moved) return;
|
if(event.deciding){
|
||||||
if(!_status.imchoosing) return;
|
if(event.friendlist.contains(this)){
|
||||||
event.moveAvatar(this,event.friend.length+24);
|
event.friendlist.remove(this);
|
||||||
event.friend.push(this.link);
|
event.moveNode(this,this.index);
|
||||||
this.moved=true;
|
this.nodename.innerHTML=get.slimName(this.link);
|
||||||
game.resume();
|
}
|
||||||
};
|
else{
|
||||||
event.replacenode=ui.create.system('换将',function(){
|
event.friendlist.push(this);
|
||||||
while(event.avatars.length){
|
}
|
||||||
event.avatars.shift().remove();
|
if(event.friendlist.length==3){
|
||||||
}
|
event.deciding=false;
|
||||||
for(var i=0;i<32;i++){
|
event.prompt('比赛即将开始');
|
||||||
event.nodes[i].show();
|
setTimeout(game.resume,1000);
|
||||||
}
|
}
|
||||||
delete event.list2;
|
for(var i=0;i<event.friendlist.length;i++){
|
||||||
event.friend.length=0;
|
if(i==1){
|
||||||
event.enemy.length=0;
|
event.friendlist[i].nodename.innerHTML='主帅';
|
||||||
event.blank.length=0;
|
}
|
||||||
event.redoing=true;
|
else{
|
||||||
if(_status.imchoosing){
|
event.friendlist[i].nodename.innerHTML='前锋';
|
||||||
game.resume();
|
}
|
||||||
}
|
}
|
||||||
},true);
|
var str='px,'+(event.margin/2-event.height*0.5)+'px)';
|
||||||
event.reselectnode=ui.create.system('重选',function(){
|
switch(event.friendlist.length){
|
||||||
for(var i=0;i<32;i++){
|
case 1:
|
||||||
event.nodes[i].show();
|
event.friendlist[0].style.transform='scale(1.2) translate('+(-event.width*0.5)+str;break;
|
||||||
}
|
case 2:
|
||||||
event.list2=event.list2.concat(event.friend).concat(event.enemy);
|
event.friendlist[0].style.transform='scale(1.2) translate('+(-event.width-7)+str;
|
||||||
event.friend.length=0;
|
event.friendlist[1].style.transform='scale(1.2) translate('+(7)+str;break;
|
||||||
event.enemy.length=0;
|
case 3:
|
||||||
for(var i=0;i<event.avatars.length;i++){
|
event.friendlist[0].style.transform='scale(1.2) translate('+(-event.width*1.5-14)+str;
|
||||||
if(event.avatars[i].moved){
|
event.friendlist[1].style.transform='scale(1.2) translate('+(-event.width*0.5)+str;
|
||||||
event.moveAvatar(event.avatars[i],event.blank.randomRemove());
|
event.friendlist[2].style.transform='scale(1.2) translate('+(event.width*0.5+14)+str;break;
|
||||||
delete event.avatars[i].moved;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.redoing=true;
|
else{
|
||||||
if(_status.imchoosing){
|
if(this.moved) return;
|
||||||
|
if(!event.imchoosing) return;
|
||||||
|
if(event.replacing){
|
||||||
|
this.link=event.replacing;
|
||||||
|
this.setBackground(event.replacing,'character');
|
||||||
|
delete event.replacing;
|
||||||
|
}
|
||||||
|
event.moveAvatar(this,event.friend.length+24);
|
||||||
|
event.friend.push(this.link);
|
||||||
|
this.moved=true;
|
||||||
game.resume();
|
game.resume();
|
||||||
}
|
}
|
||||||
},true);
|
};
|
||||||
|
if(get.config('change_choice')){
|
||||||
|
event.replacenode=ui.create.system('换将',function(){
|
||||||
|
while(event.avatars.length){
|
||||||
|
event.avatars.shift().remove();
|
||||||
|
}
|
||||||
|
for(var i=0;i<32;i++){
|
||||||
|
event.nodes[i].show();
|
||||||
|
}
|
||||||
|
delete event.list2;
|
||||||
|
event.friend.length=0;
|
||||||
|
event.enemy.length=0;
|
||||||
|
event.blank.length=0;
|
||||||
|
event.redoing=true;
|
||||||
|
if(event.imchoosing){
|
||||||
|
game.resume();
|
||||||
|
}
|
||||||
|
},true);
|
||||||
|
}
|
||||||
|
if(get.config('change_choice')){
|
||||||
|
event.reselectnode=ui.create.system('重选',function(){
|
||||||
|
for(var i=0;i<32;i++){
|
||||||
|
event.nodes[i].show();
|
||||||
|
}
|
||||||
|
event.list2=event.list2.concat(event.friend).concat(event.enemy);
|
||||||
|
event.friend.length=0;
|
||||||
|
event.enemy.length=0;
|
||||||
|
for(var i=0;i<event.avatars.length;i++){
|
||||||
|
if(event.avatars[i].moved){
|
||||||
|
event.moveAvatar(event.avatars[i],event.blank.randomRemove());
|
||||||
|
delete event.avatars[i].moved;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
event.redoing=true;
|
||||||
|
if(event.imchoosing){
|
||||||
|
game.resume();
|
||||||
|
}
|
||||||
|
},true);
|
||||||
|
}
|
||||||
|
if(get.config('free_choose')){
|
||||||
|
event.freechoosedialog=ui.create.characterDialog();
|
||||||
|
event.freechoosedialog.style.height='80%';
|
||||||
|
event.freechoosedialog.style.top='10%';
|
||||||
|
event.freechoosedialog.style.transform='scale(0.8)';
|
||||||
|
event.freechoosedialog.style.transition='all 0.3s';
|
||||||
|
event.freechoosedialog.listen(function(e){
|
||||||
|
if(!event.replacing){
|
||||||
|
event.dialoglayer.clicked=true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
event.dialoglayer=ui.create.div('.popup-container.hidden',function(e){
|
||||||
|
if(this.classList.contains('removing')) return;
|
||||||
|
if(this.clicked){
|
||||||
|
this.clicked=false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ui.window.classList.remove('modepaused');
|
||||||
|
this.delete();
|
||||||
|
e.stopPropagation();
|
||||||
|
event.freechoosedialog.style.transform='scale(0.8)';
|
||||||
|
if(event.replacing){
|
||||||
|
event.prompt('用'+get.translation(event.replacing)+'替换一名未选择武将');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(event.side==0){
|
||||||
|
event.prompt('请选择两名武将');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.prompt('请选择一名武将');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
event.dialoglayer.classList.add('modenopause');
|
||||||
|
event.dialoglayer.appendChild(event.freechoosedialog);
|
||||||
|
event.custom.replace.button=function(button){
|
||||||
|
event.replacing=button.link;
|
||||||
|
};
|
||||||
|
event.custom.add.window=function(){
|
||||||
|
if(event.replacing){
|
||||||
|
delete event.replacing;
|
||||||
|
if(event.side==0){
|
||||||
|
event.prompt('请选择两名武将');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.prompt('请选择一名武将');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
event.freechoosenode=ui.create.system('自由选将',function(){
|
||||||
|
if(!event.imchoosing){
|
||||||
|
event.prompt('请等待敌方选将');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
delete event.replacing;
|
||||||
|
ui.window.classList.add('modepaused');
|
||||||
|
ui.window.appendChild(event.dialoglayer);
|
||||||
|
ui.refresh(event.dialoglayer);
|
||||||
|
event.dialoglayer.show();
|
||||||
|
event.freechoosedialog.style.transform='scale(1)';
|
||||||
|
event.promptbar.hide();
|
||||||
|
},true)
|
||||||
|
}
|
||||||
event.checkredo=function(){
|
event.checkredo=function(){
|
||||||
if(event.redoing){
|
if(event.redoing){
|
||||||
event.goto(1);
|
event.goto(1);
|
||||||
|
@ -1201,22 +1337,48 @@ mode.versus={
|
||||||
}
|
}
|
||||||
'step 1'
|
'step 1'
|
||||||
if(Math.random()<0.5){
|
if(Math.random()<0.5){
|
||||||
_status.side=true;
|
_status.color=true;
|
||||||
event.side=1;
|
event.side=1;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
_status.side=false;
|
_status.color=false;
|
||||||
event.side=3;
|
event.side=3;
|
||||||
}
|
}
|
||||||
if(!event.list2){
|
if(!event.list2){
|
||||||
event.list2=event.list.randomGets(16);
|
event.list2=event.list.randomGets(16);
|
||||||
for(var i=0;i<16;i++){
|
for(var i=0;i<16;i++){
|
||||||
event.avatars.push(ui.create.div('.shadowed.reduce_radius',event.clickAvatar));
|
event.avatars.push(ui.create.div('.shadowed.shadowed2.reduce_radius.character',event.clickAvatar));
|
||||||
var name=event.list2[i];
|
var name=event.list2[i];
|
||||||
event.avatars[i].setBackground(name,'character');
|
event.avatars[i].setBackground(name,'character');
|
||||||
event.avatars[i].link=name;
|
event.avatars[i].link=name;
|
||||||
event.avatars[i].style.left='50%';
|
event.avatars[i].style.left='50%';
|
||||||
event.avatars[i].style.top='50%';
|
event.avatars[i].style.top='50%';
|
||||||
|
event.avatars[i].nodename=ui.create.div('.name',event.avatars[i],get.slimName(name));
|
||||||
|
event.avatars[i].nodename.style.fontFamily=lib.config.name_font;
|
||||||
|
// event.avatars[i].nodename.style.fontSize='18px';
|
||||||
|
event.avatars[i].nodename.style.left='6%';
|
||||||
|
event.avatars[i].nodename.style.top='8%';
|
||||||
|
event.avatars[i].index=i+8;
|
||||||
|
event.avatars[i].style.transformOrigin='top left';
|
||||||
|
event.avatars[i].animate('start');
|
||||||
|
event.nodes[event.avatars[i].index].hide();
|
||||||
|
switch(lib.character[name][1]){
|
||||||
|
case 'wei':event.avatars[i].nodename.dataset.nature='watermm';break;
|
||||||
|
case 'shu':event.avatars[i].nodename.dataset.nature='soilmm';break;
|
||||||
|
case 'wu':event.avatars[i].nodename.dataset.nature='woodmm';break;
|
||||||
|
case 'qun':event.avatars[i].nodename.dataset.nature='metalmm';break;
|
||||||
|
}
|
||||||
|
if(lib.config.touchscreen){
|
||||||
|
lib.setLongPress(event.avatars[i],ui.click.intro);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(lib.config.hover_all){
|
||||||
|
lib.setHover(event.avatars[i],ui.click.hoverplayer);
|
||||||
|
}
|
||||||
|
if(lib.config.right_info){
|
||||||
|
event.avatars[i].oncontextmenu=ui.click.rightplayer;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
event.resize();
|
event.resize();
|
||||||
for(var i=0;i<16;i++){
|
for(var i=0;i<16;i++){
|
||||||
|
@ -1230,7 +1392,7 @@ mode.versus={
|
||||||
'step 2'
|
'step 2'
|
||||||
if(event.checkredo()) return;
|
if(event.checkredo()) return;
|
||||||
if(event.side<2){
|
if(event.side<2){
|
||||||
_status.imchoosing=true;
|
event.imchoosing=true;
|
||||||
if(event.side==0){
|
if(event.side==0){
|
||||||
event.prompt('请选择两名武将');
|
event.prompt('请选择两名武将');
|
||||||
}
|
}
|
||||||
|
@ -1245,7 +1407,7 @@ mode.versus={
|
||||||
game.delay(2);
|
game.delay(2);
|
||||||
}
|
}
|
||||||
'step 3'
|
'step 3'
|
||||||
delete _status.imchoosing;
|
delete event.imchoosing;
|
||||||
if(event.checkredo()) return;
|
if(event.checkredo()) return;
|
||||||
if(event.friend.length+event.enemy.length<15){
|
if(event.friend.length+event.enemy.length<15){
|
||||||
if(event.side==1){
|
if(event.side==1){
|
||||||
|
@ -1258,7 +1420,6 @@ mode.versus={
|
||||||
event.goto(2);
|
event.goto(2);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.promptbar.delete();
|
|
||||||
event.side++;
|
event.side++;
|
||||||
if(event.side>3){
|
if(event.side>3){
|
||||||
event.side=0;
|
event.side=0;
|
||||||
|
@ -1269,8 +1430,9 @@ mode.versus={
|
||||||
}
|
}
|
||||||
'step 4'
|
'step 4'
|
||||||
if(event.checkredo()) return;
|
if(event.checkredo()) return;
|
||||||
event.replacenode.delete();
|
if(event.replacenode) event.replacenode.delete();
|
||||||
event.reselectnode.delete();
|
if(event.reselectnode) event.reselectnode.delete();
|
||||||
|
if(event.freechoosenode) event.freechoosenode.delete();
|
||||||
for(var i=0;i<event.avatars.length;i++){
|
for(var i=0;i<event.avatars.length;i++){
|
||||||
if(!event.avatars[i].moved){
|
if(!event.avatars[i].moved){
|
||||||
if(event.side<2){
|
if(event.side<2){
|
||||||
|
@ -1284,15 +1446,104 @@ mode.versus={
|
||||||
event.avatars[i].moved=true;
|
event.avatars[i].moved=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
game.delay();
|
||||||
'step 5'
|
'step 5'
|
||||||
if(event.checkredo()) return;
|
event.prompt('选择三名出场武将');
|
||||||
console.log(111);
|
event.enemylist=event.enemy.randomGets(3);
|
||||||
|
event.friendlist=[];
|
||||||
|
event.deciding=true;
|
||||||
|
for(var i=0;i<32;i++){
|
||||||
|
event.nodes[i].hide();
|
||||||
|
}
|
||||||
game.pause();
|
game.pause();
|
||||||
'step 6'
|
'step 6'
|
||||||
if(event.checkredo()) return;
|
event.promptbar.delete();
|
||||||
if(ui.cardPileButton) ui.cardPileButton.style.display='';
|
if(ui.cardPileButton) ui.cardPileButton.style.display='';
|
||||||
lib.onresize.remove(event.resize);
|
lib.onresize.remove(event.resize);
|
||||||
ui.wuxie.show();
|
ui.wuxie.show();
|
||||||
|
ui.auto.show();
|
||||||
|
for(var i=0;i<16;i++){
|
||||||
|
event.avatars[i].delete();
|
||||||
|
}
|
||||||
|
for(var i=0;i<3;i++){
|
||||||
|
event.friendlist[i]=event.friendlist[i].link;
|
||||||
|
event.enemylist[i]=event.enemylist[i].link;
|
||||||
|
}
|
||||||
|
_status.friendBackup=event.friendlist.slice(0);
|
||||||
|
_status.enemyBackup=event.enemylist.slice(0);
|
||||||
|
_status.coinCoeff=get.coinCoeff(event.friendlist);
|
||||||
|
|
||||||
|
var num=lib.storage.number;
|
||||||
|
ui.create.players(6);
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
game.players[i].getId();
|
||||||
|
game.players[i].node.action.innerHTML='行动';
|
||||||
|
}
|
||||||
|
ui.arena.setNumber(7);
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
game.players[i].dataset.position=parseInt(game.players[i].dataset.position)+1;
|
||||||
|
}
|
||||||
|
game.singleHandcard=true;
|
||||||
|
ui.arena.classList.add('single-handcard');
|
||||||
|
ui.fakeme=ui.create.div('.fakeme.avatar');
|
||||||
|
_status.prepareArena=true;
|
||||||
|
ui.create.me();
|
||||||
|
ui.me.appendChild(ui.fakeme);
|
||||||
|
|
||||||
|
game.friend=[];
|
||||||
|
game.enemy=[];
|
||||||
|
|
||||||
|
for(var i in lib.skill){
|
||||||
|
if(lib.skill[i].changeSeat){
|
||||||
|
lib.skill[i]={};
|
||||||
|
if(lib.translate[i+'_info']){
|
||||||
|
lib.translate[i+'_info']='固定位置时不可用';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(i=0;i<game.players.length;i++){
|
||||||
|
if(i<3){
|
||||||
|
game.friend.push(game.players[i]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
game.enemy.push(game.players[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
game.friendZhu=game.players[1];
|
||||||
|
game.enemyZhu=game.players[4];
|
||||||
|
for(var i=0;i<3;i++){
|
||||||
|
game.friend[i].side=_status.color;
|
||||||
|
game.enemy[i].side=!_status.color;
|
||||||
|
if(game.friendZhu==game.friend[i]){
|
||||||
|
game.friend[i].identity='zhu';
|
||||||
|
game.friend[i].setIdentity(_status.color+'Zhu');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
game.friend[i].identity='zhong';
|
||||||
|
game.friend[i].setIdentity(_status.color+'Zhong');
|
||||||
|
}
|
||||||
|
if(game.enemyZhu==game.enemy[i]){
|
||||||
|
game.enemy[i].identity='zhu';
|
||||||
|
game.enemy[i].setIdentity(!_status.color+'Zhu');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
game.enemy[i].identity='zhong';
|
||||||
|
game.enemy[i].setIdentity(!_status.color+'Zhong');
|
||||||
|
}
|
||||||
|
game.friend[i].init(event.friendlist[i]);
|
||||||
|
game.enemy[i].init(event.enemylist[i]);
|
||||||
|
game.friend[i].node.identity.dataset.color=get.translation(_status.color+'Color');
|
||||||
|
game.enemy[i].node.identity.dataset.color=get.translation(!_status.color+'Color');
|
||||||
|
}
|
||||||
|
game.friendZhu.maxHp++;
|
||||||
|
game.friendZhu.hp++;
|
||||||
|
game.friendZhu.update();
|
||||||
|
|
||||||
|
game.enemyZhu.maxHp++;
|
||||||
|
game.enemyZhu.hp++;
|
||||||
|
game.enemyZhu.update();
|
||||||
|
|
||||||
|
game.onSwapControl();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
chooseCharacter:function(){
|
chooseCharacter:function(){
|
||||||
|
@ -2373,6 +2624,76 @@ mode.versus={
|
||||||
},result1,result2);
|
},result1,result2);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
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.identity!='zhu'){
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
if(game.players[i].side==player.side&&game.players[i].identity!='zhu'&&
|
||||||
|
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=true,swap2=false;
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
if(swap&&game.players[i].side==target.side&&!game.players[i].classList.contains('acted')){
|
||||||
|
swap=false;
|
||||||
|
}
|
||||||
|
if(!swap2&&!game.players[i].classList.contains('acted')){
|
||||||
|
swap2=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(swap){
|
||||||
|
if(swap2){
|
||||||
|
target=event.swap(target);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
game.players[i].classList.remove('acted');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var rand=Math.random();
|
||||||
|
target.chooseTarget('选择行动的角色',true,function(card,player,target2){
|
||||||
|
return target2.side==target.side&&!target2.classList.contains('acted');
|
||||||
|
}).ai=function(target2){
|
||||||
|
var num=0;
|
||||||
|
if(target2.num('j')){
|
||||||
|
num-=5;
|
||||||
|
}
|
||||||
|
if(rand<1/3){
|
||||||
|
num+=1/(target2.hp+1);
|
||||||
|
}
|
||||||
|
else if(rand<2/3){
|
||||||
|
num+=target2.num('h')/5;
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
'step 3'
|
||||||
|
if(result.bool){
|
||||||
|
event.player=result.targets[0];
|
||||||
|
event.goto(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
versusPhaseLoop:function(player){
|
versusPhaseLoop:function(player){
|
||||||
var next=game.createEvent('phaseLoop');
|
var next=game.createEvent('phaseLoop');
|
||||||
next.player=player;
|
next.player=player;
|
||||||
|
@ -2713,6 +3034,169 @@ mode.versus={
|
||||||
boss_lieshiyazi:['male','wei',4,['boss_jiguan','boss_nailuo'],['jiangemech','hiddenboss','bossallowed'],'wei'],
|
boss_lieshiyazi:['male','wei',4,['boss_jiguan','boss_nailuo'],['jiangemech','hiddenboss','bossallowed'],'wei'],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
cardsThree:[
|
||||||
|
["spade",7,"sha"],
|
||||||
|
["spade",8,"sha"],
|
||||||
|
["spade",8,"sha"],
|
||||||
|
["spade",9,"sha"],
|
||||||
|
["spade",9,"sha"],
|
||||||
|
["spade",10,"sha"],
|
||||||
|
["spade",10,"sha"],
|
||||||
|
["club",2,"sha"],
|
||||||
|
["club",3,"sha"],
|
||||||
|
["club",4,"sha"],
|
||||||
|
["club",5,"sha"],
|
||||||
|
["club",6,"sha"],
|
||||||
|
["club",7,"sha"],
|
||||||
|
["club",8,"sha"],
|
||||||
|
["club",8,"sha"],
|
||||||
|
["club",9,"sha"],
|
||||||
|
["club",9,"sha"],
|
||||||
|
["club",10,"sha"],
|
||||||
|
["club",10,"sha"],
|
||||||
|
["club",11,"sha"],
|
||||||
|
["club",11,"sha"],
|
||||||
|
["heart",10,"sha"],
|
||||||
|
["heart",10,"sha"],
|
||||||
|
["heart",11,"sha"],
|
||||||
|
["diamond",6,"sha"],
|
||||||
|
["diamond",7,"sha"],
|
||||||
|
["diamond",8,"sha"],
|
||||||
|
["diamond",9,"sha"],
|
||||||
|
["diamond",10,"sha"],
|
||||||
|
["diamond",13,"sha"],
|
||||||
|
["heart",2,"shan"],
|
||||||
|
["heart",2,"shan"],
|
||||||
|
["heart",13,"shan"],
|
||||||
|
["diamond",2,"shan"],
|
||||||
|
["diamond",2,"shan"],
|
||||||
|
["diamond",3,"shan"],
|
||||||
|
["diamond",4,"shan"],
|
||||||
|
["diamond",5,"shan"],
|
||||||
|
["diamond",6,"shan"],
|
||||||
|
["diamond",7,"shan"],
|
||||||
|
["diamond",8,"shan"],
|
||||||
|
["diamond",9,"shan"],
|
||||||
|
["diamond",10,"shan"],
|
||||||
|
["diamond",11,"shan"],
|
||||||
|
["diamond",11,"shan"],
|
||||||
|
["heart",3,"tao"],
|
||||||
|
["heart",4,"tao"],
|
||||||
|
["heart",6,"tao"],
|
||||||
|
["heart",7,"tao"],
|
||||||
|
["heart",8,"tao"],
|
||||||
|
["heart",9,"tao"],
|
||||||
|
["heart",12,"tao"],
|
||||||
|
["diamond",12,"tao"],
|
||||||
|
|
||||||
|
["spade",2,"bagua"],
|
||||||
|
["club",2,"bagua"],
|
||||||
|
["spade",5,"jueying"],
|
||||||
|
["club",5,"dilu"],
|
||||||
|
["heart",13,"zhuahuang"],
|
||||||
|
["heart",5,"chitu"],
|
||||||
|
["spade",13,"dawan"],
|
||||||
|
["diamond",13,"zixin"],
|
||||||
|
["club",1,"zhuge"],
|
||||||
|
["diamond",1,"zhuge"],
|
||||||
|
["spade",2,"cixiong"],
|
||||||
|
["spade",6,"qinggang"],
|
||||||
|
["spade",5,"qinglong"],
|
||||||
|
["spade",12,"zhangba"],
|
||||||
|
["diamond",5,"guanshi"],
|
||||||
|
["diamond",12,"fangtian"],
|
||||||
|
["heart",5,"qilin"],
|
||||||
|
|
||||||
|
["heart",3,"wugu"],
|
||||||
|
["heart",4,"wugu"],
|
||||||
|
["heart",1,"taoyuan"],
|
||||||
|
["spade",7,"nanman"],
|
||||||
|
["spade",13,"nanman"],
|
||||||
|
["club",7,"nanman"],
|
||||||
|
["heart",1,"wanjian"],
|
||||||
|
["spade",1,"juedou"],
|
||||||
|
["club",1,"juedou"],
|
||||||
|
["diamond",1,"juedou"],
|
||||||
|
["heart",7,"wuzhong"],
|
||||||
|
["heart",8,"wuzhong"],
|
||||||
|
["heart",9,"wuzhong"],
|
||||||
|
["heart",11,"wuzhong"],
|
||||||
|
["spade",3,'shunshou'],
|
||||||
|
["spade",4,'shunshou'],
|
||||||
|
["spade",11,'shunshou'],
|
||||||
|
["diamond",3,'shunshou'],
|
||||||
|
["diamond",4,'shunshou'],
|
||||||
|
["spade",3,'guohe'],
|
||||||
|
["spade",4,'guohe'],
|
||||||
|
["spade",12,'guohe'],
|
||||||
|
["club",3,'guohe'],
|
||||||
|
["club",4,'guohe'],
|
||||||
|
["heart",12,'guohe'],
|
||||||
|
["club",12,'jiedao'],
|
||||||
|
["club",13,'jiedao'],
|
||||||
|
["spade",11,'wuxie'],
|
||||||
|
["club",12,'wuxie'],
|
||||||
|
["club",13,'wuxie'],
|
||||||
|
["spade",6,'lebu'],
|
||||||
|
["club",6,'lebu'],
|
||||||
|
["heart",6,'lebu'],
|
||||||
|
["spade",1,'hanbing'],
|
||||||
|
["club",2,'renwang'],
|
||||||
|
|
||||||
|
["heart",4,"sha","fire"],
|
||||||
|
["heart",7,"sha","fire"],
|
||||||
|
["heart",10,"sha","fire"],
|
||||||
|
["diamond",4,"sha","fire"],
|
||||||
|
["diamond",5,"sha","fire"],
|
||||||
|
["spade",4,"sha","thunder"],
|
||||||
|
["spade",5,"sha","thunder"],
|
||||||
|
["spade",6,"sha","thunder"],
|
||||||
|
["spade",7,"sha","thunder"],
|
||||||
|
["spade",8,"sha","thunder"],
|
||||||
|
["club",5,"sha","thunder"],
|
||||||
|
["club",6,"sha","thunder"],
|
||||||
|
["club",7,"sha","thunder"],
|
||||||
|
["club",8,"sha","thunder"],
|
||||||
|
["heart",8,"shan"],
|
||||||
|
["heart",9,"shan"],
|
||||||
|
["heart",11,"shan"],
|
||||||
|
["heart",12,"shan"],
|
||||||
|
["diamond",6,"shan"],
|
||||||
|
["diamond",7,"shan"],
|
||||||
|
["diamond",8,"shan"],
|
||||||
|
["diamond",10,"shan"],
|
||||||
|
["diamond",11,"shan"],
|
||||||
|
["heart",5,"tao"],
|
||||||
|
["heart",6,"tao"],
|
||||||
|
["diamond",2,"tao"],
|
||||||
|
["diamond",3,"tao"],
|
||||||
|
["diamond",9,"jiu"],
|
||||||
|
["spade",3,"jiu"],
|
||||||
|
["spade",9,"jiu"],
|
||||||
|
["club",3,"jiu"],
|
||||||
|
["club",9,"jiu"],
|
||||||
|
|
||||||
|
["diamond",13,"hualiu"],
|
||||||
|
["club",1,"baiyin"],
|
||||||
|
["spade",2,"tengjia",'fire'],
|
||||||
|
["spade",1,"guding"],
|
||||||
|
["diamond",1,"zhuque",'fire'],
|
||||||
|
|
||||||
|
["heart",2,"huogong","fire"],
|
||||||
|
["heart",3,"huogong","fire"],
|
||||||
|
["diamond",12,"huogong","fire"],
|
||||||
|
["spade",11,"tiesuo"],
|
||||||
|
["spade",12,"tiesuo"],
|
||||||
|
["club",10,"tiesuo"],
|
||||||
|
["club",11,"tiesuo"],
|
||||||
|
["club",12,"tiesuo"],
|
||||||
|
["club",13,"tiesuo"],
|
||||||
|
["heart",13,"wuxie"],
|
||||||
|
["heart",13,"wuxie"],
|
||||||
|
["spade",13,"wuxie"],
|
||||||
|
["spade",10,"bingliang"],
|
||||||
|
["club",4,"bingliang"],
|
||||||
|
],
|
||||||
choiceThree:[
|
choiceThree:[
|
||||||
'sunquan','re_ganning','re_huanggai','re_zhouyu','re_daqiao','re_luxun','sunshangxiang',
|
'sunquan','re_ganning','re_huanggai','re_zhouyu','re_daqiao','re_luxun','sunshangxiang',
|
||||||
're_liubei','re_zhangfei','zhugeliang','re_zhaoyun','re_machao','huangyueying',
|
're_liubei','re_zhangfei','zhugeliang','re_zhaoyun','re_machao','huangyueying',
|
||||||
|
@ -2722,7 +3206,7 @@ mode.versus={
|
||||||
'dianwei',
|
'dianwei',
|
||||||
'xuhuang','sunjian',
|
'xuhuang','sunjian',
|
||||||
'dengai','jiangwei','sunce',
|
'dengai','jiangwei','sunce',
|
||||||
'masu','lingtong','xusheng','chengong',
|
'xin_masu','lingtong','xusheng','chengong',
|
||||||
'xunyou','wangyi',
|
'xunyou','wangyi',
|
||||||
'guyong','caifuren',
|
'guyong','caifuren',
|
||||||
'zhugejin','dingfeng',
|
'zhugejin','dingfeng',
|
||||||
|
@ -2736,7 +3220,7 @@ mode.versus={
|
||||||
'dianwei','pangtong','sp_zhugeliang','taishici','pangde','yanwen',
|
'dianwei','pangtong','sp_zhugeliang','taishici','pangde','yanwen',
|
||||||
'xuhuang','sunjian','jiaxu','dongzhuo',
|
'xuhuang','sunjian','jiaxu','dongzhuo',
|
||||||
'zhanghe','dengai','jiangwei','liushan','sunce',
|
'zhanghe','dengai','jiangwei','liushan','sunce',
|
||||||
'caozhi','zhangchunhua','masu','xin_fazheng','xin_xushu','lingtong','wuguotai','xusheng','chengong','gaoshun',
|
'caozhi','zhangchunhua','xin_masu','xin_fazheng','xin_xushu','lingtong','wuguotai','xusheng','chengong','gaoshun',
|
||||||
'xunyou','wangyi','zhonghui','madai','liaohua','chengpu','handang','bulianshi',
|
'xunyou','wangyi','zhonghui','madai','liaohua','chengpu','handang','bulianshi',
|
||||||
'jianyong','panzhangmazhong','yufan','xin_liru','fuhuanghou',
|
'jianyong','panzhangmazhong','yufan','xin_liru','fuhuanghou',
|
||||||
'caozhen','chenqun','hanhaoshihuan','wuyi','zhoucang','guyong','sunluban','jushou','caifuren',
|
'caozhen','chenqun','hanhaoshihuan','wuyi','zhoucang','guyong','sunluban','jushou','caifuren',
|
||||||
|
@ -4296,6 +4780,27 @@ mode.versus={
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if(_status.mode=='three'){
|
||||||
|
if(this.identity=='zhu'){
|
||||||
|
if(game.friend.contains(this)){
|
||||||
|
game.over(false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
game.over(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(this==game.me){
|
||||||
|
game.modeSwapPlayer(game.friendZhu);
|
||||||
|
}
|
||||||
|
game.friend.remove(this);
|
||||||
|
game.enemy.remove(this);
|
||||||
|
if(source){
|
||||||
|
source.draw(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(this.side==game.me.side){
|
if(this.side==game.me.side){
|
||||||
_status.friendDied.push(this.name);
|
_status.friendDied.push(this.name);
|
||||||
_status.friendCount.innerHTML='阵亡: '+get.cnNumber(_status.friendDied.length,true);
|
_status.friendCount.innerHTML='阵亡: '+get.cnNumber(_status.friendDied.length,true);
|
||||||
|
|
Loading…
Reference in New Issue