Do Effect

This commit is contained in:
oc 2018-07-02 00:17:24 +08:00
parent 63e06c5af3
commit 54c6e7162a

View File

@ -1509,8 +1509,8 @@ control.prototype.updateFg = function () {
}
////// 执行一个表达式的effect操作 //////
control.prototype.doEffect = function (expression) {
// 必须使用"+="
control.prototype.doEffect = function (effect) {
effect.split(";").forEach(function (expression) {
var arr = expression.split("+=");
if (arr.length!=2) return;
var name=arr[0], value=core.calValue(arr[1]);
@ -1522,12 +1522,13 @@ control.prototype.doEffect = function (expression) {
var itemId=name.substring(5);
core.setItem(itemId, core.itemCount(itemId)+value);
}
});
}
////// 开启debug模式 //////
control.prototype.debug = function() {
core.setFlag('debug', true);
core.insertAction(["\t[调试模式开启]此模式下按住Ctrl键可以穿墙并忽略一切事件。\n同时录像将失效也无法上传成绩。"]);
core.insertAction(["\t[调试模式开启]此模式下按住Ctrl键或Ctrl+Shift键可以穿墙并忽略一切事件。\n同时录像将失效也无法上传成绩。"]);
/*
core.setStatus('hp', 999999);
core.setStatus('atk', 10000);