자유게시판

수십번의 밸런스 조절 후에 결정된 계산식.

 

 결과는

 

 물리공격의 경우 

 공격력 * 4 +   ( 스킬 파워 *  (공격력 *3 + 정신력)/2 )의 정수 - 방어력 * 3 - 방어력*스킬파워

 로서 나타남.

 

다른 스탯이 미치는 공격의 경우에도 위와 같은 식으로 데미지가 계산되며

크리티컬 시 원래 데미지에 곱해지는 계수는 스킬마다 다르다.

(예를 들면  기습의 경우는 원 공격의 2배 데미지가 크리티컬 시 적용되지만

  급소 찌르기 스킬의 경우 원 공격의 3.5배의 데미지가 크리티컬 시 적용됨)

 

여기에 추가해야할 데미지 계산식은 방어무시판정과 방어시 2배 데미지

 플래그를 모든 스킬의 데이터베이스에 적용하고,

이를 데미지 계산식에 적용하는 것 등.

 

  조만간 전투 씬 까지 완료되면 스토리 폭풍제작하여 체험판 낼게요.

 

    # 제일 명중 판정
    hit = skill.hit
    hit *= user.hit / 100
    hit_result = (rand(100) < hit)
   
    # 불확실한 스킬의 경우는 유효 플래그를 세트
    effective |= hit < 100
    pow_rate = 1
   
    # 명중의 경우
    if hit_result == true
      # 위력을 계산
      if skill.classify == 1 || skill.classify == 2 || skill.classify == 3
        if user.isactor
          power = user.str*4+(skill.power[@actor.id] * (user.str*3+user.men)/2).to_i
        elsif user.isactor == false
          power = user.str*4+(skill.power[@actor.id+100] * (user.str*3+user.men)/2).to_i
        end
        if power > 0 # 파워가 0보다 크면
          power -= self.dex*3 + (skill.power[@actor.id] * self.dex).to_i
          power = [power, 1].max
        end
      elsif skill.classify == 4 || skill.classify == 5 || skill.classify == 6
        if user.isactor
          power = user.int*4+(skill.power[@actor.id] * (user.int*3+user.men)/2).to_i
        elsif user.isactor == false
          power = user.int*4+(skill.power[@actor.id+100] * (user.int*3+user.men)/2).to_i         
        end
        if power > 0 # 파워가 0보다 크면
          power -= self.reg*3  + (skill.power[@actor.id] * self.reg).to_i
          power = [power, 1].max
        end
      elsif skill.classify == 7 || skill.classify == 8 || skill.classify == 9
        if user.isactor
          power = user.men*4+(skill.power[@actor.id] / 2 * (user.men*3+user.int/2+user.atk/2)).to_i
        elsif user.isactor == false
          power = user.men*4+(skill.power[@actor.id+100] /2 * (user.men*3+user.int/2+user.atk/2)).to_i
        end
        if power > 0 # 파워가 0보다 크면
          power -= self.men*3  + (skill.power[@actor.id] * self.men).to_i
          power = [power, 1].max
        end
      end
     
      # 배율을 계산
      rate = 1
      # 기본 데미지를 계산
      self.damage = power.to_i
     
      # 크리티컬 수정
      if rand(100) < user.cri_rate + skill.cri_rate
        self.damage += (self.damage* 7/10 * skill.cri_power).to_i
        self.critical = true
      end
       
      # 데미지의 부호가 정의 경우
      if self.damage > 0
        # 방어 수정
        if self.guarding?
          self.damage /= 2
        end
      end
      # 분산
      if skill.variance > 0 and self.damage.abs > 0
        amp = [self.damage.abs * skill.variance / 100, 1].max
        self.damage += rand(amp+1) + rand(amp+1) - amp
      end
      # 제2 명중 판정
      eva = 8 + self.eva
      hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
      hit = self.cant_evade? ? 100 : hit
      hit_result = (rand(100) < hit)
      # 불확실한 스킬의 경우는 유효 플래그를 세트
      effective |= hit < 100
    end
   
    # 명중의 경우
    if hit_result == true
      # 위력 0 이외의 물리 공격의 경우
      if skill.power != 0 and skill.atk_f > 0
        # 스테이트 충격 해제
        remove_states_shock
        # 유효 플래그를 세트
        effective = true
      end
      # HP 로부터 데미지를 감산
      last_hp = self.hp
      self.hp -= self.damage
      effective |= self.hp != last_hp
      # 스테이트 변화
      @state_changed = false
      effective |= states_plus(skill.plus_state_set)
      effective |= states_minus(skill.minus_state_set)
      # 위력이 0 의 경우
      if skill.power == 0
        # 데미지에 공문자열을 설정
        self.damage = ""
        # 스테이트에 변화가 없는 경우
        unless @state_changed
          # 데미지에 "Miss" 를 설정
          self.damage = "Miss"
        end
      end
    # 미스의 경우
    else
      # 데미지에 "Miss" 를 설정
      self.damage = "Miss"
      # 위기 플래그를 클리어
      self.critical = false
    end
    # 전투중이 아닌 경우
    unless $game_temp.in_battle
      # 데미지에 nil 를 설정
      self.damage = nil
    end
    # 메소드 종료
    return effective
  end

Who's 시트르산

?

제작중인 게임 :

Midnight Blue  (미드나잇 블루) - RPGXP

 공동제작 : 휘파람개비님

 시스템 : 45%, 스토리 : 10%, 맵 : 3%, 제작 : 1%

 CG : 2%         총 진행도 : 3%

 

 이번 게임은 공동제작인 만큼 최선을 다하겠습니다 ^^

기다려주세요~~

Comment '3'

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

    Date2012.07.17 Category공지 By완폐남™ Views41184
    read more
  2. 뭐냐.

    Date2011.07.14 Category막장 Bystar211 Views866
    Read More
  3. 뭐시라 아오오니 실사 영화?

    Date2014.04.23 Category막장 ByAlkaid Views1046
    Read More
  4. 뭐야 이거

    Date2011.02.02 Category막장 By남탕의옵저버 Views397
    Read More
  5. 뭐져?! 이 현상은?!

    Date2014.02.06 Category막장 By쌍쌍뱌 Views652
    Read More
  6. 뭐지.. 어쩌다가 맵칩도트까지.. ?

    Date2013.10.31 Category막장 By레모네이드립톤 Views1003
    Read More
  7. 뭔가 괴담같은 이야기를 하나 쓰고 있습니다.

    Date2011.03.10 Category막장 ByAlkaid Views665
    Read More
  8. 뭔가 괴이한 곳을 다녀왔다.

    Date2012.11.01 Category막장 By하늘바라KSND Views905
    Read More
  9. 뭔가 그냥 생각난 것.

    Date2011.04.25 Category막장 ByAlkaid Views724
    Read More
  10. 뭔가 스플린터 셀 강지화를 그린 것 같은데

    Date2013.11.16 Category막장 By스틱커쳐 Views941
    Read More
  11. 뭔가 쓰고 싶은 것이 있는데...

    Date2016.07.23 Category막장 ByAlkaid Views69
    Read More
  12. 뭔가 정신나간...........(망상력 발동중)

    Date2011.07.19 Category막장 ByAlkaid Views908
    Read More
  13. 미니게임 [고고 오리히메!!] 투척

    Date2011.06.05 Category막장 By양념통닼 Views7550
    Read More
  14. 미드나잇 블루의 스킬 데미지 계산식 스크립트

    Date2011.01.16 Category막장 By시트르산 Views579
    Read More
  15. 미디음은 음원 고르기 나름...

    Date2013.09.24 Category막장 ByAlkaid Views536
    Read More
  16. 미디파일 재생을 위한 어떤 뻘짓.

    Date2014.05.15 Category막장 ByAlkaid Views1428
    Read More
  17. 미디파일 하나를 듣기 위해서 하게 되는 것.

    Date2013.10.12 Category막장 ByAlkaid Views1107
    Read More
  18. 미디파일을 재생하면 깡통소리밖에 안나온다면...

    Date2011.11.23 Category막장 ByAlkaid Views1139
    Read More
  19. 미루님!

    Date2013.05.15 Category막장 By하늘바라KSND Views909
    Read More
  20. 미술시간에 만든 막장 캐릭터 세팅

    Date2013.02.07 Category막장 ByTheEK Views814
    Read More
  21. 미양님

    Date2010.11.06 Category막장 By시트르산 Views509
    Read More
목록
Board Pagination Prev 1 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 ... 64 Next
/ 64