Main Menu
  • Welcome to The RPG Maker Resource Kit.

Critical Bonus States

Started by cozziekuns, May 31, 2010, 12:10:14 AM

0 Members and 1 Guest are viewing this topic.

cozziekuns

Critical Bonus States
Version: 1.0
Author: cozziekuns
Date: May 30, 2010

Version History




  • <Version 1.0> 05.30.2010 - Original Release

Planned Future Versions


  • None! Please suggest some features.

Description



Gives states the ability to imbue critical bonuses on the one inflicted with the status effect. Somewhat like Sharp Eyes in Maplestory, except critical damage isn't altered (Twas was not meant to be anyways).

Features


  • Easily customizable (just plug something into a note box).

Instructions

See header.

Script




#===============================================================================

# Cozziekuns Critical Bonus State (Hawkeye)
# Last Date Updated: 5/30/2010
#
# Gives states the ability to imbue critical bonuses on the one inflicted with
# the status effect. Somewhat like Sharp Eyes in Maplestory, except critical
# damage isn't altered (Sadly).
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 05/30/10 - Created Script.
#===============================================================================
# What's to come?
# -----------------------------------------------------------------------------
# o Nothing! Suggest something.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#
# To give a state the added effect of Critical Bonus, simply write in the note:
#
# \hawkeye[What percent you want to be added to the regular critical]
#
# For example, if I wanted an actor's critical to be boosted by 50%, I would
# put:
#
# \hawkeye[50]
#===============================================================================

$imported = {} if $imported == nil
$imported["CozCritBonusStates"] = true

#==============================================================================
# ** RPG::State
#------------------------------------------------------------------------------
#  This is a superclass of all states in the game.
#==============================================================================

class RPG::State
  #--------------------------------------------------------------------------
  # * Hawkeye chance
  #--------------------------------------------------------------------------
  def hawkeye
    @hawkeye = 0
    if self.note[/\\hawkeye\[(\d+)]/i] != nil
      @hawkeye = $1.to_i
    end
    return @hawkeye
  end
end

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Get Critical Ratio
  #--------------------------------------------------------------------------
  alias coz_cbs_codeh_cri cri
  def cri
    n = coz_cbs_codeh_cri
    for state in states
      n += state.hawkeye
    end
    return n
  end
end


Credit




  • Took me about 5 minutes to write (just edited a previous script), so no credit is needed, but it would be nice if you credited me (cozziekuns).

Thanks


  • Maplestory, for giving me the idea.

Support



Just post below.

Known Compatibility Issues

None so far.

Demo



See attached.

Author's Notes



I'm running out of ideas (everything has already been scripted...)

Restrictions

:ccby:

Cascading Dragon

Well if it wasn't for the fact that I use Melody, and therefore already have this ability, I would use this script. Its nice

modern algebra

It is a nice idea. Good work cozziekuns!