Created and implemented GameData::Type

This commit is contained in:
Maruno17
2020-12-12 21:26:46 +00:00
parent c8790bafc9
commit bc13517cb7
50 changed files with 698 additions and 784 deletions

View File

@@ -234,8 +234,8 @@ class PokeBattle_Move
oldHP = b.hp+b.damageState.hpLost
PBDebug.log("[Move damage] #{b.pbThis} lost #{b.damageState.hpLost} HP (#{oldHP}=>#{b.hp})")
effectiveness = 0
if PBTypes.resistant?(b.damageState.typeMod); effectiveness = 1
elsif PBTypes.superEffective?(b.damageState.typeMod); effectiveness = 2
if PBTypeEffectiveness.resistant?(b.damageState.typeMod); effectiveness = 1
elsif PBTypeEffectiveness.superEffective?(b.damageState.typeMod); effectiveness = 2
end
animArray.push([b,oldHP,effectiveness])
end
@@ -251,13 +251,13 @@ class PokeBattle_Move
#=============================================================================
def pbEffectivenessMessage(user,target,numTargets=1)
return if target.damageState.disguise
if PBTypes.superEffective?(target.damageState.typeMod)
if PBTypeEffectiveness.superEffective?(target.damageState.typeMod)
if numTargets>1
@battle.pbDisplay(_INTL("It's super effective on {1}!",target.pbThis(true)))
else
@battle.pbDisplay(_INTL("It's super effective!"))
end
elsif PBTypes.notVeryEffective?(target.damageState.typeMod)
elsif PBTypeEffectiveness.notVeryEffective?(target.damageState.typeMod)
if numTargets>1
@battle.pbDisplay(_INTL("It's not very effective on {1}...",target.pbThis(true)))
else
@@ -326,7 +326,7 @@ class PokeBattle_Move
# regardless of its calculated type. Hence the following two lines of
# code.
moveType = nil
moveType = getID(PBTypes,:NORMAL) if @function=="090" # Hidden Power
moveType = :NORMAL if @function=="090" # Hidden Power
if physicalMove?(moveType)
target.effects[PBEffects::Counter] = damage
target.effects[PBEffects::CounterTarget] = user.index