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.

Blue Mage-like skill

I don't know if a script has been posted for this, I've searched but couldn't find what I'm looking for. I would like a script that let's you have skills that can 'absorb' an enemy's attack. It would need to be edited by the user as in which enemies skills are absbored, and what skill absorbs them, and then shows a message telling the player that they've obtained that skill. This might be confusing, so here's an example of what the editable part of the script would be:

Code:
enemy_skill = [1 => 3, 2 => 64]
blue_mage_skills = [10]
skill_text = ["You have obtained the Mass Heal skill", "You have obtained the Screw Thrust skill"]

This would mean that when you attack enemy #1 in the database with skill #10 in the database, the character who used skill #10 would obtain skill #3, and at that moment text would appear, saying "You have obtained the Mass Heal skill"

I would greatly appreciate anyone who can do this. On a sidenote, I am using Minkoff's Animated Battlerss, just incase that matters.
 
Code:
class Game_Enemy < Game_Battler
  
  Enemy_skill = {1=>3, 2=>64, '1'=>'Absorbed Mass Head',
  '2'=>'Absorbed Screw Thrust'}
  Blue_mage_skills = [10]
  
  def skill_effect(user, skill)
    if Blue_mage_skills.include?(skill.id)
      $scene.help_window.set_text(Enemy_skill[self.id.to_s], 1)
      user.learn_skill(Enemy_skill[self.id])
      return true
    else
      return super(user, skill)
    end
  end
  
end

class Scene_Battle
  
  attr_accessor :help_window
  
end
I don't have time to write instructions as I'm going out now, hopefully you can manage.
 

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