- 56
- Posts
- 5
- Years
- Ohio
- Seen May 14, 2025
I don't know if this is a bug or just a problem with my Essentials, but the move Knock Off doesn't seem to be getting a boost when used against a Pokemon with an item. After lots of testing, the move always did the same amount of damage no matter if an item was held or not. Here's the script for Knock Off, is there something wrong here? I'm pretty sure this is just the original, unedited script from Vanilla Essentials.
I tried playing around with the damage multiplier part of the code, but nothing I did worked. Knock Off is listed in the correct move class of 0F0, Sticky Hold wasn't in play, and my Pokemon just held a Berry while the opponent did Knock Off. The Berry would be knocked off, but the move wasn't any more powerful.
Any ideas are appreciated. Thanks!
Code:
################################################################################
# Target drops its item. It regains the item at the end of the battle. (Knock Off)
# If target has a losable item, damage is multiplied by 1.5.
################################################################################
class PokeBattle_Move_0F0 < PokeBattle_Move
def pbEffectAfterHit(attacker,opponent,turneffects)
if !attacker.fainted? && !opponent.fainted? && opponent.item!=0 &&
opponent.damagestate.calcdamage>0 && !opponent.damagestate.substitute
if !attacker.hasMoldBreaker && opponent.hasWorkingAbility(:STICKYHOLD)
abilityname=PBAbilities.getName(opponent.ability)
@battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",opponent.pbThis,abilityname,@name))
elsif [email protected](opponent,opponent.item)
itemname=PBItems.getName(opponent.item)
opponent.item=0
opponent.effects[PBEffects::ChoiceBand]=-1
opponent.effects[PBEffects::Unburden]=true
@battle.pbDisplay(_INTL("{1} dropped its {2}!",opponent.pbThis,itemname))
end
end
end
def pbModifyDamage(damagemult,attacker,opponent)
if USENEWBATTLEMECHANICS &&
[email protected](opponent,opponent.item)
# Still boosts damage even if opponent has Sticky Hold
return (damagemult*1.5).round
end
return damagemult
end
end
I tried playing around with the damage multiplier part of the code, but nothing I did worked. Knock Off is listed in the correct move class of 0F0, Sticky Hold wasn't in play, and my Pokemon just held a Berry while the opponent did Knock Off. The Berry would be knocked off, but the move wasn't any more powerful.
Any ideas are appreciated. Thanks!