- 79
- Posts
- 9
- Years
- Seen Jan 12, 2024
Hello, I'm attempting to create a physical move that uses the target's special defense, effectively a reverse of Psyshock.
Here's its info in moves.txt:
690,SOULSTRIKE,Soul Strike,D0D,80,GHOST,Physical,100,10,10,00,0,abef,"The user attacks through to the target's very soul. This attack does special damage."
In Pokebattle_Move, I changed:
to:
and in Pokebattle_MoveEffects:
However, I now receive this error when attempting to use any physical move:
I tried to use the same format special defense and psyshock used, but I must have messed up somewhere. Any help would be greatly appreciated!
Here's its info in moves.txt:
690,SOULSTRIKE,Soul Strike,D0D,80,GHOST,Physical,100,10,10,00,0,abef,"The user attacks through to the target's very soul. This attack does special damage."
In Pokebattle_Move, I changed:
Code:
defense=opponent.defense
defstage=opponent.stages[PBStats::DEFENSE]+6
# TODO: Wonder Room should apply around here
applysandstorm=false
Code:
if type>=0 && pbIsPhysical?(type) && @function!=0xD0D # Soul Strike
defense=opponent.defense
defstage=opponent.stages[PBStats::DEFENSE]+6
applysandstorm=false
end
Code:
################################################################################
# Target's Special Defense is used instead of its Defense for this move's
# calculations. (Soul Strike)
################################################################################
class PokeBattle_Move_D0D < PokeBattle_Move
# Handled in superclass def pbCalcDamage, do not edit!
end
However, I now receive this error when attempting to use any physical move:
Spoiler:
---------------------------
Pokemon Essentials
---------------------------
[Pokémon Essentials version 17.2]
Exception: NoMethodError
Message: undefined method `*' for nil:NilClass
PokeBattle_Move:1133:in `pbCalcDamage'
PokeBattle_Move:1531:in `pbEffect'
PokeBattle_Battler:3466:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:3421:in `each'
PokeBattle_Battler:3421:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:4032:in `pbUseMove'
PokeBattle_Battler:4012:in `loop'
PokeBattle_Battler:4035:in `pbUseMove'
PokeBattle_Battler:4241:in `pbProcessTurn'
PokeBattle_Battler:4240:in `logonerr'
This exception was logged in
C:\Users\totte\Saved Games\Pokemon Essentials\errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
Pokemon Essentials
---------------------------
[Pokémon Essentials version 17.2]
Exception: NoMethodError
Message: undefined method `*' for nil:NilClass
PokeBattle_Move:1133:in `pbCalcDamage'
PokeBattle_Move:1531:in `pbEffect'
PokeBattle_Battler:3466:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:3421:in `each'
PokeBattle_Battler:3421:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:4032:in `pbUseMove'
PokeBattle_Battler:4012:in `loop'
PokeBattle_Battler:4035:in `pbUseMove'
PokeBattle_Battler:4241:in `pbProcessTurn'
PokeBattle_Battler:4240:in `logonerr'
This exception was logged in
C:\Users\totte\Saved Games\Pokemon Essentials\errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
I tried to use the same format special defense and psyshock used, but I must have messed up somewhere. Any help would be greatly appreciated!