mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 22:54:59 +00:00
Added Flags property to types, abilities, species and map metadata. Added LocationFlag evolution method.
This commit is contained in:
@@ -297,7 +297,7 @@ HiddenMoveHandlers::UseMove.add(:DIG,proc { |move,pokemon|
|
||||
#===============================================================================
|
||||
def pbDive
|
||||
return false if $game_player.pbFacingEvent
|
||||
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
||||
map_metadata = $game_map.metadata
|
||||
return false if !map_metadata || !map_metadata.dive_map_id
|
||||
move = :DIVE
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
@@ -408,8 +408,7 @@ HiddenMoveHandlers::CanUseMove.add(:DIVE,proc { |move,pkmn,showmsg|
|
||||
next false
|
||||
end
|
||||
else
|
||||
if !GameData::MapMetadata.exists?($game_map.map_id) ||
|
||||
!GameData::MapMetadata.get($game_map.map_id).dive_map_id
|
||||
if !$game_map.metadata&.dive_map_id
|
||||
pbMessage(_INTL("Can't use that here.")) if showmsg
|
||||
next false
|
||||
end
|
||||
@@ -431,8 +430,7 @@ HiddenMoveHandlers::UseMove.add(:DIVE,proc { |move,pokemon|
|
||||
break
|
||||
end
|
||||
else
|
||||
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
||||
dive_map_id = map_metadata.dive_map_id if map_metadata
|
||||
dive_map_id = $game_map.metadata&.dive_map_id
|
||||
end
|
||||
next false if !dive_map_id
|
||||
if !pbHiddenMoveAnimation(pokemon)
|
||||
@@ -460,8 +458,7 @@ HiddenMoveHandlers::UseMove.add(:DIVE,proc { |move,pokemon|
|
||||
#===============================================================================
|
||||
HiddenMoveHandlers::CanUseMove.add(:FLASH,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_FLASH,showmsg)
|
||||
if !GameData::MapMetadata.exists?($game_map.map_id) ||
|
||||
!GameData::MapMetadata.get($game_map.map_id).dark_map
|
||||
if !$game_map.metadata&.dark_map
|
||||
pbMessage(_INTL("Can't use that here.")) if showmsg
|
||||
next false
|
||||
end
|
||||
@@ -501,8 +498,7 @@ HiddenMoveHandlers::CanUseMove.add(:FLY,proc { |move,pkmn,showmsg|
|
||||
pbMessage(_INTL("It can't be used when you have someone with you.")) if showmsg
|
||||
next false
|
||||
end
|
||||
if !GameData::MapMetadata.exists?($game_map.map_id) ||
|
||||
!GameData::MapMetadata.get($game_map.map_id).outdoor_map
|
||||
if !$game_map.metadata&.outdoor_map
|
||||
pbMessage(_INTL("Can't use that here.")) if showmsg
|
||||
next false
|
||||
end
|
||||
@@ -762,8 +758,7 @@ end
|
||||
|
||||
Events.onAction += proc { |_sender,_e|
|
||||
next if $PokemonGlobal.surfing
|
||||
next if GameData::MapMetadata.exists?($game_map.map_id) &&
|
||||
GameData::MapMetadata.get($game_map.map_id).always_bicycle
|
||||
next if $game_map.metadata&.always_bicycle
|
||||
next if !$game_player.pbFacingTerrainTag.can_surf_freely
|
||||
next if !$game_map.passable?($game_player.x,$game_player.y,$game_player.direction,$game_player)
|
||||
pbSurf
|
||||
@@ -779,8 +774,7 @@ HiddenMoveHandlers::CanUseMove.add(:SURF,proc { |move,pkmn,showmsg|
|
||||
pbMessage(_INTL("It can't be used when you have someone with you.")) if showmsg
|
||||
next false
|
||||
end
|
||||
if GameData::MapMetadata.exists?($game_map.map_id) &&
|
||||
GameData::MapMetadata.get($game_map.map_id).always_bicycle
|
||||
if $game_map.metadata&.always_bicycle
|
||||
pbMessage(_INTL("Let's enjoy cycling!")) if showmsg
|
||||
next false
|
||||
end
|
||||
@@ -861,8 +855,7 @@ HiddenMoveHandlers::UseMove.add(:SWEETSCENT,proc { |move,pokemon|
|
||||
# Teleport
|
||||
#===============================================================================
|
||||
HiddenMoveHandlers::CanUseMove.add(:TELEPORT,proc { |move,pkmn,showmsg|
|
||||
if !GameData::MapMetadata.exists?($game_map.map_id) ||
|
||||
!GameData::MapMetadata.get($game_map.map_id).outdoor_map
|
||||
if !$game_map.metadata&.outdoor_map
|
||||
pbMessage(_INTL("Can't use that here.")) if showmsg
|
||||
next false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user