if not c.turn_ending and not c.turn_valid and not c.enemy_valid and
not c.actor_valid and not c.switch_valid
return false # 未设置条件…不执行
end
if @event_flags
return false # 已执行
end
if c.enemy_valid # 敌方角色
enemy = $game_troop.members[c.enemy_index]
return false if enemy == nil
if c.turn_ending == false #
return false if enemy.hp * 100.0 / enemy.maxhp > c.enemy_hp
elsif c.turn_ending and not c.turn_valid
return false if enemy.Battler_turn != c.enemy_hp or enemy.cp != 100
elsif c.turn_ending and c.turn_valid
a = c.turn_a
b = c.turn_b
if b>0
return false if (a==0 and ( c.enemy_hp < 1 or enemy.Battler_turn < c.enemy_hp or enemy.Battler_turn % b != c.enemy_hp % b or enemy.cp != 100 or enemy.turn_start != 1))
return false if (a==1 and ( c.enemy_hp < 1 or enemy.Battler_turn < c.enemy_hp or enemy.Battler_turn % b != c.enemy_hp % b or enemy.cp != 100 or enemy.turn_start != 0))
else
if a == 0 #回合开始时 等于
return false if ( enemy.Battler_turn != c.enemy_hp or enemy.cp != 100 or enemy.turn_start != 1)
elsif a == 1 # #回合开始时 回合数大于
return false if (enemy.Battler_turn <= c.enemy_hp or enemy.cp != 100 or enemy.turn_start != 1)
elsif a == 2 #回合开始时 回合数小于
return false if (enemy.Battler_turn >= c.enemy_hp or enemy.cp != 100 or enemy.turn_start != 1)
elsif a == 3 #回合结束时 回合数等于
return false if (enemy.Battler_turn != c.enemy_hp or enemy.cp != 100 or enemy.turn_start != 0)
elsif a == 4 #回合结束时 回合数大于
return false if (enemy.Battler_turn <= c.enemy_hp or enemy.cp != 100 or enemy.turn_start != 0)
elsif a == 5 # 回合结束时 回合数小于
return false if (enemy.Battler_turn >= c.enemy_hp or enemy.cp != 100 or enemy.turn_start != 0)
end
end
end
end
if c.actor_valid # 角色
actor = $game_actors[c.actor_id]
return false if actor == nil
if c.turn_ending == false #
return false if actor.hp * 100.0 / actor.maxhp > c.actor_hp
elsif c.turn_ending and not c.turn_valid
return false if actor.Battler_turn != c.actor_hp or actor.cp != 100
elsif c.turn_ending and c.turn_valid
a = c.turn_a
b = c.turn_b
if b > 0
return false if (a== 0 and ( c.actor_hp < 1 or actor.Battler_turn < c.actor_hp or actor.Battler_turn % b != c.actor_hp % b or actor.cp != 100 or actor.turn_start != 1))
return false if (a== 1 and ( c.actor_hp < 1 or actor.Battler_turn < c.actor_hp or actor.Battler_turn % b != c.actor_hp % b or actor.cp != 100 or actor.turn_start != 0))
else
if a == 0 # 等于
return false if (actor.Battler_turn != c.actor_hp or actor.cp != 100 or actor.turn_start != 1)
elsif a == 1 #回合开始时 回合数大于
return false if (actor.Battler_turn <= c.actor_hp or actor.cp != 100 or actor.turn_start != 1)
elsif a == 2 #回合开始时 回合数小于
return false if (actor.Battler_turn >= c.actor_hp or actor.cp != 100 or actor.turn_start != 1)
elsif a == 3 #回合结束时 回合数等于
return false if (actor.Battler_turn != c.actor_hp or actor.cp != 100 or actor.turn_start != 0)
elsif a == 4 #回合结束时 回合数大于
return false if (actor.Battler_turn <= c.actor_hp or actor.cp != 100 or actor.turn_start != 0)
elsif a == 5 #回合结束时 回合数小于
return false if (actor.Battler_turn >= c.actor_hp or actor.cp != 100 or actor.turn_start != 0)
end
end
end
end
if c.switch_valid # 开关
return false if $game_switches[c.switch_id] == false
@battleback = Cache.battleback("#{name}")if FileTest.exist?("Graphics/Battlebacks/#{name}.jpg") or FileTest.exist?("Graphics/Battlebacks/#{name}.jpg") or FileTest.exist?("Graphics/Battlebacks/#{name}.bmp")
break
else
if BATTLE_BACK[name] != nil
@battleback = Cache.battleback("#{BATTLE_BACK[name]}")if FileTest.exist?("Graphics/Battlebacks/#{BATTLE_BACK[name]}.jpg") or FileTest.exist?("Graphics/Battlebacks/#{BATTLE_BACK[name]}.jpg") or FileTest.exist?("Graphics/Battlebacks/#{BATTLE_BACK[name]}.bmp")
end
break
end
end
end
if @battleback == nil
name = $game_map.name
unless B_B_CONFIG
@battleback = Cache.battleback("#{name}")if FileTest.exist?("Graphics/Battlebacks/#{name}.jpg") or FileTest.exist?("Graphics/Battlebacks/#{name}.jpg") or FileTest.exist?("Graphics/Battlebacks/#{name}.bmp")
if FileTest.exist?("Graphics/Battlers/#{b_name}.png") or FileTest.exist?("Graphics/Battlers/#{b_name}.jpg") or FileTest.exist?("Graphics/Battlers/#{b_name}.bmp")
self.bitmap = Cache.battler(b_name,@battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width/2
self.oy = @height
end
elsif Graphics.frame_count%count <= 29
b_name = @battler_name + "待2"
if FileTest.exist?("Graphics/Battlers/#{b_name}.png") or FileTest.exist?("Graphics/Battlers/#{b_name}.jpg") or FileTest.exist?("Graphics/Battlers/#{b_name}.bmp")
self.bitmap = Cache.battler(b_name,@battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width/2
self.oy = @height
end
elsif Graphics.frame_count%count <= 39
b_name = @battler_name + "待3"
if FileTest.exist?("Graphics/Battlers/#{b_name}.png") or FileTest.exist?("Graphics/Battlers/#{b_name}.jpg") or FileTest.exist?("Graphics/Battlers/#{b_name}.bmp")
self.bitmap = Cache.battler(b_name,@battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width/2
self.oy = @height
end
elsif Graphics.frame_count%count <= 49
b_name = @battler_name + "待4"
if FileTest.exist?("Graphics/Battlers/#{b_name}.png") or FileTest.exist?("Graphics/Battlers/#{b_name}.jpg") or FileTest.exist?("Graphics/Battlers/#{b_name}.bmp")
self.bitmap = Cache.battler(b_name,@battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width/2
self.oy = @height
end
elsif Graphics.frame_count%count <= 59
b_name = @battler_name + "待5"
if FileTest.exist?("Graphics/Battlers/#{b_name}.png") or FileTest.exist?("Graphics/Battlers/#{b_name}.jpg") or FileTest.exist?("Graphics/Battlers/#{b_name}.bmp")
self.bitmap = Cache.battler(b_name,@battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width/2
self.oy = @height
end
elsif Graphics.frame_count%count <= 69
b_name = @battler_name + "待6"
if FileTest.exist?("Graphics/Battlers/#{b_name}.png") or FileTest.exist?("Graphics/Battlers/#{b_name}.jpg") or FileTest.exist?("Graphics/Battlers/#{b_name}.bmp")
self.bitmap = Cache.battler(b_name,@battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width/2
self.oy = @height
end
elsif Graphics.frame_count%count <= 79
b_name = @battler_name + "待7"
if FileTest.exist?("Graphics/Battlers/#{b_name}.png") or FileTest.exist?("Graphics/Battlers/#{b_name}.jpg") or FileTest.exist?("Graphics/Battlers/#{b_name}.bmp")
self.bitmap = Cache.battler(b_name,@battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width/2
self.oy = @height
end
end
end
#==================================
#
#==================================
def setup_new_effect
if @battler.white_flash
@effect_type = WHITEN
@effect_duration = 16
@battler.white_flash = false
end
if @battler.blink
@effect_type = BLINK
@effect_duration = 20
@battler.blink = false
end
if not @battler_visible and @battler.exist?
@effect_type = APPEAR
@effect_duration = 16
@battler_visible = true
end
if @battler.damage_pop and not (@battler.collapse or @battler.hidden)