lunariafantasia/Scripts/_.105.rb
2024-01-12 03:12:38 -06:00

151 lines
6.4 KiB
Ruby
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#==============================================================================
# ■ Game_Party
#------------------------------------------------------------------------------
#  パーティを扱うクラスです。所持金やアイテムなどの情報が含まれます。このクラ
# スのインスタンスは $game_party で参照されます。
#==============================================================================
class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# ○ 追加パーティ能力判定
#--------------------------------------------------------------------------
def extra_party_ability(ability_name)
extra_equip_include?(ability_name)
end
#--------------------------------------------------------------------------
# ○ 獲得ベース経験値UP
#--------------------------------------------------------------------------
def exp_uper?
extra_party_ability("<ベース経験値アップ>")
end
#--------------------------------------------------------------------------
# ○ 獲得GOLDハーフUP
#--------------------------------------------------------------------------
def gold_half_double?
extra_party_ability("<ゴールド1.5倍>")
end
#--------------------------------------------------------------------------
# ○ 獲得ベースAPUP
#--------------------------------------------------------------------------
def ap_uper?
extra_party_ability("<ベースAPアップ>")
end
#--------------------------------------------------------------------------
# ○ 特定の装備品やスキルを装備しているか? ※エイリアス
#--------------------------------------------------------------------------
alias ex_pa_extra_equip_include? extra_equip_include?
def extra_equip_include?(str)
if in_battle
ex_pa_extra_equip_include?(str)
else
ex_pa_extra_equip_include?(str) || summon_extra_party_ability(str)
end
end
#--------------------------------------------------------------------------
# ○ 追加パーティ能力判定用召喚ユニット
#--------------------------------------------------------------------------
def summon_extra_party_ability(str)
@summon_members.any? do |actor_id|
$game_actors[actor_id].all_note_check(str) if actor_id
end
end
#--------------------------------------------------------------------------
# ○ 追加パーティ能力判定用召喚ユニットの数
#--------------------------------------------------------------------------
def summon_extra_party_ability_number(str)
@summon_members.inject(0) do |r, actor_id|
r += 1 if actor_id && $game_actors[actor_id].all_note_check(str)
r
end
end
#--------------------------------------------------------------------------
# ○ 床ダメージ無効?
#--------------------------------------------------------------------------
def floor_damage_cancel?
extra_party_ability("<床ダメージ無効>")
end
end
#==============================================================================
# ■ Game_Troop
#------------------------------------------------------------------------------
#  敵グループおよび戦闘に関するデータを扱うクラスです。バトルイベントの処理も
# 行います。このクラスのインスタンスは $game_troop で参照されます。
#==============================================================================
class Game_Troop < Game_Unit
#--------------------------------------------------------------------------
# ● 経験値の合計計算 ※エイリアス
#--------------------------------------------------------------------------
alias exp_rate_total exp_total
def exp_total
(exp_rate_total * exp_rate).to_i
end
#--------------------------------------------------------------------------
# ● お金の合計計算 ※エイリアス
#--------------------------------------------------------------------------
alias half_gold_total gold_total
def gold_total
(half_gold_total).to_i
end
#--------------------------------------------------------------------------
# ● お金の倍率を取得 ※再定義
#--------------------------------------------------------------------------
def gold_rate
return 2 if $game_party.gold_double?
return 1.5 if $game_party.gold_half_double?
return 1
end
#--------------------------------------------------------------------------
# ○ 経験値の獲得率
#--------------------------------------------------------------------------
def exp_rate
$game_party.exp_uper? ? 1.5 : 1
end
#--------------------------------------------------------------------------
# ○ アビリティポイントの合計計算 ※APシステムのエイリアス
#--------------------------------------------------------------------------
alias ap_rate_total ap_total
def ap_total
(ap_rate_total * ap_rate).to_i
end
#--------------------------------------------------------------------------
# ○ APの獲得率
#--------------------------------------------------------------------------
def ap_rate
$game_party.ap_uper? ? 1.5 : 1
end
end
#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
#  アクターを扱うクラスです。このクラスは Game_Actors クラス($game_actors
# の内部で使用され、Game_Party クラス($game_partyからも参照されます。
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● 床ダメージの処理
#--------------------------------------------------------------------------
alias extra_execute_floor_damage execute_floor_damage
def execute_floor_damage
extra_execute_floor_damage unless $game_party.floor_damage_cancel?
end
#--------------------------------------------------------------------------
# ● 最終的な経験獲得率の計算
#--------------------------------------------------------------------------
alias extra_final_exp_rate final_exp_rate
def final_exp_rate
if $game_party.exp_uper?
1.0
else
extra_final_exp_rate
end
end
end