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 01 Apr 2010 09:35:34 PM UTC  
 
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 06 Aug 2011 07:03:40 PM UTC, 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 22 Apr 2010 09:03:37 PM UTC, 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 02 Apr 2010 08:36:43 PM UTC, comment #1:

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

Iurii Chernyi <crab>
Project Member
Thu 01 Apr 2010 09:35:34 PM UTC, original submission:

===========
ai.close_enemies(ai_unit,range)

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

===========
helper.nearest_unit(input_unit,list_of_units)

-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):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 06 Aug 2011 07:03:40 PM UTCcrabStatusIn Progress=>None
      Assigned tocrab=>nephro
    Thu 22 Apr 2010 09:03:37 PM UTCpokhboceeAttached File-=>Added close_enemies.patch, #9055
    Mon 05 Apr 2010 05:14:47 AM UTCpokhboceeAttached File-=>Added nearest_unit-close_enemies.patch, #8808
    Fri 02 Apr 2010 08:36:43 PM UTCcrabStatusNone=>In Progress
      Assigned toNone=>crab
    Thu 01 Apr 2010 09:35:34 PM UTCpokhboceeAttached File-=>Added pokh_patch.patch, #8770
      Carbon-Copy-=>Added pokhbocee
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup