Merge branch 'status-itcfangye' into map
This commit is contained in:
commit
2652b6e071
@ -1270,6 +1270,7 @@ ui.prototype._drawTextContent_drawChar = function (tempCtx, content, config, ch)
|
|||||||
// 输出
|
// 输出
|
||||||
var left = config.offsetX, top = config.offsetY + config.topMargin;
|
var left = config.offsetX, top = config.offsetY + config.topMargin;
|
||||||
core.fillText(tempCtx, ch, left, top);
|
core.fillText(tempCtx, ch, left, top);
|
||||||
|
tempCtx.strokeText(ch, left, top);
|
||||||
config.blocks.push({
|
config.blocks.push({
|
||||||
left: config.offsetX, top: config.offsetY,
|
left: config.offsetX, top: config.offsetY,
|
||||||
width: charwidth, height: config.currfont + config.lineMargin,
|
width: charwidth, height: config.currfont + config.lineMargin,
|
||||||
|
@ -1946,10 +1946,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
|||||||
{
|
{
|
||||||
"type": "insert",
|
"type": "insert",
|
||||||
"name": "强制横屏"
|
"name": "强制横屏"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "insert",
|
|
||||||
"name": "chapter0"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"shops": [
|
"shops": [
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
main.floors.chushi=
|
main.floors.chushi=
|
||||||
{
|
{
|
||||||
"floorId": "chushi",
|
"floorId": "chushi",
|
||||||
"title": "抉择",
|
"title": "开场剧情",
|
||||||
"name": "1",
|
"name": "1",
|
||||||
"width": 13,
|
"width": 13,
|
||||||
"height": 13,
|
"height": 13,
|
||||||
@ -12,6 +12,10 @@ main.floors.chushi=
|
|||||||
"ratio": 1,
|
"ratio": 1,
|
||||||
"defaultGround": "T400",
|
"defaultGround": "T400",
|
||||||
"firstArrive": [
|
"firstArrive": [
|
||||||
|
{
|
||||||
|
"type": "insert",
|
||||||
|
"name": "chapter0"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "confirm",
|
"type": "confirm",
|
||||||
"text": "要进行教程内容吗",
|
"text": "要进行教程内容吗",
|
||||||
@ -63,7 +67,7 @@ main.floors.chushi=
|
|||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||||
],
|
],
|
||||||
"areas": "抉择",
|
"areas": "开场剧情",
|
||||||
"bgmap": [
|
"bgmap": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -22,6 +22,10 @@ main.floors.jiaocheng03=
|
|||||||
"法杖:魔攻比例10%,魔防比例0%"
|
"法杖:魔攻比例10%,魔防比例0%"
|
||||||
],
|
],
|
||||||
"6,0": [
|
"6,0": [
|
||||||
|
{
|
||||||
|
"type": "setHeroOpacity",
|
||||||
|
"opacity": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "changeFloor",
|
"type": "changeFloor",
|
||||||
"floorId": "guangchang",
|
"floorId": "guangchang",
|
||||||
|
@ -1557,90 +1557,116 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"saveData": function () {
|
"saveData": function () {
|
||||||
// 存档操作,此函数应该返回“具体要存档的内容”
|
// 存档操作,此函数应该返回“具体要存档的内容”
|
||||||
|
|
||||||
// 差异化存储values
|
// 差异化存储values
|
||||||
var values = {};
|
var values = {};
|
||||||
for (var key in core.values) {
|
for (var key in core.values) {
|
||||||
if (!core.same(core.values[key], core.data.values[key]))
|
if (!core.same(core.values[key], core.data.values[key]))
|
||||||
values[key] = core.clone(core.values[key]);
|
values[key] = core.clone(core.values[key]);
|
||||||
}
|
}
|
||||||
|
let cg = {}
|
||||||
// 要存档的内容
|
if (core.getFlag("_cgText")) {
|
||||||
var data = {
|
cg.index = core.ui.cgText.index
|
||||||
floorId: core.status.floorId,
|
cg.head = core.ui.cgText.head
|
||||||
hero: core.clone(core.status.hero),
|
cg.name = core.ui.cgText.name
|
||||||
hard: core.status.hard,
|
cg.text = core.ui.cgText.text
|
||||||
maps: core.clone(core.maps.saveMap()),
|
cg.bodyList = core.clone(core.ui.cgText.bodyList)
|
||||||
route: core.encodeRoute(core.status.route),
|
cg.nobg = core.ui.cgText.nobg
|
||||||
values: values,
|
cg.image = core.ui.cgText.image
|
||||||
version: core.firstData.version,
|
cg.time = core.ui.cgText.time
|
||||||
guid: core.getGuid(),
|
cg.WindowSkin = core.ui.cgText.WindowSkin
|
||||||
time: new Date().getTime(),
|
cg.sound = core.ui.cgText.sound
|
||||||
'material': core.clone(core.material.enemys)
|
cg.beforeSound = core.ui.cgText.beforeSound
|
||||||
};
|
cg.wait = core.ui.cgText.wait
|
||||||
return data;
|
cg.memory = core.ui.cgText.memory
|
||||||
},
|
cg.textList = core.ui.cgText.textList
|
||||||
|
cg.page = core.ui.cgText.page
|
||||||
|
cg.overpage = core.ui.cgText.overpage
|
||||||
|
cg.log = core.ui.cgText.log
|
||||||
|
cg.index = core.ui.cgText.index
|
||||||
|
}
|
||||||
|
// 要存档的内容
|
||||||
|
var data = {
|
||||||
|
floorId: core.status.floorId,
|
||||||
|
hero: core.clone(core.status.hero),
|
||||||
|
hard: core.status.hard,
|
||||||
|
maps: core.clone(core.maps.saveMap()),
|
||||||
|
route: core.encodeRoute(core.status.route),
|
||||||
|
values: values,
|
||||||
|
version: core.firstData.version,
|
||||||
|
guid: core.getGuid(),
|
||||||
|
time: new Date().getTime(),
|
||||||
|
cg: cg
|
||||||
|
};
|
||||||
|
return data;
|
||||||
|
},
|
||||||
"loadData": function (data, callback) {
|
"loadData": function (data, callback) {
|
||||||
// 读档操作;从存储中读取了内容后的行为
|
// 读档操作;从存储中读取了内容后的行为
|
||||||
const play = core.status.played;
|
const play = core.status.played;
|
||||||
// 重置游戏和路线
|
// 重置游戏和路线
|
||||||
core.resetGame(
|
core.resetGame(
|
||||||
data.hero,
|
data.hero,
|
||||||
data.hard,
|
data.hard,
|
||||||
data.floorId,
|
data.floorId,
|
||||||
core.maps.loadMap(data.maps, null, data.hero.flags),
|
core.maps.loadMap(data.maps, null, data.hero.flags),
|
||||||
data.values
|
data.values
|
||||||
);
|
);
|
||||||
//如果作者造塔想随时修改怪物属性平衡数值,请注释下面这行。该行作用为保存怪物当前属性,用以储存临时修改的怪物属性。
|
core.status.route = core.decodeRoute(data.route);
|
||||||
core.material.enemys = data.material ?? core.material.enemys;
|
core.control._bindRoutePush();
|
||||||
core.status.route = core.decodeRoute(data.route);
|
// 文字属性,全局属性
|
||||||
core.control._bindRoutePush();
|
core.status.textAttribute = core.getFlag(
|
||||||
// 文字属性,全局属性
|
"textAttribute",
|
||||||
core.status.textAttribute = core.getFlag(
|
core.status.textAttribute
|
||||||
"textAttribute",
|
);
|
||||||
core.status.textAttribute
|
var toAttribute = core.getFlag(
|
||||||
);
|
"globalAttribute",
|
||||||
var toAttribute = core.getFlag(
|
core.status.globalAttribute
|
||||||
"globalAttribute",
|
);
|
||||||
core.status.globalAttribute
|
if (!core.same(toAttribute, core.status.globalAttribute)) {
|
||||||
);
|
core.status.globalAttribute = toAttribute;
|
||||||
if (!core.same(toAttribute, core.status.globalAttribute)) {
|
core.resize();
|
||||||
core.status.globalAttribute = toAttribute;
|
}
|
||||||
core.resize();
|
// 重置音量
|
||||||
}
|
core.events.setVolume(core.getFlag("__volume__", 1), 0);
|
||||||
// 重置音量
|
// 加载勇士图标
|
||||||
core.events.setVolume(core.getFlag("__volume__", 1), 0);
|
var icon = core.status.hero.image;
|
||||||
// 加载勇士图标
|
icon = core.getMappedName(icon);
|
||||||
var icon = core.status.hero.image;
|
if (core.material.images.images[icon]) {
|
||||||
icon = core.getMappedName(icon);
|
core.material.images.hero = core.material.images.images[icon];
|
||||||
if (core.material.images.images[icon]) {
|
core.material.icons.hero.width =
|
||||||
core.material.images.hero = core.material.images.images[icon];
|
core.material.images.images[icon].width / 4;
|
||||||
core.material.icons.hero.width =
|
core.material.icons.hero.height =
|
||||||
core.material.images.images[icon].width / 4;
|
core.material.images.images[icon].height / 4;
|
||||||
core.material.icons.hero.height =
|
}
|
||||||
core.material.images.images[icon].height / 4;
|
core.setFlag("__fromLoad__", true);
|
||||||
}
|
|
||||||
core.setFlag("__fromLoad__", true);
|
|
||||||
|
|
||||||
// TODO:增加自己的一些读档处理
|
// TODO:增加自己的一些读档处理
|
||||||
core.ui.statusBar.clearItemInfo();
|
core.ui.statusBar.clearItemInfo();
|
||||||
core.ui.statusBar.update();
|
core.ui.statusBar.update();
|
||||||
core.plugin.playing.clear();
|
if (core.getFlag("_cgText")) {
|
||||||
// 切换到对应的楼层
|
core.setFlag("_cgText", false)
|
||||||
core.changeFloor(data.floorId, null, data.hero.loc, 0, function () {
|
for (let v in data.cg) {
|
||||||
// TODO:可以在这里设置读档后播放BGM
|
|
||||||
if (core.hasFlag("__bgm__")) {
|
|
||||||
// 持续播放
|
|
||||||
core.playBgm(core.getFlag("__bgm__"));
|
|
||||||
}
|
|
||||||
|
|
||||||
core.removeFlag("__fromLoad__");
|
core.ui.cgText[v] = data.cg[v]
|
||||||
if (!play) core.insertCommonEvent("强制横屏");
|
}
|
||||||
if (callback) callback();
|
core.drawbackground(core.ui.cgText.image, core.ui.cgText.memory)
|
||||||
});
|
}
|
||||||
if (play) core.doAction();
|
core.plugin.playing.clear();
|
||||||
},
|
// 切换到对应的楼层
|
||||||
|
core.changeFloor(data.floorId, null, data.hero.loc, 0, function () {
|
||||||
|
// TODO:可以在这里设置读档后播放BGM
|
||||||
|
if (core.hasFlag("__bgm__")) {
|
||||||
|
// 持续播放
|
||||||
|
core.playBgm(core.getFlag("__bgm__"));
|
||||||
|
}
|
||||||
|
|
||||||
|
core.removeFlag("__fromLoad__");
|
||||||
|
if (!play) core.insertCommonEvent("强制横屏");
|
||||||
|
if (callback) callback();
|
||||||
|
});
|
||||||
|
if (play) core.doAction();
|
||||||
|
},
|
||||||
"getStatusLabel": function (name) {
|
"getStatusLabel": function (name) {
|
||||||
// 返回某个状态英文名的对应中文标签,如atk -> 攻击,def -> 防御等。
|
// 返回某个状态英文名的对应中文标签,如atk -> 攻击,def -> 防御等。
|
||||||
// 请注意此项仅影响 libs/ 下的内容(如绘制怪物手册、数据统计等)
|
// 请注意此项仅影响 libs/ 下的内容(如绘制怪物手册、数据统计等)
|
||||||
|
1862
project/plugins.js
1862
project/plugins.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user