This commit is contained in:
parent
37b8ca7dbe
commit
5844ae922c
|
@ -1,9 +1,2 @@
|
||||||
1.4.0
|
1.4.0
|
||||||
弹出菜单改进
|
game.print命令(在命令输入框中输出结果)
|
||||||
选项菜单
|
|
||||||
游戏速度选项
|
|
||||||
游戏未正常载入时可重置游戏
|
|
||||||
导入/导出游戏数据
|
|
||||||
可禁用单个武将/卡牌
|
|
||||||
作弊、换人、输入js命令
|
|
||||||
修正国战明置bug
|
|
||||||
|
|
27
game/game.js
27
game/game.js
|
@ -1313,7 +1313,7 @@
|
||||||
'<div style="margin:10px">角色操作</div><ul style="margin-top:0"><li>受到伤害<br>player.damage(source,<br>num)'+
|
'<div style="margin:10px">角色操作</div><ul style="margin-top:0"><li>受到伤害<br>player.damage(source,<br>num)'+
|
||||||
'<li>回复体力<br>player.recover(num)<li>摸牌<br>player.draw(num)<li>获得牌<br>player.gain(cards)<li>弃牌<br>player.discard(cards)'+
|
'<li>回复体力<br>player.recover(num)<li>摸牌<br>player.draw(num)<li>获得牌<br>player.gain(cards)<li>弃牌<br>player.discard(cards)'+
|
||||||
'<li>使用卡牌<br>player.useCard(card,<br>targets)<li>死亡<br>player.die()<li>复活<br>player.revive(hp)</ul>'+
|
'<li>使用卡牌<br>player.useCard(card,<br>targets)<li>死亡<br>player.die()<li>复活<br>player.revive(hp)</ul>'+
|
||||||
'<div style="margin:10px">游戏操作</div><ul style="margin-top:0"><li>在历史中记录<br>game.log(str)<li>游戏结束<br>game.over(bool)'+
|
'<div style="margin:10px">游戏操作</div><ul style="margin-top:0"><li>在命令输入框中输出结果<br>game.print(str)<li>游戏结束<br>game.over(bool)'+
|
||||||
'<li>角色资料<br>lib.character<li>卡牌资料<br>lib.card'
|
'<li>角色资料<br>lib.character<li>卡牌资料<br>lib.card'
|
||||||
},
|
},
|
||||||
setPopped:function(node,func,width,height){
|
setPopped:function(node,func,width,height){
|
||||||
|
@ -1356,6 +1356,12 @@
|
||||||
node.addEventListener('mousemove',ui.click.mousemove);
|
node.addEventListener('mousemove',ui.click.mousemove);
|
||||||
return node;
|
return node;
|
||||||
},
|
},
|
||||||
|
setScroll:function(node){
|
||||||
|
node.ontouchstart=ui.click.touchStart;
|
||||||
|
node.ontouchmove = ui.click.touchScroll;
|
||||||
|
node.style.WebkitOverflowScrolling='touch';
|
||||||
|
return node;
|
||||||
|
},
|
||||||
setLongPress:function(node,func){
|
setLongPress:function(node,func){
|
||||||
node.addEventListener('touchstart',ui.click.longpressdown);
|
node.addEventListener('touchstart',ui.click.longpressdown);
|
||||||
node.addEventListener('touchend',ui.click.longpresscancel);
|
node.addEventListener('touchend',ui.click.longpresscancel);
|
||||||
|
@ -9780,8 +9786,8 @@
|
||||||
var createMenu=function(tabs,config){
|
var createMenu=function(tabs,config){
|
||||||
var createPage=function(position){
|
var createPage=function(position){
|
||||||
var node=ui.create.div(position);
|
var node=ui.create.div(position);
|
||||||
ui.create.div('.left.pane',node);
|
lib.setScroll(ui.create.div('.left.pane',node));
|
||||||
ui.create.div('.right.pane',node);
|
lib.setScroll(ui.create.div('.right.pane',node));
|
||||||
return node;
|
return node;
|
||||||
};
|
};
|
||||||
var menu=ui.create.div('.main.menu.dialog.popped.static',config.position,function(e){
|
var menu=ui.create.div('.main.menu.dialog.popped.static',config.position,function(e){
|
||||||
|
@ -10668,13 +10674,24 @@
|
||||||
text.style.height='80px';
|
text.style.height='80px';
|
||||||
text.style.resize='none';
|
text.style.resize='none';
|
||||||
page.appendChild(text);
|
page.appendChild(text);
|
||||||
|
var textstr='';
|
||||||
|
var perserveMenu=false;
|
||||||
|
game.print=function(str){
|
||||||
|
textstr+=str+'\n';
|
||||||
|
text.value=textstr;
|
||||||
|
perserveMenu=true;
|
||||||
|
}
|
||||||
runButton.listen(function(){
|
runButton.listen(function(){
|
||||||
|
textstr='';
|
||||||
|
perserveMenu=false;
|
||||||
try{
|
try{
|
||||||
eval(text.value);
|
eval(text.value);
|
||||||
}
|
}
|
||||||
catch(e){}
|
catch(e){}
|
||||||
text.value='';
|
if(!perserveMenu){
|
||||||
clickContainer.call(menuContainer);
|
text.value='';
|
||||||
|
clickContainer.call(menuContainer);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue