I can find UTYF_BARBARIAN_ONLY:
client/helpdata.c
Code: Select all
if (utype_has_flag(utype, UTYF_BARBARIAN_ONLY)) {
CATLSTR(buf, bufsz, _("* Only barbarians may build this.\n"));
}
Code: Select all
if (utype_has_flag(punittype, UTYF_BARBARIAN_ONLY)
&& !is_barbarian(p)) {
/* Unit can be built by barbarians only and this player is
* not barbarian */
return FALSE;
}
Code: Select all
/* Only barbarians can build this unit */
#define SPECENUM_VALUE27 UTYF_BARBARIAN_ONLY
#define SPECENUM_VALUE27NAME N_("?unitflag:BarbarianOnly")
common/unittype.c
Code: Select all
if (utype_can_do_action(punittype, ACTION_BARBARIAN_ONLY)
&& !is_barbarian(p)) {
/* Unit can be built by barbarians only and this player is
* not barbarian */
return FALSE;
}
common/actions.h
Code: Select all
#define SPECENUM_VALUE21 ACTION_BARBARIAN_ONLY
#define SPECENUM_VALUE21NAME N_("I don't know... maybe Barbarian_only?")
Code: Select all
actions[ACTION_BARBARIAN_ONLY] =
action_new(ACTION_BARBARIAN_ONLY,
ATK_UNITS,
FALSE);
Code: Select all
if (wanted_action == ACTION_BARBARIAN_ONLY) {
/* Reason: The Freeciv code assumes that I don't know. */
if (unit_tile(actor_unit) != target_tile) {
return FALSE;
}
/* TODO: Move more individual requirements to the action enabler. */
if (!is_barbarian(actor_player)) {
return FALSE;
}
}
Code: Select all
case ACTION_BARBARIAN_ONLY:
chance = 200;
break;
The main question is useful vs. pointless.