0.11编辑器ui修改
This commit is contained in:
parent
7c3a0e765b
commit
9a87271f66
File diff suppressed because one or more lines are too long
@ -344,7 +344,7 @@
|
||||
<input type="button" value="地图区"/>
|
||||
<br />
|
||||
<input type="button" value="素材库"/>
|
||||
<input type="button" value="前往游戏" onclick="window.location='./index.html'"/>
|
||||
<input type="button" value="前往游戏" onclick="window.location='./index.html'" style="display: none;"/>
|
||||
</span>
|
||||
<div id="menuDiv">
|
||||
<div id="midMenu" style="display:none">
|
||||
@ -395,7 +395,7 @@
|
||||
<input type="button" value="选层" id='selectFloorBtn'/>
|
||||
<input type="button" value="保存地图" id='saveFloor'/>
|
||||
<input type="button" value="后退" id="undoFloor" style="display: none;"/>
|
||||
<input type="button" value="帮助文档" id="openDoc" />
|
||||
<input type="button" value="帮助文档" id="openDoc" style="display: none;"/>
|
||||
<span id='mobileeditdata' style="display:none">
|
||||
<input type="button" value="编辑"/>
|
||||
<input type="button" value="显示完整名称" style="display: none;"/>
|
||||
|
||||
@ -358,8 +358,8 @@
|
||||
<input type="button" value="选层" id='selectFloorBtn'/>
|
||||
<input type="button" value="保存地图" id='saveFloor'/>
|
||||
<input type="button" value="后退" id="undoFloor" style="display: none;" />
|
||||
<input type="button" value="帮助文档" id="openDoc" />
|
||||
<input type="button" value="前往游戏" onclick="window.open('./index.html', '_blank')"/>
|
||||
<input type="button" value="帮助文档" id="openDoc" style="display: none;"/>
|
||||
<input type="button" value="前往游戏" onclick="window.open('./index.html', '_blank')" style="display: none;"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mid2">
|
||||
|
||||
@ -46,6 +46,13 @@ main.floors.C0_T01=
|
||||
"type": "comment",
|
||||
"text": "本图需要修改"
|
||||
}
|
||||
],
|
||||
"8,9": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:序追",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"changeFloor": {
|
||||
@ -75,7 +82,7 @@ main.floors.C0_T01=
|
||||
[151,151,151,151,151,151, 0, 0, 0, 0, 0, 0, 0, 0,20164],
|
||||
[151,151,151,129,151,151,121,254,121, 0, 0, 0, 0, 0, 0],
|
||||
[ 92, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20164],
|
||||
[151,151,151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20164],
|
||||
[151,151,151, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0,20164],
|
||||
[151,151,151,151, 0, 0,151,151, 0, 0, 0, 0, 0, 0,20164],
|
||||
[151,151,151,151,151,151,151,151, 0, 0, 0, 0, 0, 0,20164],
|
||||
[151,151,151,151,151,151,151,151, 0, 0, 0, 0, 0, 0,20164],
|
||||
|
||||
@ -1845,7 +1845,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
// 将__enable置为false将关闭插件
|
||||
var __enable = true;
|
||||
// 魔防攻速之类的属性可以在这里加 ['atk', 'def', 'mdef']
|
||||
var heroStatus = ['atk', 'def'];
|
||||
var heroStatus = ['atk', 'def', 'mdef'];
|
||||
// saveHero为true 将会把每次造塔测试时的角色数据存下来 否则会读取初始属性
|
||||
// 用不着可以关了 节约缓存空间 (虽然根本没多少 还没一个存档大
|
||||
// 也可以手动清理 控制台输入core.removeLocalStorage('editorHero')即可
|
||||
@ -1859,21 +1859,18 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
editor.saveHero = saveHero;
|
||||
editor._heroStatus = heroStatus;
|
||||
editor.dom.mapEdit.appendChild(core.canvas.damage.canvas)
|
||||
var HTML = "<input type='button' value='←'/><input type='button' value='↑'/><input type='button' value='↓'/><input type='button' value='→'/><input type='button' id='bigmapBtn' value='大地图'' style='margin-left: '5px'/>";
|
||||
var HTML = "<input type='button' value='←'/><input type='button' value='↑'/><input type='button' value='↓'/><input type='button' value='→'/><input type='button' id='bigmapBtn' value='大地图'' style='margin-left: '5px'/><br/>";
|
||||
|
||||
//if (heroStatus.length >= 4 && !editor.isMobile) editor.dom.mid2.style.top = 650 + 30 * (heroStatus.length - 3) + 'px';
|
||||
var colors = {'atk': 'red', 'def': 'blue', 'mdef': 'green'};
|
||||
var labels = {'atk': '攻击', 'def': '防御', 'mdef': '魔防'};
|
||||
heroStatus.forEach(function (status) {
|
||||
var id = status + 'set',
|
||||
id2 = status + 'add',
|
||||
id3 = status + 'rec',
|
||||
id4 = status + 'help';
|
||||
HTML += "<br/><input type='text' size='15' id='" + id + "'><input type='button' id='" + id2 + "' value = '+'><input type='button' id='" + id3 + "' value = '-'><input type='button' value='?' id = '" + id4 + "'>"
|
||||
var id = status + 'set';
|
||||
HTML += "<input type='text' size='4' id='" + id + "' placeholder='属性:" + labels[status] + "' style='color: " + colors[status] + ";'> "
|
||||
});
|
||||
document.getElementById('viewportButtons').innerHTML = HTML;
|
||||
['set', 'add', 'rec', 'help'].forEach(function (e) {
|
||||
heroStatus.forEach(function (status) {
|
||||
editor.dom[status + e] = document.getElementById(status + e);
|
||||
});
|
||||
heroStatus.forEach(function (status) {
|
||||
editor.dom[status + 'set'] = document.getElementById(status + 'set');
|
||||
});
|
||||
var _hasItem = core.items.hasItem;
|
||||
core.items.hasItem = function (itemId) {
|
||||
@ -2022,27 +2019,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
core.status.hero[status] = core.bignum(this.value, core.status.hero[status]);
|
||||
core.updateEditorDamage();
|
||||
}
|
||||
editor.dom[e + 'add'].onclick = function () {
|
||||
var status = this.id.slice(0, -3);
|
||||
core.status.hero[status] += editor.statusRatio;
|
||||
core.updateEditorDamage();
|
||||
}
|
||||
editor.dom[e + 'rec'].onclick = function () {
|
||||
var status = this.id.slice(0, -3);
|
||||
core.status.hero[status] -= editor.statusRatio;
|
||||
core.updateEditorDamage();
|
||||
}
|
||||
editor.dom[e + 'help'].onclick = function () {
|
||||
var status = this.id.slice(0, -4),
|
||||
name = core.getStatusLabel(status);
|
||||
var ratio = parseInt(prompt("当前属性:" + name + "\n现在的点击按钮变化值:" + editor.statusRatio + ",请输入按下一次+/-按钮的属性变化量,可以写4w 10.2e这种字母缩写"));
|
||||
if (!core.isset(ratio)) {
|
||||
printe('不合法的输入');
|
||||
return;
|
||||
}
|
||||
editor.statusRatio = ratio;
|
||||
core.setLocalStorage('statusRatio', ratio);
|
||||
}
|
||||
});
|
||||
var _updateMap = editor.updateMap;
|
||||
editor.updateMap = function () {
|
||||
@ -2079,7 +2055,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
this.initBossState = function () {
|
||||
var floorId = core.status.floorId;
|
||||
var w = core.floors[floorId].width, h = core.floors[floorId].height;
|
||||
var w = core.floors[floorId].width,
|
||||
h = core.floors[floorId].height;
|
||||
var found = null;
|
||||
for (var yy = 0; yy < h; yy++) {
|
||||
for (var xx = 0; xx < w; xx++) {
|
||||
@ -2113,7 +2090,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
|
||||
var loc = core.getFlag("1fBoss_loc");
|
||||
var floorId = loc.floorId, x = loc.x, y = loc.y;
|
||||
var floorId = loc.floorId,
|
||||
x = loc.x,
|
||||
y = loc.y;
|
||||
var bossBlock = core.getBlock(x, y, floorId);
|
||||
if (!bossBlock || bossBlock.event.id !== "redSwordsman") {
|
||||
core.removeFlag("1fBoss_loc");
|
||||
@ -2124,7 +2103,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
// 1. 同层且与主角相邻:一次伤害(atk-def),非战报多回合
|
||||
if (floorId === core.status.floorId) {
|
||||
var hx = core.status.hero.loc.x, hy = core.status.hero.loc.y;
|
||||
var hx = core.status.hero.loc.x,
|
||||
hy = core.status.hero.loc.y;
|
||||
if (Math.abs(x - hx) + Math.abs(y - hy) === 1) {
|
||||
var bossInfo = core.getEnemyInfo(bossBlock.event.id, null, x, y, floorId);
|
||||
var dmg = bossInfo.atk - core.status.hero.def;
|
||||
@ -2362,7 +2342,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
control.prototype.moveOneStep = function (callback) {
|
||||
if (isPursuitEnabled() && core.getFlag("1fBoss_loc")) {
|
||||
var d = core.getHeroLoc("direction");
|
||||
var hx = core.getHeroLoc("x"), hy = core.getHeroLoc("y");
|
||||
var hx = core.getHeroLoc("x"),
|
||||
hy = core.getHeroLoc("y");
|
||||
var sc = core.utils.scan[d];
|
||||
if (sc) core.setFlag("序追_lock", { x: hx - sc.x, y: hy - sc.y, floorId: core.status.floorId });
|
||||
enqueuePursuitTurn();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user