Hello, all! I’m having a bit of trouble with a custom passive state I’ve made using Yanfly’s Buffs and States Core, and was hoping someone might be able to give me some insight.
The idea is that the character has a passive state called Cowardice, and it adds 1 stack at the start of their turn up to a max of 10. It debuffs their DEF, EVA, and HIT a certain percentage per stack. The character can use the Jump skill, and the number of turns they stay in the air is equal to their total Cowardice stacks +1 (min 2 turns, max 11 turns). The Cowardice stack also multiplies the damage they deal to the target (DMG Multiplier = 0.5 + (Cowardice Stacks / 3)).
So far, the debuffs and damage multiplier work exactly how I want. The issue I’m having is in tying the number of turns the Jump state lasts to the total number of Cowardice stacks. I assume that the problem is coming from how the Jump state is being applied, since it is applied via the Action Sequence rather than RPG Maker MV’s default method.
I figure the best work around would be to create another state called “Apply Jump” that simply forces the user to use a nameless skill that applies Jump to the user and then removes the “Apply Jump” state (similar to how the Jump state forces the user to use the Dive skill to attack). My concern is that I’m not certain how that will affect the target for the Dive skill, because Jump forces the user to use Dive against their last target.
If I use this method, would the last target be the user? Or would it still be the enemy selected when they used the Jump skill?
For reference, I’m building this off of Yanfly’s tutorial for the Jump skill, linked below:
http://www.yanfly.moe/wiki/Jump_(MV_Plugin_Tips_%26_Tricks)
SKILL IDs:
05 Jump
06 Dive
STATE IDs:
11 Jump
12 Cowardice
13 Bravado (pauses Cowardice stack growth for short time)
Plugin List:
Actor's Notetags:
Jump Skill Notetags:
Dive Skill Notetags:
Jump State Notetags:
Cowardice State Notetags:
The idea is that the character has a passive state called Cowardice, and it adds 1 stack at the start of their turn up to a max of 10. It debuffs their DEF, EVA, and HIT a certain percentage per stack. The character can use the Jump skill, and the number of turns they stay in the air is equal to their total Cowardice stacks +1 (min 2 turns, max 11 turns). The Cowardice stack also multiplies the damage they deal to the target (DMG Multiplier = 0.5 + (Cowardice Stacks / 3)).
So far, the debuffs and damage multiplier work exactly how I want. The issue I’m having is in tying the number of turns the Jump state lasts to the total number of Cowardice stacks. I assume that the problem is coming from how the Jump state is being applied, since it is applied via the Action Sequence rather than RPG Maker MV’s default method.
I figure the best work around would be to create another state called “Apply Jump” that simply forces the user to use a nameless skill that applies Jump to the user and then removes the “Apply Jump” state (similar to how the Jump state forces the user to use the Dive skill to attack). My concern is that I’m not certain how that will affect the target for the Dive skill, because Jump forces the user to use Dive against their last target.
If I use this method, would the last target be the user? Or would it still be the enemy selected when they used the Jump skill?
For reference, I’m building this off of Yanfly’s tutorial for the Jump skill, linked below:
http://www.yanfly.moe/wiki/Jump_(MV_Plugin_Tips_%26_Tricks)
SKILL IDs:
05 Jump
06 Dive
STATE IDs:
11 Jump
12 Cowardice
13 Bravado (pauses Cowardice stack growth for short time)
Plugin List:
Actor's Notetags:
Code:
<Passive State: 12>
<ratesFormula>
hit: -(0.01 * a.getStateCounter(12))
eva: -((a.getStateCounter(12) / 3) / 100)
</ratesFormula>
Jump Skill Notetags:
Code:
<Custom State 11 Turn>
turn = 1;
turn += user.getStateCounter(12);
</Custom State 11 Turn>
// Action Sequences
// Setup: Jump animation.
<Setup Action>
display action
camera focus: user
zoom: 150%
perform start
wait: 60
se: Wind1, 80, 150
float user: 495%, 20
opacity user: 0%, 20
wait for float
</Setup Action>
// Whole: Ensure nothing happens.
<Whole Action>
</Whole Action>
// Target: Flag the target.
<Target Action>
action effect
</Target Action>
// Follow: Apply Jump state to user.
<Follow Action>
add state 11: user
</Follow Action>
// Finish: Without landing.
<Finish Action>
clear battle log
reset camera
reset zoom
wait for camera
wait for zoom
</Finish Action>
Dive Skill Notetags:
Code:
// Action Sequence
// Setup: Setup landing spot.
<Setup Action>
clear battle log
display action
immortal: targets, true
move user: target, base, 1
</Setup Action>
// Whole: Land and deal damage to all targets.
<Whole Action>
camera focus: target
zoom: 150%
wait: 60
motion attack: user
opacity user: 100%, 1
float user: 0, 20
wait: 10
animation 2: targets
action effect
shake screen: 5, 5, 5
wait for animation
</Whole Action>
// Target: Ensure nothing happens.
<Target Action>
</Target Action>
// Follow: Reset everything.
<Follow Action>
reset camera
reset zoom
jump user: 200%, 30
move user: return, 30
wait for movement
eval: user.setStateCounter(12, 0);
</Follow Action>
<damage formula>
cowardice = 0.5 + (user.getStateCounter(12) / 3);
multiplier = cowardice;
value = ((a.atk * 8) - (b.def * 2)) * multiplier;
</damage formula>
Jump State Notetags:
Code:
// Selection Control
<Cannot Select: All>
// Buffs & States Core
<Custom Leave Effect>
// Get the landing skill.
var skill = 6;
// Get the last targeted index.
var target = -2;
// Queue the forced action.
BattleManager.queueForceAction(user, skill, target);
</Custom Leave Effect>
Cowardice State Notetags:
Code:
<Custom Battle Effect>
target.setStateCounter(12, 0);
</Custom Battle Effect>
<Custom Turn Start Effect>
const checkStates = [11, 13];
var pauseGrowth = false;
for (let i = 0; ((i < checkStates.length) && (pauseGrowth != true)); i++) {
pauseGrowth = target.isStateAffected(checkStates[i]);
}
if (pauseGrowth == false) {
if (target.getStateCounter(12) < 10) { target.addStateCounter(12, 1); }
}
</Custom Turn Start Effect>
<params>
DEF: -(Math.round((current * (0.03 * a.getStateCounter(12)))))
</params>
<Custom Victory Effect>
target.removeStateCounter(12);
</Custom Victory Effect>
<Custom Escape Effect>
target.removeStateCounter(12);
</Custom Escape Effect>
<Custom Defeat Effect>
target.removeStateCounter(12);
</Custom Defeat Effect>
<Help Description>
: Increases over time, debuffing DEF, EVA, and HIT.
Increases Jump's power and clears stacks after Jumping.
</Help Description>