I'm hoping you can help out with this sentence 僕がかわりに殴ってやろう, which I am not sure if I translate properly because of the が particle and also the imperative (is that right?) of the verb やる.
If the sentence had been written like this 僕のかわりに殴ってやろう I think it would have translated like: "Hit (them) in my place". Breaking it down in the literal sense, it should be
"Do the action of hitting for me". Is that it? I have encountered the かわりに construction more with the の particle and because this time it is with the subject marker が, should the sentence be translated as: "Hit me instead" ? Also, by having that imperative form, for example, if I would say to someone "Hit me!" I feel that in Japanese it would sound like "僕を殴ってやれ！" (would やろう work as well?)
As a command/order towards someone, in a context when you want to sound harsh, just having the verb in て form would count as an imperative? I think I heard it in anime sometimes.
I hope I explained right and that you can help me out with a proper translation.