Hi,
I have moved the hook to battle and made the buff dissapear after fight...
Yet, as Nightborn stated, this buff is relatively a clone effect buff of other available modules, and making this a constant for ALL the players that keep a balance between their attack and defense, would be unbalancing for the game and not good for it...
Yet, there is a possibility to make this buff a special one, and a valid one for any lotgd engine, IF this buff will appear RANDOMLY, respectively to insert a code that randomizes the "awakening" of the CHI (the racial buff, in my case)...
So, please take a look at the modified code and please suggest what needs to be removed, as absolete, and what needs to be modified and added so that the buff would appear on the equality (attack and defense) condition met, PLUS the random "awakening" factor... many of us are striving for awakening, many are keeping a balance... but not all of us succeed... here, there is in issue the Grace factor that is given on unintelligible by us basis or, in other words intelligible for us, on random basis...
Thank you very much, for your help so far.
The battle hooked code inserted in the generic race is looking like this :
case "battle":
require_once("lib/playerfunctions.php");
require_once("lib/battle-buffs.php");
$atk=get_player_attack();
$def=get_player_defense();
if ($atk==$def) {
apply_buff("racialbenefit",array(
"startmsg"=>"`#Because you succeeded in balancing your attack and defense strengths, your Sacred Chi energy is awakening and is doubling your damage handling skills... ",
"name"=>"`#Sacred Chi`0",
"dmgmod" =>2,
"dmgshield" =>2,
"allowinpvp"=>1,
"allowintrain"=>1,
"rounds"=>99,
"expireafterfight"=>1,
"schema"=>"module-racegeneric",
)
);
}
break;