- 199
- Posts
- 15
- Years
- Seen Jul 6, 2022
Hi again!
I have just realised that from the MoveEffect 115 ahead the message always is "but it failed" in the battle. I don't understand, for example, if I move the effect to MoveEffect 114, it works.
I believed that with the solution that FL gave to me the problem had been ended.
Does someone know because there do not work the new effects that I add?
I have just realised that from the MoveEffect 115 ahead the message always is "but it failed" in the battle. I don't understand, for example, if I move the effect to MoveEffect 114, it works.
I believed that with the solution that FL gave to me the problem had been ended.
Does someone know because there do not work the new effects that I add?
Are you using a version before 2010 May? These versions don't had a fix to unimplemented moves work.
If you do, in "PokeBattle_Move", in the end change
To:Code:def PokeBattle_Move.pbFromPBMove(battle,move) move=PBMove.new(0) if !move movedata=PBMoveData.new(move.id) return eval(sprintf("PokeBattle_Move_%02X.new(battle,move)", movedata.function)) rescue PokeBattle_FailedMove.new(battle,move) end
And around line 34 in "PokeBattle_MoveEffects" putCode:def PokeBattle_Move.pbFromPBMove(battle,move) move=PBMove.new(0) if !move movedata=PBMoveData.new(move.id) className=sprintf("PokeBattle_Move_%02X",movedata.function) if Object.const_defined?(className) return Kernel.const_get(className).new(battle,move) else return PokeBattle_UnimplementedMove.new(battle,move) end end
Both codes are made by poccil.Code:# Superclass for an unimplemented move. If it's a damaging move # it has no additional effect. If it's a nondamaging move, it always fails. class PokeBattle_UnimplementedMove < PokeBattle_Move def pbEffect(attacker,opponent) if @basedamage>0 return super(attacker,opponent) else @battle.pbDisplay("But it failed!") return -1 end end end