แก้ไขครั้งสุดท้ายโดย north1602 เมื่อ 2010-12-29 08:41
แก้ไขครั้งสุดท้ายโดย north1602 เมื่อ 2010-12-29 08:39
][hide]# Energia do Inimigo
# by Tetra-Z
# O script permite que quando o cursor entiver sobre o alvo
# inimigo monstre o HP e SP.
#==============================================================================
# ? Game_Temp
#==============================================================================
class Game_Temp
attr_accessor :action_input_actor
end
#==============================================================================
# ? Window_Help
#==============================================================================
class Window_Help < Window_Base
def see_through_element_all
return 0
end
def see_through_element_self
return 0
end
def enemy_status_searched(enemy)
return true if $data_enemies[enemy.id].element_ranks[see_through_element_self] < 3
return true if $data_enemies[enemy.id].element_ranks[see_through_element_all] < 3
unless (see_through_element_self <= 0 or
$data_enemies[enemy.id].element_ranks[see_through_element_self] > 3)
actor = $game_temp.action_input_actor
if ($data_classes[actor.class_id].element_ranks[see_through_element_self] < 3 or
actor.equip_element_set.include?(see_through_element_self))
return true
end
end
unless (see_through_element_all <= 0 or
$data_enemies[enemy.id].element_ranks[see_through_element_all] > 3)
for actor in $game_party.actors
if (($data_classes[actor.class_id].element_ranks[see_through_element_all] < 3 or
actor.equip_element_set.include?(see_through_element_all)) and
actor.movable?)
return true
end
end
end
return false
end
def draw_actor_name(actor, x, y)
if actor.is_a?(Game_Actor)
return super
end
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 192, 32, actor.name)
end
alias tetraz28_set_enemy set_enemy
def set_enemy(enemy)
if enemy_status_searched(enemy) and !Input.press?(Input::A)
if (enemy != @actor or @enemy.nil? or
[enemy.states, enemy.hp, enemy.maxhp, enemy.sp, enemy.maxsp] != @enemy)
self.contents.clear
draw_actor_name(enemy, 4, 0)
draw_actor_state(enemy, 196, 0)
draw_actor_hp(enemy, 300, 0)
draw_actor_sp(enemy, 460, 0)
@actor = enemy
@enemy = [enemy.states, enemy.hp, enemy.maxhp, enemy.sp, enemy.maxsp]
@text = nil
end
self.visible = true
else
tetraz28_set_enemy(enemy)
end
end
end
#==============================================================================
# ? Scene_Battle
#==============================================================================
class Scene_Battle
alias tetraz28_update_phase3_enemy_select update_phase3_enemy_select
def update_phase3_enemy_select
$game_temp.action_input_actor = @active_battler
tetraz28_update_phase3_enemy_select
end
end
[/hide]
+ ให้หน่อยนะครับ
[สคริป] แสดง เลือด/เวทย์ ศัตรู