This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
damage_logic [2025/04/20 11:57] – justin | damage_logic [2025/04/22 13:45] (current) – justin | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Damage Logic====== | ======Damage Logic====== | ||
---- | ---- | ||
- | If you'd like customize | + | In RPG in a Box, any time one [[character]] attacks another, a calculation is done to determine how much damage is done to the [[character]] being attacked. |
- | Below is the Bauxite code for the default damage logic. You can take this and customize it as desired, or create your own logic from scratch! The only requirement is that the [[script]] returns a numeric value. | + | Below is the Bauxite code for the default damage logic. You can take this and customize it as desired, or create your own logic from scratch! The only requirement is that the [[script]] returns a [[number|numeric value]]. |
<code bauxite> | <code bauxite> | ||
$diff = $attacker.stat[" | $diff = $attacker.stat[" | ||
Line 18: | Line 18: | ||
return $damage; | return $damage; | ||
</ | </ | ||
+ | |||
+ | The default damage logic first calculates the difference between the attacker' | ||
<WRAP center round info 100%> | <WRAP center round info 100%> | ||
- | The default damage logic is loosely based on that of Shining Force, and is subject to change in future releases of RPG in a box. | + | The default damage logic is loosely based on that of [[https:// |
</ | </ | ||
~~NOTOC~~ | ~~NOTOC~~ |