Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: MarkHest on September 17, 2011, 10:12:59 pm

Title: [XP] - Poison Ability that do not deal a sertain % of damage
Post by: MarkHest on September 17, 2011, 10:12:59 pm
YARR :shifty:

I've been looking for a script that allows a poison ability to become more precise than the usual one.
I want a poison-like ability that deals a sertain amount of damage instead of a sertain % of the HP.

So basicaly if i set the ability to take 500HP per turn, that's what it will do. (instead of taking 10% of hp every turn like the default one)


So practiacaly, a script that makes a state-ID become a poison effect to take the amount of damage given in the script.
Title: Re: [XP] - Poison Ability that do not deal a sertain % of damage
Post by: AliveDrive on September 17, 2011, 10:27:10 pm
I believe this is in tons of addons.

And yeah, they should allow you to change it, 10% is way too much.
Title: Re: [XP] - Poison Ability that do not deal a sertain % of damage
Post by: MarkHest on September 17, 2011, 10:42:58 pm
I'll take a look and see if i find it, thanks AliveDrive.
Title: Re: [XP] - Poison Ability that do not deal a sertain % of damage
Post by: ForeverZer0 on September 17, 2011, 10:46:29 pm
class Game_Battler
 
  def static_damage_value(state_id)
    return case state_id
    when 17 then 500
    when 18 then 1000
    when 19 then -500
    end
  end
 
  alias static_slip_damage slip_damage_effect
  def slip_damage_effect
    @states.each {|id|
      static = static_damage_value(id)
      if static != nil
        self.damage = static
        self.hp -= self.damage
        return true
      end
    }
    static_slip_damage
  end
end


The first method is your config. Setup like this:
when STATE_ID then DAMAGE


Negative values will heal. Just make sure the states "Slip Damage" checkbox is checked.
Title: Re: [XP] - Poison Ability that do not deal a sertain % of damage
Post by: MarkHest on September 17, 2011, 11:44:32 pm
Oh my, that was a simple script :O.o: (i thought it would require more codes :P

Thank you so much Zer0 ^^