- 67
- Posts
- 4
- Years
- He/Him
- Seen Nov 16, 2023
ok so it works without giving me errors but my problem is the actual calculations don't work like it still does the same damage each time no matter how many times I get hit I have this under "def pbEffectsAfterHit"
# Boost Adaptation
if user.hasWorkingAbility(:ADAPTATION) && target.lastMoveUsed==thismove.id && !target.hasWorkingAbility(:MOLDBREAKER)
user.effects[PBEffects::Adaptation]+=1
else
user.effects[PBEffects::Adaptation]=0
end
and this in "Pokebattle_Move"
if opponent.hasWorkingAbility(:ADAPTATION)
adn=1-0.2[attacker.effects[PBEffects::Adaptation],5].min
finaldamagemult=(finaldamagemultadn).round
end
Anyone know what I'm doing wrong cause I feel I am so close
# Boost Adaptation
if user.hasWorkingAbility(:ADAPTATION) && target.lastMoveUsed==thismove.id && !target.hasWorkingAbility(:MOLDBREAKER)
user.effects[PBEffects::Adaptation]+=1
else
user.effects[PBEffects::Adaptation]=0
end
and this in "Pokebattle_Move"
if opponent.hasWorkingAbility(:ADAPTATION)
adn=1-0.2[attacker.effects[PBEffects::Adaptation],5].min
finaldamagemult=(finaldamagemultadn).round
end
Anyone know what I'm doing wrong cause I feel I am so close