属性,战斗更改

This commit is contained in:
草莓 2025-01-30 00:10:55 +08:00
parent 6ad6856671
commit 67f531c4c5
5 changed files with 2973 additions and 2909 deletions

View File

@ -4625,8 +4625,8 @@ IdString
; ;
FixedId_List FixedId_List
: '生命'|'生命上限'|'攻击'|'防御'|'护盾'|'黄钥匙'|'蓝钥匙'|'红钥匙'|'金币'|'经验'|'魔力'|'魔力上限'|'当前横坐标'|'当前纵坐标'|'当前朝向'|'攻击增益'|'防御增益'|'护盾增益' : '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔攻比例'|'护盾比例'|'黄钥匙'|'蓝钥匙'|'红钥匙'|'金币'|'经验'|'魔力'|'魔力上限'|'当前横坐标'|'当前纵坐标'|'当前朝向'|'攻击增益'|'防御增益'|'护盾增益'
/*FixedId_List ['status:hp','status:hpmax','status:atk','status:def','status:mdef','item:yellowKey','item:blueKey','item:redKey','status:money','status:exp','status:mana','status:manamax','status:x','status:y','status:direction','buff:atk','buff:def','buff:mdef']*/; /*FixedId_List ['status:hp','status:hpmax','status:atk','status:def''status:spell''status:matk','status:mdef','item:yellowKey','item:blueKey','item:redKey','status:money','status:exp','status:mana','status:manamax','status:x','status:y','status:direction','buff:atk','buff:def','buff:mdef']*/;
Id_List Id_List
: '变量' | '状态' | '物品' | '增益' | '独立开关' | '临时变量' |'全局存储' : '变量' | '状态' | '物品' | '增益' | '独立开关' | '临时变量' |'全局存储'
@ -4641,8 +4641,8 @@ EnemyPoint_List
/*EnemyPoint_List ['hp','atk','def','money','exp','point','name']*/; /*EnemyPoint_List ['hp','atk','def','money','exp','point','name']*/;
Equip_List Equip_List
: '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔力'|'魔力上限'|'速度' : '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔攻比例'|'护盾比例'|'魔力'|'魔力上限'|'速度'
/*Equip_List ['hp','hpmax','atk','def','mdef','mana','manamax','speed']*/; /*Equip_List ['hp','hpmax','atk','def','spell','matk','mdef','mana','manamax','speed']*/;
Key_List Key_List
: '黄钥匙'|'蓝钥匙'|'红钥匙'|'绿钥匙'|'铁门钥匙' : '黄钥匙'|'蓝钥匙'|'红钥匙'|'绿钥匙'|'铁门钥匙'

View File

@ -264,10 +264,23 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "textarea", "_type": "textarea",
"_data": "防御" "_data": "防御"
}, },
"spell": {
"_leaf": true,
"_type": "textarea",
"_data": "法强",
},
"matk": {
"_leaf": true,
"_type": "textarea",
"_data": "100为法强转化为等值魔攻",
"_docs": "魔攻比例"
},
"mdef": { "mdef": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "法强" "_data": "100为法强转化为等值护盾",
"_docs": "护盾比例"
}, },
"speed": { "speed": {
"_leaf": true, "_leaf": true,

View File

@ -1135,7 +1135,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"useBetweenLight": true "useBetweenLight": true
}, },
"followers": [], "followers": [],
"steps": 0 "steps": 0,
"matk": 0
}, },
"startCanvas": [ "startCanvas": [
{ {

View File

@ -1167,7 +1167,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
mana: "魔力", mana: "魔力",
atk: "攻击", atk: "攻击",
def: "防御", def: "防御",
mdef: "法强", spell: "法强",
matk: "魔攻比例",
mdef: "护盾比例",
speed: "速度", speed: "速度",
money: "金币", money: "金币",
exp: "经验", exp: "经验",

View File

@ -3846,8 +3846,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
var mid = Math.floor((start + end) / 2); var mid = Math.floor((start + end) / 2);
if (mid - start > end - mid) mid--; if (mid - start > end - mid) mid--;
var nextInfo = core.enemys.getDamageInfo( var nextInfo = core.enemys.getDamageInfo(
enemy, enemy, { atk: mid },
{ atk: mid },
x, x,
y, y,
floorId floorId
@ -3857,17 +3856,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
else start = mid + 1; else start = mid + 1;
} }
var nextInfo = core.enemys.getDamageInfo( var nextInfo = core.enemys.getDamageInfo(
enemy, enemy, { atk: start },
{ atk: start },
x, x,
y, y,
floorId floorId
); );
return nextInfo == null || return nextInfo == null ||
typeof nextInfo == "number" || typeof nextInfo == "number" ||
nextInfo.damage >= pre nextInfo.damage >= pre ?
? null null : [start, nextInfo.damage];
: [start, nextInfo.damage];
}; };
var currAtk = start_atk; var currAtk = start_atk;
while (true) { while (true) {
@ -4297,7 +4294,29 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
// 仿RM窗口皮肤 ↑ // 仿RM窗口皮肤 ↑
}; };
}, events.prototype.battle = function (id, x, y, force, callback) {
core.saveAndStopAutomaticRoute();
id = id || core.getBlockId(x, y);
const cls = core.getClsFromId(id)
if (!id || !cls || !(cls === 'enemys' || cls === 'enemy48')) return core.clearContinueAutomaticRoute(callback);
// 非强制战斗
if (!core.enemys.canBattle(id, x, y) && !force && !core.status.event.id) {
core.stopSound();
core.playSound("操作失败");
core.drawTip("你打不过此怪物!", id);
return core.clearContinueAutomaticRoute(callback);
}
// 自动存档
if (!core.status.event.id) core.autosave(true);
// 战前事件
if (!this.beforeBattle(id, x, y))
return core.clearContinueAutomaticRoute(callback);
// 战后事件
this.afterBattle(id, x, y);
if (callback) callback();
};
},
"额外信息": function () { "额外信息": function () {
/* /*
* 注意不要在道具属性中直接操作flags使用core.status.hero.flags或core.setFlag系列函数代替 * 注意不要在道具属性中直接操作flags使用core.status.hero.flags或core.setFlag系列函数代替
@ -14100,6 +14119,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
}; };
core.registerReplayAction("fly", replayAction_fly); core.registerReplayAction("fly", replayAction_fly);
////// 查看地图界面时,放开某个键的操作 ////// ////// 查看地图界面时,放开某个键的操作 //////
actions.prototype._keyUpViewMaps = function (keycode) { actions.prototype._keyUpViewMaps = function (keycode) {
if (core.status.event.data == null) { if (core.status.event.data == null) {
core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId));
@ -14117,18 +14137,19 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.updateStatusBar(); core.updateStatusBar();
return; return;
} }
if (keycode == 88) {
core.openBook(true);
return;
}
if (keycode == 86) { if (keycode == 86) {
core.status.event.data.damage = !core.status.event.data.damage; core.status.event.data.damage = !core.status.event.data.damage;
core.playSound("光标移动"); core.playSound("光标移动");
core.ui._drawViewMaps(core.status.event.data); core.ui._drawViewMaps(core.status.event.data);
return; return;
} }
if (keycode == 66) { if (keycode == 66 || keycode == 88) {
if (core.isReplaying()) {
core.control._replay_book();
} else {
core.openBook(false); core.openBook(false);
}
return; return;
} }
if ( if (
@ -14241,7 +14262,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
actions.prototype._sys_onmousewheel, actions.prototype._sys_onmousewheel,
0 0
); );
}, },
"CG回廊": function () { "CG回廊": function () {
// 在此增加新插件 // 在此增加新插件
const CGUI = document.createElement("canvas"); //CGui画布设置 const CGUI = document.createElement("canvas"); //CGui画布设置
@ -17074,7 +17095,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
[x + w, y + h], [x + w, y + h],
]; ];
}; };
const inRect = ([x, y], [[sx, sy], [dx, dy]]) => { const inRect = ([x, y], [
[sx, sy],
[dx, dy]
]) => {
return sx <= x && x <= dx && sy <= y && y <= dy; return sx <= x && x <= dx && sy <= y && y <= dy;
}; };
const pos = [px, py]; const pos = [px, py];
@ -17663,9 +17687,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
text, text,
150, 150,
posy - 30, posy - 30,
page === this.selection[0] && i === this.selection[1] page === this.selection[0] && i === this.selection[1] ?
? "#FFFFFF" "#FFFFFF" :
: "#444444", "#444444",
"#000000", "#000000",
6, 6,
core.ui._buildFont(66, true) core.ui._buildFont(66, true)
@ -17863,9 +17887,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
text, text,
950, 950,
posy - 30, posy - 30,
page === this.selection[0] && i === this.selection[1] page === this.selection[0] && i === this.selection[1] ?
? "#FFFFFF" "#FFFFFF" :
: "#444444", "#444444",
"#000000", "#000000",
6, 6,
core.ui._buildFont(66, true) core.ui._buildFont(66, true)
@ -18066,7 +18090,17 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
}); });
}; };
}, loader.prototype.loadOneMusic = function (name) {
/* var music = new Audio();
music.preload = "none";
if (main.bgmRemote)
music.src = main.bgmRemoteRoot + core.firstData.name + "/" + name;
else music.src = "project/bgms/" + name;
music.loop = "loop";
core.material.bgms[name] = music;*/
};
},
"横屏切换": function () { "横屏切换": function () {
// 在此增加新插件 // 在此增加新插件
this.triggerFullscreen = async function (full) { this.triggerFullscreen = async function (full) {
@ -18340,7 +18374,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.playBgm(loop); core.playBgm(loop);
}, time * 1000); }, time * 1000);
}; };
}, },
"开局选项悬停": function () { "开局选项悬停": function () {
// 在此增加新插件 // 在此增加新插件
@ -18762,13 +18796,27 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
32 * (animate % 4), 32 * (animate % 4),
core.getBlockInfo(enemyInfo.id).posY * 48, core.getBlockInfo(enemyInfo.id).posY * 48,
32, 32,
32, 48,
272, 272,
144, 144,
32, 32,
48 48
); );
} }
core.fillBoldText(ctx,
"V",
219,
168,
"#FFFFFF",
"#000000",
core.ui._buildFont(48, true))
core.fillBoldText(ctx,
"s",
231,
168,
"#FFFFFF",
"#000000",
core.ui._buildFont(36, true))
}; };
this.attackAnimate = function ( this.attackAnimate = function (
@ -18821,7 +18869,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
}); });
}; };
}, },
"剧情内容": function () { "剧情内容": function () {
// 在此增加新插件 // 在此增加新插件
// 每项为一个数组,第一项是名字,第二项是对话内容 // 每项为一个数组,第一项是名字,第二项是对话内容