RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Reverse Damage Effect

0 Members and 1 Guest are viewing this topic.

*
Scripter
Rep:
Level 40
Crownless King
Reverse Damage Effect
Version: 1
Author: Soulpour777
Date: March 2, 2015

Description


A script that reverses the attack into recovery instead. When you are being attacked by the enemy, you will be able to nullify the damage and reverse it through the effort of a state.

Features

  • Reverses damage as healing.

Instructions

Note Tags:
 
<reverse_effect>
put this on your State Note box to have the reverse effect. The state that has this note tag allows you to reverse the damage.

Script


Code: [Select]
# ============================================================================ #
#                         ◆ Reverse Damage Effect ◆
#                             Author: Soulpour777
# ---------------------------------------------------------------------------- #
# Description: A script that reverses the attack into recovery instead. When
# you are being attacked by the enemy, you will be able to nullify the damage
# and reverse it through the effort of a state.
# ---------------------------------------------------------------------------- #
# Note Tags:
# <reverse_effect>
# ^ put this on your State Note box to have the reverse effect. The state that
# has this note tag allows you to reverse the damage.
# ---------------------------------------------------------------------------- #
# Terms of Use:
# You are free to SHARE and REMIX the script as long as its for a
# Non-Commercial script. If you are going / planning to use it for a commercial
# use, please contact me for more information.
# ============================================================================ #

($imported ||= {})[:soulpour_reverse_damage] = {
  :name => 'Reverse Damage Effect',
  :version => '1.0.0',
  :author => ['Soulpour777'],
  :date => '2015-02-27',
  :id => :soulpour_reverse_damage,
  :enabled => true
}

($imported[:SCRIPT_LIST] ||= []) << $imported[:soulpour_reverse_damage]

module Soul
  module ReverseDamageEffect
    State_RegEx = /<(?:REVERSE_EFFECT|reverse_effect)>/i
    Nullify_HP = 1000
    Nullify_MP = 1000
    Nullify_TP = 100
  end
end

class RPG::State
  #--------------------------------------------------------------------------
  # * Reverse Damage Effect
  #--------------------------------------------------------------------------
  def create_reverse_effect
    @damage_effect = false

    self.note.each_line { |line|
      case line
      when Soul::ReverseDamageEffect::State_RegEx
        @damage_effect = true
        puts @damage_effect
      end
    }
  end
  #--------------------------------------------------------------------------
  # * Reverse Damage?
  #--------------------------------------------------------------------------
  def reverse_dmg?
    create_reverse_effect if @damage_effect == nil
    return @damage_effect
  end
 
end

class Game_ActionResult
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias soul_reverse_dmg_action_result make_damage
  #--------------------------------------------------------------------------
  # * Reversed?
  #--------------------------------------------------------------------------
  def reversed?
    $game_party.members.each do |member|
      member.states.each{ |state| return true if state.reverse_dmg?}
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Create Damage
  #--------------------------------------------------------------------------
  def make_damage(value, item)
    soul_reverse_dmg_action_result(value, item)
    if reversed?
      $game_party.members.each do |member|
        @mp_damage += -Soul::ReverseDamageEffect::Nullify_MP
        @hp_damage += -Soul::ReverseDamageEffect::Nullify_HP
        @tp_damage += -Soul::ReverseDamageEffect::Nullify_TP
      end
    end
  end
end

Credit


  • Soulpour777

Support


Please PM or comment for any questions.

Known Compatibility Issues

N / A

Terms of Use




If you like my work, please do support me on Patreon.
https://www.patreon.com/Soulpour777?ty=h

***
Rep:
Level 34
RMRK Junior
This is awesome! Reminds me of that one tower in FFVI with the healing jars or w/e they're called. It has been ages since I played that game.

*
The Hero of Rhyme
Rep:
Level 83
( ͡° ͜ʖ ͡°)
2014 Queen of RMRKProject of the Year 20142014 Best RPG Maker User - Story2011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
Another great script. Thanks, soulpourr! :D
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]