From 51725fd67130eeb39e5c931d74f4ce9eab5c236a Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Wed, 16 Jul 2014 15:30:54 -0400 Subject: [PATCH] add a "special notes" for defense caps, with a link to explanation This is better than what it was doing before this commit, which was putting the link in the text in the table. --- data/core/macros/special-notes.cfg | 3 +++ data/core/units/humans/Horse_Grand_Knight.cfg | 2 +- data/core/units/humans/Horse_Knight.cfg | 2 +- data/core/units/humans/Horse_Lancer.cfg | 2 +- data/core/units/humans/Horse_Paladin.cfg | 2 +- data/core/units/humans/Horseman.cfg | 2 +- data/core/units/humans/Loyalist_Cavalier.cfg | 2 +- data/core/units/humans/Loyalist_Cavalryman.cfg | 2 +- data/core/units/humans/Loyalist_Dragoon.cfg | 2 +- data/core/units/undead/Skele_Chocobone.cfg | 2 +- src/help.cpp | 2 +- 11 files changed, 13 insertions(+), 10 deletions(-) diff --git a/data/core/macros/special-notes.cfg b/data/core/macros/special-notes.cfg index 14846dc4d57d..9e68a709b950 100644 --- a/data/core/macros/special-notes.cfg +++ b/data/core/macros/special-notes.cfg @@ -90,3 +90,6 @@ _" The length of this unit’s weapon allows it to strike first in melee, even i #define SPECIAL_NOTES_POISON _" The victims of this unit’s poison will continually take damage until they can be cured in town or by a unit which cures."#enddef + +#define SPECIAL_NOTES_DEFENSE_CAP +_" This unit has a text='defense cap' dst='..terrains_section' on certain terrain types -- it cannot achieve a higher defense rating on mixed terrains with such terrain types."#enddef diff --git a/data/core/units/humans/Horse_Grand_Knight.cfg b/data/core/units/humans/Horse_Grand_Knight.cfg index 7bed090241f5..6ce69a9d5a9f 100644 --- a/data/core/units/humans/Horse_Grand_Knight.cfg +++ b/data/core/units/humans/Horse_Grand_Knight.cfg @@ -17,7 +17,7 @@ undead_variation=mounted cost=58 usage=fighter - description= _ "Grand Knights have reached the acme of skill with sword and lance. Wearing full plate, and riding steeds bred more for power than for speed, these warriors form the core of any serious cavalry force. A grand knight at the head of a charge is a terrifying sight for infantry, and is often enough to break right through a defensive line."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE} + description= _ "Grand Knights have reached the acme of skill with sword and lance. Wearing full plate, and riding steeds bred more for power than for speed, these warriors form the core of any serious cavalry force. A grand knight at the head of a charge is a terrifying sight for infantry, and is often enough to break right through a defensive line."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE}+{SPECIAL_NOTES_DEFENSE_CAP} die_sound=horse-die.ogg [portrait] size=400 diff --git a/data/core/units/humans/Horse_Knight.cfg b/data/core/units/humans/Horse_Knight.cfg index 92f6c6f3a566..bf54ece09833 100644 --- a/data/core/units/humans/Horse_Knight.cfg +++ b/data/core/units/humans/Horse_Knight.cfg @@ -16,7 +16,7 @@ undead_variation=mounted cost=40 usage=fighter - description= _ "Horsemen of skill and discipline are promoted to Knights. Veterans of combat, they have seen the often-fatal results of a failed charge, and have learnt discretion in its use. Knights, therefore, carry swords in their armament, and practice tactics which, although requiring of much more patience, are less risky than a charge. Their lances are still at the ready, however, and growing experience with these weapons makes them deadlier at the tilt."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE} + description= _ "Horsemen of skill and discipline are promoted to Knights. Veterans of combat, they have seen the often-fatal results of a failed charge, and have learnt discretion in its use. Knights, therefore, carry swords in their armament, and practice tactics which, although requiring of much more patience, are less risky than a charge. Their lances are still at the ready, however, and growing experience with these weapons makes them deadlier at the tilt."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE}+{SPECIAL_NOTES_DEFENSE_CAP} die_sound=horse-die.ogg [portrait] size=400 diff --git a/data/core/units/humans/Horse_Lancer.cfg b/data/core/units/humans/Horse_Lancer.cfg index 381015f1b601..c702a9ea559f 100644 --- a/data/core/units/humans/Horse_Lancer.cfg +++ b/data/core/units/humans/Horse_Lancer.cfg @@ -17,7 +17,7 @@ undead_variation=mounted cost=40 usage=fighter - description= _ "Lancers are among the bravest and most feared riders in all of Wesnoth. Clad in minimal armor, they free themselves to ride swiftly, faster than any of their peers. The daring tactics they employ are like a double-edged sword, for they often win either glory or a swift death. Lancers excel in hunting down infantrymen who have made the mistake of breaking formation, and in piercing defensive lines. However, they have limited use in defense."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE} + description= _ "Lancers are among the bravest and most feared riders in all of Wesnoth. Clad in minimal armor, they free themselves to ride swiftly, faster than any of their peers. The daring tactics they employ are like a double-edged sword, for they often win either glory or a swift death. Lancers excel in hunting down infantrymen who have made the mistake of breaking formation, and in piercing defensive lines. However, they have limited use in defense."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE}+{SPECIAL_NOTES_DEFENSE_CAP} [portrait] size=400 side="left" diff --git a/data/core/units/humans/Horse_Paladin.cfg b/data/core/units/humans/Horse_Paladin.cfg index 13956845e811..73eda06645e0 100644 --- a/data/core/units/humans/Horse_Paladin.cfg +++ b/data/core/units/humans/Horse_Paladin.cfg @@ -20,7 +20,7 @@ usage=fighter description= _ "Knights of the highest virtue, Paladins have sworn their strength not to king and crown, but to ideals themselves; of chivalry, and the stewardship of everything that is good. They may serve in the armies of the world, but their first loyalties often lie with groups of their own making; secret, monastic orders that cross political and cultural boundaries. Rulers are sometimes wary of them, for the paladins’ loyalty is only as strong as the liege’s apparent virtue. This has led the more darkly ambitious to either attempt to defame and disperse these groups, or more rarely, to conjure elaborate deceptions to keep these otherwise staunchly loyal troops in service. -Full paladins are generally not quite as fearsome as the ‘Grand Knights’ that champion most armies, but they are first-class fighters nonetheless. Additionally, their wisdom and piety grants these warrior monks certain curious abilities; a paladin is very powerful in fighting magical or unnatural things, and most have some skill at medicine and healing."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE}+{SPECIAL_NOTES_ARCANE}+{SPECIAL_NOTES_HEALS} +Full paladins are generally not quite as fearsome as the ‘Grand Knights’ that champion most armies, but they are first-class fighters nonetheless. Additionally, their wisdom and piety grants these warrior monks certain curious abilities; a paladin is very powerful in fighting magical or unnatural things, and most have some skill at medicine and healing."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE}+{SPECIAL_NOTES_ARCANE}+{SPECIAL_NOTES_HEALS}+{SPECIAL_NOTES_DEFENSE_CAP} die_sound=horse-die.ogg [portrait] size=400 diff --git a/data/core/units/humans/Horseman.cfg b/data/core/units/humans/Horseman.cfg index 2df0638796a3..2a29253ba70e 100644 --- a/data/core/units/humans/Horseman.cfg +++ b/data/core/units/humans/Horseman.cfg @@ -17,7 +17,7 @@ undead_variation=mounted cost=23 usage=fighter - description= _ "Often hailing from the wilder and untamed regions of Wesnoth, Horsemen are trained from childhood to ride and to follow a strict code of honor. A charge made by a horseman is a powerful though risky tactic, the worth of which has been proven time and time again on the battlefield. Horsemen excel against most infantry, especially those who have fallen out of line, but must take care against both spearmen and archers for whom their large size provide inviting targets."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE} + description= _ "Often hailing from the wilder and untamed regions of Wesnoth, Horsemen are trained from childhood to ride and to follow a strict code of honor. A charge made by a horseman is a powerful though risky tactic, the worth of which has been proven time and time again on the battlefield. Horsemen excel against most infantry, especially those who have fallen out of line, but must take care against both spearmen and archers for whom their large size provide inviting targets."+{SPECIAL_NOTES}+{SPECIAL_NOTES_CHARGE}+{SPECIAL_NOTES_DEFENSE_CAP} die_sound=horse-die.ogg [portrait] diff --git a/data/core/units/humans/Loyalist_Cavalier.cfg b/data/core/units/humans/Loyalist_Cavalier.cfg index 10c4d6a49976..55a956254dd9 100644 --- a/data/core/units/humans/Loyalist_Cavalier.cfg +++ b/data/core/units/humans/Loyalist_Cavalier.cfg @@ -18,7 +18,7 @@ cost=52 #extra resistance for these units usage=scout - description= _ "Cavaliers are masters at the use of both sword and crossbow from horseback. Their combination of striking power and mobility is fearsome; and they have a reputation for dash and aggressiveness to match it. The daring deeds of Cavaliers are the subject of many a tale and song." + description= _ "Cavaliers are masters at the use of both sword and crossbow from horseback. Their combination of striking power and mobility is fearsome; and they have a reputation for dash and aggressiveness to match it. The daring deeds of Cavaliers are the subject of many a tale and song."+{SPECIAL_NOTES}+{SPECIAL_NOTES_DEFENSE_CAP} die_sound=horse-die.ogg [portrait] size=400 diff --git a/data/core/units/humans/Loyalist_Cavalryman.cfg b/data/core/units/humans/Loyalist_Cavalryman.cfg index 21173cb133e7..b67d47d1df62 100644 --- a/data/core/units/humans/Loyalist_Cavalryman.cfg +++ b/data/core/units/humans/Loyalist_Cavalryman.cfg @@ -19,7 +19,7 @@ #extra resistance for these units description= _ "Cavalrymen are distinguished from horsemen by their tactics and equipment. A cavalryman wears heavier armor, and carries a sword and shield, rather than a lance. Their tactics do not include charging; instead they maneuver to slash with a sword, using both horse and rider as an effective tool of melee. -Cavalrymen are very useful for taking and holding positions on open ground, for screening friendly soldiers, and also for scouting work." +Cavalrymen are very useful for taking and holding positions on open ground, for screening friendly soldiers, and also for scouting work."+{SPECIAL_NOTES}+{SPECIAL_NOTES_DEFENSE_CAP} die_sound=horse-die.ogg [portrait] size=400 diff --git a/data/core/units/humans/Loyalist_Dragoon.cfg b/data/core/units/humans/Loyalist_Dragoon.cfg index 612aba3e9292..d212f9d42932 100644 --- a/data/core/units/humans/Loyalist_Dragoon.cfg +++ b/data/core/units/humans/Loyalist_Dragoon.cfg @@ -17,7 +17,7 @@ cost=34 #extra resistance for these units usage=scout - description= _ "The more talented cavalrymen in the armies of Wesnoth are trained in the use of the crossbow, and matched with much more powerful steeds. Well-armored, and skilled in the use of their swords, these soldiers can drive forward and hold the ground they take. Their mobility and resilience make them of great value on the battlefield." + description= _ "The more talented cavalrymen in the armies of Wesnoth are trained in the use of the crossbow, and matched with much more powerful steeds. Well-armored, and skilled in the use of their swords, these soldiers can drive forward and hold the ground they take. Their mobility and resilience make them of great value on the battlefield."+{SPECIAL_NOTES}+{SPECIAL_NOTES_DEFENSE_CAP} die_sound=horse-die.ogg [portrait] size=400 diff --git a/data/core/units/undead/Skele_Chocobone.cfg b/data/core/units/undead/Skele_Chocobone.cfg index dbf67c13d484..8149f3ca3163 100644 --- a/data/core/units/undead/Skele_Chocobone.cfg +++ b/data/core/units/undead/Skele_Chocobone.cfg @@ -28,7 +28,7 @@ [/abilities] cost=38 usage=scout - description= _ "Riding the bones of ostrich-like large birds once used as mounts by a lost civilization, the skeletal Chocobones can move faster than most cavalry units."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SUBMERGE}+{SPECIAL_NOTES_CHARGE} + description= _ "Riding the bones of ostrich-like large birds once used as mounts by a lost civilization, the skeletal Chocobones can move faster than most cavalry units."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SUBMERGE}+{SPECIAL_NOTES_CHARGE}+{SPECIAL_NOTES_DEFENSE_CAP} die_sound={SOUND_LIST:SKELETON_DIE} {DEFENSE_ANIM "units/undead-skeletal/chocobone-defend-2.png" "units/undead-skeletal/chocobone-defend-1.png" {SOUND_LIST:SKELETON_HIT} } [attack] diff --git a/src/help.cpp b/src/help.cpp index 9f9e8b8ddf18..e377d6ecfe3c 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -1816,7 +1816,7 @@ class unit_topic_generator: public topic_generator str.str(clear_stringstream); const bool has_cap = movement_type.get_defense().capped(terrain); if (has_cap) { - str << make_link("yes","..terrains_section"); + str << "color=yellow text='yes'"; } else { str << "color=white text='" << utils::unicode_figure_dash << "'"; }