57 struct unit *punit,
struct tile *dst_tile,
64 struct unit *passenger,
struct tile *ptile);
67 struct unit *passenger,
int aiferry_find_boat(struct ai_type *ait, struct unit *punit, int cap, PFPath *path)
Proper and real PF function for finding a boat.
void dai_manage_ferryboat(struct ai_type *ait, struct player *pplayer, struct unit *punit)
It's about 12 feet square and has a capacity of almost 1000 pounds.
bool is_boat_free(struct ai_type *ait, struct unit *boat, struct unit *punit, int cap)
Runs a few checks to determine if "boat" is a free boat that can carry "cap" units of the same type a...
bool dai_is_ferry_type(const struct unit_type *pferry, struct ai_type *ait)
Print the list of boats of pplayer.
void aiferry_init_stats(struct ai_type *ait, struct player *pplayer)
Call to initialize the ferryboat statistics.
void dai_ferry_lost(struct ai_type *ait, struct unit *punit)
Close ferry when player loses it.
void dai_ferry_transformed(struct ai_type *ait, struct unit *ferry, const struct unit_type *old)
Update ferry system when unit is transformed.
bool aiferry_goto_amphibious(struct ai_type *ait, struct unit *ferry, struct unit *passenger, struct tile *ptile)
Move a passenger on a ferry to a specified destination.
bool is_boss_of_boat(struct ai_type *ait, struct unit *punit)
Check if unit is boss in ferry.
int aiferry_avail_boats(struct ai_type *ait, struct player *pplayer)
Returns the number of available boats.
bool dai_amphibious_goto_constrained(struct ai_type *ait, struct unit *ferry, struct unit *passenger, struct tile *ptile, struct pft_amphibious *parameter)
Move a passenger on a ferry to a specified destination.
bool dai_is_ferry(struct unit *pferry, struct ai_type *ait)
Should unit be considered a ferry?
void dai_ferry_init_ferry(struct ai_type *ait, struct unit *ferry)
Initialize new ferry when player gets it.
void aiferry_clear_boat(struct ai_type *ait, struct unit *punit)
Use on a unit which no longer needs a boat.
bool aiferry_gobyboat(struct ai_type *ait, struct player *pplayer, struct unit *punit, struct tile *dst_tile, bool with_bodyguard)
This function is to be called if punit needs to use a boat to get to the destination.