battle factory

This commit is contained in:
infinitefusion
2021-07-24 21:58:08 -04:00
parent cd8e190430
commit 4f751ee39b
5 changed files with 45 additions and 8 deletions

View File

@@ -507,13 +507,21 @@ class CustomTilemap
elsif $PokemonGlobal.bridge > 0 && terrain_tag_data.bridge
spriteZ = 1
else
spriteZ = (priority==0) ? 0 : ypos+priority*32+32
spriteZ = calculate_sprite_priority(priority,ypos)
end
sprite.z = spriteZ
count += 2
return count
end
def calculate_sprite_priority(priority,ypos)
begin
return (priority==0) ? 0 : ypos+priority*32+32
rescue
return 0
end
end
def refresh_flash
if @flash_data && !@flash
@flash = CustomTilemapSprite.new(viewport)