changing stat effects for the defualt batle system?
#6
Error on line 90.
Code:
#--------------------------------------------------------------------------
  # * Applying Normal Attack Effects
  #     attacker : battler
  #--------------------------------------------------------------------------
  def attack_effect(attacker)
    # Clear critical flag
    self.critical = false
    # First hit detection
    hit_result = ((rand(100)) < ((50 + (self.agi + self.dex) - (attacker.dex + attacker.int))
    hit = self.cant_evade? ? 100 : hit
    # If hit occurs
    if hit_result == true
      # Calculate basic damage
      min = [attacker.atk + attacker.str + attacker.int]
      max = [attacker.atk + attacker.str + attacker.str]
      atk = (rand(max - min) + min)
      self.damage = atk
      # Element correction
      self.damage *= elements_correct(attacker.element_set)
      self.damage /= 100
      # If damage value is strictly positive
      if self.damage > 0
        # Critical correction
        if rand(100) < (attacker.agi + attacker.int)
          self.damage *= (((attacker.str + attacker.int + attacker.agi)/100)+1)
          self.critical = true
        end
        # Guard correction
        if self.guarding?
          self.damage /= 2
        end
      end
    end
    # If hit occurs
    if hit_result == true
      # State Removed by Shock
      remove_states_shock
      # Substract damage from HP
      self.hp -= self.damage
      # State change
      @state_changed = false
      states_plus(attacker.plus_state_set)
      states_minus(attacker.minus_state_set)
    # When missing
    else
      # Set damage to "Miss"
      self.damage = "Miss"
      # Clear critical flag
      self.critical = false
    end
    # End Method
    return true
  end
Reply }


Messages In This Thread
changing stat effects for the defualt batle system? - by corpsegirl - 10-24-2010, 10:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   ACBS - Atoa Custom Battle System and TP System zlsl 2 4,569 10-20-2021, 05:09 AM
Last Post: zlsl
   I want to add an Atoa Custom Battle System command cut-in. zlsl 11 13,897 11-11-2019, 08:55 PM
Last Post: DerVVulfman
   Question about ACBS (Atoa Custom Battle System) aeliath 10 12,769 08-08-2019, 02:50 PM
Last Post: aeliath
   (RMVXace) Battle error with Tankentai's battle system, help. x( Starmage 0 3,911 02-14-2018, 04:25 PM
Last Post: Starmage
   Problems with counteraatack addon of Atoa Custom Battle System Djigit 22 35,474 01-05-2017, 08:05 PM
Last Post: Noctis
   Atoa Custom Battle System: Popup when status change Noctis 6 10,632 02-01-2016, 12:52 AM
Last Post: Noctis
   Atoa Custom Battle System CTB animation while cast Noctis 6 10,720 01-04-2016, 03:05 PM
Last Post: Noctis
   How do I ask wheiter he finished the script call? in a herbalism system Eagleeye1990 3 6,339 10-06-2014, 10:19 PM
Last Post: greenraven
   little Edit of the cursor world map system Djigit 3 6,534 08-24-2014, 02:31 AM
Last Post: Djigit
   [Brainstorming] Pallete Changing. MechanicalPen 6 7,764 02-14-2014, 09:46 PM
Last Post: DerVVulfman



Users browsing this thread: 2 Guest(s)