A state that protects from any damage at all?

Status
Not open for further replies.

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
I'm having difficult with parameters and whatnot, but I have a one-turn use item that I want to work like Detect or Protect in Pokemon games. But I'm not sure how to do that. Any help?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
the damage done depends on your damage formulas.


If you use only default damage formulas, you can prevent any damage by making the DEF parameter higher than the highest possible attack rating. Do that with a state that is removed by any damage, and have the item apply that state.


However every skill that ignores defence when calculating damage will also ignore that DEF-increase state.


So it all depends on how your skills work - there are several ways to make such a state depending on what you place in your skill's damage formulas.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Use 100% PDR and MDR in your state. These two cut the respective damage type taken by a flat percentage. 25% PDR of 100 physical damage taken would become 75 damage only, etc.  100% will nullify it completely, even if attacks that ignore defense in formulas are involved..  If you want protection from states, then you'll have to add state-resist stuff as well.
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Use 100% PDR and MDR in your state. These two cut the respective damage type taken by a flat percentage. 25% PDR of 100 physical damage taken would become 75 damage only, etc.  100% will nullify it completely, even if attacks that ignore defense in formulas are involved..  If you want protection from states, then you'll have to add state-resist stuff as well.
It isn't that simple though. I learned this when using certain hit skills. Certain hit skills ignore MDR and PDR just as they ignore reflect. If the attacks have some sort of element, it's better to manually create the resist to all of the elements as well. MDR and PDR wont cover everything.
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
81
First Language
English
Primarily Uses
The following code should allow any state with the given notetag to completely ignore what is written in a skill's damage formula box. Or you can just do what CWells suggested and manually add every single defensive measure known to your game.

Code:
#===============================================================================# Script: Null Damage State# Author: Selchar# Requestor: Koi#================================================================================beginThis script allows for bypassing the damage step completely(anything found in askill's damage formula box).#-------------------------------------------------------------------------------# State Notetag#-------------------------------------------------------------------------------The following notetag will nullify any and all damage(physical, magical,elemental, and certain hit) when added to a state.<null all damage state>=endmodule Selchar  module State    Null_State_Damage = 0  endend#===============================================================================# The script itself#===============================================================================class Game_Battler < Game_BattlerBase  alias :sel_null_ads_mdv :make_damage_value  def make_damage_value(user, item)    null_all_damage_state ? @result.make_damage(Selchar::State::Null_State_Damage, item) : sel_null_ads_mdv(user, item)  end    alias :sel_null_ads_as :add_state  def add_state(state_id)    null_all_damage_state ? return : sel_null_ads_as(state_id)  end    def null_all_damage_state    states.each do |i|      return true if i.null_all_damage_state    end    return false  endendclass RPG::State  def null_all_damage_state    @note =~ /<null[-_ ]?all[-_ ]?damage[-_ ]?state>/i ? @null_all_damage_state = true : @null_all_damage_state = false if @null_all_damage_state.nil?    @null_all_damage_state  endend
Edit: Threw in bypassing of state additions, should I go one step farther and do buffs?
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
No no, it's working fine! Thank you so much!
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
[mod]This thread is being re-opened at the request of the OP.[/mod]
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top