Add coin deduction and cost adjustment logic to QS buttons in character creation tool XML

This commit is contained in:
Florian 2026-05-06 14:45:11 +02:00
parent d917876fa3
commit 852da82679

View File

@ -4014,11 +4014,18 @@
<Value>[damage]</Value> <Value>[damage]</Value>
</NameValueDisplay> </NameValueDisplay>
</Columns> </Columns>
<Budget>[data.character.control.coins]</Budget>
<Cost>[cost]</Cost>
<AllowRemove>true</AllowRemove> <AllowRemove>true</AllowRemove>
<Buttons> <Buttons>
<Button> <Button>
<Text>"+QS"</Text> <Text>"+QS"</Text>
<OnClick> <OnClick>
<Action>
<If>[cost] &lt; 10000</If>
<Do>[data.character.control.coins] - [cost]</Do>
<Output>[data.character.control.coins]</Output>
</Action>
<Action> <Action>
<If>[cost] &lt; 10000</If> <If>[cost] &lt; 10000</If>
<Do>[cost] * 2</Do> <Do>[cost] * 2</Do>
@ -4026,6 +4033,21 @@
</Action> </Action>
</OnClick> </OnClick>
</Button> </Button>
<Button>
<Text>"-QS"</Text>
<OnClick>
<Action>
<If>[cost] &gt; 1</If>
<Do>[cost] / 2</Do>
<Output>[cost]</Output>
</Action>
<Action>
<If>[cost] &gt; 1</If>
<Do>[data.character.control.coins] + [cost]</Do>
<Output>[data.character.control.coins]</Output>
</Action>
</OnClick>
</Button>
</Buttons> </Buttons>
</ListDisplay> </ListDisplay>
<BaseToListPicker> <BaseToListPicker>