# Simple Guts System (no variables required) (Read 9721 times)

Started by Nep Heart, June 24, 2019, 12:09:02 AM

#### Nep Heart

##### Simple Guts System (no variables required)
#1  June 24, 2019, 12:09:02 AM
• CPU Purple Heart

• Online
Quote
[State -2, Guts]
type = DefenceMulSet
trigger1 = movetype != H
value = 1
ignorehitpause = 1

[State -2, Guts]
type = DefenceMulSet
trigger1 = movetype = H
value = (((LifeMax/1000.0)-((LifeMax-Life)*0.0005))/(LifeMax/1000.0))
ignorehitpause = 1

[State -2, Guts]
trigger1 = MoveType = H
trigger1 = gethitvar(hitcount) < 2
trigger1 = gethitvar(damage) > 0
value = floor(gethitvar(damage)-(gethitvar(damage)*(((LifeMax/1000.0)-((LifeMax-Life)*0.0005))/(LifeMax/1000.0))))
ignorehitpause = 1

As a way to balance my characters' combo damage further on an internal level (aka: against each other as intended), I've used a simplistic guts system in which combos do less damage the lower their current life is, cutting damage down to 50% when reaching close to the 1000 life loss threshold. It's mostly based on Eternal Fighter Zero's guts system, but I had to make a few tweaks for characters who deviate from 1000 life. For example, if a character who has 1200 life, change this ((LifeMax-Life)*0.0005)) to this ((LifeMax-Life)*0.0006)). Another example is if a character has 800 life, change it to this ((LifeMax-Life)*0.0004)) instead. Basically, 0.0005 represents having 1000 life, so, make the mathematical comparison and contrast to 1000 life.

The reason why I am using the lifeadd for the first hit is because defencemulset only works on the second hit and onward when being combo'd, thus filling the first hit gap accordingly.

Keep in mind that this isn't suitable for all systems, the main reason you'll ever consider using this is if your characters dish out extremely high damage output, so, it keeps things normalized when they're hit by bigger combos. It should be noted that negative value targetlifeadds with absolute = 1 will completely ignore this guts system, which is somewhat intentional since I've planned for those kind of moves to completely ignore damage scaling and make them more valuable when P2 is at low life.

#### 2OS

##### Re: Simple Guts System (no variables required)
#2  June 24, 2019, 12:50:51 AM
• 608 Wannabe
• Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
you're gonna wanna add ceil or floor to those multiplied variants to prevent debug errors; life values aren't mandated to be divisible by 5 or 10. i encountered this as i was setting up a poison-esque effect for one of my own projects and it failed to work against characters with odd values (just about everything "pots styled" for example).

edit: i'd actually advise completely refraining from dividing life values as a whole because of this.

#### Nep Heart

##### Re: Simple Guts System (no variables required)
#3  June 24, 2019, 12:54:34 AM
• CPU Purple Heart

• Online
Pretty sure there is a floor trigger placed before the values in parenthesis in the lifeadd, which only accounts for the first hit. From what I've tested, this is only required for lifeadd, defencemulset otherwise accepts fractions from my experience.

#### 2OS

##### Re: Simple Guts System (no variables required)
#4  June 24, 2019, 01:30:58 AM
• 608 Wannabe
• Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
that value is so long that i missed seeing it somehow lol