Code for Objects in CS?

How about something like this?

*temp prefixcount 1
*temp suffixcount 1
*temp swordcount 1
*temp sword @{swordcount Sword|Broadsword|Greatsword|Katana}
*temp prefix @{prefixcount Holy|Unholy|Icy|Flaming}
*temp suffix @{suffixcount of Speed|of Strength|of Stamina|of Leeching}

Should be able to do a lot with this basic model, I think?
Hope this helps.

Edit: “Multireplace” is introduced here: