diff --git a/.jshintrc b/.jshintrc
index 3c0151299..00f6aeca8 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,18 +1,42 @@
{
- "camelcase": true,
- "eqeqeq": true,
+ "-W041": false,
"globalstrict": true,
+ "funcscope": true,
"esnext": true,
+ "eqnull": true,
"strict": true,
"newcap": false,
"browser": true,
"unused": true,
"loopfunc": true,
"noyield": true,
- "quotmark": "single",
"devel": true,
"node":true,
+ "asi":true,
+ "evil":true,
+ "expr":true,
+ "shadow":true,
"globals": {
-
+ "player":true,
+ "event":true,
+ "target":true,
+ "targets":true,
+ "num":true,
+ "source":true,
+ "card":true,
+ "cards":true,
+ "result":true,
+ "trigger":true,
+ "mode":true,
+ "character":true,
+ "card":true,
+ "play":true,
+ "lib":true,
+ "game":true,
+ "ui":true,
+ "get":true,
+ "ai":true,
+ "_status":true,
+ "forced":true
}
}
diff --git a/character/diy.js b/character/diy.js
index d11d09536..9d944cc56 100644
--- a/character/diy.js
+++ b/character/diy.js
@@ -4,8 +4,8 @@ character.diy={
// diy_hanlong:['male','wei',4,['siji','ciqiu'],['fullskin']],
diy_feishi:['male','shu',3,['shuaiyan','moshou'],['fullskin']],
diy_liuyan:['male','shu',4,['juedao','geju'],['fullskin']],
- diy_luxun:['male','wu',3,['shaoying','zonghuo'],['fullskin']],
- diy_yuji:['male','qun',3,['diyguhuo','diychanyuan'],['fullskin']],
+ // diy_luxun:['male','wu',3,['shaoying','zonghuo'],['fullskin']],
+ // diy_yuji:['male','qun',3,['diyguhuo','diychanyuan'],['fullskin']],
// diy_zhouyu:['male','wu',3,['jieyan','honglian']],
diy_zhouyu:['male','wu',3,['xiongzi','yaliang'],['fullskin']],
diy_caiwenji:['female','qun',3,['beige','guihan'],['fullskin']],
diff --git a/game/background.js b/game/background.js
index 8599f2164..24320bace 100644
--- a/game/background.js
+++ b/game/background.js
@@ -1,3 +1,4 @@
+'use strict';
(function(){
var temp;
try{
diff --git a/game/config.js b/game/config.js
index 2bb1906d3..870783c62 100644
--- a/game/config.js
+++ b/game/config.js
@@ -8,6 +8,7 @@ window.config={
forbidstone:['zhugedan','pal_xuanxiao'],
forbidchess:['hetaihou','swd_kangnalishi'],
forbiddouble:['zhugedan','swd_kangnalishi','swd_nicole','dongzhuo','jg_simayi'],
+ layoutfixed:['chess','boss'],
all:{
mode:['identity','guozhan','versus','boss','chess','stone'],
characters:['standard','wind','fire','woods','mountain','extra','sp','yijiang','refresh','guozhan','jiange','zhuogui','diy','yxs','swd','xswd','gujian','xianjian'],
diff --git a/game/game.js b/game/game.js
index 04ca89d5b..825f449fc 100644
--- a/game/game.js
+++ b/game/game.js
@@ -132,6 +132,7 @@ window.play={};
init:function(){
lib.config={};
var config2;
+ var config=window.config;
for(var i in config){
lib.config[i]=lib.init.eval(config[i]);
}
@@ -175,7 +176,7 @@ window.play={};
lib.init.js('character',lib.config.all.characters);
lib.init.js('play',lib.config.plays);
ui.css={};
- if(lib.config.mode=='chess'){
+ if(lib.config.layoutfixed.indexOf(lib.config.mode)!==-1){
lib.config.layout='newlayout';
}
ui.css.layout=lib.init.css('layout/'+lib.config.layout,'layout');
@@ -1991,8 +1992,12 @@ window.play={};
if(!game.minskin&&lib.config.layout=='newlayout'&&info[4].contains('fullskin')){
this.classList.remove('minskin');
this.classList.add('fullskin');
- this.node.avatar.style.backgroundImage='url("image/character/fullskin/'+character+'.jpg")';
- this.node.avatar.style.backgroundSize='cover';
+ if(lib.fakeavatar&&lib.fakeavatar[character]){
+ this.node.avatar.setBackground('character/fullskin/'+lib.fakeavatar[character]);
+ }
+ else{
+ this.node.avatar.setBackground('character/fullskin/'+character);
+ }
}
else{
this.node.avatar.setBackground(character,'character');
@@ -2012,7 +2017,6 @@ window.play={};
this.group=info[1];
this.hp=info[2];
this.maxHp=info[2];
- // this.node.identity.style.backgroundColor=get.translation(this.group+'Color');
this.node.intro.innerHTML=lib.config.intro;
if(lib.config.touchscreen){
lib.setLongPress(this,ui.click.intro);
@@ -2036,8 +2040,12 @@ window.play={};
if(lib.config.layout=='newlayout'&&lib.config.only_fullskin){
this.classList.add('fullskin2');
- this.node.avatar2.style.backgroundImage='url("image/character/fullskin/'+character2+'.jpg")';
- this.node.avatar2.style.backgroundSize='cover';
+ if(lib.fakeavatar&&lib.fakeavatar[character2]){
+ this.node.avatar2.setBackground('character/fullskin/'+lib.fakeavatar[character2]);
+ }
+ else{
+ this.node.avatar2.setBackground('character/fullskin/'+character2);
+ }
}
else{
this.node.avatar2.setBackground(character2,'character');
@@ -2128,6 +2136,12 @@ window.play={};
hp.innerHTML=this.hp+'/'+this.maxHp;
hp.classList.add('text');
}
+ else if(lib.config.layout=='newlayout'&&
+ (this.maxHp>9||(this.maxHp>5&&this.classList.contains('minskin')))){
+ hp.innerHTML=this.hp+'
/
'+this.maxHp;
+ hp.classList.add('text');
+ hp.classList.remove('long');
+ }
else{
hp.innerHTML='';
hp.classList.remove('text');
@@ -2145,38 +2159,24 @@ window.play={};
hp.childNodes[i].classList.add('lost');
}
}
- if(this.classList.contains('minskin')){
- if(this.maxHp>5){
- this.node.hp.classList.add('longlong');
- }
- else{
- this.node.hp.classList.remove('longlong');
- }
+ if(this.maxHp==9){
+ hp.classList.add('long');
}
else{
- if(this.maxHp>9){
- this.node.hp.classList.add('longlong');
- }
- else{
- this.node.hp.classList.remove('longlong');
- }
- if(this.maxHp==9||this.maxHp>=17){
- this.node.hp.classList.add('long');
- }
- else{
- this.node.hp.classList.remove('long');
- }
+ hp.classList.remove('long');
}
}
-
- if(this.hp>Math.round(this.maxHp/2)||this.hp===this.maxHp){
- this.node.hp.dataset.condition='high';
+ if(this.hp==0){
+ hp.dataset.condition='';
+ }
+ else if(this.hp>Math.round(this.maxHp/2)||this.hp===this.maxHp){
+ hp.dataset.condition='high';
}
else if(this.hp>Math.floor(this.maxHp/3)){
- this.node.hp.dataset.condition='mid';
+ hp.dataset.condition='mid';
}
else{
- this.node.hp.dataset.condition='low';
+ hp.dataset.condition='low';
}
setTimeout(function(){
@@ -2529,6 +2529,7 @@ window.play={};
chooseToRespond:function(){
var next=game.createEvent('chooseToRespond');
next.player=this;
+ var filter;
for(var i=0;i 0 || evt.wheelDelta < 0){
node.interval=setInterval(function(){
- if(num--&&Math.abs(node.scrollLeft+node.clientWidth-node.scrollWidth)>5){
- node.scrollLeft +=2;
+ if(num--&&Math.abs(node.scrollLeft+node.clientWidth-node.scrollWidth)>0){
+ node.scrollLeft +=speed;
}
else{
clearInterval(node.interval);
}
- },1);
+ },16);
}
else{
node.interval=setInterval(function(){
if(num--&&node.scrollLeft>0){
- node.scrollLeft -=2;
+ node.scrollLeft -=speed;
}
else{
clearInterval(node.interval);
}
- },1);
+ },16);
}
},
touchStart:function(e){
@@ -10062,17 +10107,17 @@ window.play={};
if(num<0||num>99) return num;
if(num<=10){
switch(num){
- case 0:return '〇';break;
- case 1:return '一';break;
- case 2:return two?'二':'两';break;
- case 3:return '三';break;
- case 4:return '四';break;
- case 5:return '五';break;
- case 6:return '六';break;
- case 7:return '七';break;
- case 8:return '八';break;
- case 9:return '九';break;
- case 10:return '十';break;
+ case 0:return '〇';
+ case 1:return '一';
+ case 2:return two?'二':'两';
+ case 3:return '三';
+ case 4:return '四';
+ case 5:return '五';
+ case 6:return '六';
+ case 7:return '七';
+ case 8:return '八';
+ case 9:return '九';
+ case 10:return '十';
}
}
if(num<20){
@@ -10349,38 +10394,31 @@ window.play={};
if(content>0){
return '共有'+content+'个标记';
}
- else{
- return false;
- }
+ return false;
}
case 'turn':{
if(content>0){
return '还剩'+content+'个回合';
}
- else{
- return false;
- }
+ return false;
}
case 'time':{
if(content>0){
return '还剩'+content+'次';
}
- else{
- return false;
- }
+ return false;
}
case 'limited':{
if(content){
return '已发动';
}
- else{
- return '未发动';
- }
+ return '未发动';
}
case 'cardCount':{
if(typeof content=='object'&&typeof content.length=='number'){
return '共有'+get.cnNumber(content.length)+'张牌';
}
+ return false;
}
case 'card':case 'cards':{
if(get.itemtype(content)=='card'){
@@ -10393,16 +10431,13 @@ window.play={};
else{
dialog.add(content);
}
- return false;
}
else{
if(content&&content.length){
return get.translation(content);
}
- else{
- return false;
- }
}
+ return false;
}
case 'player':case 'players':{
if(get.itemtype(content)=='player'){
@@ -10421,9 +10456,7 @@ window.play={};
if(content&&content.length){
return get.translation(content);
}
- else{
- return false;
- }
+ return false;
}
}
default:{
diff --git a/image/character/fullskin/boss_caiwenji.jpg b/image/character/fullskin/boss_caiwenji.jpg
new file mode 100644
index 000000000..0cd5ca421
Binary files /dev/null and b/image/character/fullskin/boss_caiwenji.jpg differ
diff --git a/image/character/fullskin/boss_diaochan.jpg b/image/character/fullskin/boss_diaochan.jpg
new file mode 100644
index 000000000..2b0e7cac7
Binary files /dev/null and b/image/character/fullskin/boss_diaochan.jpg differ
diff --git a/image/character/fullskin/boss_dongzhuo.jpg b/image/character/fullskin/boss_dongzhuo.jpg
new file mode 100644
index 000000000..96294821c
Binary files /dev/null and b/image/character/fullskin/boss_dongzhuo.jpg differ
diff --git a/image/character/fullskin/boss_huangyueying.jpg b/image/character/fullskin/boss_huangyueying.jpg
new file mode 100644
index 000000000..b3204174d
Binary files /dev/null and b/image/character/fullskin/boss_huangyueying.jpg differ
diff --git a/image/character/fullskin/boss_huatuo.jpg b/image/character/fullskin/boss_huatuo.jpg
new file mode 100644
index 000000000..47db7dfe3
Binary files /dev/null and b/image/character/fullskin/boss_huatuo.jpg differ
diff --git a/image/character/fullskin/boss_liubei.jpg b/image/character/fullskin/boss_liubei.jpg
new file mode 100644
index 000000000..a77fd2797
Binary files /dev/null and b/image/character/fullskin/boss_liubei.jpg differ
diff --git a/image/character/fullskin/diy_luxun.jpg b/image/character/fullskin/boss_luxun.jpg
similarity index 100%
rename from image/character/fullskin/diy_luxun.jpg
rename to image/character/fullskin/boss_luxun.jpg
diff --git a/image/character/fullskin/boss_lvbu1.jpg b/image/character/fullskin/boss_lvbu1.jpg
new file mode 100644
index 000000000..81b7955cc
Binary files /dev/null and b/image/character/fullskin/boss_lvbu1.jpg differ
diff --git a/image/character/fullskin/boss_lvbu2.jpg b/image/character/fullskin/boss_lvbu2.jpg
new file mode 100644
index 000000000..e3e988cf6
Binary files /dev/null and b/image/character/fullskin/boss_lvbu2.jpg differ
diff --git a/image/character/fullskin/boss_pangtong.jpg b/image/character/fullskin/boss_pangtong.jpg
new file mode 100644
index 000000000..cca531303
Binary files /dev/null and b/image/character/fullskin/boss_pangtong.jpg differ
diff --git a/image/character/fullskin/boss_satan.jpg b/image/character/fullskin/boss_satan.jpg
new file mode 100644
index 000000000..1eafd57fe
Binary files /dev/null and b/image/character/fullskin/boss_satan.jpg differ
diff --git a/image/character/fullskin/boss_shuijing.jpg b/image/character/fullskin/boss_shuijing.jpg
new file mode 100644
index 000000000..5a3b21f15
Binary files /dev/null and b/image/character/fullskin/boss_shuijing.jpg differ
diff --git a/image/character/fullskin/boss_sunshangxiang.jpg b/image/character/fullskin/boss_sunshangxiang.jpg
new file mode 100644
index 000000000..c80ff78d7
Binary files /dev/null and b/image/character/fullskin/boss_sunshangxiang.jpg differ
diff --git a/image/character/fullskin/boss_yuji.jpg b/image/character/fullskin/boss_yuji.jpg
new file mode 100644
index 000000000..67d3c4298
Binary files /dev/null and b/image/character/fullskin/boss_yuji.jpg differ
diff --git a/image/character/fullskin/boss_zhangchunhua.jpg b/image/character/fullskin/boss_zhangchunhua.jpg
new file mode 100644
index 000000000..22cc63558
Binary files /dev/null and b/image/character/fullskin/boss_zhangchunhua.jpg differ
diff --git a/image/character/fullskin/boss_zhangjiao.jpg b/image/character/fullskin/boss_zhangjiao.jpg
new file mode 100644
index 000000000..7f9e3a966
Binary files /dev/null and b/image/character/fullskin/boss_zhangjiao.jpg differ
diff --git a/image/character/fullskin/boss_zhenji.jpg b/image/character/fullskin/boss_zhenji.jpg
new file mode 100644
index 000000000..8a6e73b48
Binary files /dev/null and b/image/character/fullskin/boss_zhenji.jpg differ
diff --git a/image/character/fullskin/boss_zhouyu.jpg b/image/character/fullskin/boss_zhouyu.jpg
new file mode 100644
index 000000000..5318a8afe
Binary files /dev/null and b/image/character/fullskin/boss_zhouyu.jpg differ
diff --git a/image/character/fullskin/boss_zhugeliang.jpg b/image/character/fullskin/boss_zhugeliang.jpg
new file mode 100644
index 000000000..88df56da3
Binary files /dev/null and b/image/character/fullskin/boss_zhugeliang.jpg differ
diff --git a/image/character/fullskin/boss_zuoci.jpg b/image/character/fullskin/boss_zuoci.jpg
new file mode 100644
index 000000000..eae0e226d
Binary files /dev/null and b/image/character/fullskin/boss_zuoci.jpg differ
diff --git a/layout/default/layout.css b/layout/default/layout.css
index 08a79d219..4cc47c1d2 100644
--- a/layout/default/layout.css
+++ b/layout/default/layout.css
@@ -259,6 +259,17 @@ margin-bottom: 5px;
border: 1px solid rgba(39, 79, 7, 1);
-webkit-filter: grayscale(1);
}
+.hp.text[data-condition="low"]{
+ text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 10px
+}
+.hp.text[data-condition="mid"]{
+ text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 10px
+}
+.hp.text[data-condition="high"]{
+ text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 10px
+}
+
+
/*.hp>div{width: 6px;height: 6px;margin-left: 3px;position: relative;}*/
@@ -465,6 +476,11 @@ div:hover>.intro{opacity: 1;}
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px;
border-radius:4px;
}
+.shadowed{
+ background: rgba(0,0,0,0.2);
+ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px;
+ border-radius:8px;
+}
.underline,.underlinenode{
padding:3px;
width:auto;
@@ -674,6 +690,31 @@ div[data-nature='soil']{
top:59px;
}
+
+.player.selectable{
+ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 15px;
+}
+.selected{
+ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(255, 0, 0, 0.8) 0 0 15px !important;
+}
+.glow{
+ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 15px !important;
+}
+.glow2{
+ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;
+}
+
+.control.blue{
+ background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
+}
+.control.red{
+ background-image: linear-gradient(rgba(150, 47, 47, 1), rgba(132, 43, 43, 1));
+}
+.control.red,.control.blue{
+ color:white;
+ text-shadow:black 0 0 2px;
+}
+
/*--------动画--------*/
@-webkit-keyframes cardflip{
from {-webkit-transform:perspective(600px) rotateY(-90deg) translateX(52px)}
diff --git a/layout/mode/boss.css b/layout/mode/boss.css
index e69de29bb..f436dcf7d 100644
--- a/layout/mode/boss.css
+++ b/layout/mode/boss.css
@@ -0,0 +1,65 @@
+#bosslist{
+ width:100%;
+ height:calc(50% + 200px);
+ text-align:center;
+ top:calc(50% - 200px);
+ white-space:nowrap;
+ z-index:1;
+}
+#bosslist.scroll{
+ overflow-x:scroll;
+}
+.bosspaused>#bosslist,
+.bosspaused>#control{
+ opacity:0.2 !important;
+}
+#bosslist>.player.bossshow{
+ opacity:1;
+ -webkit-animation:boss_start 0.5s;
+ -webkit-transform:none;
+}
+#bosslist>.player{
+ position:relative;
+ margin:10px;
+ left:0;
+ top:0;
+ width:180px;
+ height:216px;
+ opacity: 0;
+ transition: all 0.3s;
+ -webkit-transform:translateY(-200px);
+}
+#bosslist>.player:hover{
+ -webkit-transform:scale(1.1);
+}
+#bosslist>div:first-child,
+#bosslist>div:last-child{
+ width:20px;
+ position:relative;
+}
+#bosslist>.player>div:not(.hp):not(.identity):not(.avatar){
+ display:none !important;
+}
+#bosslist>.player>.identity{
+ left:16px;
+ top:20px;
+ line-height:24px;
+ white-space:normal;
+}
+#bosslist>.player>.hp{
+ top:22px;
+ left:144px;
+}
+#bosslist>.player>.avatar{
+ width:156px;
+ height:192px;
+}
+
+#control.bosslist{
+ top:calc(50% + 100px);
+}
+#control.bosslist>div{
+ transition:opacity 0.5s;
+}
+
+@-webkit-keyframes boss_start{from {opacity: 0;-webkit-transform:translateY(-200px);}}
diff --git a/layout/mode/chess.css b/layout/mode/chess.css
index fcc42adcd..9c9bda42f 100644
--- a/layout/mode/chess.css
+++ b/layout/mode/chess.css
@@ -87,6 +87,14 @@
margin-left: 4px;
margin-right: 4px;
margin-bottom: 8px;
+ transition:box-shadow 0.5s;
+}
+
+.fakeme.player>.selectable{
+ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 1) 0 0 5px, rgba(0, 133, 255, 1) 0 0 10px;
+}
+.fakeme.player>.selected{
+ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(255, 0, 0, 1) 0 0 5px, rgba(255, 0, 0, 1) 0 0 10px !important;
}
.fakeme.player>.dead{
-webkit-filter:grayscale(1);
diff --git a/layout/newlayout/layout.css b/layout/newlayout/layout.css
index 0c4e74682..867a06224 100644
--- a/layout/newlayout/layout.css
+++ b/layout/newlayout/layout.css
@@ -19,6 +19,9 @@
.player.minskin .hp{
left:86px;
}
+.player.minskin .hp.text{
+ left:86px;
+}
.player.minskin .hp.longlong{
left:74px;
}
@@ -217,6 +220,13 @@
z-index:3;
-webkit-transform:rotate(180deg);
}
+.player .hp.text{
+ font-family:'huangcao';
+ font-size:22px;
+ -webkit-transform:none;
+ transition:all 0s;
+ left:114px;
+}
.player .hp.long{
bottom:12px;
max-height:156px;
diff --git a/mode/boss.js b/mode/boss.js
index 080562fe7..7b4691f60 100644
--- a/mode/boss.js
+++ b/mode/boss.js
@@ -1,26 +1,140 @@
'use strict';
mode.boss={
game:{
+ reserveDead:true,
start:function(){
var next=game.createEvent('game',false);
next.content=function(){
"step 0"
- lib.init.css('layout/mode','boss')
+ for(var i in lib.skill){
+ if(lib.skill[i].changeSeat){
+ lib.skill[i]={};
+ if(lib.translate[i+'_info']){
+ lib.translate[i+'_info']='此模式下不可用';
+ }
+ }
+ }
+ lib.init.css('layout/mode','boss');
+ var bosslist=ui.create.div('#bosslist');
+ if(!lib.config.touchscreen&&lib.config.mousewheel){
+ bosslist._scrollspeed=30;
+ bosslist._scrollnum=10;
+ bosslist.onmousewheel=ui.click.mousewheel;
+ }
+ var bosslistlinks={};
+ var toggleBoss=function(bool){
+ game.saveConfig(this.name,bool,true);
+ var node=bosslistlinks[this.name];
+ if(bool){
+ node.style.display='';
+ }
+ else{
+ node.style.display='none';
+ }
+ };
+ var onpause=function(){
+ ui.window.classList.add('bosspaused');
+ }
+ var onresume=function(){
+ ui.window.classList.remove('bosspaused');
+ }
+ game.onpause=onpause;
+ game.onpause2=onpause;
+ game.onresume=onresume;
+ game.onresume2=onresume;
+ ui.create.div(bosslist);
+
+ var list=[];
+ for(var i in lib.character){
+ var info=lib.character[i];
+ if(info[4].contains('boss')){
+ var cfg=i+'_bossconfig';
+ if(get.config(cfg)==undefined){
+ game.saveConfig(cfg,true,true);
+ }
+ lib.translate[cfg+'_config']=lib.translate[i];
+ lib.config.current_mode.push([cfg,get.config(cfg),toggleBoss]);
+ var player=ui.create.player(bosslist).init(i);
+ list.push(player);
+ player.node.hp.classList.add('text');
+ player.node.hp.dataset.condition='';
+ player.node.hp.innerHTML=info[2];
+ player.setIdentity(player.name);
+ player.node.identity.dataset.color=info[5];
+ bosslistlinks[cfg]=player;
+
+ if(!get.config(cfg)){
+ player.style.display='none';
+ }
+ }
+ }
+ ui.create.div(bosslist);
+ lib.translate.boss_pangtong='涅槃凤雏';
ui.create.arena();
- var dialog=ui.create.dialog('还没完工~');
- dialog.style.height='52px';
- dialog.style.background=' rgba(0,0,0,0.2)';
- dialog.style.boxShadow=' rgba(0, 0, 0, 0.3) 0 0 0 1px';
- dialog.style.borderRadius='8px';
- dialog.style.top='calc(50% - 52px)';
+ var time=(ui.window.offsetWidth-30)/200;
+ ui.window.appendChild(ui.control);
+ ui.control.classList.add('bosslist');
+
+ ui.window.appendChild(bosslist);
+ var interval=setInterval(function(){
+ if(list.length){
+ list.shift().classList.add('bossshow');
+ }
+ else{
+ clearInterval(interval);
+ }
+ },500/time);
+ setTimeout(function(){
+ bosslist.classList.add('scroll');
+ },1000);
+ setTimeout(function(){
+ var control=ui.create.control('快速开始',function(){
+ control.hide();
+ bosslist.delete();
+ });
+ },500);
game.pause();
- "step 1"
- console.log(1);
}
}
},
character:{
- boss_zuiqiangshenhua:['male','qun',8,['mashu','wushuang','baonu'],['boss']],
- boss_baonuzhanshen:['male','qun',4,['mashu','wushuang','xiuluo','shenwei','shenji'],['boss']],
+ boss_zhangchunhua:['female','shu',4,[],['fullskin','boss'],'wei'],
+ boss_zhenji:['female','shu',4,[],['fullskin','boss'],'wei'],
+ boss_liubei:['male','shu',4,[],['fullskin','boss'],'qun'],
+ boss_zhugeliang:['male','shu',4,[],['fullskin','boss'],'qun'],
+ boss_huangyueying:['female','shu',4,[],['fullskin','boss'],'wei'],
+ boss_pangtong:['male','shu',4,[],['fullskin','boss'],'zhu'],
+ boss_zhouyu:['male','wu',4,[],['fullskin','boss'],'zhu'],
+ boss_lvbu1:['male','qun',8,['mashu','wushuang','baonu'],['fullskin','boss'],'wei'],
+ boss_lvbu2:['male','qun',4,['mashu','wushuang','xiuluo','shenwei','shenji'],['fullskin','hiddenboss'],'qun'],
+ boss_caiwenji:['female','qun',8,[],['fullskin','boss'],'wei'],
+ boss_zhangjiao:['male','qun',8,[],['fullskin','boss'],'shu'],
+ boss_zuoci:['male','qun',8,[],['fullskin','boss'],'shu'],
+ boss_yuji:['male','qun',8,[],['fullskin','boss'],'nei'],
+ boss_diaochan:['male','qun',8,[],['fullskin','boss'],'qun'],
+ boss_huatuo:['male','qun',8,[],['fullskin','boss'],'wu'],
+ boss_dongzhuo:['male','qun',8,[],['fullskin','boss'],'shu'],
+ boss_shuijing:['male','qun',8,[],['fullskin','boss'],'wei'],
},
+ translate:{
+ boss_shuijing:'水镜先生',
+ boss_huangyueying:'奇智女杰',
+ boss_zhangchunhua:'冷血皇后',
+ boss_satan:'堕落天使',
+ boss_dongzhuo:'乱世魔王',
+ boss_lvbu1:'最强神话',
+ boss_lvbu2:'暴怒战神',
+ boss_zhouyu:'赤壁火神',
+ boss_pangtong:'涅盘凤雏',
+ boss_zhugeliang:'祭风卧龙',
+ boss_zhangjiao:'天公将军',
+ boss_zuoci:'迷之仙人',
+ boss_yuji:'琅琊道士',
+ boss_liubei:'昭烈皇帝',
+ boss_caiwenji:'异乡孤女',
+ boss_huatuo:'药坛圣手',
+ boss_luxun:'蹁跹君子',
+ boss_zhenji:'洛水仙子',
+ boss_diaochan:'绝代妖姬',
+ }
}
diff --git a/mode/chess.js b/mode/chess.js
index acd61db40..d0d2bd16d 100644
--- a/mode/chess.js
+++ b/mode/chess.js
@@ -433,7 +433,6 @@ mode.chess={
if(targets.length==0){
if(randomMove.length){
var list=randomMove.slice(0);
- var randomMoved=false;
while(list.length){
var thismove=list.randomRemove();
if(player[thismove]()){
@@ -594,7 +593,7 @@ mode.chess={
var next=game.createEvent('game',false);
next.content=function(){
"step 0"
- for(i in lib.skill){
+ for(var i in lib.skill){
if(lib.skill[i].changeSeat){
lib.skill[i]={};
if(lib.translate[i+'_info']){
@@ -647,10 +646,10 @@ mode.chess={
}
this._chessdrag=[e,this.parentNode.scrollLeft,this.parentNode.scrollTop];
});
- ui.chess.addEventListener('mouseleave',function(e){
+ ui.chess.addEventListener('mouseleave',function(){
this._chessdrag=null;
});
- ui.chess.addEventListener('mouseup',function(e){
+ ui.chess.addEventListener('mouseup',function(){
if(this._chessdrag){
this._chessdrag=null;
}
@@ -662,7 +661,7 @@ mode.chess={
}
e.preventDefault();
});
- ui.chessContainer.addEventListener('mousewheel',function(e){
+ ui.chessContainer.addEventListener('mousewheel',function(){
if(_status.currentChessFocus){
clearInterval(_status.currentChessFocus);
delete _status.currentChessFocus;
@@ -742,7 +741,7 @@ mode.chess={
lib.posmap[enemy.dataset.position]=enemy;
}
- lib.setPopped(ui.create.system('查看手牌',null,true),function(e){
+ lib.setPopped(ui.create.system('查看手牌',null,true),function(){
var uiintro=ui.create.dialog('hidden');
for(var i=0;i1) return 0;
+ if(situation>1) return 0;
return Math.min(3,get.population('fan'));
case 'fan': return -4;
}
+ break;
case 'zhong':
switch(identity2){
case 'zhu': return 10;
case 'zhong': return get.population('fan')>0?4:-1;
case 'nei':
if(get.population('fan')==0) return -2;
- return Math.min(3,-ai.get.situation());
+ return Math.min(3,-situation);
case 'fan': return -8;
}
+ break;
case 'nei':
if(identity2=='zhu'&&game.players.length==2) return -10;
var strategy=get.aiStrategy();
@@ -601,16 +603,16 @@ mode.identity={
if(strategy==6) return -1;
if(strategy==5) return 10;
if(to.hp<=0) return 10;
- if(ai.get.situation()>1) num=0;
+ if(situation>1) num=0;
else num=get.population('fan')+Math.max(0,3-game.zhu.hp);
if(strategy==2) num--;
if(strategy==3) num++;
return num;
case 'zhong':
- if(strategy==5) return Math.min(0,-ai.get.situation());
- if(strategy==6) return Math.max(-1,-ai.get.situation());
+ if(strategy==5) return Math.min(0,-situation);
+ if(strategy==6) return Math.max(-1,-situation);
if(get.population('fan')==0) num=-5;
- else if(ai.get.situation()<=0) num=0;
+ else if(situation<=0) num=0;
else if(game.zhu&&game.zhu.hp<2) num=0;
else if(game.zhu&&game.zhu.hp==2) num=-0.5
else num=-2;
@@ -622,27 +624,28 @@ mode.identity={
if(from.ai.friend.contains(to)) return 5;
return -1;
case 'fan':
- if(strategy==5) return Math.max(-1,ai.get.situation());
- if(strategy==6) return Math.min(0,ai.get.situation());
- if((game.zhu&&game.zhu.hp<=2&&ai.get.situation()<=0)||ai.get.situation()<-1) num=-3;
- else if(ai.get.situation()<0||get.population('zhong')==0) num=-2;
- else if((game.zhu&&game.zhu.hp>4&&ai.get.situation()>0)||ai.get.situation()>1) num=1;
+ if(strategy==5) return Math.max(-1,situation);
+ if(strategy==6) return Math.min(0,situation);
+ if((game.zhu&&game.zhu.hp<=2&&situation<=0)||situation<-1) num=-3;
+ else if(situation<0||get.population('zhong')==0) num=-2;
+ else if((game.zhu&&game.zhu.hp>4&&situation>0)||situation>1) num=1;
else num=0;
if(strategy==2) num++;
if(strategy==3) num--;
return num;
}
+ break;
case 'fan':
switch(identity2){
case 'zhu':
- if(ai.get.situation()==1) return -6;
- if(ai.get.situation()>1) return -5;
+ if(situation==1) return -6;
+ if(situation>1) return -5;
return -10;
case 'zhong': return -7;
case 'nei':
if(get.population('zhong')==0) return -7;
if(game.zhu&&game.zhu.hp<=2) return -1;
- return Math.min(3,ai.get.situation());
+ return Math.min(3,situation);
case 'fan': return 5;
}
}
diff --git a/mode/stone.js b/mode/stone.js
index 2afecb2cd..84dafcd0e 100644
--- a/mode/stone.js
+++ b/mode/stone.js
@@ -1064,7 +1064,7 @@ mode.stone={
event.chooser.chooseTarget('魏兵:弃置对方一名随从的所有牌',function(card,playerx,target){
return player.side!=target.side&&target.isMin()&&target.num('he')>0;
}).ai=function(target){
- return 1;
+ return target.num('he');
};
player.line(event.chooser);
"step 1"
diff --git a/mode/versus.js b/mode/versus.js
index 3f26af85a..0d4bf5ced 100644
--- a/mode/versus.js
+++ b/mode/versus.js
@@ -1,3 +1,4 @@
+'use strict';
mode.versus={
game:{
start:function(){
@@ -585,7 +586,6 @@ mode.versus={
},
versusCheckHandcards:function(){
_status.clicked=true;
- var i,translation,intro,str;
if(ui.intro){
ui.intro.close();
if(ui.intro.source=='versusCheckHandcards'){
@@ -626,7 +626,7 @@ mode.versus={
}
}
},
- versusHoverEnemy:function(e){
+ versusHoverEnemy:function(){
var uiintro=ui.create.dialog('hidden');
if(_status.enemyDied.length){
@@ -644,7 +644,7 @@ mode.versus={
return uiintro;
},
- versusHoverFriend:function(e){
+ versusHoverFriend:function(){
var uiintro=ui.create.dialog('hidden');
if(_status.friendDied.length){
@@ -662,7 +662,7 @@ mode.versus={
return uiintro;
},
- versusHoverReplace:function(e){
+ versusHoverReplace:function(){
var uiintro=ui.create.dialog('hidden');
uiintro.add(ui.autoreplace);
@@ -680,7 +680,7 @@ mode.versus={
return uiintro;
},
- versusHoverHandcards:function(e){
+ versusHoverHandcards:function(){
var uiintro=ui.create.dialog('hidden');
for(var i=0;idiv>div,.popup,.dialog>.bar{
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 2px 10px;
}
-.player.selectable{
- box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 15px;
-}
-.glow{
- box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 15px !important;
-}
-.glow2{
- box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;
-}
-.selected{
- box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(255, 0, 0, 0.8) 0 0 15px !important;
-}
.card{
text-shadow:rgba(0,0,0,0.1) 0 0 1px;
}