Element transmited to skills by weapons
#17
For the normal attacks you just need to leave the dummy elements from the computations made in elements_correct, right?
Use this modified version of the set_attack_damage_value code.

Code:
def set_attack_damage_value(attacker)
    case DAMAGE_ALGORITHM_TYPE
    when 0
      atk = [attacker.atk - (self.pdef / 2), 0].max
      str = [20 + attacker.str, 0].max
    when 1
      atk = [attacker.atk - ((attacker.atk * self.pdef) / 1000), 0].max
      str = [20 + attacker.str, 0].max
    when 2
      atk = 20
      str = [(attacker.str * 4) - (self.dex * 2) , 0].max
    when 3
      atk = [(10 + attacker.atk) - (self.pdef / 2), 0].max
      str = [(20 + attacker.str) - (self.dex / 2), 0].max
    end
    self.damage = atk * str / 20
    self.damage = 1 if self.damage == 0 and (rand(100) > 40)
    dummy_elements = [2,3,7,8,9,10,] # add any dummy element IDs other scripts might use
    self.damage *= elements_correct(attacker.element_set - dummy_elements)
    self.damage /= 100
  end

There would an alternative and cleaner way of doing this, but if this one works... :)
Reply }


Messages In This Thread
Element transmited to skills by weapons - by Charlie Fleed - 10-14-2009, 09:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Refreshing original skills names Whisper 2 5,029 05-31-2020, 04:35 PM
Last Post: Whisper
   Showing only specific skills in a window Mel 2 5,884 01-12-2016, 01:34 PM
Last Post: Mel
   Syvakal's Conditional Skills And Equipment Crashes Samven 0 3,953 08-02-2011, 01:58 PM
Last Post: Samven
   Help with using KGC's delayed skills prioran 0 3,624 05-07-2010, 11:46 PM
Last Post: prioran
   Skills that restore SP and reactive skills. Admetrynne 5 8,005 03-29-2010, 05:49 PM
Last Post: Admetrynne
   Simple Request about Element Defense status mageone 0 3,281 11-21-2009, 06:40 PM
Last Post: mageone



Users browsing this thread: 4 Guest(s)