Menu ▾ ▴

#4 Fortification

1.0
closed
2014-01-28
2014-01-25
Robin Hanse
No

Freemasons and superior masonic units can build a wooden camp on certain adjacent tiles (flat or hills, not mountains nor water -nor villages obviously-, whatever if forest present or not).
Objective n°1 : you can only create camps on adjacent ally units, and the camp disappears when the ally unit moves.
If not possible, then objective n°2.
Objective n°2 : the wooden camp can be built on an empty hexagon but lasts (1 * lvl of the mason) turn(s), whether there are unit or not inside this camp.

Discussion

  • Robin Hanse

    Robin Hanse - 2014-01-27
    • status: open --> pending
    • assigned_to: Nicolas Brack (Laerne) --> Robin Hanse
     
  • Robin Hanse

    Robin Hanse - 2014-01-27

    -> Current (not working) event to remove the fort :
    [event]
    name=side turn
    id={ID}__moveevent
    first_time_only=no
    {FOREACH pandrea__built_fort_locations i}
    #[message]
    #message="$pandrea__previous_location[$i].terrain"
    #[/message]
    [terrain]
    terrain=$pandrea__previous_location[$i].terrain
    #transforms to whole map into the last pandrea__previous_location
    #x=$x1
    #y=$y1
    #doesn't do anything
    x=$x[$i]
    y=$y[$i]
    [/terrain]
    {NEXT i}
    [/event]

    -> Should allow to build on hexagon without friendly unit, but not if ennemy unit present

     
  • Robin Hanse

    Robin Hanse - 2014-01-28

    This is now working, just need for a filter indicating no unit inside the fort, which I should be able to code
    [event]
    name=side turn
    id={ID}__moveevent
    first_time_only=no
    {FOREACH pandrea__built_fort_locations i}
    [message]
    message="$pandrea__built_fort_locations[$i].x,$pandrea__built_fort_locations[$i].y"
    [/message]
    [terrain]
    terrain=$pandrea__built_fort_locations[$i].previous_terrain
    x=$pandrea__built_fort_locations[$i].x
    y=$pandrea__built_fort_locations[$i].y
    [/terrain]
    {NEXT i}
    [/event]

     
  • Robin Hanse

    Robin Hanse - 2014-01-28
    • status: pending --> closed
     
  • Robin Hanse

    Robin Hanse - 2014-01-28

    Fully fonctionnal :

    [event]
    name=side turn
    id={ID}__moveevent
    first_time_only=no
    {FOREACH pandrea__built_fort_locations i}
    [if]
    [not]
    [have_unit]
    x,y=$pandrea__built_fort_locations[$i].x,$pandrea__built_fort_locations[$i].y
    [/have_unit]
    [/not]
    [then]
    [terrain]
    terrain=$pandrea__built_fort_locations[$i].previous_terrain
    x=$pandrea__built_fort_locations[$i].x
    y=$pandrea__built_fort_locations[$i].y
    [/terrain]
    [/then]
    [else]
    [/else]
    [/if]
    {NEXT i}
    [/event]

     

Log in to post a comment.