From d4bf4ec02989c087e12cb2ba2fdc5b3c4b049f71 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sun, 22 Jul 2018 15:11:33 +0800 Subject: [PATCH] V2.3.3 --- libs/core.js | 15 +++++++++++++++ libs/enemys.js | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libs/core.js b/libs/core.js index 9707a9fb..f199fa24 100644 --- a/libs/core.js +++ b/libs/core.js @@ -764,6 +764,21 @@ core.prototype.updateFg = function () { core.control.updateFg(); } +////// 测试是否拥有某个特殊属性 ////// +core.prototype.hasSpecial = function (special, test) { + return core.enemys.hasSpecial(special, test); +} + +////// 判断能否战斗 ////// +core.prototype.canBattle = function(enemyId) { + return core.enemys.canBattle(enemyId); +} + +////// 获得伤害数值 ////// +core.prototype.getDamage = function(enemy) { + return core.enemys.getDamage(enemy); +} + ////// 获得某个物品的个数 ////// core.prototype.itemCount = function (itemId) { return core.items.itemCount(itemId); diff --git a/libs/enemys.js b/libs/enemys.js index 57a48049..058389a4 100644 --- a/libs/enemys.js +++ b/libs/enemys.js @@ -6,7 +6,7 @@ function enemys() { enemys.prototype.init = function () { this.enemys = enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80; this.enemydata = functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a.enemys; - this.enemydata.hasSpecial = function (a, b) {return core.enemys.hasSpecial(a, b)}; + if (main.mode=='play') this.enemydata.hasSpecial = function (a, b) {return core.enemys.hasSpecial(a, b)}; } ////// 获得一个或所有怪物数据 //////