Debuff not being applied

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I am trying to have a skill which heals the user by twice the amount of the enemy's ATK stat, and after the damage has been calculated, to then reduce the ATK stat with a debuff. I need that debuff to be applied subsequently, or else it reduces the amount of healing that the user will get.

I have tried a few things. The simplest was to have a damage formula based on the enemy's stat, and a debuff applied by a command in the effects box
upload_2018-6-13_17-38-53.png

That, however, seems to apply the debuff first - except that the debuff icon does not appear on the enemy.

I then tried with a damage formula like this, with the damage type set to HP damage and the debuff in the Effects box:
a.hp += b.atk*2; b.hp-=b.atk*2

Again the debuff icon did not appear, but in addition, the enemy took far too much damage - 124 HP (probably with a bit of variance) instead of 60 (twice the stat of ATK = 30). I deduce that that formula does double damage.

Next up was a damage formula like this, where I incorporated the debuff into the formula itself:
a.hp += b.atk*2; b.add_debuff(2,2,); b.hp-=b.atk*2

That did 134 HP damage (according to the pop up) so still too high, but in addition knocked out an enemy which has 190HP.

Colour me confused.

Can anyone see what I'm doing wrong here.
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
219
First Language
English
Primarily Uses
RMVXA
You don't need to subtract the enemy's hp manually. Just put b.atk*2 at the end of your formula. That's where the extra damage is coming from.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Rinobi Thank you so much for that. It was driving me demented.

[mod]Closing[/mod]
 
Last edited:
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top