- Neuer Zauber

This commit is contained in:
Christian Schlittchen 2002-05-05 16:59:25 +00:00
parent 56319bcbb3
commit 890691d282
11 changed files with 73 additions and 12 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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 ! */
};

View File

@ -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 "

View File

@ -203,6 +203,7 @@ enum {
SPL_AURA_OF_FEAR, /* 175? */
SPL_SHADOWCALL, /* 176? */
SPL_MALLORNTREEGROW,
SPL_INVISIBILITY2_ILLAUN,
MAXALLSPELLS,
NO_SPELL = (spellid_t) -1
};

View File

@ -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);
}

View File

@ -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

View File

@ -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

View File

@ -28,6 +28,7 @@
#include <modules/museum.h>
#include <modules/xecmd.h>
#include <items/questkeys.h>
#include <items/catapultammo.h>
/* gamecode includes */
#include <creation.h>
@ -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