mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Fixed animations played by an event command being mispositioned, fixed Geomancy, removed $PokemonGlobal.playerID, tweaked player/bag object creation, overrode type effectiveness for Shadow moves, bug fixes
This commit is contained in:
@@ -65,8 +65,16 @@ class PokeBattle_Move
|
||||
tTypes = target.pbTypes(true)
|
||||
# Get effectivenesses
|
||||
typeMods = [Effectiveness::NORMAL_EFFECTIVE_ONE] * 3 # 3 types max
|
||||
tTypes.each_with_index do |type,i|
|
||||
typeMods[i] = pbCalcTypeModSingle(moveType,type,user,target)
|
||||
if moveType == :SHADOW
|
||||
if target.shadowPokemon?
|
||||
typeMods[0] = Effectiveness::NOT_VERY_EFFECTIVE_ONE
|
||||
else
|
||||
typeMods[0] = Effectiveness::SUPER_EFFECTIVE_ONE
|
||||
end
|
||||
else
|
||||
tTypes.each_with_index do |type,i|
|
||||
typeMods[i] = pbCalcTypeModSingle(moveType,type,user,target)
|
||||
end
|
||||
end
|
||||
# Multiply all effectivenesses together
|
||||
ret = 1
|
||||
|
||||
@@ -1649,7 +1649,8 @@ class PokeBattle_Move_14E < PokeBattle_TwoTurnMove
|
||||
@battle.pbDisplay(_INTL("{1} is absorbing power!",user.pbThis))
|
||||
end
|
||||
|
||||
def pbAttackingTurnEffect(user,target)
|
||||
def pbEffectGeneral(user)
|
||||
return if !@damagingTurn
|
||||
showAnim = true
|
||||
[:SPECIAL_ATTACK,:SPECIAL_DEFENSE,:SPEED].each do |s|
|
||||
next if !user.pbCanRaiseStatStage?(s,user,self)
|
||||
|
||||
@@ -131,10 +131,8 @@ module PokeBattle_BattleCommon
|
||||
battler.captured = false
|
||||
end
|
||||
battler.pbReset
|
||||
if trainerBattle?
|
||||
@decision = 1 if pbAllFainted?(battler.index)
|
||||
else
|
||||
@decision = 4 if pbAllFainted?(battler.index) # Battle ended by capture
|
||||
if pbAllFainted?(battler.index)
|
||||
@decision = (trainerBattle?) ? 1 : 4 # Battle ended by win/capture
|
||||
end
|
||||
# Modify the Pokémon's properties because of the capture
|
||||
if GameData::Item.get(ball).is_snag_ball?
|
||||
|
||||
@@ -60,8 +60,16 @@ class PokeBattle_AI
|
||||
tTypes = target.pbTypes(true)
|
||||
# Get effectivenesses
|
||||
typeMods = [Effectiveness::NORMAL_EFFECTIVE_ONE] * 3 # 3 types max
|
||||
tTypes.each_with_index do |type,i|
|
||||
typeMods[i] = pbCalcTypeModSingle(moveType,type,user,target)
|
||||
if moveType == :SHADOW
|
||||
if target.shadowPokemon?
|
||||
typeMods[0] = Effectiveness::NOT_VERY_EFFECTIVE_ONE
|
||||
else
|
||||
typeMods[0] = Effectiveness::SUPER_EFFECTIVE_ONE
|
||||
end
|
||||
else
|
||||
tTypes.each_with_index do |type,i|
|
||||
typeMods[i] = pbCalcTypeModSingle(moveType,type,user,target)
|
||||
end
|
||||
end
|
||||
# Multiply all effectivenesses together
|
||||
ret = 1
|
||||
|
||||
@@ -409,7 +409,7 @@ class PokeBattle_Scene
|
||||
return anim if anim
|
||||
# Actual animation not found, get the default animation for the move's type
|
||||
moveData = GameData::Move.get(moveID)
|
||||
target_data = moveData.pbTarget(@battle.battlers[idxUser])
|
||||
target_data = GameData::Target.get(moveData.target)
|
||||
moveType = moveData.type
|
||||
moveKind = moveData.category
|
||||
moveKind += 3 if target_data.num_targets > 1 || target_data.affects_foe_side
|
||||
|
||||
Reference in New Issue
Block a user