getFirerangeModifier Affects the Range of Direct-Attack Units, But getMinFirerangeModifier Does Not
FruityGumGuiltyFruit opened this issue · 1 comments
FruityGumGuiltyFruit commented
Is your feature request related to a problem? Please describe.
I noticed that getFirerangeModifier can increase or decrease the max range of all units, but getMinFirerangeModifier only increases the minimum range of indirect-attack units.
Describe the solution you'd like
Direct-attack attack units should also be effected by getMinFirerangeModifier.
Additional context
Here is a CO with the code below.
this.getFirerangeModifier = function(co, unit, posX, posY, map)
{
if (CO.isActive(co))
{
if (co.getPowerMode() === GameEnums.PowerMode_Superpower ||
co.getPowerMode() === GameEnums.PowerMode_Tagpower)
{
return 3;
}
else if (co.getPowerMode() === GameEnums.PowerMode_Power)
{
return 2;
}
else if (map === null ||
(map !== null && map.getGameRules().getCoGlobalD2D()))
{
return 1;
}
}
return 0;
};
this.getMinFirerangeModifier = function(co, unit, posX, posY, map)
{
if (CO.isActive(co))
{
if (co.getPowerMode() === GameEnums.PowerMode_Superpower ||
co.getPowerMode() === GameEnums.PowerMode_Tagpower)
{
return 3;
}
else if (co.getPowerMode() === GameEnums.PowerMode_Power)
{
return 2;
}
else if (map === null ||
(map !== null && map.getGameRules().getCoGlobalD2D()))
{
return 1;
}
}
return 0;
};
Robosturm commented
You're screenshots don't show that it doesn't work and accprding to the code.
It's not prevented either.
My guess is direct units can always move and fire.
And you're code just gives the infantry move and fire with a 2 range attack which is proably shown by the attack range