- 1
- Posts
- 0
- Days
- Seen yesterday
Hi, let me preface this with saying that English isn't my first language, that I have no background in programming, and that I have less than a week of time with both Pokemon Essentials and RPGMaker XP overall.
Through watching some tutorials, reading older threads on the forum and reading the code of both Freeze-Dry and Fire Lash, I was trying to make a move that is both supereffective against Ice and drops down Defense by 1.
I got the super-effective part working, but when adding the lines of code from Fire Lash both stop working, which I guess is due to me not knowing how to read/write code and thus doing something wrong. I would ask for some guidance on how to solve this.
What I have so far is this:
class Battle::Move::IceBreakerDefDown < Battle::Move::FreezeTarget
attr_reader :statDown
def canMagicCoat?; return true; end
def pbFailsAgainstTarget?(user, target, show_message)
return false if damagingMove?
return !target.pbCanLowerStatStage?(@statDown[0], user, self, show_message)
end
def pbEffectAgainstTarget(user, target)
return if damagingMove?
target.pbLowerStatStage(@statDown[0], @statDown[1], user)
end
def pbAdditionalEffect(user, target)
return if target.damageState.substitute
return if !target.pbCanLowerStatStage?(@statDown[0], user, self)
target.pbLowerStatStage(@statDown[0], @statDown[1], user)
end
def pbAdditionalEffect(user, target)
def pbCalcTypeModSingle(moveType, defType, user, target)
return Effectiveness::SUPER_EFFECTIVE_MULTIPLIER if defType == :ICE
return super
end
end
When I first got the Ice part working, I had it in the front; I don't know if that could do something with it.
Thanks in advance.
Through watching some tutorials, reading older threads on the forum and reading the code of both Freeze-Dry and Fire Lash, I was trying to make a move that is both supereffective against Ice and drops down Defense by 1.
I got the super-effective part working, but when adding the lines of code from Fire Lash both stop working, which I guess is due to me not knowing how to read/write code and thus doing something wrong. I would ask for some guidance on how to solve this.
What I have so far is this:
class Battle::Move::IceBreakerDefDown < Battle::Move::FreezeTarget
attr_reader :statDown
def canMagicCoat?; return true; end
def pbFailsAgainstTarget?(user, target, show_message)
return false if damagingMove?
return !target.pbCanLowerStatStage?(@statDown[0], user, self, show_message)
end
def pbEffectAgainstTarget(user, target)
return if damagingMove?
target.pbLowerStatStage(@statDown[0], @statDown[1], user)
end
def pbAdditionalEffect(user, target)
return if target.damageState.substitute
return if !target.pbCanLowerStatStage?(@statDown[0], user, self)
target.pbLowerStatStage(@statDown[0], @statDown[1], user)
end
def pbAdditionalEffect(user, target)
def pbCalcTypeModSingle(moveType, defType, user, target)
return Effectiveness::SUPER_EFFECTIVE_MULTIPLIER if defType == :ICE
return super
end
end
When I first got the Ice part working, I had it in the front; I don't know if that could do something with it.
Thanks in advance.