Would it be worth to add a "stacking" mechanism to the Poison code? That may not be too difficult.
And it would add an advantage to poisoning characters multiple times.
I think this is the relevant code from PROGRAM\Loc_ai\LAi_character.c:
Not entirely sure what that 'dltTime' input variable does though....
Anyway, I can think of two options:
1. Have a poison "timer" variable and a poison "intensity" one
The "timer" would get extended when newly poisoned AND the intensity increased.
I think this may get relatively complex and wouldn't always be quite correct either.
Imagine hitting a character at the very moment the first poison would stop having an effect.
Now this character would get DOUBLE poisoned for the entirety of his "next" period of being poisoned.
Not quite fair....
2. Have ONLY a "timer" one
The "intensity" could then be derived from the time value itself. And the timer would be "current timer + increase" whenever a new poison action is done.
Then damage to apply at each "update" could be calculated as:
HP hit = Timer value/Balancing variable;
So immediately after being poisoned, you get the FULL, say, "300/100=3" HP hit applied.
But once the timer gets to its end, this will be "1/100=0.01" instead. So it quite literally "wears off" after a while.
You would then get "unpoisoned" not when the timer reaches zero as it does now (because it would NEVER reach zero like this!),
but instead you could check when the timer drops below 1.0 instead.
Does that make any sense?
And it would add an advantage to poisoning characters multiple times.
I think this is the relevant code from PROGRAM\Loc_ai\LAi_character.c:
Code:
if(CheckAttribute(chr_ai, "poison"))
{
chr_ai.poison = stf(chr_ai.poison) - dltTime;
if(stf(chr_ai.poison) <= 0.0)
{
DeleteAttribute(chr_ai, "poison");
}else{
// El Rapido -->
/*hp = hp - dltTime*2.0;
if(IsCharacterPerkOn(chr_ai, "Toughness"))
{
hp = hp - dltTime*1.0;
}
else
{
hp = hp - dltTime*2.0;
}*/
// El Rapido <--
//Redone by Levis for extra perk(s)
float multip = 4.0;
if(CheckPerkForGroup(chr_ai, "DefendPoison")) multip -= 0.5; //party wide
if(IsCharacterPerkOn(chr_ai, "Toughness")) multip -= 1;
hp = hp - dltTime*multip;
//End redo
}
}
Anyway, I can think of two options:
1. Have a poison "timer" variable and a poison "intensity" one
The "timer" would get extended when newly poisoned AND the intensity increased.
I think this may get relatively complex and wouldn't always be quite correct either.
Imagine hitting a character at the very moment the first poison would stop having an effect.
Now this character would get DOUBLE poisoned for the entirety of his "next" period of being poisoned.
Not quite fair....
2. Have ONLY a "timer" one
The "intensity" could then be derived from the time value itself. And the timer would be "current timer + increase" whenever a new poison action is done.
Then damage to apply at each "update" could be calculated as:
HP hit = Timer value/Balancing variable;
So immediately after being poisoned, you get the FULL, say, "300/100=3" HP hit applied.
But once the timer gets to its end, this will be "1/100=0.01" instead. So it quite literally "wears off" after a while.
You would then get "unpoisoned" not when the timer reaches zero as it does now (because it would NEVER reach zero like this!),
but instead you could check when the timer drops below 1.0 instead.
Does that make any sense?