Whatif
speculate
whatif
This takes a semicolon-separated list of commands that change the character state, and displays the modifier changes that would occur due to executing those commands. The supported commands are:
- MCD <num>
- equip [<slot>] <item>
- unequip <slot>
- familiar <type> - note that this doesn't change the current familiar item, whether or not the specified familiar can equip it.
- up <effect> - considers you to have 1 turn of that effect.
- uneffect <effect>
- quiet - suppresses the display of changed modifiers, for use in scripts.
Note that speculation about impossible actions is allowed - there's no checking to verify that you actually have any item, or can equip it. The predicted modifiers are stored as an object named "_spec", which can be referenced by any of the ASH modifier query functions.
Five derived modifiers were added for use with this command, with values predicted from your base stats and other modifiers: "Buffed Muscle", "Buffed Mysticality", "Buffed Moxie", "Buffed HP Maximum", and "Buffed MP Maximum". They are of little use with the character's current modifiers, since the actual values of these attributes are available, but are quite useful with the modifiers resulting from a speculation.
Example:
cli_execute("whatif equip KGE helm; equip KGE polearm; equip KGE pants; quiet");
if (my_mp() > numeric_modifier("_spec", "Buffed MP Maximum"))
print("Bad idea - you'd lose MP by doing that.");