CTB - A Final Fantasy X-like Battle System, Version 3.2
#22
I'm working on new battle formulas.
Here is what I have at the moment for skills with power>0.

Code:
# A base value of damage is calculated from the skill's power
# Optionally the skill's power can be used as an exponent
attack = (skill.is_exp_damage())?Math.exp(skill.power/10.0):skill.power

# This multiplier is based on the caster's parameters and the F modifiers of the skill
stats_multiplier =
            user.str * skill.str_f / 100 +
            user.dex * skill.dex_f / 100 +
            user.agi * skill.agi_f / 100 +
            user.int * skill.int_f / 100 +
            user.atk * skill.atk_f / 100

# The modifier is used only if not zero
# If the modifier is zero the damage will not depend in any way on the caster's stats
attack *= stats_multiplier unless stats_multiplier == 0

# Element tagging can be used to increase the skill's power
attack *= 10 if skill.is_damage_x_10()

# This is configurable and lets you adjust the range of damages
attack *= 0.1

# mdef_f and pdef_f indicate what percentage of the skill's power can be neutralized
# with mdef and pdef
defense = [attack * skill.mdef_f / 100, self.mdef].min +
            [attack * skill.pdef_f / 100, self.pdef].min
          
          
# The standard element correction
attack *= elements_correct(skill.element_set)
attack /= 100

# The final result
power = [attack - defense, 0].max

I'm gonna get rid of the distinction between skills and techniques, because it has been confusing for users and because you can easily reproduce them with the new formulas.

I'm interested in comments and ideas.
Reply


Messages In This Thread
CTB - A Final Fantasy X-like Battle System, version 3.1 (NEW Jul 4 2010) - by Charlie Fleed - 03-11-2009, 07:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   The Wanderers: The Customizable Encounters System DerVVulfman 0 1,444 08-24-2024, 07:12 PM
Last Post: DerVVulfman
   Battle Item Count kyonides 4 3,937 02-04-2024, 05:49 AM
Last Post: kyonides
   Super Simple Vehicle System - Enhanced DerVVulfman 65 110,018 06-02-2023, 06:16 PM
Last Post: Sujabes467
   Dalissa's Battle Cry DerVVulfman 2 8,822 05-09-2023, 03:07 AM
Last Post: DerVVulfman
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 4,117 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Actor Battle Items DerVVulfman 4 7,983 11-08-2020, 12:36 PM
Last Post: Mel
   Battle Report Raziel 1 8,252 05-29-2020, 02:27 AM
Last Post: Whisper
   Commercial System Package DerVVulfman 11 18,001 01-04-2020, 12:37 AM
Last Post: Pelip
   KItemDesc XP Zilsel Version kyonides 4 9,983 12-01-2019, 06:11 AM
Last Post: kyonides
   ZLSL's Battle Portraits DerVVulfman 4 9,378 11-12-2019, 04:10 AM
Last Post: DerVVulfman



Users browsing this thread: 7 Guest(s)