Template:BTD4 upgrade info: Difference between revisions

mNo edit summary
removing total costs for now since it was slightly off
Line 22: Line 22:
|colspan="2"|[[{{{tower}}} (BTD4)|{{{tower}}}]]
|colspan="2"|[[{{{tower}}} (BTD4)|{{{tower}}}]]
|-
|-
!Upgrade cost
!Cost
|colspan="2"|{{BTD4 cost by difficulty|{{{cost M|0}}}}}
|colspan="2"|{{BTD4 cost by difficulty|{{{cost M|0}}}}}
|-
!Total cost
|colspan="2"|{{BTD4 cost by difficulty|{{#expr:{{#cargo_query:table=btd4_towers|fields=CONCAT(cost_M)|where=name="{{{tower}}}"|no html}}+{{#cargo_query:table=btd4_upgrades|fields=CONCAT(SUM(cost_M))|group by=tower|where=tower="{{{tower}}}" AND tier<="{{{tier}}}"|no html}}}}}}
|-
!Sell value
|colspan="2"|{{BTD4 cost by difficulty|{{#expr:({{#cargo_query:table=btd4_towers|fields=CONCAT(cost_M)|where=name="{{{tower}}}"|no html}}*0.8)+{{#cargo_query:table=btd4_upgrades|fields=ROUND(SUM(cost_M*0.8),0)|group by=tower|where=tower="{{{tower}}}" AND tier<="{{{tier}}}"|no html}}}}}}
|}
|}
|-
|-