From 54b84bf78d590975097ade666cb6936d8b54a277 Mon Sep 17 00:00:00 2001 From: Katja Zedel Date: Fri, 1 Mar 2002 22:11:10 +0000 Subject: [PATCH] =?UTF-8?q?Hain=20f=C3=BCr=20Mallornw=C3=A4lder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/kernel/spell.c | 71 ++++++++++++++++++++++++++++++++++++++- src/common/kernel/spell.h | 1 + 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index 5235f46c4..d36e5b00d 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -1168,7 +1168,58 @@ sp_hain(castorder *co) if(!r->land) { cmistake(mage, strdup(co->order), 296, MSG_MAGIC); - return cast_level; + return 0; + } + if (fval(r, RF_MALLORN)) { + cmistake(mage, strdup(co->order), 92, MSG_MAGIC); + return 0; + } + + trees = lovar(force * 10) + force; +#if GROWING_TREES + rsettrees(r, 1, rtrees(r,1) + trees); +#else + rsettrees(r, rtrees(r) + trees); +#endif + + /* melden, 1x pro Partei */ + { + message * seen = msg_message("growtree_effect", "mage amount", mage, trees); + message * unseen = msg_message("growtree_effect", "mage amount", NULL, trees); + report_effect(r, mage, seen, unseen); + } + + return cast_level; +} +/* ------------------------------------------------------------- */ +/* Name: Segne Mallornstecken - Mallorn Hainzauber + * Stufe: 4 + * Kategorie: Region, positiv + * Gebiet: Gwyrrd + * Syntax: ZAUBER [REGION x y] [STUFE 4] "Segne Mallornstecken" + * Wirkung: + * Erschafft Stufe-10*Stufe Jungbäume + * + * Flag: + * (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE) + */ + +static int +sp_mallornhain(castorder *co) +{ + int trees; + region *r = co->rt; + unit *mage = (unit *)co->magician; + int cast_level = co->level; + int force = co->force; + + if(!r->land) { + cmistake(mage, strdup(co->order), 296, MSG_MAGIC); + return 0; + } + if (!fval(r, RF_MALLORN)) { + cmistake(mage, strdup(co->order), 91, MSG_MAGIC); + return 0; } trees = lovar(force * 10) + force; @@ -7471,6 +7522,24 @@ spell spelldaten[] = (spell_f)sp_windshield, patzer }, + {SPL_MALLORNTREEGROW, "Segne Mallornstecken", + "Diese Ritual verstärkt die Wirkung des magischen Trankes um ein " + "vielfaches. Wo sonst aus einem Stecken nur ein Baum spießen konnte, " + "so treibt nun jeder Ast Wurzeln.", + NULL, + NULL, + M_DRUIDE, + (FARCASTING | SPELLLEVEL | REGIONSPELL | TESTRESISTANCE), + 5, 4, + { + {R_AURA, 6, SPC_LEVEL}, + {R_MALLORN, 2, SPC_LEVEL}, + {R_TREES, 1, SPC_FIX}, + {0, 0, 0}, + {0, 0, 0}}, + (spell_f)sp_mallornhain, patzer_ents + }, + { SPL_GOODWINDS, "Beschwörung eines Wasserelementar", "Der Magier zwingt mit diesem Ritual die Elementargeister des Wassers " "in seinen Dienst und bringt sie dazu, das angegebene Schiff schneller " diff --git a/src/common/kernel/spell.h b/src/common/kernel/spell.h index 414c07000..65291b8da 100644 --- a/src/common/kernel/spell.h +++ b/src/common/kernel/spell.h @@ -200,6 +200,7 @@ enum { SPL_DRAINODEM, /* 174? */ SPL_AURA_OF_FEAR, /* 175? */ SPL_SHADOWCALL, /* 176? */ + SPL_MALLORNTREEGROW, MAXALLSPELLS, NO_SPELL = (spellid_t) -1 };