mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Added class Data::Ability and made all code use symbols for abilities instead of numbers. Also added class Data::Item but it's unused.
This commit is contained in:
@@ -634,14 +634,16 @@ class PokemonSummary_Scene
|
||||
[sprintf("%d",@pokemon.spdef),456,216,1,Color.new(64,64,64),Color.new(176,176,176)],
|
||||
[_INTL("Speed"),248,248,0,base,statshadows[PBStats::SPEED]],
|
||||
[sprintf("%d",@pokemon.speed),456,248,1,Color.new(64,64,64),Color.new(176,176,176)],
|
||||
[_INTL("Ability"),224,284,0,base,shadow],
|
||||
[PBAbilities.getName(@pokemon.ability),362,284,0,Color.new(64,64,64),Color.new(176,176,176)],
|
||||
[_INTL("Ability"),224,284,0,base,shadow]
|
||||
]
|
||||
# Draw ability name and description
|
||||
ability = @pokemon.ability
|
||||
if ability
|
||||
textpos.push([ability.name,362,284,0,Color.new(64,64,64),Color.new(176,176,176)])
|
||||
drawTextEx(overlay,224,316,282,2,ability.description,Color.new(64,64,64),Color.new(176,176,176))
|
||||
end
|
||||
# Draw all text
|
||||
pbDrawTextPositions(overlay,textpos)
|
||||
# Draw ability description
|
||||
abilitydesc = pbGetMessage(MessageTypes::AbilityDescs,@pokemon.ability)
|
||||
drawTextEx(overlay,224,316,282,2,abilitydesc,Color.new(64,64,64),Color.new(176,176,176))
|
||||
# Draw HP bar
|
||||
if @pokemon.hp>0
|
||||
w = @pokemon.hp*96*1.0/@pokemon.totalhp
|
||||
|
||||
@@ -268,6 +268,7 @@ class PokemonLoadScreen
|
||||
$scene = nil
|
||||
return
|
||||
end
|
||||
Data::Ability.load
|
||||
commands = []
|
||||
cmdContinue = -1
|
||||
cmdNewGame = -1
|
||||
|
||||
@@ -1415,8 +1415,9 @@ class PokemonStorageScene
|
||||
end
|
||||
imagepos.push(["Graphics/Pictures/Storage/overlay_lv",6,246])
|
||||
textstrings.push([pokemon.level.to_s,28,234,false,base,shadow])
|
||||
if pokemon.ability>0
|
||||
textstrings.push([PBAbilities.getName(pokemon.ability),86,306,2,base,shadow])
|
||||
ability = pokemon.ability
|
||||
if ability
|
||||
textstrings.push([ability.name,86,306,2,base,shadow])
|
||||
else
|
||||
textstrings.push([_INTL("No ability"),86,306,2,nonbase,nonshadow])
|
||||
end
|
||||
|
||||
@@ -219,8 +219,7 @@ Events.onStepTaken += proc { |_sender,_e|
|
||||
next if egg.eggsteps<=0
|
||||
egg.eggsteps -= 1
|
||||
for i in $Trainer.pokemonParty
|
||||
next if !isConst?(i.ability,PBAbilities,:FLAMEBODY) &&
|
||||
!isConst?(i.ability,PBAbilities,:MAGMAARMOR)
|
||||
next if !i.hasAbility?(:FLAMEBODY) && !i.hasAbility?(:MAGMAARMOR)
|
||||
egg.eggsteps -= 1
|
||||
break
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user