Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # * Class Skin/System Add-on
- # dsiver144
- # re-activate common event of class's current skin
- # - Put this below all of card skin script.
- #-------------------------------------------------------------------------------
- class Scene_ClassChoosing
- #-------------------------------------------------------------------------
- # * new method: on_class_confirm_ok
- #-------------------------------------------------------------------------
- def on_class_confirm_ok
- @window_confirm.close
- @window_confirm.deactivate
- while @sprite_black.opacity > 0
- @sprite_black.opacity -= 5
- Graphics.update
- @window_confirm.update
- end
- if $game_system.current_class
- class_data = CLASSES[$game_system.current_class]
- $game_switches[class_data[:switch_id]] = false
- end
- $game_system.current_class = @window_classcommand.current_class_id
- class_data = CLASSES[$game_system.current_class]
- $game_switches[class_data[:switch_id]] = true
- $game_actors[1].change_class(class_data[:class_id])
- $game_system.current_class = @window_classcommand.current_class_id
- @window_classcommand.activate
- deck_to_coll
- # --- Addtional to Class Skin System -------
- class_id = $game_system.current_class
- skin_id = $game_system.leader_current_card_skin[class_id]
- if skin_id != 0
- skin_data = DSIVER144::CARD_SKIN_SYSTEM::LEADER_SKINS[class_id][skin_id]
- if skin_data
- $game_switches[skin_data[:switch_id]] = true
- $game_temp.reserve_common_event(skin_data[:common_ev_id])
- end
- end
- # ------------------------------------------
- SceneManager.goto(Scene_Deck)
- end
- end # Scene_ClassChoosing
- class Window_CardLeadSkinList
- #--------------------------------------------------------------------------
- # * set_new_skin
- #--------------------------------------------------------------------------
- def set_new_skin
- old_hash = LEADER_SKINS[@class_id][$game_system.leader_current_card_skin[@class_id]]
- if old_hash
- $game_switches[old_hash[:switch_id]] = false
- end
- if $game_system.leader_card_skins[@class_id].include?(current_skin_id) || current_skin_id == 0
- $game_system.leader_current_card_skin[@class_id] = current_skin_id
- if current_hash_data
- $game_switches[current_hash_data[:switch_id]] = true
- $game_temp.reserve_common_event(current_hash_data[:common_ev_id])
- end
- if old_hash && current_skin_id == 0
- $game_temp.reserve_common_event(old_hash[:common_ev_id])
- end
- Sound.play_ok
- refresh
- else
- Sound.play_buzzer
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement