I had this skill that would let you swap around an ally's HP and MP, this was the VXAce formulae:
c=b.hp;d=b.mp;b.hp=(d*1.33+b.level).to_i;b.mp=(c*0.5-b.level).to_i;0but it's no longer working, giving me a "has no effect" message in battle.
How do I make this skill work in MV?
Full explanation of the formulae:
Target's HP becomes: (Target's current MP * 1.33 + Target's Level), Target's MP becomes: (Target's current HP / 2 - Target's Level). Rounding off both numbers to avoid decimals.
Still learning at how all of this works and I'm certain there is a better way than what I threw together.
In the meantime, I think this may simulate the effect of swapping HP and MP with the formula you provided.
Try:
c = b.hp; d = b.mp; b.gainHp(-b.hp+1); b.gainMp(-b.mp); b.gainMp(Math.round(c * 0.5 - b.level)); b.gainHp(Math.round(d * 1.33 + b.level)); 0If I'm not mistaken, if a caster continually casts this HP Conversion spell on a target, the target will gradually lose both HP and MP, due to the MP being halved with each iteration.
There will be an odd "Harold has recovered X MP" message. While it looks like the message could be made blank in the Database, it will display a blank line. Fiddling around in Notepad, it looks like there's a file in your game directory's "js" folder called "rpg_windows.js" and in it, a line that says "Window_BattleLog.prototype.displayMpDamage" If you add two forward slashes before the "this.push" text, it should make the message go away.
// this.push('addText', this.makeMpDamageText(target));This will also impact messages from MP recovery items. I suspect there's a much easier way to make all of this happen - I just haven't learned it yet.