"ㅆ" 이거 스태미나 감추려면 어찌;;

by 라이네크 posted Sep 29, 2009
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄

#==================================================
# ** Stamina
# By onidsouza
# Version 1.2
# 02/26/09
#-------------------------------------------------
module OniStamina

 Initial = 100 # Initial stamina value
 
  EvolutionRate = 1.3 #Float value representing the level up evolution rate.
                      # Leave 1.0 for none
 
  InitialRecoverFrames = 15 # Recover Frames Rate
 
  RecoverEvolutionRate = 3 #Float value representing the level up recover time
                             # evolution rate. Leave 1.0 for none.
 
  ActorMember = 0# Number from 0 to 3, representing the actor in the party.

end

class Game_Actor
 
  alias onistamina_init initialize
  alias onistamina_lvlup level_up
 
  attr_reader :stamina
  attr_accessor :maxsta
  attr_reader :recover
 
  def initialize(actor_id)
    onistamina_init(actor_id)
    @stamina = OniStamina::Initial
    @maxsta = @stamina
    @recover = OniStamina::InitialRecoverFrames
  end
 
  def level_up
    @maxsta = @maxsta * OniStamina::EvolutionRate
    @recover = @recover / OniStamina::RecoverEvolutionRate
    @maxsta = @maxsta.to_i
    @recover = @recover.to_i
    onistamina_lvlup
  end
 
  def stamina_text
    (@stamina).to_s + '/' + (@maxsta).to_s
  end
 
  def lose_sta(x)
    if ((@stamina - x) >= 0)
    @stamina = @stamina - x
    else
    @stamina = 0
    end
  end
 
  def gain_sta(x)
    if ((@stamina + x) <= @maxsta)
    @stamina = @stamina + x
    end
  end
 
end

class Window_Stamina < Window_Base
 
  def initialize(x, y, wid, hei)
    super(x, y, wid, hei)
    @stamina = $game_party.members[OniStamina::ActorMember].stamina
    @maxsta = $game_party.members[OniStamina::ActorMember].stamina
    self.opacity = 0
  end
 
  def refresh
    self.contents.clear
    draw_stamina(0, 0)
  end
 
  def draw_stamina(x, y, width = 100)
    wd = width * $game_party.members[OniStamina::ActorMember].stamina / $game_party.members[OniStamina::ActorMember].maxsta
    self.contents.fill_rect(x, y, width, 10, Color.new(0, 0, 0))
    self.contents.fill_rect(x, y, wd, 10, Color.new(255, 255, 119))
    text_wid = contents.text_size($game_party.members[OniStamina::ActorMember].stamina_text).width
    self.contents.draw_text(x + 0, y + 15, text_wid, 20, $game_party.members[OniStamina::ActorMember].stamina_text)
  end
 
end

class Scene_Map
 
  alias onista_start start
  alias onista_terminate terminate
  alias onista_update update
  attr_reader :winsta
 
  def start
    onista_start
    @waiting_sta = 0
    @winsta = Window_Stamina.new(-10, 1, 150, 80)
  end
 
  def terminate
    onista_terminate
    @winsta.dispose
  end
 
  def update
    onista_update
    if $game_player.moving? and $game_player.dash?
      $game_party.members[OniStamina::ActorMember].lose_sta(1)
    end
    if $game_system.waiting_sta == $game_party.members[OniStamina::ActorMember].recover
      $game_party.members[OniStamina::ActorMember].gain_sta(1)
    end
    @winsta.refresh
  end
 
end

class Game_Player < Game_Character
 
  alias sta_dash? dash?
 
  def dash?
    return false if $game_party.members[OniStamina::ActorMember].stamina == 0
    sta_dash?
  end
 
end

class Game_System
 
  attr_reader :waiting_sta
 
  alias onista_update update
  alias onista_initialize initialize
 
  def initialize
    @waiting_sta = 0
    onista_initialize
  end
 
  def update
    @waiting_sta = @waiting_sta + 1
    @waiting_sta = 0 if @waiting_sta > $game_party.members[OniStamina::ActorMember].recover
    onista_update
  end
end

TAG •

Who's 라이네크

?

작품연대기

XP - 아인 스토리 (만들다가 어려워서 포기)

VX - 타르타로스 -운명의검- (모든것을 쏟아부엇지만 아버님이 삭제하셔서 멸망)

2003 - 타르타로스 -운명의검- Again (다시 2003으로 도전하지만 몇달만에 컴터를다시키니 자료증발)

XP - 엘티어즈 ~고대의병기~ (현재만드는중 이건 완성한다 ... 젠장..)

 

으으 자료복구할방법은 업는겝니까 ㅠㅠ

지금만드는건 완성시킨다 젠장