Skip to content

Commit

Permalink
Fix special effect descriptions for no damage case
Browse files Browse the repository at this point in the history
* Non-damaging special effects were reporting 'doing 1
  damage' in descriptions which was wrong.  This fixes it.
  See PR #129.
* Updated snapshots to reflect the change.
  • Loading branch information
jt-traub committed May 6, 2024
1 parent 7571f0c commit c1726db
Show file tree
Hide file tree
Showing 29 changed files with 503 additions and 503 deletions.
138 changes: 69 additions & 69 deletions gamedata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4787,10 +4787,10 @@ static SpecialType spd[] = {
{-1, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts something that is not a spell", "annoying ", ""},
// SPECIAL_FIREBALL
{"fireball", "a fireball",
Expand All @@ -4803,9 +4803,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_ENERGY,2,5,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_ENERGY,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"shoots a Fireball", "killing ", ""},
// SPECIAL_HELLFIRE
{"hellfire", "hellfire",
Expand All @@ -4818,9 +4818,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_ENERGY,2,25,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_ENERGY,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"blasts the enemy with Hellfire", "killing ", ""},
// SPECIAL_CAUSEFEAR
{"fear", "cause fear",
Expand All @@ -4832,7 +4832,7 @@ static SpecialType spd[] = {
{-1, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_SPIRIT,2,25,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_SPIRIT, "fear", 1},
{{ATTACK_SPIRIT,2,25,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_SPIRIT, "fear", 0},
{-1, 0, 0, 0, 0, NULL, 1},
{-1, 0, 0, 0, 0, NULL, 1},
{-1, 0, 0, 0, 0, NULL, 1}},
Expand All @@ -4849,8 +4849,8 @@ static SpecialType spd[] = {
"a non-shield spell",
{{ATTACK_WEATHER,2,25,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_WEATHER,0,1},
{ATTACK_ENERGY,2,25,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_ENERGY,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"unleashes a mighty lightning strike", "killing ", ""},
// SPECIAL_MINDBLAST
{"mindblast", "a mindblast",
Expand All @@ -4863,9 +4863,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_SPIRIT,2,125,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_SPIRIT,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"blasts the minds of the enemy", "killing ", " troops"},
// SPECIAL_EARTHQUAKE
{"earthquake", "an earthquake",
Expand All @@ -4878,9 +4878,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_WEATHER,2,30,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_WEATHER,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"invokes a mighty Earthquake", "killing ", ""},
// SPECIAL_FORCE_SHIELD
{"force_shield", "a force shield",
Expand All @@ -4892,10 +4892,10 @@ static SpecialType spd[] = {
{ATTACK_RANGED, -1, -1, -1},
{{ATTACK_COMBAT, 1}, {-1, 0}, {-1, 0}, {-1, 0}},
"Force Shield",
{{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts something that is not a spell", "annoying ", ""},
// SPECIAL_ENERGY_SHIELD
{"energy_shield", "an energy shield",
Expand All @@ -4907,10 +4907,10 @@ static SpecialType spd[] = {
{ATTACK_ENERGY, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"Energy Shield",
{{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts something that is not a spell", "annoying ", ""},
// SPECIAL_SPIRIT_SHIELD
{"shield_spirit", "a spirit shield",
Expand All @@ -4922,10 +4922,10 @@ static SpecialType spd[] = {
{ATTACK_SPIRIT, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"Spirit Shield",
{{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts something that is not a spell", "annoying ", ""},
// SPECIAL_DISPEL_ILLUSIONS
{"dispel_illusion", "dispel illusion",
Expand All @@ -4938,9 +4938,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{NUM_ATTACK_TYPES,2,50,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_ENERGY,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts Dispel Illusions", "dispelling ", " illusions"},
// SPECIAL_SUMMON_STORM
{"storm", "summon storm",
Expand All @@ -4952,7 +4952,7 @@ static SpecialType spd[] = {
{-1, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_WEATHER,2,50,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_WEATHER,"storm",1},
{{ATTACK_WEATHER,2,50,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_WEATHER,"storm",0},
{-1, 0, 0, 0, 0, NULL, 1},
{-1, 0, 0, 0, 0, NULL, 1},
{-1, 0, 0, 0, 0, NULL, 1}},
Expand All @@ -4968,9 +4968,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_WEATHER,2,25,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_WEATHER, 0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"summons a wild tornado", "killing ", ""},
// SPECIAL_CLEAR_SKIES
{"clear_skies", "clear skies",
Expand All @@ -4982,10 +4982,10 @@ static SpecialType spd[] = {
{ATTACK_WEATHER, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"Clear Skies",
{{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts something that is not a spell", "annoying ", ""},
// SPECIAL_BLACK_WIND,
{"black_wind", "a black wind",
Expand All @@ -4998,9 +4998,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_SPIRIT,2,65,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_SPIRIT,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"summons the black wind", "killing ", ""},
// SPECIAL_BANISH_UNDEAD,
{"banish_undead", "banish undead",
Expand All @@ -5013,9 +5013,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{NUM_ATTACK_TYPES,2,25,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_ENERGY,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts Banish Undead", "banishing ", " undead"},
// SPECIAL_BANISH_DEMONS,
{"banish_demon", "banish demons",
Expand All @@ -5028,9 +5028,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{NUM_ATTACK_TYPES,2,25,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_SPIRIT,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts Banish Demons", "banishing ", " demons"},
// SPECIAL_FIREBREATH,
{"firebreath", "fiery breath",
Expand All @@ -5043,9 +5043,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_ENERGY,2,5,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_ENERGY,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"breathes Fire", "killing ", ""},
// SPECIAL_ICEBREATH,
{"icebreath", "icy breath",
Expand All @@ -5058,9 +5058,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_SPIRIT,2,5,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_SPIRIT,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"breathes Ice", "killing ", ""},
// SPECIAL_CAMEL_FEAR
{"spook_horses", "terrify horses",
Expand All @@ -5072,7 +5072,7 @@ static SpecialType spd[] = {
{-1, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield spell",
{{ATTACK_RIDING,1,0,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_SPIRIT,"spook",1},
{{ATTACK_RIDING,1,0,WeaponType::ALWAYSREADY|WeaponType::RANGED,MAGIC_SPIRIT,"spook",0},
{-1, 0, 0, 0, 0, NULL, 1},
{-1, 0, 0, 0, 0, NULL, 1},
{-1, 0, 0, 0, 0, NULL, 1}},
Expand All @@ -5087,10 +5087,10 @@ static SpecialType spd[] = {
{NUM_ATTACK_TYPES, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"invulnerability",
{{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts something that is not a spell", "annoying ", ""},
// Actual physical shields
{"physical_shield", "a physical shield",
Expand All @@ -5102,10 +5102,10 @@ static SpecialType spd[] = {
{ATTACK_RANGED, -1, -1, -1},
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"Physical Shield",
{{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"casts something that is not a spell", "annoying ", ""},

// SPECIAL_CATAPULT_STRIKE,
Expand All @@ -5119,9 +5119,9 @@ static SpecialType spd[] = {
{{-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}},
"a non-shield attack",
{{ATTACK_RANGED,1,4,WeaponType::ALWAYSREADY|WeaponType::RANGED,ARMORPIERCING,0,1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1},
{-1, 0, 0, 0, 0, 0, 1}},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0},
{-1, 0, 0, 0, 0, 0, 0}},
"strikes", "killing ", ""},
};

Expand Down
32 changes: 16 additions & 16 deletions snapshot-tests/neworigins_turns/turn_0/report.1
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ summon storm [SSTO] 1: A mage with this skill can cast summon storm
in battle. This ability will not target creatures which are
currently affected by storm. This ability does between 2 and 100
times the skill level of the mage weather attacks and each attack
deals 1 damage. Each attack causes the target to be effected by
deals no damage. Each attack causes the target to be effected by
storm (-2 to attack, -2 versus melee attacks) for the rest of the
battle. In order to use this spell in combat, the mage should use
the COMBAT order to set it as his combat spell. This skill requires
Expand Down Expand Up @@ -970,7 +970,7 @@ create aura of fear [FEAR] 1: A mage with this skill can cast cause
fear in battle. This ability will not target creatures which are
currently affected by fear. This ability cannot target monsters.
This ability does between 2 and 50 times the skill level of the mage
spirit attacks and each attack deals 1 damage. Each attack causes
spirit attacks and each attack deals no damage. Each attack causes
the target to be effected by fear (-2 to attack, -2 versus melee
attacks, -2 versus riding attacks, -2 versus ranged attacks) for the
rest of the battle. In order to use this spell in combat, the mage
Expand Down Expand Up @@ -2596,7 +2596,7 @@ runesword [RUNE], weight 1. This is a armor-piercing weapon and each
cast cause fear in battle at a skill level of 2. This ability will
not target creatures which are currently affected by fear. This
ability cannot target monsters. This ability does between 2 and 100
spirit attacks and each attack deals 1 damage. Each attack causes
spirit attacks and each attack deals no damage. Each attack causes
the target to be effected by fear (-2 to attack, -2 versus melee
attacks, -2 versus riding attacks, -2 versus ranged attacks) for the
rest of the battle.
Expand Down Expand Up @@ -2983,7 +2983,7 @@ camel [CAME], weight 50, walking capacity 20, riding capacity 20,
battle at a skill level of 3. This ability will only target units
mounted on horses [HORS]. This ability will not target creatures
which are currently affected by spook, or spook. This ability does
between 1 and 0 riding attacks and each attack deals 1 damage. Each
between 1 and 0 riding attacks and each attack deals no damage. Each
attack causes the target to be effected by spook (-1 to attack, -1
versus melee attacks, -1 versus riding attacks, -1 versus ranged
attacks) for the rest of the battle.
Expand Down Expand Up @@ -3031,7 +3031,7 @@ storm giant [STGI], weight 200, walking capacity 50, moves 2 hexes per
Monster can cast summon storm in battle at a skill level of 5. This
ability will not target creatures which are currently affected by
storm. This ability does between 2 and 500 weather attacks and each
attack deals 1 damage. Each attack causes the target to be effected
attack deals no damage. Each attack causes the target to be effected
by storm (-2 to attack, -2 versus melee attacks) for the rest of the
battle. This monster can lair in the Giant's Castle. The monster has
no terrain preferences, and it can travel through any terrain.
Expand Down Expand Up @@ -3089,17 +3089,17 @@ evil sorcerer [SORC], weight 10, walking capacity 5, moves 2 hexes per
Monster can cast cause fear in battle at a skill level of 3. This
ability will not target creatures which are currently affected by
fear. This ability cannot target monsters. This ability does between
2 and 150 spirit attacks and each attack deals 1 damage. Each attack
causes the target to be effected by fear (-2 to attack, -2 versus
melee attacks, -2 versus riding attacks, -2 versus ranged attacks)
for the rest of the battle. The monster has no terrain preferences,
and it can travel through any terrain. Monster is unbelievably
aggressive and will attack player units on sight. This monster has 1
melee attack per round and takes 1 hit to kill and each attack deals
1 damage. This monster has a tactics score of 2, a stealth score of
0, and an observation score of 2. This monster might have advanced
items and silver as treasure. This item cannot be given to other
units.
2 and 150 spirit attacks and each attack deals no damage. Each
attack causes the target to be effected by fear (-2 to attack, -2
versus melee attacks, -2 versus riding attacks, -2 versus ranged
attacks) for the rest of the battle. The monster has no terrain
preferences, and it can travel through any terrain. Monster is
unbelievably aggressive and will attack player units on sight. This
monster has 1 melee attack per round and takes 1 hit to kill and
each attack deals 1 damage. This monster has a tactics score of 2, a
stealth score of 0, and an observation score of 2. This monster
might have advanced items and silver as treasure. This item cannot
be given to other units.

evil magician [MAGI], weight 10, walking capacity 5, moves 2 hexes per
month. This is a monster. This monster attacks with a combat skill
Expand Down
Loading

0 comments on commit c1726db

Please sign in to comment.