赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 1405 |
最后登录 | 2013-5-30 |
在线时间 | 57 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 57 小时
- 注册时间
- 2007-9-4
- 帖子
- 72
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
#--------------------------------------------------------------------------
# ● 通常攻撃の効果適用
# attacker : 攻撃者 (バトラー)
#--------------------------------------------------------------------------
def attack_effect(attacker)
# クリティカルフラグをクリア ![]()
self.critical[attacker] = false #《--显示出错的地方
state_p[attacker] = []
state_m[attacker] = []
# 第一命中判定
hit_result = (rand(100) < attacker.hit)
# 命中の場合
if hit_result == true
#暴击率加成(默认为0)
criticalrate = 0
# 基本ダメージを計算
atk = [attacker.atk - self.pdef / 2, 0].max
self.damage[attacker] = atk * (20 + attacker.str) / 20
#========66原脚本◎改======================
if attacker.is_a?(Game_Actor)and attacker.weapon_id != 0 #当武器含有20号属性的时候,攻击消耗100SP
if $data_weapons[attacker.weapon_id].element_set.include?(20)
self.damage[attacker] *= [100,attacker.sp].min
self.damage[attacker] /= 100
attacker.sp -= [100,attacker.sp].min #如果SP不足100,则按比例减少伤害值
#+暴击(criticalrate = 增加的暴击率)
criticalrate = 100
end
end
#=======================
# 属性修正
self.damage[attacker] *= elements_correct(attacker.element_set)
self.damage[attacker] /= 100
# ダメージの符号が正の場合
if self.damage[attacker] > 0
# クリティカル修正(加成暴击率)
if rand(100) < 4 * attacker.dex / self.agi + criticalrate
self.damage[attacker] *= 2
self.critical[attacker] = true
end
# 防御修正
if self.guarding?
self.damage[attacker] /= 2
end
end
# 分散
if self.damage[attacker].abs > 0
amp = [self.damage[attacker].abs * 15 / 100, 1].max
self.damage[attacker] += rand(amp+1) + rand(amp+1) - amp
end
# 第二命中判定
eva = 8 * self.agi / attacker.dex + self.eva
hit = self.damage[attacker] < 0 ? 100 : 100 - eva
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
end
# 命中の場合
if hit_result == true
# ステート衝撃解除
remove_states_shock
# HP からダメージを減算
# ステート変化
@state_changed = false
states_plus(attacker, attacker.plus_state_set)
states_minus(attacker, attacker.minus_state_set)
# ミスの場合
else
# ダメージに "Miss" を設定
self.damage[attacker] = "Miss"
# クリティカルフラグをクリア
self.critical[attacker] = false
end
# メソッド終了
return true
end
使用脚本进入战斗以后就会出现上图的情况,自己找不到原因,郁闷哦~
请懂脚本的朋友帮忙修改下。 版务信息:本贴由楼主自主结贴~ |
|