wmllint fixes (including some enhancements to wmllint itself...

...to coope with new AI-related tags). Minor prose polish in some
Drake unit descriptions.
This commit is contained in:
Eric S. Raymond 2009-09-01 23:34:21 +00:00
parent ed0d898a12
commit 4ec85cfd8d
8 changed files with 63 additions and 42 deletions

View file

@ -200,4 +200,4 @@ criticism, help with WML code and graphics."
[/campaign]
# wmllint: directory spellings Delfador Cleodil Kalenz Galtrid Crelanu Uraredia
# wmllint: directory spellings Landar Olurf Aldar
# wmllint: directory spellings Landar Olurf Aldar Grubr

View file

@ -90,8 +90,8 @@
gold=0
[unit]
type="Orcish Slayer"
id=orcish_slayer
name= _ "Urudin" #TODO ESR: this slayer needs a good name
id=Urudin
name= _ "Urudin"
canrecruit=yes
x=29
y=15
@ -128,7 +128,7 @@
[event]
name=last breath
[filter]
id=orcish_slayer
id=Urudin
[/filter]
[message]
speaker=unit
@ -238,7 +238,7 @@
[if]
[not]
[have_unit]
id=orcish_slayer
id=Urudin
side=3
[/have_unit]
[/not]
@ -319,7 +319,7 @@
[filter]
x=20
y=6
id=orcish_slayer
id=Urudin
[/filter]
[if]
[variable]
@ -333,7 +333,7 @@
message=_ "Ah, you're back. Report the situation!" #TODO ESR
[/message]
[message]
id=orcish_slayer
id=Urudin
message=_ "They refused to surrender, Warlord. So we have attacked that elvish scum, exactly as planned" #TODO ESR
[/message]
[message]
@ -345,7 +345,7 @@
{ORC_BATTLEFIELD_EVALUATION_SUCCESS}
[then]
[message]
id=orcish_slayer
id=Urudin
message=_ "Yes. They were unable to resist our attack." #TODO ESR slayer reports success of orc attack
[/message]
[/then]
@ -354,13 +354,13 @@
{ORC_BATTLEFIELD_EVALUATION_FAILURE}
[then]
[message]
id=orcish_slayer
id=Urudin
message=_ "No, the citadel is too well-defended." #TODO ESR slayer reports failure of orc attack
[/message]
[/then]
[else]
[message]
id=orcish_slayer
id=Urudin
message=_ "They resisted us fiercely" #TODO ESR slayer reports neutral outcome of orc attack
[/message]
[/else]
@ -379,14 +379,14 @@
message=_ "Go, and report the situation to warlord Grubr." #TODO ESR. note: Grubr is from LoW 7
[/message]
[message]
id=orcish_slayer
id=Urudin
message=_ "Yes, boss." #TODO ESR
[/message]
[store_unit]
[filter]
id=orcish_slayer
id=Urudin
[/filter]
variable=orcish_slayer_from_low3
variable=Urudin_from_low3
kill=yes
[/store_unit]
[/event]
@ -420,10 +420,11 @@
[/if]
{CLEAR_VARIABLE orc_battlefield_evaluation}
# if fog is gone (thus, kalenz is here), then do not wait
# if fog is gone (thus, Kalenz is here), then do not wait
[if]
# wmllint: recognize Kalenz
[have_unit]
id=kalenz
id=Kalenz
side=1
[/have_unit]
[variable]
@ -432,7 +433,7 @@
[/variable]
[then]
[message]
message=" $orc_battlefield_strategy changed to attack "
message=_ " $orc_battlefield_strategy changed to attack "
[/message]
{VARIABLE orc_battlefield_strategy 'attack'}
[/then]
@ -807,18 +808,18 @@
time=3000 #this delay is to give the player the sightseening opportunity
[/delay]
[scroll_to_unit]
id=orcish_slayer
id=Urudin
[/scroll_to_unit]
{MOVE_UNIT (id=orcish_slayer) 29 15}
{MOVE_UNIT (id=Urudin) 29 15}
[message]
id=guard
#TODO ESR
message= _ "Watch out! Someone is sneaking around in the mist."
[/message]
[message]
id=orcish_slayer
id=Urudin
#TODO ESR
message= _ "Hand over the stone and we <i>might</i> not destroy your pinky Elvencitadel and we <i>might</i> spare you. Or, at the very least, we'll give you a quick and painless death."
message= _ "Hand over the stone and we <i>might</i> not destroy your cute little playhouse and we <i>might</i> spare you. Or, at the very least, we'll give you a quick and painless death."
[/message]
[message]
id=Galtrid
@ -826,14 +827,14 @@
message= _ "What stone? The Ka'lian is older than you foul creatures walk under the sun and it was never raided. It will still stand after the last of you beasts have vanished and your wrongdoings are long forgotten."
[/message]
{MOVE_UNIT (id=orcish_slayer) 29 17}
{MOVE_UNIT (id=Urudin) 29 17}
[terrain]
terrain = Gg^Dr
x,y=29,17
[/terrain]
{MOVE_UNIT (id=orcish_slayer) 29 17}
{MOVE_UNIT (id=Urudin) 29 17}
[message]
id=orcish_slayer
id=Urudin
#TODO ESR
message= _ "Punch his arrogant words back down his throat!"
[/message]

View file

@ -266,7 +266,7 @@
#TODO ESR
canrecruit=yes
race=orc
message= _ "An elven army to the north? And they have dwarves with them? Bad news, that forces us to attack before our reenforcements arrive. Maybe we can beat the humans before the elves can intervene. Overrun city and castle!"
message= _ "An elven army to the north? And they have dwarves with them? Bad news, that forces us to attack before our reinforcements arrive. Maybe we can beat the humans before the elves can intervene. Overrun city and castle!"
[/message]
[message]

View file

@ -181,7 +181,7 @@
[message]
#TODO ESR
speaker=second_unit
message= _ "This is a stub. Forgive me $unit.name|. I will remember the good comrate you have been!"
message= _ "This is a stub. Forgive me $unit.name|. I will remember the good comrade you have been!"
[/message]
[message]
#TODO ESR
@ -202,7 +202,7 @@
[message]
#TODO ESR
speaker=second_unit
message= _ "This is a stub. Forgive me $unit.name|. I will remember the good comrate you have been!"
message= _ "This is a stub. Forgive me $unit.name|. I will remember the good comrade you have been!"
[/message]
[message]
#TODO ESR

View file

@ -300,23 +300,23 @@
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-1.png"
image="units/drakes/inferno-fire-se-1.png"
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-2.png"
image="units/drakes/inferno-fire-se-2.png"
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-3.png"
image="units/drakes/inferno-fire-se-3.png"
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-2.png"
image="units/drakes/inferno-fire-se-2.png"
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-1.png"
image="units/drakes/inferno-fire-se-1.png"
[/frame]
[/attack_anim]
[attack_anim]
@ -366,23 +366,23 @@
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-1.png"
image="units/drakes/inferno-fire-se-1.png"
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-2.png"
image="units/drakes/inferno-fire-se-2.png"
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-3.png"
image="units/drakes/inferno-fire-se-3.png"
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-2.png"
image="units/drakes/inferno-fire-se-2.png"
[/frame]
[frame]
duration=100
image="units/drakes/inferno-fire-s-1.png"
image="units/drakes/inferno-fire-se-1.png"
[/frame]
[/attack_anim]
[attack_anim]

View file

@ -17,9 +17,9 @@
undead_variation=swimmer
cost=46
usage=mixed fighter
description= _ "Merfolk tend to use a combination of both nets and clubs in fishing; nets to collect the fish, and clubs to finish the kill. Both of these tools have seen adaptation for warfare, and are valuable enough that auxilliaries who specialize in using them are deliberately brought to battle.
description= _ "Merfolk tend to use a combination of both nets and clubs in fishing; nets to collect the fish, and clubs to finish the kill. Both of these tools have seen adaptation for warfare, and are valuable enough that auxilliaries who specialize in using them are deliberately brought to battle.
Mermen often find themselves in a standoff with land-based enemies; the merfolk are too strong in the water, and are too weak to make any offense on land. Nets are a key bit of leverage; without nets, mermen can't give any effective chase over land, and are at a great disadvantage in hand-to-hand combat."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SLOW}
Mermen often find themselves in a standoff with land-based enemies; the merfolk are too strong in the water, and are too weak to make any offense on land. Nets are a key bit of leverage; without nets, mermen can't give any effective chase over land, and are at a great disadvantage in hand-to-hand combat."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SLOW}
{DEFENSE_ANIM "units/merfolk/entangler.png" "units/merfolk/entangler.png" mermen-hit.wav }
die_sound=mermen-die.ogg
[attack]

View file

@ -16,9 +16,9 @@
undead_variation=swimmer
cost=27
usage=mixed fighter
description= _ "Fishing, as practiced by mermen, is largely a matter of chasing schools of fish into waiting nets, where oar-like clubs are used to dispatch the prey. The improvisation of using these against soldiers proved very effective; most land-native creatures are already quite awkward when waist-deep in water, and getting caught in a net can nearly render them helpless.
description= _ "Fishing, as practiced by mermen, is largely a matter of chasing schools of fish into waiting nets, where oar-like clubs are used to dispatch the prey. The improvisation of using these against soldiers proved very effective; most land-native creatures are already quite awkward when waist-deep in water, and getting caught in a net can render them nearly helpless.
The effectiveness of this led to the development of smaller, weighted nets, which could be cast through the air; these were useless for fishing, but were useful in both combat, and in hunting game that came too close to shore. Clubs were used in combat with little or no adaptation from fishing, since they were already quite deadly."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SLOW}
The effectiveness of this method led to the development of smaller, weighted nets, which could be cast through the air; these were useless for fishing, but were useful in both combat, and in hunting game that came too close to shore. Clubs were used in combat with little or no adaptation from fishing, since they were already quite deadly."+{SPECIAL_NOTES}+{SPECIAL_NOTES_SLOW}
{DEFENSE_ANIM "units/merfolk/netcaster.png" "units/merfolk/netcaster.png" mermen-hit.wav }
die_sound=mermen-die.ogg
[attack]

View file

@ -1028,6 +1028,10 @@ def sanity_check(filename, lines):
in_trait = False
ignore_id = False
in_object = False
in_stage = False
in_cfg = False
in_sound_source = False
in_remove_sound_source = False
in_message = False
in_option = False
ignoreable = False
@ -1052,6 +1056,22 @@ def sanity_check(filename, lines):
in_object = True
elif "[/object]" in lines[i]:
in_object = False
elif "[stage]" in lines[i]:
in_stage = True
elif "[/stage]" in lines[i]:
in_stage = False
elif "[cfg]" in lines[i]:
in_cfg = True
elif "[/cfg]" in lines[i]:
in_cfg = False
elif "[sound_source]" in lines[i]:
in_sound_source = True
elif "[/sound_source]" in lines[i]:
in_sound_source = False
elif "[remove_sound_source]" in lines[i]:
in_remove_sound_source = True
elif "[/remove_sound_source]" in lines[i]:
in_remove_sound_source = False
elif "[message]" in lines[i]:
in_message = True
elif "[/message]" in lines[i]:
@ -1131,7 +1151,7 @@ def sanity_check(filename, lines):
present.append(value)
elif value in ('narrator', 'unit', 'second_unit') or (value and value[0] in ("$", "{")):
continue
elif preamble_seen and not ignore_id and not in_object and not value in present:
elif preamble_seen and not ignore_id and not in_object and not in_cfg and not in_sound_source and not in_remove_sound_source and not in_stage and not value in present:
print '"%s", line %d: unknown \'%s\' referred to by id' \
% (filename, i+1, value)
if markcheck and has_tr_mark and not ("wmllint: ignore" in comment or "wmllint: noconvert" in comment):
@ -1354,7 +1374,7 @@ def hack_syntax(filename, lines):
for i in range(len(lines)):
if "no-syntax-rewrite" in lines[i]:
break
elif "'" in lines[i]:
elif lines[i].count("'") % 2 == 1:
try:
(key, prefix, value, comment) = parse_attribute(lines[i])
if "'" in value and value[0].isalpha() and value[-1].isalpha():