summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in4
-rw-r--r--src/map/clif.cpp1
-rw-r--r--src/map/fwd.hpp5
-rw-r--r--src/map/magic-expr-eval.hpp11
-rw-r--r--src/map/magic-expr.cpp19
-rw-r--r--src/map/magic-expr.hpp26
-rw-r--r--src/map/magic-interpreter-aux.cpp21
-rw-r--r--src/map/magic-interpreter-aux.hpp33
-rw-r--r--src/map/magic-interpreter-base.cpp6
-rw-r--r--src/map/magic-interpreter-base.hpp64
-rw-r--r--src/map/magic-interpreter.hpp42
-rw-r--r--src/map/magic-stmt.cpp8
-rw-r--r--src/map/magic-stmt.hpp68
-rw-r--r--src/map/magic-v2.cpp2
-rw-r--r--src/map/magic.cpp10
-rw-r--r--src/map/magic.hpp57
-rw-r--r--src/map/map.cpp2
-rw-r--r--src/map/pc.cpp2
-rw-r--r--src/map/script.cpp2
-rw-r--r--src/map/skill.cpp2
20 files changed, 175 insertions, 210 deletions
diff --git a/Makefile.in b/Makefile.in
index af9100b..99fbf0c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -311,9 +311,9 @@ gen-clean: ;
ifndef MAKE_RESTARTS
obj/%.d: src/%.cpp
$(MKDIR_FIRST)
- ${CXX} ${CPPFLAGS} -DGENERATING_DEPENDENCIES ${CXXFLAGS} -MG -MM $< \
+ $c ${CXX} ${CPPFLAGS} -DGENERATING_DEPENDENCIES ${CXXFLAGS} -MG -MM \
-MT '$(patsubst obj/%.d,%,$@) := ' \
- > $@
+ -MF $@ $<
endif
# the above SRC_DIR replacement is not really safe, but it works okayish.
obj/%.ii: src/%.cpp
diff --git a/src/map/clif.cpp b/src/map/clif.cpp
index b19c7eb..0a6406b 100644
--- a/src/map/clif.cpp
+++ b/src/map/clif.cpp
@@ -51,6 +51,7 @@
#include "intif.hpp"
#include "itemdb.hpp"
#include "magic.hpp"
+#include "magic-stmt.hpp"
#include "map.hpp"
#include "npc.hpp"
#include "party.hpp"
diff --git a/src/map/fwd.hpp b/src/map/fwd.hpp
index b4ced2d..13d5f54 100644
--- a/src/map/fwd.hpp
+++ b/src/map/fwd.hpp
@@ -47,5 +47,10 @@ struct location_t;
struct area_t;
struct spell_t;
struct invocation;
+struct teleport_anchor_t;
+struct env_t;
+struct magic_conf_t;
+struct component_t;
+struct effect_set_t;
#endif // TMWA_MAP_FWD_HPP
diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp
index ae86774..8500fc0 100644
--- a/src/map/magic-expr-eval.hpp
+++ b/src/map/magic-expr-eval.hpp
@@ -22,21 +22,10 @@
# include "fwd.hpp"
-# include "../range/slice.hpp"
-
-# include "../strings/fwd.hpp"
# include "../strings/zstring.hpp"
# include "magic-interpreter.t.hpp"
-/* Helper definitions for dealing with functions and operations */
-
-int magic_signature_check(ZString opname, ZString funname, ZString signature,
- Slice<val_t> args, int line, int column);
-
-void magic_area_rect(map_local **m, int *x, int *y, int *width, int *height,
- area_t& area);
-
// TODO kill this like I killed VAR
# define ARGINT(x) args[x].v.v_int
# define ARGDIR(x) args[x].v.v_dir
diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp
index 9f3f63e..ee422c1 100644
--- a/src/map/magic-expr.cpp
+++ b/src/map/magic-expr.cpp
@@ -1,6 +1,4 @@
-#include "magic-expr-eval.hpp"
#include "magic-expr.hpp"
-#include "magic-interpreter-aux.hpp"
// magic-expr.cpp - Pure functions for the old magic backend.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -38,14 +36,21 @@
#include "../mmo/dumb_ptr.hpp"
#include "battle.hpp"
-#include "npc.hpp"
-#include "pc.hpp"
#include "itemdb.hpp"
-
+#include "magic-expr-eval.hpp"
#include "magic-interpreter.hpp"
+#include "magic-interpreter-base.hpp"
+#include "npc.hpp"
+#include "pc.hpp"
#include "../poison.hpp"
+template<class T>
+bool CHECK_TYPE(T *v, TYPE t)
+{
+ return v->ty == t;
+}
+
static
void free_area(dumb_ptr<area_t> area)
{
@@ -791,8 +796,8 @@ int fun_hash_entity(dumb_ptr<env_t>, val_t *result, Slice<val_t> args)
return 0;
}
-int // ret -1: not a string, ret 1: no such item, ret 0: OK
-magic_find_item(Slice<val_t> args, int index, struct item *item_, int *stackable)
+// ret -1: not a string, ret 1: no such item, ret 0: OK
+int magic_find_item(Slice<val_t> args, int index, struct item *item_, int *stackable)
{
struct item_data *item_data;
int must_add_sequentially;
diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp
index 007491c..7276fd2 100644
--- a/src/map/magic-expr.hpp
+++ b/src/map/magic-expr.hpp
@@ -22,8 +22,6 @@
# include "fwd.hpp"
-# include "magic-interpreter.hpp"
-
# include "../mmo/dumb_ptr.hpp"
# include "../range/fwd.hpp"
@@ -31,6 +29,8 @@
# include "../strings/zstring.hpp"
# include "../strings/literal.hpp"
+# include "magic-interpreter.t.hpp"
+
/*
* Argument types:
* i : int
@@ -52,13 +52,6 @@ struct fun_t
int (*fun)(dumb_ptr<env_t> env, val_t *result, Slice<val_t> arga);
};
-struct op_t
-{
- ZString name;
- ZString signature;
- int (*op)(dumb_ptr<env_t> env, Slice<val_t> arga);
-};
-
/**
* Retrieves a function by name
* @param name The name to look up
@@ -67,13 +60,6 @@ struct op_t
fun_t *magic_get_fun(ZString name);
/**
- * Retrieves an operation by name
- * @param name The name to look up
- * @return An operation of that name, or NULL, and a function index
- */
-op_t *magic_get_op(ZString name);
-
-/**
* Evaluates an expression and stores the result in `dest'
*/
void magic_eval(dumb_ptr<env_t> env, val_t *dest, dumb_ptr<expr_t> expr);
@@ -109,4 +95,12 @@ int magic_find_item(Slice<val_t> args, int index, struct item *item, int *stacka
int magic_location_in_area(map_local *m, int x, int y, dumb_ptr<area_t> area);
+/* Helper definitions for dealing with functions and operations */
+
+int magic_signature_check(ZString opname, ZString funname, ZString signature,
+ Slice<val_t> args, int line, int column);
+
+void magic_area_rect(map_local **m, int *x, int *y, int *width, int *height,
+ area_t& area);
+
#endif // TMWA_MAP_MAGIC_EXPR_HPP
diff --git a/src/map/magic-interpreter-aux.cpp b/src/map/magic-interpreter-aux.cpp
deleted file mode 100644
index 10a376b..0000000
--- a/src/map/magic-interpreter-aux.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "magic-interpreter-aux.hpp"
-// magic-interpreter-aux.cpp - Edge of the magic system.
-//
-// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
-//
-// This file is part of The Mana World (Athena server)
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#include "../poison.hpp"
diff --git a/src/map/magic-interpreter-aux.hpp b/src/map/magic-interpreter-aux.hpp
deleted file mode 100644
index 0b78b58..0000000
--- a/src/map/magic-interpreter-aux.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef TMWA_MAP_MAGIC_INTERPRETER_AUX_HPP
-#define TMWA_MAP_MAGIC_INTERPRETER_AUX_HPP
-// magic-interpreter-aux.hpp - Edge of the magic system.
-//
-// Copyright © 2004-2011 The Mana World Development Team
-// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
-//
-// This file is part of The Mana World (Athena server)
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# include "fwd.hpp"
-
-# include "magic-interpreter.t.hpp"
-
-template<class T>
-bool CHECK_TYPE(T *v, TYPE t)
-{
- return v->ty == t;
-}
-
-#endif // TMWA_MAP_MAGIC_INTERPRETER_AUX_HPP
diff --git a/src/map/magic-interpreter-base.cpp b/src/map/magic-interpreter-base.cpp
index a7c5496..baec6fb 100644
--- a/src/map/magic-interpreter-base.cpp
+++ b/src/map/magic-interpreter-base.cpp
@@ -1,5 +1,4 @@
#include "magic-interpreter-base.hpp"
-#include "magic.hpp"
// magic-interpreter-base.cpp - Core of the old magic system.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -22,8 +21,6 @@
#include <algorithm>
-#include "magic-interpreter.hpp"
-
#include "../strings/astring.hpp"
#include "../strings/xstring.hpp"
@@ -31,8 +28,9 @@
#include "../mmo/timer.hpp"
+#include "magic.hpp"
#include "magic-expr.hpp"
-
+#include "magic-interpreter.hpp"
#include "pc.hpp"
#include "../poison.hpp"
diff --git a/src/map/magic-interpreter-base.hpp b/src/map/magic-interpreter-base.hpp
index 780ada4..1baefc6 100644
--- a/src/map/magic-interpreter-base.hpp
+++ b/src/map/magic-interpreter-base.hpp
@@ -1,8 +1,9 @@
#ifndef TMWA_MAP_MAGIC_INTERPRETER_BASE_HPP
#define TMWA_MAP_MAGIC_INTERPRETER_BASE_HPP
-// magic-interpreter-base.hpp - dummy header to make Make dependencies work.
+// magic-interpreter-base.hpp - Core of the old magic system.
//
-// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com>
+// Copyright © 2004-2011 The Mana World Development Team
+// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
//
// This file is part of The Mana World (Athena server)
//
@@ -21,4 +22,63 @@
# include "fwd.hpp"
+# include "../strings/fwd.hpp"
+
+# include "../mmo/dumb_ptr.hpp"
+
+extern magic_conf_t magic_conf; /* Global magic conf */
+extern env_t magic_default_env; /* Fake default environment */
+
+/**
+ * Adds a component selection to a component holder (which may initially be NULL)
+ */
+void magic_add_component(dumb_ptr<component_t> *component_holder, ItemNameId id, int count);
+
+/**
+ * Identifies the invocation used to trigger a spell
+ *
+ * Returns empty string if not found
+ */
+AString magic_find_invocation(XString spellname);
+
+/**
+ * Identifies the invocation used to denote a teleport location
+ *
+ * Returns empty string if not found
+ */
+AString magic_find_anchor_invocation(XString teleport_location);
+
+dumb_ptr<teleport_anchor_t> magic_find_anchor(XString name);
+
+dumb_ptr<env_t> spell_create_env(magic_conf_t *conf, dumb_ptr<spell_t> spell,
+ dumb_ptr<map_session_data> caster, int spellpower, XString param);
+
+void magic_free_env(dumb_ptr<env_t> env);
+
+/**
+ * near_miss is set to nonzero iff the spell only failed due to ephemereal issues (spell delay in effect, out of mana, out of components)
+ */
+effect_set_t *spell_trigger(dumb_ptr<spell_t> spell,
+ dumb_ptr<map_session_data> caster,
+ dumb_ptr<env_t> env, int *near_miss);
+
+dumb_ptr<invocation> spell_instantiate(effect_set_t *effect, dumb_ptr<env_t> env);
+
+/**
+ * Bind a spell to a subject (this is a no-op for `local' spells).
+ */
+void spell_bind(dumb_ptr<map_session_data> subject, dumb_ptr<invocation> invocation);
+
+// 1 on failure
+int spell_unbind(dumb_ptr<map_session_data> subject, dumb_ptr<invocation> invocation);
+
+/**
+ * Clones a spell to run the at_effect field
+ */
+dumb_ptr<invocation> spell_clone_effect(dumb_ptr<invocation> source);
+
+dumb_ptr<spell_t> magic_find_spell(XString invocation);
+
+void spell_update_location(dumb_ptr<invocation> invocation);
+
#endif // TMWA_MAP_MAGIC_INTERPRETER_BASE_HPP
diff --git a/src/map/magic-interpreter.hpp b/src/map/magic-interpreter.hpp
index 16fc447..8861e92 100644
--- a/src/map/magic-interpreter.hpp
+++ b/src/map/magic-interpreter.hpp
@@ -400,48 +400,10 @@ struct invocation : block_list
};
+// inlines for map.hpp
inline dumb_ptr<invocation> block_list::as_spell() { return dumb_ptr<invocation>(static_cast<invocation *>(this)); }
inline dumb_ptr<invocation> block_list::is_spell() { return bl_type == BL::SPELL ? as_spell() : nullptr; }
-extern magic_conf_t magic_conf; /* Global magic conf */
-extern env_t magic_default_env; /* Fake default environment */
-
-/**
- * Adds a component selection to a component holder (which may initially be NULL)
- */
-void magic_add_component(dumb_ptr<component_t> *component_holder, ItemNameId id, int count);
-
-dumb_ptr<teleport_anchor_t> magic_find_anchor(XString name);
-
-dumb_ptr<env_t> spell_create_env(magic_conf_t *conf, dumb_ptr<spell_t> spell,
- dumb_ptr<map_session_data> caster, int spellpower, XString param);
-
-void magic_free_env(dumb_ptr<env_t> env);
-
-/**
- * near_miss is set to nonzero iff the spell only failed due to ephemereal issues (spell delay in effect, out of mana, out of components)
- */
-effect_set_t *spell_trigger(dumb_ptr<spell_t> spell,
- dumb_ptr<map_session_data> caster,
- dumb_ptr<env_t> env, int *near_miss);
-
-dumb_ptr<invocation> spell_instantiate(effect_set_t *effect, dumb_ptr<env_t> env);
-
-/**
- * Bind a spell to a subject (this is a no-op for `local' spells).
- */
-void spell_bind(dumb_ptr<map_session_data> subject, dumb_ptr<invocation> invocation);
-
-// 1 on failure
-int spell_unbind(dumb_ptr<map_session_data> subject, dumb_ptr<invocation> invocation);
-
-/**
- * Clones a spell to run the at_effect field
- */
-dumb_ptr<invocation> spell_clone_effect(dumb_ptr<invocation> source);
-
-dumb_ptr<spell_t> magic_find_spell(XString invocation);
-
/* The following is used only by the parser: */
struct args_rec_t
{
@@ -461,6 +423,4 @@ struct proc_t
{}
};
-void spell_update_location(dumb_ptr<invocation> invocation);
-
#endif // TMWA_MAP_MAGIC_INTERPRETER_HPP
diff --git a/src/map/magic-stmt.cpp b/src/map/magic-stmt.cpp
index 5710828..98cdb7e 100644
--- a/src/map/magic-stmt.cpp
+++ b/src/map/magic-stmt.cpp
@@ -1,5 +1,4 @@
#include "magic-stmt.hpp"
-#include "magic.hpp"
// magic-stmt.cpp - Imperative commands for the magic backend.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -33,12 +32,13 @@
#include "../mmo/timer.hpp"
+#include "battle.hpp"
+#include "clif.hpp"
+#include "magic.hpp"
#include "magic-expr.hpp"
#include "magic-expr-eval.hpp"
#include "magic-interpreter.hpp"
-
-#include "battle.hpp"
-#include "clif.hpp"
+#include "magic-interpreter-base.hpp"
#include "mob.hpp"
#include "npc.hpp"
#include "pc.hpp"
diff --git a/src/map/magic-stmt.hpp b/src/map/magic-stmt.hpp
index 0e687a6..08c2b28 100644
--- a/src/map/magic-stmt.hpp
+++ b/src/map/magic-stmt.hpp
@@ -1,8 +1,9 @@
#ifndef TMWA_MAP_MAGIC_STMT_HPP
#define TMWA_MAP_MAGIC_STMT_HPP
-// magic-stmt.hpp - dummy header to make Make dependencies work.
+// magic-stmt.hpp - Imperative commands for the magic backend.
//
-// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com>
+// Copyright © 2004-2011 The Mana World Development Team
+// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
//
// This file is part of The Mana World (Athena server)
//
@@ -21,4 +22,67 @@
# include "fwd.hpp"
+# include "../range/fwd.hpp"
+
+# include "../mmo/dumb_ptr.hpp"
+
+# include "skill.t.hpp"
+
+struct op_t
+{
+ ZString name;
+ ZString signature;
+ int (*op)(dumb_ptr<env_t> env, Slice<val_t> arga);
+};
+
+/**
+ * Retrieves an operation by name
+ * @param name The name to look up
+ * @return An operation of that name, or NULL, and a function index
+ */
+op_t *magic_get_op(ZString name);
+
+/**
+ * Removes the shroud from a character
+ *
+ * \param character The character to remove the shroud from
+ */
+void magic_unshroud(dumb_ptr<map_session_data> character);
+
+/**
+ * Notifies a running spell that a status_change timer triggered by the spell has expired
+ *
+ * \param invocation The invocation to notify
+ * \param bl_id ID of the PC for whom this happened
+ * \param sc_id ID of the status change entry that finished
+ * \param supplanted Whether the status_change finished normally (0) or was supplanted by a new status_change (1)
+ */
+void spell_effect_report_termination(BlockId invocation, BlockId bl_id,
+ StatusChange sc_id, int supplanted);
+
+/**
+ * Execute a spell invocation and sets up timers to finish
+ */
+void spell_execute(dumb_ptr<invocation> invocation);
+
+/**
+ * Continue an NPC script embedded in a spell
+ */
+void spell_execute_script(dumb_ptr<invocation> invocation);
+
+/**
+ * Stops all magic bound to the specified character
+ *
+ */
+void magic_stop_completely(dumb_ptr<map_session_data> c);
+
+/**
+ * Attacks with a magical spell charged to the character
+ *
+ * Returns 0 if there is no charged spell or the spell is depleted.
+ */
+int spell_attack(BlockId caster, BlockId target);
+
+void spell_free_invocation(dumb_ptr<invocation> invocation);
+
#endif // TMWA_MAP_MAGIC_STMT_HPP
diff --git a/src/map/magic-v2.cpp b/src/map/magic-v2.cpp
index 0239438..510c619 100644
--- a/src/map/magic-v2.cpp
+++ b/src/map/magic-v2.cpp
@@ -37,6 +37,8 @@
#include "itemdb.hpp"
#include "magic-expr.hpp"
#include "magic-interpreter.hpp"
+#include "magic-interpreter-base.hpp"
+#include "magic-stmt.hpp"
#include "../poison.hpp"
diff --git a/src/map/magic.cpp b/src/map/magic.cpp
index fec8372..88ee1f1 100644
--- a/src/map/magic.cpp
+++ b/src/map/magic.cpp
@@ -1,3 +1,4 @@
+#include "magic.hpp"
// magic.cpp - Entry to the magic system.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -27,15 +28,12 @@
#include "../mmo/dumb_ptr.hpp"
-#include "magic-interpreter.hpp"
-
-#include "map.hpp"
-#include "pc.hpp"
-
#include "magic-expr.hpp"
+#include "magic-interpreter.hpp"
#include "magic-interpreter-base.hpp"
#include "magic-stmt.hpp"
-#include "magic.hpp"
+#include "map.hpp"
+#include "pc.hpp"
#include "../poison.hpp"
diff --git a/src/map/magic.hpp b/src/map/magic.hpp
index 642ae21..cd0ff99 100644
--- a/src/map/magic.hpp
+++ b/src/map/magic.hpp
@@ -42,61 +42,4 @@
*/
int magic_message(dumb_ptr<map_session_data> caster, XString source_invocation);
-/**
- * Removes the shroud from a character
- *
- * \param character The character to remove the shroud from
- */
-void magic_unshroud(dumb_ptr<map_session_data> character);
-
-/**
- * Notifies a running spell that a status_change timer triggered by the spell has expired
- *
- * \param invocation The invocation to notify
- * \param bl_id ID of the PC for whom this happened
- * \param sc_id ID of the status change entry that finished
- * \param supplanted Whether the status_change finished normally (0) or was supplanted by a new status_change (1)
- */
-void spell_effect_report_termination(BlockId invocation, BlockId bl_id,
- StatusChange sc_id, int supplanted);
-
-/**
- * Identifies the invocation used to trigger a spell
- *
- * Returns empty string if not found
- */
-AString magic_find_invocation(XString spellname);
-
-/**
- * Identifies the invocation used to denote a teleport location
- *
- * Returns empty string if not found
- */
-AString magic_find_anchor_invocation(XString teleport_location);
-
-/**
- * Execute a spell invocation and sets up timers to finish
- */
-void spell_execute(dumb_ptr<invocation> invocation);
-
-/**
- * Continue an NPC script embedded in a spell
- */
-void spell_execute_script(dumb_ptr<invocation> invocation);
-
-/**
- * Stops all magic bound to the specified character
- *
- */
-void magic_stop_completely(dumb_ptr<map_session_data> c);
-
-/**
- * Attacks with a magical spell charged to the character
- *
- * Returns 0 if there is no charged spell or the spell is depleted.
- */
-int spell_attack(BlockId caster, BlockId target);
-
-void spell_free_invocation(dumb_ptr<invocation> invocation);
-
#endif // TMWA_MAP_MAGIC_HPP
diff --git a/src/map/map.cpp b/src/map/map.cpp
index c98c315..b845abc 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -63,8 +63,8 @@
#include "clif.hpp"
#include "grfio.hpp"
#include "itemdb.hpp"
-#include "magic.hpp"
#include "magic-interpreter.hpp" // for is_spell inline body
+#include "magic-stmt.hpp"
#include "magic-v2.hpp"
#include "mob.hpp"
#include "npc.hpp"
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 47e45a5..c9e67ea 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -49,7 +49,7 @@
#include "clif.hpp"
#include "intif.hpp"
#include "itemdb.hpp"
-#include "magic.hpp"
+#include "magic-stmt.hpp"
#include "map.hpp"
#include "npc.hpp"
#include "party.hpp"
diff --git a/src/map/script.cpp b/src/map/script.cpp
index 7abea69..158a832 100644
--- a/src/map/script.cpp
+++ b/src/map/script.cpp
@@ -61,7 +61,7 @@
#include "clif.hpp"
#include "intif.hpp"
#include "itemdb.hpp"
-#include "magic.hpp"
+#include "magic-interpreter-base.hpp"
#include "map.hpp"
#include "mob.hpp"
#include "npc.hpp"
diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index ab14427..8e67065 100644
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -46,7 +46,7 @@
#include "battle.hpp"
#include "clif.hpp"
-#include "magic.hpp"
+#include "magic-stmt.hpp"
#include "mob.hpp"
#include "pc.hpp"