class Game_Action_XAS
attr_accessor :user
attr_accessor :id
attr_accessor :attack_id
attr_accessor :attack_range
attr_accessor :attack_range_type
attr_accessor :hit_events
attr_accessor :now_count
attr_accessor :pre_now_count
attr_accessor :duration
attr_accessor :blow_power
attr_accessor :jump_height
attr_accessor :piercing
attr_accessor :ignore_knockback_invincible
attr_accessor :target_invunerable_duration
attr_accessor :multi_hit
attr_accessor :ally_damage
attr_accessor :all_damage
attr_accessor :sunflag
attr_accessor :self_motion
attr_accessor :second_animation_id
attr_accessor :third_animation_id
attr_accessor :attack_range_type
attr_accessor :attack_range_plan
attr_accessor :blow_power
attr_accessor :jump_height
attr_accessor :ignore_guard
attr_accessor :user_invincible
attr_accessor :short_range
attr_accessor :first_impact_time
attr_accessor :animation_time
attr_accessor :duration
attr_accessor :item_cost
attr_accessor :hit_shake
attr_accessor :hit_hold_target
attr_accessor :hit_bounce
attr_accessor :sticky
attr_accessor :reflectable
attr_accessor :can_reflect
attr_accessor :attack_id_plan
attr_accessor :hit_action
attr_accessor :fake_id
attr_accessor :impact
#--------------------------------------------------------------------------
# ● initialize
#--------------------------------------------------------------------------
def initialize(user, action_id)
@user = user
@id = action_id
@now_count = 0
@duration = nil
@attack_id = 0
@attack_range = 0
@hit_events = []
@blow_power = 0
@skill = $data_skills[action_id]
@ignore_knockback_invincible = false
@multi_hit = false
@piercing = false
@all_damage = false
@ally_damage = false
@ignore_guard = false
@sunflag = 10
@duration = 10
@self_motion = ""
@attack_range_type = 1
@attack_range_plan = 1
@blow_power = 1
@jump_height = 0
@first_impact_time = 0
@animation_time = []
@target_invunerable_duration = 10
@second_animation_id = 0
@third_animation_id = 0
@user_invincible = false
@short_range = false
@item_cost = 0
@hit_shake = false
@hit_hold_target = false
@hit_bounce = false
@sticky = false
@reflectable = false
@can_reflect = false
@hit_action = 0
@fake_id = false
@impact = true
end
@attack_id_plan = [action_id]
if @skill.note =~ /<Sunflag = (\d+)>/ or /<动作时间 = (\d+)>/
@sunflag = $1.to_i
end
if @skill.note =~ /<Duration = (\d+)>/ or @skill.note =~ /<存在时间 = (\d+)>/
@duration = $1.to_i
end
if @skill.note =~ /<Pose = (\S+)>/ or @skill.note =~ /<行走图 = (\S+)>/
@self_motion = $1.to_s
end
if @skill.note =~ /<Area = (\w+)>/
case $1
when "CROSS"
area = 7
when "WALL"
area = 6
when "FRONTRHOMBUS"
area = 5
when "FRONTSQUARE"
area = 4
when "LINE"
area = 3
when "SQUARE"
area = 2
else
area = 1
end
elsif @skill.note =~ /<区域 = (\w+)>/
case $1
when "十字"
area = 7
when "墙"
area = 6
when "半菱形"
area = 5
when "半矩形"
area = 4
when "直线"
area = 3
when "矩形"
area = 2
else
area = 1
end
@attack_range_type = area
end
if @skill.note =~ /<Range = (\d+)>/ or @skill.note =~ /<范围 = (\d+)>/
@attack_range_plan = [$1.to_i]
end
if @skill.note =~ /<Blow Power = (\d+)>/ or @skill.note =~ /<击退格数 = (\d+)>/
@blow_power = $1.to_i
end
if @skill.note =~ /<Jump = (\d+)>/
@jump_height = $1.to_i
end
if @skill.note =~ /<Impact Time = (\d+)>/ or @skill.note =~ /<影响时间 = (\d+)>/ or @skill.note =~ /<Impact Time = (\d+)>/
@first_impact_time = $1.to_i
end
if @skill.note =~ /<Animation Time = (\d+) - (\d+)>/ or @skill.note =~ /<动画时间 = (\d+) - (\d+)>/
@animation_time[0] = $1.to_i
@animation_time[1] = $2.to_i
end
if @skill.note =~ /<Target Invunerable = (\d+)>/ or @skill.note =~ /<伤害间隔 = (\d+)>/
@target_invunerable_duration = $1.to_i
end
if @skill.note =~ /<Tool Hit Ani = (\d+)>/ or @skill.note =~ /<击中动画 = (\d+)>/
@second_animation_id = $1.to_i
end
if @skill.note =~ /<User Hit Ani = (\d+)>/ or @skill.note =~ /<使用动画 = (\d+)>/
@third_animation_id = $1.to_i
end
if @skill.note =~ /<Item Cost = (\d+)>/ or @skill.note =~ /<消耗道具 = (\d+)>/
@item_cost = $1.to_i
end
if @skill.note =~ /<Link Action ID = (\d+)>/ or @skill.note =~ /<连接技能ID = (\d+)>/ or @skill.note =~ /<连接技能 = (\d+)>/
if user.battler != nil
user.battler.x_combo[0] = $1.to_i
user.battler.x_combo[2] = @sunflag + 20
end
else
if user.battler != nil
user.battler.x_combo[0] = 0
user.battler.x_combo[1] = 0
user.battler.x_combo[2] = 0
end
end
if @skill.note =~ /<Hit Action ID = (\d+)>/ or @skill.note =~ /<攻击动作ID = (\d+)>/
@hit_action = $1.to_i
end
if @skill.note =~ /<Ignore Knockback>/ or @skill.note =~ /<忽略击倒>/ or @skill.note =~ /<忽略击破>/
@ignore_knockback_invincible = true
end
if @skill.note =~ /<Multi Hit>/ or @skill.note =~ /<多次连击>/ or @skill.note =~ /<多重连击>/
@multi_hit = true
end
if @skill.note =~ /<Piercing>/ or @skill.note =~ /<贯穿>/
@piercing = true
end
if @skill.note =~ /<All Damage>/ or @skill.note =~ /<全域化>/
@all_damage = true
end
if @skill.note =~ /<Ally Damage>/ or @skill.note =~ /<己方伤害>/
@ally_damage = true
end
if @skill.note =~ /<User Invincible>/ or @skill.note =~ /<使用者无敌>/
@user_invincible = true
end
if @skill.note =~ /<Ignore Guard>/ or @skill.note =~ /<忽略防御>/
@ignore_guard = true
end
if @skill.note =~ /<One Action>/ or @skill.note =~ /<等待结束>/ or @skill.note =~ /<等待完成>/
unless $game_system.tools_on_map.include?(action_id)
$game_system.tools_on_map.push(action_id)
end
end
if @skill.note =~ /<Shake>/ or @skill.note =~ /<震动>/ or @skill.note =~ /<地震>/
@hit_shake = true
end
if @skill.note =~ /<User Range>/ or @skill.note =~ /<使用者属性>/
@short_range = true
end
if @skill.note =~ /<Hit Hold Target>/ or @skill.note =~ /<按键持续>/
@hit_hold_target = true
end
if @skill.note =~ /<Hit Sticky Target>/ or @skill.note =~ /<追踪>/
@sticky = true
end
if @skill.note =~ /<Hit Bounce Direction>/ or @skill.note =~ /<击中转向>/
@hit_bounce = true
end
if @skill.note =~ /<Reflectable>/ or @skill.note =~ /<允许反射>/
@reflectable = true
end
if @skill.note =~ /<Can Reflect>/ or @skill.note =~ /<允许反击>/
@can_reflect = true
end
if @skill.note =~ /<Disable Hit>/ or @skill.note =~ /<不计入连击>/
@impact = false
end
@sunflag = 1 if @sunflag <= 0
end