じ☆ve冰风 发表于 2026-7-27 16:41:26

kotonoha* - Counter Animation (Battle)

CounterAnimation - 2016/05/18 ver1.1

Creator name: kotonoha*

Overview
Plays an animation when a counterattack was about to happen.
If you have an animation of reflect barrier for physical attack would fit.

Feature
- You can set Animation ID through parameter
- AnimationWait param for animation delay

Note: Animation ID is 0 by default, be sure to change it

Preview

https://i.imgur.com/FgwvvAL.jpg


Credit and Thanks: kotonoha*

Terms of Use- Free for commercial and non-commercial use.

License - MIT License: http://opensource.org/licenses/mit-license.php

                JavaScript:       
// --------------------------------------------------------------------------
//
// CounterAnimation
//
// Copyright (c) kotonoha*
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
//
// 2016/05/18 ver1.1 Implemented AnimationWait param
// 2016/04/06 ver1.0 First release
//
// --------------------------------------------------------------------------
/*:
* @plugindesc Plays an animation for counterattack in battle
* @author kotonoha (http://ktnh5108.pw/)
*
* @help
* Animation for battle when counterattacking.
*
* @param AnimationID
* @desc Animation ID set for counterattack.
* @default 0
*
* @param AnimationWait
* @desc Delay time after animation was used.
* @default 60
*
*/

(function() {

    var parameters = PluginManager.parameters('CounterAnimation');
    var AnimationID = Number(parameters['AnimationID']);
    var AnimationWait = Number(parameters['AnimationWait']);

    BattleManager.invokeCounterAttack = function(subject, target) {
      var action = new Game_Action(target);
      if (AnimationID !== 0) {
            target.startAnimation(AnimationID, false, 0);
            this._logWindow.push('wait');
            if (AnimationWait !== 0) {
                this._logWindow._waitCount = AnimationWait;
            }
            action.setAttack();
            action.apply(subject);
            this._logWindow.displayCounter(target);
            this._logWindow.displayActionResults(subject, subject);
      }
    };
   
})();


You can download js file from the thread attachment or Dropbox link: https://www.dropbox.com/s/lhgq4xjdhym93is/CounterAnimation.js?dl=1


本贴来自国际rpgmaker官方论坛作者:ovate处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/kotonoha-counter-animation-battle.121632/
页: [1]
查看完整版本: kotonoha* - Counter Animation (Battle)