자유게시판

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

 

 결과는

 

 물리공격의 경우 

 공격력 * 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완폐남™ Views47339
    read more
  2. 만약에 올해의 Worst 작품을 뽑는다면 저는 무조건 이 게임에 투표합니다.

    Date2013.07.27 Category막장 By파치리스 Views576
    Read More
  3. 페르시아의 왕자(Apple II용) 소스코드.

    Date2013.06.26 Category막장 ByAlkaid Views576
    Read More
  4. 베토벤의 비창 소나타...

    Date2011.01.28 Category막장 ByAlkaid Views579
    Read More
  5. 공짜 게임(으익?)

    Date2010.10.28 Category막장 ByAlkaid Views580
    Read More
  6. 형들

    Date2010.11.04 Category막장 By노래하는아이 Views580
    Read More
  7. [액알용] 4방향 이동 / 대쉬 플래그 코드 모음

    Date2010.11.29 Category막장 By시트르산 Views580
    Read More
  8. 심심해서 도스 가상머신 구축중.

    Date2014.01.06 Category막장 ByAlkaid Views581
    Read More
  9. 아가레스트 전기가 뭐하는 게임인가요?

    Date2011.03.05 Category막장 By질풍처럼 Views583
    Read More
  10. 캐릭터 칩

    Date2010.11.02 Category막장 By현문 Views584
    Read More
  11. 게임 첨부파일 올리려는데 이상해요

    Date2014.01.20 Category막장 By지프스 Views584
    Read More
  12. 블랙스타는 보아라

    Date2011.02.25 Category막장 By소울◎이터 Views586
    Read More
  13. 미드나잇 블루의 스킬 데미지 계산식 스크립트

    Date2011.01.16 Category막장 By시트르산 Views589
    Read More
  14. 방금 스미싱 주의 문자가 왔네요.

    Date2014.02.11 Category막장 ByBunny_Boy Views593
    Read More
  15. 게임 규제 법안 주요내용

    Date2013.11.03 Category막장 By파치리스 Views596
    Read More
  16. 다크브라더후드

    Date2011.01.02 Category막장 By현문 Views597
    Read More
  17. 오늘도 제작을 해야지!

    Date2014.01.31 Category막장 By명란젓 Views597
    Read More
  18. 현문님2

    Date2010.12.04 Category막장 BySCUD Views598
    Read More
  19. 잇힝 오랜만에 막계드립좀쳐볼까

    Date2011.02.25 Category막장 ByrlawnsahXP Views598
    Read More
  20. 나렌시아님

    Date2011.02.21 Category막장 BySCUD Views599
    Read More
  21. 직업체험 하는데

    Date2012.10.19 Category막장 By하늘바라KSND Views599
    Read More
목록
Board Pagination Prev 1 ... 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ... 64 Next
/ 64