Magieresistenz reparieren.
This commit is contained in:
Enno Rehling 2021-02-09 21:07:53 +01:00
parent d03face3c1
commit cc5e062b68
5 changed files with 19 additions and 18 deletions

View File

@ -436,7 +436,7 @@
<resource name="dragonblood" amount="1" cost="fixed"/><!-- Drachenblut -->
</spell>
<spell name="auratransfer" rank="1" syntax="aura" parameters="ui" ship="true">
<spell name="auratransfer" rank="1" syntax="aura" parameters="ui" noresist="true" ship="true">
<!-- Auratransfer -->
<resource name="aura" amount="1" cost="fixed"/>
</spell>
@ -523,12 +523,12 @@
<spell name="ironkeeper" rank="5" far="true" variable="true">
<resource name="aura" amount="3" cost="level"/>
</spell>
<spell name="airship" rank="5" parameters="s" ship="true">
<spell name="airship" rank="5" parameters="s" noresist="true" ship="true">
<resource name="aura" amount="10" cost="fixed"/>
<resource name="h12" amount="1" cost="fixed"/>
<resource name="h20" amount="1" cost="fixed"/>
</spell>
<spell name="sound_out" rank="5" parameters="ur" los="true">
<spell name="sound_out" rank="5" parameters="ur" noresist="true" los="true">
<resource name="aura" amount="4" cost="fixed"/>
<resource name="money" amount="100" cost="fixed"/>
</spell>

View File

@ -93,7 +93,7 @@
<spell name="transferauratraum" rank="1" syntax="aura" parameters="ui" ship="true">
<resource name="aura" amount="2" cost="fixed"/>
</spell>
<spell name="auratransfer" rank="1" syntax="aura" parameters="ui" ship="true">
<spell name="auratransfer" rank="1" syntax="aura" parameters="ui" noresist="true" ship="true">
<resource name="aura" amount="1" cost="fixed"/>
</spell>
<spell name="stonegolem" rank="4" variable="true">
@ -173,7 +173,7 @@
<spell name="goodwinds" rank="5" parameters="s" ship="true" variable="true">
<resource name="aura" amount="1" cost="level"/>
</spell>
<spell name="airship" rank="5" parameters="s" ship="true">
<spell name="airship" rank="5" parameters="s" noresist="true" ship="true">
<resource name="aura" amount="10" cost="fixed"/>
<resource name="h12" amount="1" cost="fixed"/>
<resource name="h20" amount="1" cost="fixed"/>
@ -192,7 +192,7 @@
<resource name="h7" amount="3" cost="fixed"/>
<resource name="money" amount="50" cost="fixed"/>
</spell>
<spell name="enterastral" rank="7" parameters="u+" variable="true">
<spell name="enterastral" rank="7" parameters="u+" noresist="true" variable="true">
<resource name="aura" amount="2" cost="level"/>
</spell>
<spell name="leaveastral" rank="7" parameters="ru+" variable="true">
@ -214,13 +214,13 @@
<spell name="view_reality" rank="5">
<resource name="aura" amount="40" cost="fixed"/>
</spell>
<spell name="astral_disruption" rank="4" variable="true">
<spell name="astral_disruption" rank="4" noresist="true" variable="true">
<resource name="aura" amount="140" cost="fixed"/>
</spell>
<spell name="seduction" rank="5" parameters="u" los="true">
<resource name="aura" amount="12" cost="fixed"/>
</spell>
<spell name="sound_out" rank="5" parameters="ur" los="true">
<spell name="sound_out" rank="5" parameters="ur" noresist="true" los="true">
<resource name="aura" amount="4" cost="fixed"/>
<resource name="money" amount="100" cost="fixed"/>
</spell>

View File

@ -375,7 +375,8 @@ static int ncomponents;
static void start_spells(parseinfo *pi, const XML_Char *el, const XML_Char **attr) {
const char *flag_names[] = {
"far", "variable", "ocean", "ship", "los",
"unittarget", "shiptarget", "buildingtarget", "regiontarget", "globaltarget", NULL };
"unittarget", "shiptarget", "buildingtarget", "regiontarget", "globaltarget",
"noresist", NULL };
if (xml_strequal(el, "resource")) {
spell_component *spc;

View File

@ -1664,7 +1664,7 @@ verify_targets(castorder * co, int *invalid, int *resist, int *success)
case SPP_UNIT:
u = spobj->data.u;
if ((sp->sptyp & TESTRESISTANCE)
if (((sp->sptyp & NORESISTANCE) == 0)
&& target_resists_magic(caster, u, TYP_UNIT, 0)) {
/* Fehlermeldung */
spobj->data.i = u->no;
@ -1681,7 +1681,7 @@ verify_targets(castorder * co, int *invalid, int *resist, int *success)
case SPP_BUILDING:
b = spobj->data.b;
if ((sp->sptyp & TESTRESISTANCE)
if (((sp->sptyp & NORESISTANCE) == 0)
&& target_resists_magic(caster, b, TYP_BUILDING, 0)) { /* Fehlermeldung */
spobj->data.i = b->no;
spobj->flag = TARGET_RESISTS;
@ -1696,7 +1696,7 @@ verify_targets(castorder * co, int *invalid, int *resist, int *success)
case SPP_SHIP:
sh = spobj->data.sh;
if ((sp->sptyp & TESTRESISTANCE)
if (((sp->sptyp & NORESISTANCE) == 0)
&& target_resists_magic(caster, sh, TYP_SHIP, 0)) { /* Fehlermeldung */
spobj->data.i = sh->no;
spobj->flag = TARGET_RESISTS;
@ -1713,7 +1713,7 @@ verify_targets(castorder * co, int *invalid, int *resist, int *success)
nicht target_r ueberprueft. */
tr = spobj->data.r;
if ((sp->sptyp & TESTRESISTANCE)
if (((sp->sptyp & NORESISTANCE) == 0)
&& target_resists_magic(caster, tr, TYP_REGION, 0)) { /* Fehlermeldung */
spobj->flag = TARGET_RESISTS;
++*resist;
@ -1752,7 +1752,7 @@ verify_targets(castorder * co, int *invalid, int *resist, int *success)
sa->param[0] = spobj;
co->par = sa;
if ((sp->sptyp & TESTRESISTANCE)) {
if (((sp->sptyp & NORESISTANCE) == 0)) {
if (target_resists_magic(caster, target_r, TYP_REGION, 0)) {
/* Fehlermeldung */
ADDMSG(&caster->faction->msgs, msg_message("spellregionresists",

View File

@ -134,14 +134,14 @@ extern "C" {
#define BUILDINGSPELL (1<<7) /* ZAUBER .. <Gebaeude-Nr> [<Gebaeude-Nr> ..] */
#define REGIONSPELL (1<<8) /* wirkt auf struct region */
#define GLOBALTARGET (1<<9) /* Ziel kann ausserhalb der region sein */
#define NORESISTANCE (1<<10) /* Zielobjekte nicht auf Magieresistenz pruefen. */
#define PRECOMBATSPELL (1<<10) /* PRAEKAMPFZAUBER .. */
#define COMBATSPELL (1<<11) /* KAMPFZAUBER .. */
#define POSTCOMBATSPELL (1<<12) /* POSTKAMPFZAUBER .. */
#define PRECOMBATSPELL (1<<11) /* PRAEKAMPFZAUBER .. */
#define COMBATSPELL (1<<12) /* KAMPFZAUBER .. */
#define POSTCOMBATSPELL (1<<13) /* POSTKAMPFZAUBER .. */
#define ISCOMBATSPELL (PRECOMBATSPELL|COMBATSPELL|POSTCOMBATSPELL)
#define TESTRESISTANCE (1<<13) /* Zielobjekte auf Magieresistenz pruefen. not used in XML? */
#define NOTFAMILIARCAST (1<<14) /* not used by XML? */
#define ANYTARGET (UNITSPELL|REGIONSPELL|BUILDINGSPELL|SHIPSPELL) /* wirkt auf alle objekttypen (unit, ship, building, region) */