Change the trannstive verb "stone" (as in "turn to stone") to "petrify",

...and all related words such as "unstone", "stoned", etc. Former
usage was not really correct and led to unhelpful ambigiuity with both
"to stone" is in to hit with thrown stones, and "stoned" meaning
intoxicated.

All C++ code, WML, and tags are changed. New wmllint rules will handle all
lifting for UMC.  The wiki has been updated.

Will cause incompatibility with old savefiles containing stoned units.
This commit is contained in:
Eric S. Raymond 2009-04-12 00:40:07 +00:00
parent 6ccc7c33c7
commit e7b27b6435
32 changed files with 135 additions and 127 deletions

View file

@ -33,7 +33,7 @@ Version 1.7.0-svn:
* Added run_file FormulaAI function to allow running .fai scripts directly
from in-game console
* Fixed bug #13295: made enemy_units formula return only those units which
are not incapacitated (for example, it now ignores stoned units )
are not incapacitated (for example, it now ignores petrified units )
* Implemented FR #13348: added timeofday_modifier function to formula AI
* Added attacks_left attribute to unit callable
* New variable: my_attacks with all possible attacks

View file

@ -335,7 +335,7 @@ def abilities_weights()
['skirmisher' -> 15, 'ambush' -> 10, 'nightstalk' -> 20, 'regenerates' -> 20, 'healing' -> 15, 'curing' -> 10, 'leadership' -> 20, 'illumination' -> 15, 'teleport' -> 10, 'steadfast' -> 15 ];
def weapon_specials_weights()
[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'stones' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30, 'firststrike' -> 10, 'poison' -> 25 ];
[ 'backstab' -> 20 ,'slow' -> 10 ,'berserk' -> 20 ,'petrifies' -> 60 ,'plague' -> 10 ,'marksman' -> 30 ,'magical' -> 40 ,'charge' -> 30 ,'drains' -> 30, 'firststrike' -> 10, 'poison' -> 25 ];
def apply_abilities_weights( units_map )
map(

View file

@ -103,9 +103,9 @@
{STARTING_VILLAGES 3 6}
#define TURNED_TO_STONE
#define PETRIFIED
[status]
stoned=on
petrified=on
[/status]
#enddef
@ -131,7 +131,7 @@
{ATTACK_DEPTH 4 5 5}
{NO_SCOUTS}
[/ai]
{TURNED_TO_STONE}
{PETRIFIED}
{FLAG_VARIANT undead}
[/side]
@ -143,24 +143,24 @@
{PLACE_IMAGE (scenery/monolith4.png) 14 30}
{PLACE_IMAGE (scenery/mine-abandoned.png) 15 9}
#define STONED_UNIT TYPE X Y
#define PETRIFIED_UNIT TYPE X Y
[unit]
side=4
type={TYPE}
x={X}
y={Y}
{TURNED_TO_STONE}
{PETRIFIED}
# upkeep cost removed so the gold doesn't change before the unstoning
upkeep=loyal
[/unit]
#enddef
{STONED_UNIT "Bone Shooter" 12 35}
{STONED_UNIT "Bone Shooter" 13 37}
{STONED_UNIT "Bone Shooter" 11 37}
{STONED_UNIT "Revenant" 13 36}
{STONED_UNIT "Revenant" 12 37}
{STONED_UNIT "Revenant" 11 36}
{PETRIFIED_UNIT "Bone Shooter" 12 35}
{PETRIFIED_UNIT "Bone Shooter" 13 37}
{PETRIFIED_UNIT "Bone Shooter" 11 37}
{PETRIFIED_UNIT "Revenant" 13 36}
{PETRIFIED_UNIT "Revenant" 12 37}
{PETRIFIED_UNIT "Revenant" 11 36}
[set_variable]
name=lich_free
@ -261,8 +261,8 @@
[message]
speaker=Prince Haldric
# wmllint: local spelling unstone
message= _ "Okay. Let's unstone that lich and take his book, then get into the sewers. Umm, what language would that book be in?"
# wmllint: local spelling un-petrify
message= _ "Okay. Let's un-petrify that lich and take his book, then get into the sewers. Umm, what language would that book be in?"
[/message]
[message]
speaker=Lady Jessene
@ -368,8 +368,8 @@
name=lich_free
value=1
[/set_variable]
[unstone]
[/unstone]
[unpetrify]
[/unpetrify]
[store_unit]
[filter]

View file

@ -54,7 +54,7 @@
# We're not using an extra side for the ambusher elves
# - they will be on the undead side by default (so the undead
# don't trigger ambushes), then change to the active elven side
# and are being stoned to prevent any action
# and are being petrified to prevent any action
#
# note: this means that elves can trigger ambushes, which should
# be treated as if they "ran for reinforcements" - thus these elves

View file

@ -2534,7 +2534,7 @@
[/store_unit]
{VARIABLE Zhul_statue.id "Zhul_statue"}
{VARIABLE Zhul_statue.status.stoned "on"}
{VARIABLE Zhul_statue.status.petrified "on"}
[unstore_unit]
variable=Zhul_statue
@ -3231,7 +3231,7 @@
id=Zhul_statue
[/filter]
[/store_unit]
{VARIABLE zhul_statue.status.stoned "off"}
{VARIABLE zhul_statue.status.petrified "off"}
{VARIABLE zhul_statue.id "Zhul"}
{VARIABLE zhul_statue.name _"Zhul"}
[unstore_unit]

View file

@ -606,15 +606,15 @@ This attack slows the target until it ends a turn. Slow halves the damage caused
[/slow]
#enddef
#define WEAPON_SPECIAL_STONE
# Canned definition of the Stone ability to be included in a
#define WEAPON_SPECIAL_PETRIFY
# Canned definition of the Petrify ability to be included in a
# [specials] clause.
[stones]
id=stones
name= _ "stones"
description= _ "Stone:
This attack turns the target to stone. Units that have been turned to stone may not move or attack."
[/stones]
[petrifies]
id=petrifies
name= _ "petrifies"
description= _ "Petrify:
This attack petrifies the target, turning it to stone. Units that have been petrified may not move or attack."
[/petrifies]
#enddef
#define WEAPON_SPECIAL_MARKSMAN

View file

@ -64,7 +64,7 @@ _" Foes who lose their life to the plague will rise again in unlife, unless they
#define SPECIAL_NOTES_SLOW
_" This unit is able to slow its enemies, halving their movement speed and attack damage until they end a turn."#enddef
#define SPECIAL_NOTES_STONE
#define SPECIAL_NOTES_PETRIFY
_" The ability to turn the living to stone makes this unit extremely dangerous."#enddef
#define SPECIAL_NOTES_MARKSMAN

View file

@ -1,6 +1,6 @@
#textdomain wesnoth-multiplayer
[multiplayer]
#define UNIT_STONE TYPE NAME_STRING X Y
#define UNIT_PETRIFY TYPE NAME_STRING X Y
[unit]
type={TYPE}
name={NAME_STRING}
@ -10,7 +10,7 @@
random_traits=no
[status]
stoned=on
petrified=on
[/status]
[modifications]
@ -72,7 +72,7 @@
hidden=yes
team_name=statues
{UNIT_STONE "Sky Drake" "" 27 14}
{UNIT_PETRIFY "Sky Drake" "" 27 14}
# wmllint: local spelling Flametrooper
[+unit]
description=_ "The winds of the dark sky blew so cold,
@ -97,7 +97,7 @@ His home to steal the Basilisk's gold.
(inscribed by Flametrooper)"
[/unit]
{UNIT_STONE "Saurian Flanker" _"Xikkrisx" 40 8}
{UNIT_PETRIFY "Saurian Flanker" _"Xikkrisx" 40 8}
[+unit]
facing=sw
# wmllint: local spelling Xikkrisx Syrsszk Rysssrylosszkk Oxsrrsk
@ -106,13 +106,13 @@ His home to steal the Basilisk's gold.
description=_ "Xikkrisx of Syrsszk was a powerful Saurian warrior, sent to this region by the Elders of the Rysssrylosszkk Clan (translation: ''The Hunts-Foes-In-Boiling-Rivers Clan''). The Elders were preparing to make war on a human outpost, and were in great need of the powerful magics of Oxsrrsk, a Saurian Mystic who had last been seen heading in the direction of Ruaskkolin Lake. Xikkrisx found the petrified body of Oxsrrsk, along with a carefully bound scroll that had apparently been dropped into a small crevice in the cave floor. He opened the scroll and read a brief passage from the middle of the text: ''After he was bound and cast from the Upper World, Chak'kso's enraged spirit sought release, and was able to exert a corrupting influence on certain regions of the Upper World, channeled through ''pathways of stone'' that extend from the surface into the depths of the Under Reaches. This rage altered the eggs of great lizards, shaping their bodies and spirits into implements of Chak'kso's hatred.'' Confused, Xikkrisx fixed his attention on the task at hand. Thinking that perhaps the Elders could find some way to restore Oxsrrsk, he began the long and strenuous task of hauling the statue back to the domain of the Rysssrylosszkk Clan. Exhausted, and not having traveled far from the lake, Xikkrisx set the statue down inside of a small cave, and lay down to rest. He was awoken by a bone-chilling roar."
[/unit]
{UNIT_STONE "Saurian Oracle" _"Oxsrrsk" 39 8}
{UNIT_PETRIFY "Saurian Oracle" _"Oxsrrsk" 39 8}
[+unit]
facing=sw
description=_ "Oxsrrsk was a powerful Saurian Oracle, who had, in a raid against the rival Xraxss Clan, acquired (from the vaults of the now-dead Oracle Hesx-Rzzak) a most fascinating scroll. The scroll was entitled ''Ney'yks of the Granite Gaze,'' and told of a creature known as the ''Chak'kso Ney'yks,'' a name which, in an ancient saurian tongue, meant ''Eldest Child of Chak'kso.'' Chak'kso was believed to have been a powerful demigod of the Under Reaches, described as a ''great demon of the earth'' in the Elvish Histories. According to these histories, Chak'kso had once sought to transform all life on the planet to stone; so great was his hatred for creatures of flesh. He was ultimately defeated and bound by powerful magics, but in the centuries following his banishment (to a realm far below the surface of the world) a new breed of creature began appearing in the Histories, a breed with the ability to turn any being of flesh into stone. There was a period when these Basilisks (as they came to be known) wreaked havoc on the world of the living, turning thousands to stone. One by one, and at great cost, the Basilisks were defeated. All, it would seem, but one; the Basilisk known as ''The Ney'yks,'' or ''The Eldest Child,'' in the modern tongue. Supremely convinced of his ability to locate and bind this powerful creature into his service, Oxsrrsk set out on his journey..."
[/unit]
{UNIT_STONE "Elvish Marksman" "" 2 11}
{UNIT_PETRIFY "Elvish Marksman" "" 2 11}
[+unit]
#wmllint: local spelling mongst Gauteamus
description=_ "Slim of Stature, dexterous Hands
@ -126,7 +126,7 @@ Marksman known as Dragonbane
[/unit]
# wmllint: local spelling Blum Duk Gog
{UNIT_STONE "Direwolf Rider" (_"Blum Duk") 10 17}
{UNIT_PETRIFY "Direwolf Rider" (_"Blum Duk") 10 17}
[+unit]
description=_ "Blum Duk was renowned among his goblin clan for having tamed one of the Dire Wolves of the mountains, and he had the courage to match. His leadership and skills alone were what kept the area's goblins alive despite human and elvish menaces. Rumor had it that his wolf had slain fifty men and a hundred Elves.
Thus, when he heard of the awful monster that was inhabiting the area, it was only natural that he ride out alone to face it. All the other goblins expected him to slay the creature easily and drag back its carcass to feast on.
@ -135,13 +135,13 @@ He was in for quite a shock. As soon as he saw the Basilisk, Blum Duk cowered in
[/unit]
# wmllint: local spelling Ihn Terowydlithrol
{UNIT_STONE "Armageddon Drake" _"Rah Ihn Mar" 11 14}
{UNIT_PETRIFY "Armageddon Drake" _"Rah Ihn Mar" 11 14}
[+unit]
description=_ "Rah Ihn Mar, Champion of the Burning Hills, made his way to the Ruaskkolin Lake region in pursuit of the Elvish Hero Terowydlithrol, known among Elves as ''The Dragonbane.'' It was said that Terowydlithrol had killed a Dragon of Fire that threatened an Elvish village, and initiated a ''counterattack'' in which some 37 Drakes, camping in a nearby ravine and believed to be in allegiance with the Dragon, were slaughtered. Knowing that these Drakes were innocent, Rah Ihn Mar came to Ruaskkolin Lake to hunt down and slay Terowydlithrol, who had been seen entering the region but a day ago. Burning for vengeance, Rah Ihn Mar began the hunt....."
[/unit]
# wmllint: local spelling Turin
{UNIT_STONE "Sea Serpent" "" 22 12}
{UNIT_PETRIFY "Sea Serpent" "" 22 12}
[+unit]
facing=sw
description=_ "He had lived there for ages upon ages, in the depths of the water, preying upon the various fish and frogs and merfolk that entered his domain. It was his lake, no other's, and though it was not large, he was its master. Then, the Basilisk came, and looked into the Serpent's eyes. And the Serpent had not died, but it was no longer alive. Thus the new lord of the lake had arrived.
@ -149,7 +149,7 @@ He was in for quite a shock. As soon as he saw the Basilisk, Blum Duk cowered in
[/unit]
# wmllint: local spelling Fynmiir
{UNIT_STONE "Grand Knight" "" 25 14}
{UNIT_PETRIFY "Grand Knight" "" 25 14}
[+unit]
facing=sw
description=_ "A brave hero of Wesnoth's Golden Age, this great rider and commander of men came to this evil place while on a raid against the orcs. Caught unaware by the foul creatures, many of his fellows were killed, but he fought valiantly, slaying many a foe. But alas! The foul Basilisk turned him to stone even as he slew the last orc. Now all that is left is a stark reminder of his once great bearing and strength.
@ -157,7 +157,7 @@ He was in for quite a shock. As soon as he saw the Basilisk, Blum Duk cowered in
[/unit]
# wmllint: local spelling Bramwythl
{UNIT_STONE "Elder Wose" _"Bramwythl" 32 6}
{UNIT_PETRIFY "Elder Wose" _"Bramwythl" 32 6}
[+unit]
description=_ "Bramwythl the Wose was always considered a slow, taciturn fellow, even by other Woses. More than any other Wose, he enjoyed simply standing alone in the sun, arms upraised, admiring the beauty of the empty sky. Once, even, he confided in a fellow that his greatest wish was to be able to bask forever in the sun's glory.
However, not long after, the local wose community heard of the approach of a horrible monster, powerful enough to easily destroy the few woses that lived in the area. They quickly moved off (quickly for Woses, anyway), but Bramwythl was left behind - in their haste, no one had remembered to find him and tell him of the danger.
@ -166,13 +166,13 @@ He was taken quite unawares by the Basilisk, and turned to stone before he even
[/unit]
# wmllint: local spelling Talael Ryndoc Aethec Corryn
{UNIT_STONE "Iron Mauler" _"Talael Ryndoc" 34 11}
{UNIT_PETRIFY "Iron Mauler" _"Talael Ryndoc" 34 11}
[+unit]
facing=sw
description=_ "General Talael Ryndoc came to this place to fight a duel with the Grand Marshal Aethec Corryn, but the two men never found one another. "
[/unit]
{UNIT_STONE "Grand Marshal" _"Aethec Corryn" 15 11}
{UNIT_PETRIFY "Grand Marshal" _"Aethec Corryn" 15 11}
[+unit]
facing=sw
description=_ "The last words spoken by Grand Marshal Aethec Corryn: ''Talael Ryndoc! I am through searching for you! I shall make my way back to Haldric's Hall, and inform the court that you were too much of a coward to attend our duel! Your disgrace shall be more agonizing than the death I'd have given you!''
@ -181,14 +181,14 @@ Perhaps he should not have shouted quite so loudly.... "
[/unit]
# wmllint: local spelling Rilhon Eloralduil Paterson
{UNIT_STONE "Naga Myrmidon" _"Rilhon" 20 12}
{UNIT_PETRIFY "Naga Myrmidon" _"Rilhon" 20 12}
[+unit]
description=_ "This brave warrior, known as Rilhon among the Naga, heard tell of a fabulous treasure that had been lost in these watery caves- a spear whose head was said to have been fashioned from the tooth of Chak'kso Ney'yks, an Elder Basilisk slain long ago by the Elvish hero, Eloralduil. According to the legend, the weapon rested somewhere on the bottom of this very lake (Ruaskkolin Lake, named for a well-known Sea Serpent who made it his home). Having prepared himself for battle with the Serpent, Rilhon met with two rather large surprises. The first was the petrified form of Ruaskkolin the Serpent. The second was the very-much-alive Chak'kso Ney'yks, who was, oddly enough, in possession of all of his teeth.
(inscribed by Paterson)"
[/unit]
# wmllint: local spelling MJQ
{UNIT_STONE "Mermaid Siren" "" 17 11}
{UNIT_PETRIFY "Mermaid Siren" "" 17 11}
[+unit]
facing=sw
description=_ "Through waves and rocky channels
@ -209,5 +209,5 @@ she hasn't moved her eyes
[/unit]
[/side]
#undef UNIT_STONE
#undef UNIT_PETRIFY
[/multiplayer]

View file

@ -14,7 +14,7 @@
random_traits=no
[status]
stoned=on
petrified=on
[/status]
[modifications]

View file

@ -82,7 +82,7 @@ Xu , Xu , Qxu , Qxu , Ql , Ql
generate_name=yes
hitpoints=4
[status]
stoned=on
petrified=on
[/status]
[/unit]
[unit]
@ -1672,7 +1672,7 @@ Result:
[/message]
[/value]
[/set_variables]
{MODIFY_UNIT id=statue status.stoned true}
{MODIFY_UNIT id=statue status.petrified true}
[/command]
[/option]
[/message]

File diff suppressed because one or more lines are too long

View file

@ -450,6 +450,12 @@ linechanges = (
("LABEL_PERSISTANT", "LABEL_PERSISTENT"),
# Changed just before 1.5.13
("targetting", "targeting"),
# Changed just after 1.7 fork
("[stone]", "[petrify]"),
("[unstone]", "[unpetrifyx]"),
("WEAPON_SPECIAL_STONE", "WEAPON_SPECIAL_PETRIFY"),
("SPECIAL_NOTE_STONE", "SPECIAL_NOTE_PETRIFY"),
(".stoned", "petrified"),
)
def validate_stack(stack, filename, lineno):
@ -553,7 +559,7 @@ notepairs = (
("{WEAPON_SPECIAL_BACKSTAB}", "{SPECIAL_NOTES_BACKSTAB}"),
("{WEAPON_SPECIAL_PLAGUE", "{SPECIAL_NOTES_PLAGUE}"), # No } deliberately
("{WEAPON_SPECIAL_SLOW}", "{SPECIAL_NOTES_SLOW}"),
("{WEAPON_SPECIAL_STONE}", "{SPECIAL_NOTES_STONE}"),
("{WEAPON_SPECIAL_PETRIFY}", "{SPECIAL_NOTES_PETRIFY}"),
("{WEAPON_SPECIAL_MARKSMAN}", "{SPECIAL_NOTES_MARKSMAN}"),
("{WEAPON_SPECIAL_MAGICAL}", "{SPECIAL_NOTES_MAGICAL}"),
("{WEAPON_SPECIAL_SWARM}", "{SPECIAL_NOTES_SWARM}"),

View file

@ -675,7 +675,7 @@ Certain units have special attacks. These are listed below:
Backstab::
When used offensively, this attack deals double damage if there is an enemy
of the target on the opposite side of the target, and that unit is not
incapacitated (e.g. turned to stone).
incapacitated (e.g. petrified).
Berserk::
Whether used offensively or defensively, this attack presses the
engagement until one of the combatants is slain, or 30 rounds of attacks
@ -706,9 +706,9 @@ Slow::
caused by attacks and the movement cost for a slowed unit is doubled. A unit
that is slowed will feature a snail icon in its sidebar information when it
is selected.
Stone::
This attack turns the target to stone. Units that have been turned to stone
may not move or attack.
Petrify::
This attack petrifies the target, turning it to stone. Units that
have been petrified may not move or attack.
Swarm::
The number of strikes of this attack decreases when the unit is wounded. The
number of strikes is proportional to the % of HP/maximum HP the unit has. For

View file

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 378 B

View file

@ -24,6 +24,8 @@ Version 1.7.0-svn:
Ogre/Young Ogre, Trapper, Ranger
* Language and translations
* The term 'stoned' has been replaced with 'petrified'; also the
related verb.
* New translations: Icelandic.
* Updated translations: British English, Catalan, Chinese (Simplified),
Czech, Dutch, German, Finnish, Hebrew, Hungarian, Indonesian, Italian,

View file

@ -589,7 +589,7 @@ battle_context::unit_stats::unit_stats(const unit &u, const map_location& u_loc,
is_slowed(utils::string_bool(u.get_state("slowed"))),
slows(false),
drains(false),
stones(false),
petrifies(false),
plagues(false),
poisons(false),
backstab_pos(false),
@ -640,7 +640,7 @@ battle_context::unit_stats::unit_stats(const unit &u, const map_location& u_loc,
opp_weapon->set_specials_context(*aloc, *dloc, &units, &map, &status, &teams, !attacking, weapon);
slows = weapon->get_special_bool("slow");
drains = weapon->get_special_bool("drains") && !utils::string_bool(opp.get_state("not_living"));
stones = weapon->get_special_bool("stones");
petrifies = weapon->get_special_bool("petrifies");
poisons = weapon->get_special_bool("poison") && utils::string_bool(opp.get_state("not_living")) != true && utils::string_bool(opp.get_state("poisoned")) != true;
backstab_pos = is_attacker && backstab_check(u_loc, opp_loc, units, teams);
rounds = weapon->get_specials("berserk").highest("value", 1).first;
@ -727,7 +727,7 @@ void battle_context::unit_stats::dump() const
printf("is_slowed: %d\n", static_cast<int>(is_slowed));
printf("slows: %d\n", static_cast<int>(slows));
printf("drains: %d\n", static_cast<int>(drains));
printf("stones: %d\n", static_cast<int>(stones));
printf("petrifies: %d\n", static_cast<int>(petrifies));
printf("poisons: %d\n", static_cast<int>(poisons));
printf("backstab_pos: %d\n", static_cast<int>(backstab_pos));
printf("swarm: %d\n", static_cast<int>(swarm));
@ -1064,10 +1064,10 @@ attack::attack(game_display& gui, const gamemap& map,
float_text += '\n';
}
// If the defender is turned to stone, the fight stops immediately
static const std::string stone_string("stone");
if (a_stats_->stones) {
float_text += (d_.get_unit().gender() == unit_race::FEMALE ? _("female^stone") : _("stone"));
// If the defender is petrified, the fight stops immediately
static const std::string petrify_string("petrified");
if (a_stats_->petrifies) {
float_text += (d_.get_unit().gender() == unit_race::FEMALE ? _("female^petrified") : _("petrified"));
float_text += '\n';
}
}
@ -1251,14 +1251,14 @@ attack::attack(game_display& gui, const gamemap& map,
LOG_NG << "defender slowed\n";
}
// If the defender is turned to stone, the fight stops immediately
static const std::string stone_string("stone");
if (a_stats_->stones) {
d_.get_unit().set_state("stoned","yes");
// If the defender is petrified, the fight stops immediately
static const std::string petrify_string("petrified");
if (a_stats_->petrifies) {
d_.get_unit().set_state("petrified","yes");
update_def_fog = true;
a_.n_attacks_ = 0;
d_.n_attacks_ = 0;
DELAY_END_LEVEL(delayed_exception, game_events::fire(stone_string, d_.iter_->first, a_.iter_->first));
DELAY_END_LEVEL(delayed_exception, game_events::fire(petrify_string, d_.iter_->first, a_.iter_->first));
refresh_bc();
}
@ -1339,10 +1339,10 @@ attack::attack(game_display& gui, const gamemap& map,
float_text += '\n';
}
// If the defender is turned to stone, the fight stops immediately
static const std::string stone_string("stone");
if (d_stats_->stones) {
float_text += (a_.get_unit().gender() == unit_race::FEMALE ? _("female^stone") : _("stone"));
// If the defender is petrified, the fight stops immediately
static const std::string petrify_string("petrified");
if (d_stats_->petrifies) {
float_text += (a_.get_unit().gender() == unit_race::FEMALE ? _("female^petrified") : _("petrified"));
float_text += '\n';
}
}
@ -1521,15 +1521,15 @@ attack::attack(game_display& gui, const gamemap& map,
}
// If the attacker is turned to stone, the fight stops immediately
static const std::string stone_string("stone");
if (d_stats_->stones) {
a_.get_unit().set_state("stoned","yes");
// If the attacker is petrified, the fight stops immediately
static const std::string petrify_string("petrified");
if (d_stats_->petrifies) {
a_.get_unit().set_state("petrified","yes");
update_att_fog = true;
d_.n_attacks_ = 0;
a_.n_attacks_ = 0;
DELAY_END_LEVEL(delayed_exception, game_events::fire(stone_string,a_.iter_->first,d_.iter_->first));
DELAY_END_LEVEL(delayed_exception, game_events::fire(petrify_string,a_.iter_->first,d_.iter_->first));
refresh_bc();
}
}
@ -1537,7 +1537,7 @@ attack::attack(game_display& gui, const gamemap& map,
--d_.n_attacks_;
}
// Continue the fight to death; if one of the units got stoned,
// Continue the fight to death; if one of the units got petrified,
// either n_attacks or n_defends is -1
if(rounds > 0 && d_.n_attacks_ == 0 && a_.n_attacks_ == 0) {
a_.n_attacks_ = a_.orig_attacks_;
@ -2087,7 +2087,7 @@ namespace {
std::vector<team>& teams, int team,
const std::set<map_location>* known_units = NULL,
std::set<map_location>* seen_units = NULL,
std::set<map_location>* stoned_units = NULL)
std::set<map_location>* petrified_units = NULL)
{
std::vector<map_location> cleared_locations;
@ -2114,13 +2114,13 @@ namespace {
//just in case we managed to move on a fogged hex (teleport)
if(seen_units != NULL && known_units != NULL
&& known_units->count(*it) == 0 && *it != loc) {
if (!utils::string_bool(sighted->second.get_state("stoned")))
if (!utils::string_bool(sighted->second.get_state("petrified")))
{
seen_units->insert(*it);
}
else if (stoned_units != NULL)
else if (petrified_units != NULL)
{
stoned_units->insert(*it);
petrified_units->insert(*it);
}
}
}
@ -2230,7 +2230,7 @@ size_t move_unit(game_display* disp,
const int starting_moves = ui->second.movement_left();
int moves_left = starting_moves;
std::set<map_location> seen_units;
std::set<map_location> stoned_units;
std::set<map_location> petrified_units;
bool discovered_unit = false;
bool teleport_failed = false;
bool should_clear_stack = false;
@ -2282,10 +2282,10 @@ size_t move_unit(game_display* disp,
const temporary_unit_placer unit_placer(units,*step,temp_unit);
if( team.auto_shroud_updates()) {
should_clear_stack |= clear_shroud_unit(map,units,*step,teams,
ui->second.side()-1,&known_units,&seen_units,&stoned_units);
ui->second.side()-1,&known_units,&seen_units,&petrified_units);
} else {
clear_shroud_unit(map,units,*step,teams,
ui->second.side()-1,&known_units,&seen_units,&stoned_units);
ui->second.side()-1,&known_units,&seen_units,&petrified_units);
}
if(should_clear_stack) {
disp->invalidate_all();
@ -2407,8 +2407,8 @@ size_t move_unit(game_display* disp,
game_events::raise(sighted_str,*sight_it,steps.back());
}
for (sight_it = stoned_units.begin();
sight_it != stoned_units.end(); ++sight_it)
for (sight_it = petrified_units.begin();
sight_it != petrified_units.end(); ++sight_it)
{
game_events::raise(sighted_str,*sight_it,steps.back());
}
@ -2620,12 +2620,12 @@ void apply_shroud_changes(undo_list& undos, game_display* disp, const gamemap& m
// Clear the shroud, and collect new seen_units
std::set<map_location> seen_units;
std::set<map_location> stoned_units;
std::set<map_location> petrified_units;
cleared_shroud |= clear_shroud_unit(map,units,*step,teams,team,
&known_units,&seen_units,&stoned_units);
&known_units,&seen_units,&petrified_units);
// Fire sighted events
// Try to keep same order (stoned units after normal units)
// Try to keep same order (petrified units after normal units)
// as with move_unit for replay
for (std::set<map_location>::iterator sight_it = seen_units.begin();
sight_it != seen_units.end(); ++sight_it)
@ -2637,8 +2637,8 @@ void apply_shroud_changes(undo_list& undos, game_display* disp, const gamemap& m
game_events::raise("sighted",*sight_it,unit_itor->first);
sighted_event = true;
}
for (std::set<map_location>::iterator sight_it = stoned_units.begin();
sight_it != stoned_units.end(); ++sight_it)
for (std::set<map_location>::iterator sight_it = petrified_units.begin();
sight_it != petrified_units.end(); ++sight_it)
{
unit_map::const_iterator new_unit = units.find(*sight_it);
assert(new_unit != units.end());

View file

@ -79,7 +79,7 @@ public:
bool is_slowed; /**< True if the unit is slowed at the beginning of the battle. */
bool slows; /**< Attack slows opponent when it hits. */
bool drains; /**< Attack drains opponent when it hits. */
bool stones; /**< Attack turns opponent to stone when it hits. */
bool petrifies; /**< Attack petrifies opponent when it hits. */
bool plagues; /**< Attack turns opponent into a zombie when fatal. */
bool poisons; /**< Attack poisons opponent when it hits. */
bool backstab_pos; /**<

View file

@ -1244,7 +1244,7 @@ void ai_interface::attack_enemy(const location u,
}
if(get_info().units.find(target)->second.incapacitated()) {
LOG_STREAM(err, ai) << "attempt to attack unit that is turned to stone\n";
LOG_STREAM(err, ai) << "attempt to attack unit that is petrified\n";
return;
}
if(!get_info().units.find(u)->second.attacks_left()) {

View file

@ -625,7 +625,7 @@ std::vector<ai::attack_analysis> ai::analyze_targets(
for(unit_map::const_iterator j = units_.begin(); j != units_.end(); ++j) {
// Attack anyone who is on the enemy side,
// and who is not invisible or turned to stone.
// and who is not invisible or petrified.
if(current_team().is_enemy(j->second.side()) && !j->second.incapacitated() &&
j->second.invisible(j->first,units_,teams_) == false) {
location adjacent[6];

View file

@ -65,8 +65,8 @@ struct prob_matrix
bool b_slows, bool b_drains);
// We lied: actually did less damage, adjust matrix.
void remove_stone_distortion_a(unsigned damage, unsigned slow_damage, unsigned b_hp);
void remove_stone_distortion_b(unsigned damage, unsigned slow_damage, unsigned a_hp);
void remove_petrify_distortion_a(unsigned damage, unsigned slow_damage, unsigned b_hp);
void remove_petrify_distortion_b(unsigned damage, unsigned slow_damage, unsigned a_hp);
// Its over, and here's the bill.
void extract_results(std::vector<double> summary_a[2],
@ -352,7 +352,7 @@ void prob_matrix::receive_blow_b(unsigned damage, unsigned slow_damage, double h
}
// We lied: actually did less damage, adjust matrix.
void prob_matrix::remove_stone_distortion_a(unsigned damage, unsigned slow_damage,
void prob_matrix::remove_petrify_distortion_a(unsigned damage, unsigned slow_damage,
unsigned b_hp)
{
for (int p = 0; p < 4; p++) {
@ -372,7 +372,7 @@ void prob_matrix::remove_stone_distortion_a(unsigned damage, unsigned slow_damag
}
}
void prob_matrix::remove_stone_distortion_b(unsigned damage, unsigned slow_damage,
void prob_matrix::remove_petrify_distortion_b(unsigned damage, unsigned slow_damage,
unsigned a_hp)
{
for (int p = 0; p < 4; p++) {
@ -680,9 +680,9 @@ void combatant::complex_fight(combatant &opp, unsigned int rounds)
// To simulate stoning, we set to amount which kills, and re-adjust after.
/** @todo FIXME: This doesn't work for rolling calculations, just first battle. */
if (u_.stones)
if (u_.petrifies)
a_damage = a_slow_damage = opp.u_.max_hp;
if (opp.u_.stones)
if (opp.u_.petrifies)
b_damage = b_slow_damage = u_.max_hp;
do {
@ -705,10 +705,10 @@ void combatant::complex_fight(combatant &opp, unsigned int rounds)
m.dump();
} while (--rounds && m.dead_prob() < 0.99);
if (u_.stones)
m.remove_stone_distortion_a(u_.damage, u_.slow_damage, opp.u_.hp);
if (opp.u_.stones)
m.remove_stone_distortion_b(opp.u_.damage, opp.u_.slow_damage, u_.hp);
if (u_.petrifies)
m.remove_petrify_distortion_a(u_.damage, u_.slow_damage, opp.u_.hp);
if (opp.u_.petrifies)
m.remove_petrify_distortion_b(opp.u_.damage, opp.u_.slow_damage, u_.hp);
// We extract results separately, then combine.
m.extract_results(summary, opp.summary);
@ -792,7 +792,7 @@ void combatant::fight(combatant &opp, bool levelup_considered)
// Optimize the simple cases.
if (rounds == 1 && !u_.slows && !opp.u_.slows &&
!u_.drains && !opp.u_.drains && !u_.stones && !opp.u_.stones &&
!u_.drains && !opp.u_.drains && !u_.petrifies && !opp.u_.petrifies &&
summary[1].empty() && opp.summary[1].empty()) {
if (hit_chances_.size() <= 1 && opp.hit_chances_.size() <= 1) {
one_strike_fight(opp);

View file

@ -484,7 +484,7 @@ void battle_prediction_pane::get_hp_distrib_surface(const std::vector<std::pair<
// Below current hitpoints value is orange.
else if(hp < static_cast<int>(stats.hp)) {
// Stone is grey.
if(opp_stats.stones) {
if(opp_stats.petrifies) {
SDL_Color color = {0x9a, 0x9a, 0x9a, 0};
row_color = color;
} else {

View file

@ -689,7 +689,7 @@ public:
* x,y: pixel location on screen to draw the unit
* image: the image of the unit
* reverse: if the unit should be flipped across the x axis
* greyscale: used when the unit is stoned
* greyscale: used when the unit is petrified
* alpha: the merging to use with the background
* blendto: blend to this colour using blend_ratio
* submerged: the amount of the unit out of 1.0 that is submerged

View file

@ -416,11 +416,11 @@ const SDL_Color NORMAL_COLOUR = {0xDD,0xDD,0xDD,0},
BLACK_COLOUR = {0x00,0x00,0x00,0},
YELLOW_COLOUR = {0xFF,0xFF,0x00,0},
BUTTON_COLOUR = {0xBC,0xB0,0x88,0},
STONED_COLOUR = {0xA0,0xA0,0xA0,0},
PETRIFIED_COLOUR = {0xA0,0xA0,0xA0,0},
TITLE_COLOUR = {0xBC,0xB0,0x88,0},
LABEL_COLOUR = {0x6B,0x8C,0xFF,0},
BIGMAP_COLOUR = {0xFF,0xFF,0xFF,0};
const SDL_Color DISABLED_COLOUR = inverse(STONED_COLOUR);
const SDL_Color DISABLED_COLOUR = inverse(PETRIFIED_COLOUR);
namespace {

View file

@ -51,7 +51,7 @@ private:
//various standard colours
extern const SDL_Color NORMAL_COLOUR, GRAY_COLOUR, LOBBY_COLOUR, GOOD_COLOUR, BAD_COLOUR,
BLACK_COLOUR, YELLOW_COLOUR, BUTTON_COLOUR, BIGMAP_COLOUR,
STONED_COLOUR, TITLE_COLOUR, DISABLED_COLOUR, LABEL_COLOUR;
PETRIFIED_COLOUR, TITLE_COLOUR, DISABLED_COLOUR, LABEL_COLOUR;
// font sizes, to be made theme parameters
#ifdef USE_TINY_GUI

View file

@ -497,7 +497,7 @@ private:
status.push_back(variant("Poisoned"));
if (bc.get_attacker_combatant().slowed != 0)
status.push_back(variant("Slowed"));
if (bc.get_defender_stats().stones && static_cast<unsigned int>(hitLeft[0].as_int()) != bc.get_attacker_stats().hp)
if (bc.get_defender_stats().petrifies && static_cast<unsigned int>(hitLeft[0].as_int()) != bc.get_attacker_stats().hp)
status.push_back(variant("Stoned"));
if (bc.get_defender_stats().plagues && hitLeft[0].as_int() == 0)
status.push_back(variant("Zombiefied"));
@ -520,7 +520,7 @@ private:
status.push_back(variant("Poisoned"));
if (bc.get_defender_combatant().slowed != 0)
status.push_back(variant("Slowed"));
if (bc.get_attacker_stats().stones && static_cast<unsigned int>(hitLeft[0].as_int()) != bc.get_attacker_stats().hp)
if (bc.get_attacker_stats().petrifies && static_cast<unsigned int>(hitLeft[0].as_int()) != bc.get_attacker_stats().hp)
status.push_back(variant("Stoned"));
if (bc.get_attacker_stats().plagues && hitLeft[0].as_int() == 0)
status.push_back(variant("Zombiefied"));
@ -924,7 +924,7 @@ private:
/* if tile is empty */
if (unit == units_.end())
continue;
/* if tile is occupied by friendly or stoned/invisible unit */
/* if tile is occupied by friendly or petrified/invisible unit */
if (! ai_.current_team().is_enemy(unit->second.side()) ||
unit->second.incapacitated() ||
unit->second.invisible(unit->first, units_, ai_.get_info().teams) )

View file

@ -598,16 +598,16 @@ namespace {
}
}
WML_HANDLER_FUNCTION(unstone,/*handler*/,/*event_info*/,cfg)
WML_HANDLER_FUNCTION(unpetrify,/*handler*/,/*event_info*/,cfg)
{
const vconfig filter = cfg.child("filter");
// Store which side will need a shroud/fog update
std::vector<bool> clear_fog_side(teams->size(),false);
for(unit_map::iterator i = units->begin(); i != units->end(); ++i) {
if(utils::string_bool(i->second.get_state("stoned"))) {
if(utils::string_bool(i->second.get_state("petrified"))) {
if(filter.null() || game_events::unit_matches_filter(i, filter)) {
i->second.set_state("stoned","");
i->second.set_state("petrified","");
clear_fog_side[i->second.side()-1] = true;
}
}

View file

@ -109,9 +109,9 @@ report generate_report(TYPE type,
Units cannot be killed by poison alone. The poison will not reduce it below 1 HP.");
res.add_image(unit_status,tooltip);
}
if(utils::string_bool(u->second.get_state("stoned"))) {
unit_status << "misc/stone.png";
tooltip << _("stone: ") << _("This unit has been turned to stone. It may not move or attack.");
if(utils::string_bool(u->second.get_state("petrified"))) {
unit_status << "misc/petrified.png";
tooltip << _("petrified: ") << _("This unit has been petrified. It may not move or attack.");
res.add_image(unit_status,tooltip);
}

View file

@ -290,9 +290,9 @@ namespace events{
row << rgb2highlight(game_config::defense_color_scale[val]);
row << i->first << COLUMN_SEPARATOR;
// show icons if unit is slowed, poisoned, stoned, invisible:
if(utils::string_bool(i->second.get_state("stoned")))
row << IMAGE_PREFIX << "misc/stone.png" << IMG_TEXT_SEPARATOR;
// show icons if unit is slowed, poisoned, petrified, invisible:
if(utils::string_bool(i->second.get_state("petrified")))
row << IMAGE_PREFIX << "misc/petrified.png" << IMG_TEXT_SEPARATOR;
if(utils::string_bool(i->second.get_state("slowed")))
row << IMAGE_PREFIX << "misc/slowed.png" << IMG_TEXT_SEPARATOR;
if(utils::string_bool(i->second.get_state("poisoned")))

View file

@ -766,7 +766,7 @@ void unit::advance_to(const unit_type* t, bool use_traits, game_state* state)
set_state("poisoned","");
set_state("slowed","");
set_state("stoned","");
set_state("petrified","");
end_turn_ = false;
refreshing_ = false;
hidden_ = false;
@ -911,7 +911,7 @@ void unit::new_scenario()
heal_all();
set_state("slowed","");
set_state("poisoned","");
set_state("stoned","");
set_state("petrified","");
}
void unit::remove_temporary_modifications()
{
@ -1836,7 +1836,7 @@ void unit::redraw_unit(game_display& disp, const map_location& loc)
params.image= absolute_image();
if(utils::string_bool(get_state("stoned"))) params.image_mod +="~GS()";
if(utils::string_bool(get_state("petrified"))) params.image_mod +="~GS()";
const frame_parameters adjusted_params = anim_->get_current_params(params,true);

View file

@ -129,7 +129,7 @@ public:
fixed_t alpha() const { return alpha_; }
bool can_recruit() const { return utils::string_bool(cfg_["canrecruit"]); }
bool incapacitated() const { return utils::string_bool(get_state("stoned"),false); }
bool incapacitated() const { return utils::string_bool(get_state("petrified"),false); }
const std::vector<std::string>& recruits() const { return recruits_; }
int total_movement() const { return max_movement_; }
int movement_left() const { return (movement_ == 0 || incapacitated()) ? 0 : movement_; }

View file

@ -555,7 +555,7 @@ const frame_parameters unit_frame::merge_parameters(int current_time,const frame
result.diagonal_in_hex = engine_val.diagonal_in_hex;
}
/** engine provides a string for "stoned" and "team color" modifications */
/** engine provides a string for "petrified" and "team color" modifications */
result.image_mod = current_val.image_mod +animation_val.image_mod;
if(primary) result.image_mod += engine_val.image_mod;