diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index 0cd699f53..4703df1a9 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -731,7 +731,7 @@ an unknown building - ein unbekannter zauber + ein unbekannter Zauber an unknown spell @@ -746,6 +746,14 @@ einer unbekannten Einheit an unknown unit + + ein unbekannter Zauber + an unknown curse + + + Fehler: Unbekannter Schlüssel + Fehler: Unbekannter Schlüssel + @@ -3655,11 +3663,11 @@ Erschaffe einen Ring der Macht - Create A Ring Of Power + Create A Ring of Power Schild des Fisches - Shield Of The Fish + Shield of the Fish Runen des Schutzes @@ -3667,7 +3675,7 @@ Ruf der Realität - Call Of Reality + Call of Reality Astraler Ruf @@ -3707,7 +3715,7 @@ Lied der Verführung - Song Of Seduction + Song of Seduction Aushorchen @@ -3715,11 +3723,11 @@ Kriegsgesang - Song Of War + Song of War Gesang der Angst - Song Of Fear + Song of Fear Lied des Ortes analysieren @@ -3735,7 +3743,7 @@ Erschaffe ein Amulett der Keuschheit - Create An Amulet Of Chastity + Create An Amulet of Chastity Beschleunigung @@ -3759,23 +3767,23 @@ Gesang des wachen Geistes - Song Of The Youthful Spirit + Song of the Youthful Spirit Gesang des schwachen Geistes - Song Of The Aging Spirit + Song of the Aging Spirit Gesang der Friedfertigkeit - Song Of Peace + Song of Peace Gesang der Versklavung - Song Of Slavery + Song of Slavery Hohe Kunst der Ãœberzeugung - Song Of Slavery + Song of Slavery Zeitdehnung @@ -3823,7 +3831,7 @@ Erschaffe einen Ring der Regeneration - Create A Ring Of Regeneration + Create A Ring of Regeneration Mob aufwiegeln @@ -3859,7 +3867,7 @@ Erschaffe einen Beutel des Negativen Gewichts - Create A Bag Of Holding + Create A Bag of Holding Erschaffe einen Aurafocus @@ -3901,18 +3909,10 @@ Magie analysieren Analyze Magic - - Hohes Lied der Gaukelei - Song of Generosity - Gesang des Werbens Song of Courting - - Schleieraura - Veil - Lied der Heilung Blessed Harvest @@ -3975,11 +3975,11 @@ Hainzauber - Grove Of Oak Trees + Grove of Oak Trees Rostregen - Rain Of Rust + Rain of Rust Firuns Fell @@ -4011,7 +4011,7 @@ Wurzeln der Magie - Roots Of Magic + Roots of Magic Mahlstrom @@ -4057,12 +4057,12 @@ Erschaffe ein Amulett des wahren Sehens - Create An Amulet Of True Sight + Create An Amulet of True Sight Erschaffe einen Ring der Unsichtbarkeit - Create A Ring Of Invisibility + Create A Ring of Invisibility Miriams flinke Finger @@ -4078,7 +4078,7 @@ Blick des Basilisken - Gaze Of The Basilisk + Gaze of the Basilisk Starkes Tor und feste Mauer @@ -4098,11 +4098,11 @@ Weg der Bäume - Path Of Trees + Path of Trees Sog des Lebens - Ties Of Life + Ties of Life Heiliger Boden @@ -4115,7 +4115,7 @@ Erwecke Ents - Awakening Of The Ents + Awakening of the Ents Segne Steinkreis @@ -4159,7 +4159,7 @@ Rosthauch - Winds Of Rust + Winds of Rust Machtübertragung @@ -4167,11 +4167,11 @@ Feuerwand - Wall Of Fire + Wall of Fire Fluch der Pestilenz - Curse Of Pestilence + Curse of Pestilence Wahnsinn des Krieges @@ -4192,7 +4192,7 @@ Erschaffe einen Gürtel der Trollstärke - Create A Belt Of Troll + Create A Belt of Troll Strength @@ -4261,11 +4261,11 @@ Traumschlößchen - Castle Of Illusion + Castle of Illusion Traum der Magie - Dream Of Magic + Dream of Magic Gestaltwandlung @@ -4343,6 +4343,150 @@ Göttliche Macht Power of the Gods + + Runen des Schutzes + Protective Runes + + + Störe Astrale Integrität + Astral Disruption + + + Gabe des Chaos + Chaos Gift + + + Schlechter Schlaf + Insomnia + + + Gesang des schwachen Geistes + Song of the Aging Spirit + + + Monster friedlich stimmen + Calm Monster + + + Gesang der Melancholie + Song of Melancholy + + + Beschwörung eines Hitzeelementar + Summon Fire Elemental + + + ein unbekannter Zauber + an unknown spell + + + Luftschiff + Airship + + + ein unbekannter Zauber + an unknown spell + + + Chaosfluch + Chaos Curse + + + Schöne Träume oder Schlechte Träume + Good Dreams or Bad Dreams + + + Hohes Lied der Gaukelei + Song of Generosity + + + Fluch der Götter + Curse of the Gods + + + Gesang des wachen Geistes + Song of the Youthful Spirit + + + Firuns Fell + Firun's Coat + + + Schleieraura + Concealing Aura + + + Magieresistenz + Magic Resistance + + + Heimstein + Homestone + + + Mauern der Ewigkeit + Eternal Walls + + + Wasserelementar + Water Elemental + + + Unbekannter Effekt + Unknown Effect + + + Unbekannter Effekt + Unknown Effect + + + Gesang der Friedfertigkeit + Song of Peace + + + Aufruhr + Riot + + + Unbekannter Effekt + Unknown Effect + + + Gesang der Versklavung + Song of Slavery + + + Unbekannter Effekt + Unknown Effect + + + Zeitdehnung + Double Time + + + Sturmelementar + Storm Elemental + + + Unbekannter Effekt + Unknown Effect + + + Alp + Nightmare + + + Feuerwand + Firewall + + + Zone der Heilung + Zone of Healing + + + Beschleunigung + Acceleration + @@ -5034,7 +5178,7 @@ STRASSE, so werden pro Golem 4 Steine verbaut und der Golem löst sich auf. 'Take a flawless block of crystaline - stone and humidify it with a vial of Water Of Life until + stone and humidify it with a vial of Water of Life until the potion has been soaked up completely. Then focus your power on the forming aura of life and shape a container for the unbound forces'. The more power a magician @@ -5085,7 +5229,7 @@ armor will get rusty. The exact number of items affected by the rain depends on the ammount of power invested by the magician. Up to ten - weapons can be destroyed per level - a Ring Of + weapons can be destroyed per level - a Ring of Power increases the effect like an additional level. @@ -5102,7 +5246,7 @@ cold of a glacier. Under the effect of this spell, insects are able to enter glaciers and act normally there. Ten insects per level can be - protected in this way. A Ring Of Power increases + protected in this way. A Ring of Power increases the number by additional ten. @@ -5111,7 +5255,7 @@ sich. Sodann kann er ihnen befehlen, den Gegner mit Hagelkörnern und Eisbrocken zuzusetzen. During a battle the druid calls the - Elemental Spirits Of Cold and binds them to + Elemental Spirits of Cold and binds them to himself. Then he commands them to attack his foes with hail and ice missiles. @@ -5156,7 +5300,7 @@ Windes beschwört plötzliche Windböen, kleine Windhosen und Luftlöcher herauf, die die gegnerischen Schützen behindern werden. - Calling the Elemental Spirits Of Wind + Calling the Elemental Spirits of Wind conjurs up sudden breezes, small whirlwinds and minor turbulences that will hinder enemy archers. @@ -5179,7 +5323,7 @@ Winde oder Strömungen beeinträchtigt. While being aboard a ship, the druid uses this ritual to force the Elemental Spirits - Of Water to serve him and commands them to carry + of Water to serve him and commands them to carry the ship across the water at a higher speed. In addition, the ship will not be affected by unfavourable winds or currents. @@ -5195,7 +5339,7 @@ who can help those who got injured during a battle. Druids are, with the help of a summons of - the Elemental Spirits Of Life, able to heal + the Elemental Spirits of Life, able to heal wounds, mend broken bones or even regenerate separated limbs as well. @@ -5206,7 +5350,7 @@ starke Winde oder gar Stürme und behindern alle Schützen einer Schlacht. This summons opens a gate to the plane - of Elemental Spirits Of Wind. Immediately, + of Elemental Spirits of Wind. Immediately, strong winds or even storms will rise near the gate and hinder all archers during a battle. @@ -5217,7 +5361,7 @@ das Zaubern für die Dauer des Kampfes deutlich schwerer fallen. This ritual summons some Elemental - Spirits Of Magic and sends them into the ranks + Spirits of Magic and sends them into the ranks of the enemy mages. Casting spells will be much harder for them during the battle. @@ -5237,7 +5381,7 @@ Erdbeben wird alle Gebäude in der Region beschädigen. With this ritual the druid summons an - Elemental Spirit Of Earth that brings the ground + Elemental Spirit of Earth that brings the ground to shake. This earthquake damages all buildings in the target region. @@ -5251,7 +5395,7 @@ desto größer ist die Zahl der Elementargeister, die sich bannen lassen. Für jedes Schiff wird ein Elementargeist benötigt. - Calling the Elemental Spirits Of Storm + Calling the Elemental Spirits of Storm is an ancient ritual. The druid binds the elementals to a ship's sails where they can help to carry the vessel across the waves at an @@ -5305,7 +5449,7 @@ die sich mit ihrem Tarnungs-Talent verstecken, bleiben weiterhin unentdeckt. This spell enables the caster to - create an Amulet Of True Sight. Wearing such an + create an Amulet of True Sight. Wearing such an amulet, a person can discover anyone wearing a Ring of Invisibility. Anyway, units concealed by the use of their stealth skill will remain @@ -5347,11 +5491,11 @@ Wahrnehmung auch sein mag. In einer unsichtbaren Einheit muss jede Person einen Ring tragen. With this spell the caster can create - a Ring Of Invisibility. The wearer of this ring + a Ring of Invisibility. The wearer of this ring will be invisible to all units of other factions, no matter how good their perception skill may be. In an invisible unit, each person - must wear a Ring Of Invisibility. + must wear a Ring of Invisibility. Mit dieser Formel bindet der Magier @@ -5391,7 +5535,7 @@ betroffenen Personen werden nicht mehr kämpfen, können jedoch auch nicht verwundet werden. This complicated but effective spell - uses the Elemental Spirits Of Stone to turn a + uses the Elemental Spirits of Stone to turn a number of enemies to stone for the duration of combat. The affected persons won't be able to fight any more, but they can't be wounded @@ -5405,7 +5549,7 @@ besseren Schutz gegen Angriffe mit dem Schwert wie mit Magie. At the beginning of a battle, the - magician binds some Elemental Spirits Of Rock to + magician binds some Elemental Spirits of Rock to the walls of the builing in which he currently is. The structure will then provide a better protection against attacks by sword or by magic. @@ -5438,7 +5582,7 @@ A great power lies within those places that are pulsing with life. A druid can focus this power and thereby create a gate into the - World Of Spirits. He can then send level*5 + World of Spirits. He can then send level*5 weight units of living or dead matter through the gate. @@ -5448,7 +5592,7 @@ Zaubers Stufe*5 Gewichtseinheiten in einen Wald auf der materiellen Welt zurückschicken. A druid who has traveled to the World - Of Spirits can use this spell to send level*5 + of Spirits can use this spell to send level*5 weight units of living or dead matter back to a forest in the material world. @@ -5551,7 +5695,7 @@ und so wird die Phase der Macht abgelöst von einer Phase der Schwäche. The sorcerer opens his mind to the - Spheres Of Chaos so that he can access a greater + Spheres of Chaos so that he can access a greater ammount of magical power for a while. But the help of the Chaos Lords has its price - and so the period of power will be followed by a period @@ -5681,7 +5825,7 @@ Sie sind schwer zu treffen und entziehen ihrem Gegner Kraft. With the help of dark rituals the - sorcerer summons demons from the Sphere Of + sorcerer summons demons from the Sphere of Shadows. These fearsome creatures can walk almost unseen among the living, but their dark aura can be sensed by everyone. Shadow demons @@ -5775,7 +5919,7 @@ Darkness are at their peak, the sorcerer can use his powers to destroy enchantments. In order to do so, he draws a pentagram on a surface of the - enchanted object and begins calling the Lords Of + enchanted object and begins calling the Lords of Darkness. The Lords will aid him, but whether he is able to undo the target spell or not depends upon his own power. @@ -5806,7 +5950,7 @@ Schaden zufügen. By performing a gruesome ritual and sacrificing his own blood the Sorcerer conjurs - up a spirit from the Elemental Plane Of Poison. + up a spirit from the Elemental Plane of Poison. It will take the form of a green cloud of toxic gases that envelops a whole region and that will harm anyone within. @@ -5825,7 +5969,7 @@ irresistable scent to dragons. It is not known whether the dragons come from surrounding regions or if they have their origin in the - Sphere Of Chaos. The bait will exist for about + Sphere of Chaos. The bait will exist for about six weeks, but it must be placed in a tarrain that is suitable for dragons. @@ -5839,7 +5983,7 @@ Sie sind schwer zu treffen und entziehen ihrem Gegner Kraft und Leben. With the help of dark rituals the - sorcerer summons demons from the Sphere Of + sorcerer summons demons from the Sphere of Shadows. These fearsome creatures can walk almost unseen among the living, but their dark aura can be sensed by everyone. Shadowmasters @@ -5856,7 +6000,7 @@ seiner Macht zu beseelen...' 'So take the blood of a fierce warrior and apply it to the steel of the blade. Then - start calling the Spheres Of Chaos. If you did + start calling the Spheres of Chaos. If you did everything to their pleasure, they will send a minor one of their kind to fulfill the sword with his power.' diff --git a/res/core/messages.xml b/res/core/messages.xml index c25f61fec..70e9d1f88 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -44,7 +44,6 @@ - "$unit($mage) läßt einen Teil seiner selbst in die Erde fliessen. Die Bäume, die Transformation überlebt haben, erscheinen nun viel kräftiger." "The power of $unit($mage) flows into the ground and the trees which survived the spell appear much stronger now." @@ -2104,8 +2103,8 @@ - "$unit($mage) fand heraus, dass auf $ship($ship) der Zauber $curse($curse) liegt, der noch etwa $int($months) Wochen bestehen bleibt." - "$unit($mage) discovers that $ship($ship) is charmed with $curse($curse), which will last for, about $int($months) more weeks." + "$unit($mage) fand heraus, dass auf $ship($ship) der Zauber '$curse($curse)' liegt, der noch etwa $int($months) Wochen bestehen bleibt." + "$unit($mage) discovers that $ship($ship) is charmed with '$curse($curse)', which will last for, about $int($months) more weeks." @@ -2114,8 +2113,8 @@ - "$unit($mage) fand heraus, dass auf $building($building) der Zauber $curse($curse) liegt, der noch etwa $int($months) Wochen bestehen bleibt." - "$unit($mage) discovers that $building($building) is charmed with $curse($curse), which will last for about $int($months) more weeks." + "$unit($mage) fand heraus, dass auf $building($building) der Zauber '$curse($curse)' liegt, der noch etwa $int($months) Wochen bestehen bleibt." + "$unit($mage) discovers that $building($building) is charmed with '$curse($curse)', which will last for about $int($months) more weeks." @@ -2124,8 +2123,8 @@ - "$unit($mage) fand heraus, dass auf $unit($unit) der Zauber $curse($curse) liegt, der noch etwa $int($months) Wochen bestehen bleibt." - "$unit($mage) discovers that $unit($unit) is charmed with $curse($curse) that will last for about $int($months) more weeks." + "$unit($mage) fand heraus, dass auf $unit($unit) der Zauber '$curse($curse)' liegt, der noch etwa $int($months) Wochen bestehen bleibt." + "$unit($mage) discovers that $unit($unit) is charmed with '$curse($curse)' that will last for about $int($months) more weeks." @@ -2134,8 +2133,8 @@ - "$unit($mage) fand heraus, dass auf $region($region) der Zauber $curse($curse) liegt, der noch etwa $int($months) Wochen bestehen bleibt." - "$unit($mage) discovers that $region($region) is charmed with $curse($curse), which will last for about $int($months) more weeks." + "$unit($mage) fand heraus, dass auf $region($region) der Zauber '$curse($curse)' liegt, der noch etwa $int($months) Wochen bestehen bleibt." + "$unit($mage) discovers that $region($region) is charmed with '$curse($curse)', which will last for about $int($months) more weeks." @@ -2143,8 +2142,8 @@ - "$unit($mage) fand heraus, dass auf $ship($ship) der Zauber $curse($curse) liegt, dessen Kraft ausreicht, um noch Jahrhunderte bestehen zu bleiben." - "$unit($mage) discovers that $ship($ship) is charmed with $curse($curse), which will last for centuries." + "$unit($mage) fand heraus, dass auf $ship($ship) der Zauber '$curse($curse)' liegt, dessen Kraft ausreicht, um noch Jahrhunderte bestehen zu bleiben." + "$unit($mage) discovers that $ship($ship) is charmed with '$curse($curse)', which will last for centuries." @@ -2152,8 +2151,8 @@ - "$unit($mage) fand heraus, dass auf $building($building) der Zauber $curse($curse) liegt, dessen Kraft ausreicht, um noch Jahrhunderte bestehen zu bleiben." - "$unit($mage) discovers that $building($building) is charmed with $curse($curse), which will last for centuries." + "$unit($mage) fand heraus, dass auf $building($building) der Zauber '$curse($curse)' liegt, dessen Kraft ausreicht, um noch Jahrhunderte bestehen zu bleiben." + "$unit($mage) discovers that $building($building) is charmed with '$curse($curse)', which will last for centuries." @@ -2161,8 +2160,8 @@ - "$unit($mage) fand heraus, dass auf $unit($unit) der Zauber $curse($curse) liegt, dessen Kraft ausreicht, um noch Jahrhunderte bestehen zu bleiben." - "$unit($mage) discovers that $unit($unit) is charmed with $curse($curse), which will last for centuries." + "$unit($mage) fand heraus, dass auf $unit($unit) der Zauber '$curse($curse)' liegt, dessen Kraft ausreicht, um noch Jahrhunderte bestehen zu bleiben." + "$unit($mage) discovers that $unit($unit) is charmed with '$curse($curse)', which will last for centuries." @@ -2170,8 +2169,8 @@ - "$unit($mage) fand heraus, dass auf $region($region) der Zauber $curse($curse) liegt, dessen Kraft ausreicht, um noch Jahrhunderte bestehen zu bleiben." - "$unit($mage) discovers that $region($region) is charmed with $curse($curse), which will last for centuries." + "$unit($mage) fand heraus, dass auf $region($region) der Zauber '$curse($curse)' liegt, dessen Kraft ausreicht, um noch Jahrhunderte bestehen zu bleiben." + "$unit($mage) discovers that $region($region) is charmed with '$curse($curse)', which will last for centuries." diff --git a/scripts/tests/e3/spells.lua b/scripts/tests/e3/spells.lua index 21a743646..7afe96d8e 100644 --- a/scripts/tests/e3/spells.lua +++ b/scripts/tests/e3/spells.lua @@ -44,3 +44,25 @@ function test_blessedharvest_lasts_n_turn() process_orders() assert_equal(900, r:get_resource("money")) end + +function test_magic() + local r = region.create(0, 0, "plain") + local f = faction.create("noreply@eressea.de", "halfling", "de") + local u = unit.create(f, r) + local b = building.create(r, "castle") + + u.race = "dwarf" + u.magic = "gwyrrd" + u:set_skill("magic", 30) + u.aura = 300 + + u:add_spell("protective_runes") + u:add_spell("analyze_magic") + u:clear_orders() + u:add_order("ZAUBERE \"Runen des Schutzes\" BURG " .. itoa36(b.id)); + u.building = b + u:add_order("ZAUBERE \"Magie analysieren\" BURG " .. itoa36(b.id)); + process_orders() +-- there used to be a SEGFAULT when writing reports here: +-- write_reports() +end diff --git a/src/kernel/curse.c b/src/kernel/curse.c index 89ce3ae3f..12f635521 100644 --- a/src/kernel/curse.c +++ b/src/kernel/curse.c @@ -223,7 +223,9 @@ int curse_read(attrib * a, void *owner, struct storage *store) return AT_READ_FAIL; } c->flags = flags; - c_clearflag(c, CURSE_ISNEW); + if (global.data_version < EXPLICIT_CURSE_ISNEW_VERSION) { + c_clearflag(c, CURSE_ISNEW); + } if (c->type->read) c->type->read(store, c, owner); @@ -250,7 +252,9 @@ void curse_write(const attrib * a, const void *owner, struct storage *store) unit *mage = (c->magician && c->magician->number) ? c->magician : NULL; /* copied from c_clearflag */ - flags = (c->flags & ~CURSE_ISNEW) | (c->type->flags & CURSE_ISNEW); + if (global.data_version < EXPLICIT_CURSE_ISNEW_VERSION) { + flags = (c->flags & ~CURSE_ISNEW) | (c->type->flags & CURSE_ISNEW); + } WRITE_INT(store, c->no); WRITE_TOK(store, ct->cname); @@ -318,6 +322,20 @@ const curse_type *ct_find(const char *c) return NULL; } +void ct_checknames() { + int i, qi; + quicklist *ctl; + + for (i = 0; i < 256; ++i) { + ctl = cursetypes[i]; + for (qi = 0; ctl; ql_advance(&ctl, &qi, 1)) { + curse_type *type = (curse_type *)ql_get(ctl, qi); + curse_name(type, default_locale); + + } + } +} + /* ------------------------------------------------------------- */ /* get_curse identifiziert eine Verzauberung über die ID und gibt * einen pointer auf die struct zurück. diff --git a/src/kernel/curse.h b/src/kernel/curse.h index b98b8601c..4d6729374 100644 --- a/src/kernel/curse.h +++ b/src/kernel/curse.h @@ -248,47 +248,46 @@ extern "C" { void destroy_curse(curse * c); - bool is_cursed_internal(struct attrib *ap, const curse_type * ctype); /* ignoriert CURSE_ISNEW */ + bool is_cursed_internal(struct attrib *ap, const curse_type * ctype); + /* löscht einen konkreten Spruch auf einem Objekt. */ bool remove_curse(struct attrib **ap, const struct curse *c); - /* löscht einen konkreten Spruch auf einem Objekt. - */ - int curse_geteffect_int(const struct curse *c); - float curse_geteffect(const struct curse *c); /* gibt die Auswirkungen der Verzauberungen zurück. zB bei * Skillmodifiziernden Verzauberungen ist hier der Modifizierer * gespeichert. Wird automatisch beim Anlegen eines neuen curse * gesetzt. Gibt immer den ersten Treffer von ap aus zurück. */ + int curse_geteffect_int(const struct curse *c); + float curse_geteffect(const struct curse *c); - float curse_changevigour(struct attrib **ap, curse * c, float i); /* verändert die Stärke der Verzauberung um i */ + float curse_changevigour(struct attrib **ap, curse * c, float i); - int get_cursedmen(struct unit *u, const struct curse *c); /* gibt bei Personenbeschränkten Verzauberungen die Anzahl der * betroffenen Personen zurück. Ansonsten wird 0 zurückgegeben. */ + int get_cursedmen(struct unit *u, const struct curse *c); + /* setzt/loescht Spezialflag einer Verzauberung (zB 'dauert ewig') */ void c_setflag(curse * c, unsigned int flag); void c_clearflag(curse * c, unsigned int flags); - /* setzt/loescht Spezialflag einer Verzauberung (zB 'dauert ewig') */ - void transfer_curse(struct unit *u, struct unit *u2, int n); /* sorgt dafür, das bei der Übergabe von Personen die curse-attribute * korrekt gehandhabt werden. Je nach internen Flag kann dies * unterschiedlich gewünscht sein * */ + void transfer_curse(struct unit *u, struct unit *u2, int n); - struct curse *get_curse(struct attrib *ap, const curse_type * ctype); /* gibt pointer auf die erste curse-struct zurück, deren Typ ctype ist, * oder einen NULL-pointer * */ + struct curse *get_curse(struct attrib *ap, const curse_type * ctype); int find_cursebyname(const char *c); const curse_type *ct_find(const char *c); void ct_register(const curse_type *); - /* Regionszauber */ + void ct_checknames(void); curse *cfindhash(int i); @@ -303,8 +302,8 @@ extern "C" { int resolve_curse(variant data, void *address); bool is_cursed_with(const struct attrib *ap, const struct curse *c); - bool curse_active(const struct curse *c); /* gibt true, wenn der Curse nicht NULL oder inaktiv ist */ + bool curse_active(const struct curse *c); /*** COMPATIBILITY MACROS. DO NOT USE FOR NEW CODE, REPLACE IN OLD CODE: */ const char *oldcursename(int id); diff --git a/src/kernel/version.h b/src/kernel/version.h index ee4e8c52e..430628157 100644 --- a/src/kernel/version.h +++ b/src/kernel/version.h @@ -29,8 +29,9 @@ #define BUILDNO_VERSION 344 /* storing the build number in the save */ #define AUTO_RACENAME_VERSION 345 /* NPC units with name==NULL will automatically get their race for a name */ #define JSON_REPORT_VERSION 346 /* bit 3 in f->options flags the json report */ +#define EXPLICIT_CURSE_ISNEW_VERSION 347 /* CURSE_ISNEW is not reset in read/write, but in age() */ -#define RELEASE_VERSION JSON_REPORT_VERSION /* current datafile */ +#define RELEASE_VERSION EXPLICIT_CURSE_ISNEW_VERSION /* current datafile */ #define MIN_VERSION INTPAK_VERSION /* minimal datafile we support */ #define MAX_VERSION RELEASE_VERSION /* change this if we can need to read the future datafile, and we can do so */ diff --git a/src/reports.c b/src/reports.c index c32902df0..c5b542135 100644 --- a/src/reports.c +++ b/src/reports.c @@ -1841,8 +1841,14 @@ static void write_script(FILE * F, const faction * f) fputc('\n', F); } +static void check_messages_exist(void) { + ct_checknames(); +} + int init_reports(void) { + check_messages_exist(); + prepare_reports(); { if (_access(reportpath(), 0) != 0) { @@ -2058,6 +2064,7 @@ static void eval_spell(struct opstack **stack, const void *userdata) const struct spell *sp = (const struct spell *)opop(stack).v; const char *c = sp ? spell_name(sp, f->locale) : LOC(f->locale, "an_unknown_spell"); + assert(c || !"spell without description!"); size_t len = strlen(c); variant var; @@ -2071,6 +2078,7 @@ static void eval_curse(struct opstack **stack, const void *userdata) const struct curse_type *sp = (const struct curse_type *)opop(stack).v; const char *c = sp ? curse_name(sp, f->locale) : LOC(f->locale, "an_unknown_curse"); + assert(c || !"spell effect without description!"); size_t len = strlen(c); variant var;