Compare commits

..

2 Commits

Author SHA1 Message Date
8b2c73c17d Merge branch 'noAnimate' of https://gitea.mota.press/bdf1/tianta into noAnimate 2023-01-03 00:17:39 +08:00
0d277a0b28 0-40层剧情改动,大部分应适配了新的跳过剧情效果(群主改的)
删除H5获得道具的自动提示
删除开局送的手册和楼传(保持与RM一致,手册和楼传在1楼获得)
优化打不过怪物时的效果(还原RM)
调大了字号
修复跳过剧情插件一个BUG:未跳过剧情时闪烁特效未删除
打不过怪物效果同步为RM
对话框标题微调
开场剧情选项优化
对话字体大小调整
新增两个插件:
1.移动怪物渐变消失
2.对话框偏移
对话框往左偏移27像素(还原RM)
怪物显伤右对齐(还原RM)
2023-01-03 00:17:24 +08:00
21 changed files with 8642 additions and 8241 deletions

View File

@ -380,6 +380,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"winskin.png", "winskin.png",
"winskin2.png", "winskin2.png",
"winskin3.png", "winskin3.png",
"winskin4.png",
"wupin.png", "wupin.png",
"xialouti.png", "xialouti.png",
"xianzi.png", "xianzi.png",
@ -898,7 +899,13 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"startText": [ "startText": [
{ {
"type": "setText", "type": "setText",
"background": "winskin2.png" "background": "winskin2.png",
"textfont": 22
},
{
"type": "setValue",
"name": "flag:textOffset",
"value": "-27"
}, },
{ {
"type": "sleep", "type": "sleep",

View File

@ -188,9 +188,6 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
], ],
"time": 500 "time": 500
}, },
{
"type": "waitAsync"
},
{ {
"type": "hideImage", "type": "hideImage",
"code": 50, "code": 50,

View File

@ -27,11 +27,23 @@ main.floors.MT0=
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
], ],
"firstArrive": [ "firstArrive": [
{
"type": "setText",
"background": "winskin.png"
},
{ {
"type": "setValue", "type": "setValue",
"name": "flag:juqing", "name": "flag:juqing",
"operator": "+=", "operator": "+=",
"value": "5" "value": "5"
},
{
"type": "function",
"function": "function(){\ncore.addItem('book',-1);\n}"
},
{
"type": "function",
"function": "function(){\ncore.addItem('fly',-1);\n}"
} }
], ],
"events": { "events": {
@ -1000,15 +1012,6 @@ main.floors.MT0=
} }
], ],
"8,11": [ "8,11": [
{
"type": "if",
"condition": "flag:debug",
"true": [
{
"type": "setValue",
"name": "status:hp",
"value": "1"
},
{ {
"type": "setValue", "type": "setValue",
"name": "status:atk", "name": "status:atk",
@ -1036,10 +1039,10 @@ main.floors.MT0=
}, },
{ {
"type": "changeFloor", "type": "changeFloor",
"floorId": "jiange", "floorId": "MT22",
"loc": [ "loc": [
12, 11,
11 5
] ]
}, },
{ {
@ -1048,8 +1051,11 @@ main.floors.MT0=
1, 1,
0 0
] ]
} },
] {
"type": "if",
"condition": "flag:debug",
"true": []
} }
], ],
"7,11": [ "7,11": [
@ -1326,11 +1332,6 @@ main.floors.MT0=
"type": "hideImage", "type": "hideImage",
"code": 1, "code": 1,
"time": 0 "time": 0
},
{
"type": "setValue",
"name": "item:book",
"value": "item:book+1"
} }
], ],
"1,0": [ "1,0": [
@ -1345,6 +1346,39 @@ main.floors.MT0=
], ],
"time": 500 "time": 500
} }
],
"0,0": [
{
"type": "if",
"condition": "(core.isReplaying()||flag:SkipThePlot)",
"true": [
{
"type": "setValue",
"name": "flag:SkipThePlot",
"value": "false"
}
],
"false": [
{
"type": "function",
"function": "function(){\ncore.Confirmskip_On();\n}"
},
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "false"
},
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "true"
},
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
}
]
}
] ]
}, },
"changeFloor": { "changeFloor": {

View File

@ -56,6 +56,14 @@ main.floors.MT15=
"enable": false, "enable": false,
"noPass": null, "noPass": null,
"displayDamage": true, "displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 0,
"grayscale": 0,
"invert": false,
"shadow": 0
},
"data": [ "data": [
{ {
"type": "showImage2", "type": "showImage2",
@ -80,7 +88,10 @@ main.floors.MT15=
"type": "hideImage", "type": "hideImage",
"code": 1, "code": 1,
"time": 0 "time": 0
}
]
}, },
"8,11": [
{ {
"type": "if", "type": "if",
"condition": "(flag:221==1)", "condition": "(flag:221==1)",
@ -89,11 +100,8 @@ main.floors.MT15=
"type": "hide", "type": "hide",
"remove": true "remove": true
} }
] ],
} "false": [
]
},
"8,11": [
{ {
"type": "if", "type": "if",
"condition": "(flag:15f==1)", "condition": "(flag:15f==1)",
@ -125,27 +133,20 @@ main.floors.MT15=
], ],
"false": [ "false": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(flag:SkipThePlot||core.isReplaying())",
"choices": [ "true": [
{
"text": "是",
"action": [
{ {
"type": "setValue", "type": "setValue",
"name": "flag:15f", "name": "flag:SkipThePlot",
"value": "1" "value": "false"
},
{
"type": "setValue",
"name": "flag:juqing",
"value": "flag:juqing+1"
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -209,16 +210,20 @@ main.floors.MT15=
"time": 0 "time": 0
}, },
{ {
"type": "setValue", "type": "function",
"name": "flag:15f", "function": "function(){\ncore.Confirmskip_Off();\n}"
"value": "1" }
]
}, },
{ {
"type": "setValue", "type": "setValue",
"name": "flag:juqing", "name": "flag:juqing",
"value": "flag:juqing+1" "value": "flag:juqing+1"
} },
] {
"type": "setValue",
"name": "flag:15f",
"value": "1"
} }
] ]
} }

View File

@ -1019,6 +1019,16 @@ main.floors.MT16=
} }
], ],
"7,8": [ "7,8": [
{
"type": "if",
"condition": "(flag:124==1)",
"true": [
{
"type": "hide",
"remove": true
}
],
"false": [
{ {
"type": "if", "type": "if",
"condition": "(flag:16f==1)", "condition": "(flag:16f==1)",
@ -1078,22 +1088,25 @@ main.floors.MT16=
], ],
"false": [ "false": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "setValue", "type": "setValue",
"name": "flag:16f", "name": "flag:16f",
"value": "1" "value": "1"
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -1453,8 +1466,10 @@ main.floors.MT16=
"type": "setValue", "type": "setValue",
"name": "flag:16f", "name": "flag:16f",
"value": "1" "value": "1"
} },
] {
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
}, },
@ -1465,6 +1480,8 @@ main.floors.MT16=
} }
] ]
} }
]
}
], ],
"11,7": [ "11,7": [
{ {

View File

@ -43,27 +43,25 @@ main.floors.MT17=
], ],
"false": [ "false": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{
"text": "是",
"action": [
{ {
"type": "setValue", "type": "setValue",
"name": "flag:juqing", "name": "flag:SkipThePlot",
"value": "flag:juqing+1" "value": "false"
}, },
{ {
"type": "setValue", "type": "setValue",
"name": "flag:17", "name": "flag:17",
"value": "1" "value": "1"
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -128,11 +126,6 @@ main.floors.MT17=
"name": "flag:17", "name": "flag:17",
"value": "1" "value": "1"
}, },
{
"type": "setValue",
"name": "flag:juqing",
"value": "flag:juqing+1"
},
{ {
"type": "hideImage", "type": "hideImage",
"code": 1, "code": 1,
@ -142,10 +135,17 @@ main.floors.MT17=
"type": "hideImage", "type": "hideImage",
"code": 2, "code": 2,
"time": 0 "time": 0
},
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
} },
] {
"type": "setValue",
"name": "flag:juqing",
"value": "flag:juqing+1"
} }
] ]
} }

View File

@ -15,6 +15,14 @@ main.floors.MT20=
"enable": false, "enable": false,
"noPass": null, "noPass": null,
"displayDamage": true, "displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 0,
"grayscale": 0,
"invert": false,
"shadow": 0
},
"data": [ "data": [
{ {
"type": "hide", "type": "hide",
@ -38,12 +46,14 @@ main.floors.MT20=
"floorId": "MT0" "floorId": "MT0"
}, },
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "hide", "type": "hide",
"time": 500 "time": 500
@ -63,11 +73,12 @@ main.floors.MT20=
0 0
] ]
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -658,6 +669,10 @@ main.floors.MT20=
"type": "hide", "type": "hide",
"time": 500 "time": 500
}, },
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
},
{ {
"type": "changeFloor", "type": "changeFloor",
"floorId": "duwei1", "floorId": "duwei1",
@ -677,8 +692,6 @@ main.floors.MT20=
] ]
} }
] ]
}
]
}, },
"7,8": { "7,8": {
"trigger": "action", "trigger": "action",
@ -695,12 +708,14 @@ main.floors.MT20=
}, },
"data": [ "data": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "if", "type": "if",
"condition": "((flag:hard==1)||(flag:hard==5))", "condition": "((flag:hard==1)||(flag:hard==5))",
@ -736,11 +751,12 @@ main.floors.MT20=
{ {
"type": "hide" "type": "hide"
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -1027,6 +1043,11 @@ main.floors.MT20=
"code": 1, "code": 1,
"time": 0 "time": 0
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "false"
},
{ {
"type": "move", "type": "move",
"time": 500, "time": 500,
@ -1046,8 +1067,15 @@ main.floors.MT20=
] ]
], ],
"time": 500 "time": 500
} },
] {
"type": "setValue",
"name": "flag:useS_PASS",
"value": "true"
},
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
} }
@ -1418,29 +1446,27 @@ main.floors.MT20=
"time": 500, "time": 500,
"keep": true, "keep": true,
"steps": [ "steps": [
"up", "up:2",
"up", "right:3",
"right", "up:2",
"right", "left:3"
"right",
"up",
"up",
"left",
"left",
"left"
] ]
}, },
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [] "name": "flag:SkipThePlot",
"value": "false"
}
],
"false": [
{
"type": "function",
"function": "function(){\ncore.Confirmskip_On();\n}"
}, },
{
"text": "否",
"action": [
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -1722,8 +1748,10 @@ main.floors.MT20=
"type": "hideImage", "type": "hideImage",
"code": 2, "code": 2,
"time": 0 "time": 0
} },
] {
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
}, },
@ -1761,8 +1789,7 @@ main.floors.MT20=
"time": 500, "time": 500,
"keep": true, "keep": true,
"steps": [ "steps": [
"up", "up:2"
"up"
] ]
}, },
{ {
@ -1790,9 +1817,7 @@ main.floors.MT20=
], ],
"time": 500, "time": 500,
"steps": [ "steps": [
"up", "up:3"
"up",
"up"
] ]
}, },
{ {

View File

@ -54,12 +54,14 @@ main.floors.MT21=
"loc": "hero" "loc": "hero"
}, },
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "hide", "type": "hide",
"loc": [ "loc": [
@ -130,11 +132,12 @@ main.floors.MT21=
] ]
] ]
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -189,6 +192,10 @@ main.floors.MT21=
"\t[夜兽人甲]哼!乖乖受死吧!", "\t[夜兽人甲]哼!乖乖受死吧!",
"\t[蓝衣老者]哈哈哈哈!真是不知好歹!老夫果然没有看错,魔物果然只是一群嗜杀暴虐之徒!", "\t[蓝衣老者]哈哈哈哈!真是不知好歹!老夫果然没有看错,魔物果然只是一群嗜杀暴虐之徒!",
"\t[夜兽人甲]妈的,废话真多!", "\t[夜兽人甲]妈的,废话真多!",
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
},
{ {
"type": "move", "type": "move",
"loc": [ "loc": [
@ -796,8 +803,6 @@ main.floors.MT21=
] ]
} }
] ]
}
]
}, },
{ {
"type": "setValue", "type": "setValue",
@ -830,6 +835,14 @@ main.floors.MT21=
"enable": false, "enable": false,
"noPass": null, "noPass": null,
"displayDamage": true, "displayDamage": true,
"opacity": 1,
"filter": {
"blur": 0,
"hue": 0,
"grayscale": 0,
"invert": false,
"shadow": 0
},
"data": [ "data": [
{ {
"type": "if", "type": "if",
@ -837,7 +850,9 @@ main.floors.MT21=
"true": [ "true": [
{ {
"type": "show" "type": "show"
}, }
],
"false": [
{ {
"type": "if", "type": "if",
"condition": "(flag:140==1)", "condition": "(flag:140==1)",
@ -878,35 +893,6 @@ main.floors.MT21=
} }
], ],
"false": [ "false": [
{
"type": "choices",
"text": "是否跳过剧情",
"choices": [
{
"text": "是",
"action": []
},
{
"text": "否",
"action": [
{
"type": "showImage2",
"code": 1,
"image": "jiekedajiao.png",
"sloc": [
0,
0,
null
],
"loc": [
330,
70,
"289.6",
"376.8"
],
"opacity": 1,
"time": 0
},
"\t[杰克]老子存货不多了,靠!", "\t[杰克]老子存货不多了,靠!",
"\t[杰克]要是耽误我帮老大清塔以后就没这事了!", "\t[杰克]要是耽误我帮老大清塔以后就没这事了!",
{ {
@ -969,10 +955,6 @@ main.floors.MT21=
"type": "hideImage", "type": "hideImage",
"code": 3, "code": 3,
"time": 0 "time": 0
}
]
}
]
}, },
{ {
"type": "setValue", "type": "setValue",
@ -988,11 +970,6 @@ main.floors.MT21=
} }
] ]
} }
],
"false": [
{
"type": "hide"
}
] ]
} }
] ]

View File

@ -365,10 +365,6 @@ main.floors.MT22=
"name": "flag:juqing", "name": "flag:juqing",
"value": "flag:juqing+1" "value": "flag:juqing+1"
}, },
{
"type": "hide",
"remove": true
},
{ {
"type": "show", "type": "show",
"loc": [ "loc": [
@ -378,6 +374,10 @@ main.floors.MT22=
] ]
], ],
"floorId": "MT15" "floorId": "MT15"
},
{
"type": "hide",
"remove": true
} }
], ],
"4,4": [ "4,4": [
@ -425,17 +425,6 @@ main.floors.MT22=
} }
], ],
"false": [ "false": [
{
"type": "choices",
"text": "是否跳过剧情",
"choices": [
{
"text": "是",
"action": []
},
{
"text": "否",
"action": [
{ {
"type": "showImage2", "type": "showImage2",
"code": 2, "code": 2,
@ -547,10 +536,6 @@ main.floors.MT22=
"type": "hideImage", "type": "hideImage",
"code": 5, "code": 5,
"time": 0 "time": 0
}
]
}
]
}, },
{ {
"type": "setValue", "type": "setValue",

View File

@ -52,12 +52,14 @@ main.floors.MT23=
}, },
"data": [ "data": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "hide", "type": "hide",
"loc": [ "loc": [
@ -92,17 +94,28 @@ main.floors.MT23=
], ],
"direction": "right" "direction": "right"
} }
] ],
"false": [
{
"type": "function",
"function": "function(){\ncore.Confirmskip_On();\n}"
}, },
{ {
"text": "否", "type": "setValue",
"action": [ "name": "flag:useS_PASS",
"value": "false"
},
{ {
"type": "moveHero", "type": "moveHero",
"steps": [ "steps": [
"up:1" "up:1"
] ]
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "true"
},
{ {
"type": "animate", "type": "animate",
"name": "gantanhao", "name": "gantanhao",
@ -394,6 +407,10 @@ main.floors.MT23=
"code": 10, "code": 10,
"time": 0 "time": 0
}, },
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
},
{ {
"type": "move", "type": "move",
"loc": [ "loc": [
@ -934,8 +951,6 @@ main.floors.MT23=
"keep": true "keep": true
} }
] ]
}
]
}, },
{ {
"type": "setValue", "type": "setValue",

View File

@ -39,12 +39,14 @@ main.floors.MT24=
"events": { "events": {
"1,0": [ "1,0": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "hide", "type": "hide",
"loc": [ "loc": [
@ -55,11 +57,12 @@ main.floors.MT24=
], ],
"remove": true "remove": true
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -282,6 +285,11 @@ main.floors.MT24=
"code": 8, "code": 8,
"time": 0 "time": 0
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "false"
},
{ {
"type": "move", "type": "move",
"loc": [ "loc": [
@ -291,9 +299,8 @@ main.floors.MT24=
"time": 500, "time": 500,
"keep": true, "keep": true,
"steps": [ "steps": [
"right", "right:1",
"down", "down:2"
"down"
] ]
}, },
{ {
@ -332,8 +339,7 @@ main.floors.MT24=
"time": 500, "time": 500,
"keep": true, "keep": true,
"steps": [ "steps": [
"left", "left:2"
"left"
] ]
}, },
{ {
@ -345,8 +351,15 @@ main.floors.MT24=
] ]
], ],
"remove": true "remove": true
} },
] {
"type": "setValue",
"name": "flag:useS_PASS",
"value": "true"
},
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
}, },
@ -399,16 +412,20 @@ main.floors.MT24=
], ],
"false": [ "false": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [] "name": "flag:SkipThePlot",
"value": "false"
}
],
"false": [
{
"type": "function",
"function": "function(){\ncore.Confirmskip_On();\n}"
}, },
{
"text": "否",
"action": [
{ {
"type": "showImage2", "type": "showImage2",
"code": 1, "code": 1,
@ -577,8 +594,10 @@ main.floors.MT24=
"type": "hideImage", "type": "hideImage",
"code": 7, "code": 7,
"time": 0 "time": 0
} },
] {
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
}, },

View File

@ -106,16 +106,20 @@ main.floors.MT27=
], ],
"false": [ "false": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [] "name": "flag:SkipThePlot",
"value": "false"
}
],
"false": [
{
"type": "function",
"function": "function(){\ncore.Confirmskip_On();\n}"
}, },
{
"text": "否",
"action": [
{ {
"type": "showImage2", "type": "showImage2",
"code": 3, "code": 3,
@ -545,8 +549,10 @@ main.floors.MT27=
"type": "hideImage", "type": "hideImage",
"code": 19, "code": 19,
"time": 0 "time": 0
} },
] {
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
}, },

View File

@ -52,12 +52,14 @@ main.floors.MT28=
"false": [] "false": []
}, },
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "hide", "type": "hide",
"loc": [ "loc": [
@ -83,11 +85,12 @@ main.floors.MT28=
], ],
"direction": "left" "direction": "left"
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "pauseBgm" "type": "pauseBgm"
}, },
@ -96,6 +99,11 @@ main.floors.MT28=
"name": "shengqishi.mp3", "name": "shengqishi.mp3",
"keep": true "keep": true
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "false"
},
{ {
"type": "moveHero", "type": "moveHero",
"time": 500, "time": 500,
@ -115,6 +123,11 @@ main.floors.MT28=
"up:2" "up:2"
] ]
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "true"
},
{ {
"type": "animate", "type": "animate",
"name": "sangang", "name": "sangang",
@ -245,6 +258,11 @@ main.floors.MT28=
"code": 4, "code": 4,
"time": 0 "time": 0
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "false"
},
{ {
"type": "moveHero", "type": "moveHero",
"steps": [ "steps": [
@ -259,6 +277,11 @@ main.floors.MT28=
], ],
"direction": "right" "direction": "right"
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "true"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 5, "code": 5,
@ -360,6 +383,11 @@ main.floors.MT28=
"code": 8, "code": 8,
"time": 0 "time": 0
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "false"
},
{ {
"type": "move", "type": "move",
"loc": [ "loc": [
@ -372,6 +400,11 @@ main.floors.MT28=
"left:3" "left:3"
] ]
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "true"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 9, "code": 9,
@ -421,6 +454,11 @@ main.floors.MT28=
"code": 10, "code": 10,
"time": 0 "time": 0
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "false"
},
{ {
"type": "hide", "type": "hide",
"loc": [ "loc": [
@ -439,6 +477,11 @@ main.floors.MT28=
], ],
"direction": "left" "direction": "left"
}, },
{
"type": "setValue",
"name": "flag:useS_PASS",
"value": "true"
},
{ {
"type": "animate", "type": "animate",
"name": "shenglvehao", "name": "shenglvehao",
@ -467,8 +510,10 @@ main.floors.MT28=
"type": "hideImage", "type": "hideImage",
"code": 11, "code": 11,
"time": 0 "time": 0
} },
] {
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
}, },

View File

@ -40,12 +40,14 @@ main.floors.MT30=
"10,1": [], "10,1": [],
"9,3": [ "9,3": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "battle", "type": "battle",
"loc": [ "loc": [
@ -316,11 +318,12 @@ main.floors.MT30=
], ],
"remove": true "remove": true
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "changePos", "type": "changePos",
"loc": [ "loc": [
@ -572,6 +575,10 @@ main.floors.MT30=
"code": 9, "code": 9,
"time": 0 "time": 0
}, },
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
},
{ {
"type": "showImage2", "type": "showImage2",
"code": 10, "code": 10,
@ -1661,6 +1668,18 @@ main.floors.MT30=
] ]
} }
] ]
},
{
"type": "choices",
"text": "是否跳过剧情",
"choices": [
{
"text": "是",
"action": []
},
{
"text": "否",
"action": []
} }
] ]
} }

View File

@ -63,17 +63,6 @@ main.floors.MT37=
} }
], ],
"false": [ "false": [
{
"type": "choices",
"text": "是否跳过剧情",
"choices": [
{
"text": "是",
"action": []
},
{
"text": "否",
"action": [
{ {
"type": "showImage", "type": "showImage",
"code": 2, "code": 2,
@ -90,10 +79,6 @@ main.floors.MT37=
"type": "hideImage", "type": "hideImage",
"code": 2, "code": 2,
"time": 0 "time": 0
}
]
}
]
}, },
{ {
"type": "setValue", "type": "setValue",

View File

@ -47,16 +47,20 @@ main.floors.MT39=
"events": { "events": {
"3,4": [ "3,4": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [] "name": "flag:SkipThePlot",
"value": "false"
}
],
"false": [
{
"type": "function",
"function": "function(){\ncore.Confirmskip_On();\n}"
}, },
{
"text": "否",
"action": [
{ {
"type": "showImage", "type": "showImage",
"code": 1, "code": 1,
@ -162,6 +166,10 @@ main.floors.MT39=
"code": 6, "code": 6,
"time": 0 "time": 0
}, },
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
},
{ {
"type": "pauseBgm" "type": "pauseBgm"
}, },
@ -312,8 +320,6 @@ main.floors.MT39=
"time": 0 "time": 0
} }
] ]
}
]
}, },
{ {
"type": "animate", "type": "animate",

View File

@ -90,12 +90,14 @@ main.floors.MT40=
"text": "开打", "text": "开打",
"action": [ "action": [
{ {
"type": "choices", "type": "if",
"text": "是否跳过剧情", "condition": "(core.isReplaying()||flag:SkipThePlot)",
"choices": [ "true": [
{ {
"text": "是", "type": "setValue",
"action": [ "name": "flag:SkipThePlot",
"value": "false"
},
{ {
"type": "showImage", "type": "showImage",
"code": 27, "code": 27,
@ -219,11 +221,12 @@ main.floors.MT40=
] ]
] ]
} }
] ],
}, "false": [
{ {
"text": "否", "type": "function",
"action": [ "function": "function(){\ncore.Confirmskip_On();\n}"
},
{ {
"type": "pauseBgm" "type": "pauseBgm"
}, },
@ -412,6 +415,10 @@ main.floors.MT40=
"code": 35, "code": 35,
"time": 0 "time": 0
}, },
{
"type": "function",
"function": "function(){\ncore.Confirmskip_Off();\n}"
},
{ {
"type": "animate", "type": "animate",
"name": "shenglvehao", "name": "shenglvehao",
@ -1462,6 +1469,18 @@ main.floors.MT40=
"remove": true "remove": true
} }
] ]
},
{
"type": "choices",
"text": "是否跳过剧情",
"choices": [
{
"text": "是",
"action": []
},
{
"text": "否",
"action": []
} }
] ]
}, },

View File

@ -11,6 +11,16 @@ main.floors.MT7=
"firstArrive": [], "firstArrive": [],
"events": { "events": {
"5,1": [ "5,1": [
{
"type": "if",
"condition": "(flag:221==1)",
"true": [
{
"type": "hide",
"remove": true
}
],
"false": [
{ {
"type": "if", "type": "if",
"condition": "(flag:7fduihua==0)", "condition": "(flag:7fduihua==0)",
@ -293,6 +303,8 @@ main.floors.MT7=
] ]
} }
] ]
}
]
}, },
"changeFloor": { "changeFloor": {
"7,6": { "7,6": {

View File

@ -202,7 +202,7 @@ main.floors.nandu=
"true": [ "true": [
{ {
"type": "function", "type": "function",
"function": "function(){\ncore.insertAction([{\n\t\"type\": \"choices\",\n\t\"text\": \"\\\\c[21]是否选择\" + [\"\\r[#ffff80]作弊\", \"\\r[#80ff80]简单\", \"\\r[#8080ff]普通\", \"\\r[#ff80ff]困难\", \"\\r[#ff8080]噩梦\", \"\\r[#ffff80]作弊\"][flags.hard] + \"\\r难度\",\n\t\"choices\": [{\n\t\t\t\"text\": \"是\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"break\" },\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"text\": \"否\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"setValue\", \"name\": \"fla\" + \"g:xuanzhong\", \"value\": \"0\" },\n\t\t\t]\n\t\t},\n\t]\n}, ])\n}" "function": "function(){\ncore.insertAction([{\n\t\"type\": \"choices\",\n\t\"text\": \"\\\\c[21] 是否选择\" + [\"\\u000d[#ffff80]作弊\", \"\\u000d[#80ff80]简单\", \"\\u000d[#8080ff]普通\", \"\\u000d[#ff80ff]困难\", \"\\u000d[#ff8080]噩梦\", \"\\u000d[#ffff80]作弊\"][flags.hard] + \"\\u000d难度\",\n\t\"choices\": [{\n\t\t\t\"text\": \"是\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"break\" },\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"text\": \"否\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"setValue\", \"name\": \"fla\" + \"g:xuanzhong\", \"value\": \"0\" },\n\t\t\t]\n\t\t},\n\t]\n}, ])\n}"
} }
], ],
"false": [ "false": [
@ -234,7 +234,6 @@ main.floors.nandu=
255, 255,
1 1
], ],
"background": "winskin2.png",
"time": 20 "time": 20
}, },
{ {
@ -249,13 +248,29 @@ main.floors.nandu=
"type": "function", "type": "function",
"function": "function(){\ncore.dom.wholeCtx.fillRect(0, 0, core.dom.whole.width, core.dom.whole.height);\n}" "function": "function(){\ncore.dom.wholeCtx.fillRect(0, 0, core.dom.whole.width, core.dom.whole.height);\n}"
}, },
{
"type": "function",
"function": "function(){\ncore.createCanvas('shifoutiaoguo',0,0,480,480,200);\n}"
},
{
"type": "function",
"function": "function(){\ncore.drawTextContent('shifoutiaoguo', '是否跳过开始剧情,直接进入游戏?', { \t\t\t\tleft: 150, \t\t\t\ttop: 180, \t\t\t\tmaxWidth: 400, \t\t\t\tfontSize: 20, \t\t\t\tlineHeight: 20, \t\t\t\tbold: false, \t\t\t});\n}"
},
{
"type": "setText",
"background": "winskin4.png"
},
{ {
"type": "choices", "type": "choices",
"text": "是否跳过开始剧情", "text": " ",
"choices": [ "choices": [
{ {
"text": "是", "text": "是",
"action": [ "action": [
{
"type": "function",
"function": "function(){\ncore.clearMap('shifoutiaoguo');\n}"
},
{ {
"type": "playBgm", "type": "playBgm",
"name": "xingkong.mp3", "name": "xingkong.mp3",
@ -291,6 +306,10 @@ main.floors.nandu=
{ {
"text": "否", "text": "否",
"action": [ "action": [
{
"type": "function",
"function": "function(){\ncore.clearMap('shifoutiaoguo');\n}"
},
{ {
"type": "changeFloor", "type": "changeFloor",
"floorId": "QISHI", "floorId": "QISHI",

BIN
project/images/winskin4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -381,7 +381,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.setAutoHeroMove(); core.setAutoHeroMove();
} }
////// 绘制一个对话框 ////// ////// 绘制一个对话框 //////
core.ui.drawTextBox = function (content, config) { /*core.ui.drawTextBox = function (content, config) {
config = config || {}; config = config || {};
this.clearUI(); this.clearUI();
@ -424,13 +424,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (titleInfo.title) { if (titleInfo.title) {
let titlefont = core.status.textAttribute.titlefont, let titlefont = core.status.textAttribute.titlefont,
titleStyle = core.arrayToRGBA(core.status.textAttribute.title); titleStyle = core.arrayToRGBA(core.status.textAttribute.title);
let tf = this._buildFont(titlefont, true), let tf = this._buildFont(titlefont, false),
width = this.calWidth(ctx, titleInfo.title, tf); width = this.calWidth(ctx, titleInfo.title, tf);
this.drawBackground(hPos.left, vPos.top - titlefont - 12, hPos.left + width + 30, vPos.top, posInfo); this.drawBackground(hPos.left, vPos.top - titlefont - 12 - 10, hPos.left + width + 30, vPos.top, posInfo);
ctx.save(); ctx.save();
ctx.textAlign = 'center'; ctx.textAlign = 'center';
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
core.fillText(ctx, titleInfo.title, hPos.left + (width + 30) / 2, vPos.top - (titlefont + 12) / 2, titleStyle, tf); core.fillText(ctx, titleInfo.title, hPos.left + (width + 30) / 2 - 5, vPos.top - (titlefont + 12) / 2 - 5, titleStyle, tf);
ctx.restore(); ctx.restore();
} }
titleInfo.title = null; titleInfo.title = null;
@ -462,10 +462,56 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
return config; return config;
} }
*/
ui.prototype._drawChoices_drawChoices = function (choices, isWindowSkin, hPos, vPos, ctx) {
var hasCtx = ctx != null;
ctx = ctx || 'ui';
// 选项
core.setTextAlign(ctx, 'left');
core.setFont(ctx, this._buildFont(17, true));
for (var i = 0; i < choices.length; i++) {
var color = core.arrayToRGBA(choices[i].color || core.status.textAttribute.text);
if (main.mode == 'play' && choices[i].need != null && choices[i].need != '' && !core.calValue(choices[i].need)) color = '#999999';
core.setFillStyle(ctx, color);
var offset = core._PX_ / 2;
if (choices[i].icon) {
var iconInfo = this._getDrawableIconInfo(choices[i].icon),
image = iconInfo[0],
icon = iconInfo[1];
if (image != null) {
core.drawImage(ctx, image, 0, 32 * icon, 32, 32,
core._PX_ / 2 - choices[i].width / 2, vPos.choice_top + 32 * i - 17, 22, 22);
offset += 14;
}
}
core.fillText(ctx, choices[i].text, offset - 70, vPos.choice_top + 32 * i, color, ui.prototype._buildFont(22, false));
}
if (choices.length > 0 && core.status.event.selection != 'none') {
core.status.event.selection = core.status.event.selection || 0;
while (core.status.event.selection < 0) core.status.event.selection += choices.length;
while (core.status.event.selection >= choices.length) core.status.event.selection -= choices.length;
var len = choices[core.status.event.selection].width;
if (isWindowSkin) {
if (hasCtx) {
this._drawSelector(ctx, core.status.textAttribute.background,
len + 10, 28, core._PX_ / 2 - len / 2 - 5, vPos.choice_top + 32 * core.status.event.selection - 20);
} else {
this._drawWindowSelector(core.status.textAttribute.background,
core._PX_ / 2 - len / 2 - 5 - 60, vPos.choice_top + 32 * core.status.event.selection - 20, len + 10, 28);
}
} else
core.strokeRoundRect(ctx, core._PX_ / 2 - len / 2 - 5, vPos.choice_top + 32 * core.status.event.selection - 20,
len + 10, 28, 6, core.status.globalAttribute.selectColor, 2);
}
}
core.ui._drawSettings = function () { core.ui._drawSettings = function () {
core.status.event.id = 'settings'; core.status.event.id = 'settings';
this.drawChoices(null, [ this.drawChoices(null, [
"系统设置", "虚拟键盘", "浏览地图", "存档笔记", "同步存档", "游戏信息", "返回标题", "返回游戏", "数值显示: " + (core.getFlag("itemDetail") ? "[ON]" : "[OFF]"), "RM样式楼传 " + (core.getFlag("isRmFly") ? "[ON]" : "[OFF]") "系统设置", "虚拟键盘", "浏览地图", "存档笔记", "同步存档", "游戏信息", "返回标题", "返回游戏", "数值显示: " + (core.getFlag("itemDetail") ? "[ON]" : "[OFF]"), "RM楼传: " + (core.getFlag("isRmFly") ? "[ON]" : "[OFF]")
]); ]);
} }
core.actions._clickSettings = function (x, y) { core.actions._clickSettings = function (x, y) {
@ -535,7 +581,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
var text = '获得 ' + core.material.items[id].name; var text = '获得 ' + core.material.items[id].name;
if (num > 1) text += "x" + num; if (num > 1) text += "x" + num;
if (itemCls === 'items' && num == 1) text += core.items.getItemEffectTip(id); if (itemCls === 'items' && num == 1) text += core.items.getItemEffectTip(id);
core.drawTip(text, id); //core.drawTip(text, id);
// --- 首次获得道具的提示 // --- 首次获得道具的提示
if (!core.hasFlag("__itemHint__")) core.setFlag("__itemHint__", []); if (!core.hasFlag("__itemHint__")) core.setFlag("__itemHint__", []);
@ -918,48 +964,31 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
} }
/*core.ui.drawFly = function (page) {/////已在别处仿RM楼传复写 ////// 战斗 //////
events.prototype.battle = function (id, x, y, force, callback) {
core.status.event.data = page; core.saveAndStopAutomaticRoute();
var floorId = core.floorIds[page]; id = id || core.getBlockId(x, y);
var title = core.status.maps[floorId].title; if (!id) return core.clearContinueAutomaticRoute(callback);
core.clearMap('ui'); // 非强制战斗
core.setAlpha('ui', 0.85); if (!core.enemys.canBattle(id, x, y) && !force && !core.status.event.id) {
core.fillRect('ui', 0, 0, core._PX_, core._PY_, '#000000'); core.stopSound();
core.setAlpha('ui', 1); core.playSound('操作失败');
core.setTextAlign('ui', 'center'); //core.drawTip("你打不过此怪物!", id);
core.fillText('ui', '楼层跳跃', core._PX_ / 2, 48, '#FFFFFF', this._buildFont(28, true)); core.drawAnimate('jingu', x, y);
core.fillText('ui', '返回游戏', core._PX_ / 2, core._PY_ - 13, null, this._buildFont(15, true)) core.drawText('你的能力不足以战胜这个对手。\n\n\n');
core.setTextAlign('ui', 'right'); return core.clearContinueAutomaticRoute(callback);
core.fillText('ui', '浏览地图时也', core._PX_ - 10, core._PY_ - 23, '#aaaaaa', this._buildFont(10, false));
core.fillText('ui', '可楼层跳跃!', core._PX_ - 10, core._PY_ - 11, null, this._buildFont(10, false));
core.setTextAlign('ui', 'center');
var middle = core._PY_ / 2 + 39;
// 换行
var lines = core.splitLines('ui', title, 120, this._buildFont(19, true));
var start_y = middle - (lines.length - 1) * 11;
for (var i in lines) {
core.fillText('ui', lines[i], core._PX_ - 53, start_y, '#FFFFFF', this._buildFont(17, true));
start_y += 22;
} }
if (core.actions._getNextFlyFloor(1) != page) { // 自动存档
core.fillText('ui', '▲', core._PX_ - 60, middle - 64, null, this._buildFont(17, false)); if (!core.status.event.id) core.autosave(true);
core.fillText('ui', '▲', core._PX_ - 60, middle - 96); // 战前事件
core.fillText('ui', '▲', core._PX_ - 60, middle - 96 - 7); if (!this.beforeBattle(id, x, y))
return core.clearContinueAutomaticRoute(callback);
// 战后事件
this.afterBattle(id, x, y);
if (callback) callback();
} }
if (core.actions._getNextFlyFloor(-1) != page) {
core.fillText('ui', '▼', core._PX_ - 60, middle + 64, null, this._buildFont(17, false));
core.fillText('ui', '▼', core._PX_ - 60, middle + 96);
core.fillText('ui', '▼', core._PX_ - 60, middle + 96 + 7);
}
var size = 0.75;
core.strokeRect('ui', 16, 64, size * core._PX_, size * core._PY_, '#FFFFFF', 2);
core.drawThumbnail(floorId, null, { ctx: 'ui', x: 16, y: 64, size: size, damage: true, all: true });
}*/
}, },
"drawLight": function () { "drawLight": function () {
@ -2928,7 +2957,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
// *** 下一句话可以更改你想要的显示字体 // *** 下一句话可以更改你想要的显示字体
core.setFont(ctx, "bold 11px Arial"); core.setFont(ctx, "bold 11px Arial");
// *** // ***
core.setTextAlign(ctx, 'left'); core.setTextAlign(ctx, "right");
core.status.damage.data.forEach(function (one) { core.status.damage.data.forEach(function (one) {
var px = one.px, var px = one.px,
py = one.py; py = one.py;
@ -2938,7 +2967,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (px < -32 * 2 || px > core.__PX__ + 32 || py < -32 || py > core.__PY__ + 32) if (px < -32 * 2 || px > core.__PX__ + 32 || py < -32 || py > core.__PY__ + 32)
return; return;
} }
core.fillBoldText(ctx, one.text, px, py, one.color); core.fillBoldText(ctx, one.text, px + 32, py, one.color);
}); });
core.setTextAlign(ctx, 'center'); core.setTextAlign(ctx, 'center');
core.status.damage.extraData.forEach(function (one) { core.status.damage.extraData.forEach(function (one) {
@ -3764,8 +3793,188 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.status.hero.flags.useS_PASS = false; core.status.hero.flags.useS_PASS = false;
core.insertCommonEvent('跳过事件图片'); core.insertCommonEvent('跳过事件图片');
core.status.hero.flags.tiaojuqing_black = 0; ///闪烁开关归0 core.status.hero.flags.tiaojuqing_black = 0; ///闪烁开关归0
core.clearMap('tiaojuqing_black') /////清除特效画布
} }
},
"移动怪物渐变消失": function () {
///AD NB小声bb
// 在此增加新插件
this.moveHidingBlock = function (x, y, steps, time, keep, callback) {
flags._moveHide = 1;
core.moveBlock(x, y, steps, time, keep, callback);
delete flags._moveHide;
}
core.maps.moveBlock = function (x, y, steps, time, keep, callback) {
if (core.status.replay.speed == 24) time = 1;
time = time || 500;
var blockArr = this._getAndRemoveBlock(x, y);
if (blockArr == null) {
if (callback) callback();
return;
}
var block = blockArr[0],
blockInfo = blockArr[1];
var moveSteps = (steps || []).map(function (t) {
return [t.split(':')[0], parseInt(t.split(':')[1] || "1")];
}).filter(function (t) {
return ['up', 'down', 'left', 'right', 'forward', 'backward', 'leftup', 'leftdown', 'rightup', 'rightdown', 'speed'].indexOf(t[0]) >= 0 &&
!(t[0] == 'speed' && t[1] < 16)
});
var canvases = this._initDetachedBlock(blockInfo, x, y, block.event.animate !== false);
this._moveDetachedBlock(blockInfo, 32 * x, 32 * y, 1, canvases);
const calStep = (step) => {
if (["up", "down", "left", "right", "forward", "backward"].includes(step[0])) {
return step[1];
}
return 0;
}
let stepSum = 0;
moveSteps.forEach((s) => stepSum += calStep(s));
var moveInfo = {
sx: x,
sy: y,
x: x,
y: y,
px: 32 * x,
py: 32 * y,
opacity: 1,
keep: keep,
lastDirection: null,
offset: 1,
moveSteps: moveSteps,
stepSum: stepSum * 16,
movedStep: 0,
withHiding: flags._moveHide,
step: 0,
per_time: time / 16 / core.status.replay.speed
}
this._moveBlock_doMove(blockInfo, canvases, moveInfo, callback);
}
core.maps._moveBlock_moving = function (blockInfo, canvases, moveInfo) {
if (moveInfo.step == 0) {
if (!this._moveBlock_updateDirection(blockInfo, moveInfo)) return;
}
var curr = moveInfo.moveSteps[0];
moveInfo.step++;
moveInfo.movedStep++;
moveInfo.px += core.utils.scan2[curr[0]].x * 2 * moveInfo.offset;
moveInfo.py += core.utils.scan2[curr[0]].y * 2 * moveInfo.offset;
if (moveInfo.withHiding) {
let o = moveInfo.movedStep / moveInfo.stepSum;
let op = 1 - o * o;
moveInfo.opacity = op;
}
this._moveDetachedBlock(blockInfo, moveInfo.px, moveInfo.py, moveInfo.opacity, canvases);
if (moveInfo.step == 16) {
moveInfo.step = 0;
moveInfo.moveSteps[0][1]--;
if (moveInfo.moveSteps[0][1] <= 0) {
moveInfo.moveSteps.shift();
}
}
}
},
"对话框偏移": function () {
// 在此增加新插件
core.dom.gameDraw.style.overflow = "visible";
////// 绘制一个对话框 //////
core.ui.drawTextBox = function (content, config) {
config = config || {};
this.clearUI();
content = core.replaceText(content);
let ctx = core.getContextByName(config.ctx || 'ui');
if (ctx && main.mode == 'play') {
core.createCanvas(ctx, 0, 0, core._PX_, core._PY_, 141);
ctx = core.getContextByName(ctx);
}
let off = flags.textOffset || 0;
if (!config.ctx || config.ctx == 'ui') {
core.relocateCanvas("ui", off, 0);
}
// Step 1: 获得标题信息和位置信息
var textAttribute = core.status.textAttribute;
var titleInfo = this._getTitleAndIcon(content);
var posInfo = this._getPosition(titleInfo.content);
if (posInfo.position != 'up' && posInfo.position != 'down') posInfo.px = posInfo.py = null;
if (!posInfo.position) posInfo.position = textAttribute.position;
content = this._drawTextBox_drawImages(posInfo.content, config.ctx);
if (config.pos) {
delete posInfo.px;
delete posInfo.py;
posInfo.pos = config.pos;
}
posInfo.ctx = ctx;
// Step 2: 计算对话框的矩形位置
var hPos = this._drawTextBox_getHorizontalPosition(content, titleInfo, posInfo);
var vPos = this._drawTextBox_getVerticalPosition(content, titleInfo, posInfo, hPos.validWidth);
posInfo.xoffset = hPos.xoffset;
posInfo.yoffset = vPos.yoffset - 4;
if (ctx && main.mode == 'play') {
ctx.canvas.setAttribute('_text_left', hPos.left);
ctx.canvas.setAttribute('_text_top', vPos.top);
}
// Step 3: 绘制背景图
var isWindowSkin = this.drawBackground(hPos.left, vPos.top, hPos.right, vPos.bottom, posInfo);
if (titleInfo.title) {
let titlefont = core.status.textAttribute.titlefont,
titleStyle = core.arrayToRGBA(core.status.textAttribute.title);
let tf = this._buildFont(titlefont, true),
width = this.calWidth(ctx, titleInfo.title, tf);
this.drawBackground(hPos.left, vPos.top - titlefont - 12 - 10, hPos.left + width + 30, vPos.top, posInfo);
ctx.save();
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
core.fillText(ctx, titleInfo.title, hPos.left + (width + 30) / 2 - 5, vPos.top - (titlefont + 12) / 2 - 5, titleStyle, tf);
ctx.restore();
}
titleInfo.title = null;
var alpha = isWindowSkin ? this._drawWindowSkin_getOpacity() : textAttribute.background[3];
// Step 4: 绘制标题、头像、动画
var content_top = this._drawTextBox_drawTitleAndIcon(titleInfo, hPos, vPos, alpha, config.ctx);
// Step 5: 绘制正文
var config = this.drawTextContent(config.ctx || 'ui', content, {
left: hPos.content_left,
top: content_top,
maxWidth: hPos.validWidth,
lineHeight: vPos.lineHeight,
time: (config.showAll || config.async || textAttribute.time <= 0 || core.status.event.id != 'action') ? 0 : textAttribute.time
});
// Step 6: 绘制光标
if (main.mode == 'play') {
main.dom.next.style.display = 'block';
main.dom.next.style.borderRightColor = main.dom.next.style.borderBottomColor = core.arrayToRGB(textAttribute.text);
main.dom.next.style.top = (vPos.bottom - 20) * core.domStyle.scale + "px";
var left = (hPos.left + hPos.right) / 2;
left += off;
if (posInfo.position == 'up' && !posInfo.noPeak && posInfo.px != null && Math.abs(posInfo.px * 32 + 16 - left) < 50)
left = hPos.right - 64;
main.dom.next.style.left = left * core.domStyle.scale + "px";
}
return config;
}
const _doa = core.events.doAction;
core.events.doAction = function () {
core.relocateCanvas('ui', 0, 0);
_doa.call(core.events);
}
} }
} }