- Joined
- Feb 22, 2016
- Messages
- 1,626
- Reaction score
- 1,196
- First Language
- English
- Primarily Uses
- RMMV
So I'm using LecodeTBS v0.77.2b and noticed that AttackTimes+ is not utilized at all. This is a critical feature in my game, so I really must resolve this. Is there a way for me to get LTBS to handle AttackTimes+?
This is what I found in rpg_objects.js:
(I added "|| this.isPhysical()" so that it also affects physical skills)
Also, I think these parts are relevant as well:
And this:
Anyways, there's no reference to AttackTimes anywhere in the LTBS plugin. I'm hoping this addition won't be too difficult. Thx in advance!
This is what I found in rpg_objects.js:
JavaScript:
Game_Action.prototype.numRepeats = function() {
var repeats = this.item().repeats;
if (this.isAttack() || this.isPhysical()) {
repeats += this.subject().attackTimesAdd();
}
return Math.floor(repeats);
};
Also, I think these parts are relevant as well:
JavaScript:
Game_Action.prototype.repeatTargets = function(targets) {
var repeatedTargets = [];
var repeats = this.numRepeats();
for (var i = 0; i < targets.length; i++) {
var target = targets[i];
if (target) {
for (var j = 0; j < repeats; j++) {
repeatedTargets.push(target);
}
}
}
return repeatedTargets;
};
JavaScript:
Game_Action.prototype.evaluate = function() {
var value = 0;
this.itemTargetCandidates().forEach(function(target) {
var targetValue = this.evaluateWithTarget(target);
if (this.isForAll()) {
value += targetValue;
} else if (targetValue > value) {
value = targetValue;
this._targetIndex = target.index();
}
}, this);
value *= this.numRepeats();
if (value > 0) {
value += Math.random();
}
return value;
};
Last edited:
