Talk:Crime
From PlanetsWiki
[edit] Details on Fighting crime
(moved to the Talk Page to clean the crime page up a bit) (from a posting of code by Tim, Host 197, translated to english ;)
If the race's law is > 10 Then ' This works for all races but the Privs and the Borg ' Troops may reduce crime ' If you have 1,000 crime and 100 troops, they will drop crime by 2 points ' If you have 10,000 crime and 1,000,000 troops, they will drop crime by 1,002 points If there are 100 or more Troops in the base Then If the base has crime Then v = 2 + SQR(Troops / 100) * (Crime / 1,000) Substract v from the crime If the crime of the base is still > 0 then add to base log "Troops reducing crime by 'v' points." End If End If ' HG may reduce crime ' If you have 100 crime and 100 HG, they will drop crime by 15 points ' If you have 10,000 crime and 10,000 HG, they will drop crime by 10,005 points (to -5) If there are 10 or more High Guard Rangers in the base Then v = 5 + SQR(HG) * (Crime / 100) Substract v from the crime If the crime of the base is still > 0 then add to base log "High Guard reducing crime by 'v' points." End If ' Increase happiness, if crime has been reduced If meBaseT.pNum > 0 and meBaseT.pNum <= 30 Then ' no idea what this checks, maybe if it is not a hw? If the base is not owned by the Robots Then Increase the Happiness by 'v' points End If End If End If
[edit] HighGuards > 10 or >= 10 ?
The pseudo-code and the wiki text differ here: How many HGs are needed to fight crime? 10 or 11 ? Flynx 14:07, 18 September 2007 (CEST)
[edit] Spreading crime (crime 1000)
Does the crime of a ground asaulted base spread over the empire of the victim only if the crime is 1000 ? (this is the maximum value for crime). Or what does it mean 'very high crime'? Flynx 14:06, 18 September 2007 (CEST)
