patchBattle for Wesnoth - Patches: patch #3256, easyCoding_AI: adding a (C++ and...

 
 
Show feedback again

patch #3256: easyCoding_AI: adding a (C++ and lua equivalent) function to set a goto on a unit

Submitted by:  Paolo De Luca <teugon>
Submitted on:  Sun 15 Apr 2012 10:12:00 PM UTC  
 
Priority: 5 - NormalStatus: In Progress
Privacy: PublicAssigned to: Iurii Chernyi <crab>
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.

 

Sun 15 Apr 2012 10:12:00 PM UTC, original submission:

the function actually move the unit in one of the 6 hexs near the unit it has to go to.
Talking with Crab_ I understood the following unclear things:

  • the unit at location "to" be from the side of the caller.
  • the AI functions were C++ wrappers added in src/ai/lua/core.cpp

Moreover for the implementation I've followed Crab_'s hint about setting a flag in the move_result class in order to do coherence checks. IMHO I would have prefeared to subclass move_result, or to composite a new class in order to add the fews checks I need to add to move_result class.
Since I do not pretend understand AI's code as good as Crab_ I've followed the other road.

since this is my first patch, I'm not so sure to have updated the changelog the right way. I'd suggest to check.

I don't know if there was a feature request, submitted at bugs.wesnoth.org, for this task. If there was I've not catched it, sorry.

Paolo De Luca <teugon>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #15576:  easyCoding_ai_setgoto.patch added by teugon (14kB - 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 (Updated the item)
  • -unavailable- added by teugon (Submitted the item)
  • -unavailable- added by teugon
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 18 Apr 2012 07:07:39 PM UTCcrabStatusNone=>In Progress
      Assigned toNone=>crab
    Sun 15 Apr 2012 10:12:00 PM UTCteugonAttached File-=>Added easyCoding_ai_setgoto.patch, #15576
      Carbon-Copy-=>Added -unavailable-
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup