Merge remote-tracking branch 'refs/remotes/ckcz123/v2.0' into v2.x
This commit is contained in:
commit
8e99a4ef83
@ -338,7 +338,7 @@ return code;
|
|||||||
*/;
|
*/;
|
||||||
|
|
||||||
setValue_s
|
setValue_s
|
||||||
: '变量操作' ':' '名称' idString_e '值' expression Newline
|
: '变量设置' ':' '名称' idString_e '值' expression Newline
|
||||||
|
|
||||||
|
|
||||||
/* setValue_s
|
/* setValue_s
|
||||||
|
|||||||
@ -2225,6 +2225,7 @@ control.prototype.loadData = function (data, callback) {
|
|||||||
|
|
||||||
////// 设置勇士属性 //////
|
////// 设置勇士属性 //////
|
||||||
control.prototype.setStatus = function (statusName, statusVal) {
|
control.prototype.setStatus = function (statusName, statusVal) {
|
||||||
|
if (statusName == 'exp') statusName = 'experience';
|
||||||
if (core.isset(core.status.hero.loc[statusName]))
|
if (core.isset(core.status.hero.loc[statusName]))
|
||||||
core.status.hero.loc[statusName] = statusVal;
|
core.status.hero.loc[statusName] = statusVal;
|
||||||
else
|
else
|
||||||
@ -2236,6 +2237,7 @@ control.prototype.getStatus = function (statusName) {
|
|||||||
// support status:x
|
// support status:x
|
||||||
if (core.isset(core.status.hero.loc[statusName]))
|
if (core.isset(core.status.hero.loc[statusName]))
|
||||||
return core.status.hero.loc[statusName];
|
return core.status.hero.loc[statusName];
|
||||||
|
if (statusName == 'exp') statusName = 'experience';
|
||||||
return core.status.hero[statusName];
|
return core.status.hero[statusName];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2446,7 +2448,6 @@ control.prototype.updateStatusBar = function () {
|
|||||||
|
|
||||||
core.statusBar.hard.innerHTML = core.status.hard;
|
core.statusBar.hard.innerHTML = core.status.hard;
|
||||||
|
|
||||||
|
|
||||||
// 回放
|
// 回放
|
||||||
if (core.status.replay.replaying) {
|
if (core.status.replay.replaying) {
|
||||||
core.statusBar.image.book.src = core.status.replay.pausing?core.statusBar.icons.play.src:core.statusBar.icons.pause.src;
|
core.statusBar.image.book.src = core.status.replay.pausing?core.statusBar.icons.play.src:core.statusBar.icons.pause.src;
|
||||||
|
|||||||
@ -254,13 +254,13 @@ enemys.prototype.getDamageInfo = function(monster, hero_hp, hero_atk, hero_def,
|
|||||||
mon_atk = hero_atk;
|
mon_atk = hero_atk;
|
||||||
mon_def = hero_def;
|
mon_def = hero_def;
|
||||||
}
|
}
|
||||||
// 魔攻
|
|
||||||
if (this.hasSpecial(mon_special,2)) hero_def = 0;
|
|
||||||
// 坚固
|
// 坚固
|
||||||
if (this.hasSpecial(mon_special,3) && mon_def < hero_atk - 1) mon_def = hero_atk - 1;
|
if (this.hasSpecial(mon_special,3) && mon_def < hero_atk - 1) mon_def = hero_atk - 1;
|
||||||
if (hero_atk <= mon_def) return null; // 不可战斗时请直接返回null
|
if (hero_atk <= mon_def) return null; // 不可战斗时请直接返回null
|
||||||
|
|
||||||
var per_damage = mon_atk - hero_def;
|
var per_damage = mon_atk - hero_def;
|
||||||
|
// 魔攻
|
||||||
|
if (this.hasSpecial(mon_special,2)) per_damage = mon_atk;
|
||||||
if (per_damage < 0) per_damage = 0;
|
if (per_damage < 0) per_damage = 0;
|
||||||
|
|
||||||
// 2连击 & 3连击 & N连击
|
// 2连击 & 3连击 & N连击
|
||||||
|
|||||||
@ -1082,9 +1082,19 @@ events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback
|
|||||||
var floorName = core.status.maps[floorId].name;
|
var floorName = core.status.maps[floorId].name;
|
||||||
if (!core.isset(floorName) || floorName=="") floorName=" "
|
if (!core.isset(floorName) || floorName=="") floorName=" "
|
||||||
core.statusBar.floor.innerHTML = floorName;
|
core.statusBar.floor.innerHTML = floorName;
|
||||||
if (/^[+-]?\d+$/.test(floorName))
|
if (/^[+-]?\d+$/.test(floorName)) {
|
||||||
core.statusBar.floor.style.fontStyle = 'italic';
|
core.statusBar.floor.style.fontStyle = 'italic';
|
||||||
else core.statusBar.floor.style.fontStyle = 'normal';
|
core.statusBar.floor.style.fontSize = '1.1em';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
core.statusBar.floor.style.fontStyle = 'normal';
|
||||||
|
if (floorName.length<=5)
|
||||||
|
core.statusBar.floor.style.fontSize = '1.1em';
|
||||||
|
else if (floorName.length==6)
|
||||||
|
core.statusBar.floor.style.fontSize = '0.9em';
|
||||||
|
else
|
||||||
|
core.statusBar.floor.style.fontSize = '0.7em';
|
||||||
|
}
|
||||||
|
|
||||||
// 更改BGM
|
// 更改BGM
|
||||||
if (core.isset(core.floors[floorId].bgm)) {
|
if (core.isset(core.floors[floorId].bgm)) {
|
||||||
|
|||||||
@ -631,6 +631,49 @@ utils.prototype.hide = function (obj, speed, callback) {
|
|||||||
}, speed);
|
}, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
utils.prototype.export = function (floorIds) {
|
||||||
|
if (!core.isset(floorIds)) floorIds = [core.status.floorId];
|
||||||
|
else if (floorIds=='all') floorIds = core.clone(core.floorIds);
|
||||||
|
else if (typeof floorIds == 'string') floorIds = [floorIds];
|
||||||
|
|
||||||
|
var monsterMap = {};
|
||||||
|
|
||||||
|
// map
|
||||||
|
var content = floorIds.length+"\n13 13\n\n";
|
||||||
|
floorIds.forEach(function (floorId) {
|
||||||
|
var arr = core.maps.getMapArray(core.status.maps[floorId].blocks);
|
||||||
|
content += arr.map(function (x) {
|
||||||
|
// check monster
|
||||||
|
x.forEach(function (t) {
|
||||||
|
var block = core.maps.initBlock(null, null, t);
|
||||||
|
if (core.isset(block.event) && block.event.cls.indexOf("enemy")==0) {
|
||||||
|
monsterMap[t] = block.event.id;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return x.join("\t");
|
||||||
|
}).join("\n") + "\n\n";
|
||||||
|
})
|
||||||
|
|
||||||
|
// values
|
||||||
|
content += ["redJewel", "blueJewel", "greenJewel", "redPotion", "bluePotion",
|
||||||
|
"yellowPotion", "greenPotion", "sword1", "shield1"].map(function (x) {return core.values[x]}).join(" ") + "\n\n";
|
||||||
|
|
||||||
|
// monster
|
||||||
|
content += Object.keys(monsterMap).length + "\n";
|
||||||
|
for (var t in monsterMap) {
|
||||||
|
var id = monsterMap[t], monster = core.material.enemys[id];
|
||||||
|
content += t + " " + monster.hp + " " + monster.atk + " " +
|
||||||
|
monster.def + " " + monster.money + " " + monster.special + "\n";
|
||||||
|
}
|
||||||
|
content += "\n0 0 0 0 0 0\n\n";
|
||||||
|
content += core.status.hero.hp + " " + core.status.hero.atk + " "
|
||||||
|
+ core.status.hero.def + " " + core.status.hero.mdef + " " + core.status.hero.money + " "
|
||||||
|
+ core.itemCount('yellowKey') + " " + core.itemCount("blueKey") + " " + core.itemCount("redKey") + " 0 "
|
||||||
|
+ core.status.hero.loc.x + " " + core.status.hero.loc.y + "\n";
|
||||||
|
|
||||||
|
console.log(content);
|
||||||
|
}
|
||||||
|
|
||||||
utils.prototype.http = function (type, url, formData, success, error, mimeType, responseType) {
|
utils.prototype.http = function (type, url, formData, success, error, mimeType, responseType) {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open(type, url, true);
|
xhr.open(type, url, true);
|
||||||
|
|||||||
@ -195,6 +195,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
color: white;
|
color: white;
|
||||||
font: bold italic 1.1em Verdana;
|
font: bold italic 1.1em Verdana;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
#toolBar {
|
#toolBar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
15
更新说明.txt
15
更新说明.txt
@ -1,4 +1,17 @@
|
|||||||
HTML5魔塔样板V2.3.1
|
HTML5魔塔样板V2.3.2
|
||||||
|
|
||||||
|
启动服务的多开版本 √
|
||||||
|
怪物数据导出器
|
||||||
|
gif播放可随着分辨率自动放缩 √
|
||||||
|
状态栏可随文字长度自动调整放缩 √
|
||||||
|
也可以用status:exp来代替经验值的写法 √
|
||||||
|
破炸在周围只有一个目标时无需转向面对它 √
|
||||||
|
道具效果中,无需再将null改成""才能双击编辑了 √
|
||||||
|
各个已知Bug的修复,部分细节优化 √
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
HTML5魔塔样板V2.3.1
|
||||||
|
|
||||||
存档采用高比率压缩,单个大小是原来的1/10!
|
存档采用高比率压缩,单个大小是原来的1/10!
|
||||||
默认存档数改成100页500个
|
默认存档数改成100页500个
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user