变更初始事件、cgtext实现方式
This commit is contained in:
parent
a132bb8d16
commit
31f6a76b4b
@ -905,6 +905,8 @@ action
|
||||
| resumeBgm_s
|
||||
| loadBgm_s
|
||||
| freeBgm_s
|
||||
| drawbackground_s
|
||||
| clearbackground_s
|
||||
| playSound_s
|
||||
| playSound_1_s
|
||||
| stopSound_s
|
||||
@ -1137,7 +1139,7 @@ return code;
|
||||
*/;
|
||||
|
||||
cgtext_s
|
||||
: '背景' EvalString? '不使用背景' Bool? '回忆滤镜' Bool? '移除对话框' Bool? '剧情库序列' Int '头像' EvalString?'坐标PX' Number'打字间隔' Int? BGNL? Newline
|
||||
: '剧情cg文本 移除对话框' Bool? '剧情库序列' Int '头像' EvalString?'坐标PX' Number'打字间隔' Int? BGNL? Newline
|
||||
'自动等待时长' Int BGNL? Newline
|
||||
textcgDrawingList+? Newline
|
||||
|
||||
@ -1145,12 +1147,11 @@ cgtext_s
|
||||
/* cgtext_s
|
||||
tooltip : cgtext:显示一段包含cg的文字(剧情)
|
||||
helpUrl : /_docs/#/instruction
|
||||
allImages : ['EvalString_0','EvalString_1']
|
||||
default : ["bg_5043.webp",false,false,false,0,"face_050445.webp",-300,0,2000,"","这句话显示在对话框内",[{ "name":"tati_050145a.webp" , "px": 100,"filter":false }]]
|
||||
var head ='{ "name": "'+EvalString_1+'", "px": '+Number_0+' }'
|
||||
allImages : ['EvalString_0']
|
||||
default : [false,0,"face_050445.webp",-300,0,2000,"","这句话显示在对话框内",[{ "name":"tati_050145a.webp" , "px": 100,"filter":false }]]
|
||||
var head ='{ "name": "'+EvalString_0+'", "px": '+Number_0+' }'
|
||||
var list=',"bodyList": [\n'+textcgDrawingList_0.slice(0,-1)+'\n]'
|
||||
Bool_0=Bool_0?',"nobg":'+Bool_0:''
|
||||
var code = '{"type": "cgtext", "bg":"'+EvalString_0+'"'+Bool_0+',"memory":'+Bool_1+',"WindowSkin":'+Bool_2+',"head":'+head+' ,"index":"'+Int_0+'","time":'+Int_1+',"wait":'+Int_2+list+' },\n';
|
||||
var code = '{"type": "cgtext","WindowSkin":'+Bool_0+',"head":'+head+' ,"index":"'+Int_0+'","time":'+Int_1+',"wait":'+Int_2+list+' },\n';
|
||||
return code;
|
||||
*/;
|
||||
textcgDrawingList
|
||||
@ -1967,6 +1968,34 @@ var code = '{"type": "changebg", "img1": "'+EvalString_0+'","memory1":'+Bool_0+'
|
||||
return code;
|
||||
*/;
|
||||
|
||||
drawbackground_s
|
||||
: '绘制背景' EvalString? '回忆滤镜' Bool? Newline
|
||||
|
||||
|
||||
/* drawbackground_s
|
||||
tooltip : drawbackground 绘制剧情背景
|
||||
helpUrl : /_docs/#/instruction
|
||||
default : ["",false]
|
||||
colour : this.soundColor
|
||||
allImages : ['EvalString_0']
|
||||
var code = '{"type": "drawbackground", "image": "'+EvalString_0+'","memory":'+Bool_0+'},\n';
|
||||
return code;
|
||||
*/;
|
||||
|
||||
clearbackground_s
|
||||
: '清除cg背景' Newline
|
||||
|
||||
|
||||
/* clearbackground_s
|
||||
tooltip : clearbackground: 剧情背景清除
|
||||
helpUrl : /_docs/#/instruction
|
||||
default : []
|
||||
colour : this.soundColor
|
||||
|
||||
var code = '{"type": "clearbackground"},\n';
|
||||
return code;
|
||||
*/;
|
||||
|
||||
drawWarning_s
|
||||
: '警告坐标x' PosString 'y' PosString '缩放倍率'EvalString '文字大小'Int '警告内容' EvalString? '副标题' EvalString? '不播放音效' Bool? Newline
|
||||
|
||||
|
@ -566,9 +566,6 @@ MotaActionParser = function () {
|
||||
return res;
|
||||
};
|
||||
this.next = MotaActionBlocks["cgtext_s"].xmlText([
|
||||
data.bg,
|
||||
data.nobg??false,
|
||||
data.memory,
|
||||
data.WindowSkin,
|
||||
data.index,
|
||||
data.head.name,
|
||||
@ -1994,7 +1991,7 @@ MotaActionParser = function () {
|
||||
this.next,
|
||||
]);
|
||||
break;
|
||||
case "changebg": // 等待多少毫秒
|
||||
case "changebg": // 改变背景
|
||||
this.next = MotaActionBlocks["changebg_s"].xmlText([
|
||||
data.img1 ?? "",
|
||||
data.memory1 ?? false,
|
||||
@ -2005,6 +2002,18 @@ MotaActionParser = function () {
|
||||
this.next,
|
||||
]);
|
||||
break;
|
||||
case "drawbackground": // 绘制背景
|
||||
this.next = MotaActionBlocks["drawbackground_s"].xmlText([
|
||||
data.image ?? "",
|
||||
data.memory ?? false,
|
||||
this.next,
|
||||
]);
|
||||
break;
|
||||
case "clearbackground": // 清除背景
|
||||
this.next = MotaActionBlocks["clearbackground_s"].xmlText([
|
||||
this.next,
|
||||
]);
|
||||
break;
|
||||
case "wait": // 等待用户操作
|
||||
var case_waitList = null;
|
||||
if (data.data) {
|
||||
|
@ -2,6 +2,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
{
|
||||
"main": {
|
||||
"floorIds": [
|
||||
"chushi",
|
||||
"Caimhome",
|
||||
"jiuguan",
|
||||
"KTV",
|
||||
@ -1523,7 +1524,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"title": "秽翼的尤斯蒂娅",
|
||||
"name": "Eustia_text",
|
||||
"version": "鸽子窝造塔小队",
|
||||
"floorId": "jiaocheng01",
|
||||
"floorId": "chushi",
|
||||
"hero": {
|
||||
"image": "hero.webp",
|
||||
"animate": false,
|
||||
@ -1548,7 +1549,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"loc": {
|
||||
"direction": "up",
|
||||
"x": 6,
|
||||
"y": 12
|
||||
"y": 6
|
||||
},
|
||||
"flags": {
|
||||
"itemDetail": true,
|
||||
@ -1949,21 +1950,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
{
|
||||
"type": "insert",
|
||||
"name": "chapter0"
|
||||
},
|
||||
{
|
||||
"type": "confirm",
|
||||
"text": "要进行教程内容吗",
|
||||
"yes": [],
|
||||
"no": [
|
||||
{
|
||||
"type": "changeFloor",
|
||||
"floorId": "guangchang",
|
||||
"loc": [
|
||||
6,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"shops": [
|
||||
|
1009
project/events.js
1009
project/events.js
File diff suppressed because it is too large
Load Diff
@ -27,8 +27,6 @@ main.floors.KTV=
|
||||
},
|
||||
{
|
||||
"type": "cgtext",
|
||||
"bg": "bg_3531.webp",
|
||||
"memory": false,
|
||||
"WindowSkin": false,
|
||||
"head": {
|
||||
"name": "",
|
||||
@ -47,8 +45,6 @@ main.floors.KTV=
|
||||
},
|
||||
{
|
||||
"type": "cgtext",
|
||||
"bg": "bg_3531.webp",
|
||||
"memory": false,
|
||||
"WindowSkin": false,
|
||||
"head": {
|
||||
"name": "",
|
||||
@ -67,8 +63,6 @@ main.floors.KTV=
|
||||
},
|
||||
{
|
||||
"type": "cgtext",
|
||||
"bg": "bg_3531.webp",
|
||||
"memory": false,
|
||||
"WindowSkin": false,
|
||||
"head": {
|
||||
"name": "",
|
||||
@ -87,8 +81,6 @@ main.floors.KTV=
|
||||
},
|
||||
{
|
||||
"type": "cgtext",
|
||||
"bg": "bg_3531.webp",
|
||||
"memory": false,
|
||||
"WindowSkin": false,
|
||||
"head": {
|
||||
"name": "",
|
||||
@ -107,8 +99,6 @@ main.floors.KTV=
|
||||
},
|
||||
{
|
||||
"type": "cgtext",
|
||||
"bg": "bg_3531.webp",
|
||||
"memory": false,
|
||||
"WindowSkin": false,
|
||||
"head": {
|
||||
"name": "",
|
||||
@ -127,8 +117,6 @@ main.floors.KTV=
|
||||
},
|
||||
{
|
||||
"type": "cgtext",
|
||||
"bg": "bg_3531.webp",
|
||||
"memory": false,
|
||||
"WindowSkin": false,
|
||||
"head": {
|
||||
"name": "",
|
||||
@ -147,8 +135,6 @@ main.floors.KTV=
|
||||
},
|
||||
{
|
||||
"type": "cgtext",
|
||||
"bg": "bg_3531.webp",
|
||||
"memory": false,
|
||||
"WindowSkin": false,
|
||||
"head": {
|
||||
"name": "",
|
||||
@ -167,8 +153,6 @@ main.floors.KTV=
|
||||
},
|
||||
{
|
||||
"type": "cgtext",
|
||||
"bg": "bg_3531.webp",
|
||||
"memory": false,
|
||||
"WindowSkin": false,
|
||||
"head": {
|
||||
"name": "",
|
||||
@ -185,6 +169,15 @@ main.floors.KTV=
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "changebg",
|
||||
"img1": "bg_3531.webp",
|
||||
"memory1": false,
|
||||
"img2": "",
|
||||
"memory2": false,
|
||||
"time": 30,
|
||||
"style": "引出"
|
||||
},
|
||||
{
|
||||
"type": "setHeroOpacity",
|
||||
"opacity": 1
|
||||
|
79
project/floors/chushi.js
Normal file
79
project/floors/chushi.js
Normal file
@ -0,0 +1,79 @@
|
||||
main.floors.chushi=
|
||||
{
|
||||
"floorId": "chushi",
|
||||
"title": "抉择",
|
||||
"name": "1",
|
||||
"width": 13,
|
||||
"height": 13,
|
||||
"canFlyTo": true,
|
||||
"canFlyFrom": true,
|
||||
"canUseQuickShop": true,
|
||||
"images": [],
|
||||
"ratio": 1,
|
||||
"defaultGround": "T400",
|
||||
"firstArrive": [
|
||||
{
|
||||
"type": "confirm",
|
||||
"text": "要进行教程内容吗",
|
||||
"yes": [
|
||||
{
|
||||
"type": "changeFloor",
|
||||
"floorId": "jiaocheng01",
|
||||
"loc": [
|
||||
6,
|
||||
12
|
||||
]
|
||||
}
|
||||
],
|
||||
"no": [
|
||||
{
|
||||
"type": "changeFloor",
|
||||
"floorId": "guangchang",
|
||||
"loc": [
|
||||
6,
|
||||
10
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"eachArrive": [],
|
||||
"parallelDo": "",
|
||||
"events": {},
|
||||
"changeFloor": {},
|
||||
"beforeBattle": {},
|
||||
"afterBattle": {},
|
||||
"afterGetItem": {},
|
||||
"afterOpenDoor": {},
|
||||
"autoEvent": {},
|
||||
"cannotMove": {},
|
||||
"cannotMoveIn": {},
|
||||
"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]
|
||||
],
|
||||
"areas": "抉择",
|
||||
"bgmap": [
|
||||
|
||||
],
|
||||
"fgmap": [
|
||||
|
||||
],
|
||||
"bg2map": [
|
||||
|
||||
],
|
||||
"fg2map": [
|
||||
|
||||
]
|
||||
}
|
@ -1724,6 +1724,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
}
|
||||
},
|
||||
"updateStatusBar": function () {
|
||||
if (!core.control.noAutoEvents) core.checkAutoEvents()
|
||||
// 更新状态栏
|
||||
core.ui.statusBar.update();
|
||||
// 更新阻激夹域的伤害值
|
||||
|
@ -120,7 +120,8 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
|
||||
"T364": 88,
|
||||
"T365": 89,
|
||||
"T397": 90,
|
||||
"T399": 91
|
||||
"T399": 91,
|
||||
"T400": 92
|
||||
},
|
||||
"animates": {
|
||||
"star": 0,
|
||||
|
@ -298,6 +298,7 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
"397": {"cls":"items","id":"postman"},
|
||||
"398": {"cls":"terrains","id":"T397"},
|
||||
"399": {"cls":"terrains","id":"T399"},
|
||||
"400": {"cls":"terrains","id":"T400"},
|
||||
"20034": {"cls":"tileset","id":"X20034","canPass":true},
|
||||
"20154": {"cls":"tileset","id":"X20154","canPass":true},
|
||||
"20216": {"cls":"tileset","id":"X20216","canPass":true},
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
@ -29,6 +29,24 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
core.removeMouse(data.div);
|
||||
core.doAction();
|
||||
});
|
||||
core.registerEvent("drawbackground", function (data) {
|
||||
if (!main.replayChecking && !core.isReplaying()) {
|
||||
core.drawbackground(data.image, data.memory);
|
||||
core.ui.cgText.image = data.image;
|
||||
core.ui.cgText.memory = data.memory;
|
||||
} else {
|
||||
core.doAction();
|
||||
}
|
||||
});
|
||||
core.registerEvent("clearbackground", function (data) {
|
||||
if (!main.replayChecking && !core.isReplaying()) {
|
||||
core.clearbackground();
|
||||
core.ui.cgText.image = "";
|
||||
} else {
|
||||
|
||||
core.doAction();
|
||||
}
|
||||
});
|
||||
core.registerEvent("addPop", function (data) {
|
||||
if (!main.replayChecking && !core.isReplaying()) {
|
||||
data.value = core.replaceText(data.value);
|
||||
@ -103,6 +121,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
data.time,
|
||||
data.style
|
||||
);
|
||||
if (data.style === "引出") { core.ui.cgText.image = ""; } else {} core.ui.cgText.image = data.img2;
|
||||
core.ui.cgText.memory = data.memory2;
|
||||
} else {
|
||||
core.doAction();
|
||||
}
|
||||
@ -196,9 +216,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
});
|
||||
core.registerEvent("cgtext", function (data) {
|
||||
if (!main.replayChecking && !core.isReplaying()) {
|
||||
core.ui.cgText.image = data.bg;
|
||||
core.ui.cgText.nobg = data.nobg ?? false;
|
||||
core.ui.cgText.memory = data.memory;
|
||||
|
||||
core.ui.cgText.head = core.clone(data.head);
|
||||
core.ui.cgText.index = data.index;
|
||||
core.ui.cgText.name = core.ui.cgText.textList[data.index][0];
|
||||
@ -11613,18 +11631,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
* @type {{[EvnetName:actionParserJson]}}
|
||||
*/
|
||||
events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate = {
|
||||
检测音乐如果没有开启则系统提示开启: [
|
||||
{
|
||||
检测音乐如果没有开启则系统提示开启: [{
|
||||
type: "if",
|
||||
condition: "!core.musicStatus.bgmStatus",
|
||||
true: [
|
||||
"\t[系统提示]你当前音乐处于关闭状态,本塔开音乐游戏效果更佳",
|
||||
],
|
||||
false: [],
|
||||
},
|
||||
],
|
||||
仿新新魔塔一次性商人: [
|
||||
{
|
||||
}, ],
|
||||
仿新新魔塔一次性商人: [{
|
||||
type: "if",
|
||||
condition: "switch:A",
|
||||
true: [
|
||||
@ -11639,16 +11654,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
time: 250,
|
||||
},
|
||||
],
|
||||
false: [
|
||||
{
|
||||
false: [{
|
||||
type: "confirm",
|
||||
text: "我有3把黄钥匙,\n你出50金币就卖给你。",
|
||||
yes: [
|
||||
{
|
||||
yes: [{
|
||||
type: "if",
|
||||
condition: "status:money>=50",
|
||||
true: [
|
||||
{
|
||||
true: [{
|
||||
type: "setValue",
|
||||
name: "status:money",
|
||||
operator: "-=",
|
||||
@ -11671,22 +11683,17 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
value: "true",
|
||||
},
|
||||
],
|
||||
false: [
|
||||
{
|
||||
false: [{
|
||||
type: "playSound",
|
||||
name: "操作失败",
|
||||
},
|
||||
"\t[行商,trader]\b[this]你的金币不足!",
|
||||
],
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
no: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
全地图选中一个点: [
|
||||
{
|
||||
}, ],
|
||||
}, ],
|
||||
全地图选中一个点: [{
|
||||
type: "comment",
|
||||
text: "全地图选中一个点,需要用鼠标或触屏操作",
|
||||
},
|
||||
@ -11707,8 +11714,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
{
|
||||
type: "while",
|
||||
condition: "true",
|
||||
data: [
|
||||
{
|
||||
data: [{
|
||||
type: "drawSelector",
|
||||
image: "winskin.webp",
|
||||
code: 1,
|
||||
@ -11723,16 +11729,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
{
|
||||
type: "if",
|
||||
condition: "(flag:type === 1)",
|
||||
true: [
|
||||
{
|
||||
true: [{
|
||||
type: "if",
|
||||
condition: "((temp:X===flag:x)&&(temp:Y===flag:y))",
|
||||
true: [
|
||||
{
|
||||
true: [{
|
||||
type: "break",
|
||||
n: 1,
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
},
|
||||
{
|
||||
type: "setValue",
|
||||
@ -11762,8 +11765,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
loc: ["temp:X", "temp:Y"],
|
||||
},
|
||||
],
|
||||
多阶段Boss战斗: [
|
||||
{
|
||||
多阶段Boss战斗: [{
|
||||
type: "comment",
|
||||
text: "多阶段boss,请直接作为战后事件使用",
|
||||
},
|
||||
@ -11776,11 +11778,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
{
|
||||
type: "switch",
|
||||
condition: "switch:A",
|
||||
caseList: [
|
||||
{
|
||||
caseList: [{
|
||||
case: "1",
|
||||
action: [
|
||||
{
|
||||
action: [{
|
||||
type: "setBlock",
|
||||
number: "redSlime",
|
||||
},
|
||||
@ -11789,8 +11789,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
},
|
||||
{
|
||||
case: "2",
|
||||
action: [
|
||||
{
|
||||
action: [{
|
||||
type: "setBlock",
|
||||
number: "blackSlime",
|
||||
},
|
||||
@ -11799,8 +11798,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
},
|
||||
{
|
||||
case: "3",
|
||||
action: [
|
||||
{
|
||||
action: [{
|
||||
type: "setBlock",
|
||||
number: "slimelord",
|
||||
},
|
||||
@ -12054,8 +12052,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
],
|
||||
"event"
|
||||
),
|
||||
MotaActionFunctions.actionParser.parse(
|
||||
{
|
||||
MotaActionFunctions.actionParser.parse({
|
||||
condition: "flag:__door__===2",
|
||||
currentFloor: true,
|
||||
priority: 0,
|
||||
@ -12067,17 +12064,14 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
),
|
||||
MotaActionBlocks["changeFloor_m"].xmlText(),
|
||||
MotaActionFunctions.actionParser.parse(
|
||||
[
|
||||
{
|
||||
[{
|
||||
id: "shop1",
|
||||
text: "\t[贪婪之神,moneyShop]勇敢的武士啊, 给我${20+2*flag:shop1}金币就可以:",
|
||||
textInList: "1F金币商店",
|
||||
choices: [
|
||||
{
|
||||
choices: [{
|
||||
text: "生命+800",
|
||||
need: "status:money>=20+2*flag:shop1",
|
||||
action: [
|
||||
{
|
||||
action: [{
|
||||
type: "comment",
|
||||
text: "新版商店中需要手动扣减金币和增加访问次数",
|
||||
},
|
||||
@ -12100,8 +12094,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
value: "800",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
},
|
||||
{
|
||||
id: "itemShop",
|
||||
@ -12127,26 +12120,25 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
MotaActionBlocks["eachArrive_m"].xmlText(),
|
||||
MotaActionBlocks["level_m"].xmlText(),
|
||||
MotaActionFunctions.actionParser.parse(
|
||||
[["MTx", ""]],
|
||||
[
|
||||
["MTx", ""]
|
||||
],
|
||||
"floorPartition"
|
||||
),
|
||||
MotaActionBlocks["commonEvent_m"].xmlText(),
|
||||
MotaActionBlocks["item_m"].xmlText(),
|
||||
MotaActionFunctions.actionParser.parse(
|
||||
[
|
||||
{
|
||||
[{
|
||||
title: "简单",
|
||||
name: "Easy",
|
||||
hard: 1,
|
||||
action: [
|
||||
{ type: "comment", text: "在这里写该难度需执行的事件" },
|
||||
],
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
"levelChoose"
|
||||
),
|
||||
MotaActionFunctions.actionParser.parse(
|
||||
{
|
||||
MotaActionFunctions.actionParser.parse({
|
||||
type: 0,
|
||||
value: { atk: 10 },
|
||||
percentage: { speed: 10 },
|
||||
@ -12154,18 +12146,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
"equip"
|
||||
),
|
||||
MotaActionFunctions.actionParser.parse(
|
||||
[
|
||||
{
|
||||
[{
|
||||
name: "bg.webp",
|
||||
x: 0,
|
||||
y: 0,
|
||||
canvas: "bg",
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
"floorImage"
|
||||
),
|
||||
MotaActionFunctions.actionParser.parse(
|
||||
{
|
||||
MotaActionFunctions.actionParser.parse({
|
||||
time: 160,
|
||||
openSound: "door.opus",
|
||||
closeSound: "door.opus",
|
||||
@ -12175,8 +12164,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
),
|
||||
MotaActionBlocks["faceIds_m"].xmlText(),
|
||||
MotaActionBlocks["mainStyle_m"].xmlText(),
|
||||
MotaActionFunctions.actionParser.parse(
|
||||
{
|
||||
MotaActionFunctions.actionParser.parse({
|
||||
背景音乐: "bgm.opus",
|
||||
确定: "confirm.opus",
|
||||
攻击: "attack.opus",
|
||||
@ -12198,14 +12186,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
"\t[小妖精,fairy]\f[fairy.webp,0,0]欢迎使用事件编辑器(双击方块可直接预览)"
|
||||
),
|
||||
MotaActionBlocks["over_s"].xmlText(),
|
||||
MotaActionFunctions.actionParser.parseList([
|
||||
{
|
||||
MotaActionFunctions.actionParser.parseList([{
|
||||
type: "overlist",
|
||||
image: "bg_5043.webp",
|
||||
memory: false,
|
||||
hidetime: 30,
|
||||
list: [
|
||||
{
|
||||
list: [{
|
||||
text: "",
|
||||
sound: "",
|
||||
time: 50,
|
||||
@ -12213,13 +12199,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
boldColor: "0,0,0,1",
|
||||
font: "bold 48px Verdana",
|
||||
frame: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
]),
|
||||
}, ],
|
||||
}, ]),
|
||||
MotaActionBlocks["cgtextList_s"].xmlText(),
|
||||
MotaActionFunctions.actionParser.parseList([
|
||||
{
|
||||
MotaActionFunctions.actionParser.parseList([{
|
||||
type: "cgtext",
|
||||
bg: "bg_5043.webp",
|
||||
memory: false,
|
||||
@ -12234,8 +12217,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
bodyList: [
|
||||
{ name: "tati_050145a.webp", px: 100, filter: false },
|
||||
],
|
||||
},
|
||||
]),
|
||||
}, ]),
|
||||
MotaActionBlocks["moveTextBox_s"].xmlText(),
|
||||
MotaActionBlocks["clearTextBox_s"].xmlText(),
|
||||
MotaActionBlocks["comment_s"].xmlText(),
|
||||
@ -12329,20 +12311,17 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
MotaActionFunctions.actionParser.parseList({
|
||||
type: "switch",
|
||||
condition: "判别值",
|
||||
caseList: [
|
||||
{
|
||||
caseList: [{
|
||||
action: [
|
||||
{ type: "comment", text: "当判别值是值的场合执行此事件" },
|
||||
],
|
||||
},
|
||||
{
|
||||
case: "default",
|
||||
action: [
|
||||
{
|
||||
action: [{
|
||||
type: "comment",
|
||||
text: "当没有符合的值的场合执行default事件",
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
},
|
||||
],
|
||||
}),
|
||||
@ -12375,40 +12354,35 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
MotaActionBlocks["setcgs_s"].xmlText(),
|
||||
MotaActionBlocks["setmusics_s"].xmlText(),
|
||||
MotaActionBlocks["changebg_s"].xmlText(),
|
||||
MotaActionBlocks["drawbackground_s"].xmlText(),
|
||||
MotaActionBlocks["clearbackground_s"].xmlText(),
|
||||
MotaActionFunctions.actionParser.parseList({
|
||||
type: "wait",
|
||||
timeout: 0,
|
||||
data: [
|
||||
{
|
||||
data: [{
|
||||
case: "keyboard",
|
||||
keycode: "13,32",
|
||||
action: [
|
||||
{
|
||||
action: [{
|
||||
type: "comment",
|
||||
text: "当按下回车(keycode=13)或空格(keycode=32)时执行此事件\n超时剩余时间会写入flag:timeout",
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
},
|
||||
{
|
||||
case: "mouse",
|
||||
px: [0, 32],
|
||||
py: [0, 32],
|
||||
action: [
|
||||
{
|
||||
action: [{
|
||||
type: "comment",
|
||||
text: "当点击地图左上角时执行此事件\n超时剩余时间会写入flag:timeout",
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
},
|
||||
{
|
||||
case: "condition",
|
||||
condition: "flag:type==0\n&&flag:keycode==13",
|
||||
action: [
|
||||
{
|
||||
action: [{
|
||||
type: "comment",
|
||||
text: "当满足自定义条件时会执行此事件\n超时剩余时间会写入flag:timeout",
|
||||
},
|
||||
],
|
||||
}, ],
|
||||
},
|
||||
{
|
||||
case: "timeout",
|
||||
@ -12625,10 +12599,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
var list = toolboxObj["入口方块"];
|
||||
var xmlList = [];
|
||||
var eventType =
|
||||
(editor_blockly.isCommonEntry()
|
||||
? "common"
|
||||
: editor_blockly.entryType) + "_m";
|
||||
for (var ii = 0, blockText; (blockText = list[ii]); ii++) {
|
||||
(editor_blockly.isCommonEntry() ?
|
||||
"common" :
|
||||
editor_blockly.entryType) + "_m";
|
||||
for (var ii = 0, blockText;
|
||||
(blockText = list[ii]); ii++) {
|
||||
if (
|
||||
new RegExp('<block type="' + eventType + '">').exec(blockText)
|
||||
) {
|
||||
@ -12683,14 +12658,16 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
var mousewheelOffsetValue =
|
||||
(20 / 380) * workspace.scrollbar[hvScroll].handleLength_ * 3;
|
||||
workspace.scrollbar[hvScroll].handlePosition_ +=
|
||||
(e.deltaY || 0) + (e.detail || 0) > 0
|
||||
? mousewheelOffsetValue
|
||||
: -mousewheelOffsetValue;
|
||||
(e.deltaY || 0) + (e.detail || 0) > 0 ?
|
||||
mousewheelOffsetValue :
|
||||
-mousewheelOffsetValue;
|
||||
workspace.scrollbar[hvScroll].onScroll_();
|
||||
// workspace.setScale(workspace.scale);
|
||||
};
|
||||
|
||||
var doubleClickCheck = [[0, "abc"]];
|
||||
var doubleClickCheck = [
|
||||
[0, "abc"]
|
||||
];
|
||||
|
||||
function omitedcheckUpdateFunction(event) {
|
||||
if (event.type === "create") {
|
||||
@ -12774,7 +12751,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
">"
|
||||
);
|
||||
if (!inputs) inputs = [];
|
||||
for (var ii = 0, inputType; (inputType = rule.argsType[ii]); ii++) {
|
||||
for (var ii = 0, inputType;
|
||||
(inputType = rule.argsType[ii]); ii++) {
|
||||
var input = inputs[ii];
|
||||
var _input = "";
|
||||
var noinput = input === null || input === undefined;
|
||||
@ -15748,7 +15726,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
// 在此增加新插件
|
||||
const cg = document.createElement("canvas"); //cg画布设置
|
||||
cg.style.position = "absolute";
|
||||
cg.style.zIndex = 300;
|
||||
cg.style.zIndex = 320;
|
||||
cg.style.display = "none";
|
||||
cg.id = "cgText";
|
||||
main.dom.gameGroup.insertAdjacentElement("afterend", cg);
|
||||
@ -15759,7 +15737,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
main.dom.cgText = cg;
|
||||
const logcanvas = document.createElement("canvas"); //cg画布设置
|
||||
logcanvas.style.position = "absolute";
|
||||
logcanvas.style.zIndex = 301;
|
||||
logcanvas.style.zIndex = 321;
|
||||
logcanvas.style.display = "none";
|
||||
logcanvas.id = "cgText";
|
||||
main.dom.gameGroup.insertAdjacentElement("afterend", logcanvas);
|
||||
@ -16267,7 +16245,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
|
||||
update() {
|
||||
this.background();
|
||||
this.background()
|
||||
if (this.log) this.logdraw(this.page);
|
||||
}
|
||||
logdraw(page) {
|
||||
@ -16435,9 +16413,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
core.ui._buildFont(66, true)
|
||||
);
|
||||
}
|
||||
background() {
|
||||
const img = core.material.images.images?.[this.image];
|
||||
|
||||
background() {
|
||||
if (core.domStyle.isVertical) {
|
||||
ctx.canvas.width = 1248;
|
||||
ctx.canvas.height = 2028;
|
||||
@ -16448,16 +16425,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
ctx.canvas.width = 2028;
|
||||
ctx.canvas.height = 1248;
|
||||
}
|
||||
if (this.nobg) {} else {
|
||||
if (img) {
|
||||
//绘制背景
|
||||
if (this.memory) ctx.filter = "sepia(50%)";
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248);
|
||||
ctx.filter = "none";
|
||||
} else {
|
||||
core.fillRect(ctx, 0, 0, 2028, 1248);
|
||||
}
|
||||
}
|
||||
|
||||
this.bodyList.forEach((v) => {
|
||||
//绘制立绘
|
||||
const body = core.material.images.images?.[v.name];
|
||||
@ -16766,8 +16734,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
image,
|
||||
memory,
|
||||
hidetime = 30,
|
||||
list = [
|
||||
{
|
||||
list = [{
|
||||
text: "",
|
||||
sound: "",
|
||||
time: 50,
|
||||
@ -16775,8 +16742,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
boldColor: "#000000",
|
||||
font: "bold 48px Verdana",
|
||||
frame: 0,
|
||||
},
|
||||
]
|
||||
}, ]
|
||||
) {
|
||||
if (!core.isPlaying()) {
|
||||
return core.doAction();
|
||||
@ -17062,7 +17028,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
ctx.restore();
|
||||
if (globalAlpha1 >= time) {
|
||||
core.unregisterAnimationFrame("bgin");
|
||||
over.style.display = "none";
|
||||
|
||||
core.doAction();
|
||||
}
|
||||
}
|
||||
@ -17144,15 +17110,46 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
ctx.restore();
|
||||
if (globalAlpha2 <= 0 || globalAlpha1 >= time) {
|
||||
core.unregisterAnimationFrame("changebg");
|
||||
over.style.display = "none";
|
||||
|
||||
core.doAction();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
};
|
||||
this.drawbackground = function (image, memory) {
|
||||
const img = core.material.images.images?.[this.image];
|
||||
over.style.display = "block";
|
||||
if (core.domStyle.isVertical) {
|
||||
ctx.canvas.width = 1248;
|
||||
ctx.canvas.height = 2028;
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0); //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2); //旋转90度
|
||||
} else {
|
||||
ctx.canvas.width = 2028;
|
||||
ctx.canvas.height = 1248;
|
||||
}
|
||||
|
||||
if (img) {
|
||||
//绘制背景
|
||||
if (memory) ctx.filter = "sepia(70%)";
|
||||
ctx.drawImage(img, 0, 0, 2028, 1248);
|
||||
ctx.filter = "none";
|
||||
} else {
|
||||
core.fillRect(ctx, 0, 0, 2028, 1248);
|
||||
}
|
||||
ctx.restore();
|
||||
core.doAction();
|
||||
}
|
||||
this.clearbackground = function () {
|
||||
|
||||
over.style.display = "none";
|
||||
core.doAction();
|
||||
}
|
||||
},
|
||||
"回合制boss战": function () {
|
||||
// 在此增加新插件
|
||||
@ -19702,7 +19699,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
|
||||
if (farme > allFarme) {
|
||||
core.unregisterAnimationFrame("animationDrawable");
|
||||
over.style.display = "none";
|
||||
|
||||
core.doAction();
|
||||
}
|
||||
}
|
||||
@ -23673,11 +23670,26 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
//////存读档界面更新
|
||||
class SL {
|
||||
constructor() {
|
||||
this.index = -1;
|
||||
this.refresh = false
|
||||
this.index = 0;
|
||||
this.refresh = false;
|
||||
this.page = 0;
|
||||
this.max_page = 1000
|
||||
|
||||
}
|
||||
update() {
|
||||
core.clearMap(ctx)
|
||||
core.ui._drawSLPanel_draw(this.page, this.max_page)
|
||||
}
|
||||
setIndex(index = this.index, refresh = this.refresh) {
|
||||
this.index = index
|
||||
this.refresh = refresh
|
||||
}
|
||||
setPage(page = this.page) {
|
||||
this.page = page
|
||||
}
|
||||
setMax_page(max_page = this.max_page) {
|
||||
this.max_page = max_page
|
||||
}
|
||||
update() {}
|
||||
set() {}
|
||||
}
|
||||
core.saveLoad = new SL()
|
||||
////// 绘制存档/读档界面 //////
|
||||
@ -23703,8 +23715,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
last_page = core.status.event.data.page;
|
||||
mode = core.status.event.data.mode;
|
||||
}
|
||||
core.saveLoad.setIndex(index, refresh)
|
||||
core.saveLoad.setPage(page)
|
||||
core.saveLoad.setMax_page(max_page)
|
||||
core.status.event.data = { 'page': page, 'offset': offset, 'mode': mode };
|
||||
core.status.event.ui = core.status.event.ui || [];
|
||||
saveLoad.style.display = "block"
|
||||
if (refresh || page != last_page) {
|
||||
core.status.event.ui = [];
|
||||
this._drawSLPanel_loadSave(page, function () {
|
||||
@ -23714,34 +23730,94 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
|
||||
ui.prototype._drawSLPanel_draw = function (page, max_page) {
|
||||
if (core.domStyle.isVertical) {
|
||||
ctx.canvas.width = 1248;
|
||||
ctx.canvas.height = 2028;
|
||||
ctx.save(); //保存设置
|
||||
ctx.translate(1248, 0); //重新定位右上角为基准
|
||||
ctx.rotate(Math.PI / 2); //旋转90度
|
||||
} else {
|
||||
ctx.canvas.width = 2028;
|
||||
ctx.canvas.height = 1248;
|
||||
}
|
||||
// --- 绘制背景
|
||||
this._drawSLPanel_drawBackground();
|
||||
|
||||
// --- 绘制文字
|
||||
core.ui.drawPagination(page + 1, max_page);
|
||||
core.setTextAlign('ui', 'center');
|
||||
var bottom = core._PY_ - 13;
|
||||
core.fillText('ui', '返回游戏', core._PX_ - 48, bottom, '#DDDDDD', this._buildFont(15, true));
|
||||
core.setTextAlign(ctx, 'center');
|
||||
|
||||
var bottom = 1248 - 39;
|
||||
core.fillText(ctx, '返回游戏', 1850, bottom, '#DDDDDD', this._buildFont(45, true));
|
||||
|
||||
if (core.status.event.selection)
|
||||
core.setFillStyle('ui', '#FF6A6A');
|
||||
core.setFillStyle(ctx, '#FF6A6A');
|
||||
if (core.status.event.id == 'save')
|
||||
core.fillText('ui', '删除模式', 48, bottom);
|
||||
core.fillText(ctx, '删除模式', 1300, bottom);
|
||||
else {
|
||||
if (core.status.event.data.mode == 'all') {
|
||||
core.fillText('ui', '[E]显示收藏', 52, bottom);
|
||||
} else {
|
||||
core.fillText('ui', '[E]显示全部', 52, bottom);
|
||||
|
||||
core.fillText(ctx, '收藏', 100, 800, core.status.event.data.mode == 'all' ? "#DDDDDD" : "#DDDD44");
|
||||
|
||||
core.fillText(ctx, '全部', 100, 400, core.status.event.data.mode == 'all' ? "#DDDD44" : "#DDDDDD");
|
||||
|
||||
}
|
||||
if (core.status.event.id !== 'save') {
|
||||
ctx.strokeStyle = "#DDDDDD";
|
||||
ctx.lineWidth = 6
|
||||
ctx.beginPath();
|
||||
|
||||
ctx.moveTo(60, 624)
|
||||
if (core.status.event.data.mode == 'all') {
|
||||
ctx.arcTo(60, 624, 30, 624, 60)
|
||||
ctx.lineTo(30, 994)
|
||||
ctx.arcTo(30, 994, 60, 1024, 30)
|
||||
ctx.lineTo(200, 1024)
|
||||
ctx.lineTo(200, 624)
|
||||
ctx.stroke()
|
||||
ctx.strokeStyle = "#DDDD44"
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(200, 624)
|
||||
ctx.lineTo(60, 624)
|
||||
ctx.arcTo(60, 624, 30, 594, 30)
|
||||
ctx.lineTo(30, 254)
|
||||
ctx.arcTo(30, 254, 60, 224, 30)
|
||||
ctx.lineTo(200, 224)
|
||||
ctx.stroke()
|
||||
} else {
|
||||
ctx.lineTo(60, 624)
|
||||
ctx.arc(60, 654, 30, Math.PI / 2, Math.PI)
|
||||
ctx.lineTo(30, 254)
|
||||
ctx.arc(60, 254, 30, 3 / 2 * Math.PI, 2 * Math.PI)
|
||||
ctx.lineTo(200, 224)
|
||||
ctx.lineTo(200, 624)
|
||||
ctx.stroke()
|
||||
ctx.strokeStyle = "#DDDD44"
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(200, 624)
|
||||
ctx.lineTo(60, 624)
|
||||
ctx.arc(60, 654, 30, 2 * Math.PI, 3 / 2 * Math.PI)
|
||||
ctx.lineTo(30, 994)
|
||||
ctx.arc(60, 994, 30, Math.PI, Math.PI / 2)
|
||||
ctx.lineTo(200, 1024)
|
||||
ctx.stroke()
|
||||
}
|
||||
|
||||
}
|
||||
// --- 绘制记录
|
||||
this._drawSLPanel_drawRecords();
|
||||
ctx.restore();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
ui.prototype._drawSLPanel_drawBackground = function () {
|
||||
core.clearMap('ui');
|
||||
core.setAlpha('ui', 0.85);
|
||||
core.fillRect('ui', 0, 0, core._PX_, core._PY_, '#000000'); // 可改成背景图
|
||||
core.setAlpha('ui', 1);
|
||||
|
||||
const bg = core.material.images.images["bg_5043.webp"]; //背景
|
||||
core.fillRect(ctx, 0, 0, 2028, 1248, "#000000"); //黑色背景
|
||||
ctx.globalAlpha = 0.5; //透明度
|
||||
if (bg) ctx.drawImage(bg, 0, 0, 1280, 720, 0, 0, 2028, 1248); //绘制半透明背景图片
|
||||
ctx.globalAlpha = 1; //恢复为不透明
|
||||
|
||||
}
|
||||
|
||||
ui.prototype._drawSLPanel_loadSave = function (page, callback) {
|
||||
@ -24138,7 +24214,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
if (keycode == 70 && core.status.event.data.mode == 'all') { // F
|
||||
this._clickSL_favorite(page, offset);
|
||||
}
|
||||
}},
|
||||
}
|
||||
},
|
||||
"scrollingText": function () {
|
||||
// 本插件用于绘制在线留言
|
||||
// 说明:https://h5mota.com/bbs/thread/?tid=1017
|
||||
|
Loading…
Reference in New Issue
Block a user