+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: That nasty SP bar (/thread-5785.html)
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# DerVV's Enemy/Actor HP / SP Bars Fix v 1.4
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# By: DerVVulfman (a fix for El Conducter's script v 4.0)
# Written May 12, 2016
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Put below his script and it should allow SP healing and damage now!!!
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Frame Update (main phase step 2 : start action)
#--------------------------------------------------------------------------
alias elconducter_set_sp_fix1 set_target_battlers
alias elconducter_set_sp_fix2 make_basic_action_result
#--------------------------------------------------------------------------
# * Set Targeted Battler for Skill or Item
# scope : effect scope for skill or item
#--------------------------------------------------------------------------
def set_target_battlers(scope)
# The original call to get the scopes
scopers = elconducter_set_sp_fix1(scope)
# Now create an empty area to store SP values
@battler_sp_dmg = []
# And cycle through all the determined battlers to get 'em
for target in @target_battlers
@battler_sp_dmg.push(target.sp)
end
return scopers
end
#--------------------------------------------------------------------------
# * Make Basic Action Results
#--------------------------------------------------------------------------
def make_basic_action_result
# Set the array to nil (to skip any SP healing)
@battler_sp_dmg = nil
# And return with the called action
return elconducter_set_sp_fix2
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 5 : damage display)
#--------------------------------------------------------------------------
def update_phase4_step5
# Hide help window
@help_window.visible = false
# Refresh status window
@status_window.refresh
# Display damage
for target in @target_battlers
if target.damage != nil
target.damage_pop = true
end
end
counter = 0
# Display damage
for target in @target_battlers
# Default each target to no magic
target.magic_casting = false
# Skip if the battler array is nil
next if @battler_sp_dmg.nil?
# Get the old SP value
old_sp = @battler_sp_dmg[counter]
# Compare if the old SP to the new SP
if old_sp != target.sp
# Set the passed sp_used to the difference
target.sp_used = old_sp - target.sp
# And set magic casting flag to true
target.magic_casting = true
end
# Ad to the count
counter += 1
end
# Shift to step 6
@phase4_step = 6
end
end
The only thing which doesn't work now are SP altering effects from other custom scripts such as SP shields, or SP DoTs/HoTs.
But I think that would require a fix for each custom script unless there is a way to make general fix which works for everything.
I already tried that, but it has no effect.
I have to use a skill to update the bar.
These are the two scripts, if you are interested:
Content Hidden
Code:
#==============================================================================
# HoT DoT
# Author: Shdwlink1993
# Version: 1.04
# Type: Poison Control
#
# Editted by KK20
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# HT Date 1.0b: 1/11/2009
# HT Date 1.01b: 1/12/2009
# HT Date 1.02: 2/19/2012
# HT Date 1.03: 3/20/2012
# HT Date 1.04: 4/08/2012
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# # This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
# #
# # Note that if you share this file, even after editing it, you must still
# # give proper credit to shdwlink1993.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# ~= Function =~
#
# This script is designed to allow you to expand what poison does to your
# character. Poison now is able to affect HP or SP, and take off a fraction or
# a set amount of HP/SP.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# ~= Version History =~
#
# Version 1.0b ---------------------------------------------------- [1/11/2009]
# Version 1.01b --------------------------------------------------- [1/12/2009]
# Version 1.02 ---------------------------------------------------- [2/19/2012]
# Version 1.03 ---------------------------------------------------- [3/20/2012]
# Version 1.04 ---------------------------------------------------- [4/08/2012]
#
# V 1.04 Changes:
# - DoT that heals will make the screen flash green instead of red
# - Damage values that were displayed in battle were inaccurate
# - Percentage based damage was written incorrectly
#
# V 1.03 Changes:
# - Percentage-based DoT healed when damage values were positive and visa-versa
# - Modified how variance was calculated (added explanation in config)
# - Organized script to be easier on the eyes and added comment lines
#
# V 1.02 Changes:
# - Negative damage values damaged instead of healed and visa-versa
# - Limit_Drain was bugged and has now been fixed
# - HP and SP damage was being calculated twice (thus actual damage/healing
# was twice the value the user configured)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# ~= Customization =~
#
# Customization can be found right under where the Poison Database begins.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# ~= Compatability =~
#
# - Low probability of working with the SDK.
# - Will not work with other Poison-editing scripts.
# - Must be placed above Tons of Addons.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module SL93
def self.hotdot(id)
case id
#------------------------------------------------------------------------
# Poison Database Begins
#------------------------------------------------------------------------
# when STATE_NUMBER then return [TYPE, DAMAGE, VARIANCE, LIMIT_DRAIN]
# * STATE_NUMBER is the state you want to be affected by this.
# * TYPE refers to the thing sustaining damage.
# 1 = HP, 2 = SP. If the type is positive, the amount is a literal
# number (eg. You lose about 50 HP). If the type is negative, then
# the amount is a fraction of the maximum (eg. You lose about 50% of
# your HP).
# * DAMAGE refers to how much damage is healed/taken.
# A Positive amount hurts you and a negative amount heals you.
# * VARIANCE refers to how much the damage varies. Positive only.
# This depends in part on if TYPE was positive or negative.
#
# Example A: TYPE is positive. VARIANCE is 15.
# Damage/Heal amount can do up to 15 more or 15 less.
#
# Example B: TYPE is negative. VARIANCE is 15.
# Damage/Heal amount can do up to 15% more or 15% less.
#
# * LIMIT_DRAIN refers to if the poison can leave you with 0 HP/SP.
# If true, then it is limited, and stops at 1. If false, then it
# isn't.
#------------------------------------------------------------------------
when 15 then return [-1, 2, 15, true] # Gift
when 16 then return [-1, 5, 15, false] # Blutung
when 17 then return [-1, 10, 15, false] # Brand
when 33 then return [-1, -5, 15, false]# Regeneration
when 34 then return [-2, -5, 0, false] # Magiekanalisierung
#------------------------------------------------------------------------
# Poison Database Ends
#------------------------------------------------------------------------
end
return false
end
end
class Game_Battler
def slip_damage?
return @states.any? {|i| SL93.hotdot(i) != false }
end
def slip_damage_effect
ids = []
sp_damage = 0
self.damage = 0
# Get the HoT/DoT states applied to the character
for i in @states
ids.push(i) if SL93.hotdot(i) != false
end
for i in ids
# If the state damages/heals by a literal number
if SL93.hotdot(i)[0] > 0
damage = SL93.hotdot(i)[1]
# If the state damages/heals HP by a percent
elsif SL93.hotdot(i)[0] == -1
damage = self.maxhp * SL93.hotdot(i)[1] / 100
# If the state damages/heals SP by a percent
elsif SL93.hotdot(i)[0] == -2
damage = self.maxsp * SL93.hotdot(i)[1] / 100
end
# If damage/heal amount is not zero and variance exists
if damage != 0 && SL93.hotdot(i)[2] > 0
# Variance based on literal numbers
amp = (damage.abs < SL93.hotdot(i)[2] ? damage.abs - 1 : SL93.hotdot(i)[2]) if SL93.hotdot(i)[0] > 0
# Variance based on percentages
amp = [damage.abs * SL93.hotdot(i)[2] / 100, 1].max if SL93.hotdot(i)[0] < 0
# Apply variance amounts to damage/heal amount
damage += rand(amp+1) + rand(amp+1) - amp
end
# If HP damage/heal
if SL93.hotdot(i)[0].abs == 1
hp = @hp
# If limit_drain and actual HP damage being done (not healing)
if SL93.hotdot(i)[3] and damage > 0
self.hp = [hp - damage,1].max # Leave 1 HP
else
self.hp -= damage
end
# Add total damage to variable
self.damage += damage
# If SP damage/heal
elsif SL93.hotdot(i)[0].abs == 2
sp = @sp
# If limit_drain and actual SP damage being done (not healing)
if SL93.hotdot(i)[3] and damage > 0
self.sp = [sp - damage,1].max # Leave 1 SP
else
self.sp -= damage
end
# Add total SP damage to variable
sp_damage += damage
end
end
# Modify @damage to be SP damage if no changes to HP were made
self.damage = sp_damage if self.damage == 0
end
end
class Game_Party
def check_map_slip_damage
@actors.each {|actor|
if actor.hp > 0 && actor.slip_damage?
actor.slip_damage_effect
if actor.damage <= 0
# Positive DoT makes green screen
$game_screen.start_flash(Color.new(0, 255, 0, 128), 4)
else
# Negative DoT makes red screen
$game_screen.start_flash(Color.new(255, 0, 0, 128), 4)
end
$game_temp.gameover = $game_party.all_dead?
end
}
end
end
Content Hidden
Code:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# MP Shield Status Effect by Xelias
# Version: 1.00
# Type: Game Experience Improvement
# Date: 26.9.2006
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# When under this status, you never lose HP. However, you lose SP instead. When
# your SP reach 0, this status becomes ineffective.
#
# Configuration:
#
# MP_SHIELD_IDS - the IDs of the MP Shield status effects
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Well, you have a problem with MP Shield Status Effect by Xelias... Line 66 reads:
Code:
if $game_system.MP_SHIELD_STATUS && MP_SHIELD_IDS.any? {|i| @states.include?(i)}
There is no $game_system.MP_SHIELD_STATUS method. And even if there was, no one capitalilzes a method. The script breaks when the effect is supposed to be placed on the combatants.
BUT......
Code:
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# DerVV's Enemy/Actor HP / SP Bars Fix for HoT/DoT v 1.0
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# By: DerVVulfman (a fix for Shdwlink1993's script v 1.04)
# Written May 15, 2016
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Put below his script and the Bar Stats script and slip damage should work.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
# This class deals with battlers. It's used as a superclass for the Game_Actor
# and Game_Enemy classes.
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias hotdot_hpsp_fix slip_damage_effect
#--------------------------------------------------------------------------
# * Application of Slip Damage Effects
#--------------------------------------------------------------------------
def slip_damage_effect
old_sp = self.sp
hotdot_hpsp_fix
new_sp = self.sp
return if old_sp == new_sp
return unless $game_temp.in_battle
@sp_used = old_sp - new_sp
# And set magic casting flag to true
@magic_casting = true
end
end
This plugin fixes sp slip damage for battle. Took all of 5 minutes.
I extraced the MP shield code out of a larger script. I think I messed it up. ^^"
This is the full script.
Content Hidden
Code:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Rain of Add-ons by Xelias
# Version: 1.00
# Type: Add-on Collection Control Script
# Date v1.00b: 26.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
class Game_System
alias init_rain_of_addons_later initialize
def initialize
init_rain_of_addons_later
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Oil Status Effect by Xelias
# Version: 1.0b
# Type: Enhanced Status
# Date: 24.9.2006
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Allows to create a status increasing damage taken by Fire Element.
#
#
# Configuration:
#
# OIL_IDS - the IDs of the Oil status effects
# FIRE_ELEMENT_ID - the ID of the fire element
# FIRE_MULTIPLIER : How much times Fire Attacks should be stronger
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias attack_effect_oil_later attack_effect
def attack_effect(attacker)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
result = attack_effect_oil_later(attacker)
oil_effect(last_hp, last_sr, attacker) if self.damage.is_a?(Numeric)
return result
end
alias skill_effect_oil_later skill_effect
def skill_effect(user, skill)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
result = skill_effect_oil_later(user, skill)
oil_effect(last_hp, last_sr, skill) if self.damage.is_a?(Numeric)
return result
end
alias item_effect_oil_later item_effect
def item_effect(item, battler = nil)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
if battler == nil
result = item_effect_oil_later(item)
else
result = item_effect_oil_later(item, battler)
end
oil_effect(last_hp, last_sr, item) if self.damage.is_a?(Numeric)
return result
end
def oil_effect(last_hp, last_sr, object)
if $game_system.OIL_STATUS && OIL_IDS.any? {|i| @states.include?(i)}
self.hp = last_hp
self.hp = self.hp
self.sr = last_sr if last_sr != nil
if object.element_set.include?(FIRE_ELEMENT_ID)
self.damage = (self.damage * FIRE_MULTIPLIER).to_i
end
self.hp -= self.damage
end
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Shell Status by Xelias
# Version: 1.00
# Type: Enhanced Status
# Date: 26.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#
# Compatibility:
#
# 99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause
# problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
# Thanks to this, you can create a "Shell Status" that halves all Magic Damage you take.
# You can put an animation on the character affected with Shell just before the magic hits
# - Configuration
#
# SHELL_IDS - include any IDs of Shell Statuses and separate them with
# commas (i.e. [52, 53, 54])
# SHELL_ANIMATION_ID - Put the animation id. If you don't want any, make it 0.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
alias skill_effect_shell_skill_later skill_effect
def skill_effect(user, skill)
last_hp = self.hp
last_sr = self.sr if $crls && self.is_a?(Game_Actor)
result = skill_effect_shell_skill_later(user, skill)
if $game_system.SHELL_STATUS
self.hp = last_hp
self.hp = self.hp
self.sr = last_sr if $crls && self.is_a?(Game_Actor)
if self.damage.is_a?(Numeric)
if skill.int_f > 0 && SHELL_IDS.any? {|i| @states.include?(i)}
self.damage = (self.damage/2).to_i
self.animation_id = SHELL_ANIMATION_ID
end
self.hp -= self.damage
end
end
return result
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Protect Status by Xelias
# Version: 1.00
# Type: Enhanced Status
# Date: 26.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#
# Compatibility:
#
# 99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause
# problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
# Thanks to this, you can create a "Protect Status" that halves all Physical Damage you take.
# This includes both physical attacks and skills with an intelligence influence of 0.
# You can put an animation on the character affected with Protect just before the magic hits
# - Configuration
#
# PROTECT_IDS - include any IDs of Protect Statuses and separate them with
# commas (i.e. [29])
# PROTECT_ANIMATION_ID - Put the animation id. If you don't want any, make it 0.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
alias skill_effect_protect_skill_later skill_effect
def skill_effect(user, skill)
last_hp = self.hp
last_sr = self.sr if $crls && self.is_a?(Game_Actor)
result = skill_effect_protect_skill_later(user, skill)
if $game_system.PROTECT_STATUS
self.hp = last_hp
self.hp = self.hp
self.sr = last_sr if $crls && self.is_a?(Game_Actor)
if self.damage.is_a?(Numeric)
if skill.int_f == 0 && PROTECT_IDS.any? {|i| @states.include?(i)}
self.damage = (self.damage/2).to_i
self.animation_id = PROTECT_ANIMATION_ID
end
self.hp -= self.damage
end
end
return result
end
alias attack_effect_protect_later attack_effect
def attack_effect(attacker)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
result = attack_effect_protect_later(attacker)
protect_effect(last_hp, last_sr, attacker) if self.damage.is_a?(Numeric)
return result
end
def protect_effect(last_hp, last_sr, object)
if $game_system.PROTECT_STATUS && PROTECT_IDS.any? {|i| @states.include?(i)}
self.hp = last_hp
self.hp = self.hp
self.sr = last_sr if last_sr != nil
self.damage = (self.damage/2)
self.animation_id = PROTECT_ANIMATION_ID
self.hp -= self.damage
end
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Virus Status Effect by Xelias
# Version: 1.00
# Type: Game Experience Improvement
# Date: 26.9.2006
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Allows to create a status preventing healing.
#
#
# Configuration:
#
# VIRUS_IDS - the IDs of the Virus status effects
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias skill_effect_virus_later skill_effect
def skill_effect(user, skill)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
result = skill_effect_virus_later(user, skill)
virus_effect(last_hp, last_sr, skill) if self.damage.is_a?(Numeric)
return result
end
alias item_effect_virus_later item_effect
def item_effect(item, battler = nil)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
if battler == nil
result = item_effect_virus_later(item)
else
result = item_effect_virus_later(item, battler)
end
virus_effect(last_hp, last_sr, item) if self.damage.is_a?(Numeric)
return result
end
def virus_effect(last_hp, last_sr, object)
if $game_system.VIRUS_STATUS && VIRUS_IDS.any? {|i| @states.include?(i)}
self.hp = last_hp
self.hp = self.hp
self.sr = last_sr if last_sr != nil
if self.damage < 0
self.damage = (self.damage*0).to_i
end
self.hp -= self.damage
end
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# MP Shield Status Effect by Xelias
# Version: 1.00
# Type: Game Experience Improvement
# Date: 26.9.2006
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# When under this status, you never lose HP. However, you lose SP instead. When
# your SP reach 0, this status becomes ineffective.
#
# Configuration:
#
# MP_SHIELD_IDS - the IDs of the MP Shield status effects
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias attack_effect_mpshield_later attack_effect
def attack_effect(attacker)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
result = attack_effect_mpshield_later(attacker)
mpshield_effect(last_hp, last_sr, attacker) if self.damage.is_a?(Numeric)
return result
end
alias skill_effect_mpshield_later skill_effect
def skill_effect(user, skill)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
result = skill_effect_mpshield_later(user, skill)
mpshield_effect(last_hp, last_sr, skill) if self.damage.is_a?(Numeric)
return result
end
alias item_effect_mpshield_later item_effect
def item_effect(item, battler = nil)
last_hp = self.hp
last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
if battler == nil
result = item_effect_mpshield_later(item)
else
result = item_effect_mpshield_later(item, battler)
end
mpshield_effect(last_hp, last_sr, item) if self.damage.is_a?(Numeric)
return result
end
def mpshield_effect(last_hp, last_sr, object)
if $game_system.MP_SHIELD_STATUS && MP_SHIELD_IDS.any? {|i| @states.include?(i)}
self.hp = last_hp
self.hp = self.hp
self.sr = last_sr if last_sr != nil
if self.sp > 0 && self.damage > 0
self.animation_id = MP_SHIELD_ANIMATION_ID
self.sp -= self.damage
else
self.hp -= self.damage
end
end
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Spike Status by Xelias
# Version: 1.00
# Type: Enhanced Status
# Date: 26.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#
# Compatibility:
#
# 99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause
# problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
# This allows to create a Spike Status. It inflicts damage to your opponent every time
# he or she attacks or uses a special skill. You can also set a special animation to hit
# the opponent
# - Configuration
#
# SPIKES_IDS - include any IDs of Spikes Statuses and separate them with
# commas (i.e. [29])
# SPIKES_ANIMATION_ID - Put the animation id. If you don't want any, make it 0.
# SPIKES_PROTECTION - Set to true if you want to lower the damage taken by the
# damage inflected by the spikes. Set false if you don't.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=