Browse Source

can use abilities while flying

lakebane-strongholds
FatBoy-DOTC 4 months ago
parent
commit
383ef27128
  1. 32
      src/engine/gameManager/PowersManager.java

32
src/engine/gameManager/PowersManager.java

@ -291,22 +291,22 @@ public enum PowersManager { @@ -291,22 +291,22 @@ public enum PowersManager {
}
//check for movement buffs while flying
if(playerCharacter.isFlying()) {
for(ActionsBase ab : pb.getActions()){
for(AbstractEffectModifier mod1 : ab.getPowerAction().getEffectsBase().getModifiers()){
if(mod1.modType.equals(ModType.Speed) && mod1.getPercentMod() > 0){
ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff");
return true;
}
}
for(AbstractEffectModifier mod2 : ab.getPowerAction().getEffectsBase2().getModifiers()){
if(mod2.modType.equals(ModType.Speed) && mod2.getPercentMod() > 0){
ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff");
return true;
}
}
}
}
//if(playerCharacter.isFlying()) {
// for(ActionsBase ab : pb.getActions()){
// for(AbstractEffectModifier mod1 : ab.getPowerAction().getEffectsBase().getModifiers()){
// if(mod1.modType.equals(ModType.Speed) && mod1.getPercentMod() > 0){
// ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff");
// return true;
// }
// }
// for(AbstractEffectModifier mod2 : ab.getPowerAction().getEffectsBase2().getModifiers()){
// if(mod2.modType.equals(ModType.Speed) && mod2.getPercentMod() > 0){
// ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff");
// return true;
// }
// }
// }
//}
if (playerCharacter.getLastPower() != null)
return true;

Loading…
Cancel
Save