本帖最后由 alexncf125 于 2020-10-12 11:26 编辑
我用VA默认脚本测试时, 不会p出-1, 会p出武器的特性的"攻击的属性"的IDclass Game_Battler < Game_BattlerBase def make_damage_value(user, item) $元素显示=false $元素ID=0 value = item.damage.eval(user, self, $game_variables) value *= pdr if item.physical?#物理 value *= mdr if item.magical?#法术 value *= rec if item.damage.recover?#吸取 value = apply_critical(value) if @result.critical#暴击 value = apply_variance(value, item.damage.variance)# value = apply_guard(value) #防御 unless [0, 1].include?(item.damage.element_id) $元素显示= true if user.is_a?(Game_Actor) && item.id == user.attack_skill_id begin $元素ID = user.equips[0].features[0].data_id rescue $元素ID = item.damage.element_id end else $元素ID = item.damage.element_id end end p value p $元素ID @result.make_damage(value.to_i, item) end end
class Game_Battler < Game_BattlerBase
def make_damage_value(user, item)
$元素显示=false
$元素ID=0
value = item.damage.eval(user, self, $game_variables)
value *= pdr if item.physical?#物理
value *= mdr if item.magical?#法术
value *= rec if item.damage.recover?#吸取
value = apply_critical(value) if @result.critical#暴击
value = apply_variance(value, item.damage.variance)#
value = apply_guard(value) #防御
unless [0, 1].include?(item.damage.element_id)
$元素显示= true
if user.is_a?(Game_Actor) && item.id == user.attack_skill_id
begin
$元素ID = user.equips[0].features[0].data_id
rescue
$元素ID = item.damage.element_id
end
else
$元素ID = item.damage.element_id
end
end
p value
p $元素ID
@result.make_damage(value.to_i, item)
end
end
|