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,815
Reaction score
9,151
First Language
Indonesian
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
 

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 Profile Posts

SpaceBot wrote on DoctorMolotov's profile.
I miss you :kaocry:
I have game ideas, but none of them would fit the theme for IGMC. XD
Why the heck do I keep comparing my games to ones made by huge companies? I'd love them to have that level of polish but I'm simply not good enough.
Hell of a day at the London Games Market! :D

1656892272017.png

Check out my haul!

Forum statistics

Threads
123,305
Messages
1,155,660
Members
161,730
Latest member
my_birthday1205
Top