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

@@ -39,7 +39,7 @@ class PokeBattle_Move
@target = move.target
@priority = move.priority
@flags = move.flags
@calcType = -1
@calcType = nil
@powerBoost = false # For Aerilate, Pixilate, Refrigerate, Galvanize
@snatched = false
end
@@ -72,8 +72,9 @@ class PokeBattle_Move
# AI), so using @calcType here is acceptable.
def physicalMove?(thisType=nil)
return (@category==0) if MOVE_CATEGORY_PER_MOVE
thisType ||= @calcType if @calcType>=0
thisType = @type if !thisType
thisType ||= @calcType
thisType ||= @type
return true if !thisType
return !PBTypes.isSpecialType?(thisType)
end
@@ -81,8 +82,9 @@ class PokeBattle_Move
# AI), so using @calcType here is acceptable.
def specialMove?(thisType=nil)
return (@category==1) if MOVE_CATEGORY_PER_MOVE
thisType ||= @calcType if @calcType>=0
thisType = @type if !thisType
thisType ||= @calcType
thisType ||= @type
return false if !thisType
return PBTypes.isSpecialType?(thisType)
end