forked from github/server
- Phönix
This commit is contained in:
parent
2c53f3a8e7
commit
26a88cf1cb
|
@ -189,6 +189,21 @@ item_type it_trollspoil = {
|
||||||
NULL /* give */
|
NULL /* give */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
resource_type rt_phoenixfeather = {
|
||||||
|
{ "phoenixfeather", "phoenixfeather_p" },
|
||||||
|
{ "phoenixfeather", "phoenixfeather_p" },
|
||||||
|
RTF_ITEM|RTF_POOLED,
|
||||||
|
&res_changeitem
|
||||||
|
};
|
||||||
|
|
||||||
|
item_type it_phoenixfeather = {
|
||||||
|
&rt_phoenixfeather, /* resourcetype */
|
||||||
|
0, 1, 0, /* flags, weight, capacity */
|
||||||
|
NULL, /* construction */
|
||||||
|
NULL, /* use */
|
||||||
|
NULL /* give */
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
register_racespoils(void)
|
register_racespoils(void)
|
||||||
{
|
{
|
||||||
|
@ -203,5 +218,6 @@ register_racespoils(void)
|
||||||
it_register(&it_catspoil);
|
it_register(&it_catspoil);
|
||||||
it_register(&it_orcspoil);
|
it_register(&it_orcspoil);
|
||||||
it_register(&it_trollspoil);
|
it_register(&it_trollspoil);
|
||||||
|
it_register(&it_phoenixfeather);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ extern struct item_type it_insectspoil;
|
||||||
extern struct item_type it_catspoil;
|
extern struct item_type it_catspoil;
|
||||||
extern struct item_type it_orcspoil;
|
extern struct item_type it_orcspoil;
|
||||||
extern struct item_type it_trollspoil;
|
extern struct item_type it_trollspoil;
|
||||||
|
extern struct item_type it_phoenixfeather;
|
||||||
|
|
||||||
extern void register_racespoils(void);
|
extern void register_racespoils(void);
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,9 @@ spell_damage(int sp)
|
||||||
case 4:
|
case 4:
|
||||||
/* verwundet 11-26 HP */
|
/* verwundet 11-26 HP */
|
||||||
return "3d6+8";
|
return "3d6+8";
|
||||||
|
case 5:
|
||||||
|
/* leichter Schaden */
|
||||||
|
return "2d4";
|
||||||
default:
|
default:
|
||||||
/* schwer verwundet 14-34 HP */
|
/* schwer verwundet 14-34 HP */
|
||||||
return "4d6+10";
|
return "4d6+10";
|
||||||
|
@ -641,6 +644,56 @@ sp_dragonodem(fighter * fi, int level, int power, spell * sp)
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Feuersturm: Betrifft sehr viele Gegner (in der Regel alle),
|
||||||
|
* macht nur vergleichsweise geringen Schaden */
|
||||||
|
int
|
||||||
|
sp_immolation(fighter * fi, int level, int power, spell * sp)
|
||||||
|
{
|
||||||
|
battle *b = fi->side->battle;
|
||||||
|
troop dt;
|
||||||
|
troop at;
|
||||||
|
int minrow = FIGHT_ROW;
|
||||||
|
int maxrow = AVOID_ROW;
|
||||||
|
int force, enemies;
|
||||||
|
int killed = 0;
|
||||||
|
const char *damage;
|
||||||
|
|
||||||
|
sprintf(buf, "%s zaubert %s", unitname(fi->unit),
|
||||||
|
spell_name(sp, default_locale));
|
||||||
|
/* 2d4 HP */
|
||||||
|
damage = spell_damage(5);
|
||||||
|
/* Betrifft alle Gegner */
|
||||||
|
force = 99999;
|
||||||
|
|
||||||
|
enemies = count_enemies(b, fi->side, FS_ENEMY, minrow,
|
||||||
|
maxrow);
|
||||||
|
|
||||||
|
if (!enemies) {
|
||||||
|
scat(", aber niemand war in Reichweite.");
|
||||||
|
battlerecord(b, buf);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
scat(":");
|
||||||
|
battlerecord(b, buf);
|
||||||
|
|
||||||
|
at.fighter = fi;
|
||||||
|
at.index = 0;
|
||||||
|
|
||||||
|
do {
|
||||||
|
dt = select_enemy(b, fi, minrow, maxrow);
|
||||||
|
assert(dt.fighter);
|
||||||
|
--force;
|
||||||
|
killed += terminate(dt, at, AT_COMBATSPELL, damage, false);
|
||||||
|
} while (force && killed < enemies);
|
||||||
|
|
||||||
|
sprintf(buf, "%d Personen %s getötet",
|
||||||
|
killed, killed == 1 ? "wurde" : "wurden");
|
||||||
|
|
||||||
|
scat(".");
|
||||||
|
battlerecord(b, buf);
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
sp_drainodem(fighter * fi, int level, int power, spell * sp)
|
sp_drainodem(fighter * fi, int level, int power, spell * sp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -546,6 +546,15 @@ dragon_drops(const struct race * rc, int size)
|
||||||
}
|
}
|
||||||
return itm;
|
return itm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static item *
|
||||||
|
phoenix_drops(const struct race *rc, int size)
|
||||||
|
{
|
||||||
|
item *itm = NULL;
|
||||||
|
i_add(&itm, i_new(&it_phoenixfeather, size));
|
||||||
|
return itm;
|
||||||
|
}
|
||||||
|
|
||||||
static item *
|
static item *
|
||||||
elf_spoil(const struct race * rc, int size)
|
elf_spoil(const struct race * rc, int size)
|
||||||
{
|
{
|
||||||
|
@ -784,7 +793,6 @@ tagbegin(struct xml_stack * stack)
|
||||||
if (xml_bvalue(tag, "resistbash")) rc->battle_flags |= BF_RES_BASH;
|
if (xml_bvalue(tag, "resistbash")) rc->battle_flags |= BF_RES_BASH;
|
||||||
if (xml_bvalue(tag, "resistcut")) rc->battle_flags |= BF_RES_CUT;
|
if (xml_bvalue(tag, "resistcut")) rc->battle_flags |= BF_RES_CUT;
|
||||||
if (xml_bvalue(tag, "resistpierce")) rc->battle_flags |= BF_RES_PIERCE;
|
if (xml_bvalue(tag, "resistpierce")) rc->battle_flags |= BF_RES_PIERCE;
|
||||||
|
|
||||||
|
|
||||||
state->race = rc;
|
state->race = rc;
|
||||||
} else if (strcmp(tag->name, "ai")==0) {
|
} else if (strcmp(tag->name, "ai")==0) {
|
||||||
|
@ -943,6 +951,7 @@ register_races(void)
|
||||||
* to generate battle spoils
|
* to generate battle spoils
|
||||||
* race->itemdrop() */
|
* race->itemdrop() */
|
||||||
register_function((pf_generic)dragon_drops, "dragondrops");
|
register_function((pf_generic)dragon_drops, "dragondrops");
|
||||||
|
register_function((pf_generic)phoenix_drops, "phoenixdrops");
|
||||||
register_function((pf_generic)elf_spoil, "elfspoil");
|
register_function((pf_generic)elf_spoil, "elfspoil");
|
||||||
register_function((pf_generic)demon_spoil, "demonspoil");
|
register_function((pf_generic)demon_spoil, "demonspoil");
|
||||||
register_function((pf_generic)goblin_spoil, "goblinspoil");
|
register_function((pf_generic)goblin_spoil, "goblinspoil");
|
||||||
|
|
|
@ -10428,6 +10428,20 @@ spell spelldaten[] =
|
||||||
{0, 0, 0}},
|
{0, 0, 0}},
|
||||||
(spell_f)sp_shadowcall, patzer
|
(spell_f)sp_shadowcall, patzer
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{SPL_IMMOLATION, "Feuersturm",
|
||||||
|
"Verletzt alle Gegner.",
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
M_GRAU, (COMBATSPELL), 5, 12,
|
||||||
|
{
|
||||||
|
{R_AURA, 2, SPC_LEVEL},
|
||||||
|
{0, 0, 0},
|
||||||
|
{0, 0, 0},
|
||||||
|
{0, 0, 0},
|
||||||
|
{0, 0, 0}},
|
||||||
|
(spell_f)sp_immolation, patzer
|
||||||
|
},
|
||||||
|
|
||||||
/* SPL_NOSPELL MUSS der letzte Spruch der Liste sein*/
|
/* SPL_NOSPELL MUSS der letzte Spruch der Liste sein*/
|
||||||
|
|
||||||
|
|
|
@ -208,6 +208,7 @@ enum {
|
||||||
SPL_MALLORNTREEGROW,
|
SPL_MALLORNTREEGROW,
|
||||||
SPL_INVISIBILITY2_ILLAUN,
|
SPL_INVISIBILITY2_ILLAUN,
|
||||||
SPL_BIGRECRUIT,
|
SPL_BIGRECRUIT,
|
||||||
|
SPL_IMMOLATION,
|
||||||
MAXALLSPELLS,
|
MAXALLSPELLS,
|
||||||
NO_SPELL = (spellid_t) -1
|
NO_SPELL = (spellid_t) -1
|
||||||
};
|
};
|
||||||
|
@ -252,6 +253,7 @@ extern int sp_armorshield(struct fighter * fi, int level, int power, struct spel
|
||||||
extern int sp_stun(struct fighter * fi, int level, int power, struct spell * sp);
|
extern int sp_stun(struct fighter * fi, int level, int power, struct spell * sp);
|
||||||
extern int sp_undeadhero(struct fighter * fi, int level, int power, struct spell * sp);
|
extern int sp_undeadhero(struct fighter * fi, int level, int power, struct spell * sp);
|
||||||
extern int sp_shadowcall(struct fighter * fi, int level, int power, struct spell * sp);
|
extern int sp_shadowcall(struct fighter * fi, int level, int power, struct spell * sp);
|
||||||
|
extern int sp_immolation(struct fighter * fi, int level, int power, struct spell * sp);
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
|
@ -48,4 +48,6 @@
|
||||||
#undef ALLIANCEJOIN
|
#undef ALLIANCEJOIN
|
||||||
#define AUTOALLIANCE (HELP_FIGHT)
|
#define AUTOALLIANCE (HELP_FIGHT)
|
||||||
|
|
||||||
|
#define WDW_PHOENIX
|
||||||
|
|
||||||
#define MAILITPATH "/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"
|
#define MAILITPATH "/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"
|
||||||
|
|
|
@ -2811,6 +2811,56 @@ give_cammo(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WDW_PHOENIX
|
||||||
|
static region *
|
||||||
|
random_region(void)
|
||||||
|
{
|
||||||
|
region *r;
|
||||||
|
int c = 0;
|
||||||
|
|
||||||
|
/* count the available regions */
|
||||||
|
for(r=regions; r; r=r->next) {
|
||||||
|
if(rplane(r) == NULL) c++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* choose one */
|
||||||
|
c = rand()%c;
|
||||||
|
|
||||||
|
/* this is a bit obfuscated, but should be correct */
|
||||||
|
for(r=regions; c > 0; r=r->next) {
|
||||||
|
--c;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
check_phoenix(void)
|
||||||
|
{
|
||||||
|
const race * phoenix_race = rc_find("phoenix");
|
||||||
|
unit * phoenix;
|
||||||
|
region * r;
|
||||||
|
faction *f;
|
||||||
|
|
||||||
|
/* check if there is a phoenix in the world */
|
||||||
|
for(f=factions; f; f=f->next) {
|
||||||
|
unit *u;
|
||||||
|
|
||||||
|
for(u=f->units; u; u=u->nextF) {
|
||||||
|
if(u->race == phoenix_race) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* it is not, so we create it */
|
||||||
|
r = random_region();
|
||||||
|
phoenix = createunit(r, findfaction(MONSTER_FACTION), 1, phoenix_race);
|
||||||
|
|
||||||
|
/* generate an appropriate region message */
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
korrektur(void)
|
korrektur(void)
|
||||||
{
|
{
|
||||||
|
@ -2881,7 +2931,7 @@ korrektur(void)
|
||||||
* to be on the safe side:
|
* to be on the safe side:
|
||||||
*/
|
*/
|
||||||
fix_demand();
|
fix_demand();
|
||||||
/* trade_orders(); */
|
/* trade_orders(); */
|
||||||
|
|
||||||
/* immer ausführen, wenn neue Sprüche dazugekommen sind, oder sich
|
/* immer ausführen, wenn neue Sprüche dazugekommen sind, oder sich
|
||||||
* Beschreibungen geändert haben */
|
* Beschreibungen geändert haben */
|
||||||
|
@ -2891,6 +2941,10 @@ korrektur(void)
|
||||||
/* Immer ausführen! Erschafft neue Teleport-Regionen, wenn nötig */
|
/* Immer ausführen! Erschafft neue Teleport-Regionen, wenn nötig */
|
||||||
create_teleport_plane();
|
create_teleport_plane();
|
||||||
|
|
||||||
|
#ifdef WDW_PHOENIX
|
||||||
|
check_phoenix();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (global.data_version<TYPES_VERSION) fix_icastles();
|
if (global.data_version<TYPES_VERSION) fix_icastles();
|
||||||
#ifdef XMAS2000
|
#ifdef XMAS2000
|
||||||
santa_comes_to_town();
|
santa_comes_to_town();
|
||||||
|
|
|
@ -754,6 +754,14 @@
|
||||||
<text locale="de">Trollhörner</text>
|
<text locale="de">Trollhörner</text>
|
||||||
<text locale="en">troll horns</text>
|
<text locale="en">troll horns</text>
|
||||||
</string>
|
</string>
|
||||||
|
<string name="phoenixfeather">
|
||||||
|
<text locale="de">Feder des Phönix</text>
|
||||||
|
<text locale="en">feather of the phoenix</text>
|
||||||
|
</string>
|
||||||
|
<string name="phoenixfeather_p">
|
||||||
|
<text locale="de">Federn des Phönix</text>
|
||||||
|
<text locale="en">feathers of the phoenix</text>
|
||||||
|
</string>
|
||||||
|
|
||||||
<comment>Resourcen</comment>
|
<comment>Resourcen</comment>
|
||||||
<string name="money">
|
<string name="money">
|
||||||
|
@ -3016,6 +3024,23 @@
|
||||||
<text locale="de">Jungdrachen</text>
|
<text locale="de">Jungdrachen</text>
|
||||||
<text locale="en">young dragon</text>
|
<text locale="en">young dragon</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
|
<string name="phoenix">
|
||||||
|
<text locale="de">Phönix</text>
|
||||||
|
<text locale="en">phoenix</text>
|
||||||
|
</string>
|
||||||
|
<string name="troll_p">
|
||||||
|
<text locale="de">Phönixe</text>
|
||||||
|
<text locale="en">phoenixes</text>
|
||||||
|
</string>
|
||||||
|
<string name="troll_d">
|
||||||
|
<text locale="de">Phönixen</text>
|
||||||
|
<text locale="en">phoenixes</text>
|
||||||
|
</string>
|
||||||
|
<string name="troll_x">
|
||||||
|
<text locale="de">Phönix</text>
|
||||||
|
<text locale="en">phoenix</text>
|
||||||
|
</string>
|
||||||
|
|
||||||
<string name="illusion">
|
<string name="illusion">
|
||||||
<text locale="de">Illusion</text>
|
<text locale="de">Illusion</text>
|
||||||
|
|
|
@ -1317,4 +1317,15 @@
|
||||||
<attack type="3" damage="1d4"></attack>
|
<attack type="3" damage="1d4"></attack>
|
||||||
<attack type="2" damage="2d60"></attack>
|
<attack type="2" damage="2d60"></attack>
|
||||||
</race>
|
</race>
|
||||||
|
<race name="phoenix" magres="0.900000" maxaura="1.000000" regaura="2.000000" recruitcost="50000" maintenance="0" weight="50000" capacity="30000" speed="2.000000" hp="500" ac="6" damage="1d20" unarmedattack="0" unarmeddefense="0" attackmodifier="7" defensemodifier="7" scarepeasants fly walk noteach getitem canguard resistbash resistbash resistcut resistpierce>
|
||||||
|
<ai splitsize="2" attackrandom learn></ai>
|
||||||
|
<function name="itemdrop" value="phoenixdrops"></function>
|
||||||
|
<skill name="sk_magic" modifier="16"></skill>
|
||||||
|
<skill name="sk_tactics" modifier="8"></skill>
|
||||||
|
<skill name="sk_perception" modifier="20"></skill>
|
||||||
|
<attack type="4" damage="1d12"></attack>
|
||||||
|
<attack type="4" damage="1d10"></attack>
|
||||||
|
<attack type="4" damage="1d10"></attack>
|
||||||
|
<attack type="6" spell="180"></attack>
|
||||||
|
</race>
|
||||||
</races>
|
</races>
|
||||||
|
|
Loading…
Reference in New Issue