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
+10 -3
View File
@@ -292,9 +292,16 @@ public enum PowersManager {
//check for movement buffs while flying
if(playerCharacter.isFlying()) {
for (ActionsBase ab : pb.getActions()) {
if (ab.stackType.equalsIgnoreCase("MoveBuff")) {
return true;
for(ActionsBase ab : pb.getActions()){
for(AbstractEffectModifier mod1 : ab.getPowerAction().getEffectsBase().getModifiers()){
if(mod1.modType.equals(ModType.Speed) && mod1.getPercentMod() > 0){
return false;
}
}
for(AbstractEffectModifier mod2 : ab.getPowerAction().getEffectsBase2().getModifiers()){
if(mod2.modType.equals(ModType.Speed) && mod2.getPercentMod() > 0){
return false;
}
}
}
}