lunariafantasia/Scripts/_.67.rb
2024-01-12 03:12:38 -06:00

122 lines
5.3 KiB
Ruby
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#==============================================================================
# ■ Game_Interpreter
#------------------------------------------------------------------------------
#  イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、
# Game_Troop クラス、Game_Event クラスの内部で使用されます。
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# ○ 追加フキダシアイコンの表示 ※ idは11以降を指定
# target -1 => プレイヤー 0 => 自イベント  それ以外はイベントID
#--------------------------------------------------------------------------
def b_icon(id, target = -1, wait = true)
character = get_character(target)
if character
character.balloon_id = id
Fiber.yield while character.balloon_id > 0 if wait
end
end
#--------------------------------------------------------------------------
# ○ 足踏みアニメのスクリプト上での操作 OFF
# target -1 => プレイヤー 0 => 自イベント  それ以外はイベントID
#--------------------------------------------------------------------------
def step_off(target = 0)
character = get_character(target)
character.step_off if character
end
#--------------------------------------------------------------------------
# ○ 透明化のスクリプト処理
#--------------------------------------------------------------------------
def toumei(target = 0, t = true)
$game_map.refresh if $game_map.need_refresh
character = get_character(target)
if character
character.transparent = t
character.through_on
end
end
#--------------------------------------------------------------------------
# ○ 向き変更のスクリプト処理
#--------------------------------------------------------------------------
def muki(target = 0, dir = 2)
$game_map.refresh if $game_map.need_refresh
character = get_character(target)
if character
character.set_direction(dir)
end
end
#--------------------------------------------------------------------------
# ○
#--------------------------------------------------------------------------
def alone?
$game_party.members.size == 1
end
end
#==============================================================================
# ■ Game_Character
#------------------------------------------------------------------------------
#  主に移動ルートなどの処理を追加したキャラクターのクラスです。Game_Player、
# Game_Follower、GameVehicle、Game_Event のスーパークラスとして使用されます。
#==============================================================================
class Game_Character < Game_CharacterBase
#--------------------------------------------------------------------------
# ○ 追加フキダシアイコンの表示 移動ルート用
#--------------------------------------------------------------------------
def b_icon(id)
self.balloon_id = id
end
#--------------------------------------------------------------------------
# ○
#--------------------------------------------------------------------------
def alone?
$game_party.members.size == 1
end
#--------------------------------------------------------------------------
# ○
#--------------------------------------------------------------------------
def step_off
@step_anime = false
moveto(@x, @y)
end
#--------------------------------------------------------------------------
# ○
#--------------------------------------------------------------------------
def ssc(type = "A", control = true)
end
end
#==============================================================================
# ■ Game_Event
#------------------------------------------------------------------------------
#  イベントを扱うクラスです。条件判定によるイベントページ切り替えや、並列処理
# イベント実行などの機能を持っており、Game_Map クラスの内部で使用されます。
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# ○
#--------------------------------------------------------------------------
def ssc(type = "A", control = true)
key = [@map_id, @id, type]
$game_self_switches[key] = control
end
end
#==============================================================================
# ■ Game_CharacterBase
#------------------------------------------------------------------------------
#  キャラクターを扱う基本のクラスです。全てのキャラクターに共通する、座標やグ
# ラフィックなどの基本的な情報を保持します。
#==============================================================================
class Game_CharacterBase
#--------------------------------------------------------------------------
# ○
#--------------------------------------------------------------------------
def through_on
@through = true
end
end