diff --git a/card/gwent.js b/card/gwent.js index 04931f31a..44de20ff1 100644 --- a/card/gwent.js +++ b/card/gwent.js @@ -1518,7 +1518,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return target.isDamaged(); }, content:function(){ + 'step 0' target.loseMaxHp(true); + 'step 1' + if(target.isDamaged()&&target.countCards('h')0){ + player.chooseBool('是否再次发动【筹策】?'); + } + else{ + event.finish(); + } + 'step 5' + if(result.bool){ + event.goto(1); + } }, ai:{ maixie:true, diff --git a/character/standard.js b/character/standard.js index 1a9b6bc65..6d7d5b26f 100644 --- a/character/standard.js +++ b/character/standard.js @@ -430,7 +430,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.judge>0){ event.cards.push(result.card); if(lib.config.autoskilllist.contains('luoshen')){ - player.chooseBool('是否再次发动?'); + player.chooseBool('是否再次发动【洛神】?'); } else{ event._result={bool:true}; diff --git a/character/swd.js b/character/swd.js index bb8b1fdbd..205892d9d 100644 --- a/character/swd.js +++ b/character/swd.js @@ -5825,7 +5825,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } else if(lib.config.autoskilllist.contains('lqingcheng')){ - player.chooseBool('是否再次发动?'); + player.chooseBool('是否再次发动【倾城】?'); } else{ event._result={bool:true}; diff --git a/game/game.js b/game/game.js index 2d4af30da..2888973ff 100644 --- a/game/game.js +++ b/game/game.js @@ -22900,13 +22900,20 @@ if(pos){ game.addObstacle(pos[0],pos[1]); } - else{ - console.log(pos) - } }, removeObstacle:function(pos){ game.removeObstacle(pos); }, + moveObstacle:function(pos){ + if(pos){ + game.moveObstacle(pos[0],pos[1],pos[2]); + } + }, + colorObstacle:function(pos){ + if(pos){ + game.colorObstacle(pos[0],pos[1]); + } + }, moveTox:function(player,pos){ if(player&&player.dataset){ delete lib.posmap[player.dataset.position]; diff --git a/game/update.js b/game/update.js index 71f19bc20..efd183c08 100644 --- a/game/update.js +++ b/game/update.js @@ -1,8 +1,9 @@ window.noname_update={ - version:'1.9.37', - // update:'1.9.36.1', + version:'1.9.37.1', + update:'1.9.37', changeLog:[ '神武再世', + 'bug修复' ], files:[ 'game/game.js', @@ -13,26 +14,27 @@ window.noname_update={ // 'game/asset.js', // 'card/*', // 'card/standard.js', - // 'card/gwent.js', + 'card/gwent.js', // 'card/gujian.js', // 'character/*', // 'character/hearth.js', // 'character/old.js', - // 'character/gwent.js', - // 'character/sp.js', - // 'character/swd.js', + 'character/standard.js', + 'character/sp.js', + 'character/swd.js', // 'character/rank.js', // 'character/yijiang.js', // 'character/xianjian.js', // 'mode/identity.js', + 'mode/boss.js', // 'mode/guozhan.js', // 'mode/versus.js', // 'mode/connect.js', - // 'mode/chess.js', - // 'mode/tafang.js', + 'mode/chess.js', + 'mode/tafang.js', // 'mode/guozhan.js', // 'mode/stone.js', - // 'theme/music/style.css', + 'theme/music/style.css', // 'theme/woodden/style.css', // 'theme/simple/style.css', // 'layout/default/layout.css', @@ -43,7 +45,7 @@ window.noname_update={ // 'layout/long2/layout.css', // 'layout/mobile/layout.css', // 'layout/newlayout/global.css', - // 'layout/mode/chess.css', + 'layout/mode/chess.css', // 'extension/boss/extension.js', ] } diff --git a/layout/mode/chess.css b/layout/mode/chess.css index 3dcedf8a3..2b504da5b 100644 --- a/layout/mode/chess.css +++ b/layout/mode/chess.css @@ -212,6 +212,17 @@ rgba(0,0,0,0.1) 20px ); } +#window .player.obstacle[data-obscolor='blue']{ + background: repeating-linear-gradient( + 135deg, + rgba(0, 64, 162, 0.4), + rgba(0, 64, 162, 0.4) 10px, + rgba(0, 0, 0, 0) 10px, + rgba(0, 0, 0, 0) 20px + ); + box-shadow: rgba(0, 64, 162, 0.6) 0 0 0 1px; +} + .playergrid.temp{ opacity:0.3; } diff --git a/mode/boss.js b/mode/boss.js index a7c8c5f4e..38a9da3b7 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -486,7 +486,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ modTarget:true, content:function(){ var num=Math.min(5,target.maxHp); - if(target.identity=='shen'){ + if(target.group=='shen'){ target.draw(num); } else{ @@ -505,7 +505,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ result:{ target:function(player,target){ var num=Math.min(5,target.maxHp); - if(target.identity=='shen'){ + if(target.group=='shen'){ return Math.sqrt(num); } else{ @@ -1792,6 +1792,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ popup:false, content:function(){ player.recover(); + player.removeSkill('xiuluolianyuji2'); } }, xiuluolianyuji:{ diff --git a/mode/chess.js b/mode/chess.js index ed41fb029..a4e98b651 100644 --- a/mode/chess.js +++ b/mode/chess.js @@ -46,7 +46,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } if(get.config('chess_card')){ - lib.card.list=lib.card.list.concat(lib.chess_cardlist); + lib.card.list.addArray(lib.chess_cardlist); } ui.create.cardsAsync(); game.finishCards(); @@ -1581,9 +1581,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ grid.listen(ui.click.obstacle); lib.posmap[pos]=grid; game.obstacles.push(grid); + return grid; } + return null; }, + addTempObstacle:function(x,y,num){ + var node=game.addObstacle(x,y); + if(node){ + game.colorObstacle(node,'blue'); + node.tempObstacle=num; + } + }, removeObstacle:function(pos){ + if(get.is.div(pos)){ + pos=pos.dataset.position; + } var node=lib.posmap[pos]; if(node&&game.obstacles.contains(node)){ game.addVideo('removeObstacle',null,pos); @@ -1592,6 +1604,48 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ node.delete(); } }, + moveObstacle:function(pos,x,y){ + if(get.is.div(pos)){ + pos=pos.dataset.position; + } + var node=lib.posmap[pos]; + if(node&&game.obstacles.contains(node)){ + pos=parseInt(pos); + var x2=pos%ui.chesswidth+x; + var y2=Math.floor(pos/ui.chesswidth)+y; + if(x2>=ui.chesswidth){ + x2=ui.chesswidth-1; + } + if(y2>=ui.chessheight){ + y2=ui.chessheight-1; + } + if(x2<0){ + x2=0; + } + if(y2<0){ + y2=0; + } + var pos2=y2*ui.chesswidth+x2; + if(!lib.posmap[pos2]){ + game.addVideo('moveObstacle',null,[pos,x,y]); + node.dataset.position=pos2; + delete lib.posmap[pos]; + lib.posmap[pos2]=node; + return true; + } + } + return false; + }, + colorObstacle:function(pos,color){ + if(get.is.div(pos)){ + pos=pos.dataset.position; + } + var node=lib.posmap[pos]; + if(node&&game.obstacles.contains(node)){ + game.addVideo('colorObstacle',null,[pos,color]); + node.dataset.obscolor=color; + } + }, addOverDialog:function(dialog,result){ if(ui.finishGame){ ui.finishGame.remove(); @@ -3938,6 +3992,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, skill:{ + _tempobstacle:{ + trigger:{player:'phaseAfter'}, + silent:true, + content:function(){ + var list=game.obstacles.slice(0); + for(var i=0;i=ui.chesswidth) num++; - if(game.obstacles.contains(player.getNeighbour(0,-1))||xy[1]==0) num++; - if(game.obstacles.contains(player.getNeighbour(0,1))||xy[1]+1>=ui.chessheight) num++; + var neighbour; + neighbour=player.getNeighbour(-1,0); + if(neighbour&&typeof neighbour.tempObstacle!='number'&&game.obstacles.contains(neighbour)){ + num++; + } + else if(xy[0]==0){ + num++; + } + neighbour=player.getNeighbour(1,0); + if(neighbour&&typeof neighbour.tempObstacle!='number'&&game.obstacles.contains(neighbour)){ + num++; + } + else if(xy[0]+1>=ui.chesswidth){ + num++; + } + neighbour=player.getNeighbour(0,-1); + if(neighbour&&typeof neighbour.tempObstacle!='number'&&game.obstacles.contains(neighbour)){ + num++; + } + else if(xy[1]==0){ + num++; + } + neighbour=player.getNeighbour(0,1); + if(neighbour&&typeof neighbour.tempObstacle!='number'&&game.obstacles.contains(neighbour)){ + num++; + } + else if(xy[1]+1>=ui.chessheight){ + num++; + } return num>=3; }, content:function(){ 'step 0' event.obstacles=[]; + event.movemap={}; var neighbour; neighbour=player.getNeighbour(-1,0); - if(neighbour&&game.obstacles.contains(neighbour)){ + if(neighbour&&typeof neighbour.tempObstacle!='number'&&game.obstacles.contains(neighbour)){ event.obstacles.push(neighbour); + if(player.movable(-2,0)){ + event.movemap['[-1,0]']=neighbour; + } } neighbour=player.getNeighbour(1,0); - if(neighbour&&game.obstacles.contains(neighbour)){ + if(neighbour&&typeof neighbour.tempObstacle!='number'&&game.obstacles.contains(neighbour)){ event.obstacles.push(neighbour); + if(player.movable(2,0)){ + event.movemap['[1,0]']=neighbour; + } } neighbour=player.getNeighbour(0,-1); - if(neighbour&&game.obstacles.contains(neighbour)){ + if(neighbour&&typeof neighbour.tempObstacle!='number'&&game.obstacles.contains(neighbour)){ event.obstacles.push(neighbour); + if(player.movable(0,-2)){ + event.movemap['[0,-1]']=neighbour; + } } neighbour=player.getNeighbour(0,1); - if(neighbour&&game.obstacles.contains(neighbour)){ + if(neighbour&&typeof neighbour.tempObstacle!='number'&&game.obstacles.contains(neighbour)){ event.obstacles.push(neighbour); + if(player.movable(0,2)){ + event.movemap['[0,1]']=neighbour; + } } if(!event.obstacles.length){ event.finish(); @@ -5006,7 +5112,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.chooseObstacle=true; game.pause(); _status.imchoosing=true; - event.dialog=ui.create.dialog('选择一个与你相邻的障碍清除之'); + event.dialog=ui.create.dialog('移动一个与你相邻的路障'); event.dialog.add('
'+lib.translate._chess_chuzhang_info+'
'); event.custom.replace.confirm=function(){ player.getStat().skill._chess_chuzhang--; @@ -5023,7 +5129,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(!event.obstacle){ event.obstacle=event.obstacles.randomGet(); } - game.removeObstacle(event.obstacle.dataset.position); + var moved=false; + for(var i in event.movemap){ + if(event.movemap[i]==event.obstacle){ + var xy=JSON.parse(i); + if(game.moveObstacle(event.obstacle,xy[0],xy[1])){ + moved=true; + break; + } + } + } + if(!moved){ + game.removeObstacle(event.obstacle); + } + player.popup('除障'); + game.delay(); } for(var i=0;i.equips>.equip5>.image{ background-position: -6px -6px; } + +#window .player.minskin.obstacle[data-obscolor='blue']{ + background: repeating-linear-gradient( + 135deg, + rgba(0, 133, 255, 0.5), + rgba(0, 133, 255, 0.5) 10px, + rgba(0, 0, 0, 0) 10px, + rgba(0, 0, 0, 0) 20px + ); + box-shadow: rgba(0, 133, 255, 0.5) 0 0 0 1px; +}