Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Source State Notetags
- <Help Description>
- Unit's enemies' magic is nullified
- Enemies' MP costs are still paid
- </Help Description>
- <Hide Turns>
- <State Motion: Guard>
- <Foe Aura: effect_state_id> //the state id of your effect state
- =======================================================
- #Effect State Notetags
- <Custom Action Start Effect>
- //check if the user's current action belongs to one of your 'magic' skill types
- if (user.currentAction() && user.currentAction().isSkill() && [state1, state2, state3...].contains(user.currentAction().item().stypeId)) {
- //play a fitting animation
- user.startAnimation(anim_id);
- //if it's not an item, consume resources for the spell
- if (user.currentAction()) {
- user.useItem(user.currentAction().item());
- }
- //clear the action from the queue
- user.clearActions();
- //show user that something is preventing their spell from casting
- var logWindow = SceneManager._scene._logWindow;
- var msg = '<CENTER>Blocked by Anti-Magic';
- logWindow.addText(msg);
- //wait for animation to resolve
- BattleManager.actionWaitForAnimation();
- //clear the log window
- logWindow.push('clear');
- }
- </Custom Action Start Effect>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement