Hello,
I need help finalizing a status effect I'm trying to create. It's a paranoia effect (much like in the darkest dungeon).
A character affected by this effect will systematically dodge all beneficial effects inflicted on him by his allies.
At the moment my code looks like this:
There are still a few changes to be made. I see 3, but don't hesitate to tell me if I forget any.
1 - The character assigned to the status must not dodge their own abilities. Currently, if he tries to heal himself, the action will be dodged.
2 - Objects must also be dodged.
3 - I don't know if it's possible. Otherwise it does not matter. But is it possible to force the character to animate in the same way as during a real dodge? Currently I'm just using an animation which has no visual effects but uses the "miss" SE. I'll settle for it if I can't do better.
I need help finalizing a status effect I'm trying to create. It's a paranoia effect (much like in the darkest dungeon).
A character affected by this effect will systematically dodge all beneficial effects inflicted on him by his allies.
At the moment my code looks like this:
Code:
<Custom Selection Effect>
// Check if this action is a skill and targets an opponent.
if (this.item() && DataManager.isSkill(this.item()) && this.isForFriend()) {
// Create a pool of blocked skill TYPES.
var blockedtypes = [];
// Add skill type IDs to this pool.
blocked types.push(1, 2, 4, 17, 18);
// Check if skill type or skill ID matches.
if (blockedtypes.contains(this.item().stypeId) ||blockedskills.contains(this.item().id)) {
// If so, store the skill's original success rate.
this._formerItemSuccessRate = this.item().successRate;
// Now reduce the skill's hit rate to 0.
this.item().successRate = 0;
}
}
</Custom Selection Effect>
<Custom deselection effect>
// Check if a success rate is stored.
if (this._formerItemSuccessRate !== undefined) {
// Restore the skill's success rate.
this.item().successRate = this._formerItemSuccessRate;
// Start an animation to show that the spell shield has occurred.
target.startAnimation(233);
}
</Custom deselection effect>
There are still a few changes to be made. I see 3, but don't hesitate to tell me if I forget any.
1 - The character assigned to the status must not dodge their own abilities. Currently, if he tries to heal himself, the action will be dodged.
2 - Objects must also be dodged.
3 - I don't know if it's possible. Otherwise it does not matter. But is it possible to force the character to animate in the same way as during a real dodge? Currently I'm just using an animation which has no visual effects but uses the "miss" SE. I'll settle for it if I can't do better.