v1.9.37.1

This commit is contained in:
libccy 2017-09-12 10:54:07 +08:00
parent 132df053a1
commit 244bee3a6f
11 changed files with 273 additions and 55 deletions

View File

@ -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')<target.maxHp){
event.goto(0);
}
},
ai:{
value:[4,1],
@ -2183,7 +2188,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
gw_butianshu:'卜天术',
gw_butianshu_info:'出牌阶段对任意角色使用,将任意一张延时锦囊牌置入其判定区',
gw_zhihuanjun:'致幻菌',
gw_zhihuanjun_info:'出牌阶段对一名已受伤角色使用,令其减少一点体力上限',
gw_zhihuanjun_info:'出牌阶段对一名已受伤角色使用,令其减少一点体力上限;若该角色仍处于受伤状态且手牌数小于体力上限,则重复此结算',
gw_niuquzhijing:'纽曲之镜',
gw_niuquzhijing_info:'令全场体力最多的角色减少一点体力和体力上限,体力最少的角色增加一点体力和体力上限(不触发技能),然后结束出牌阶段',
gw_ansha:'暗杀',

View File

@ -609,8 +609,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'damageEnd'},
content:function(){
'step 0'
player.judge();
event.num=trigger.num;
'step 1'
player.judge();
'step 2'
event.color=result.color;
if(event.color=='black'){
player.chooseTarget('弃置一名角色区域内的一张牌',true,function(card,player,target){
@ -642,7 +644,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return att;
})
}
'step 2'
'step 3'
if(result.bool){
var target=result.targets[0];
player.line(target,'green');
@ -658,6 +660,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
}
'step 4'
if(--event.num>0){
player.chooseBool('是否再次发动【筹策】?');
}
else{
event.finish();
}
'step 5'
if(result.bool){
event.goto(1);
}
},
ai:{
maixie:true,

View File

@ -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};

View File

@ -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};

View File

@ -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];

View File

@ -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',
]
}

View File

@ -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;
}

View File

@ -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:{

View File

@ -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<list.length;i++){
if(typeof list[i].tempObstacle=='number'){
if(--list[i].tempObstacle==0){
game.removeObstacle(list[i]);
}
}
}
}
},
_attackmove:{
trigger:{player:'damageEnd'},
forced:true,
@ -4966,31 +5034,69 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
var num=0;
var xy=player.getXY();
if(game.obstacles.contains(player.getNeighbour(-1,0))||xy[0]==0) num++;
if(game.obstacles.contains(player.getNeighbour(1,0))||xy[0]+1>=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('<div class="text">'+lib.translate._chess_chuzhang_info+'</div>');
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<event.obstacles.length;i++){
event.obstacles[i].classList.remove('glow');
@ -5403,13 +5523,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
epic:'史诗',
legend:'传说',
chess_shezhang:'设置',
chess_shezhang_info:'在你的一个相邻位置设置障碍,摸一张牌',
chess_chuzhang:'清除',
chess_chuzhang_info:'清除一个在你相邻位置的障碍,摸一张牌',
chess_shezhang:'设置障',
chess_shezhang_info:'选择一名角色在其四周设置临时路障持续X回合X为存活角色数',
chess_chuzhang:'清除障',
chess_chuzhang_info:'将你相邻的路障而后推移一格,每影响一个路障你摸一张牌',
_chess_chuzhang:'除障',
_chess_chuzhang_info:'出牌阶段限一次,若你周围四格至少有三个为障碍或在边缘外,你可以选择清除其中一个障碍',
_chess_chuzhang_info:'出牌阶段限一次,若你周围四格至少有三个为障碍或在边缘外,你可以选择将其中一个障碍向后推移一格(若无法推移则改为清除之)',
arenaAdd:'援军',
arenaAdd_info:'出牌阶段限一次,你可以令一名未出场的已方角色加入战场。战斗结束后,该角色无论是否存活均不能再次出场',
@ -5521,18 +5641,32 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
type:'basic',
fullskin:true,
modeimage:'chess',
enable:function(card,player){
if(player.movable(-1,0)) return true;
if(player.movable(1,0)) return true;
if(player.movable(0,-1)) return true;
if(player.movable(0,1)) return true;
enable:true,
filterTarget:function(card,player,target){
if(target.movable(-1,0)) return true;
if(target.movable(1,0)) return true;
if(target.movable(0,-1)) return true;
if(target.movable(0,1)) return true;
return false;
},
filterTarget:function(card,player,target){
return player==target;
},
selectTarget:-1,
content:function(){
var xy=target.getXY();
var x=xy[0];
var y=xy[1];
if(target.movable(-1,0)){
game.addTempObstacle(x-1,y,game.countPlayer());
}
if(target.movable(1,0)){
game.addTempObstacle(x+1,y,game.countPlayer());
}
if(target.movable(0,1)){
game.addTempObstacle(x,y+1,game.countPlayer());
}
if(target.movable(0,-1)){
game.addTempObstacle(x,y-1,game.countPlayer());
}
},
content_old:function(){
'step 0'
var pos=parseInt(player.dataset.position);
var poses=[];
@ -5586,7 +5720,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
ai:{
result:{
player:1,
target:function(player,target){
if(target.getNeighbours().length) return 0;
return -1;
},
},
order:1
}
@ -5600,12 +5737,38 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
selectTarget:-1,
enable:function(event,player){
if(game.obstacles.contains(player.getNeighbour(-1,0))) return true;
if(game.obstacles.contains(player.getNeighbour(1,0))) return true;
if(game.obstacles.contains(player.getNeighbour(0,-1))) return true;
if(game.obstacles.contains(player.getNeighbour(0,1))) return true;
if(game.obstacles.contains(player.getNeighbour(-1,0))&&player.movable(-2,0)) return true;
if(game.obstacles.contains(player.getNeighbour(1,0))&&player.movable(2,0)) return true;
if(game.obstacles.contains(player.getNeighbour(0,-1))&&player.movable(0,-2)) return true;
if(game.obstacles.contains(player.getNeighbour(0,1))&&player.movable(0,2)) return true;
},
content:function(){
var neighbour,num=0;
neighbour=player.getNeighbour(-1,0);
if(neighbour&&game.obstacles.contains(neighbour)&&player.movable(-2,0)){
game.moveObstacle(neighbour,-1,0);
num++;
}
neighbour=player.getNeighbour(1,0);
if(neighbour&&game.obstacles.contains(neighbour)&&player.movable(2,0)){
game.moveObstacle(neighbour,1,0);
num++;
}
neighbour=player.getNeighbour(0,-1);
if(neighbour&&game.obstacles.contains(neighbour)&&player.movable(0,-2)){
game.moveObstacle(neighbour,0,-1);
num++;
}
neighbour=player.getNeighbour(0,1);
if(neighbour&&game.obstacles.contains(neighbour)&&player.movable(0,2)){
game.moveObstacle(neighbour,0,1);
num++;
}
if(num){
player.draw(num);
}
},
content_old:function(){
'step 0'
event.obstacles=[];
var neighbour;
@ -5659,7 +5822,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
result:{
player:1
},
order:7
order:8
}
},
leader_2:{
@ -5750,7 +5913,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
cardPack:{
mode_chess:['chess_shezhang','chess_chuzhang']
},
chess_cardlist:[],
chess_cardlist:[
['heart',1,'chess_shezhang'],
['diamond',1,'chess_shezhang'],
['club',1,'chess_chuzhang'],
['spade',1,'chess_chuzhang']
],
rank:{
rarity:{
legend:[

View File

@ -38,7 +38,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(var i=0;i<toLoad.length;i++){
game[toLoad[i]]=result.game[toLoad[i]];
}
toLoad=['_attackmove','_phasequeue','_chessmove','_chesscenter'];
toLoad=['_attackmove','_phasequeue','_chessmove','_chesscenter','_tempobstacle'];
for(var i=0;i<toLoad.length;i++){
lib.skill[toLoad[i]]=result.skill[toLoad[i]];
}

View File

@ -108,3 +108,14 @@ body[data-background_color_music='blue'] #arena.mobile:not(.chess) .player[data-
#arena:not(.chess) .player[data-position='0']>.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;
}