Project1
标题:
关于全域化技能的设定
[打印本页]
作者:
黑崎一护
时间:
2011-8-5 08:16
标题:
关于全域化技能的设定
VX如何向XP那样设定全域化技能呢?
例:墨海马使用了喷墨~全体人员(包括敌我)的的命中率都下降了。
是要使用公共事件呢,还是要是用脚本呢? dsu_plus_rewardpost_czw
作者:
月夜神音
时间:
2011-8-5 09:04
效果范围那里有个敌全体~
状态附加的话右边有个状态变化~
命中率下降的话状态页里有个减少命中率~
月夜神音于2011-8-5 09:04补充以下内容:
效果范围那里有个敌全体~
状态附加的话右边有个状态变化~
命中率下降的话状态页里有个减少命中率~
作者:
feizhaodan
时间:
2011-8-5 13:21
放脚本:
# ▽▽▽ XRXSv21. 特殊効果詰め合わせ ScopeVX ▽▽▽
#
# publish 2010/ 3/18
# update - 11/ 1/ 4
#
#==============================================================================
# カスタマイズポイント
#==============================================================================
module XRXSV21
#
# \cover_guard 発動時に表示される文字列
#
CoverGuard_S = "%s 代替 %s 承受攻击"
#
# カバーガードの発動対象とするアイテム・スキルのスコープ(範囲値)
#
CoverGuardScope = [1,3,4,5,6,13]
#
# 自分より低いHPの味方のみをかばう?
#
CoverGuardForWeakened = true
#
# \reflect 発動時に表示される文字列
#
Reflect_S = "%s 把魔法反弹了!"
end
#==============================================================================
# 魔法?の判定
#==============================================================================
class RPG::Skill
def magic_skill?
return (self.spi_f >= 1)
end
end
#==============================================================================
# 装備総メモ の取得
#==============================================================================
class Game_Battler
def equip_notes
text = ""
for equip in self.equips.compact
text += equip.note
end
return text
end
def equips
return []
end
end
#==============================================================================
# 通常攻撃オブジェクト/対応
#==============================================================================
class RPG::Attack < RPG::UsableItem
def initialize
super
@scope = 1
@base_damage = 1
@variance = 20
@atk_f = 100
end
end
#==============================================================================
# 通常攻撃オブジェクトの取得
#==============================================================================
class Game_BattleAction
def attack
obj = RPG::Attack.new
obj.element_set = self.battler.element_set
if battler.confusion?
obj.scope = 12
elsif battler.berserker?
obj.scope = 4
else
self.battler.equip_notes.gsub(/\\scope\[([0-9]+?)\]/) do
obj.scope = $1.to_i if $1.to_i > 0
end
if self.battler.equip_notes.include?("\\all")
obj.scope = 2
end
end
obj.note = self.battler.equip_notes
return obj
end
end
#==============================================================================
# 追加スコープの取得
#==============================================================================
module XRXSV21_ScopeEX
def scope
self.note.gsub(/\\scope\[([0-9]+?)\]/) do
return $1.to_i if $1.to_i > 0
end
return (self.note.include?("\\all") ? 2 :
self.note.include?("\\randf") ? 12 :
self.note.include?("\\rands") ? 13 :
self.note.include?("\\alls") ? 14 : super)
end
end
class RPG::Skill
include XRXSV21_ScopeEX
end
class RPG::Item
include XRXSV21_ScopeEX
end
#==============================================================================
# 通常攻撃・スキル・アイテムのターゲット作成
#==============================================================================
class Game_BattleAction
def make_attack_targets # [再定義]
targets = make_obj_targets(self.attack)
if battler.dual_attack
targets += targets
end
return targets.compact
end
alias xrxsv21_make_obj_targets make_obj_targets
def make_obj_targets(obj)
targets = xrxsv21_make_obj_targets(obj)
case obj.scope
when 12, 13 # 味方・敵味方ランダム
targets = [get_random_target_for_scope(obj.scope)]
when 14 # 敵味方全体
targets = []
targets += opponents_unit.existing_members
targets += friends_unit.existing_members
end
if obj.note.include?("\\myself") # 自分追加
targets.push(self.battler) if not targets.include?(self.battler)
elsif obj.note.include?("\\exself") # 自分以外
targets.delete(self.battler)
end
obj.note.gsub(/\\([0-9]+?)hit/) do
n = $1.to_i
if n >= 2
case obj.scope
when 4,5,6,12,13
(n-1).times do
targets.push(get_random_target_for_scope(obj.scope))
end
else
targets = targets * n
end
end
end
one_target = true
target = targets[0]
for n in targets
one_target &= (n == target)
end
if one_target and target.is_a?(Game_Actor)
for actor in $game_party.members
if XRXSV21::CoverGuardScope.include?(obj.scope) and
actor != target and actor.movable? and
actor.equip_notes[/\\cover_guard/] and
(not XRXSV21::CoverGuardForWeakened or actor.maxhp > target.maxhp) and
(target.battlejjump_at_post? rescue true)
#
text = sprintf(XRXSV21::CoverGuard_S, actor.name, target.name)
$game_temp.xrxsv21_instant_messages.push(text)
targets = [actor] * targets.size
actor.battlejump_infront(target) rescue nil
break
end
end
end
if obj.is_a?(RPG::Skill) and obj.magic_skill?
reflecting_targets = []
for i in 0...targets.size
target = targets[i]
text = target.equip_notes
for state in target.states
text += state.note
end
if text[/\\reflect/]
targets[i] = self.battler
reflecting_targets.push(target)
end
end
for target in reflecting_targets
text = sprintf(XRXSV21::Reflect_S, target.name)
$game_temp.xrxsv21_instant_messages.push(text)
end
end
return targets
end
def get_random_target_for_scope(scope)
case scope
when 4,5,6
return opponents_unit.random_target
when 12
return friends_unit.random_target
when 13
unit = [opponents_unit, friends_unit][rand(2)]
return unit.random_target
end
end
end
#==============================================================================
# ターゲット変化の表示
#==============================================================================
class Game_Temp
def xrxsv21_instant_messages
@xrxsv21_instant_messages = [] unless @xrxsv21_instant_messages
return @xrxsv21_instant_messages
end
end
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● 行動結果の表示
#--------------------------------------------------------------------------
alias xrxsv21_display_action_effects display_action_effects
def display_action_effects(target, obj = nil)
for text in $game_temp.xrxsv21_instant_messages
@message_window.add_instant_text(text)
end
$game_temp.xrxsv21_instant_messages.clear
xrxsv21_display_action_effects(target, obj)
end
end
#==============================================================================
# ターゲット選択を必要としない場合のバトルコマンド対応
#==============================================================================
class Scene_Battle < Scene_Base
alias xrxsv21_start_target_enemy_selection start_target_enemy_selection
def start_target_enemy_selection
if @actor_command_window.index == 0 and not @active_battler.action.attack.need_selection?
return next_actor
end
return xrxsv21_start_target_enemy_selection
end
end
复制代码
之后在武器·防具·敌人·道具·技能的备注栏里写
\alls
就ok
装备角色和敌人的通常攻击、技能目标、道具目标会变成敌我全体。
剩下还有很多效果,自己用Google翻译或者其他的翻译软件看这里:
http://xrxs.at-ninja.jp/Nov21.htm
这个脚本的出处也是这里。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1