diff --git a/res/eressea/artrewards.xml b/res/eressea/artrewards.xml index 6cb836c52..2a3c09950 100644 --- a/res/eressea/artrewards.xml +++ b/res/eressea/artrewards.xml @@ -1,20 +1,6 @@ - - - - - - - - - - - - - - diff --git a/res/eressea/items.xml b/res/eressea/items.xml index 8b2df7add..69f84c890 100644 --- a/res/eressea/items.xml +++ b/res/eressea/items.xml @@ -63,19 +63,6 @@ - - - - - - - - - - - - - diff --git a/res/eressea/strings.xml b/res/eressea/strings.xml index 28547679d..f7497b810 100644 --- a/res/eressea/strings.xml +++ b/res/eressea/strings.xml @@ -356,42 +356,6 @@ Akademie der Künste academy of arts - - Skulptur - sculpture - - - Horn des Tanzes - horn of dancing - - - Hörner des Tanzes - horns of dancing - - - Miniatur einer Akademie der Künste - academy of arts in a box - - - Miniaturen einer Akademie der Künste - academies of arts in a box - - - Miniatur einer Skulptur - art sculpture in a box - - - Miniaturen einer Skulptur - art sculptures in a box - - - Gefangener Windgeist - trapped air elemental - - - Gefangene Windgeister - trapped air elementals - Auratrank aura potion diff --git a/res/items.xml b/res/items.xml deleted file mode 100644 index 108e6d398..000000000 --- a/res/items.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/eressea.c b/src/eressea.c index 07ea132a8..8001355f1 100755 --- a/src/eressea.c +++ b/src/eressea.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include @@ -86,7 +85,6 @@ void game_init(void) register_weapons(); register_xerewards(); - register_artrewards(); #ifdef USE_LIBXML2 register_xmlreader(); #endif diff --git a/src/items/CMakeLists.txt b/src/items/CMakeLists.txt index b2bf2dfe5..bbf192a66 100644 --- a/src/items/CMakeLists.txt +++ b/src/items/CMakeLists.txt @@ -5,7 +5,6 @@ xerewards.test.c ) SET(_FILES -artrewards.c demonseye.c speedsail.c weapons.c diff --git a/src/items/artrewards.c b/src/items/artrewards.c deleted file mode 100644 index 23ab2119e..000000000 --- a/src/items/artrewards.c +++ /dev/null @@ -1,155 +0,0 @@ -/* -Copyright (c) 1998-2015, Enno Rehling -Katja Zedel - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -**/ - -#include -#include "artrewards.h" - -/* kernel includes */ -#include -#include -#include -#include -#include -#include -#include -#include - -/* util includes */ -#include -#include - -/* libc includes */ -#include -#include -#include -#include - -#define HORNRANGE 10 -#define HORNDURATION 3 -#define HORNIMMUNITY 30 - -static int age_peaceimmune(attrib * a, void *owner) -{ - UNUSED_ARG(owner); - return (--a->data.i > 0) ? AT_AGE_KEEP : AT_AGE_REMOVE; -} - -static attrib_type at_peaceimmune = { - "peaceimmune", - NULL, NULL, - age_peaceimmune, - a_writeint, - a_readint -}; - -static int -use_hornofdancing(struct unit *u, const struct item_type *itype, -int amount, struct order *ord) -{ - region *r; - int regionsPacified = 0; - - for (r = regions; r; r = r->next) { - if (distance(u->region, r) < HORNRANGE) { - if (a_find(r->attribs, &at_peaceimmune) == NULL) { - attrib *a; - - create_curse(u, &r->attribs, ct_find("peacezone"), - 20, HORNDURATION, 1.0, 0); - - a = a_add(&r->attribs, a_new(&at_peaceimmune)); - a->data.i = HORNIMMUNITY; - - ADDMSG(&r->msgs, msg_message("hornofpeace_r_success", - "unit region", u, u->region)); - - regionsPacified++; - } - else { - ADDMSG(&r->msgs, msg_message("hornofpeace_r_nosuccess", - "unit region", u, u->region)); - } - } - } - - if (regionsPacified > 0) { - ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "hornofpeace_u_success", - "pacified", regionsPacified)); - } - else { - ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "hornofpeace_u_nosuccess", - "")); - } - - return 0; -} - -#define SPEEDUP 2 - -static int -useonother_trappedairelemental(struct unit *u, int shipId, -const struct item_type *itype, int amount, struct order *ord) -{ - curse *c; - ship *sh; - - if (shipId <= 0) { - cmistake(u, ord, 20, MSG_MOVE); - return -1; - } - - sh = findshipr(u->region, shipId); - if (!sh) { - cmistake(u, ord, 20, MSG_MOVE); - return -1; - } - - c = - create_curse(u, &sh->attribs, ct_find("shipspeedup"), 20, INT_MAX, SPEEDUP, - 0); - c_setflag(c, CURSE_NOAGE); - - ADDMSG(&u->faction->msgs, msg_message("trappedairelemental_success", - "unit region command ship", u, u->region, ord, sh)); - - use_pooled(u, itype->rtype, GET_DEFAULT, 1); - - return 0; -} - -static int -use_trappedairelemental(struct unit *u, -const struct item_type *itype, int amount, struct order *ord) -{ - ship *sh = u->ship; - - if (sh == NULL) { - cmistake(u, ord, 20, MSG_MOVE); - return -1; - } - return useonother_trappedairelemental(u, sh->no, itype, amount, ord); -} - -void register_artrewards(void) -{ - at_register(&at_peaceimmune); - register_item_use(use_hornofdancing, "use_hornofdancing"); - register_item_use(use_trappedairelemental, "use_trappedairelemental"); - register_item_useonother(useonother_trappedairelemental, - "useonother_trappedairelemental"); -} diff --git a/src/items/artrewards.h b/src/items/artrewards.h deleted file mode 100644 index 779e7cc5f..000000000 --- a/src/items/artrewards.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright (c) 1998-2015, Enno Rehling -Katja Zedel - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -**/ - -#ifndef H_ITM_ARTREWARDS -#define H_ITM_ARTREWARDS -#ifdef __cplusplus -extern "C" { -#endif - - extern void register_artrewards(void); - -#ifdef __cplusplus -} -#endif -#endif