Relic Castle

I've added a new evolution method to my game which summarizes to "When Eevee is leveled up while poisoned, it evolves into Toxeon". Here's my code for it:

Ruby:
when PBEvolution::Custom1
return poke if status==PBStatuses::POISON

I tried testing this by using a Rare Candy on a poisoned Eevee, and got this error. I clearly need to define something, but I didn't see anything in Pokemon_Evolution I could make sense of in terms of where to put it.

Code:
---------------------------
Pokemon Magenta
---------------------------
Exception: NameError

Message: undefined local variable or method `status' for nil:NilClass

Pokemon_Evolution:825:in `pbMiniCheckEvolution'

Pokemon_Evolution:875:in `pbCheckEvolution'

Pokemon_Evolution:874:in `pbCheckEvolutionEx'

Pokemon_Evolution:863:in `each'

Pokemon_Evolution:863:in `pbCheckEvolutionEx'

Pokemon_Evolution:874:in `pbCheckEvolution'

PItem_Items:311:in `pbChangeLevel'

PItem_ItemEffects:639

PItem_ItemEffects:634:in `call'

Event:150:in `trigger'
Top