Project1
标题:
【仿VA任重而道远】XP仿VA技能伤害
[打印本页]
作者:
阿尔西斯的马甲
时间:
2012-1-15 20:58
标题:
【仿VA任重而道远】XP仿VA技能伤害
本帖最后由 阿尔西斯的马甲 于 2012-1-19 20:30 编辑
说明:
首先,这脚本的用法是在技能注释(。。。)中这样写
战士的特殊技。不死系怪物特效。#a.atk
这样就能做到VA伤害公式的效果了。
分散度还是会加的。喵!
命中率还是会加的。喵!
属性还是会加成的。喵!
比如说你的攻击是300,有技能公式是a.atk,不死系特效,那么打幽灵后伤害是600.
不要问我公式怎么写,自己下个VA不就知道了喵?
module RPG
class Skill
def description
return @description.split(/#/)[0]
end
def shgt
[email protected]
(/#/)[1]
a="" if a==nil
return a
end
end
end
class Game_Battler
def skill_effectrtab(user,skill)
self.critical[user] = false
state_p[user] = []
state_m[user] = []
if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0)
return false
end
effective = false
effective |= skill.common_event_id > 0
hit = skill.hit
if skill.atk_f > 0
hit *= user.hit / 100
end
hit_result = (rand(100) < hit)
effective |= hit < 100
if hit_result == true
a=user
b=self
self.damage[user] = eval(skill.shgt)
if self.damage[user]==nil
power = skill.power + user.atk * skill.atk_f / 100
if power > 0
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200
power = [power, 0].max
end
rate = 20
rate += (user.str * skill.str_f / 100)
rate += (user.dex * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.int * skill.int_f / 100)
self.damage[user] = power * rate / 20
end
self.damage[user] *= elements_correct(skill.element_set)
self.damage[user] /= 100
if self.damage[user] > 0
if self.guarding?
self.damage[user] /= 2
end
end
if skill.variance > 0 and self.damage[user].abs > 0
amp = [self.damage[user].abs * skill.variance / 100, 1].max
self.damage[user] += rand(amp+1) + rand(amp+1) - amp
end
eva = 8 * self.agi / user.dex + self.eva
hit = self.damage[user] < 0 ? 100 : 100 - eva * skill.eva_f / 100
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
effective |= hit < 100
end
if hit_result == true
if skill.power != 0 and skill.atk_f > 0
remove_states_shock
effective = true
end
last_hp = [[self.hp - self.damage[user], self.maxhp].min, 0].max
effective |= self.hp != last_hp
@state_changed = false
effective |= states_plus(user, skill.plus_state_set)
effective |= states_minus(user, skill.minus_state_set)
unless $game_temp.in_battle
self.damage_effect(user, 1, skill)
end
if skill.power == 0
self.damage[user] = ""
unless @state_changed
self.damage[user] = "Miss"
end
end
else
self.damage[user] = "Miss"
end
unless $game_temp.in_battle
self.damage[user] = nil
end
return effective
end
def skill_effectnormal(user, skill)
self.critical = false
if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0)
return false
end
effective = false
effective |= skill.common_event_id > 0
hit = skill.hit
if skill.atk_f > 0
hit *= user.hit / 100
end
hit_result = (rand(100) < hit)
effective |= hit < 100
if hit_result == true
a=user
b=self
self.damage=eval(skill.shgt)
if self.damage==nil
power = skill.power + user.atk * skill.atk_f / 100
if power > 0
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200
power = [power, 0].max
end
rate = 20
rate += (user.str * skill.str_f / 100)
rate += (user.dex * skill.dex_f / 100)
rate += (user.agi * skill.agi_f / 100)
rate += (user.int * skill.int_f / 100)
self.damage = power * rate / 20
end
self.damage *= elements_correct(skill.element_set)
self.damage /= 100
if self.damage > 0
if self.guarding?
self.damage /= 2
end
end
if skill.variance > 0 and self.damage.abs > 0
amp = [self.damage.abs * skill.variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
eva = 8 * self.agi / user.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
effective |= hit < 100
end
if hit_result == true
if skill.power != 0 and skill.atk_f > 0
remove_states_shock
effective = true
end
last_hp = self.hp
self.hp -= self.damage
effective |= self.hp != last_hp
@state_changed = false
effective |= states_plus(skill.plus_state_set)
effective |= states_minus(skill.minus_state_set)
if skill.power == 0
self.damage = ""
unless @state_changed
self.damage = "Miss"
end
end
else
self.damage = "Miss"
end
unless $game_temp.in_battle
self.damage = nil
end
return effective
if hit_result == true
if skill.power != 0 and skill.atk_f > 0
remove_states_shock
effective = true
end
last_hp = self.hp
self.hp -= self.damage
effective |= self.hp != last_hp
@state_changed = false
effective |= states_plus(skill.plus_state_set)
effective |= states_minus(skill.minus_state_set)
if skill.power == 0
self.damage = ""
unless @state_changed
self.damage = "Miss"
end
end
else
self.damage = "Miss"
end
unless $game_temp.in_battle
self.damage = nil
end
return effective
end
def skill_effect(user,skill)
if Scene_Battle.method_defined?("synthe?")
skill_effectrtab(user,skill)
else
skill_effectnormal(user,skill)
end
end
end
复制代码
话说我表达能力依旧那么差劲、、、喵!
作者:
越前リョーマ
时间:
2012-1-16 12:24
好东西要回帖表示对LZ的尊重
可惜XP没备注栏写说明里可能会和其他脚本冲突什么的 - -b
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1