fix: 修改13阶宝石和9~16阶血瓶贴图; 修复出生点和简单减伤; 修复MT102某处遮挡勇士

This commit is contained in:
bdf1 2023-06-07 10:41:19 +13:00
parent 25e54f376b
commit 5cf12c6923
7 changed files with 171 additions and 17 deletions

View File

@ -446,7 +446,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"title": "逐梦九天", "title": "逐梦九天",
"name": "bdf1", "name": "bdf1",
"version": "Ver 2.10.3", "version": "Ver 2.10.3",
"floorId": "MT154", "floorId": "MT0",
"hero": { "hero": {
"image": "hero.png", "image": "hero.png",
"animate": false, "animate": false,
@ -470,7 +470,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"loc": { "loc": {
"direction": "up", "direction": "up",
"x": 6, "x": 6,
"y": 12 "y": 10
}, },
"flags": {}, "flags": {},
"followers": [], "followers": [],
@ -1662,7 +1662,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"itemFirstText": false, "itemFirstText": false,
"equipboxButton": false, "equipboxButton": false,
"enableAddPoint": false, "enableAddPoint": false,
"enableNegativeDamage": false, "enableNegativeDamage": true,
"betweenAttackMax": false, "betweenAttackMax": false,
"useLoop": true, "useLoop": true,
"startUsingCanvas": false, "startUsingCanvas": false,

View File

@ -44,6 +44,11 @@ main.floors.MT0=
"name": "flag:user", "name": "flag:user",
"value": "core.username[flag:uid]" "value": "core.username[flag:uid]"
}, },
{
"type": "setValue",
"name": "flag:itemDetail",
"value": "true"
},
"浩瀚无际的宇宙中,有一颗星球格外美丽...它那蔚蓝色的外表下散发着无数的光芒,而那些光芒就是生命...", "浩瀚无际的宇宙中,有一颗星球格外美丽...它那蔚蓝色的外表下散发着无数的光芒,而那些光芒就是生命...",
"生命究竟是什么?它的意义又是什么?这个问题很难...但是,正是因为每一条生命都不一样,这才会散发出不同的光芒不是吗?", "生命究竟是什么?它的意义又是什么?这个问题很难...但是,正是因为每一条生命都不一样,这才会散发出不同的光芒不是吗?",
"我们每一个人,都散发着各自的光芒...而这些光芒,就是人生,世界正是因为有了不同的人生才会如此精彩...", "我们每一个人,都散发着各自的光芒...而这些光芒,就是人生,世界正是因为有了不同的人生才会如此精彩...",

View File

@ -336,19 +336,7 @@ main.floors.MT102=
[70000,70000,70000,70000,70000,70000,70000,70000,70000,70000,70000,70000,70000] [70000,70000,70000,70000,70000,70000,70000,70000,70000,70000,70000,70000,70000]
], ],
"fgmap": [ "fgmap": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0,70059, 0, 0, 0, 0, 0,70060, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
], ],
"bg2map": [ "bg2map": [
[ 0, 0, 0, 0, 0, 0,70113, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0,70113, 0, 0, 0, 0, 0, 0],
@ -360,7 +348,7 @@ main.floors.MT102=
[70121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [70121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0,70059, 0, 0, 0, 0, 0, 0, 0, 0, 0,70060, 0], [ 0,70059, 0, 0, 0, 0, 0, 0, 0, 0, 0,70060, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0,70059, 0, 0, 0, 0, 0,70060, 0, 0, 0],
[ 0, 0, 0,70056, 0, 0, 0, 0, 0,70058, 0, 0, 0], [ 0, 0, 0,70056, 0, 0, 0, 0, 0,70058, 0, 0, 0],
[ 0, 0, 0,70056, 0, 0, 0, 0, 0,70058, 0, 0, 0], [ 0, 0, 0,70056, 0, 0, 0, 0, 0,70058, 0, 0, 0],
[ 0, 0, 0,70056, 0, 0, 0, 0, 0,70058, 0, 0, 0] [ 0, 0, 0,70056, 0, 0, 0, 0, 0,70058, 0, 0, 0]

View File

@ -790,6 +790,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 最终伤害:初始伤害 + 怪物对勇士造成的伤害 + 反击伤害 // 最终伤害:初始伤害 + 怪物对勇士造成的伤害 + 反击伤害
var damage = init_damage + (turn - 1) * per_damage + turn * counterDamage; var damage = init_damage + (turn - 1) * per_damage + turn * counterDamage;
if (flags.hard == 1) damage = Math.ceil(damage * 0.95 - 0.01)
// 再扣去护盾 // 再扣去护盾
damage -= hero_mdef; damage -= hero_mdef;

View File

@ -503,6 +503,16 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"浩瀚无际的星空,由一个个梦想交汇而成...抬头看向星空的时候,你是否知道自己究竟要去往何处?\n过去的时光中总有一些痛苦让你刻骨铭心总有一些快乐让你回味酸甜苦辣五味杂陈...你能感受的到吗?感受的话...你会想些啥呢?\n远在九天之上的梦想并非遥不可及踏空而行贯彻道路终有一天能够圆梦九天..." "浩瀚无际的星空,由一个个梦想交汇而成...抬头看向星空的时候,你是否知道自己究竟要去往何处?\n过去的时光中总有一些痛苦让你刻骨铭心总有一些快乐让你回味酸甜苦辣五味杂陈...你能感受的到吗?感受的话...你会想些啥呢?\n远在九天之上的梦想并非遥不可及踏空而行贯彻道路终有一天能够圆梦九天..."
] ]
}, },
{
"text": "数值显示: ${(core.getFlag(\"itemDetail\") ? \"[ON]\" : \"[OFF]\")}",
"action": [
{
"type": "setValue",
"name": "flag:itemDetail",
"value": "!flag:itemDetail"
}
]
},
{ {
"text": "离开", "text": "离开",
"action": [ "action": [

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -2017,5 +2017,155 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
dx %= 640; dx %= 640;
} }
}); });
},
"showValue": function() {/*
* 需要将 变量itemDetail改为true才可正常运行
* 请尽量减少勇士的属性数量否则可能会出现严重卡顿划掉现在你放一万个属性也不会卡
* 注意这里的属性必须是core.status.hero里面的flag无法显示
* 如果不想显示可以core.setFlag("itemDetail", false);
* 然后再core.getItemDetail();
* 如有bug在大群或造塔群@古祠
*/
// 忽略的道具
const ignore = ['superPotion'];
// 取消注释下面这句可以减少超大地图的判定。
// 如果地图宝石过多,可能会略有卡顿,可以尝试取消注释下面这句话来解决。
// core.bigmap.threshold = 256;
const origin = core.control.updateStatusBar;
core.updateStatusBar = core.control.updateStatusBar = function () {
if (core.getFlag('__statistics__')) return;
else return origin.apply(core.control, arguments);
}
core.control.updateDamage = function (floorId, ctx) {
floorId = floorId || core.status.floorId;
if (!floorId || core.status.gameOver || main.mode != 'play') return;
const onMap = ctx == null;
// 没有怪物手册
if (!core.hasItem('book')) return;
core.status.damage.posX = core.bigmap.posX;
core.status.damage.posY = core.bigmap.posY;
if (!onMap) {
const width = core.floors[floorId].width,
height = core.floors[floorId].height;
// 地图过大的缩略图不绘制显伤
if (width * height > core.bigmap.threshold) return;
}
this._updateDamage_damage(floorId, onMap);
this._updateDamage_extraDamage(floorId, onMap);
core.getItemDetail(floorId); // 宝石血瓶详细信息
this.drawDamage(ctx);
};
// 获取宝石信息 并绘制
this.getItemDetail = function (floorId) {
if (!core.getFlag('itemDetail')) return;
floorId = floorId ?? core.status.thisMap.floorId;
let diff = {};
const before = core.status.hero;
const hero = core.clone(core.status.hero);
const handler = {
set(target, key, v) {
diff[key] = v - (target[key] || 0);
if (!diff[key]) diff[key] = void 0;
return true;
}
};
core.status.hero = new Proxy(hero, handler);
core.status.maps[floorId].blocks.forEach(function (block) {
if (
block.event.cls !== 'items' ||
ignore.includes(block.event.id) ||
block.disable
)
return;
const x = block.x,
y = block.y;
// v2优化只绘制范围内的部分
if (core.bigmap.v2) {
if (
x < core.bigmap.posX - core.bigmap.extend ||
x > core.bigmap.posX + core._WIDTH_ + core.bigmap.extend ||
y < core.bigmap.posY - core.bigmap.extend ||
y > core.bigmap.posY + core._HEIGHT_ + core.bigmap.extend
) {
return;
}
}
diff = {};
const id = block.event.id;
const item = core.material.items[id];
if (item.cls === 'equips') {
// 装备也显示
const diff = item.equip.value ?? {};
const per = item.equip.percentage ?? {};
for (const name in per) {
diff[name + 'per'] = per[name].toString() + '%';
}
drawItemDetail(diff, x, y);
return;
}
// 跟数据统计原理一样 执行效果 前后比较
core.setFlag('__statistics__', true);
try {
eval(item.itemEffect);
} catch (error) {}
drawItemDetail(diff, x, y);
});
core.status.hero = before;
window.hero = before;
window.flags = before.flags;
};
// 绘制
function drawItemDetail(diff, x, y) {
const px = 32 * x + 2,
py = 32 * y + 30;
let content = '';
// 获得数据和颜色
let i = 0;
for (const name in diff) {
if (!diff[name]) continue;
let color = '#fff';
if (typeof diff[name] === 'number')
content = core.formatBigNumber(diff[name], true);
else content = diff[name];
switch (name) {
case 'atk':
case 'atkper':
color = '#FF7A7A';
break;
case 'def':
case 'defper':
color = '#00E6F1';
break;
case 'mdef':
case 'mdefper':
color = '#6EFF83';
break;
case 'hp':
color = '#A4FF00';
break;
case 'hpmax':
case 'hpmaxper':
color = '#F9FF00';
break;
case 'mana':
color = '#c66';
break;
}
// 绘制
core.status.damage.data.push({
text: content,
px: px,
py: py - 10 * i,
color: color
});
i++;
}
}
} }
} }