Element transmited to skills by weapons
#14
my BS script includes some codes with elements correction.

for this 1st one, my settings is damage no. 1 (can be set up at the begening of the script in the options). So my case is "when 1"

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)
    self.damage *= elements_correct(attacker.element_set)
    self.damage /= 100
  end

this 2nd one is yours, and it is working:


Code:
# Element correction
       weapon_elements=[]
      if skill.element_set.include?(26)
        if user.weapon_id > 0
          weapon_elements=[1,4,5,6]&$data_weapons[user.weapon_id].element_set
        end
      end
      self.damage *= elements_correct(skill.element_set | weapon_elements)
    self.damage /= 100
  end

and then element correction about hp and sp regen, i dont show it cz i dont think it can influct.


another script is Actor Advanced status, it says :

Code:
alias acbs_elements_correct_actorstatus elements_correct


Finally, i have found a script that is working to cancel element. But when i use it,
B, C, D, E, are working. and A is working like B, when it is skill...

Code:
$DUMMY_ELEMENTS = [2,3,7,8,9,10,] # add any dummy element IDs other scripts might use
$DUMMY_STATES = [] # add any dummy state IDs other scripts might use



#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
  
  def elements_correct(elements)
    multiplier = size = 0
    elements.each {|i|
        unless $DUMMY_ELEMENTS.include?(i)
          multiplier += self.element_rate(i)
          size += 1
        end}
    return (size == 0 ? 100 : multiplier/size)
  end
  
end
Reply }


Messages In This Thread
Element transmited to skills by weapons - by mageone - 10-13-2009, 06:16 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,952 08-02-2011, 01:58 PM
Last Post: Samven
   Help with using KGC's delayed skills prioran 0 3,623 05-07-2010, 11:46 PM
Last Post: prioran
   Skills that restore SP and reactive skills. Admetrynne 5 7,995 03-29-2010, 05:49 PM
Last Post: Admetrynne
   Simple Request about Element Defense status mageone 0 3,280 11-21-2009, 06:40 PM
Last Post: mageone



Users browsing this thread: 1 Guest(s)