-
Notifications
You must be signed in to change notification settings - Fork 33
Bot no-insurance setting is not working #99
Copy link
Copy link
Open
Description
From one of my test found out:

AI don't have credits in resource (credits in resource take spaces in resource storage, comes from normally harvesting), but have 10000+ credits as cash (credits in cash does not go into resource storage), which means all credits of this bot is coming from somewhere other than harvesting -- the bot cheat.
However, we have
^BotFallbackInsurance:
## this trait is not working in this usecase
GrantConditionOnPlayerResources@botinsurance:
Condition: noinsurance
Threshold: 2500
...
CashTrickler@brutalinsurance:
Interval: 450
Amount: 1250
ShowTicks: False
RequiresCondition: owned-by-brutal-ai && !noinsurance
As we can see, GrantConditionOnPlayerResources fail to restrict bot credit cheat to 2500.
In GrantConditionOnPlayerResources line 52, we see that the condition is toggled on only when playerResources.Resources > info.Threshold

but actually, player's credit consist 2 part in code: resource and cash. In order to get overall cash, we should use playerResources.GetCashAndResources().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels