Maruno17 / pokemon-essentials

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.
Other
208 stars 398 forks source link

Use the .max function in Substitute's code #167

Closed C-Ezra-M closed 2 years ago

C-Ezra-M commented 2 years ago

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.

I am sure that will work.