|Don't lose money after losing a battle|
|Click here for more tutorials!|
After losing a battle, you lose money, even if you create a battle that can be lost! This tutorial explains how to make a switch that, when it's ON, the player doesn't lose money when they lose a battle! I am going to use switch 50, but you can use any switch in this place. Remember to turn it off after the special battles or the player will never lose money when they lose a battle.
In PokeBattle_Battle, around line 870, insert the following highlighted code:
moneylost=pbMaxLevel(@party1) multiplier=[8,16,24,32,48,64,80,100,120] moneylost*=multiplier[[8,self.pbPlayer.numbadges].min] moneylost=self.pbPlayer.money if moneylost>self.pbPlayer.money moneylost=0 if $game_switches self.pbPlayer.money-=moneylost