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,847
Reaction score
9,241
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 Profile Posts

For those with up to 9 elements of magic; how do you structure your database. By element? Or by what is offensive vs supportive spells?
would anyone here be interested in rough concept art for the main protagonist of my game that might get changed later? :kaoswt2:
I guess I have no idea how to properly upload a custom font lmao. The menu fonts are too damn small.

Font_Size.PNG
Dev be like: "I'll make the character goes amnesia so I could explain the world and the lore better and immersive to the players"

Forum statistics

Threads
124,435
Messages
1,163,637
Members
163,250
Latest member
Ramadhinata
Top