Events.onStepTakenFieldMovement+=proc {|sender,e|
event = e[0] # Get the event affected by field movement
thistile = $MapFactory.getRealTilePos(event.map.map_id,event.x,event.y)
map = $MapFactory.getMap(thistile[0])
sootlevel = -1
for i in [2, 1, 0]
tile_id = map.data[thistile[1],thistile[2],i]
next if tile_id==nil
if map.terrain_tags[tile_id] && map.terrain_tags[tile_id]==PBTerrain::SootGrass
sootlevel = i
break
end
end
if sootlevel>=0 && hasConst?(PBItems,:SOOTSACK)
$PokemonGlobal.sootsack = 0 if !$PokemonGlobal.sootsack
# map.data[thistile[1],thistile[2],sootlevel]=0
if event==$game_player && $PokemonBag.pbHasItem?(:SOOTSACK)
$PokemonGlobal.sootsack += 1
end
# $scene.createSingleSpriteset(map.map_id)
end
}