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.

Battle add-on request - Skill disable

boomy

Member

Okay, hopefully this won't be too hard to script.
I'm trying to work out how to disable a certain skill when a status is in effect, but I have no idea, so here is request:

In my game, when a battler uses a summon skill, he becomes auto-afflicted with a state which lasts for 2 turns and reduces his stats a little.
The thing is, when a battler has this certain status, he cannot cast skills that are flagged as summons. Therefore, he can only summon every few turns, and whenever he summons, he will experience a drop in stats (temporary) and cannot use any other summons. However, he can still use skills, attack, defend etc.

I need a script which disables all skills flagged with a particular element when a particular state is in effect.

Here's a mock script format:

Element [12] = Summons
State [4] = Weak
if actor is in state [4]
disable all element [12] skills
else
enable all element [12] skills
end

I have already found an auto-afflict skill script (inflicts a state when u use a particular skill) Thanks Claimh

Code:
#==============================================================================
# User State Grant Skill Ver. 1.0.1       by Claimh
#------------------------------------------------------------------------------
#   The state is granted to the person who uses skill
#==============================================================================

module User_SetState
  SET_STATE = []
#==============================================================================
# ÂÂ
 
Well, I do have this : http://www.rmxpu.net/staff/sephirothspawn/Script Files/EIS Requirements.txt


You can use that, as it is far more advanced. But I threw this together real quick.

Code:
class Game_Actor
  Disable_Skills_With_Element = 12
  Disable_Skills_When_State = 4
  alias seph_disableskills_scu? skill_can_use?
  def skill_can_use?(skill_id)
    if self.states.include?(Disable_Skills_When_State)
      if $data_skills[skill_id].element_set.include?(Disable_Skills_With_Element)
        return false
      end
    end
    return seph_disableskills_scu?(skill_id)
  end
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