Whenever Mogg Maniac is dealt damage, it deals that much damage to target opponent or planeswalker.
If it blocks a trample creature, it only gets dealt damage equal to what is assigned to it. This means it will likely only get to deal 1 damage to the opponent.