So my view on how this works is that the number of dice is determined by the hill terrain. Maximum 2 dice uphill and 3 dice from hill to hill (except cavalry).
The ramparts allow the occupant to ignore 1 flag and 1 Sword if across a rampart hexside, be it uphill or hill to hill.
This would be those two normal terrain rules working together.
"I will either find a way, or make one."
attrib to Hannibal Barca
2 solitaire battles with the Spartans winning both, 6 - 4, and 6 - 0. The first contest was closer because the Spartans came down from the ramparts on the left flank. That is where the majority of fighting took place. In the second contest, I let the Spartans hold, and let the Macedonians attempt to take the ramparts. They failed.