#==============================================================================
#
# ▼ Yanfly Engine Ace - Lunatic States Package - Reverence Effect
#
# -- Requires: YEA - Lunatic States v1.00+
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-LSP-Reverence"] = true
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# Install this script under YEA - Lunatic States. Then, proceed to use the
# proper effects notetags to apply the proper LSP Reverence item desired.
# Look within the script for more instructions on how to use each effect.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
# This script requires YEA - Lunatic States v1.00+ to work. It must be placed
# under YEA - Lunatic States v1.00+ in the script listing.
#
#==============================================================================
if $imported["YEA-LunaticStates"]
class Game_BattlerBase
#--------------------------------------------------------------------------
# ● Lunatic States Package Effects - Reverence
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#--------------------------------------------------------------------------
alias :lunatic_state_extension_reverence :lunatic_state_extension
def lunatic_state_extension(effect, state, user, state_origin, log_window)
case effect.upcase
#----------------------------------------------------------------------
# Reverence
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Affected is healed by the current skill's MP cost.
#
# Recommended notetag:
# <while effect: reverence x%>
#
#----------------------------------------------------------------------
when /REVERENCE[ ](\d+)([%%])/i
action = user.current_action.item
return unless action.is_a?(RPG::Skill)
value = (action.mp_cost * ($1.to_i / 100.0)).round.to_i
if $imported["YEA-BattleEngine"] && value > 0
Sound.play_recovery
text = sprintf(YEA::BATTLE:

OPUP_SETTINGS[:hp_heal], value.group)
user.create_popup(text, "HP_HEAL")
end
user.hp = [user.hp + value, 0].max
#----------------------------------------------------------------------
# Stop editting past this point.
#----------------------------------------------------------------------
else
so = state_origin
lw = log_window
lunatic_state_extension_reverence(effect, state, user, so, lw)
end
end
end # Game_BattlerBase
end # $imported["YEA-LunaticStates"]
#==============================================================================
#
# ▼ End of File
#
#==============================================================================