Sandcastle-Builder icon indicating copy to clipboard operation
Sandcastle-Builder copied to clipboard

Handle tied dragon fights

Open waveney opened this issue 10 years ago • 12 comments

waveney avatar Jun 29 '14 19:06 waveney

I would appreciate fact checking of my assumptions and some feedback. My understanding is that a tie happens when neither side has enough attack to overcome the other side's defenses after 100 rounds.

I am also interpreting that a "Pyric victory" situation results from having less than half total dragon health remaining after the enemy is defeated in a battle when more than one hatchling is present?

If that is all correct my suggestion was to split ties into two cases evaluated after 100 runs or whichever the loop limit is set to in the future and I would call them Stalemate (Winning/Tie-ing)and Tactical Retreat(Losing). I was imagining both cases to return dragons to the hatchling pool probably hungry in both cases and probably also add the hiding status or recovering or both if both is a valid option and the two cases would be separated similar to the Pyric victory scenario where if health was brought down low enough and then the loop limit was reached it would be a Tactical Retreat and the clutch would return short one dragon if it was a multiple dragon clutch.

In about 18hrs from the time of submitting this I might start to mock up a version of the combat resolver with those cases added.

EPSIL0N avatar Jun 30 '14 04:06 EPSIL0N

Thankyou very much. Returning the hatchlings to Hungry is not easy (due to underlying mechanics), but recovery is certainly easy to apply, as could a period before they could fledge again.

waveney avatar Jun 30 '14 06:06 waveney

I ran into tech problems so the machine I was going to code on and test on is in use.

I have had second thoughts about the hunger part, I had a shortcut for creating the illusion of fledglings returning and being hungry again by simply cleaning the fighting clutch and adding a new clutch but it might be more inconvenience than it is worth to have to feed them again if it throws off player's rationing of food.

Also cleaning and recreating has the unintended effect of possibly swapping a dragon's stats if the nest is changed before the fight. Cryogenics does something similar but there it wouldn't be assumed with as much certainty that specific dragons are being retrieved from cryo compared to expecting the same dragons back after a tied fight.

EPSIL0N avatar Jul 01 '14 08:07 EPSIL0N

Be aware the fight code is also used for redundaknights,,.

waveney avatar Jul 01 '14 17:07 waveney

Oh that is a sticking point, I had glossed over the fact that the dragons are actually fledged completely through both fledging and cryo and then a fight is called to see if they survive and stay if they are invading a new NP.

I think the idea of dragons retreating is losing plausibility / feasibility as a solution, while the stats could probably be retrieved from the NPdata using an atlernate add method to add to a new hatchling spawn instead of the nest properties but the NPdata does not record diet and Hatchlings do not currently record type. The diet issue would require diet be recorded on each NPdata. The type issue would result in dragons retreating from RK attacks potentially typing up when they are fledged again.

I was starting to consider some alternate solutions but they could involve changes to the fight reward payout scheme, is it intentional in the larger picture for dignified loses to pay out full fight exp? And should wipeout loses be paying out next to nothing?

EPSIL0N avatar Jul 02 '14 01:07 EPSIL0N

The two types of fights could be handled differently:

For fledging the hatchlings retreat back (would not be too difficult to move things around to not lose the data prior to the fight). For Redundaknights the attackers retreat - experince but no rewards (and recovery).

is it intentional in the larger picture for dignified loses to pay out full fight exp? And should wipeout loses be paying out next to nothing?

Yes. Though he manitude of the payout for dignified loses could be tweaked. Wipeouts should get next to nothing (otherise there would be scope for delibarately throwing away dragons against very high ranking opponents just to get the experience).

waveney avatar Jul 02 '14 14:07 waveney

Your idea would be good and is probably my current favorite if you believe it is possible within the code, I haven't really come up with any new ideas that are both creative and feel right as it is hard to deal with not killing the dragons aside from very limited rewards as it is too possible to deliberately tie with defense tanking.

The latest idea I was settling with was to just compare the enemy health divided by dragons avg atk vs dragons health divided by enemy avg atk and push the state to either dignified loss or pyric victory depending on which side wins the ratio comparison.

I was curious does the dragon queen state currently effect fights in any way, if not is it planned to in the future?

EPSIL0N avatar Jul 23 '14 05:07 EPSIL0N

I was curious does the dragon queen state currently effect fights in any way, if not is it planned to in the future?

If not, I like that idea!

eternaldensity avatar Jul 24 '14 07:07 eternaldensity

The state of the Queen has no effect at present.

waveney avatar Jul 24 '14 08:07 waveney

I didn't have any specifics in mind, was just thinking that it might be one way to break a loop i had imagined for some of the "ties return the dragons scenarios" where a player would deliberately tie over and over while juggling all the hatchlings to prevent escape leading to more and more fights per hour as new dragons are added to the hatchling pool. I still think the better solution is to avoid having payouts of rewards that are profitable when you have to keep buying the recovery items.

EPSIL0N avatar Jul 24 '14 16:07 EPSIL0N

I have found that most tied fights are a result of bugs...

waveney avatar Aug 04 '14 06:08 waveney

I think it may have passed and might not reoccur any time soon due to the nature of the numbers growing but at one point I could reliably tie fights with the defense from Ooh Shiny while attempting to lose with dignity. Outside that scenario and bugs that drastically shift attack down or defense up for either side, I have not been able to get it set up where it will consistently tie.

I really haven't started anything on this between the inability to cause ties anymore when I want to and not having my second machine to run test environments on without risking crashing my live game.

EPSIL0N avatar Aug 04 '14 16:08 EPSIL0N