Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

#1
January 12th, 2013 (6:45 AM).
 WinterKirby Join Date: Dec 2012 Age: 5 Gender: Male Nature: Mild Posts: 152
I'm trying to implement a move effect where the move has more power when its at full PP, and the power goes down according to the amount of PP.

What I want should be something like:

Code:
baseDamage = (ppLeft/maxPP)*200
But... I have no idea what I'm doing. Here's what I actually have:

Code:
class PokeBattle_Move_13A < PokeBattle_Move
def pbBaseDamage(basedmg,attacker,opponent)
dmgs=[40,80,120,160,200]
ppleft=[@pp,4].min
basedmg=dmgs[ppleft]
return basedmg
end
end
__________________
X/Y Friend Code: 1349-5852-1728 | Pinkie | Flying | Hoot-Hoot, Pidgey, and Tropius

#2
January 12th, 2013 (10:11 AM).
 Maruno Lead Dev of Pokémon Essentials Join Date: Jan 2008 Location: England Posts: 5,185
That's a very simple calculation. You've even already given it. I really don't know what's stopping you from doing this yourself.

Code:
basedmg=((@pp+1)/@totalpp)*200
That +1 is because PP is subtracted from the move before it is used. This is the only factor you might miss, but looking at Trump Card, why does it define a power for a @pp of 0 (200) and not for a @pp of 5? Answer: PP was already subtracted. The clues are all there.

It's an overpowered move anyway. 100+ power for at least 4 uses (by using PP Max, assuming the move has 5PP) with no drawback?
__________________

| Downloads | Tutorials | Fangames |
| All Animations Project |

#3
January 12th, 2013 (11:22 AM).
 WinterKirby Join Date: Dec 2012 Age: 5 Gender: Male Nature: Mild Posts: 152
Quote:
 Originally Posted by Maruno That's a very simple calculation. You've even already given it. I really don't know what's stopping you from doing this yourself. Code: basedmg=((@pp+1)/@totalpp)*200 That +1 is because PP is subtracted from the move before it is used. This is the only factor you might miss, but looking at Trump Card, why does it define a power for a @pp of 0 (200) and not for a @pp of 5? Answer: PP was already subtracted. The clues are all there. It's an overpowered move anyway. 100+ power for at least 4 uses (by using PP Max, assuming the move has 5PP) with no drawback?
Well its drawback is its distribution; Pokémon who get it won't be able to utilize it to its potential.
__________________
X/Y Friend Code: 1349-5852-1728 | Pinkie | Flying | Hoot-Hoot, Pidgey, and Tropius

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!