Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 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
   Battle Item Count kyonides 4 855 02-04-2024, 05:49 AM
Last Post: kyonides
   Super Simple Vehicle System - Enhanced DerVVulfman 65 82,996 06-02-2023, 06:16 PM
Last Post: Sujabes467
   Dalissa's Battle Cry DerVVulfman 2 6,638 05-09-2023, 03:07 AM
Last Post: DerVVulfman
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 2,021 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Actor Battle Items DerVVulfman 4 4,940 11-08-2020, 12:36 PM
Last Post: Melana
   Battle Report Raziel 1 6,233 05-29-2020, 02:27 AM
Last Post: Whisper
   Commercial System Package DerVVulfman 11 12,060 01-04-2020, 12:37 AM
Last Post: Pelip
   KItemDesc XP & VX Zilsel Version kyonides 4 6,533 12-01-2019, 06:11 AM
Last Post: kyonides
   ZLSL's Battle Portraits DerVVulfman 4 6,476 11-12-2019, 04:10 AM
Last Post: DerVVulfman
   ACBS - Atoa Custom Battle System 3.2 Victor Sant 150 224,523 03-02-2019, 04:47 AM
Last Post: dragonprincess44



Users browsing this thread: