- 1
- Posts
- 6
- Years
- Seen Jul 9, 2018
Hey everyone. So I'm quite new to this but I decided to add a Pixilate clone for each type into PokeBattle_Move, but afterwards, when I try to launch the game it says there is a syntax error in the final line. I have read that I am likely missing an 'end' in my new code, but I'm at a loss to where it should be. Below are the two parts of the code I edited:
PART 1: Ability changing effect
PART 2: Damage Multiplier Effect
Thank you in advance for reading and for any help you may be able to offer :)
PART 1: Ability changing effect
Spoiler:
def pbModifyType(type,attacker,opponent)
if type>=0 && attacker.hasWorkingAbility(:NORMALIZE)
type=getConst(PBTypes,:NORMAL) || 0
end
if type==0
if attacker.hasWorkingAbility(:AERILATE)
type=getConst(PBTypes,:FLYING) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:REFRIGERATE)
type=getConst(PBTypes,:ICE) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:PHANTOMIZE)
type=getConst(PBTypes,:GHOST) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:MECHANIZE)
type=getConst(PBTypes,:STEEL) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:IGNITE)
type=getConst(PBTypes,:FIRE) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:SOAKING)
type=getConst(PBTypes,:WATER) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:NATURALIZE)
type=getConst(PBTypes,:GRASS) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:GALVANIZE)
type=getConst(PBTypes,:ELECTRIC) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:MYSTICIZE)
type=getConst(PBTypes,:PSYCHIC) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:PESTPESTERING)
type=getConst(PBTypes,:BUG) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:CRYSTALLIZE)
type=getConst(PBTypes,:ROCK) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:TERRAFORMER)
type=getConst(PBTypes,:GROUND) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:INTOXICATE)
type=getConst(PBTypes,:POISON) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:MARTIALSKILL)
type=getConst(PBTypes,:FIGHTING) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:DRACONIC)
type=getConst(PBTypes,:DRAGON) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:DEVIATE)
type=getConst(PBTypes,:DARK) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:BRIGHTEN)
type=getConst(PBTypes,:LIGHT) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:PIXILATE)
type=getConst(PBTypes,:FAIRY) || 0
@powerboost=true
end
end
end
return type
end
if type>=0 && attacker.hasWorkingAbility(:NORMALIZE)
type=getConst(PBTypes,:NORMAL) || 0
end
if type==0
if attacker.hasWorkingAbility(:AERILATE)
type=getConst(PBTypes,:FLYING) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:REFRIGERATE)
type=getConst(PBTypes,:ICE) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:PHANTOMIZE)
type=getConst(PBTypes,:GHOST) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:MECHANIZE)
type=getConst(PBTypes,:STEEL) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:IGNITE)
type=getConst(PBTypes,:FIRE) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:SOAKING)
type=getConst(PBTypes,:WATER) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:NATURALIZE)
type=getConst(PBTypes,:GRASS) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:GALVANIZE)
type=getConst(PBTypes,:ELECTRIC) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:MYSTICIZE)
type=getConst(PBTypes,:PSYCHIC) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:PESTPESTERING)
type=getConst(PBTypes,:BUG) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:CRYSTALLIZE)
type=getConst(PBTypes,:ROCK) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:TERRAFORMER)
type=getConst(PBTypes,:GROUND) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:INTOXICATE)
type=getConst(PBTypes,:POISON) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:MARTIALSKILL)
type=getConst(PBTypes,:FIGHTING) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:DRACONIC)
type=getConst(PBTypes,:DRAGON) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:DEVIATE)
type=getConst(PBTypes,:DARK) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:BRIGHTEN)
type=getConst(PBTypes,:LIGHT) || 0
@powerboost=true
elsif attacker.hasWorkingAbility(:PIXILATE)
type=getConst(PBTypes,:FAIRY) || 0
@powerboost=true
end
end
end
return type
end
PART 2: Damage Multiplier Effect
Spoiler:
if (attacker.hasWorkingAbility(:AERILATE) ||
attacker.hasWorkingAbility(:REFRIGERATE) ||
attacker.hasWorkingAbility(:MARTIALSKILL) ||
attacker.hasWorkingAbility(:INTOXICATE) ||
attacker.hasWorkingAbility(:TERRAFORMER) ||
attacker.hasWorkingAbility(:CRYSTALLIZE) ||
attacker.hasWorkingAbility(:PESTPESTERING) ||
attacker.hasWorkingAbility(:PHANTOMIZE) ||
attacker.hasWorkingAbility(:MECHANIZE) ||
attacker.hasWorkingAbility(:IGNITE) ||
attacker.hasWorkingAbility(:SOAKING) ||
attacker.hasWorkingAbility(:NATURALIZE) ||
attacker.hasWorkingAbility(:GALVANIZE) ||
attacker.hasWorkingAbility(:MYSTICIZE) ||
attacker.hasWorkingAbility(:DRACONIC) ||
attacker.hasWorkingAbility(:DEVIATE) ||
attacker.hasWorkingAbility(:BRIGHTEN) ||
attacker.hasWorkingAbility(:PIXILATE)) && @powerboost
damagemult=(damagemult*1.3).round
end
attacker.hasWorkingAbility(:REFRIGERATE) ||
attacker.hasWorkingAbility(:MARTIALSKILL) ||
attacker.hasWorkingAbility(:INTOXICATE) ||
attacker.hasWorkingAbility(:TERRAFORMER) ||
attacker.hasWorkingAbility(:CRYSTALLIZE) ||
attacker.hasWorkingAbility(:PESTPESTERING) ||
attacker.hasWorkingAbility(:PHANTOMIZE) ||
attacker.hasWorkingAbility(:MECHANIZE) ||
attacker.hasWorkingAbility(:IGNITE) ||
attacker.hasWorkingAbility(:SOAKING) ||
attacker.hasWorkingAbility(:NATURALIZE) ||
attacker.hasWorkingAbility(:GALVANIZE) ||
attacker.hasWorkingAbility(:MYSTICIZE) ||
attacker.hasWorkingAbility(:DRACONIC) ||
attacker.hasWorkingAbility(:DEVIATE) ||
attacker.hasWorkingAbility(:BRIGHTEN) ||
attacker.hasWorkingAbility(:PIXILATE)) && @powerboost
damagemult=(damagemult*1.3).round
end
Thank you in advance for reading and for any help you may be able to offer :)