ツクール総合 素材リクエストスレ 2 (193レス)
ツクール総合 素材リクエストスレ 2 http://jbbs.shitaraba.net/bbs/read.cgi/game/59291/1441515356/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
10: 名無しさん [sage] class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # ● ダメージの処理 # 呼び出し前に @result.hp_damage @result.mp_damage @result.hp_drain # @result.mp_drain が設定されていること。 #-------------------------------------------------------------------------- def execute_damage(user) on_damage(@result.hp_damage) if @result.hp_damage > 0 if self.hp - @result.hp_damage < 0 && @hp_lock self.hp = 1 @die_flag = true else self.hp -= @result.hp_damage end self.mp -= @result.mp_damage user.hp += @result.hp_drain user.mp += @result.mp_drain end #-------------------------------------------------------------------------- # ● スキル/アイテムの効果適用 #-------------------------------------------------------------------------- alias old_item_apply item_apply def item_apply(user, item, flag = false) @hp_lock = flag old_item_apply(user, item) # 最後避けられても倒す self.hp = 0 if @die_flag && !@hp_lock end end class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● スキル/アイテムの使用 #-------------------------------------------------------------------------- def use_item item = @subject.current_action.item @log_window.display_use_item(@subject, item) @subject.use_item(item) refresh_status targets = @subject.current_action.make_targets.compact show_animation(targets, item.animation_id) targets.each {|target| last = item.repeats - 1 item.repeats.times { |i| invoke_item(target, item, i != last) } } end #-------------------------------------------------------------------------- # ● スキル/アイテムの発動 #-------------------------------------------------------------------------- def invoke_item(target, item, flag) if rand < target.item_cnt(@subject, item) invoke_counter_attack(target, item) elsif rand < target.item_mrf(@subject, item) invoke_magic_reflection(target, item) else apply_item_effects(apply_substitute(target, item), item, flag) end @subject.last_target_index = target.index end #-------------------------------------------------------------------------- # ● スキル/アイテムの効果を適用 #-------------------------------------------------------------------------- def apply_item_effects(target, item, flag) target.item_apply(@subject, item, flag) refresh_status @log_window.display_action_results(target, item) end end http://jbbs.shitaraba.net/bbs/read.cgi/game/59291/1441515356/10
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 183 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.102s*