Mega Evolution with Zen Mode

Charizardthree

Trainer
Member
Joined
Apr 25, 2017
Posts
91
Hi all,
I'm trying to create a mega evolution which can change form, I thought the simplest way to do this would be to give the Mega Evolution the ability Zen Mode.
When I try to do this I get an automatic Mega evolution when the Pokemon is sent into battle but the ability will activate as normal.
just wondered does anyone know how to stop the automatic evolution or is there a better way of doing this?

In the Battlers folder I have the Mega evolution sprite as 009_1 and the Zen mode sprite as 009_2

My current method was to
- Set up a basic mega evolution
- Set up an another form
- Give the mega the ability

I basically copied what Darmanitan has set up in the scripts but created a mega evolution also.
The problem starts to occur as soon as the ability is defined in the scripts.

I'm not sure if i've missed anything but if anyone could help that would be great
 

kman5

Rookie
Member
Joined
Nov 13, 2017
Posts
1
The easiest way of doing this as far as I know is to change this in the PokeBattler_Battler script:
Code:
# Zen Mode
	if isConst?(self.species,PBSpecies,:DARMANITAN)
	  if self.hasWorkingAbility(:ZENMODE) && @hp<=((@totalhp/2).floor)
		if self.form!=1
		  self.form=1; transformed=true
		end
	  else
		if self.form!=0
		  self.form=0; transformed=true
		end
	  end
	end
with:
Code:
# Zen Mode
	if isConst?(self.species,PBSpecies,:DARMANITAN)
	  if self.hasWorkingAbility(:ZENMODE) && @hp<=((@totalhp/2).floor)
		if self.form=0
		  self.form=1; transformed=true
		end
		if self.form=2
		  self.form=3; transformed=true
		end
	  else
		if self.form=1
		  self.form=0; transformed=true
		end
		if self.form=3
		  self.form=2; transformed=true
		end
	  end
	end
Change DARMANITAN to the internal name of the pokemon and ZENMODE to the internal name of the ability.
As long as the normal base is 0, normal zen is 1, mega base is 2 and mega zen is 3, it should work.

NOTE: You could change the number 2 in
Code:
 (@totalhp/2)
to change the health required to change.
 
Last edited:
Top