mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Removed dual functionalities of Ability and Ball properties in trainers.txt, abolished $BallTypes, removed support for tm.txt
This commit is contained in:
@@ -1,50 +1,3 @@
|
||||
$BallTypes = {
|
||||
0 => :POKEBALL,
|
||||
1 => :GREATBALL,
|
||||
2 => :SAFARIBALL,
|
||||
3 => :ULTRABALL,
|
||||
4 => :MASTERBALL,
|
||||
5 => :NETBALL,
|
||||
6 => :DIVEBALL,
|
||||
7 => :NESTBALL,
|
||||
8 => :REPEATBALL,
|
||||
9 => :TIMERBALL,
|
||||
10 => :LUXURYBALL,
|
||||
11 => :PREMIERBALL,
|
||||
12 => :DUSKBALL,
|
||||
13 => :HEALBALL,
|
||||
14 => :QUICKBALL,
|
||||
15 => :CHERISHBALL,
|
||||
16 => :FASTBALL,
|
||||
17 => :LEVELBALL,
|
||||
18 => :LUREBALL,
|
||||
19 => :HEAVYBALL,
|
||||
20 => :LOVEBALL,
|
||||
21 => :FRIENDBALL,
|
||||
22 => :MOONBALL,
|
||||
23 => :SPORTBALL,
|
||||
24 => :DREAMBALL,
|
||||
25 => :BEASTBALL
|
||||
}
|
||||
|
||||
def pbBallTypeToItem(ball_type)
|
||||
ret = GameData::Item.try_get($BallTypes[ball_type])
|
||||
return ret if ret
|
||||
ret = GameData::Item.try_get($BallTypes[0])
|
||||
return ret if ret
|
||||
return GameData::Item.get(:POKEBALL)
|
||||
end
|
||||
|
||||
def pbGetBallType(ball)
|
||||
ball = GameData::Item.try_get(ball)
|
||||
$BallTypes.keys.each do |key|
|
||||
return key if ball == $BallTypes[key]
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
@@ -86,9 +86,6 @@ module PokeBattle_BallAnimationMixin
|
||||
|
||||
def addBallSprite(ballX, ballY, poke_ball)
|
||||
file_path = sprintf("Graphics/Battle animations/ball_%s", poke_ball)
|
||||
if !pbResolveBitmap(file_path)
|
||||
file_path = sprintf("Graphics/Battle animations/ball_%02d", pbGetBallType(poke_ball).id_number)
|
||||
end
|
||||
ball = addNewSprite(ballX, ballY, file_path, PictureOrigin::Center)
|
||||
@ballSprite = @pictureSprites.last
|
||||
if @ballSprite.bitmap.width >= @ballSprite.bitmap.height
|
||||
@@ -206,9 +203,6 @@ module PokeBattle_BallAnimationMixin
|
||||
|
||||
def ballSetOpen(ball, delay, poke_ball)
|
||||
file_path = sprintf("Graphics/Battle animations/ball_%s_open", poke_ball)
|
||||
if !pbResolveBitmap(file_path)
|
||||
file_path = sprintf("Graphics/Battle animations/ball_%02d_open", pbGetBallType(poke_ball).id_number)
|
||||
end
|
||||
ball.setName(delay, file_path)
|
||||
if @ballSprite && @ballSprite.bitmap.width >= @ballSprite.bitmap.height
|
||||
ball.setSrcSize(delay, @ballSprite.bitmap.height / 2, @ballSprite.bitmap.height)
|
||||
@@ -217,9 +211,6 @@ module PokeBattle_BallAnimationMixin
|
||||
|
||||
def ballSetClosed(ball, delay, poke_ball)
|
||||
file_path = sprintf("Graphics/Battle animations/ball_%s", poke_ball)
|
||||
if !pbResolveBitmap(file_path)
|
||||
file_path = sprintf("Graphics/Battle animations/ball_%02d", pbGetBallType(poke_ball).id_number)
|
||||
end
|
||||
ball.setName(delay, file_path)
|
||||
if @ballSprite && @ballSprite.bitmap.width >= @ballSprite.bitmap.height
|
||||
ball.setSrcSize(delay, @ballSprite.bitmap.height / 2, @ballSprite.bitmap.height)
|
||||
|
||||
Reference in New Issue
Block a user