- 34
- Posts
- 9
- Years
- Seen May 22, 2021
Hi, I am trying to create a move called alchemy.
It is similar to techno blast so I made used of its script. The only difference is that after certain berries ( as mentioned below) are consumed, the alchemy move will give different typings.
I used this script below, but it seems that after consuming the berry, the typing is still normal.
Please help.
It is similar to techno blast so I made used of its script. The only difference is that after certain berries ( as mentioned below) are consumed, the alchemy move will give different typings.
I used this script below, but it seems that after consuming the berry, the typing is still normal.
Please help.
Code:
class PokeBattle_Move_167 < PokeBattle_Move
def pbModifyType(type,attacker,opponent)
type=getConst(PBTypes,:NORMAL) || 0
if isConst?(@id,PBMoves,:ALCHEMY)
return getConst(PBTypes,:FIGHTING) if attacker.pbConsumeItem(:CHOPLEBERRY)
return getConst(PBTypes,:FLYING) if attacker.pbConsumeItem(:COBABERRY)
return getConst(PBTypes,:POISON) if attacker.pbConsumeItem(:KEBIABERRY)
return getConst(PBTypes,:GROUND) if attacker.pbConsumeItem(:SHUCABERRY)
return getConst(PBTypes,:ROCK) if attacker.pbConsumeItem(:CHARTIBERRY)
return getConst(PBTypes,:BUG) if attacker.pbConsumeItem(:TANGABERRY)
return getConst(PBTypes,:GHOST) if attacker.pbConsumeItem(:KASIBBERRY)
return getConst(PBTypes,:STEEL) if attacker.pbConsumeItem(:BABIRIBERRY)
return getConst(PBTypes,:FIRE) if attacker.pbConsumeItem(:OCCABERRY)
return getConst(PBTypes,:WATER) if attacker.pbConsumeItem(:PASSHOBERRY)
return getConst(PBTypes,:GRASS) if attacker.pbConsumeItem(:RINDOBERRY)
return getConst(PBTypes,:ELECTRIC) if attacker.pbConsumeItem(:WACANBERRY)
return getConst(PBTypes,:PSYCHIC) if attacker.pbConsumeItem(:PAYAPABERRY)
return getConst(PBTypes,:ICE) if attacker.pbConsumeItem(:YACHEBERRY)
return getConst(PBTypes,:DRAGON) if attacker.pbConsumeItem(:HABANBERRY)
return getConst(PBTypes,:DARK) if attacker.pbConsumeItem(:COLBURBERRY)
return getConst(PBTypes,:FAIRY) if attacker.pbConsumeItem(:ROSELIBERRY)
end
return type
end
end