IceGod64
In the Lost & Found bin!
- 624
- Posts
- 16
- Years
- Castelia City
- Seen Sep 26, 2021
In PokeBattle_Pokemon, append the following line to the attr_accessor section:
And now, in PokBattle_Move, replace the entire def pbIsCritical? with:
So, what's the point?
For the most part, Gen I's battle mechanics are indeed quite broken, and are undesirable to be used in a game - However, the critical hit probability, is quite an interesting exception. In Generation 1, Critical Hit Ratio is based on a Pokémon's base speed, rather than being a flat rate. Personally, I like this. The actual values, however, you may want to adjust. By default, Jolteon has a 25% chance of landing a critical hit, which is fine to me, but after using focue energy, his chance become over 100%. Moves with high critical hit ratios work similar, so you may want to alter the mechanics.
Part of the Gen 1 mechanic that I DIDN'T bring over however, is the bug where using Focus Energy Accidentally DIVIDES your chances of getting a crit by 4, not multiplies. Because I'd consider that a bug. If you really want to do that for some reason, you can change the Focus Energy line to this:
Code:
attr_reader(:baseStats) # Base Stats
Code:
def pbIsCritical?(attacker,opponent)
if !attacker.hasMoldBreaker
if opponent.hasWorkingAbility(:BATTLEARMOR) ||
opponent.hasWorkingAbility(:SHELLARMOR)
return false
end
end
return false if opponent.pbOwnSide.effects[PBEffects::LuckyChant]>0
return true if pbCritialOverride(attacker,opponent)
#A Jolteon is used. It's base speed stat is 130.
b=attacker.pokemon.baseStats #Get the stat array.
t = b[3]*100/512.round #Jolteon's default threshold is about 25%
t = b[3]*100/128.round if attacker.effects[PBEffects::FocusEnergy]>0
t = b[3]*100/64.round if hasHighCriticalRate?
#For Jolteon, Focus Energy or a high crit move both add up to more than 100%
if (attacker.inHyperMode? rescue false) && isConst?(self.type,PBTypes,:SHADOW)
t*4
end #Increased odds during hyper mode.
if attacker.hasWorkingItem(:STICK) &&
isConst?(attacker.species,PBSpecies,:FARFETCHD)
t*2
end
if attacker.hasWorkingItem(:LUCKYPUNCH) &&
isConst?(attacker.species,PBSpecies,:CHANSEY)
t*2
end
t*2 if attacker.hasWorkingAbility(:SUPERLUCK)
t*1.5 if attacker.hasWorkingItem(:RAZORCLAW)
t*1.5 if attacker.hasWorkingItem(:SCOPELENS)
return true if t>=rand(100)
return false
end
For the most part, Gen I's battle mechanics are indeed quite broken, and are undesirable to be used in a game - However, the critical hit probability, is quite an interesting exception. In Generation 1, Critical Hit Ratio is based on a Pokémon's base speed, rather than being a flat rate. Personally, I like this. The actual values, however, you may want to adjust. By default, Jolteon has a 25% chance of landing a critical hit, which is fine to me, but after using focue energy, his chance become over 100%. Moves with high critical hit ratios work similar, so you may want to alter the mechanics.
Part of the Gen 1 mechanic that I DIDN'T bring over however, is the bug where using Focus Energy Accidentally DIVIDES your chances of getting a crit by 4, not multiplies. Because I'd consider that a bug. If you really want to do that for some reason, you can change the Focus Energy line to this:
Code:
t = b[3]*100/2048.round if attacker.effects[PBEffects::FocusEnergy]>0
Last edited: