I'm trying to come up with some changes to the DBS and it starts with the concept of
Stamina. Basically, an actor doesn't have HP or SP, but Stamina. Every action except "Do Nothing" and "Defend" take some points out of stamina. When stamina reaches zero, the actor "faints" or is KOed. Every action, be it a skill (Kamehameha), physical attack (Roundhouse Kick) or a combination of both (Going into KaioKen and delivering a punch) takes points out of stamina. Also, any damage taken is in terms of stamina, not HP.
Stamina itself is a derived stat. For ease of calculations, I've simply added HP and SP. So basically, "Max_Stamina = Max_HP + Max_SP". To achieve this effect and to simplify the process, I'm using HP as the base condition for consciousness, so that all the internal functions like "dead?" and hp0 will work.
Now, I have an equipment system in mind that resembles EQUAP. Basically, some skills are attached to weapons and equipping them will give you access to those skills. For example, you can use "Slash" with any kind of sword equipped.
Since I want every action to use stamina, I thought about completely removing normal attacking and associate a skill with each weapon. So when I select "Attack" in the battle menu, the "Slash" skill is executed and cuts points from stamina. In effect, the method
Game_Battler::attack_effect is never used. For this reason...
I want to know the difference between Game_Battler::attack_effect and Game_Battler::skill_effect. So far, all I've noticed is that skill_effect does everything attack_effect does, except critical damage correction. Is this right, or is there anything more to it? Also, attack_effect simply uses attacker's ATK and defender's PDEF for damage calculation. It also adds attacker's STR into the mix:
# Calculate basic damage
atk = [attacker.atk - self.pdef / 2, 0].max
self.damage = atk * (20 + attacker.str) / 20
But a skill configured with an attack factor (ATK_F in the database) does more or less the same thing:
# Calculate power
power = skill.power + user.atk * skill.atk_f / 100
if power > 0
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200
power = power.lbind(0)
end
# Calculate rate
rate = 20
rate += (user.str * skill.str_f / 100)
rate += (user.per * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.qsn * skill.int_f / 100)
# Calculate basic damage
self.damage = power * rate / 20
skill_effect doesn't use ATK, STR and PDEF directly like attack_effect, but all of them are factored, in a much more controlled way if you ask me.
So basically, is it okay if I stop using attack_effect altogether? I can move the critical damage calculation into skill_effect with a condition checking if the skill is physical (ATK_F > 0). Can I do that?