on that same year he has to defend amposta from a pirate attack