no move buff while flying

This commit is contained in:
2024-08-30 19:27:19 -05:00
parent 67e55ab0a0
commit 5be9033c40
3 changed files with 20 additions and 8 deletions
@@ -500,6 +500,14 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
if (bonus != null && !bonus.getBool(ModType.NoMod, SourceType.Fly) && bonus.getBool(ModType.Fly, SourceType.None) && flyer.isAlive())
canFly = true;
for(Effect eff : flyer.effects.values()){
for(AbstractEffectModifier mod : eff.getEffectModifiers()){
if(mod.modType.equals(ModType.Speed) && mod.getPercentMod() > 0){
return false;
}
}
}
if(bonus != null && bonus.getFloat(ModType.Speed,SourceType.BUFF) > 0){
return false;
}