It is simple. A player doesn't win every time when he hits his farm, he has a chance of winning and a chance of losing. He can buy items to increase his chance of winning. Each time he attacks he is weakened and gets less plunder and has a less chance of winning. It's asking how much money he should spend on items for each attack to maximize profit.
Unicorn he should spend 500 real life dollars and than upgrade to LCMs and forget about your problem hells yeahs i solved it
They are not permanent. You don't know the cost but you know that for every "W" you get an increased "T"% chance to win