diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index f0d65b95a..9a69cd27d 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -3183,6 +3183,8 @@ make_summary(boolean count_new) s->artefakte += get_item(u, I_AMULET_OF_TRUE_SEEING); s->artefakte += get_item(u, I_RING_OF_INVISIBILITY); + s->artefakte += get_item(u, I_SPHERE_OF_INVISIBILITY); + s->artefakte += get_item(u, I_SACK_OF_CONSERVATION); s->artefakte += get_item(u, I_RING_OF_POWER); s->artefakte += get_item(u, I_RUNESWORD); diff --git a/src/common/gamecode/spy.c b/src/common/gamecode/spy.c index 1682f5259..2b179ca74 100644 --- a/src/common/gamecode/spy.c +++ b/src/common/gamecode/spy.c @@ -91,7 +91,7 @@ spy(region * r, unit * u) * Wahrnehmung als das Ziel Tarnung + Spionage/2 hat */ observe = eff_skill(target, SK_OBSERVATION, r) - (effskill(u, SK_STEALTH) + eff_skill(u, SK_SPY, r)/2); - if (get_item(u, I_RING_OF_INVISIBILITY) >= u->number && + if (invisible(u) >= u->number && get_item(target, I_AMULET_OF_TRUE_SEEING) == 0) { observe = min(observe, 0); } diff --git a/src/common/kernel/build.c b/src/common/kernel/build.c index 61a56a336..3ec8553b3 100644 --- a/src/common/kernel/build.c +++ b/src/common/kernel/build.c @@ -90,8 +90,7 @@ slipthru(const region * r, const unit * u, const building * b) for (u2 = r->units; u2; u2 = u2->next) if (usiege(u2) == b) { - if (get_item(u, I_RING_OF_INVISIBILITY) && - get_item(u, I_RING_OF_INVISIBILITY) >= u->number && + if (invisible(u) >= u->number && !get_item(u2, I_AMULET_OF_TRUE_SEEING)) continue; diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 49e682874..f9e26a9c6 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -833,7 +833,7 @@ cansee(const faction * f, const region * r, const unit * u, int modifier) cansee = true; break; } - if (get_item(u, I_RING_OF_INVISIBILITY) >= u->number + if (invisible(u) >= u->number && !get_item(u2, I_AMULET_OF_TRUE_SEEING)) continue; @@ -883,7 +883,7 @@ cansee(faction * f, region * r, unit * u, int modifier) else { boolean xcheck = false; int o = INT_MIN; - ring = (boolean)(ring || (get_item(u, I_RING_OF_INVISIBILITY) >= u->number)); + ring = (boolean)(ring || (invisible(u) >= u->number)); n = n || eff_stealth(u, r) - modifier; for (u2 = r->units; u2; u2 = u2->next) { if (u2->faction == f) { @@ -939,7 +939,7 @@ cansee_durchgezogen(const faction * f, const region * r, const unit * u, int mod cansee = true; break; } - if (get_item(u, I_RING_OF_INVISIBILITY) >= u->number + if (invisible(u) >= u->number && !get_item(u2, I_AMULET_OF_TRUE_SEEING)) continue; diff --git a/src/common/kernel/item.h b/src/common/kernel/item.h index 28fc896af..af68cb6ec 100644 --- a/src/common/kernel/item.h +++ b/src/common/kernel/item.h @@ -371,6 +371,7 @@ enum { I_RUSTY_SHIELD, I_RUSTY_CHAIN_MAIL, I_SACK_OF_CONSERVATION, + I_SPHERE_OF_INVISIBILITY, MAX_ITEMS /* do not use outside item.c ! */ }; diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index 6ad8b0aba..d33dff001 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -7225,6 +7225,26 @@ sp_createitem_invisibility(castorder *co) return cast_level; } + +/* ------------------------------------------------------------- */ +/* Sphäre der Unsichtbarkeit */ +int +sp_createitem_invisibility2(castorder *co) +{ + unit *mage = (unit *)co->magician; + int cast_level = co->level; + unit *familiar = (unit *)co->familiar; + + if (familiar){ + mage = familiar; + } + + change_item(mage,I_SPHERE_OF_INVISIBILITY,1); + creation_message(mage, I_SPHERE_OF_INVISIBILITY); + + return cast_level; +} + /* ------------------------------------------------------------- */ /* Keuschheitsgürtel der Orks */ int @@ -9112,6 +9132,22 @@ spell spelldaten[] = {0, 0, 0}}, (spell_f)sp_sweetdreams, patzer }, + + {SPL_INVISIBILITY2_ILLAUN, "Erschaffe eine Sphäre der Unsichtbarkeit", + "Mit diesem Spruch kann der Zauberer eine Sphäre der Unsichtbarkeit " + "erschaffen. Die Späre macht ihren Träger sowie einhundert weitere " + "Personen in derselben Einheit unsichtbar.", + NULL, + NULL, + M_TRAUM, (ONSHIPCAST), 5, 13, + { + {R_AURA, 150, SPC_FIX}, + {R_SILVER, 30000, SPC_FIX}, + {R_PERMAURA, 3, SPC_FIX}, + {0, 0, 0}, + {0, 0, 0}}, + (spell_f)sp_createitem_invisibility2, patzer_createitem + }, {SPL_CREATE_TACTICCRYSTAL, "Erschaffe ein Traumauge", "Ein mit diesem Zauber belegtes Drachenauge, welches zum Abendmahle " diff --git a/src/common/kernel/spell.h b/src/common/kernel/spell.h index 16dac45a7..ae9ee86bd 100644 --- a/src/common/kernel/spell.h +++ b/src/common/kernel/spell.h @@ -203,6 +203,7 @@ enum { SPL_AURA_OF_FEAR, /* 175? */ SPL_SHADOWCALL, /* 176? */ SPL_MALLORNTREEGROW, + SPL_INVISIBILITY2_ILLAUN, MAXALLSPELLS, NO_SPELL = (spellid_t) -1 }; diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index ea8fd0db6..cb26a66f1 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -1041,3 +1041,10 @@ eff_skill(const unit * u, skill_t sk, const region * r) } return 0; } + +int +invisible(const unit *u) +{ + return get_item(u, I_RING_OF_INVISIBILITY) + + 100 * get_item(u, I_SPHERE_OF_INVISIBILITY); +} diff --git a/src/common/kernel/unit.h b/src/common/kernel/unit.h index 2dd02bbf2..2ce19371e 100644 --- a/src/common/kernel/unit.h +++ b/src/common/kernel/unit.h @@ -154,4 +154,6 @@ extern void set_number(struct unit * u, int count); extern boolean learn_skill(struct unit * u, skill_t sk, double chance); #endif +extern int invisible(const unit *u); + #endif diff --git a/src/corwin.mk b/src/corwin.mk index 64e1a4837..49d389cab 100644 --- a/src/corwin.mk +++ b/src/corwin.mk @@ -4,7 +4,7 @@ ifndef ERESSEA endif # Hier definieren, damit nicht '@gcc' -CC = gcc-3.0 -D_GNU_SOURCE -ansi -pedantic -W +CC = gcc-3.0 -D_GNU_SOURCE -ansi -pedantic DEPEND = @gcc-3.0 -MM -MG -r # CC = gcc -D_GNU_SOURCE AR = ar diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 8d864c81b..53a69e516 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -28,6 +28,7 @@ #include #include #include +#include /* gamecode includes */ #include @@ -619,10 +620,7 @@ show_newspells(void) * terminieren */ spellid_t newspellids[] = { - SPL_IRONKEEPER, - SPL_BLOODSACRIFICE, - SPL_TYBIED_DESTROY_MAGIC, - SPL_DESTROY_MAGIC, + SPL_INVISIBILITY2_ILLAUN, SPL_NOSPELL }; /* die id's der neuen oder veränderten Sprüche werden in newspellids[] @@ -2855,6 +2853,21 @@ fix_road_borders(void) } } +static int +give_cammo(void) +{ + faction *f; + unit *u; + + for(f=factions; f; f=f->next) { + for(u=f->units; u; u=u->nextF) { + i_change(&u->items, &it_catapultammo, i_get(u->items, olditemtype[I_CATAPULT])); + } + } + + return 0; +} + void korrektur(void) { @@ -2950,7 +2963,7 @@ korrektur_end(void) do_once("peas", peasant_adjustment()); do_once("orcc", orc_conversion()); #endif - + do_once("camm", give_cammo()); } void