This commit is contained in:
2025-03-20 20:21:47 -05:00
parent 04232ec50c
commit f655a11e93
3 changed files with 54 additions and 38 deletions
+14
View File
@@ -239,6 +239,7 @@ public class ActionsBase {
//Add blocked types here
public boolean blocked(AbstractWorldObject awo, PowersBase pb, int trains, AbstractCharacter source) {
if(!pb.getName().contains("Summon")) {
if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter target = (AbstractCharacter) awo;
@@ -252,17 +253,22 @@ public class ActionsBase {
}
}
}
if(pb.isChant)
return false;
if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter ac = (AbstractCharacter) awo;
if(ac.effects.containsKey(this.stackType)) {
Boolean sameRank = false;
Effect eff = ac.effects.get(this.stackType);
String currentEffect = eff.getEffectsBase().getIDString();
String newEffect = this.effectID;
if (currentEffect.equals(newEffect) && !this.stackType.equals("Stun"))
return false;
if (eff != null) {
for (ActionsBase action : eff.getPower().getActions()) {
if (this.stackType.equals(action.stackType) && this.stackOrder == action.stackOrder) {
@@ -270,9 +276,11 @@ public class ActionsBase {
return true;
}
}
if (sameRank) {
if (this.greaterThan && trains <= eff.getTrains())
return true;
if (this.greaterThanEqual && trains < eff.getTrains())
return true;
}
@@ -282,10 +290,12 @@ public class ActionsBase {
PlayerBonuses bonus = ac.getBonuses();
if (bonus == null)
return false;
SourceType sourceType = null;
try {
sourceType = SourceType.GetSourceType(this.stackType);
}catch(Exception ignored){
}
if(sourceType != null && (bonus.getBool(ModType.ImmuneTo,sourceType) || bonus.getBool(ModType.NoMod,sourceType)))
return true;
@@ -296,12 +306,16 @@ public class ActionsBase {
if(this.stackType.equals("Stun") && pc.getRace().getName().contains("Minotaur"))
return true;
}
if(this.stackType.equals("Stun") && bonus.getBool(ModType.ImmuneTo,SourceType.Stun))
return true;
if(pb.vampDrain() && bonus.getBool(ModType.BlockedPowerType, SourceType.VAMPDRAIN))
return true;
if (this.stackType.equals("Track") && bonus.getBool(ModType.CannotTrack, SourceType.None))
return true;
if (this.stackType.equals("PowerInhibitor") && bonus.getBool(ModType.ImmuneTo, SourceType.Powerblock))
return true;
}