#phungus tax start
totalUnitCost = pPlayer.calculateUnitCost()
totalUnitSupply = pPlayer.calculateUnitSupply()
totalMaintenance = pPlayer.getTotalMaintenance()
totalCivicUpkeep = pPlayer.getCivicUpkeep([], False)
totalPreInflatedCosts = pPlayer.calculatePreInflatedCosts()
totalInflatedCosts = pPlayer.calculateInflatedCosts()
iInflation = totalInflatedCosts - totalPreInflatedCosts
goldFromCivs = pPlayer.getGoldPerTurn()
goldRate = pPlayer.getCommerceRate(CommerceTypes.COMMERCE_GOLD)
researchRate = pPlayer.calculateResearchRate(-1)
cultureRate = pPlayer.getCommerceRate(CommerceTypes.COMMERCE_CULTURE)
espionageRate = pPlayer.getCommerceRate(CommerceTypes.COMMERCE_ESPIONAGE)
iGDP = goldFromCivs + goldRate + researchRate + cultureRate + espionageRate + pPlayer.calculateTotalImports(YieldTypes.YIELD_COMMERCE)
CyInterface().addImmediateMessage("iGDP = %d" % (iGDP), "")
iwaste = totalUnitCost + totalUnitSupply + totalMaintenance + totalCivicUpkeep + iInflation + pPlayer.calculateTotalExports(YieldTypes.YIELD_COMMERCE)
CyInterface().addImmediateMessage("iwaste = %d" % (iwaste), "")
taxBurden = (100*iwaste) / iGDP - 10
CyInterface().addImmediateMessage("taxBurden = %d" % (taxBurden), "")
if( pPlayer.hasTrait(gc.getInfoTypeForString("TRAIT_ORGANIZED")) ):
taxBurden /= 2
sciPerc = pPlayer.getCommercePercent( CommerceTypes.COMMERCE_RESEARCH )
cultPerc = pPlayer.getCommercePercent( CommerceTypes.COMMERCE_CULTURE )
if( pPlayer.hasTrait(gc.getInfoTypeForString("TRAIT_CREATIVE")) ):
cultPerc *= 2