修复后期使用光明药水魔力变为602214的问题;加快临界的计算;加入更多提示;吃非一阶宝石也会发出吃宝石的声音

This commit is contained in:
bdf1 2024-09-01 21:20:43 +08:00
parent bb5c998dd1
commit aa6e89eeb8
8 changed files with 98 additions and 45 deletions

View File

@ -380,7 +380,7 @@ main.floors.BH20=
"\t[莫析辉,hero]\b[hero]可恶,我以为打败了黑暗圣子,便已经无忧了,没想到 这个黑暗圣女如此强大……",
"\t[希娜,N538]\b[this,5,4]……",
"\t[希娜,N538]\b[this,5,4]父皇陨落,我先整合北寒帝国吧,然后集北寒帝国之力,助你对付黑暗神殿。",
"\t[莫析辉,hero]\b[hero]黛默琳已经扰乱了东凌帝国、南荒帝国、北寒帝国……糟了,下一步定是\r[red]\\c[30]西武帝国\\c[]\r[]。看来不能多留了,我得去西武帝国看看。",
"\t[莫析辉,hero]\b[hero]黛默琳已经扰乱了东凌帝国、南荒帝国、北寒帝国……糟了,下一步定是\r[red]\\c[30]西武帝国\\c[]\r[]。看来不能多留了,我得去西武帝国看看。西武帝国的入口在深入区的终点。",
{
"type": "setBlock",
"number": "I416",

View File

@ -160,7 +160,12 @@ main.floors.GM2=
],
"floorId": "GM1",
"remove": true
}
},
{
"type": "openShop",
"id": "shop1"
},
"\t[光明教皇,N464]\b[this,6,5]请你去一下你的圣子宫。"
],
"eachArrive": [
{

View File

@ -91,7 +91,8 @@ main.floors.GM3=
]
],
"remove": true
}
},
"\t[葛尔丹,N566]\b[this,6,2]请你去一下左边的圣子寝殿。"
],
"eachArrive": [],
"parallelDo": "",

View File

@ -57,7 +57,7 @@ main.floors.NH10=
"\t[莫析辉,hero]\b[hero]好。",
"\t[默默,N481]\b[this,5,1]有光明神殿两位圣子、南荒帝国大皇子、北寒帝国希娜公主、还有光明神殿骑士队长大人、加上几位守护骑士、还有我们夜馨公会的,必定马到成功!",
"\t[莫析辉,hero]\b[hero]那么,各位,行动起来!",
"\t[众人]破冰行动,开始!(\r[red]\\c[30]前往北寒帝国\\c[]\r[]",
"\t[众人]破冰行动,开始!(\r[red]\\c[30]前往北寒帝国,北寒帝国入口在北寒小道终点\\c[]\r[]",
{
"type": "hide",
"loc": [

View File

@ -135,7 +135,8 @@ main.floors.SN10=
"floorId": "GM2",
"remove": true
},
"\t[莫析辉,hero]\b[hero]看来,我最近修为停滞的事情,也被教皇爷爷发觉了,也许,去骑士队锻炼锻炼,能够让我的修为有所增长呢。"
"\t[莫析辉,hero]\b[hero]看来,我最近修为停滞的事情,也被教皇爷爷发觉了,也许,去骑士队锻炼锻炼,能够让我的修为有所增长呢。",
"\t[莫析辉,hero]\b[hero]骑士队在光明神殿的右边,我觉得我需要去骑士队锻炼锻炼,能够让我的修为有所增长呢。"
],
"eachArrive": [
{

View File

@ -217,7 +217,8 @@ main.floors.SR10=
"6,2": [
"\t[莫析辉,hero]\b[hero]奇怪,墨奈居然不在这里……喂,那个家伙,你知道黑暗圣子在哪里吗?",
"\t[骷髅金将,E739]\b[this,6,6]吼!",
"\t[莫析辉,hero]\b[hero]看来是个没头脑的怪物,免得它伤及无辜,我还是先解决了它吧!"
"\t[莫析辉,hero]\b[hero]看来是个没头脑的怪物,免得它伤及无辜,我还是先解决了它吧!",
"打完后后续的剧情会让勇士回满血。"
]
},
"autoEvent": {

View File

@ -504,6 +504,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
core.playSound('heal.mp3');
else if (itemId.endsWith('Gem') && core.material.items[itemId].cls == 'items')
core.playSound('宝石')
else if (['I342', 'I343', 'I344', 'I345', 'I346', 'I347', 'I348', 'I349', 'I350', 'I351', 'I352', 'I353', 'I354', 'I355', 'I356', 'I357', 'I358', 'I359', 'I360', 'I361', 'I362', 'I363', 'I364', 'I365', 'I366', 'I367', 'I368', 'I369', 'I370', 'I371', 'I372', 'I373', 'I374', 'I375', 'I376', 'I598', 'I599', 'I600', 'I601', 'I602', 'I603', 'I604', 'I605', 'I606', 'I607', 'I608', 'I609', 'I610', 'I611', 'I612', 'I613', 'I614', 'I615', 'I616', 'I617', 'I618', 'I619', 'I620', 'I621', 'I692', 'I693', 'I694', 'I695', 'I696', 'I697', 'I698', 'I699', 'I700', 'I701', 'I702', 'I703', 'I704', 'I705', 'I706', 'I707', 'I708', 'I709', 'I1097', 'I1098', 'I1099', 'I1100'].includes(itemId))
core.playSound('宝石')
else
core.playSound('获得道具');
if (core.material.items[itemId].cls == 'equips' || itemId == 'I715' || itemId == 'I421') core.plugin.calcEquip();
@ -1384,7 +1386,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 设置魔力值; 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.status.hero.mana = Math.min(core.status.hero.mana, core.getRealStatus('manamax') + core.getRealStatus('hpmax'));
core.setStatusBarInnerHTML('mana', core.status.hero.mana + "/" + core.getRealStatus('manamax'));
} else {
core.setStatusBarInnerHTML("mana", core.status.hero.mana);
@ -1855,48 +1857,55 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
},
"drawStatistics": function () {
// 浏览地图时参与的统计项目
// 浏览地图时参与的统计项目
return [
'yellowDoor', 'blueDoor', 'redDoor', 'greenDoor', 'steelDoor',
'yellowKey', 'blueKey', 'redKey', 'greenKey', 'steelKey',
'redGem', 'blueGem', 'greenGem', 'yellowGem',
'redPotion', 'bluePotion', 'greenPotion', 'yellowPotion', 'superPotion',
'pickaxe', 'bomb', 'centerFly', 'icePickaxe', 'freezeBadge',
'earthquake', 'upFly', 'downFly', 'jumpShoes', 'lifeWand',
'poisonWine', 'weakWine', 'curseWine', 'superWine',
'sword1', 'sword2', 'sword3', 'sword4', 'sword5',
'shield1', 'shield2', 'shield3', 'shield4', 'shield5',
// 在这里可以增加新的ID来进行统计个数只能增加道具ID
];
},
return [
'yellowDoor', 'blueDoor', 'redDoor', 'greenDoor', 'steelDoor',
'yellowKey', 'blueKey', 'redKey', 'greenKey', 'steelKey',
'pickaxe', 'bomb', 'centerFly', 'icePickaxe', 'freezeBadge',
'earthquake', 'upFly', 'downFly', 'jumpShoes', 'lifeWand',
'poisonWine', 'weakWine', 'curseWine', 'superWine',
'sword1', 'sword2', 'sword3', 'sword4', 'sword5',
'shield1', 'shield2', 'shield3', 'shield4', 'shield5',
'I692', 'I693', 'I694', 'I695', 'I696', 'I697', 'I698', 'I699', 'I700', 'I701', 'I702', 'I703'
// 在这里可以增加新的ID来进行统计个数只能增加道具ID
];
},
"drawAbout": function () {
// 绘制“关于”界面
core.ui.closePanel();
core.lockControl();
core.status.event.id = 'about';
// 绘制“关于”界面
core.ui.closePanel();
core.lockControl();
core.status.event.id = 'about';
var left = 48,
top = 36,
right = (core._PX_ || core.__PIXELS__) - 2 * left,
bottom = (core._PY_ || core.__PIXELS__) - 2 * top;
var left = 48,
top = 36,
right = (core._PX_ || core.__PIXELS__) - 2 * left,
bottom = (core._PY_ || core.__PIXELS__) - 2 * top;
core.setAlpha('ui', 0.85);
core.fillRect('ui', left, top, right, bottom, '#000000');
core.setAlpha('ui', 1);
core.strokeRect('ui', left - 1, top - 1, right + 1, bottom + 1, '#FFFFFF', 2);
core.setAlpha('ui', 0.85);
core.fillRect('ui', left, top, right, bottom, '#000000');
core.setAlpha('ui', 1);
core.strokeRect('ui', left - 1, top - 1, right + 1, bottom + 1, '#FFFFFF', 2);
var text_start = left + 24;
var text_start = left + 24;
// 名称
core.setTextAlign('ui', 'left');
var globalAttribute = core.status.globalAttribute || core.initStatus.globalAttribute;
core.fillText('ui', "HTML5 魔塔样板", text_start, top + 35, globalAttribute.selectColor, "bold 22px " + globalAttribute.font);
core.fillText('ui', "版本: " + main.__VERSION__, text_start, top + 80, "#FFFFFF", "bold 17px " + globalAttribute.font);
core.fillText('ui', "作者: 艾之葵", text_start, top + 112);
core.fillText('ui', 'HTML5魔塔交流群539113091', text_start, top + 112 + 32);
// TODO: 写自己的“关于”页面每次增加32像素即可
core.playSound('打开界面');
}
// 名称
core.setTextAlign('ui', 'left');
var globalAttribute = core.status.globalAttribute || core.initStatus.globalAttribute;
core.fillText('ui', "新圣骑士", text_start, top + 35, globalAttribute.selectColor, "bold 22px " + globalAttribute.font);
core.fillText('ui', "版本: " + main.__VERSION__, text_start, top + 72, "#FFFFFF", "bold 17px " + globalAttribute.font);
core.fillText('ui', "作者: bdf1 迷迭香", text_start, top + 100);
core.fillText('ui', 'HTML5魔塔交流群', text_start, top + 100 + 28);
core.fillText('ui', '539113091 624253557', text_start, top + 100 + 56);
core.fillText('ui', 'HTML5魔塔技术群959329661', text_start, top + 100 + 84);
core.fillText('ui', '迷迭香粉丝群901012439', text_start, top + 100 + 112);
core.fillText('ui', '童元粉丝群1026767730', text_start, top + 100 + 140);
core.fillText('ui', '蛋蛋粉丝群598458601', text_start, top + 100 + 168);
core.fillText('ui', '本塔为第七届蓝海赛参赛塔', text_start, top + 100 + 196);
core.fillText('ui', '第七届蓝海赛总奖金 5,672 元', text_start, top + 100 + 224);
// TODO: 写自己的“关于”页面每次增加32像素即可
core.playSound('打开界面');
}
}
}

View File

@ -3861,11 +3861,46 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.getItemDetail(floorId); // 宝石血瓶详细信息
this.drawDamage(ctx);
};
this.nextCriticals = function (enemy, number, x, y, floorId) {
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
if (core.lhjnb[enemy]) return core.lhjnb[enemy];
number = number || 1;
var specialCriticals = core.enemys._nextCriticals_special(enemy, number, x, y, floorId);
if (specialCriticals != null) return core.lhjnb[enemy] = specialCriticals;
var info = core.enemys.getDamageInfo(enemy, null, x, y, floorId);
if (info == null) { // 如果未破防...
var overAtk = core.enemys._nextCriticals_overAtk(enemy, x, y, floorId);
if (overAtk == null) return core.lhjnb[enemy] = [];
if (typeof overAtk[1] == 'number') return core.lhjnb[enemy] = [[overAtk[0], -overAtk[1]]];
info = overAtk[1];
info.__over__ = true;
info.__overAtk__ = overAtk[0];
}
if (typeof info == 'number') return core.lhjnb[enemy] = [[0, 0]];
if (info.damage <= 0 && !core.flags.enableNegativeDamage) {
return core.lhjnb[enemy] = [[info.__overAtk__ || 0, 0]];
}
if (core.flags.useLoop) {
if (core.status.hero.atk <= (main.criticalUseLoop || 1)) {
return core.lhjnb[enemy] = core.enemys._nextCriticals_useLoop(enemy, info, number, x, y, floorId);
}
else {
return core.lhjnb[enemy] = core.enemys._nextCriticals_useBinarySearch(enemy, info, number, x, y, floorId);
}
}
else {
return core.lhjnb[enemy] = core.enemys._nextCriticals_useTurn(enemy, info, number, x, y, floorId);
}
}
core.control._updateDamage_damage = function (floorId, onMap) {
core.status.damage.data = [];
if (!core.flags.displayEnemyDamage && !core.flags.displayExtraDamage) return;
core.extractBlocks(floorId);
core.lhjnb = {}
core.status.maps[floorId].blocks.forEach(function (block) {
var x = block.x,
y = block.y;
@ -3878,9 +3913,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
}
}
if (!block.disable && block.event.cls.indexOf('enemy') == 0 && block.event.displayDamage !== false) {
if (core.flags.displayCritical) {
var critical = core.enemys.nextCriticals(block.event.id, 1, x, y, floorId);
var critical = core.plugin.nextCriticals(block.event.id, 1, x, y, floorId);
critical = core.formatBigNumber((critical[0] || [])[0], true);
if (critical == '???') critical = '?';
core.status.damage.data.push({ text: critical, px: 32 * x + 1, py: 32 * (y + 1) - 11, color: '#FFFFFF' });