閲覧数 1897 推奨数 0 コメント 1
?

Shortcut

Prev前へ 書き込み

Next次へ 書き込み

Larger Font Smaller Font 上へ 下へ Go comment 印刷
?

Shortcut

Prev前へ 書き込み

Next次へ 書き込み

Larger Font Smaller Font 上へ 下へ Go comment 印刷
#======================================================================
# ■ Window_ShopStatus
#------------------------------------------------------------------------------
#  숍 화면에서, 아이템의 소지수나 엑터의 장비를 표시하는 윈도우입니다.
#======================================================================
class Window_ShopStatus < Window_Base
#--------------------------------------------------------------------------
# ● 오브젝트 초기화
#--------------------------------------------------------------------------
def initialize(actor_index = 0)
super(368, 128, 272, 352)
self.contents = Bitmap.new(width - 32, height - 32)
@actor_index = actor_index
@item = nil
#@actor_index = 0
refresh
end
#-------------------
def update
super
번호돌리기
end
#-------------------
#--------------------------------------------------------------------------
# ● 리프레쉬
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if @item == nil
return
end
case @item
when RPG::Item
number = $game_party.item_number(@item.id)
when RPG::Weapon
number = $game_party.weapon_number(@item.id)
when RPG::Armor
number = $game_party.armor_number(@item.id)
end
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, 32, "소지수")
self.contents.font.color = normal_color
self.contents.draw_text(204, 0, 32, 32, number.to_s, 2)
if @item.is_a? (RPG::Item)
return
end
# 장비품 추가 정보
for i in 0...$game_party.actors.size
# 엑터를 취득
actor = $game_party.actors[@actor_index]#$game_party.actors[i]
# 장비 가능하면 통상 문자색에, 불가능하면 무효 문자색으로 설정
if actor.equippable? (@item)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
# 엑터의 이름을 묘화
@이름 = $game_party.actors[@actor_index].name
$game_party.actors[@actor_index]
self.contents.draw_text(4, 64, 120, 32, @이름)#(4, 64 + 64 * i, 120, 32, actor.name)
# 현재의 장비품을 취득
if @item.is_a? (RPG::Weapon)
item1 = $data_weapons[$game_party.actors[@actor_index].weapon_id]#$data_weapons[actor.weapon_id]
elsif @item.kind == 0
item1 = $data_armors[$game_party.actors[@actor_index].armor1_id]#$data_armors[actor.armor1_id]
elsif @item.kind == 1
item1 = $data_armors[$game_party.actors[@actor_index].armor2_id]#$data_armors[actor.armor2_id]
else
item1 = $data_armors[$game_party.actors[@actor_index].armor3_id]#$data_armors[actor.armor3_id]
end
# 장비 가능한 경우
if actor.equippable? (@item)
# 무기의 경우
if @item.is_a? (RPG::Weapon)
atk1 = item1 != nil ? item1.atk : 0
atk2 = @item != nil ? @item.atk : 0
str1 = item1 != nil ? item1.str_plus : 0
str2 = @item != nil ? @item.str_plus : 0
dex1 = item1 != nil ? item1.dex_plus : 0
dex2 = @item != nil ? @item.dex_plus : 0
agi1 = item1 != nil ? item1.agi_plus : 0
agi2 = @item != nil ? @item.agi_plus : 0
int1 = item1 != nil ? item1.int_plus : 0
int2 = @item != nil ? @item.int_plus : 0
change1 = atk2 - atk1
change4 = str2 - str1
change5 = dex2 - dex1
change6 = agi2 - agi1
change7 = int2 - int1
end
# 방어용 기구의 경우
if @item.is_a? (RPG::Armor)
pdef1 = item1 != nil ? item1.pdef : 0
mdef1 = item1 != nil ? item1.mdef : 0
pdef2 = @item != nil ? @item.pdef : 0
mdef2 = @item != nil ? @item.mdef : 0
str1 = item1 != nil ? item1.str_plus : 0
str2 = @item != nil ? @item.str_plus : 0
dex1 = item1 != nil ? item1.dex_plus : 0
dex2 = @item != nil ? @item.dex_plus : 0
agi1 = item1 != nil ? item1.agi_plus : 0
agi2 = @item != nil ? @item.agi_plus : 0
int1 = item1 != nil ? item1.int_plus : 0
int2 = @item != nil ? @item.int_plus : 0
change2 = pdef2 - pdef1 #+ mdef2 - mdef1
change3 = mdef2 - mdef1
change4 = str2 - str1
change5 = dex2 - dex1
change6 = agi2 - agi1
change7 = int2 - int1
end
# 파라미터의 변화치를 묘화
self.contents.draw_text(124, 64, 112, 32,
sprintf("공격%+d", change1), 2)
self.contents.draw_text(124, 94, 112, 32,
sprintf("방어%+d", change2), 2)
self.contents.draw_text(124, 124, 112, 32,
sprintf("마법방어%+d", change3), 2)
self.contents.draw_text(124, 154, 112, 32,
sprintf("힘%+d", change4), 2)
self.contents.draw_text(124, 184, 112, 32,
sprintf("민첩%+d", change5), 2)
self.contents.draw_text(124, 214, 112, 32,
sprintf("회피%+d", change6), 2)
self.contents.draw_text(124, 244, 112, 32,
sprintf("지능%+d", change7), 2)
end
# 아이템을 묘화
if item1 != nil
x = 4
y = 104
bitmap = RPG::Cache.icon(item1.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 30
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item1.name, opacity)
end
end
end
#-----------------------------------------------
def 번호돌리기#두개를 분리한 이유는 이해가 쉽게하기 위해서
번호를더하라
번호를빼라
end
#-----------------------------------------------
def 번호를더하라
if Input.trigger? (Input::R)
@actor_index += 1
@actor_index %= $game_party.actors.size
refresh
end
end
#------------------------------------------------
def 번호를빼라
if Input.trigger? (Input::L)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
refresh
end
end
#--------------------------------------------------------------------------
# ● 아이템의 설정
# item : 새로운 아이템
#--------------------------------------------------------------------------
def item=(item)
if @item != item
@item = item
refresh
end
end
end
?

  1. Mog_Battle_hud(MZ버전도 있습니다)

    Date2021.03.05 CategoryRPG MVプラグイン By스트레이보우 Views2011 Votes0
    Read More
  2. 컷신 플러그인

    Date2020.10.30 CategoryRPG MVプラグイン By스트레이보우 Views2694 Votes0
    Read More
  3. 업적플러그인

    Date2020.09.02 CategoryRPG MVプラグイン By스트레이보우 Views2262 Votes0
    Read More
  4. 한글조합입력기(영어가능)

    Date2019.11.10 CategoryRPGXP スクリプト By조규진1 Views1201 Votes0
    Read More
  5. 게임에서 제공해주는 노래가 아닌 외부에서 다운받고 안에 넣어쓰려면 어떻게 해야하나요?

    Date2019.07.26 CategoryRPG MVプラグイン ByBigOrca Views1650 Votes0
    Read More
  6. Ghost Effect

    Date2019.01.20 CategoryRPG MVプラグイン By러닝은빛 Views1323 Votes0
    Read More
  7. RPG XP Xas액알

    Date2018.10.30 CategoryRPGXP スクリプト By심심치 Views1330 Votes0
    Read More
  8. 커스텀 숫자 입력 패드

    Date2018.10.19 CategoryRPG MVプラグイン By러닝은빛 Views1398 Votes0
    Read More
  9. 9마리 이상의 몬스터 설정 | More Enemies

    Date2018.08.31 CategoryRPG MVプラグイン By러닝은빛 Views1150 Votes0
    Read More
  10. 동적 맵 타일 수정 플러그인

    Date2018.07.17 CategoryRPG MVプラグイン By베지테리안카카오 Views1250 Votes0
    Read More
  11. VXA에서 XBOX360 컨트롤러 사용 여부 체크

    Date2018.07.15 CategoryRPG VX Ace スクリプト By러닝은빛 Views1053 Votes0
    Read More
  12. RMMV 옵션 창에 메시지 속도 및 글자 크기 변경 기능 추가

    Date2018.07.15 CategoryRPG MVプラグイン By러닝은빛 Views1795 Votes0
    Read More
  13. 한글 데미지 표시

    Date2018.07.09 CategoryRPG MVプラグイン By러닝은빛 Views1613 Votes0
    Read More
  14. [ MV ] 심장[체력표시 하트] 플러그인

    Date2018.07.01 CategoryRPG MVプラグイン By수성의물 Views2407 Votes0
    Read More
  15. [鳥小屋] 실적 플러그인(인게임 트로피 시스템)

    Date2017.10.31 CategoryRPG MVプラグイン By이니군 Views1909 Votes0
    Read More
  16. LuD Script Package

    Date2017.08.16 CategoryRPG VX Ace スクリプト ByLuD Views1820 Votes0
    Read More
  17. [VXAce] 레이어 맵 <layer> 시스템

    Date2017.08.07 CategoryRPG VX Ace スクリプト ByLuD Views1478 Votes0
    Read More
  18. [RPG MV] 퀘스트 마커 지속 표시 플러그인

    Date2017.04.09 CategoryRPG MVプラグイン Bylklslel Views1875 Votes0
    Read More
  19. Mirror Area - RPG Maker MV

    Date2017.01.03 CategoryRPG MVプラグイン By러닝은빛 Views5181 Votes0
    Read More
  20. Keyboard Event - RPG Maker MV

    Date2017.01.03 CategoryRPG MVプラグイン By러닝은빛 Views2456 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15