Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Enemies with levels.

I am looking for or for someone to make me me a script where the enemies have levels. They do not need to level up just have levels. Thanks in advance.

-Bigbg459
 
Code:
class Game_Enemy
  # enemy_id => level
  Level = {}
  alias seph_easyenemylevels_gmeny_init initialize
  def initialize(troop_id, member_index)
    seph_easyenemylevels_gmeny_init(troop_id, member_index)
    @level = Level[@enemy_id]
  end
end

Just place above Main.
 

Mac

Member

Like so:-

Code:
class Game_Enemy
  # enemy_id => level
  Level = {1=2, 2=4, 3=7}
  alias seph_easyenemylevels_gmeny_init initialize
  def initialize(troop_id, member_index)
    seph_easyenemylevels_gmeny_init(troop_id, member_index)
    @level = Level[@enemy_id]
  end
end
 
It needs to work with this:

Code:
      if skill.atk_f == 1
       rate = ((((2 * user.level / 5 + 2) * user.str * skill.power / self.pdef) / 50) + 2) * (100 - rand(15)) / 100 
      self.damage = rate 
    end
    if skill.atk_f == 2
       rate = ((((2 * user.level / 5 + 2) * user.int * skill.power / self.mdef) / 50) + 2) * (100 - rand(15)) / 100 
      self.damage = rate 
      end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top