Project1
标题:
RTAB脚本中的“连续伤害”怎么写?
[打印本页]
作者:
blmd85
时间:
2008-3-21 06:22
标题:
RTAB脚本中的“连续伤害”怎么写?
RTAB脚本中的“连续伤害”怎么写? [LINE]1,#dddddd[/LINE]
版务信息:本贴由楼主自主结贴~
作者:
水迭澜
时间:
2008-3-21 06:27
好象是技能名,逗号,连击数(好象……)
例如
十字斩,2
作者:
禾西
时间:
2008-3-21 06:36
水水?「連續」不是「連擊」哦==a
不知道找的是不是這個?
#==============================================================================
# ■ Scene_Battle (分割定义 4)
#------------------------------------------------------------------------------
# 处理战斗画面的类。
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● 行動前效果追加
#--------------------------------------------------------------------------
def pre_effect(battler)
# HP回復小(1/10之恢复)
if battler.state?(26) and battler.hp >0 #-生命恢复
battler.hp_recover_effect( 1/10 )
battler.damage_pop["hp_plus"] = true
end
# SP回復小(1/10之恢复)
if battler.state?(27) and battler.hp >0 #-SP恢復
battler.sp_recover_effect( 1/10 )
battler.damage_pop["sp_plus"] = true
end
# HP傷害小(1/10之伤害)
if battler.state?(28) and battler.hp >0 #-生命傷害
battler.hp_recover_effect( -1/10 )
battler.damage_pop["hp_plus"] = true
end
# SP傷害小(1/10之伤害)
if battler.state?(29) and battler.hp >0 #-SP傷害
battler.sp_recover_effect( -1/10 )
battler.damage_pop["sp_plus"] = true
end
end
end
class Game_Battler
#--------------------------------------------------------------------------
# ● 自動復元方法
#--------------------------------------------------------------------------
# HP =========================================================================
def hp_common
# 分散
if self.damage["hp_plus"].abs > 0
amp = [self.damage["hp_plus"].abs * 15 / 100, 1].max
self.damage["hp_plus"] += rand(amp+1) + rand(amp+1) - amp
end
# HP からダメージを減算
self.hp -= self.damage["hp_plus"]
end
def hp_recover_effect(quantity)
a = quantity
if a > 1 or a < -1
# 定量恢复
# ダメージを設定
self.damage["hp_plus"] = (-a)
else
# 倍率恢复
# ダメージを設定
self.damage["hp_plus"] = self.maxhp * (-a)
end
# 分散 and 減算
hp_common
# メソッド終了
return true
end
# SP =========================================================================
def sp_common
# 分散
if self.damage_sp["sp_plus"].abs > 0
amp = [self.damage_sp["sp_plus"].abs * 15 / 100, 1].max
self.damage_sp["sp_plus"] += rand(amp+1) + rand(amp+1) - amp
end
# HP からダメージを減算
self.sp -= self.damage_sp["sp_plus"]
end
def sp_recover_effect(quantity)
a = quantity
if a > 1 or a < -1
# 定量恢复
# ダメージを設定
self.damage["sp_plus"] = (-a)
else
# 倍率恢复
# ダメージを設定
self.damage["sp_plus"] = self.maxsp * (-a)
end
# 分散 and 減算
sp_common
# メソッド終了
return true
end
end
#----------------------------------------------------------------------------
# ● 召喚原方法
#----------------------------------------------------------------------------
class Scene_Battle
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh_phase(battler)
battler.at -= @max
if battler.movable?
battler.atp = 100 * battler.at / @max
end
spell_reset(battler)
# スリップダメージ
if battler.hp > 0 and battler.slip_damage?
battler.slip_damage_effect
battler.damage_pop["slip"] = true
end
# 行動前效果追加
pre_effect(battler)
# 完了
# ステート自然解除
battler.remove_states_auto
# ステータスウィンドウをリフレッシュ
status_refresh(battler, true)
unless battler.movable?
return
end
# ターン数カウント
@turn_cnt += 1
end
end
复制代码
[LINE]1,#dddddd[/LINE]
版主对此帖的评论:『对……我……又脑残了……』,积分『-0』。这些被扣积分的一半会用于对本帖正确答案的悬赏。
[LINE]1,#dddddd[/LINE]
版主对此帖的评论:『对……我……又脑残了……』,积分『-0』。这些被扣积分的一半会用于对本帖正确答案的悬赏。
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1