Autre information

Nombre de visiteurs

credit immobilier

 


 

 

Aller a la page d'accueil


 

 

 

 

 

 

 

 

Une trentaine de liens sur RPG Makers


 

 

 

 

 

 

 

 

La page des sondages


 

 

 

 

 

 

 

 

Des tutoriaux pour comprendre RPG Makers


 

 

 

 

 

 

 

 

Aller voir 30 scripts RPG Makers XP


 

 

 

 

 

Aller au sommaire des musiques


 

 

 

 

 

 

 

Découvrez tous les jeux créés avec RPG Makers


 

 

 

 

 

 

 

 

Sommaire des ressources RMXP


 

 

 

 

 

 

 

 

Si vous voulez voir certaines de mes poésies


 

 

 

 

 

 

 

 

Si vous aimez les Dolls


 

 

 

 

 

 

 

Si tu a un blog, soit mieux référencé

en cliquand ici !

 


 

Informations sur mon dernier jeu "Arcanes"

 

 

 

 

 

 

 

Présentation

Recommander

Inscrivez vous !!

Scripts RPG Makers XP

Vendredi 1 juillet 2005
Bon alors voila le tuto pour faire des combats en angle [pub]comme dans Mukashibanashi[pub]
Alors :
Tout d'abord allez dans le script "Game_Actor" ligne 570 à 582 et méttez ceci :

Citation:

def screen_x
if self.index != nil
return self.index * 20 + 340
else
return 0
end
end
#--------------------------------------------------------------------------
# ● バトル画面 Y 座標の取得
#--------------------------------------------------------------------------
def screen_y
return self.index * 40 + 300
end

A la place de ce qu'il y a, et voila donc c tréééééés basique ^^'
EDIT : Les explication :

Citation:
def screen_x {Nous allons définir la position X du héros
if self.index != nil
return self.index * 20 + 340 {Nous choisissons la position
else
return 0
end
end
#--------------------------------------------------------------------------
# ● バトル画面 Y 座標の取得
#--------------------------------------------------------------------------
def screen_y {Nous allons définir la position Y du héros
return self.index * 40 + 300 {Nous choisissons la position
end


 

 

Par Cid6
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Vendredi 1 juillet 2005

Remplacer ce qu'il y a à l'intérieur de Scene_Name par ceci, et vous pourrez avoir les accents pendant le nommage de votre perso !

Citation:
class Scene_Name
# -------------------------
def main
@actor = $game_actors[$game_temp.name_actor_id]
@edit_window = Window_NameEdit.new(@actor, $game_temp.name_max_char)
@input_window = Window_NameInput.new
@alert_window = Window_Base.new(188, 208, 264, 64)
@alert_window.contents = Bitmap.new(228, 32)
@alert_window.contents.font.name = $fontface
@alert_window.contents.font.size = 24
@alert_window.contents.draw_text_shadow(0, 0, 228, 32, "Vous devez entrer un nom.")
@alert_window.z = 1001
@alert_window.visible = false
c1 = "Français"
c4 = "Espace"
c5 = "Ret. arrière"
c6 = "Défaut"
c7 = "Terminer"
commands = [c1, c4, c5, c6, c7]
@command_window = Window_NameCommand.new(160, commands)
@input_window.active = false
@input_window.visible = true
@command_window.index = 0
@command_window.visible = true
@command_window.active = true
@command_window.x = 0
@command_window.y = 128
@command_window.z = 1000
@alert_count = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@edit_window.dispose
@input_window.dispose
@command_window.dispose
@alert_window.dispose
end
# -------------------------
def update
@edit_window.update
@input_window.update
@command_window.update
@alert_window.update
if @alert_window.visible == true && @alert_count > 0
@alert_count -= 1
if @alert_count <= 0
@command_window.active = true
@alert_window.visible = false
end
return
end
if @input_window.active == false
@command_window.active = true
end
if @command_window.active == false
@input_window.active = true
end
if Input.repeat?(Input::B) && @input_window.active == true
if @edit_window.index == 0
return
else
$game_system.se_play($data_system.cancel_se)
@edit_window.back
end
end
if Input.repeat?(Input::B) && @command_window.active == true
$game_system.se_play($data_system.buzzer_se)
return
end
if Input.trigger?(Input::C)
if @command_window.active == true
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
@input_window.mode = 1
@input_window.refresh
@command_window.active = false
@input_window.active = true
@input_window.index = 0
return
when 1
if @edit_window.index < $game_temp.name_max_char
$game_system.se_play($data_system.decision_se)
@edit_window.add(" ")
else
$game_system.se_play($data_system.buzzer_se)
end
return
when 2
$game_system.se_play($data_system.decision_se)
@edit_window.back
return
when 3
$game_system.se_play($data_system.decision_se)
@edit_window.restore_default
return
when 4
if @edit_window.name == ""
$game_system.se_play($data_system.buzzer_se)
@alert_window.visible = true
@command_window.active = false
@alert_count = 60
return
end
$game_system.se_play($data_system.decision_se)
@actor.name = @edit_window.name
$game_system.se_play($data_system.decision_se)
$scene = Scene_Map.new
return
end
end
if @edit_window.index == $game_temp.name_max_char &&
@input_window.active == true
$game_system.se_play($data_system.buzzer_se)
return
end
if @input_window.character == "" && @input_window.active == true
$game_system.se_play($data_system.buzzer_se)
return
end
if @input_window.character != nil && @input_window.active == true &&
@edit_window.index <= $game_temp.name_max_char
$game_system.se_play($data_system.decision_se)
if @input_window.mode == 1
@edit_window.char_type[@edit_window.index] = 1
else
@edit_window.char_type[@edit_window.index] = 2
end
@edit_window.add(@input_window.character)
end
return
end
end
end
class Window_NameEdit < Window_Base
# ---------------------------
attr_accessor :char_type
attr_reader :name
attr_reader :index
# ---------------------------
def initialize(actor, max_char)
super(0, 0, 640, 128)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
@name = actor.name
@max_char = max_char
@char_type = []
name_array = @name.split(//)[0...@max_char]
@name = ""
for i in 0...name_array.size
@name += name_array[i]
@char_type[i] = 1
end
@default_name = @name
@index = name_array.size
refresh
update_cursor_rect
end
# ---------------------------
def restore_default
@name = @default_name
for i in
0..@default_name.size
@char_type[i] = 1
end
@index = @name.split(//).size
refresh
update_cursor_rect
end
# ---------------------------
def add(character)
if @index < @max_char and character != ""
@name += character
@index += 1
refresh
update_cursor_rect
end
end
# ---------------------------
def back
if @index > 0
name_array = @name.split(//)
@name = ""
for i in 0...name_array.size-1
@name += name_array[i]
end
@index -= 1
refresh
update_cursor_rect
end
end
# ---------------------------
def refresh
self.contents.clear
name_array = @name.split(//)
for i in 0...@max_char
c = name_array[i]
if c == nil
c = " "
end
x = 320 - @max_char * 14 + i * 28
if @char_type[i] == 1
self.contents.font.name = $fontface
self.contents.font.size = 24
else
self.contents.font.name = $fontface
self.contents.font.size = 22
end
self.contents.draw_text_shadow(x, 32, 28, 32, c, 1)
end
draw_actor_graphic(@actor, 320 - @max_char * 14 - 40, 80)
end
# ---------------------------
def update_cursor_rect
x = 320 - @max_char * 14 + @index * 28
self.cursor_rect.set(x, 32, 28, 32)
end
# ---------------------------
def update
super
update_cursor_rect
end
end
class Window_NameInput < Window_Base
# ----------------------------------
attr_accessor :mode
# ----------------------------------
ENGLISH_TABLE =
[
"A","B","C","D","E",
"F","G","H","I","J",
"K","L","M","N","O",
"P","Q","R","S","T",
"U","V","W","X","Y",
"Z","","","","",
"0","1","2","3","4",
"5", "6" ,"7", "8" ,"9",
"","","","","",
"a", "b" ,"c", "d" ,"e",
"f","g","h","i","j",
"k","l","m","n","o",
"p","q","r","s","t",
"u","v","w","x","y",
"z","è","é","È","É",
".",",","?","!","/",
"\\","<",">",";",":",
"ç","â", "Â" , "à" , "À" ,
"@","#","$","%","^",
"&","*","(",")","",
"[","]","'","\"","~",
"ë","Ë","ä","Ä","ï",
"Ï","","","","",
"","","","","",
"","","","","",
"", "" ,"", "" ,"",
"","","","","",
]

# ----------------------------------
def initialize
super(160, 128, 480, 352)
self.contents = Bitmap.new(width - 32, height - 32)
self.active = false
@index = -1
@mode = 1
refresh
update_cursor_rect
end
# ----------------------------------
def index=(value)
@index = value
update_cursor_rect
end
#--------------------------------------
def character
if @mode == 1
return ENGLISH_TABLE[@index]
elsif @mode == 2
return HIRAGANA_TABLE[@index]
else
return KATAKANA_TABLE[@index]
end
end
# ----------------------------------
def refresh
self.contents.clear
for i in 0..134
x = 4 + i / 5 / 9 * 152 + i % 5 * 28
y = i / 5 % 9 * 32
if @mode == 1
self.contents.font.name = $fontface
self.contents.font.size = 24
self.contents.draw_text_shadow(x, y, 28, 32, ENGLISH_TABLE[i], 1)
elsif @mode == 2
self.contents.font.name = $fontface
self.contents.font.size = 22
self.contents.draw_text_shadow(x, y, 28, 32, HIRAGANA_TABLE[i], 1)
else
self.contents.font.name = $fontface
self.contents.font.size = 22
self.contents.draw_text_shadow(x, y, 28, 32, KATAKANA_TABLE[i], 1)
end
end
end
# ----------------------------------
def update_cursor_rect
if self.active == false
self.cursor_rect.empty
else
x = 4 + @index / 5 / 9 * 152 + @index % 5 * 28
y = @index / 5 % 9 * 32
self.cursor_rect.set(x, y, 28, 32)
end
end
# ----------------------------------
def update
super
if @index >= 0 && @index <= 134
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
if @index % 5 == 4
if @index < 94
@index += 41
end
else
@index += 1
end
end
if Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
if @index % 5 == 0
if @index < 45
self.active = false
@index = -999
return
else
@index -= 41
end
else
@index -= 1
end
end
if Input.repeat?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
if @index % 45 < 40
@index += 5
end
end
if Input.repeat?(Input::UP)
if Input.trigger?(Input::UP) or @index % 45 >= 5
$game_system.se_play($data_system.cursor_se)
if @index % 45 >= 5
@index -= 5
end
end
end
end
update_cursor_rect
end
end
class Window_NameCommand < Window_Command
# -------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
if i == 1 or i == 2
font = 1
self.contents.font.name = $fontface
self.contents.font.size = 22
else
font = 0
self.contents.font.name = $fontface
self.contents.font.size = 24
end
draw_item(i, normal_color, font)
end
end
# -------------------------------
def draw_item(index, color, f)
if f == 0
self.contents.font.color = color
self.contents.font.name = $fontface
self.contents.font.size = 24
else
self.contents.font.name = $fontface
self.contents.font.size = 22
end
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text_shadow_rect(rect, @commands[index])
end
end

Par Cid6
Ecrire un commentaire - Voir les 2 commentaires - Recommander
Vendredi 1 juillet 2005

Ce script vous permettre de mettre une magie RECUP dans votre jeu, super non ? D'ailleurs celui qui a fait ce script est un dieu !

Alors tout d'abord, allez dans votre database, dans l'onglet statut.
créer votre statut , ajoutez l'option dégat progressif.-> très important.
, régler les autres option comme vous le souhaitez
là vous me dites, mais tu viens de faire un status poison... je vous dis oui , mais......
repérer bien le numéro du status ( dans la liste ).
ensuite direction le script.

Allez dans game_battler3
Allez ensuite à cette méthode : slip_damage_effect
Dont voici le code :

Citation:

def slip_damage_effect
self.damage = self.maxhp / 10
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
self.hp -= self.damage
return true
end



le principe de la modification est très simple :
si dans les status infligés durant le combat, il y en a censé infligé des dégats, alors, si le numéro et le nom ( de votre status récup) corresponde à l'un de ces status, alors multiplié les dégats infligés par -1
( ce qui les rend négatifs , donc - * - = + )

alors voici le petit bout de code à rajouter avant la ligne
self.hp -= self.damage

Citation:

#pour les status du personnage, vérifier si un état inflige des dégats,
#si oui , alors testé si cet état est un état de récupération en vérifiant
#le nom et l'id , du statut correspondant défini dans la Base de donnée,
#tester aussi si les dégats calculés sont positifs.
#si tout cela est vrai, alors multiplier les dégats par -1 pour les rendre
#négatifs. Ainsi lorsqu'ils seront soustrait, ils seront en fait additionnés
#( -(-1) = (+1) )
for i in @states
if $data_states[i].slip_damage
if $data_states[i].name="recup" and $data_states[i].id = 22 and self.damage > 0
self.damage*= (-2)
end
end
end
donc la valeur 22 correspond au numéro du status dans la liste des status de la database. , recup est le nom de mon status.
les modifier pour que ca colle avec votre base de données.
Par Cid6
Ecrire un commentaire - Voir les 2 commentaires - Recommander
Vendredi 1 juillet 2005
Je me suis demandé si oui ou non j'allais le partager, et bien oui!!!
Donc voila le fullscreen sans la barre demarée en dessous, remplacer "main" par ca:

Citation:
#=============
# Š Main
#---------------------
# ??????????????????
#=============

begin
$showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
$showm.call(18,0,0,0)
$showm.call(13,0,0,0)
$showm.call(13,0,2,0)
$showm.call(18,0,2,0)
# Change the $fontface variable to change the font style
$fontface = "Arial"
# Change the $fontsize variable to change the font size
$fontsize = 24
# ?????????
Graphics.freeze
# ????????? (??????) ???
$scene = Scene_Title.new
# $scene ?????? main ?????????
while $scene != nil
$scene.main
end
# ???????
Graphics.transition(20)
rescue Errno::ENOENT
# ?? Errno::ENOENT ???
# ????????????????????????????????
filename = $!.message.sub("No such file or directory - ", "")
print("File #{filename} was not found.")
end
Par Cid6
Ecrire un commentaire - Voir les 8 commentaires - Recommander
Vendredi 1 juillet 2005

Compatible avec tous les systèmes de combat

Permet de changer les polices de dégats lors des combats....


Il va vous falloir Insérer un script nouveau au dessus du script Main. Vous nommerez ce script "Sprite".

Insérez ce code dans le script en question...

Citation:
module RPG
class Sprite < ::Sprite
# --------------------------------
def damage(value, critical)
dispose_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = "fontname"
bitmap.font.size = fontsize
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
if value.is_a?(Numeric) and value < 0
bitmap.font.color.set(red, green, blue)
else
bitmap.font.color.set(red, green, blue)
end
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
if critical
bitmap.font.size = 20
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
end
@_damage_sprite = ::Sprite.new(self.viewport)
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80
@_damage_sprite.oy = 20
@_damage_sprite.x = self.x
@_damage_sprite.y = self.y - self.oy / 2
@_damage_sprite.z = 3000
@_damage_duration = 40
end
end
end


Voila, c'est tout!!
Non, je rigole, ca va pas marcher, vous avez rien modifié.

On va procéder par lignes...



Ligne 12, au code

Citation:
bitmap.font.name = "fontname"


remplacez fontname par le nom de la police que vous voulez attribuer à vos dégats.

Petites remarques/rappels sur ce sujet:
La police choisie doit être Hors Webdings, en TTF/OpenType. Les polices OpenType sont celles qui ont une icône en "O".
Si vous donnez un jeu contenant ce script à un joueur, le joueur en question devra posséder la police.
De plus, vous devez faire attention à la Casse (Majuscule, minuscule) du nom de la police sinon elle ne sera pas reconnue.


Ligne 13, à la suivante,

Citation:
bitmap.font.size = fontsize


vous avez le code fontsize. Remplacez ce code (sans guillemets!!) par la taille de la police.


Ensuite, il va vous falloir modifier les couleurs de la police. Pour la couleur de Soin, tout d'abord, allez à la Ligne 20,

Citation:
bitmap.font.color.set(red, green, blue)


remplacez les valeurs red, green et blue par les valeurs que vous voulez.


Ligne 22, vous avez la couleur des dégats effectués, à vous ou à un ennemi.

Citation:
bitmap.font.color.set(red, green, blue)


Faites de même avec ces valeurs.

Astuce: Pour trouver une couleur que l'on veut, niveau Rouge, Vert et Bleu, quelque chose de tout bête: Ouvrez Paint, Allez dans le menu "Couleurs", puis "Modifier les Couleurs...", et cliquer sur "Définir les couleurs personnalisées...". La, cliquez sur la couleur de votre choix et regardez les cases en dessous qui indiquent les valeurs de cette couleur. Il y a même la Saturation, mais elle n'est pas employée ici.



Voilà, c'est fini, rien d'autre à modifier, si ce n'est, si vous voulez, les "CRITICAL" en dessous (c'est le texte au dessus des dégats pour les Coups Critiques)

Voilà, j'espère que cela vous aura été utile

(Tutorial provenant de
http://www.phylomortis.com/ , anglais)

Par Cid6
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Vendredi 1 juillet 2005
Supprimer le script New Battle, et au dessus de Main, insérez ces deux scripts.  (trés long)

Le premier, nommé le "Jauge" (ou"Gauge", mais je pense plutot que c'est un vieux makeur pourri qui à fait une sale phote d'aurtaugrophe)
Edit : Non non, il faut bel et bien écrire Gauge, avec un "G" attention ^^)

Citation:
# ”z•zŒ³EƒTƒ|[ƒgURL
#
http://members.jcom.home.ne.jp/cogwheel/

#===================
# ¡ Game_Actor
#----------------------------------
# @ƒAƒNƒ^[‚ðˆµ‚€ƒNƒ‰ƒX‚Å‚·B‚±‚̃Nƒ‰ƒX‚Í Game_Actors ƒNƒ‰ƒX ($game_actors)
# ‚Ì“à•”‚ÅŽg—p‚³‚êAGame_Party ƒNƒ‰ƒX ($game_party) ‚©‚ç‚àŽQÆ‚³‚ê‚Ü‚·B
#===================

class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

#===================
# ¡ Window_Base
#----------------------------------
# @ƒQ[ƒ€’†‚Ì‚·‚ׂẴEƒBƒ“ƒhƒE‚̃X[ƒp[ƒNƒ‰ƒX‚Å‚·B
#===================

class Window_Base < Window
#----------------------------------
# œ HP ƒQ[ƒW‚Ì•`‰æ
#----------------------------------
# ƒIƒŠƒWƒiƒ‹‚ÌHP•`‰æ‚ð draw_actor_hp_original ‚Æ–Œ‘O•ύX
alias :draw_actor_hp_original :draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
# •ϐ”rate‚É Œ»Ý‚ÌHP/MHP‚ð‘ã“ü
if actor.maxhp != 0
rate = actor.hp.to_f / actor.maxhp
else
rate = 0
end
# plus_x:XÀ•W‚̈ʒu•␳ rate_x:XÀ•W‚̈ʒu•␳(%) plus_y:YÀ•W‚̈ʒu•␳
# plus_width:•‚̕␳ rate_width:•‚̕␳(%) height:c•
# align1:•`‰æƒ^ƒCƒv1 0:¶‹l‚ß 1:’†‰›‘µ‚Š 2:‰E‹l‚ß
# align2:•`‰æƒ^ƒCƒv2 0:ã‹l‚ß 1:’†‰›‘µ‚Š 2:‰º‹l‚ß
# align3:ƒQ[ƒWƒ^ƒCƒv 0:¶‹l‚ß 1:‰E‹l‚ß
plus_x = 0
rate_x = 0
plus_y = 25
plus_width = 0
rate_width = 100
height = 10
align1 = 1
align2 = 2
align3 = 0
# ƒOƒ‰ƒf[ƒVƒ‡ƒ“Ý’è grade1:‹óƒQ[ƒW grade2:ŽÀƒQ[ƒW
# (0:‰¡‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“ 1:c‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“ 2:ŽÎ‚߂ɃOƒ‰ƒf[ƒVƒ‡ƒ“(Œƒd)j
grade1 = 1
grade2 = 0
# FÝ’èBcolor1:ŠO˜gCcolor2:’†˜g
# color3:‹óƒQ[ƒWƒ_[ƒNƒJƒ‰[Ccolor4:‹óƒQ[ƒWƒ‰ƒCƒgƒJƒ‰[
# color5:ŽÀƒQ[ƒWƒ_[ƒNƒJƒ‰[Ccolor6:ŽÀƒQ[ƒWƒ‰ƒCƒgƒJƒ‰[
color1 = Color.new(0, 0, 0, 192)
color2 = Color.new(255, 255, 192, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(64, 0, 0, 192)
color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
# •ϐ”sp‚É•`‰æ‚·‚éƒQ[ƒW‚Ì•‚ð‘ã“ü
if actor.maxhp != 0
hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp
else
hp = 0
end
# ƒQ[ƒW‚Ì•`‰æ
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
width, plus_width + width * rate_width / 100,
height, hp, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
# ƒIƒŠƒWƒiƒ‹‚ÌHP•`‰æˆ—‚ðŒÄ‚яo‚µ
draw_actor_hp_original(actor, x, y, width)
end
#----------------------------------
# œ SP ƒQ[ƒW‚Ì•`‰æ
#----------------------------------
# ƒIƒŠƒWƒiƒ‹‚ÌSP•`‰æ‚ð draw_actor_sp_original ‚Æ–Œ‘O•ύX
alias :draw_actor_sp_original :draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
# •ϐ”rate‚É Œ»Ý‚ÌSP/MSP‚ð‘ã“ü
if actor.maxsp != 0
rate = actor.sp.to_f / actor.maxsp
else
rate = 1
end
# plus_x:XÀ•W‚̈ʒu•␳ rate_x:XÀ•W‚̈ʒu•␳(%) plus_y:YÀ•W‚̈ʒu•␳
# plus_width:•‚̕␳ rate_width:•‚̕␳(%) height:c•
# align1:•`‰æƒ^ƒCƒv1 0:¶‹l‚ß 1:’†‰›‘µ‚Š 2:‰E‹l‚ß
# align2:•`‰æƒ^ƒCƒv2 0:ã‹l‚ß 1:’†‰›‘µ‚Š 2:‰º‹l‚ß
# align3:ƒQ[ƒWƒ^ƒCƒv 0:¶‹l‚ß 1:‰E‹l‚ß
plus_x = 0
rate_x = 0
plus_y = 25
plus_width = 0
rate_width = 100
height = 10
align1 = 1
align2 = 2
align3 = 0
# ƒOƒ‰ƒf[ƒVƒ‡ƒ“Ý’è grade1:‹óƒQ[ƒW grade2:ŽÀƒQ[ƒW
# (0:‰¡‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“ 1:c‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“ 2:ŽÎ‚߂ɃOƒ‰ƒf[ƒVƒ‡ƒ“(Œƒd)j
grade1 = 1
grade2 = 0
# FÝ’èBcolor1:ŠO˜gCcolor2:’†˜g
# color3:‹óƒQ[ƒWƒ_[ƒNƒJƒ‰[Ccolor4:‹óƒQ[ƒWƒ‰ƒCƒgƒJƒ‰[
# color5:ŽÀƒQ[ƒWƒ_[ƒNƒJƒ‰[Ccolor6:ŽÀƒQ[ƒWƒ‰ƒCƒgƒJƒ‰[
color1 = Color.new(0, 0, 0, 192)
color2 = Color.new(255, 255, 192, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(0, 64, 0, 192)
color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
# •ϐ”sp‚É•`‰æ‚·‚éƒQ[ƒW‚Ì•‚ð‘ã“ü
if actor.maxsp != 0
sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp
else
sp = (width + plus_width) * rate_width / 100
end
# ƒQ[ƒW‚Ì•`‰æ
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
width, plus_width + width * rate_width / 100,
height, sp, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
# ƒIƒŠƒWƒiƒ‹‚ÌSP•`‰æˆ—‚ðŒÄ‚яo‚µ
draw_actor_sp_original(actor, x, y, width)
end
#----------------------------------
# œ EXP ƒQ[ƒW‚Ì•`‰æ
#----------------------------------
# ƒIƒŠƒWƒiƒ‹‚ÌEXP•`‰æ‚ð draw_actor_sp_original ‚Æ–Œ‘O•ύX
alias :draw_actor_exp_original :draw_actor_exp
def draw_actor_exp(actor, x, y, width = 204)
# •ϐ”rate‚É Œ»Ý‚Ìexp/nextexp‚ð‘ã“ü
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
# plus_x:XÀ•W‚̈ʒu•␳ rate_x:XÀ•W‚̈ʒu•␳(%) plus_y:YÀ•W‚̈ʒu•␳
# plus_width:•‚̕␳ rate_width:•‚̕␳(%) height:c•
# align1:•`‰æƒ^ƒCƒv1 0:¶‹l‚ß 1:’†‰›‘µ‚Š 2:‰E‹l‚ß
# align2:•`‰æƒ^ƒCƒv2 0:ã‹l‚ß 1:’†‰›‘µ‚Š 2:‰º‹l‚ß
# align3:ƒQ[ƒWƒ^ƒCƒv 0:¶‹l‚ß 1:‰E‹l‚ß
plus_x = 0
rate_x = 0
plus_y = 25
plus_width = 0
rate_width = 100
height = 10
align1 = 1
align2 = 2
align3 = 0
# ƒOƒ‰ƒf[ƒVƒ‡ƒ“Ý’è grade1:‹óƒQ[ƒW grade2:ŽÀƒQ[ƒW
# (0:‰¡‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“ 1:c‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“ 2:ŽÎ‚߂ɃOƒ‰ƒf[ƒVƒ‡ƒ“(Œƒd)j
grade1 = 1
grade2 = 0
# FÝ’èBcolor1:ŠO˜gCcolor2:’†˜g
# color3:‹óƒQ[ƒWƒ_[ƒNƒJƒ‰[Ccolor4:‹óƒQ[ƒWƒ‰ƒCƒgƒJƒ‰[
# color5:ŽÀƒQ[ƒWƒ_[ƒNƒJƒ‰[Ccolor6:ŽÀƒQ[ƒWƒ‰ƒCƒgƒJƒ‰[
color1 = Color.new(0, 0, 0, 192)
color2 = Color.new(255, 255, 192, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(64, 0, 0, 192)
color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
# •ϐ”exp‚É•`‰æ‚·‚éƒQ[ƒW‚Ì•‚ð‘ã“ü
if actor.next_exp != 0
exp = (width + plus_width) * actor.now_exp * rate_width /
100 / actor.next_exp
else
exp = (width + plus_width) * rate_width / 100
end
# ƒQ[ƒW‚Ì•`‰æ
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
width, plus_width + width * rate_width / 100,
height, exp, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
# ƒIƒŠƒWƒiƒ‹‚ÌEXP•`‰æˆ—‚ðŒÄ‚яo‚µ
draw_actor_exp_original(actor, x, y)
end
#----------------------------------
# œ ƒQ[ƒW‚Ì•`‰æ
#----------------------------------
def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
case align1
when 1
x += (rect_width - width) / 2
when 2
x += rect_width - width
end
case align2
when 1
y -= height / 2
when 2
y -= height
end
# ˜g•`‰æ
self.contents.fill_rect(x, y, width, height, color1)
self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2)
if align3 == 0
if grade1 == 2
grade1 = 3
end
if grade2 == 2
grade2 = 3
end
end
if (align3 == 1 and grade1 == 0) or grade1 > 0
color = color3
color3 = color4
color4 = color
end
if (align3 == 1 and grade2 == 0) or grade2 > 0
color = color5
color5 = color6
color6 = color
end
# ‹óƒQ[ƒW‚Ì•`‰æ
self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4,
color3, color4, grade1)
if align3 == 1
x += width - gauge
end
# ŽÀƒQ[ƒW‚Ì•`‰æ
self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4,
color5, color6, grade2)
end
end

#----------------------------------
# @BitmapƒNƒ‰ƒX‚ɐV‚œ‚È‹@”\‚ð’ljÁ‚µ‚Ü‚·B
#===================

class Bitmap
#----------------------------------
# œ ‹éŒ`‚ðƒOƒ‰ƒf[ƒVƒ‡ƒ“•\ŽŠ
# color1 : ƒXƒ^[ƒgƒJƒ‰[
# color2 : ƒGƒ“ƒhƒJƒ‰[
# align : 0:‰¡‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“
# 1:c‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“
# 2:ŽÎ‚߂ɃOƒ‰ƒf[ƒVƒ‡ƒ“iŒƒd‚ɂ‚«’ˆÓj
#----------------------------------
def gradation_rect(x, y, width, height, color1, color2, align = 0)
if align == 0
for i in x...x + width
red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
green = color1.green +
(color2.green - color1.green) * (i - x) / (width - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - x) / (width - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - x) / (width - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(i, y, 1, height, color)
end
elsif align == 1
for i in y...y + height
red = color1.red +
(color2.red - color1.red) * (i - y) / (height - 1)
green = color1.green +
(color2.green - color1.green) * (i - y) / (height - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - y) / (height - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - y) / (height - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(x, i, width, 1, color)
end
elsif align == 2
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
elsif align == 3
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
end
end
end

#===================
# ¡ Spriteƒ‚ƒWƒ…[ƒ‹
#----------------------------------
# @ƒAƒjƒ[ƒVƒ‡ƒ“‚ÌŠÇ—‚ðs‚€ƒ‚ƒWƒ…[ƒ‹‚Å‚·B
#===================

module RPG
class Sprite < ::Sprite
def damage(value, critical)
dispose_damage
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font.name = "Arial Black"
bitmap.font.size = 32
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
if value.is_a?(Numeric) and value < 0
bitmap.font.color.set(176, 255, 144)
else
bitmap.font.color.set(255, 255, 255)
end
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
if critical
bitmap.font.size = 20
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
end
@_damage_sprite = ::Sprite.new
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80 + self.viewport.ox
@_damage_sprite.oy = 20 + self.viewport.oy
@_damage_sprite.x = self.x + self.viewport.rect.x
@_damage_sprite.y = self.y - self.oy / 2 + self.viewport.rect.y
@_damage_sprite.z = 3000
@_damage_duration = 40
end
def animation(animation, hit)
dispose_animation
@_animation = animation
return if @_animation == nil
@_animation_hit = hit
@_animation_duration = @_animation.frame_max
animation_name = @_animation.animation_name
animation_hue = @_animation.animation_hue
bitmap = RPG::Cache.animation(animation_name, animation_hue)
if @@_reference_count.include?(bitmap)
@@_reference_count[bitmap] += 1
else
@@_reference_count[bitmap] = 1
end
@_animation_sprites = []
if @_animation.position != 3 or not @@_animations.include?(animation)
for i in 0..15
sprite = ::Sprite.new
sprite.bitmap = bitmap
sprite.visible = false
@_animation_sprites.push(sprite)
end
unless @@_animations.include?(animation)
@@_animations.push(animation)
end
end
update_animation
end
def loop_animation(animation)
return if animation == @_loop_animation
dispose_loop_animation
@_loop_animation = animation
return if @_loop_animation == nil
@_loop_animation_index = 0
animation_name = @_loop_animation.animation_name
animation_hue = @_loop_animation.animation_hue
bitmap = RPG::Cache.animation(animation_name, animation_hue)
if @@_reference_count.include?(bitmap)
@@_reference_count[bitmap] += 1
else
@@_reference_count[bitmap] = 1
end
@_loop_animation_sprites = []
for i in 0..15
sprite = ::Sprite.new
sprite.bitmap = bitmap
sprite.visible = false
@_loop_animation_sprites.push(sprite)
end
update_loop_animation
end
def animation_set_sprites(sprites, cell_data, position)
for i in 0..15
sprite = sprites[i]
pattern = cell_data[i, 0]
if sprite == nil or pattern == nil or pattern == -1
sprite.visible = false if sprite != nil
next
end
sprite.visible = true
sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
if position == 3
if self.viewport != nil
sprite.x = self.viewport.rect.width / 2
sprite.y = self.viewport.rect.height - 160
else
sprite.x = 320
sprite.y = 240
end
else
sprite.x = self.x + self.viewport.rect.x -
self.ox + self.src_rect.width / 2
sprite.y = self.y + self.viewport.rect.y -
self.oy + self.src_rect.height / 2
sprite.y -= self.src_rect.height / 4 if position == 0
sprite.y += self.src_rect.height / 4 if position == 2
end
sprite.x += cell_data[i, 1]
sprite.y += cell_data[i, 2]
sprite.z = 2000
sprite.ox = 96
sprite.oy = 96
sprite.zoom_x = cell_data[i, 3] / 100.0
sprite.zoom_y = cell_data[i, 3] / 100.0
sprite.angle = cell_data[i, 4]
sprite.mirror = (cell_data[i, 5] == 1)
sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
sprite.blend_type = cell_data[i, 7]
end
end
end
end



Et le deuxième, nommé le "Bob" (très long script) et copier coller.

 

# ƒŠƒAƒ‹ƒ^ƒCƒ€EƒAƒNƒeƒBƒuƒoƒgƒ‹(RTAB) Ver 1.05
# ”z•zŒ³EƒTƒ|[ƒgURL
# http://members.jcom.home.ne.jp/cogwheel/

class Scene_Battle
  #--------------------------------------------------------------------------
  # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•ϐ”
  #--------------------------------------------------------------------------
  attr_reader   :status_window            # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE
  attr_reader   :spriteset                # ƒoƒgƒ‹ƒXƒvƒ‰ƒCƒg
  attr_reader   :scroll_time              # ƒXƒNƒŠ[ƒ“ˆÚ“®Šî–{ŽžŠÔ
  attr_reader   :zoom_rate                # “Gƒoƒgƒ‰[Šî–{ˆÊ’u
  attr_reader   :drive                    # ƒJƒƒ‰‹ì“®
  attr_accessor :force                    # ƒAƒNƒVƒ‡ƒ“‹­§“x
  attr_accessor :camera                   # Œ»Ý‚̃Jƒƒ‰ŠŽŽÒ
  #--------------------------------------------------------------------------
  # œ ATBŠî‘bƒZƒbƒgƒAƒbƒv
  #--------------------------------------------------------------------------
  def atb_setup
    # ATB‰Šú‰»
    # speed   : ƒoƒgƒ‹ƒXƒs[ƒhŒˆ’èB’l‚ª¬‚³‚¢‚Ù‚Ç‘‚¢
    # @active : ƒAƒNƒeƒBƒu“xÝ’è
    #           3 : í‚ɃAƒNƒeƒBƒuó‘Ô
    #           2 : ƒXƒLƒ‹EƒAƒCƒeƒ€‘I‘𒆂̂݃AƒNƒeƒBƒuƒQ[ƒW‚ªŽ~‚Ü‚é
    #           1 : 2‚̏ó‘ԂɉÁ‚ЁAƒ^[ƒQƒbƒg‘I‘ðŽž‚àƒEƒFƒCƒg‚ªŠ|‚©‚é
    #           0 : 1‚̏ó‘ԂɉÁ‚ЁAƒRƒ}ƒ“ƒh“ü—ÍŽž‚É‚àƒEƒFƒCƒg‚ªŠ|‚©‚é
    # @action : ‘Œl‚ªs“®’†‚ÉŽ©•ª‚às“®‚ð‹N‚±‚·‚±‚Æ‚ð‹–‚·‚©
    #           3 : Ž©•ª‚ªs“®•s”\‚łȂ¢ŒÀ‚èŒÀ‚è‹–‚·
    #           2 : Ž©•ª‚ªƒ_ƒ[ƒW‚ðŽó‚¯‚Ä‚¢‚È‚¢ŒÀ‚è‹–‚·
    #           1 : 2‚̏ó‘ԂɉÁ‚ЁAƒ^[ƒQƒbƒg‚ªs“®‚µ‚Ä‚¢‚È‚¢ŒÀ‚è‹–‚·
    #           0 : s“®‚ð‹–‚³‚È‚¢B‡”Ԃɍs“®‚µI‚Š‚é‚܂ő҂Â
    # @anime_wait : true‚É‚·‚邯ƒoƒgƒ‹ƒAƒjƒEƒ_ƒ[ƒW•\ŽŠ’†‚̓EƒFƒCƒg‚ªŠ|‚©‚é
    # @damage_wait : ƒ_ƒ[ƒW•\ŽŠ‘Ò‚¿ŽžŠÔi’PˆÊ‚̓tƒŒ[ƒ€j
    # @enemy_speed : “G‚ÌŽvl‘¬“xB1‚È‚ç‘ŠŽžs“®B
    #                1ƒtƒŒ[ƒ€–ˆ‚ɁA1/@enemy_speed‚ÌŠm—Š‚Ås“®‚ð‹N‚±‚·
    # @force : ‹­§ƒAƒNƒVƒ‡ƒ“‚ŃXƒLƒ‹Žg—pŽž‚Ì‹­§‹ï‡
    #          2:ƒXƒLƒ‹‚Í‘S‚ĉr¥‚¹‚žA•K‚ž‘ŠŽžŽÀs
    #          1:’P“ƃXƒLƒ‹‚͉r¥‚µA˜AŒgƒXƒLƒ‹‚Ì‚Ý‘ŠŽžŽÀs
    #          0:‘SƒXƒLƒ‹‰r¥‚ðs‚€‚Ÿ‚¯
    # ($scene.force = x ‚Æ‚·‚邱‚Ƃɂæ‚èA’ʏíƒCƒxƒ“ƒg‚̃XƒNƒŠƒvƒg‚©‚ç•ύX‰Â”\j
    # @drive : ƒJƒƒ‰‹ì“®ON/OFFBtrue‚ŋ쓮ONAfalse‚ŋ쓮OFF
    # @scroll_time : ƒXƒNƒŠ[ƒ“ˆÚ“®‚É—v‚·‚éŠî–{ŽžŠÔ
    # @zoom_rate = [i, j] : ƒGƒlƒ~[‚̃Y[ƒ€—Š
    #                       i ‚ª‰æ–ʍŏ㕔‚É”z’u‚µ‚œŽž‚ÌŠg‘å—Š
    #                       j ‚ª‰æ–ʍʼnº•”‚É”z’u‚µ‚œŽž‚ÌŠg‘å—Š
    #                       1 ”{‚Æ‚µ‚œ‚¢‚Æ‚«‚àA1.0 ‚Æ•K‚ž¬”‚Őݒ肷‚邱‚Æ
    speed = 150
    @active = 1
    @action = 2
    @anime_wait = false
    @damage_wait = 10
    @enemy_speed = 40
    @force = 2
    @drive = true
    @scroll_time = 15
    @zoom_rate = [0.2, 1.0]
    @help_time = 40
    @escape == false
    @camera = nil
    @max = 0
    @turn_cnt = 0
    @help_wait = 0
    @action_battlers = []
    @synthe = []
    @spell_p = {}
    @spell_e = {}
    @command_a = false
    @command = []
    @party = false
    for battler in $game_party.actors + $game_troop.enemies
      spell_reset(battler)
      battler.at = battler.agi * rand(speed / 2)
      battler.damage_pop = {}
      battler.damage = {}
      battler.damage_sp = {}
      battler.critical = {}
      battler.recover_hp = {}
      battler.recover_sp = {}
      battler.state_p = {}
      battler.state_m = {}
      battler.animation = []
      if battler.is_a?(Game_Actor)
        @max += battler.agi
      end
    end
    @max *= speed
    @max /= $game_party.actors.size
    for battler in $game_party.actors + $game_troop.enemies
      battler.atp = 100 * battler.at / @max
    end
  end
  #--------------------------------------------------------------------------
  # œ ATƒQ[ƒWMaxŽžSE
  #--------------------------------------------------------------------------
  def fullat_se
    Audio.se_play("Audio/SE/033-switch02", 80, 100)
  end
  #--------------------------------------------------------------------------
  # œ ƒŒƒxƒ‹ƒAƒbƒvSE
  #--------------------------------------------------------------------------
  def levelup_se
    Audio.se_play("Audio/SE/056-Right02", 80, 100)
  end
  #--------------------------------------------------------------------------
  # œ ƒXƒLƒ‹K“ŸSE
  #--------------------------------------------------------------------------
  def skill_se
    Audio.se_play("Audio/SE/056-Right02", 80, 150)
  end
end

class Window_Base < Window
  #--------------------------------------------------------------------------
  # œ ATG ‚Ì•`‰æ
  #     actor : ƒAƒNƒ^[
  #     x     : •`‰ææ X À•W
  #     y     : •`‰ææ Y À•W
  #     width : •`‰ææ‚Ì•
  #--------------------------------------------------------------------------
  def draw_actor_atg(actor, x, y, width = 144)
    if @at_gauge == nil
      # plus_x:XÀ•W‚̈ʒu•␳ rate_x:XÀ•W‚̈ʒu•␳(%) plus_y:YÀ•W‚̈ʒu•␳
      # plus_width:•‚̕␳ rate_width:•‚̕␳(%) height:c•
      # align1:•`‰æƒ^ƒCƒv1 0:¶‹l‚ß 1:’†‰›‘µ‚Š 2:‰E‹l‚ß
      # align2:•`‰æƒ^ƒCƒv2 0:ã‹l‚ß 1:’†‰›‘µ‚Š 2:‰º‹l‚ß
      # align3:ƒQ[ƒWƒ^ƒCƒv 0:¶‹l‚ß 1:‰E‹l‚ß
      @plus_x = 0
      @rate_x = 0
      @plus_y = 16
      @plus_width = 0
      @rate_width = 100
      @width = @plus_width + width * @rate_width / 100
      @height = 16
      @align1 = 0
      @align2 = 1
      @align3 = 0
      # ƒOƒ‰ƒf[ƒVƒ‡ƒ“Ý’è grade1:‹óƒQ[ƒW grade2:ŽÀƒQ[ƒW
      # (0:‰¡‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“ 1:c‚ɃOƒ‰ƒf[ƒVƒ‡ƒ“ 2:ŽÎ‚߂ɃOƒ‰ƒf[ƒVƒ‡ƒ“j
      grade1 = 1
      grade2 = 0
      # FÝ’èBcolor1:ÅŠO˜gCcolor2:’†˜g
      # color3:‹ó˜gƒ_[ƒNƒJƒ‰[Ccolor4:‹ó˜gƒ‰ƒCƒgƒJƒ‰[
      color1 = Color.new(0, 0, 0)
      color2 = Color.new(255, 255, 192)
      color3 = Color.new(0, 0, 0, 192)
      color4 = Color.new(0, 0, 64, 192)
      # ƒQ[ƒW‚̐FÝ’è
      # ’ʏ펞‚̐FÝ’è
      color5 = Color.new(0, 64, 80)
      color6 = Color.new(0, 128, 160)
      # ƒQ[ƒW‚ªMAX‚ÌŽž‚̐FÝ’è
      color7 = Color.new(80, 0, 0)
      color8 = Color.new(240, 0, 0)
      # ˜AŒgƒXƒLƒ‹Žg—pŽž‚̐FÝ’è
      color9 = Color.new(80, 64, 32)
      color10 = Color.new(240, 192, 96)
      # ƒXƒLƒ‹‰r¥Žž‚̐FÝ’è
      color11 = Color.new(80, 0, 64)
      color12 = Color.new(240, 0, 192)
      # ƒQ[ƒW‚Ì•`‰æ
      gauge_rect_at(@width, @height, @align3, color1, color2,
                  color3, color4, color5, color6, color7, color8,
                  color9, color10, color11, color12, grade1, grade2)
    end
    # •ϐ”at‚É•`‰æ‚·‚éƒQ[ƒW‚Ì•‚ð‘ã“ü
    if actor.rtp == 0
      at = (width + @plus_width) * actor.atp * @rate_width / 10000
    else
      at = (width + @plus_width) * actor.rt * @rate_width / actor.rtp / 100
    end
    if at > width
      at = width
    end
    # ƒQ[ƒW‚̍¶‹lE’†‰›\‚Š“™‚̕␳
    case @align1
    when 1
      x += (@rect_width - width) / 2
    when 2
      x += @rect_width - width
    end
    case @align2
    when 1
      y -= @height / 2
    when 2
      y -= @height
    end
    self.contents.blt(x + @plus_x + width * @rate_x / 100, y + @plus_y,
                      @at_gauge, Rect.new(0, 0, @width, @height))
    if @align3 == 0
      rect_x = 0
    else
      x += @width - at - 1
      rect_x = @width - at - 1
    end
    # ƒQ[ƒW‚̐FÝ’è
    if at == width
        # MAXŽž‚̃Q[ƒW•`‰æ
      self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
                        @at_gauge, Rect.new(rect_x, @height * 2, at, @height))
    else
      if actor.rtp == 0
        # ’ʏ펞‚̃Q[ƒW•`‰æ
        self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
                          @at_gauge, Rect.new(rect_x, @height, at, @height))
      else
        if actor.spell == true
          # ˜AŒgƒXƒLƒ‹Žg—pŽž‚̃Q[ƒW•`‰æ
          self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
                        @at_gauge, Rect.new(rect_x, @height * 3, at, @height))
        else
          # ƒXƒLƒ‹‰r¥Žž‚̃Q[ƒW•`‰æ
          self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
                        @at_gauge, Rect.new(rect_x, @height * 4, at, @height))
        end
      end
    end
  end
end

#==============================================================================
# ¡ Scene_Battle (•ªŠ„’è‹` 1)
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹‰æ–ʂ̏ˆ—‚ðs‚€ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # œ ƒƒCƒ“ˆ—
  #--------------------------------------------------------------------------
  def main
    # í“¬—p‚ÌŠeŽíˆêŽžƒf[ƒ^‚ð‰Šú‰»
    $game_temp.in_battle = true
    $game_temp.battle_turn = 0
    $game_temp.battle_event_flags.clear
    $game_temp.battle_abort = false
    $game_temp.battle_main_phase = false
    $game_temp.battleback_name = $game_map.battleback_name
    $game_temp.forcing_battler = nil
    # ƒoƒgƒ‹ƒCƒxƒ“ƒg—pƒCƒ“ƒ^ƒvƒŠƒ^‚ð‰Šú‰»
    $game_system.battle_interpreter.setup(nil, 0)
    # ƒgƒ‹[ƒv‚ð€”õ
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    atb_setup
    # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
    @actor_command_window.y = 160
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # ‚»‚Ì‘Œ‚̃EƒBƒ“ƒhƒE‚ðì¬
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    # ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ðì¬
    @spriteset = Spriteset_Battle.new
    # ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ð‰Šú‰»
    @wait_count = 0
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
    if $data_system.battle_transition == ""
      Graphics.transition(20)
    else
      Graphics.transition(40, "Graphics/Transitions/" +
        $data_system.battle_transition)
    end
    # ƒvƒŒƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
    start_phase1
    # ƒƒCƒ“ƒ‹[ƒv
    loop do
      # ƒQ[ƒ€‰æ–Ê‚ðXV
      Graphics.update
      # “ü—͏î•ñ‚ðXV
      Input.update
      # ƒtƒŒ[ƒ€XV
      update
      # ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚œ‚烋[ƒv‚ð’†’f
      if $scene != self
        break
      end
    end
    # ƒ}ƒbƒv‚ðƒŠƒtƒŒƒbƒVƒ…
    $game_map.refresh
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
    Graphics.freeze
    # ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
    @actor_command_window.dispose
    @party_command_window.dispose
    @help_window.dispose
    @status_window.dispose
    @message_window.dispose
    if @skill_window != nil
      @skill_window.dispose
    end
    if @item_window != nil
      @item_window.dispose
    end
    if @result_window != nil
      @result_window.dispose
    end
    # ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ð‰ð•ú
    @spriteset.dispose
    # ƒ^ƒCƒgƒ‹‰æ–ʂɐ؂è‘Ö‚Š’†‚̏ꍇ
    if $scene.is_a?(Scene_Title)
      # ‰æ–Ê‚ðƒtƒF[ƒhƒAƒEƒg
      Graphics.transition
      Graphics.freeze
    end
    # í“¬ƒeƒXƒg‚©‚çƒQ[ƒ€ƒI[ƒo[‰æ–ʈȊO‚ɐ؂è‘Ö‚Š’†‚̏ꍇ
    if $BTEST and not $scene.is_a?(Scene_Gameover)
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # œ Ÿ”s”»’è
  #--------------------------------------------------------------------------
  def judge
    # ‘S–Å”»’肪^A‚Ü‚œ‚̓p[ƒeƒBl”‚ª 0 l‚̏ꍇ
    if $game_party.all_dead? or $game_party.actors.size == 0
      # ”s–k‰Â”\‚̏ꍇ
      if $game_temp.battle_can_lose
        # ƒoƒgƒ‹ŠJŽn‘O‚Ì BGM ‚É–ß‚·
        $game_system.bgm_play($game_temp.map_bgm)
        # ƒoƒgƒ‹I—¹
        battle_end(2)
        # true ‚ð•Ô‚·
        return true
      end
      # ƒQ[ƒ€ƒI[ƒo[ƒtƒ‰ƒO‚ðƒZƒbƒg
      $game_temp.gameover = true
      # true ‚ð•Ô‚·
      return true
    end
    # ƒGƒlƒ~[‚ª 1 ‘Ì‚Å‚à‘¶Ý‚·‚ê‚Î false ‚ð•Ô‚·
    for enemy in $game_troop.enemies
      if enemy.exist?
        return false
      end
    end
    # ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn (Ÿ—˜)
    start_phase5
    # true ‚ð•Ô‚·
    return true
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV
  #--------------------------------------------------------------------------
  def update
    # ƒoƒgƒ‹ƒCƒxƒ“ƒgŽÀs’†‚̏ꍇ
    if $game_system.battle_interpreter.running?
      if @command.size > 0
        @command_a = false
        @command = []
        command_delete
      end
      @status_window.at_refresh
      # ƒCƒ“ƒ^ƒvƒŠƒ^‚ðXV
      $game_system.battle_interpreter.update
      # ƒAƒNƒVƒ‡ƒ“‚ð‹­§‚³‚ê‚Ä‚¢‚éƒoƒgƒ‰[‚ª‘¶Ý‚µ‚È‚¢ê‡
      if $game_temp.forcing_battler == nil
        # ƒoƒgƒ‹ƒCƒxƒ“ƒg‚ÌŽÀs‚ªI‚í‚Á‚œê‡
        unless $game_system.battle_interpreter.running?
          # ƒoƒgƒ‹ƒCƒxƒ“ƒg‚̃ZƒbƒgƒAƒbƒv‚ðÄŽÀs
          @status_window.refresh
          setup_battle_event
        end
      end
    end
    # ƒVƒXƒeƒ€ (ƒ^ƒCƒ}[)A‰æ–Ê‚ðXV
    $game_system.update
    $game_screen.update
    # ƒ^ƒCƒ}[‚ª 0 ‚ɂȂÁ‚œê‡
    if $game_system.timer_working and $game_system.timer == 0
      # ƒoƒgƒ‹’†’f
      $game_temp.battle_abort = true
    end
    # ƒEƒBƒ“ƒhƒE‚ðXV
    @help_window.update
    @party_command_window.update
    @actor_command_window.update
    @status_window.update
    @message_window.update
    # ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ðXV
    @spriteset.update
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ˆ—’†‚̏ꍇ
    if $game_temp.transition_processing
      # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ˆ—’†ƒtƒ‰ƒO‚ðƒNƒŠƒA
      $game_temp.transition_processing = false
      # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    # ƒƒbƒZ[ƒWƒEƒBƒ“ƒhƒE•\ŽŠ’†‚̏ꍇ
    if $game_temp.message_window_showing
      return
    end
    # ƒQ[ƒ€ƒI[ƒo[‚̏ꍇ
    if $game_temp.gameover
      # ƒQ[ƒ€ƒI[ƒo[‰æ–ʂɐ؂è‘Ö‚Š
      $scene = Scene_Gameover.new
      return
    end
    # ƒ^ƒCƒgƒ‹‰æ–ʂɖ߂·ê‡
    if $game_temp.to_title
      # ƒ^ƒCƒgƒ‹‰æ–ʂɐ؂è‘Ö‚Š
      $scene = Scene_Title.new
      return
    end
    # ƒoƒgƒ‹’†’f‚̏ꍇ
    if $game_temp.battle_abort
      # ƒoƒgƒ‹ŠJŽn‘O‚Ì BGM ‚É–ß‚·
      $game_system.bgm_play($game_temp.map_bgm)
      # ƒoƒgƒ‹I—¹
      battle_end(1)
      return
    end
    # ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE•\ŽŠ’†‚̏ꍇ
    if @help_wait > 0
      @help_wait -= 1
      if @help_wait == 0
        # ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ð‰B‚·
        @help_window.visible = false
      end
    end
    # ƒtƒF[ƒY‚É‚æ‚Á‚Ä•ªŠò
    case @phase
    when 0  # ATƒQ[ƒWXVƒtƒF[ƒY
      if anime_wait_return
        update_phase0
      end
    when 1  # ƒvƒŒƒoƒgƒ‹ƒtƒF[ƒY
      update_phase1
      return
    when 2  # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF[ƒY
      update_phase2
      return
    when 5  # ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒY
      update_phase5
      return
    end
    if $scene != self
      return
    end
    if @phase == 0
      if @command.size != 0  # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY
        if @command_a == false
          start_phase3
        end
        update_phase3
      end
      # ƒEƒFƒCƒg’†‚̏ꍇ
      if @wait_count > 0
        # ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ðŒž‚ç‚·
        @wait_count -= 1
        return
      end
      update_phase4
    end
  end

#==============================================================================
# ¡ Scene_Battle (•ªŠ„’è‹` 2)
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹‰æ–ʂ̏ˆ—‚ðs‚€ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ATƒQ[ƒWXVƒtƒF[ƒY)
  #--------------------------------------------------------------------------
  def update_phase0
    if $game_temp.battle_turn == 0
      $game_temp.battle_turn = 1
    end
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if @command_a == false and @party == false
      if Input.trigger?(Input::B)
        # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.cancel_se)
        @party = true
      end
    end
    if @party == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and 
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF[ƒY‚Ö
      start_phase2
      return
    end
    # ATƒQ[ƒW‘‰Áˆ—
    cnt = 0
    for battler in $game_party.actors + $game_troop.enemies
      active?(battler)
      if battler.rtp == 0
        if battler.at >= @max
          if battler.is_a?(Game_Actor)
            if battler.inputable?
              unless @action_battlers.include?(battler) or
                  @command.include?(battler) or @escape == true
                if battler.current_action.forcing
                  fullat_se
                  force_action(battler)
                  action_start(battler)
                else
                  fullat_se
                  @command.push(battler)
                end
              end
            else
              unless @action_battlers.include?(battler) or
                      battler == @command[0]
                battler.current_action.clear
                if @command.include?(battler)
                  @command.delete(battler)
                else
                  if battler.movable?
                    fullat_se
                  end
                end
                action_start(battler)
              end
            end
          else
            unless @action_battlers.include?(battler)
              if battler.current_action.forcing
                force_action(battler)
                action_start(battler)
              else
                if @enemy_speed != 0
                  if rand(@enemy_speed) == 0
                    number = cnt - $game_party.actors.size
                    enemy_action(number)
                  end
                else
                  number = cnt - $game_party.actors.size
                  enemy_action(number)
                end
              end
            end
          end
        else
          battler.at += battler.agi
          if battler.guarding?
            battler.at += battler.agi
          end
          if battler.movable?
            battler.atp = 100 * battler.at / @max
          end
        end
      else
        if battler.rt >= battler.rtp
          speller = synthe?(battler)
          if speller != nil
            battler = speller[0]
          end
          unless @action_battlers.include?(battler)
            if battler.is_a?(Game_Actor)
              fullat_se
            end
            battler.rt = battler.rtp
            action_start(battler)
          end
        else
          battler.rt += battler.agi
          speller = synthe?(battler)
          if speller != nil
            for spell in speller
              if spell != battler
                spell.rt += battler.agi
              end
            end
          end
        end
      end
      cnt += 1
    end
    # ATƒQ[ƒW‚ðƒŠƒtƒŒƒbƒVƒ…
    @status_window.at_refresh
    # “Š‘–ˆ—
    if @escape == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and 
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      temp = false
      for battler in $game_party.actors
        if battler.inputable?
          temp = true
        end
      end
      if temp == true
        for battler in $game_party.actors
          if battler.at < @max and battler.inputable?
            temp = false
            break
          end
        end
        if temp == true
          @escape = false
          for battler in $game_party.actors
            battler.at %= @max
          end
          $game_temp.battle_main_phase = false
          update_phase2_escape
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF[ƒYŠJŽn
  #--------------------------------------------------------------------------
  def start_phase2
    # ƒtƒF[ƒY 2 ‚Ɉڍs
    @phase = 2
    @party = false
    # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ð—LŒø‰»
    @party_command_window.active = true
    @party_command_window.visible = true
    # ƒAƒNƒ^[‚ð”ñ‘I‘ðó‘Ԃɐݒè
    @actor_index = -1
    # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
    @actor_command_window.active = false
    @actor_command_window.visible = false
    if @command.size != 0
      # ƒAƒNƒ^[‚Ì–Ÿ–ŃGƒtƒFƒNƒg OFF
      if @active_actor != nil
        @active_actor.blink = false
      end
    end
    # ƒJƒƒ‰ƒZƒbƒg
    @camera == "party"
    @spriteset.screen_target(0, 0, 1)
    # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒNƒŠƒA
    $game_temp.battle_main_phase = false
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF[ƒY)
  #--------------------------------------------------------------------------
  def update_phase2
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::C)
      # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
      case @party_command_window.index
      when 0  # í‚€
        # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
        @party_command_window.active = false
        @party_command_window.visible = false
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        @escape = false
        @phase = 0
        if $game_temp.battle_turn == 0
          $game_temp.battle_turn = 1
        end
        if @command_a == true
          # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒYŠJŽn
          start_phase3
        else
          $game_temp.battle_main_phase = true
        end
      when 1  # “Š‚°‚é
        # “Š‘–‰Â”\‚ł͂Ȃ¢ê‡
        if $game_temp.battle_can_escape == false
          # ƒuƒU[ SE ‚ð‰‰‘t
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        @phase = 0
        # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
        @party_command_window.active = false
        @party_command_window.visible = false
        $game_temp.battle_main_phase = true
        if $game_temp.battle_turn == 0
          update_phase2_escape
          $game_temp.battle_turn = 1
          for battler in $game_party.actors
            battler.at -= @max / 2
          end
          return
        end
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        @escape = true
        for battler in $game_party.actors
          @command_a = false
          @command.delete(battler)
          @action_battlers.delete(battler)
          skill_reset(battler)
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
  #--------------------------------------------------------------------------
  def start_phase5
    # ƒtƒF[ƒY 5 ‚Ɉڍs
    @phase = 5
    # ƒoƒgƒ‹I—¹ ME ‚ð‰‰‘t
    $game_system.me_play($game_system.battle_end_me)
    # ƒoƒgƒ‹ŠJŽn‘O‚Ì BGM ‚É–ß‚·
    $game_system.bgm_play($game_temp.map_bgm)
    # EXPAƒS[ƒ‹ƒhAƒgƒŒƒWƒƒ[‚ð‰Šú‰»
    exp = 0
    gold = 0
    treasures = []
    if @active_actor != nil
      @active_actor.blink = false
    end
    # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒZƒbƒg
    $game_temp.battle_main_phase = true
    # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
    @party_command_window.active = false
    @party_command_window.visible = false
    # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
    @actor_command_window.active = false
    @actor_command_window.visible = false
    if @skill_window != nil
      # ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
      @skill_window.dispose
      @skill_window = nil
    end
    if @item_window != nil
      # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
      @item_window.dispose
      @item_window = nil
    end
    # ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ð‰B‚·
    @help_window.visible = false
    # ƒ‹[ƒv
    for enemy in $game_troop.enemies
      # ƒGƒlƒ~[‚ª‰B‚êó‘ԂłȂ¢ê‡
      unless enemy.hidden
        # Šl“Ÿ EXPAƒS[ƒ‹ƒh‚ð’ljÁ
        exp += enemy.exp
        gold += enemy.gold
        # ƒgƒŒƒWƒƒ[oŒ»”»’è
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    # ƒgƒŒƒWƒƒ[‚̐”‚ð 6 ŒÂ‚܂łɌÀ’è
    treasures = treasures[0..5]
    # EXP Šl“Ÿ
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
          actor.damage[[actor, -1]] = "Level up!"
          actor.up_level = actor.level - last_level
        end
      end
    end
    # ƒS[ƒ‹ƒhŠl“Ÿ
    $game_party.gain_gold(gold)
    # ƒgƒŒƒWƒƒ[Šl“Ÿ
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    # ƒoƒgƒ‹ƒŠƒUƒ‹ƒgƒEƒBƒ“ƒhƒE‚ðì¬
    @result_window = Window_BattleResult.new(exp, gold, treasures)
    # ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ðÝ’è
    @phase5_wait_count = 100
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒY)
  #--------------------------------------------------------------------------
  def update_phase5
    # ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ª 0 ‚æ‚è‘å‚«‚¢ê‡
    if @phase5_wait_count > 0
      # ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ðŒž‚ç‚·
      @phase5_wait_count -= 1
      # ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ª 0 ‚ɂȂÁ‚œê‡
      if @phase5_wait_count == 0
        # ƒŠƒUƒ‹ƒgƒEƒBƒ“ƒhƒE‚ð•\ŽŠ
        @result_window.visible = true
        # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒNƒŠƒA
        $game_temp.battle_main_phase = false
        # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒŠƒtƒŒƒbƒVƒ…
        @status_window.refresh
        for actor in $game_party.actors
          if actor.damage.include?([actor, 0])
            @phase5_wait_count = 20
            actor.damage_pop[[actor, 0]] = true
          end
          if actor.damage.include?([actor, -1])
            @phase5_wait_count = 20
            actor.damage_pop[[actor, -1]] = true
            for level in actor.level - actor.up_level + 1..actor.level
              for skill in $data_classes[actor.class_id].learnings
                if level == skill.level and not actor.skill_learn?(skill.id)
                  actor.damage[[actor, 0]] = "New Skill!"
                  break
                end
              end
            end
          end
        end
      end
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::C)
      # ƒoƒgƒ‹I—¹
      battle_end(0)
    end
  end

#==============================================================================
# ¡ Scene_Battle (•ªŠ„’è‹` 3)
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹‰æ–ʂ̏ˆ—‚ðs‚€ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

  #--------------------------------------------------------------------------
  # œ ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒYŠJŽn
  #--------------------------------------------------------------------------
  def start_phase3
    # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒNƒŠƒA
    $game_temp.battle_main_phase = false
    @command_a = true
    @active_actor = @command[0]
    cnt = 0
    for actor in $game_party.actors
      if actor == @active_actor
        @actor_index = cnt
      end
      cnt += 1
    end
    @active_actor.blink = true
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      phase3_next_actor
      return
    end
    phase3_setup_command_window
    # ƒJƒƒ‰‚̐ݒè
    @camera = "command"
    plus = ($game_party.actors.size - 1) / 2.0 - @actor_index
    y = [(plus.abs - 1.5) * 10 , 0].min
    @spriteset.screen_target(plus * 50, y, 1.0 + y * 0.002)
  end
  #--------------------------------------------------------------------------
  # œ ƒAƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—͏I—¹
  #--------------------------------------------------------------------------
  def phase3_next_actor
    @command.shift
    @command_a = false
    # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒZƒbƒg
    $game_temp.battle_main_phase = true
    # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # ƒAƒNƒ^[‚Ì–Ÿ–ŃGƒtƒFƒNƒg OFF
    if @active_actor != nil
      @active_actor.blink = false
    end
    action_start(@active_actor)
    # ƒJƒƒ‰‚ðŒ³‚É–ß‚·
    if @camera == "command"
      @spriteset.screen_target(0, 0, 1)
    end
    return
  end
  #--------------------------------------------------------------------------
  # œ ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃ZƒbƒgƒAƒbƒv
  #--------------------------------------------------------------------------
  def phase3_setup_command_window
    # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
    @party_command_window.active = false
    @party_command_window.visible = false
    # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ð—LŒø‰»
    @actor_command_window.active = true
    @actor_command_window.visible = true
    # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̈ʒu‚ðÝ’è
    @actor_command_window.x = @actor_index * 160 +
                              (4 - $game_party.actors.size) * 80
    # ƒCƒ“ƒfƒbƒNƒX‚ð 0 ‚ɐݒè
    @actor_command_window.index = 0
  end
  #--------------------------------------------------------------------------
  # œ ƒGƒlƒ~[ƒAƒNƒVƒ‡ƒ“ì¬
  #--------------------------------------------------------------------------
  def enemy_action(number)
    enemy = $game_troop.enemies[number]
    unless enemy.current_action.forcing
      enemy.make_action
    end
    action_start(enemy)
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY : Šî–{ƒRƒ}ƒ“ƒh)
  #--------------------------------------------------------------------------
  def update_phase3_basic_command
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      phase3_next_actor
      return
    end
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::B) and @party == false
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      @party = true
    end
    if @party == true and
        ((@action > 0 and @action_battlers.empty?) or (@action == 0 and 
        (@action_battlers.empty? or @action_battlers[0].phase == 1)))
      # ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF[ƒY‚Ö
      start_phase2
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::C)
      @party = false
      # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
      case @actor_command_window.index
      when 0  # UŒ‚
        if victory?
          # ƒuƒU[ SE ‚ð‰‰‘t
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒGƒlƒ~[‚Ì‘I‘ð‚ðŠJŽn
        start_enemy_select
      when 1  # ƒXƒLƒ‹
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒXƒLƒ‹‚Ì‘I‘ð‚ðŠJŽn
        start_skill_select
      when 2  # –hŒä
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒAƒNƒVƒ‡ƒ“‚ðÝ’è
        @active_actor.current_action.kind = 0
        @active_actor.current_action.basic = 1
        # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
        phase3_next_actor
      when 3  # ƒAƒCƒeƒ€
        # Œˆ’è SE ‚ð‰‰‘t
        $game_system.se_play($data_system.decision_se)
        # ƒAƒCƒeƒ€‚Ì‘I‘ð‚ðŠJŽn
        start_item_select
      end
      return
    end
    # R ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @party = false
      # ƒAƒNƒ^[‚Ì–Ÿ–ŃGƒtƒFƒNƒg OFF
      if @active_actor != nil
        @active_actor.blink = false
      end
      @command.push(@command[0])
      @command.shift
      @command_a = false
      # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒZƒbƒg
      $game_temp.battle_main_phase = true
      # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
      @actor_command_window.active = false
      @actor_command_window.visible = false
    end
    # L ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @party = false
      # ƒAƒNƒ^[‚Ì–Ÿ–ŃGƒtƒFƒNƒg OFF
      if @active_actor != nil
        @active_actor.blink = false
      end
      @command.unshift(@command[@command.size - 1])
      @command.delete_at(@command.size - 1)
      @command_a = false
      # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒZƒbƒg
      $game_temp.battle_main_phase = true
      # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
      @actor_command_window.active = false
      @actor_command_window.visible = false
    end
    # ‰E ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @party = false
      # ƒAƒNƒ^[‚Ì–Ÿ–ŃGƒtƒFƒNƒg OFF
      if @active_actor != nil
        @active_actor.blink = false
      end
      actor = $game_party.actors[@actor_index]
      while actor == @command[0] or (not @command.include?(actor))
        @actor_index += 1
        @actor_index %= $game_party.actors.size
        actor = $game_party.actors[@actor_index]
        if actor == @command[0]
          break
        end
      end
      while actor != @command[0]
        @command.push(@command.shift)
      end
      @command_a = false
      # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒZƒbƒg
      $game_temp.battle_main_phase = true
      # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
      @actor_command_window.active = false
      @actor_command_window.visible = false
    end
    # ¶ ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @party = false
      # ƒAƒNƒ^[‚Ì–Ÿ–ŃGƒtƒFƒNƒg OFF
      if @active_actor != nil
        @active_actor.blink = false
      end
      actor = $game_party.actors[@actor_index]
      while actor == @command[0] or (not @command.include?(actor))
        @actor_index -= 1
        @actor_index %= $game_party.actors.size
        actor = $game_party.actors[@actor_index]
        if actor == @command[0]
          break
        end
      end
      while actor != @command[0]
        @command.push(@command.shift)
      end
      @command_a = false
      # ƒƒCƒ“ƒtƒF[ƒYƒtƒ‰ƒO‚ðƒZƒbƒg
      $game_temp.battle_main_phase = true
      # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
      @actor_command_window.active = false
      @actor_command_window.visible = false
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY : ƒXƒLƒ‹‘I‘ð)
  #--------------------------------------------------------------------------
  def update_phase3_skill_select
    # ƒRƒ}ƒ“ƒh‘I‘𒆂ɍs“®•s”\‚ɂȂÁ‚œê‡
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
      phase3_next_actor
      return
    end
    # ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ð‰ÂŽ‹ó‘Ô‚É‚·‚é
    @skill_window.visible = true
    # ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ðXV
    @skill_window.update
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒXƒLƒ‹‚Ì‘I‘ð‚ðI—¹
      end_skill_select
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::C)
      # ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ÅŒ»Ý‘I‘ð‚³‚ê‚Ä‚¢‚éƒf[ƒ^‚ðŽæ“Ÿ
      @skill = @skill_window.skill
      # Žg—p‚Å‚«‚È‚¢ê‡
      if @skill == nil or not @active_actor.skill_can_use?(@skill.id)
        # ƒuƒU[ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @skill.scope == 1 or @skill.scope == 2
        if victory?
          # ƒuƒU[ SE ‚ð‰‰‘t
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      end        
      # Œˆ’è SE ‚ð‰‰‘t
      $game_system.se_play($data_system.decision_se)
      # ƒAƒNƒVƒ‡ƒ“‚ðÝ’è
      @active_actor.current_action.skill_id = @skill.id
      # ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ð•s‰ÂŽ‹ó‘Ô‚É‚·‚é
      @skill_window.visible = false
      # Œø‰Ê”͈͂ª“G’P‘̂̏ꍇ
      if @skill.scope == 1
        # ƒGƒlƒ~[‚Ì‘I‘ð‚ðŠJŽn
        start_enemy_select
      # Œø‰Ê”͈͂ª–¡•û’P‘̂̏ꍇ
      elsif @skill.scope == 3 or @skill.scope == 5
        # ƒAƒNƒ^[‚Ì‘I‘ð‚ðŠJŽn
        start_actor_select
      # Œø‰Ê”͈͂ª’P‘̂ł͂Ȃ¢ê‡
      else
        # ƒAƒNƒVƒ‡ƒ“‚ðÝ’è
        @active_actor.current_action.kind = 1
        # ƒXƒLƒ‹‚Ì‘I‘ð‚ðI—¹
        end_skill_select
        # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY : ƒAƒCƒeƒ€‘I‘ð)
  #--------------------------------------------------------------------------
  def update_phase3_item_select
    # ƒRƒ}ƒ“ƒh‘I‘𒆂ɍs“®•s”\‚ɂȂÁ‚œê‡
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
      phase3_next_actor
      return
    end
    # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ð‰ÂŽ‹ó‘Ô‚É‚·‚é
    @item_window.visible = true
    # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ðXV
    @item_window.update
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒAƒCƒeƒ€‚Ì‘I‘ð‚ðI—¹
      end_item_select
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::C)
      # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ÅŒ»Ý‘I‘ð‚³‚ê‚Ä‚¢‚éƒf[ƒ^‚ðŽæ“Ÿ
      @item = @item_window.item
      # Žg—p‚Å‚«‚È‚¢ê‡
      unless $game_party.item_can_use?(@item.id)
        # ƒuƒU[ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @item.scope == 1 or @item.scope == 2
        if victory?
          # ƒuƒU[ SE ‚ð‰‰‘t
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      end
      # Œˆ’è SE ‚ð‰‰‘t
      $game_system.se_play($data_system.decision_se)
      # ƒAƒNƒVƒ‡ƒ“‚ðÝ’è
      @active_actor.current_action.item_id = @item.id
      # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ð•s‰ÂŽ‹ó‘Ô‚É‚·‚é
      @item_window.visible = false
      # Œø‰Ê”͈͂ª“G’P‘̂̏ꍇ
      if @item.scope == 1
        # ƒGƒlƒ~[‚Ì‘I‘ð‚ðŠJŽn
        start_enemy_select
      # Œø‰Ê”͈͂ª–¡•û’P‘̂̏ꍇ
      elsif @item.scope == 3 or @item.scope == 5
        # ƒAƒNƒ^[‚Ì‘I‘ð‚ðŠJŽn
        start_actor_select
      # Œø‰Ê”͈͂ª’P‘̂ł͂Ȃ¢ê‡
      else
        # ƒAƒNƒVƒ‡ƒ“‚ðÝ’è
        @active_actor.current_action.kind = 2
        # ƒAƒCƒeƒ€‚Ì‘I‘ð‚ðI—¹
        end_item_select
        # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY : ƒGƒlƒ~[‘I‘ð)
  #--------------------------------------------------------------------------
  def update_phase3_enemy_select
    if victory?
      # ƒJƒƒ‰‚ðŒ³‚É–ß‚·
      if @camera == "select"
        @spriteset.screen_target(0, 0, 1)
      end
      # ƒGƒlƒ~[‚Ì‘I‘ð‚ðI—¹
      end_enemy_select
      return
    end
    # ƒRƒ}ƒ“ƒh‘I‘𒆂ɍs“®•s”\‚ɂȂÁ‚œê‡
    unless @active_actor.inputable?
      # ƒJƒƒ‰‚ðŒ³‚É–ß‚·
      if @camera == "select"
        @spriteset.screen_target(0, 0, 1)
      end
      @active_actor.current_action.clear
      command_delete
      # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
      phase3_next_actor
      return
    end
    # ƒGƒlƒ~[ƒAƒ[‚ðXV
    @enemy_arrow.update
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒJƒƒ‰‚ðŒ³‚É–ß‚·
      if @camera == "select"
        # ƒJƒƒ‰‚̐ݒè
        @camera = "command"
        plus = ($game_party.actors.size - 1) / 2.0 - @actor_index
        y = [(plus.abs - 1.5) * 10 , 0].min
        @spriteset.screen_target(plus * 50, y, 1.0 + y * 0.002)
      end
      # ƒGƒlƒ~[‚Ì‘I‘ð‚ðI—¹
      end_enemy_select
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::C)
      # Œˆ’è SE ‚ð‰‰‘t
      $game_system.se_play($data_system.decision_se)
      # ƒAƒNƒVƒ‡ƒ“‚ðÝ’è
      @active_actor.current_action.kind = 0
      @active_actor.current_action.basic = 0
      @active_actor.current_action.target_index = @enemy_arrow.index
      # ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE•\ŽŠ’†‚̏ꍇ
      if @skill_window != nil
        # ƒAƒNƒVƒ‡ƒ“‚ðÄÝ’è
        @active_actor.current_action.kind = 1
        # ƒXƒLƒ‹‚Ì‘I‘ð‚ðI—¹
        end_skill_select
      end
      # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE•\ŽŠ’†‚̏ꍇ
      if @item_window != nil
        # ƒAƒNƒVƒ‡ƒ“‚ðÄÝ’è
        @active_actor.current_action.kind = 2
        # ƒAƒCƒeƒ€‚Ì‘I‘ð‚ðI—¹
        end_item_select
      end
      # ƒGƒlƒ~[‚Ì‘I‘ð‚ðI—¹
      end_enemy_select
      # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY : ƒAƒNƒ^[‘I‘ð)
  #--------------------------------------------------------------------------
  def update_phase3_actor_select
    # ƒRƒ}ƒ“ƒh‘I‘𒆂ɍs“®•s”\‚ɂȂÁ‚œê‡
    unless @active_actor.inputable?
      @active_actor.current_action.clear
      command_delete
      # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
      phase3_next_actor
      return
    end
    # ƒAƒNƒ^[ƒAƒ[‚ðXV
    @actor_arrow.update
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒAƒNƒ^[‚Ì‘I‘ð‚ðI—¹
      end_actor_select
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂜê‡
    if Input.trigger?(Input::C)
      # Œˆ’è SE ‚ð‰‰‘t
      $game_system.se_play($data_system.decision_se)
      # ƒAƒNƒVƒ‡ƒ“‚ðÝ’è
      @active_actor.current_action.kind = 0
      @active_actor.current_action.basic = 0
      @active_actor.current_action.target_index = @actor_arrow.index
      # ƒAƒNƒ^[‚Ì‘I‘ð‚ðI—¹
      end_actor_select
      # ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE•\ŽŠ’†‚̏ꍇ
      if @skill_window != nil
        # ƒAƒNƒVƒ‡ƒ“‚ðÄÝ’è
        @active_actor.current_action.kind = 1
        # ƒXƒLƒ‹‚Ì‘I‘ð‚ðI—¹
        end_skill_select
      end
      # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE•\ŽŠ’†‚̏ꍇ
      if @item_window != nil
        # ƒAƒNƒVƒ‡ƒ“‚ðÄÝ’è
        @active_actor.current_action.kind = 2
        # ƒAƒCƒeƒ€‚Ì‘I‘ð‚ðI—¹
        end_item_select
      end
      # ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒGƒlƒ~[‘I‘ðŠJŽn
  #--------------------------------------------------------------------------
  alias :start_enemy_select_rtab :start_enemy_select
  def start_enemy_select
    @camera = "select"
    for enemy in $game_troop.enemies
      if enemy.exist?
        zoom = 1 / enemy.zoom
        @spriteset.screen_target(enemy.attack_x(zoom) * 0.75,
                                  enemy.attack_y(zoom) * 0.75, zoom)
        break
      end
    end
    # ƒIƒŠƒWƒiƒ‹‚̏ˆ—
    start_enemy_select_rtab
  end
  #--------------------------------------------------------------------------
  # œ ƒGƒlƒ~[‘I‘ðI—¹
  #--------------------------------------------------------------------------
  alias :end_enemy_select_rtab :end_enemy_select
  def end_enemy_select
    # ƒIƒŠƒWƒiƒ‹‚̏ˆ—
    end_enemy_select_rtab
    if (@action == 0 and not @action_battlers.empty?) or
          (@camera == "select" and (@active_actor.current_action.kind != 0 or
                                            @active_actor.animation1_id != 0))
      @spriteset.screen_target(0, 0, 1)
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒXƒLƒ‹‘I‘ðŠJŽn
  #--------------------------------------------------------------------------
  def start_skill_select
    # ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ðì¬
    @skill_window = Window_Skill.new(@active_actor)
    # ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ðŠÖ˜A•t‚¯
    @skill_window.help_window = @help_window
    # ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚𖳌ø‰»
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end

#==============================================================================
# ¡ Scene_Battle (•ªŠ„’è‹` 4)
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹‰æ–ʂ̏ˆ—‚ðs‚€ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

  #--------------------------------------------------------------------------
  # œ ƒƒCƒ“ƒtƒF[ƒYŠJŽn
  #--------------------------------------------------------------------------
  def start_phase4
    $game_temp.battle_main_phase = true
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY)
  #--------------------------------------------------------------------------
  def update_phase4
    # ƒAƒNƒVƒ‡ƒ“‚ð‹­§‚³‚ê‚Ä‚¢‚éƒoƒgƒ‰[‚ª‘¶Ý‚·‚éê‡
    if $game_temp.forcing_battler != nil
      battler = $game_temp.forcing_battler
      if battler.current_action.forcing == false
        if @action_battlers.include?(battler)
          if @action > 0 or @action_battlers[0].phase == 1
            @action_battlers.delete(battler)
            @action_battlers.push(battler)
          end
          if battler.phase == 1 
            battler.current_action.forcing = true
            force_action(battler)
          end
        else
          battler.current_action.forcing = true
          force_action(battler)
          action_start(battler)
          @action_battlers.delete(battler)
          @action_battlers.push(battler)
        end
        battler.at = @max
        battler.atp = 100 * battler.at / @max
      end
    end
    # action ‚ª1ˆÈã‚̏ꍇAˆêÄ‚ɍs“®‚ð‹N‚±‚·
    for battler in @action_battlers.reverse
      # ƒEƒFƒCƒg’†‚̏ꍇ
      if battler.wait > 0
        # ƒEƒFƒCƒgƒJƒEƒ“ƒg‚ðŒž‚ç‚·
        battler.wait -= 1
        break if @action == 0
        next
      end
      unless fin? and battler.phase < 3 and
          not $game_system.battle_interpreter.running?
        action_phase(battler)
      end
      break if @action == 0
    end
    # ƒAƒNƒVƒ‡ƒ“‚ð‹­§‚³‚ê‚Ä‚¢‚éƒoƒgƒ‰[‚ª‘¶Ý‚µ‚È‚¢ê‡
    if $game_temp.forcing_battler == nil
      # ƒoƒgƒ‹ƒCƒxƒ“ƒg‚ðƒZƒbƒgƒAƒbƒv
      setup_battle_event
      # ƒoƒgƒ‹ƒCƒxƒ“ƒgŽÀs’†‚̏ꍇ
      if $game_system.battle_interpreter.running?
        return
      end
    end
    for battler in @action_battlers.reverse
      if fin? and battler.phase < 3 and 
          not $game_system.battle_interpreter.running?
        # í“¬‚ªI—¹‚µA‚©‚ƒAƒNƒ^[‚ªs“®’Œ‘O‚̏ꍇ‚̓AƒNƒ^[‚̍s“®‚ðÁ‹Ž
        @action_battlers.delete(battler)
      end
    end
    if @action_battlers.empty? and not $game_system.battle_interpreter.running?
      # Ÿ”s”»’è
      judge
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒAƒNƒVƒ‡ƒ“XV (ƒƒCƒ“ƒtƒF[ƒY)
  #--------------------------------------------------------------------------
  def action_phase(battler)
    # action ‚ª 1 ‚̏ꍇAƒoƒgƒ‰[‚ªs“®’†‚©‚Ç‚€‚©Šm”F
    if @action == 1 and battler.phase < 3
      for target in battler.target
        speller = synthe?(target)
        if speller == nil
     		
Par Cid6
Ecrire un commentaire - Voir les 5 commentaires - Recommander
Vendredi 1 juillet 2005
Grâce à ces petits scripts, on va pouvoir faire en sorte que quand l'on appuie sur le bouton X, l'équipement dans le slot selectionné soit optimisé et que quand on appuie sur Y, tout l'équipement sera optimisé. Pour ceux qui n'ont jamais joué aux anciens FF (Oh Mon Dieu lol) Optimiser ici signifie remplacer l'équipement actuel par le meilleur, c'est le personnage qui s'équipe immédiatement des meilleurs équipements. C'est configurable.

Bon alors, au début de Scene_Equip, ligne 8 si je ne m'abuse apres "class Scene_Equip" rajoutez ceci :

Citation:
# -------------------------
WEAPON_ATK_WEIGHT = 1.0
WEAPON_PDF_WEIGHT = 0.0
WEAPON_MDF_WEIGHT = 0.0
WEAPON_STR_WEIGHT = 0.0
WEAPON_DEX_WEIGHT = 0.0
WEAPON_AGI_WEIGHT = 0.0
WEAPON_INT_WEIGHT = 0.0
ARMOR_EVA_WEIGHT = 0.0
ARMOR_PDF_WEIGHT = 0.75
ARMOR_MDF_WEIGHT = 0.25
ARMOR_STR_WEIGHT = 0.0
ARMOR_DEX_WEIGHT = 0.0
ARMOR_AGI_WEIGHT = 0.0
ARMOR_INT_WEIGHT = 0.0
NO_ACCESSORY_OPTIMIZATION = false


Si vous voulez que les accessoires ne soient pas les sujets d'optimisation remplacer false par true dans la derniere ligne de code si dessus.

ligne 256 la ou y'a "def update_right", et remplacez tout ce code jusqu'à la ligne 303 "end" par ce code ci :

Citation:
def update_right
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(2)
return
end
if Input.trigger?(Input::C)
if @actor.equip_fix?(@right_window.index)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
@right_window.active = false
@item_window.active = true
@item_window.index = 0
return
end
if Input.trigger?(Input::X)
$game_system.se_play($data_system.decision_se)
optimize(@right_window.index)
@left_window.refresh
@right_window.refresh
@item_window1.refresh
@item_window2.refresh
@item_window3.refresh
@item_window4.refresh
@item_window5.refresh
return
end
if Input.trigger?(Input::Y)
$game_system.se_play($data_system.decision_se)
optimize(0)

optimize(1)
optimize(2)
optimize(3)
optimize(4)
@left_window.refresh
@right_window.refresh
@item_window1.refresh
@item_window2.refresh
@item_window3.refresh
@item_window4.refresh
@item_window5.refresh
return
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1

@actor_index %= $game_party.actors.size
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
end


Juste apres le script précédent, ou n'importe ou apres la fin d'un "def", rajoutez le code suivant :

Citation:
def optimize(slot)
if slot == 0
object = $data_weapons[@actor.weapon_id]
optimal = object.id
current = 0.00
if @actor.weapon_id != 0
current += object.atk * WEAPON_ATK_WEIGHT
current += object.pdef * WEAPON_PDF_WEIGHT
current += object.mdef * WEAPON_MDF_WEIGHT
current += object.str_plus * WEAPON_STR_WEIGHT
current += object.dex_plus * WEAPON_DEX_WEIGHT
current += object.agi_plus * WEAPON_AGI_WEIGHT
current += object.int_plus * WEAPON_INT_WEIGHT
else
optimal = 0
end
max_eval = current
@actor.equip(0, 0)
flag = false
zero_flag = true
for weapon in $data_weapons
if !flag
flag = true
next
end
evaluation = 0.00
evaluation += weapon.atk * WEAPON_ATK_WEIGHT
evaluation += weapon.pdef * WEAPON_PDF_WEIGHT
evaluation += weapon.mdef * WEAPON_MDF_WEIGHT
evaluation += weapon.str_plus * WEAPON_STR_WEIGHT
evaluation += weapon.dex_plus * WEAPON_DEX_WEIGHT
evaluation += weapon.agi_plus * WEAPON_AGI_WEIGHT
evaluation += weapon.int_plus * WEAPON_INT_WEIGHT
if evaluation > 0
zero_flag = false
end
if @actor.equippable?(weapon) &&
$game_party.weapon_number(weapon.id) > 0 && evaluation > max_eval
max_eval = evaluation
optimal = weapon.id
end
end
if zero_flag
optimal = 0
end
@actor.equip(0, optimal)
#------------------------UNIQUEMENT SI VOUS AVEZ LE SCRIPT "Epée à deux mains"
TWO_HANDED_WEAPON
if $game_system.two_handed_weapons.include?(optimal)
@actor.equip(1, 0)
end
#------------------------FIN
end
if slot >= 1
not_equipped = false
case slot
when 1
#------------------------UNIQUEMENT SI VOUS AVEZ LE SCRIPT "Epée à deux mains"
TWO_HANDED_WEAPON
if $game_system.two_handed_weapons.include?(@actor.weapon_id)
return
end
#------------------------FIN
if @actor.armor1_id == 0
not_equipped = true
else
object = $data_armors[@actor.armor1_id]
end
when 2
if @actor.armor2_id == 0
not_equipped = true
else
object = $data_armors[@actor.armor2_id]
end
when 3
if @actor.armor3_id == 0
not_equipped = true
else
object = $data_armors[@actor.armor3_id]
end
when 4
if NO_ACCESSORY_OPTIMIZATION
return
end
if @actor.armor4_id == 0
not_equipped = true
else
object = $data_armors[@actor.armor4_id]
end
end
optimal = object.id
current = 0.00
if not_equipped = false
current += object.eva * ARMOR_EVA_WEIGHT
current += object.pdef * ARMOR_PDF_WEIGHT
current += object.mdef * ARMOR_MDF_WEIGHT
current += object.str_plus * ARMOR_STR_WEIGHT
current += object.dex_plus * ARMOR_DEX_WEIGHT
current += object.agi_plus * ARMOR_AGI_WEIGHT
current += object.int_plus * ARMOR_INT_WEIGHT
else
optimal = 0
end
max_eval = current
@actor.equip(slot, 0)
flag = false
zero_flag = true
for armor in $data_armors
if !flag
flag = true
next
end
if armor.kind != slot-1
next
end
evaluation = 0.00
evaluation += armor.eva * ARMOR_EVA_WEIGHT
evaluation += armor.pdef * ARMOR_PDF_WEIGHT
evaluation += armor.mdef * ARMOR_MDF_WEIGHT
evaluation += armor.str_plus * ARMOR_STR_WEIGHT
evaluation += armor.dex_plus * ARMOR_DEX_WEIGHT
evaluation += armor.agi_plus * ARMOR_AGI_WEIGHT
evaluation += armor.int_plus * ARMOR_INT_WEIGHT
if evaluation > 0
zero_flag = false
end
if @actor.equippable?(armor) &&
$game_party.armor_number(armor.id) > 0 && evaluation > max_eval
max_eval = evaluation
optimal = armor.id
end
end
if zero_flag
optimal = 0
end
@actor.equip(slot, optimal)
end
end


Attention s'il vous plait, si vous n'avez pas le script "Epée à deux mains" Supprimez les codes concernés dans le script ci-dessus. Bonne optimisation des équipements
Par Cid6
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Vendredi 1 juillet 2005

Ce script permet de créer un objet qui donne la possiblité de voir le nombre de HP des ennemis si l'on en est équipé 


Tout d'abord, vous devez créer l'item que j'ai appellé 'Anneau Analyse' (vous pouvez mettre autre chose). Il est évident qu'il faut que ce soit une arme ou un équipement de protection et non un objet comme une potion(dans mon cas c'est un accessoire). Comme caractéristique de l'item, vous mettez ce que vous voulez.
Ensuite, allez dans l'éditeur de script et prenez le 'Scene_Battle 1' et regarder le code ci-dessous

Citation:
def main
# 戦闘用の各種一時データを初期化
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
# バトルイベント用インタプリタを初期化
$game_system.battle_interpreter.setup(nil, 0)
# トループを準備
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
# アクターコマンドウィンドウを作成
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
# その他のウィンドウを作成
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
# スプライトセットを作成
@spriteset = Spriteset_Battle.new
# ウェイトカウントを初期化
@wait_count = 0
# トランジション実行
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
# プレバトルフェーズ開始
start_phase1
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# マップをリフレッシュ
$game_map.refresh
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
# スプライトセットを解放
@spriteset.dispose
# タイトル画面に切り替え中の場合
if $scene.is_a?(Scene_Title)
# 画面をフェードアウト
Graphics.transition
Graphics.freeze
end
# 戦闘テストからゲームオーバー画面以外に切り替え中の場合
if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end

Et remplacez-le par celui ci

Citation:
def main
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
$game_system.battle_interpreter.setup(nil, 0)
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)

s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
@spriteset = Spriteset_Battle.new

@wait_count = 0

found = false
for i in 0...$game_party.actors.size
if $data_armors[$game_party.actors[i].armor4_id] != nil
armor = $data_armors[$game_party.actors[i].armor4_id].name
end
# Changer le nom "Anneau Analyse" par le nom que vous avez donnez à l'item
if armor == "Anneau Analyse" and found == false
@help_window.scan = true
found = true
elsif armor != "Anneau Analyse" and found == false
@help_window.scan =false
end
end

if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end

start_phase1

loop do
Graphics.update
Input.update
update

if $scene != self
break
end
end

$game_map.refresh
Graphics.freeze
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
@spriteset.dispose

if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end

if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end




ps : à la ligne 48 et 51, changer le nom "Anneau Analyse" par le nom que vous avez donner à votre objet.

Ensuite, allez dans le script 'Window_Help' et remplacer tout le code par celui-ci

Citation:
class Window_Help < Window_Base
attr_accessor :scan
#---------------------------
# Object initialization
#---------------------------
def initialize
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font = Font.new("Arial")
@scan = false
end
#---------------------------
# Text creation
# text : Text to display.
# align : Alignment (0: Left - 1: Center - 2: Right)
#---------------------------
def set_text(text, align = 0)
if text != @text or align != @align
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#---------------------------
# Actor text creation
# actor : Displays status of this actor
#---------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#---------------------------
# Enemy text creation
# enemy : Displays status of this enemy
#---------------------------
def set_enemy(enemy)
text = enemy.name
if @scan == true
text+= " - HP: " + enemy.hp.to_s
end
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += " - Status: " + state_text
end
set_text(text, 1)
end
end


Quand l'un de vos persos sera équipé de l'objet en question, lors d'un combat, quand vous sélectionnerez un ennemi, son nom sera suivit du nombre de PV qu'il possède et ensuite, qui lui restera.

Par Cid6
Ecrire un commentaire - Voir les 1 commentaires - Recommander
Vendredi 1 juillet 2005
Avec ce tuto, vous pourrez créer une magie qui absorbe les PV des ennemis.

Dans le script 'Game_Temp', juste au dessus de attr_accessor :map_bgm (ligne 12), collez le code suivant :

Citation:
attr_accessor :damage_hook


Dans le même script, en dessous de def initialize (ligne 61), collez le code suivant :

Citation:
@damage_hook = 0


Dans le script 'Game_Battler3', en dessous de (ligne 198) :

Citation:
unless $game_temp.in_battle
# ダメージに nil を設定
self.damage = nil
end


Collez le code suivant juste en dessous :

Citation:
if self.damage.is_a?(Numeric)
$game_temp.damage_hook += self.damage
end



Dans le script 'Scene_Battle1', juste en dessous de class Scene_Battle (début du script), collez le code suivant :

Citation:
attr_reader :active_battler



Dans le script 'Scene_Battle4', en dessous de def update_phase4_step1 (ligne 90), collez le code suivant :

Citation:
$game_temp.damage_hook = 0



Ensuite, vous devez créer un évènement commun sur Appel et appelez le script suivant :

Citation:
<> Script : absorb = $game_temp.damage_hook * -1
: : $scene.active_battler.damage = absorb
: : $scene.active_battler.damage_pop = true
: : $scene.active_battler.hp -= absorb
<>


Vous devez créer la compétence qui absorbera les PV et qui fera appel à l'évènement commun (option "Appelle un évènement commun").

Par Cid6
Ecrire un commentaire - Voir les 2 commentaires - Recommander
Vendredi 1 juillet 2005

1.Preparation

Ce script permet de rendre le background des combats comme la map ...

Ouvrez l'éditeur de scripts ...
Vous aurez alors deux choix :
- rendre le background comme la map avec les évènements pas affichés
- rendre le background comme la map mais avec les évènements



2.Script

Remplacez le script Spriteset_Battle par ça pour le premier choix :

#==============================================================================
# ■ Spriteset_Battle modifier par boushy
#------------------------------------------------------------------------------
#  バトル画面のスプライトをまとめたクラスです。このクラスは Scene_Battle クラ
# スの内部で使用されます。
#==============================================================================

class Spriteset_Battle# #--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :viewport1 # エネミー側のビューポート
attr_reader :viewport2 # アクター側のビューポート
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
# ビューポートを作成
@viewport1 = Viewport.new(0, 0, 640, 320)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport4 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 101
@viewport3.z = 200
@viewport4.z = 5000
# タイルマップを作成
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names[i]
@tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
# パノラマプレーンを作成
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
# フォグプレーンを作成
@fog = Plane.new(@viewport1)
@fog.z = 3000
# キャラクタースプライトを作成
@character_sprites = []
#for i in $game_map.events.keys.sort
#sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
#@character_sprites.push(sprite)
#end
#@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
# 天候を作成
@weather = RPG::Weather.new(@viewport1)
# ピクチャを作成
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end

# ビューポートを作成

# バトルバックスプライトを作成
#@battleback_sprite = Sprite.new(@viewport1)
# エネミースプライトを作成
@enemy_sprites = []
for enemy in $game_troop.enemies.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
# アクタースプライトを作成
@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
# 天候を作成
@weather = RPG::Weather.new(@viewport1)
# ピクチャスプライトを作成
@picture_sprites = []
for i in 51..100
@picture_sprites.push(Sprite_Picture.new(@viewport3,
$game_screen.pictures[i]))
end
# タイマースプライトを作成
@timer_sprite = Sprite_Timer.new
# フレーム更新
update
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
def dispose
# バトルバックビットマップが存在していたら解放
#if @battleback_sprite.bitmap != nil
#@battleback_sprite.bitmap.dispose
# end
# バトルバックスプライトを解放
#@battleback_sprite.dispose
# エネミースプライト、アクタースプライトを解放
for sprite in @enemy_sprites + @actor_sprites
sprite.dispose
end
# 天候を解放
@weather.dispose
# ピクチャスプライトを解放
for sprite in @picture_sprites
sprite.dispose
end
# タイマースプライトを解放
@timer_sprite.dispose
# ビューポートを解放
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
@viewport4.dispose
end
#--------------------------------------------------------------------------
# ● エフェクト表示中判定
#--------------------------------------------------------------------------
def effect?
# エフェクトが一つでも表示中なら true を返す
for sprite in @enemy_sprites + @actor_sprites
return true if sprite.effect?
end
return false
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# アクタースプライトの内容を更新 (アクターの入れ替えに対応)
@actor_sprites[0].battler = $game_party.actors[0]
@actor_sprites[1].battler = $game_party.actors[1]
@actor_sprites[2].battler = $game_party.actors[2]
@actor_sprites[3].battler = $game_party.actors[3]
# バトルバックのファイル名が現在のものと違う場合
#if @battleback_name != $game_temp.battleback_name
#@battleback_name = $game_temp.battleback_name
#if @battleback_sprite.bitmap != nil
#@battleback_sprite.bitmap.dispose
#end
#@battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
#@battleback_sprite.src_rect.set(0, 0, 640, 320)
#end
# バトラースプライトを更新
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
for sprite in @enemy_sprites + @actor_sprites
sprite.update
end
# 天候グラフィックを更新
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.update
# ピクチャスプライトを更新
for sprite in @picture_sprites
sprite.update
end
# タイマースプライトを更新
@timer_sprite.update
# 画面の色調とシェイク位置を設定
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# 画面のフラッシュ色を設定
@viewport4.color = $game_screen.flash_color
# ビューポートを更新
@viewport1.update
@viewport2.update
@viewport4.update
end
end



Ou par ça pour le deuxième choix :

#==============================================================================
# ■ Spriteset_Battle modifier par boushy
#------------------------------------------------------------------------------
#  バトル画面のスプライトをまとめたクラスです。このクラスは Scene_Battle クラ
# スの内部で使用されます。
#==============================================================================

class Spriteset_Battle# #--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :viewport1 # エネミー側のビューポート
attr_reader :viewport2 # アクター側のビューポート
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
# ビューポートを作成
@viewport1 = Viewport.new(0, 0, 640, 320)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport4 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 101
@viewport3.z = 200
@viewport4.z = 5000
# タイルマップを作成
@tilemap = Tilemap.new(@viewport1)
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
for i in 0..6
autotile_name = $game_map.autotile_names[i]
@tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
end
@tilemap.map_data = $game_map.data
@tilemap.priorities = $game_map.priorities
# パノラマプレーンを作成
@panorama = Plane.new(@viewport1)
@panorama.z = -1000
# フォグプレーンを作成
@fog = Plane.new(@viewport1)
@fog.z = 3000
# キャラクタースプライトを作成
@character_sprites = []
for i in $game_map.events.keys.sort
sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
@character_sprites.push(sprite)
end
@character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
# 天候を作成
@weather = RPG::Weather.new(@viewport1)
# ピクチャを作成
@picture_sprites = []
for i in 1..50
@picture_sprites.push(Sprite_Picture.new(@viewport2,
$game_screen.pictures[i]))
end

# ビューポートを作成

# バトルバックスプライトを作成
#@battleback_sprite = Sprite.new(@viewport1)
# エネミースプライトを作成
@enemy_sprites = []
for enemy in $game_troop.enemies.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
# アクタースプライトを作成
@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
# 天候を作成
@weather = RPG::Weather.new(@viewport1)
# ピクチャスプライトを作成
@picture_sprites = []
for i in 51..100
@picture_sprites.push(Sprite_Picture.new(@viewport3,
$game_screen.pictures[i]))
end
# タイマースプライトを作成
@timer_sprite = Sprite_Timer.new
# フレーム更新
update
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
def dispose
# バトルバックビットマップが存在していたら解放
#if @battleback_sprite.bitmap != nil
#@battleback_sprite.bitmap.dispose
# end
# バトルバックスプライトを解放
#@battleback_sprite.dispose
# エネミースプライト、アクタースプライトを解放
for sprite in @enemy_sprites + @actor_sprites
sprite.dispose
end
# 天候を解放
@weather.dispose
# ピクチャスプライトを解放
for sprite in @picture_sprites
sprite.dispose
end
# タイマースプライトを解放
@timer_sprite.dispose
# ビューポートを解放
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
@viewport4.dispose
end
#--------------------------------------------------------------------------
# ● エフェクト表示中判定
#--------------------------------------------------------------------------
def effect?
# エフェクトが一つでも表示中なら true を返す
for sprite in @enemy_sprites + @actor_sprites
return true if sprite.effect?
end
return false
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# アクタースプライトの内容を更新 (アクターの入れ替えに対応)
@actor_sprites[0].battler = $game_party.actors[0]
@actor_sprites[1].battler = $game_party.actors[1]
@actor_sprites[2].battler = $game_party.actors[2]
@actor_sprites[3].battler = $game_party.actors[3]
# バトルバックのファイル名が現在のものと違う場合
#if @battleback_name != $game_temp.battleback_name
#@battleback_name = $game_temp.battleback_name
#if @battleback_sprite.bitmap != nil
#@battleback_sprite.bitmap.dispose
#end
#@battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
#@battleback_sprite.src_rect.set(0, 0, 640, 320)
#end
# バトラースプライトを更新
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
for sprite in @enemy_sprites + @actor_sprites
sprite.update
end
# 天候グラフィックを更新
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.update
# ピクチャスプライトを更新
for sprite in @picture_sprites
sprite.update
end
# タイマースプライトを更新
@timer_sprite.update
# 画面の色調とシェイク位置を設定
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# 画面のフラッシュ色を設定
@viewport4.color = $game_screen.flash_color
# ビューポートを更新
@viewport1.update
@viewport2.update
@viewport4.update
end
end

Par Cid6
Ecrire un commentaire - Voir les 0 commentaires - Recommander

Info rapide

Booster-blog

Boosterblog.com : Echange de clics !

Images aléatoires

  • Photo-japan-expo-2009--34-.jpg

Recherche

Créer un blog sur over-blog.com - Contact - C.G.U. - Rémunération en droits d'auteur - Signaler un abus - Articles les plus commentés