[Freeciv-Dev] [patch #4821] Do not consider harmless units in assess_danger()
Update of patch #4821 (project freeciv): Status: Ready For Test = Done Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?4821 ___ 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] [patch #4821] Do not consider harmless units in assess_danger()
Update of patch #4821 (project freeciv): Status: In Progress = None Assigned to: pepeto = None ___ Reply to this item at: http://gna.org/patch/?4821 ___ 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] [patch #4821] Do not consider harmless units in assess_danger()
Update of patch #4821 (project freeciv): Status:None = Ready For Test Assigned to:None = persia ___ Follow-up Comment #3: I was looking forward to this, so I'll rebase and continue. Feel free to take it back if you want it. Unfortunately, the logic isn't currently amenable to merging with that in is_square_threatened(), as in the case of assess_danger, we're also concerned about being able to take over cities, and in is_square_threatened, we don't care, causing the booleans to hard to reconcile. This is a useful optimisation even without flag consolidation and cleanup, and there's enough other places that we examine threats that it makes sense to have a separate patch to consolidate that in the future. The attached patch is mostly pepeto's: I've rebased it over my work from patch #4831 and added the UTYF_DIPLOMAT check. (file #21168) ___ Additional Item Attachment: File name: pepeto-assess-danger.patch Size:2 KB ___ Reply to this item at: http://gna.org/patch/?4821 ___ 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] [patch #4821] Do not consider harmless units in assess_danger()
URL: http://gna.org/patch/?4821 Summary: Do not consider harmless units in assess_danger() Project: Freeciv Submitted by: pepeto Submitted on: mer. 18 juin 2014 12:52:29 CEST Category: ai Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: pepeto Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.6.0 ___ Details: ___ File Attachments: --- Date: mer. 18 juin 2014 12:52:29 CEST Name: assess_danger.patch Size: 2 ko By: pepeto http://gna.org/patch/download.php?file_id=21076 ___ Reply to this item at: http://gna.org/patch/?4821 ___ 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] [patch #4821] Do not consider harmless units in assess_danger()
Follow-up Comment #1, patch #4821 (project freeciv): It probably makes sense to consider UTYF_DIPLOMAT units threatening, even if they are UTYF_CIVILIAN, as otherwise the AI will happily ignore swarms of spies and diplomats, probably even after they proceed to incite revolts (as long as no actual attack units are built). unit.c:is_square_threatened() also excludes units with an attack value of 0, which may be redundant there or useful here. ___ Reply to this item at: http://gna.org/patch/?4821 ___ 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] [patch #4821] Do not consider harmless units in assess_danger()
Update of patch #4821 (project freeciv): Status: Ready For Test = In Progress ___ Reply to this item at: http://gna.org/patch/?4821 ___ 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] [patch #4821] Do not consider harmless units in assess_danger()
Follow-up Comment #2, patch #4821 (project freeciv): is_square_threatened() It would be nice to have these two similar functions sharing the code. I bet that if we ever add special units that are not UTYF_DIPLOMAT (which in fact is not telling so much any more as most actions are controlled by action enablers), we remember to update only one of these. Could we have is_unit_offensive() with some generic implementation (maybe the cases differ too much for this)? ___ Reply to this item at: http://gna.org/patch/?4821 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev