State that attracts elemental attacks

● ARCHIVED · READ-ONLY
Started by kj3400 3 posts View original ↗
  1. Is there a way to have a state to allow the target to draw in all attacks of one or more elements, including ones where it wasn't the target of the attack and AOE attacks?
  2. Yes there is. You'll need to script an alias or overwrite of the check_substitute (and possibly apply_substitute) methods in Scene_Battle. First, make sure to give the 'Substitute' property to the state in the regular database. Then comes the hard part - the scripting will set a temporary variable to 'false', and then it needs to check whether the character attempting to take the hit has the "elemental guardian" state or a normal substitute state.
    • If they have the elemental guardian state (or both), it will check the element of the hostile skill being used.
      • If it's the correct element, set the flag to true. Otherwise, do nothing.
    • Repeat this for any additional elemental guardian states that use a different element.
    • If they have a regular substitute state, it will check the "normal" substitute condition (by default, this is whether the intended target is below 25% HP).
      • If the normal substitute condition is met, set the flag to true. Otherwise, do nothing.
    Finally, the scripting will check the value of the flag, and if it's true, a substitution will occur. If it remains false, no sub will occur.

    I believe that these methods, by default, do have access to the skill being used, but I'm not sure the extent to which it has access to the properties of the would-be substituter. It's kind of tangley code and I don't have hours to play around with it right now. :( To be clear this is definitely doable, but it may take some work.
  3. I took a couple of days to think about it. I'm not really proficient in scripting, nor do I have the time at the moment to learn unfortunately. I suppose I could find someone who would be willing to do that for me, though.