- remove the "confusion" spells because they do not work.

This commit is contained in:
Enno Rehling 2008-05-13 20:22:31 +00:00
parent 474431fb0d
commit 4afcf145f5
9 changed files with 6 additions and 275 deletions

View File

@ -712,13 +712,11 @@ static const char * oldnames[MAXCURSE] = {
"astralblock",
"generous",
"peacezone",
"disorientationzone",
"magicstreet",
"magicrunes",
"badmagicresistancezone",
"goodmagicresistancezone",
"slavery",
"shipdisorientation",
"calmmonster",
"oldrace",
"fumble",

View File

@ -111,13 +111,11 @@ enum {
C_ASTRALBLOCK, /* 15 - Astralblock */
C_GENEROUS, /* 16 - Unterhaltung vermehren */
C_PEACE, /* 17 - Regionsweit Attacken verhindern */
C_REGCONF, /* 18 - Erschwert Bewegungen */
C_MAGICSTREET, /* 19 - magisches Straßennetz */
C_RESIST_MAGIC, /* 20 - verändert Magieresistenz von Objekten */
C_SONG_BADMR, /* 21 - verändert Magieresistenz */
C_SONG_GOODMR, /* 22 - verändert Magieresistenz */
C_SLAVE, /* 23 - dient fremder Partei */
C_DISORIENTATION, /* 24 - Spezielle Auswirkung auf Schiffe */
C_CALM, /* 25 - Beinflussung */
C_OLDRACE,
C_FUMBLE,

View File

@ -1151,86 +1151,11 @@ cap_route(region * r, region_list * route, region_list * route_end, int speed)
return iroute;
}
static boolean
is_disoriented(unit *u)
{
static boolean init = false;
static const curse_type * shipconf_ct, * regconf_ct;
if (!init) {
init = true;
regconf_ct = ct_find("disorientationzone");
shipconf_ct = ct_find("shipdisorientation");
}
if (u->ship && curse_active(get_curse(u->ship->attribs, shipconf_ct)))
return true;
if (curse_active(get_curse(u->region->attribs, regconf_ct)))
return true;
return false;
}
/** ships regain their orientation
* Das Schiff bekommt seine Orientierung zurück, wenn es:
* a) An Land treibt,
* b) Glück hat, oder
* c) in einer Region mit einem nicht verwirrten alliierten
* Schiff steht.
*/
static void
regain_orientation(region * r)
{
ship *sh;
static int thismonth = -1;
static const curse_type * shipconf_ct, * regconf_ct;
static boolean init = false;
if (!init) {
init = true;
regconf_ct = ct_find("disorientationzone");
shipconf_ct = ct_find("shipdisorientation");
}
if (thismonth<0) thismonth = get_gamedate(turn, 0)->month;
for (sh = r->ships; sh; sh = sh->next) {
unit * u, *cap;
curse * c = get_curse(sh->attribs, shipconf_ct);
if (c==NULL) continue;
cap = shipowner(sh);
if (cap==NULL) continue;
if (!fval(r->terrain, SEA_REGION) || rng_int() % 10 >= storms[thismonth]) {
remove_curse(&sh->attribs, c);
ADDMSG(&cap->faction->msgs, msg_message("shipnoconf", "ship", sh));
continue;
}
for (u=r->units; u; u=u->next) {
/* we get help if u helps the faction of cap and isn't disoriented */
if (u != cap && alliedunit(u, cap->faction, HELP_GUARD) && !is_disoriented(u)) {
remove_curse(&sh->attribs, c);
ADDMSG(&cap->faction->msgs, msg_message("shipnoconf", "ship", sh));
break;
}
}
}
}
static region *
next_region(unit * u, region * current, region * next)
{
border * b;
if (is_disoriented(u)) {
direction_t d = reldirection(current, next);
if (d<MAXDIRECTIONS) {
d = (direction_t)(((d+MAXDIRECTIONS-1)+rng_int()%3)%MAXDIRECTIONS);
next = rconnect(current, d);
}
}
b = get_borders(current, next);
while (b!=NULL) {
if (b->type->move) {
@ -2500,11 +2425,6 @@ movement(void)
unit ** up = &r->units;
boolean repeat = false;
if (ships==0) {
/* first thing before moving: restore orientation if we can */
regain_orientation(r);
}
while (*up) {
unit *u = *up;
keyword_t kword;

View File

@ -1192,15 +1192,13 @@ prepare_report(faction * f)
if (sr->mode>see_neighbour) {
region * r = sr->r;
plane * p = r->planep;
/* if no confusion in the region, add neighbors: */
if (!is_cursed(r->attribs, C_REGCONF, 0)) {
void (*view)(struct seen_region **, region *, faction *) = view_default;
if (p && fval(p, PFL_SEESPECIAL)) {
attrib * a = a_find(p->attribs, &at_viewrange);
if (a) view = (void (*)(struct seen_region **, region *, faction *))a->data.f;
}
view(f->seen, r, f);
void (*view)(struct seen_region **, region *, faction *) = view_default;
if (p && fval(p, PFL_SEESPECIAL)) {
attrib * a = a_find(p->attribs, &at_viewrange);
if (a) view = (void (*)(struct seen_region **, region *, faction *))a->data.f;
}
view(f->seen, r, f);
}
}
return f->seen;

View File

@ -236,12 +236,6 @@ static struct curse_type ct_peacezone = {
CURSETYP_NORM, 0, NO_MERGE,
cinfo_simple
};
/* erschwert geordnete Bewegungen */
static struct curse_type ct_disorientationzone = {
"disorientationzone",
CURSETYP_NORM, CURSE_ISNEW, NO_MERGE,
cinfo_simple
};
/* erniedigt Magieresistenz von nicht-aliierten Einheiten, wirkt nur 1x
* pro Einheit */
static struct curse_type ct_badmagicresistancezone = {
@ -288,7 +282,6 @@ register_regioncurse(void)
ct_register(&ct_astralblock);
ct_register(&ct_generous);
ct_register(&ct_peacezone);
ct_register(&ct_disorientationzone);
ct_register(&ct_magicstreet);
ct_register(&ct_badmagicresistancezone);
ct_register(&ct_goodmagicresistancezone);

View File

@ -79,9 +79,6 @@ static struct curse_type ct_flyingship = { "flyingship",
static struct curse_type ct_nodrift = { "nodrift",
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR ), cinfo_shipnodrift
};
static struct curse_type ct_shipdisorientation = { "shipdisorientation",
CURSETYP_NORM, 0, NO_MERGE, cinfo_ship
};
static struct curse_type ct_shipspeedup = { "shipspeedup",
CURSETYP_NORM, 0, 0, cinfo_ship
};
@ -92,7 +89,6 @@ register_shipcurse(void)
ct_register(&ct_stormwind);
ct_register(&ct_flyingship);
ct_register(&ct_nodrift);
ct_register(&ct_shipdisorientation);
ct_register(&ct_shipspeedup);
}

View File

@ -2110,72 +2110,6 @@ sp_drought(castorder *co)
return cast_level;
}
/* ------------------------------------------------------------- */
/* Name: Nebel der Verwirrung
* Stufe: 14
* Kategorie: Region, negativ
* Gebiet: Gwyrrd
* Wirkung:
* Alle Regionen innerhalb eines Radius von *siehe code*
* werden von einem verwirrenden Nebel bedeckt. Innerhalb des Nebels
* können keine Himmelsrichtungen mehr erkannt werden, alle Bewegungen
* erfolgen in eine zufällige Richtung.
* Die Gwyrrd-Variante wirkt nur auf Wälder und Ozeanregionen
* Flags:
* (FARCASTING | SPELLLEVEL)
* */
static int
sp_fog_of_confusion(castorder *co)
{
unit *u;
region *r = co->rt;
unit *mage = co->magician.u;
int cast_level = co->level;
double power = co->force;
region_list *rl, *rl2;
int range = 1+(int)(power/8);
int duration = 2+(int)(power/6);
rl = all_in_range(r, (short)range, NULL);
for (rl2 = rl; rl2; rl2 = rl2->next) {
static const curse_type * ctype = NULL;
region * r2 = rl2->data;
curse * c;
variant effect;
message * m = NULL;
if (!fval(r2->terrain, SEA_REGION)
&& !r_isforest(r2)) continue;
/* Magieresistenz jeder Region prüfen */
if (target_resists_magic(mage, r, TYP_REGION, 0)) {
report_failure(mage, co->order);
continue;
}
effect.i = cast_level*5;
if (!ctype) ctype = ct_find("disorientationzone");
c = create_curse(mage, &r2->attribs, ctype, power, duration, effect, 0);
for (u = r2->units; u; u = u->next) freset(u->faction, FFL_SELECT);
for (u = r2->units; u; u = u->next ) {
if (!fval(u->faction, FFL_SELECT) ) {
fset(u->faction, FFL_SELECT);
if (!m) m = msg_message("confusion_result", "mage", mage);
add_message(&u->faction->msgs, m);
}
}
if (!fval(mage->faction, FFL_SELECT)) {
if (!m) m = msg_message("confusion_result", "mage", mage);
add_message(&mage->faction->msgs, m);
}
if (m) msg_release(m);
}
free_regionlist(rl);
return cast_level;
}
/* ------------------------------------------------------------- */
/* Name: Bergwächter
* Stufe: 9
@ -5206,55 +5140,6 @@ sp_disturbingdreams(castorder *co)
return cast_level;
}
/* ------------------------------------------------------------- */
int
sp_dream_of_confusion(castorder *co)
{
unit *u;
region_list *rl,*rl2;
region *r = co->rt;
unit *mage = co->magician.u;
int cast_level = co->level;
double power = co->force;
int range = 1+(int)(power/8);
int duration = 2+(int)(power/6);
rl = all_in_range(r, (short)range, NULL);
for(rl2 = rl; rl2; rl2 = rl2->next) {
region * r2 = rl2->data;
variant effect;
curse * c;
message * m = NULL;
/* Magieresistenz jeder Region prüfen */
if (target_resists_magic(mage, r2, TYP_REGION, 0)) {
report_failure(mage, co->order);
continue;
}
effect.i = cast_level*5;
c = create_curse(mage, &r2->attribs,
ct_find("disorientationzone"), power, duration, effect, 0);
for (u = r2->units; u; u = u->next) freset(u->faction, FFL_SELECT);
for (u = r2->units; u; u = u->next ) {
if (!fval(u->faction, FFL_SELECT) ) {
fset(u->faction, FFL_SELECT);
if (!m) m = msg_message("confusion_result", "mage", mage);
add_message(&u->faction->msgs, m);
}
}
if (!fval(mage->faction, FFL_SELECT)) {
if (!m) m = msg_message("confusion_result", "mage", mage);
add_message(&u->faction->msgs, m);
}
if (m) msg_release(m);
}
free_regionlist(rl);
return cast_level;
}
/* ------------------------------------------------------------- */
/* ASTRAL / THEORIE / M_ASTRAL */
/* ------------------------------------------------------------- */
@ -7313,20 +7198,6 @@ static spelldata spelldaten[] =
},
(spell_f)sp_drought, NULL
},
{
SPL_FOG_OF_CONFUSION, "fogofconfusion", NULL, NULL, NULL,
M_DRUIDE,
(FARCASTING|SPELLLEVEL),
5, 14,
{
{ "aura", 8, SPC_LEVEL },
{ 0, 0, 0 },
{ 0, 0, 0 },
{ 0, 0, 0 },
{ 0, 0, 0 }
},
(spell_f)sp_fog_of_confusion, NULL
},
{
SPL_MAELSTROM, "maelstrom", NULL, NULL, NULL,
M_DRUIDE,
@ -7957,20 +7828,6 @@ static spelldata spelldaten[] =
},
(spell_f)sp_summon_alp, NULL
},
{
SPL_DREAM_OF_CONFUSION, "dream_of_confusion", NULL, NULL, NULL,
M_TRAUM,
(FARCASTING | SPELLLEVEL),
5, 16,
{
{ "aura", 7, SPC_LEVEL },
{ 0, 0, 0 },
{ 0, 0, 0 },
{ 0, 0, 0 },
{ 0, 0, 0 }
},
(spell_f)sp_dream_of_confusion, NULL
},
/* M_BARDE */
{
SPL_DENYATTACK, "appeasement", NULL, NULL, NULL,

View File

@ -4521,10 +4521,6 @@
<text locale="de">Traumdeuten</text>
<text locale="en">Mind Probe</text>
</string>
<string name="dream_of_confusion">
<text locale="de">Schleier der Verwirrung</text>
<text locale="en">Veil of Confusion</text>
</string>
<string name="summon_alp">
<text locale="de">Alp</text>
<text locale="en">Nightmare</text>
@ -6462,17 +6458,6 @@
target's faction, skills and possessions will no
longer be unknown.</text>
</string>
<string name="dream_of_confusion">
<text locale="de">Der Magier erzeugt im Umkreis von
einigen Regionen einen magischen Schleier, der einige Wochen bestehen
bleibt. Personen innerhalb des Schleiers verlieren
leicht die Orientierung und haben große Schwierigkeiten, sich in
eine bestimmte Richtung zu bewegen.</text>
<text locale="en">The magician creates a magic fog in every region in a
perimeter of some regions. The fog lasts some weeks and persons
passing this fog have a chance to get lost, moving to a certain
direction is difficult.</text>
</string>
<string name="summon_alp">
<text locale="de">Der Magier beschwört ein kleines Monster, einen Alp. Dieses bewegt sich
langsam auf sein Opfer zu (das sich an einem beliebigen Ort an der Welt

View File

@ -3625,20 +3625,6 @@
<text locale="de">"Die $ship($ship) segelt von $region($from) nach $region($to)."</text>
<text locale="en">"The $ship($ship) sails from $region($from) to $region($to)."</text>
</message>
<message name="shipnoconf" section="events">
<type>
<arg name="ship" type="ship"/>
</type>
<text locale="de">"Die $ship($ship) ist wieder auf Kurs."</text>
<text locale="en">"The $ship($ship) is back on course."</text>
</message>
<message name="shipconf" section="events">
<type>
<arg name="ship" type="ship"/>
</type>
<text locale="de">"Die $ship($ship) verliert im Sturm die Orientierung."</text>
<text locale="en">"The crew of $ship($ship) gets lost and confused in the storm."</text>
</message>
<message name="storm" section="events">
<type>
<arg name="ship" type="ship"/>