public void OverrideBaseDamage(ModifiedBaseDamage newBaseDamage) { if (modifiedBaseDamage != null) { throw new System.Exception("You already modified base damage! You're trying to do it twice. This doesn't work"); } modifiedBaseDamage = newBaseDamage; }
public void PrepareActivation(List <Character> targets, TargetedAnimation animation, Action preparedCallback) { var bd = new ModifiedBaseDamage(); bd.minDamage = minDamage; bd.maxDamage = maxDamage; controller.character.attackModule.OverrideBaseDamage(bd); preparedCallback(); }
public AttackData CreateCounterAttack(AttackData incomingAttack) { var attackModule = incomingAttack.target.attackModule; var bd = new ModifiedBaseDamage(); bd.minDamage = minDamage; bd.maxDamage = maxDamage; attackModule.OverrideBaseDamage(bd); attackModule.activeLabels = labels; var attack = attackModule.CreateAttack(incomingAttack.target, incomingAttack.attacker); attackModule.RemoveBaseDamageOverride(); return(attack); }
public void RemoveBaseDamageOverride() { modifiedBaseDamage = null; }