How long did the battle go? Was it more than 30 turns? Because I found out now that the tie breaker also kicks in during friendly matches.
My Paiea worked correctly with the Moonrise Ward formula:
Moonrise Ward damage reduction = - base damage reduction / 1000 x (attack - defense) + base damage reduction (probably round down)
with base damage reduction = 50% x max damage reduction