[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
Update of bug #16305 (project freeciv): Planned Release: = 2.2.3,2.3.0 ___ Follow-up Comment #7: I'll commit these patches to S2_2 and trunk soon if there are no objections. ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
Follow-up Comment #8, bug #16305 (project freeciv): Diplomat help text is not changed in the new multiplayer ruleset. ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message posté via/par Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
Follow-up Comment #9, bug #16305 (project freeciv): Rats. Updated patch for trunk attached. (file #9947) ___ Additional Item Attachment: File name: trunk-diplomat-city-sabotage-bis.diff Size:7 KB ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
Update of bug #16305 (project freeciv): Status:None = Ready For Test Assigned to:None = jtn ___ Follow-up Comment #6: Well, here are some patches which increase Diplomats' chances of sabotaging city improvements/production. Do we want to apply them? Let's come up for a few testcase scenarios to make sure the proposed changes are somewhat balanced. :) What sort of thing did you have in mind? I can't think of any way of testing the balance of this other than play-testing. (Personally I haven't used Diplomats much, so I don't have a feeling for how much this might upset things.) (file #9696, file #9697, file #9698) ___ Additional Item Attachment: File name: S2_1-diplomat-city-sabotage.diff Size:0 KB File name: S2_2-diplomat-city-sabotage.diff Size:3 KB File name: trunk-diplomat-city-sabotage.diff Size:6 KB ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
Follow-up Comment #5, bug #16305 (project freeciv): The Civ2 manual at civfanatics.com http://www.civfanatics.com/content/civ2/reference/Civ2manual.zip doesn't indicate that Spies are more likely to succeed at anything than Diplomats, except in the case of diplomat defence (which we already have). (Some of the details in that manual sound different to our implementation, but there's not enough detail in the manual to be absolutely sure.) I don't think the Apolyton Great Library thread http://apolyton.net/forums/showthread.php?s=threadid=946 shows evidence for such a difference either. (I don't have Civ2 to try it myself.) ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
URL: http://gna.org/bugs/?16305 Summary: Incorrect sabotage handling for diplomats Project: Freeciv Submitted by: None Submitted on: Monday 07/26/2010 at 19:31 CEST Category: None Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: 2.2.1 Discussion Lock: Any Operating System: None Planned Release: ___ Details: The base sabotage chance for a diplomat is half that of the spy, yet could be the same by changing the client. This is either a bug (when the base sabotage chance should be the same for both) or a security flaw (when it should not be possible to upgrade the sabotage chance on the client). Since I don't know the intended behavior, I cannot asses this. In server/diplomats.c:835, function diplomat_sabotage(), the base success probability is chosen depending on whether a specific target is chosen, or random: int success_prob = (improvement = B_LAST ? game.info.diplchance : game.info.diplchance / 2); A few lines further down (line 848) the improvement is set to B_LAST if the unit is not a spy: if (!unit_has_type_flag(pdiplomat, F_SPY)) improvement = B_LAST; So on line 835, the 'improvement' comes straight from the client unmodified, and based on that, the base success chance is chosen. This value is set in the gui, for example in client/gui-gtk-2.0/diplomat_dialog.c:120, function diplomat_sabotage_callback() request_diplomat_action(DIPLOMAT_SABOTAGE, diplomat_id, diplomat_target_id, -1); The last parameter (-1) is the improvement which will be the parameter 'improvement' in diplomat_sabotage() in server/diplomats.c:835. Since -1 B_LAST, this means that a diplomat will sabotage with half the base success chance. This can be changed on the client by simply sending B_LAST as the last parameter on request_diplomat_action() ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
Follow-up Comment #1, bug #16305 (project freeciv): Since I see nowhere in the rules/help that diplomats have half the success chance of spies, I figure this is a bug. Then again, it's kind of an obvious bug when you notice that sabotaging by diplomats fail very often, so maybe it's the security flaw after all. If it's a bug, then either the gui's must be fixed to send B_LAST as the last parameter, or better: put line 848 in server/diplomats.c before line 835. If it's a security flaw, then I would still suggest putting line 848 first, and adding an extra check, halving the chance for diplomats. E.g.: int success_prob = (improvement = B_LAST unit_has_type_flag(pdiplomat, F_SPY) ? game.info.diplchance : game.info.diplchance / 2); ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
Follow-up Comment #2, bug #16305 (project freeciv): Well spotted. I suspect the difference in success probability between Diplomats and Spies is unintentional. I think it's been there at least since this area was last substantially modified in r9000, RT#11058 http://bugs.freeciv.org/Ticket/Display.html?id=11058, in 2004. There's no indication in that ticket that it was an intentional change. Also, the help for the server option diplchance says Base chance for diplomats and spies to succeed. And all the other actions using diplchance don't (obviously) favour the Spy. On the other hand, the current help for the Spy does say She can perform all the functions of the Diplomat, but with a higher rate of success. This text came in in r13997, RT#39541 http://bugs.freeciv.org/Ticket/Display.html?id=39541. No indication in RT of where that notion came from. (Daniel, if you're listening, do you happen to remember?) If this is fixed, I don't think the statement in the help will really be true any more -- the only way spies have a higher rate of success is that they're relatively stronger when in contention with other diplomatic units, I think. Fixing this will make diplomats more effective at sabotaging improvements, which could affect the balance of the early game. However, we don't seem to have shrunk from rectifying similar unintentional but long-standing gameplay issues in the past -- see for instance bug #14181 and bug #16080. So, on balance, I think we should restore equality for diplomats and spies. I don't think we should fix S2_2 clients to send B_LAST, as that'll give new clients on old servers an unfair advantage. We could do so on trunk (but in general sending foo_LAST over the network is a bit unpleasant -- see for example bug #15743). ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16305] Incorrect sabotage handling for diplomats
Follow-up Comment #3, bug #16305 (project freeciv): I cannot remember a specific decision regarding diplomat vs spy success rates. Tried to look around a bit but couldn't find any reference. It is a tricky business though, balancing diplomats/spies. There was a time a few years ago when they were so powerful that they essentially replaced military units as the main tool for warfare. Let's come up for a few testcase scenarios to make sure the proposed changes are somewhat balanced. :) ___ Reply to this item at: http://gna.org/bugs/?16305 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev