i need an edit of an old project partner's script. it's a simple absorb skill. what i want it to do is to subtract from the user's hp to add to his sp.
class Game_Temp
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :damage_hook
#---------------------------------------------------------------------------
def initialize
@damage_hook = 0
end
class Game_Battler
#--------------------------------------------------------------------------
# ● スキルの使用可能判定
# skill_id : スキル ID
#--------------------------------------------------------------------------
def skill_effect(user, skill)
if self.damage.is_a?(Numeric)
$game_temp.damage_hook += self.damage
end
return effective
end
#==============================================================================
# ■ Scene_Battle (分割定義 4)
#------------------------------------------------------------------------------
# バトル画面の処理を行うクラスです。
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● メインフェーズ開始
#--------------------------------------------------------------------------
def update_phase4_step1
$game_temp.damage_hook = 0
end
it's a skill with a common event that calls effect:
i need an edit of an old project partner's script. it's a simple absorb skill. what i want it to do is to subtract from the user's hp to add to his sp.
it's a skill with a common event that calls effect:
absorb = $game_temp.damage_hook * -1
$scene.active_battler.damage = absorb
$scene.active_battler.damage_pop = true
$scene.active_battler.sp -= absorb
any ideas?
Share this post
Link to post
Share on other sites