點選上方RGSS圖示返回。


 

特殊狀態(反噬)=>如果被回復HP則會受到對等的傷害
EX :
A 受到這個狀態
某B對A此補血 200
A就會受到傷害200
然後A的特殊狀態解除
特殊狀態的ID請設為17

請將下列腳本內容貼在Main之前(只針對內建腳本)

class Scene_Battle
#--------------------------------------------------------------------------
# ● 製作特技行動結果
#--------------------------------------------------------------------------
def make_skill_action_result
# 取得特技
@skill = $data_skills[@active_battler.current_action.skill_id]
# 如果不是強制行動
unless @active_battler.current_action.forcing
# 因為SP耗盡而無法使用的情況下
unless @active_battler.skill_can_use?(@skill.id)
# 清除強制行動目標的戰鬥者
$game_temp.forcing_battler = nil
# 移至步驟1
@phase4_step = 1
return
end
end
# 消耗SP
@active_battler.sp -= @skill.sp_cost
# 更新狀態視窗
@status_window.refresh
# 在提示視窗顯示特技名稱
@help_window.set_text(@skill.name, 1)
# 設定動畫 ID
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# 設定共通事件 ID
@common_event_id = @skill.common_event_id
# 設定目標側戰鬥者
set_target_battlers(@skill.scope)
# 設置新暫存參數
@temp_skill_tagret = {} if @temp_skill_tagret == nil
# 應用特技效果
for target in @target_battlers
# 符合回復反而扣血的條件目標時
if @skill.power < 0 && target.states.include?(17)
@temp_skill_tagret[target] = -@skill.power
# 正常狀況
else
target.skill_effect(@active_battler, @skill)
end
end
end
#--------------------------------------------------------------------------
# ● 製作物品行動結果
#--------------------------------------------------------------------------
def make_item_action_result
# 取得物品
@item = $data_items[@active_battler.current_action.item_id]
# 因為物品耗盡而無法使用的情況下
unless $game_party.item_can_use?(@item.id)
# 移至步驟1
@phase4_step = 1
return
end
# 消耗品的情況下
if @item.consumable
# 使用的物品減1
$game_party.lose_item(@item.id, 1)
end
# 在提示視窗顯示物品名稱
@help_window.set_text(@item.name, 1)
# 設定動畫 ID
@animation1_id = @item.animation1_id
@animation2_id = @item.animation2_id
# 設定共通事件 ID
@common_event_id = @item.common_event_id
# 確定目標
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
# 設定目標側戰鬥者
set_target_battlers(@item.scope)
# 設置新暫存參數
@temp_item_tagret = {} if @temp_item_tagret == nil
# 應用物品效果
for target in @target_battlers
# 符合回復反而扣血的條件目標時
if @item.recover_hp > 0 && target.states.include?(17)
@temp_item_tagret[target] = @item.recover_hp
# 正常狀況
else
target.item_effect(@item)
end
end
end
#--------------------------------------------------------------------------
# ● 更新畫面 (主回合步驟 4 : 對像方動畫)
#--------------------------------------------------------------------------
def update_phase4_step4
# 設置新暫存參數
@temp_skill_tagret = {} if @temp_skill_tagret == nil
@temp_item_tagret = {} if @temp_item_tagret == nil
# 執行技能具回復扣血的目標損傷數值寫入
if @temp_skill_tagret != {}
for i in @temp_skill_tagret.keys
i.hp -= @temp_skill_tagret[i]
i.damage = @temp_skill_tagret[i]
# 移除狀態
i.remove_state(17)
end
@temp_skill_tagret = {}
end
# 執行道具回復扣血的目標損傷數值寫入
if @temp_item_tagret != {}
for i in @temp_item_tagret.keys
i.hp -= @temp_item_tagret[i]
i.damage = @temp_item_tagret[i]
# 移除狀態
i.remove_state(17)
end
@temp_item_tagret = {}
end
# 目標方動畫
for target in @target_battlers
target.animation_id = @animation2_id
target.animation_hit = (target.damage != "Miss")
end
# 限制動畫長度、最低8幅畫面
@wait_count = 8
# 移至步驟5
@phase4_step = 5
end
end

 

   

inserted by FC2 system