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

41 lines
No EOL
2 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_BattlerBase
#------------------------------------------------------------------------------
#  バトラーを扱う基本のクラスです。主に能力値計算のメソッドを含んでいます。こ
# のクラスは Game_Battler クラスのスーパークラスとして使用されます。
#==============================================================================
class Game_BattlerBase
#--------------------------------------------------------------------------
# ● 定数(特徴)
#--------------------------------------------------------------------------
ORIGINAL_BUFF_RATE = 0.15 # バフのレート デフォは0.25
#--------------------------------------------------------------------------
# ● 通常能力値の強化/弱体による変化率取得 ※再定義
#--------------------------------------------------------------------------
def param_buff_rate(param_id)
@buffs[param_id] * ORIGINAL_BUFF_RATE + 1.0
end
end
#==============================================================================
# ■ Game_Enemy
#------------------------------------------------------------------------------
#  敵キャラを扱うクラスです。このクラスは Game_Troop クラス($game_troop
# 内部で使用されます。
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● 能力弱体が最大の段階か否かを判定 ※オーバーライド
#--------------------------------------------------------------------------
def debuff_max?(param_id)
@buffs[param_id] == debuff_count
end
#--------------------------------------------------------------------------
# ○
#--------------------------------------------------------------------------
def debuff_count
enemy.note =~ /\<デバフ:(\-?\d+)\>/ ? $1.to_i : -2
end
end