This commit is contained in:
parent
a00e3c03b4
commit
4a6b4abbb4
|
@ -1,4 +1,2 @@
|
|||
1.5.3
|
||||
战棋路障、特殊战场角色
|
||||
战棋自动显示距离
|
||||
修正部分区域点击困难的问题
|
||||
1.5.4
|
||||
天气(在选项-玩法中开启)
|
||||
|
|
|
@ -162,6 +162,7 @@ card.extra={
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
if(player.num('h')<=1) return 0;
|
||||
return -1.5;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -65,15 +65,24 @@ card.qimou={
|
|||
for(var i=0;i<game.players.length;i++){
|
||||
if(target!=game.players[i]&&
|
||||
game.players[i]!=player&&
|
||||
game.players[i].isLinked()&&
|
||||
get.distance(player,game.players[i],'absolute')<distance){
|
||||
return false;
|
||||
game.players[i].isLinked()){
|
||||
if(get.distance(player,game.players[i],'absolute')<distance){
|
||||
return false;
|
||||
}
|
||||
if(get.distance(player,game.players[i],'absolute')==distance&&
|
||||
parseInt(game.players[i].dataset.position)<parseInt(target.dataset.position)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return target==player.next;
|
||||
var dist=get.distance(player,target);
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=player&&get.distance(player,game.players[i])<dist) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
enable:true,
|
||||
|
@ -323,7 +332,7 @@ card.qimou={
|
|||
shushangkaihua_info:'使用者与手牌数最少的所有角色各摸一张牌',
|
||||
huoshaolianying:'火烧连营',
|
||||
huoshaolianying_bg:'烧',
|
||||
huoshaolianying_info:'对逆时针方向离你最近的一名横置角色使用(若无横置角色则对你的下家使用),对其造成一点火焰伤害',
|
||||
huoshaolianying_info:'对离你最近的一名横置角色使用(若无横置角色则改为对距离你最近的所有角色使用),对目标造成一点火焰伤害',
|
||||
chenhuodajie:'趁火打劫',
|
||||
chenhuodajie_info:'任意一名其他角色受到伤害时对其使用,获得其一张牌',
|
||||
},
|
||||
|
|
|
@ -360,7 +360,11 @@ card.yibao={
|
|||
}
|
||||
return 0;
|
||||
},
|
||||
target:-1.5
|
||||
target:function(player,target){
|
||||
if(target.skills.contains('dujian2')||target.num('h')==0) return 0;
|
||||
if(player.num('h')<=1) return 0;
|
||||
return -1.5;
|
||||
}
|
||||
},
|
||||
tag:{
|
||||
loseHp:1
|
||||
|
|
25
game/game.js
25
game/game.js
|
@ -20,6 +20,7 @@
|
|||
updates:[],
|
||||
canvasUpdates:[],
|
||||
video:[],
|
||||
arenaReady:[],
|
||||
_onDB:[],
|
||||
onDB:function(func){
|
||||
if(lib.db){
|
||||
|
@ -675,6 +676,20 @@
|
|||
game.saveConfig('plays',lib.config.plays);
|
||||
}
|
||||
},
|
||||
weather:{
|
||||
name:'天气变化',
|
||||
init:false,
|
||||
restart:true,
|
||||
onclick:function(bool){
|
||||
if(bool){
|
||||
lib.config.plays.add('weather');
|
||||
}
|
||||
else{
|
||||
lib.config.plays.remove('weather');
|
||||
}
|
||||
game.saveConfig('plays',lib.config.plays);
|
||||
}
|
||||
},
|
||||
update:function(config,map){
|
||||
for(var i in map){
|
||||
if(lib.config.plays.contains(i)){
|
||||
|
@ -12793,6 +12808,12 @@
|
|||
// });
|
||||
lib.status.date=new Date();
|
||||
lib.status.dateDelayed=0;
|
||||
|
||||
while(lib.arenaReady.length){
|
||||
(lib.arenaReady.shift())();
|
||||
}
|
||||
delete lib.arenaReady;
|
||||
|
||||
clearTimeout(window.resetGameTimeout);
|
||||
delete window.resetGameTimeout;
|
||||
},
|
||||
|
@ -17080,7 +17101,8 @@
|
|||
lib.config.current_mode=lib.config.current_mode.concat(play[i].config);
|
||||
}
|
||||
for(j in play[i]){
|
||||
if(j=='mode'||j=='forbid'||j=='init'||j=='element'||j=='game'||j=='get'||j=='config'||j=='ui') continue;
|
||||
if(j=='mode'||j=='forbid'||j=='init'||j=='element'||
|
||||
j=='game'||j=='get'||j=='config'||j=='ui'||j=='arenaReady') continue;
|
||||
for(k in play[i][j]){
|
||||
if(j=='translate'&&k==i){
|
||||
lib[j][k+'_play_config']=play[i][j][k];
|
||||
|
@ -17094,6 +17116,7 @@
|
|||
}
|
||||
}
|
||||
if(typeof play[i].init=='function') (lib.init.eval(play[i].init))();
|
||||
if(typeof play[i].arenaReady=='function') lib.arenaReady.push(play[i].arenaReady);
|
||||
}
|
||||
for(i=0;i<lib.card.list.length;i++){
|
||||
if(!lib.card[lib.card.list[i][2]]){
|
||||
|
|
|
@ -38,5 +38,6 @@ card.pack={
|
|||
play.pack={
|
||||
character:'武将卡牌',
|
||||
soldier:'士兵模式',
|
||||
wuxing:'五行生克'
|
||||
wuxing:'五行生克',
|
||||
weather:'天气变化',
|
||||
};
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.player .action{
|
||||
.player.minskin .action{
|
||||
text-shadow: black 0 0 1px !important;
|
||||
font-size: 16px !important;
|
||||
left:0;
|
||||
|
|
|
@ -3377,6 +3377,7 @@ mode.chess={
|
|||
game.resume();
|
||||
}
|
||||
event.custom.replace.confirm=game.resume;
|
||||
event.switchToAuto=game.resume;
|
||||
"step 1"
|
||||
_status.imchoosing=false;
|
||||
event.dialog.close();
|
||||
|
@ -4055,6 +4056,9 @@ mode.chess={
|
|||
_chess_chuzhang:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
direct:true,
|
||||
delay:false,
|
||||
preservecancel:true,
|
||||
filter:function(event,player){
|
||||
var num=0;
|
||||
var xy=player.getXY();
|
||||
|
@ -4100,13 +4104,20 @@ mode.chess={
|
|||
_status.imchoosing=true;
|
||||
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--;
|
||||
event.cancelled=true;
|
||||
game.resume();
|
||||
};
|
||||
}
|
||||
'step 1'
|
||||
_status.imchoosing=false;
|
||||
if(!event.obstacle){
|
||||
event.obstacle=event.obstacles.randomGet();
|
||||
if(!event.cancelled){
|
||||
if(!event.obstacle){
|
||||
event.obstacle=event.obstacles.randomGet();
|
||||
}
|
||||
game.removeObstacle(event.obstacle.dataset.position);
|
||||
}
|
||||
game.removeObstacle(event.obstacle.dataset.position);
|
||||
for(var i=0;i<event.obstacles.length;i++){
|
||||
event.obstacles[i].classList.remove('glow');
|
||||
}
|
||||
|
@ -4835,10 +4846,10 @@ mode.chess={
|
|||
['club',3,'chess_shezhang'],
|
||||
['spade',5,'chess_shezhang'],
|
||||
['spade',7,'chess_shezhang'],
|
||||
['diamond',1,'chess_chuzhang'],
|
||||
// ['diamond',1,'chess_chuzhang'],
|
||||
['diamond',4,'chess_chuzhang'],
|
||||
['heart',8,'chess_chuzhang'],
|
||||
['diamond',9,'chess_chuzhang'],
|
||||
// ['diamond',9,'chess_chuzhang'],
|
||||
],
|
||||
posmap:{},
|
||||
help:{},
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
'use strict';
|
||||
play.weather={
|
||||
arenaReady:function(){
|
||||
if(_status.video) return;
|
||||
_status.weather='qing';
|
||||
_status.weatherlife=Math.ceil(Math.random()*3);
|
||||
ui.weather=ui.create.system('晴',null,true);
|
||||
},
|
||||
skill:{
|
||||
_weatherchange:{
|
||||
trigger:{player:'phaseAfter'},
|
||||
filter:function(){
|
||||
return ui.weather?true:false;
|
||||
},
|
||||
content:function(){
|
||||
if(_status.weather!='qing'&&Math.random()<0.5){
|
||||
_status.weather='qing';
|
||||
}
|
||||
else{
|
||||
_status.weather=['qing','yu','bao','wu','xue','feng','lei'].randomGet(_status.weather);
|
||||
}
|
||||
ui.weather.innerHTML=lib.translate['_weather_'+_status.weather];
|
||||
}
|
||||
}
|
||||
},
|
||||
translate:{
|
||||
_weather_qing:'晴',
|
||||
_weather_qing_info:'没有任何事情发生',
|
||||
_weather_yu:'雨',
|
||||
_weather_yu_info:'每当一名角色受到火焰伤害,有30%的机率令此伤害-1',
|
||||
_weather_shuang:'霜',
|
||||
_weather_shuang_info:'霜',
|
||||
_weather_wu:'雾',
|
||||
_weather_wu_info:'雾',
|
||||
_weather_bao:'雹',
|
||||
_weather_bao_info:'每名角色在回合结束阶段有20%的机率受到一点伤害',
|
||||
_weather_xue:'雪',
|
||||
_weather_xue_info:'雪',
|
||||
_weather_feng:'风',
|
||||
_weather_feng_info:'当一名角色受到火焰伤害时,有30%的机率令距离其1以内的一名其他角色受到一点火焰伤害',
|
||||
_weather_lei:'雷',
|
||||
_weather_lei_info:'在一名角色的回合结束阶段,有30%的机率将一张闪电置于其判定区',
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue