Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #919139

Action enabler controlled hut popping

Added by Sveinung Kvilhaugsvik over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Introduce the actions "Enter Hut" and "Frighten Hut". Have them control entering and frightening a friendly village.

The unit class field hut_behavior isn't moved to the ruleset yet.


Related issues

Related to Freeciv - Feature #920427: Handle both Frighten and Enter huts on the same tileNew

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Freeciv - Bug #920425: Unit in transport with Nothing hut_behavior no longer pops hutsNew

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Sveinung Kvilhaugsvik over 1 year ago

I think this means that the only remaining unit action not under enabler control is regular moves.

#2 Updated by Marko Lindqvist over 1 year ago

I see that disembarking is handled as an action parallel to hut entering. Does it do the right thing if one disembarks to a tile with a hut?

Does this work correctly with multiple hut kind of extras in the same tile? Having separate actions for entering hut and frightening one makes it even possible that there's a hut in the tile that should be entered and another hut that should be frightened. I think you currently guard against that by retaining the unit property of hut_behavior (same unit cannot have both enterable and frightenable huts), but something to keep in mind for the future?

#3 Updated by Sveinung Kvilhaugsvik over 1 year ago

Marko Lindqvist wrote:

I see that disembarking is handled as an action parallel to hut entering. Does it do the right thing if one disembarks to a tile with a hut?

I believed I had handled it correctly. I was wrong. I forgot to test. The ruleset part wasn't ready. I'm currently being offered both to disembark (without popping the hut) and to (disembark and) enter the hut. Thank you.

#4 Updated by Sveinung Kvilhaugsvik over 1 year ago

  • File 0002-Action-enabler-controlled-hut-popping.patch added

v2: fake generalize the actions for disembark support

#6 Updated by Sveinung Kvilhaugsvik over 1 year ago

  • File deleted (0002-Action-enabler-controlled-hut-popping.patch)

#7 Updated by Alexandro Ignatiev over 1 year ago

By logic, it's obviously ATK_EXTRAS... But will it work if we e.g. prohibit displacing huts in another player's territory?

#8 Updated by Sveinung Kvilhaugsvik over 1 year ago

Alexandro Ignatiev wrote:

By logic, it's obviously ATK_EXTRAS... But will it work if we e.g. prohibit displacing huts in another player's territory?

Action target kind is not about what the action performer function does. Example: "Establish Embassy" is city targeted even if the embassy is established with the target city's owner (a player), not inside the city. To prohibit displacing huts in another player's territory this action needs to be tile targeted. To prohibit displacing huts owned by another player (that may have built it with a unit unable to pop it) it has to be tile extras targeted.

#11 Updated by Sveinung Kvilhaugsvik over 1 year ago

  • Status changed from Resolved to Closed

Alexandro Ignatiev wrote:

By logic, it's obviously ATK_EXTRAS...

Is this a request for making it possible to specify action target kind in the ruleset? I don't think writing a patch to do so would be overly hard. (See Feature #919305 for a template about how it is done.) You could probably do it your self.

#12 Updated by Sveinung Kvilhaugsvik over 1 year ago

  • Related to Feature #920427: Handle both Frighten and Enter huts on the same tile added

#13 Updated by Sveinung Kvilhaugsvik over 1 year ago

  • Related to Bug #920425: Unit in transport with Nothing hut_behavior no longer pops huts added

Also available in: Atom PDF