Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials

Notices
For all updates, view the main page.

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.



Reply
 
Thread Tools
  #1    
Old January 12th, 2013 (06:45 AM).
WinterKirby's Avatar
WinterKirby
 
Join Date: Dec 2012
Age: 2
Gender: Male
Nature: Mild
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

Reply With Quote
  #2    
Old January 12th, 2013 (10:11 AM).
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
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?
__________________
Reply With Quote
  #3    
Old January 12th, 2013 (11:22 AM).
WinterKirby's Avatar
WinterKirby
 
Join Date: Dec 2012
Age: 2
Gender: Male
Nature: Mild
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

Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 07:43 AM.