Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================
- # http://thiagodd.blogspot.com.br
- #
- # [TSDA] Difficulty System
- # --> Version 1.0
- # by thiago_d_d
- #
- #--------------------------------------------------------------
- # * Features
- #--------------------------------------------------------------
- # + Adds an simples difficulty system. With it, the enemies will
- # be weaker or stronger during battle. The system is controled
- # by variables, so you can use the difficulty in other systems.
- #
- #--------------------------------------------------------------
- # * Install
- #--------------------------------------------------------------
- # Put this script above Main
- #
- #--------------------------------------------------------------
- # * Configuration
- #--------------------------------------------------------------
- # Go to the D_VARIABLE_ID line and put there the ID of the
- # variable you want to store the difficulty.
- # The value of this variable can be
- # *0 - Normal difficulty
- # Normal enemy atributes.
- # *1 - Hard difficulty
- # 50% increased enemy atributes
- # *2 - Very Hard difficulty
- # 70% increased enemy atributes
- # *3 - God difficulty
- # 100% increased enemy atributes
- # *4 - Easy difficulty
- # 40% decreased enemy atributes
- #==============================================================
- module TSDA
- D_VARIABLE_ID = 1
- end
- #--------------------------------------------------------------
- class Game_Enemy
- alias old_str str
- def str
- str = old_str
- return str = apply_dificulty(str)
- end
- #------------------------------------------------------------
- alias old_dex dex
- def dex
- dex = old_dex
- return dex = apply_dificulty(dex)
- end
- #------------------------------------------------------------
- alias old_agi agi
- def agi
- agi = old_agi
- return agi = apply_dificulty(agi)
- end
- #------------------------------------------------------------
- alias old_int int
- def int
- int = old_int
- return int = apply_dificulty(int)
- end
- #------------------------------------------------------------
- def apply_dificulty(atribute)
- variable = $game_variables[TSDA::D_VARIABLE_ID]
- case variable
- when 0
- return atribute
- when 1
- return (atribute * 1.50).to_int
- when 2
- return (atribute * 1.70).to_int
- when 3
- return (atribute * 2).to_int
- when 4
- return (atribute * 0.6).to_int
- end
- return atribute
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement