EDIT: uhmm, I should have posted this in VXAce support, but I didn't because I am stupid.
EDIT2: okay, I noticed that the following anomaly only occurs in the database's monster troop test play. Anyway, this is still unfortunate since it makes my tests more difficult.
I'm writing some code lines and I need to store the actor's luk in a local variable. But one thing I noted is that, when I try to do this, it only stores the actor's base luk, and not his luk + his equipment bonuses. For example: if his base luk is 4, it will always return 4 no matter what. Even if he is equipped with something that gives him +400 bonus luk, it will still return 4.
Why is this happening and is there a solution?
This is the code:
This is a passive ability of my actor. If he has learned a certain skill, he has 10% chance of inflicting a curse status after taking physical damage. I want this chance to be bigger if he has more luk than the attacker.
The method is called in Yanfly's Lunatic Damage after the damage value modifiers.
EDIT2: okay, I noticed that the following anomaly only occurs in the database's monster troop test play. Anyway, this is still unfortunate since it makes my tests more difficult.
I'm writing some code lines and I need to store the actor's luk in a local variable. But one thing I noted is that, when I try to do this, it only stores the actor's base luk, and not his luk + his equipment bonuses. For example: if his base luk is 4, it will always return 4 no matter what. Even if he is equipped with something that gives him +400 bonus luk, it will still return 4.
Why is this happening and is there a solution?
This is the code:
Ruby:
class Game_Battler < Game_BattlerBase
def cursed_contact(a,b,item) # Contato Maldito
if b.actor? && b.id==3 && !item.damage.recover? && item.physical? \
&& $game_actors[3].skill_learn?($data_skills[294])
x_curse = (b.luk - a.luk)
chance = rand(100) - x_curse
a.add_state(27) if chance <= 10
end
end
end
This is a passive ability of my actor. If he has learned a certain skill, he has 10% chance of inflicting a curse status after taking physical damage. I want this chance to be bigger if he has more luk than the attacker.
The method is called in Yanfly's Lunatic Damage after the damage value modifiers.