mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-25 15:55:59 +00:00
Tidied up semicolon use, refactored random dungeon generation code, fixed visual bug in Day Care debug screen
This commit is contained in:
@@ -434,11 +434,10 @@ MultipleForms.register(:AEGISLASH,{
|
||||
MultipleForms.register(:PUMPKABOO,{
|
||||
"getFormOnCreation" => proc { |pkmn|
|
||||
r = rand(100)
|
||||
if r<5; next 3 # Super Size (5%)
|
||||
elsif r<20; next 2 # Large (15%)
|
||||
elsif r<65; next 1 # Average (45%)
|
||||
end
|
||||
next 0 # Small (35%)
|
||||
next 3 if r < 5 # Super Size (5%)
|
||||
next 2 if r < 20 # Large (15%)
|
||||
next 1 if r < 65 # Average (45%)
|
||||
next 0 # Small (35%)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -171,9 +171,11 @@ class PokemonIconSprite < SpriteWrapper
|
||||
return 0 if @pokemon.fainted? # Fainted - no animation
|
||||
# ret is initially the time a whole animation cycle lasts. It is divided by
|
||||
# the number of frames in that cycle at the end.
|
||||
ret = Graphics.frame_rate/4 # Green HP - 0.25 seconds
|
||||
if @pokemon.hp<=@pokemon.totalhp/4; ret *= 4 # Red HP - 1 second
|
||||
elsif @pokemon.hp<=@pokemon.totalhp/2; ret *= 2 # Yellow HP - 0.5 seconds
|
||||
ret = Graphics.frame_rate/4 # Green HP - 0.25 seconds
|
||||
if @pokemon.hp<=@pokemon.totalhp/4 # Red HP - 1 second
|
||||
ret *= 4
|
||||
elsif @pokemon.hp<=@pokemon.totalhp/2 # Yellow HP - 0.5 seconds
|
||||
ret *= 2
|
||||
end
|
||||
ret /= @numFrames
|
||||
ret = 1 if ret<1
|
||||
|
||||
@@ -108,7 +108,8 @@ class PokemonStorage
|
||||
@unlockedWallpapers = [] if !@unlockedWallpapers
|
||||
for i in 0...papers.length
|
||||
next if !isAvailableWallpaper?(i)
|
||||
ret[0].push(papers[i]); ret[1].push(i)
|
||||
ret[0].push(papers[i])
|
||||
ret[1].push(i)
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user