if true # << Make true to use this script, false to disable.
#===============================================================================
#
# ☆ $D13x - States :: Damage Over Time
# -- Author : Dekita
# -- Version : 1.0
# -- Level : Easy
# -- Requires : N/A
# -- Engine : RPG Maker VX Ace.
#
#===============================================================================
# ☆ Import
#-------------------------------------------------------------------------------
$D13x={}if$D13x==nil
$D13x[:DOTs]=true
#===============================================================================
# ☆ Updates
#-------------------------------------------------------------------------------
# D /M /Y
# 26/o5/2o14 - Started, Finished,
#
#===============================================================================
# ☆ Introduction
#-------------------------------------------------------------------------------
# This script allows states to be given a portion of code to eval during the
# 'refresh state turns' method.
# What this means is, you can create various hp / mp / tp moddifying states.
# You could also attach variables onto your state turns.
# Obviously, as you can code the formula, this opens a whole range of
# possibilities. Such as using various stats to determine the hp/mp loss.
# Using element resistance to determine TP gain.
# Using variables to determine the HP lost...
# There are many uses for this kind of feature, so dont be scared to think
# 'outside of the box'.
#
#===============================================================================
# ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
#===============================================================================
# 1. You MUST give credit to "Dekita" !!
# 2. You are NOT allowed to repost this script.(or modified versions)
# 3. You are NOT allowed to convert this script.
# 4. You are NOT allowed to use this script for Commercial games.
# 5. ENJOY!
#
# "FINE PRINT"
# By using this script you hereby agree to the above terms and conditions,
# if any violation of the above terms occurs "legal action" may be taken.
# Not understanding the above terms and conditions does NOT mean that
# they do not apply to you.
# If you wish to discuss the terms and conditions in further detail you can
# contact me at http://dekitarpg.wordpress.com/
#
#===============================================================================
# ☆ Instructions
#-------------------------------------------------------------------------------
# Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
#
#===============================================================================
# ☆ Notetags ( For State Noteboxes )
#-------------------------------------------------------------------------------
# <dot: ID>
# ID = the DoT_Data[ ID ] for this state.
#
#===============================================================================
# ☆ HELP
#-------------------------------------------------------------------------------
#
#===============================================================================
module Deki_State_DoTs ; DoT_Data = [""] # << Keep
#===============================================================================
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
NoTeTaG = /<dot:(.*)>/i
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
DoT_Data[1] = "self.hp -= ((self.atk/4)+(self.hp/10)+1).to_i"
#-----------------------------------------------------------------------------
DoT_Data[2] = "self.mp -= ((self.mat/4)+(self.mp/10)+1).to_i"
#-----------------------------------------------------------------------------
# Add Mote DoT_Data[ID] Here. Follow the same format as above.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
#####################
# CUSTOMISATION END #
end #####################
#☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
# #
# http://dekitarpg.wordpress.com/ #
# #
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
#===============================================================================#
# ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
# YES?\.\. #
# OMG, REALLY? \| #
# WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
# I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
#===============================================================================#
module Deki_State_DoTs
#===============================================================================
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
def self.set_dot(state)
if state.note =~ Deki_State_DoTs::NoTeTaG
return $1.to_i
else
return 0
end
end
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
end
#===============================================================================
class RPG::State < RPG::BaseItem
#===============================================================================
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
def get_dot
if @dot_eval.nil?
@dot_eval = set_dot
end
@dot_eval
end
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
def set_dot
Deki_State_DoTs.set_dot(self)
end
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
end
#===============================================================================
class Game_Battler < Game_BattlerBase
#===============================================================================
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
alias :update_DOT_state_turns :update_state_turns
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
def update_state_turns
update_DOT_state_turns
perform_all_states_DOT
end
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
def perform_all_states_DOT
states.each do |state|
perform_state_DoT(state)
end
end
#-----------------------------------------------------------------------------
# state = RPG:State.new || $data_states[id]
#-----------------------------------------------------------------------------
def perform_state_DoT(state)
eval(Deki_State_DoTs::DoT_Data[state.get_dot]) rescue nil
end
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
end
#==============================================================================#
# http://dekitarpg.wordpress.com/ #
#==============================================================================#
end # if true # << Make true to use this script, false to disable.