class Game_Battler def xiyangyang(yang, allies = false) temp = allies ? friends_unit : opponents_unit case yang.class.to_s when "String" return temp.actions.any? {|action| action.subject != self && action.item.note.include?(yang)} when "RPG::Skill" return temp.actions.any? {|action| action.subject !=self && action.item == yang} end end end class Game_Unit attr_accessor :actions end class Game_Troop alias increase_turn_alibi02122015 increase_turn def increase_turn increase_turn_alibi02122015 self.actions = [] members.each {|battler| self.actions += battler.actions} $game_party.actions = [] $game_party.members.each {|battler| $game_party.actions += battler.actions} end end
class Game_Battler
def xiyangyang(yang, allies = false)
temp = allies ? friends_unit : opponents_unit
case yang.class.to_s
when "String"
return temp.actions.any? {|action| action.subject != self && action.item.note.include?(yang)}
when "RPG::Skill"
return temp.actions.any? {|action| action.subject !=self && action.item == yang}
end
end
end
class Game_Unit
attr_accessor :actions
end
class Game_Troop
alias increase_turn_alibi02122015 increase_turn
def increase_turn
increase_turn_alibi02122015
self.actions = []
members.each {|battler| self.actions += battler.actions}
$game_party.actions = []
$game_party.members.each {|battler| $game_party.actions += battler.actions}
end
end
冰魔法傷害公式
a.xiyangyang($data_skills[高阶火魔法id]) ? 0 : 原傷害公式
a.xiyangyang($data_skills[高阶火魔法id]) ? 0 : 原傷害公式
()裡可以是$data_skills[x]或$data_items[x]或字串,比如,如果是字串的話會檢查該技能備注是否包含該字串
括號裡加上,1的話,則會判斷己方有沒有其他成員使用符合條件的技能 (己方/敵方是相對的,比如敵人使用這技能,己方就是敵隊)
比如這樣
(a.mat * 4 - b.mdf * 2) * (a.xiyangyang($data_skills[2], 1) ? 1.3 : 1)
(a.mat * 4 - b.mdf * 2) * (a.xiyangyang($data_skills[2], 1) ? 1.3 : 1)
傷害為(a.mat * 4 - b.mdf * 2),己方有人使用2號技能的話, 傷害*1.3
|