Browse Source

PVE flag

lakebane
FatBoy-DOTC 4 weeks ago
parent
commit
35ef86110f
  1. 6
      src/engine/gameManager/PowersManager.java
  2. 2
      src/engine/powers/ActionsBase.java

6
src/engine/gameManager/PowersManager.java

@ -1105,7 +1105,7 @@ public enum PowersManager {
continue; continue;
// If something blocks the action, then stop // If something blocks the action, then stop
if (ab.blocked(target, pb, trains, null)) { if (ab.blocked(target, pb, trains, playerCharacter)) {
PowersManager.sendEffectMsg(playerCharacter, 5, ab, pb); PowersManager.sendEffectMsg(playerCharacter, 5, ab, pb);
continue; continue;
@ -1292,7 +1292,7 @@ public enum PowersManager {
continue; continue;
// If something blocks the action, then stop // If something blocks the action, then stop
if (ab.blocked(target, pb, trains, null)) if (ab.blocked(target, pb, trains, caster))
continue; continue;
// TODO handle overwrite stack order here // TODO handle overwrite stack order here
String stackType = ab.getStackType(); String stackType = ab.getStackType();
@ -1927,7 +1927,7 @@ public enum PowersManager {
if (trains < ab.getMinTrains() || trains > ab.getMaxTrains()) if (trains < ab.getMinTrains() || trains > ab.getMaxTrains())
continue; continue;
// If something blocks the action, then stop // If something blocks the action, then stop
if (ab.blocked(target, pb, trains, null)) if (ab.blocked(target, pb, trains, ac))
// sendPowerMsg(pc, 5, msg); // sendPowerMsg(pc, 5, msg);
continue; continue;
// TODO handle overwrite stack order here // TODO handle overwrite stack order here

2
src/engine/powers/ActionsBase.java

@ -239,6 +239,7 @@ public class ActionsBase {
//Add blocked types here //Add blocked types here
public boolean blocked(AbstractWorldObject awo, PowersBase pb, int trains, AbstractCharacter source) { public boolean blocked(AbstractWorldObject awo, PowersBase pb, int trains, AbstractCharacter source) {
if (AbstractWorldObject.IsAbstractCharacter(awo)) { if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter target = (AbstractCharacter) awo; AbstractCharacter target = (AbstractCharacter) awo;
if(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)){ if(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)){
@ -250,6 +251,7 @@ public class ActionsBase {
} }
} }
} }
if(pb.isChant) if(pb.isChant)
return false; return false;

Loading…
Cancel
Save