dotKuhn

Villager
Member
Joined
Dec 8, 2018
Messages
5
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Sooo...

What I'm trying to do, is that an specific class called "044: Misfortune" gets a special buff when it succesfully evades,
It'll work like this:

Enemy attack → Character "044:Misfortune" Evades succesfully → Character "044: Misfortune" gets a critical hit granted on next attack dealing 250% damage instead of 200%.

I know I can just set a state to make him get 100% crit chance, but how can I make this work with the evade?
I want it to work only with this character/class, and it needs to be a passive skill/state, so it works everytime the character dodges succesfully
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,856
Reaction score
9,247
First Language
Indonesian
Primarily Uses
N/A
Code:
class Game_Battler
  def item_apply(user, item)
    @result.clear
    @result.used = item_test(user, item)
    @result.missed = (@result.used && rand >= item_hit(user, item))
    @result.evaded = (!@result.missed && rand < item_eva(user, item))
    if @result.evaded && self.actor? && self.class.id == <PUT CLASS ID HERE>
      add_state(<PUT YOUR STATE ID BUFF HERE>)
    elsif @result.hit?
      unless item.damage.none?
        @result.critical = (rand < item_cri(user, item))
        make_damage_value(user, item)
        execute_damage(user)
      end
      item.effects.each {|effect| item_effect_apply(user, item, effect) }
      item_user_effect(user, item)
    end
  end
end
 

dotKuhn

Villager
Member
Joined
Dec 8, 2018
Messages
5
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Code:
class Game_Battler
  def item_apply(user, item)
    @result.clear
    @result.used = item_test(user, item)
    @result.missed = (@result.used && rand >= item_hit(user, item))
    @result.evaded = (!@result.missed && rand < item_eva(user, item))
    if @result.evaded && self.actor? && self.class.id == <PUT CLASS ID HERE>
      add_state(<PUT YOUR STATE ID BUFF HERE>)
    elsif @result.hit?
      unless item.damage.none?
        @result.critical = (rand < item_cri(user, item))
        make_damage_value(user, item)
        execute_damage(user)
      end
      item.effects.each {|effect| item_effect_apply(user, item, effect) }
      item_user_effect(user, item)
    end
  end
end



Thank you very much, this worked perfectly, really, I am trully grateful ♪
 

Latest Threads

Latest Posts

Latest Profile Posts

yo i made a post but it hasnt really gotten any answers so uhhhh
Finished switching to a new PC. Now I could potentially start working at projects or plugins again if I feel the motivation to do so.
If you don't read the news, you are uninformed. If you read the news, you are misinformed.
Custom slip rates and custom ailment durations for enemies really opens up the floodgates for status effect use. I can have Poison and Time Stop affect bosses without it breaking their balance! Finally, a healthy middle ground.

(Especially after I cooked up a thing that prevents you from re-applying deadly states more than once in specific occassions.)
Voice.gif
The Voice... They usually show up to talk to you about leaving your mark on the world, which is one of the major themes of my game... How will you be remembered by society.

Forum statistics

Threads
124,533
Messages
1,164,269
Members
163,366
Latest member
kurutami
Top