sq333333 发表于 2016-9-11 21:41 这个真不是我改的 |
这个游戏是我弄得.... 我把系统脚本的道具项 删掉了 你复制一个系统脚本就恢复了啊 话说技能脚本被你改的一塌糊涂..... |
neverstop 发表于 2016-9-2 12:01 额额 我换个工程整好了好了 |
h2195458940 发表于 2016-9-2 15:11 Sideview 管理 #============================================================================== # ■ Sideview Ver100 #------------------------------------------------------------------------------ # 这是管理的横版战斗的类。 #============================================================================== class SideView #-------------------------------------------------------------------------- # ● 公开实例变数 #-------------------------------------------------------------------------- attr_accessor :x # 画面X坐标 attr_accessor :y # 画面Y坐标 attr_accessor :z # 画面Z坐标 attr_accessor :h # 高度坐标 attr_accessor :j # 跳转坐标 attr_accessor :c # 曲线坐标 attr_accessor :ox # 横原点 attr_accessor :oy # 纵原点 attr_accessor :oy_adjust # 纵原点補正 attr_accessor :angle # 回转角度 attr_accessor :zoom_x # 横向放大率 attr_accessor :zoom_y # 纵向放大率 attr_accessor :pattern_w # 单元横位置(矩形内) attr_accessor :pattern_h # 单元纵位置(矩形内) attr_accessor :sx # 单元横位置(画像全体) attr_accessor :sy # 单元纵位置(画像全体) attr_accessor :pattern_type # 单元更新类型 attr_accessor :pattern_time # 单元更新间隔 attr_accessor :graphic_name # 战斗画像文件名 attr_accessor :graphic_file_index # 战斗画像文件名名指数 attr_accessor :graphic_index # 战斗画像指数 attr_accessor :cw # 单元横矩形 attr_accessor :ch # 单元纵矩形 attr_accessor :shadow_visible # 影表示 attr_accessor :weapon_visible # 武器表示 attr_accessor :wait # 操作等待时间如下 attr_accessor :weapon_index # 正在显示武器图像索引数组 attr_accessor :weapon_end # 武器动作结束动画 attr_accessor :force_action # 强制动作 attr_accessor :target_battler # 目标战斗消息 attr_accessor :second_targets # 第二个目标信息 attr_accessor :m_a_targets # 动画放飞目标信息 attr_accessor :individual_targets # 个别处理目标战斗信息 attr_accessor :effect_data # 效果数据 attr_accessor :anime_id # 动画ID排列 attr_accessor :anime_move_id # 跳过动画ID排列 attr_accessor :mirror # 反转标志 attr_accessor :opacity # 透明度 attr_accessor :opacity_data # 操作信息透明度 attr_accessor :set_damage # 战斗场景的伤害处理 attr_accessor :m_a_data # 动画放飞信息 attr_accessor :m_a_starter # 动画放飞开始目标信息 attr_accessor :action_end # 战斗场面的行动终了 attr_accessor :damage_anime_data # 伤害战斗动画数据 attr_accessor :anime_no_mirror # 战斗动画反转禁止标志 attr_accessor :anime_horming # 战斗动画的导航标志 attr_accessor :anime_camera_zoom # 战斗动画相机缩放配合的? attr_accessor :anime_plus_z # 战斗动画Z坐标补正 attr_accessor :derivation_skill_id # 技能派生ID attr_accessor :immortal # 不死之身的标志 attr_accessor :mirage # 残像数据 attr_accessor :balloon_data # 擦拭了数据 attr_accessor :timing # 另外战斗的时机数据 attr_accessor :timing_targets # 时机数据交给别的战斗 attr_accessor :color_set # 色调变更数据 attr_accessor :color # 色调数据 attr_accessor :change_up # 图像变更标志 attr_accessor :hit # 被攻击回合数 attr_accessor :add_state # 多次附加状的防止态表示标志 attr_accessor :counter_id # 反击时的技能ID attr_accessor :reflection_id # 魔法反射时的动画ID attr_accessor :result_damage # 回合终了时的HP变动数据 attr_accessor :active # 行动权 attr_accessor :anime_off # 战斗动画消去 attr_accessor :command_action # 指令动作标志 attr_accessor :base_x # 初期位置 X坐标 attr_accessor :base_y # 初期位置 Y坐标 attr_accessor :base_h # 初期位置 高度坐标 attr_accessor :max_pattern_w # 单元的横分割数 attr_accessor :max_pattern_h # 单元的纵分割数 attr_reader :collapse # 崩溃标志 attr_reader :picture # 图片表示标志 #-------------------------------------------------------------------------- # ● 对象初期化 #-------------------------------------------------------------------------- def initialize(battler) @battler = battler reset end #-------------------------------------------------------------------------- # ● 初期化 #-------------------------------------------------------------------------- def reset @x = 0 @y = 0 @z = 0 @h = 0 @j = 0 @c = 0 @jump = [] @curve = [] @ox = 0 @oy = 0 @oy_adjust = 0 @z_plus = 0 @move_time = 0 @Angle = 0 @angle_time = 0 @zoom_x = 1 @zoom_y = 1 @zoom_time = 0 @pattern_w = 0 @pattern_h = 0 @sx = 0 @sy = 0 @pattern_type = 0 @pattern_time = 0 @pattern_rest_time = 0 @graphic_name = "" @graphic_file_index = "" @graphic_index = 0 @cw = 0 @ch = 0 @shadow_visible = false @weapon_visible = true @Wait = 0 @weapon_index = [] @weapon_end = true @full_action = [] @action = [] @force_action = "" @target_battler = [] @second_targets = [] @individual_targets = [] @m_a_targets = [] @effect_data = [] @anime_id = [] @anime_move_id = [] @opacity = 255 @opacity_data = [] @set_damage = false @m_a_data = [] @m_a_starter = [] @action_end = false @damage_anime_data = [] @anime_no_mirror = false @anime_horming = false @anime_camera_zoom = false @anime_plus_z = true @derivation_skill_id = 0 @immortal = false @mirage = [] @play_data = [] @balloon_data = [] @picture = false @timing = [] @timing_targets = [] @color_set = [] @color = [] @change_up = false @non_motion = false @graphics_change = false @hit = [] @add_state = [] @collapse = false @counter_id = 0 @reflection_id = 0 @result_damage = [0,0] @active = false @anime_off = false @command_action = false @base_x = 0 @base_y = 0 @base_z = 0 @base_h = 0 @max_pattern_w = 0 @max_pattern_h = 0 @pattern_kind = 0 @pattern_count = 0 @move_time = 0 @mirror = false @battler.set_graphic(@pre_change_data[0], @pre_change_data[1], @pre_change_data[2], @pre_change_data[3]) if @pre_change_data != nil @pre_change_data = nil end #-------------------------------------------------------------------------- # ● セットアップ #-------------------------------------------------------------------------- def setup(bitmap_width, bitmap_height, first_action_flag) reset if first_action_flag set_data set_base_position if !@graphics_change set_graphics(bitmap_width, bitmap_height) set_target setup_graphics_change if @graphics_change first_battler_anime_set if first_action_flag end #-------------------------------------------------------------------------- # ● バトラーデータ取得 #-------------------------------------------------------------------------- def set_data return if @battler == nil if @battler.actor? @graphic_name = @battler.character_name @graphic_index = @battler.character_index else @graphic_name = @battler.battler_name @graphic_index = 0 end @max_pattern_w = max_pattern[0] @max_pattern_h = max_pattern[1] end #-------------------------------------------------------------------------- # ● ベース坐标をセット data = [X轴, Y轴, H轴] moment_set…瞬间配置 #-------------------------------------------------------------------------- def set_base_position(moment_set = true) mirroring_reset if @battler.actor? data = N03::ACTOR_POSITION[@battler.index].dup @base_x = data[0] * 100 if !@mirror @base_x = (Graphics.width - data[0]) * 100 if @mirror else data = [@battler.screen_x, @battler.screen_y, 0].dup @base_x = data[0] * 100 if !$sv_camera.mirror @base_x = (Graphics.width - data[0]) * 100 if $sv_camera.mirror end @base_y = data[1] * 100 @base_h = data[2] * 100 @base_z = @y return if !moment_set @x = @base_x @y = @base_y @z = @base_z end #-------------------------------------------------------------------------- # ● グラフィックデータ取得 #-------------------------------------------------------------------------- def set_graphics(bitmap_width, bitmap_height) sign = @graphic_name[/^[\!\$]./] if sign && sign.include?('$') @cw = bitmap_width / @max_pattern_w @ch = bitmap_height / @max_pattern_h elsif @max_pattern_w == 1 && @max_pattern_h == 1 @cw = bitmap_width @ch = bitmap_height else @cw = bitmap_width / (@max_pattern_w * 4) @ch = bitmap_height / (@max_pattern_h * 2) end @ox = @cw / 2 @oy = @ch @sx = (@graphic_index % 4 * @max_pattern_w + @pattern_w) * @cw @sy = (@graphic_index / 4 * @max_pattern_h + @pattern_h) * @ch end #-------------------------------------------------------------------------- # ● ターゲットをセット #-------------------------------------------------------------------------- def set_target(target = nil) @target_battler = target @target_battler = [@battler] if target == nil @second_targets = @target_battler end #-------------------------------------------------------------------------- # ● 画像变更用のセットアップ #-------------------------------------------------------------------------- def setup_graphics_change @graphics_change = false @sx = (@graphic_index % 4 * @max_pattern_w + @pattern_w) * @cw @sy = (@graphic_index / 4 * @max_pattern_h + @pattern_h) * @ch end #-------------------------------------------------------------------------- # ● 戦闘开始時の待机动画画像データ取得 #-------------------------------------------------------------------------- def first_battler_anime_set loop do update break if @action_data == nil break if @action_data[0] == "motion" break if @action_data[0] == "move" && @action_data[8] != "" break if @full_action == [] end start_action(first_action) if @battler.movable? end #-------------------------------------------------------------------------- # ● 动作开始 #-------------------------------------------------------------------------- def start_action(kind = nil) return if @event_fix && $game_troop.interpreter.running? # ウェイト中の場合キャンセル return @wait -= 1 if @wait > 0 && kind == nil action_setup(false) if kind != nil set_action(kind) @action = kind if @action == nil # 行动配列が無い場合は行动终了处理へ移行 action_terminate if @action == nil # 次の动作決定 @action_data = N03::ACTION[@action] next_action end #-------------------------------------------------------------------------- # ● 行动パラメータの初期化 #-------------------------------------------------------------------------- def action_setup(reset = true) @event_fix = false @set_damage = false @action_end = false @balloon_data = [] @loop_act = [] angle_reset if reset zoom_reset if reset opacity_reset if reset @curve = [] @c = 0 convert_jump end #-------------------------------------------------------------------------- # ● 行动终了处理 #-------------------------------------------------------------------------- def action_terminate @mirage = [] if @mirage_end mirroring_reset @picture = false @individual_targets = [] action_setup if @active action_setup(false) if !@active # 待机动作へ移行 stand_by_action if !@non_motion # 戦闘行动のアクティブ権を终了 next_battler end #-------------------------------------------------------------------------- # ● 新しい动作内容の決定 #-------------------------------------------------------------------------- def set_action(kind = nil) full_act = N03::FULLACTION[kind] @full_action = full_act.dup if full_act != nil @action = @full_action.shift # 参照した动作がフル动作であれば全体の动作を統合 full_act2 = N03::FULLACTION[@action] @full_action = full_act2.dup + @full_action if full_act2 != nil end #-------------------------------------------------------------------------- # ● 次の动作へ #-------------------------------------------------------------------------- def next_action @wait = 0 # 快捷確認 eval(@action) if @action != nil && @action_data == nil && N03::FULLACTION[@action] == nil # ウエイト設定 @wait = @action.to_i if @wait == 0 && @action_data == nil @wait = rand(@wait.abs + 1) if @wait < 0 # 动作开始 action_play end #-------------------------------------------------------------------------- # ● 待机动作へ移行 #-------------------------------------------------------------------------- def stand_by_action # 通常待机に stand_by_act = normal # HPが1/4で危机动作に stand_by_act = pinch if @battler.hp <= @battler.mhp / 4 # 状态チェック stand_by_act = state(@battler.states[0].id) if @battler.states[0] != nil && state(@battler.states[0].id) != nil # コマンドチェック stand_by_act = command if @command_action && command != nil set_action(stand_by_act) @action = stand_by_act if @action == nil end #-------------------------------------------------------------------------- # ● 强制动作开始 #-------------------------------------------------------------------------- def start_force_action return if @active start_action(@force_action) @force_action = "" end #-------------------------------------------------------------------------- # ● 动作追加 #-------------------------------------------------------------------------- def add_action(kind) @full_action.push(kind) end #-------------------------------------------------------------------------- # ● 动作の挿入 #-------------------------------------------------------------------------- def unshift_action(kind) @full_action.unshift(kind) end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update # 动作开始 start_action # 强制动作开始 start_force_action if @force_action != "" # 动画パターン更新 update_pattern # 移动更新 update_move # 回旋更新 update_angle if @angle_time != 0 # 缩放更新 update_zoom if @zoom_time != 0 # 透明度更新 update_opacity if @opacity_data != [] end #-------------------------------------------------------------------------- # ● 动画パターン更新 #-------------------------------------------------------------------------- def update_pattern return @pattern_rest_time -= 1 if @pattern_rest_time != 0 return if @max_pattern_w == 1 && @max_pattern_h == 1 @pattern_rest_time = @pattern_time # 再生开始・终了セル位置を取得 if @pattern_kind > 0 # 通常再生中 @pattern_start = 0 @pattern_end = @max_pattern_w - 1 elsif @pattern_kind < 0 # 逆旋再生中 @pattern_start = @max_pattern_w - 1 @pattern_end = 0 end # 片道の再生が终了 @pattern_count += 1 if @pattern_w == @pattern_end && @pattern_kind != 0 # ループ处理 case @pattern_type.abs when 1,3 # 片道 @pattern_kind = 0 if @pattern_count != 0 && @pattern_type == 1 @pattern_kind = 0 if @pattern_count != 0 && @pattern_type == -1 @pattern_kind = 1 if @pattern_count != 0 && @pattern_type == 3 @pattern_kind = -1 if @pattern_count != 0 && @pattern_type == -3 @pattern_w = @pattern_start - @pattern_kind if @pattern_count != 0 && @pattern_type.abs == 3 @pattern_count = 0 when 2,4 # 往復 @pattern_kind = -1 if @pattern_count == 1 && @pattern_type == 2 @pattern_kind = 1 if @pattern_count == 1 && @pattern_type == -2 @pattern_kind = 0 if @pattern_count == 2 && @pattern_type == 2 @pattern_kind = 0 if @pattern_count == 2 && @pattern_type == -2 @pattern_kind = -1 if @pattern_count == 1 && @pattern_type == 4 @pattern_kind = 1 if @pattern_count == 1 && @pattern_type == -4 @pattern_kind = 1 if @pattern_count == 2 && @pattern_type == 4 @pattern_kind = -1 if @pattern_count == 2 && @pattern_type == -4 @pattern_count = 0 if @pattern_count == 2 end # セル更新 @pattern_w += 1 * @pattern_kind @sx = (@graphic_index % 4 * @max_pattern_w + @pattern_w) * @cw end #-------------------------------------------------------------------------- # ● 移动の更新 #-------------------------------------------------------------------------- def update_move @z = @y / 100 + @z_plus return if @move_time == 0 target_position_set if @horming_move @x = (@x * (@move_time - 1) + @target_x) / @move_time @y = (@y * (@move_time - 1) + @target_y) / @move_time @h = (@h * (@move_time - 1) + @target_h) / @move_time if @move_h != nil @c += @curve[@move_time - 1] if @curve[@move_time - 1] != nil @j += @jump[@move_time - 1] if @jump[@move_time - 1] != nil @move_time -= 1 convert_jump if @move_time == 0 end #-------------------------------------------------------------------------- # ● 移动目标の更新 #-------------------------------------------------------------------------- def target_position_set target_position = N03.get_targets_position(@move_targets, @horming_move) @target_x = target_position[0] + @move_x @target_y = target_position[1] + @move_y @target_h = target_position[2] + @move_h if @move_h != nil end #-------------------------------------------------------------------------- # ● 回旋更新 #-------------------------------------------------------------------------- def update_angle @angle += @angling @angle_time -= 1 return if @angle_time != 0 return angle_reset if @angle_data[4] == 0 angling(@angle_data) if @angle_data[4] == 2 end #-------------------------------------------------------------------------- # ● 缩放更新 #-------------------------------------------------------------------------- def update_zoom @zoom_x += @zooming_x @zoom_y += @zooming_y @zoom_time -= 1 return if @zoom_time != 0 return zoom_reset if @zoom_data[4] == 0 zooming(@zoom_data) if @zoom_data[4] == 2 end #-------------------------------------------------------------------------- # ● 透明度更新 #-------------------------------------------------------------------------- def update_opacity @opacity += @opacity_data[2] @opacity_data[0] -= 1 return if @opacity_data[0] != 0 return if !@opacity_data[5] @opacity_data[2] *= -1 @opacity_data[0] = @opacity_data[1] end #-------------------------------------------------------------------------- # ● 动作运行 #-------------------------------------------------------------------------- def action_play return if @action_data == nil action = @action_data[0] # バトラー反转の場合 return mirroring if action == "mirror" # 残像の場合 return mirage_set if action == "mirage" # 回旋の場合 return angling if action == "angle" # 缩放の場合 return zooming if action == "zoom" # 透明度操作の場合 return set_opacity if action == "opacity" # バトラー动画の場合 return battler_anime if action == "motion" # 移动の場合 return move if action == "move" # 武器动画の場合 return weapon_anime([@action_data]) if action == "wp" # 动画飛ばしの場合 return move_anime if action == "m_a" # 戦闘シーン通信の場合(コラプス) return set_play_data if action == "collapse" or action == "no_collapse" # データベース战斗动画表示の場合 return battle_anime if action == "anime" # カメラワークの場合 return camera if action == "camera" # 画面の摇晃の場合 return shake if action == "shake" # 画面色调变更の場合 return color_effect if action == "color" # トランジションの場合 return transition if action == "ts" # ふきだし动画表示の場合 return balloon_anime if action == "balloon" # 图片表示の場合 return picture_set if action == "pic" # 状态操作の場合 return state_set if action == "sta" # FPS变更の場合 return fps if action == "fps" # バトラー画像变更の場合 return graphics_change if action == "change" # 技能派生の場合 return derivating_skill if action == "der" # BGM/BGS/SE演奏の場合 return sound if action == "sound" # ムービー再生の場合 return movie if action == "movie" # ゲームスイッチ操作の場合 return switches if action == "switch" # ゲーム变数操作の場合 return variable if action == "variable" # 条件分歧(ゲームスイッチ)の場合 return nece_1 if action == "n_1" # 条件分歧(ゲーム变数)の場合 return nece_2 if action == "n_2" # 条件分歧(状态)の場合 return nece_3 if action == "n_3" # 条件分歧(技能)の場合 return nece_4 if action == "n_4" # 条件分歧(パラメータ)の場合 return nece_5 if action == "n_5" # 条件分歧(装备)の場合 return nece_6 if action == "n_6" # 条件分歧(スクリプト)の場合 return nece_7 if action == "n_7" # セカンドターゲット操作の場合 return second_targets_set if action == "s_t" # 常见イベント呼び出しの場合 return call_common_event if action == "common" # 战斗动画消去の場合 return @anime_off = true if action == "anime_off" # 强制戦闘终了の場合 return BattleManager.process_abort if action == "battle_end" # 画面固定の場合 return Graphics.freeze if action == "graphics_freeze" # ダメージ动画の場合 return damage_anime if action == "damage_anime" # 武器消去の場合 return @weapon_visible = false if action == "weapon_off" # 武器消去解除の場合 return @weapon_visible = true if action == "weapon_on" # 待机キャンセルの場合 return @non_motion = true if action == "non_motion" # 待机キャンセル解除の場合 return @non_motion = false if action == "non_motion_cancel" # 初期位置变更の場合 return change_base_position if action == "change_base_position" # 初期位置变更解除の場合 return set_base_position(false) if action == "set_base_position" # 强制动作の場合 return force_act if action == "force_action" # 强制动作の場合 (セカンドターゲット) return force_act2 if action == "force_action2" # 個別开始の場合 return individual_start if action == "individual_start" # 個別终了の場合 return individual_end if action == "individual_end" # ループ开始の場合 return loop_start if action == "loop_start" # ループ终了の場合 return loop_end if action == "loop_end" # 自己のみ更新の場合 return only_action_on if action == "only_action_on" # 自己のみ更新解除の場合 return only_action_off if action == "only_action_off" # 次の行动者へ移行の場合 return next_battler if action == "next_battler" # 画像变更フラグの場合 return set_change if action == "set_change" # スクリプト操作の場合 return eval(@action_data[0]) end #-------------------------------------------------------------------------- # ● バトラー反转运行 #-------------------------------------------------------------------------- def mirroring @mirror = !@mirror end #-------------------------------------------------------------------------- # ● 反转初期化 #-------------------------------------------------------------------------- def mirroring_reset @mirror = false mirroring if [email protected]? && N03::ENEMY_MIRROR mirroring if $sv_camera.mirror end #-------------------------------------------------------------------------- # ● 残像运行 #-------------------------------------------------------------------------- def mirage_set @mirage = @action_data.dup @mirage_end = @mirage[3] @mirage = [] if @mirage[1] == 0 end #-------------------------------------------------------------------------- # ● 回旋运行 #-------------------------------------------------------------------------- def angling(data = @action_data) @angle_data = data.dup @oy = @ch / 2 @oy_adjust = @ch * 50 @angle_time = data[1] start_angle = data[2] * N03.mirror_num(@mirror) end_angle = data[3] * N03.mirror_num(@mirror) # 时间が0以下なら即座に最终角度へ @angle_time = 1 if @angle_time <= 0 # 回旋时间から1フレームあたりの角度を出す @angling = (end_angle - start_angle) / @angle_time # 割り切れない余りを初期角度に @angle = (end_angle - start_angle) % @angle_time + start_angle end #-------------------------------------------------------------------------- # ● 回旋初期化 #-------------------------------------------------------------------------- def angle_reset @oy = @ch @angle = @angle_time = @oy_adjust = 0 end #-------------------------------------------------------------------------- # ● 缩放运行 #-------------------------------------------------------------------------- def zooming(data = @action_data) @zoom_data = data.dup @zoom_time = data[1] start_zoom_x = data[2][0] start_zoom_y = data[2][1] end_zoom_x = data[3][0] end_zoom_y = data[3][1] # 时间が0以下なら即座に最终サイズへ @zoom_time = 1 if @zoom_time <= 0 # 缩放时间から1フレームあたりの缩放率を出す @zooming_x = (end_zoom_x - start_zoom_x) / @zoom_time @zooming_y = (end_zoom_y - start_zoom_y) / @zoom_time # 开始サイズに @zoom_x = start_zoom_x @zoom_y = start_zoom_y end #-------------------------------------------------------------------------- # ● 缩放初期化 #-------------------------------------------------------------------------- def zoom_reset @zoom_x = @zoom_y = 1 @zoom_time = 0 end #-------------------------------------------------------------------------- # ● バトラー透明度操作 #-------------------------------------------------------------------------- def set_opacity data = @action_data.dup @opacity = data[2] opacity_move = (data[3] - data[2])/ data[1] @opacity_data = [data[1], data[1], opacity_move, data[4], data[5], data[6]] @wait = data[1] if data[7] @wait *= 2 if data[6] && data[7] end #-------------------------------------------------------------------------- # ● 透明度操作初期化 #-------------------------------------------------------------------------- def opacity_reset @opacity = 255 @opacity = 0 if @battler.hidden? @opacity_data = [] end #-------------------------------------------------------------------------- # ● バトラー动画运行 #-------------------------------------------------------------------------- def battler_anime(anime_data = nil) anime_data = @action_data.dup if anime_data == nil @graphic_file_index = anime_data[1] if !graphic_fix @pattern_h = anime_data[2] @pattern_w = anime_data[3] @pattern_h = 0 if @max_pattern_w == 1 @pattern_w = 0 if @max_pattern_h == 1 @pattern_type = anime_data[4] @pattern_time = anime_data[5] @pattern_rest_time = anime_data[5] @pattern_count = 0 @pattern_kind = 1 @pattern_kind = -1 if @pattern_type < 0 @pattern_kind = 0 if @pattern_type == 0 @sx = (@graphic_index % 4 * @max_pattern_w + @pattern_w) * @cw @sy = (@graphic_index / 4 * @max_pattern_h + @pattern_h) * @ch @z_plus = anime_data[6] @wait = set_anime_wait if anime_data[7] @shadow_visible = anime_data[8] weapon_anime(anime_data) end #-------------------------------------------------------------------------- # ● 动画ウエイト計算 #-------------------------------------------------------------------------- def set_anime_wait if @pattern_type > 0 pattern_time_a = @max_pattern_w - @pattern_w.abs elsif @pattern_type < 0 pattern_time_a = @pattern_w.abs + 1 else return @pattern_time if @pattern_type == 0 end case @pattern_type when 1,-1, 3,-3 return pattern_time_a * @pattern_time when 2,-2, 4,-4 return pattern_time_a * @pattern_time + (@max_pattern_w - 2) * @pattern_time end end #-------------------------------------------------------------------------- # ● 移动运行 #-------------------------------------------------------------------------- def move @move_targets = N03.get_targets(@action_data[1].abs, @battler) return if @move_targets == [] @move_targets = [@battler] if @action_data[1].abs == 7 @move_x = @action_data[2] * 100 * N03.mirror_num(@mirror) @move_y = @action_data[3] * 100 @move_h = @action_data[4] * 100 if @action_data[4] != nil @move_h = nil if @action_data[4] == nil battler_anime(N03::ACTION[@action_data[8]].dup) if N03::ACTION[@action_data[8]] != nil @horming_move = true @horming_move = false if @action_data[1] < 0 or @action_data[1].abs == 7 target_position_set target_position = [@target_x, @target_y, @target_z] distanse_move = @action_data[5] > 0 @move_time = N03.distanse_calculation(@action_data[5].abs, target_position, [@x, @y, @z], distanse_move) @wait = @move_time curve jump @move_time = 1 if @move_time == 0 @horming_move = false if !@move_targets or @move_targets.include?(@battler) update_move if @move_time == 1 end #-------------------------------------------------------------------------- # ● カーブ运行 #-------------------------------------------------------------------------- def curve @c = 0 return if @action_data[6] == 0 @curve = N03.parabola([@action_data[6], -@action_data[6]], @move_time, 100, 4) end #-------------------------------------------------------------------------- # ● ジャンプ运行 #-------------------------------------------------------------------------- def jump convert_jump return if @action_data[7] == [0,0] @jump = N03.parabola(@action_data[7].dup, @move_time, 100) end #-------------------------------------------------------------------------- # ● J坐标(ジャンプ高度)をH坐标に变換 #-------------------------------------------------------------------------- def convert_jump @h += @j @j = 0 @jump = [] end #-------------------------------------------------------------------------- # ● データベース战斗动画运行 #-------------------------------------------------------------------------- def battle_anime data = @action_data.dup targets = N03.get_targets(data[2], @battler) return if targets == [] data[8] = !data[8] if @mirror @set_damage = data[5] @damage_anime_data[0] = N03.get_attack_anime_id(data[1], @battler) @damage_anime_data[1] = data[8] @damage_anime_data[2] = data[7] @damage_anime_data[3] = data[6] @damage_anime_data[4] = data[9] @wait = N03.get_anime_time(@damage_anime_data[0]) - 2 if data[4] return if @set_damage for target in targets do display_anime(targets, target, data) end end #-------------------------------------------------------------------------- # ● 武器动画开始 #-------------------------------------------------------------------------- def weapon_anime(anime_data) @weapon_end = true for i in 9...anime_data.size set_effect_data(anime_data) if anime_data != "" end end #-------------------------------------------------------------------------- # ● 动画飛ばし开始 #-------------------------------------------------------------------------- def move_anime @m_a_starter = [] @m_a_targets = [] starters = N03.get_targets(@action_data[2], @battler) targets = N03.get_targets(@action_data[3], @battler) return if starters == [] or targets == [] single_start = true if starters != nil && @action_data[2] < 0 single_start = true if @action_data[1][0] != 0 && $data_animations[N03.get_attack_anime_id(@action_data[1][0], @battler)].position == 3 starters = [starters[0]] if single_start single_end = true if targets != nil && @action_data[3] < 0 single_end = true if @action_data[1][1] != 0 && $data_animations[N03.get_attack_anime_id(@action_data[1][1], @battler)].position == 3 targets = [targets[0]] if single_end se_flag = true for starter in starters for target in targets data = @action_data.dup data[17] = se_flag @effect_data.push(data) @m_a_targets.push(target) @m_a_starter.push(starter) se_flag = false end end end #-------------------------------------------------------------------------- # ● スプライトセット通信 #-------------------------------------------------------------------------- def set_effect_data(data = @action) action_data = N03::ACTION[data] return if action_data == nil @effect_data.push(action_data.dup) end #-------------------------------------------------------------------------- # ● 戦闘シーン通信のデータを格納 #-------------------------------------------------------------------------- def set_play_data(data = @action_data) @play_data = data.dup end #-------------------------------------------------------------------------- # ● 战斗动画の表示 #-------------------------------------------------------------------------- def display_anime(targets, target, data) return if !N03.first_of_all_screen_anime(data[1], target, targets) target.animation_id = N03.get_attack_anime_id(data[1], @battler) target.animation_mirror = data[8] target.sv.anime_horming = data[3] target.sv.anime_camera_zoom = data[6] target.sv.anime_no_mirror = data[7] target.sv.anime_plus_z = data[9] end #-------------------------------------------------------------------------- # ● 战斗动画扩张データの初期化 #-------------------------------------------------------------------------- def reset_anime_data @anime_no_mirror = false @anime_horming = false @anime_camera_zoom = false @timing_targets = [] @anime_plus_z = true end #-------------------------------------------------------------------------- # ● カメラワーク #-------------------------------------------------------------------------- def camera data = @action_data.dup N03.camera(@battler, data) @wait = data[4] if data[5] end #-------------------------------------------------------------------------- # ● 画面の摇晃 #-------------------------------------------------------------------------- def shake data = @action_data.dup $sv_camera.shake(data[1], data[2], data[3]) @wait = data[3] if data[4] end #-------------------------------------------------------------------------- # ● 画面色调变更 #-------------------------------------------------------------------------- def color_effect case @action_data[1] when 0,1,2,3,4,5 targets = N03.get_targets(@action_data[1], @battler) when 6 screen = true when 7 targets = [@battler] + @target_battler when 8 screen = true targets = $game_troop.members + $game_party.battle_members - [@battler] when 9 screen = true targets = $game_troop.members + $game_party.battle_members - [@battler] - @target_battler when 10 screen = true targets = $game_troop.members + $game_party.battle_members end return if screen == nil && targets == [] for target in targets do target.sv.color_set = @action_data[2] end if targets @wait = @action_data[2][4] if @action_data[3] return if !screen $sv_camera.color_set[1] = @action_data[2] $sv_camera.color_set[2] = @action_data[2] end #-------------------------------------------------------------------------- # ● トランジション #-------------------------------------------------------------------------- def transition $sv_camera.perform_transition(@action_data) end #-------------------------------------------------------------------------- # ● ふきだし动画表示 #-------------------------------------------------------------------------- def balloon_anime @balloon_data = @action_data.dup end #-------------------------------------------------------------------------- # ● 图片表示 #-------------------------------------------------------------------------- def picture_set @picture = true set_effect_data end #-------------------------------------------------------------------------- # ● 状态操作 #-------------------------------------------------------------------------- def state_set targets = N03.get_targets(@action_data[1], @battler) return if targets == [] case @action_data[2] when 1 ; targets = [targets[rand(targets.size)]] when 2 ; targets -= @battler if targets.include?(@battler) end for target in targets for id in @action_data[4] target.add_state(id) if @action_data[3] == "+" target.remove_state(id) if @action_data[3] == "-" end end end #-------------------------------------------------------------------------- # ● FPS变更 #-------------------------------------------------------------------------- def fps Graphics.frame_rate = @action_data[1] start_action end #-------------------------------------------------------------------------- # ● バトラー画像变更の場合 #-------------------------------------------------------------------------- def graphics_change @graphics_change = true return @battler.graphics_change(@action_data[3]) if [email protected]? @pre_change_data = [@battler.character_name, @battler.character_index, @battler.face_name, @battler.face_index] if @pre_change_data == nil && !@action_data[1] if @action_data[4] == [] face_name = @battler.face_name face_index = @battler.face_index else face_name = @action_data[4][1] face_index = @action_data[4][0] end @battler.set_graphic(@action_data[3], @action_data[2], face_name, face_index) end #-------------------------------------------------------------------------- # ● 技能派生 #-------------------------------------------------------------------------- def derivating_skill # 未修得技能は派生不可なら return if !@action_data[1] && [email protected]_learn?($data_skills[@action_data[3]]) # コスト不足は派生不可なら return if !@action_data[2] && [email protected]_cost_payable?($data_skills[@action_data[3]]) # 派生 @derivation_skill_id = @action_data[3] # 以降の动作をキャンセル @full_action = [] end #-------------------------------------------------------------------------- # ● BGM/BGS/SE演奏 #-------------------------------------------------------------------------- def sound pitch = @action_data[2] vol = @action_data[3] name = @action_data[4] case @action_data[1] when "se" Audio.se_play("Audio/SE/" + name, vol, pitch) when "bgm" # 名前指定のない場合、現在のBGMを变えないように name = RPG::BGM.last.name if @action_data[4] == "" Audio.bgm_play("Audio/BGM/" + name, vol, pitch) when "bgs" name = RPG::BGS.last.name if @action_data[4] == "" Audio.bgs_play("Audio/BGS/" + name, vol, pitch) end end #-------------------------------------------------------------------------- # ● ムービーの再生 #-------------------------------------------------------------------------- def movie Graphics.play_movie('Movies/' + @action_data[1]) end #-------------------------------------------------------------------------- # ● ゲームスイッチ操作 #-------------------------------------------------------------------------- def switches for id in @action_data[1] $game_switches[id] = true if id > 0 $sv_camera.switches[id.abs] = true if id < 0 end for id in @action_data[2] $game_switches[id] = false if id > 0 $sv_camera.switches[id.abs] = false if id < 0 end $sv_camera.program_check end #-------------------------------------------------------------------------- # ● ゲーム变数操作 #-------------------------------------------------------------------------- def variable # オペランドチェック operand = @action_data[3] operand = $game_variables[@action_data[3].abs] if @action_data[3] < 0 # 变数操作で分歧 case @action_data[2] when 0 ; $game_variables[@action_data[1]] = operand # 代入 when 1 ; $game_variables[@action_data[1]] += operand # 加算 when 2 ; $game_variables[@action_data[1]] -= operand # 減算 when 3 ; $game_variables[@action_data[1]] *= operand # 乗算 when 4 ; $game_variables[@action_data[1]] /= operand # 除算 when 5 ; $game_variables[@action_data[1]] %= operand # 剰余 end end #-------------------------------------------------------------------------- # ● 条件分歧 (ゲームスイッチ) #-------------------------------------------------------------------------- def nece_1 judgment = $game_switches[@action_data[1]] == @action_data[2] if @action_data[1] > 0 judgment = $sv_camera.switches[@action_data[1].abs] == @action_data[2] if @action_data[1] < 0 action_diverging(judgment, @action_data[3]) end #-------------------------------------------------------------------------- # ● 条件分歧 (ゲーム变数) #-------------------------------------------------------------------------- def nece_2 variable = $game_variables[@action_data[1]] num = @action_data[2] num = $game_variables[@action_data[2].abs] if num < 0 case @action_data[3] when 0 ; judgment = variable == num when 1 ; judgment = variable < num when 2 ; judgment = variable > num end action_diverging(judgment, @action_data[4]) end #-------------------------------------------------------------------------- # ● 条件分歧 (状态) #-------------------------------------------------------------------------- def nece_3 targets = N03.get_targets(@action_data[1], @battler) return if targets == [] member_num = @action_data[4] member_num = targets.size if @action_data[4] == 0 && targets.size > 1 hit_count = 0 miss_count = 0 for target in targets hit_count += 1 if target.state?(@action_data[2]) miss_count += 1 if !target.state?(@action_data[2]) end case @action_data[3] when 0 ; judgment = hit_count >= member_num when 1 ; judgment = miss_count >= member_num end action_diverging(judgment, @action_data[5]) end #-------------------------------------------------------------------------- # ● 条件分歧 (技能) #-------------------------------------------------------------------------- def nece_4 targets = N03.get_targets(@action_data[1], @battler) return if targets == [] member_num = @action_data[4] member_num = targets.size if @action_data[4] == 0 && targets.size > 1 hit_count = 0 miss_count = 0 for target in targets hit_count += 1 if target.skill_learn?($data_skills[@action_data[2]]) && target.skill_conditions_met?($data_skills[@action_data[2]]) miss_count += 1 if !target.skill_learn?($data_skills[@action_data[2]]) or !target.skill_conditions_met?($data_skills[@action_data[2]]) end case @action_data[3] when 0 ; judgment = hit_count >= member_num when 1 ; judgment = miss_count >= member_num end action_diverging(judgment, @action_data[5]) end #-------------------------------------------------------------------------- # ● 条件分歧 (パラメータ) #-------------------------------------------------------------------------- def nece_5 targets = N03.get_targets(@action_data[1], @battler) return if targets == [] member_num = @action_data[5] member_num = targets.size if @action_data[5] == 0 && targets.size > 1 hit_count = 0 for target in targets hit_count += 1 if target.comparison_parameter([@action_data[2],@action_data[3],@action_data[4]]) end judgment = hit_count >= member_num action_diverging(judgment, @action_data[6]) end #-------------------------------------------------------------------------- # ● 条件分歧 (装备) #-------------------------------------------------------------------------- def nece_6 targets = N03.get_targets(@action_data[1], @battler) return if targets == [] member_num = @action_data[5] member_num = targets.size if @action_data[5] == 0 && targets.size > 1 hit_count = 0 miss_count = 0 for target in targets hit_count += 1 if target.comparison_equip([@action_data[2],@action_data[3]]) miss_count += 1 if !target.comparison_equip([@action_data[2],@action_data[3]]) end case @action_data[4] when 0 ; judgment = hit_count >= member_num when 1 ; judgment = miss_count >= member_num end action_diverging(judgment, @action_data[6]) end #-------------------------------------------------------------------------- # ● 条件分歧 (スクリプト) #-------------------------------------------------------------------------- def nece_7 judgment = eval(@action_data[2]) action_diverging(judgment, @action_data[1]) end #-------------------------------------------------------------------------- # ● 动作分歧 #-------------------------------------------------------------------------- def action_diverging(judgment, kind) result = 0 if judgment result = 1 if kind == 1 result = 2 if kind == 2 else result = 1 if kind == 0 end # フルアクション终了 return @full_action = [] if result == 2 # 次のアクションを除去 @full_action.shift if result == 1 set_action # 次のアクションを运行 @action_data = N03::ACTION[@action] next_action end #-------------------------------------------------------------------------- # ● セカンドターゲット操作 #-------------------------------------------------------------------------- def second_targets_set targets = N03.get_targets(@action_data[1], @battler) for target in targets targets.delete(target) if @action_data[2][1] == 1 && target.index != @action_data[2][0] targets.delete(target) if @action_data[2][1] == 2 && target.index == @action_data[2][0].abs targets.delete(target) if @action_data[3] > 0 && target.id != @action_data[3] targets.delete(target) if @action_data[3] < 0 && target.id == @action_data[3].abs targets.delete(target) if @action_data[4] > 0 && !target.state?(@action_data[4]) targets.delete(target) if @action_data[4] < 0 && target.state?(@action_data[4].abs) targets.delete(target) if @action_data[5] > 0 && !target.skill_conditions_met?($data_skills[@action_data[5]]) targets.delete(target) if @action_data[5] < 0 && target.skill_conditions_met?($data_skills[@action_data[5].abs]) targets.delete(target) if !target.comparison_parameter(@action_data[6]) targets.delete(target) if !@action_data[7][1].include?(0) && !target.comparison_equip(@action_data[7]) end return @second_targets = [] if targets.size == 0 case @action_data[8] when 1 ; targets = [targets[rand(targets.size)]] when 2 ; targets.delete(@battler) end return @second_targets = [] if targets.size == 0 @second_targets = targets case @action_data[9] when 0 ; return when 1 ; set_play_data(["second_targets_set"]) when 2 ; set_play_data(["targets_set"]) end @wait += 1 end #-------------------------------------------------------------------------- # ● 常见イベント呼び出し #-------------------------------------------------------------------------- def call_common_event $game_temp.reserve_common_event(@action_data[1]) $sv_camera.event = true @event_fix = @action_data[2] end #-------------------------------------------------------------------------- # ● ダメージ动画 #-------------------------------------------------------------------------- def damage_anime(delay_time = 12) anime(N03.get_attack_anime_id(-3, @battler), wait = true) action_play @wait -= delay_time @full_action.unshift("eval('@damage_anime_data = [] @set_damage = true')") end #-------------------------------------------------------------------------- # ● 通常コラプス #-------------------------------------------------------------------------- def normal_collapse @collapse = true return end #-------------------------------------------------------------------------- # ● 初期位置变更 #-------------------------------------------------------------------------- def change_base_position @base_x = @x @base_y = @y @base_h = @h end #-------------------------------------------------------------------------- # ● 强制动作运行 #-------------------------------------------------------------------------- def force_act target(@full_action.shift) end #-------------------------------------------------------------------------- # ● 强制动作运行 (セカンドターゲット) #-------------------------------------------------------------------------- def force_act2 target2(@full_action.shift) end #-------------------------------------------------------------------------- # ● 個別处理开始 #-------------------------------------------------------------------------- def individual_start @individual_targets = @target_battler.dup @remain_targets = @target_battler.dup @target_battler = [@individual_targets[0]] # リピート部分の动作を保持 @individual_act = @full_action.dup end #-------------------------------------------------------------------------- # ● 個別处理终了 #-------------------------------------------------------------------------- def individual_end @individual_targets.shift for target in @individual_targets @individual_targets.shift if target.dead? end # ターゲットが残っているなら行动リピート return @target_battler = @remain_targets if @individual_targets.size == 0 @full_action = @individual_act.dup @target_battler = [@individual_targets[0]] end #-------------------------------------------------------------------------- # ● ループ开始 #-------------------------------------------------------------------------- def loop_start # ループ部分の动作を保持 @loop_act = @full_action.dup end #-------------------------------------------------------------------------- # ● ループ终了 #-------------------------------------------------------------------------- def loop_end # 行动リピート @full_action = @loop_act.dup if @loop_act != [] end #-------------------------------------------------------------------------- # ● 次の行动者へ移行 #-------------------------------------------------------------------------- def next_battler @action_end = true @active = false end #-------------------------------------------------------------------------- # ● 画像变更フラグ #-------------------------------------------------------------------------- def set_change @change_up = true end #-------------------------------------------------------------------------- # ● 戦闘シーン通信 #-------------------------------------------------------------------------- def play_data data = @play_data @play_data = [] return data end #-------------------------------------------------------------------------- # ● 快捷コマンド #-------------------------------------------------------------------------- def anime(anime_id, wait = true) @action_data = ["anime",anime_id,1,false,wait,false,true,false] end def anime_me(anime_id, wait = true) @action_data = ["anime",anime_id,0,false,wait,false,true,false] end def se(file, pitch = 100) @action_data = ["sound", "se", pitch, 100, file] end def target(act) for target in @target_battler do target.sv.force_action = act end end def target2(act) for target in @second_targets do target.sv.force_action = act end end def delay(time) @wait = @battler.index * time end #-------------------------------------------------------------------------- # ● バトラーのIDを取得 #-------------------------------------------------------------------------- def id return @battler.id if @battler.actor? return [email protected] end #-------------------------------------------------------------------------- # ● 被クリティカルフラグを取得 #-------------------------------------------------------------------------- def critical? return @battler.result.critical end #-------------------------------------------------------------------------- # ● 被回復フラグを取得 #-------------------------------------------------------------------------- def recovery? recovery = false recovery = true if @battler.result.hp_damage < 0 recovery = true if @battler.result.mp_damage < 0 recovery = true if @battler.result.tp_damage < 0 return recovery end #-------------------------------------------------------------------------- # ● 被技能IDを取得 #-------------------------------------------------------------------------- def damage_skill_id return @damage_skill_id end #-------------------------------------------------------------------------- # ● 被物品IDを取得 #-------------------------------------------------------------------------- def damage_item_id return @damage_item_id end #-------------------------------------------------------------------------- # ● 装备武器を取得 #-------------------------------------------------------------------------- def weapon_id return 0 if [email protected][0] return @battler.weapons[0].id end #-------------------------------------------------------------------------- # ● 装备武器のタイプを取得 #-------------------------------------------------------------------------- def weapon_type return 0 if [email protected][0] return @battler.weapons[0].wtype_id end #-------------------------------------------------------------------------- # ● 盾を装备しているか #-------------------------------------------------------------------------- def shield? for armor in @battler.armors do return true if armor != nil && armor.etype_id == 1 end return false end #-------------------------------------------------------------------------- # ● ダメージがあるか #-------------------------------------------------------------------------- def damage_zero? return @battler.result.hp_damage == 0 && @battler.result.mp_damage == 0 && @battler.result.tp_damage == 0 end #-------------------------------------------------------------------------- # ● 技能IDを取得 #-------------------------------------------------------------------------- def skill_id return @counter_id if @counter_id != 0 return 0 if @battler.current_action == nil or @battler.current_action.item == nil return 0 if @battler.current_action.item.is_a?(RPG::Item) return @battler.current_action.item.id end #-------------------------------------------------------------------------- # ● 技能のタイプを取得 #-------------------------------------------------------------------------- def skill_type return 0 if skill_id == 0 return $data_skills[skill_id].stype_id end #-------------------------------------------------------------------------- # ● 技能名を取得 #-------------------------------------------------------------------------- def skill_name return "" if skill_id == 0 return $data_skills[skill_id].name end #-------------------------------------------------------------------------- # ● 物品IDを取得 #-------------------------------------------------------------------------- def item_id return 0 if @battler.current_action == nil or @battler.current_action.item == nil return @battler.current_action.item.id end #-------------------------------------------------------------------------- # ● 攻击动作 #-------------------------------------------------------------------------- def attack_action(item) return skill_action if item.is_a?(RPG::Skill) return item_action end #-------------------------------------------------------------------------- # ● ダメージ动作ベース #-------------------------------------------------------------------------- def damage_action_base(item) @damage_skill_id = 0 @damage_item_id = 0 @damage_skill_id = item.id if item.is_a?(RPG::Skill) @damage_item_id = item.id if item.is_a?(RPG::Item) end #-------------------------------------------------------------------------- # ● ダメージ动作 #-------------------------------------------------------------------------- def damage_action(attacker, item) damage_action_base(item) act = damage(attacker) return if @active start_action(act) if act != nil end #-------------------------------------------------------------------------- # ● 回避动作 #-------------------------------------------------------------------------- def evasion_action(attacker, item) damage_action_base(item) act = evasion(attacker) return if @active start_action(act) if act != nil end #-------------------------------------------------------------------------- # ● ミス动作 #-------------------------------------------------------------------------- def miss_action(attacker, item) damage_action_base(item) act = miss(attacker) return if @active start_action(act) if act != nil end #-------------------------------------------------------------------------- # ● 閃きスクリプト併用处理 #-------------------------------------------------------------------------- def flash_action return "闪现" end end #============================================================================== # ■ module N03 #------------------------------------------------------------------------------ # サイドビューバトルのモジュールです。 #============================================================================== module N03 #-------------------------------------------------------------------------- # ● バトラーの敵グループを取得 #-------------------------------------------------------------------------- def self.get_enemy_unit(battler) return $game_troop if battler.actor? return $game_party end #-------------------------------------------------------------------------- # ● バトラーの味方グループを取得 #-------------------------------------------------------------------------- def self.get_party_unit(battler) return $game_party if battler.actor? return $game_troop end #-------------------------------------------------------------------------- # ● 战斗动画时间の取得 #-------------------------------------------------------------------------- def self.get_anime_time(anime_id) return 0 if anime_id <= 0 return $data_animations[anime_id].frame_max * 4 end #-------------------------------------------------------------------------- # ● 攻击动画の取得 #-------------------------------------------------------------------------- def self.get_attack_anime_id(kind, battler) return $data_skills[battler.sv.counter_id].animation_id if kind == -3 && battler.sv.counter_id != 0 case kind when -1 ; anime_id = battler.atk_animation_id1 when -2 ; anime_id = battler.atk_animation_id2 when -3 if battler.current_action != nil anime_id = battler.current_action.item.animation_id if battler.current_action.item != nil end else ; anime_id = kind end case anime_id when -1 ; anime_id = battler.atk_animation_id1 when -2 ; anime_id = battler.atk_animation_id2 end return anime_id if anime_id return 0 end #-------------------------------------------------------------------------- # ● 战斗动画データをセット #-------------------------------------------------------------------------- def self.set_damage_anime_data(targets, target, data) return if !first_of_all_screen_anime(data[0], target, targets) target.animation_id = data[0] target.animation_mirror = data[1] target.sv.anime_no_mirror = data[2] target.sv.anime_camera_zoom = data[3] target.sv.anime_plus_z = data[4] end #-------------------------------------------------------------------------- # ● ターゲットの取得 #-------------------------------------------------------------------------- def self.get_targets(kind, battler) case kind.abs when 0 ; return [battler].dup when 1 ; return battler.sv.target_battler.dup when 2 ; return get_enemy_unit(battler).members.dup when 3 ; return get_party_unit(battler).members.dup when 4 ; return $game_troop.members.dup + $game_party.battle_members.dup when 5 ; return battler.sv.second_targets.dup end end #-------------------------------------------------------------------------- # ● ターゲットの坐标を取得 #-------------------------------------------------------------------------- def self.get_targets_position(targets, horming, m_a = nil) return [0,0,0] if targets == nil && !$sv_camera.mirror return [Graphics.width,0,0] if targets == nil && $sv_camera.mirror x = y = h = 0 for i in 0...targets.size x += targets.sv.base_x if !horming y += targets.sv.base_y if !horming h += targets.sv.base_h if !horming x += targets.sv.x if horming y += targets.sv.y if horming h += targets.sv.h if horming y -= targets.sv.ch * 100 if m_a == 0 y -= targets.sv.ch * 50 if m_a == 1 end return [x / targets.size, y / targets.size, h / targets.size] end #-------------------------------------------------------------------------- # ● 速度を时间に变換 #-------------------------------------------------------------------------- def self.distanse_calculation(time, target_position, self_position, distanse_move) return time if !distanse_move distanse_x = self_position[0] - target_position[0] distanse_x = target_position[0] - self_position[0] if target_position[0] > self_position[0] distanse_y = self_position[1] - target_position[1] distanse_y = target_position[1] - self_position[1] if target_position[1] > self_position[1] if self_position[2] != nil && target_position[2] != nil distanse_h = self_position[2] - target_position[2] distanse_h = target_position[2] - self_position[2] if target_position[2] > self_position[2] else distanse_h = 0 end distanse = [distanse_x, distanse_y, distanse_h].max return distanse / (time * 100) + 1 end #-------------------------------------------------------------------------- # ● 放物線移动計算 #-------------------------------------------------------------------------- def self.parabola(data, time, size, type = 1) move_data = data move_data[0] *= size move_data[1] *= size move = [] move_d = [] for i in 0...time / 2 move = move_data[0] move_d = move_data[1] move_data[0] = move_data[0] * type / (1 + type) move_data[1] = move_data[1] * type / (1 + type) end move = move + move_d.reverse! move.reverse! adjust = move.inject(0) {|result, item| result + item } move[move.size - 1] += adjust if data[0] == data[1] && adjust != 0 move.unshift(0) if time % 2 != 0 return move end #-------------------------------------------------------------------------- # ● 反转值 #-------------------------------------------------------------------------- def self.mirror_num(mirror) return 1 if !mirror return -1 end #-------------------------------------------------------------------------- # ● カメラワーク #-------------------------------------------------------------------------- def self.camera(battler, data) battler = $game_party.battle_members[0] if !battler cx = data[2][0] * 100 cy = data[2][1] * 100 return $sv_camera.move(cx, cy, data[3], data[4], true) if data[1] == 6 targets = self.get_targets(data[1], battler) return if targets == nil or targets == [] position = self.get_targets_position(targets, true) $sv_camera.move(position[0], position[1] - position[2], data[3], data[4], false) end #-------------------------------------------------------------------------- # ● コラプス禁止 #-------------------------------------------------------------------------- def self.immortaling # 全員に不死身付与 for member in $game_party.battle_members + $game_troop.members # イベント操作等で不死身設定になっていたら解除を無効にするフラグを立てる member.sv.immortal = true if member.state?(N03::IMMORTAL_ID) member.add_state(N03::IMMORTAL_ID) end return true end #-------------------------------------------------------------------------- # ● コラプス許可 #-------------------------------------------------------------------------- def self.unimmortaling # 全員の不死身化解除(イベント等で不死身設定がされていれば除く) for member in $game_party.battle_members + $game_troop.members next if member.dead? # 不死身状态が行动中に解除されていた場合、解除無効を解除 member.sv.immortal = false if !member.state?(N03::IMMORTAL_ID) && member.sv.immortal next member.sv.immortal = false if member.sv.immortal member.remove_state(N03::IMMORTAL_ID) next if member.hp != 0 member.add_state(1) member.perform_collapse_effect member.sv.action_terminate end return false end #-------------------------------------------------------------------------- # ● 技能派生 #-------------------------------------------------------------------------- def self.derived_skill(battler) battler.force_action(battler.sv.derivation_skill_id, -2) BattleManager.unshift_action_battlers(battler) end #-------------------------------------------------------------------------- # ● ダメージの作成 #-------------------------------------------------------------------------- def self.set_damage(battler, hp_damage, mp_damage) battler.result.hp_damage = hp_damage battler.result.mp_damage = mp_damage end #-------------------------------------------------------------------------- # ● ターゲット生死確認 #-------------------------------------------------------------------------- def self.targets_alive?(targets) return false if targets == [] for target in targets do return true if !target.dead? end return false end #-------------------------------------------------------------------------- # ● ターゲットをセカンドターゲットへ #-------------------------------------------------------------------------- def self.s_targets(battler) battler.sv.target_battler = battler.sv.second_targets return battler.sv.second_targets end #-------------------------------------------------------------------------- # ● セカンドターゲットをターゲットへ #-------------------------------------------------------------------------- def self.targets_set(battler) battler.sv.second_targets = battler.current_action.make_targets.compact battler.sv.target_battler = battler.sv.second_targets end #-------------------------------------------------------------------------- # ● 战斗动画运行判定 (目标:画面時は最初のターゲットのみ动画运行) #-------------------------------------------------------------------------- def self.first_of_all_screen_anime(anime_id, target, targets) anime = $data_animations[anime_id] return false if !anime return true if anime.position != 3 return false if anime.position == 3 && target != targets[0] targets.delete(target) target.sv.timing_targets = targets return true end #-------------------------------------------------------------------------- # ● 戦闘不能付加攻击か #-------------------------------------------------------------------------- def self.dead_attack?(battler, item) for state in battler.atk_states return true if state == battler.death_state_id end for effect in item.effects return true if effect.code == 21 && effect.data_id == battler.death_state_id end return false end end #============================================================================== # ■ Sprite_Weapon #------------------------------------------------------------------------------ # ウエポン表示用のスプライトです。 #============================================================================== class Sprite_Weapon < Sprite_Base #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_reader :index # ウエポン画像配列のインデックス attr_reader :battler # 画像が参照しているバトラー attr_reader :move_time # 画像が目标に到達するまでの时间 attr_reader :through # 貫通フラグ attr_reader :action_end # 武器动作终了フラグ attr_reader :action_end_cancel # 武器动作终了フラグ attr_reader :hit_position # 画像が目标に到達した時の坐标 attr_accessor :hit_anime_id # 画像が目标に到達した時の动画ID #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(viewport, index, battler) super(viewport) @index = index @battler = battler @position_x = @position_y = 0 @o = 0 @real_x = @real_y = 0 @mirror = @battler.sv.mirror reset set_action end #-------------------------------------------------------------------------- # ● 初期化 #-------------------------------------------------------------------------- def reset @z_plus = 0 @weapon_data = [] @move_data = [] @move_x = 0 @move_y = 0 @orbit = [] @through = false @distanse_move = false @weapon_width = 0 @weapon_height = 0 @anime_time = 0 @anime_position = 1 @move_time = 0 @hit_anime_id = 0 @move_anime = true @action_end = false @action_end_cancel = false reset_position end #-------------------------------------------------------------------------- # ● 动作をセット #-------------------------------------------------------------------------- def set_action return if @battler.sv.effect_data == [] weapon_anime if @battler.sv.effect_data[0][0] == "wp" move_anime if @battler.sv.effect_data[0][0] == "m_a" @battler.sv.effect_data.shift end #-------------------------------------------------------------------------- # ● 武器动画运行 #-------------------------------------------------------------------------- def weapon_anime @weapon_data = @battler.sv.effect_data[0].dup set_graphics set_ox set_weapon_move end #-------------------------------------------------------------------------- # ● 动画移动运行 #-------------------------------------------------------------------------- def move_anime @move_data = @battler.sv.effect_data[0].dup # ターゲットを取得 @target_battler = [@battler.sv.m_a_targets.shift] @target_battler = N03.get_targets(@move_data[3], @battler) if @move_data[3] < 0 set_move return if @move_data[16] == "" weapon_data = N03::ACTION[@move_data[16]] return if weapon_data == nil @weapon_data = weapon_data.dup set_graphics set_ox set_weapon_move end #-------------------------------------------------------------------------- # ● 武器画像を取得 #-------------------------------------------------------------------------- def set_graphics # 武器に依存しない画像設定がある場合 if @weapon_data[13] != "" self.bitmap = Cache.character(@weapon_data[13]).dup @weapon_width = self.bitmap.width @weapon_height = self.bitmap.height return end # 武器を取得 weapon = @battler.weapons[0] # 逆手装备を取得 if @weapon_data[10] weapon = nil for armor in @battler.armors do break weapon = armor if armor.is_a?(RPG::Armor) && armor.etype_id == 1 end weapon = @battler.weapons[1] if !weapon end # 武器がなければ处理をキャンセル return if weapon == nil # インデックスを取得 file_index = @weapon_data[12] # アイコンを利用するなら if @weapon_data[1] == 0 icon_index = weapon.icon_index self.bitmap = Cache.system("Iconset" + file_index).dup self.src_rect.set(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) @weapon_width = @weapon_height = 24 # 独自画像指定 else file_name = @battler.sv.weapon_graphic(weapon.id, weapon.wtype_id) if weapon.is_a?(RPG::Weapon) file_name = @battler.sv.shield_graphic(weapon.id, weapon.atype_id) if weapon.is_a?(RPG::Armor) self.bitmap = Cache.character(file_name + file_index).dup @weapon_width = self.bitmap.width @weapon_height = self.bitmap.height return if @weapon_data[1] == 1 # 2003仕様の武器动画 @weapon_width /= @battler.sv.max_pattern[0] end end #-------------------------------------------------------------------------- # ● 画像の原点を取得 #-------------------------------------------------------------------------- def set_ox # 反转時は設定を逆に if @mirror case @weapon_data[6] when 1 ; @weapon_data[6] = 2 # 左上→右上に when 2 ; @weapon_data[6] = 1 # 右上→左上に when 3 ; @weapon_data[6] = 4 # 左下→右下に when 4 ; @weapon_data[6] = 3 # 右下→左下に end end # 原点を設定 case @weapon_data[6] when 0 # 中心 self.ox = @weapon_width / 2 self.oy = @weapon_height / 2 when 1 # 左上 self.ox = 0 self.oy = 0 when 2 # 右上 self.ox = @weapon_width self.oy = 0 when 3 # 左下 self.ox = 0 self.oy = @weapon_height when 4 # 右下 self.ox = @weapon_width self.oy = @weapon_height when 5 # バトラーと同じ self.ox = @weapon_width / 2 self.oy = @weapon_height end end #-------------------------------------------------------------------------- # ● バトラーの坐标を取得 #-------------------------------------------------------------------------- def set_battler_position @position_x = @battler.sv.x + @weapon_data[3][0] * N03.mirror_num(@mirror) * 100 @position_y = (@battler.sv.y - @battler.sv.h - @battler.sv.j - @battler.sv.c - @battler.sv.oy_adjust) + @weapon_data[3][1] * 100 reset_position end #-------------------------------------------------------------------------- # ● 坐标を初期化 #-------------------------------------------------------------------------- def reset_position @real_x = @position_x / 100 @real_y = @position_y / 100 @real_zoom_x = 1 @real_zoom_y = 1 end #-------------------------------------------------------------------------- # ● 战斗动画を表示 #-------------------------------------------------------------------------- def set_animation(anime_id) return if $data_animations[anime_id] == nil @anime_position = $data_animations[anime_id].position @horming = true @horming = false if @anime_position == 3 @anime_camera_zoom = true @anime_no_mirror = false start_animation($data_animations[anime_id], @mirror) timings = $data_animations[anime_id].timings end #-------------------------------------------------------------------------- # ● ヒット時の战斗动画运行 #-------------------------------------------------------------------------- def set_hit_animation(position_data, hit_anime_id, target) return if $data_animations[hit_anime_id] == nil @real_x = position_data[0] @real_y = position_data[1] @position_x = position_data[0] * 100 @position_y = position_data[1] * 100 self.z = position_data[2] @z_plus = 1000 @action_end = false @horming = true set_animation(hit_anime_id) @anime_time = $data_animations[hit_anime_id].frame_max * 4 @timing_targets = [target] @move_time = @hit_anime_id = 0 @weapon_data = [] end #-------------------------------------------------------------------------- # ● タイミングバトラー追加 #-------------------------------------------------------------------------- def timing_battler_set(target) @timing_targets.push(target) end #-------------------------------------------------------------------------- # ● 武器の动きを取得 #-------------------------------------------------------------------------- def set_weapon_move # 开始位置を取得 set_battler_position if @move_time == 0 @z_plus = 50 if @z_plus == 0 && @weapon_data[9] self.z = @battler.sv.z + @z_plus # 反转处理 @mirror = !@mirror if @weapon_data[7] self.mirror = @mirror # 更新パターンをセット set_pattern @max_pattern = 2 if @max_pattern == 1 # 动きを計算 @weapon_move_data = [] @weapon_angle_data = [] @weapon_zoom_data = [] num = N03.mirror_num(@mirror) for i in 0...@max_pattern move_data_x = @weapon_data[2][0] * num * 100 * i / (@max_pattern - 1) move_data_y = @weapon_data[2][1] * 100 * i / (@max_pattern - 1) move_angle = @weapon_data[4] * num + (@weapon_data[5] * num - @weapon_data[4] * num) * i / (@max_pattern - 1) move_zoom_x = 1 + (@weapon_data[8][0] - 1) * i / (@max_pattern - 1) move_zoom_y = 1 + (@weapon_data[8][1] - 1) * i / (@max_pattern - 1) @weapon_move_data.push([move_data_x, move_data_y]) @weapon_angle_data.push(move_angle) @weapon_zoom_data.push([move_zoom_x, move_zoom_y]) end end #-------------------------------------------------------------------------- # ● 更新パターン #-------------------------------------------------------------------------- def set_pattern if @weapon_data[11] == -1 return @max_pattern = @battler.sv.max_pattern[0] if @battler.sv.pattern_type != 0 @count = @battler.sv.pattern_time @max_count = @battler.sv.pattern_time @max_pattern = @battler.sv.max_pattern[0] @repeat = false else @count = @weapon_data[11][0] @max_count = @weapon_data[11][0] @max_pattern = @weapon_data[11][1] @repeat = @weapon_data[11][2] end @pattern = 0 end #-------------------------------------------------------------------------- # ● 移动运行 #-------------------------------------------------------------------------- def set_move # 战斗动画を取得 set_animation(@move_data[1][0]) if $data_animations[@move_data[1][0]] != nil && $data_animations[@move_data[1][0]].position != 3 @anime_camera_zoom = @move_data[13] @loop = @move_data[14] @loop = false if @move_data[1][0] == 0 @anime_no_mirror = @move_data[15] @se_flag = @move_data[17] # 开始位置を取得 start_position @z_plus = 1000 if @move_data[9] # ターゲットバトラー画像にこの动画のSEとタイミング設定を反映させる @timing_targets = @target_battler # 坐标計算 @move_x = @move_data[5][0] * 100 * N03.mirror_num(@mirror) @move_y = @move_data[5][1] * 100 # 时间計算か速度計算か @distanse_move = true if @move_data[6] > 0 @move_time = @move_data[6].abs # 时间0の場合、动画が設定されていれば动画表示时间に合わせる if @move_time == 0 @move_time = $data_animations[@move_data[1][0]].frame_max * 4 if $data_animations[@move_data[1][0]] @move_time = 1 if !$data_animations[@move_data[1][0]] @distanse_move = false end # 貫通タイプの場合 @through = true if @move_data[7] == 1 @auto_through_flag = false @auto_through_flag = true if @move_data[7] == 0 # ターゲット坐标計算 if @target_battler == nil @target_x = @move_x * 100 @target_x = (Graphics.width - @move_x) * 100 if @mirror @target_y = @move_y * 100 else move_data_set end # ターゲットに到達するまでの时间を計算 @move_time = distanse_calculation(@move_time, @target_x, @target_y) # 円轨迹計算 orbit # バトラーのウエイト設定 @battler.sv.wait = @move_time - 1 if @move_data[10][0] @move_horming = @move_data[12] end #-------------------------------------------------------------------------- # ● 速度を时间に变換 #-------------------------------------------------------------------------- def distanse_calculation(time, target_x, target_y) return time if !@distanse_move distanse_x = @position_x - @target_x distanse_x = @target_x - @position_x if @target_x > @position_x distanse_y = @position_y - @target_y distanse_y = @target_y - @position_y if @target_y > @position_y distanse = [distanse_x, distanse_y].max return distanse / (time * 100) + 1 end #-------------------------------------------------------------------------- # ● 移动目标の更新 #-------------------------------------------------------------------------- def move_data_set return if @target_battler == nil position = N03.get_targets_position(@target_battler, true, @anime_position) @target_x = position[0] + @move_x @target_y = position[1] - position[2] + @move_y end #-------------------------------------------------------------------------- # ● 开始位置を計算 #-------------------------------------------------------------------------- def start_position starter = [@battler.sv.m_a_starter.shift] starter = N03.get_targets(@move_data[2], @battler) if @move_data[2] < 0 position = [0, 0] position = N03.get_targets_position(starter, true, @anime_position) if starter != nil @position_x = position[0] + @move_data[4][0] * 100 @position_y = position[1] + position[2] + @move_data[4][1] * 100 @position_z = @position_y end #-------------------------------------------------------------------------- # ● 円轨迹計算 #-------------------------------------------------------------------------- def orbit orbit_data = @move_data[8].dup orbit_data[0] *= 100 orbit_data[1] *= 100 orbit_d = [] for i in 0...@move_time / 2 @orbit = orbit_data[0] orbit_data[0] /= 2 orbit_d = orbit_data[1] orbit_data[1] /= 2 end @orbit = @orbit + orbit_d.reverse! @orbit.reverse! end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update update_hit_anime if @anime_time != 0 update_move if @move_time != 0 update_weapon_move if @weapon_data != [] update_position update_color self.visible = @battler.sv.weapon_visible super end #-------------------------------------------------------------------------- # ● ヒット時の战斗动画 #-------------------------------------------------------------------------- def update_hit_anime @anime_time -= 1 @action_end = true if @anime_time == 0 end #-------------------------------------------------------------------------- # ● 移动の更新 #-------------------------------------------------------------------------- def update_move move_data_set if @move_horming && !@hit_position through_set(@move_time, @target_x, @target_y) if @move_time == 1 && !@hit_position @o += @orbit[@move_time - 1] if @orbit[@move_time - 1] != nil @position_x = (@position_x * (@move_time - 1) + @target_x) / @move_time @position_y = (@position_y * (@move_time - 1) + @target_y) / @move_time + @o reset_position set_animation(@move_data[1][0]) if @loop && !animation? @move_time -= 1 return if @move_time != 0 @action_end = true if !@action_end_cancel end #-------------------------------------------------------------------------- # ● 武器の动きを更新 #-------------------------------------------------------------------------- def update_weapon_move pattern = update_pattern set_battler_position if @move_time == 0 && !@action_end_cancel @real_x = @position_x / 100 + @weapon_move_data[pattern][0] / 100 @real_y = @position_y / 100 + @weapon_move_data[pattern][1] / 100 @real_zoom_x = @weapon_zoom_data[pattern][0] @real_zoom_y = @weapon_zoom_data[pattern][1] self.angle = @weapon_angle_data[pattern] self.src_rect.set(@weapon_width * pattern, 0, @weapon_width, @weapon_height) if @weapon_data[1] == 2 end #-------------------------------------------------------------------------- # ● パターンを更新 #-------------------------------------------------------------------------- def update_pattern return @battler.sv.pattern_w if @count == nil @count -= 1 return @pattern if @count != 0 @count = @max_count @pattern += 1 if !@repeat && @pattern == @max_pattern @pattern = @max_pattern - 1 elsif @pattern == @max_pattern @pattern = 0 end return @pattern end #-------------------------------------------------------------------------- # ● 坐标を更新 #-------------------------------------------------------------------------- def update_position self.x = (@real_x - $sv_camera.x) * $sv_camera.convert / 1000 self.y = (@real_y - $sv_camera.y) * $sv_camera.convert / 1000 self.x += $sv_camera.sx / 100 unless @battler.sv.h != 0 && @weapon_data != [] self.y += $sv_camera.sy / 100 unless @battler.sv.h != 0 && @weapon_data != [] self.z = @battler.sv.z + @z_plus - 10 self.zoom_x = @real_zoom_x * $sv_camera.zoom self.zoom_y = @real_zoom_y * $sv_camera.zoom self.opacity = @battler.sv.opacity if @battler.sv.opacity_data[4] end #-------------------------------------------------------------------------- # ● 貫通の处理 #-------------------------------------------------------------------------- def through_set(time, target_x, target_y) @hit_anime_id = N03.get_attack_anime_id(@move_data[1][1], @battler) @battler.sv.wait = N03.get_anime_time(@hit_anime_id) if @move_data[10][1] moving_x = (target_x / 100 - @position_x / 100) / time moving_y = (target_y / 100 - @position_y / 100) / time goal_x = $sv_camera.max_left - 100 if moving_x < 0 goal_x = Graphics.width + $sv_camera.max_right + 100 if moving_x > 0 goal_y = $sv_camera.max_top - 100 if moving_y < 0 goal_y = Graphics.height + $sv_camera.max_bottom + 100 if moving_y > 0 if goal_x == nil && goal_y == nil time = 0 reset_position else time = move_calculation(moving_x, moving_y, goal_x, goal_y) end target_x = @position_x + moving_x * time * 100 target_y = @position_y + moving_y * time * 100 @pre_data = [time, target_x, target_y] @battler.sv.m_a_data.push([@move_data[11], @target_battler, @index, @auto_through_flag, []]) @action_end_cancel = true @hit_position = [@real_x, @real_y, self.z] end #-------------------------------------------------------------------------- # ● 到達时间試算 #-------------------------------------------------------------------------- def move_calculation(moving_x, moving_y, goal_x, goal_y) move_x = @position_x / 100 move_y = @position_y / 100 time = 0 loop do move_x += moving_x move_y += moving_y time += 1 return time if moving_x < 0 && move_x < goal_x return time if moving_x > 0 && move_x > goal_x return time if moving_y < 0 && move_y < goal_y return time if moving_y > 0 && move_y > goal_y end end #-------------------------------------------------------------------------- # ● ミス時に消える处理から貫通处理に变換 #-------------------------------------------------------------------------- def through_change @action_end_cancel = false @through = true @move_time = @pre_data[0] @target_x = @pre_data[1] @target_y = @pre_data[2] @pre_data = nil end #-------------------------------------------------------------------------- # ● SE とフラッシュのタイミング处理 #-------------------------------------------------------------------------- def animation_process_timing(timing) return if !@timing_targets se_flag = true se_flag = @se_flag if @se_flag != nil for target in @timing_targets target.sv.timing.push([se_flag, timing.dup]) se_flag = false if @animation.position == 3 end end #-------------------------------------------------------------------------- # ● 色调の更新 #-------------------------------------------------------------------------- def update_color return if @battler.sv.color == [] self.color.set(@battler.sv.color[0], @battler.sv.color[1], @battler.sv.color[2], @battler.sv.color[3]) end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- def dispose super self.bitmap.dispose if self.bitmap != nil end end #============================================================================== # ■ Sprite_Battle_Picture #------------------------------------------------------------------------------ # 图片表示用のスプライトです。 #============================================================================== class Sprite_Battle_Picture < Sprite #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_accessor :action_end # 终了フラグ #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(viewport = nil) super(viewport) @action_end = false self.ox = 0 end #-------------------------------------------------------------------------- # ● セット #-------------------------------------------------------------------------- def set(battler) @battler = battler @data = @battler.sv.effect_data.shift @time = @data[4] @mirror = $sv_camera.mirror @mirror = false if !@data[8] self.opacity = @data[6][0] @s_x = @data[2][0] if @data[2] != [] @s_x = Graphics.width - @data[2][0] if @data[2] != [] && @mirror @s_y = @data[2][1] if @data[2] != [] @e_x = @data[3][0] if @data[3] != [] @e_x = Graphics.width - @data[3][0] if @data[3] != [] && @mirror @e_y = @data[3][1] if @data[3] != [] @s_x = self.x if @data[2] == [] @s_y = self.y if @data[2] == [] @e_x = self.x if @data[3] == [] @e_y = self.y if @data[3] == [] self.x = @s_x self.y = @s_y return @action_end = true if @time == 0 @move_x = (@e_x * 1.0 - @s_x) / @time @move_y = (@e_y * 1.0 - @s_y) / @time self.z = @data[5] return set_plane(battler) if @data[7] != [] self.bitmap = Cache.picture(@data[9]) if !bitmap or @data[9] != "" return @action_end = true if !bitmap self.mirror = @mirror self.ox = self.bitmap.width if @mirror end #-------------------------------------------------------------------------- # ● プレーン移行 #-------------------------------------------------------------------------- def set_plane(battler) @viewport = Viewport.new(@data[2][0],@data[2][1],@data[7][0],@data[7][1]) if !@viewport viewport = @viewport @plane = Plane.new(viewport) if !@plane @plane.bitmap = Cache.picture(@data[9]) if [email protected] or @data[9] != "" return @action_end = true if [email protected] @plane.ox = @data[7][0] @plane.oy = @data[7][1] @plane.opacity = @data[6][0] @move_x = @remain_move[0] if @data[2] == @data[3] @move_y = @remain_move[1] if @data[2] == @data[3] @remain_move = [@move_x, @move_y] end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update @action_end = true if [email protected] return if @time == 0 return if @action_end @time -= 1 return plane_update if @plane super self.x += @move_x self.y += @move_y self.opacity += @data[6][1] return if @time != 1 self.x = @e_x self.y = @e_y @time = 0 end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def plane_update @plane.ox += @move_x @plane.oy += @move_y @plane.opacity += @data[6][1] @time = @data[4] if @time == 0 end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- def dispose bitmap.dispose if bitmap @plane.dispose if @plane @viewport.dispose if @viewport super end end #============================================================================== # ■ Sprite_Back_Picture #------------------------------------------------------------------------------ # 周期图片用のスプライトです。 #============================================================================== class Sprite_Back_Picture < Plane #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_accessor :action_end # 终了フラグ #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(viewport = nil, index) super(viewport) @index = index @real_x = 0 @real_y = 0 @real_opacity = 0 @move_x = 0 @move_y = 0 @move_opacity = 0 @time = 0 @switche = 0 @action_end = false end #-------------------------------------------------------------------------- # ● セットアップ #-------------------------------------------------------------------------- def setup(data) self.bitmap = Cache.picture(data[9]) self.z = data[6] @switche = data[1] mirror = $sv_camera.mirror mirror = false if !data[8] @move_x = data[3][0] @move_x *= -1 if mirror @move_y = data[3][1] @time = data[4] @time = -1 if @time == 0 @real_opacity = (data[5][0] + 1) * 100 @move_opacity = data[5][1] @start_opacity = data[5][0] @shake_ok = data[7] end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update update_picture if @time != 0 self.ox = $sv_camera.x - @real_x self.oy = $sv_camera.y - @real_y if @shake_ok self.ox -= $sv_camera.sx / 100 self.oy -= $sv_camera.sy / 100 end self.ox *= $sv_camera.zoom self.oy *= $sv_camera.zoom self.zoom_x = @zoom_x * $sv_camera.zoom self.zoom_y = @zoom_y * $sv_camera.zoom self.opacity = @real_opacity / 100 @move_opacity *= -1 if self.opacity == 255 or self.opacity <= @start_opacity @switche @action_end = true if @switche > 0 && !$game_switches[@switche] @action_end = true if @switche < 0 && !$sv_camera.switches[@switche.abs] end #-------------------------------------------------------------------------- # ● 图片の更新 #-------------------------------------------------------------------------- def update_picture @real_x += @move_x / 100 @real_y += @move_y / 100 @real_x = 0 if @real_x >= self.bitmap.width or @real_x <= -self.bitmap.width @real_y = 0 if @real_y >= self.bitmap.height or @real_y <= -self.bitmap.height @zoom_x = 1 @zoom_y = 1 @real_opacity += @move_opacity @time -= 1 @time = -1 if @time < -100 end end #============================================================================== # ■ Sprite_Back_Picture #------------------------------------------------------------------------------ # ダメージ表示のスプライトです。 #============================================================================== class Sprite_Damage < Sprite #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_reader :action_end # POP终了フラグ #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(viewport = nil, battler) super(viewport) @battler = battler @time = 0 return @action_end = true if !@battler @direction = -1 @direction *= -1 if @battler.actor? @direction *= -1 if $sv_camera.mirror set_state set_damage update end #-------------------------------------------------------------------------- # ● 状态表示 #-------------------------------------------------------------------------- def set_state return if !N03::STATE_POP states = @battler.result.added_state_objects states.delete($data_states[@battler.death_state_id]) if @battler.result.hp_damage != 0 return if states == [] return if @battler.sv.add_state == @battler.result.added_state_objects @battler.sv.add_state = states.dup @st = [] @st_base = [] for i in 0...states.size @st = Sprite.new bitmap_state(@st, states) @st_base = [] @st_base[0] = @direction * (-20 + 5 * i) + @battler.sv.x / 100 @st_base[1] = -40 - @state_height * i + (@battler.sv.y - @battler.sv.h - @battler.sv.j - @battler.sv.oy_adjust)/ 100 @st.z = 1000 + i @st.opacity = 0 end @time = @pop_time = 80 end #-------------------------------------------------------------------------- # ● 状态画像 #-------------------------------------------------------------------------- def bitmap_state(state, state_object) name = state_object.name state.bitmap = Cache.system("Iconset").dup state.src_rect.set(state_object.icon_index % 16 * 24, state_object.icon_index / 16 * 24, 24, 24) @state_height = 24 end #-------------------------------------------------------------------------- # ● ダメージ表示 #-------------------------------------------------------------------------- def hit_count for i in [email protected] if @battler.sv.hit == nil @hit = i return @battler.sv.hit = @hit end end @hit = @battler.sv.hit.size @battler.sv.hit.push(@hit) end #-------------------------------------------------------------------------- # ● ダメージ表示 #-------------------------------------------------------------------------- def set_damage return @action_end = true if !N03::DAMAGE_POP damage = @battler.result.hp_damage if @battler.result.hp_damage != 0 damage = @battler.result.hp_drain if @battler.result.hp_drain != 0 damage = @battler.result.mp_damage if @battler.result.mp_damage != 0 damage = @battler.result.mp_drain if @battler.result.mp_drain != 0 damage = @battler.result.tp_damage if @battler.result.tp_damage != 0 if !damage or damage == 0 @action_end = true if @st == nil return # 状态だけPOPする設定を考慮して@action_endは返さない end hit_count #@hit = @battler.sv.hit #@battler.sv.hit += 1 if damage != 0 file = N03::DAMAGE_PLUS if damage > 0 file = N03::DAMAGE_MINUS if damage < 0 add_file = N03::DAMAGE_MP if @battler.result.mp_damage != 0 add_file = N03::DAMAGE_TP if @battler.result.tp_damage != 0 adjust_x = N03::DAMAGE_ADJUST @num = [] @num_base = [] damage = damage.abs max_num = damage.to_s.size max_num += 1 if add_file != nil for i in 0...max_num @num = Sprite.new if add_file != nil && i == max_num - 1 @num.bitmap = Cache.system(add_file) cw = (damage % (10 * 10 ** i))/(10 ** i) sw = 0 if sw == nil else @num.bitmap = Cache.system(file) cw = (damage % (10 * 10 ** i))/(10 ** i) sw = @num.bitmap.width / 10 @num.src_rect.set(cw * sw, 0, sw, @num.bitmap.height) end @num_base = [] @num_base[0] = (sw + adjust_x) * i * -1 + (@battler.sv.x / 100) @num_base[1] = -(@num.bitmap.height / 3) - i * 2 - @hit * 2 + (@battler.sv.y - @battler.sv.h - @battler.sv.j - @battler.sv.oy_adjust)/ 100 @num_base[0] -= @num.bitmap.width / 2 - adjust_x if add_file != nil && i == max_num - 1 @num.z = 1000 + i + @hit * 10 end @time = @pop_time = 80 end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update return if @time == 0 for i in [email protected] do update_state_move(@st, i) end if @st != nil for i in [email protected] do update_num_move(@num, i) end if @num != nil @time -= 1 @action_end = true if @time == 0 end #-------------------------------------------------------------------------- # ● 状态画像の更新 #-------------------------------------------------------------------------- def update_state_move(state, index) min = @pop_time - index * 2 case @time when min-15..min @st_base[index][0] += @direction state.opacity += 25 when min-80..min-50 @st_base[index][0] += @direction state.opacity -= 25 end state.x = (@st_base[index][0] - $sv_camera.x) * $sv_camera.zoom state.y = (@st_base[index][1] - $sv_camera.y) * $sv_camera.zoom end #-------------------------------------------------------------------------- # ● 数值の更新 #-------------------------------------------------------------------------- def update_num_move(num, index) min = @pop_time - index * 2 case @time when min-1..min @num_base[index][0] += @direction * @hit @num_base[index][1] -= 5 + @hit * 2 when min-3..min-2 @num_base[index][0] += @direction * @hit @num_base[index][1] -= 4 + @hit * 2 when min-6..min-4 @num_base[index][0] += @direction @num_base[index][1] -= 3 + @hit * 2 when min-14..min-7 @num_base[index][0] += @direction @num_base[index][1] += 2 when min-17..min-15 @num_base[index][1] -= 2 + @hit * 2 when min-23..min-18 @num_base[index][1] += 1 when min-27..min-24 @num_base[index][1] -= 1 when min-30..min-28 @num_base[index][1] += 1 when min-33..min-31 @num_base[index][1] -= 1 when min-36..min-34 @num_base[index][1] += 1 end num.x = (@num_base[index][0] - $sv_camera.x) * $sv_camera.zoom num.y = (@num_base[index][1] - $sv_camera.y) * $sv_camera.zoom num.opacity = 256 - (12 - @time) * 32 num.visible = false if @time == 0 end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- def dispose @battler.sv.hit[@hit] = nil if @hit bitmap.dispose if bitmap for i in [email protected] do @num.dispose end if @num != nil for i in [email protected] do @st.dispose end if @st != nil super end end #============================================================================== # ■ Window_Skill_name #------------------------------------------------------------------------------ # 技能名を表示するウィンドウです。 #============================================================================== class Window_Skill_name < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(text) super(0, 0, Graphics.width, line_height + standard_padding * 2) draw_text(4, 0, Graphics.width - 64, line_height,text, 1) end end #============================================================================== # ■ Spriteset_Sideview #------------------------------------------------------------------------------ # サイドビュー独自のスプライトをまとめたクラスです。 #============================================================================== class Spriteset_Sideview #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(viewport) @viewport = viewport @weapons = [] @pictures = [] @back_pic = [] @damage = [] $sv_camera.setup N03.camera(nil, N03::BATTLE_CAMERA["回合开始"].dup) end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update update_battler_data update_damage update_pictures update_back_pic update_weapons end #-------------------------------------------------------------------------- # ● バトラーデータの更新 #-------------------------------------------------------------------------- def update_battler_data for battler in $game_party.battle_members + $game_troop.members weapon_end(battler) if battler.sv.weapon_end next if battler.sv.effect_data == [] for effect_data in battler.sv.effect_data do set_effects(battler, effect_data) end end end #-------------------------------------------------------------------------- # ● ダメージ画像の更新 #-------------------------------------------------------------------------- def update_damage for i in [email protected] next if @damage == nil @damage.update if @damage != nil next if !@damage.action_end @damage.dispose @damage = nil end end #-------------------------------------------------------------------------- # ● 图片动作の更新 #-------------------------------------------------------------------------- def update_pictures for i in [email protected] next if @pictures == nil @pictures.update if @pictures != nil next if !@pictures.action_end @pictures.dispose @pictures = nil end end #-------------------------------------------------------------------------- # ● 周期图片の更新 #-------------------------------------------------------------------------- def update_back_pic set_back_pic if $sv_camera.program_picture != [] for i in 0...@back_pic.size next if @back_pic == nil @back_pic.update if @back_pic != nil next if !@back_pic.action_end @back_pic.dispose @back_pic = nil end end #-------------------------------------------------------------------------- # ● 武器动作の更新 #-------------------------------------------------------------------------- def update_weapons for i in [email protected] next if @weapons == nil @weapons.update if @weapons != nil next if !@weapons.action_end @weapons.dispose @weapons = nil end end #-------------------------------------------------------------------------- # ● ダメージ运行 #-------------------------------------------------------------------------- def set_damage_pop(target) for i in [email protected] next if @damage != nil return @damage = Sprite_Damage.new(@viewport, target) end @damage.push(Sprite_Damage.new(@viewport, target)) end #-------------------------------------------------------------------------- # ● 周期图片运行 #-------------------------------------------------------------------------- def set_back_pic for data in $sv_camera.program_picture if @back_pic[data[2]] != nil @back_pic[data[2]].dispose @back_pic[data[2]] = nil end @back_pic[data[2]] = Sprite_Back_Picture.new(@viewport, data[2]) @back_pic[data[2]].setup(data) end $sv_camera.program_picture = [] end #-------------------------------------------------------------------------- # ● エフェクト开始 #-------------------------------------------------------------------------- def set_effects(battler, effect_data) case effect_data[0] when "pic" ; set_pictures(battler, effect_data) when "wp" ; set_weapons(battler, true) when "m_a" ; set_weapons(battler, false) end end #-------------------------------------------------------------------------- # ● 图片动作运行 #-------------------------------------------------------------------------- def set_pictures(battler, effect_data) @pictures[effect_data[1]] = Sprite_Battle_Picture.new if @pictures[effect_data[1]] == nil @pictures[effect_data[1]].set(battler) end #-------------------------------------------------------------------------- # ● 武器动作运行 #-------------------------------------------------------------------------- def set_weapons(battler, weapon_flag, test = true) for i in [email protected] next if @weapons != nil @weapons = Sprite_Weapon.new(@viewport, i, battler) battler.sv.weapon_index.push(i) if weapon_flag return i end @weapons.push(Sprite_Weapon.new(@viewport, @weapons.size, battler)) battler.sv.weapon_index.push(@weapons.size - 1) if weapon_flag return @weapons.size - 1 end #-------------------------------------------------------------------------- # ● バトラーの武器动作终了 #-------------------------------------------------------------------------- def weapon_end(battler) battler.sv.weapon_end = false for index in battler.sv.weapon_index weapon_index = battler.sv.weapon_index.shift @weapons[weapon_index].dispose if @weapons[weapon_index] != nil @weapons[weapon_index] = nil end battler.sv.weapon_index.compact! end #-------------------------------------------------------------------------- # ● ヒット時の战斗动画运行 #-------------------------------------------------------------------------- def set_hit_animation(battler, weapon_index, hit_targets, miss) weapon = @weapons[weapon_index] for target in hit_targets next @weapons[@hit_index].timing_battler_set(target) if @hit_index != nil @hit_index = set_weapons(battler, false, false) @weapons[@hit_index].set_hit_animation(weapon.hit_position, weapon.hit_anime_id, target) end @hit_index = nil if !weapon.through && !miss @weapons[weapon_index].dispose @weapons[weapon_index] = nil else @weapons[weapon_index].through_change end end #-------------------------------------------------------------------------- # ● サイドビューデータの初期化 #-------------------------------------------------------------------------- def reset_sideview $sv_camera.reset for member in $game_troop.members + $game_party.battle_members do member.sv.reset end end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- def dispose dispose_effects(@weapons) dispose_effects(@pictures) dispose_effects(@back_pic) dispose_effects(@damage) reset_sideview end #-------------------------------------------------------------------------- # ● エフェクト画像の解放 #-------------------------------------------------------------------------- def dispose_effects(effects) for i in 0...effects.size effects.dispose if effects != nil effects = nil end end end #============================================================================== # ■ Sprite_Battle_Back #------------------------------------------------------------------------------ # 戦闘背景用のスプライトです。 #============================================================================== class Sprite_Battle_Back < Plane #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(viewport = nil, index, battleback_name) super(viewport) @index = index if @index == 1 data = N03::FLOOR1_DATA[battleback_name] data = N03::FLOOR1_DATA["全Battlebacks1"] if data == nil elsif @index == 2 data = N03::FLOOR2_DATA[battleback_name] data = N03::FLOOR2_DATA["全Battlebacks2"] if data == nil end data = data.dup @adjust_position = data[0] @zoom_x = data[1][0] / 100.0 @zoom_y = data[1][1] / 100.0 @shake_on = data[2] $game_switches[data[3]] = true if data[3] > 0 $sv_camera.switches[data[3].abs] = true if data[3] < 0 reset_scroll reset_back_data(battleback_name) end #-------------------------------------------------------------------------- # ● 背景スクロールを初期化 #-------------------------------------------------------------------------- def reset_scroll @scroll_x = 0 @scroll_y = 0 @move_x = 0 @move_y = 0 end #-------------------------------------------------------------------------- # ● 背景データを初期化 #-------------------------------------------------------------------------- def reset_back_data(battleback_name) @back_data = [] @active_data = ["scroll",0, @move_x, @move_y, false, battleback_name,""] start_back_data(@active_data) end #-------------------------------------------------------------------------- # ● 背景画像のセッティング #-------------------------------------------------------------------------- def set_graphics(new_bitmap) self.bitmap = new_bitmap @base_x = (self.bitmap.width * @zoom_x - Graphics.width) / 2 + @adjust_position[0] @base_y = (self.bitmap.height * @zoom_y - Graphics.height) / 2 + @adjust_position[1] # 限界坐标を取得 max_top = 0 max_bottom = self.bitmap.height * @zoom_y - Graphics.height max_left = 0 max_right = self.bitmap.width * @zoom_x - Graphics.width exist = true exist = false if self.bitmap.height == 32 && self.bitmap.width == 32 $sv_camera.setting(@index, [max_top, max_bottom, max_left, max_right, @base_x, @base_y,exist]) end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update return if !bitmap update_back_data update_scroll unless @move_x == 0 && @move_y == 0 update_color update_position update_back_adjust if @bt_back != nil create_back_adjust if @bt_back == nil && !@active_data[10] && @scroll_x == 0 && @scroll_y == 0 end #-------------------------------------------------------------------------- # ● 背景データを更新 #-------------------------------------------------------------------------- def update_back_data delete = true if @active_data[1] > 0 && !$game_switches[@active_data[1]] delete = true if @active_data[1] < 0 && !$sv_camera.switches[@active_data[1].abs] return if !delete for i in 0...@back_data.size @back_data = nil if @back_data[1] > 0 && !$game_switches[@back_data[1]] @back_data = nil if @back_data[1] < 0 && !$sv_camera.switches[@back_data[1].abs] end @back_data.compact! next_back_data end #-------------------------------------------------------------------------- # ● 次の背景データをセット #-------------------------------------------------------------------------- def next_back_data @back_data.delete(@active_data[11]) if @active_data[11] != nil @back_data.push(@active_data[11]) if @active_data[11] != nil @active_data = nil data = @back_data.pop @back_data = [@active_data] if @back_data.size == 0 start_back_data(data) end #-------------------------------------------------------------------------- # ● 背景データを运行 #-------------------------------------------------------------------------- def start_back_data(data) return if back_data_remain(data) bt_back_dispose pre_active_data = @active_data @active_data[8] = [@back_name, @move_x, @move_y, @scroll_x, @scroll_y] if @active_data != nil @back_data.push(@active_data) if @active_data != nil @active_data = data.dup @active_data[5] = @back_name if @active_data[5] == "" @active_data[9] = set_back_adjust if @active_data[9] == nil back_data_scroll_on if @active_data[8] == nil && @active_data[9][0] == false set_remain_back_data if @active_data[8] != nil create_back(@active_data[5]) if @active_data[9][0] == false create_back_adjust if @active_data[10] @active_data[11] = pre_active_data if pre_active_data && @active_data[7] == false end #-------------------------------------------------------------------------- # ● 背景データの保留 #-------------------------------------------------------------------------- def back_data_remain(data) remain = false remain = true if data[6] != "" && @active_data != nil && @active_data[9] != nil && @active_data[9][0] != false remain = true if @active_data != nil && @active_data[7] == false return remain if !remain @remain = true @back_data.push(data) return remain end #-------------------------------------------------------------------------- # ● 背景变更補正データをセット #-------------------------------------------------------------------------- def set_back_adjust bt_adjust = [] sign = -1 if @active_data[6] == "" reset_scroll if @active_data[3][0] == 0 && @active_data[3][1] == 0 bt_adjust = [false,false,0,0] return bt_adjust elsif @move_x != 0 or @active_data[3][0] != 0 sign = 1 if @move_x < 0 bt_adjust[0] = [self.bitmap.width * @zoom_x * sign, 0] bt_adjust[1] = [self.bitmap.width * @zoom_x * sign * 2, 0] elsif @move_y != 0 or @active_data[3][1] != 0 sign = 1 if @move_y < 0 bt_adjust[0] = [0, self.bitmap.height * @zoom_y * sign] bt_adjust[1] = [0, self.bitmap.height * @zoom_y * sign * 2] else reset_scroll if @active_data[3][0] == 0 && @active_data[3][1] == 0 bt_adjust = [false,false,0,0] return bt_adjust end bt_adjust[2] = [bt_adjust[0][0], bt_adjust[0][1]] return bt_adjust end #-------------------------------------------------------------------------- # ● 背景スクロールデータを运行 #-------------------------------------------------------------------------- def back_data_scroll_on mirror = $sv_camera.mirror mirror = false if !@active_data[4] @move_x = @active_data[3][0] @move_x *= -1 if mirror @move_y = @active_data[3][1] end #-------------------------------------------------------------------------- # ● 保持している背景データを运行 #-------------------------------------------------------------------------- def set_remain_back_data return back_data_scroll_on if @move_x != 0 or @move_y != 0 create_back(@active_data[8][0]) @move_x = @active_data[8][1] @move_y = @active_data[8][2] @scroll_x = @active_data[8][3] @scroll_y = @active_data[8][4] end #-------------------------------------------------------------------------- # ● 背景画像の作成 #-------------------------------------------------------------------------- def create_back(back_name) return if back_name == @back_name or back_name == "" self.bitmap = Cache.battleback1(back_name) if @index == 1 self.bitmap = Cache.battleback2(back_name) if @index == 2 @back_name = back_name end #-------------------------------------------------------------------------- # ● 背景变更補正画像の作成 #-------------------------------------------------------------------------- def create_back_adjust return if @active_data[9][0] == false @active_data[10] = true mirror = $sv_camera.mirror mirror = false if !@active_data[4] @bt_back = [] @bt_back[0] = Sprite.new(viewport) @bt_back[0].bitmap = Cache.battleback1(@active_data[6]) if @index == 1 @bt_back[0].bitmap = Cache.battleback2(@active_data[6]) if @index == 2 @bt_back[0].mirror = mirror @bt_back[1] = Sprite.new(viewport) @bt_back[1].bitmap = Cache.battleback1(@active_data[5]) if @index == 1 @bt_back[1].bitmap = Cache.battleback2(@active_data[5]) if @index == 2 @bt_back[1].mirror = mirror end #-------------------------------------------------------------------------- # ● 背景スクロールの更新 #-------------------------------------------------------------------------- def update_scroll @scroll_x += @move_x @scroll_y += @move_y @scroll_x = 0 if @scroll_x / 100 >= self.bitmap.width * @zoom_x or @scroll_x / 100 <= -self.bitmap.width * @zoom_x @scroll_y = 0 if @scroll_y / 100 >= self.bitmap.height * @zoom_y or @scroll_y / 100 <= -self.bitmap.height * @zoom_y end #-------------------------------------------------------------------------- # ● 色调变更の更新 #-------------------------------------------------------------------------- def update_color color_set if $sv_camera.color_set[@index] != nil return if @color_data == nil @color_data[4] -= 1 if @color_data[4] == 0 && @color_data[5] != 0 @color_data[4] = @color_data[5] @color_data[5] = 0 @color_data[6] = [0,0,0,0] elsif @color_data[4] == 0 @remain_color_data = @color_data return @color_data = nil end for i in 0..3 @color_data = (@color_data * (@color_data[4] - 1) + @color_data[6]) / @color_data[4] end self.color.set(@color_data[0], @color_data[1], @color_data[2], @color_data[3]) end #-------------------------------------------------------------------------- # ● 坐标の更新 #-------------------------------------------------------------------------- def update_position self.ox = $sv_camera.x + @base_x - @scroll_x / 100 self.oy = $sv_camera.y + @base_y - @scroll_y / 100 self.ox -= $sv_camera.sx / 100 if @shake_on self.oy -= $sv_camera.sy / 100 if @shake_on self.zoom_x = @zoom_x * $sv_camera.zoom self.zoom_y = @zoom_y * $sv_camera.zoom self.ox *= $sv_camera.zoom self.oy *= $sv_camera.zoom self.z = @index * 10 end #-------------------------------------------------------------------------- # ● 背景变更補正画像を更新 #-------------------------------------------------------------------------- def update_back_adjust @active_data[9][0][0] = 0 if @scroll_x == 0 @active_data[9][0][1] = 0 if @scroll_y == 0 @active_data[9][1][0] -= @active_data[9][2][0] if @scroll_x == 0 @active_data[9][1][1] -= @active_data[9][2][1] if @scroll_y == 0 for i in 0...@bt_back.size @bt_back.x = -self.ox + @active_data[9][0] * $sv_camera.zoom @bt_back.y = -self.oy + @active_data[9][1] * $sv_camera.zoom @bt_back.zoom_x = self.zoom_x @bt_back.zoom_y = self.zoom_y @bt_back.z = self.z + 1 @bt_back.color.set(@color_data[0], @color_data[1], @color_data[2], @color_data[3]) if @color_data != nil end back_data_scroll_on if @active_data[9][0][0] == 0 && @active_data[9][0][1] == 0 return unless @active_data[9][1][0] == 0 && @active_data[9][1][1] == 0 bt_back_dispose create_back(@active_data[5]) @active_data[9][0] = false next_back_data if @remain && @back_data.size != 1 @remain = false end #-------------------------------------------------------------------------- # ● 色调变更 #-------------------------------------------------------------------------- def color_set set = $sv_camera.color_set[@index] $sv_camera.color_set[@index] = nil set[4] = 1 if set[4] == 0 @remain_color_data = [0,0,0,0] if @remain_color_data == nil @color_data = @remain_color_data @color_data[4] = set[4] @color_data[5] = set[5] @color_data[6] = set end #-------------------------------------------------------------------------- # ● 背景变更補正画像の解放 #-------------------------------------------------------------------------- def bt_back_dispose for i in 0...@bt_back.size do @bt_back.dispose end if @bt_back != nil @bt_back = nil end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- def dispose bitmap.dispose if bitmap bt_back_dispose super end end #============================================================================== # ■ Battle_Camera #------------------------------------------------------------------------------ # 戦闘カメラやバトルプログラムを扱うクラスです。 #============================================================================== class Battle_Camera #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_reader :sx # 摇晃X坐标 attr_reader :sy # 摇晃Y坐标 attr_reader :max_top # 上限界坐标 attr_reader :max_bottom # 下限界坐标 attr_reader :max_left # 左限界坐标 attr_reader :max_right # 右限界坐标 attr_accessor :switches # サイドビュー専用スイッチ attr_accessor :color_set # 色调变更データ attr_accessor :wait # 戦闘シーンの强制ウエイト attr_accessor :win_wait # 戦闘勝利前のウエイト attr_accessor :mirror # 画面反转フラグ attr_accessor :program_scroll # バトルプログラム 背景の自动スクロール attr_accessor :program_picture # バトルプログラム 周期图片 attr_accessor :event # 常见イベント呼び出し #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize @switches = [] @max_data = [] @color_set = [] @wait = 0 @win_wait = false @mirror = false @event = false setup end #-------------------------------------------------------------------------- # ● カメラX坐标 #-------------------------------------------------------------------------- def x return @x / 100 end #-------------------------------------------------------------------------- # ● カメラY坐标 #-------------------------------------------------------------------------- def y return @y / 100 end #-------------------------------------------------------------------------- # ● ズーム率 #-------------------------------------------------------------------------- def zoom return @zoom * 0.001 end #-------------------------------------------------------------------------- # ● ズーム率による坐标变換 #-------------------------------------------------------------------------- def convert return @zoom end #-------------------------------------------------------------------------- # ● カメラセットアップ #-------------------------------------------------------------------------- def setup @x = 0 @y = 0 @sx = 0 @sy = 0 @zoom = 1000 @time = 0 @shake_time = 0 program_setup end #-------------------------------------------------------------------------- # ● カメラ初期化 #-------------------------------------------------------------------------- def reset @switches = [] @max_data = [] @color_set = [] @wait = 0 @win_wait = false @mirror = false program_setup(false) end #-------------------------------------------------------------------------- # ● バトルプログラムのセットアップ #-------------------------------------------------------------------------- def program_setup(check = true) @played_program = [] @program_switch = [] @program_sound = [] @program_scroll = [] @program_se = [] @program_shake = [] @program_color = [] @program_picture = [] @program_base = N03::BATTLE_PROGRAM.values.dup program_check if check end #-------------------------------------------------------------------------- # ● バトルプログラムのチェック #-------------------------------------------------------------------------- def program_check for data in @program_base if program_start?(data) && !@played_program.include?(data) @played_program.push(data.dup) @program_scroll.push(data.dup) if data[0] == "scroll" @program_picture.push(data.dup) if data[0] == "kpic" start_sound(data.dup) if data[0] == "sound" start_program_switch(data.dup) if data[0] == "switch" start_program_se(data.dup) if data[0] == "keep_se" start_program_shake(data.dup) if data[0] == "keep_sk" start_program_color(data.dup) if data[0] == "keep_c" else @played_program.delete(data) if !program_start?(data) @program_scroll.delete(data) if data[0] == "scroll" @program_picture.delete(data) if data[0] == "kpic" @program_switch.delete(data) if data[0] == "switch" @program_sound.delete(data) if data[0] == "sound" @program_se.delete(data) if data[0] == "keep_se" @program_shake.delete(data) if data[0] == "keep_sk" @program_color.delete(data) if data[0] == "keep_c" end end end #-------------------------------------------------------------------------- # ● バトルプログラムの开始 #-------------------------------------------------------------------------- def program_start?(data) start = false start = true if $game_switches[data[1].abs] && data[1] > 0 start = true if @switches[data[1].abs] && data[1] < 0 return start end #-------------------------------------------------------------------------- # ● バトルプログラム スイッチ操作の开始 #-------------------------------------------------------------------------- def start_program_switch(data) data[4] = data[4] + rand(data[5] + 1) data[4] = 1 if data[4] <= 0 @program_switch.push(data) end #-------------------------------------------------------------------------- # ● スイッチ操作の更新 #-------------------------------------------------------------------------- def update_program_switch for data in @program_switch data[4] -= 1 next @program_switch.delete(data) if data[1] > 0 && !$game_switches[data[1]] next @program_switch.delete(data) if data[1] < 0 && !@switches[data[1].abs] next if data[4] != 0 for id in data[2] $game_switches[id] = true if id > 0 @switches[id.abs] = true if id < 0 end for id in data[3] $game_switches[id] = false if id > 0 @switches[id.abs] = false if id < 0 end @program_switch.delete(data) program_check end end #-------------------------------------------------------------------------- # ● バトルプログラム BGM/BGSの开始 #-------------------------------------------------------------------------- def start_sound(data) @program_sound.push(data) name = data[5] case data[2] when "se" Audio.se_play("Audio/SE/" + name, data[4], data[3]) when "bgm" name = RPG::BGM.last.name if data[5] == "" Audio.bgm_play("Audio/BGM/" + name, data[4], data[3]) when "bgs" name = RPG::BGS.last.name if data[5] == "" Audio.bgs_play("Audio/BGS/" + name, data[4], data[3]) end end #-------------------------------------------------------------------------- # ● バトルプログラム 周期SEの开始 #-------------------------------------------------------------------------- def start_program_se(data) data[3] = [data[2], data[3]] data[2] = data[3][0] + rand(data[3][1] + 1) @program_se.push(data) Audio.se_play("Audio/SE/" + data[7], data[5], data[4]) if data[6] end #-------------------------------------------------------------------------- # ● 周期SEの更新 #-------------------------------------------------------------------------- def update_program_se for data in @program_se data[2] -= 1 next @program_se.delete(data) if data[1] > 0 && !$game_switches[data[1]] next @program_se.delete(data) if data[1] < 0 && !@switches[data[1].abs] next if data[2] != 0 Audio.se_play("Audio/SE/" + data[7], data[5], data[4]) data[2] = data[3][0] + rand(data[3][1] + 1) end end #-------------------------------------------------------------------------- # ● バトルプログラム 周期摇晃の开始 #-------------------------------------------------------------------------- def start_program_shake(data) data[3] = [data[2], data[3]] data[2] = data[3][0] + rand(data[3][1] + 1) @program_shake.push(data) shake(data[4], data[5], data[6]) if data[7] end #-------------------------------------------------------------------------- # ● 周期摇晃の更新 #-------------------------------------------------------------------------- def update_program_shake for data in @program_shake data[2] -= 1 next @program_shake.delete(data) if data[1] > 0 && !$game_switches[data[1]] next @program_shake.delete(data) if data[1] < 0 && !@switches[data[1].abs] next if data[2] != 0 shake(data[4], data[5], data[6]) data[2] = data[3][0] + rand(data[3][1] + 1) end end #-------------------------------------------------------------------------- # ● バトルプログラム 周期色调变更の开始 #-------------------------------------------------------------------------- def start_program_color(data) data[3] = [data[2], data[3]] data[2] = data[3][0] + rand(data[3][1] + 1) data[7] = true if data[4] == 0 or data[4] == 4 case data[4] when 1 ;data[4] = $game_troop.members when 2 ;data[4] = $game_party.battle_members when 3,4 ;data[4] = $game_troop.members + $game_party.battle_members else ;data[4] = [] end @program_color.push(data) return if !data[6] for target in data[4] do target.sv.color_set = data[5] end if data[4] != [] @color_set[1] = data[5] if data[7] @color_set[2] = data[5] if data[7] end #-------------------------------------------------------------------------- # ● 周期色调变更の更新 #-------------------------------------------------------------------------- def update_program_color for data in @program_color data[2] -= 1 next @program_color.delete(data) if data[1] > 0 && !$game_switches[data[1]] next @program_color.delete(data) if data[1] < 0 && !@switches[data[1].abs] next if data[2] != 0 for target in data[4] do target.sv.color_set = data[5] end if data[4] != [] @color_set[1] = data[5] if data[7] @color_set[2] = data[5] if data[7] data[2] = data[3][0] + rand(data[3][1] + 1) end end #-------------------------------------------------------------------------- # ● トランジション运行 #-------------------------------------------------------------------------- def perform_transition(data) Graphics.transition(data[2], "Graphics/Pictures/" + data[3], data[1]) end #-------------------------------------------------------------------------- # ● 背景からカメラの限界值を取得 data = [max_top, max_bottom, max_left, max_right] #-------------------------------------------------------------------------- def setting(index, data) @max_data[index - 1] = data return if index != 2 setup # カメラの中心坐标 @center_x = (Graphics.width / 2 + N03::CAMERA_POSITION[0]) * 100 @center_y = (Graphics.height / 2 + N03::CAMERA_POSITION[1]) * 100 # 上下左右の移动限界距離 @max_top = [@max_data[0][5], @max_data[1][5]].min * -1 @max_bottom = [@max_data[0][1], @max_data[1][1]].min + @max_top @max_left = [@max_data[0][4], @max_data[1][4]].min * -1 @max_right = [@max_data[0][3], @max_data[1][3]].min + @max_left exist_data = @max_data[0] if !@max_data[1][6] exist_data = @max_data[1] if !@max_data[0][6] @max_top = exist_data[5] * -1 if exist_data != nil @max_bottom = exist_data[1] + @max_top if exist_data != nil @max_left = exist_data[4] * -1 if exist_data != nil @max_right = exist_data[3] + @max_left if exist_data != nil @max_top = @max_bottom = @max_left = @max_right = 0 if !@max_data[1][6] && !@max_data[0][6] @max_width = @max_right - @max_left + Graphics.width @max_height = @max_bottom - @max_top + Graphics.height # ズームアウト限界值 max_zoom_x = 100 * Graphics.width / @max_width max_zoom_y = 100 * Graphics.height / @max_height @max_zoom_out = [max_zoom_x, max_zoom_y].max end #-------------------------------------------------------------------------- # ● カメラ移动 #-------------------------------------------------------------------------- def move(target_x, target_y, zoom, time, screen = true) # 戦闘背景以上のサイズまでズームアウトしないよう调整 @target_zoom = [zoom * 0.01, @max_zoom_out * 0.01].max target_x *= -1 if screen && @mirror # ズーム分の中心坐标補正 if screen && @target_zoom != 1 target_x = target_x + @center_x target_y = target_y + @center_y end adjust_x = @center_x * (@target_zoom - 1) / (@target_zoom ** 2 - @target_zoom) adjust_y = @center_y * (@target_zoom - 1) / (@target_zoom ** 2 - @target_zoom) adjust_x = 0 if adjust_x.nan? adjust_y = 0 if adjust_y.nan? adjust_x = @center_x if !screen && adjust_x == 0 adjust_y = @center_y if !screen && adjust_y == 0 @target_x = target_x - adjust_x.to_i @target_y = target_y - adjust_y.to_i @target_zoom = (@target_zoom * 1000).to_i @zoom = @zoom.to_i limit_test # 时间0の場合は即运行 return @time = time.abs if time != 0 @time = 1 update end #-------------------------------------------------------------------------- # ● 限界坐标の試算 #-------------------------------------------------------------------------- def limit_test new_width = @max_width * @target_zoom / 1000 new_height = @max_height * @target_zoom / 1000 new_max_right = @max_right - (@max_width - new_width) new_max_bottom = @max_bottom - (@max_height - new_height) # 画面の移动先が限界の場合、限界坐标をセット if @target_x < @max_left * 100 @target_x = @max_left * 100 end if @target_x > new_max_right * 100 @target_x = new_max_right * 100 end if @target_y < @max_top * 100 @target_y = @max_top * 100 end if @target_y > new_max_bottom * 100 @target_y = new_max_bottom * 100 end end #-------------------------------------------------------------------------- # ● 画面の摇晃 #-------------------------------------------------------------------------- def shake(power, speed, time) @shake_x = power[0] * 100 @shake_y = power[1] * 100 @power_time_base = @power_time = speed @shake_time = time update_shake end #-------------------------------------------------------------------------- # ● 摇晃の更新 #-------------------------------------------------------------------------- def update_shake @sx = (@sx * (@power_time - 1) + @shake_x) / @power_time @sy = (@sy * (@power_time - 1) + @shake_y) / @power_time @power_time -= 1 @shake_time -= 1 return @sx = @sy = 0 if @shake_time == 0 return if @power_time != 0 @power_time = @power_time_base @shake_x = @shake_x * -4 / 5 @shake_y = @shake_y * -4 / 5 end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update update_shake if @shake_time != 0 update_program return if @time == 0 @x = (@x * (@time - 1) + @target_x) / @time @y = (@y * (@time - 1) + @target_y) / @time @zoom = (@zoom * (@time - 1) + @target_zoom) / @time @time -= 1 end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update_program update_program_switch if @program_switch != [] update_program_se if @program_se != [] update_program_shake if @program_shake != [] update_program_color if @program_color != [] end end #============================================================================== # ■ Scene_Battle #------------------------------------------------------------------------------ # バトル画面の处理を行うクラスです。 #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● フレーム更新(基本) #-------------------------------------------------------------------------- alias update_basic_scene_battle_n03 update_basic def update_basic update_basic_scene_battle_n03 $sv_camera.update $sv_camera.wait = N03::TURN_END_WAIT + 1 if $sv_camera.win_wait camera_wait end #-------------------------------------------------------------------------- # ● カメラウェイト #-------------------------------------------------------------------------- def camera_wait process_event if $sv_camera.event $sv_camera.event = false if $sv_camera.event while $sv_camera.wait != 0 Graphics.update Input.update update_all_windows $game_timer.update $game_troop.update $sv_camera.update @spriteset.update update_info_viewport update_message_open $sv_camera.wait -= 1 if $sv_camera.wait > 0 $sv_camera.wait = 1 if $sv_camera.wait == 0 && @spriteset.effect? BattleManager.victory if $sv_camera.win_wait && $sv_camera.wait == 0 end end #-------------------------------------------------------------------------- # ● カメラウェイトのセット #-------------------------------------------------------------------------- def set_camera_wait(time) $sv_camera.wait = time camera_wait end #-------------------------------------------------------------------------- # ● エフェクト运行が终わるまでウェイト ★再定義 #-------------------------------------------------------------------------- def wait_for_effect end #-------------------------------------------------------------------------- # ● ターン开始 #-------------------------------------------------------------------------- alias turn_start_scene_battle_n03 turn_start def turn_start turn_start_scene_battle_n03 N03.camera(nil, N03::BATTLE_CAMERA["回合结束"].dup) end #-------------------------------------------------------------------------- # ● ターン终了 #-------------------------------------------------------------------------- alias turn_end_scene_battle_n03 turn_end def turn_end turn_end_scene_battle_n03 for member in $game_troop.members + $game_party.members N03.set_damage(member, member.sv.result_damage[0],member.sv.result_damage[1]) member.sv.result_damage = [0,0] @spriteset.set_damage_pop(member) if member.result.hp_damage != 0 or member.result.mp_damage != 0 end set_camera_wait(N03::TURN_END_WAIT) N03.camera(nil, N03::BATTLE_CAMERA["回合开始"].dup) if $game_party.inputable? @log_window.clear end #-------------------------------------------------------------------------- # ● 技能/物品の使用 ★再定義 #-------------------------------------------------------------------------- def use_item item = @subject.current_action.item display_item(item) @subject.use_item(item) refresh_status @targets = @subject.current_action.make_targets.compact @targets = [@subject] if @targets.size == 0 set_substitute(item) for time in item.repeats.times do play_sideview(@targets, item) end end_reaction(item) display_end_item end #-------------------------------------------------------------------------- # ● 技能/物品名の表示 #-------------------------------------------------------------------------- def display_item(item) return @log_window.display_use_item(@subject, item) if N03::BATTLE_LOG @log_window.off @skill_name_window = Window_Skill_name.new(item.name) unless N03::NO_DISPLAY_SKILL_ID.include?(item.id) && item.is_a?(RPG::Skill) end #-------------------------------------------------------------------------- # ● 技能/物品名の表示终了 #-------------------------------------------------------------------------- def display_end_item @skill_name_window.dispose if @skill_name_window != nil @skill_name_window = nil set_camera_wait(N03::ACTION_END_WAIT) if @subject.sv.derivation_skill_id == 0 @log_window.clear if N03::BATTLE_LOG end #-------------------------------------------------------------------------- # ● 反击/魔法反射/身代わり处理 #-------------------------------------------------------------------------- def end_reaction(item) end_substitute if @substitute != nil set_reflection(item) if @reflection_data != nil set_counter_attack if @counter_attacker != nil end #-------------------------------------------------------------------------- # ● 反击の发动 ★再定義 #-------------------------------------------------------------------------- def invoke_counter_attack(target, item) return if @subject.sv.counter_id != 0 @counter_attacker = [] if @counter_attacker == nil return apply_item_effects(apply_substitute(target, item), item) if !target.movable? @log_window.add_text(sprintf(Vocab::CounterAttack, target.name)) if N03::BATTLE_LOG target.sv.counter_id = target.sv.counter_skill_id @counter_attacker.push(target) end #-------------------------------------------------------------------------- # ● 魔法反射の发动 ★再定義 #-------------------------------------------------------------------------- def invoke_magic_reflection(target, item) return if @subject.sv.reflection_id != 0 @log_window.add_text(sprintf(Vocab::MagicReflection, target.name)) if N03::BATTLE_LOG target.sv.reflection_id = target.sv.reflection_anime_id end #-------------------------------------------------------------------------- # ● 身代わりの適用 ★再定義 #-------------------------------------------------------------------------- def apply_substitute(target, item) return target if @substitute == nil return target if !check_substitute(target, item) return @substitute end #-------------------------------------------------------------------------- # ● 身代わりセット #-------------------------------------------------------------------------- def set_substitute(item) @substitute = N03.get_enemy_unit(@subject).substitute_battler return if @substitute == nil s_targets = [] for i in [email protected] next if @targets == @substitute next if !check_substitute(@targets, item) @log_window.add_text(sprintf(Vocab::Substitute, @substitute.name, @targets.name)) @targets.sv.start_action(@targets.sv.substitute_receiver_start_action) s_targets.push(@targets) @targets = @substitute end return @substitute = nil if s_targets == [] @substitute.sv.set_target(s_targets) @substitute.sv.start_action(@substitute.sv.substitute_start_action) end #-------------------------------------------------------------------------- # ● 身代わり终了 #-------------------------------------------------------------------------- def end_substitute for member in @substitute.sv.target_battler member.sv.start_action(member.sv.substitute_receiver_end_action) end @substitute.sv.start_action(@substitute.sv.substitute_end_action) @substitute = nil end #-------------------------------------------------------------------------- # ● 反击 #-------------------------------------------------------------------------- def set_counter_attack pre_subject = @subject for attacker in @counter_attacker @subject = attacker item = $data_skills[attacker.sv.counter_skill_id] play_sideview([pre_subject], item) end # 同一カウンター者を考慮してカウンターIDの初期化は动作后に运行 for attacker in @counter_attacker do attacker.sv.counter_id = 0 end @subject = pre_subject @counter_attacker = nil end #-------------------------------------------------------------------------- # ● 魔法反射 #-------------------------------------------------------------------------- def set_reflection(item) @log_window.back_to(1) for data in @reflection_data @subject.sv.damage_action(@subject, item) N03.set_damage_anime_data([@subject], @subject, data) apply_item_effects(@subject, item) @spriteset.set_damage_pop(@subject) end set_camera_wait(N03.get_anime_time(@reflection_data[0][0])) @reflection_data = nil end #-------------------------------------------------------------------------- # ● サイドビュー动作运行 #-------------------------------------------------------------------------- def play_sideview(targets, item) @subject.sv.set_target(targets) return if @subject.sv.attack_action(item) == nil return if [email protected]? return if item.scope != 9 && item.scope != 10 && !N03.targets_alive?(targets) @subject.sv.start_action(@subject.sv.attack_action(item)) @subject.sv.unshift_action(@subject.sv.flash_action) if @subject.flash_flg @subject.sv.active = true @subject.sv.command_action = false loop do update_basic data = @subject.sv.play_data @targets = N03.s_targets(@subject) if data[0] == "second_targets_set" N03.targets_set(@subject) if data[0] == "targets_set" @immortal = N03.immortaling if data[0] == "no_collapse" && !N03.dead_attack?(@subject, item) @immortal = N03.unimmortaling if data[0] == "collapse" next set_move_anime(item) if @subject.sv.m_a_data != [] set_damage(item) if @subject.sv.set_damage break N03.derived_skill(@subject) if @subject.sv.derivation_skill_id != 0 break if @subject.sv.action_end or @subject.hidden? end @immortal = N03.unimmortaling if @immortal end #-------------------------------------------------------------------------- # ● ダメージの运行 #-------------------------------------------------------------------------- def set_damage(item) targets = @targets targets = [@subject.sv.individual_targets[0]] if @subject.sv.individual_targets.size != 0 for target in targets do damage_anime(targets.dup, target, item) end @subject.sv.set_damage = false @subject.sv.damage_anime_data = [] end #-------------------------------------------------------------------------- # ● ダメージ战斗动画处理 #-------------------------------------------------------------------------- def damage_anime(targets, target, item) @log_window.back_to(1) if @log_window.line_number == 5 return if item.scope != 9 && item.scope != 10 && target.dead? @miss = false invoke_item(target,item) if target.result.missed target.sv.miss_action(@subject, item) return @miss = true elsif target.result.evaded or target.sv.counter_id != 0 target.sv.evasion_action(@subject, item) return @miss = true elsif target.sv.reflection_id != 0 N03.set_damage_anime_data(targets, target, [target.sv.reflection_id, false, false, true]) target.sv.reflection_id = 0 @reflection_data = [] if @reflection_data == nil return @reflection_data.push([N03.get_attack_anime_id(-3, @subject), false, false, true]) end target.sv.damage_action(@subject, item) N03.set_damage(@subject, -target.result.hp_drain, -target.result.mp_drain) if target != @subject @spriteset.set_damage_pop(target) @spriteset.set_damage_pop(@subject) if target != @subject && @subject.result.hp_damage != 0 or @subject.result.mp_damage != 0 N03.set_damage_anime_data(targets, target, @subject.sv.damage_anime_data) if @subject.sv.damage_anime_data != [] end #-------------------------------------------------------------------------- # ● 飛ばし动画处理 #-------------------------------------------------------------------------- def set_move_anime(item) for data in @subject.sv.m_a_data @subject.sv.damage_anime_data = data[4] hit_targets = [] for target in data[1] damage_anime(data[1], target, item) if data[0] hit_targets.push(target) if !@miss end @miss = false if !data[3] @spriteset.set_hit_animation(@subject, data[2], hit_targets, @miss) end @subject.sv.set_damage = false @subject.sv.m_a_data = [] end end #============================================================================== # ■ DataManager #------------------------------------------------------------------------------ # データベースとゲームオブジェクトを管理するモジュールです。 #============================================================================== module DataManager #-------------------------------------------------------------------------- # ● 各種ゲームオブジェクトの作成 ★再定義 #-------------------------------------------------------------------------- def self.create_game_objects $game_temp = Game_Temp.new $game_system = Game_System.new $game_timer = Game_Timer.new $game_message = Game_Message.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.new $game_actors = Game_Actors.new $game_party = Game_Party.new $game_troop = Game_Troop.new $game_map = Game_Map.new $game_player = Game_Player.new $sv_camera = Battle_Camera.new end end #============================================================================== # ■ BattleManager #------------------------------------------------------------------------------ # 戦闘の進行を管理するモジュールです。 #============================================================================== module BattleManager #-------------------------------------------------------------------------- # ● エンカウント時の处理 ★再定義 #-------------------------------------------------------------------------- def self.on_encounter @preemptive = (rand < rate_preemptive) @surprise = (rand < rate_surprise && !@preemptive) $sv_camera.mirror = @surprise if N03::BACK_ATTACK end #-------------------------------------------------------------------------- # ● 勝利の处理 ★再定義 #-------------------------------------------------------------------------- def self.process_victory $sv_camera.win_wait = true end #-------------------------------------------------------------------------- # ● 勝利 #-------------------------------------------------------------------------- def self.victory $sv_camera.win_wait = false N03.camera(nil, N03::BATTLE_CAMERA["战斗结束时"].dup) for member in $game_party.members do member.sv.start_action(member.sv.win) if member.movable? end play_battle_end_me replay_bgm_and_bgs $game_message.add(sprintf(Vocab::Victory, $game_party.name)) display_exp gain_gold gain_drop_items gain_exp SceneManager.return battle_end(0) return true end #-------------------------------------------------------------------------- # ● 逃走の处理 ★再定義 #-------------------------------------------------------------------------- def self.process_escape $game_message.add(sprintf(Vocab::EscapeStart, $game_party.name)) success = @preemptive ? true : (rand < @escape_ratio) Sound.play_escape if success process_abort for member in $game_party.members do member.sv.start_action(member.sv.escape) if member.movable? end else @escape_ratio += 0.1 $game_message.add('\.' + Vocab::EscapeFailure) $game_party.clear_actions for member in $game_party.members do member.sv.start_action(member.sv.escape_ng) if member.movable? end end wait_for_message return success end #-------------------------------------------------------------------------- # ● 次の指令输入へ ★再定義 #-------------------------------------------------------------------------- def self.next_command begin if !actor || !actor.next_command $game_party.battle_members[@actor_index].sv.command_action = true @actor_index += 1 if @actor_index >= $game_party.members.size for member in $game_party.battle_members.reverse break member.sv.start_action(member.sv.command_a) if member.inputable? end return false end end end until actor.inputable? actor.sv.start_action(actor.sv.command_b) if actor != nil && actor.inputable? if pre_actor pre_actor.sv.start_action(pre_actor.sv.command_a) if pre_actor != nil && pre_actor.inputable? end return true end #-------------------------------------------------------------------------- # ● 前の指令输入へ ★再定義 #-------------------------------------------------------------------------- def self.prior_command begin if !actor || !actor.prior_command $game_party.battle_members[@actor_index].sv.command_action = false @actor_index -= 1 if @actor_index < 0 for member in $game_party.battle_members break member.sv.start_action(member.sv.command_a) if member.inputable? end return false end end end until actor.inputable? actor.make_actions if actor.inputable? actor.sv.start_action(actor.sv.command_b) if actor.inputable? after_actor.sv.start_action(after_actor.sv.command_a) if after_actor != nil && after_actor.inputable? return true end #-------------------------------------------------------------------------- # ● 指令输入前のアクターを取得 #-------------------------------------------------------------------------- def self.pre_actor return if @actor_index == 0 $game_party.members[@actor_index - 1] end #-------------------------------------------------------------------------- # ● 指令输入后のアクターを取得 #-------------------------------------------------------------------------- def self.after_actor $game_party.members[@actor_index + 1] end #-------------------------------------------------------------------------- # ● 戦闘行动者を前に追加 #-------------------------------------------------------------------------- def self.unshift_action_battlers(battler) @action_battlers.unshift(battler) end end #============================================================================== # ■ Game_Battler #------------------------------------------------------------------------------ # スプライトや行动に関するメソッドを追加したバトラーのクラスです。 #============================================================================== class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_reader :sv # サイドビューデータ attr_accessor :flash_flg # 閃きフラグ #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias initialize_game_battler_n03 initialize def initialize initialize_game_battler_n03 @sv = SideView.new(self) end #-------------------------------------------------------------------------- # ● 現在の戦闘行动を除去 #-------------------------------------------------------------------------- alias remove_current_action_game_battler_n03 remove_current_action def remove_current_action return @sv.derivation_skill_id = 0 if @sv.derivation_skill_id != 0 remove_current_action_game_battler_n03 end #-------------------------------------------------------------------------- # ● ターン终了处理 #-------------------------------------------------------------------------- alias on_turn_end_game_battler_n03 on_turn_end def on_turn_end on_turn_end_game_battler_n03 @sv.add_state = [] @sv.result_damage = [@result.hp_damage, @result.mp_damage] end #-------------------------------------------------------------------------- # ● パラメータ条件比較 data = [类别, 数值, 区别] #-------------------------------------------------------------------------- def comparison_parameter(data) return true if data[0][0] == 0 kind = data[0] num = data[1] select = data[2] case kind when 1 ; par = level when 2 ; par = mhp when 3 ; par = mmp when 4 ; par = hp when 5 ; par = mp when 6 ; par = tp when 7 ; par = atk when 8 ; par = self.def when 9 ; par = mat when 10 ; par = mdf when 11 ; par = agi when 12 ; par = luk end if num < 0 case kind when 4 ; num = mhp * num / 100 when 5 ; num = mmp * num / 100 when 6 ; num = max_tp * num / 100 end num = num.abs end case select when 0 ; return par == num when 1 ; return par < num when 2 ; return par > num end end #-------------------------------------------------------------------------- # ● 装备条件比較 data = [装备类别, タイプID] #-------------------------------------------------------------------------- def comparison_equip(data) kind = data[0] items = weapons if kind == 0 items = armors if kind == 1 for item in items for id in data[1] return true if id > 0 && item.is_a?(RPG::Weapon) && item == $data_weapons[id.abs] return true if id > 0 && item.is_a?(RPG::Armor) && item == $data_armors[id.abs] return true if id < 0 && item.is_a?(RPG::Weapon) && item.wtype_id == id.abs return true if id < 0 && item.is_a?(RPG::Armor) && item.stype_id == id.abs end end return false end end #============================================================================== # ■ Game_Actor #------------------------------------------------------------------------------ # アクターを扱うクラスです。 #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_reader :actor_id # ID #-------------------------------------------------------------------------- # ● ID #-------------------------------------------------------------------------- def id return @actor_id end #-------------------------------------------------------------------------- # ● スプライトを使うか? ★再定義 #-------------------------------------------------------------------------- def use_sprite? return true end #-------------------------------------------------------------------------- # ● ダメージ効果の运行 ★再定義 #-------------------------------------------------------------------------- def perform_damage_effect return if !N03::ACTOR_DAMAGE $game_troop.screen.start_shake(5, 5, 10) @sprite_effect_type = :blink Sound.play_actor_damage end end #============================================================================== # ■ Game_Enemy #------------------------------------------------------------------------------ # 敵キャラを扱うクラスです。 #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_reader :enemy_id # ID #-------------------------------------------------------------------------- # ● ID #-------------------------------------------------------------------------- def id return @enemy_id end #-------------------------------------------------------------------------- # ● レベル #-------------------------------------------------------------------------- def level return @sv.level end #-------------------------------------------------------------------------- # ● ダメージ効果の运行 ★再定義 #-------------------------------------------------------------------------- def perform_damage_effect return if !N03::ENEMY_DAMAGE @sprite_effect_type = :blink Sound.play_enemy_damage end #-------------------------------------------------------------------------- # ● 武器 #-------------------------------------------------------------------------- def weapons weapon1 = $data_weapons[@sv.enemy_weapon1_id] weapon2 = $data_weapons[@sv.enemy_weapon2_id] return [weapon1, weapon2] end #-------------------------------------------------------------------------- # ● 防具 #-------------------------------------------------------------------------- def armors return [$data_armors[@sv.enemy_shield_id]] end #-------------------------------------------------------------------------- # ● 二刀流の判定 #-------------------------------------------------------------------------- def dual_wield? return $data_weapons[@sv.enemy_weapon2_id] != nil end #-------------------------------------------------------------------------- # ● バトラー画像变更 #-------------------------------------------------------------------------- def graphics_change(battler_name) @battler_name = battler_name end #-------------------------------------------------------------------------- # ● 通常攻击 动画ーション ID の取得 #-------------------------------------------------------------------------- def atk_animation_id1 return weapons[0].animation_id if weapons[0] return weapons[1] ? 0 : 1 end #-------------------------------------------------------------------------- # ● 通常攻击 动画ーション ID の取得(二刀流:武器2) #-------------------------------------------------------------------------- def atk_animation_id2 return weapons[1] ? weapons[1].animation_id : 0 end end #============================================================================== # ■ Sprite_Base #------------------------------------------------------------------------------ # 动画ーションの表示处理を追加したスプライトのクラスです。 #============================================================================== class Sprite_Base < Sprite #-------------------------------------------------------------------------- # ● 动画ーションの坐标更新 (ホーミングあり) #-------------------------------------------------------------------------- def update_animation_position_horming return if @action_end_cancel ani_ox_set if @horming camera_zoom = $sv_camera.zoom camera_zoom = 1 if @move_anime kind = 1 kind = -1 if @ani_mirror && !@anime_no_mirror cell_data = @animation.frames[@animation.frame_max - (@ani_duration + @ani_rate - 1) / @ani_rate].cell_data for i in 0..15 @ani_sprites.x = (@ani_ox + cell_data[i, 1] * kind - $sv_camera.x) * camera_zoom if @ani_sprites != nil && cell_data[i, 1] != nil @ani_sprites.y = (@ani_oy + cell_data[i, 2] - $sv_camera.y) * camera_zoom if @ani_sprites != nil && cell_data[i, 2] != nil end end #-------------------------------------------------------------------------- # ● 动画ーション元の坐标をセット #-------------------------------------------------------------------------- def ani_ox_set if !SceneManager.scene_is?(Scene_Battle) @real_x = x @real_y = y end @ani_ox = @real_x - ox + width / 2 @ani_oy = @real_y - oy + height / 2 @ani_oy -= height / 2 if @animation.position == 0 @ani_oy += height / 2 if @animation.position == 2 end #-------------------------------------------------------------------------- # ● 动画ーションの更新 #-------------------------------------------------------------------------- alias update_animation_sprite_base_n03 update_animation def update_animation update_animation_position_horming if animation? && SceneManager.scene_is?(Scene_Battle) && @animation.position != 3 update_animation_sprite_base_n03 end #-------------------------------------------------------------------------- # ● 动画ーションの原点設定 ★再定義 #-------------------------------------------------------------------------- def set_animation_origin return ani_ox_set if @animation.position != 3 if viewport == nil @ani_ox = Graphics.width / 2 @ani_oy = Graphics.height / 2 else @ani_ox = viewport.rect.width / 2 @ani_oy = viewport.rect.height / 2 end end #-------------------------------------------------------------------------- # ● 动画ーションスプライトの設定 ★再定義 #-------------------------------------------------------------------------- def animation_set_sprites(frame) camera_zoom = 1 camera_zoom = $sv_camera.zoom if @anime_camera_zoom && @animation.position != 3 && SceneManager.scene_is?(Scene_Battle) camera_x = $sv_camera.x camera_y = $sv_camera.y camera_x = camera_y = 0 if @animation.position == 3 or !SceneManager.scene_is?(Scene_Battle) plus_z = 5 plus_z = 1000 if @animation.position == 3 plus_z = -17 if @plus_z != nil && @plus_z == false plus_z = -self.z + 10 if @plus_z != nil && @plus_z == false && @animation.position == 3 cell_data = frame.cell_data @ani_sprites.each_with_index do |sprite, i| next unless sprite pattern = cell_data[i, 0] if !pattern || pattern < 0 sprite.visible = false next end sprite.bitmap = pattern < 100 ? @ani_bitmap1 : @ani_bitmap2 sprite.visible = true sprite.src_rect.set(pattern % 5 * 192, pattern % 100 / 5 * 192, 192, 192) if @ani_mirror && !@anime_no_mirror sprite.x = (@ani_ox - cell_data[i, 1] - camera_x) * camera_zoom sprite.y = (@ani_oy + cell_data[i, 2] - camera_y) * camera_zoom sprite.angle = (360 - cell_data[i, 4]) sprite.mirror = (cell_data[i, 5] == 0) else sprite.x = (@ani_ox + cell_data[i, 1] - camera_x) * camera_zoom sprite.y = (@ani_oy + cell_data[i, 2] - camera_y) * camera_zoom sprite.angle = cell_data[i, 4] sprite.mirror = (cell_data[i, 5] == 1) end sprite.z = self.z + plus_z + i sprite.ox = 96 sprite.oy = 96 sprite.zoom_x = cell_data[i, 3] * camera_zoom / 100.0 sprite.zoom_y = cell_data[i, 3] * camera_zoom/ 100.0 sprite.opacity = cell_data[i, 6] * self.opacity / 255.0 sprite.blend_type = cell_data[i, 7] end end #-------------------------------------------------------------------------- # ● 子スプライトフラグ #-------------------------------------------------------------------------- def set(battler, horming, camera_zoom, no_mirror) @battler = battler @next = true self.bitmap = Bitmap.new(@battler.sv.cw, @battler.sv.ch) self.ox = bitmap.width / 2 self.oy = bitmap.height @horming = horming @anime_camera_zoom = camera_zoom @anime_no_mirror = no_mirror @battler.sv.reset_anime_data end #-------------------------------------------------------------------------- # ● 子スプライト坐标セット #-------------------------------------------------------------------------- def set_position(z, zoom_x, zoom_y, real_x, real_y) self.z = z self.zoom_x = zoom_x self.zoom_y = zoom_y @real_x = real_x @real_y = real_y end #-------------------------------------------------------------------------- # ● 他スプライトへのタイミング处理 #-------------------------------------------------------------------------- def other_process_timing(timing) se_flag = true se_flag = @se_flag if @se_flag != nil @battler.sv.timing.push([se_flag, timing.dup]) end #-------------------------------------------------------------------------- # ● 他バトラーへのタイミング处理 #-------------------------------------------------------------------------- def target_battler_process_timing(timing) for target in @timing_targets target.sv.timing.push([false, timing.dup]) end end #-------------------------------------------------------------------------- # ● SE とフラッシュのタイミング处理 #-------------------------------------------------------------------------- alias animation_process_timing_sprite_base_n03 animation_process_timing def animation_process_timing(timing) target_battler_process_timing(timing) if @timing_targets && @timing_targets != [] return other_process_timing(timing) if @next != nil animation_process_timing_sprite_base_n03(timing) end #-------------------------------------------------------------------------- # ● 动画ーションの解放 #-------------------------------------------------------------------------- alias dispose_animation_sprite_base_n03 dispose_animation def dispose_animation dispose_animation_sprite_base_n03 end end #============================================================================== # ■ Sprite_Battler #------------------------------------------------------------------------------ # バトラー表示用のスプライトです。 #============================================================================== class Sprite_Battler < Sprite_Base #-------------------------------------------------------------------------- # ● 公开インスタンス变数 #-------------------------------------------------------------------------- attr_accessor :removing # パーティ離脱中 #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias initialize_sprite_battler_n03 initialize def initialize(viewport, battler = nil) initialize_sprite_battler_n03(viewport, battler) @real_x = @real_y = 0 update_bitmap if @battler != nil end #-------------------------------------------------------------------------- # ● 动画ーションの开始 ★再定義 #-------------------------------------------------------------------------- def start_animation(animation, mirror = false) return next_animation(animation, mirror) if animation? @animation = animation if @animation @horming = @battler.sv.anime_horming @anime_camera_zoom = @battler.sv.anime_camera_zoom @anime_no_mirror = @battler.sv.anime_no_mirror @timing_targets = @battler.sv.timing_targets @plus_z = @battler.sv.anime_plus_z @battler.sv.reset_anime_data @ani_mirror = mirror set_animation_rate @ani_duration = @animation.frame_max * @ani_rate + 1 load_animation_bitmap make_animation_sprites set_animation_origin end end #-------------------------------------------------------------------------- # ● 次の动画を开始 #-------------------------------------------------------------------------- def next_animation(animation, mirror) @next_anime = [] if @next_anime == nil @next_anime.push(Sprite_Base.new(viewport)) @next_anime[@next_anime.size - 1].set(battler, @battler.sv.anime_horming, @battler.sv.anime_camera_zoom, @battler.sv.anime_no_mirror) @next_anime[@next_anime.size - 1].set_position(self.z, self.zoom_x, self.zoom_y, @real_x, @real_y) @next_anime[@next_anime.size - 1].start_animation(animation, mirror) end #-------------------------------------------------------------------------- # ● 影グラフィック作成 #-------------------------------------------------------------------------- def create_shadow reset_shadow return if @battler.sv.shadow == false @shadow = Sprite.new(viewport) if @shadow == nil @shadow.bitmap = Cache.character(@battler.sv.shadow) @shadow.ox = @shadow.bitmap.width / 2 @shadow.oy = @shadow.bitmap.height / 2 end #-------------------------------------------------------------------------- # ● 影グラフィック初期化 #-------------------------------------------------------------------------- def reset_shadow return if @shadow == nil @shadow.dispose @shadow = nil end #-------------------------------------------------------------------------- # ● 旋送元ビットマップの更新 ★再定義 #-------------------------------------------------------------------------- def update_bitmap update_bitmap_enemy if [email protected]? update_bitmap_actor if @battler.actor? update_src_rect if @battler != nil update_color if @battler != nil end #-------------------------------------------------------------------------- # ● 旋送元ビットマップ:敌人 #-------------------------------------------------------------------------- def update_bitmap_enemy if @battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue @battler_name = @battler.battler_name @battler_hue = @battler.battler_hue @battler_graphic_file_index = @battler.sv.graphic_file_index @graphic_mirror_flag = @battler.sv.graphic_mirror_flag self.bitmap = Cache.battler(@battler_name + @battler_graphic_file_index, @battler_hue) @battler.sv.setup(self.bitmap.width, self.bitmap.height, @battler_id != @battler.id) create_shadow init_visibility @battler_id = @battler.id end end #-------------------------------------------------------------------------- # ● 旋送元ビットマップ:アクター #-------------------------------------------------------------------------- def update_bitmap_actor if @battler.character_name != @battler_name or @battler.character_index != @battler_index @battler_name = @battler.character_name @battler_index = @battler.character_index @battler_graphic_file_index = @battler.sv.graphic_file_index @graphic_mirror_flag = @battler.sv.graphic_mirror_flag self.bitmap = Cache.character(@battler_name + @battler_graphic_file_index) @battler.sv.setup(self.bitmap.width, self.bitmap.height, @battler_id != @battler.id) create_shadow init_visibility @battler_id = @battler.id end end #-------------------------------------------------------------------------- # ● 可視状態の初期化 ★再定義 #-------------------------------------------------------------------------- def init_visibility @battler_visible = @battler.alive? @battler_visible = true if @battler.sv.state(1) != "敌人崩溃" @battler_visible = false if @battler.hidden? @battler.sv.opacity = 0 unless @battler_visible self.opacity = 0 unless @battler_visible self.opacity = 255 if @battler_visible @battler.sv.weapon_visible = @battler_visible end #-------------------------------------------------------------------------- # ● 旋送元矩形の更新 #-------------------------------------------------------------------------- def update_src_rect return if @battler.sv.collapse if @battler_graphic_file_index != @battler.sv.graphic_file_index @battler_graphic_file_index = @battler.sv.graphic_file_index self.bitmap = Cache.character(@battler_name + @battler_graphic_file_index) if @battler.actor? self.bitmap = Cache.battler(@battler_name + @battler_graphic_file_index, @battler_hue) if [email protected]? @battler.sv.set_graphics(self.bitmap.width, self.bitmap.height) end anime_off if @battler.sv.anime_off self.src_rect.set(@battler.sv.sx, @battler.sv.sy, @battler.sv.cw, @battler.sv.ch) self.opacity = @battler.sv.opacity if @battler_visible set_process_timing(@battler.sv.timing) if @battler && @battler.sv.timing != [] end #-------------------------------------------------------------------------- # ● 位置の更新 ★再定義 #-------------------------------------------------------------------------- def update_position @real_x = @battler.sv.x / 100 @real_y = (@battler.sv.y - @battler.sv.h - @battler.sv.j - @battler.sv.c - @battler.sv.oy_adjust)/ 100 self.x = @real_x - $sv_camera.x self.y = @real_y - $sv_camera.y self.z = @battler.sv.z - @battler.sv.c / 100 if @battler.sv.h <= 0 self.x += $sv_camera.sx / 100 self.y += $sv_camera.sy / 100 end self.x *= $sv_camera.zoom self.y *= $sv_camera.zoom end #-------------------------------------------------------------------------- # ● 原点の更新 ★再定義 #-------------------------------------------------------------------------- def update_origin return if !bitmap or @battler.sv.collapse self.ox = @battler.sv.ox self.oy = @battler.sv.oy self.angle = @battler.sv.angle self.zoom_x = @battler.sv.zoom_x * $sv_camera.zoom self.zoom_y = @battler.sv.zoom_y * $sv_camera.zoom self.mirror = @battler.sv.mirror if !@graphic_mirror_flag self.mirror = [email protected] if @graphic_mirror_flag end #-------------------------------------------------------------------------- # ● 影グラフィックの更新 #-------------------------------------------------------------------------- def update_shadow @shadow.visible = @battler.sv.shadow_visible @shadow.opacity = @battler.sv.opacity if @battler.sv.opacity_data[3] @shadow.opacity = self.opacity if [email protected]_data[3] @shadow.x = @real_x - $sv_camera.x @shadow.y = (@battler.sv.y - @battler.sv.c)/ 100 - $sv_camera.y @shadow.z = @battler.sv.z - 10 @shadow.zoom_x = $sv_camera.zoom @shadow.zoom_y = $sv_camera.zoom @shadow.x += $sv_camera.sx / 100 @shadow.y += $sv_camera.sy / 100 @shadow.x *= $sv_camera.zoom @shadow.y *= $sv_camera.zoom @shadow.color.set(@color_data[0], @color_data[1], @color_data[2], @color_data[3]) if @color_data != nil end #-------------------------------------------------------------------------- # ● ふきだしの更新 #-------------------------------------------------------------------------- def update_balloon if @battler.sv.balloon_data == [] && @balloon @balloon_data = [] @balloon.dispose return @balloon = nil elsif @battler.sv.balloon_data != [] && @battler.sv.balloon_data != @balloon_data @balloon_data = @battler.sv.balloon_data @balloon = Sprite.new(self.viewport) @balloon.bitmap = Cache.system("Balloon") @balloon.zoom_x = @balloon_data[3] @balloon.zoom_y = @balloon_data[3] @balloon.ox = 32 if @battler.sv.mirror @balloon.oy = 16 @balloon_count = 0 end return if !@balloon @balloon.opacity = self.opacity @balloon.x = self.x @balloon.y = self.y - @battler.sv.ch * $sv_camera.zoom @balloon.z = self.z + 20 @balloon.src_rect.set(32 + @balloon_count / @balloon_data[2] * 32, @balloon_data[1] * 32, 32, 32) if @balloon_count % @balloon_data[2] == 0 @balloon.color.set(@color_data[0], @color_data[1], @color_data[2], @color_data[3]) if @color_data != nil @balloon_count += 1 @balloon_count = 0 if @balloon_count == @balloon_data[2] * 7 end #-------------------------------------------------------------------------- # ● 色调变更の更新 #-------------------------------------------------------------------------- def update_color color_set if @battler.sv.color_set != [] return if @color_data == nil @color_data[4] -= 1 if @color_data[4] == 0 && @color_data[5] != 0 @color_data[4] = @color_data[5] @color_data[5] = 0 @color_data[6] = [0,0,0,0] elsif @color_data[4] == 0 @remain_color_data = @color_data @battler.sv.color = @color_data.dup return @color_data = nil end for i in 0..3 @color_data = (@color_data * (@color_data[4] - 1) + @color_data[6]) / @color_data[4] end @battler.sv.color = @color_data.dup self.color.set(@color_data[0], @color_data[1], @color_data[2], @color_data[3]) end #-------------------------------------------------------------------------- # ● 残像の更新 #-------------------------------------------------------------------------- def update_mirage if @battler.sv.mirage == [] && @mirages @mirage_data = [] for mirage in @mirages do mirage.dispose end return @mirages = nil elsif @battler.sv.mirage != [] && @battler.sv.mirage != @mirage_data @mirage_data = @battler.sv.mirage @mirages = [] for i in 0...@mirage_data[1] do @mirages = Sprite.new(self.viewport) end @mirage_count = 0 end return if !@mirages @mirage_count += 1 @mirage_count = 0 if @mirage_count == @mirage_data[2] * @mirages.size for i in [email protected] mirage_body(@mirages, @mirage_data[4]) if @mirage_count == 1 + i * @mirage_data[2] end end #-------------------------------------------------------------------------- # ● 残像本体 #-------------------------------------------------------------------------- def mirage_body(body, opacity) body.bitmap = self.bitmap.dup body.x = self.x body.y = self.y body.ox = self.ox body.oy = self.oy body.z = self.z - 20 body.mirror = self.mirror body.angle = self.angle body.opacity = opacity * self.opacity / 255 body.zoom_x = self.zoom_x body.zoom_y = self.zoom_y body.src_rect.set(@battler.sv.sx, @battler.sv.sy, @battler.sv.cw, @battler.sv.ch) body.color.set(@color_data[0], @color_data[1], @color_data[2], @color_data[3]) if @color_data != nil end #-------------------------------------------------------------------------- # ● 次の动画を更新 #-------------------------------------------------------------------------- def update_next_anime return if !@next_anime for anime in @next_anime anime.update anime.set_position(self.z, self.zoom_x, self.zoom_y, @real_x, @real_y) if @horming anime.dispose if !anime.animation? @next_anime.delete(anime) if !anime.animation? end end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- alias update_sprite_battler_n03 update def update @battler.sv.update if @battler update_sprite_battler_n03 update_next_anime update_shadow if @battler && @shadow update_mirage if @battler update_balloon if @battler update_remove if @battler && @removing && @battler.sv.change_up end #-------------------------------------------------------------------------- # ● 战斗动画消去 #-------------------------------------------------------------------------- def anime_off @battler.sv.anime_off = false dispose_animation for anime in @next_anime do anime.dispose_animation end if @next_anime end #-------------------------------------------------------------------------- # ● バトラー入れ替え #-------------------------------------------------------------------------- def remove @battler.sv.start_action(@battler.sv.remove_action) $sv_camera.wait = 40 @battler.sv.add_action("eval('set_change')") @removing = true end #-------------------------------------------------------------------------- # ● バトラー入れ替えの更新 #-------------------------------------------------------------------------- def update_remove @battler.sv.change_up = false @removing = false @battler = nil end #-------------------------------------------------------------------------- # ● バトラー加入 #-------------------------------------------------------------------------- def join(join_battler) $sv_camera.wait = 30 @battler = join_battler @battler_name = @battler.character_name @battler_index = @battler.character_index @battler_graphic_file_index = @battler.sv.graphic_file_index self.bitmap = Cache.character(@battler_name) @battler.sv.setup(self.bitmap.width, self.bitmap.height, true) create_shadow init_visibility end #-------------------------------------------------------------------------- # ● 通常の設定に戻す ★再定義 #-------------------------------------------------------------------------- def revert_to_normal self.blend_type = 0 self.opacity = 255 end #-------------------------------------------------------------------------- # ● 崩壊エフェクトの更新 #-------------------------------------------------------------------------- alias update_collapse_sprite_battler_n03 update_collapse def update_collapse return if @battler.sv.state(1) != "敌人崩溃" update_collapse_sprite_battler_n03 @battler.sv.weapon_visible = false end #-------------------------------------------------------------------------- # ● ボス崩壊エフェクトの更新 ★再定義 #-------------------------------------------------------------------------- def update_boss_collapse @effect_duration = @battler.sv.ch if @effect_duration >= @battler.sv.ch alpha = @effect_duration * 120 / @battler.sv.ch self.ox = @battler.sv.cw / 2 + @effect_duration % 2 * 4 - 2 self.blend_type = 1 self.color.set(255, 255, 255, 255 - alpha) self.opacity = alpha self.src_rect.y -= 1 Sound.play_boss_collapse2 if @effect_duration % 20 == 19 end #-------------------------------------------------------------------------- # ● 別スプライトからのタイミング处理 #-------------------------------------------------------------------------- def set_process_timing(timing_data) for data in timing_data set_timing(data[0],data[1]) end @battler.sv.timing = [] end #-------------------------------------------------------------------------- # ● タイミング处理 #-------------------------------------------------------------------------- def set_timing(se_flag, data) @ani_rate = 4 data.se.play if se_flag case data.flash_scope when 1 ;self.flash(data.flash_color, data.flash_duration * @ani_rate) when 2 ;viewport.flash(data.flash_color, data.flash_duration * @ani_rate) if viewport when 3 ;self.flash(nil, data.flash_duration * @ani_rate) end end #-------------------------------------------------------------------------- # ● 色调变更 #-------------------------------------------------------------------------- def color_set set = @battler.sv.color_set @battler.sv.color_set= [] set[4] = 1 if set[4] == 0 @remain_color_data = [0,0,0,0] if @remain_color_data == nil @color_data = @remain_color_data @color_data[4] = set[4] @color_data[5] = set[5] @color_data[6] = set end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- alias dispose_sprite_battler_n03 dispose def dispose dispose_sprite_battler_n03 @shadow.dispose if @shadow != nil @balloon.dispose if @balloon != nil for mirage in @mirages do mirage.dispose end if @mirages != nil for anime in @next_anime do anime.dispose end if @next_anime end end #============================================================================== # ■ Spriteset_Battle #------------------------------------------------------------------------------ # バトル画面のスプライトをまとめたクラスです。 #============================================================================== class Spriteset_Battle #-------------------------------------------------------------------------- # ● 戦闘背景(床)スプライトの作成 ★再定義 #-------------------------------------------------------------------------- def create_battleback1 @back1_sprite = Sprite_Battle_Back.new(@viewport1, 1, battleback1_name) @back1_sprite.set_graphics(battleback1_bitmap) if battleback1_name != nil @back1_sprite.z = 0 end #-------------------------------------------------------------------------- # ● 戦闘背景(壁)スプライトの作成 ★再定義 #-------------------------------------------------------------------------- def create_battleback2 @back2_sprite = Sprite_Battle_Back.new(@viewport1, 2, battleback2_name) @back2_sprite.set_graphics(battleback2_bitmap) if battleback2_name != nil @back2_sprite.z = 1 end #-------------------------------------------------------------------------- # ● アクタースプライトの作成 ★再定義 #-------------------------------------------------------------------------- def create_actors @actor_sprites = [] for i in 0...$game_party.max_battle_members @actor_sprites = Sprite_Battler.new(@viewport1, $game_party.members) end @effect_sprites = Spriteset_Sideview.new(@viewport1) end #-------------------------------------------------------------------------- # ● アクタースプライトの更新 ★再定義 #-------------------------------------------------------------------------- def update_actors @actor_sprites.each_with_index do |sprite, i| sprite_join($game_party.members, sprite) if sprite.battler == nil && sprite.battler != $game_party.members sprite.remove if sprite.battler != nil && !sprite.removing && sprite.battler != $game_party.members sprite.update end @effect_sprites.update update_program end #-------------------------------------------------------------------------- # ● メンバーを加える #-------------------------------------------------------------------------- def sprite_join(member, sprite) for sp in @actor_sprites sp.update_remove if member == sp.battler && !sp.battler.sv.change_up end sprite.join(member) end #-------------------------------------------------------------------------- # ● バトルプログラムの更新 #-------------------------------------------------------------------------- def update_program return if $sv_camera.program_scroll == [] for data in $sv_camera.program_scroll @back1_sprite.start_back_data(data) if data[2] == 1 @back2_sprite.start_back_data(data) if data[2] == 2 end $sv_camera.program_scroll = [] end #-------------------------------------------------------------------------- # ● ヒット時の战斗动画运行 #-------------------------------------------------------------------------- def set_hit_animation(battler, weapon_index, hit_targets, miss) @effect_sprites.set_hit_animation(battler, weapon_index, hit_targets, miss) end #-------------------------------------------------------------------------- # ● ダメージPOP #-------------------------------------------------------------------------- def set_damage_pop(target) @effect_sprites.set_damage_pop(target) end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- alias dispose_spriteset_battle_n03 dispose def dispose dispose_spriteset_battle_n03 @effect_sprites.dispose end end #============================================================================== # ■ Window_BattleLog #------------------------------------------------------------------------------ # 戦闘の進行を运況表示するウィンドウです。 #============================================================================== class Window_BattleLog < Window_Selectable #-------------------------------------------------------------------------- # ● ウェイト ★再定義 #-------------------------------------------------------------------------- def wait end #-------------------------------------------------------------------------- # ● ウェイトとクリア ★再定義 #-------------------------------------------------------------------------- def wait_and_clear $sv_camera.wait = 10 end #-------------------------------------------------------------------------- # ● 行动結果の表示 ★再定義 #-------------------------------------------------------------------------- def display_action_results(target, item) if target.result.used last_line_number = line_number display_critical(target, item) display_damage(target, item) display_affected_status(target, item) display_failure(target, item) end off if !N03::BATTLE_LOG end #-------------------------------------------------------------------------- # ● ウインドウ非表示 #-------------------------------------------------------------------------- def off @back_sprite.visible = self.visible = false end end #============================================================================== # ■ Game_Interpreter #------------------------------------------------------------------------------ # イベントコマンドを运行するインタプリタです。 #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ● スイッチの操作 #-------------------------------------------------------------------------- alias command_121_game_interpreter_n03 command_121 def command_121 command_121_game_interpreter_n03 $sv_camera.program_check end end |
h2195458940 发表于 2016-9-2 15:09 SideView 战斗设定 #============================================================================== # ■ SideView 横版战斗设定 Ver100 #------------------------------------------------------------------------------ # 横版战斗整体的安排、动作的形成 #============================================================================== class SideView #-------------------------------------------------------------------------- # ● 战斗者动画的横/纵元件数 = [横, 纵]。无动画为 [1, 1] #-------------------------------------------------------------------------- def max_pattern # 根据战斗者 id 分歧 case id when 1 # 1 号角色 return [ 3, 4] when -1 # 1 号敌人 (敌人 ID 通过负数指定) #【这一行修改下,如 [1,1] 就是敌人的图片整个一张;[3,4] 就是敌人的图片分成 3 * 4,有3列,4排。】 return [ 1, 1] else # 上面的 ID 之外的统一设定 return [ 3, 4] if id > 0 # 所有角色(ID 为正) return [ 1, 1] if id < 0 # 所有敌人(ID 为负)#【这一行修改下,如 [1,1] 就是敌人的图片整个一张;[3,4] 就是敌人的图片分成 3 * 4,有3列,4排。】 end # 之后的设定中,有根据 id 来分歧的话,请参考上面的描述。 end #-------------------------------------------------------------------------- # ● 影子的图像 文件名图像请放在 Characters 文件夹,设置没有影子的话 false #-------------------------------------------------------------------------- def shadow return "shadow01" if id > 0 # 全体队员 return false if id < 0 # 所有敌人 end #-------------------------------------------------------------------------- # ● 战斗图像反转 设定初期状态战斗图像反转的话 true #-------------------------------------------------------------------------- def graphic_mirror_flag return false if id > 0 # 全体队员 return true if id < 0 # 所有敌人 end #-------------------------------------------------------------------------- # ● 先固定战斗参照图 先固定战斗动画设定的指数参照的话一定要 true #-------------------------------------------------------------------------- def graphic_fix return false if id > 0 # 全体队员 return true if id < 0 # 所有敌人 end #-------------------------------------------------------------------------- # ● 通常待命 #-------------------------------------------------------------------------- def normal return "通常待机" if id > 0 # 全体队员 return "通常待机" if id < 0 # 所有敌人 # 全动作不是只贴了动作也能 end #-------------------------------------------------------------------------- # ● 危机待命 HP在1/4以下的状态下进行的待命的动作 #-------------------------------------------------------------------------- def pinch return "危机待机" if id > 0 # 全体队员 end #-------------------------------------------------------------------------- # ● 状态动作 复数重合的话,表示优先度高的状态被优先 #-------------------------------------------------------------------------- def state(state_id) # 该类的ID分歧 case state_id when 1 return "敌人崩溃" if id > 0 # 全体队员 return "敌人崩溃" if id < 0 # 所有敌人 when 2 return "中毒待机" when 3 return "黑暗待机" when 4 return "虚弱待机" when 5 return "混乱待机" when 6 return "睡眠待机" when 7 return "中断待机" when 8 return "眩晕待机" when 9 return "防御待机" end end #-------------------------------------------------------------------------- # ● 指令输入后的行动 #-------------------------------------------------------------------------- def command # 选择了的技能ID分歧 case skill_id when 2 return "防御指令" end # 选择了的技能类型指定 case skill_type when 1 # 特技 return "战士技指令" when 2 # 魔法 return "法术指令" when 3 return "法术指令2" when 4,5,6 # 特殊战士技 return "普通技指令" # when 5 # 开枪 # return "开枪指令" # when 6 # 聚能 # return "聚能指令" end end #-------------------------------------------------------------------------- # ● 战斗开始动作 #-------------------------------------------------------------------------- def first_action return "我方开始战斗" if id > 0 # 全体队员 return "待机固定WT" if id < 0 # 所有敌人 end #-------------------------------------------------------------------------- # ● 胜利动作 #-------------------------------------------------------------------------- def win case id when 5 # 5 号角色 return "胜利后空翻" when 4 return "胜利站立" when 6 return "胜利前空翻" when 10 return "胜利斩击" when 29 return "胜利挥剑" when 1,2,28 return "胜利动作" else # 上述以外 return "胜利挥动" end end #-------------------------------------------------------------------------- # ● 战斗退场动作 游戏方交换的战斗 #-------------------------------------------------------------------------- def remove_action return "中止战斗" end #-------------------------------------------------------------------------- # ● 逃走动作 #-------------------------------------------------------------------------- def escape return "逃跑" if id > 0 # 全体队员 return "敌人逃跑" if id < 0 # 所有敌人 end #-------------------------------------------------------------------------- # ● 逃走失败动作 #-------------------------------------------------------------------------- def escape_ng return "逃跑失败" end #-------------------------------------------------------------------------- # ● 指令输入开始动作 #-------------------------------------------------------------------------- def command_b return "指令输入" end #-------------------------------------------------------------------------- # ● 指令输入终了动作 #-------------------------------------------------------------------------- def command_a return "指令输入终了" end #-------------------------------------------------------------------------- # ● 被伤害的动作 #-------------------------------------------------------------------------- def damage(attacker) # 受到了关键一击 伤害的场合 if critical? return "被关键一击" # 回复的情况 elsif recovery? # 它描述了只有返回,当你不想采取的行动 return end # 接受了的技能ID分歧 case damage_skill_id when 1 # 1号技能的场合 return "被攻击" when 136 # 它描述了只返回这里如果你不想采取行动,损害特定的技能特定技能伤害动作不想让时间在这里只return记述。 return end # 受到的道具ID指定(回复的情况已经动作被决定) case damage_item_id when 1 # 1号物品的场合 return else # 上述以外的物品ID if damage_item_id != 0 return end end # 伤害为0的场合(强化、削弱法术和防御,敌人逃跑等) if damage_zero? return end # 如果你不符合上面的设置 return "被攻击" end #-------------------------------------------------------------------------- # ● 躲避动作 被伤害的动作一样分歧使用 #-------------------------------------------------------------------------- def evasion(attacker) # return "盾防御" if shield? # 装备盾的场合 return "回避" end #-------------------------------------------------------------------------- # ● 攻击对方失误时的动作 被伤害的动作一样分歧使用 #-------------------------------------------------------------------------- def miss(attacker) # return "盾防御" if shield? # 装备盾的场合 return "回避" end #-------------------------------------------------------------------------- # ● 武器的动作 通常攻击动作,装备的武器中指定 # 敌人 下面的敌人武器设定可以让 #-------------------------------------------------------------------------- def weapon_action # 指定武器ID case weapon_id when 0 # 武器0号的情况(空手) return "普通攻击" when 1 # 1号武器的场合 return "斩击" end # 武器类型指定 case weapon_type when 1 # 1号武器 复数总结指定的场合 return "斩击" when 2 return "刺击" when 3 return "拔刀" when 4 return "射击1" when 5 return "反手斩" when 6 return "射击2" when 7 return "射击3" when 8 return "砸击" when 14 return "斩击2" when 15 return "刺击2" when 16 return "拔刀2" when 17 return "射击1s" when 18 return "反手斩2" when 11 return "修罗斩" when 30 return "刺击" end end #-------------------------------------------------------------------------- # ● 敌人右武器 我会指定的设备ID武器的敌人 #-------------------------------------------------------------------------- def enemy_weapon1_id # 武器ID指定。0号是空手处理 case id when -70 #负数表示敌人 (ID=50 冢原卜全) return 22 #装备ID (ID=33 鹿岛太刀) when -89 #佐佐木 return 23 when -69 #阴阳师 return 18 when -77 #山本斟助 return 38 when -80 #信玄 return 1 when -90 #真.佐佐木 return 23 when -100 #阿修罗 return 85 else return 0 end end #-------------------------------------------------------------------------- # ● 敌人左手武器 我会指定的ID两把利剑装备武器敌人 #-------------------------------------------------------------------------- def enemy_weapon2_id return 0 end #-------------------------------------------------------------------------- # ● 敌人盾 它覆盖在左手的武器,你也可以指定ID屏蔽敌人盾 #-------------------------------------------------------------------------- def enemy_shield_id return 0 end #-------------------------------------------------------------------------- # ● 指定图形的武器 #-------------------------------------------------------------------------- # 武器动作的类型设定[1:原图],并且选择[2:2003规格]。 # 参照之前的图像在这里指定: # return "001-Weapon01" ←请输入对应的武器图形的文件名 # 请放入武器图形Characters到文件夹 # 通过编制透明的图像,你可以指定你想隐藏特定的武器。 def weapon_graphic(weapon_id, weapon_type) # 指定武器ID case weapon_id when 1 # 1号武器的图像文件名 return "" end # 指定武器类型 case weapon_type when 6 # 第6种武器类型的图像文件名 return "bow01" end end #-------------------------------------------------------------------------- # ● 盾牌指定 #-------------------------------------------------------------------------- # 武器的动作的类型的设定 [1:原图],并且选择[2:2003规格]。 # 武器的动作的反手设定为true时,参照之前的盾图像在这里指定: # # return "001-Shield01" ←请输入对应的盾牌图形的文件名 # 请放入盾牌图形到 Characters 文件夹 def shield_graphic(weapon_id, shield_type) # 指定防具ID case shield_id when 41 # 41号防具(圆盾)的图像文件名 return "" end # 指定的护甲类型 case shield_type when 5 # 第5种护甲类型(小盾牌)的图像文件名 return "" end end #-------------------------------------------------------------------------- # ● 技能动作 #-------------------------------------------------------------------------- def skill_action # 指定技能ID case skill_id when 1 # 1号技能是普通攻击,所以上的武器采取行动 return weapon_action when 2 # 2号技能是防御 return "防御" when 3,4,5,115 # 3/4/5号技能是武器攻击 return weapon_action when 6 # 6号技能是敌人逃走 return escape when 7 # 7号技能是观察情况 return "观望" when 8 # 8号技能是反击 return weapon_action when 10 return "弓射击" when 11 return "火枪射击" when 12 return "手里剑射击" when 20 return "苦无射击" when 13 return "太刀攻击" when 14 return "忍者刀攻击" when 15 return "剑攻击" when 16 return "长枪攻击" when 17 return "大筒射击" when 14 return "钝器攻击" when 50 return "太刀攻击2" when 58 return "赤备突击-枪" when 59 return "赤备突击-刀" when 26 return "弓乱射" when 27 return "火枪齐射" when 28 return "马冲击" when 29 return "近身连斩" when 30 return "连发火枪" when 31 return "连发手里剑" when 32 return "秘剑燕返" when 33 return "秘剑一闪" when 34 return "极一闪" when 35 return "落叶斩" when 205 return "风林火山sp" when 128 return "水枪" when 129 return "投掷武器" when 130 return "5回攻击" when 131 return "切入攻击" when 132 return "多段攻击" when 133 return "化身" when 134 return "技能派生" when 135 return "转换攻击" when 136 return "空中攻击" #———太刀技 when 66 return "内劲" when 67 return "三段斩" when 68 return "叶切合" when 69 return "浮舟" when 70 return "霞男" when 71 return "霞女" when 72 return "一闪" when 75 return "鸟王剑男" when 76 return "鸟王剑女" when 77 return "无想剑" when 78 return "一之太刀男" when 79 return "一之太刀女" when 80 return "居合斩" when 81 return "乾龙破" #———特殊技 when 181 return "切腹男" when 182 return "切腹女" when 183 return "苦无射击" when 184 return "手里剑射击" when 185 return "毒苦无" when 186 return "多发手里剑" #———铁砲技 when 83 return "强力射击" when 84 return "炸膛" when 85 return "急所击" when 86 return "三段射击" when 87 return "铁砲齐射" when 88 return "狙击" when 89 return "钓瓶击" #———忍者技 when 93 return "跃空斩" when 94 return "影袭" when 95 return "旋风斩" when 99 return "韦驸天术" when 100 return "幻惑术" when 101 return "爆破之术男" when 102 return "爆破之术女" when 103 return "鬼脚之术男" when 104 return "鬼脚之术女" when 105 return "变化男" #———弓技 when 116 return "强弓" when 119 return "穿心箭" when 120 return "剎那五月雨" when 170 return "风林火山男" when 200 return "毗沙门天" when 201 return "毗沙门天BOSS" end # 技能名指定(数据库ID移动来也没问题的,所以推荐) case skill_name when "背景变更样本" return "背景变更攻击" when "图片攻击样本" return "图片攻击" end # 指定技能类型 case skill_type when 1,4,5,6 # 战士技 return "战士技" when 2 # 法术 return "法术" when 3 return "觉醒" # when 5 # 枪技 # return "枪技" # when 6 # 聚能 # return "聚能" end # 上述以外 return "战士技" end #-------------------------------------------------------------------------- # ● 道具的动作 #-------------------------------------------------------------------------- def item_action case item_id # 指定物品ID when 1 return "物品使用" else return "物品使用" end end #-------------------------------------------------------------------------- # ● 反击技能ID 反击时的技能ID指定。 #-------------------------------------------------------------------------- # ※数据库中设定的复数回攻击被反映。 def counter_skill_id return 8 end #-------------------------------------------------------------------------- # ● 魔法反射动画ID 魔法反射时的动画ID指定。 #-------------------------------------------------------------------------- def reflection_anime_id return 123 end #-------------------------------------------------------------------------- # ● 替身开始动作 #-------------------------------------------------------------------------- def substitute_start_action return "替身开始动作" end #-------------------------------------------------------------------------- # ● 替身终了动作 #-------------------------------------------------------------------------- def substitute_end_action return "替身终了动作" end #-------------------------------------------------------------------------- # ● 替身的横版动作开始 #-------------------------------------------------------------------------- def substitute_receiver_start_action return "替身的横版动作开始" end #-------------------------------------------------------------------------- # ● 替身的横版动作结束 #-------------------------------------------------------------------------- def substitute_receiver_end_action return "替身的横版动作结束" end #-------------------------------------------------------------------------- # ● 敌人的等级 条件分支等利用的东西,参数是反映。 #-------------------------------------------------------------------------- def level case id when -1 # 1号的敌人 return 0 end return 0 end end |
neverstop 发表于 2016-9-2 12:01 SideView 动作设定 #============================================================================== # ■ SideView 横版动作设定 Ver100 #------------------------------------------------------------------------------ # 横版动作整体的安排、动作的形成 #============================================================================== # 294 行设置角色发动动画! module N03 #-------------------------------------------------------------------------- # ● 全体设置 #-------------------------------------------------------------------------- # 初期位置 角色1 角色2 角色3 角色4 # X轴 Y轴 H轴 X轴 Y轴 H轴 X轴 Y轴 H轴 X轴 Y轴 H轴 ACTOR_POSITION = [[415,160, 0],[435,185, 0],[455,210, 0],[475,235, 0]] # 行动结束时的比重(等待时间・单位一帧) ACTION_END_WAIT = 8 # 回合结束时比重(等待时间・单位一帧) TURN_END_WAIT = 12 # 敌人的袭击时,背后攻击(左右反转)许可的话true,否则false BACK_ATTACK = true # 我方战斗受到伤害的时候,默认的效果,要是录用true ACTOR_DAMAGE = false # 敌人战斗受到伤害的时候,默认的效果,要是录用true ENEMY_DAMAGE = false # 敌人战斗X坐标,反转计算,战斗动画自动反转的话true ENEMY_MIRROR = true # 崩溃禁止使用数据库处理,不死之身,队员ID IMMORTAL_ID = 10 # 战斗记录(战斗的进行实况显示窗口)显示的话true # OFF的场合,技能名窗口画面上部被显示 BATTLE_LOG = false # 技能名窗口ON时,不表示技能的ID排列放入 NO_DISPLAY_SKILL_ID = [1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,18,20,50,75,80,83,93,115] # 显示伤害数字 true DAMAGE_POP = true # 显示队员附加 true STATE_POP = true # 伤害数字图像的文件名(参照 System 文件夹) DAMAGE_PLUS = "damage_num+" # 恢复数字图像的文件名(参照 System 文件夹) DAMAGE_MINUS = "damage_num-" # MP伤害数字图像的文件名(参照 System 文件夹) DAMAGE_MP = "damage_mp" # TP伤害数字图像的文件名(参照 System 文件夹) DAMAGE_TP = "damage_tp" # 伤害数字的文字间隔调整 DAMAGE_ADJUST = -4 # 战斗镜头的焦点(移动的方向的焦点)调整[X轴, Y轴] CAMERA_POSITION = [ 0, -10] #-------------------------------------------------------------------------- # ● 战斗背景设置 背景的坐标调整和放大率设定 #-------------------------------------------------------------------------- # 地板背景文件名…設定する床背景(Battlebacks1)画像文件名。 # "全Battlebacks1"は指定のないBattlebacks1画像を一括設定する項目です # 墙壁背景文件名…設定する壁背景(Battlebacks2)画像文件名。 # "全Battlebacks2"は指定のないBattlebacks2画像を一括設定する項目です # 坐标调整…[X轴, Y轴] # 放大率……[横向放大率, 纵向放大率] # 可摇晃……动作摇晃许可的话 true # 操作开关…战斗开始时自动ON的游戏开关号码。在反向侧视图专用开关ON # 背景和战斗计划套在管理如果想要等利用 # 开关操作不0 FLOOR1_DATA = { #――地板背景文件名――― 坐标调整 放大率 可摇晃 操作开关 "Sea_ex01" => [ [ 0, 120], [ 150, 150], false, -1], "全Battlebacks1" => [ [ 0, 120], [ 150, 150], true, 0], } FLOOR2_DATA = { #――墙壁背景文件名――― 坐标调整 放大率 可摇晃 操作开关 "Ship_ex" => [ [ 0, 120], [ 150, 150], true, 0], "全Battlebacks2" => [ [ 0, 120], [ 150, 150], true, 0], } #============================================================================== # ■ 动作 #------------------------------------------------------------------------------ # 横版战斗中进行的单体动作。可以组合全体的动作 #============================================================================== # 完整的操作名称和位置动作名称,请不要盖住 ACTION = { #-------------------------------------------------------------------------- # ● 战斗动画设定 #-------------------------------------------------------------------------- # 如果您要使用的字符芯片字符多个已被放置在一个图像文件。 # 如果要更多的图像,请使用一个图像中的一个字符芯片的字符默认值(以$开头的文件) # 以适应角色的图像位置有没有特别的问题。 # 指数…利用战斗图像文件的后面附有的指数名。 # 战斗的侧视图,但指的是字的文件名是角色的情况 # 指数附加,我将引用字符文件名的图像文件加指数的名称 # 例如:当Actor1的战斗来执行“_1”的动画指数Actor1_1参考文件 # 它是动画的“,”索引中使用的字符芯片的情况下 # 演员字符的文件夹,把敌人的图像放在的Battlers文件夹 # 纵…图像文件中的垂直位置。我将继续与0-3从顶部。没有数量上的限制 # 请不要战斗设置了一些单元 # 横…图像文件的水平位置,再现开始的单元格。我将继续与0-3从左边。 # 我从左边打右边这个单元格的动画。是没有限制的,以单元格数 # 模式… 0:固定单元 1:单向行动 2:往返 3:单向循环 4:来回循环 # 速度…动画刷新速度,数字越低刷新越快。 # Z轴…再加上如果显示在前。在屏幕的底部,通常显示在前面。 # 比重…真要是移动到下一个动作的动画模式被发挥到结束 true # 阴影…显示图像阴影 true,否则 false。 # 武器…武器动作名称,输入你想显示的武器。如果你不想显示武器输入""。 # 武器行动同时可以添加任意数量的,我会把它放在数组添置的背面。 #―动作名称(待机系)― 区别 指数 纵 横 模式 速度 Z轴 比重 阴影 武器 "待机" => ["motion", "", 1, 1, 0, 12, 0, true, true, "" ], "待机固定WT" => ["motion", "", 1, 1, 0, 12, 0, true, true, "" ], "待机固定" => ["motion", "", 1, 1, 0, 12, 0, false, true, "" ], "倒下" => ["motion", "", 0, 0, 0, 12, 0, true, false, "" ], "魔法" => ["motion", "", 1, 0, 3, 12, 0, true, false, "" ], "特技" => ["motion", "", 1, 0, 3, 12, 0, true, false, "" ], "向右" => ["motion", "", 2, 0, 4, 12, 0, true, true, "" ], #―动作名称(移动系)― 区别 文件No 纵 横 模式 速度 Z轴 比重 阴影 武器 "向左移动" => ["motion", "", 1, 0, 4, 6, 10, true, true, "" ], "向左移动2" => ["motion", "", 1, 0, 4, 30, 10, true, true, "" ], "向右移动" => ["motion", "", 1, 0, 4, 6, 10, true, true, "" ], "向右移动2" => ["motion", "", 1, 0, 4, 30, 10, true, true, "" ], #―动作名称(暂停系)― 区别 文件No 纵 横 模式 速度 Z轴 比重 阴影 武器 "武器挥动" => ["motion", "", 1, 0, 1, 2, 200, false, true, "挥动" ], "武器挥动2" => ["motion", "", 1, 0, 1, 2, 200, false, true, "挥动2" ], #―动作名称(攻击系)― 区别 文件No 纵 横 模式 速度 Z轴 比重 阴影 武器 "武器挥砍R" => ["motion", "", 1, 0, 1, 2, 200, false, true, "挥砍R"], "武器挥砍R2" => ["motion", "", 1, 0, 1, 2, 200, false, true, "挥砍R2"], "武器挥砍L" => ["motion", "", 1, 0, 1, 2, 200, true, true, "挥砍L"], "武器砸" => ["motion", "", 1, 0, 1, 3, 200, false, true, "砸"], "武器上斩" => ["motion", "", 1, 0, 1, 2, 200, false, true, "上斩"], "武器挥砍RL" => ["motion", "", 1, 0, 1, 2, 200, false, true, "挥砍R","挥砍L"], "盾防御" => ["motion", "", 1, 0, 1, 2, 200, false, true, "盾"], "扇防御" => ["motion", "", 1, 0, 1, 2, 200, false, true, "扇"], "肋差攻击1" => ["motion", "", 1, 0, 1, 2, 200, true, true, "切腹"], "武器拳击" => ["motion", "", 1, 0, 1, 2, 200, false, true, "拳" ], "武器刺" => ["motion", "", 1, 0, 1, 2, 200, false, true, "刺" ], "武器刺s" => ["motion", "", 1, 0, 1, 2, 200, false, true, "刺s" ], "弓射击1" => ["motion", "", 1, 0, 1, 2, 200, true, true, "弓"], "弓射击2" => ["motion", "", 1, 0, 1, 2, 200, true, true, "火枪"], "弓射击3" => ["motion", "", 1, 0, 1, 2, 200, true, true, "大筒"], "手里剑发射" => ["motion", "", 1, 0, 1, 2, 200, true, true, "手里剑"], "武器中斩" => ["motion", "", 1, 0, 1, 2, 200, false, true, "中斩"], "武器中斩s" => ["motion", "", 1, 0, 1, 2, 200, false, true, "中斩s"], "武器强中斩" => ["motion", "", 1, 0, 1, 2, 200, false, true, "强中斩"], "武器中斩2" => ["motion", "", 1, 0, 1, 2, 200, false, true, "中斩2"], "武器反手斩" => ["motion", "", 1, 0, 1, 2, 200, false, true, "反手"], "武器里反手斩" => ["motion", "", 1, 0, 1, 2, 200, false, true, "反手2"], "武器摆上" => ["motion", "", 1, 0, 1, 1, 200, true, true, "摆上"], "武器摆下" => ["motion", "", 1, 0, 1, 1, 200, true, true, "摆下"], "武器旋转1" => ["motion", "", 1, 0, 1, 1, 200, true, true, "旋转1"], "武器旋转2" => ["motion", "", 1, 0, 1, 1, 200, true, true, "旋转2"], #―动作名称(辅助系) "武器特技动作" => ["motion", "", 1, 0, 1, 4, 200, false, true, "特技动作"], "武器特技动作B" => ["motion", "", 1, 0, 1, 5, 200, false, true, "特技动作B"], #―动作名称(连携系) "武器上斩2" => ["motion", "", 1, 0, 1, 2, 200, false, true, "上斩2"], "武器上斩2b" => ["motion", "", 1, 0, 1, 2, 200, false, true, "上斩2b"], "武器上斩3" => ["motion", "", 1, 0, 1, 2, 200, false, true, "上斩3"], "武器举刀" => ["motion", "", 1, 0, 1, 2, 200, false, true, "举刀"], "武器向上举刀" => ["motion", "", 1, 0, 1, 2, 200, false, true, "向上举刀"], "武器举刀2" => ["motion", "", 1, 0, 1, 2, 200, false, true, "举刀2"], "武器举刀3" => ["motion", "", 1, 0, 1, 2, 200, false, true, "举刀3"], "武器举刀4" => ["motion", "", 1, 0, 1, 2, 200, false, true, "举刀4"], "武器举火枪" => ["motion", "", 1, 0, 1, 2, 200, false, true, "举火枪"], "武器挥砍R2" => ["motion", "", 1, 0, 1, 2, 200, false, true, "挥砍R2"], "武器挥砍Rs" => ["motion", "", 1, 0, 1, 2, 200, false, true, "挥砍Rs"], #-------------------------------------------------------------------------- # ● 战斗移动 X - 轴敌人的移动就会发生逆转自动计算 #-------------------------------------------------------------------------- # 目标…先参考移动的目标坐标。数值正现在的位置,负初始位置参照([0=自己]负不可以设置所以请设置为-7) # [0=自己] [1=目标] [2=所有敌人] [3=我方团灭] [4=敌方全灭] [5=第二个目标] [6=画面] # X轴…显示目标的X坐标 # Y轴…显示目标的Y坐标 # H轴…显示目标的H坐标(离地高度)。 如果H轴为nil,则在XY轴运动。 # 速度…1帧移动的像素点。要数值减的话变成时间指定,成为到移动完成为止的总帧数 # 曲线…移动时的轨道上,正是负向下弯曲。 # 跳跃…沿抛物线轨迹跳跃。[从跳跃开始到顶点的轨迹, 从顶点到着陆的轨迹] # 动画…用于战斗动画移动的动作名称。 #――动作名称(系统系)―― 区别 目标 X轴 Y轴 H轴 速度 曲线 跳跃 动画 "我方进行战斗准备" => ["move", -7, 180, 0, 0, 0, 0, [ 0, 0], "待机"], "退场" => ["move", -7, 180, 0, 0, 7, 0, [ 0, 0], "向右移动"], "逃走途中" => ["move", -7, 80, 0, 0, 7, 0, [ 0, 0], "向右移动"], "指令输入移动" => ["move", -7, -20, 0, nil, -10, 0, [ 0, 0], "待机"], "挨打向后仰" => ["move", 0, 20, 0, nil, -10, 0, [ 0, 0], "向右移动2"], "挨打向后仰大" => ["move", 0, 60, 0, nil, -10, 0, [ 0, 0], "向右移动2"], "挨打向前仰大" => ["move", 0, -60, 0, nil, -10, 0, [ 0, 0], "向右移动2"], #――动作名称(复位系)―― 区别 目标 X轴 Y轴 H轴 速度 曲线 跳跃 动画 "坐标提前复位" => ["move", -7, 0, 0, 0, -10, 0, [ 0, 0], "向右移动"], "坐标复位" => ["move", -7, 0, 0, 0, -20, 0, [ 0, 0], "向右移动"], "坐标曲线复位" => ["move", -7, 0, 0, 0, -20, -2, [ 0, 0], "向右移动"], "坐标向左复位" => ["move", -7, 0, 0, 0, -20, 0, [ 0, 0], "待机"], "后跳复位" => ["move", -7, 0, 0, 0, -15, 0, [ 60, -60], ""], "瞬移复位" => ["move", -7, 0, 0, 0, -1, 0, [ 60, -60], "向右移动"], #――动作名称(自身系)―― 区别 目标 X轴 Y轴 H轴 速度 曲线 跳跃 动画 "前进一步" => ["move", 0, -20, 0, 0, -10, 0, [ 0, 0], ""], "后退一步" => ["move", 0, 20, 0, 0, -10, 0, [ 0, 0], "待机"], "跳前一步" => ["move", 0, -30, 0, 0, -10, 0, [ 20,-20], "待机"], "跳后一步" => ["move", 0, 30, 0, 0, -10, 0, [ 20,-20], "待机"], "跳后一步2" => ["move", 0, 15, 0, 0, -10, 0, [ 10,-10], "待机"], "胜利跳跃" => ["move", 0, 10, 0, 0, -25, 0, [ 30,-30], "待机固定"], "胜利跳跃武器" => ["move", 0, 0, 0, 0, -15, 0, [ 20, 0], "武器挥动"], "胜利跳跃着地" => ["move",-7, 0, 0, 0, -10, 0, [ 0, 0], "武器中斩2"], "纵向摇晃01" => ["move", 0, 0, 0, 20, -2, 0, [ 0, 0], ""], "纵向摇晃02" => ["move", 0, 0, 0, -20, -2, 0, [ 0, 0], ""], "原地动作" => ["move", 0, 0, 0, 0, -5, 0, [ 0, 0], "向左移动"], "前进一步2" => ["move", 0, -20, 0, 0, -10, 0, [ 0, 0], "向左移动"], "前闪一步" => ["move", 0, -5, 0, 0, -5, 0, [ 0, 0], ""], "后闪一步" => ["move", 0, 10, 0, 0, -5, 0, [ 0, 0], ""], "高跳" => ["move", 0, 0, 0, 0, -10, 0, [ 0, 60], "右1回旋"], "高落" => ["move", 0, 0, 0, 0, -10, 0, [ -60, 0], ""], #――动作名称(目标系)―― 区别 目标 X轴 Y轴 H轴 速度 曲线 跳跃 动画 "敌前进" => ["move", 1, 30, 0, 0, -25, 0, [ 0, 0], "向左移动"], "敌后退" => ["move", 1, -60, 0, 0, -25, 0, [ 0, 0], "向左移动"], "敌提前移动" => ["move", 1, 0, 0, 0, -10, 0, [ 0, 0], "向左移动"], "敌向前跳跃" => ["move", -1, 0, 0, 100, -20, 0, [ 40,-20], "武器挥动"], "撞击" => ["move", -1, 0, 0, 0, -10, 0, [ 0, 0], "武器挥砍R"], "敌冲刺" => ["move", 1, 30, 0, 0, -10, 0, [ 0, 0], "向左移动"], "敌后冲刺" => ["move", 1, -60, 0, 0, -10, 0, [ 0, 0], "向左移动"], "敌后冲刺2" => ["move", 1, -50, 0, 0, -5, 0, [ 0, 0], "向左移动"], "敌瞬移" => ["move", 1, 30, 0, 0, -1, 0, [ 0, 0], "向左移动"], "敌后瞬移" => ["move", 1, -30, 0, 0, -1, 0, [ 0, 0], "向左移动"], "敌前跳" => ["move", 1, 30, 0, 0, -15, 0, [ 60,-60], "向左移动"], #————特殊技动作———— "后跳斩" => ["move", 1, 20, 0, 0, -15, 0, [ 20,-20], "武器挥砍R"], "跳斩" => ["move", 0, -10, 0, 0, -10, 0, [ 20,-20], "武器挥砍R"], "敌后一闪" => ["move", 1, -60, 0, 0, -10, 0, [ 0, 0], "武器举刀2"], "敌后一斩" => ["move", 1, -30, 0, 0, -10, 0, [ 0, 0], "武器中斩"], #-------------------------------------------------------------------------- # ● 武器动作 武器战斗动画・和被用来跳过动画动作 #-------------------------------------------------------------------------- # 类型 … [0…使用图标] # [1…原图(图像名战斗设定的武器的项目进行。参照 Characters 文件夹)] # [2…动画单元(※2003规格。做和战斗一样的单元数动画。图像名战斗设定的武器的项目进行。参照先Characters文件夹)] # 移动 … 动作幅度调整。[X轴, Y轴] # 调整 … 动作原本的位置。[X轴, Y轴] # 始度 … 动作前最初的角度。逆时针方向0~360度,负为顺时针方向。 # 终度 … 动作后的角度。 # 原点 … 画像的原点。[0…中心] [1…左上角] [2…右上角] [3…左下角] [4…右下角] [5…和战斗一样(图像下和纵一半)] # 反转 … true 表示图像反转。 # 放大 … [X轴放大率, Y轴放大率] 允许小数点。 # Z轴 … 图像为造型更靠近的话真 true # 逆手 … 盾图像,或者二刀流的时候的左边(下)的武器图像表示 # 不想使用的图标,盾的图像是战斗设定的盾的项目进行 # 更新 … -1…同步与战斗动画重建。如果使之独立 [刷新时间间隔, 刷新图形数, 是否循环] # 指数 … 图像的武器已经装备武器(盾)虽然你看到被设置为图像文件、 # 如果你把这里的索引、我指的是图像文件名+索引名的图像 # 在您使用图像与多图形武器事件1 # 例如: "挥砍R"指数"" => 图像文件名参照 "IconSet" # 例如: "纵振り2"指数"_1" => 图像文件名参照 "IconSet_1" # 图标放在 System 文件夹、动画单元参照 Characters 文件夹 # 画像 … 如果你忽略了索引,并且在盾和武器设定图像文件,直接指定武器是图像 # 我会把图像文件名在这里。参照 Characters 文件夹 #―动作名称― 区别 类型 移动 调整 始度 终度 原点 反转 放大 Z轴 逆手 更新 指数 画像 "挥砍R" => ["wp", 0,[ 4, 1],[ -4,-9], -45, 60, 4, false, [1,1], false, false, -1, "", ""], "挥砍R2" => ["wp", 0,[ 6,-1],[ -4,-9], -45, 60, 4, false, [1,1], true, false, -1, "", ""], "挥砍Rs" => ["wp", 0,[ 4, 1],[ -4,-9], -90, 40, 4, false, [1,1], false, false, -1, "", ""], # 佩戴装备 "盾" => ["wp", 0,[ 0, 0],[ 6, 0], 0, 0, 4, false, [1,1], true, true, -1, "", ""], "切腹" => ["wp", 0,[ 5, 0],[-30, -7],-135,-135, 4, false, [1,1], true, true, -1, "", ""], "挥砍L" => ["wp", 0,[ 8, 0],[ -4,-9], -45, 60, 4, false, [1,1], true, true, -1, "", ""], "砸" => ["wp", 0,[ 8, 0],[ -4,-9], -45, 25, 4, false, [1,1], true, false, -1, "", ""], "拳" => ["wp", 0,[-10, 0],[ 10,-9], 45, 45, 4, false, [1,1], false, false, -1, "", ""], "刺" => ["wp", 0,[-10, 0],[ 10,-7], 45, 45, 4, false, [1.2,1.2], true, false, -1, "", ""], "砸s" => ["wp", 0,[ 8, 0],[ -4,-9], -45, 25, 4, false, [2.5,2.5], true, false, -1, "", ""], "刺s" => ["wp", 0,[-20, 0],[ 25,-7], 45, 45, 4, false, [1.2,1.2], true, false, -1, "", ""], "挥动" => ["wp", 0,[ 6,-4],[ -4,-10], 90, -45, 4, false, [1,1], true, false, -1, "", ""], "挥动2" => ["wp", 0,[ 6,-4],[ -4,-10], 90, -45, 4, false, [1,1], false, false, -1, "", ""], "上斩" => ["wp", 0,[ -1, 9],[ -2,-16], 120,-150, 4, false, [1,1], true, false, -1, "", ""], "中斩" => ["wp", 0,[ 4, 1],[ -2, -9], -45, 45, 4, false, [1,1], true, false, -1, "", ""], "中斩s" => ["wp", 0,[ 4, 0],[ -2, -8], 45, 45, 4, false, [1,1], true, false, -1, "", ""], "强中斩" => ["wp", 0,[ 4, 1],[ -2, -9],-120, 45, 4, false, [1,1], true, false, -1, "", ""], "中斩2" => ["wp", 0,[ 8, 0],[ -6, -9], 45, 45, 4, false, [1,1], false, false, -1, "", ""], "反手" => ["wp", 0,[ -4, 0],[ 2,-11], 90, -70, 4, false, [1,1], false, false, -1, "", ""], "里反手" => ["wp", 0,[ -1, 8],[ -2,-16], 120,-150, 4, false, [1,1], true, true, -1, "", ""], "旋转1" => ["wp", 0,[ 0, 0],[ -2,-11], 120, -90, 4, false, [1,1], true, false, -1, "", ""], "旋转2" => ["wp", 0,[ 0, 0],[ -2,-11], -90,-240, 4, false, [1,1], true, false, -1, "", ""], "摆上" => ["wp", 0,[ -1, 8],[ -2,-16], 120,-150, 4, false, [1,1], false, false, -1, "", ""], "摆下" => ["wp", 0,[ 4, 1],[ -2, -9], -45, 120, 4, false, [1,1], true, false, -1, "", ""], "特技动作" => ["wp", 0,[ 4, 1],[ -2, -9], -45, 45, 4, false, [1,1], true, false, -1, "", ""], "特技动作B" => ["wp", 0,[ 4, 1],[ -2, -9], -45, 45, 4, false, [1,1], false, false, -1, "", ""], "上斩2" => ["wp", 0,[ 5, 0],[ -4, -9], 90,-115, 4, false, [1,1], false, false, -1, "", ""], "上斩2b" => ["wp", 0,[ -1, 2],[ -4, -9], 90,-115, 4, false, [1,1], false, false, -1, "", ""], "上斩3" => ["wp", 0,[ -1, 8],[ -2,-16], 120,-150, 4, false, [1,1], false, false, -1, "", ""], "举刀" => ["wp", 0,[ 0, 0],[ -2, -8], -75, -75, 4, false, [1,1], true, false, -1, "", ""], "举刀2" => ["wp", 0,[ 0, 0],[ -5, -8], 215, 215, 4, false, [1,1], true, false, -1, "", ""], "举刀3" => ["wp", 0,[ 0, 0],[ -5, -5],-120,-120, 4, false, [1,1], false, false, -1, "", ""], "举刀4" => ["wp", 0,[ 0, 0],[ -6,-13], 120, 120, 4, false, [1,1], true, false, -1, "", ""], "向上举刀" => ["wp", 0,[ 0, 0],[ -2, -8], 45, -90, 4, false, [1,1], true, false, -1, "", ""], #―2003仕様― 区别 类型 移动 调整 始度 终度 原点 反转 放大 Z轴 逆手 更新 指数 画像 "弓" => ["wp", 0,[ 1, 0],[ -1, 0], 50, 45, 5, false, [1,1], true, false, -1, "", ""], "火枪" => ["wp", 0,[ 1, 0],[ 1, -3], 20, 45, 5, false, [1,1], true, false, -1, "", ""], "大筒" => ["wp", 0,[ 1, 0],[ 1, -3], 20, 45, 5, false, [1,1], true, false, -1, "", ""], "举火枪" => ["wp", 0,[ 0, 0],[ 2, -3], 45, 45, 5, false, [1,1], true, false, -1, "", ""], # 武器飞出时用 区别 类型 移动 调整 始度 终度 原点 反转 放大 Z轴 二刀 更新 指数 画像 "子弹1" => ["wp", 0,[ 0, 0],[ 0, 0], 0, 45, 0, false, [1,1], true, false,[2,6,false], "", "arrow01"], "子弹1s" => ["wp", 0,[ 0, 0],[ 0, 0], 0, 45, 0, false, [1,1], true, false,[2,6,false], "", "arrow01s"], "子弹2" => ["wp", 0,[ 0, 0],[ 0, 0], 0, 45, 0, false, [1,1], true, false,[2,6,false], "", "arrow02"], "子弹3" => ["wp", 0,[ 0, 0],[ 0, 0], 0, 45, 0, false, [1,1], true, false,[2,6,false], "", "arrow02"], "回旋镖" => ["wp", 0,[ 0, 0],[ 0, 0], 0, 360, 0, false, [1,1], true, false,[1,8, true], "", ""], "子弹4a" => ["wp", 0,[ 0, 0],[ 0, 0], 0, 360, 0, false, [1,1], true, false,[2,6,false], "", "arrow03a"], "子弹4b" => ["wp", 0,[ 0, 0],[ 0, 0],-45, -45, 0, false, [1,1], true, false,[2,6,false], "", "arrow03b"], "子弹4c" => ["wp", 0,[ 0, 0],[ 0, 0], 0, 360, 0, false, [1,1], true, false,[2,6,false], "", "arrow03c"], #-------------------------------------------------------------------------- # ● 武器・飞出动画 武器移动的战斗动画,向远射的武器等 #-------------------------------------------------------------------------- # ID…数据库的动画片ID。[移动时的动画ID, 击中时的动画片ID] 0隐藏动画、-1武器动画、1技能动画 # 始…动画移动的开始位置。要减的话,用复数目标也只一个的动画片运行 # [0=自己] [1=目标] [2=所有敌人] [3=我方团灭] [4=敌方全灭] [5=第二个目标] [6=画面] # 后…动画移动的结束位置。要减的话,用复数目标也只一个的动画片运行 # [0=自己] [1=目标] [2=所有敌人] [3=我方团灭] [4=敌方全灭] [5=第二个目标] [6=画面] # 始调整…移动开始坐标的微调整。[X轴, Y轴] 敌人X轴自动反向计算 # 后调整…移动结束坐标的微调整。[X轴, Y轴] 敌人X轴自动反向计算 # 速度…每帧沿X轴移动的像素。负的时间处理,成为由距离速度变更 # 类型…移动后的处理。[0=消失(错误时自动贯通变化)] [1=贯通] [2=消失(错误的时候也消失了)] # 轨迹…移动的轨迹。[从开始到顶点的轨迹, 从顶点到结束的轨迹] # Z轴…动画和武器的角色更靠近的话 true # 比重… true 表示等待动作结束 [移动时动画比重, 命中时动画比重] # 损坏…如果目标达到伤害计算 true # 复位…目标移动后自动归位 true。否则 false # 快照…快照变焦配合动画放大缩小的话true # 循环…移动让动画的播放结束的时候回到最初循环 true # 禁止反转…禁止任何场合的动画反转 true # 武器…放入武器的动作名。如果不用留空""。 #――动作名称―― 区别 ID 始 后 始调整 后调整 速度 类型 轨迹 Z轴 比重 损坏 复位 快照 循环 禁止反转 武器 "子弹发射1s" => ["m_a",[ 0,13], 0, 1, [ 0, 0], [ 0, 0], 20, 0, [ 0, 0], true, [false,false], true, true, true, false, false, "子弹1s"], "子弹发射WT2" => ["m_a",[ 0, 6], 0, 1, [ 0, 0], [ 0, 0], 30, 0, [ 0, 0], true, [ true, true], true, true, true, false, false, "子弹2"], "子弹发射1" => ["m_a",[ 0, 5], 0, 1, [ 0, 0], [ 0, 0], 20, 0, [ 0, 0], true, [false,false], true, true, true, false, false, "子弹1"], "子弹发射2" => ["m_a",[ 0, 6], 0, 1, [ 0, 0], [ 0, 0], 30, 0, [ 0, 0], true, [false,false], true, true, true, false, false, "子弹2"], "水枪发射" => ["m_a",[69,69], 0, 1, [ 0, 0], [ 0, 0], 10, 0, [ 0, 0], true, [ true, true], true, true, true, true, false, ""], "武器投掷开始" => ["m_a",[ 0,-1], 0, 1, [ 4,-6], [ 0, 0], 10, 2, [-3,-3], true, [ true,false], true, true, true, false, false, "回旋镖"], "武器投掷结束" => ["m_a",[ 0, 0], 1, 0, [ 0, 0], [ 4,-6], 10, 0, [ 3, 3], true, [ true,false], false, true, true, false, false, "回旋镖"], "子弹发射WT3" => ["m_a",[ 0, 7], 0, 2, [ 0, 0], [ 0, 0], 30, 2, [ 0, 0], true, [ true, true], true, true, true, false, false, "子弹3"], "子弹发射3" => ["m_a",[ 0, 7], 0, 2, [ 0, 0], [ 0, 0], 30, 2, [ 0, 0], true, [false,false], true, true, true, false, false, "子弹3"], "子弹发射WT4a" => ["m_a",[ 0,11], 0, 1, [ 0, 0], [ 0, 0], 20, 0, [ 0, 0], true, [ true, true], true, true, true, false, false, "子弹4a"], "子弹发射4a" => ["m_a",[ 0,11], 0, 1, [ 0, 0], [ 0, 0], 20, 0, [ 0, 0], true, [false,false], true, true, true, false, false, "子弹4a"], "子弹发射4b" => ["m_a",[ 0,11], 0, 1, [ 0, 0], [ 0, 0], 20, 0, [ 0, 0], true, [false,false], true, true, true, false, false, "子弹4b"], "剑气发射" => ["m_a",[134,132], 0, 1, [ 0, 0], [ 0, 0], 30, 1, [ 0, 0], true, [ true, true], false, true, true, false, false, ""], "穿心箭发射" => ["m_a",[ 90, 89], 0, 1, [ 0, 0], [ 0, 0], 40, 1, [ 0, 0], true, [false,false], true, true, true, false, false, ""], "强弓发射" => ["m_a",[ 92, 91], 0, 1, [ 0, 0], [ 0, 0], 30, 0, [ 0, 0], true, [false,false], true, true, true, false, false, ""], "修罗斩发射" => ["m_a",[ 0, 20], 0, 1, [ 0, 0], [ 0, 0], 50, 0, [ 0, 0], true, [ true,false], true, true, true, false, false, ""], #-------------------------------------------------------------------------- # ● 战斗动画 数据库的战斗动画展示 #-------------------------------------------------------------------------- # ID…动画ID。-1设置武器动画; # -2设置开双刀的另一把武器的动画; # -3设置技能动画。 # 目标…[0=自己] [1=目标] [2=所有敌人] [3=我方团灭] [4=敌方全灭] [5=第二个目标] # 复位… 动画跟随目标移动 true # 比重…动画不结束不进行下一步 true # 损坏…目标适用损坏计算 true # 快照…快照变焦配合动画放大缩小的话 true # 禁止反转…禁止任何场合的动画反转 true # 反转…让动画反转 true # Z轴…动画角色更靠近显示的话 true #―动作名称(损坏系)― 区别 ID 目标 复位 比重 损坏 快照 禁止反转 反转 Z轴 "目标动画武器" => ["anime", -1, 1, false, false, true, true, false, false, true], "目标动画武器WT" => ["anime", -1, 1, false, true, true, true, false, false, true], "目标动画武器LWT" => ["anime", -2, 1, false, true, true, true, false, false, true], "目标动画" => ["anime", -3, 1, false, false, true, true, false, false, true], "目标动画WT" => ["anime", -3, 1, false, true, true, true, false, false, true], #――动作名称(自身系)―― 区别 ID 目标 复位 比重 损坏 快照 禁止反转 反转 Z轴 "魔法咏唱中" => ["anime", 113, 0, true, true, false, true, false, false, true], "奥义咏唱中1" => ["anime", 113, 0, true, true, false, true, false, false, true], "魔法咏唱中2" => ["anime", 118, 0, true, true, false, true, false, false, true], "特技待机中" => ["anime", 114, 0, true, true, false, true, false, false, true], "特技待机中2" => ["anime", 114, 0, true, true, false, true, false, false, true], "魔法发动动画" => ["anime", 115, 0, false, false, false, true, false, false, false], "魔法发动动画2" => ["anime", 119, 0, false, false, false, true, false, false, false], "特技发动动画" => ["anime", 116, 0, false, true, false, true, false, false, false], "特技发动动画2" => ["anime", 116, 0, false, true, false, true, false, false, false], #-------------------------------------------------------------------------- # ● 摄影技术 进行画面的变焦和滚动 #-------------------------------------------------------------------------- # 目标…目标的缩放和移动 # [0=自己] [1=目标] [2=所有敌人] [3=我方团灭] [4=敌方全灭] [5=第二个目标] [6=画面] # 调整坐标…快照坐标最终点微调整 [X轴(画面→), Y轴(画面↓)] # 变焦…快照的变焦倍数(%),100为无缩放。 # 时间…快照上的持续时间 # 比重…等待镜头结束 true。否则不等待 false #――动作名称―― 区别 目标 调整坐标 变焦 时间 比重 "镜头复位" => ["camera", 6, [ 0, 0], 100, 40, false], "镜头放大" => ["camera", 6, [ 0, 0], 120, 40, false], "镜头缩小" => ["camera", 6, [ 0, 0], 100, 40, false], "特写放大" => ["camera", 0, [ 0, 0], 120, 0, true], "特写复位" => ["camera", 6, [ 0, 0], 100, 0, true], #-------------------------------------------------------------------------- # ● 画面的摇晃 会摇晃的画面,离地坐标(H坐标为0以上)战斗不摇晃 #-------------------------------------------------------------------------- # 方向…摇晃的方向 [横,纵] 数值越大摇晃幅度变得越大。 # 速度…摇晃的速度。越小摇晃速度越快 # 时间…摇晃持续时间。摇摆幅度随着时间削弱 # 比重…等待摇晃结束 true。不等待则 false。 #――动作名称―― 区别 方向 速度 时间 比重 "摇晃小" => ["shake", [ 0, 4], 2, 16, false], "摇晃中" => ["shake", [ 0, 6], 3, 30, false], "摇晃大" => ["shake", [ 0,12], 3, 40, false], #-------------------------------------------------------------------------- # ● 画面色调变更 背景和战斗的色调变更 #-------------------------------------------------------------------------- # 目标…目标的色调变更 # [0=自己] [1=目标] [2=所有敌人] [3=我方团灭] [4=敌方全灭] [5=第二个目标] # [6=背景] [7=自己+目标] [8=自己以外] [9=自己+目标以外] [10=全屏] # 色调…[ R, G, B, 阿尔法(颜色的强度), 变更时间, ※恢复] # ※恢复…变更完毕后恢复原来的颜色时间。不恢复的话0 # 比重…色调变更结束之前等待的话 true。不等待则false # 变更名 区别 目标 R, G, B, 阿尔法 时间 恢复 比重 "初始化色调" => ["color", 10, [ 0, 0, 0, 0, 30, 0], false], "危机色调" => ["color", 0, [ 255, 50, 50, 100, 40, 40], false], "中毒色调" => ["color", 0, [ 170, 50, 255, 170, 30, 60], false], "黑暗色调" => ["color", 0, [ 0, 0, 0, 170, 30, 60], false], "转换背景" => ["color", 6, [ 0, 0, 0, 255, 30, 0], false], "自己和目标以外转换" => ["color", 9, [ 0, 0, 0, 255, 30, 0], false], "自己和目标以外转换2" => ["color", 9, [ 0, 0, 0, 200, 30, 0], false], #-------------------------------------------------------------------------- # ● 过渡 它是执行已定的屏幕之后的过渡 #-------------------------------------------------------------------------- # 在运行之前运行的操作 "画面固定",请让我修复屏幕 # # 边界…边界的模糊性。值越大越模糊。 # 时间…过渡时间。过渡中游戏画面是固定的 # 过渡文件名…过渡图像。请放入在 Pictures 文件夹 #―――动作名称――― 区别 边界 时间 过渡文件名 "圈" => ["ts", 40, 60, "circle"], #-------------------------------------------------------------------------- # ● 残像 战斗移动时留下的残像 #-------------------------------------------------------------------------- # 数…残像数。0不显示残像,残像太多会超负荷。 # 间隔…表示残像的间隔。越小越狭窄,单位为帧。 # 处理…处理残像。所有动作结束时消失 true、不消失一直存在 false # 透明度…残像的透明度 #――动作名称―― 区别 数 间隔 处理 透明度 "残像ON" => ["mirage", 4, 2, true, 200], "残像OFF" => ["mirage", 0, 0, true, 0], "残像2" => ["mirage", 2, 4, true, 100], #-------------------------------------------------------------------------- # ● 战斗回旋镖 镖回旋图像 #-------------------------------------------------------------------------- # 回旋镖的所有战斗动作结束的话、回旋镖角度复位 # 回旋镖中的图像传输原原点是中心。不像反转,武器操作不会反映 # # 时间…回旋时间。为 0 时立即反映(帧) # 始度…回旋开始时的角度。指定0~360度,正为逆时针旋转、负为顺时针旋转。 # 终度…回旋结束时的角度。指定0~360度,上述一起敌人逆计算。 # 类型…回旋镖结束后的处理。[0…回旋镖复位] [1…结束时角度那样] [2…循环] #――动作名称―― 区别 时间 始度 终度 类型 "右1回旋" => ["angle", 12, 0, -360, 0], "左1回旋" => ["angle", 12, 0, 360, 0], #-------------------------------------------------------------------------- # ● 战斗放大缩小 画像缩放 #-------------------------------------------------------------------------- # 放大缩小的所有战斗动作结束的话、放大缩小被复位 # 反转不同,武器的动作被反映。 # # 时间…缩放时间。 # 开始尺寸…缩放开始时的尺寸。请输入小数点。[X轴(横), Y轴(纵)] # 终了尺寸…缩放结束时的尺寸。请输入小数点。[X轴(横), Y轴(纵)] # 类型…缩放结束后的处理。[0…尺寸复位] [1…结束时不复位] [2…循环] #――动作名称―― 区别 时间 开始尺寸 终了尺寸 类型 "横向缩放" => ["zoom", 12, [1.0, 1.0], [0.5, 1.0], 0], "纵向缩放" => ["zoom", 12, [1.0, 1.0], [1.0, 0.5], 0], #-------------------------------------------------------------------------- # ● 战斗透明度操作 图像的透明度变化 #-------------------------------------------------------------------------- # 透明度操作的所有战斗动作结束的话、透明度操作被复位 # # 时间…透明度变更时间。 # 开始…变更开始时的透明度。0 为完全消失的状态、255 为完全不透明的状态。 # 终了…变更结束时的透明度。 # 阴影…阴影也有同样的透明度操作 true # 武器…武器也有同样的透明度操作 true # 循环…透明度变更有结束了后,操作自动逆转的继续下去 true # 比重…等待操作结束再进行下一步 true #――动作名称―― 区别 时间 开始 终了 阴影 武器 循环 比重 "逃走透明" => ["opacity", 30, 255, 0, true, true, false, false], "透明化" => ["opacity", 60, 255, 0, true, true, false, false], "透明化WT" => ["opacity", 60, 255, 0, true, true, false, true], "透明化解除" => ["opacity", 60, 0, 255, true, true, false, false], "透明化解除WT" => ["opacity", 60, 0, 255, true, true, false, true], #-------------------------------------------------------------------------- # ● 擦除动画 擦除用于事件的图标 #-------------------------------------------------------------------------- # 种类…擦除的种类(纵位置)指定在0-9 # 速度…刷新速度。单元是从第2帧被播放 # 尺寸…擦除的尺寸 # 擦除动画名 区别 种类 速度 尺寸 "状态异常/虚弱" => ["balloon", 5, 10, 1], "状态异常/睡眠" => ["balloon", 9, 10, 1], "状态异常/中断" => ["balloon", 0, 10, 1], "状态异常/混乱" => ["balloon", 1, 10, 1], "状态异常/眩晕" => ["balloon", 6, 10, 1], #-------------------------------------------------------------------------- # ● 图片的显示 切入等 #-------------------------------------------------------------------------- # ID…使用的图片ID。为了管理图片ID。多少张也能表示 # 所有动作结束的话会自动被消去(Bitmap解放) # 开始坐标…移动开始位置。把图片左上左上角作为原点。[X轴, Y轴] # 如果已经有图片,在[]里输入开始坐标 # 终了坐标…移动结束位置。开始位置和同值的话不移动表示。 # 平面使用的情况,开始和结束为[]的移动速度维持 # 时间…移动时间。0 消去图片 # Z轴…图片的Z坐标。100要以上的话自窗口在跟前被表示 # 透明度…透明度设定。[开始时的透明度, 每帧被加在一起算的透明度] # 平面使用…平面类(图像瓷砖状排列图像)使用矩形场合。[X轴,Y轴] # []为不使用平面 # BA反转…背后进攻时上图像反转和X坐标移动反过来 true # 平面使用时的图像true不反转、X坐标移动相反 # 图片文件名…图片文件夹内的文件名。 #―――动作名称――― 区别 ID 开始坐标 终了坐标 时间 Z轴 透明度 平面使用 BA反转 图片文件名 "切入A1" => ["pic", 0, [-300, 8], [ 100, 8], 30, 90, [ 0, 10], [], true, "Actor4-1"], "切入A2" => ["pic", 0, [-300, 8], [ 100, 8], 30, 90, [ 0, 10], [], true, "Actor4-2"], "切入A3" => ["pic", 0, [-300, 8], [ 100, 8], 30, 90, [ 0, 10], [], true, "Actor5-2"], "切入A4" => ["pic", 0, [-300, 8], [ 100, 8], 30, 90, [ 0, 10], [], true, "Actor5-3"], "切入终" => ["pic", 0, [], [ 600, 8], 30, 90, [255, 0], [], true, ""], "切入背景开始" => ["pic", 1, [ 0, 8], [ 100, 8], 10, 80, [ 0, 10], [544,288], true, "cutin_back"], "切入背景结束" => ["pic", 1, [], [], 10, 80, [255, -7], [544,288], true, ""], "白渐现" => ["pic", 0, [ 0, 0], [ 0, 0], 50,500, [ 0, 6], [], false, "white"], "白渐隐" => ["pic", 0, [ 0, 0], [ 0, 0], 50,500, [255, -6], [], false, "white"], #-------------------------------------------------------------------------- # ● 状态操作 #-------------------------------------------------------------------------- # 目标…[0=自己] [1=目标] [2=所有敌人] [3=我方团灭] [4=敌方全灭] [5=第二个目标] # 扩张…进一步放大在上述设定的目标 [0=无扩展] [1=随机扩张1项] [2=除我以外] # 操作…附加状态 "+",解除状态 "-" # 状态ID…操作状态的ID总结排列放入 # 附加状态名 区别 目标 扩张 操作 状态ID "战斗不能给予" => ["sta", 0, 0, "+", [1]], #-------------------------------------------------------------------------- # ● FPS(整个游戏的速度)变更 检查动作的细节用 #-------------------------------------------------------------------------- # 游戏速度…默认60,很低的话显然会变得缓慢。 #――动作名称―― 区别 游戏速度 "慢速播放" => ["fps", 20], "正常播放" => ["fps", 60], #-------------------------------------------------------------------------- # ● 战斗图像变更 战斗图像的参照先变更文件 #-------------------------------------------------------------------------- # 维持…角色的情况,战斗后也变更为维持的话 true # 指数…关于角色,设定是步行gura的哪个矩形 # [0][1][2][3] # [4][5][6][7] # # 文件名…变更图像文件名。参照 Characters文件夹、 # 敌人参照 Battlers 文件夹 # 变脸…角色的状态,战斗后的脸也变更[索引变脸, 文件名] # 如果没有变更[] #―――动作名称――― 区别 维持 指数 文件名 变脸 "化身" => ["change", false, 6, "Animal", [0, "Actor4"]], "狸猫变身" => ["change", false, 6, "J_Animal", []], "变身恢复" => ["change", false, 2, "忍者", []], #-------------------------------------------------------------------------- # ● 释放技能 行动中断,释放出了另外的技能 #-------------------------------------------------------------------------- # 学会…如果释放的技能未学会也可以实行 true # 费用条件…如果释放的技艺的费用即使不足也可以实行 true # 技能ID…释放的技能ID #―――动作名称――― 区别 学会 费用条件 技能ID "多段攻击派生" => ["der", true, false, 130], #-------------------------------------------------------------------------- # ● 播放音乐 BGM・BGS・SE鸣响 #-------------------------------------------------------------------------- # 类别…音效"SE" 背景音乐"BGM" 背景音效"BGS" # 音调…音调。指定50~150,默认100。 # 音量…音量。指定50~150,默认100。 # 文件名…播放的音乐文件。""的BGM,BGS为变不断各种设定可能。 #――动作名称―― 区别 类别 音调 音量 文件名 "Bow1" => ["sound", "se", 100, 80, "Bow1"], "Bow2" => ["sound", "se", 150, 100, "Fire8"], "Bow3" => ["sound", "se", 110, 100, "Fire6"], "Bow4" => ["sound", "se", 150, 100, "拔刀"], #-------------------------------------------------------------------------- # ● 播放视频 播放ogv视频文件 #-------------------------------------------------------------------------- # 文件名…播放的视频文件名。参照 Movies 文件夹。 #――动作名称―― 区别 文件名 "死亡标志动画" => ["movie", "sample1"], #-------------------------------------------------------------------------- # ● 游戏开关(横版专用开关)操作 #-------------------------------------------------------------------------- # ID是侧视图的ID,仅切换开关游戏,减去附加的操作 # # ON ID…ON 将数组总结了开关ID来 # OFF ID…OFF 将数组总结了开关ID来 # #――动作名称―― 区别 ON ID OFF ID "开关No1/ON" => ["switch", [ 1], []], "背景宇宙变更" => ["switch", [-4], []], "背景宇宙解除" => ["switch", [], [-4]], "魔法阵ON" => ["switch", [-5], []], "魔法阵OFF" => ["switch", [], [-5]], #-------------------------------------------------------------------------- # ● 游戏变量操作 #-------------------------------------------------------------------------- # 变量ID…操作几号变量 # 操作…[0=赋值] [1=加算] [2=减算] [3=乘算] [4=除算] [5=取余] # 操作量…运算的目标指定的数值。减去那个数字, # 存储在变量ID绝对值的数值是该操作的目标 # # ――动作名称―― 区别 变量ID 操作 操作量 "变量No1/+1" => ["variable", 1, 1, 1], #-------------------------------------------------------------------------- # ● 条件分歧 (游戏开关) 设置条件,让分支行动 #-------------------------------------------------------------------------- # 开关ID…参照几号的开关吗?用减操纵 横版专用开关 # 条件…ON=true、OFF=false # 分歧…满足条件的情况的分歧处理,不满足的那个情况不处理。 # [0=实行下面的动作] [1=废除下面的动作] [2=全部动作结束] # #―――动作名称――― 区别 开关ID 条件 分歧 "开关No1=ON时运行" => ["n_1", 1, true, 0], #-------------------------------------------------------------------------- # ● 条件分歧 (游戏变量) #-------------------------------------------------------------------------- # 变数No…参照几号变量 # 数值…条件的数字放入。我将把存储在绝对值的变数的数量值是负 # 条件…变数你看到的是用一些条件比较…[0=等于] [1=小于] [2=大于] # 分歧…满足条件的场合的分歧处理。如果不满足的是相反的处理 # [0=实行下面的动作] [1=废除下面的动作] [2=全部动作结束] # #―――动作名称――― 区别 变数No 数值 条件 分歧 "变量No1=1时运行" => ["n_2", 1, 1, 0, 0], #-------------------------------------------------------------------------- # ● 条件分歧 (状态) #-------------------------------------------------------------------------- # 目标…参照条件目标 [0=自己] [1=目标] [2=所有敌人体] [3=我方团灭体] [4=敌方全灭体] [5=第二个目标] # 状态ID…第几号状态作为条件 # 条件…[0=已附加] [1=未附加] # 人数…成为上面的条件的必要人数。条件目标组的场合,0小组全体人员的数量 # 分歧…满足条件的场合的分歧处理。如果不满足的是相反的处理 # [0=实行下面的动作] [1=废除下面的动作] [2=全部动作结束] # #―――动作名称――― 区别 目标 状态ID 条件 人数 分歧 "死亡确认" => ["n_3", 1, 1, 0, 1, 1], #-------------------------------------------------------------------------- # ● 条件分歧 (技能) #-------------------------------------------------------------------------- # 目标…参照条件目标 [0=自己] [1=目标] [2=所有敌人体] [3=我方全体] [4=敌方全体] [5=第二个目标] # 状态ID…第几号状态作为条件 # 条件…[0=已附加] [1=未附加] # 人数…成为上面的条件的必要人数。条件目标组的场合,0小组全体人员的数量 # 分歧…满足条件的场合的分歧处理。如果不满足的是相反的处理 # [0=实行下面的动作] [1=废除下面的动作] [2=全部动作结束] # #―――动作名称――― 区别 目标 技能ID 条件 人数 分歧 "强击使用可限定" => ["n_4", 0, 80, 0, 1, 0], #-------------------------------------------------------------------------- # ● 条件分歧 (参数) #-------------------------------------------------------------------------- # 目标…参照条件目标 [0=自己] [1=目标] [2=所有敌人体] [3=我方全体] [4=敌方全体] [5=第二个目标] # 类型…哪个参数条件? # [1=Lv] [2=最大HP] [3=最大MP] [4=HP] [5=MP] [6=TP] [7=攻击力] # [8=防御力] [9=法术力] [10=法术防御] [11=敏捷性] [12=幸运] # # 数值…条件的数字放入。从最大值减去百分比(限定HP・MP・TP) # 条件…参照的参数与条件的数字比较…[0=等于] [1=小于] [2=大于] # 人数…成为上面的条件的必要人数。条件目标组的场合,0小组全体人员的数量 # 分歧…满足条件的场合的分歧处理。如果不满足的是相反的处理 # [0=实行下面的动作] [1=废除下面的动作] [2=全部动作结束] # #―――动作名称――― 区别 目标 类别 数值 条件 人数 分歧 "HP>50%运行" => ["n_5", 0, 4, -50, 2, 1, 0], #-------------------------------------------------------------------------- # ● 条件分歧 (装备) #-------------------------------------------------------------------------- # 目标…参照条件目标 [0=自己] [1=目标] [2=所有敌人体] [3=我方全体] [4=敌方全体] [5=第二个目标] # 类型…类型装备中的一个先决条件 [0=武器] [1=防具] # 装备ID…上述类型物品ID。ID一包在内排列[ ]放入。 # 武器(防具)加"-"则正好相反 # 条件…[0=无法装备] [1=可以装备] # 人数…成为上面的条件的必要人数。条件目标组的场合,0小组全体人员的数量 # 分歧…满足条件的场合的分歧处理。如果不满足的是相反的处理 # [0=实行下面的动作] [1=废除下面的动作] [2=全部动作结束] # #―――动作名称――― 区别 目标 类型 装备ID 条件 人数 分歧 "手斧限定" => ["n_6", 0, 0, [ 1], 0, 1, 0], "拳限定" => ["n_6", 0, 0, [-2], 0, 1, 0], "拳除外" => ["n_6", 0, 0, [-2], 0, 1, 1], "弓限定" => ["n_6", 0, 0, [-6], 0, 1, 0], "弓除外" => ["n_6", 0, 0, [-6], 0, 1, 1], "拳弓除外" => ["n_6", 0, 0, [-2,-6], 0, 1, 1], #-------------------------------------------------------------------------- # ● 条件分歧 (脚本) #-------------------------------------------------------------------------- # 分歧…满足条件的场合的分歧处理。如果不满足的是相反的处理 # [0=实行下面的动作] [1=废除下面的动作] [2=全部动作结束] # 脚本…返回 true 或 false 的脚本。 # #―――动作名称――― 区别 分歧 脚本 "50%几率运行" => ["n_7", 0, "rand(100) < 50"], "角色限定" => ["n_7", 0, "@battler.actor?"], "角色ID1限定" => ["n_7", 0, "@battler.actor? && @battler.actor_id == 1"], "角色ID2限定" => ["n_7", 0, "@battler.actor? && @battler.actor_id == 2"], "角色ID6限定" => ["n_7", 0, "@battler.actor? && @battler.actor_id == 6"], "角色ID7限定" => ["n_7", 0, "@battler.actor? && @battler.actor_id == 7"], "敌人限定" => ["n_7", 0, "[email protected]?"], "敌人中止" => ["n_7", 2, "[email protected]?"], "二刀流限定" => ["n_7", 0, "@battler.dual_wield?"], #-------------------------------------------------------------------------- # ● 第二目标操作 #-------------------------------------------------------------------------- # 第二目标,通常的目标是一个独立的目标情报 # 什么也不操作时,通常与目标等于目标配置 # # 目标…[0=自己] [1=目标] [2=所有敌人体] [3=我方全体] [4=敌方全体] [5=第二目标] # # INDEX…缩小目标队员的索引(排列顺序) INDEX = [索引, 区别] # 索引…队员的索引数? # 区别…数值条件 [0=不缩小] [1=索引该指数目标] [2=排除那个索引] # # ID…把目标角色(放入)ID缩小的话ID的数字放入。0不缩小 # 要减的话那个绝对价值的ID成为排除条件 # # 状态…目标现在附加的状态ID缩小的话状态ID的数字放入。0不缩小 # 没附加事成为条件要减 # # 技能…目标使用可能的技能ID缩小的话技能ID的数字放入。0不缩小 # 要减的话使用不可能变成为条件 # # 参数…目标的参数条件检索 参数 = [类型, 数值, 区别] # 类型…[0=不缩小] [1=Lv] [2=最大HP] [3=最大MP] [4=HP] [5=MP] [6=TP] # [7=攻击力] [8=防御力] [9=法术力] [10=法术防御] [11=敏捷性] [12=幸运] # 数值…类型决定的数值放入。从最大值减去百分比(限定HP・MP・TP) # 区别…数值的条件 [0=等于] [1=小于] [2=大于] # # 装备…目标的装备物检索条件。限制角色 装备 = [类型, ID] # 类型…[0=武器] [1=防具] # ID…上述类型物品ID。ID一包在内排列[ ]放入。 # 武器(防具)加"-"则正好相反 # # 扩张…进一步放大在上述设定的目标 [0=无扩展] [1=随机扩张1项] [2=除我以外] # 操作…[0=不操作] [1=第二个目标,变更到正常目标] [2=初始化第二目标通常目标] #――动作名称―― 区别 目标 INDEX ID 状态 技能 参数 装备 扩张 操作 "自己以外我方团灭" => ["s_t", 3, [ 0, 0], 0, 0, 0, [ 0, 0, 0], [ 0,[0]], 2, 0], "全屏化" => ["s_t", 4, [ 0, 0], 0, -1, 0, [ 0, 0, 0], [ 0,[0]], 0, 1], #-------------------------------------------------------------------------- # ● 常见对话事件 #-------------------------------------------------------------------------- # ID…常见的事件ID # 比重…如果运行停止动作事件 true # #―――动作名称――― 区别 ID 比重 "常见No1" => ["common", 1, true], #-------------------------------------------------------------------------- # ● 脚本操作 #-------------------------------------------------------------------------- # 脚本运行。范例 p = 1 部分eval实行放入脚本 # #―――动作名称――― "测试脚本" => ["p = 1 "], #-------------------------------------------------------------------------- # ● 其他 设定项目没有充分的动作里 #-------------------------------------------------------------------------- # 战斗动画消去 …清除所显示的战斗动画(射飞的动画不会被消除) # 强制战斗结束 …让战斗强制结束 # 画面固定 ………固定游戏画面,放入在过渡前 # 损坏动画 ………播放技能动画,那个结束之前把让损坏POP # 反转 ……………图像和武器动画反转。再次反转让全动作结束反转解除 # 武器消去 ………表示中的武器图像消去 # 武器消去解除 …消去的武器图像表示 # 敌人崩溃 ………崩溃效果执行。主要敌人的战斗不能使用 # 崩溃禁止 ………目标的HP 0时的崩溃禁止。连续攻击击开始时等 # 崩溃禁止解除 …崩溃禁止解除。连续攻击击结束等。倒没行动结束时上崩溃许可 # 待命废除 ………不进行待命的动作。战斗活动的演出等 # 待命废除解除 …待命废除解除,待命的动作进行 # 初期位置变更 …元的坐标(初期位置)目前的标变更坐上 # 初期位置变更解除…初始位置变更变更了坐在标元次归 # 强制 ……………这一次的行动让强制目标(反应) # 强制2 …………这一次的行动让强制第二目标(反应) # 接下来的行动者…战斗行动结束了看作,直后下面的角色开始行动 # 个别启动 ………复数目标攻击个别在处理时,重复行动开始的记号 # 个别结束 ………复数目标攻击个别在处理时,重复行动开始的记号 # 开始循环 ………"开始循环"与"结束循环"永恒地反复间的动作 # 结束循环 ………"开始循环"与"结束循环"永恒地反复间的动作 #―――动作名称――― 区别 "战斗动画消去" => ["anime_off"], "强制战斗结束" => ["battle_end"], "画面固定" => ["graphics_freeze"], "伤害动画" => ["damage_anime"], "反转" => ["mirror"], "武器消去" => ["weapon_off"], "武器消去解除" => ["weapon_on"], "敌人崩溃" => ["normal_collapse"], "禁止崩溃" => ["no_collapse"], "禁止崩溃解除" => ["collapse"], "待机取消" => ["non_motion"], "待机取消解除" => ["non_motion_cancel"], "初期位置变更" => ["change_base_position"], "初期位置变更解除" => ["set_base_position"], "强制1" => ["force_action"], "强制2" => ["force_action2"], "接下来的行动者" => ["next_battler"], "个人开始" => ["individual_start"], "个人结束" => ["individual_end"], "循环开始" => ["loop_start"], "循环结束" => ["loop_end"], #-------------------------------------------------------------------------- # ● 比重 下面的动作不去等待时间 #-------------------------------------------------------------------------- # 如果只有几个值中的行为,就是等待时间。 # (例如: "20" …下面的动作不去等待20帧) # # 如果为负的值,这个数字就变成随机的比重,等待时间将被随机为 0~数值的绝对值。 # (例如: "-20" …随机0~20帧等待) #-------------------------------------------------------------------------- # ● 快捷命令 #-------------------------------------------------------------------------- # 通常设定了的动作名充分动作排列里行动制作的。 # 动作设定不直接命令记载,作业缩短了。 # 所以建议注册操作不增加应经常使用此快捷方式时 # # [战斗动画] # (例) "anime(20)" ……………数据库20号的动画为目标实行 (等待操作) # (例) "anime(20,false)" ……数据库20号的动画为目标实行 (不等待操作) # (例) "anime_me(20)" …………数据库20号的动画为自身实行 (等待操作) # (例) "anime_me(20,false)" …数据库20号的动画为自身实行 (不等待操作) # # [比重指数延迟] ※战斗指数的比重加倍延迟等待 # (例) "delay(12)"…1号指数0帧的比重 2号的比重为12帧 3号的比重为24帧 # # [音効(SE)] # (例) "se('Bow1')" …播放文件名为 Bow1 的音効 # (例) "se('Bow1',50)" …播放文件名为 Bow1 的音効, 音调为50% # # [对目标动作(全)动作强制] # (例) "target('挨打向后仰')" ……强制“挨打向后仰”作用在目标上。 # (例) "target2('被挨打')" …………强制“被挨打”全部作用在第二目标上。 } #============================================================================== # ■ 所有动作 #------------------------------------------------------------------------------ # 它是操作动作的组合发生在顺序,从左侧开始。 # 该操作也可以把一个完整的工作在整个工作零件化。 # 如何使用下一分钟歧的这样一个地方整个工作条件是非常有用的。 #============================================================================== FULLACTION = { # ―――待机系――― "通常待机" => ["待机"], "通常待机固定" => ["待机固定WT"], "危机待机" => ["危机色调","待机","待机"], "防御待机" => ["待机固定WT"], "中毒待机" => ["中毒色调","待机","80"], "黑暗待机" => ["黑暗色调","待机","80"], "虚弱待机" => ["状态异常/虚弱","待机","80"], "混乱待机" => ["状态异常/混乱","待机","80"], "睡眠待机" => ["状态异常/睡眠","待机固定","80"], "中断待机" => ["状态异常/中断","待机","80"], "眩晕待机" => ["状态异常/眩晕","待机","80"], "观望" => ["待机","60"], "无法战斗" => ["倒下"], # ――系统系―― "我方开始战斗" => ["我方进行战斗准备","delay(4)","坐标向左复位"], "中止战斗" => ["退场"], "逃跑" => ["目标动画","镜头复位","delay(4)","退场"], "敌人逃跑" => ["目标动画","逃走透明","退场"], "逃跑失败" => ["镜头复位","delay(4)","逃走途中","后退一步","坐标向左复位"], "指令输入" => ["战斗动画消去","指令输入移动"], "指令输入终了" => ["坐标提前复位"], "防御指令" => ["待机固定WT"], "法术指令" => ["待机固定","魔法咏唱中"], "法术指令2" => ["待机固定","魔法咏唱中2"], "战士技指令" => ["待机固定","特技待机中"], "战士技指令2" => ["待机固定","特技待机中2"], "普通技指令" => ["待机固定","通常待机"], "防御" => ["目标动画","待机固定WT"], "回避" => ["残像2","后闪一步","坐标复位"], "盾防御" => ["盾防御"], "切腹" => ["肋差攻击1"], "替身开始动作" => ["敌提前移动","初期位置变更"], "替身终了动作" => ["初期位置变更解除","坐标向左复位"], "替身的横版动作开始" => ["后退一步","后退一步","待机固定WT"], "替身的横版动作结束" => ["坐标向左复位"], "胜利站立" => ["战斗动画消去","魔法咏唱中","魔法咏唱中","魔法咏唱中"], "胜利挥动" => ["战斗动画消去","胜利跳跃武器","胜利跳跃着地","60"], "胜利斩击" => ["战斗动画消去","武器特技动作","20","武器上斩","30"], "胜利挥剑" => ["战斗动画消去","武器摆上","5","武器摆下","5","武器旋转1","武器旋转2","武器消去"], "胜利动作" => ["战斗动画消去","武器特技动作B","60"], "胜利后空翻" => ["战斗动画消去","右1回旋","胜利跳跃","60"], "胜利前空翻" => ["战斗动画消去","残像ON","后空翻","右1回旋","跳前一步","60"], "后空翻" => ["右1回旋","跳后一步"], "前空翻" => ["左1回旋","跳前一步"], "闪现" => ["anime_me(119)","20"], # ―动作系― "被攻击" => ["挨打向后仰","坐标向左复位"], "被关键一击" => ["摇晃中","挨打向后仰大","坐标向左复位"], "纵向摇晃" => ["纵向摇晃01","纵向摇晃02","纵向摇晃01","纵向摇晃02","纵向摇晃01","纵向摇晃02"], # ―快捷系(从其他的全动作被叫出的零件)― "斩击" => ["武器挥砍R","目标动画武器","10"], "拔刀" => ["武器上斩","目标动画武器","10"], "拳" => ["武器拳击","目标动画武器","10"], "弓" => ["弓射击1","Bow1","子弹发射1","9"], "火枪" => ["弓射击2","Bow2","子弹发射2","9"], "大筒" => ["弓射击3","Bow3","子弹发射2","12"], "攻击" => ["拳限定","拳","弓限定","弓","拳弓除外","斩击"], "普通攻击开始" => ["敌前进","禁止崩溃","个人开始","二刀流限定","二刀左"], "普通攻击结束" => ["死亡确认","目标动画武器WT","个人结束","禁止崩溃解除","接下来的行动者","坐标曲线复位"], "二刀左" => ["武器里反手斩","目标动画武器","3"], "特技发动" => ["前进一步","特技发动动画"], "特技发动2" => ["前进一步","特技发动动画2"], "魔法发动" => ["魔法","魔法发动动画"], "魔法发动2" => ["魔法","魔法发动动画2"], "切入" => ["切入背景开始","切入分歧","70","切入终","切入背景结束","20"], "切入分歧" => ["角色ID1限定","切入A1","角色ID2限定","切入A2","角色ID6限定","切入A3","角色ID7限定","切入A4"], "死亡动画" => ["白渐现","50","死亡标志动画","白渐隐","50"], "背景宇宙" => ["镜头缩小","se('Blind',70)","转换背景","自己以外我方团灭","强制2","透明化","透明化","40","背景宇宙变更","初始化色调"], "背景宇宙解除" => ["镜头复位","转换背景","target2('透明化解除WT')","透明化解除","40","背景宇宙解除","初始化色调"], "魔法阵表示" => ["se('Blind',70)","画面固定","魔法阵ON","圈"], "魔法阵消去" => ["40","画面固定","魔法阵OFF","圈"], # ――通常攻击系―― "普通攻击" => ["普通攻击开始","待机固定","普通攻击结束"], "斩击" => ["普通攻击开始","死亡确认","se('拔刀',150)","武器挥砍R","普通攻击结束"], "砸击" => ["普通攻击开始","死亡确认","武器砸","普通攻击结束"], "拔刀" => ["普通攻击开始","死亡确认","se('63出刀',80)","武器上斩","普通攻击结束"], "拳" => ["普通攻击开始","武器拳击","普通攻击结束"], "刺击" => ["普通攻击开始","se('挥舞1',100)","5","武器刺","普通攻击结束"], "反手斩" => ["普通攻击开始","武器反手斩","普通攻击结束"], "射击1" => ["前进一步","弓射击1","Bow1","子弹发射1","15","坐标复位"], "射击2" => ["前进一步","se('上膛1',90)","弓射击2","20","Bow2","摇晃小","子弹发射WT2","坐标复位"], "射击3" => ["个人开始","弓射击3","Bow3","摇晃中","子弹发射WT3","个人结束"], "斩击2" => ["普通攻击开始","se('拔刀',120)","武器挥砍Rs","普通攻击结束"], "拔刀2" => ["普通攻击开始","se('63出刀',80)","武器上斩2","目标动画武器","15","se('63出刀',80)","武器挥砍R2","目标动画武器","20","坐标复位"], "刺击2" => ["普通攻击开始","se('挥舞2',70)","5","武器刺s","普通攻击结束"], "射击1s" => ["前进一步","弓射击1","Bow1","子弹发射1s","15","坐标复位"], "反手斩2" => ["30","残像2","se('wind10',130)","敌瞬移","5","武器反手斩","目标动画武器","10","武器挥砍R","anime(142,false)","目标动画","10","武器反手斩","目标动画武器","后空翻", "敌后冲刺","anime(141,false)","武器拳击","目标动画","10","后空翻","se('wind10',130)","瞬移复位"], "修罗斩" => ["残像ON","原地动作","se('挥舞1',100)","修罗斩发射"], # ――技能系(敌方)――― "剑攻击" => ["敌前进","5","目标动画","15","坐标复位"], "太刀攻击" => ["敌前进","5","目标动画","15","坐标复位"], "忍者刀攻击" => ["敌前进","5","目标动画","15","坐标复位"], "长枪攻击" => ["敌前进","5","目标动画","15","坐标复位"], "钝器攻击" => ["敌前进","5","目标动画","15","坐标复位"], "弓射击" => ["前进一步2","Bow1","子弹发射1","15","坐标复位"], "火枪射击" => ["前进一步","Bow2","摇晃小","子弹发射WT2","坐标复位"], "大筒射击" => ["原地动作","Bow3","摇晃中","10","伤害动画","anime(7,false)","摇晃中","待机","30"], "手里剑射击" => ["前进一步2","Bow4","子弹发射4a","坐标复位"], "苦无射击" => ["前进一步2","Bow4","子弹发射4b","坐标复位"], "忍者2连斩" => ["敌前进","目标动画","5","目标动画","坐标复位"], "近身连斩" => ["特技发动动画","残像ON","敌前进","目标动画","3","目标动画","3","目标动画","3","目标动画","3", "目标动画","3","目标动画","3","目标动画","3","目标动画","3", "目标动画","3","目标动画","3","坐标复位","残像OFF"], "连发火枪" => ["特技发动动画","残像ON","后退一步","Bow2","子弹发射2","3","Bow2","子弹发射2","3","Bow2","子弹发射2","3", "Bow2","子弹发射2","3","Bow2","子弹发射2","3","Bow2","子弹发射2","3","Bow2","子弹发射2","3","Bow2","子弹发射2","3", "Bow2","子弹发射2","3","Bow2","子弹发射2","3","Bow2","子弹发射2","3","Bow2","子弹发射2","3","Bow2","子弹发射2","3","坐标复位","残像OFF"], "连发手里剑" => ["前进一步2","特技发动动画","残像ON","Bow4","子弹发射4a","2","Bow4","子弹发射4a","2","Bow4","子弹发射4a","2", "Bow4","子弹发射4a","2", "Bow4","子弹发射4a","2","Bow4","子弹发射4a","2", "Bow4","子弹发射4a", "2","Bow4","子弹发射4a","2","Bow4","子弹发射4a", "2","Bow4","子弹发射4a", "坐标复位","残像OFF"], "弓乱射" => ["前进一步","特技发动动画","Bow1","2","Bow1","2","Bow1","2","Bow1","子弹发射1","9","坐标复位"], "火枪齐射" => ["前进一步","特技发动动画","Bow2","4","Bow2","4","Bow2","4","Bow2","摇晃小","子弹发射WT2","坐标复位"], "马冲击" => ["特技发动动画","se('36马叫',100)","跳前一步","残像ON","敌冲刺","伤害动画","摇晃中","跳后一步","残像OFF","坐标复位"], "赤备突击-枪" => ["自己和目标以外转换", "特技发动","se('36马叫',100)","残像ON","敌后冲刺","目标动画","摇晃中", "初始化色调","残像OFF","20","坐标复位"], "赤备突击-刀" => ["自己和目标以外转换", "特技发动","se('36马叫',100)","残像ON","敌后冲刺","目标动画","摇晃中", "初始化色调","残像OFF","20","坐标复位"], "太刀攻击2" => ["残像2","se('男a07',100)","敌冲刺","武器上斩","目标动画武器","8","坐标复位"], "秘剑燕返" => ["自己和目标以外转换","se('男v04',100)","20","特技发动动画","残像ON","敌冲刺","se('63出刀',100)","武器上斩","目标动画","右1回旋","目标动画", "后跳复位","残像OFF","初始化色调","待机"], "秘剑一闪" => ["自己和目标以外转换2", "武器举刀2","se('男v04',100)","特技发动","残像ON","anime(130,false)","se('63出刀',100)","敌后一闪","目标动画", "武器上斩","30","初始化色调","残像OFF","坐标复位"], "极一闪" => ["自己和目标以外转换", "武器举刀2","se('男v04',100)","特技发动","残像ON","敌后冲刺2","se('拔刀',110)","反转","敌后冲刺2","se('拔刀',110)","反转","敌后冲刺2","se('拔刀',110)", "武器摆下","se('拔刀',90)","10", "se('舞剑',100)","武器旋转1","武器旋转2","武器旋转1","武器旋转2","武器消去","se('Sword3',140)","30", "目标动画","目标动画","目标动画","30","初始化色调","残像OFF","坐标复位","武器消去解除"], "落叶斩" => ["自己和目标以外转换2","20","特技发动动画","残像ON","敌冲刺","se('男a07',100)","武器上斩2","目标动画武器","5","se('男a07',100)","武器中斩s","目标动画武器","5", "se('男a07',100)","武器举刀2","武器上斩","目标动画武器","后空翻","残像OFF","初始化色调","坐标复位"], "风林火山sp" => ["魔法发动2","待机固定","自己和目标以外转换","30","特写放大","20","se('男c5',100)","240","anime(121,true)","10","特写复位","10","目标动画","20","初始化色调","60"], # ――技能系――― "战士技" => ["特技发动","特技","伤害动画","坐标复位"], "法术" => ["魔法发动","魔法","伤害动画","坐标复位"], "觉醒" => ["魔法发动2","魔法","伤害动画","坐标复位"], "水枪" => ["特技发动","武器挥砍R","水枪发射","坐标复位"], "投掷武器" => ["特技发动","Bow1","武器挥砍R","6","待机固定","武器投掷开始","武器投掷结束","坐标复位"], "切入攻击" => ["特技发动","切入","攻击","坐标复位"], "多段攻击" => ["特技发动","待机固定","死亡动画","普通攻击开始","武器挥砍R","普通攻击结束"], "化身" => ["特技发动","anime(110,false)","化身","待机固定","120","坐标复位"], "背景变更攻击" => ["魔法发动","武器挥砍R","背景宇宙","伤害动画","背景宇宙解除","坐标复位"], "图片攻击" => ["魔法发动","魔法阵表示","武器挥砍R","anime(80,false)","60","摇晃大","目标动画","魔法阵消去","坐标复位"], "转换攻击" => ["特技发动","自己和目标以外转换","se('Laser',150)", "残像ON","敌前进","anime(35,false)","敌后退","目标动画", "武器挥砍R","20","初始化色调","坐标复位","残像OFF"], "空中攻击" => ["特技发动","Bow1","跳前一步","敌前进", "待机固定","左1回旋","anime(1,false)","撞击", "目标动画","摇晃中","强制1","纵向摇晃","20", "跳后一步","坐标复位"], "三段斩" => ["敌前进","武器举刀","特技发动动画","se('63出刀',80)","武器挥砍R2","目标动画武器","15","se('63出刀',80)","武器上斩2","目标动画武器","15","se('63出刀',80)","武器上斩","目标动画武器","10","坐标复位"], "叶切合" => ["特技发动动画","残像ON","敌前进","se('63出刀',90)","武器上斩2","目标动画武器","15","se('63出刀',90)","武器中斩s","目标动画武器","10","残像OFF","坐标复位"], "浮舟" => ["敌前进","武器举刀2","特技发动动画","残像ON","se('63出刀',80)","武器上斩","目标动画武器","后空翻","残像OFF","坐标复位"], "内劲" => ["30","武器特技动作","se('男b01',100)","60","伤害动画","坐标复位"], "一闪" => ["自己和目标以外转换2", "武器举刀2","特技发动","残像ON","anime(130,false)","se('63出刀',100)","敌后一闪","目标动画", "武器上斩","30","初始化色调","残像OFF","坐标复位"], "居合斩" => ["残像2","se('63出刀',100)","敌冲刺","武器上斩","目标动画武器","8","坐标复位"], "鸟王剑男" => ["前进一步","武器举刀4","自己和目标以外转换2","特技发动动画","se('男b06',100)","30","武器上斩2b","se('63出刀',90)","剑气发射","伤害动画","初始化色调","坐标复位"], "一之太刀男" => ["敌前进","武器举刀","自己和目标以外转换","20","特技发动动画","特写放大","se('67喊',100)","30","残像ON","武器强中斩","se('拔刀',100)","anime(133,false)", "摇晃大","5","伤害动画","60","特写复位","初始化色调","残像OFF","坐标复位"], "鸟王剑女" => ["前进一步","武器举刀4","自己和目标以外转换2","特技发动动画","se('女s04',100)","30","武器上斩2b","se('63出刀',90)","剑气发射","伤害动画","初始化色调","坐标复位"], "一之太刀女" => ["敌前进","武器举刀","自己和目标以外转换","20","特技发动动画","特写放大","se('女a09',100)","30","残像ON","武器强中斩","se('拔刀',100)","anime(133,false)", "摇晃大","5","伤害动画","60","特写复位","初始化色调","残像OFF","坐标复位"], "霞男" => ["30","前进一步","武器中斩s","特技发动动画","se('男b06',100)","30","se('63出刀',90)","武器中斩","3","目标动画武器","anime(132,false)","武器向上举刀","30","坐标复位"], "霞女" => ["30","前进一步","武器中斩s","特技发动动画","se('女a09',100)","30","se('63出刀',90)","武器中斩","3","目标动画武器","anime(132,false)","武器向上举刀","30","坐标复位"], "乾龙破" => ["残像2","se('63出刀',100)","敌冲刺","武器上斩","特技发动动画","8","se('女v07',100)","140","20","摇晃中","伤害动画","anime(161,false)","30","初始化色调","30"], "强力射击" => ["前进一步","se('上膛1',90)","弓射击2","武器举火枪","30","se('上膛2',120)","20","se('上膛2',120)","40","se('上膛2',150)","60","Bow3","挨打向后仰","anime(150,false)","10","目标动画","60","坐标复位"], "炸膛" => ["前进一步","se('上膛1',90)","弓射击2","武器举火枪","30","se('上膛2',120)","20","se('上膛2',120)","20","se('上膛1',50)","10","Bow2","目标动画","挨打向后仰大","80","坐标复位"], "急所击" => ["前进一步","特技发动动画","se('男e01',100)","30","se('上膛1',90)","弓射击2","10","Bow2","摇晃小","anime(86,false)","5","伤害动画","30","坐标复位"], "三段射击" => ["前进一步","特技发动动画","se('男e02',90)","60","se('上膛1',90)","火枪","摇晃小","火枪","摇晃小","火枪","摇晃小","30","坐标复位"], "狙击" => ["残像ON","20","前进一步","待机固定","20","se('上膛1',90)","弓射击2","武器举火枪","20","特写放大","自己和目标以外转换","30","se('男v10',90)","60","特技发动动画","20","特写复位","10","Bow2","摇晃中","anime(87,false)", "10","伤害动画","初始化色调","60","待机固定","10","坐标复位"], "铁砲齐射" => ["残像ON","敌冲刺","武器上斩","目标动画武器","10","坐标复位"], "钓瓶击" => ["残像ON","敌冲刺","武器上斩","目标动画武器","10","坐标复位"], "跃空斩" => ["se('男a01',100)","残像ON","左1回旋","后跳斩","目标动画","30","残像OFF","坐标复位"], "影袭" => ["特技发动动画","残像ON","se('wind10',130)","敌后瞬移","反转","5","武器拳击","目标动画","30","反转","坐标复位","残像OFF"], "旋风斩" => ["特技发动动画","残像ON","左1回旋","敌前进","武器上斩","目标动画武器","右1回旋","目标动画武器","目标动画武器","右1回旋", "坐标复位","残像OFF"], "韦驸天术" => ["死亡确认","30","自己和目标以外转换2","特技发动动画","敌冲刺","anime(149,false)","10","目标动画","10","初始化色调","坐标提前复位"], "爆破之术男" => ["特技发动动画","残像ON","敌前进","se('男a01',100)","后空翻","坐标复位","待机固定","伤害动画","8"], "爆破之术女" => ["特技发动动画","残像ON","敌前进","后空翻","坐标复位","待机固定","se('女v12',95)","30","伤害动画","8"], "鬼脚之术男" => ["自己和目标以外转换","30","特技发动动画","待机固定","特写放大","30","se('男b04',100)","50","残像ON","后空翻","右1回旋","跳前一步","伤害动画","特写复位","初始化色调","30"], "鬼脚之术女" => ["自己和目标以外转换","30","特技发动动画","待机固定","特写放大","30","se('女v09',100)","30","残像ON","右1回旋","胜利跳跃","伤害动画","坐标复位","特写复位","初始化色调","30"], "变化男" => ["自己和目标以外转换","30","待机固定","特写放大","30","se('男b04',100)","50","特技发动动画","残像ON","右1回旋","10","右1回旋","5","se('48眩晕',100)","狸猫变身","残像OFF","右1回旋","100","特写复位","60","右1回旋","跳前一步","se('Monster3',130)","70", "目标动画","100","特技发动动画","残像ON","右1回旋","10","右1回旋","5","变身恢复","se('48眩晕',100)","残像OFF","右1回旋","100","初始化色调","坐标复位"], "切腹男" => ["自己和目标以外转换2","60","特写放大","20","se('63出刀',100)","肋差攻击1","摇晃中","anime(145,false)","伤害动画","挨打向后仰","se('男b03',130)","30","坐标向左复位","特写复位","初始化色调","30"], "切腹女" => ["自己和目标以外转换2","60","特写放大","20","se('63出刀',100)","肋差攻击1","摇晃中","anime(145,false)","伤害动画","挨打向后仰","se('女a07',100)","30","坐标向左复位","特写复位","初始化色调","30"], "多发手里剑" => ["30","Bow4","2","Bow4","2","子弹发射4b","后空翻","坐标复位"], "风林火山男" => ["魔法发动","待机固定","自己和目标以外转换","30","特写放大","20","se('男c5',100)","240","anime(121,true)","10","特写复位","10","目标动画","20","初始化色调","60"], "强弓" => ["后退一步","10","弓射击1","武器举火枪","特技发动动画","se('女a09',100)","20","se('Bow1',90)","强弓发射","30","坐标复位"], "穿心箭" => ["自己和目标以外转换","30","残像ON","后空翻","弓射击1","武器举火枪","特写放大","10","se('女s09',100)","80","特技发动动画","20","特写复位","10","se('Bow1',80)","穿心箭发射", "初始化色调","30","待机固定","10","坐标复位"], "剎那五月雨" => ["前进一步","自己和目标以外转换2","30","特技发动动画","弓射击1","Bow1","1","Bow1","1","Bow1","1","Bow1","子弹发射1", "弓射击1","Bow1","1","Bow1","1","Bow1","1","Bow1","子弹发射1","弓射击1","Bow1","1","Bow1","1","Bow1","1","Bow1","子弹发射1", "弓射击1","Bow1","1","Bow1","1","Bow1","1","Bow1","子弹发射1","初始化色调","30","坐标复位"], "魔魂刹" => ["魔法发动2","待机固定","自己和目标以外转换","30","特写放大","20","se('女v07',100)","140","特写复位","20","摇晃中","伤害动画","anime(161,false)","30","初始化色调","30"], "毗沙门天" => ["魔法发动2","待机固定","自己和目标以外转换","30","特写放大","20","se('女v07',100)","140","特写复位","20","摇晃中","伤害动画","anime(161,false)","30","初始化色调","30"], "毗沙门天BOSS" => ["魔法发动2","待机固定","自己和目标以外转换","30","特写放大","20","se('男v09', 60)","160","特写复位","20","摇晃中","伤害动画","anime(161,false)","30","初始化色调","30"], # ――物品系――― "物品使用" => ["30","敌前进","待机固定","目标动画WT","坐标向左复位"], } #============================================================================== # ■ 战斗程序 #------------------------------------------------------------------------------ # 战斗场面的执行时间管理。 # 游戏控制开关·横版专用开关操作。 #============================================================================== BATTLE_PROGRAM = { #-------------------------------------------------------------------------- # ● 开关的控制 开关的时间操作,执行的程序。 #-------------------------------------------------------------------------- # 开关…游戏开关ID,程序的执行提示。横版战斗的专用开关ID。 # 当设置为OFF时,正在运行的程序将被中止 # 横版专用开关在战斗终了时初期化(屏蔽所有OFF)。 # 激活战斗前横版专用开关操作的场合,激活脚本指令: # $sv_camera.switches[1] = true # (1为操作开关的ID、ON = true、OFF = false) # # ON ID…ON游戏开关ID。转化为横版专用开关ID # ID是一次性排列在里面。 # 例…[1,2,-5] 开启1、2号游戏开关和5号横版专用开关 # # OFF ID…OFF游戏开关ID。转化为横版专用开关ID # []不进行操作 # # 时间…执行上述的切换操作的间隔(单位为帧) # 例如100的场合,程序开始100帧后执行开关操作 # [参考值] 30秒…1800 1分…3600 5分…18000 10分…36000 1小时…216000 # # 随机加时…随机增加额外时间。单位为帧 # 例如时间为300,随机加时为300,最终的时间在300~600之间。 #――程序名―― 区别 开关 ON ID OFF ID 时间 随机加时 "堡垒背景" => ["switch", -1, [-2], [], 1200, 0], "海背景" => ["switch", -2, [-3], [], 2400, 0], #-------------------------------------------------------------------------- # ● 播放 SE/BGM/BGS #-------------------------------------------------------------------------- # 开关…游戏开关号要执行提示。横版专用开关。 # # 类别…SE的操作为"se" BGM的操作为"bgm" BGS的操作为"bgs" # # 音调…音调。50~150之间,默认100 # 音量…音量。50~150之间,默认100 # 文件名…播放的文件名。""为BGM、BGS随机播放。 #――程序名―― 区别 开关 类别 音调 音量 文件名 "海浪声" => ["sound", -1, "bgs", 100, 80, "Sea"], #-------------------------------------------------------------------------- # ● 背景的控制 进行图像变更和自动滚动 #-------------------------------------------------------------------------- # 开关…执行对应开关ID的提示 # # No.…操作的背景的ID。1号为地板背景、2号为墙壁背景(远景)。 # # 滚动速度…背景的移动速度。[X轴, Y轴] # 单位每100帧移动的像素点。 # 高速移动情况,1000单位的数值目标。 # # BA反转…背后进攻时背景沿X坐标正向滚动为ture, 否则不反转图像 # # 图像…变更背景图像的场合,输入文件名。""为不变更 # 地板背景参照 Battlebacks1 文件夹、墙壁背景参照 Battlebacks2 文件夹 # 变更的背景设定,变更前的东西继承。 # # 连接图像…背景滚动时,背景变更自然,为了让连接图像文件名 # 滚动中途背景变更被进行了的场合,滚动会结束之后变更进行。 # 性质上,斜滚动对应。 # # 中断……在这个背景显示的时候不同的背景控制插入的场合, # 中断的话 true (连接图像显示中没有的背景滚动只中断) # 不中断 false (另外的背景控制保留,这个背景消失了的时候被变更。) #――程序名―― 区别 开关 No. 滚动速度 BA反转 图像 连接图像 中断 "远景向右移动" => ["scroll", -1, 1, [ 40, 0], true, "", "", true], "海背景3变更" => ["scroll", -2, 1, [ 120, 0], true, "Sea_ex03", "Sea_ex02", true], "海背景4变更" => ["scroll", -3, 1, [ 40, 0], true, "Sea_ex01", "Sea_ex04", true], "宇宙变更1" => ["scroll", -4, 1, [ 0, 0], true, "DarkSpace", "", false], "宇宙变更2" => ["scroll", -4, 2, [ 0, 0], true, "DarkSpace", "", false], #-------------------------------------------------------------------------- # ● 周期图片 周期的图片平铺操作。风和巨大幻方等 #-------------------------------------------------------------------------- # 开关…执行对应开关ID的提示 # No.…操作的图片ID。图块可以被看作图片 # 移动速度…该图片的速度能到每100帧。[X轴, Y轴] 同步与背景滚动0 # 期间…执行这个程序的间隔。单位为帧,0为无时间限制。 # # 透明操作…图片的透明度操作。[开始透明度, 每100帧增加透明度] # 透明度为255时开始透明度恢复,直到它重复。 # Z轴…图片的Z坐标。100以上的窗口前面是被显示。 # 是否摇晃…使用摇晃动作 true # BA反转…背后进攻时图片X坐标移动逆的话真是不反转图像 # 文件名…图片的文件名。参照 Pictures 文件夹 #――程序名―― 区别 开关 No. 移动速度 期间 透明操作 Z轴 是否摇晃 BA反转 文件名 "风" => ["kpic", -1, 0, [ 500, 0], 0, [ 255, 0], 90, false, true, "back_wind"], "魔法阵" => ["kpic", -5, 1, [ 0, 0], 0, [ 255, 0], 90, true, true, "magic_square01"], #-------------------------------------------------------------------------- # ● 周期SE 周期性的效果音喇叭、雷鸣和波涛声等 #-------------------------------------------------------------------------- # 开关…实行游戏开关ID信号。 # 周期…效果音周期敲响(单位为帧)。在这间隔效果音定期性地响。 # 随机幅度…周期额外的附加随机幅度。单位一帧 # # 音调…音调。50~150。默认100 # 音量…音量。50~150。默认100 # 开始运行…程序执行直后上周期不等响的话true # 文件名…播放的文件名。 #――程序名―― 区别 开关 周期 随机幅度 音调 音量 开始运行 文件名 "海鸥声" => ["keep_se", -1, 400, 100, 150, 60, false, "Crow"], "海鸥声2" => ["keep_se", -1, 300, 200, 140, 45, true, "Crow"], #-------------------------------------------------------------------------- # ● 周期摇晃 周期性画面摇晃 #-------------------------------------------------------------------------- # 开关…执行的游戏开关ID。ON 为启动 # 周期…画面的摇动周期。单位为帧 # 随机幅度…周期额外的附加随机幅度。单位为帧 # # 方向…揺晃的方向 [横,纵] 数值越大的摇晃也变得大。 # 速度…揺晃的速度。越小摇晃得越快 # 时间…揺晃的持续时间。摇摆幅度时间一起一点点减弱。 # 开始运行…程序执行直后上周期不等响的话true #――程序名―― 区别 开关 周期 随机幅度 方向 速度 时间 开始运行 "船摇晃" => ["keep_sk", -1, 130, 0, [ 0, 4], 80, 120, true], #-------------------------------------------------------------------------- # ● 周期色调变更 周期性画面的颜色调为变更 #-------------------------------------------------------------------------- # 开关…执行的游戏开关ID。ON 为启动 # 周期…色调变更周期。单位为帧 # 随机幅度…周期额外的附加随机幅度。单位为帧 # # 目标…色调变更の目标 [0=背景] [1=所有敌人] [2=我方团灭] [3=敌方全灭] [4=全屏] # 色调水平…[ R, G, B, 阿尔法(颜色强度), 变更时间, ※恢复] # ※恢复…变更完毕后恢复原来的颜色时间。不恢复的话0さないなら0 # 开始运行…程序运行直后上周期不等颜色的话调变更true #――程序名―― 区别 开关 周期 随机幅度 目标 R, G, B, 阿尔法 时间 恢复 开始运行 "雷光" => ["keep_c", 0, 300, 100, 4, [ 255, 255, 255, 255, 8, 8], true], "紧急状态" => ["keep_c", 0, 150, 0, 4, [ 255, 0, 0, 100, 40, 40], true], } #============================================================================== # ■ 镜头设定 #------------------------------------------------------------------------------ # 动作另外战斗场面的各点的摄影技术进行。 # 动作名相机移动,所以不要改名字 #============================================================================== BATTLE_CAMERA = { #-------------------------------------------------------------------------- # ● 镜头 画面的变焦和滚动进行 #-------------------------------------------------------------------------- # 目标…移动至变焦的目标 [2=所有敌人] [3=我方团灭] [4=敌方全灭] [6=画面] # 调整坐标…镜头坐标的最终地点微调整 [X轴(画面→), Y轴(画面↓)] # 时间…工作上时间镜头 # 变焦…镜头的放大率(%)。默认100 #――动作名称―― 区别 目标 调整坐标 变焦 时间 "回合开始" => ["camera", 6, [ 40, 0], 95, 40], "回合结束" => ["camera", 6, [ 0, 0], 100, 40], "战斗结束时" => ["camera", 6, [ 100, 0], 100, 50], } end |
neverstop 发表于 2016-9-2 12:01 需要我发脚本给你吗??? |
neverstop 发表于 2016-9-2 12:01 这个真没有 不是挡住了 |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-17 00:04
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.