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
   Face Sync System Core DerVVulfman 0 289 04-11-2026, 12:20 AM
Last Post: DerVVulfman
   Zeriab's Anti Lag System Zeriab 3 11,125 02-14-2026, 05:57 AM
Last Post: DerVVulfman
   The Wanderers: The Customizable Encounters System DerVVulfman 0 3,518 08-24-2024, 07:12 PM
Last Post: DerVVulfman
   Battle Item Count kyonides 4 7,471 02-04-2024, 05:49 AM
Last Post: kyonides
   Super Simple Vehicle System - Enhanced DerVVulfman 65 148,763 06-02-2023, 06:16 PM
Last Post: Sujabes467
   Dalissa's Battle Cry DerVVulfman 2 11,730 05-09-2023, 03:07 AM
Last Post: DerVVulfman
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 6,575 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Actor Battle Items DerVVulfman 4 12,138 11-08-2020, 12:36 PM
Last Post: Mel
   Battle Report Raziel 1 10,820 05-29-2020, 02:27 AM
Last Post: Whisper
   Commercial System Package DerVVulfman 11 26,204 01-04-2020, 12:37 AM
Last Post: Pelip



Users browsing this thread: 2 Guest(s)