1.7.6
This commit is contained in:
parent
0548dbae7c
commit
4ff88bc495
|
@ -1224,6 +1224,6 @@ character.extra={
|
|||
shenfen:'神愤',
|
||||
shenfen_info:'限定技,出牌阶段,你可以弃置6枚暴怒标记,对场上所有其他角色造成一点伤害,然后令其弃置4张牌',
|
||||
wuqian:'无前',
|
||||
wuqian_info:'出牌阶段,你可以弃置两枚暴怒标记并获得技能【无双】',
|
||||
wuqian_info:'出牌阶段,你可以弃置两枚暴怒标记并获得技能【无双】直到回合结束',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
character.hearth={
|
||||
character:{
|
||||
hs_jaina:['female','wei',3,['huopu','bianxing','bingjia']],
|
||||
hs_lrexxar:['male','qun',4,['shoulie','gongji']],
|
||||
hs_lrexxar:['male','shu',4,['shoulie','gongji']],
|
||||
hs_wuther:['male','qun',4,['fengxian','jieming']],
|
||||
hs_jgarrosh:['male','qun',4,['zhanhou','qiangxi']],
|
||||
hs_jgarrosh:['male','shu',4,['zhanhou','qiangxi']],
|
||||
hs_malfurion:['male','wu',4,['jihuo']],
|
||||
hs_guldan:['male','qun',3,['fenliu','hongxi']],
|
||||
hs_guldan:['male','wei',3,['fenliu','hongxi']],
|
||||
hs_anduin:['male','qun',3,['shengguang','shijie','anying']],
|
||||
hs_sthrall:['male','wu',4,['tuteng','guozai','zuling']],
|
||||
hs_waleera:['female','qun',3,['jianren','mengun','wlianji']],
|
||||
hs_waleera:['female','shu',3,['jianren','mengun','wlianji']],
|
||||
|
||||
hs_medivh:['male','wei',3,['jingxiang','moying','mdzhoufu']],
|
||||
hs_alleria:['male','wu',3,['fengxing','qiaodong','liegong']],
|
||||
hs_magni:['male','qun',4,['zhongjia','dunji']],
|
||||
hs_magni:['male','shu',4,['zhongjia','dunji']],
|
||||
|
||||
hs_neptulon:['male','wu',4,['liechao','qingliu']],
|
||||
hs_wvelen:['male','qun',3,['shengyan','xianzhi']],
|
||||
|
@ -38,13 +38,13 @@ character.hearth={
|
|||
hs_zhishigushu:['male','shu',4,['jiaohui']],
|
||||
hs_zhanzhenggushu:['male','wei',6,['biri']],
|
||||
hs_ronghejuren:['male','shu',8,['ronghuo']],
|
||||
hs_shanlingjuren:['male','qun',8,['luoshi']],
|
||||
hs_edwin:['male','qun',3,['lianzhan']],
|
||||
hs_mijiaojisi:['female','qun',3,['kuixin']],
|
||||
hs_shanlingjuren:['male','wu',8,['luoshi']],
|
||||
hs_edwin:['male','wu',3,['lianzhan']],
|
||||
hs_mijiaojisi:['female','wu',3,['kuixin']],
|
||||
hs_huzhixiannv:['female','wu',3,['jingmeng','qingliu']],
|
||||
hs_tgolem:['male','qun',4,['xinwuyan','guozai']],
|
||||
hs_tgolem:['male','wu',4,['xinwuyan','guozai']],
|
||||
hs_totemic:['male','wu',3,['s_tuteng']],
|
||||
hs_xsylvanas:['female','qun',3,['busi','xshixin','xmojian']],
|
||||
hs_xsylvanas:['female','wei',3,['busi','xshixin','xmojian']],
|
||||
hs_siwangzhiyi:['male','qun',12,['mieshi']],
|
||||
hs_bilanyoulong:['male','wei',4,['lingzhou']],
|
||||
hs_jinglinglong:['male','wu',3,['mianyi']],
|
||||
|
|
|
@ -46,7 +46,7 @@ character.mountain={
|
|||
}
|
||||
},
|
||||
zhiji:{
|
||||
skillAnimation:'true',
|
||||
skillAnimation:true,
|
||||
audio:2,
|
||||
unique:true,
|
||||
trigger:{player:'phaseBegin'},
|
||||
|
|
|
@ -22,19 +22,19 @@ character.yxs={
|
|||
yxs_luobinhan:['male','wu',4,['xiadao','lzhangyi']],
|
||||
yxs_chengjisihan:['male','qun',4,['mashu','qianglue']],
|
||||
yxs_mingchenghuanghou:['female','shu',3,['tiewan','chajue']],
|
||||
yxs_wangzhaojun:['female','qun',3,['heqin','luoyan']],
|
||||
yxs_wangzhaojun:['female','wei',3,['heqin','luoyan']],
|
||||
yxs_luocheng:['male','wu',4,['hanqiang','biaoqi']],
|
||||
yxs_direnjie:['male','wei',3,['shentan','kanpo']],
|
||||
yxs_sunwu:['male','wu',3,['bingsheng','taolue']],
|
||||
yxs_chengyaojin:['male','qun',4,['sanbanfu']],
|
||||
yxs_yuji:['female','qun',3,['sheshen','changnian']],
|
||||
yxs_xiangyu:['male','qun',4,['wushuang','ciqiu']],
|
||||
yxs_chengyaojin:['male','shu',4,['sanbanfu']],
|
||||
yxs_yuji:['female','shu',3,['sheshen','changnian']],
|
||||
yxs_xiangyu:['male','shu',4,['wushuang','ciqiu']],
|
||||
yxs_yingzheng:['male','qun',4,['jianxiong','batu']],
|
||||
yxs_yuefei:['male','qun',4,['longdan','wumu']],
|
||||
yxs_fuermosi:['male','qun',3,['yanyi','jiean']],
|
||||
yxs_fuermosi:['male','wei',3,['yanyi','jiean']],
|
||||
yxs_guiguzi:['male','qun',3,['baihe','yinyang','xiushen']],
|
||||
yxs_xiaoqiao:['female','wu',3,['chujia','zhijie']],
|
||||
yxs_luzhishen:['male','qun',4,['dili','kuangchan']],
|
||||
yxs_luzhishen:['male','wei',4,['dili','kuangchan']],
|
||||
},
|
||||
skill:{
|
||||
zhijie:{
|
||||
|
|
157
game/game.js
157
game/game.js
|
@ -18,10 +18,12 @@
|
|||
var lib={
|
||||
version:1.76,
|
||||
changeLog:[
|
||||
'捉鬼bug修复',
|
||||
'bug修复(捉鬼、导出武将)',
|
||||
'配音支持引用文件名',
|
||||
'挑战模式可关闭单人控制',
|
||||
'不同模式可单独设置禁将、禁卡',
|
||||
'自定义技能禁配',
|
||||
'战棋对战选项',
|
||||
'炉石模式平衡调整'
|
||||
],
|
||||
configprefix:'noname_0.9_',
|
||||
|
@ -2019,16 +2021,16 @@
|
|||
map.chess_character.show();
|
||||
}
|
||||
if(config.chess_mode=='combat'){
|
||||
map.battle_number.show();
|
||||
map.chess_ordered.show();
|
||||
map.free_choose.show();
|
||||
map.change_choice.show();
|
||||
// map.battle_number.show();
|
||||
// map.chess_ordered.show();
|
||||
map.free_choose.show();
|
||||
map.change_choice.show();
|
||||
}
|
||||
else{
|
||||
map.battle_number.hide();
|
||||
map.chess_ordered.hide();
|
||||
map.free_choose.hide();
|
||||
map.change_choice.hide();
|
||||
// map.battle_number.hide();
|
||||
// map.chess_ordered.hide();
|
||||
map.free_choose.hide();
|
||||
map.change_choice.hide();
|
||||
}
|
||||
if(config.chess_mode=='tafang'){
|
||||
map.chess_treasure.hide();
|
||||
|
@ -2120,25 +2122,25 @@
|
|||
clear:true,
|
||||
frequent:true,
|
||||
},
|
||||
battle_number:{
|
||||
name:'对战人数',
|
||||
init:'3',
|
||||
frequent:true,
|
||||
item:{
|
||||
'2':'2v2',
|
||||
'3':'3v3',
|
||||
'4':'4v4',
|
||||
'6':'6v6',
|
||||
'8':'8v8',
|
||||
},
|
||||
onclick:function(num){
|
||||
game.saveConfig('battle_number',num,this._link.config.mode);
|
||||
if(!_status.event.parent.showConfig&&!_status.event.showConfig) return;
|
||||
if(_status.event.parent.changeDialog){
|
||||
_status.event.parent.changeDialog();
|
||||
}
|
||||
},
|
||||
},
|
||||
// battle_number:{
|
||||
// name:'对战人数',
|
||||
// init:'3',
|
||||
// frequent:true,
|
||||
// item:{
|
||||
// '2':'2v2',
|
||||
// '3':'3v3',
|
||||
// '4':'4v4',
|
||||
// '6':'6v6',
|
||||
// '8':'8v8',
|
||||
// },
|
||||
// onclick:function(num){
|
||||
// game.saveConfig('battle_number',num,this._link.config.mode);
|
||||
// if(!_status.event.parent.showConfig&&!_status.event.showConfig) return;
|
||||
// if(_status.event.parent.changeDialog){
|
||||
// _status.event.parent.changeDialog();
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
chess_treasure:{
|
||||
name:'战场机关',
|
||||
init:'0.2',
|
||||
|
@ -2172,11 +2174,11 @@
|
|||
init:true,
|
||||
// frequent:true,
|
||||
},
|
||||
chess_ordered:{
|
||||
name:'交替行动',
|
||||
init:true,
|
||||
// frequent:true,
|
||||
},
|
||||
// chess_ordered:{
|
||||
// name:'交替行动',
|
||||
// init:true,
|
||||
// // frequent:true,
|
||||
// },
|
||||
chess_character:{
|
||||
name:'战棋武将',
|
||||
init:true,
|
||||
|
@ -2403,6 +2405,8 @@
|
|||
'每人在出牌阶段有一次移动的机会,可移动的最大距离为2<li>'+
|
||||
'任何卡牌或技能无法指定位置相隔8个格以上的角色为目标<li>'+
|
||||
'杀死对方阵营的角色可摸一张牌,杀死本方阵营无惩罚<li>'+
|
||||
'若开启主将,双方各选择一名角色成为主将。主将体力上限加一,主将死亡后,若有副将,副将代替之成为主将,否则游戏结束<li>'+
|
||||
'开启无尽模式后,任何一方有角色死亡都将选择一名新角色重新加入战场,直到点击左上角的结束游戏按钮手动结束游戏。结束游戏时,杀敌更多的一方获胜<li>'+
|
||||
'开启交替行动时,双方无论存活角色角色多少都将轮流进行行动。在一方所有角色行动完毕进行下一轮行动时,若其人数比另一方少,另一方可指定至多X名角色名摸一张牌,X为人数之差<li>'+
|
||||
'开启战场机关后,每个回合结束时有一定机率出现一个机关,该机关不参与战斗,并有一个影响周围或全体角色的效果。机关在出现后的5〜10个回合内消失<li>'+
|
||||
'开启击退效果后,当一名角色对距离两格以内且在同一直线上的目标造成伤害后,受伤害角色将沿反方向移动一格<li>'+
|
||||
|
@ -3158,7 +3162,12 @@
|
|||
game.modPhaseDraw(player,event.num);
|
||||
}
|
||||
else{
|
||||
player.draw(event.num);
|
||||
if(get.config('first_less')&&game.phaseNumber==1&&_status.first_less){
|
||||
event.num--;
|
||||
}
|
||||
if(event.num>0){
|
||||
player.draw(event.num);
|
||||
}
|
||||
}
|
||||
},
|
||||
phaseUse:function(){
|
||||
|
@ -7107,6 +7116,7 @@
|
|||
return this.side==game.me.side&&get.config('single_control');
|
||||
}
|
||||
else if(lib.config.mode=='chess'){
|
||||
if(_status.mode=='combat'&&!get.config('single_control')) return false;
|
||||
return this.side==game.me.side;
|
||||
}
|
||||
return false;
|
||||
|
@ -7843,7 +7853,9 @@
|
|||
that['$'+type](1200);
|
||||
}
|
||||
}
|
||||
that.$fullscreenpop(name,color);
|
||||
if(name){
|
||||
that.$fullscreenpop(name,color);
|
||||
}
|
||||
},300);
|
||||
},
|
||||
$fire:function(){
|
||||
|
@ -9437,7 +9449,10 @@
|
|||
};
|
||||
for(var i=0;i<lib.customCharacters.length;i++){
|
||||
var name=lib.customCharacters[i];
|
||||
if(lib.checkCharacterName(name)) continue;
|
||||
if(lib.checkCharacterName(name)){
|
||||
imageLoaded++;
|
||||
continue;
|
||||
}
|
||||
if(list&&!list.contains(name)){
|
||||
imageLoaded++;
|
||||
continue;
|
||||
|
@ -9751,6 +9766,14 @@
|
|||
console.log(player);
|
||||
}
|
||||
},
|
||||
identityText:function(player,str){
|
||||
if(player&&str){
|
||||
player.node.identity.firstChild.innerHTML=str;
|
||||
}
|
||||
else{
|
||||
console.log(player);
|
||||
}
|
||||
},
|
||||
chessSwap:function(content){
|
||||
var me=game.playerMap[content[0]];
|
||||
var player=game.playerMap[content[1]];
|
||||
|
@ -11163,6 +11186,9 @@
|
|||
else{
|
||||
added=10;
|
||||
}
|
||||
if(lib.config.mode=='chess'&&_status.mode=='combat'&&get.config('additional_player')){
|
||||
added=2;
|
||||
}
|
||||
_status.coin+=added*coeff;
|
||||
if(_status.coinCoeff){
|
||||
_status.coin*=_status.coinCoeff;
|
||||
|
@ -12146,7 +12172,7 @@
|
|||
"step 3"
|
||||
if(event.bool){
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-10);
|
||||
game.changeCoin(-3);
|
||||
}
|
||||
game.me.lose(game.me.get('h'))._triggered=null;
|
||||
}
|
||||
|
@ -12590,7 +12616,60 @@
|
|||
return player2;
|
||||
},
|
||||
arrangePlayers:function(){
|
||||
game.players.sort(lib.sort.position);
|
||||
if(lib.config.mode=='chess'&&game.me){
|
||||
var friendCount=0;
|
||||
var enemyCount=0;
|
||||
var rand=Math.random()<0.5;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==game.me.side){
|
||||
if(rand){
|
||||
if(game.players[i]==game.friendZhu){
|
||||
game.players[i]._sortCount=-2;
|
||||
}
|
||||
else{
|
||||
game.players[i]._sortCount=2*friendCount;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(game.players[i]==game.friendZhu){
|
||||
game.players[i]._sortCount=-1;
|
||||
}
|
||||
else{
|
||||
game.players[i]._sortCount=2*friendCount+1;
|
||||
}
|
||||
}
|
||||
friendCount++;
|
||||
}
|
||||
else{
|
||||
if(rand){
|
||||
if(game.players[i]==game.enemyZhu){
|
||||
game.players[i]._sortCount=-1;
|
||||
}
|
||||
else{
|
||||
game.players[i]._sortCount=2*enemyCount+1;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(game.players[i]==game.enemyZhu){
|
||||
game.players[i]._sortCount=-2;
|
||||
}
|
||||
else{
|
||||
game.players[i]._sortCount=2*enemyCount;
|
||||
}
|
||||
}
|
||||
enemyCount++;
|
||||
}
|
||||
}
|
||||
game.players.sort(function(a,b){
|
||||
return a._sortCount-b._sortCount;
|
||||
});
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
delete game.players[i]._sortCount;
|
||||
}
|
||||
}
|
||||
else{
|
||||
game.players.sort(lib.sort.position);
|
||||
}
|
||||
var players=game.players.concat(game.dead);
|
||||
players.sort(lib.sort.position);
|
||||
for(var i=0;i<players.length;i++){
|
||||
|
@ -15551,7 +15630,7 @@
|
|||
var currentrow3=null;
|
||||
var clickrow3=function(){
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-20);
|
||||
game.changeCoin(-10);
|
||||
}
|
||||
game.swapPlayer(this.link);
|
||||
};
|
||||
|
|
16
mode/boss.js
16
mode/boss.js
|
@ -171,6 +171,12 @@ mode.boss={
|
|||
}
|
||||
}
|
||||
}
|
||||
if(!list.length){
|
||||
alert('挑战模式不可隐藏boss武将包,请在选项-其它中选择“重置隐藏扩展包”');
|
||||
event.finish();
|
||||
_status.over=true;
|
||||
return;
|
||||
}
|
||||
if(!event.current){
|
||||
event.current=bosslist.childNodes[1];
|
||||
event.current.classList.add('highlight');
|
||||
|
@ -274,7 +280,7 @@ mode.boss={
|
|||
game.onSwapControl();
|
||||
// ui.fakemebg.show();
|
||||
|
||||
lib.setPopped(ui.create.system('查看手牌',null,true),function(){
|
||||
lib.setPopped(ui.create.system('手牌',null,true),function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
|
||||
var players=game.players.concat(game.dead);
|
||||
|
@ -283,7 +289,7 @@ mode.boss={
|
|||
uiintro.add(get.translation(players[i]));
|
||||
var cards=players[i].get('h');
|
||||
if(cards.length){
|
||||
uiintro.add(cards,true);
|
||||
uiintro.addSmall(cards,true);
|
||||
}
|
||||
else{
|
||||
uiintro.add('(无)');
|
||||
|
@ -292,7 +298,7 @@ mode.boss={
|
|||
}
|
||||
|
||||
return uiintro;
|
||||
});
|
||||
},220);
|
||||
}
|
||||
lib.setPopped(ui.create.system('重整',null,true),function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
|
@ -524,7 +530,7 @@ mode.boss={
|
|||
return;
|
||||
}
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-10);
|
||||
game.changeCoin(-3);
|
||||
}
|
||||
list.randomSort();
|
||||
_status.event.dialog.close();
|
||||
|
@ -568,7 +574,7 @@ mode.boss={
|
|||
}
|
||||
else{
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-50);
|
||||
game.changeCoin(-10);
|
||||
}
|
||||
ui.cheat2x=ui.create.groupControl(_status.event.parent.dialogxx);
|
||||
this.backup=_status.event.dialog;
|
||||
|
|
449
mode/chess.js
449
mode/chess.js
|
@ -312,6 +312,12 @@ mode.chess={
|
|||
if(_status.enemies){
|
||||
_status.enemies.remove(this);
|
||||
}
|
||||
if(ui.friendDied&&player.side==game.me.side){
|
||||
ui.friendDied.innerHTML='阵亡: '+get.cnNumber(++_status.friendDied,true);
|
||||
}
|
||||
if(ui.enemyDied&&player.side!=game.me.side){
|
||||
ui.enemyDied.innerHTML='杀敌: '+get.cnNumber(++_status.enemyDied,true);
|
||||
}
|
||||
delete lib.posmap[player.dataset.position];
|
||||
setTimeout(function(){
|
||||
player.delete();
|
||||
|
@ -323,12 +329,106 @@ mode.chess={
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(player==game.friendZhu){
|
||||
if(game.friendViceZhu&&game.friendViceZhu.isAlive()){
|
||||
game.friendZhu=game.friendViceZhu;
|
||||
delete game.friendViceZhu;
|
||||
game.friendZhu.node.identity.lastChild.innerHTML='将';
|
||||
game.addVideo('identityText',game.friendZhu,'将');
|
||||
}
|
||||
else{
|
||||
game.over(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(player==game.enemyZhu){
|
||||
if(game.enemyViceZhu&&game.enemyViceZhu.isAlive()){
|
||||
game.enemyZhu=game.enemyViceZhu;
|
||||
delete game.enemyViceZhu;
|
||||
game.enemyZhu.node.identity.lastChild.innerHTML='帅';
|
||||
game.addVideo('identityText',game.enemyZhu,'帅');
|
||||
}
|
||||
else{
|
||||
game.over(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(player==game.me){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==player.side){
|
||||
game.modeSwapPlayer(game.players[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
var notend=false;
|
||||
for(var i=1;i<game.players.length;i++){
|
||||
if(game.players[i].side!=game.players[0].side){
|
||||
if(source&&source.side!=player.side){
|
||||
source.draw();
|
||||
if(source&&game.players.contains(source)){
|
||||
if(_status.mode=='combat'){
|
||||
if(source.side!=player.side){
|
||||
source.draw(get.config('reward'));
|
||||
}
|
||||
else{
|
||||
switch(get.config('punish')){
|
||||
case '弃牌':
|
||||
var he=source.get('he');
|
||||
if(he.length){
|
||||
source.discard(he);
|
||||
}
|
||||
break;
|
||||
case '摸牌':
|
||||
source.draw(get.config('reward'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(source.side!=player.side){
|
||||
source.draw();
|
||||
}
|
||||
}
|
||||
if(_status.mode!='combat'||_status.vsboss){
|
||||
return;
|
||||
}
|
||||
else{
|
||||
notend=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_status.mode=='combat'&&!_status.vsboss){
|
||||
if(player.side==game.me.side){
|
||||
if(get.config('additional_player')&&_status.additionallist.length){
|
||||
game.replaceChessPlayer();
|
||||
return;
|
||||
}
|
||||
else if(_status.replacelist.length){
|
||||
game.replaceChessPlayer(_status.replacelist.randomRemove());
|
||||
return;
|
||||
}
|
||||
else if(get.config('noreplace_end')){
|
||||
game.over(player.side!=game.me.side);
|
||||
return;
|
||||
}
|
||||
else if(notend){
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(get.config('additional_player')&&_status.additionallist.length){
|
||||
game.replaceChessPlayer(null,true);
|
||||
return;
|
||||
}
|
||||
else if(_status.enemyreplacelist.length){
|
||||
game.replaceChessPlayer(_status.enemyreplacelist.randomRemove(),true);
|
||||
return;
|
||||
}
|
||||
else if(get.config('noreplace_end')){
|
||||
game.over(player.side!=game.me.side);
|
||||
return;
|
||||
}
|
||||
else if(notend){
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(_status.mode=='tafang'){
|
||||
|
@ -546,6 +646,73 @@ mode.chess={
|
|||
}
|
||||
},
|
||||
playerproto:{
|
||||
finishGame:function(){
|
||||
'step 0'
|
||||
while(ui.controls.length){
|
||||
ui.controls[0].close();
|
||||
}
|
||||
while(ui.dialogs.length){
|
||||
ui.dialogs[0].close();
|
||||
}
|
||||
'step 1'
|
||||
if(_status.friendDied<_status.enemyDied){
|
||||
game.over(true);
|
||||
}
|
||||
else if(_status.friendDied<_status.enemyDied){
|
||||
game.over(false);
|
||||
}
|
||||
else{
|
||||
game.over();
|
||||
}
|
||||
},
|
||||
replaceChessPlayer:function(){
|
||||
'step 0'
|
||||
if(get.config('additional_player')){
|
||||
if(!event.enemy&&!_status.auto){
|
||||
event.dialog=ui.create.dialog('选择替补角色',[_status.additionallist.randomGets(parseInt(get.config('choice_number'))),'character']);
|
||||
event.filterButton=function(){return true;};
|
||||
event.player=game.me;
|
||||
event.forced=true;
|
||||
event.custom.replace.confirm=function(){
|
||||
event.playername=ui.selected.buttons[0].link;
|
||||
event.dialog.close();
|
||||
_status.additionallist.remove(event.playername);
|
||||
if(ui.confirm) ui.confirm.close();
|
||||
game.resume();
|
||||
}
|
||||
game.check();
|
||||
game.pause();
|
||||
}
|
||||
else{
|
||||
event.playername=_status.additionallist.randomRemove();
|
||||
}
|
||||
}
|
||||
else if(!event.enemy&&get.config('seat_order')=='交替'&&!_status.auto&&_status.replacelist.length){
|
||||
_status.replacelist.add(event.playername);
|
||||
event.dialog=ui.create.dialog('选择替补角色',[_status.replacelist,'character']);
|
||||
event.filterButton=function(){return true;};
|
||||
event.player=game.me;
|
||||
event.forced=true;
|
||||
event.custom.replace.confirm=function(){
|
||||
event.playername=ui.selected.buttons[0].link;
|
||||
event.dialog.close();
|
||||
_status.replacelist.remove(event.playername);
|
||||
if(ui.confirm) ui.confirm.close();
|
||||
game.resume();
|
||||
}
|
||||
game.check();
|
||||
game.pause();
|
||||
}
|
||||
else{
|
||||
game.delay();
|
||||
}
|
||||
'step 1'
|
||||
var player=game.addChessPlayer(event.playername,event.enemy);
|
||||
game.log(player,'加入游戏');
|
||||
player.chessFocus();
|
||||
player.playerfocus(1000);
|
||||
game.delay(2);
|
||||
},
|
||||
chooseToMove:function(){
|
||||
"step 0"
|
||||
if(!player.movable(0,1)&&!player.movable(0,-1)&&
|
||||
|
@ -768,6 +935,12 @@ mode.chess={
|
|||
|
||||
return player;
|
||||
},
|
||||
replaceChessPlayer:function(name,enemy){
|
||||
var next=game.createEvent('replaceChessPlayer');
|
||||
next.playername=name;
|
||||
next.enemy=enemy;
|
||||
next.content=lib.element.playerproto.replaceChessPlayer;
|
||||
},
|
||||
removeTreasure:function(player){
|
||||
game.addVideo('removeTreasure',null,player.dataset.position);
|
||||
player.delete();
|
||||
|
@ -810,6 +983,9 @@ mode.chess={
|
|||
}
|
||||
},
|
||||
addOverDialog:function(dialog,result){
|
||||
if(ui.finishGame){
|
||||
ui.finishGame.remove();
|
||||
}
|
||||
dialog.classList.add('center');
|
||||
if(_status.mode!='leader') return;
|
||||
if(result=='战斗胜利'){
|
||||
|
@ -1540,6 +1716,9 @@ mode.chess={
|
|||
game.pause();
|
||||
}
|
||||
_status.mode=get.config('chess_mode');
|
||||
if(_status.mode=='combat'){
|
||||
_status.first_less=true;
|
||||
}
|
||||
"step 1"
|
||||
for(var i in lib.skill){
|
||||
if(lib.skill[i].changeSeat){
|
||||
|
@ -1643,7 +1822,13 @@ mode.chess={
|
|||
ui.arena.classList.add('chess');
|
||||
var mylistmap,enemylistmap;
|
||||
if(event.video){
|
||||
var videocontent=event.video[0].content;
|
||||
var videocontent;
|
||||
for(var ii=0;ii<event.video.length;ii++){
|
||||
if(event.video[ii].type=='init'){
|
||||
videocontent=event.video[ii].content;
|
||||
break;
|
||||
}
|
||||
}
|
||||
_status.mylist=[];
|
||||
_status.enemylist=[];
|
||||
mylistmap=[];
|
||||
|
@ -1813,6 +1998,12 @@ mode.chess={
|
|||
_status.friendCount=_status.mylist.length;
|
||||
while(_status.mylist.length){
|
||||
friend=ui.create.player().animate('start');
|
||||
if(!event.friendZhu){
|
||||
event.friendZhu=friend;
|
||||
}
|
||||
else if(!event.friendViceZhu){
|
||||
event.friendViceZhu=friend;
|
||||
}
|
||||
friend.init(_status.mylist.shift());
|
||||
friend.side=side;
|
||||
friend.setIdentity('friend');
|
||||
|
@ -1853,7 +2044,7 @@ mode.chess={
|
|||
lib.posmap[enemy.dataset.position]=enemy;
|
||||
}
|
||||
|
||||
lib.setPopped(ui.create.system('查看手牌',null,true),function(){
|
||||
lib.setPopped(ui.create.system('手牌',null,true),function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
var added=false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
|
@ -1862,7 +2053,7 @@ mode.chess={
|
|||
uiintro.add(get.translation(game.players[i]));
|
||||
var cards=game.players[i].get('h');
|
||||
if(cards.length){
|
||||
uiintro.add(cards,true);
|
||||
uiintro.addSmall(cards,true);
|
||||
}
|
||||
else{
|
||||
uiintro.add('(无)');
|
||||
|
@ -1874,22 +2065,106 @@ mode.chess={
|
|||
}
|
||||
|
||||
return uiintro;
|
||||
});
|
||||
// ui.create.system('显示距离',function(){
|
||||
// if(!game.me.isAlive()) return;
|
||||
// for(var i=0;i<game.players.length;i++){
|
||||
// if(game.players[i]!=game.me){
|
||||
// var dist=get.distance(game.me,game.players[i],'pure');
|
||||
// var dist2=get.distance(game.me,game.players[i]);
|
||||
// var nature=dist>7?'thunder':'';
|
||||
// game.players[i].popup('距离:'+dist2+'/'+dist,nature);
|
||||
// }
|
||||
// }
|
||||
// },true);
|
||||
},220);
|
||||
if(!event.video&&_status.mode=='combat'&&!_status.vsboss&&(_status.replacelist.length||get.config('additional_player'))){
|
||||
_status.enemyDied=0;
|
||||
_status.friendDied=0;
|
||||
ui.enemyDied=ui.create.system('杀敌: '+get.cnNumber(0),null,true);
|
||||
ui.friendDied=ui.create.system('阵亡: '+get.cnNumber(0),null,true);
|
||||
if(!get.config('additional_player')){
|
||||
lib.setPopped(ui.friendDied,function(){
|
||||
if(_status.replacelist.length){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
|
||||
uiintro.add('未上场');
|
||||
uiintro.add([_status.replacelist,'character']);
|
||||
|
||||
return uiintro;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if(!event.video&&_status.mode=='combat'&&!get.config('single_control')&&!_status.boss){
|
||||
ui.single_swap=ui.create.system('换人',function(){
|
||||
var bool=false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==game.me.side&&game.players[i]!=game.me){
|
||||
bool=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(bool){
|
||||
if(ui.auto.classList.contains('hidden')){
|
||||
game.me.popup('请稍后换人');
|
||||
return;
|
||||
}
|
||||
if(_status.event.isMine()){
|
||||
ui.click.auto();
|
||||
setTimeout(function(){
|
||||
ui.click.auto();
|
||||
},500);
|
||||
}
|
||||
var player=game.me;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
player=player.next;
|
||||
if(player.side==game.me.side){
|
||||
game.modeSwapPlayer(player);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
},true);
|
||||
}
|
||||
if(!event.video&&_status.mode=='combat'&&!_status.vsboss&&get.config('additional_player')){
|
||||
ui.finishGame=ui.create.system('结束游戏',function(){
|
||||
ui.finishGame.remove();
|
||||
var next=game.createEvent('finish_game');
|
||||
next.content=lib.element.playerproto.finishGame;
|
||||
if(_status.paused){
|
||||
if(_status.event.next.length>1){
|
||||
_status.event.next.length=0;
|
||||
_status.event.next.push(next);
|
||||
}
|
||||
game.uncheck();
|
||||
game.resume();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ui.create.me();
|
||||
ui.create.fakeme();
|
||||
|
||||
if(!event.video&&_status.mode=='combat'&&get.config('zhu')){
|
||||
game.friendZhu=event.friendZhu;
|
||||
game.friendZhu.hp++;
|
||||
game.friendZhu.maxHp++;
|
||||
game.friendZhu.update();
|
||||
game.friendZhu.node.identity.firstChild.innerHTML='将';
|
||||
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side!=game.me.side){
|
||||
game.enemyZhu=game.players[i];
|
||||
game.players[i].hp++;
|
||||
game.players[i].maxHp++;
|
||||
game.players[i].update();
|
||||
game.players[i].node.identity.firstChild.innerHTML='帅';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(get.config('main_zhu')){
|
||||
game.friendViceZhu=event.friendViceZhu;
|
||||
game.friendViceZhu.node.identity.firstChild.innerHTML='仕';
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side!=game.me.side&&game.players[i]!=game.enemyZhu){
|
||||
game.enemyViceZhu=game.players[i];
|
||||
game.players[i].node.identity.firstChild.innerHTML='士';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ui.chessinfo=ui.create.div('.fakeme.player',ui.me,function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
@ -1931,8 +2206,16 @@ mode.chess={
|
|||
lord:players[i].name==_status.lord
|
||||
});
|
||||
}
|
||||
_status.videoInited=true,
|
||||
_status.videoInited=true;
|
||||
game.addVideo('init',null,info);
|
||||
if(game.friendZhu){
|
||||
game.addVideo('identityText',game.friendZhu,'将');
|
||||
game.addVideo('identityText',game.enemyZhu,'帅');
|
||||
if(game.friendViceZhu){
|
||||
game.addVideo('identityText',game.friendViceZhu,'仕');
|
||||
game.addVideo('identityText',game.enemyViceZhu,'士');
|
||||
}
|
||||
}
|
||||
if(event.obs){
|
||||
game.addVideo('initobs',null,event.obs);
|
||||
}
|
||||
|
@ -1984,7 +2267,7 @@ mode.chess={
|
|||
if(_status.mode=='leader'){
|
||||
game.phaseLoopOrdered(p);
|
||||
}
|
||||
else if(get.config('chess_ordered')){
|
||||
else if(get.config('seat_order')=='交替'){
|
||||
game.phaseLoopOrdered(p);
|
||||
}
|
||||
else{
|
||||
|
@ -2607,6 +2890,7 @@ mode.chess={
|
|||
else{
|
||||
_status.mylist=_status.mylist.concat(game.data.character.randomGets(_status.lord?2:3));
|
||||
}
|
||||
var difficulty;
|
||||
if(selected.challenge.length){
|
||||
_status.challenge=selected.challenge[0].link;
|
||||
_status.enemylist.push(_status.challenge);
|
||||
|
@ -2642,7 +2926,7 @@ mode.chess={
|
|||
}
|
||||
}
|
||||
else{
|
||||
var number,difficulty,list;
|
||||
var number,list;
|
||||
if(selected.difficulty.length){
|
||||
difficulty=selected.difficulty[0].link[2];
|
||||
}
|
||||
|
@ -3564,16 +3848,58 @@ mode.chess={
|
|||
bossbuttons[i].classList.add('noclick');
|
||||
bossbuttons[i].listen(clickBoss);
|
||||
}
|
||||
|
||||
if(get.config('reward')==undefined) game.saveConfig('reward',1,true);
|
||||
if(get.config('punish')==undefined) game.saveConfig('punish','无',true);
|
||||
if(get.config('battle_number')==undefined) game.saveConfig('battle_number',3,true);
|
||||
if(get.config('replace_number')==undefined) game.saveConfig('replace_number',0,true);
|
||||
if(get.config('single_control')==undefined) game.saveConfig('single_control',true,true);
|
||||
if(get.config('first_less')==undefined) game.saveConfig('first_less',true,true);
|
||||
|
||||
var dialog=ui.create.dialog('选择出场角色','hidden');
|
||||
dialog.classList.add('fullwidth');
|
||||
dialog.classList.add('fullheight');
|
||||
dialog.classList.add('fixed');
|
||||
dialog.add('0/'+get.config('battle_number'));
|
||||
dialog.add([list.slice(0,parseInt(get.config('battle_number'))*4+5),'character']);
|
||||
dialog.add('0/0');
|
||||
dialog.add([list.slice(0,parseInt(get.config('battle_number'))*4+parseInt(get.config('replace_number'))+5),'character']);
|
||||
if(bossbuttons.length){
|
||||
dialog.add('挑战魔王');
|
||||
dialog.add(bosses);
|
||||
}
|
||||
event.addConfig=function(dialog){
|
||||
dialog.add('选项');
|
||||
dialog.choice={};
|
||||
dialog.choice.zhu=dialog.add(ui.create.switcher('zhu',get.config('zhu'))).querySelector('.toggle');
|
||||
dialog.choice.main_zhu=dialog.add(ui.create.switcher('main_zhu',get.config('main_zhu'))).querySelector('.toggle');
|
||||
if(get.config('zhu')){
|
||||
dialog.choice.main_zhu.parentNode.classList.remove('disabled');
|
||||
}
|
||||
else{
|
||||
dialog.choice.main_zhu.parentNode.classList.add('disabled');
|
||||
}
|
||||
dialog.choice.noreplace_end=dialog.add(ui.create.switcher('noreplace_end',get.config('noreplace_end'))).querySelector('.toggle');
|
||||
dialog.choice.additional_player=dialog.add(ui.create.switcher('additional_player',get.config('additional_player'))).querySelector('.toggle');
|
||||
dialog.choice.single_control=dialog.add(ui.create.switcher('single_control',get.config('single_control'))).querySelector('.toggle');
|
||||
dialog.choice.first_less=dialog.add(ui.create.switcher('first_less',get.config('first_less'))).querySelector('.toggle');
|
||||
// dialog.attack_move=dialog.add(ui.create.switcher('attack_move',get.config('attack_move'))).querySelector('.toggle');
|
||||
// this.dialog.versus_single_control=this.dialog.add(ui.create.switcher('versus_single_control',lib.storage.single_control)).querySelector('.toggle');
|
||||
// this.dialog.versus_first_less=this.dialog.add(ui.create.switcher('versus_first_less',lib.storage.first_less)).querySelector('.toggle');
|
||||
dialog.choice.reward=dialog.add(ui.create.switcher('reward',[0,1,2,3,4],get.config('reward'))).querySelector('.toggle');
|
||||
dialog.choice.punish=dialog.add(ui.create.switcher('punish',['弃牌','无','摸牌'],get.config('punish'))).querySelector('.toggle');
|
||||
dialog.choice.seat_order=dialog.add(ui.create.switcher('seat_order',['交替','随机'],get.config('seat_order'))).querySelector('.toggle');
|
||||
dialog.choice.battle_number=dialog.add(ui.create.switcher('battle_number',[2,3,4,6,8],get.config('battle_number'))).querySelector('.toggle');
|
||||
dialog.choice.replace_number=dialog.add(ui.create.switcher('replace_number',[0,1,2,3,5,7,9,17],get.config('replace_number'))).querySelector('.toggle');
|
||||
dialog.choice.choice_number=dialog.add(ui.create.switcher('choice_number',[3,6,9],get.config('choice_number'))).querySelector('.toggle');
|
||||
if(get.config('additional_player')){
|
||||
dialog.choice.replace_number.parentNode.classList.add('disabled');
|
||||
dialog.choice.choice_number.parentNode.classList.remove('disabled');
|
||||
}
|
||||
else{
|
||||
dialog.choice.replace_number.parentNode.classList.remove('disabled');
|
||||
dialog.choice.choice_number.parentNode.classList.add('disabled');
|
||||
}
|
||||
};
|
||||
event.addConfig(dialog);
|
||||
for(var i=0;i<bosses.childNodes.length;i++){
|
||||
bosses.childNodes[i].classList.add('squarebutton');
|
||||
}
|
||||
|
@ -3595,7 +3921,10 @@ mode.chess={
|
|||
if(bossnum){
|
||||
return 3*bossnum;
|
||||
}
|
||||
return parseInt(get.config('battle_number'));
|
||||
if(get.config('additional_player')){
|
||||
return parseInt(get.config('battle_number'));
|
||||
}
|
||||
return parseInt(get.config('battle_number'))+parseInt(get.config('replace_number'));
|
||||
};
|
||||
next.custom.add.button=addToButton;
|
||||
next.custom.add.window=function(clicked){
|
||||
|
@ -3613,6 +3942,39 @@ mode.chess={
|
|||
delete event.asboss;
|
||||
}
|
||||
}
|
||||
var dialog=_status.event.dialog;
|
||||
if(dialog.choice){
|
||||
for(var i in dialog.choice){
|
||||
game.saveConfig(i,dialog.choice[i].link,true);
|
||||
}
|
||||
if(get.config('zhu')){
|
||||
dialog.choice.main_zhu.parentNode.classList.remove('disabled');
|
||||
}
|
||||
else{
|
||||
dialog.choice.main_zhu.parentNode.classList.add('disabled');
|
||||
}
|
||||
if(get.config('additional_player')){
|
||||
dialog.choice.replace_number.parentNode.classList.add('disabled');
|
||||
dialog.choice.choice_number.parentNode.classList.remove('disabled');
|
||||
}
|
||||
else{
|
||||
dialog.choice.replace_number.parentNode.classList.remove('disabled');
|
||||
dialog.choice.choice_number.parentNode.classList.add('disabled');
|
||||
}
|
||||
var num=parseInt(get.config('battle_number'))*4+parseInt(get.config('replace_number'))+5;
|
||||
if(dialog.buttons.length>num){
|
||||
for(var i=num;i<dialog.buttons.length;i++){
|
||||
dialog.buttons[i].remove();
|
||||
}
|
||||
dialog.buttons.splice(num);
|
||||
}
|
||||
else if(dialog.buttons.length<num){
|
||||
for(var i=dialog.buttons.length;i<num;i++){
|
||||
dialog.buttons.push(ui.create.button(list[i],'character',dialog.buttons[0].parentNode).animate('zoom'))
|
||||
}
|
||||
game.check();
|
||||
}
|
||||
}
|
||||
addToButton();
|
||||
}
|
||||
event.changeDialog=function(){
|
||||
|
@ -3620,7 +3982,7 @@ mode.chess={
|
|||
return;
|
||||
}
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-10);
|
||||
game.changeCoin(-3);
|
||||
}
|
||||
list.randomSort();
|
||||
_status.event.dialog.close();
|
||||
|
@ -3630,11 +3992,12 @@ mode.chess={
|
|||
dialog.classList.add('fullheight');
|
||||
dialog.classList.add('fixed');
|
||||
dialog.add('0/'+_status.event.selectButton());
|
||||
dialog.add([list.slice(0,parseInt(get.config('battle_number'))*4+5),'character']);
|
||||
dialog.add([list.slice(0,parseInt(get.config('battle_number'))*4+parseInt(get.config('replace_number'))+5),'character']);
|
||||
if(bossbuttons.length){
|
||||
dialog.add('挑战魔王');
|
||||
dialog.add(bosses);
|
||||
}
|
||||
event.addConfig(dialog);
|
||||
dialog.open();
|
||||
game.uncheck();
|
||||
game.check();
|
||||
|
@ -3670,7 +4033,7 @@ mode.chess={
|
|||
}
|
||||
else{
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-50);
|
||||
game.changeCoin(-10);
|
||||
}
|
||||
ui.cheat2x=ui.create.groupControl(_status.event.parent.dialogxx);
|
||||
this.backup=_status.event.dialog;
|
||||
|
@ -3713,8 +4076,13 @@ mode.chess={
|
|||
ui.control.style.transition='';
|
||||
|
||||
|
||||
|
||||
_status.mylist=result.links.slice(0);
|
||||
if(_status.mode=='combat'){
|
||||
_status.mylist=result.links.slice(0,parseInt(get.config('battle_number')));
|
||||
_status.replacelist=result.links.slice(parseInt(get.config('battle_number')));
|
||||
}
|
||||
else{
|
||||
_status.mylist=result.links.slice(0);
|
||||
}
|
||||
if(ui.coin){
|
||||
_status.coinCoeff=get.coinCoeff(_status.mylist);
|
||||
}
|
||||
|
@ -3723,6 +4091,7 @@ mode.chess={
|
|||
}
|
||||
var glows=event.bosses.querySelectorAll('.glow');
|
||||
if(glows.length){
|
||||
_status.vsboss=true;
|
||||
_status.enemylist=[];
|
||||
for(var i=0;i<glows.length;i++){
|
||||
_status.enemylist.push(glows[i].link);
|
||||
|
@ -3738,7 +4107,13 @@ mode.chess={
|
|||
}
|
||||
else{
|
||||
event.list.randomSort();
|
||||
_status.enemylist=event.list.slice(0,result.links.length);
|
||||
_status.enemylist=event.list.splice(0,_status.mylist.length);
|
||||
if(_status.mode=='combat'&&_status.replacelist){
|
||||
_status.enemyreplacelist=event.list.splice(0,_status.replacelist.length);
|
||||
}
|
||||
}
|
||||
if(_status.mode=='combat'&&get.config('additional_player')){
|
||||
_status.additionallist=event.list;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5144,6 +5519,7 @@ mode.chess={
|
|||
popup:false,
|
||||
filter:function(event,player){
|
||||
if(event.autochoose&&event.autochoose()) return false;
|
||||
if(_status.mode=='combat'&&!get.config('single_control')) return false;
|
||||
return player.isUnderControl();
|
||||
},
|
||||
content:function(){
|
||||
|
@ -5285,6 +5661,19 @@ mode.chess={
|
|||
}
|
||||
},
|
||||
translate:{
|
||||
zhu_config:'启用主将',
|
||||
main_zhu_config:'启用副将',
|
||||
noreplace_end_config:'无替补时结束',
|
||||
reward_config:'杀敌摸牌',
|
||||
punish_config:'杀死队友',
|
||||
seat_order_config:'行动顺序',
|
||||
battle_number_config:'对战人数',
|
||||
replace_number_config:'替补人数',
|
||||
first_less_config:'先手少摸牌',
|
||||
single_control_config:'单人控制',
|
||||
additional_player_config:'无尽模式',
|
||||
choice_number_config:'无尽模式候选',
|
||||
|
||||
friend:'友',
|
||||
enemy:'敌',
|
||||
neutral:'中',
|
||||
|
|
|
@ -348,7 +348,7 @@ mode.guozhan={
|
|||
}
|
||||
else{
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-50);
|
||||
game.changeCoin(-10);
|
||||
}
|
||||
ui.cheat2x=ui.create.groupControl(_status.event.parent.dialogxx);
|
||||
this.backup=_status.event.dialog;
|
||||
|
@ -371,7 +371,7 @@ mode.guozhan={
|
|||
return;
|
||||
}
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-10);
|
||||
game.changeCoin(-3);
|
||||
}
|
||||
event.list=event.list.concat(list);
|
||||
event.list.randomSort();
|
||||
|
|
|
@ -625,7 +625,7 @@ mode.identity={
|
|||
return;
|
||||
}
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-10);
|
||||
game.changeCoin(-3);
|
||||
}
|
||||
if(game.zhu!=game.me){
|
||||
event.list=event.list.concat(list);
|
||||
|
@ -669,7 +669,7 @@ mode.identity={
|
|||
}
|
||||
else{
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-50);
|
||||
game.changeCoin(-10);
|
||||
}
|
||||
ui.cheat2x=ui.create.groupControl(_status.event.parent.dialogxx);
|
||||
this.backup=_status.event.dialog;
|
||||
|
|
|
@ -1228,7 +1228,7 @@ mode.stone={
|
|||
return;
|
||||
}
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-10);
|
||||
game.changeCoin(-3);
|
||||
}
|
||||
list.randomSort();
|
||||
_status.event.dialog.close();
|
||||
|
@ -1266,7 +1266,7 @@ mode.stone={
|
|||
}
|
||||
else{
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-50);
|
||||
game.changeCoin(-10);
|
||||
}
|
||||
ui.cheat2x=ui.create.groupControl(_status.event.parent.dialogxx);
|
||||
this.backup=_status.event.dialog;
|
||||
|
|
|
@ -67,7 +67,7 @@ mode.versus={
|
|||
if(lib.storage.choice==undefined) game.save('choice',20);
|
||||
if(lib.storage.zhu==undefined) game.save('zhu',true);
|
||||
if(lib.storage.noreplace_end==undefined) game.save('noreplace_end',true);
|
||||
if(lib.storage.first_less==undefined) game.save('first_less',true);
|
||||
if(get.config('first_less')==undefined) game.saveConfig('first_less',true,true);
|
||||
if(lib.storage.autoreplaceinnerhtml==undefined) game.save('autoreplaceinnerhtml',true);
|
||||
// if(lib.storage.only_zhu==undefined) game.save('only_zhu',true);
|
||||
if(lib.storage.single_control==undefined) game.save('single_control',true);
|
||||
|
@ -129,10 +129,8 @@ mode.versus={
|
|||
firstAct=game.players[Math.floor(Math.random()*game.players.length)];
|
||||
}
|
||||
}
|
||||
game.gameDraw(firstAct,function(player){
|
||||
if(player==firstAct) return 3;
|
||||
return 4;
|
||||
});
|
||||
game.gameDraw(firstAct,4);
|
||||
_status.first_less=true;
|
||||
_status.round=0;
|
||||
if(lib.storage.single_control){
|
||||
lib.skill.global.push('versus_swap');
|
||||
|
@ -148,11 +146,11 @@ mode.versus={
|
|||
// lib.setPopped(ui.versusreplace,game.versusHoverReplace);
|
||||
if(game.players.length>2){
|
||||
ui.versushs=ui.create.system('手牌',null,true);
|
||||
lib.setPopped(ui.versushs,game.versusHoverHandcards);
|
||||
lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
|
||||
}
|
||||
}
|
||||
_status.friendCount=ui.create.system('友军: '+get.cnNumber(_status.friend.length,true),null,true);
|
||||
_status.enemyCount=ui.create.system('敌军: '+get.cnNumber(_status.friend.length,true),null,true);
|
||||
_status.enemyCount=ui.create.system('杀敌: '+get.cnNumber(0,true),null,true);
|
||||
_status.friendCount=ui.create.system('阵亡: '+get.cnNumber(0,true),null,true);
|
||||
// _status.friendCount=ui.create.system('友方',null,true);
|
||||
// _status.enemyCount=ui.create.system('敌方',null,true);
|
||||
|
||||
|
@ -196,7 +194,7 @@ mode.versus={
|
|||
this.dialog.versus_assign_enemy=this.dialog.add(ui.create.switcher('versus_assign_enemy',lib.storage.assign_enemy)).querySelector('.toggle');
|
||||
this.dialog.versus_single_control=this.dialog.add(ui.create.switcher('versus_single_control',lib.storage.single_control)).querySelector('.toggle');
|
||||
// this.dialog.versus_control_all=this.dialog.add(ui.create.switcher('versus_control_all',lib.storage.control_all)).querySelector('.toggle');
|
||||
this.dialog.versus_first_less=this.dialog.add(ui.create.switcher('versus_first_less',lib.storage.first_less)).querySelector('.toggle');
|
||||
this.dialog.versus_first_less=this.dialog.add(ui.create.switcher('versus_first_less',get.config('first_less'))).querySelector('.toggle');
|
||||
this.dialog.versus_reward=this.dialog.add(ui.create.switcher('versus_reward',[0,1,2,3,4],lib.storage.versus_reward)).querySelector('.toggle');
|
||||
this.dialog.versus_punish=this.dialog.add(ui.create.switcher('versus_punish',['弃牌','无','摸牌'],lib.storage.versus_punish)).querySelector('.toggle');
|
||||
this.dialog.versus_seat_order=this.dialog.add(ui.create.switcher('seat_order',['对阵','交叉','随机'],lib.storage.seat_order)).querySelector('.toggle');
|
||||
|
@ -448,7 +446,7 @@ mode.versus={
|
|||
// dialog.versus_control_all.parentNode.classList.add('disabled');
|
||||
// }
|
||||
// game.save('control_all',dialog.versus_control_all.link);
|
||||
game.save('first_less',dialog.versus_first_less.link);
|
||||
game.saveConfig('first_less',dialog.versus_first_less.link,true);
|
||||
game.save('number',dialog.versus_number.link);
|
||||
game.save('versus_reward',dialog.versus_reward.link);
|
||||
game.save('versus_punish',dialog.versus_punish.link);
|
||||
|
@ -920,7 +918,7 @@ mode.versus={
|
|||
uiintro.add(get.translation(game.players[i]));
|
||||
var cards=game.players[i].get('h');
|
||||
if(cards.length){
|
||||
uiintro.add(cards,true);
|
||||
uiintro.addSmall(cards,true);
|
||||
}
|
||||
else{
|
||||
uiintro.add('(无)');
|
||||
|
@ -1188,11 +1186,11 @@ mode.versus={
|
|||
this.dieSpeak();
|
||||
if(this.side==game.me.side){
|
||||
_status.friendDied.push(this.name);
|
||||
_status.friendCount.innerHTML='友军: '+get.cnNumber(Math.max(0,_status.friend.length-1),true);
|
||||
_status.friendCount.innerHTML='阵亡: '+get.cnNumber(_status.friendDied.length,true);
|
||||
}
|
||||
else{
|
||||
_status.enemyDied.push(this.name);
|
||||
_status.enemyCount.innerHTML='敌军: '+get.cnNumber(Math.max(0,_status.enemy.length-1),true);
|
||||
_status.enemyCount.innerHTML='杀敌: '+get.cnNumber(_status.enemyDied.length,true);
|
||||
}
|
||||
|
||||
var list=(this.side==game.me.side)?_status.friend:_status.enemy;
|
||||
|
|
|
@ -53,10 +53,11 @@ play.character={
|
|||
target.$gain2(card);
|
||||
var skills=lib.character[name][3];
|
||||
var list=[];
|
||||
var targetskills=target.get('s');
|
||||
for(var j=0;j<skills.length;j++){
|
||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
||||
!lib.skill[skills[j]].unique&&
|
||||
!target.skills.contains(skills[j])){
|
||||
!targetskills.contains(skills[j])){
|
||||
list.push(skills[j]);
|
||||
}
|
||||
}
|
||||
|
|
12
play/coin.js
12
play/coin.js
|
@ -117,11 +117,11 @@ play.coin={
|
|||
list:{
|
||||
firework:{
|
||||
name:'烟花',
|
||||
cost:80,
|
||||
cost:50,
|
||||
},
|
||||
snow:{
|
||||
name:'下雪',
|
||||
cost:50,
|
||||
cost:20,
|
||||
size:'large',
|
||||
control:function(){
|
||||
var size=ui.create.div('.menubutton');
|
||||
|
@ -137,11 +137,11 @@ play.coin={
|
|||
},
|
||||
star:{
|
||||
name:'星云',
|
||||
cost:20
|
||||
cost:10
|
||||
},
|
||||
blink:{
|
||||
name:'闪烁',
|
||||
cost:20
|
||||
cost:10
|
||||
}
|
||||
},
|
||||
blink:function(){
|
||||
|
@ -1348,8 +1348,8 @@ play.coin={
|
|||
'富甲天下':'<ul><li>每完成一次对局,可获得一定数量的金币'+
|
||||
'<li>战斗胜利可额外获得20金币,每杀死一个敌人可获得10金币(托管无效)'+
|
||||
'<li>使用的武将越强,获得的金币数越少'+
|
||||
'<li>执行以下操作时,将扣除金币:<ul><li>作弊:20金币<li>换将卡:10金币<li>'+
|
||||
'自由选将:50金币<li>手气卡:10金币<li>换人:20金币</ul>'+
|
||||
'<li>执行以下操作时,将扣除金币:<ul><li>作弊:20金币<li>换将卡:3金币<li>'+
|
||||
'自由选将:10金币<li>手气卡:3金币<li>换人:10金币</ul>'+
|
||||
'<li>金币可用于购买烟花等游戏特效(点击右上角的金币按钮)'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue