자유게시판

#==============================================================================
# ● RPG::Armor
#==============================================================================

class Armor
  #--------------------------------------------------------------------------
  # ● MaxHP 변화량을 메모로부터 취득한다. ex) maxhp(n)
  #--------------------------------------------------------------------------
  def maxhp
    text = @note[/maxhp(-*d+)/]
    return 0 if text == nil
    result = text[/d+/].to_i
    return (text.include?("-") ? -result : result)
  end
  #--------------------------------------------------------------------------
  # ● MaxTP 변화량을 메모로부터 취득한다. ex) maxmp(n)
  #--------------------------------------------------------------------------
  def maxmp
    text = @note[/maxmp(-*d+)/]
    return 0 if text == nil
    result = text[/d+/].to_i
    return (text.include?("-") ? -result : result)
  end
  #--------------------------------------------------------------------------
  # ● PDP 추가치를 메모로부터 취득한다. ex) pdp(n)
  #--------------------------------------------------------------------------
  def pdp
    text = @note[/pdp(-*d+)/]
    return 0 if text == nil
    result = text[/d+/].to_i
    return (text.include?("-") ? -result : result)
  end
  #--------------------------------------------------------------------------
  # ● MDP 추가치를 메모로부터 취득한다. ex) mdp(n)
  #--------------------------------------------------------------------------
  def mdp
    text = @note[/mdp(-*d+)/]
    return 0 if text == nil
    result = text[/d+/].to_i
    return (text.include?("-") ? -result : result)
  end
  #--------------------------------------------------------------------------
  # ● WP 추가치를 메모로부터 취득한다. ex) wp(n)
  #--------------------------------------------------------------------------
  def wp
    text = @note[/wp(-*d+)/]
    return 0 if text == nil
    result = text[/d+/].to_i
    return (text.include?("-") ? -result : result)
  end
  #--------------------------------------------------------------------------
  # ● PEV 추가치를 메모로부터 취득한다. ex) pev(n)
  #--------------------------------------------------------------------------
  def pev
    text = @note[/pev(-*d+)/]
    return 0 if text == nil
    result = text[/d+/].to_i
    return (text.include?("-") ? -result : result)
  end
  #--------------------------------------------------------------------------
  # ● MEV 추가치를 메모로부터 취득한다. ex) mev(n)
  #--------------------------------------------------------------------------
  def mev
    text = @note[/mev(-*d+)/]
    return 0 if text == nil
    result = text[/d+/].to_i
    return (text.include?("-") ? -result : result)
  end
end

 

이렇게 하면 뭐가 되냐면

방어구(class Armor)의 메모(@note)를 검색해서 가령 mev(3)이란 문자열이 있을 때

mev는 검색판별로 사용하고 실질값 3을 구해서 armor.mev등으로 추가하는거죠.

즉 그경우 armor(game_actor에선 armor_id를 @item으로 넣어버리므로 @item.mev).mev는 3이 됩니다.


  1. 아방스 게시물 · 댓글 작성 규칙 (최근 수정일 2015.11.25)

    Date2012.07.17 Category공지 By완폐남™ Views41184
    read more
  2. 카페 로고 변경~

    Date2009.10.29 Category잡담 BySkybound Views967
    Read More
  3. 미친 모양임

    Date2009.10.29 Category잡담 ByEvangelista Views1039
    Read More
  4. 아래 세이버 거의 최종단계 ㅇㅅㅇ..(완성)

    Date2009.10.29 Category잡담 By봉시기 Views1185
    Read More
  5. 베렌소아 마을 수정 전후 - 어느게 더 좋나요?

    Date2009.10.29 Category잡담 By달표범 Views1508
    Read More
  6. 푸사 플래닝 재구성 중 겨우 대미지 계산식 재구성 완료했네요.

    Date2009.10.28 Category잡담 ByEvangelista Views1165
    Read More
  7. 차기작 폭풍의 아이, 완성된 맵칩들

    Date2009.10.28 Category잡담 By달표범 Views1418
    Read More
  8. 엔딩만들어드립니다

    Date2009.10.28 By영웅 Views879
    Read More
  9. IS THIS FARMMM?

    Date2009.10.28 Category잡담 By코르뉴 Views1318
    Read More
  10. 타이틀에 넣을 뒷배경 대충 구도..?

    Date2009.10.28 By라이네크 Views972
    Read More
  11. 실시간 강좌 +_+(1차명암까지~)

    Date2009.10.27 Category잡담 By봉시기 Views1231
    Read More
  12. D-16 :: 91년생 멸망의 날... 얼마 남지 않았군(?).

    Date2009.10.27 Category잡담 ByMania Views902
    Read More
  13. 게임이름 패도의길-레퀴엠- --> 카오틱 히어로스 ~ 시간의 검~ // 으로 변경... 타이틀 사진이랑 캐릭터소개 합니다 "ㅆ";

    Date2009.10.27 By라이네크 Views1573
    Read More
  14. 바니걸 세이버 완성 +_+..?

    Date2009.10.27 Category잡담 By봉시기 Views1094
    Read More
  15. 진정한 논리퀴즈...

    Date2009.10.27 Category잡담 By코르뉴 Views1239
    Read More
  16. 후웁... 라이네크님 카나미님.

    Date2009.10.26 Category잡담 By시옷전사 Views1099
    Read More
  17. 내일 영화봅니답

    Date2009.10.26 Category잡담 Byzero_som Views1436
    Read More
  18. 중간고사결과!!!!!

    Date2009.10.26 Category잡담 Byvx가좋나xp가좋나 Views770
    Read More
  19. 오류가 떠요 ㅠㅠ..(어디에 올릴지 몰라서 이곳에 올려봅니다.)

    Date2009.10.26 By만득이 Views1911
    Read More
  20. 할일없는아방스 회원을 위한 논리퀴즈.

    Date2009.10.26 Category잡담 Byzero_som Views1638
    Read More
  21. 패도의길 . 총 사용가능한? 액터들 공개..

    Date2009.10.26 By라이네크 Views1137
    Read More
목록
Board Pagination Prev 1 ... 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 ... 755 Next
/ 755