Does anyone know how to keep an enemy attack valid if it attacks an actor with counterattack?
I looked here:
BattleManager.invokeAction = function(subject, target) { this._logWindow.push('pushBaseLine'); if (Math.random() < this._action.itemCnt(target)) { this.invokeCounterAttack(subject, target); } else if (Math.random() < this._action.itemMrf(target)) { this.invokeMagicReflection(subject, target); } else { this.invokeNormalAction(subject, target); } subject.setLastTarget(target); this._logWindow.push('popBaseLine'); this.refreshStatus();};But if I change it to this:
if (Math.random() < this._action.itemCnt(target)) { this.invokeNormalAction(subject, target); // add first attack instead of reflect this.invokeCounterAttack(subject, target);Then the damage popup won't play for the enemy's attack on the actor. Just the counterattack damage will play.
You can turn both lines around, and then only the damage popup for the counter attack will play.
I looked here:
BattleManager.invokeAction = function(subject, target) { this._logWindow.push('pushBaseLine'); if (Math.random() < this._action.itemCnt(target)) { this.invokeCounterAttack(subject, target); } else if (Math.random() < this._action.itemMrf(target)) { this.invokeMagicReflection(subject, target); } else { this.invokeNormalAction(subject, target); } subject.setLastTarget(target); this._logWindow.push('popBaseLine'); this.refreshStatus();};But if I change it to this:
if (Math.random() < this._action.itemCnt(target)) { this.invokeNormalAction(subject, target); // add first attack instead of reflect this.invokeCounterAttack(subject, target);Then the damage popup won't play for the enemy's attack on the actor. Just the counterattack damage will play.
You can turn both lines around, and then only the damage popup for the counter attack will play.