Skip to content

Commit

Permalink
hack in bgs 10 damage thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Jun 15, 2024
1 parent 77620a5 commit 424c2ec
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public void onHitsplatApplied(HitsplatApplied hitsplatApplied)
private void specialAttackHit(SpecialWeapon specialWeapon, int hit, NPC target)
{
int localPlayerId = client.getLocalPlayer().getId();
int counterHit = getHit(specialWeapon, hit);
int counterHit = specialWeapon.isDamage() ? specialWeapon.computeHit(hit, target) : Math.min(hit, 1);
float defenceDrain = specialWeapon.computeDrainPercent(hit, target);

log.debug("Special attack hit {} hitsplat {}", specialWeapon, hit);
Expand Down Expand Up @@ -576,11 +576,6 @@ private void removeCounters()
percentageInfobox = null;
}

private static int getHit(SpecialWeapon specialWeapon, int amount)
{
return specialWeapon.isDamage() ? amount : Math.min(amount, 1);
}

private PlayerInfoDrop createSpecInfoDrop(SpecialWeapon weapon, int hit, int playerId)
{
int cycle = client.getGameCycle();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,18 @@ else if (target != null && TEKTON_VARIANTS.contains(target.getId()))
},
ARCLIGHT("Arclight", new int[]{ItemID.ARCLIGHT}, false, SpecialCounterConfig::arclightThreshold),
DARKLIGHT("Darklight", new int[]{ItemID.DARKLIGHT}, false, SpecialCounterConfig::darklightThreshold),
BANDOS_GODSWORD("Bandos Godsword", new int[]{ItemID.BANDOS_GODSWORD, ItemID.BANDOS_GODSWORD_OR}, true, SpecialCounterConfig::bandosGodswordThreshold),
BANDOS_GODSWORD("Bandos Godsword", new int[]{ItemID.BANDOS_GODSWORD, ItemID.BANDOS_GODSWORD_OR}, true, SpecialCounterConfig::bandosGodswordThreshold)
{
@Override
public int computeHit(int hit, @Nullable NPC target)
{
if (hit == 0 && target != null && TEKTON_VARIANTS.contains(target.getId()))
{
return 10;
}
return super.computeHit(hit, target);
}
},
BARRELCHEST_ANCHOR("Barrelchest Anchor", new int[]{ItemID.BARRELCHEST_ANCHOR}, true, (c) -> 0),
BONE_DAGGER("Bone Dagger", new int[]{ItemID.BONE_DAGGER, ItemID.BONE_DAGGER_P, ItemID.BONE_DAGGER_P_8876, ItemID.BONE_DAGGER_P_8878}, true, (c) -> 0),
DORGESHUUN_CROSSBOW(
Expand Down Expand Up @@ -157,4 +168,9 @@ public float computeDrainPercent(int hit, @Nullable NPC target)
{
return 0f;
}

public int computeHit(int hit, @Nullable NPC target)
{
return hit;
}
}

0 comments on commit 424c2ec

Please sign in to comment.