mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-26 19:54:30 +08:00
事件中的强制战斗
This commit is contained in:
1 parent
351e136775
commit
fbe81fedd2
10 files changed
+549
-477
No files matched your search
@@ -1468,11 +1468,11 @@ control.prototype.updateDamage = function (floorId, ctx) {
|
||||
};
|
||||
|
||||
control.prototype._updateDamage_damage = function (floorId, onMap) {
|
||||
// Deprecated. See src/plugin/game/damage.ts EnemyCollection.render.
|
||||
// Deprecated. See src/plugin/game/enemy/damage.ts EnemyCollection.render.
|
||||
};
|
||||
|
||||
control.prototype._updateDamage_extraDamage = function (floorId, onMap) {
|
||||
// Deprecated. See src/plugin/game/damage.ts EnemyCollection.render.
|
||||
// Deprecated. See src/plugin/game/enemy/damage.ts EnemyCollection.render.
|
||||
};
|
||||
|
||||
////// 重绘地图显伤 //////
|
||||
|
||||
@@ -203,7 +203,7 @@ enemys.prototype.getEnemyValue = function (enemy, name, x, y, floorId) {
|
||||
|
||||
////// 能否获胜 //////
|
||||
enemys.prototype.canBattle = function (enemy, x, y, floorId) {
|
||||
// Deprecated. See src/plugin/game/battle.ts
|
||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
||||
};
|
||||
|
||||
enemys.prototype.getDamageString = function (enemy, x, y, floorId, hero) {
|
||||
|
||||
+4
-31
@@ -430,49 +430,22 @@ events.prototype._trigger_ignoreChangeFloor = function (block) {
|
||||
};
|
||||
|
||||
events.prototype._sys_battle = function (data, callback) {
|
||||
// todo: 重写这个函数的一部分
|
||||
|
||||
// 检查战前事件
|
||||
var beforeBattle = [];
|
||||
core.push(
|
||||
beforeBattle,
|
||||
core.floors[core.status.floorId].beforeBattle[data.x + ',' + data.y]
|
||||
);
|
||||
core.push(
|
||||
beforeBattle,
|
||||
(core.material.enemys[data.event.id] || {}).beforeBattle
|
||||
);
|
||||
if (beforeBattle.length > 0) {
|
||||
core.push(beforeBattle, [{ type: 'battle', x: data.x, y: data.y }]);
|
||||
core.clearContinueAutomaticRoute();
|
||||
|
||||
// 自动存档
|
||||
var inAction = core.status.event.id == 'action';
|
||||
if (inAction) {
|
||||
core.insertAction(beforeBattle, data.x, data.y);
|
||||
core.doAction();
|
||||
} else {
|
||||
core.autosave(true);
|
||||
core.insertAction(beforeBattle, data.x, data.y, callback);
|
||||
}
|
||||
} else {
|
||||
this.battle(data.event.id, data.x, data.y, false, callback);
|
||||
}
|
||||
// Deprecated. See /src/plugin/game/enemy/battle.ts
|
||||
};
|
||||
|
||||
////// 战斗 //////
|
||||
events.prototype.battle = function (id, x, y, force, callback) {
|
||||
// Deprecated. See src/plugin/game/battle.ts
|
||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
||||
};
|
||||
|
||||
////// 战斗前触发的事件 //////
|
||||
events.prototype.beforeBattle = function (enemyId, x, y) {
|
||||
// Deprecated. See src/plugin/game/battle.ts
|
||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
||||
};
|
||||
|
||||
////// 战斗结束后触发的事件 //////
|
||||
events.prototype.afterBattle = function (enemyId, x, y) {
|
||||
// Deprecated. See src/plugin/game/battle.ts
|
||||
// Deprecated. See src/plugin/game/enemy/battle.ts
|
||||
};
|
||||
|
||||
events.prototype._sys_openDoor = function (data, callback) {
|
||||
|
||||
Reference in new issue
Block a user