怪物详细信息光环错误;钥匙不消耗
This commit is contained in:
parent
f90814b5ff
commit
20f2671206
@ -507,25 +507,27 @@ doorKeyList
|
|||||||
|
|
||||||
|
|
||||||
doorKeyKnown
|
doorKeyKnown
|
||||||
: Key_List ':' Int BEND
|
: Key_List ':' Int '需要但不消耗' Bool BEND
|
||||||
|
|
||||||
|
|
||||||
/* doorKeyKnown
|
/* doorKeyKnown
|
||||||
tooltip : 需要钥匙
|
tooltip : 需要钥匙
|
||||||
default : ['yellowKey', 1]
|
default : ['yellowKey', 1, false]
|
||||||
helpUrl : https://h5mota.com/games/template/_docs/#/event
|
helpUrl : https://h5mota.com/games/template/_docs/#/event
|
||||||
|
if (Bool_0) Key_List_0 += ':o';
|
||||||
return '"'+Key_List_0+'": '+Int_0+', ';
|
return '"'+Key_List_0+'": '+Int_0+', ';
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
doorKeyUnknown
|
doorKeyUnknown
|
||||||
: IdString ':' Int BEND
|
: IdString ':' Int '需要但不消耗' Bool BEND
|
||||||
|
|
||||||
|
|
||||||
/* doorKeyUnknown
|
/* doorKeyUnknown
|
||||||
tooltip : 需要钥匙
|
tooltip : 需要钥匙
|
||||||
default : ['orangeKey', 1]
|
default : ['orangeKey', 1, false]
|
||||||
helpUrl : https://h5mota.com/games/template/_docs/#/event
|
helpUrl : https://h5mota.com/games/template/_docs/#/event
|
||||||
allItems : ['IdString_0']
|
allItems : ['IdString_0']
|
||||||
|
if (Bool_0) IdString_0 += ':o';
|
||||||
return '"'+IdString_0+'": '+Int_0+', ';
|
return '"'+IdString_0+'": '+Int_0+', ';
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
|
|||||||
@ -81,9 +81,11 @@ ActionParser.prototype.parse = function (obj,type) {
|
|||||||
var text_choices = null;
|
var text_choices = null;
|
||||||
var knownListKeys = MotaActionBlocks['Key_List'].options.map(function (one) {return one[1];})
|
var knownListKeys = MotaActionBlocks['Key_List'].options.map(function (one) {return one[1];})
|
||||||
Object.keys(obj).sort().forEach(function (key) {
|
Object.keys(obj).sort().forEach(function (key) {
|
||||||
|
var noNeed = key.endsWith(':o');
|
||||||
|
if (noNeed) key = key.substring(0, key.length - 2);
|
||||||
var one = knownListKeys.indexOf(key) >= 0 ? 'doorKeyKnown' : 'doorKeyUnknown';
|
var one = knownListKeys.indexOf(key) >= 0 ? 'doorKeyKnown' : 'doorKeyUnknown';
|
||||||
text_choices = MotaActionBlocks[one].xmlText([
|
text_choices = MotaActionBlocks[one].xmlText([
|
||||||
one == 'doorKeyUnknown' ? MotaActionFunctions.replaceToName_token(key) : key, obj[key], text_choices
|
one == 'doorKeyUnknown' ? MotaActionFunctions.replaceToName_token(key) : key, obj[key], noNeed, text_choices
|
||||||
]);
|
]);
|
||||||
})
|
})
|
||||||
return text_choices;
|
return text_choices;
|
||||||
|
|||||||
@ -471,20 +471,22 @@ events.prototype._openDoor_check = function (id, x, y, needKey) {
|
|||||||
var keyInfo = doorInfo.keys || {};
|
var keyInfo = doorInfo.keys || {};
|
||||||
if (needKey) {
|
if (needKey) {
|
||||||
for (var keyName in keyInfo) {
|
for (var keyName in keyInfo) {
|
||||||
|
var keyValue = keyInfo[keyName];
|
||||||
|
if (keyName.endsWith(':o')) keyName = keyName.substring(0, keyName.length - 2);
|
||||||
|
|
||||||
// --- 如果是一个不存在的道具,则直接认为无法开启
|
// --- 如果是一个不存在的道具,则直接认为无法开启
|
||||||
if (!core.material.items[keyName]) {
|
if (!core.material.items[keyName]) {
|
||||||
core.drawTip("无法开启此门");
|
core.drawTip("无法开启此门");
|
||||||
return clearAndReturn();
|
return clearAndReturn();
|
||||||
}
|
}
|
||||||
var keyValue = keyInfo[keyName];
|
|
||||||
if (core.itemCount(keyName) < keyValue) {
|
if (core.itemCount(keyName) < keyValue) {
|
||||||
core.drawTip("你没有" + ((core.material.items[keyName] || {}).name || "钥匙"), null, true);
|
core.drawTip("你的" + ((core.material.items[keyName] || {}).name || "钥匙") + "不足!", null, true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!core.status.event.id) core.autosave(true);
|
if (!core.status.event.id) core.autosave(true);
|
||||||
for (var keyName in keyInfo) {
|
for (var keyName in keyInfo) {
|
||||||
core.removeItem(keyName, keyInfo[keyName]);
|
if (!keyName.endsWith(':o')) core.removeItem(keyName, keyInfo[keyName]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
core.playSound(doorInfo.openSound);
|
core.playSound(doorInfo.openSound);
|
||||||
|
|||||||
10
libs/ui.js
10
libs/ui.js
@ -2134,15 +2134,15 @@ ui.prototype._drawBookDetail_hatred = function (enemy, texts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui.prototype._drawBookDetail_turnAndCriticals = function (enemy, floorId, texts) {
|
ui.prototype._drawBookDetail_turnAndCriticals = function (enemy, floorId, texts) {
|
||||||
var damageInfo = core.getDamageInfo(enemy, null, null, null, floorId);
|
var damageInfo = core.getDamageInfo(enemy.id, null, null, null, floorId);
|
||||||
texts.push("\r[#FF6A6A]\\d战斗回合数:\\d\r[]"+((damageInfo||{}).turn||0));
|
texts.push("\r[#FF6A6A]\\d战斗回合数:\\d\r[]"+((damageInfo||{}).turn||0));
|
||||||
// 临界表
|
// 临界表
|
||||||
var criticals = core.enemys.nextCriticals(enemy, 8, null, null, floorId).map(function (v) {
|
var criticals = core.enemys.nextCriticals(enemy.id, 8, null, null, floorId).map(function (v) {
|
||||||
return core.formatBigNumber(v[0])+":"+core.formatBigNumber(v[1]);
|
return core.formatBigNumber(v[0])+":"+core.formatBigNumber(v[1]);
|
||||||
});
|
});
|
||||||
while (criticals[0]=='0:0') criticals.shift();
|
while (criticals[0]=='0:0') criticals.shift();
|
||||||
texts.push("\r[#FF6A6A]\\d临界表:\\d\r[]"+JSON.stringify(criticals));
|
texts.push("\r[#FF6A6A]\\d临界表:\\d\r[]"+JSON.stringify(criticals));
|
||||||
var prevInfo = core.getDamageInfo(enemy, {atk: core.status.hero.atk-1}, null, null, floorId);
|
var prevInfo = core.getDamageInfo(enemy.id, {atk: core.status.hero.atk-1}, null, null, floorId);
|
||||||
if (prevInfo != null && damageInfo != null) {
|
if (prevInfo != null && damageInfo != null) {
|
||||||
if (damageInfo.damage != null) damageInfo = damageInfo.damage;
|
if (damageInfo.damage != null) damageInfo = damageInfo.damage;
|
||||||
if (prevInfo.damage != null) prevInfo = prevInfo.damage;
|
if (prevInfo.damage != null) prevInfo = prevInfo.damage;
|
||||||
@ -2548,8 +2548,8 @@ ui.prototype._drawEquipbox_drawStatusChanged = function (info, y, equip, equipTy
|
|||||||
if (typeof core.status.hero[name] != 'number') continue;
|
if (typeof core.status.hero[name] != 'number') continue;
|
||||||
var nowValue = core.getRealStatus(name);
|
var nowValue = core.getRealStatus(name);
|
||||||
// 查询新值
|
// 查询新值
|
||||||
var newValue = (core.getStatus(name) + (compare.value[name] || 0))
|
var newValue = Math.floor((core.getStatus(name) + (compare.value[name] || 0))
|
||||||
* ((core.getBuff(name) * 100 + (compare.percentage[name] || 0)) / 100);
|
* (core.getBuff(name) * 100 + (compare.percentage[name] || 0)) / 100);
|
||||||
if (nowValue == newValue) continue;
|
if (nowValue == newValue) continue;
|
||||||
var text = this._drawEquipbox_getStatusName(name);
|
var text = this._drawEquipbox_getStatusName(name);
|
||||||
this._drawEquipbox_drawStatusChanged_draw(text + " ", '#CCCCCC', obj);
|
this._drawEquipbox_drawStatusChanged_draw(text + " ", '#CCCCCC', obj);
|
||||||
|
|||||||
@ -70,9 +70,9 @@
|
|||||||
(已完成!) \t[this], 勇士朝下,flag:arg清理,瞬移扣血
|
(已完成!) \t[this], 勇士朝下,flag:arg清理,瞬移扣血
|
||||||
(OK) 同步存档合并;(OK) 失去焦点右键;(OK) 竖屏标题界面背景;(OK)商店录像bug
|
(OK) 同步存档合并;(OK) 失去焦点右键;(OK) 竖屏标题界面背景;(OK)商店录像bug
|
||||||
(OK) 右键反复弹出;(OK) 上下楼梯绑定楼传;(OK) 属性框出现0问题;(OK) 上下楼点选点
|
(OK) 右键反复弹出;(OK) 上下楼梯绑定楼传;(OK) 属性框出现0问题;(OK) 上下楼点选点
|
||||||
(OK) 地图编辑框无效;(OK) jumpHero和帧动画冲突;bookDetails重复计算buff;(OK) 怪物属性多选
|
(OK) 地图编辑框无效;(OK) jumpHero和帧动画冲突;(OK) bookDetails重复计算buff;(OK) 怪物属性多选
|
||||||
(OK) 图片化文本翻转;(OK) 绘制矩形(边框)旋转;
|
(OK) 图片化文本翻转;(OK) 绘制矩形(边框)旋转;
|
||||||
特殊属性&光环检查;钥匙不消耗;录像接档问题
|
特殊属性&光环检查;(OK) 钥匙不消耗;录像接档问题
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user