asset
|
@ -3783,7 +3783,7 @@ character.yijiang={
|
|||
"step 1"
|
||||
if(result.bool){
|
||||
event.target=result.targets[0];
|
||||
player.logSkill('zhiyan');
|
||||
player.logSkill('zhiyan',result.targets);
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
|
|
|
@ -62,9 +62,6 @@ window.noname_asset_list=[
|
|||
'image/card/jueying.png',
|
||||
'image/card/kongdongyin.png',
|
||||
'image/card/langeguaiyi.png',
|
||||
'image/card/leader_easy.jpg',
|
||||
'image/card/leader_hard.jpg',
|
||||
'image/card/leader_medium.jpg',
|
||||
'image/card/lebu.png',
|
||||
'image/card/lianyaohu.png',
|
||||
'image/card/linghunzhihuo.png',
|
||||
|
@ -220,17 +217,6 @@ window.noname_asset_list=[
|
|||
'image/card/spell_ziyang.jpg',
|
||||
'image/card/spell_zuozhandongyuan.jpg',
|
||||
'image/card/spell_zuzhou.jpg',
|
||||
'image/card/stone_druid.png',
|
||||
'image/card/stone_hunter.png',
|
||||
'image/card/stone_knight.png',
|
||||
'image/card/stone_mage.png',
|
||||
'image/card/stone_paladin.png',
|
||||
'image/card/stone_priest.png',
|
||||
'image/card/stone_rogue.png',
|
||||
'image/card/stone_shaman.png',
|
||||
'image/card/stone_warlock.png',
|
||||
'image/card/stone_warrior.jpg',
|
||||
'image/card/stone_warrior.png',
|
||||
'image/card/suolianjia.png',
|
||||
'image/card/tanshezhiren.png',
|
||||
'image/card/taoyuan.png',
|
||||
|
@ -967,11 +953,26 @@ window.noname_asset_list=[
|
|||
'image/character/zhuzhi.jpg',
|
||||
'image/character/zumao.jpg',
|
||||
'image/character/zuoci.jpg',
|
||||
'image/mode/chess/leader_easy.jpg',
|
||||
'image/mode/chess/leader_hard.jpg',
|
||||
'image/mode/chess/leader_medium.jpg',
|
||||
'image/mode/stone/druid.png',
|
||||
'image/mode/stone/hunter.png',
|
||||
'image/mode/stone/knight.png',
|
||||
'image/mode/stone/mage.png',
|
||||
'image/mode/stone/paladin.png',
|
||||
'image/mode/stone/priest.png',
|
||||
'image/mode/stone/rogue.png',
|
||||
'image/mode/stone/shaman.png',
|
||||
'image/mode/stone/warlock.png',
|
||||
'image/mode/stone/warrior.png',
|
||||
'image/splash/boss.jpg',
|
||||
'image/splash/chess.jpg',
|
||||
'image/splash/guozhan.jpg',
|
||||
'image/splash/identity.jpg',
|
||||
'image/splash/realtime.jpg',
|
||||
'image/splash/stone.jpg',
|
||||
'image/splash/story.jpg',
|
||||
'image/splash/versus.jpg',
|
||||
'image/splash/connect.jpg',
|
||||
'audio/background/music_danji.mp3',
|
||||
|
|
47
game/game.js
|
@ -9740,11 +9740,46 @@
|
|||
node.fixed=true;
|
||||
node.hide();
|
||||
|
||||
var dx,dy;
|
||||
if(game.chess){
|
||||
var rect=this.getBoundingClientRect();
|
||||
|
||||
var dx=rect.left+this.offsetWidth/2-ui.arena.offsetWidth/2;
|
||||
var dy=rect.top+this.offsetHeight/2-ui.arena.offsetHeight/2;
|
||||
if(rect.left<=80){
|
||||
dx=-10;
|
||||
if(rect.top<=80){
|
||||
dy=-10;
|
||||
}
|
||||
else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){
|
||||
dy=10;
|
||||
}
|
||||
else{
|
||||
dy=0;
|
||||
}
|
||||
}
|
||||
else if(rect.left+rect.width+80>=ui.chessContainer.offsetWidth){
|
||||
dx=10;
|
||||
if(rect.top<=80){
|
||||
dy=-10;
|
||||
}
|
||||
else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){
|
||||
dy=10;
|
||||
}
|
||||
else{
|
||||
dy=0;
|
||||
}
|
||||
}
|
||||
else if(rect.top<=80){
|
||||
dx=0;
|
||||
dy=-10;
|
||||
}
|
||||
else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){
|
||||
dx=0;
|
||||
dy=10;
|
||||
}
|
||||
else{
|
||||
dx=rect.left+this.offsetWidth/2-ui.arena.offsetWidth/2;
|
||||
dy=rect.top+this.offsetHeight/2-ui.arena.offsetHeight/2;
|
||||
}
|
||||
|
||||
var coeff=240/Math.sqrt(dx*dx+dy*dy);
|
||||
dx*=coeff;
|
||||
|
@ -9759,8 +9794,8 @@
|
|||
node.style.left='calc(50% - 52px)';
|
||||
node.style.top='calc(50% - 52px)';
|
||||
|
||||
var dx=this.offsetLeft+this.offsetWidth/2-52-node.offsetLeft;
|
||||
var dy=this.offsetTop+this.offsetHeight/2-52-node.offsetTop;
|
||||
dx=this.offsetLeft+this.offsetWidth/2-52-node.offsetLeft;
|
||||
dy=this.offsetTop+this.offsetHeight/2-52-node.offsetTop;
|
||||
}
|
||||
node.style.transitionDuration='0.8s';
|
||||
ui.refresh(node);
|
||||
|
@ -20837,6 +20872,10 @@
|
|||
if(button1.disabled){
|
||||
return;
|
||||
}
|
||||
else if(!game.download){
|
||||
alert('此版本不支持游戏内更新,请手动更新');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
button1.innerHTML='正在检查更新';
|
||||
button1.disabled=true;
|
||||
|
|
|
@ -47,6 +47,7 @@ window.noname_source_list=[
|
|||
'layout/mode/boss.css',
|
||||
'layout/mode/chess.css',
|
||||
'layout/mode/stone.css',
|
||||
'layout/mode/story.css',
|
||||
'layout/newlayout/equip.css',
|
||||
'layout/newlayout/global.css',
|
||||
'layout/newlayout/layout.css',
|
||||
|
@ -55,7 +56,9 @@ window.noname_source_list=[
|
|||
'mode/chess.js',
|
||||
'mode/guozhan.js',
|
||||
'mode/identity.js',
|
||||
'mode/realtime.js',
|
||||
'mode/stone.js',
|
||||
'mode/story.js',
|
||||
'mode/versus.js',
|
||||
'mode/connect.js',
|
||||
'play/character.js',
|
||||
|
|
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
@ -289,42 +289,42 @@
|
|||
}
|
||||
|
||||
div[data-career='mage']{
|
||||
background-image: url('../../../image/card/stone_mage.png');
|
||||
background-image: url('../../../image/mode/stone/mage.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='druid']{
|
||||
background-image: url('../../../image/card/stone_druid.png');
|
||||
background-image: url('../../../image/mode/stone/druid.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='hunter']{
|
||||
background-image: url('../../../image/card/stone_hunter.png');
|
||||
background-image: url('../../../image/mode/stone/hunter.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='shaman']{
|
||||
background-image: url('../../../image/card/stone_shaman.png');
|
||||
background-image: url('../../../image/mode/stone/shaman.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='paladin']{
|
||||
background-image: url('../../../image/card/stone_paladin.png');
|
||||
background-image: url('../../../image/mode/stone/paladin.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='rogue']{
|
||||
background-image: url('../../../image/card/stone_rogue.png');
|
||||
background-image: url('../../../image/mode/stone/rogue.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='priest']{
|
||||
background-image: url('../../../image/card/stone_priest.png');
|
||||
background-image: url('../../../image/mode/stone/priest.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='warrior']{
|
||||
background-image: url('../../../image/card/stone_warrior.png');
|
||||
background-image: url('../../../image/mode/stone/warrior.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='warlock']{
|
||||
background-image: url('../../../image/card/stone_warlock.png');
|
||||
background-image: url('../../../image/mode/stone/warlock.png');
|
||||
background-size:cover;
|
||||
}
|
||||
div[data-career='knight']{
|
||||
background-image: url('../../../image/card/stone_knight.png');
|
||||
background-image: url('../../../image/mode/stone/knight.png');
|
||||
background-size:cover;
|
||||
}
|
||||
|
|
156
mode/chess.js
|
@ -1032,42 +1032,6 @@ mode.chess={
|
|||
|
||||
return this.$gainmod(num);
|
||||
},
|
||||
$drawx:function(num){
|
||||
var cards,node;
|
||||
if(get.itemtype(num)=='cards'){
|
||||
cards=num;
|
||||
num=cards.length;
|
||||
}
|
||||
else if(get.itemtype(num)=='card'){
|
||||
cards=[num];
|
||||
num=1;
|
||||
}
|
||||
if(cards){
|
||||
cards=cards.slice(0);
|
||||
node=cards.shift().copy('drawing','thrown');
|
||||
}
|
||||
else{
|
||||
node=ui.create.div('.card.drawing.thrown');
|
||||
}
|
||||
node.fixed=true;
|
||||
game.$randomMove(this,node,100,30);
|
||||
node.dataset.position=this.dataset.position;
|
||||
this.parentNode.appendChild(node);
|
||||
ui.refresh(node);
|
||||
node.style.transform='';
|
||||
setTimeout(function(){
|
||||
node.remove();
|
||||
},1000);
|
||||
var that=this;
|
||||
if(num&&num>1){
|
||||
if(cards){
|
||||
that.$draw(cards)
|
||||
}
|
||||
else{
|
||||
that.$draw(num-1)
|
||||
}
|
||||
}
|
||||
},
|
||||
$gainmod:function(num){
|
||||
var cards,node;
|
||||
if(get.itemtype(num)=='cards'){
|
||||
|
@ -1086,7 +1050,7 @@ mode.chess={
|
|||
node=ui.create.div('.card.thrown.hidden');
|
||||
}
|
||||
node.fixed=true;
|
||||
game.$randomMove(this,node,100,30);
|
||||
this.$randomMove(node,130,0);
|
||||
var ot=node.style.transform;
|
||||
if(node.style.transform&&node.style.transform!='none'){
|
||||
node.style.transform+=' scale(0.6)';
|
||||
|
@ -1113,7 +1077,7 @@ mode.chess={
|
|||
}
|
||||
}
|
||||
},
|
||||
$throw_old:function(card,time,init){
|
||||
$throw:function(card,time,init){
|
||||
if(init!==false){
|
||||
if(get.itemtype(card)!='cards'){
|
||||
if(get.itemtype(card)=='card'){
|
||||
|
@ -1138,7 +1102,7 @@ mode.chess={
|
|||
this.parentNode.appendChild(node);
|
||||
ui.refresh(node);
|
||||
node.show();
|
||||
game.$randomMove(this,node,100,30);
|
||||
this.$randomMove(node,130,0);
|
||||
if(time!=undefined){
|
||||
node.fixed=true;
|
||||
setTimeout(function(){node.delete()},time);
|
||||
|
@ -1175,7 +1139,7 @@ mode.chess={
|
|||
ui.refresh(node);
|
||||
node.show();
|
||||
|
||||
game.$randomMove(this,node,100,30);
|
||||
this.$randomMove(node,130,0);
|
||||
|
||||
setTimeout(function(){
|
||||
node.removeAttribute('style');
|
||||
|
@ -1215,7 +1179,90 @@ mode.chess={
|
|||
player.offsetLeft+player.offsetWidth/2,
|
||||
player.offsetTop+player.offsetHeight/2
|
||||
],{opacity:0.5,dashed:true},true);
|
||||
}
|
||||
},
|
||||
$randomMove:function(node,length,rand){
|
||||
if(!this.node.chessthrown){
|
||||
this.node.chessthrown=[];
|
||||
}
|
||||
var thrown=this.node.chessthrown;
|
||||
for(var i=0;i<thrown.length;i++){
|
||||
if(thrown[i].parentNode!=this.parentNode||
|
||||
thrown[i].classList.contains('removing')){
|
||||
thrown.splice(i--,1);
|
||||
}
|
||||
}
|
||||
thrown.push(node);
|
||||
|
||||
var rect=this.getBoundingClientRect();
|
||||
var amax,amin;
|
||||
if(rect.left<=80){
|
||||
if(rect.top<=80){
|
||||
amin=-90;
|
||||
amax=0;
|
||||
}
|
||||
else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){
|
||||
amin=0;
|
||||
amax=90;
|
||||
}
|
||||
else{
|
||||
amin=-90;
|
||||
amax=90;
|
||||
}
|
||||
}
|
||||
else if(rect.left+rect.width+80>=ui.chessContainer.offsetWidth){
|
||||
if(rect.top<=80){
|
||||
amin=180;
|
||||
amax=270;
|
||||
}
|
||||
else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){
|
||||
amin=90;
|
||||
amax=180;
|
||||
}
|
||||
else{
|
||||
amin=90;
|
||||
amax=270;
|
||||
}
|
||||
}
|
||||
else if(rect.top<=80){
|
||||
amin=180;
|
||||
amax=360;
|
||||
}
|
||||
else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){
|
||||
amin=0;
|
||||
amax=180;
|
||||
}
|
||||
else{
|
||||
var dx=ui.chessContainer.offsetWidth/2-(rect.left+rect.width/2);
|
||||
var dy=-ui.chessContainer.offsetHeight/2+(rect.top+rect.height/2);
|
||||
var ang=Math.abs(Math.atan(dy/dx))*180/Math.PI;
|
||||
if(dx<0){
|
||||
if(dy>0){
|
||||
ang=180-ang;
|
||||
}
|
||||
else{
|
||||
ang+=180;
|
||||
}
|
||||
}
|
||||
else if(dy<0){
|
||||
ang=360-ang;
|
||||
}
|
||||
amin=ang-180;
|
||||
amax=ang+180;
|
||||
}
|
||||
var da=(amax-amin)/(thrown.length*2);
|
||||
if(da>30&&thrown.length>1){
|
||||
amin+=(da-30)*thrown.length;
|
||||
da=30;
|
||||
}
|
||||
for(var i=0;i<thrown.length;i++){
|
||||
var lengthi=length+Math.random()*rand;
|
||||
var ang=amin+da*(2*i+1);
|
||||
ang*=Math.PI/180;
|
||||
var tx=lengthi*Math.cos(ang);
|
||||
var ty=-lengthi*Math.sin(ang);
|
||||
thrown[i].style.transform='translate('+tx+'px,'+ty+'px)';
|
||||
}
|
||||
},
|
||||
},
|
||||
playerproto:{
|
||||
replaceChessPlayer:function(){
|
||||
|
@ -2213,27 +2260,6 @@ mode.chess={
|
|||
|
||||
return false;
|
||||
},
|
||||
$randomMove:function(player,node,length,rand){
|
||||
length=length+Math.random()*rand;
|
||||
var ang=Math.random()*360;
|
||||
ang*=Math.PI/180;
|
||||
var tx=length*Math.cos(ang);
|
||||
var ty=length*Math.sin(ang);
|
||||
var rect=player.getBoundingClientRect();
|
||||
if(rect.left<=80){
|
||||
tx=Math.abs(tx);
|
||||
}
|
||||
else if(rect.left+rect.width+80>=ui.chessContainer.offsetWidth){
|
||||
tx=-Math.abs(tx);
|
||||
}
|
||||
if(rect.top<=80){
|
||||
ty=Math.abs(ty);
|
||||
}
|
||||
else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){
|
||||
ty=-Math.abs(ty);
|
||||
}
|
||||
node.style.transform='translate('+tx+'px,'+ty+'px)';
|
||||
},
|
||||
draw2:function(func){
|
||||
lib.canvasUpdates2.push(func);
|
||||
if(!lib.status.canvas2){
|
||||
|
@ -6128,19 +6154,19 @@ mode.chess={
|
|||
color:'white',
|
||||
opacity:1,
|
||||
textShadow:'black 0 0 2px',
|
||||
image:'card/leader_easy'
|
||||
image:'mode/chess/leader_easy'
|
||||
},
|
||||
leader_medium:{
|
||||
color:'white',
|
||||
opacity:1,
|
||||
textShadow:'black 0 0 2px',
|
||||
image:'card/leader_medium'
|
||||
image:'mode/chess/leader_medium'
|
||||
},
|
||||
leader_hard:{
|
||||
color:'white',
|
||||
opacity:1,
|
||||
textShadow:'black 0 0 2px',
|
||||
image:'card/leader_hard'
|
||||
image:'mode/chess/leader_hard'
|
||||
}
|
||||
},
|
||||
characterPack:{
|
||||
|
|
|
@ -4,9 +4,7 @@ mode.story={
|
|||
'step 0'
|
||||
game.loadChess();
|
||||
'step 1'
|
||||
game.combat({
|
||||
size:[6,4]
|
||||
});
|
||||
game.loadScene();
|
||||
},
|
||||
game:{
|
||||
minskin:true,
|
||||
|
@ -173,7 +171,6 @@ mode.story={
|
|||
}
|
||||
}
|
||||
ai.get.attitude=result.ai.get.attitude;
|
||||
game.$randomMove=result.game.$randomMove;
|
||||
game.modeSwapPlayer=result.game.modeSwapPlayer;
|
||||
game.isChessNeighbour=result.game.isChessNeighbour;
|
||||
get.chessDistance=result.get.chessDistance;
|
||||
|
@ -266,6 +263,16 @@ mode.story={
|
|||
ui.chessscroll2.addEventListener('mouseenter',chessscroll);
|
||||
ui.chessscroll2.addEventListener('mouseleave',leavescroll);
|
||||
}
|
||||
},
|
||||
loadScene:function(){
|
||||
var next=game.createEvent('loadScene');
|
||||
next.content=function(){
|
||||
'step 0'
|
||||
if(lib.storage.version!=lib.story.version){
|
||||
game.pause();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
element:{
|
||||
|
@ -339,6 +346,9 @@ mode.story={
|
|||
},
|
||||
},
|
||||
posmap:{},
|
||||
story:{
|
||||
version:1
|
||||
},
|
||||
translate:{
|
||||
friend:'友',
|
||||
friend2:'友',
|
||||
|
|