Sanity 435 Posted September 28, 2017 Report Share Posted September 28, 2017 I've used Ruse a lot and never seen anything even similar to this. OT: int recDamage = (int) (damage * 0.001); if (recDamage <= 0) return; if (recDamage > t2.getConstitution()) recDamage = t2.getConstitution(); attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT)); From the recoil effect lol. It has nothing to do with barrows degrading. You're making your Dharok's return damage to the attacker.. You also have so much repetetive code. You could do it as simple as this: DegradingItem: public static Optional<DegradingItem> forItem(int item) { for(DegradingItem d : DegradingItem.values()) { if(d.deg == item || d.nonDeg == item) { return Optional.of(d); } } return Optional.empty(); } CombatFactory: //Handle equipped items for our target.. for(Item item : t2.getEquipment().getItems()) { //Check if the target's item should degrade.. Optional<DegradingItem> deg = DegradingItem.forItem(item.getId()); if(deg.isPresent()) { ItemDegrading.handleItemDegrading(t2, deg.get()); } switch(item.getId()) { //Handle other items.. case 2550: //Handle recoil effect.. break; } } Wrote this quickly. 1 Link to comment Share on other sites More sharing options...
Baller pk10 0 Posted January 15, 2020 Report Share Posted January 15, 2020 thank you for the contribution Link to comment Share on other sites More sharing options...
onetake 0 Posted October 13, 2022 Report Share Posted October 13, 2022 thanks a lot!! Link to comment Share on other sites More sharing options...
Sir Dope 2 Posted October 13, 2022 Report Share Posted October 13, 2022 tyyyyyyyyyy Link to comment Share on other sites More sharing options...
mire 0 Posted October 29, 2022 Report Share Posted October 29, 2022 Thanks for the contributions Link to comment Share on other sites More sharing options...
nsin25 0 Posted February 7, 2023 Report Share Posted February 7, 2023 Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now