//These are buffs that activate before the action hits. Usually they change things like hit or crit rates or damage public void PreAction(Character caster, Character target, BattleCommand skill, CommandResultContainer results) { target.statusEffects.CallLuaFunctionByFlag((uint)StatusEffectFlags.ActivateOnPreactionTarget, "onPreAction", caster, target, skill, this, results); caster.statusEffects.CallLuaFunctionByFlag((uint)StatusEffectFlags.ActivateOnPreactionCaster, "onPreAction", caster, target, skill, this, results); }
//Try and apply a status effect public void TryStatus(Character caster, Character target, BattleCommand skill, CommandResultContainer results, bool isAdditional = true) { BattleUtils.TryStatus(caster, target, skill, this, results, isAdditional); }
//Order of what (probably) happens when a skill is used: //Buffs that alter things like recast times or that only happen once per skill usage like Power Surge are activated //Script calculates damage and handles any special requirements //Rates are calculated //Buffs that impact indiviudal hits like Blindside or Blood for Blood are activated //The final hit type is determined //Stoneskin takes damage //Final damage amount is calculated using the hit type and defender's stats //Buffs that activate or respond to damage like Rampage. Stoneskin gets removed AFTER damage if it falls off. //Additional effects that are a part of the skill itself or weapon in case of auto attacks take place like status effects //Certain buffs that alter the whole skill fall off (Resonance, Excruciate) public void DoAction(Character caster, Character target, BattleCommand skill, CommandResultContainer results) { //First calculate rates for hit/block/etc CalcRates(caster, target, skill); //Next, modify those rates based on preaction buffs //Still not sure how we shouldh andle these PreAction(caster, target, skill, results); BattleUtils.DoAction(caster, target, skill, this, results); }