#============================================================================== # ■ VX-RGSS2-4 熟練度システム [Ver.1.1.0] by Claimh #============================================================================== module SysUpdate module_function #-------------------------------------------------------------------------- # ● 連続攻撃系スクリプトとの併用化処理 # 【仕様】連続攻撃系が動作中はレベルアップさせない。 # 他の連続攻撃系との併用についてもこのメソッドで吸収させる。 #-------------------------------------------------------------------------- def use_together_other_system(actor) =begin # 機能制限に付き使用不可 # 追尾攻撃 併用時 if defined?(ExtraAttack) return false if $scene.add_atk_exercise end # スキル連撃 併用時 if defined?(ExtraSkill) return false if $scene.skill_chase_exercise end # 一人連携 併用時 if defined?(SkillLink) return false if $scene.skill_linked end =end # 閃きシステム 併用時 if defined?(SysFlash) return false if actor.flash_flg end return true # 有効 end #-------------------------------------------------------------------------- # ● 汎用データ取得 #-------------------------------------------------------------------------- def get_data(data, attr_id, actor_id) return data[0][attr_id] if data[actor_id].nil? or data[actor_id][attr_id].nil? return data[actor_id][attr_id] end #-------------------------------------------------------------------------- # ● 熟練度初期値 #-------------------------------------------------------------------------- def attr_first_lv(attr_id, actor_id) return get_data(INIT_LEVEL, attr_id, actor_id) end #-------------------------------------------------------------------------- # ● 熟練度上限 #-------------------------------------------------------------------------- def attr_limit_lv(attr_id, actor_id) return get_data(LV_LIMIT, attr_id, actor_id) end #-------------------------------------------------------------------------- # ● 熟練度上昇:基本値 #-------------------------------------------------------------------------- def attr_interval(attr_id, actor_id) return get_data(UP_INTERVAL, attr_id, actor_id) end #-------------------------------------------------------------------------- # ● 熟練度上昇:傾き #-------------------------------------------------------------------------- def attr_slope(attr_id, actor_id) return get_data(UP_SLOPE, attr_id, actor_id) end #-------------------------------------------------------------------------- # ● 通常攻撃の威力上昇率 #-------------------------------------------------------------------------- def attr_atk_rate(attr_id, actor_id) return get_data(ATK_RATE, attr_id, actor_id) end #-------------------------------------------------------------------------- # ● スキル攻撃の威力上昇率 #-------------------------------------------------------------------------- def attr_skill_rate(attr_id, actor_id) return get_data(SKILL_RATE, attr_id, actor_id) end #-------------------------------------------------------------------------- # ● スキル攻撃の威力上昇率 #-------------------------------------------------------------------------- def attr_item_rate(attr_id, actor_id) return get_data(ITEM_RATE, attr_id, actor_id) end #-------------------------------------------------------------------------- # ● 属性修正 取得 #-------------------------------------------------------------------------- def attr_guard_rate(attr_id, actor_id) return get_data(GUARD_RATE, attr_id, actor_id) end #-------------------------------------------------------------------------- # ● 熟練度EXPリスト(詳細版)取得 #-------------------------------------------------------------------------- def attr_exp(actor_id, attr_id, lv) return A_EXP[actor_id][attr_id][lv] if !A_EXP[actor_id].nil? and !A_EXP[actor_id][attr_id].nil? and !A_EXP[actor_id][attr_id][lv].nil? return A_EXP[actor_id][0][lv] if !A_EXP[actor_id].nil? and !A_EXP[actor_id][0].nil? and !A_EXP[actor_id][0][lv].nil? return A_EXP[0][attr_id][lv] if !A_EXP[0].nil? and !A_EXP[0][attr_id].nil? and !A_EXP[0][attr_id][lv].nil? return A_EXP[0][0][lv] if !A_EXP[0].nil? and !A_EXP[0][0].nil? and !A_EXP[0][0][lv].nil? return 0 end #-------------------------------------------------------------------------- # ● EXP 計算 #-------------------------------------------------------------------------- def make_attr_list(attr_id, actor_id, lv_limit) # 上昇間隔 up_interval = attr_interval(attr_id, actor_id) # 傾き up_slope = attr_slope(attr_id, actor_id) list = [] list[0] = list[1] = 0 # 熟練度EXPリスト作成 for lv in 2..lv_limit case LEVEL_UP_PATTERN when 0; exp = up_interval * (lv-1) when 1; exp = list[lv-1] + up_slope * (lv-1) + up_interval when 2; exp = list[lv-1] + up_slope * (lv-1) * (lv-1) + up_interval when 3; exp = attr_exp(actor_id, attr_id, lv) end list[lv] = exp.truncate end #p actor_id, attr_id, list return list end #-------------------------------------------------------------------------- # ● 属性情報管理クラス #-------------------------------------------------------------------------- class Attr attr_accessor :id # 属性id attr_accessor :level # 属性レベル def initialize @level = 0 @id = 0 end end #-------------------------------------------------------------------------- # ● 熟練度取得(共通処理) #-------------------------------------------------------------------------- def best_attr(actor, element_set) attr = Attr.new for w_element in element_set next unless ELEMENTS.include?(w_element) # 管理対象外 next if attr.level >= actor.attr[w_element].level # 最大でないので除外 attr.level = actor.attr[w_element].level attr.id = w_element end return attr end #-------------------------------------------------------------------------- # ● 熟練度取得(通常攻撃) #-------------------------------------------------------------------------- def atk_attr(actor) return best_attr(actor, actor.element_set) end #-------------------------------------------------------------------------- # ● 熟練度取得(スキル攻撃) #-------------------------------------------------------------------------- def skill_attr(actor, skill_id) if defined?(SkillUpdate) return best_attr(actor, SkillUpdate.skill_element($data_skills[skill_id], actor.id)) else return best_attr(actor, $data_skills[skill_id].element_set) end end #-------------------------------------------------------------------------- # ● 熟練度取得(アイテム攻撃) #-------------------------------------------------------------------------- def item_attr(actor, item_id) return best_attr(actor, $data_items[item_id].element_set) end #-------------------------------------------------------------------------- # ● 管理下属性の配列抽出 #-------------------------------------------------------------------------- def correct_element(element_set) ret_element = [] for element_id in element_set ret_element.push(element_id) if ELEMENTS.include?(element_id) end return ret_element end #-------------------------------------------------------------------------- # ● 得意/不得意属性 威力計算 #-------------------------------------------------------------------------- def calc_taste(taste, base_rate) case taste when ATTR_NORMAL; return base_rate when ATTR_GOOD; return base_rate + TASTE_RATE when ATTR_BAD; return base_rate - TASTE_RATE else; p "unknown taste:{#taste}" end end #-------------------------------------------------------------------------- # ● 得意/不得意属性 属性修正計算 #-------------------------------------------------------------------------- def calc_guard_taste(taste, base_rate) case taste when ATTR_NORMAL; return base_rate when ATTR_GOOD; return base_rate + TASTE_G_RATE when ATTR_BAD; return base_rate - TASTE_G_RATE else; p "unknown taste:{#taste}" end end #-------------------------------------------------------------------------- # ● 通常攻撃 攻撃力取得 #-------------------------------------------------------------------------- def atk_power(actor, base_atk) attr = atk_attr(actor) # 属性なしならデータベースのものを返す return base_atk if attr.id == 0 # 通常攻撃 攻撃力上昇率 rate = attr_atk_rate(attr.id, actor.id) * (attr.level-1) rate = calc_taste(actor.attr[attr.id].taste, rate) return base_atk + (base_atk * rate / 100).truncate end #-------------------------------------------------------------------------- # ● スキル攻撃力取得 #-------------------------------------------------------------------------- def skill_power(actor, skill, base_atk) # 最優先属性ID取得 attr = skill_attr(actor, skill.id) # 属性なしならデータベースのものを返す return base_atk if attr.id == 0 # スキル攻撃力上昇率 rate = attr_skill_rate(attr.id, actor.id) * (attr.level-1) rate = calc_taste(actor.attr[attr.id].taste, rate) return base_atk + (base_atk * rate / 100).truncate end #-------------------------------------------------------------------------- # ● アイテム攻撃力取得 #-------------------------------------------------------------------------- def item_power(actor, item, base_atk) # 最優先属性ID取得 attr = item_attr(actor, item.id) # 属性なしならデータベースのものを返す return base_atk if attr.id == 0 # アイテム威力上昇率 rate = attr_item_rate(attr.id, actor.id) * (attr.level-1) rate = calc_taste(actor.attr[attr.id].taste, rate) return base_atk + (base_atk * rate / 100).truncate end #-------------------------------------------------------------------------- # ● 属性修正 取得 #-------------------------------------------------------------------------- def attr_guard(actor, attr_id) rate = attr_guard_rate(attr_id, actor.id) * (actor.attr[attr_id].level-1) rate = calc_guard_taste(actor.attr[attr_id].taste, rate) return rate end #-------------------------------------------------------------------------- # ● 属性攻撃使用回数更新 #-------------------------------------------------------------------------- def element_use_count(actor, elements) return unless use_together_other_system(actor) # 併用認知 element_set = correct_element(elements) for attr_id in element_set old_level = actor.attr[attr_id].level actor.attr[attr_id].use_cnt += 1 # 使用回数のカウント if old_level < actor.attr[attr_id].level # レベルアップした場合は記憶 actor.attr_level_up.push(attr_id) end end end #-------------------------------------------------------------------------- # ● 属性攻撃使用回数再更新(後戻し) #-------------------------------------------------------------------------- def element_use_recount(actor, elements) return unless use_together_other_system(actor) # 併用認知 element_set = correct_element(elements) for attr_id in element_set actor.attr[attr_id].use_cnt -= 1 # 使用回数の再カウント end actor.attr_level_up = [] # レベルアップ情報は削除 end end #---------------------------------------------------------------------------- # ■ 熟練度クラス #---------------------------------------------------------------------------- class ActorAttr attr_accessor :use_cnt # 属性使用回数 attr_accessor :level # 属性レベル attr_accessor :lv_limit # 限界レベル attr_accessor :exp_list # 属性EXPリスト attr_accessor :taste # 属性好み #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(attr_id, actor_id) @attr_id = attr_id @actor_id = actor_id @level = SysUpdate.attr_first_lv(attr_id, actor_id) @lv_limit = SysUpdate.attr_limit_lv(attr_id, actor_id) @exp_list = SysUpdate.make_attr_list(attr_id, actor_id, @lv_limit) if !SysUpdate::GOOD_E[actor_id].nil? and SysUpdate::GOOD_E[actor_id].include?(attr_id) @taste = SysUpdate::ATTR_GOOD elsif !SysUpdate::BAD_E[actor_id].nil? and SysUpdate::BAD_E[actor_id].include?(attr_id) @taste = SysUpdate::ATTR_BAD else @taste = SysUpdate::ATTR_NORMAL end reset_use end #-------------------------------------------------------------------------- # ● 使用回数のリセット(現在のLV最小値に変更) #-------------------------------------------------------------------------- def reset_use @use_cnt = @exp_list[@level] end #-------------------------------------------------------------------------- # ● 使用回数設定 #-------------------------------------------------------------------------- def use_cnt=(exp) @use_cnt = [[exp, 9999999].min, 0].max # レベルアップ while levelup? and @exp_list[@level+1] > 0 @level += 1 end # レベルダウン while @use_cnt < @exp_list[@level] @level -= 1 end end #-------------------------------------------------------------------------- # ● レベルセット #-------------------------------------------------------------------------- def level=(new_level) return if new_level > @lv_limit return if new_level < 1 @level = new_level reset_use end #-------------------------------------------------------------------------- # ● レベルアップ判定 #-------------------------------------------------------------------------- def levelup? return false if limit_lv? # 最大レベル到達時は無視 return (@use_cnt >= @exp_list[@level+1]) end #-------------------------------------------------------------------------- # ● リミットレベル判定 #-------------------------------------------------------------------------- def limit_lv? return @level >= @lv_limit end #-------------------------------------------------------------------------- # ● 次のレベルアップ経験値 #-------------------------------------------------------------------------- def next_exp return @exp_list[@level+1] end #-------------------------------------------------------------------------- # ● 次のレベルアップまであといくら? #-------------------------------------------------------------------------- def diff_next_exp return @exp_list[@level+1] - @use_cnt end #-------------------------------------------------------------------------- # ● 得意属性? #-------------------------------------------------------------------------- def is_good_taste? return @taste == SysUpdate::ATTR_GOOD end #-------------------------------------------------------------------------- # ● 不得意属性? #-------------------------------------------------------------------------- def is_bad_taste? return @taste == SysUpdate::ATTR_BAD end end #---------------------------------------------------------------------------- # ■ 熟練度クラス #---------------------------------------------------------------------------- class ActorAttrList #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(actor_id) @actor_id = actor_id @attr = {} end #-------------------------------------------------------------------------- # ● 熟練度情報参照 #-------------------------------------------------------------------------- def [](attr_id) if @attr[attr_id].nil? if SysUpdate::ELEMENTS.include?(attr_id) @attr[attr_id] = ActorAttr.new(attr_id, @actor_id) else p "Game_Actor.attr[] 不正属性ID #{attr_id}" exit end end return @attr[attr_id] end end class Game_Actor attr_accessor :attr # 属性情報 attr_accessor :attr_level_up # レベルアップフラグ #-------------------------------------------------------------------------- # ● セットアップ #-------------------------------------------------------------------------- alias setup_sysupdate setup def setup(actor_id) setup_sysupdate(actor_id) @attr = ActorAttrList.new(actor_id) @attr_level_up = [] end #-------------------------------------------------------------------------- # ● 攻撃力の取得 #-------------------------------------------------------------------------- def atk ret_atk = super # 戦闘中のみ適応 if $scene.is_a?(Scene_Battle) if self.action.attack? # 攻撃 if self.weapon_id != 0 or defined?(Arm_Setting) ret_atk = SysUpdate.atk_power(self, ret_atk) end elsif self.action.skill? # スキル ret_atk = SysUpdate.skill_power(self, self.action.skill, ret_atk) elsif self.action.item? # アイテム ret_atk = SysUpdate.item_power(self, self.action.item, ret_atk) end end return ret_atk end #-------------------------------------------------------------------------- # ● 精神力の取得 #-------------------------------------------------------------------------- def spi ret_spi = super # 戦闘中のみ適応 if $scene.is_a?(Scene_Battle) if self.action.attack? # 攻撃 if self.weapon_id != 0 or defined?(Arm_Setting) ret_spi = SysUpdate.atk_power(self, ret_spi) end elsif self.action.skill? # スキル ret_spi = SysUpdate.skill_power(self, self.action.skill, ret_spi) elsif self.action.item? # アイテム ret_spi = SysUpdate.item_power(self, self.action.item, ret_spi) end end return ret_spi end #-------------------------------------------------------------------------- # ● 属性補正値の取得 # element_id : 属性 ID #-------------------------------------------------------------------------- alias element_rate_sysupdate element_rate def element_rate(element_id) result = element_rate_sysupdate(element_id) # 原型 if SysUpdate::ELEMENTS.include?(element_id) # 熟練度対象の属性だけ result -= SysUpdate.attr_guard(self, element_id) # 熟練度による補正 end result = 0 if result < 0 and SysUpdate::G_NOT_RECOVER.include?(element_id) # 0未満にしない return result end end #============================================================================== # ■ Game_Battler #============================================================================== class Game_Battler #-------------------------------------------------------------------------- # ● 属性の最大修正値の取得 <再定義> # element_set : 属性 # 与えられた属性の中で最も有効な修正値を返す # デフォルト仕様 : 最大値を返す # 改定仕様 : 平均値を返す #-------------------------------------------------------------------------- def elements_max_rate(element_set) return 100 if element_set.empty? # 無属性の場合 elements = element_set.dup # 属性修正に含めない属性を除外 for ex in SysUpdate::EXCLUDE_ELEMENT elements.delete(ex) end # 無属性扱いになる場合、100 を返す return 100 if elements == [] # 属性修正計算 if SysUpdate::ELE_CORRECT_AVRAGE # 属性修正計算の仕様変更 # 与えられた属性の平均を返す # ※メソッド element_rate は、このクラスから継承される Game_Actor # および Game_Enemy クラスで定義される rate = 0 for i in elements rate += self.element_rate(i) end return (rate / elements.size).truncate else # デフォルト # 与えられた属性の中で最も強いものを返す # ※メソッド element_rate は、このクラスから継承される Game_Actor # および Game_Enemy クラスで定義される rate_list = [] for i in element_set rate_list.push(element_rate(i)) end return rate_list.max end end end #============================================================================== # ■ Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ● 戦闘行動の実行 #-------------------------------------------------------------------------- alias execute_action_sys_update execute_action def execute_action if @active_battler.is_a?(Game_Actor) @active_battler.attr_level_up = [] end @attack_miss = [] execute_action_sys_update # 原物 end #-------------------------------------------------------------------------- # ● ミス判定 #-------------------------------------------------------------------------- def element_miss? for miss_flag in @attack_miss return false unless miss_flag # 命中ならOK. end return true end #-------------------------------------------------------------------------- # ● 熟練度上昇を表示する #-------------------------------------------------------------------------- def sys_update_attr_levelup return unless SysUpdate::SHOW_LV_UP return if @active_battler.attr_level_up.empty? for attr in @active_battler.attr_level_up # LVアップSE演奏 if SysUpdate::SHOW_LV_SE != nil Audio.se_play("Audio/SE/" + SysUpdate::SHOW_LV_SE) end # 熟練度上昇メッセージ表示 text = sprintf("%sは%sのレベルが上がった!", @active_battler.name, $data_system.elements[attr]) @message_window.add_instant_text(text) wait(SysUpdate::LV_OPA_SPEED) end @active_battler.attr_level_up = [] end #-------------------------------------------------------------------------- # ● 戦闘行動の実行 : 攻撃 #-------------------------------------------------------------------------- alias execute_action_attack_sysupdate execute_action_attack def execute_action_attack if @active_battler.is_a?(Game_Actor) # 熟練度計算 SysUpdate.element_use_count(@active_battler, @active_battler.element_set) end execute_action_attack_sysupdate # 原型 # 攻撃以外、敵なら無視 return if @active_battler.is_a?(Game_Enemy) # ミスしていたなら回数を戻す SysUpdate.element_use_recount(@active_battler, @active_battler.element_set) if element_miss? sys_update_attr_levelup end #-------------------------------------------------------------------------- # ● 戦闘行動の実行 : スキル #-------------------------------------------------------------------------- alias execute_action_skill_sysupdate execute_action_skill def execute_action_skill if @active_battler.is_a?(Game_Actor) # 熟練度計算 SysUpdate.element_use_count(@active_battler, @active_battler.action.skill.element_set) end execute_action_skill_sysupdate # 原型 # 敵なら無視 return if @active_battler.is_a?(Game_Enemy) # ミスしていたなら回数を戻す SysUpdate.element_use_recount(@active_battler, @skill.element_set) if element_miss? sys_update_attr_levelup end #-------------------------------------------------------------------------- # ● 戦闘行動の実行 : アイテム #-------------------------------------------------------------------------- alias execute_action_item_sysupdate execute_action_item def execute_action_item if @active_battler.is_a?(Game_Actor) and $game_party.item_can_use?(@active_battler.action.item) # 熟練度計算 SysUpdate.element_use_count(@active_battler, @active_battler.action.item.element_set) end execute_action_item_sysupdate # 原型 # 敵なら無視 return if @active_battler.is_a?(Game_Enemy) # ミスしていたなら回数を戻す SysUpdate.element_use_recount(@active_battler, @active_battler.action.item.element_set) if element_miss? sys_update_attr_levelup end #-------------------------------------------------------------------------- # ● ダメージの表示 # target : 対象者 # obj : スキルまたはアイテム #-------------------------------------------------------------------------- alias display_damage_sysupdate display_damage def display_damage(target, obj = nil) if target.missed @attack_miss.push(true)# ミスしたことを覚える else @attack_miss.push(false)# ミスしなかったことを覚える end display_damage_sysupdate(target, obj) end end #============================================================================== # ■ Game_Interpreter [イベントスクリプト操作] #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ● 熟練度設定(レベルセット) # actor_id : アクターID # attr_id : 属性ID # level : 設定レベル #-------------------------------------------------------------------------- def set_element_level(actor_id, attr_id, level) $game_actors[actor_id].attr[attr_id].level = level end #-------------------------------------------------------------------------- # ● 熟練度設定(レベルアップ) # actor_id : アクターID # element : 属性ID #-------------------------------------------------------------------------- def element_level_up(actor_id, attr_id) $game_actors[actor_id].attr[attr_id].level += 1 end #-------------------------------------------------------------------------- # ● 熟練度設定(レベルダウン) # actor_id : アクターID # attr_id : 属性ID #-------------------------------------------------------------------------- def element_level_down(actor_id, attr_id) $game_actors[actor_id].attr[attr_id].level -= 1 end #-------------------------------------------------------------------------- # ● 熟練度設定(熟練度上限操作) # actor_id : アクターID # attr_id : 属性ID # limit : 熟練度上限値 #-------------------------------------------------------------------------- def set_element_limit(actor_id, attr_id, limit) actor = $game_actors[actor_id] actor.attr[attr_id].lv_limit = limit if actor.attr[attr_id].level > limit set_element_level(actor_id, attr_id, limit) end end #-------------------------------------------------------------------------- # ● 得意属性/不得意属性の操作 # actor_id :アクターID # attr_id :属性ID # cnt_cmd :操作コマンド # 0:得意属性/不得意属性から解除 # 1:得意属性に設定 # 2:不得意属性に設定 #-------------------------------------------------------------------------- def control_attr(actor_id, attr_id, cnt_cmd) $game_actors[actor_id].attr[attr_id].taste = cnt_cmd end end #============================================================================== # ■ Window_Base #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # ● レベル限界色の指定(数値を変えると色が変わります) #-------------------------------------------------------------------------- def limit_lv_color return Color.new(255, 255, 64, 255) end #-------------------------------------------------------------------------- # ● レベルの描画 # actor : アクター # attr_id : レベルを表示させる属性 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_actor_attr_level(actor, attr_id, x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, WLH, "Lv") self.contents.font.color = actor.attr[attr_id].limit_lv? ? limit_lv_color : normal_color self.contents.draw_text(x + 32, y, 24, WLH, actor.attr[attr_id].level.to_s, 2) self.contents.font.color = normal_color end #-------------------------------------------------------------------------- # ● アイコンの描画 # attr_id : アイコンを表示する属性 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_attr_icon(attr_id, x, y) bitmap = Cache.system(SysUpdate::ELE_ICON[attr_id][0]) px = SysUpdate::ELE_ICON[attr_id][1] * 24 py = SysUpdate::ELE_ICON[attr_id][2] * 24 src_rect = Rect.new(px, py, 24, 24) self.contents.blt(x, y, bitmap, src_rect) end #-------------------------------------------------------------------------- # ● アイコン(+)の描画 # attr_id : アイコンを表示する属性 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_attr_icon_p(attr_id, x, y) draw_attr_icon(attr_id, x, y) self.contents.draw_text(x+12, y-6, 24, 24, "+") end #-------------------------------------------------------------------------- # ● アイコン(-)の描画 # attr_id : アイコンを表示する属性 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_attr_icon_m(attr_id, x, y) draw_attr_icon(attr_id, x, y) self.contents.draw_text(x+12, y-6, 24, 24, "-") end #-------------------------------------------------------------------------- # ● アイコン(+/-自動付与式)の描画 # actor : アクター # attr_id : アイコンを表示する属性 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_attr_icon_pm(actor, attr_id, x, y) case actor.attr[attr_id].taste when SysUpdate::ATTR_NORMAL; draw_attr_icon(attr_id, x, y) when SysUpdate::ATTR_GOOD; draw_attr_icon_p(attr_id, x, y) when SysUpdate::ATTR_BAD; draw_attr_icon_m(attr_id, x, y) end end #-------------------------------------------------------------------------- # ● アイコン + Lvの描画 # actor : アクター # attr_id : アイコンを表示する属性 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_attr_icon_lv(actor, attr_id, x, y) draw_attr_icon_pm(actor, attr_id, x, y) draw_actor_attr_level(actor, attr_id, x+28, y) end #-------------------------------------------------------------------------- # ● 熟練度Nextの表示(使用回数/NEXT) # actor : アクター # attr_id : 表示する属性 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_attr_current_next(actor, attr_id, x, y) next_exp = actor.attr[attr_id].limit_lv? ? "−" : actor.attr[attr_id].next_exp.to_s attr_exp = actor.attr[attr_id].use_cnt.to_s + " / " + next_exp self.contents.draw_text(x, y, 100, WLH, attr_exp) end #-------------------------------------------------------------------------- # ● 熟練度Nextの表示(次のLVまでいくら) # actor : アクター # attr_id : 表示する属性 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_attr_next(actor, attr_id, x, y) next_exp = actor.attr[attr_id].limit_lv? ? "−" : actor.attr[attr_id].diff_next_exp.to_s attr_exp = actor.attr[attr_id].use_cnt.to_s + " / " + next_exp self.contents.draw_text(x, y, 100, WLH, attr_exp) end end