kyonides

Reforged is laughable
Regular
Joined
Nov 17, 2019
Messages
1,740
Reaction score
888
First Language
English
Primarily Uses
RMXP
CriticalAlert XP

by Kyonides

Introduction

This scriptlet allows you to let the game call a preset common event whenever an actor or an enemy strikes the foe with a critical hit. The only thing you have to do is setting the appropriate common event ID's and that's it, guys! :D

The Script

Ruby:
# * CriticalAlert XP * #
#   Scripter : Kyonides Arkanthes
#   2023-06-06

# This scriptlet focuses on the attacker aka spellcaster.

module CriticalAlert
  ACTOR_COMMON_EVENT_ID = 1
  ENEMY_COMMON_EVENT_ID = 2
end

class Game_Battler
  alias :kyon_critical_alert_gm_bltr_atk_fx :attack_effect
  alias :kyon_critical_alert_gm_bltr_skill_fx :skill_effect
  def attack_effect(attacker)
    result = kyon_critical_alert_gm_bltr_atk_fx(attacker)
    critical_hit_reserve_common_event(attacker)
    result
  end

  def skill_effect(user)
    result = kyon_critical_alert_gm_bltr_skill_fx(user)
    critical_hit_reserve_common_event(user)
    result
  end

  def critical_hit_reserve_common_event(user)
    return unless @critical
    if user.is_a?(Game_Actor)
      event_id = CriticalAlert::ACTOR_COMMON_EVENT_ID
    else
      event_id = CriticalAlert::ENEMY_COMMON_EVENT_ID
    end
    $game_temp.common_event_id = event_id
  end
end

Terms & Conditions

Free for use in any game.
Don't buy cat treats for a week! :p
That's it!
 

Latest Threads

Latest Profile Posts

An optimal price for an indie game on Steam also needs to be accompanied by an optimal sales discount %. For a solo indie game, I think the optimal price is where it should be low enough that a single Steam card can be used to buy it, after tax. A few cents the wrong direction can potentially mean someone who was gifted a Steam card can't buy the game, then picks something else to buy.
I've been so lazy about doing art but I finally decided to buckle down and get some work done on the party!

aa312ffbcd667933.png

3d554012e96e4526.png
SallyFaceTest.png
Testing the first face in battle!

Forum statistics

Threads
134,684
Messages
1,249,703
Members
177,422
Latest member
Moodesburn1977
Top