• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling scale monster atk with monster level

Lava Titan

Developer
Joined
Jul 25, 2009
Messages
1,571
Solutions
3
Reaction score
98
Location
Portugal
Hey I found this code, seems it's not the one I'm looking for since I changed the values and it did not work...

I'm using TFS 1.2, can someone tell me in what file can I set static min and max damage, so all monsters no matter what monster will do only that range of damage?

Code:
bool Monster::getCombatValues(int32_t& min, int32_t& max)
{
    if (minCombatValue == 0 && maxCombatValue == 0) {
        return false;
    }

    min = minCombatValue;
    max = maxCombatValue;
    return true;
}
 
Last edited:
I already tested it changed nothing, all monsters were acting normal no idea Why

I'm sure this is not the code where to mess with this XD
 
combat.cpp

Code:
CombatDamage Combat::getCombatDamage(Creature* creature, Creature* target) const
{
    CombatDamage damage;
    damage.origin = params.origin;
    damage.primary.type = params.combatType;
    if (formulaType == COMBAT_FORMULA_DAMAGE) {
        damage.primary.value = normal_random(
            static_cast<int32_t>(mina),
            static_cast<int32_t>(maxa)
        );
    } else if (creature) {
        int32_t min, max;
        if (creature->getCombatValues(min, max)) {
            damage.primary.value = normal_random(10, 100);

...
 
Back
Top