def draw_actor_face(actor, x, y, enabled = true)
#重点部分
#上面的优先于下面的条件
if if $vic && actor.hp != 0 #胜利时
draw_face(actor.face_name, actor.face_index+7, x, y, enabled)
elsif $ating && actor.id == $atid #除了正在防御外,行动者的头像更改
draw_face(actor.face_name, actor.face_index+1, x, y, enabled)
elsif $tffing && actor.id == $tffid #如果受到回复,被回复者的头像更改
draw_face(actor.face_name, actor.face_index+4, x, y, enabled)
elsif $hpd && actor.id == $hpdid # 如果受到伤害,受到伤害者头像更变
draw_face(actor.face_name, actor.face_index+5, x, y, enabled)
elsif $ging && actor.id == $gid #正在防御者的头像更改
draw_face(actor.face_name, actor.face_index+6, x, y, enabled)
else
if (actor.hp.to_f/actor.mhp) >= 0.25 #血量比>=0.25
draw_face(actor.face_name, actor.face_index, x, y, enabled)
elsif (actor.hp.to_f/actor.mhp) < 0.25 && actor.hp != 0 #血量比<0.25并且没死
draw_face(actor.face_name, actor.face_index+2, x, y, enabled)
elsif actor.hp == 0#死了
draw_face(actor.face_name, actor.face_index+3, x, y, enabled)
end
end
end
end
def draw_actor_face(actor, x, y, enabled = true)
#重点部分
#上面的优先于下面的条件
if if $vic && actor.hp != 0 #胜利时
draw_face(actor.face_name, actor.face_index+7, x, y, enabled)
elsif $ating && actor.id == $atid #除了正在防御外,行动者的头像更改
draw_face(actor.face_name, actor.face_index+1, x, y, enabled)
elsif $tffing && actor.id == $tffid #如果受到回复,被回复者的头像更改
draw_face(actor.face_name, actor.face_index+4, x, y, enabled)
elsif $hpd && actor.id == $hpdid # 如果受到伤害,受到伤害者头像更变
draw_face(actor.face_name, actor.face_index+5, x, y, enabled)
elsif $ging && actor.id == $gid #正在防御者的头像更改
draw_face(actor.face_name, actor.face_index+6, x, y, enabled)
else
if (actor.hp.to_f/actor.mhp) >= 0.25 #血量比>=0.25
draw_face(actor.face_name, actor.face_index, x, y, enabled)
elsif (actor.hp.to_f/actor.mhp) < 0.25 && actor.hp != 0 #血量比<0.25并且没死
draw_face(actor.face_name, actor.face_index+2, x, y, enabled)
elsif actor.hp == 0#死了
draw_face(actor.face_name, actor.face_index+3, x, y, enabled)
end
end
end
end