Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # TheoAllen - Core Damage Processing
- # Version : 1.0
- # Contact : www.rpgmakerid.com
- # =============================================================================
- $imported = {} if $imported.nil?
- $imported[:Theo_CoreDamage] = true
- # =============================================================================
- =begin
- NOTE :
- - Script ini cuman ngerubah alur perhitungan damage RGSS3. Secara default, di
- RGSS3 tu perhitungan di make_damage_value sangat strict banget dan ngebikin
- kita ga bisa aliasing dan berakhir dengan overwrite :3
- - Script ini emang mirip ama punyanya si tsukihime. Cuman bedanya kalo
- miliknya si tsuki ngga ngerubah apply critical.
- TERMS OF USE :
- - Ga perlu kredit jg. Toh ini masuk hal common sense
- =end
- # =============================================================================
- # Tidak ada konfigurasi
- # =============================================================================
- class Game_Battler < Game_BattlerBase
- def make_damage_value(user, item)
- value = base_damage(user, item)
- value = apply_element_rate(user, item, value)
- value = process_damage_rate(user, item, value)
- value = apply_damage_modifiers(user, item, value)
- @result.make_damage(value.to_i, item)
- end
- def base_damage(user, item)
- value = item.damage.eval(user, self, $game_variables)
- value
- end
- def apply_element_rate(user, item, value)
- value *= item_element_rate(user, item)
- value
- end
- def process_damage_rate(user, item, value)
- value *= pdr if item.physical?
- value *= mdr if item.magical?
- value *= rec if item.damage.recover?
- value
- end
- def apply_damage_modifiers(user, item, value)
- value = apply_critical(value, user) if @result.critical
- value = apply_variance(value, item.damage.variance)
- value = apply_guard(value)
- value
- end
- def apply_critical(damage, user)
- damage * 3
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment