So... I wrote out a very long explanation, then I accidentally closed the browser when I meant to close RPG Maker and lost it all. I'll try and remember everything I had written.
Anyway, you'll just need one script for this:
Hime's Common Event Variables.
I'm assuming a few things about your ability, by the way, so let me know if any of this is incorrect: I'm assuming it's a single-target ability, not a group attack. I'm also assuming that you want the boss to be able to use bloodbath whenever anyone in the party has 3 stacks of bleed on them.
The first thing you want to do is make it so that the bloodletter skill will properly apply stacks of bleed. So you'll need to make 3 bleed states, we'll make them states 2, 3, and 4. You can name them whatever you want, but just make sure you know which is which. In the bloodletter skill window, set it up to do whatever you'd like it to do in terms of animation, damage, etc. etc. Since you want it to not ignore armor, make sure somewhere in the damage formula that b.def is used to subtract some damage. Then, in the effects section of the skill, have it call a common event, Bloodletter.
The common event will contain the following script call:
b = $game_temp.common_event_targetif b.state?(2)b.remove_state(2); b.add_state(3)else if b.state?(3)b.remove_state(3); b.add_state(4)else if b.state?(4)elseb.add_state(2)endendendIt will look like this screenshot:
What this will do is, after the damage has been done, it will check if the targeted actor has state 2 (or, the first stack of bleed) on them. If it does, it will remove it and add state 3 (the second stack of bleed). If they have state 3 (the second stack of bleed), then it will remove it and add state 4 (the third stack of bleed). If they have state 4, it does nothing, and if they don't have any of the bleed stacks, then it will add state 2 (the first stack of bleed).
For each state, you can setup the various parameters for what each stack does. Perhaps state 2 lowers DEF to 80% and causes 1% HP damage every turn, state 3 lowers DEF to 60% and causes 3% HP damage every turn, and state 4 lowers DEF to 40% and causes 5% HP damage every turn. Whatever you want it to do.
So now the stacking bleed is taken care of.
Now you want to make states where the boss gets more powerful depending on what the highest number of bleed stacks in the party is. So we'll need to make 3 more states - states 5, 6, and 7. Call them whatever you want - for example, let's say SmellBlood1, SmellBlood2, and SmellBlood3. Perhaps SB1 raises ATK to 200%, SB2 raises ATK to 400%, and SB3 raises ATK to 600% (that's probably a bit much, but you get the idea). So you'll need to check what the highest stack of bleed in the party is.
There are a few ways you could do this, but let's make an event page on the boss's troop. Let's set it to "When the end of the turn" for a condition and a span of "Turn." This means, at the end of every turn, this page will be checked. Let's also make some variables, variables 1, 2, and 3. Let's call them Bleed1?, Bleed2?, and Bleed3?. What they will do is let us know what the highest stack of bleed currently active in the party is. So let's initially set them to Bleed1=0, Bleed2=0, Bleed3=0, which means, "There are no stacks of bleed currently in the party."
Then we'll do a script call that will run through each actor in the party and check their states. It will look like this:
$game_party.battle_members.each {|actor|if actor.state?(2)$game_variables[1]=1else if actor.state?(3)$game_variables[2]=1else if actor.state?(4)$game_variables[3]=1elseendendend}This will ensure that if anybody in the party has a 3rd stack of bleed, then Bleed3 will be equal to 1. If anybody has a 2nd stack, Bleed2 will be equal to 1. If anybody has 1 stack, Bleed1 will be equal to 1. Otherwise, nothing happens and all 3 variables remain at 0.
So, using this information, we can make a series of conditional branches that will check what the highest stack of bleed in the party is using these variables. The whole troop page will look like the following screenshot:
So the whole series of branches basically goes like this: "Is Bleed3 equal to 1? If so, it means somebody in the party has 3 stacks of bleed. So, let's remove SmellBlood1 and SmellBlood2 (because otherwise the boss will get the benefits of all 3 states and do way too much damage) and add SmellBlood3. If Bleed3 is not equal to 1 (meaning it's equal to 0), then it means nobody in the party has 3 stacks of bleed. So we can remove SmellBlood3. Is Bleed2 equal to 1? If so, it means somebody in the party has 2 stacks of bleed. So let's remove SmellBlood1 (because 3 has already been removed) and add SmellBlood2. If Bleed2 is not equal to 1 (meaning it's equal to 0), then it means nobody in the party has 2 stacks of bleed. So we can remove SmellBlood2, as well. Is Bleed1 equal to 1? If so, somebody in the party has a stack of bleed. So let's add SmellBlood1 (because 2 and 3 have already been removed). If none of those three variables are equal to 1, then let's also remove SmellBlood1."
So now, you have a bleed that will properly stack 3 times, and you have a buff for the boss that will properly stack 3 times according to whatever the highest stack of bleed in the party is. All that's left is giving the boss access to the Bloodbath ability.
On the enemies page, you can set their behavior patterns to only use certain skills when certain conditions are met. In this case, you want the enemy to only use bloodbath when he has 3 stacks of SmellBlood. So, you can set the enemy pattern to prioritize bloodbath, but only if the state "SmellBlood3" is active, like so:
So now you have a boss that will use bloodletter, which will properly stack up bleeds, that checks each turn what level of SmellBlood he should have based on the highest number of bleed stacks in the party, who will switch to using bloodbath if anyone in the party has 3 stacks of bleed.
EDIT: For the regular enemies, just have their skills inflict the Bleed1 state (state 2), then in the damage formula box, do something like:
a.add_state(15);a.atk-b.def
What that will do is add state 15 to the attacker (the enemy) whenever they use the skill, then deal damage equal to their attack minus their target's defense. In the effects box, you'd have "add state [bleed1]" so that the attack will also apply that state.