A heavily modified RPG Maker XP game project that makes the game play like a Pokémon game. Not a full project in itself; this repo is to be added into an existing RMXP game project.
Use the .max function in Substitute's code instead of an inline if for checking if the HP of the substitute would be less than 1. The .max function (used for arrays) searches the greatest value in the array, so [15,1].max will output 15.
Use the
.max
function in Substitute's code instead of an inline if for checking if the HP of the substitute would be less than 1. The.max
function (used for arrays) searches the greatest value in the array, so[15,1].max
will output15
.I am sure that will work.