use of main.elements.conditions.standard.PositionCondition in project Eidolons by IDemiurge.
the class DC_StateManager method checkCellBuffs.
private void checkCellBuffs() {
for (BattleFieldObject unit : getGame().getBfObjects()) {
if (unit.isDead()) {
continue;
}
Obj cell = game.getCellByCoordinate(unit.getCoordinates());
if (cell == null) {
continue;
}
if (cell.getBuffs() == null) {
continue;
}
for (BuffObj buff : game.getCellByCoordinate(unit.getCoordinates()).getBuffs()) {
if (unit.hasBuff(buff.getName())) {
continue;
}
if (buff.isAppliedThrough()) {
Condition retainCondition = new PositionCondition(KEYS.SOURCE.toString(), cell);
getGame().getManager().copyBuff(buff, unit, retainCondition);
}
}
}
}
Aggregations