- Joined
- May 4, 2018
- Messages
- 7
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMV
Hello fellow makers,
I'm trying to get a Fire Mastery-style state working, but I'm having a bit of trouble. The basic idea is that a character in the Pyromancer class gains access to the Fire Mastery class art, which gives them the Fire Mastery buff. When they gain the buff, it starts with 4 "Fire Mastery stacks". One stack erodes at the end of each turn.
When a Pyromancer uses an Art that deals heat damage, its output is increased by an amount based on the number of stacks the Pyromancer has. If they use certain other Pyromancer Arts, it may increase the stack further. (Haven't started on this last bit yet, but it will likely be important for construction purposes later...)
At present, it doesn't seem like my code is doing anything. I set a Fire Bolt spell to deal heat damage, and it is unaffected by Fire Mastery.
I'm using many of Yanfly's plugins. I'll share the relevant pieces I've got already below. Thank you in advance for your time and effort!
<Custom Apply Effect>
// Make sure the stack count exists.
target._fireMastery = target._fireMastery || 0;
// Increase the stack count.
target._fireMastery += 4;
</Custom Apply Effect>
<Custom Confirm Effect>
//Store heat damage type as a variable.
var eId = 7;
//Check if this is an HP damage effect.
if (this.isHPEffect() && value > 0){
//Also check if this is heat damage.
if (this.getItemElements().contains(eId)){
//Is heat damage: multiply.
value *= user._fireMastery;
//Round up.
value = Math.ceil(value);}}
</Custom Confirm Effect>
<Custom Remove Effect>
// Reset the stack count.
target._fireMastery = 0;
</Custom Remove Effect>
<Custom Turn End Effect>
target._fireMastery -= 1;
</Custom Turn End Effect>
I'm trying to get a Fire Mastery-style state working, but I'm having a bit of trouble. The basic idea is that a character in the Pyromancer class gains access to the Fire Mastery class art, which gives them the Fire Mastery buff. When they gain the buff, it starts with 4 "Fire Mastery stacks". One stack erodes at the end of each turn.
When a Pyromancer uses an Art that deals heat damage, its output is increased by an amount based on the number of stacks the Pyromancer has. If they use certain other Pyromancer Arts, it may increase the stack further. (Haven't started on this last bit yet, but it will likely be important for construction purposes later...)
At present, it doesn't seem like my code is doing anything. I set a Fire Bolt spell to deal heat damage, and it is unaffected by Fire Mastery.
I'm using many of Yanfly's plugins. I'll share the relevant pieces I've got already below. Thank you in advance for your time and effort!
<Custom Apply Effect>
// Make sure the stack count exists.
target._fireMastery = target._fireMastery || 0;
// Increase the stack count.
target._fireMastery += 4;
</Custom Apply Effect>
<Custom Confirm Effect>
//Store heat damage type as a variable.
var eId = 7;
//Check if this is an HP damage effect.
if (this.isHPEffect() && value > 0){
//Also check if this is heat damage.
if (this.getItemElements().contains(eId)){
//Is heat damage: multiply.
value *= user._fireMastery;
//Round up.
value = Math.ceil(value);}}
</Custom Confirm Effect>
<Custom Remove Effect>
// Reset the stack count.
target._fireMastery = 0;
</Custom Remove Effect>
<Custom Turn End Effect>
target._fireMastery -= 1;
</Custom Turn End Effect>