[2K3] INVERTING HP/MP

Posts

Pages: 1
So, I had this idea recently (and it's been in my Common Events untouched), but I'm thinking of having a couple skills that can switch everyone's HP/MP with one another, though fairly. That way, a character who has like 9999 HP and 999 MP won't end up with 999 HP and MP (as you'd expect from the HP <-> MP materia in FFVII, or the Swap spell in FFII). No, what I'm thinking is having it swap HP and MP accordingly to x10 or /10 (for instance, 1500 HP and 80 MP will be the examples. If the ability was used, HP would become MPx10 and MP would become HP/10, so HP would become 800 and MP would be still 80, but if MP was 0 and HP was 300, then MP would be at 30 and HP would be at 0).


Now the question is, how feasible and easy would it be to do this? I know it's impossible to have it target only one ally, if I made it do such, and the only way for it work on an enemy is by making it a command ability that targets one enemy (or I could make it a switch skill that targets all enemies/all allies/everything).

I know for a fact that the target(s) current HP and current MP would need to be stored before anything else, and then multiplied/divided by 10 for the end results. But how would one go about switching it appropriately? I'm assuming by having a second variable for current HP/current MP and subtracting it from the first variable or...?

Yes, I'm going to have enemies/bosses that can use this ability, but I'm also debating on whether or not the Reverse spell that one of my characters can POTENTIALLY get is going to do this (it currently just reverses statuses with one another to the entire party, since I can't do it for enemies. For instance, Poison becomes Regen, and Regen becomes Poison).
Hm...

I think I'd do it this way:

1 set of variables for current HP and MP

1 set of variables for the new HP and MP. Set them all to the appropriate amounts:

Var 1 set to Max HP

Var 2 set to Max MP

Var 3 set to Var 2 * 10 (as to make HP the MP *10 value)

Var 4 set to Var 1 / 10 (as to make MP the HP /10 Value)

Then, we check:

If Var 4 is higher or equal than Var 2, then you set up the Max MP to Var 2;
else, set it to Var 4

Do the same for HP, if it makes sense.
The problem there though is I'd still have to use the Change HP/MP commands, since setting the variable won't make it that value. Probably just simple addition/subtraction though.
That is what I'm saying. You check first if the new MP value is higher than the old one, you set it to old one, using Change MP command; it it isn't higher, then use the new one, using the same command.
Oh, I misread that then. My bad. ^^;

Now here's my next question, and this is purely cosmetic: Do you think that this is best suited for just an enemy ability, something that the player can use, or both?
TBH, I never cared much for that. Using the FF VII example, there aren't spells that need that much MP anyway, unless you were miming a W-Summon.
Hmmm...well, if you recall in the OP, I did say that it would be HP/10 for MP, and MPx10 for HP so it could have practical uses of healing if need be (though again, if I made it so that the player could use it, and as a skill, it'd have to affect the entire party). So enemies using it against the player might be it then (it's based off of FFXII's version in a way, so...).
Bringing this back up (haven't tried it yet), but is it possible to make this actually target just ONE character? I thought about it, and while I can make the skill itself target one character, it'll still have to flip a switch, and there's no way to check if a specific character is being targeted so...
Pages: 1