Posted September 30, 2019 by Archeia
Hello friends~
Luna Engine is updated to Version 1.1.3!
//======================================== // State Counter //======================================== Game_Actor.prototype.stateTurns = function() { var values = [] for (var stateId in this._stateTurns) { values.push(this._stateTurns[stateId]) } return values } Game_Actor.prototype.buffTurns = function() { var values = [] for (var i = 0; i < this._buffTurns.length; i++) { if (this._buffTurns[i] !== 0) { values.push(this._buffTurns[i]) } } return values } Game_Actor.prototype.allTurns = function() { var stateTurns = this.stateTurns() var buffTurns = this.buffTurns() return stateTurns.concat(buffTurns) }
BattlerStates: type: grid x: type: fixed value: -30 y: type: fixed value: 0 width: type: fixed value: 96 height: type: fixed value: 32 anchor: x: 0 y: 1 horizontal: true limit: 3 bind: true itemList: ${data.allStatesBuffs} components: StateIcon: type: icon x: type: fixed value: 0 y: type: fixed value: 0 anchor: x: 0 y: 0 iconSet: "IconSet" iconIndex: "${data.iconIndex}" TurnCounter: type: Text x: type: fixed value: -3 y: type: fixed value: -3 anchor: x: 0 y: 0 bind: true textColor: rgba(255, 197, 95, 255) fontOutline: enable: true lineWidth: 5 lineColor: rgba(16, 16, 16, 1) text: "${data.turnCount}" StateCounter: type: Text x: type: fixed value: 35 y: type: fixed value: 10 anchor: x: 1 y: 0 bind: true textColor: rgba(210, 173, 213) fontOutline: enable: true lineWidth: 5 lineColor: rgba(16, 16, 16, 1) text: "${data.stateCount}" template: type: FreeLayout components: - StateIcon - TurnCounter - StateCounter