Is it possible to make a sacrificing skill?

i want to make a skills called blood sacrifice. sacrificing a characters hp for a mass atk buff how would i plug in a formula to make that happen or is it even possible?
In your damage formula, you would make use of

a.hp Actor's current HPand

a.mhp Actor's max HPto make different effects. If you are not familiar with Damage Formula functions, I suggest googling tutorials on how to make custom formulas and to see what you can do with them.

Like this one: http://cobbtocs.co.uk/wp/?p=271

And then have the skill of course provide the state that provides the atk increase.

Edit: I mentioned a complex version, listen to Warpmind for the basic version. Actually my method works better if you want the actor using this to apply it to other party members as an option, instead of just himself/herself.
Tried making a buff skill that targets a party member and deals damage while adding an attack bonus state?
Who should sacrifice the HP? The caster or the party? If it's the caster, I'd do this on the damage formula

a.hp -= damage_value ; $game_party.battle_members.each {|mem| mem.add_state(STATE_ID_OF_STR_STATE)}and make sure the skill is actually self-targetedif it's the party, make the skill as all allies target then on the damage formula

Code:
b.add_state(STATE_ID_OF_STR_STATE);damage_value

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-make-a-sacrificing-skill.36903/