#============================================================================== # ■ VX-RGSS2-16-lst クエストシステム【クエストリスト】 by Claimh #------------------------------------------------------------------------------ # 進行中・クリア済み・失敗したクエストの一覧を表示します。 #------------------------------------------------------------------------------ #【イベントスクリプト操作】 #◆ギルドの呼び出し(マップに戻る) # call_questlist #◆ギルドの呼び出し(メニューに戻る) # $scene = Scene_QuestList.new(index) # index : Menu画面へ戻る位置(0未満ならMapに戻る) #============================================================================== class Scene_QuestList < Scene_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(index=-1) @menu_index = index end #-------------------------------------------------------------------------- # ● 開始処理 #-------------------------------------------------------------------------- def start create_menu_background @type = Window_QuestType.new @type.index = 0 @list = Window_QuestList.new(Quest::QUEST_LIST[@type.index]) @info = Window_QuestInfo.new @list.help_window = @info @type.help_window = @list @rank = Window_QuestRank.new if Quest::SHOW_RANK @type.visible = false if Quest::QUEST_LIST.size <= 1 end #-------------------------------------------------------------------------- # ● 終了処理 #-------------------------------------------------------------------------- def terminate dispose_menu_background @type.dispose @list.dispose @info.dispose @rank.dispose if Quest::SHOW_RANK end #---------------------------------------------------------------------------- # ● フレーム更新 #---------------------------------------------------------------------------- def update if @type.active update_cmd else update_list end end #---------------------------------------------------------------------------- # ● フレーム更新 #---------------------------------------------------------------------------- def update_cmd @type.update if Input.trigger?(Input::B) Sound.play_cursor if @menu_index < 0 $scene = Scene_Map.new else $scene = Scene_Menu.new(@menu_index) end elsif Input.trigger?(Input::C) Sound.play_decision @type.active = false @list.active = true end end #---------------------------------------------------------------------------- # ● フレーム更新 #---------------------------------------------------------------------------- def update_list if Input.repeat?(Input::L) if @info.enable_up? Sound.play_cursor @info.page_up end return elsif Input.repeat?(Input::R) if @info.enable_down? Sound.play_cursor @info.page_down end return end @list.update if Input.trigger?(Input::B) Sound.play_cancel @type.active = true @list.active = false elsif Input.trigger?(Input::LEFT) if @info.enable_left? Sound.play_cursor @info.page_left end elsif Input.trigger?(Input::RIGHT) if @info.enable_right? Sound.play_cursor @info.page_right end end end end class Window_QuestType < Window_Selectable #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 0, 544, WLH+32) self.contents = Bitmap.new(width - 32, height - 32) @commands = Quest.questlist_name @item_max = @column_max = @commands.size refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # ● 項目の描画 #-------------------------------------------------------------------------- def draw_item(index) w = self.width / @column_max x = index % @column_max * w self.contents.draw_text(x, 0, w-32, WLH, @commands[index], 1) end #-------------------------------------------------------------------------- # ● ヘルプテキスト更新 #-------------------------------------------------------------------------- def update_help @help_window.data_refresh(Quest::QUEST_LIST[@index]) @help_window.update_help end end class Window_QuestList < Window_Selectable M_PLAY=0;M_CLR=1;M_FAIL=2;M_REPORT=3;M_SHOP=4;M_NIL=5 #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(type, shop_id=0) size = $scene.is_a?(Scene_Guild) ? Quest::GUILD_LIST.size : Quest::QUEST_LIST.size y = (size > 1) ? (WLH+32) : 0 h = Quest::SHOW_RANK ? (416-(WLH+32)-(WLH+32)-8) : (416-(WLH+32)) h -= WLH if $scene.is_a?(Scene_Guild) h += (WLH+32) if y == 0 super(0, y, 180, h) self.contents = Bitmap.new(width - 32, height - 32) @column_max = 1 $game_system.quest.reset(true) ## IDリストの更新しておく @shop_id = shop_id @commands = [] return if type < 0 data_refresh(type) end #-------------------------------------------------------------------------- # ● 有効Index? #-------------------------------------------------------------------------- def index_active?(i) return false if @commands[i].nil? case @type when M_REPORT; return @commands[i].quest_clear? when M_SHOP; return @commands[i].can_start? end return true end def current_index_active? return index_active?(@index) end #-------------------------------------------------------------------------- # ● アイテム情報 #-------------------------------------------------------------------------- def current_item return @commands[@index] end #-------------------------------------------------------------------------- # ● 無効になっている理由 #-------------------------------------------------------------------------- def cause return "" if @commands[@index].nil? case @type when M_REPORT; return @commands[@index].clear_cause when M_SHOP; return @commands[@index].start_cause end return "" ## 使い方わるい end #-------------------------------------------------------------------------- # ● データリフレッシュ #-------------------------------------------------------------------------- def data_refresh(type, force=false, i=0) return if @type == type and !force @type = type @commands = [] for id in $game_system.quest.ids data = $game_system.quest[id] next unless data.visible case @type when M_PLAY; @commands.push(data) if data.playing when M_CLR; @commands.push(data) if data.clear_finish when M_FAIL; @commands.push(data) if data.fail_finish when M_REPORT;@commands.push(data) if data.guild_report when M_SHOP; @commands.push(data) if data.guild_enable(@shop_id) when M_NIL; break end end @item_max = @commands.size cond = (@type == M_PLAY or @type == M_REPORT) @help_window.reset(cond) unless @help_window.nil? # index位置の保持 i = @item_max - 1 if (@item_max-1) < i i = 0 if i < 0 self.index = i refresh if self.top_row < 0 self.top_row = 0 self.oy = 0 update_cursor end end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents = Bitmap.new(width - 32, row_max > 0 ? (row_max * WLH) : (height - 32)) for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # ● 項目の描画 #-------------------------------------------------------------------------- def draw_item(i) # self.contents.font.color = normal_color self.contents.font.color.alpha = index_active?(i) ? 255 : 128 self.contents.draw_text(4, WLH*i, self.contents.width-8, WLH, Quest.conv_text(@commands[i].name)) end #-------------------------------------------------------------------------- # ● ヘルプテキスト更新 #-------------------------------------------------------------------------- def update_help @help_window.refresh(@commands[@index]) end #-------------------------------------------------------------------------- # ● クエスト開始 #-------------------------------------------------------------------------- def quest_start return if @commands[@index].nil? @commands[@index].quest_start data_refresh(@type, true, @index) end #-------------------------------------------------------------------------- # ● クエストクリア #-------------------------------------------------------------------------- def quest_clear?(i) return false if @commands[i].nil? return true if @commands[i].report? and @commands[i].clear return @commands[i].quest_clear? end def quest_clear return if @commands[@index].nil? @commands[@index].quest_clear #data_refresh(@type, true) end #-------------------------------------------------------------------------- # ● クエスト失敗 #-------------------------------------------------------------------------- def quest_fail?(i) return false if @commands[i].nil? return true if @commands[i].report? and @commands[i].fail return false end def quest_fail return if @commands[@index].nil? @commands[@index].quest_fail #data_refresh(@type, true) end end class Window_QuestInfo < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize size = $scene.is_a?(Scene_Guild) ? Quest::GUILD_LIST.size : Quest::QUEST_LIST.size y = (size > 1) ? (WLH+32) : 0 super(180, y, 364, 416-y) reset refresh(nil) end #-------------------------------------------------------------------------- # ● データ破棄 #-------------------------------------------------------------------------- def reset(view=true) @data = nil @page = 0 @left = 0 @view_cond = view create_bitmap(@data) end #-------------------------------------------------------------------------- # ● ビットマップ生成 #-------------------------------------------------------------------------- def create_bitmap(data) w = width - 32 h = height - 32 if data != @data @left = 0 @page = 0 self.oy = 0 end if !data.nil? and (data.view_res or (data.view_cond and @view_cond) ) w = width else @left = 0 # 左ページのみ self.ox = 0 end if !data.nil? and @left == 0 # 上下ページは左ページのみ # 上下ページ数が変わる h = height if data.page_num > 1 else @page = 0 self.oy = 0 end self.contents = Bitmap.new(w, h) end #-------------------------------------------------------------------------- # ● 左右ページ切り替え有効? #-------------------------------------------------------------------------- def enable_right? return false if @data.nil? return (left_max != (@left+1)) end def enable_left? return @left != 0 end #-------------------------------------------------------------------------- # ● 左右ページ切り替え #-------------------------------------------------------------------------- def page_left self.left = (@left - 1 + left_max) % left_max end def page_right self.left = (@left + 1) % left_max end def left=(i) @left = i case i when 0; self.ox = 0 when 1; self.ox = left_max == 3 ? 16 : 32 when 2; self.ox = 32 end refresh(@data, true) end #-------------------------------------------------------------------------- # ● 左右ページ最大数 #-------------------------------------------------------------------------- def left_max return 1 if @data.nil? or (!@data.view_res and (!@data.view_cond and !@view_cond)) return 3 if @data.view_res and (@data.view_cond and @view_cond) return 2 if @data.view_res or (@data.view_cond and @view_cond) return 1 end #-------------------------------------------------------------------------- # ● 上下ページ切り替え有効? #-------------------------------------------------------------------------- def enable_up? return (!@data.nil? and @left == 0 and @page != 0 and @data.page_num > 0) end def enable_down? return (!@data.nil? and @left == 0 and @page < (@data.page_num-1)) end #-------------------------------------------------------------------------- # ● 上下ページ切り替え #-------------------------------------------------------------------------- def page_up self.page = @page - 1 end def page_down self.page = @page + 1 end def page=(pp) @page = pp case pp when 0; self.oy = 0 when (@data.page_num - 1); self.oy = 32 else; self.oy = 16 end refresh(@data, true) end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh(data=nil, force=false) return if data == @data and !force create_bitmap(data) @data = data return if data.nil? self.contents.font.color = normal_color self.contents.draw_text(self.ox, self.oy, 240, WLH, Quest.conv_text(@data.name)) if Quest::SHOW_RANK and !@data.rank.quest.nil? self.contents.font.color = system_color self.contents.draw_text(self.ox+240, self.oy, 100, WLH, "Rank") self.contents.font.color = Quest::RANK_CLR[@data.rank.quest].dup self.contents.draw_text(self.ox+300, self.oy, 80, WLH, Quest::RANK[@data.rank.quest]) self.contents.font.color = normal_color end case @left when 0; refresh_text when 1 if left_max == 2 @data.view_res ? refresh_result : refresh_cond else ## left_max == 3 refresh_result end when 2; refresh_cond end end #-------------------------------------------------------------------------- # ● リフレッシュ(クエスト内容) #-------------------------------------------------------------------------- def refresh_text y = WLH if @data.client != "" self.contents.font.color = system_color self.contents.draw_text(self.ox+20, self.oy+y, 120, WLH, "依頼主") self.contents.font.color = normal_color self.contents.draw_text(self.ox+120, self.oy+y, 240, WLH, Quest.conv_text(@data.client)) y = WLH * 2 end # ギルドイベントだけここに表示 premium = @data.premium if premium > 0 and @data.enable and @data.view_res self.contents.font.color = system_color self.contents.draw_text(self.ox+20, y, 120, WLH, "報酬金額") xx = 120 + self.contents.text_size(premium.to_s).width + 4 self.contents.draw_text(self.ox+xx, y, 120, WLH, $data_system.terms.gold) self.contents.font.color = normal_color self.contents.draw_text(self.ox+120, y, 120, WLH, premium.to_s) y += WLH end commission = @data.commission if commission > 0 and @data.enable #and @data.view_res self.contents.font.color = system_color self.contents.draw_text(self.ox+20, y, 120, WLH, "手数料") xx = 120 + self.contents.text_size(commission.to_s).width + 4 self.contents.draw_text(self.ox+xx, y, 120, WLH, $data_system.terms.gold) self.contents.font.color = normal_color self.contents.draw_text(self.ox+120, y, 120, WLH, commission.to_s) y += WLH end self.contents.fill_rect(0, self.oy+y+4, self.contents.width, 2, Color.new(255, 255, 255, 128)) y += 10 Quest.draw_quest_text(self.contents, self.ox+4, self.oy+y, 316, WLH, @data.page_text(@page)) if @data.page_num > 1 txt = "( " + (@page+1).to_s + " / " + @data.page_num.to_s + " )" self.contents.draw_text(self.ox+180, self.oy+364-self.y, 160, WLH, txt, 2) end end #-------------------------------------------------------------------------- # ● リフレッシュ(報酬) #-------------------------------------------------------------------------- def refresh_result y = WLH premium = @data.premium if premium > 0 self.contents.font.color = system_color self.contents.draw_text(self.ox+20, y, 120, WLH, "報酬金額") xx = 120 + self.contents.text_size(premium.to_s).width + 4 self.contents.draw_text(self.ox+xx, y, 120, WLH, $data_system.terms.gold) self.contents.font.color = normal_color self.contents.draw_text(self.ox+120, y, 120, WLH, premium.to_s) y += WLH end commission = @data.commission if commission > 0 self.contents.font.color = system_color self.contents.draw_text(self.ox+20, y, 120, WLH, "手数料") xx = 120 + self.contents.text_size(commission.to_s).width + 4 self.contents.draw_text(self.ox+xx, y, 120, WLH, $data_system.terms.gold) self.contents.font.color = normal_color self.contents.draw_text(self.ox+120, y, 120, WLH, commission.to_s) y += WLH end penalty = @data.penalty if penalty > 0 self.contents.font.color = system_color self.contents.draw_text(self.ox+20, y, 120, WLH, "違約金") xx = 120 + self.contents.text_size(penalty.to_s).width + 4 self.contents.draw_text(self.ox+xx, y, 120, WLH, $data_system.terms.gold) self.contents.font.color = normal_color self.contents.draw_text(self.ox+120, y, 120, WLH, penalty.to_s) y += WLH end res_y = y y += WLH for result in @data.result next if result.penalty or !result.view case result.type when Quest::ITEM, Quest::WEAPON, Quest::ARMOR draw_item_name(result.obj, self.ox+30, y) if result.num > 1 x = 30 + 32 + self.contents.text_size(result.obj.name).width + 30 self.contents.draw_text(self.ox+x, y, 40, WLH, "×") self.contents.draw_text(self.ox+x+10, y, 40, WLH, result.num.to_s, 2) end when Quest::SKILL text = "\\s[#{result.id}]習得" self.contents.draw_text(self.ox+30, y, 400, WLH, Quest.conv_text(text)) when Quest::CLASS text = "\\j[#{result.id}]にクラスチェンジ" self.contents.draw_text(self.ox+30, y, 400, WLH, Quest.conv_text(text)) when Quest::LEVEL text = "#{result.num}レベルアップ" self.contents.draw_text(self.ox+30, y, 400, WLH, Quest.conv_text(text)) when Quest::ACTOR text = "#{result.obj.name}加入" self.contents.draw_text(self.ox+30, y, 400, WLH, Quest.conv_text(text)) else; next # 上記以外は表示なし end y += WLH end if (res_y + WLH) < y self.contents.font.color = system_color self.contents.draw_text(self.ox+20, res_y, 120, WLH, "報酬") self.contents.font.color = normal_color end end #-------------------------------------------------------------------------- # ● リフレッシュ(進捗状態) #-------------------------------------------------------------------------- def refresh_cond self.contents.font.color = system_color self.contents.draw_text(self.ox+20, WLH, 120, WLH, "進捗状況") self.contents.font.color = normal_color y = WLH * 2 for i in 0...@data.condition.size case @data.condition[i].type when Quest::ITEM, Quest::WEAPON, Quest::ARMOR draw_item_name(@data.condition[i].obj, self.ox+30, y) draw_condition_num(i, y) when Quest::MONEY txt = "#{@data.condition[i].obj_name}(" + @data.condition[i].num.to_s self.contents.draw_text(self.ox+30, y, 240, WLH, txt) x = 30 + self.contents.text_size(txt).width + 4 self.contents.font.color = system_color self.contents.draw_text(self.ox+x, y, 80, WLH, $data_system.terms.gold) self.contents.font.color = normal_color x += self.contents.text_size($data_system.terms.gold).width + 4 self.contents.draw_text(self.ox+x, y, 40, WLH, ")") draw_condition(i, y) when Quest::SW, Quest::EV, Quest::QUEST_T, Quest::QUEST_F, Quest::CLASS, Quest::SCRIPT self.contents.draw_text(self.ox+30, y, 240, WLH, @data.condition[i].obj_name) draw_condition(i, y) when Quest::VAL self.contents.draw_text(self.ox+30, y, 240, WLH, @data.condition[i].obj_name) draw_condition_num(i, y) when Quest::LEVEL self.contents.draw_text(self.ox+30, y, 240, WLH, @data.condition[i].obj_name) #x = 30 + self.contents.text_size(@data.condition[i].obj.name).width + 4 #draw_actor_level(@data.condition[i].obj, self.ox+x, y) draw_condition_num(i, y) when Quest::ENEMY self.contents.draw_text(self.ox+30, y, 240, WLH, @data.condition[i].obj_name) draw_condition_num(i, y) when Quest::ACTOR draw_actor_name(@data.condition[i].obj, self.ox+30, y) draw_condition(i, y) when Quest::SKILL draw_item_name(@data.condition[i].obj, self.ox+30, y) draw_condition(i, y) else; next # 上記以外は記載しない end # y += WLH end end #-------------------------------------------------------------------------- # ● 進捗状態の表示 #-------------------------------------------------------------------------- def draw_condition_num(i, y) if @data.condition[i].condition_clear?(@data.report) draw_condition_clear(y) else self.contents.font.color = normal_color txt = @data.condition[i].obj_num.to_s + " / " + @data.condition[i].num.to_s self.contents.draw_text(self.ox+240, y, 100, WLH, txt) end end def draw_condition(i, y) if @data.condition[i].condition_clear?(@data.report) draw_condition_clear(y) end end def draw_condition_clear(y) self.contents.font.color = crisis_color self.contents.draw_text(self.ox+240, y, 80, WLH, "OK") self.contents.font.color = normal_color end end class Window_QuestRank < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(gold=false) h = gold ? (Quest::SHOW_RANK ? (WLH*2+32) : (WLH+32)) : (WLH+32) y = 416 - h super(0, y, 180, h) self.contents = Bitmap.new(width - 32, height - 32) @gold = gold refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear y = 0 if Quest::SHOW_RANK self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, WLH, "Quest Rank") self.contents.font.color = Quest::RANK_CLR[$game_party.quest_rank].dup self.contents.draw_text(128, 0, 80, WLH, Quest::RANK[$game_party.quest_rank]) y += WLH end if @gold cx = contents.text_size($data_system.terms.gold).width self.contents.font.color = normal_color self.contents.draw_text(4, y, 140-cx-2, WLH, $game_party.gold.to_s, 2) self.contents.font.color = system_color self.contents.draw_text(144-cx, y, cx, WLH, $data_system.terms.gold, 2) end end end class Window_QuestResult < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(200, 200, 324, WLH*2+32) self.z = 500 self.visible = false end #-------------------------------------------------------------------------- # ● 結果表示 #-------------------------------------------------------------------------- def refresh(data) return if data.nil? self.visible = true self.pause = true item_num = 0 premium = data.premium penalty = data.penalty diff_rank = ($game_party.quest_rank != $game_temp.questresult_old_rank) rank_h = ((Quest::SHOW_RANK and diff_rank) ? WLH : 0) # 解析 if data.clear for result in data.result next if result.penalty or !result.view case result.type when Quest::ITEM, Quest::WEAPON, Quest::ARMOR, Quest::SKILL, Quest::QUEST_T, Quest::QUEST_F, Quest::CLASS, Quest::LEVEL item_num += 1 end end prem_h = (premium > 0 ? WLH : 0) item_h = (item_num > 0 ? (WLH + item_num * WLH) : 0) self.y = 200 - (item_h / 2) self.height = WLH + 32 + rank_h + prem_h + item_h txt = "CLEAR!" else penl_h = (penalty > 0 ? WLH : 0) self.y = 200 self.height = WLH + 32 + rank_h + penl_h txt = "FAIL!" end # Bitmap再生成 self.contents = Bitmap.new(width - 32, height - 32) # クエスト名と結果 self.contents.font.color = normal_color text = Quest.conv_text(data.name) self.contents.draw_text(0, 0, 240, WLH, text) self.contents.font.color = data.clear ? crisis_color : knockout_color self.contents.draw_text(220, 0, 240, WLH, txt) y = WLH # ランク変動 if Quest::SHOW_RANK and diff_rank self.contents.font.color = system_color self.contents.draw_text(20, y, 100, WLH, "Rank") self.contents.font.color = Quest::RANK_CLR[$game_temp.questresult_old_rank].dup rank_txt = Quest::RANK[$game_temp.questresult_old_rank] self.contents.draw_text(80, y, 80, WLH, rank_txt) x = self.contents.text_size(rank_txt).width + 4 self.contents.font.color = normal_color self.contents.draw_text(80+x, y, 80, WLH, "→") x += self.contents.text_size("→").width + 4 self.contents.font.color = Quest::RANK_CLR[$game_party.quest_rank].dup self.contents.draw_text(80+x+4, y, 80, WLH, Quest::RANK[$game_party.quest_rank]) y += WLH end if data.clear # 報酬金 if premium > 0 self.contents.font.color = system_color self.contents.draw_text(20, y, 120, WLH, "報酬金額") xx = 120 + self.contents.text_size(premium.to_s).width + 4 self.contents.draw_text(xx, y, 120, WLH, $data_system.terms.gold) self.contents.font.color = normal_color self.contents.draw_text(120, y, 120, WLH, premium.to_s) y += WLH end # 報酬 if item_num > 0 self.contents.font.color = system_color self.contents.draw_text(20, y, 120, WLH, "報酬") self.contents.font.color = normal_color y += WLH for result in data.result next unless result.view next if result.penalty case result.type when Quest::ITEM, Quest::WEAPON, Quest::ARMOR draw_item_name(result.obj, 30, y) if result.num > 1 x = 30 + 32 + self.contents.text_size(result.obj.name).width + 30 self.contents.draw_text(x, y, 40, WLH, "×") self.contents.draw_text(x+10, y, 40, WLH, result.num.to_s, 2) end when Quest::SKILL text = "\\s[#{result.id}]習得" self.contents.draw_text(30, y, 330, WLH, Quest.conv_text(text)) when Quest::QUEST_T text = "『\\q[#{result.id}]』追加" self.contents.draw_text(30, y, 330, WLH, Quest.conv_text(text)) when Quest::QUEST_F text = "『\\q[#{result.id}]』終了" self.contents.draw_text(30, y, 330, WLH, Quest.conv_text(text)) when Quest::QUEST_S text = "『\\q[#{result.id}]』開始" self.contents.draw_text(30, y, 330, WLH, Quest.conv_text(text)) when Quest::CLASS text = "\\j[#{result.id}]にクラスチェンジ" self.contents.draw_text(30, y, 330, WLH, Quest.conv_text(text)) when Quest::LEVEL text = "#{result.num}レベルアップ" self.contents.draw_text(30, y, 400, WLH, Quest.conv_text(text)) when Quest::ACTOR text = "#{result.obj.name}加入" self.contents.draw_text(self.ox+30, y, 400, WLH, Quest.conv_text(text)) else; next end y += WLH end end else if penalty > 0 self.contents.font.color = system_color self.contents.draw_text(20, y, 120, WLH, "違約金") xx = 120 + self.contents.text_size(penalty.to_s).width + 4 self.contents.draw_text(xx, y, 120, WLH, $data_system.terms.gold) self.contents.font.color = normal_color self.contents.draw_text(120, y, 120, WLH, penalty.to_s) end end end end