mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Fixed Rollout doing maximum damage on its first turn
This commit is contained in:
@@ -2403,18 +2403,19 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class PokeBattle_Move_0D3 < PokeBattle_Move
|
class PokeBattle_Move_0D3 < PokeBattle_Move
|
||||||
def pbBaseDamage(baseDmg,user,target)
|
def pbBaseDamage(baseDmg,user,target)
|
||||||
shift = (4-user.effects[PBEffects::Rollout]) # 0-4, where 0 is most powerful
|
shift = (5 - user.effects[PBEffects::Rollout]) # 0-4, where 0 is most powerful
|
||||||
|
shift = 0 if user.effects[PBEffects::Rollout] == 0 # For first turn
|
||||||
shift += 1 if user.effects[PBEffects::DefenseCurl]
|
shift += 1 if user.effects[PBEffects::DefenseCurl]
|
||||||
baseDmg = baseDmg << shift
|
baseDmg *= 2**shift
|
||||||
return baseDmg
|
return baseDmg
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbEffectAfterAllHits(user,target)
|
def pbEffectAfterAllHits(user,target)
|
||||||
if !target.damageState.unaffected && user.effects[PBEffects::Rollout]==0
|
if !target.damageState.unaffected && user.effects[PBEffects::Rollout] == 0
|
||||||
user.effects[PBEffects::Rollout] = 5
|
user.effects[PBEffects::Rollout] = 5
|
||||||
user.currentMove = @id
|
user.currentMove = @id
|
||||||
end
|
end
|
||||||
user.effects[PBEffects::Rollout] -= 1 if user.effects[PBEffects::Rollout]>0
|
user.effects[PBEffects::Rollout] -= 1 if user.effects[PBEffects::Rollout] > 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user