diff --git a/src/flyingship.c b/src/flyingship.c index 88d37a6d1..b640b8940 100644 --- a/src/flyingship.c +++ b/src/flyingship.c @@ -14,15 +14,6 @@ /* libc includes */ #include -int levitate_ship(ship * sh, unit * mage, double power, int duration) -{ - curse *c = shipcurse_flyingship(sh, mage, power, duration); - if (c) { - return c->no; - } - return 0; -} - /* ------------------------------------------------------------- */ /* Name: Luftschiff * Stufe: 6 @@ -89,3 +80,21 @@ int sp_flying_ship(castorder * co) msg_release(m); return cast_level; } + +int levitate_ship(ship * sh, unit * mage, double power, int duration) +{ + curse *c = shipcurse_flyingship(sh, mage, power, duration); + if (c) { + return c->no; + } + return 0; +} + +bool flying_ship(const ship * sh) +{ + if (sh->type->flags & SFL_FLY) + return true; + if (sh->flags & SF_FLYING) + return true; + return false; +} diff --git a/src/flyingship.h b/src/flyingship.h index 33bc3a86f..cbf981f0c 100644 --- a/src/flyingship.h +++ b/src/flyingship.h @@ -5,14 +5,17 @@ #include "magic.h" +#include + #ifdef __cplusplus extern "C" { #endif + int sp_flying_ship(castorder * co); + int levitate_ship(struct ship *sh, struct unit *mage, double power, int duration); - - int sp_flying_ship(castorder * co); + bool flying_ship(const ship * sh); #ifdef __cplusplus } diff --git a/src/move.c b/src/move.c index 8eaf052ca..87b1e44f7 100644 --- a/src/move.c +++ b/src/move.c @@ -28,6 +28,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "monster.h" #include "lighthouse.h" #include "piracy.h" +#include "flyingship.h" #include #include @@ -674,15 +675,6 @@ int check_ship_allowed(struct ship *sh, const region * r) return SA_NO_COAST; } -static bool flying_ship(const ship * sh) -{ - if (sh->type->flags & SFL_FLY) - return true; - if (sh->flags & SF_FLYING) - return true; - return false; -} - static void set_coast(ship * sh, region * r, region * rnext) { if (sh->type->flags & SFL_NOCOAST) {