# Calculate LUCK via damage formula

#### Nectar

##### Bees love me.
How to I make it so potions healthy by an exact value, with a small bonus depending on LUC?

What I'm looking for:

HP += actor(user).LUC*10+ 100

Basically I want this formula to check the current turn actor's LUC, multiply it by 10, and add the base healing value afterwards.

#### glaphen

##### Veteran
Add + (a.luk * 10 + 100) to the end of the formula.

#### Nectar

##### Bees love me.
So,

Code:
hp += (a.luk * 10 + 100)
The "a" stands for turn actor?

#### TheoAllen

##### Self-proclaimed jack of all trades
Yes, 'a' stands for the user of the item/skill.

#### Nectar

##### Bees love me.
Ok I ran into a problem... Players can just increase the LUK stat of a single character, and heal the entire team with that one character.

How can I make it so if actor 1 uses a potion on actor 3, the game detects which actor is being healed and load their Luck values instead of loading the user's Luck values.

#### TheoAllen

##### Self-proclaimed jack of all trades
use 'b' for the target battler.

### Latest Profile Posts

Discovering math. functions for damage formulas was one of the greatest things for me.
It's very useful for balancing skills to work in a variety of possible circumstances.
For example if you have a skill that is supposed to work for both mages and warriors:
Code:
Math.max(a.atk * 2 - b.def, a.mat * 2 - b.mdf)
SpaceX: First-ever successful (manned) commercial spaceflight!! In these terrible and self-sabotaging times for the world, that's a ray of excitement and hope I needed badly.
let's run...
Hey I used you bunny and cat spritesheet for a game jam game. Thanks so much! You have really beautiful stuff here. I'll credit you at https://gamedevjohn.itch.io/bunny-boy
The video of a psycho chasing people on the streets with a sword before getting subdued is wild. Apparent screenshots of his Twitter feed (EDIT: confirmed by Dallas police) before it went private reveal a dangerous delusional mindset. I heard there was a bow person too. The crazies are really coming out of the woodworks.