patchBattle for Wesnoth - Patches: patch #1577, ai.close_enemies &...

Show feedback again

patch #1577: ai.close_enemies & helper.closest_unit functions in lua_ai

Submitted by:  -Deleted Account- <pokhbocee>
Submitted on:  Thu Apr 1 21:35:34 2010  
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: Dmitry K. <nephro>
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat Aug 6 19:03:40 2011, comment #3:

nephro, can you take a look at this patch to see if the functions are useful to have in lua ai library or not ?

Iurii Chernyi <crab>
Project Member
Thu Apr 22 21:03:37 2010, comment #2:

close_enemies is done
nearest_unit is done

new methods:

helper.list_to_string(list_of_integers) : string -> this method returns a string version of the input list

if the list is {1,2,3}
output will be "1,2,3"

helper.get_enemy_sides(input_side) : list_of_integers -> returns a list that contains list of side numbers enemies of input_side

(file #9055)

-Deleted Account- <pokhbocee>
Fri Apr 2 20:36:43 2010, comment #1:

(was discussed in irc 02 Apr 2010 ~ 22:00 )

Iurii Chernyi <crab>
Project Member
Thu Apr 1 21:35:34 2010, original submission:


-Returns the enemy units that are within the given range surrounding ai_unit


-Returns the nearest unit to the imput_unit among the list_of_units


-Deleted Account- <pokhbocee>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #9055:  close_enemies.patch added by pokhbocee (2kB - text/x-patch - patch file contains methods ai.close_enemies , helper.nearest_unit, helper.list_to_string, helper.get_enemy_sides)
file #8808:  nearest_unit-close_enemies.patch added by pokhbocee (2kB - text/x-patch - both methods are fully working. TODO: ai.close_enemies ally sides should be filtered, instead of if(is_enemies(side1,side2)))
file #8770:  pokh_patch.patch added by pokhbocee (2kB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by crab (Posted a comment)
  • -unavailable- added by pokhbocee (Submitted the item)
  • -unavailable- added by pokhbocee

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Aug 6 19:03:40 2011crabStatusIn Progress=>None
      Assigned tocrab=>nephro
    Thu Apr 22 21:03:37 2010pokhboceeAttached File-=>Added close_enemies.patch, #9055
    Mon Apr 5 05:14:47 2010pokhboceeAttached File-=>Added nearest_unit-close_enemies.patch, #8808
    Fri Apr 2 20:36:43 2010crabStatusNone=>In Progress
      Assigned toNone=>crab
    Thu Apr 1 21:35:34 2010pokhboceeAttached File-=>Added pokh_patch.patch, #8770
      Carbon-Copy-=>Added pokhbocee
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup