- #============================================================================== 
- # 区域优先级 V1.0 
- #------------------------------------------------------------------------------ 
- #  - 到达某个区域后角色Z值改变 By Mccf 
- #------------------------------------------------------------------------------ 
- #  通用配置模块   
- #============================================================================== 
- module RegionTypeZ 
-   #-------------------------------------------------------------------------- 
-   # ● 设置区域(0为默认) 
-   #-------------------------------------------------------------------------- 
-   ZTYPES_SET = { 
-     # 当人物到达8号区域时Z值变为150 
-     8 => 150 
-     # 当人物到达9号区域时Z值变为250 
-     9 => 250 
-   } 
- end 
- #------------------------------------------------------------------------------ 
- #  配置模块结束   
- #============================================================================== 
-   
- #============================================================================== 
- # ■ Game_CharacterBase 
- #------------------------------------------------------------------------------ 
- #  管理地图人物的基本类。是所有地图人物类的共通父类。拥有坐标、图片等基本信息。 
- #============================================================================== 
-   
- class Game_CharacterBase 
-   #-------------------------------------------------------------------------- 
-   # ● 获取画面 Z 坐标 
-   #-------------------------------------------------------------------------- 
-   alias ztype_screen_z screen_z 
-   def screen_z 
-     RegionTypeZ::ZTYPES_SET.each do |key, value| 
-       if $game_map.region_id(real_x.floor, real_y.floor) == key 
-         return value 
-       elsif $game_map.region_id(real_x.floor, real_y.ceil) == key 
-         return value 
-       elsif $game_map.region_id(real_x.ceil, real_y.ceil) == key 
-         return value 
-       elsif $game_map.region_id(real_x.ceil, real_y.floor) == key 
-         return value 
-       end 
-     end 
-     return ztype_screen_z 
-   end 
- end