creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
MagicEffectChance == 3; // will do !(RAND()%3)
MagicEffectDuration = { rand: 200; add: 400; } // 400+RAND_N(200)
truth slowaxe::HitEffect (character *Enemy, character *Hitter, v2 HitPos, int BodyPartIndex, int Direction, truth BlockedByArmour) {
truth BaseSuccess = meleeweapon::HitEffect(Enemy, Hitter, HitPos, BodyPartIndex, Direction, BlockedByArmour);
if (Enemy->IsEnabled() && GetMagicEffectChance().inRange()) {
if (Hitter) {
if (Enemy->IsPlayer() || Hitter->IsPlayer() || Enemy->CanBeSeenByPlayer() || Hitter->CanBeSeenByPlayer()) {
ADD_MESSAGE("%s axe chills %s.", Hitter->CHAR_POSSESSIVE_PRONOUN, Enemy->CHAR_DESCRIPTION(DEFINITE));
}
} else {
if (Enemy->IsPlayer() || Enemy->CanBeSeenByPlayer()) {
ADD_MESSAGE("The axe chills %s.", Enemy->CHAR_DESCRIPTION(DEFINITE));
}
}
//Enemy->BeginTemporaryState(SLOW, 400+RAND_N(200));
Enemy->BeginTemporaryState(SLOW, GetMagicEffectDuration().rand());
return BaseSuccess;
}
return BaseSuccess;
}