Jump to content
Rpg²S Forum
  • 0

[richiesta]


Deyan
 Share

Question

17 answers to this question

Recommended Posts

  • 0

Grazie ma avevo fatto da solo xD scusate del disturbo...

 

cmq nn si potrebbe avere totalmente nn animato, cioè mi spiego meglio i pg devono essere fermi e devono essere quelli che hai come batle tipo i mostri capito???

Edited by Deyan

http://img49.imageshack.us/img49/3363/deyan2pq3.jpg

~La mia skeda in Dragon Ball RPG [+]

I miei ProgeTTi

 

Link to comment
Share on other sites

  • 0

Si penso di si.

Basta che nella grafica del personaggio metti tutte le pose uguali ^^

Il sistema cambierà pose, ma essendo tutte uguali...

http://img58.imageshack.us/img58/4264/newheavenhd2.jpg

 

Iscrivetevi alla nostra accademia di Rpgmaking, presto sarà piena di contenuti e lezioni su Mapping, Eventing, Pixel Art e Scrittura, a livelli bassi, medi e avanzati!

http://img185.imageshack.us/img185/4599/bannerua7.gif

Link to comment
Share on other sites

  • 0

ma tu vuoi quello che aveva fatto redz? perchè era così che si chiamava, il bs laterale dei poveri...

è questo:

screen: http://img397.imageshack.us/img397/6144/13fl.png

class Game_Actor < Game_Battler
 attr_reader   :name					 # ??
 attr_reader   :character_name		   # ?????? ?????
 attr_reader   :character_hue			# ?????? ??
 attr_reader   :class_id				 # ??? ID
 attr_reader   :weapon_id				# ?? ID
 attr_reader   :armor1_id				# ? ID
 attr_reader   :armor2_id				# ??? ID
 attr_reader   :armor3_id				# ??? ID
 attr_reader   :armor4_id				# ??? ID
 attr_reader   :level					# ???
 attr_reader   :exp					  # EXP
 attr_reader   :skills				   # ???
 def initialize(actor_id)
super()
setup(actor_id)
 end
 def setup(actor_id)
actor = $data_actors[actor_id]
@actor_id = actor_id
@name = actor.name
@character_name = actor.character_name
@character_hue = actor.character_hue
@battler_name = actor.battler_name
@battler_hue = actor.battler_hue
@class_id = actor.class_id
@weapon_id = actor.weapon_id
@armor1_id = actor.armor1_id
@armor2_id = actor.armor2_id
@armor3_id = actor.armor3_id
@armor4_id = actor.armor4_id
@level = actor.initial_level
@exp_list = Array.new(101)
make_exp_list
@exp = @exp_list[@level]
@skills = []
@hp = maxhp
@sp = maxsp
@states = []
@states_turn = {}
@maxhp_plus = 0
@maxsp_plus = 0
@str_plus = 0
@dex_plus = 0
@agi_plus = 0
@int_plus = 0
# ?????
for i in 1..@level
  for j in $data_classes[@class_id].learnings
	if j.level == i
	  learn_skill(j.skill_id)
	end
  end
end
# ??????????
update_auto_state(nil, $data_armors[@armor1_id])
update_auto_state(nil, $data_armors[@armor2_id])
update_auto_state(nil, $data_armors[@armor3_id])
update_auto_state(nil, $data_armors[@armor4_id])
 end
 def id
return @actor_id
 end
 def index
return $game_party.actors.index(self)
 end
 def make_exp_list
actor = $data_actors[@actor_id]
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 100.0
for i in 2..100
  if i > actor.final_level
	@exp_list[i] = 0
  else
	n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
	@exp_list[i] = @exp_list[i-1] + Integer(n)
  end
end
 end
 def element_rate(element_id)
# ???????????????
table = [0,200,150,100,50,0,-100]
result = table[$data_classes[@class_id].element_ranks[element_id]]
# ????????????????????
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
  armor = $data_armors[i]
  if armor != nil and armor.guard_element_set.include?(element_id)
	result /= 2
  end
end
# ??????????????????????
for i in @states
  if $data_states[i].guard_element_set.include?(element_id)
	result /= 2
  end
end
# ??????
return result
 end
 #--------------------------------------------------------------------------
 # ? ??????????
 #--------------------------------------------------------------------------
 def state_ranks
return $data_classes[@class_id].state_ranks
 end
 def state_guard?(state_id)
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
  armor = $data_armors[i]
  if armor != nil
	if armor.guard_state_set.include?(state_id)
	  return true
	end
  end
end
return false
 end
 def element_set
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.element_set : []
 end
 def plus_state_set
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.plus_state_set : []
 end
 def minus_state_set
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.minus_state_set : []
 end
 def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min
for i in @states
  n *= $data_states[i].maxhp_rate / 100.0
end
n = [[integer(n), 1].max, 9999].min
return n
 end
 def base_maxhp
return $data_actors[@actor_id].parameters[0, @level]
 end
 def base_maxsp
return $data_actors[@actor_id].parameters[1, @level]
 end
 def base_str
n = $data_actors[@actor_id].parameters[2, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.str_plus : 0
n += armor1 != nil ? armor1.str_plus : 0
n += armor2 != nil ? armor2.str_plus : 0
n += armor3 != nil ? armor3.str_plus : 0
n += armor4 != nil ? armor4.str_plus : 0
return [[n, 1].max, 999].min
 end
 def base_dex
n = $data_actors[@actor_id].parameters[3, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.dex_plus : 0
n += armor1 != nil ? armor1.dex_plus : 0
n += armor2 != nil ? armor2.dex_plus : 0
n += armor3 != nil ? armor3.dex_plus : 0
n += armor4 != nil ? armor4.dex_plus : 0
return [[n, 1].max, 999].min
 end
 def base_agi
n = $data_actors[@actor_id].parameters[4, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.agi_plus : 0
n += armor1 != nil ? armor1.agi_plus : 0
n += armor2 != nil ? armor2.agi_plus : 0
n += armor3 != nil ? armor3.agi_plus : 0
n += armor4 != nil ? armor4.agi_plus : 0
return [[n, 1].max, 999].min
 end
 def base_int
n = $data_actors[@actor_id].parameters[5, @level]
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.int_plus : 0
n += armor1 != nil ? armor1.int_plus : 0
n += armor2 != nil ? armor2.int_plus : 0
n += armor3 != nil ? armor3.int_plus : 0
n += armor4 != nil ? armor4.int_plus : 0
return [[n, 1].max, 999].min
 end
 def base_atk
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.atk : 0
 end
 def base_pdef
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
pdef1 = weapon != nil ? weapon.pdef : 0
pdef2 = armor1 != nil ? armor1.pdef : 0
pdef3 = armor2 != nil ? armor2.pdef : 0
pdef4 = armor3 != nil ? armor3.pdef : 0
pdef5 = armor4 != nil ? armor4.pdef : 0
return pdef1 + pdef2 + pdef3 + pdef4 + pdef5
 end
 def base_mdef
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
mdef1 = weapon != nil ? weapon.mdef : 0
mdef2 = armor1 != nil ? armor1.mdef : 0
mdef3 = armor2 != nil ? armor2.mdef : 0
mdef4 = armor3 != nil ? armor3.mdef : 0
mdef5 = armor4 != nil ? armor4.mdef : 0
return mdef1 + mdef2 + mdef3 + mdef4 + mdef5
 end
 def base_eva
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
eva1 = armor1 != nil ? armor1.eva : 0
eva2 = armor2 != nil ? armor2.eva : 0
eva3 = armor3 != nil ? armor3.eva : 0
eva4 = armor4 != nil ? armor4.eva : 0
return eva1 + eva2 + eva3 + eva4
 end
 def animation1_id
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.animation1_id : 0
 end
 def animation2_id
weapon = $data_weapons[@weapon_id]
return weapon != nil ? weapon.animation2_id : 0
 end
 def class_name
return $data_classes[@class_id].name
 end
 def exp_s
return @exp_list[@level+1] > 0 ? @exp.to_s : "-------"
 end
 def next_exp_s
return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "-------"
 end
 def next_rest_exp_s
return @exp_list[@level+1] > 0 ?
  (@exp_list[@level+1] - @exp).to_s : "-------"
 end
 def update_auto_state(old_armor, new_armor)
# ??????????????????
if old_armor != nil and old_armor.auto_state_id != 0
  remove_state(old_armor.auto_state_id, true)
end
# ???????????????????
if new_armor != nil and new_armor.auto_state_id != 0
  add_state(new_armor.auto_state_id, true)
end
 end
 def equip_fix?(equip_type)
case equip_type
when 0  # ??
  return $data_actors[@actor_id].weapon_fix
when 1  # ?
  return $data_actors[@actor_id].armor1_fix
when 2  # ?
  return $data_actors[@actor_id].armor2_fix
when 3  # ??
  return $data_actors[@actor_id].armor3_fix
when 4  # ???
  return $data_actors[@actor_id].armor4_fix
end
return false
 end
 def equip(equip_type, id)
case equip_type
when 0  # ??
  if id == 0 or $game_party.weapon_number(id) > 0
	$game_party.gain_weapon(@weapon_id, 1)
	@weapon_id = id
	$game_party.lose_weapon(id, 1)
  end
when 1  # ?
  if id == 0 or $game_party.armor_number(id) > 0
	update_auto_state($data_armors[@armor1_id], $data_armors[id])
	$game_party.gain_armor(@armor1_id, 1)
	@armor1_id = id
	$game_party.lose_armor(id, 1)
  end
when 2  # ?
  if id == 0 or $game_party.armor_number(id) > 0
	update_auto_state($data_armors[@armor2_id], $data_armors[id])
	$game_party.gain_armor(@armor2_id, 1)
	@armor2_id = id
	$game_party.lose_armor(id, 1)
  end
when 3  # ??
  if id == 0 or $game_party.armor_number(id) > 0
	update_auto_state($data_armors[@armor3_id], $data_armors[id])
	$game_party.gain_armor(@armor3_id, 1)
	@armor3_id = id
	$game_party.lose_armor(id, 1)
  end
when 4  # ???
  if id == 0 or $game_party.armor_number(id) > 0
	update_auto_state($data_armors[@armor4_id], $data_armors[id])
	$game_party.gain_armor(@armor4_id, 1)
	@armor4_id = id
	$game_party.lose_armor(id, 1)
  end
end
 end
 def equippable?(item)
# ?????
if item.is_a?(RPG::Weapon)
  # ???????????????????????
  if $data_classes[@class_id].weapon_set.include?(item.id)
	return true
  end
end
# ?????
if item.is_a?(RPG::Armor)
  # ???????????????????????
  if $data_classes[@class_id].armor_set.include?(item.id)
	return true
  end
end
return false
 end
 def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# ??????
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  @level += 1
  # ?????
  for j in $data_classes[@class_id].learnings
	if j.level == @level
	  learn_skill(j.skill_id)
	end
  end
end
# ??????
while @exp < @exp_list[@level]
  @level -= 1
end
# ??? HP ? SP ?????????????
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
 end
 def level=(level)
# ???????
level = [[level, $data_actors[@actor_id].final_level].min, 1].max
# EXP ???
self.exp = @exp_list[level]
 end
 def learn_skill(skill_id)
if skill_id > 0 and not skill_learn?(skill_id)
  @skills.push(skill_id)
  @skills.sort!
end
 end
 def forget_skill(skill_id)
@skills.delete(skill_id)
 end
 def skill_learn?(skill_id)
return @skills.include?(skill_id)
 end
 def skill_can_use?(skill_id)
if not skill_learn?(skill_id)
  return false
end
return super
 end
 def name=(name)
@name = name
 end
 def class_id=(class_id)
if $data_classes[class_id] != nil
  @class_id = class_id
  # ????????????????
  unless equippable?($data_weapons[@weapon_id])
	equip(0, 0)
  end
  unless equippable?($data_armors[@armor1_id])
	equip(1, 0)
  end
  unless equippable?($data_armors[@armor2_id])
	equip(2, 0)
  end
  unless equippable?($data_armors[@armor3_id])
	equip(3, 0)
  end
  unless equippable?($data_armors[@armor4_id])
	equip(4, 0)
  end
end
 end
 def set_graphic(character_name, character_hue, battler_name, battler_hue)
@character_name = character_name
@character_hue = character_hue
@battler_name = battler_name
@battler_hue = battler_hue
 end
 def screen_x
# ??????????? X ?????????
if self.index != nil
  return self.index * 60 + 10 + 400
else
  return 0
end
 end
 def screen_y
return self.index * 30 + 130 + 100
 end
 def screen_z
# ??????????? Z ?????????
return self.index * 80
 end
end
class Sprite_Battler < RPG::Sprite
 attr_accessor :battler				  # ????
 def initialize(viewport, battler = nil)
super(viewport)
@battler = battler
@battler_visible = false
 end
 def dispose
if self.bitmap != nil
  self.bitmap.dispose
end
super
 end
 def update
super
# ????? nil ???
if @battler == nil
  self.bitmap = nil
  loop_animation(nil)
  return
end
# ????????????????????
if @battler.battler_name != @battler_name or
   @battler.battler_hue != @battler_hue
  # ????????????
  @battler_name = @battler.battler_name
  @battler_hue = @battler.battler_hue
  self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  @width = bitmap.width
  @height = bitmap.height
  self.ox = @width / 2
  self.oy = @height
  # ?????????????????? 0 ???
  if @battler.dead? or @battler.hidden
	self.opacity = 0
  end
end
# ??????? ID ????????????
if @battler.damage == nil and
   @battler.state_animation_id != @state_animation_id
  @state_animation_id = @battler.state_animation_id
  loop_animation($data_animations[@state_animation_id])
end
# ??????????????
if @battler.is_a?(Game_Actor) and @battler_visible
  # ???????????????????????
  if $game_temp.battle_main_phase
	self.opacity += 3 if self.opacity < 255
  else
	self.opacity -= 3 if self.opacity > 207
  end
end
# ??
if @battler.blink
  blink_on
else
  blink_off
end
# ??????
unless @battler_visible
  # ??
  if not @battler.hidden and not @battler.dead? and
	 (@battler.damage == nil or @battler.damage_pop)
	appear
	@battler_visible = true
  end
end
# ?????
if @battler_visible
  # ??
  if @battler.hidden
	$game_system.se_play($data_system.escape_se)
	escape
	@battler_visible = false
  end
  # ??????
  if @battler.white_flash
	whiten
	@battler.white_flash = false
  end
  # ???????
  if @battler.animation_id != 0
	animation = $data_animations[@battler.animation_id]
	animation(animation, @battler.animation_hit)
	@battler.animation_id = 0
  end
  # ????
  if @battler.damage_pop
	damage(@battler.damage, @battler.critical)
	@battler.damage = nil
	@battler.critical = false
	@battler.damage_pop = false
  end
  # ????
  if @battler.damage == nil and @battler.dead?
	if @battler.is_a?(Game_Enemy)
	  $game_system.se_play($data_system.enemy_collapse_se)
	else
	  $game_system.se_play($data_system.actor_collapse_se)
	end
	collapse
	@battler_visible = false
  end
end
# ???????????
self.x = @battler.screen_x
self.y = @battler.screen_y
self.z = @battler.screen_z
 end
end
class Scene_Battle
 def main
# ???????????????
$game_temp.in_battle = true
$game_temp.battle_turn = 0 #turni 
$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				 #menù di 
s2 = $data_system.words.skill				  # battaglia
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 = 320
@actor_command_window.x = 0
@actor_command_window.z = 300
@actor_command_window.back_opacity = 160
@actor_command_window.active = true  # dice se è attivo 
@actor_command_window.visible = true # dice  se è visibile 
# ????????????
@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
@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
 def judge
# ????????????????? 0 ????
if $game_party.all_dead? or $game_party.actors.size == 0
  # ???????
  if $game_temp.battle_can_lose
	# ??????? BGM ???
	$game_system.bgm_play($game_temp.map_bgm)
	# ?????
	battle_end(2)
	# true ???
	return true
  end
  # ??????????????
  $game_temp.gameover = true
  # true ???
  return true
end
# ????? 1 ???????? false ???
for enemy in $game_troop.enemies
  if enemy.exist?
	return false
  end
end
# ????????????? (??)
start_phase5
# true ???
return true
 end
 def battle_end(result)
# ??????????
$game_temp.in_battle = false
# ????????????????
$game_party.clear_actions
# ???????????
for actor in $game_party.actors
  actor.remove_states_battle
end
# ????????
$game_troop.enemies.clear
# ??? ?????????
if $game_temp.battle_proc != nil
  $game_temp.battle_proc.call(result)
  $game_temp.battle_proc = nil
end
# ??????????
$scene = Scene_Map.new
 end
 def setup_battle_event
# ?????????????
if $game_system.battle_interpreter.running?
  return
end
# ???????????????
for index in 0...$data_troops[@troop_id].pages.size
  # ??????????
  page = $data_troops[@troop_id].pages[index]
  # ??????? c ??????
  c = page.condition
  # ??????????????????????
  unless c.turn_valid or c.enemy_valid or
		 c.actor_valid or c.switch_valid
	next
  end
  # ??????????????
  if $game_temp.battle_event_flags[index]
	next
  end
  # ??? ????
  if c.turn_valid
	n = $game_temp.battle_turn
	a = c.turn_a
	b = c.turn_b
	if (b == 0 and n != a) or
	   (b > 0 and (n < 1 or n < a or n % b != a % b))
	  next
	end
  end
  # ???? ????
  if c.enemy_valid
	enemy = $game_troop.enemies[c.enemy_index]
	if enemy == nil or enemy.hp * 100.0 / enemy.maxhp > c.enemy_hp
	  next
	end
  end
  # ???? ????
  if c.actor_valid
	actor = $game_actors[c.actor_id]
	if actor == nil or actor.hp * 100.0 / actor.maxhp > c.actor_hp
	  next
	end
  end
  # ???? ????
  if c.switch_valid
	if $game_switches[c.switch_id] == false
	  next
	end
  end
  # ???????????
  $game_system.battle_interpreter.setup(page.list, 0)
  # ?????????? [???] ? [???] ???
  if page.span <= 1
	# ???????????
	$game_temp.battle_event_flags[index] = true
  end
  return
end
 end
 def update
# ?????????????
if $game_system.battle_interpreter.running?
  # ?????????
  $game_system.battle_interpreter.update
  # ?????????????????????????
  if $game_temp.forcing_battler == nil
	# ?????????????????
	unless $game_system.battle_interpreter.running?
	  # ??????????????????????????
	  unless judge
		setup_battle_event
	  end
	end
	# ????????????????
	if @phase != 5
	  # ?????????????????
	  @status_window.refresh
	end
  end
end
# ???? (????)??????
$game_system.update
$game_screen.update
# ????? 0 ??????
if $game_system.timer_working and $game_system.timer == 0
  # ?????
  $game_temp.battle_abort = true
end
# ????????

@help_window.update
@actor_command_window.update
@status_window.update
@message_window.update
# ???????????
@spriteset.update
# ?????????????
if $game_temp.transition_processing
  # ?????????????????
  $game_temp.transition_processing = false
  # ?????????
  if $game_temp.transition_name == ""
	Graphics.transition(20)
  else
	Graphics.transition(40, "Graphics/Transitions/" +
	  $game_temp.transition_name)
  end
end
# ????????????????
if $game_temp.message_window_showing
  return
end
# ???????????
if @spriteset.effect?
  return
end
# ??????????
if $game_temp.gameover
  # ??????????????
  $scene = Scene_Gameover.new
  return
end
# ???????????
if $game_temp.to_title
  # ???????????
  $scene = Scene_Title.new
  return
end
# ????????
if $game_temp.battle_abort
  # ??????? BGM ???
  $game_system.bgm_play($game_temp.map_bgm)
  # ?????
  battle_end(1)
  return
end
# ????????
if @wait_count > 0
  # ????????????
  @wait_count -= 1
  return
end
# ???????????????????????
# ????????????????
if $game_temp.forcing_battler == nil and
   $game_system.battle_interpreter.running?
  return
end
# ??????????
case @phase
when 1  # ?????????
  update_phase1
when 2  # ????????????
update_phase2
when 3  # ????????????
  update_phase3
when 4  # ???????
  update_phase4
when 5  # ???????????
  update_phase5
end
 end
end
class Scene_Battle
 def start_phase1
# ???? 1 ???
@phase = 1
# ????????????????
$game_party.clear_actions
# ??????????????
setup_battle_event
 end
 def update_phase1
# ????
if judge
  # ?????????? : ??????
  return
end
# ??????????????
start_phase2
 end
 def start_phase2
# ???? 2 ???
@phase = 2
# ?????????????
@actor_index = -1
@active_battler = nil
# ?????????????????
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = true
# ??????????????
$game_temp.battle_main_phase = false
# ????????????????
$game_party.clear_actions
# ????????????
unless $game_party.inputable?
  # ?????????
  start_phase4
end
 end
 def update_phase2
# C ??????????
 start_phase3
 end
 def update_phase2_escape
# ??????????????
enemies_agi = 0
enemies_number = 0
for enemy in $game_troop.enemies
  if enemy.exist?
	enemies_agi += enemy.agi
	enemies_number += 1
  end
end
if enemies_number > 0
  enemies_agi /= enemies_number
end
# ??????????????
actors_agi = 0
actors_number = 0
for actor in $game_party.actors
  if actor.exist?
	actors_agi += actor.agi
	actors_number += 1
  end
end
if actors_number > 0
  actors_agi /= actors_number
end
# ??????
success = rand(100) < 50 * actors_agi / enemies_agi
# ???????
if success
  # ?? SE ???
  $game_system.se_play($data_system.escape_se)
  # ??????? BGM ???
  $game_system.bgm_play($game_temp.map_bgm)
  # ?????
  battle_end(1)
# ???????
else
  # ????????????????
  $game_party.clear_actions
  # ?????????
  start_phase4
end
 end
 def start_phase5
# ???? 5 ???
@phase = 5
# ????? ME ???
$game_system.me_play($game_system.battle_end_me)
# ??????? BGM ???
$game_system.bgm_play($game_temp.map_bgm)
# EXP???????????????
exp = 0
gold = 0
treasures = []
# ???
for enemy in $game_troop.enemies
  # ??????????????
  unless enemy.hidden
	# ?? EXP????????
	exp += enemy.exp
	gold += enemy.gold
	# ?????????
	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
# ???????? 6 ??????
treasures = treasures[0..5]
# EXP ??
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)
	end
  end
end
# ??????
$game_party.gain_gold(gold)
# ???????
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
# ???????????????
@result_window = Window_BattleResult.new(exp, gold, treasures)
# ???????????
@phase5_wait_count = 100
 end
 def update_phase5
# ????????? 0 ???????
if @phase5_wait_count > 0
  # ????????????
  @phase5_wait_count -= 1
  # ????????? 0 ??????
  if @phase5_wait_count == 0
	# ????????????
	@result_window.visible = true
	# ??????????????
	$game_temp.battle_main_phase = false
	# ?????????????????
	@status_window.refresh
  end
  return
end
# C ??????????
if Input.trigger?(Input::C)
  # ?????
  battle_end(0)
end
 end
end
class Scene_Battle
 def start_phase3
# parte la 3 fase
@phase = 3
#indice dell'eroe 
@actor_index = -1
@active_battler = nil
#via alla selezione dell'altro eroe
phase3_next_actor
 end
 def phase3_next_actor
# ???
begin
 #controlla se ci sono altri eroi nel gruppo o almeno credo 
  if @active_battler != nil
	@active_battler.blink = false
  end
  #ora se il numero degli eroi è si attiva la quarta fase
  if @actor_index == $game_party.actors.size-1
	# 4°Fase 
	start_phase4
	return
  end
  # si aumente l'indice per selezione l'altro eroe 
  @actor_index += 1
  @active_battler = $game_party.actors[@actor_index]
  @active_battler.blink = true
# qua se è impossibile selezione il nuovo eroe 
end until @active_battler.inputable?
# in caso contrario si da via alla 3° fase 
phase3_setup_command_window
 end
 def phase3_prior_actor
# ???
begin
  # se il blatter dell'eroe è attivo 
  if @active_battler != nil
	@active_battler.blink = false
  end
  # qui si controlla se l'indice della selezzione uguale a zero 
  # se è vero significa che nessun eroe vi è selezionato 
  # e si ritorna alla 2° fase 
  if @actor_index == 0
	# ??????????????
	start_phase2
	return
  end
  # qua si scala di indice 
  @actor_index -= 1
  @active_battler = $game_party.actors[@actor_index]
  @active_battler.blink = true
# controlla se è possibile 
end until @active_battler.inputable?
# se si si da via alla 3° Fase per aprire il command_Window 
phase3_setup_command_window
 end
 def phase3_setup_command_window
# per prima cosa si attiva il command_window
   # in seguito si attiva la visibilità
@actor_command_window.active = true
@actor_command_window.visible = true
# controlla le coordinate x 
@actor_command_window.x = 0
# porta l'indice a 0
@actor_command_window.index = 0
 end
 def update_phase3
# ?????????????
if @enemy_arrow != nil
  update_phase3_enemy_select
# ?????????????
elsif @actor_arrow != nil
  update_phase3_actor_select
# ??????????????
elsif @skill_window != nil
  update_phase3_skill_select
# ???????????????
elsif @item_window != nil
  update_phase3_item_select
# ???????????????????
elsif @actor_command_window.active
  update_phase3_basic_command
end
 end
 def update_phase3_basic_command
# Se il tasto B è premuto , B sta anche per Esc 
if Input.trigger?(Input::B)
  # suona 
  $game_system.se_play($data_system.cancel_se)
  # si ritorna alla 3° Fase Pdove si selezione  l'eroe 
  phase3_prior_actor
  return
end
# Se il tasto c è premuto , C sta anche per il tasto INVIO 
if Input.trigger?(Input::C)
  # CASE ovvero caso , qua si riferisce al Command_window 
  case @actor_command_window.index
  when 0  # nel primo caso , ovvero in ATTACCA 
	# suona 
	$game_system.se_play($data_system.decision_se)
	# ????????
	@active_battler.current_action.kind = 0
	@active_battler.current_action.basic = 0
	# si da via alla selezione del nemico 
	start_enemy_select
  when 1  # nel secondo caso , si riferice  alle  skill (TECNICHE)
	# suona
	$game_system.se_play($data_system.decision_se)
	# cambia l'indice della selezione in Window_Command 
	@active_battler.current_action.kind = 1
	# si da via alla selezione delle skill (TECNICHE)
	start_skill_select
  when 2  # ??
	# ?? SE ???
	$game_system.se_play($data_system.decision_se)
	# ????????
	@active_battler.current_action.kind = 0
	@active_battler.current_action.basic = 1
	# ??????????????
	phase3_next_actor
  when 3  # ????
	# ?? SE ???
	$game_system.se_play($data_system.decision_se)
	# ????????
	@active_battler.current_action.kind = 2
	# ??????????
	start_item_select
  end
  return
end
 end
 def update_phase3_skill_select
# ????????????????
@skill_window.visible = true
# ???????????
@skill_window.update
# B ??????????
if Input.trigger?(Input::B)
  # ????? SE ???
  $game_system.se_play($data_system.cancel_se)
  # ?????????
  end_skill_select
  return
end
# C ??????????
if Input.trigger?(Input::C)
  # ????????????????????????
  @skill = @skill_window.skill
  # ????????
  if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
	# ??? SE ???
	$game_system.se_play($data_system.buzzer_se)
	return
  end
  # ?? SE ???
  $game_system.se_play($data_system.decision_se)
  # ????????
  @active_battler.current_action.skill_id = @skill.id
  # ?????????????????
  @skill_window.visible = false
  # ???????????
  if @skill.scope == 1
	# ??????????
	start_enemy_select
  # ????????????
  elsif @skill.scope == 3 or @skill.scope == 5
	# ??????????
	start_actor_select
  # ?????????????
  else
	# ?????????
	end_skill_select
	# ??????????????
	phase3_next_actor
  end
  return
end
 end
 def update_phase3_item_select
# ?????????????????
@item_window.visible = true
# ????????????
@item_window.update
# B ??????????
if Input.trigger?(Input::B)
  # ????? SE ???
  $game_system.se_play($data_system.cancel_se)
  # ??????????
  end_item_select
  return
end
# C ??????????
if Input.trigger?(Input::C)
  # ?????????????????????????
  @item = @item_window.item
  # ????????
  unless $game_party.item_can_use?(@item.id)
	# ??? SE ???
	$game_system.se_play($data_system.buzzer_se)
	return
  end
  # ?? SE ???
  $game_system.se_play($data_system.decision_se)
  # ????????
  @active_battler.current_action.item_id = @item.id
  # ??????????????????
  @item_window.visible = false
  # ???????????
  if @item.scope == 1
	# ??????????
	start_enemy_select
  # ????????????
  elsif @item.scope == 3 or @item.scope == 5
	# ??????????
	start_actor_select
  # ?????????????
  else
	# ??????????
	end_item_select
	# ??????????????
	phase3_next_actor
  end
  return
end
 end
 def update_phase3_enemy_select
# ??????????
@enemy_arrow.update
# B ??????????
if Input.trigger?(Input::B)
  # ????? SE ???
  $game_system.se_play($data_system.cancel_se)
  # ??????????
  end_enemy_select
  return
end
# C ??????????
if Input.trigger?(Input::C)
  # ?? SE ???
  $game_system.se_play($data_system.decision_se)
  # ????????
  @active_battler.current_action.target_index = @enemy_arrow.index
  # ??????????
  end_enemy_select
  # ??????????????
  if @skill_window != nil
	# ?????????
	end_skill_select
  end
  # ???????????????
  if @item_window != nil
	# ??????????
	end_item_select
  end
  # ??????????????
  phase3_next_actor
end
 end
 def update_phase3_actor_select
# ??????????
@actor_arrow.update
# B ??????????
if Input.trigger?(Input::B)
  # ????? SE ???
  $game_system.se_play($data_system.cancel_se)
  # ??????????
  end_actor_select
  return
end
# C ??????????
if Input.trigger?(Input::C)
  # ?? SE ???
  $game_system.se_play($data_system.decision_se)
  # ????????
  @active_battler.current_action.target_index = @actor_arrow.index
  # ??????????
  end_actor_select
  # ??????????????
  if @skill_window != nil
	# ?????????
	end_skill_select
  end
  # ???????????????
  if @item_window != nil
	# ??????????
	end_item_select
  end
  # ??????????????
  phase3_next_actor
end
 end
 def start_enemy_select
# ??????????
@enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)
# ?????????????
@enemy_arrow.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = true
 end
 def end_enemy_select
# ??????????
@enemy_arrow.dispose
@enemy_arrow = nil
# ????? [??] ???
if @actor_command_window.index == 0
  # ?????????????????
  @actor_command_window.active = true
  @actor_command_window.visible = true
  # ???????????
  @help_window.visible = false
end
 end
 def start_actor_select
# ??????????
@actor_arrow = Arrow_Actor.new(@spriteset.viewport2)
@actor_arrow.index = @actor_index
# ?????????????
@actor_arrow.help_window = @help_window
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
 end
 def end_actor_select
# ??????????
@actor_arrow.dispose
@actor_arrow = nil
 end
 def start_skill_select
# ???????????
@skill_window = Window_Skill.new(@active_battler)
# ?????????????
@skill_window.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = true
 end
 def end_skill_select
# ???????????
@skill_window.dispose
@skill_window = nil
# ???????????
@help_window.visible = false
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
 end
 def start_item_select
# ????????????
@item_window = Window_Item.new
# ?????????????
@item_window.help_window = @help_window
# ?????????????????
@actor_command_window.active = false
@actor_command_window.visible = true
 end
 def end_item_select
# ????????????
@item_window.dispose
@item_window = nil
# ???????????
@help_window.visible = false
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
 end
end
class Scene_Battle
 def start_phase4
# ???? 4 ???
@phase = 4
# ????????
$game_temp.battle_turn += 1
# ???????????????
for index in 0...$data_troops[@troop_id].pages.size
  # ??????????
  page = $data_troops[@troop_id].pages[index]
  # ?????????? [???] ???
  if page.span == 1
	# ???????????
	$game_temp.battle_event_flags[index] = false
  end
end
# ?????????????
@actor_index = -1
@active_battler = nil
# ?????????????????
# ?????????????????
@actor_command_window.active = true
@actor_command_window.visible = true
# ??????????????
$game_temp.battle_main_phase = true
# ???????????
for enemy in $game_troop.enemies
  enemy.make_action
end
# ??????
make_action_orders
# ???? 1 ???
@phase4_step = 1
 end
 def make_action_orders
# ?? @action_battlers ????
@action_battlers = []
# ??????? @action_battlers ???
for enemy in $game_troop.enemies
  @action_battlers.push(enemy)
end
# ??????? @action_battlers ???
for actor in $game_party.actors
  @action_battlers.push(actor)
end
# ???????????????
for battler in @action_battlers
  battler.make_action_speed
end
# ???????????????????
@action_battlers.sort! {|a,b|
  b.current_action.speed - a.current_action.speed }
 end
 def update_phase4
case @phase4_step
when 1
  update_phase4_step1
when 2
  update_phase4_step2
when 3
  update_phase4_step3
when 4
  update_phase4_step4
when 5
  update_phase4_step5
when 6
  update_phase4_step6
end
 end
 def update_phase4_step1
# ???????????
@help_window.visible = false
# ????
if judge
  # ?????????? : ??????
  return
end
# ?????????????????????????
if $game_temp.forcing_battler == nil
  # ??????????????
  setup_battle_event
  # ?????????????
  if $game_system.battle_interpreter.running?
	return
  end
end
# ????????????????????????
if $game_temp.forcing_battler != nil
  # ??????????
  @action_battlers.delete($game_temp.forcing_battler)
  @action_battlers.unshift($game_temp.forcing_battler)
end
# ??????????????? (??????)
if @action_battlers.size == 0
  # ??????????????
  start_phase2
  return
end
# ??????? ID ?????????? ID ????
@animation1_id = 0
@animation2_id = 0
@common_event_id = 0
# ?????????????????
@active_battler = @action_battlers.shift
# ???????????????
if @active_battler.index == nil
  return
end
# ????????
if @active_battler.hp > 0 and @active_battler.slip_damage?
  @active_battler.slip_damage_effect
  @active_battler.damage_pop = true
end
# ????????
@active_battler.remove_states_auto
# ?????????????????
@status_window.refresh
# ???? 2 ???
@phase4_step = 2
 end
 def update_phase4_step2
# ????????????
unless @active_battler.current_action.forcing
  # ??? [????????] ? [?????????] ???
  if @active_battler.restriction == 2 or @active_battler.restriction == 3
	# ???????????
	@active_battler.current_action.kind = 0
	@active_battler.current_action.basic = 0
  end
  # ??? [??????] ???
  if @active_battler.restriction == 4
	# ??????????????????
	$game_temp.forcing_battler = nil
	# ???? 1 ???
	@phase4_step = 1
	return
  end
end
# ??????????
@target_battlers = []
# ???????????
case @active_battler.current_action.kind
when 0  # ??
  make_basic_action_result
when 1  # ???
  make_skill_action_result
when 2  # ????
  make_item_action_result
end
# ???? 3 ???
if @phase4_step == 2
  @phase4_step = 3
end
 end
 def make_basic_action_result
# ?????
if @active_battler.current_action.basic == 0
  # ??????? ID ???
  @animation1_id = @active_battler.animation1_id
  @animation2_id = @active_battler.animation2_id
  # ???????????????
  if @active_battler.is_a?(Game_Enemy)
	if @active_battler.restriction == 3
	  target = $game_troop.random_target_enemy
	elsif @active_battler.restriction == 2
	  target = $game_party.random_target_actor
	else
	  index = @active_battler.current_action.target_index
	  target = $game_party.smooth_target_actor(index)
	end
  end
  # ???????????????
  if @active_battler.is_a?(Game_Actor)
	if @active_battler.restriction == 3
	  target = $game_party.random_target_actor
	elsif @active_battler.restriction == 2
	  target = $game_troop.random_target_enemy
	else
	  index = @active_battler.current_action.target_index
	  target = $game_troop.smooth_target_enemy(index)
	end
  end
  # ?????????????
  @target_battlers = [target]
  # ??????????
  for target in @target_battlers
	target.attack_effect(@active_battler)
  end
  return
end
# ?????
if @active_battler.current_action.basic == 1
  # ????????? "??" ???
  @help_window.set_text($data_system.words.guard, 1)
  return
end
# ??????
if @active_battler.is_a?(Game_Enemy) and
   @active_battler.current_action.basic == 2
  # ????????? "???" ???
  @help_window.set_text("???", 1)
  # ???
  @active_battler.escape
  return
end
# ????????
if @active_battler.current_action.basic == 3
  # ??????????????????
  $game_temp.forcing_battler = nil
  # ???? 1 ???
  @phase4_step = 1
  return
end
 end
 def set_target_battlers(scope)
# ???????????????
if @active_battler.is_a?(Game_Enemy)
  # ???????
  case scope
  when 1  # ???
	index = @active_battler.current_action.target_index
	@target_battlers.push($game_party.smooth_target_actor(index))
  when 2  # ???
	for actor in $game_party.actors
	  if actor.exist?
		@target_battlers.push(actor)
	  end
	end
  when 3  # ????
	index = @active_battler.current_action.target_index
	@target_battlers.push($game_troop.smooth_target_enemy(index))
  when 4  # ????
	for enemy in $game_troop.enemies
	  if enemy.exist?
		@target_battlers.push(enemy)
	  end
	end
  when 5  # ???? (HP 0) 
	index = @active_battler.current_action.target_index
	enemy = $game_troop.enemies[index]
	if enemy != nil and enemy.hp0?
	  @target_battlers.push(enemy)
	end
  when 6  # ???? (HP 0) 
	for enemy in $game_troop.enemies
	  if enemy != nil and enemy.hp0?
		@target_battlers.push(enemy)
	  end
	end
  when 7  # ???
	@target_battlers.push(@active_battler)
  end
end
# ???????????????
if @active_battler.is_a?(Game_Actor)
  # ???????
  case scope
  when 1  # ???
	index = @active_battler.current_action.target_index
	@target_battlers.push($game_troop.smooth_target_enemy(index))
  when 2  # ???
	for enemy in $game_troop.enemies
	  if enemy.exist?
		@target_battlers.push(enemy)
	  end
	end
  when 3  # ????
	index = @active_battler.current_action.target_index
	@target_battlers.push($game_party.smooth_target_actor(index))
  when 4  # ????
	for actor in $game_party.actors
	  if actor.exist?
		@target_battlers.push(actor)
	  end
	end
  when 5  # ???? (HP 0) 
	index = @active_battler.current_action.target_index
	actor = $game_party.actors[index]
	if actor != nil and actor.hp0?
	  @target_battlers.push(actor)
	end
  when 6  # ???? (HP 0) 
	for actor in $game_party.actors
	  if actor != nil and actor.hp0?
		@target_battlers.push(actor)
	  end
	end
  when 7  # ???
	@target_battlers.push(@active_battler)
  end
end
 end
 def make_skill_action_result
# ??????
@skill = $data_skills[@active_battler.current_action.skill_id]
# ????????????
unless @active_battler.current_action.forcing
  # SP ????????????????
  unless @active_battler.skill_can_use?(@skill.id)
	# ??????????????????
	$game_temp.forcing_battler = nil
	# ???? 1 ???
	@phase4_step = 1
	return
  end
end
# SP ??
@active_battler.sp -= @skill.sp_cost
# ?????????????????
@status_window.refresh
# ????????????????
@help_window.set_text(@skill.name, 1)
# ??????? ID ???
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# ??????? ID ???
@common_event_id = @skill.common_event_id
# ??????????
set_target_battlers(@skill.scope)
# ?????????
for target in @target_battlers
  target.skill_effect(@active_battler, @skill)
end
 end
 def make_item_action_result
# ???????
@item = $data_items[@active_battler.current_action.item_id]
# ????????????????????
unless $game_party.item_can_use?(@item.id)
  # ???? 1 ???
  @phase4_step = 1
  return
end
# ??????
if @item.consumable
  # ????????? 1 ???
  $game_party.lose_item(@item.id, 1)
end
# ?????????????????
@help_window.set_text(@item.name, 1)
# ??????? ID ???
@animation1_id = @item.animation1_id
@animation2_id = @item.animation2_id
# ??????? ID ???
@common_event_id = @item.common_event_id
# ?????
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
# ??????????
set_target_battlers(@item.scope)
# ??????????
for target in @target_battlers
  target.item_effect(@item)
end
 end
 def update_phase4_step3
# ?????????? (ID ? 0 ??????????)
if @animation1_id == 0
  @active_battler.white_flash = true
else
  @active_battler.animation_id = @animation1_id
  @active_battler.animation_hit = true
end
# ???? 4 ???
@phase4_step = 4
 end
 def update_phase4_step4
# ??????????
for target in @target_battlers
  target.animation_id = @animation2_id
  target.animation_hit = (target.damage != "Miss")
end
# ??????????????????? 8 ??????
@wait_count = 8
# ???? 5 ???
@phase4_step = 5
 end
 def update_phase4_step5
# ???????????
@help_window.visible = false
# ?????????????????
@status_window.refresh
# ??????
for target in @target_battlers
  if target.damage != nil
	target.damage_pop = true
  end
end
# ???? 6 ???
@phase4_step = 6
 end
 def update_phase4_step6
# ??????????????????
$game_temp.forcing_battler = nil
# ??????? ID ??????
if @common_event_id > 0
  # ???????????
  common_event = $data_common_events[@common_event_id]
  $game_system.battle_interpreter.setup(common_event.list, 0)
end
# ???? 1 ???
@phase4_step = 1
 end
end
class Window_BattleStatus < Window_Base
 def initialize
super(0, 320, 640, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Garamond"
self.contents.font.size = 15
@level_up_flags = [false, false, false, false]
refresh
 end
 def dispose
super
 end
 def level_up(actor_index)
@level_up_flags[actor_index] = true
 end
 def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
  actor = $game_party.actors[i]
  actor_x = i * 1 + 150
  actor_y = i * 30 + 4
  draw_actor_name(actor, actor_x , actor_y)
  draw_actor_hp(actor, actor_x+75,  actor_y)
  draw_actor_sp(actor, actor_x+225,  actor_y)
  if @level_up_flags[i]
	self.contents.font.color = normal_color
	self.contents.font.name = "Garamond"
	self.contents.font.size = 23
	self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
  else
	draw_actor_state(actor, actor_x+370,actor_y )
  end
end
 end
 def update
super
# L'opacità è abbastanza bassa durante la fase principale
if $game_temp.battle_main_phase
  self.contents_opacity -= 4 if self.contents_opacity > 191
else
  self.contents_opacity += 4 if self.contents_opacity < 255
end
 end
 def draw_actor_name(actor, x, y)
self.contents.font.name = "Garamond"
self.contents.font.size =23
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
 end
 def draw_actor_class(actor, x, y)
self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 236, 32, actor.class_name)
 end
 def draw_actor_level(actor, x, y)
self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
 end
 def make_battler_state_text(battler, width, need_normal)
# Viene acquisita l'ampiezza di una parentesi
brackets_width = self.contents.text_size("[]").width
# Viene creata la sequanza del carattere del nome dello stato
text = ""
for i in battler.states
  if $data_states[i].rating >= 1
	if text == ""
	  text = $data_states[i].name
	else
	  new_text = text + "/" + $data_states[i].name
	  text_width = self.contents.text_size(new_text).width
	  if text_width > width - brackets_width
		break
	  end
	  text = new_text
	end
  end
end
# Quando la sequanza del carattere del nome dello stato è vuota,
# allora diviene "[Normale]"
if text == ""
  if need_normal
	text = "[Normale]"
  end
else
  # Viene allegata una parentesi
  text = "[" + text + "]"
end
# Torna alla sequenza completata dei caratteri
return text
 end
 def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)
self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
self.contents.draw_text(x, y, width, 32, text)
 end
 def draw_actor_exp(actor, x, y)
self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.font.color = system_color
self.contents.draw_text(x, y, 40, 32, "EXP")
self.contents.font.color = normal_color
self.contents.draw_text(x + 40, y, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 124, y, 12, 32, "/", 1)
self.contents.draw_text(x + 136, y, 84, 32, actor.next_exp_s)
 end
 def draw_actor_hp(actor, x, y, width = 144)
# Disegna la sequenza dei caratteri: "HP"
self.contents.font.color = system_color
self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# Calcola se c'è qualche spazio che disegna i punti MaxHp
if width - 32 >= 108
  hp_x = x + width - 108
  flag = true
elsif width - 32 >= 48
  hp_x = x + width - 48
  flag = false
end
# Disegna i punti HP
self.contents.font.color = actor.hp == 0 ? knockout_color :
  actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.draw_text(hp_x, y, 38, 32, actor.hp.to_s, 2)
# Disegna i punti MaxHP
if flag
  self.contents.font.color = normal_color
  self.contents.font.name = "Garamond"
  self.contents.font.size = 23
  self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
 end
 def draw_actor_sp(actor, x, y, width = 144)
# Disegna la sequenza dei caratteri: "MP"
self.contents.font.color = system_color
self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# Calcola se c'è qualche spazio che disegna i punti MaxMp
if width - 32 >= 108
  sp_x = x + width - 108
  flag = true
elsif width - 32 >= 48
  sp_x = x + width - 48
  flag = false
end
# Disegna i punti MP
self.contents.font.color = actor.sp == 0 ? knockout_color :
  actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.draw_text(sp_x, y, 38, 32, actor.sp.to_s, 2)
# Disegna i punti MaxMP
if flag
  self.contents.font.color = normal_color
  self.contents.font.name = "Garamond"
  self.contents.font.size = 23
  self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
 end
 def draw_actor_parameter(actor, x, y, type)
case type
when 0
  parameter_name = $data_system.words.atk
  parameter_value = actor.atk
when 1
  parameter_name = $data_system.words.pdef
  parameter_value = actor.pdef
when 2
  parameter_name = $data_system.words.mdef
  parameter_value = actor.mdef
when 3
  parameter_name = $data_system.words.str
  parameter_value = actor.str
when 4
  parameter_name = $data_system.words.dex
  parameter_value = actor.dex
when 5
  parameter_name = $data_system.words.agi
  parameter_value = actor.agi
when 6
  parameter_name = $data_system.words.int
  parameter_value = actor.int
end
self.contents.font.color = system_color
self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.font.name = "Garamond"
self.contents.font.size = 18
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
 end
 def draw_item_name(item, x, y)
if item == nil
  return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.font.name = "Garamond"
self.contents.font.size = 23
self.contents.draw_text(x + 28, y, 212, 32, item.name)
 end
end

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

  • 0

già propio quello proGM infatti leggendo il titolo XD

[richiesta], bs laterale dei poveri

 

un ultima cosa nn mi va mi da errore qui riga 8@----------->"class Game_Actor < Game_Battler"

Edited by Deyan

http://img49.imageshack.us/img49/3363/deyan2pq3.jpg

~La mia skeda in Dragon Ball RPG [+]

I miei ProgeTTi

 

Link to comment
Share on other sites

  • 0
dimmi che errore però, se no che faccio?

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

  • 0

O_o

ma scusa, dove l'hai incollato lo script? xDD

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

  • 0
che altri script hai nel progetto?

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

  • 0

evita doppi post però .-.

passami il progetto, solo la cartella data che ti risolvo...

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

  • 0

metti questo nella cartella data :P

http://www.mediafire.com/?5yzyrkrauxz

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...