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:
Maruno17
2021-04-17 19:32:54 +01:00
parent 4bc744e3fb
commit 4489cde044
25 changed files with 125 additions and 96 deletions

View File

@@ -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

View File

@@ -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)