Skip to content

Commit

Permalink
调整 部分代码
Browse files Browse the repository at this point in the history
  • Loading branch information
lazy-immortal committed Dec 6, 2024
1 parent 12c12ef commit 576c54e
Showing 1 changed file with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1382,22 +1382,13 @@ private int getEnergyId(int waterEnergy) {
}

private void forestExtend() {
try {
if (ExtendHandle.handleAlphaRequest("forestExtend", "useMoreProp", "boost|shield")) {
if (bubbleBoostType.getValue() != UsePropType.CLOSE) {
Class.forName("io.github.lazyimmortal.sesame.model.task.antForest.AntForestAlpha")
.getMethod("addUsePropTask", String.class, List.class, int.class)
.invoke(null, PropGroup.boost.name(), bubbleBoostTime.getValue(), bubbleBoostType.getValue());
}
if (energyShieldType.getValue() != UsePropType.CLOSE) {
Class.forName("io.github.lazyimmortal.sesame.model.task.antForest.AntForestAlpha")
.getMethod("addUsePropTask", String.class, Long.class, int.class)
.invoke(null, PropGroup.shield.name(), usingProps.get(PropGroup.shield.name()), (int) energyShieldType.getValue());
}
if (ExtendHandle.handleAlphaRequest("forestExtend", "useMoreProp", "boost|shield")) {
if (bubbleBoostType.getValue() != UsePropType.CLOSE) {
ExtendHandle.handleAlphaRequest("boost", bubbleBoostType.getConfigValue(), bubbleBoostTime.getConfigValue());
}
if (energyShieldType.getValue() != UsePropType.CLOSE) {
ExtendHandle.handleAlphaRequest("shield", energyShieldType.getConfigValue(), String.valueOf(usingProps.get(PropGroup.shield.name())));
}
} catch (Throwable t) {
Log.i(TAG, "forestExtend err:");
Log.printStackTrace(TAG, t);
}
}

Expand Down

0 comments on commit 576c54e

Please sign in to comment.