Compare commits

...

1 Commits

Author SHA1 Message Date
59687c3319 tanhaowen 2024-07-15 13:59:51 +08:00
62 changed files with 2060 additions and 710 deletions

View File

@ -259,11 +259,21 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "textarea",
"_data": "初始攻击"
},
"atk2": {
"_leaf": true,
"_type": "textarea",
"_data": "初始攻速"
},
"def": {
"_leaf": true,
"_type": "textarea",
"_data": "初始防御"
},
"def2": {
"_leaf": true,
"_type": "textarea",
"_data": "初始护甲"
},
"mdef": {
"_leaf": true,
"_type": "textarea",

View File

@ -3269,7 +3269,7 @@ control.prototype._doResize = function (obj) {
control.prototype.resize = function () {
if (main.mode == 'editor') return;
var clientWidth = main.dom.body.clientWidth, clientHeight = main.dom.body.clientHeight;
var BORDER = 3;
var BORDER = 0;
var extendToolbar = core.flags.extendToolbar;
let hideLeftStatusBar = core.flags.hideLeftStatusBar;
var BAR_WIDTH = hideLeftStatusBar ? 0 : Math.round(core._PY_ * 0.31);
@ -3297,7 +3297,7 @@ control.prototype.resize = function () {
core.domStyle.availableScale = [];
extendToolbar = false;
hideLeftStatusBar = false;
BAR_WIDTH = Math.round(core._PX_ * 0.3);
BAR_WIDTH = 0//Math.round(core._PX_ * 0.3);
}
var statusDisplayArr = this._shouldDisplayStatus(), count = statusDisplayArr.length;
@ -3314,16 +3314,16 @@ control.prototype.resize = function () {
clientHeight: clientHeight,
BORDER: BORDER,
BAR_WIDTH: BAR_WIDTH,
TOOLBAR_HEIGHT: 38,
TOOLBAR_HEIGHT: 0,
outerWidth: core._PX_ * core.domStyle.scale + 2 * BORDER,
outerHeight: core._PY_ * core.domStyle.scale + 2 * BORDER,
globalAttribute: globalAttribute,
border: '3px ' + core.arrayToRGBA(globalAttribute.borderColor) + ' solid',
border: '0px ' + core.arrayToRGBA(globalAttribute.borderColor) + ' solid',
statusDisplayArr: statusDisplayArr,
count: count,
col: col,
statusBarHeightInVertical: core.domStyle.isVertical ? (32 * col + 6) * core.domStyle.scale + 2 * BORDER : 0,
toolbarHeightInVertical: core.domStyle.isVertical ? 38 * core.domStyle.scale + 2 * BORDER : 0,
statusBarHeightInVertical: 0,//core.domStyle.isVertical ? (32 * col + 6) * core.domStyle.scale + 2 * BORDER : 0,
toolbarHeightInVertical: 0,//core.domStyle.isVertical ? 38 * core.domStyle.scale + 2 * BORDER : 0,
extendToolbar: extendToolbar,
is15x15: false,
hideLeftStatusBar
@ -3332,6 +3332,7 @@ control.prototype.resize = function () {
this._doResize(obj);
this.setToolbarButton();
core.updateStatusBar();
core.AllSprites();
}
control.prototype._resize_gameGroup = function (obj) {
@ -3353,7 +3354,7 @@ control.prototype._resize_gameGroup = function (obj) {
}
gameGroup.style.width = totalWidth + "px";
gameGroup.style.height = totalHeight + "px";
gameGroup.style.left = (obj.clientWidth - totalWidth) / 2 + "px";
gameGroup.style.left = (obj.clientWidth - totalWidth) / 2-((main.replayChecking || !core.status.played||core.domStyle.isVertical)?0:48) + "px";
gameGroup.style.top = (obj.clientHeight - totalHeight) / 2 + "px";
// floorMsgGroup
var floorMsgGroup = core.dom.floorMsgGroup;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -5,14 +5,56 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"sample0",
"sample1",
"sample2",
"MT0"
"MT0",
"MT1",
"MT2"
],
"floorPartitions": [],
"images": [
"0.png",
"1.png",
"2.png",
"3.png",
"4.png",
"5.png",
"6.png",
"7.png",
"8.png",
"9.png",
"Actor05-Strange05.png",
"Star.png",
"a.png",
"atk.png",
"atk2.png",
"b.png",
"backg.png",
"backl.png",
"backl2.png",
"backw.png",
"bear.png",
"bg.jpg",
"box1.png",
"box1Light.png",
"box2.png",
"box2Light.png",
"boxLight.png",
"brave.png",
"c.png",
"def.png",
"def2.png",
"dragon.png",
"exp.png",
"expL.png",
"expLt.png",
"hero.png",
"hp.png",
"key.png",
"lv.png",
"mana.png",
"manaL.png",
"manaLt.png",
"mdef.png",
"money.png",
"winskin.png"
],
"tilesets": [
@ -121,7 +163,11 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
],
"equipName": [
"武器",
"盾牌"
"盾牌",
"饰品",
"饰品",
"饰品",
"饰品"
],
"startBgm": null,
"styles": {
@ -132,26 +178,26 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"statusLeftBackground": "url(project/materials/ground.png) repeat",
"statusTopBackground": "url(project/materials/ground.png) repeat",
"toolsBackground": "black",
"borderColor": [
0,
0,
0,
1
],
"floorChangingStyle": "background-color: black; color: white",
"statusBarColor": [
255,
255,
255,
1
],
"borderColor": [
0,
0,
0,
1
],
"selectColor": [
255,
215,
0,
1
],
"floorChangingStyle": "background-color: black; color: white",
"font": "Verdana"
"font": "Zpix"
},
"splitImages": [
{
@ -165,8 +211,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"firstData": {
"title": "魔塔样板",
"name": "template",
"version": "Ver 2.10.3",
"floorId": "sample0",
"version": "Ver 2.10.0",
"floorId": "MT2",
"hero": {
"image": "hero.png",
"animate": false,
@ -174,8 +220,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"lv": 1,
"hpmax": 9999,
"hp": 1000,
"manamax": -1,
"mana": 0,
"manamax": 100,
"mana": 90,
"atk": 100,
"def": 100,
"mdef": 0,
@ -189,12 +235,14 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
},
"loc": {
"direction": "up",
"x": 6,
"y": 10
"x": 7,
"y": 11
},
"flags": {},
"followers": [],
"steps": 0
"steps": 0,
"atk2": 0,
"def2": 10
},
"startCanvas": [
{
@ -549,12 +597,22 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
}
],
"startText": [
{
"type": "function",
"function": "function(){\nflags._statusgry_ =100;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "function",
"function": "function(){\ncore.addItem('book')\n}"
},
{
"type": "function",
"function": "function(){\ncore.addItem('fly')\n}"
},
{
"type": "comment",
"text": "初始剧情"
},
"Hi欢迎来到 HTML5 魔塔样板!\n\n本样板由艾之葵制作可以让你在不会写任何代码\n的情况下也能做出属于自己的H5魔塔",
"这里游戏开始时的剧情。\n\n你可以在这里写上自己的内容。\n赶快来试一试吧"
}
],
"shops": [
{
@ -705,6 +763,42 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
}
]
},
{
"need": "100",
"title": "",
"action": [
{
"type": "setValue",
"name": "status:atk",
"operator": "+=",
"value": "10"
},
{
"type": "setValue",
"name": "status:def",
"operator": "+=",
"value": "10"
}
]
},
{
"need": "1000",
"title": "",
"action": [
{
"type": "setValue",
"name": "status:atk",
"operator": "+=",
"value": "10"
},
{
"type": "setValue",
"name": "status:def",
"operator": "+=",
"value": "10"
}
]
},
{
"need": "40",
"title": "",
@ -735,7 +829,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"animateSpeed": 300,
"moveSpeed": 100,
"statusCanvasRowsOnMobile": 3,
"floorChangeTime": 100
"floorChangeTime": 0
},
"flags": {
"statusBarItems": [
@ -748,6 +842,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"enableMDef",
"enableMoney",
"enableExp",
"enableLevelUp",
"levelUpLeftMode",
"enableKeys",
"enablePZF",
"enableSkill"

View File

@ -11,35 +11,371 @@ main.floors.MT0=
"images": [],
"ratio": 1,
"map": [
[ 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],
[ 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],
[ 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],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[10136,10137,10138, 0, 0, 0, 0, 0, 20, 20, 20, 20, 20],
[10144,10145,10146, 0, 0, 0, 0, 0, 20,10199,10199,10199, 20],
[10152,10153,10154, 0, 0,10207,10207,10207, 20,10199,10199,10199, 20],
[ 0, 0, 0, 0, 0, 0, 0, 0, 20,10199,10199,10199, 20],
[ 0, 20, 20,10157,10157,10157, 20, 0, 0,10207, 0, 0, 20],
[ 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, 20],
[ 20, 0,10149, 20,10110,10110, 20, 0, 0, 0,10149, 0,10165],
[ 20, 0, 0, 20,152,152, 20,10156, 0, 0, 0, 0,10173],
[ 20, 0, 0, 20, 20, 20, 20, 20, 0,10238, 0, 0,10165],
[ 20, 0,10161,10162, 0, 0, 0, 0, 0, 0, 0, 0,10173],
[ 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 20],
[ 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20],
[ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]
],
"firstArrive": [],
"firstArrive": [
{
"type": "setText",
"background": "winskin.png",
"time": 0
}
],
"parallelDo": "",
"events": {},
"changeFloor": {},
"events": {
"3,4": {
"trigger": null,
"enable": true,
"noPass": null,
"displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 0,
"grayscale": 1,
"invert": false,
"shadow": 0
},
"data": [
{
"type": "choices",
"text": "\t[执杖伯伯]修改状态栏灰度/亮度",
"choices": [
{
"text": "亮度+0.1",
"need": "!flags._statusbrg_||flags._statusbrg_<1.5",
"action": [
{
"type": "function",
"function": "function(){\nflags._statusbrg_ = flags._statusbrg_ + 0.1 || 1.1 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
7,
11
],
"floorId": "sample0"
}
]
},
{
"text": "亮度-0.1",
"need": "!flags._statusbrg_||flags._statusbrg_>0.1",
"action": [
{
"type": "function",
"function": "function(){\nflags._statusbrg_ = flags._statusbrg_ - 0.1 || 0.9 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
7,
11
],
"floorId": "sample0"
}
]
},
{
"text": "灰度+10",
"need": "!flags._statusgry_||flags._statusgry_<100",
"action": [
{
"type": "function",
"function": "function(){\nflags._statusgry_ = flags._statusgry_ + 10 || 10 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
7,
11
],
"floorId": "sample0"
}
]
},
{
"text": "灰度-10",
"need": "flags._statusgry_>10",
"action": [
{
"type": "function",
"function": "function(){\nflags._statusgry_ = flags._statusgry_ - 10 || 0 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
7,
11
],
"floorId": "sample0"
}
]
},
{
"text": "爬",
"color": [
162,
162,
162,
1
],
"action": []
}
]
}
]
},
"4,4": {
"trigger": null,
"enable": true,
"noPass": null,
"displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 240,
"grayscale": 0,
"invert": false,
"shadow": 0
},
"data": [
{
"type": "choices",
"text": "\t[执杖伯伯]修改状态栏色相",
"choices": [
{
"text": "+20",
"action": [
{
"type": "function",
"function": "function(){\nflags._statuscol_ = flags._statuscol_ + 20 || 0 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
8,
11
],
"floorId": "sample0"
}
]
},
{
"text": "-20",
"action": [
{
"type": "function",
"function": "function(){\nflags._statuscol_ = flags._statuscol_ - 20 || 0 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
8,
11
],
"floorId": "sample0"
}
]
},
{
"text": "炫彩",
"condition": "!flags._coltrue_",
"action": [
{
"type": "function",
"function": "function(){\nflags._coltrue_=true\n}"
},
{
"type": "insert",
"loc": [
8,
11
],
"floorId": "sample0"
}
]
},
{
"text": "关闭炫彩",
"condition": "flags._coltrue_",
"action": [
{
"type": "function",
"function": "function(){\nflags._coltrue_=false\n}"
},
{
"type": "insert",
"loc": [
8,
11
],
"floorId": "sample0"
}
]
},
{
"text": "爬",
"color": [
162,
162,
162,
1
],
"action": []
}
]
}
]
},
"5,4": [
{
"type": "choices",
"text": "\t[执杖伯伯]换个背景",
"choices": [
{
"text": "透明+0.1",
"need": "!flags._backalp_||flags._backalp_>0.1",
"action": [
{
"type": "function",
"function": "function(){\nflags._backalp_= flags._backalp_- 0.1 || 0.4;core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
9,
11
],
"floorId": "sample0"
}
]
},
{
"text": "透明-0.1",
"need": "!flags._backalp_||flags._backalp_<0.9",
"action": [
{
"type": "function",
"function": "function(){\nflags._backalp_= flags._backalp_+ 0.1 || 0.6;core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
9,
11
],
"floorId": "sample0"
}
]
},
{
"text": "去掉星空",
"condition": "!flags.starOff",
"action": [
{
"type": "function",
"function": "function(){\nflags.starOff=true\n}"
},
{
"type": "function",
"function": "function(){\ncore.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
9,
11
],
"floorId": "sample0"
}
]
},
{
"text": "加上星空",
"condition": "flags.starOff",
"action": [
{
"type": "function",
"function": "function(){\nflags.starOff=false\n}"
},
{
"type": "function",
"function": "function(){\ncore.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
9,
11
],
"floorId": "sample0"
}
]
},
{
"text": "换个图",
"action": [
"\t[执杖伯伯,wizard]你为什么不自己找一张"
]
},
{
"text": "爬",
"color": [
162,
162,
162,
1
],
"action": []
}
]
}
]
},
"changeFloor": {
"8,10": {
"floorId": ":next",
"stair": "downFloor"
}
},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"cannotMove": {},
"bgmap": [
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153]
],
"fgmap": [
],
"width": 13,
"height": 13,
"autoEvent": {}
"autoEvent": {},
"beforeBattle": {},
"cannotMoveIn": {}
}

65
project/floors/MT1.js Normal file
View File

@ -0,0 +1,65 @@
main.floors.MT1=
{
"floorId": "MT1",
"title": "主塔 1 层",
"name": "1",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"images": [],
"ratio": 1,
"defaultGround": "ground",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {
"7,11": {
"floorId": ":next",
"stair": "downFloor"
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[ 2,152, 2,152, 2,152, 2,152, 2,152,152,152, 2],
[ 2, 28, 21,152, 27, 27, 27,152, 0, 0, 0, 0, 2],
[ 2, 0, 0,152, 28, 28, 28,152, 81, 2,152, 0, 2],
[ 2, 81, 2,152, 2, 83, 2,152, 31, 31,152, 0, 2],
[ 2, 0, 0, 0, 0, 0, 0, 2,152, 2,152, 0, 2],
[ 2, 2, 2,152, 0, 0, 0, 0,152, 21,152, 0, 2],
[ 2, 21, 21,152, 81, 2, 2, 81,152, 0, 0, 0, 2],
[ 2, 2, 81,152, 0, 0, 0, 0,152, 82, 2, 81, 2],
[ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2],
[ 2, 0, 2,152, 84,152, 2, 0, 2, 2, 2, 0, 2],
[ 2, 0,152, 22, 21, 21,152, 0, 2, 22, 2, 0, 2],
[ 2, 34,152, 21, 21, 21,152, 87, 81, 0, 0, 0, 2],
[152,152, 2,152,152,152, 2,152,152,152,152,152, 2]
],
"bgmap": [
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001],
[10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001,10001]
],
"fgmap": [
]
}

60
project/floors/MT2.js Normal file
View File

@ -0,0 +1,60 @@
main.floors.MT2=
{
"floorId": "MT2",
"title": "主塔 2 层",
"name": "2",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"images": [],
"ratio": 1,
"defaultGround": "ground",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[153,153,153,153,153,153,153,153,153,153,153,153,153],
[153, 28, 21,153, 27, 27, 27,153, 0, 0, 0, 0,153],
[153, 0, 27,153, 28, 28, 28,153, 81,153,153, 0,153],
[153, 81,153,153,153, 83,153,153, 31, 31,153, 0,153],
[153, 0, 0, 0, 0, 0, 0,153,153,153,153, 0,153],
[153,153,153,153, 81,153, 0, 0,153, 23,153, 0,153],
[153, 21, 21,153, 0,153,153, 81,153, 0, 0, 0,153],
[153,153, 81,153, 0,153,201, 0,153, 82,153, 81,153],
[153, 0, 0, 0, 0,153, 0, 0, 86,201, 0, 0,153],
[153, 0,153,153, 84,153,153, 0,153,153,153, 0,153],
[153, 0,153, 22, 21, 21,153, 0,153, 22,153, 0,153],
[153, 34,153, 21, 21, 21, 86, 0, 81, 28,153, 32,153],
[153,153,153,153,153,153,153,153,153,153,153,153,153]
],
"bgmap": [
[305,305,305,305,305,305,305,305,305,305,305,305,305],
[305,305,305,305,305,305,305,305,311,305,305,305,305],
[305,305,308,305,305,305,305,305,305,305,305,308,305],
[305,305,305,305,305,305,305,305,305,305,305,305,305],
[305,311,305,305,305,305,308,305,305,305,305,305,305],
[305,305,305,305,311,305,305,305,305,305,305,305,305],
[305,305,305,305,305,305,305,305,305,311,305,305,305],
[305,305,305,305,305,305,311,305,305,305,305,305,305],
[305,311,305,305,305,305,308,305,305,305,305,311,305],
[305,305,305,305,305,305,305,305,305,305,305,305,305],
[305,305,305,305,311,305,305,305,305,305,305,305,305],
[305,305,305,305,305,305,305,305,305,311,305,305,305],
[305,305,305,305,305,305,305,305,305,305,305,305,305]
],
"fgmap": [
]
}

View File

@ -13,16 +13,16 @@ main.floors.sample0=
"map": [
[ 0, 0,220, 0, 0, 20, 87, 3, 58, 59, 60, 61, 64],
[ 0,246, 0,246, 0, 20, 0, 3, 57, 72, 63, 43, 44],
[219, 0, 0, 0,219, 20, 0, 3, 53, 54, 55, 56, 69],
[ 20, 20,125, 20, 20, 20, 0, 3, 49, 50, 51, 52, 68],
[251,247,256,234,248, 6, 0, 3, 35, 36, 46, 47, 48],
[ 6, 6,125, 6, 6, 6, 0, 3, 0, 0, 0, 0, 0],
[208,227,212,216,278, 5, 0, 1, 1, 1,319, 1, 1],
[201,205,217,215,224, 5, 0, 1, 27, 28, 29, 30, 31],
[ 5, 5,125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 26],
[219, 0, 0, 0,219, 20, 54, 3, 53, 54, 55, 56, 69],
[ 20, 20,125, 20, 20, 20, 69, 3, 49, 50, 51, 52, 68],
[251,247,256,234,248, 6, 62, 3, 35, 36, 46, 47, 48],
[ 6, 6,125, 6, 6, 6, 55, 3, 0, 0, 0, 0, 0],
[208,227,212,216,278, 5, 64, 1, 1, 1,319, 1, 1],
[201,205,217,215,224, 5, 42, 1, 27, 28, 29, 30, 31],
[ 5, 5,125, 5, 5, 5, 41, 1, 21, 22, 23, 24, 26],
[ 0, 0,263, 0, 0, 0, 45, 1, 1, 1,121, 1, 1],
[ 4, 4,133, 4, 4, 4, 0, 0, 0, 0, 0, 85,124],
[ 87, 11, 12, 13, 14, 4, 4, 2, 2,122, 2, 2, 2],
[ 4, 4,133, 4, 4,10303, 0, 0, 0, 0, 0, 85,124],
[ 87, 11, 12, 13, 14,10303,10303,125,125,125, 2, 2, 2],
[ 88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86]
],
"firstArrive": [
@ -84,11 +84,107 @@ main.floors.sample0=
}
],
"9,11": [
"\t[老人,trader]\b[this]这些是门,需要对应的钥匙打开。\n机关门必须使用特殊的开法。",
"\t[老人,trader]\b[this]开门后可触发 afterOpenDoor 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
{
"type": "hide",
"time": 500
"type": "choices",
"text": "\t[执杖伯伯]换个背景",
"choices": [
{
"text": "透明+0.1",
"need": "!flags._backalp_||flags._backalp_>0.1",
"action": [
{
"type": "function",
"function": "function(){\nflags._backalp_= flags._backalp_- 0.1 || 0.4;core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
9,
11
],
"floorId": "sample0"
}
]
},
{
"text": "透明-0.1",
"need": "!flags._backalp_||flags._backalp_<0.9",
"action": [
{
"type": "function",
"function": "function(){\nflags._backalp_= flags._backalp_+ 0.1 || 0.6;core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
9,
11
],
"floorId": "sample0"
}
]
},
{
"text": "去掉星空",
"condition": "!flags.starOff",
"action": [
{
"type": "function",
"function": "function(){\nflags.starOff=true\n}"
},
{
"type": "function",
"function": "function(){\ncore.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
9,
11
],
"floorId": "sample0"
}
]
},
{
"text": "加上星空",
"condition": "flags.starOff",
"action": [
{
"type": "function",
"function": "function(){\nflags.starOff=false\n}"
},
{
"type": "function",
"function": "function(){\ncore.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
9,
11
],
"floorId": "sample0"
}
]
},
{
"text": "换个图",
"action": [
"\t[执杖伯伯,wizard]你为什么不自己找一张"
]
},
{
"text": "爬",
"color": [
162,
162,
162,
1
],
"action": []
}
]
}
],
"10,9": [
@ -99,7 +195,213 @@ main.floors.sample0=
"type": "hide",
"time": 500
}
]
],
"8,11": {
"trigger": null,
"enable": true,
"noPass": null,
"displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 240,
"grayscale": 0,
"invert": false,
"shadow": 0
},
"data": [
{
"type": "choices",
"text": "\t[执杖伯伯]修改状态栏色相",
"choices": [
{
"text": "+20",
"action": [
{
"type": "function",
"function": "function(){\nflags._statuscol_ = flags._statuscol_ + 20 || 0 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
8,
11
],
"floorId": "sample0"
}
]
},
{
"text": "-20",
"action": [
{
"type": "function",
"function": "function(){\nflags._statuscol_ = flags._statuscol_ - 20 || 0 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
8,
11
],
"floorId": "sample0"
}
]
},
{
"text": "炫彩",
"condition": "!flags._coltrue_",
"action": [
{
"type": "function",
"function": "function(){\nflags._coltrue_=true\n}"
},
{
"type": "insert",
"loc": [
8,
11
],
"floorId": "sample0"
}
]
},
{
"text": "关闭炫彩",
"condition": "flags._coltrue_",
"action": [
{
"type": "function",
"function": "function(){\nflags._coltrue_=false\n}"
},
{
"type": "insert",
"loc": [
8,
11
],
"floorId": "sample0"
}
]
},
{
"text": "爬",
"color": [
162,
162,
162,
1
],
"action": []
}
]
}
]
},
"7,11": {
"trigger": null,
"enable": true,
"noPass": null,
"displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 0,
"grayscale": 1,
"invert": false,
"shadow": 0
},
"data": [
{
"type": "choices",
"text": "\t[执杖伯伯]修改状态栏灰度/亮度",
"choices": [
{
"text": "亮度+0.1",
"need": "!flags._statusbrg_||flags._statusbrg_<1.5",
"action": [
{
"type": "function",
"function": "function(){\nflags._statusbrg_ = flags._statusbrg_ + 0.1 || 1.1 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
7,
11
],
"floorId": "sample0"
}
]
},
{
"text": "亮度-0.1",
"need": "!flags._statusbrg_||flags._statusbrg_>0.1",
"action": [
{
"type": "function",
"function": "function(){\nflags._statusbrg_ = flags._statusbrg_ - 0.1 || 0.9 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
7,
11
],
"floorId": "sample0"
}
]
},
{
"text": "灰度+10",
"need": "!flags._statusgry_||flags._statusgry_<100",
"action": [
{
"type": "function",
"function": "function(){\nflags._statusgry_ = flags._statusgry_ + 10 || 10 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
7,
11
],
"floorId": "sample0"
}
]
},
{
"text": "灰度-10",
"need": "flags._statusgry_>10",
"action": [
{
"type": "function",
"function": "function(){\nflags._statusgry_ = flags._statusgry_ - 10 || 0 ;core.createSpr0();core.createSprBack();\n}"
},
{
"type": "insert",
"loc": [
7,
11
],
"floorId": "sample0"
}
]
},
{
"text": "爬",
"color": [
162,
162,
162,
1
],
"action": []
}
]
}
]
}
},
"changeFloor": {
"6,0": {

View File

@ -348,7 +348,7 @@ main.floors.sample1=
"operator": "+=",
"value": "10*(status:atk+status:def)"
},
"\t[老人,man]\b[this]再送你500金币1000经验1破2炸3飞",
"\t[老人,man]\b[this]再送你500金币200经验1破2炸3飞",
{
"type": "setValue",
"name": "status:money",
@ -359,7 +359,7 @@ main.floors.sample1=
"type": "setValue",
"name": "status:exp",
"operator": "+=",
"value": "1000"
"value": "200"
},
{
"type": "setValue",
@ -626,5 +626,6 @@ main.floors.sample1=
},
"width": 13,
"height": 13,
"beforeBattle": {}
"beforeBattle": {},
"cannotMoveIn": {}
}

View File

@ -1,8 +1,7 @@
///<reference path='../runtime.d.ts'/>
var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
{
"events": {
"resetGame": function (hero, hard, floorId, maps, values) {
"events": {
"resetGame": function (hero, hard, floorId, maps, values) {
// 重置整个游戏;此函数将在游戏开始时,或者每次读档时最先被调用
// hero勇士信息hard难度floorId当前楼层IDmaps地图信息values全局数值信息
@ -52,7 +51,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 隐藏右下角的音乐按钮
core.dom.musicBtn.style.display = 'none';
},
"win": function (reason, norank, noexit) {
"win": function (reason, norank, noexit) {
// 游戏获胜事件
// 请注意成绩统计时是按照hp进行上传并排名
// 可以先在这里对最终分数进行计算比如将2倍攻击和5倍黄钥匙数量加到分数上
@ -81,7 +80,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
})
});
},
"lose": function (reason) {
"lose": function (reason) {
// 游戏失败事件
core.ui.closePanel();
var replaying = core.isReplaying();
@ -94,7 +93,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
});
})
},
"changingFloor": function (floorId, heroLoc) {
"changingFloor": function (floorId, heroLoc) {
// 正在切换楼层过程中执行的操作;此函数的执行时间是“屏幕完全变黑“的那一刻
// floorId为要切换到的楼层IDheroLoc表示勇士切换到的位置
@ -162,7 +161,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// ...可以新增一些其他内容,比如创建个画布在右上角显示什么内容等等
},
"afterChangeFloor": function (floorId) {
"afterChangeFloor": function (floorId) {
// 转换楼层结束的事件;此函数会在整个楼层切换完全结束后再执行
// floorId是切换到的楼层
@ -181,7 +180,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
}
},
"flyTo": function (toId, callback) {
"flyTo": function (toId, callback) {
// 楼层传送器的使用从当前楼层飞往toId
// 如果不能飞行请返回false
@ -224,7 +223,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
return true;
},
"beforeBattle": function (enemyId, x, y) {
"beforeBattle": function (enemyId, x, y) {
// 战斗前触发的事件,可以加上一些战前特效(详见下面支援的例子)
// 此函数在“检测能否战斗和自动存档”【之后】执行。如果需要更早的战前事件,请在插件中覆重写 core.events.doSystemEvent 函数。
// 返回true则将继续战斗返回false将不再战斗。
@ -255,7 +254,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
return true;
},
"afterBattle": function (enemyId, x, y) {
"afterBattle": function (enemyId, x, y) {
// 战斗结束后触发的事件
var enemy = core.material.enemys[enemyId];
@ -426,7 +425,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
core.clearContinueAutomaticRoute();
},
"afterOpenDoor": function (doorId, x, y) {
"afterOpenDoor": function (doorId, x, y) {
// 开一个门后触发的事件
var todo = [];
@ -447,7 +446,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
else
core.clearContinueAutomaticRoute();
},
"afterGetItem": function (itemId, x, y, isGentleClick) {
"afterGetItem": function (itemId, x, y, isGentleClick) {
// 获得一个道具后触发的事件
// itemId获得的道具IDx和y是该道具所在的坐标
// isGentleClick是否是轻按触发的
@ -469,7 +468,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
if (todo.length > 0) core.insertAction(todo, x, y);
},
"afterPushBox": function () {
"afterPushBox": function () {
// 推箱子后的事件
if (core.searchBlock('box').length == 0) {
// 可以通过if语句来进行开门操作
@ -482,9 +481,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
*/
}
}
},
"enemys": {
"getSpecials": function () {
},
"enemys": {
"getSpecials": function () {
// 获得怪物的特殊属性,每一行定义一个特殊属性。
// 分为五项,第一项为该特殊属性的数字,第二项为特殊属性的名字,第三项为特殊属性的描述
// 第四项为该特殊属性的颜色,可以写十六进制 #RRGGBB 或者 [r,g,b,a] 四元数组
@ -520,7 +519,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
[27, "捕捉", function (enemy) { return "当走到怪物周围" + (enemy.zoneSquare ? "九宫格" : "十字") + "时会强制进行战斗。"; }, "#c0ddbb"]
];
},
"getEnemyInfo": function (enemy, hero, x, y, floorId) {
"getEnemyInfo": function (enemy, hero, x, y, floorId) {
// 获得某个怪物变化后的数据;该函数将被伤害计算和怪物手册使用
// 例如:坚固、模仿、仿攻等等
//
@ -643,7 +642,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
"guards": guards, // 返回支援情况
};
},
"getDamageInfo": function (enemy, hero, x, y, floorId) {
"getDamageInfo": function (enemy, hero, x, y, floorId) {
// 获得战斗伤害信息(实际伤害计算函数)
//
// 参数说明:
@ -801,9 +800,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
"damage": Math.floor(damage)
};
}
},
"actions": {
"onKeyUp": function (keyCode, altKey) {
},
"actions": {
"onKeyUp": function (keyCode, altKey) {
// 键盘按键处理,可以在这里自定义快捷键列表
// keyCode当前按键的keyCode每个键的keyCode自行百度
// altKeyAlt键是否被按下为true代表同时按下了Alt键
@ -954,7 +953,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
},
"onStatusBarClick": function (px, py, vertical) {
"onStatusBarClick": function (px, py, vertical) {
// 点击状态栏时触发的事件,仅在自绘状态栏开启时生效
// px和py为点击的像素坐标
// vertical为录像播放过程中的横竖屏信息
@ -1022,9 +1021,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
*/
}
},
"control": {
"saveData": function () {
},
"control": {
"saveData": function () {
// 存档操作,此函数应该返回“具体要存档的内容”
// 差异化存储values
@ -1049,7 +1048,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
return data;
},
"loadData": function (data, callback) {
"loadData": function (data, callback) {
// 读档操作;从存储中读取了内容后的行为
// 重置游戏和路线
@ -1088,7 +1087,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
if (callback) callback();
});
},
"getStatusLabel": function (name) {
"getStatusLabel": function (name) {
// 返回某个状态英文名的对应中文标签如atk -> 攻击def -> 防御等。
// 请注意此项仅影响 libs/ 下的内容(如绘制怪物手册、数据统计等)
// 自行定义的(比如获得道具效果)中用到的“攻击+3”等需要自己去对应地方修改
@ -1109,7 +1108,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
steps: "步数",
}[name] || name;
},
"triggerDebuff": function (action, type) {
"triggerDebuff": function (action, type) {
// 毒衰咒效果的获得与解除
// action获得还是解除'get'表示获得,'remove'表示解除
// type一个数组表示获得了哪些毒衰咒效果poison, weakcurse
@ -1166,90 +1165,92 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
if (success) core.playSound('回血');
}
},
"updateStatusBar": function () {
// 更新状态栏
"updateStatusBar": function () {
// 更新状态栏
// 检查等级
core.events.checkLvUp();
// 检查等级
core.events.checkLvUp();
// 检查HP上限
if (core.flags.statusBarItems.indexOf('enableHPMax') >= 0) {
core.setStatus('hp', Math.min(core.getRealStatus('hpmax'), core.getStatus('hp')));
}
// 检查HP上限
if (core.flags.statusBarItems.indexOf('enableHPMax') >= 0) {
core.setStatus('hp', Math.min(core.getRealStatus('hpmax'), core.getStatus('hp')));
}
// 设置楼层名
if (core.status.floorId) {
core.setStatusBarInnerHTML('floor', core.status.maps[core.status.floorId].name);
}
// 设置楼层名
if (core.status.floorId) {
//core.setStatusBarInnerHTML('floor', core.status.maps[core.status.floorId].name);
}
// 设置勇士名字和图标
core.setStatusBarInnerHTML('name', core.getStatus('name'));
// 设置等级名称
core.setStatusBarInnerHTML('lv', core.getLvName());
// 设置勇士名字和图标
//core.setStatusBarInnerHTML('name', core.getStatus('name'));
// 设置等级名称
//core.setStatusBarInnerHTML('lv', core.getLvName());
// 设置生命上限、生命值、攻防护盾金币和经验值
var statusList = ['hpmax', 'hp', 'mana', 'atk', 'def', 'mdef', 'money', 'exp'];
statusList.forEach(function (item) {
// 向下取整
core.status.hero[item] = Math.floor(core.status.hero[item]);
// 大数据格式化
core.setStatusBarInnerHTML(item, core.getRealStatus(item));
});
// 设置生命上限、生命值、攻防护盾金币和经验值
var statusList = ['hpmax', 'hp', 'mana', 'atk', 'def', 'mdef', 'money', 'exp'];
statusList.forEach(function (item) {
// 向下取整
core.status.hero[item] = Math.floor(core.status.hero[item]);
// 大数据格式化
//core.setStatusBarInnerHTML(item, core.getRealStatus(item));
});
// 设置魔力值; status:manamax 只有在非负时才生效。
if (core.status.hero.manamax != null && core.getRealStatus('manamax') >= 0) {
core.status.hero.mana = Math.min(core.status.hero.mana, core.getRealStatus('manamax'));
core.setStatusBarInnerHTML('mana', core.status.hero.mana + "/" + core.getRealStatus('manamax'));
} else {
core.setStatusBarInnerHTML("mana", core.status.hero.mana);
}
// 设置技能栏
// 可以用flag:skill表示当前开启的技能类型flag:skillName显示技能名详见文档-个性化-技能塔的支持
core.setStatusBarInnerHTML('skill', core.getFlag('skillName', '无'));
// 设置魔力值; status:manamax 只有在非负时才生效。
if (core.status.hero.manamax != null && core.getRealStatus('manamax') >= 0) {
core.status.hero.mana = Math.min(core.status.hero.mana, core.getRealStatus('manamax'));
//core.setStatusBarInnerHTML('mana', core.status.hero.mana + "/" + core.getRealStatus('manamax'));
} else {
//core.setStatusBarInnerHTML("mana", core.status.hero.mana);
}
// 设置技能栏
// 可以用flag:skill表示当前开启的技能类型flag:skillName显示技能名详见文档-个性化-技能塔的支持
//core.setStatusBarInnerHTML('skill', core.getFlag('skillName', '无'));
// 可以在这里添加自己额外的状态栏信息,比如想攻击显示 +0.5 可以这么写:
// if (core.hasFlag('halfAtk')) core.setStatusBarInnerHTML('atk', core.statusBar.atk.innerText + "+0.5");
// 可以在这里添加自己额外的状态栏信息,比如想攻击显示 +0.5 可以这么写:
// if (core.hasFlag('halfAtk')) core.setStatusBarInnerHTML('atk', core.statusBar.atk.innerText + "+0.5");
// 如果是自定义添加的状态栏,也需要在这里进行设置显示的数值
// 如果是自定义添加的状态栏,也需要在这里进行设置显示的数值
// 进阶
if (core.flags.statusBarItems.indexOf('enableLevelUp') >= 0) {
core.setStatusBarInnerHTML('up', core.formatBigNumber(core.getNextLvUpNeed()) || "");
} else core.setStatusBarInnerHTML('up', "");
// 进阶
if (core.flags.statusBarItems.indexOf('enableLevelUp') >= 0) {
//core.setStatusBarInnerHTML('up', core.formatBigNumber(core.getNextLvUpNeed()) || "");
} else; //core.setStatusBarInnerHTML('up', "");
// 钥匙
var keys = ['yellowKey', 'blueKey', 'redKey', 'greenKey'];
keys.forEach(function (key) {
core.setStatusBarInnerHTML(key, core.setTwoDigits(core.itemCount(key)));
});
// 毒衰咒
core.setStatusBarInnerHTML('poison', core.hasFlag('poison') ? "毒" : "");
core.setStatusBarInnerHTML('weak', core.hasFlag('weak') ? "衰" : "");
core.setStatusBarInnerHTML('curse', core.hasFlag('curse') ? "咒" : "");
// 破炸飞
core.setStatusBarInnerHTML('pickaxe', "破" + core.itemCount('pickaxe'));
core.setStatusBarInnerHTML('bomb', "炸" + core.itemCount('bomb'));
core.setStatusBarInnerHTML('fly', "飞" + core.itemCount('centerFly'));
// 钥匙
var keys = ['yellowKey', 'blueKey', 'redKey', 'greenKey'];
keys.forEach(function (key) {
//core.setStatusBarInnerHTML(key, core.setTwoDigits(core.itemCount(key)));
});
// 毒衰咒
//core.setStatusBarInnerHTML('poison', core.hasFlag('poison') ? "毒" : "");
//core.setStatusBarInnerHTML('weak', core.hasFlag('weak') ? "衰" : "");
//core.setStatusBarInnerHTML('curse', core.hasFlag('curse') ? "咒" : "");
// 破炸飞
//core.setStatusBarInnerHTML('pickaxe', "破" + core.itemCount('pickaxe'));
//core.setStatusBarInnerHTML('bomb', "炸" + core.itemCount('bomb'));
//core.setStatusBarInnerHTML('fly', "飞" + core.itemCount('centerFly'));
// 难度
if (core.statusBar.hard.innerText != core.status.hard) {
core.statusBar.hard.innerText = core.status.hard;
}
var hardColor = core.getFlag('__hardColor__');
if (hardColor == null) core.statusBar.hard.innerText = '';
if (core.statusBar.hard.getAttribute('_style') != hardColor) {
core.statusBar.hard.style.color = hardColor;
core.statusBar.hard.setAttribute('_style', hardColor);
}
// 自定义状态栏绘制
core.drawStatusBar();
// 更新阻激夹域的伤害值
core.updateCheckBlock();
// updateDamage只能在此处执行更新全地图显伤
core.updateDamage();
},
"updateCheckBlock": function (floorId) {
// 难度
if (core.statusBar.hard.innerText != core.status.hard) {
core.statusBar.hard.innerText = core.status.hard;
}
var hardColor = core.getFlag('__hardColor__');
if (hardColor == null) core.statusBar.hard.innerText = '';
if (core.statusBar.hard.getAttribute('_style') != hardColor) {
core.statusBar.hard.style.color = hardColor;
core.statusBar.hard.setAttribute('_style', hardColor);
}
// 自定义状态栏绘制
core.drawStatusBar();
//core.createSpr0();
//core.createSpr1();
core.createSpr2();
// 更新阻激夹域的伤害值
core.updateCheckBlock();
// updateDamage只能在此处执行更新全地图显伤
core.updateDamage();
},
"updateCheckBlock": function (floorId) {
// 领域、夹击、阻击等的伤害值计算
floorId = floorId || core.status.floorId;
if (!floorId || !core.status.maps) return;
@ -1460,70 +1461,73 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
cache: {} // clear cache
};
},
"moveOneStep": function (callback) {
// 勇士每走一步后执行的操作。callback为行走完毕后的回调
// 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。
// 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法:
// 1. 将全塔属性中的cannotMoveDirectly这个开关勾上即可在全塔中全程禁止使用瞬移。
// 2, 将楼层属性中的cannotMoveDirectly这个开关勾上即禁止在该层楼使用瞬移。
// 3. 将flag:cannotMoveDirectly置为true即可使用flag控制在某段剧情范围内禁止瞬移。
"moveOneStep": function (callback) {
// 勇士每走一步后执行的操作。callback为行走完毕后的回调
// 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。
// 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法:
// 1. 将全塔属性中的cannotMoveDirectly这个开关勾上即可在全塔中全程禁止使用瞬移。
// 2, 将楼层属性中的cannotMoveDirectly这个开关勾上即禁止在该层楼使用瞬移。
// 3. 将flag:cannotMoveDirectly置为true即可使用flag控制在某段剧情范围内禁止瞬移。
// 增加步数
core.status.hero.steps++;
// 更新跟随者状态,并绘制
core.updateFollowers();
core.drawHero();
// 检查中毒状态的扣血和死亡
if (core.hasFlag('poison')) {
core.status.hero.statistics.poisonDamage += core.values.poisonDamage;
core.status.hero.hp -= core.values.poisonDamage;
if (core.status.hero.hp <= 0) {
core.status.hero.hp = 0;
core.updateStatusBar(false, true);
core.events.lose();
return;
} else {
core.updateStatusBar(false, true);
}
}
// 增加步数
core.status.hero.steps++;
// 更新跟随者状态,并绘制
core.updateFollowers();
core.drawHero();
// 检查中毒状态的扣血和死亡
//hero.mana--
//core.updateStatusBar()
if (core.hasFlag('poison')) {
core.status.hero.statistics.poisonDamage += core.values.poisonDamage;
core.status.hero.hp -= core.values.poisonDamage;
if (core.status.hero.hp <= 0) {
core.status.hero.hp = 0;
core.updateStatusBar(false, true);
core.events.lose();
return;
} else {
core.updateStatusBar(false, true);
}
}
// 从v2.7开始,每一步行走不会再刷新状态栏。
// 如果有特殊要求如每走一步都加buff之类可手动取消注释下面这一句
// core.updateStatusBar(true, true);
// 从v2.7开始,每一步行走不会再刷新状态栏。
// 如果有特殊要求如每走一步都加buff之类可手动取消注释下面这一句
// core.updateStatusBar(true, true);
//flags._statuscol_ = flags._statuscol_ + 5 || 0
//core.createSpr0();
// 检查自动事件
core.checkAutoEvents();
// 检查自动事件
core.checkAutoEvents();
// ------ 检查目标点事件 ------ //
// 无事件的道具(如血瓶)需要优先于阻激夹域判定
var nowx = core.getHeroLoc('x'),
nowy = core.getHeroLoc('y');
var block = core.getBlock(nowx, nowy);
var hasTrigger = false;
if (block != null && block.event.trigger == 'getItem' &&
!core.floors[core.status.floorId].afterGetItem[nowx + "," + nowy]) {
hasTrigger = true;
core.trigger(nowx, nowy, callback);
}
// 执行目标点的阻激夹域事件
core.checkBlock();
// ------ 检查目标点事件 ------ //
// 无事件的道具(如血瓶)需要优先于阻激夹域判定
var nowx = core.getHeroLoc('x'),
nowy = core.getHeroLoc('y');
var block = core.getBlock(nowx, nowy);
var hasTrigger = false;
if (block != null && block.event.trigger == 'getItem' &&
!core.floors[core.status.floorId].afterGetItem[nowx + "," + nowy]) {
hasTrigger = true;
core.trigger(nowx, nowy, callback);
}
// 执行目标点的阻激夹域事件
core.checkBlock();
// 执行目标点的script和事件
if (!hasTrigger)
core.trigger(nowx, nowy, callback);
// 执行目标点的script和事件
if (!hasTrigger)
core.trigger(nowx, nowy, callback);
// 检查该点是否是滑冰
if (core.onSki()) {
// 延迟到事件最后执行,因为这之前可能有阻激夹域动画
core.insertAction({ "type": "moveAction" }, null, null, null, true);
}
// 检查该点是否是滑冰
if (core.onSki()) {
// 延迟到事件最后执行,因为这之前可能有阻激夹域动画
core.insertAction({ "type": "moveAction" }, null, null, null, true);
}
// ------ 检查目标点事件 END ------ //
// ------ 检查目标点事件 END ------ //
// 如需强行终止行走可以在这里条件判定:
// core.stopAutomaticRoute();
},
"moveDirectly": function (x, y, ignoreSteps) {
// 如需强行终止行走可以在这里条件判定:
// core.stopAutomaticRoute();
},
"moveDirectly": function (x, y, ignoreSteps) {
// 瞬间移动x,y为要瞬间移动的点ignoreSteps为减少的步数可能之前已经被计算过
// 返回true代表成功瞬移false代表没有成功瞬移
@ -1562,26 +1566,32 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
return false;
},
"parallelDo": function (timestamp) {
// 并行事件处理,可以在这里写任何需要并行处理的脚本或事件
// 该函数将被系统反复执行每次执行间隔视浏览器或设备性能而定一般约为16.6ms一次
// 参数timestamp为“从游戏资源加载完毕到当前函数执行时”的时间差以毫秒为单位
"parallelDo": function (timestamp) {
// 并行事件处理,可以在这里写任何需要并行处理的脚本或事件
// 该函数将被系统反复执行每次执行间隔视浏览器或设备性能而定一般约为16.6ms一次
// 参数timestamp为“从游戏资源加载完毕到当前函数执行时”的时间差以毫秒为单位
// 检查当前是否处于游戏开始状态
if (!core.isPlaying()) return;
// 检查当前是否处于游戏开始状态
if (!core.isPlaying()) return;
// 执行当前楼层的并行事件处理
if (core.status.floorId) {
try {
eval(core.floors[core.status.floorId].parallelDo);
} catch (e) {
console.error(e);
}
}
// 执行当前楼层的并行事件处理
if (core.status.floorId) {
try {
eval(core.floors[core.status.floorId].parallelDo);
} catch (e) {
console.error(e);
}
},
"ui": {
"getToolboxItems": function (cls) {
}
if ((!main.replayChecking && core.status.played) && flags._coltrue_) {
flags._statuscol_ = flags._statuscol_ + 5 || 0
core.createSpr0();
core.createSprBack();
}
}
},
"ui": {
"getToolboxItems": function (cls) {
// 获得道具栏中当前某类型道具的显示项和显示顺序
// cls为道具类型只可能是 tools, constants 和 equips
// 返回一个数组,代表当前某类型道具的显示内容和顺序
@ -1591,7 +1601,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
.filter(function (id) { return !core.material.items[id].hideInToolbox; })
.sort( /*function (id1, id2) { return core.material.items[id1].name <= core.material.items[id2].name ? -1 : 1 }*/);
},
"drawStatusBar": function () {
"drawStatusBar": function () {
// 这真的是人能写出来的东西?
var ctx, fill = function (text, x, y, style) {
core.ui.setFont(ctx, (/\w+/.test(text) ? 'italic ' : '') + 'bold 18px Verdana');
@ -1662,7 +1672,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
fill(core.setTwoDigits(core.itemCount('redKey')), 81 + offset, 267, '#FF8888');
}
},
"drawStatistics": function () {
"drawStatistics": function () {
// 浏览地图时参与的统计项目
return [
@ -1678,7 +1688,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 在这里可以增加新的ID来进行统计个数只能增加道具ID
];
},
"drawAbout": function () {
"drawAbout": function () {
// 绘制“关于”界面
core.ui.closePanel();
core.lockControl();
@ -1706,5 +1716,5 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// TODO: 写自己的“关于”页面每次增加32像素即可
core.playSound('打开界面');
}
}
}
}

BIN
project/images/0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
project/images/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
project/images/Star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
project/images/a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
project/images/atk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
project/images/atk2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
project/images/b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
project/images/backg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
project/images/backl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
project/images/backl2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
project/images/backw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
project/images/box1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
project/images/box2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
project/images/boxLight.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
project/images/c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
project/images/def.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
project/images/def2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
project/images/exp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
project/images/expL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/expLt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
project/images/hp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
project/images/key.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
project/images/lv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
project/images/mana.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
project/images/manaL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
project/images/manaLt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
project/images/mdef.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
project/images/money.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -186,7 +186,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"itemEffectTip": ",攻击+40"
},
"sword4": {
"cls": "items",
"cls": "equips",
"name": "圣剑",
"text": "一把很普通的圣剑",
"equip": {
@ -266,7 +266,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"itemEffectTip": ",防御+40"
},
"shield4": {
"cls": "items",
"cls": "equips",
"name": "圣盾",
"text": "一个很普通的圣盾",
"equip": {
@ -324,26 +324,46 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"text": "持有时打败怪物可得双倍金币"
},
"freezeBadge": {
"cls": "constants",
"cls": "equips",
"name": "冰冻徽章",
"text": "可以将面前的熔岩变成平地",
"useItemEffect": "(function () {\n\tvar success = false;\n\n\tvar snowFourDirections = false; // 是否多方向雪花如果是将其改成true\n\tif (snowFourDirections) {\n\t\t// 多方向雪花\n\t\tfor (var direction in core.utils.scan) { // 多方向雪花默认四方向如需改为八方向请将这两个scan改为scan2\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (core.getBlockId(nx, ny) == 'lava') {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (core.getBlockId(core.nextX(), core.nextY()) == 'lava') {\n\t\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\t\tsuccess = true;\n\t\t}\n\t}\n\n\tif (success) {\n\t\tcore.playSound('打开界面');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功', itemId);\n\t} else {\n\t\tcore.playSound('操作失败');\n\t\tcore.drawTip(\"当前无法使用\" + core.material.items[itemId].name, itemId);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n})();",
"canUseItemEffect": "true"
"canUseItemEffect": "true",
"equip": {
"type": "饰品",
"value": {},
"percentage": {}
}
},
"cross": {
"cls": "constants",
"cls": "equips",
"name": "十字架",
"text": "持有后无视怪物的无敌属性"
"text": "持有后无视怪物的无敌属性",
"equip": {
"type": "饰品",
"value": {},
"percentage": {}
}
},
"dagger": {
"cls": "constants",
"cls": "equips",
"name": "屠龙匕首",
"text": "该道具尚未被定义"
"text": "该道具尚未被定义",
"equip": {
"type": "饰品",
"value": {},
"percentage": {}
}
},
"amulet": {
"cls": "constants",
"cls": "equips",
"name": "护符",
"text": "持有时无视负面地形"
"text": "持有时无视负面地形",
"equip": {
"type": "饰品",
"value": {},
"percentage": {}
}
},
"bigKey": {
"cls": "tools",
@ -386,7 +406,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"canUseItemEffect": "true"
},
"centerFly": {
"cls": "tools",
"cls": "constants",
"name": "中心对称飞行器",
"text": "可以飞向当前楼层中心对称的位置",
"useItemEffect": "core.playSound('centerFly.mp3');\ncore.clearMap('hero');\ncore.setHeroLoc('x', core.bigmap.width - 1 - core.getHeroLoc('x'));\ncore.setHeroLoc('y', core.bigmap.height - 1 - core.getHeroLoc('y'));\ncore.drawHero();\ncore.drawTip(core.material.items[itemId].name + '使用成功');",
@ -505,11 +525,16 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"canUseItemEffect": "true"
},
"jumpShoes": {
"cls": "tools",
"cls": "equips",
"name": "跳跃靴",
"text": "能跳跃到前方两格处",
"useItemEffect": "core.playSound(\"跳跃\");\ncore.insertAction({ \"type\": \"jumpHero\", \"loc\": [core.nextX(2), core.nextY(2)] });",
"canUseItemEffect": "(function () {\n\tvar nx = core.nextX(2),\n\t\tny = core.nextY(2);\n\treturn nx >= 0 && nx < core.bigmap.width && ny >= 0 && ny < core.bigmap.height && core.getBlockId(nx, ny) == null;\n})();"
"canUseItemEffect": "(function () {\n\tvar nx = core.nextX(2),\n\t\tny = core.nextY(2);\n\treturn nx >= 0 && nx < core.bigmap.width && ny >= 0 && ny < core.bigmap.height && core.getBlockId(nx, ny) == null;\n})();",
"equip": {
"type": "饰品",
"value": {},
"percentage": {}
}
},
"skill1": {
"cls": "constants",

View File

@ -73,7 +73,7 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"83": {"cls":"animates","id":"redDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"redKey":1}},"name":"红门"},
"84": {"cls":"animates","id":"greenDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"greenKey":1}},"name":"绿门"},
"85": {"cls":"animates","id":"specialDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"specialKey":1}},"name":"机关门"},
"86": {"cls":"animates","id":"steelDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"steelKey":1}},"name":"铁门"},
"86": {"cls":"animates","id":"steelDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{}},"name":"铁门"},
"87": {"cls":"terrains","id":"upFloor","canPass":true},
"88": {"cls":"terrains","id":"downFloor","canPass":true},
"89": {"cls":"animates","id":"portal","canPass":true},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 147 KiB

View File

@ -201,7 +201,7 @@
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
background: url(project/materials/ground.png) repeat;
z-index: 185;
z-index: 1;
display: none;
top: 0;
left: 0;
@ -238,7 +238,7 @@
#toolBar {
position: absolute;
background: url(project/materials/ground.png) repeat;
z-index: 210;
z-index: 1;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;