RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Characters will not die?

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 83
Hello, I think this is my final issue, 2 issues in a hole game isn't bad In my opinion, Shaz helped me with my last issue and I thank you, you are in the credits even know You said do not worry about it ^^.


this issue, I think but unsure as to where its coming from, but I think its in my battle script, and my battle script is actually about 6 scripts, to rotate characters, both directions, monsters, both sides can or can not escape ect. so I can not post all that, if anyone is willing to take a look at it and see if there's anything you can do for it, I can give you the scripts and images, but not the maps ^^ same thing my testers would get, only dif is you would have source code ^^... I hope someone can take this up, even know I am unsure as to where exactly it is coming from, what happens is, when the players get hurt and brought down to 1 health, they have the healing icon on 24/7 and they never die, some kind of odd god mode?... and occasionally they heal to like 5k i even tried with them at 1 health and they jumped to 5k as if they instantly leveled maby its the fatigue meter or maby the Combat meter as to when the turns are, as the combat meter i know has a lot of true and false info in it. that might deal with that type of stuff. Well I hope someone could take this up, if you can just pm or post here your contact email and I can send it but as for posting scripts, it is so massive to look threw, it is not really worth the posting of scripts, might not be able to spot it just by looking at the scripts, might be an trial and error issue.







I would like to add, that I did try an fix this issue, several times, and on multiple times it screwed up the game when I edited too much, I can not seem to find where it would be located, I wish I could do it my self, as I do not like asking for help on anything...





EDIT BELOW:
Hello, I did some trial and error and I limited it to 3 Scripts.


Game_Battler 1, Game_Battler 2, Game_Battler 3









Hope someone could see where the unkillable is coming from?








Code: [Select]
#==============================================================================
# ? Game_Battler (???? 1)
#------------------------------------------------------------------------------
# ???????????????????? Game_Actor ???? Game_Enemy ??
# ???????????????????
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  attr_reader   :battler_name             # ???? ?????
  attr_reader   :battler_hue              # ???? ??
  attr_reader   :hp                       # HP
  attr_reader   :sp                       # SP
  attr_reader   :states                   # ????
  attr_accessor :hidden                   # ?????
  attr_accessor :immortal                 # ??????
  attr_accessor :damage_pop               # ?????????
  attr_accessor :damage                   # ?????
  attr_accessor :critical                 # ?????????
  attr_accessor :animation_id             # ??????? ID
  attr_accessor :animation_hit            # ??????? ??????
  attr_accessor :white_flash              # ?????????
  attr_accessor :blink                    # ?????    
  attr_accessor   :limit
  attr_accessor   :limit_break_1
  attr_accessor   :limit_break_2
  attr_accessor   :limit_break_3
  attr_accessor   :limit_break_4
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def initialize
    @battler_name = ""
    @battler_hue = 0
    @hp = 0
    @sp = 0
    @states = []
    @states_turn = {}
    @maxhp_plus = 0
    @maxsp_plus = 0
    @str_plus = 0
    @dex_plus = 0
    @agi_plus = 0
    @int_plus = 0
    @hidden = false
    @immortal = false
    @damage_pop = false
    @damage = nil
    @critical = false
    @animation_id = 0
    @animation_hit = false
    @white_flash = false
    @blink = false
    @limit = 0
    @limit_break_1 = []
    @limit_break_2 = []
    @limit_break_3 = []
    @limit_break_4 = []
    @current_action = Game_BattleAction.new
  end
  #--------------------------------------------------------------------------
  # ? MaxHP ???
  #-------------------------------------------------------------------------
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, 999999].min
    return n
  end
  #--------------------------------------------------------------------------
  # ? MaxSP ???
  #--------------------------------------------------------------------------
  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, 9999].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, 9999].min
    return n
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def str
    n = [[base_str + @str_plus, 1].max, 999].min
    for i in @states
      n *= $data_states[i].str_rate / 100.0
    end
    n = [[Integer(n), 1].max, 999].min
    return n
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def dex
    n = [[base_dex + @dex_plus, 1].max, 999].min
    for i in @states
      n *= $data_states[i].dex_rate / 100.0
    end
    n = [[Integer(n), 1].max, 999].min
    return n
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def agi
    n = [[base_agi + @agi_plus, 1].max, 999].min
    for i in @states
      n *= $data_states[i].agi_rate / 100.0
    end
    n = [[Integer(n), 1].max, 999].min
    return n
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def int
    n = [[base_int + @int_plus, 1].max, 999].min
    for i in @states
      n *= $data_states[i].int_rate / 100.0
    end
    n = [[Integer(n), 1].max, 999].min
    return n
  end
  #--------------------------------------------------------------------------
  # ? MaxHP ???
  #     maxhp : ??? MaxHP
  #--------------------------------------------------------------------------
  def maxhp=(maxhp)
    @maxhp_plus += maxhp - self.maxhp
    @maxhp_plus = [[@maxhp_plus, -9999].max, 9999].min
    @hp = [@hp, self.maxhp].min
  end
  #--------------------------------------------------------------------------
  # ? MaxSP ???
  #     maxsp : ??? MaxSP
  #--------------------------------------------------------------------------
  def maxsp=(maxsp)
    @maxsp_plus += maxsp - self.maxsp
    @maxsp_plus = [[@maxsp_plus, -9999].max, 9999].min
    @sp = [@sp, self.maxsp].min
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #     str : ?????
  #--------------------------------------------------------------------------
  def str=(str)
    @str_plus += str - self.str
    @str_plus = [[@str_plus, -999].max, 999].min
  end

  #--------------------------------------------------------------------------
  # ? ??????
  #     dex : ??????
  #--------------------------------------------------------------------------
  def dex=(dex)
    @dex_plus += dex - self.dex
    @dex_plus = [[@dex_plus, -999].max, 999].min
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #     agi : ??????
  #--------------------------------------------------------------------------
  def agi=(agi)
    @agi_plus += agi - self.agi
    @agi_plus = [[@agi_plus, -999].max, 999].min
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #     int : ?????
  #--------------------------------------------------------------------------
  def int=(int)
    @int_plus += int - self.int
    @int_plus = [[@int_plus, -999].max, 999].min
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def hit
    n = 100
    for i in @states
      n *= $data_states[i].hit_rate / 100.0
    end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # ? ??????
  def bash
    n = 80
    for i in @states
      n *= $data_states[i].bash_rate / 80.0
    end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  def atk
    n = base_atk
    for i in @states
      n *= $data_states[i].atk_rate / 100.0
    end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def pdef
    n = base_pdef
    for i in @states
      n *= $data_states[i].pdef_rate / 100.0
    end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def mdef
    n = base_mdef
    for i in @states
      n *= $data_states[i].mdef_rate / 100.0
    end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def eva
    n = base_eva
    for i in @states
      n += $data_states[i].eva
    end
    return n
  end
  #--------------------------------------------------------------------------
  # ? HP ???
  #     hp : ??? HP
  #--------------------------------------------------------------------------
  def hp=(hp)
    @hp = [[hp, maxhp].min, 0].max
    # ????????????
    for i in 1...$data_states.size
      if $data_states[i].zero_hp
        if self.dead?
          add_state(i)
        else
          remove_state(i)
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? SP ???
  #     sp : ??? SP
  #--------------------------------------------------------------------------
  def sp=(sp)
    @sp = [[sp, maxsp].min, 0].max
  end
  #--------------------------------------------------------------------------
  # ? ???
  #--------------------------------------------------------------------------
  def recover_all
    @hp = maxhp
    @sp = maxsp
    for i in @states.clone
      remove_state(i)
    end
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  def current_action
    return @current_action
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  def make_action_speed
    @current_action.speed = agi + rand(10 + agi / 4)
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def dead?
    return (@hp == 0 and not @immortal)
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def exist?
    return (not @hidden and (@hp > 0 or @immortal))
  end
  #--------------------------------------------------------------------------
  # ? HP 0 ??
  #--------------------------------------------------------------------------
  def hp0?
    return (not @hidden and @hp == 0)
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def inputable?
    return (not @hidden and restriction <= 1)
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def movable?
    return (not @hidden and restriction < 4)
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def guarding?
    return (@current_action.kind == 0 and @current_action.basic == 1)
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def resting?
    return (@current_action.kind == 0 and @current_action.basic == 3)
  end
end
























Code: [Select]
#==============================================================================
# ? Game_Battler (???? 2)
#------------------------------------------------------------------------------
# ???????????????????? Game_Actor ???? Game_Enemy ??
# ???????????????????
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ? ???????
  #     state_id : ???? ID
  #--------------------------------------------------------------------------
  def limit_break?(limit_id)
    @actor = $game_party.actors[limit_id]
     @actor.add_state(22)
    @add_data = eval("@actor.limit_break_#{self.id}.push(rand(18) + 17)")
    @eval = eval("@actor.learn_skill(@actor.limit_break_#{self.id}[0])")
    @actor.limit = 0
    add_hp_limit_actor?(limit_id)
    @eval = eval("@actor.limit_break_#{self.id}.clear")
   # print eval("@actor.limit_break_#{self.id}.inspect")
   # actor = $game_party.actors[limit_id]
   # print "Player #{self.id} limit is " + (actor.limit).to_s
 end
 
   def add_hp_limit_actor?(limit_id)
      @actor = $game_party.actors[limit_id]
      @eval = eval("@actor.hp += @actor.limit_break_#{self.id}[0]")
    end
    
    def lose_skill?(actor_id, skill_id)
      @actor = $game_party.actors[actor_id - 1]
      @actor.forget_skill(@skill_id)
    end
  
  def state?(state_id)
    # ????????????????? true ???
    return @states.include?(state_id)
  end
  #counter state
  def cant_statecounter?
    for i in @states
      if $data_states[i].name == "counter"
        return true
      end
    end
    return false
  end
#counter
  #--------------------------------------------------------------------------
  # ? ??????????????
  #     state_id : ???? ID
  #--------------------------------------------------------------------------
  def state_full?(state_id)
    # ?????????????????? false ???
    unless self.state?(state_id)
      return false
    end
    # ??????? -1 (???????) ?? true ???
    if @states_turn[state_id] == -1
      return true
    end
    # ??????????????????????? true ???
    return @states_turn[state_id] == $data_states[state_id].hold_turn
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #     state_id : ???? ID
  #     force    : ??????? (?????????????)
  #--------------------------------------------------------------------------
  def add_state(state_id, force = false)
    # ??????????
    if $data_states[state_id] == nil
      # ??????
      return
    end
    # ??????????
    unless force
      # ???????????
      for i in @states
        # ?????????????????????? (-) ????????
        # ????????????????????? (-) ?????????
        # (ex : ????????????????????)
        if $data_states[i].minus_state_set.include?(state_id) and
           not $data_states[state_id].minus_state_set.include?(i)
          # ??????
          return
        end
      end
    end
    # ?????????????????
    unless state?(state_id)
      # ???? ID ? @states ?????
      @states.push(state_id)
      # ????? [HP 0 ???????] ??????
      if $data_states[state_id].zero_hp
        # HP ? 0 ???
        @hp = 0
      end
      # ?????????
      for i in 1...$data_states.size
        # ?????? (+) ??
        if $data_states[state_id].plus_state_set.include?(i)
          add_state(i)
        end
        # ?????? (-) ??
        if $data_states[state_id].minus_state_set.include?(i)
          remove_state(i)
        end
      end
      # ??????????? (????????????) ?????
      @states.sort! do |a, b|
        state_a = $data_states[a]
        state_b = $data_states[b]
        if state_a.rating > state_b.rating
          -1
        elsif state_a.rating < state_b.rating
          +1
        elsif state_a.restriction > state_b.restriction
          -1
        elsif state_a.restriction < state_b.restriction
          +1
        else
          a <=> b
        end
      end
    end
    # ???????
    if force
      # ???????????? -1 (??) ???
      @states_turn[state_id] = -1
    end
    # ??????????
    unless  @states_turn[state_id] == -1
      # ??????????????
      @states_turn[state_id] = $data_states[state_id].hold_turn
    end
    # ???????
    unless movable?
      # ?????????
      @current_action.clear
    end
    # HP ??? SP ????????
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #     state_id : ???? ID
  #     force    : ??????? (?????????????)
  #--------------------------------------------------------------------------
  def remove_state(state_id, force = false)
    # ????????????????
    if state?(state_id)
      # ??????????????????????????
      if @states_turn[state_id] == -1 and not force
        # ??????
        return
      end
      # ??? HP ? 0 ?? ????? [HP 0 ???????] ??????
      if @hp == 0 and $data_states[state_id].zero_hp
        # ??? [HP 0 ???????] ?????????????
        zero_hp = false
        for i in @states
          if i != state_id and $data_states[i].zero_hp
            zero_hp = true
          end
        end
        # ??????????????HP ? 1 ???
        if zero_hp == false
          @hp = 1
        end
      end
      # ???? ID ? @states ????? @states_turn ????????
      @states.delete(state_id)
      @states_turn.delete(state_id)
    end
    # HP ??? SP ????????
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
  #--------------------------------------------------------------------------
  # ? ???????????? ID ??
  #--------------------------------------------------------------------------
  def state_animation_id
    # ???????????????????
    if @states.size == 0
      return 0
    end
    # ????????????????????? ID ???
    return $data_states[@states[0]].animation_id
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def restriction
    restriction_max = 0
    # ?????????????????? restriction ???
    for i in @states
      if $data_states[i].restriction >= restriction_max
        restriction_max = $data_states[i].restriction
      end
    end
    return restriction_max
  end
  #--------------------------------------------------------------------------
  # ? ???? [EXP ???????] ??
  #--------------------------------------------------------------------------
  def cant_get_exp?
    for i in @states
      if $data_states[i].cant_get_exp
        return true
      end
    end
    return false
  end
  #--------------------------------------------------------------------------
  # ? ???? [?????????] ??
  #--------------------------------------------------------------------------
  def cant_evade?
    for i in @states
      if $data_states[i].cant_evade
        return true
      end
    end
    return false
  end
  #--------------------------------------------------------------------------
  # ? ???? [????????] ??
  #--------------------------------------------------------------------------
  def slip_damage?
    for i in @states
      if $data_states[i].slip_damage
        return true
      end
    end
    return false
  end
  #--------------------------------------------------------------------------
  # ? ??????????? (???????????)
  #--------------------------------------------------------------------------
  def remove_states_battle
    for i in @states.clone
      if $data_states[i].battle_only
        remove_state(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ???????? (??????????)
  #--------------------------------------------------------------------------
  def remove_states_auto
    for i in @states_turn.keys.clone
      if @states_turn[i] > 0
        @states_turn[i] -= 1
      elsif rand(100) < $data_states[i].auto_release_prob
        remove_state(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ???????? (?????????????)
  #--------------------------------------------------------------------------
  def remove_states_shock
    for i in @states.clone
      if rand(100) < $data_states[i].shock_release_prob
        remove_state(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (+) ???
  #     plus_state_set  : ?????? (+)
  #--------------------------------------------------------------------------
  def states_plus(plus_state_set)
    # ?????????
    effective = false
    # ??? (????????)
    for i in plus_state_set
      # ?????????????????
      unless self.state_guard?(i)
        # ???????????????????????
        effective |= self.state_full?(i) == false
        # ????? [?????] ???
        if $data_states[i].nonresistance
          # ?????????????
          @state_changed = true
          # ???????
          add_state(i)
        # ???????????????
        elsif self.state_full?(i) == false
          # ????????????????????
          if rand(100) < [0,100,80,60,40,20,0][self.state_ranks[i]]
            # ?????????????
            @state_changed = true
            # ???????
            add_state(i)
          end
        end
      end
    end
    # ??????
    return effective
  end
  #--------------------------------------------------------------------------
  # ? ?????? (-) ???
  #     minus_state_set : ?????? (-)
  #--------------------------------------------------------------------------
  def states_minus(minus_state_set)
    # ?????????
    effective = false
    # ??? (????????)
    for i in minus_state_set
      # ????????????????????????
      effective |= self.state?(i)
      # ?????????????
      @state_changed = true
      # ???????
      remove_state(i)
    end
    # ??????
    return effective
  end
end








Code: [Select]
#==============================================================================
# ? Game_Battler (???? 3)
#------------------------------------------------------------------------------
# ???????????????????? Game_Actor ???? Game_Enemy ??
# ???????????????????
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ? ??????????
  #     skill_id : ??? ID
  #--------------------------------------------------------------------------
  def skill_can_use?(skill_id)
    #state
    # SP ????????????
    if $data_skills[skill_id].sp_cost > self.sp
      return false
    end
    # ????????????
    if dead?
      return false
    end
    # ????????????????????
    if $data_skills[skill_id].atk_f == 0 and self.restriction == 1
      return false
    end
    #state change
    #state change
    # ????????
    occasion = $data_skills[skill_id].occasion
    # ??????
    if $game_temp.in_battle
      # [??] ??? [?????] ?????
      return (occasion == 0 or occasion == 1)
    # ?????????
    else
      # [??] ??? [??????] ?????
      return (occasion == 0 or occasion == 2)
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #     attacker : ??? (????)
  #--------------------------------------------------------------------------
  def attack_effect(attacker)
    # ?????????????
    self.critical = false
    # ??????
    hit_result = (rand(100) < attacker.hit)
    # ?????
    if hit_result == true
      # ?????????
      atk = [attacker.atk - self.pdef / 2, 0].max
      self.damage = atk * (20 + attacker.str) / 20
      # ????
      self.damage *= elements_correct(attacker.element_set)
      self.damage /= 100
      # ????????????
      if self.damage > 0
        # ????????
        if rand(100) < 4 * attacker.dex / self.agi
          self.damage *= 2
          self.critical = true
        end
        # ????
        if self.guarding?
          self.damage /= 2
        end
      end
      # ??
      if self.damage.abs > 0
        amp = [self.damage.abs * 15 / 100, 1].max
        self.damage += rand(amp+1) + rand(amp+1) - amp
      end
      # ??????
      eva = 8 * self.agi / attacker.dex + self.eva
      hit = self.damage < 0 ? 100 : 100 - eva
      hit = self.cant_evade? ? 100 : hit
      hit_result = (rand(100) < hit)
    end
    # ?????
       if cant_statecounter?
      if self.is_a?(Game_Enemy)
        target = $game_party.random_target_actor   #attack actor
      else
        target = $game_troop.random_target_enemy   #attack enemy  
      end
      if target != nil and self.damage != nil and self.damage != 0
        #?????????????
        target.damage = self.damage
        damages = self.damage
        target.damage = "Counter Attack!! {#{target.damage}}"
        target.hp = target.hp - damages
      end
      self.damage = 0
      hit_result = false
    end
     #counter
    
    if hit_result == true
      # ????????
      remove_states_shock
      # HP ?????????
      self.hp -= self.damage
       if instance_of?(Game_Actor) and self.damage > 0
         actor = $game_party.actors[self.id - 1]
      actor.limit += (actor.limit + 25.0 * self.damage / maxhp).floor
      actor.hp = actor.maxhp
      actor.sp = actor.maxsp
      #print actor.limit.to_s + "\n" + "Player #{self.id} recieved #{self.damage}"
      if actor.limit >= 75#|| nil
        limit_break?(self.id - 1)
       # return actor.limit = 0
      end
    end
      # ??????
      @state_changed = false
      states_plus(attacker.plus_state_set)
      states_minus(attacker.minus_state_set)
    # ?????
    else
      # ????? "Miss" ???
      self.damage = "Miss"
      # ?????????????
      self.critical = false
    end
    # ??????
    return true
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #     user  : ??????? (????)
  #     skill : ???
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    # ?????????????
    self.critical = false
    # ????????? HP 1 ?????????? HP ? 0?
    # ???????????? HP 0 ???????? HP ? 1 ?????
    if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
       ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
      # ??????
      return false
    end
    # ?????????
    effective = false
    # ??????? ID ????????????????
    effective |= skill.common_event_id > 0
    # ??????
    hit = skill.hit
    if skill.atk_f > 0
      hit *= user.hit / 100
    end
    hit_result = (rand(100) < hit)
    # ????????????????????
    effective |= hit < 100
    # ?????
    if hit_result == true
      
      # ?????
      power = skill.power + user.atk * skill.atk_f / 100
      if power > 0
        power -= self.pdef * skill.pdef_f / 200
        power -= self.mdef * skill.mdef_f / 200
        power = [power, 0].max
      end
      # ?????
      rate = 20
      rate += (user.str * skill.str_f / 100)
      rate += (user.dex * skill.dex_f / 100)
      rate += (user.agi * skill.agi_f / 100)
      rate += (user.int * skill.int_f / 100)
      # ?????????
      self.damage = power * rate / 20
      # ????
      self.damage *= elements_correct(skill.element_set)
      self.damage /= 100
      # ????????????
      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
      # ??????
      eva = 8 * self.agi / user.dex + 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
    #counter
    #????
    #????????????????????????????
    if cant_statecounter?
      if self.is_a?(Game_Enemy)
        target = $game_party.random_target_actor   #attack actor
      else
        target = $game_troop.random_target_enemy   #attack enemy  
      end
      if target != nil and self.damage != nil and self.damage != 0
        #?????????????
        target.damage = self.damage
        damages = self.damage
        target.damage = "Counter Attack!! {#{target.damage}}"
        target.hp = target.hp - damages
      end
      self.damage = 0
      hit_result = false
    end
     #counter
    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 = "Super"
    end
    # ????????
    unless $game_temp.in_battle
      # ????? nil ???
      self.damage = nil
    end
    # ??????
    return effective
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #     item : ????
  #--------------------------------------------------------------------------
  def item_effect(item)
    # ?????????????
    self.critical = false
    # ?????????? HP 1 ?????????? HP ? 0?
    # ????????????? HP 0 ???????? HP ? 1 ?????
    if ((item.scope == 3 or item.scope == 4) and self.hp == 0) or
       ((item.scope == 5 or item.scope == 6) and self.hp >= 1)
      # ??????
      return false
    end
    # ?????????
    effective = false
    # ??????? ID ????????????????
    effective |= item.common_event_id > 0
    # ????
    hit_result = (rand(100) < item.hit)
    # ????????????????????
    effective |= item.hit < 100
    # ?????
    if hit_result == true
      # ??????
      recover_hp = maxhp * item.recover_hp_rate / 100 + item.recover_hp
      recover_sp = maxsp * item.recover_sp_rate / 100 + item.recover_sp
      if recover_hp < 0
        recover_hp += self.pdef * item.pdef_f / 20
        recover_hp += self.mdef * item.mdef_f / 20
        recover_hp = [recover_hp, 0].min
      end
      # ????
      recover_hp *= elements_correct(item.element_set)
      recover_hp /= 100
      recover_sp *= elements_correct(item.element_set)
      recover_sp /= 100
      # ??
      if item.variance > 0 and recover_hp.abs > 0
        amp = [recover_hp.abs * item.variance / 100, 1].max
        recover_hp += rand(amp+1) + rand(amp+1) - amp
      end
      if item.variance > 0 and recover_sp.abs > 0
        amp = [recover_sp.abs * item.variance / 100, 1].max
        recover_sp += rand(amp+1) + rand(amp+1) - amp
      end
      # ???????????
      if recover_hp < 0
        # ????
        if self.guarding?
          recover_hp /= 2
        end
      end
      # HP ????????????????????
      self.damage = -recover_hp
      # HP ??? SP ???
      last_hp = self.hp
      last_sp = self.sp
      self.hp += recover_hp
      self.sp += recover_sp
      effective |= self.hp != last_hp
      effective |= self.sp != last_sp
      # ??????
      @state_changed = false
      effective |= states_plus(item.plus_state_set)
      effective |= states_minus(item.minus_state_set)
      #new method
     # unless $game_temp.in_battle
       # self.damage_effect(user, 2)
      #end
      # ??????????????
      if item.parameter_type > 0 and item.parameter_points != 0
        # ????????
        case item.parameter_type
        when 1  # MaxHP
          @maxhp_plus += item.parameter_points
        when 2  # MaxSP
          @maxsp_plus += item.parameter_points
        when 3  # ??
          @str_plus += item.parameter_points
        when 4  # ???
          @dex_plus += item.parameter_points
        when 5  # ???
          @agi_plus += item.parameter_points
        when 6  # ??
          @int_plus += item.parameter_points
        end
        # ?????????
        effective = true
      end
      # HP ???????? 0 ???
      if item.recover_hp_rate == 0 and item.recover_hp == 0
        # ????????????
        self.damage = ""
        # SP ???????? 0???????????????
        if item.recover_sp_rate == 0 and item.recover_sp == 0 and
           (item.parameter_type == 0 or item.parameter_points == 0)
          # ????????????
          unless @state_changed
            # ????? "Miss" ???
            self.damage = "Miss"
          end
        end
      end
    # ?????
    else
      # ????? "Miss" ???
      self.damage = "Miss"
    end
    # ????????
    unless $game_temp.in_battle
      # ????? nil ???
      self.damage = nil
    end
    # ??????
    return effective
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #--------------------------------------------------------------------------
  def slip_damage_effect
    # ???????
    self.damage = self.maxhp / 10
    # ??
    if self.damage.abs > 0
      amp = [self.damage.abs * 15 / 100, 1].max
      self.damage += rand(amp+1) + rand(amp+1) - amp
    end
    # HP ?????????
    self.hp -= self.damage
    # ??????
    return true
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #     element_set : ??
  #--------------------------------------------------------------------------
  def elements_correct(element_set)
    # ??????
    if element_set == []
      # 100 ???
      return 100
    end
    # ???????????????????
    # ????? element_rate ?????????????? Game_Actor
    #   ??? Game_Enemy ?????????
    weakest = -100
    for i in element_set
      weakest = [weakest, self.element_rate(i)].max
    end
    return weakest
  end
end











Thats al l3 in order.




Game_Battler 1
Game_Battler 2
Game_Battler 3
« Last Edit: July 15, 2009, 04:00:26 AM by vamp »

**
Rep: +0/-0Level 83
I fixed it WOOT! lol