The extra damage from ignoring armor carries over to guard and health but any extra damage from bonus damage vs. barrier doesn't. The game handles damage to guard and barrier like so:
EDIT: The previous version of this pseudocode had a mistake in it; it has now been fixed.
if (defender has barrier) then
// armor here refers to effective armor (after armor penetration has been subtracted from base armor)
defender_armor -= min(defender_armor, defender_barrier)
endif
damage -= defender_armor
// other damage calc stuff (attack, crit, ability multipliers, resistances, defense, etc) would be here...
if (defender has barrier) then
barrier_damage = damage * (1 + barrier_damage_bonus)
if (defender_barrier >= barrier_damage) then
defender_barrier -= barrier_damage
damage = 0
else
damage -= defender_barrier
defender_barrier = 0
endif
endif
if (damage <= 0) then
return
endif
if (defender has guard) then
guard_damage = damage * (1 + guard_damage_bonus)
if (defender_guard >= guard_damage) then
defender_guard -= guard_damage
damage = 0
else
damage -= defender_guard
defender_guard = 0
endif
endif
if (damage <= 0) then
return
endif
defender_health -= damage
So for example, if you have 200 armor and 200 barrier and an enemy deals 500 damage) it will ignore your armor, making final damage equal to 500. Your barrier absorbs 200 damage and the other 300 damage is applied directly to health without any armor mitigation.
Now let's say that in the same scenario as above, the enemy has a 100% barrier damage bonus. The barrier still ends up absorbing 200 damage and you still take 300 damage to health. This is because any overflow damage that goes past barrier is calculated from damage unmodified by barrier damage bonus.
Now the edge case here is when remaining barrier is less than the defender's effective armor value (this is armor less any armor penetration the attack might have). In this case, the amount of armor ignored by incoming damage is capped at a maximum value equal to the defender's remaining barrier. So for example, let's take the above example, only this time the defender has 50 barrier instead of 200. Because the defender's barrier (50) is less than the defender's armor (200), the incoming damage only ignores 50 armor, leaving 150 armor on the defender. Thus the final damage is 500-150=350. The barrier absorbs 50 damage, and the remaining 300 is applied to health without any further armor mitigation.