summaryrefslogtreecommitdiff
path: root/src/squelch
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:08 +0200
committerBardur Arantsson <bardur@scientician.net>2016-10-05 18:45:08 +0200
commitdd76070a7d8676a5f13dcc91fc7ed2eb2639d9df (patch)
treef7ac9326989fbca5701fd3c3b45e77fda7bc3552 /src/squelch
parent616954ca62b114793735b8b5a888714e1263bdc3 (diff)
Move ab_info into GameEditData
Diffstat (limited to 'src/squelch')
-rw-r--r--src/squelch/condition.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/squelch/condition.cc b/src/squelch/condition.cc
index e7429cab..7c01c4cd 100644
--- a/src/squelch/condition.cc
+++ b/src/squelch/condition.cc
@@ -6,6 +6,7 @@
#include "tome/squelch/cursor.hpp"
#include "tome/squelch/tree_printer.hpp"
#include "../ability_type.hpp"
+#include "../game.hpp"
#include "../object1.hpp"
#include "../object2.hpp"
#include "../object_kind.hpp"
@@ -939,6 +940,8 @@ std::shared_ptr<Condition> AbilityCondition::from_json(jsoncons::json const &j)
void AbilityCondition::write_tree(TreePrinter *p, Cursor *, uint8_t ecol, uint8_t bcol) const
{
+ auto const &ab_info = game->edit_data.ab_info;
+
cptr ability_s = ab_info[m_ability_idx].name;
p->write(ecol, "You have the ");
@@ -949,6 +952,8 @@ void AbilityCondition::write_tree(TreePrinter *p, Cursor *, uint8_t ecol, uint8_
void AbilityCondition::to_json(jsoncons::json &j) const
{
+ auto const &ab_info = game->edit_data.ab_info;
+
j["ability"] = ab_info[m_ability_idx].name;
}