norefresh

This commit is contained in:
ckcz123 2019-12-04 23:17:17 +08:00
parent 2ce16668f2
commit 52b0617944
2 changed files with 8 additions and 8 deletions

View File

@ -589,27 +589,27 @@ return code;
*/;
setValue_s
: '数值操作' ':' '名称' idString_e '值' expression '刷新状态栏和显伤' Bool Newline
: '数值操作' ':' '名称' idString_e '值' expression '刷新状态栏' Bool Newline
/* setValue_s
tooltip : setValue设置勇士的某个属性、道具个数, 或某个变量/Flag的值
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=setvalue%EF%BC%9A%E8%AE%BE%E7%BD%AE%E5%8B%87%E5%A3%AB%E7%9A%84%E6%9F%90%E4%B8%AA%E5%B1%9E%E6%80%A7%E3%80%81%E9%81%93%E5%85%B7%E4%B8%AA%E6%95%B0%EF%BC%8C%E6%88%96%E6%9F%90%E4%B8%AA%E5%8F%98%E9%87%8Fflag%E7%9A%84%E5%80%BC
colour : this.dataColor
Bool_0 = Bool_0 ? ', "refresh": true' : '';
Bool_0 = Bool_0 ? ', "norefresh": true' : '';
var code = '{"type": "setValue", "name": "'+idString_e_0+'", "value": "'+expression_0+'"' + Bool_0 + '},\n';
return code;
*/;
addValue_s
: '数值增减' ':' '名称' idString_e '+=' expression '刷新状态栏和显伤' Bool Newline
: '数值增减' ':' '名称' idString_e '+=' expression '刷新状态栏' Bool Newline
/* addValue_s
tooltip : addValue增减勇士的某个属性、道具个数, 或某个变量/Flag的值
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=addValue%ef%bc%9a%e5%a2%9e%e5%87%8f%e5%8b%87%e5%a3%ab%e7%9a%84%e6%9f%90%e4%b8%aa%e5%b1%9e%e6%80%a7%e3%80%81%e9%81%93%e5%85%b7%e4%b8%aa%e6%95%b0%ef%bc%8c%e6%88%96%e6%9f%90%e4%b8%aa%e5%8f%98%e9%87%8f%2fFlag%e7%9a%84%e5%80%bc
colour : this.dataColor
Bool_0 = Bool_0 ? ', "refresh": true' : '';
Bool_0 = Bool_0 ? ', "norefresh": true' : '';
var code = '{"type": "addValue", "name": "'+idString_e_0+'", "value": "'+expression_0+'"' + Bool_0 + '},\n';
return code;
*/;
@ -3398,7 +3398,7 @@ ActionParser.prototype.parseAction = function() {
this.next = MotaActionBlocks['setValue_s'].xmlText([
this.tryToUseEvFlag_e('idString_e', [data.name]),
MotaActionBlocks['evalString_e'].xmlText([data.value]),
data.refresh || false,
data.norefresh || false,
this.next]);
break;
case "setValue2":
@ -3406,7 +3406,7 @@ ActionParser.prototype.parseAction = function() {
this.next = MotaActionBlocks['addValue_s'].xmlText([
this.tryToUseEvFlag_e('idString_e', [data.name]),
MotaActionBlocks['evalString_e'].xmlText([data.value]),
data.refresh || false,
data.norefresh || false,
this.next]);
break;
case "setEnemy":

View File

@ -1582,7 +1582,7 @@ events.prototype._action_setVolume = function (data, x, y, prefix) {
events.prototype._action_setValue = function (data, x, y, prefix) {
this.setValue(data.name, data.value, prefix);
if (data.refresh) {
if (!data.norefresh) {
if (core.status.hero.hp <= 0) {
core.status.hero.hp = 0;
core.updateStatusBar();
@ -1600,7 +1600,7 @@ events.prototype._action_setValue2 = function (data, x, y, prefix) {
events.prototype._action_addValue = function (data, x, y, prefix) {
this.addValue(data.name, data.value, prefix);
if (data.refresh) {
if (!data.norefresh) {
if (core.status.hero.hp <= 0) {
core.status.hero.hp = 0;
core.updateStatusBar();