Thread: [Essentials Script] Illusion
View Single Post
  #6    
Old December 12th, 2014 (3:04 PM).
trueegee trueegee is offline
     
    Join Date: Dec 2014
    Gender: Male
    Posts: 8
    Sorry for the double post, but here is a quick fix from mej71:

    In PokeBattle_Battler replace
    Code:
        if isConst?(self.ability,PBAbilities,:ILLUSION) #Illusion 
          party=@battle.pbParty(@index)
           party=party.find_all {|item| item && !item.egg? && item.hp>0
          if party[party.length-1] != @pokemon
             @effects[PBEffects::Illusion] = party[party.length-1]
           end
         end #Illusion
    with
    Code:
        if isConst?(self.ability,PBAbilities,:ILLUSION) #Illusion
           party=@battle.pbParty(@index)
           party=party.find_all {|item| item && !item.egg? && item.hp>0 }
           if party[party.length-1] != @pokemon
             @effects[PBEffects::Illusion] = party[party.length-1]
           else
             @effects[PBEffects::Illusion]      = nil
           end
         else
           @effects[PBEffects::Illusion]      = nil
        end #Illusion
    Reply With Quote