Condition_PurchaseSuccessBaseOnPrice
Description
Determines whether a purchase succeeds based on the current sale price of the specified object relative to its base price. At the base price the success probability is 50%. As the price decreases toward F1basePrice, probability increases to 100%. As the price increases toward F2basePrice, probability decreases to 0%.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The object whose price will be evaluated for purchase success. |
| CompareType | Equal (purchase succeeds), NotEqual (purchase fails). |
| F1 | The minimum price ratio (multiplied by base price) where success probability is 100%. |
| F2 | The maximum price ratio (multiplied by base price) where success probability is 0%. |
Examples
| Description | BaseObject | Command | CompareType | F1 | F2 |
|---|---|---|---|---|---|
| Check if purchasing the target object succeeds (range 0.5-1.5) | Self | PurchaseSuccessBaseOnPrice | Equal | 0.5 | 1.5 |
| Check if purchasing fails (range 0.5-1.5) | Self | PurchaseSuccessBaseOnPrice | NotEqual | 0.5 | 1.5 |
| Check if purchasing the target succeeds (range 0.7-1.3) | Target | PurchaseSuccessBaseOnPrice | Equal | 0.7 | 1.3 |
Back to Command FinderSearch and filter all 491 Script Condition documents