Merge pull request #2 from Marin-MK/master

Bug Fixes
This commit is contained in:
Maruno17
2020-09-05 16:25:10 +01:00
committed by GitHub
6 changed files with 25 additions and 23 deletions

View File

@@ -65,7 +65,7 @@ class PokeBattle_Battler
end
#=============================================================================
#
#
#=============================================================================
def pbBeginTurn(choice)
# Cancel some lingering effects which only apply until the user next moves
@@ -255,7 +255,7 @@ class PokeBattle_Battler
end
@battle.lastMoveUsed = move.id # For Copycat
@battle.lastMoveUser = @index # For "self KO" battle clause to avoid draws
@battle.successStates[@index].useState = 1 # Battle Arena - assume failure
@battle.successStates[@index].useState = 1 # Battle Arena - assume failure
# Find the default user (self or Snatcher) and target(s)
user = pbFindUser(choice,move)
user = pbChangeUser(choice,move,user)
@@ -360,7 +360,7 @@ class PokeBattle_Battler
end
# Protean
if user.hasActiveAbility?(:PROTEAN) && !move.callsAnotherMove? && !move.snatched
if user.pbHasOtherType?(moveType) && !PBTypes.isPseudoType?(move.calcType)
if user.pbHasOtherType?(move.calcType) && !PBTypes.isPseudoType?(move.calcType)
@battle.pbShowAbilitySplash(user)
user.pbChangeTypes(move.calcType)
typeName = PBTypes.getName(move.calcType)

View File

@@ -255,7 +255,7 @@ class PokeBattle_Move
target.damageState.calcDamage = damage
end
def pbCalcDamageMultipliers(user,target,numTargets,baseDmg,type,multipliers)
def pbCalcDamageMultipliers(user,target,numTargets,type,baseDmg,multipliers)
# Global abilities
if (@battle.pbCheckGlobalAbility(:DARKAURA) && isConst?(type,PBTypes,:DARK)) ||
(@battle.pbCheckGlobalAbility(:FAIRYAURA) && isConst?(type,PBTypes,:FAIRY))
@@ -488,4 +488,4 @@ class PokeBattle_Move
user.pbOwnSide.effects[PBEffects::Rainbow]>0
return ret
end
end
end

View File

@@ -656,7 +656,7 @@ BattleHandlers::MoveImmunityTargetAbility.add(:SOUNDPROOF,
end
battle.pbHideAbilitySplash(target)
next true
}
)
@@ -2239,7 +2239,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:FOREWARN,
# Counter, Mirror Coat, Metal Burst
power = 120 if ["071","072","073"].include?(moveData[MOVE_FUNCTION_CODE])
# Sonic Boom, Dragon Rage, Night Shade, Endeavor, Psywave,
# Return, Frustration, Crush Grip, Gyro Ball, Hidden Power,
# Return, Frustration, Crush Grip, Gyro Ball, Hidden Power,
# Natural Gift, Trump Card, Flail, Grass Knot
power = 80 if ["06A","06B","06D","06E","06F",
"089","08A","08C","08D","090",
@@ -2504,4 +2504,4 @@ BattleHandlers::RunFromBattleAbility.add(:RUNAWAY,
proc { |ability,battler|
next true
}
)
)