ChristopherBThai / Discord-OwO-Bot

A Discord bot that will keep track of your OwO
https://discordapp.com/oauth2/authorize?client_id=408785106942164992&permissions=1074120776&scope=bot
Other
556 stars 407 forks source link

Fix for pstaff reviving pets and more #340

Closed Caviarbro closed 1 year ago

Caviarbro commented 1 year ago

There was no check for HP for both of the sides attacking and ally. This caused buffs being removed from dead enemy and dealing damage to them (it seems like the getAttacking function gets only alive pets compared to getRandomAnimal function), debuffs being removed from dead ally and that caused reviving the pet.

Not sure if there are more changes needed, such as selecting different ally or enemy.

sfk-steelsong commented 1 year ago

better place for this fix is probably WeaponInterface.getRandomAnimal by calling WeaponInterface.getAlive to filter the list before checking for buffs. getAttacking calls that (and has a bonus "are you really alive" check too)

Easier jumping off place for the other bug with pstaff where it picks buffs / debuffs that have been removed by other mechanics (atk up after atk up + is applied, fstaff after it explodes, etc) since that should also affect targeting.

sfk-steelsong commented 1 year ago

also don't do returns, what'll happen here is if it picks a dead ally it'll deal damage / remove a buff and then not spend wp / log appropriately

Caviarbro commented 1 year ago

better place for this fix is probably WeaponInterface.getRandomAnimal by calling WeaponInterface.getAlive to filter the list before checking for buffs. getAttacking calls that (and has a bonus "are you really alive" check too)

Easier jumping off place for the other bug with pstaff where it picks buffs / debuffs that have been removed by other mechanics (atk up after atk up + is applied, fstaff after it explodes, etc) since that should also affect targeting.

Yes I have noticed that too. I will change it asap.

ChristopherBThai commented 1 year ago

Thank you!