Skip to content

Commit

Permalink
By when v1.127 is released (#75)
Browse files Browse the repository at this point in the history
* v2.1.0 (#70)

* Astral Gate: Manual interaction is no longer required
* Astral Gate: Will now use the best ammunition it has on the boss.
* Astral Gate: Priority can now be configured for each portal

* Updated the version

* Updated the version

* Updated useItem
  • Loading branch information
dm94 authored Aug 21, 2023
1 parent f298ac1 commit b1bccdb
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 437 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<dependency>
<groupId>eu.darkbot</groupId>
<artifactId>DarkBot</artifactId>
<version>master-a5fa9a8a26-1</version>
<version>6d026357cb</version>
</dependency>
<dependency>
<groupId>eu.darkbot</groupId>
<artifactId>DarkBotAPI</artifactId>
<version>0.7.0</version>
<version>0.7.8</version>
</dependency>
<dependency>
<groupId>com.deemetool</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,7 @@ private void useAbilityReadyWhenReady() {
return;
}

if (items.getItem(abilityToUse, ItemFlag.USABLE, ItemFlag.READY).isPresent()) {
if (items.useItem(abilityToUse).isSuccessful()) {
abilityUsed = true;
}
} else {
abilityUsed = true;
}
abilityUsed = items.useItem(abilityToUse, 500, ItemFlag.USABLE, ItemFlag.READY).isSuccessful();
}

private GroupMember getMember() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private boolean shouldFocusHealth(boolean needLock) {
}

private boolean shouldFocusHelpTank() {
if (heroapi.getHealth().shieldPercent() < 0.5) {
if (heroapi.getHealth().shieldPercent() <= this.config.minHealthToUseHealth) {
return false;
} else if (group.hasGroup()) {
for (GroupMember member : group.getMembers()) {
Expand All @@ -304,12 +304,12 @@ private boolean shouldFocusHelpTank() {
}

private boolean shouldFocusShield() {
if (heroapi.getHealth().shieldPercent() < 0.5) {
if (heroapi.getHealth().shieldPercent() <= this.config.minHealthToUseHealth) {
return true;
} else if (group.hasGroup()) {
for (GroupMember member : group.getMembers()) {
if (!member.isDead() && member.isAttacked() && member.isLocked()
&& member.getMemberInfo().shieldPercent() < 0.5) {
&& member.getMemberInfo().shieldPercent() <= this.config.minHealthToUseHealth) {
return true;
}
}
Expand All @@ -326,7 +326,7 @@ private boolean shouldUseOrcusAssimilate() {
return false;
}

if (heroapi.getHealth().hpPercent() > 0.8) {
if (heroapi.getHealth().hpPercent() > this.config.minHealthToUseHealth) {
return false;
}

Expand Down
23 changes: 15 additions & 8 deletions src/main/java/com/deeme/modules/astral/AstralConfig.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
package com.deeme.modules.astral;

import java.util.HashMap;
import java.util.Map;

import com.deeme.behaviours.bestrocket.RocketSupplier;
import com.deemetool.gui.suppliers.LaserSupplier;
import com.deemetool.modules.astral.PortalInfo;

import eu.darkbot.api.config.annotations.Configuration;
import eu.darkbot.api.config.annotations.Dropdown;
import eu.darkbot.api.config.annotations.Number;
import eu.darkbot.api.config.annotations.Option;
import eu.darkbot.api.config.annotations.Table;

@Configuration("astral")
public class AstralConfig {
Expand All @@ -18,11 +24,12 @@ public class AstralConfig {
public int minCPUs = 0;

@Option("general.default_ammo")
public Character ammoKey;
@Dropdown(options = LaserSupplier.class)
public String defaultLaser = "ammunition_laser_lcb-10";

@Option("general.default_rocket")
@Dropdown(options = RocketSupplier.class)
public String defaultRocket = "";
public String defaultRocket = "ammunition_rocket_plt-2026";

@Option("astral.attack_closest")
public boolean alwaysTheClosestNPC = false;
Expand All @@ -31,12 +38,12 @@ public class AstralConfig {
@Dropdown
public BestAmmoConfig useBestAmmoLogic = BestAmmoConfig.ONLY_MARKED;

@Option("astral.choose_portal")
public boolean autoChoosePortal = false;
@Option("astral.ship_to_choose")
@Dropdown
public AvailableShips shipType = AvailableShips.ZEPHYR;

@Option("astral.choose_item")
public boolean autoChooseItem = false;
@Option("astral.auto_choose")
public boolean autoChoose = false;

@Option("astral.display_warning")
public boolean displayWarning = false;
public @Option @Table Map<String, PortalInfo> portalInfos = new HashMap<>();
}
Loading

0 comments on commit b1bccdb

Please sign in to comment.