Project1
标题:
跪求关于技能的2个问题!!
[打印本页]
作者:
sq333333
时间:
2011-6-25 21:21
标题:
跪求关于技能的2个问题!!
本帖最后由 sq333333 于 2011-6-26 17:45 编辑
1.怎么给技能 设定 暴击和暴击率 ?
2.我用了KGC的给武器设置 暴击率 和 攻击范围(比如全体攻击的武器) 的脚本。
想知道怎么能让 一些技能(比如连续攻击,麻痹攻击...) 可以继承武器的 暴击率 和 攻击范围 ?
sq333333于2011-6-25 21:22补充以下内容:
谢谢各位大大了!!
dsu_plus_rewardpost_czw
作者:
feizhaodan
时间:
2011-6-28 18:12
第二个不知道,第一个有个脚本:
http://xrxs.at-ninja.jp/Nov4.htm
在这里。
# ▽▽▽ XRXSv4. 特殊効果詰め合わせ ExtraVX - ver.2 ▽▽▽
#
# publish 2007/12/11
# update - 11/ 1/10a
#
#==============================================================================
# --- 総メモ取得機能 --- オブジェクト取得
#==============================================================================
class Game_Battler
def noted_objects
return self.equips.compact + self.states
end
end
class Game_Actor < Game_Battler
def noted_objects
equip_skills = []
for skill in self.skills
equip_skills.push(skill) if skill.note.include?("\\equip")
end
return super + equip_skills
end
end
class Game_Enemy < Game_Battler
def noted_objects
return super + [self.enemy]
end
end
#==============================================================================
# --- 総メモ取得機能 --- メモ取得
#==============================================================================
class Game_Battler
def note_total
text = ""
for obj in self.noted_objects
text += obj.note
end
return text
end
end
#==============================================================================
# バトラー基本設定
#==============================================================================
module XRXSV4_BattlerBasics
def equips
return weapons + armors
end
def weapons
return []
end
def armors
return []
end
def hit
return 0
end
def eva
return 0
end
def cri
return 0
end
def odds
return 0
end
def cst
return 10
end
def auto_battle
return false
end
def super_guard
return false
end
def pharmacology
return false
end
def double_exp_gain
return false
end
def late_attack
return false
end
def slip_guard
return false
end
def eye_guard
return false
end
def wstar
return false
end
end
class Game_Battler
include XRXSV4_BattlerBasics
end
#==============================================================================
# アイテム・スキル・武器・防具・エネミー・ステート の全対応拡張
#==============================================================================
module XRXSV4_VXtentions
def equip_hp
n = 0
self.note.gsub(/\\hp\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def equip_mp
n = 0
self.note.gsub(/\\mp\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def equip_hp_percent
n = 0
self.note.gsub(/\\hppercent\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def equip_mp_percent
n = 0
self.note.gsub(/\\mppercent\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def atk
n = 0
self.note.gsub(/\\atk\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def def
n = 0
self.note.gsub(/\\def\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def spi
n = 0
self.note.gsub(/\\spi\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def agi
n = 0
self.note.gsub(/\\agi\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def mnd
n = 0
self.note.gsub(/\\mnd\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def meva
n = 0
self.note.gsub(/\\meva\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def dex
n = 0
self.note.gsub(/\\dex\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def mpr
n = 0
self.note.gsub(/\\mpr\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def lck
n = 0
self.note.gsub(/\\lck\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def hit
n = 0
self.note.gsub(/\\hit\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def eva
n = 0
self.note.gsub(/\\eva\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def cri
n = 0
self.note.gsub(/\\cri\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def odds
n = 0
self.note.gsub(/\\odds\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def cst
n = 0
self.note.gsub(/\\cst\[([+-]*?[0-9]+?)\]/) do n += $1.to_i end
return n
end
def auto_battle
return self.note.include?("\\auto_battle")
end
def super_guard
return self.note.include?("\\super_guard")
end
def pharmacology
return self.note.include?("\\pharmacology")
end
def fast_attack
return self.note.include?("\\fast_attack")
end
def dual_attack
return self.note.include?("\\dual_attack")
end
def prevent_critical
return self.note.include?("\\prevent_critical")
end
def half_mp_cost
return self.note.include?("\\half_mp_cost")
end
def double_exp_gain
return self.note.include?("\\double_exp_gain")
end
def late_attack
return self.note.include?("\\late_attack")
end
def slip_guard
return self.note.include?("\\slip_guard")
end
def eye_guard
return self.note.include?("\\eye_guard")
end
def wstar
return self.note.include?("\\wstar")
end
end
class RPG::BaseItem
include XRXSV4_VXtentions
end
class RPG::State
include XRXSV4_VXtentions
end
class RPG::Enemy
include XRXSV4_VXtentions
end
#==============================================================================
# アイテム側の全拡張対応 - alias部分
#==============================================================================
class RPG::Weapon
alias xrxsv4_atk atk unless $!
def atk
return (super + xrxsv4_atk)
end
alias xrxsv4_def def unless $!
def def
return (super + xrxsv4_def)
end
alias xrxsv4_spi spi unless $!
def spi
return (super + xrxsv4_spi)
end
alias xrxsv4_agi agi unless $!
def agi
return (super + xrxsv4_agi)
end
alias xrxsv4_hit hit unless $!
def hit
return (super + xrxsv4_hit)
end
alias xrxsv4_fast_attack fast_attack unless $!
def fast_attack
return (super or xrxsv4_fast_attack)
end
alias xrxsv4_dual_attack dual_attack unless $!
def dual_attack
return (super or xrxsv4_dual_attack)
end
end
class RPG::Armor
alias xrxsv4_atk atk unless $!
def atk
return (super + xrxsv4_atk)
end
alias xrxsv4_def def unless $!
def def
return (super + xrxsv4_def)
end
alias xrxsv4_spi spi unless $!
def spi
return (super + xrxsv4_spi)
end
alias xrxsv4_agi agi unless $!
def agi
return (super + xrxsv4_agi)
end
alias xrxsv4_eva eva unless $!
def eva
return (super + xrxsv4_eva)
end
alias xrxsv4_prevent_critical prevent_critical unless $!
def prevent_critical
return (super or xrxsv4_prevent_critical)
end
alias xrxsv4_half_mp_cost half_mp_cost unless $!
def half_mp_cost
return (super or xrxsv4_half_mp_cost)
end
alias xrxsv4_double_exp_gain double_exp_gain unless $!
def double_exp_gain
return (super or xrxsv4_double_exp_gain)
end
end
#==============================================================================
# バトラー側の全拡張対応 - super部分
#==============================================================================
module XRXSV4_BattlerPowers
def equip_hp
n = 0
for item in noted_objects.compact do n += item.equip_hp end
return n
end
def equip_hp_percent
n = 100
for item in noted_objects.compact do n += item.equip_hp_percent end
return n
end
def equip_mp
n = 0
for item in noted_objects.compact do n += item.equip_mp end
return n
end
def equip_mp_percent
n = 100
for item in noted_objects.compact do n += item.equip_mp_percent end
return n
end
def maxhp
return (super + self.equip_hp) * self.equip_hp_percent / 100
end
def maxmp
return (super + self.equip_mp) * self.equip_mp_percent / 100
end
def mnd
n = super
for item in noted_objects.compact do n += item.mnd end
return n
end
def meva
n = super
for item in noted_objects.compact do n += item.meva end
return n
end
def dex
n = super
for item in noted_objects.compact do n += item.dex end
return n
end
def mpr
n = super
for item in noted_objects.compact do n += item.mpr end
return n
end
def lck
n = super
for item in noted_objects.compact do n += item.lck end
return n
end
def hit
n = super
for item in noted_objects.compact
n += item.hit if not (item.is_a?(RPG::Weapon) or item.is_a?(RPG::Enemy))
end
return n
end
def eva
n = super
for item in noted_objects.compact
n += item.eva if not ((self.is_a?(Game_Actor) and item.is_a?(RPG::Armor)) or item.is_a?(RPG::Enemy))
end
return n
end
def cri
n = super
for item in noted_objects.compact do n += item.cri end
return n
end
def odds
n = super
for item in noted_objects.compact do n += item.odds end
return n
end
def cst
n = super
for item in noted_objects.compact do n += item.cst end
return n
end
def auto_battle
for item in self.noted_objects.compact
return true if item.auto_battle
end
return super
end
def super_guard
for item in self.noted_objects.compact
return true if item.super_guard
end
return super
end
def pharmacology
for item in self.noted_objects.compact
return true if item.pharmacology
end
return super
end
def fast_attack
for item in self.noted_objects.compact
return true if item.fast_attack
end
return super
end
def dual_attack
for item in self.noted_objects.compact
return true if item.dual_attack
end
return super
end
def prevent_critical
for item in self.noted_objects.compact
return true if item.prevent_critical
end
return super
end
def half_mp_cost
for item in self.noted_objects.compact
return true if item.half_mp_cost
end
return super
end
def double_exp_gain
for item in self.noted_objects.compact
return true if item.double_exp_gain
end
return super
end
def late_attack
for item in self.noted_objects.compact
return true if item.late_attack
end
return super
end
def slip_guard
for item in self.noted_objects.compact
return true if item.slip_guard
end
return super
end
def eye_guard
for item in self.noted_objects.compact
return true if item.eye_guard
end
return super
end
def wstar
for item in self.noted_objects.compact
return true if item.wstar
end
return super
end
end
class Game_Actor < Game_Battler
include XRXSV4_BattlerPowers
end
class Game_Enemy < Game_Battler
include XRXSV4_BattlerPowers
end
#==============================================================================
# バトラー側の全拡張対応 - alias部分
#==============================================================================
class Game_Actor < Game_Battler
alias xrxsv4_hit hit
def hit
return (xrxsv4_hit + super)
end
alias xrxsv4_eva eva
def eva
return (xrxsv4_eva + super)
end
alias xrxsv4_cri cri
def cri
return (xrxsv4_cri + super)
end
alias xrxsv4_odds odds
def odds
return (xrxsv4_odds + super)
end
alias xrxsv4_auto_battle auto_battle
def auto_battle
return (xrxsv4_auto_battle or super)
end
alias xrxsv4_super_guard super_guard
def super_guard
return (xrxsv4_super_guard or super)
end
alias xrxsv4_fast_attack fast_attack
def fast_attack
return (xrxsv4_fast_attack or super)
end
alias xrxsv4_dual_attack dual_attack
def dual_attack
return (xrxsv4_dual_attack or super)
end
alias xrxsv4_prevent_critical prevent_critical
def prevent_critical
return (xrxsv4_prevent_critical or super)
end
alias xrxsv4_half_mp_cost half_mp_cost
def half_mp_cost
return (xrxsv4_half_mp_cost or super)
end
alias xrxsv4_double_exp_gain double_exp_gain
def double_exp_gain
return (xrxsv4_double_exp_gain or super)
end
end
class Game_Enemy < Game_Battler
alias xrxsv4_hit hit
def hit
return (xrxsv4_hit + super)
end
alias xrxsv4_eva eva
def eva
return (xrxsv4_eva + super)
end
alias xrxsv4_cri cri
def cri
return (xrxsv4_cri + super)
end
alias xrxsv4_odds odds
def odds
return (xrxsv4_odds + super)
end
end
#==============================================================================
#
# 追加処理
#
# 瀕死能力アップ \pav \pdf / 常時防御装備 \grd / CPリードオフ \leadoff
# ステートターン倍速 \wstar / スリップガード \slip_guard
# ステート命中ダウン無視 \hitg / MP消費0 \mp0 / 詠唱速度アップ \cst[n]
#==============================================================================
module XRXSV4_BattlerPowers
def slip_damage?
return false if self.slip_guard
return super
end
def reduce_hit_ratio?
return false if self.eye_guard
return super
end
def remove_states_auto
super
super if self.wstar
end
def atk
n = super
if self.note_total.include?("\\pav")
if self.hp < self.max_hp / 2
n = n * 6 / 5
elsif self.hp < self.max_hp / 2
n = n * 3 / 2
end
end
return n
end
def def
n = super
if self.note_total.include?("\\pdf")
if self.hp < self.max_hp / 2
n = n * 6 / 5
elsif self.hp < self.max_hp / 2
n = n * 3 / 2
end
end
return n
end
def guarding?
return (super or self.note_total.include?("\\grd"))
end
def calc_mp_cost(skill)
return (self.note_total.include?("\\mp0") ? 0 : super(skill))
end
def cp_leadoff?
return (self.note_total.include?("\\leadoff") or super)
end
end
#==============================================================================
# 薬「飲み」の知識 \phd
#==============================================================================
class Game_Actor < Game_Battler
def pharmacology_drink_equip?
return self.note_total.include?("\\phd")
end
def calc_hp_recovery(user, item)
result = super(user, item)
result *= 2 if self.pharmacology_drink_equip?
return result
end
end
#==============================================================================
# エネミー通常攻撃の属性/ステート \atklm[n] \atkst[n]
# 武器装備 \weapon[n]
# 防具装備 \armor[n]
#==============================================================================
module XRXSV4_EnemyPowers
def element_set
set = []
self.enemy.note.gsub(/\\atklm\[([0-9]+?)\]/) do
set.push($1.to_i)
end
return super + set
end
def plus_state_set
set = []
self.enemy.note.gsub(/\\atkst\[([0-9]+?)\]/) do
set.push($1.to_i)
end
return super + set
end
def weapons
set = []
self.enemy.note.gsub(/\\weapon\[([0-9]+?)\]/) do
set.push($data_weapons[$1.to_i])
end
return super + set
end
def armors
set = []
self.enemy.note.gsub(/\\armor\[([0-9]+?)\]/) do
set.push($data_armors[$1.to_i])
end
return super + set
end
def atk_animation_id
return weapons[0] == nil ? super : weapons[0].animation_id
end
end
class Game_Enemy < Game_Battler
include XRXSV4_EnemyPowers
end
#==============================================================================
# 後攻攻撃 \late_attack
#==============================================================================
class Game_BattleAction
alias xrxsv1_make_speed make_speed
def make_speed
xrxsv1_make_speed
@speed -= 1000 if attack? and battler.late_attack
end
end
#==============================================================================
# 獲得ゴールドアップ装備 \gold[n]
#==============================================================================
class Game_Party < Game_Unit
def gold_rate
rate = 100
for actor in $game_party.members
actor.note_total.gsub(/\\gold\[([0-9]+?)\]/) do
rate += $1.to_i
end
end
return rate
end
end
class Game_Troop < Game_Unit
alias xrxsv1_gold_total gold_total
def gold_total
return (xrxsv1_gold_total * $game_party.gold_rate / 100)
end
end
#==============================================================================
# 魔法?の判定
#==============================================================================
class Game_BattleAction
def magic_skill?
return (self.skill? ? (self.skill.spi_f >= 1) : false)
end
end
#==============================================================================
# カウンター (BaST連動)
#==============================================================================
class Scene_Battle < Scene_Base
alias xrxsv4_display_hp_damage display_hp_damage
def display_hp_damage(target, obj = nil)
xrxsv4_display_hp_damage(target, obj)
if target.hp_damage >= 1
target.note_total.gsub(/\\counter\[([0-9]+?)(\,([0-9]+?))*?\]/) do
if rand(100) < ($3 ? $3.to_i : 100)
skill_id = $1.to_i
new_action = Game_BattleAction.new(target)
if skill_id == 0
new_action.set_attack
else
new_action.set_skill(skill_id)
end
new_action.target_index = @active_battler.index
new_action.counter = true
begin
action = @active_actions[0]
unless (action and action.counter)
@active_actions.unshift(new_action)
end
rescue
nil
end
end
end
end
end
end
class Game_BattleAction
attr_accessor :counter
end
#==============================================================================
# \ntimes 複数回行動
#==============================================================================
class Scene_Battle < Scene_Base
alias xrxsv4_execute_action execute_action
def execute_action
n = 1
@active_battler.note_total.gsub(/\\([0-9]+?)times_attack/) do
if @active_battler.action.attack? and $1.to_i > n
n = $1.to_i
end
end
@active_battler.note_total.gsub(/\\([0-9]+?)times_spell/) do
if @active_battler.action.magic_skill? and $1.to_i > n
n = $1.to_i
end
end
n.times do xrxsv4_execute_action end
end
end
#==============================================================================
# グラフィック変化装備
#==============================================================================
class Game_Battler
def picture_name
return ""
end
end
module XRXSV_EquipPictureB
def picture_name
str = ""
self.note_total.gsub(/\\pict\[(.+?)\]/) do
str += $1
end
return super + str
end
end
class Game_Actor < Game_Battler
include XRXSV_EquipPictureB
end
#==============================================================================
# 装備可能装備追加効果 \weapon_set[n] \armor_set[n]
#==============================================================================
module XRXSV_EquipSetPlus
def weapon_set_plus
set = []
self.note_total.gsub(/\\weapon_set\[(.+?)\]/) do
for str in $1.split(/,/)
set.push(str.to_i)
end
end
return set
end
def armor_set_plus
set = []
self.note_total.gsub(/\\armor_set\[(.+?)\]/) do
for str in $1.split(/,/)
set.push(str.to_i)
end
end
return set
end
end
class Game_Actor < Game_Battler
include XRXSV_EquipSetPlus
alias xrxsv4_class :class
def class
now_class = xrxsv4_class.dup
now_class.weapon_set = now_class.weapon_set.dup
now_class.armor_set = now_class.armor_set.dup
for id in self.weapon_set_plus
now_class.weapon_set.push(id) unless now_class.weapon_set.include?(id)
end
for id in self.armor_set_plus
now_class.weapon_set.push(id) unless now_class.weapon_set.include?(id)
end
return now_class
end
end
复制代码
之后在 技能的备注栏里写上
\cri [n]
就会把技能暴击率±n
顺便说下,那个页面里的"¥"就是"\"
作者:
sq333333
时间:
2011-6-28 21:21
哈哈 帮了我一个大忙了可
这个脚本好像有很多功能呀
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1