DP Research Thread #3 ("Newer")

X-Act

np: Biffy Clyro - Shock Shock
is a Site Content Manager Alumnusis a Programmer Alumnusis a Smogon Discord Contributor Alumnusis a Top Researcher Alumnusis a Top CAP Contributor Alumnusis a Top Tiering Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
I was playing around with some internal Pokemon workings, and I noticed that the Happiness number is between 0 and 255. This was something that I already knew, but now it kinda caught my eye a little more.

Well, I divided 255 by 5, getting 51, and multiplied 51 by 2, getting 102.

102.

102 reminded me of the maximum Base Power of Return, which works with the maximum happiness of 255!

I searched the internet about it, and this guy claims to have the following formulae for Return and Frustration in Pokemon Sapphire:

Return Base Power Formula:

INT ( Happiness Points / 2.5 )
Haha, that's exactly like I did.

So here are the possible Base Power formulae for Return and Frustration:

Return Base Power = floor(Happiness x 0.4)

Frustration Base Power = 102 - floor(Happiness x 0.4)

Note that the above two formulae are not set in stone, and research must be done to confirm them.

Also, the same guy has a formula for Flail and Reversal:

This takes 2 parts. We start like this:

Current HP * 48 / Total HP

Here you can ignore BODMAS :D. We'll say we have a Pokémon
with 17 HP out of 247:

17 * 48 / 247

48/247=0.194

17 * 0.194

17*0.194=3.3


That's the first part of the formula. Here's the second.
This is more a thing of X=Y If Z=W.

You take the result and compare it to this chart:

---------------------------
} Result {---} Base Power {
---------------------------
} 0-1 {---} 200 {
} 2-4 {---} 150 {
} 5-9 {---} 100 {
} 10-16 {---} 80 {
} 17-32 {---} 40 {
} 33-48 {---} 20 {
---------------------------
I don't know if this corresponds to what Peterko found.

EDIT: They don't correspond at all. So it seems like either this guy's information is wrong, or that Flail/Reversal have changed in DP.
 
Metronome info, and clarifications on base damage of moves

I have figured out how Metronome and some new moves with variable base damage work. Here's how I now word my moves in my attack list:

Metronome:

Uses a random move other than the following: Assist, Chatter, Copycat, Counter, Covet, Destiny Bond, Detect, Endure, Feint, Focus Punch, Follow Me, Helping Hand, Me First, Metronome, Mimic, Mirror Coat, Mirror Move, Protect, Sketch, Sleep Talk, Snatch, Struggle, Switcheroo, Thief, Trick, or any move user knows. Doesn't choose a move that the user can't choose for use because of Disable, Encore, Gravity, Heal Block, or Torment.

Punishment:

This attack's power is equal to 60+(20*X), or 200, whichever is less, where X is the total of all of the target's current stat stages that are greater than 0.

Gyro Ball:

This attack's power is equal to int((the target's current Speed*25)/max(user's current Speed,1))+1, or 150, whichever is less.

Wring Out:

This attack's power is equal to int((the target's current HP)*120/max(1,the target's maximum HP))+1.

Gastro Acid:

During effect, effects from the target's ability are not applied. Effect ends when the target leaves the battle (except Baton Pass). Fails if the target's ability is Multitype.
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
Oh my goodness! Peter Occil, a researcher I recognize from some very old posts at Azure Heights, has come to grace Smogon with his work.

I am looking forward to hearing more of what you might have uncovered with the insight you seem to have of the game's inner workings.

EDIT: Speaking of Azure Heights, looking through the old posts I see some potential topics of research to look into when I'm reunited with my DS. Here's one.
 

Peterko

Never give up!
is a Top Researcher Alumnusis a Contributor Alumnus
my obligatory question when looking at your RS in-depth guides about my almost obsessive desire to know the % of some items

you say
quick attack = 20%
brightpowder = 0.9 accuracy (which means 10% lower)
lax incense = 0.95 accuracy (5%)
focus band = 10%
king´s rock = 10%

are these numbers rounded down or exact? do they work with a /256 or /100 RNG?
are you absolutely sure they´re straight from the code?
have you searched for them in DP yet?


EDIT: trump card is identical to our research result

WTH why is it still wrong in the move analysis topic?

[NAME]
Trump Card
[SHORT DESC]
Does more damage when this move has fewer PP.
[LONG DESC]
This move does varying amounts of damage depending on the amount of PP this move has when it is used. Estimated power values are as follows: 5-8 PP - 35-40BP; 4 PP - 45-50BP; 3 PP - 55-60BP; 2 PP - 75BP; 1 PP - 190BP.

Trump Card:
5 PP : 40 BP
4 PP : 50 BP
3 PP : 60 BP
2 PP : 80 BP
1 PP : 200 BP
 

Team Rocket Elite

Data Integration Thought Entity
is a Top Researcher Alumnus
The formula for Gyro Ball and Wring Out's power is slightly different from the ones we got from testing. Are you sure there's no "+ 1" at the end of those two formulae?

Edit: Regarding Theif flinching using a stolen King's Rock, it probably still works. It's similar to how U-Turning to a Pokemon with King's Rock can make your opponent flinch.
 
Thank you for remembering me. In the Advance Generation, I have already gained plenty of insight regarding the battle system, and I could even implement a working battle system for the third generation all on my own. But the third generation is not really the topic here.

Now I was just able to clarify Trump Card behavior. Please note that the effect is calculated after PP is reduced from Trump Card, both naturally and due to Pressure.

If this attack has 0 PP, this attack's base damage is 200.
If this attack has 1 PP, this attack's base damage is 80.
If this attack has 2 PP, this attack's base damage is 60.
If this attack has 3 PP, this attack's base damage is 50.
If this attack has 4 or more PP, this attack's base damage is 40.
 

Boa1891

Ninja Researcher
is a Researcher Alumnus
Who wants to test those metronome moves with sleep talk/assist? I have a feeling the list is similar...
 

X-Act

np: Biffy Clyro - Shock Shock
is a Site Content Manager Alumnusis a Programmer Alumnusis a Smogon Discord Contributor Alumnusis a Top Researcher Alumnusis a Top CAP Contributor Alumnusis a Top Tiering Contributor Alumnusis a Top Contributor Alumnusis a Smogon Media Contributor Alumnusis an Administrator Alumnus
The cool thing is that we managed to get to the same exact formulae as Poccil did. :) Even for Trump Card.

Poccil, can you by any chance check the formulae for Flail/Reversal and for Return/Frustration? Thanks.
 
Completely utterly off topic, but hey poccil. Seems we both visit Smogon.

ON TOPIC: What happens if you have a Smeargle with Conversion and Roost, who uses Conversion, becomes pure Flying type, and then uses roost, removing the Flying part. Does it become the first ever ??? type? I thought the idea up when I was thinking of ways to test the weaknesses/resists of ??? types without hacking.
 
Can someone find out what happens when a Pokemon with 0 Speed (hacked) uses Gyro Ball? Will the game.....divide by zero?....That's impossible.
 
No, it would just end up as 0, as 0 fits into x number 0 times. That is how dividing by 0 works. Of course, it would still be best to test it, just in case.
 
I thought 0/0 was possible... the reason no number/0 is possible is that no number times 0 gives you that number back, but in the case of 0/0 = 0, it's possible because 0 x 0 does in fact equal 0.
 

Mario With Lasers

Self-proclaimed NERFED king
is a Forum Moderator Alumnusis a CAP Contributor Alumnus
I'm not going to bring that four-leaves site into this discussion.

As far as I know, x/0 = Impossible, but isn't some strange situation where 0/0 = Indeterminate, or something like that?
 

Boa1891

Ninja Researcher
is a Researcher Alumnus
This isn't the place to discuss math not pertaining to Pokémon even if you're right about never being able to divide by 0 (which you are by a long shot).

I'll test that if I ever get the chance, but it's really not necessary. It'll either crash the game, max the power, or do something weird like 0 power (since it would have no number returned?). It's funny, I had just thought about that earlier since I was thinking about the Shoddy bug with negative EVs, and I wondered how it would handle dividing by 0. XD
 
Poccil, can you by any chance check the formulae for Flail/Reversal and for Return/Frustration? Thanks.
For Flail and Reversal, here's what I found out some time ago and confirmed today. [10/22/12: Updated]

This attack's power is 200 if N is less than 2, 150 if N is 2 through 5, 100 if N is 6 through 12, 80 if N is 13 through 21, 40 if N is 22 through 42, or 20 if N is 43 or greater, where N is equal to (user's current HP * 64 / user's maximum HP), rounded down.

For Return and Frustration, I could confirm that the formula is int((User's happiness)*2/5) and int((255-User's happiness)*2/5) respectively.

From what I could discover from the Sleep Talk routine, here is how I word Sleep Talk's effect. [10/22/12: Updated]

Uses a random move other than the following: Assist, Chatter, Copycat, Counter, Covet, Destiny Bond, Detect, Endure, Feint, Focus Punch, Follow Me, Helping Hand, Me First, Metronome, Mimic, Mirror Coat, Mirror Move, Protect, Sketch, Sleep Talk, Snatch, Struggle, Switcheroo, Thief, Trick, or any move user knows. Doesn't choose a move that the user can't choose for use because of Disable, Encore, Gravity, Heal Block, or Torment.
 

obi

formerly david stone
is a Site Content Manager Alumnusis a Programmer Alumnusis a Senior Staff Member Alumnusis a Smogon Discord Contributor Alumnusis a Researcher Alumnusis a Top Contributor Alumnusis a Battle Simulator Moderator Alumnus
For Flail and Reversal, here's what I found out some time ago and confirmed today.

N = int(User's current HP * 64 / User's total HP)

Value of N: Base Damage
0-1: 200
2-5: 150
6-12: 100
13-21: 80
22-42: 40
43-64: 20

(No, there is no +1 in the formula above, though N is adjusted to 1 if it equals 0.)
So in terms of %, the breakpoints are basically
3.1% HP and less is 200 power
9.3% HP and less is 150 power
20.3% HP and less is 100 power
34.3% HP and less is 80 power
67.1% HP and less is 40 power
100% HP and less is 20 power

Except there may be slight inaccuracies if you use these % instead of the above formula due to rounding (maybe).


Also is there a reason most formulae I see in Pokemon do that whole current HP * Number / max HP, instead of Number * current HP / max HP? I think the second way of writing is better because you combine the two HPs instead of splitting them, and that can be written as Number * % HP, and you don't even mess up due to rounding.
 

Team Rocket Elite

Data Integration Thought Entity
is a Top Researcher Alumnus
So in terms of %, the breakpoints are basically
5.5% HP and less is 200 power
9.3% HP and less is 150 power
20.3% HP and less is 100 power
34.3% HP and less is 80 power
67.1% HP and less is 40 power
100% HP and less is 20 power


First line is off. Should be 3.1% ont 5.5%. Also if it's exactly on the border, it goes to the lower power. Exactly 3.1% is 150 power. Exactly 9.3% is 100 power and so on.
 
It's funny, I had just thought about that earlier since I was thinking about the Shoddy bug with negative EVs, and I wondered how it would handle dividing by 0. XD
One of the first things I did to test the negative EV bug in Shoddy was to use Gyro Ball. Sadly with 0, or even negative speed, it seemed Gyro ball was set to maximum power, with no obscene damage seen1
 

Team Rocket Elite

Data Integration Thought Entity
is a Top Researcher Alumnus
Under normal circumstances, can speed go down to 0? Lower speed 6 times, Paralyzed, holding Macho Brace and speed is orignally 31 or less.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top