diff --git a/config/fxdata/magic.cfg b/config/fxdata/magic.cfg index 25583bc866..49593fe722 100644 --- a/config/fxdata/magic.cfg +++ b/config/fxdata/magic.cfg @@ -1440,8 +1440,8 @@ PanelTabIndex = 0 SoundSamples = 0 ; Sound sample played when casting the power. SoundPlayed = 0 -; Power strength at each overload level. -Power = 0 0 0 0 0 0 0 0 0 +; Power strength at each overload level. Final level only used by creatures. +Power = 0 0 0 0 0 0 0 0 0 0 ; Power cost at each overload level. Cost = 0 0 0 0 0 0 0 0 0 ; How long the power remains in effect in game turns. @@ -1499,7 +1499,7 @@ PointerSprites = 0 PanelTabIndex = 0 SoundSamples = 0 SoundPlayed = 0 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 0 0 0 0 0 0 0 0 0 Castability = ANYWHERE OWNED_CRTRS CUSTODY_CRTRS ALL_FOOD ALL_GOLD Artifact = SPELLBOOK_HOE @@ -1518,7 +1518,7 @@ PointerSprites = 80 PanelTabIndex = 2 SoundSamples = 831 SoundPlayed = 0 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 150 150 150 150 150 150 150 150 150 Castability = OWNED_GROUND Artifact = SPELLBOOK_IMP @@ -1537,7 +1537,7 @@ PointerSprites = 0 PanelTabIndex = 5 SoundSamples = 834 SoundPlayed = 58 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 25 0 0 0 0 0 0 0 0 Duration = 18 Castability = ALL_GROUND OWNED_CRTRS BOUND_CRTRS @@ -1557,7 +1557,7 @@ PointerSprites = 0 PanelTabIndex = 0 SoundSamples = 0 SoundPlayed = 75 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 0 0 0 0 0 0 0 0 0 Duration = 500 Castability = ALL_GROUND OWNED_CRTRS BOUND_CRTRS CUSTODY_CRTRS OWNED_BOULDERS OWNED_FOOD @@ -1577,7 +1577,7 @@ PointerSprites = 136 PanelTabIndex = 3 SoundSamples = 828 SoundPlayed = 51 -Power = 576 640 704 768 832 896 960 1024 1088 +Power = 576 640 704 768 832 896 960 1024 1088 1088 Cost = 50 60 70 80 90 100 110 120 130 Castability = ANYWHERE UNREVEALED Artifact = SPELLBOOK_SOE @@ -1597,7 +1597,7 @@ PanelTabIndex = 6 SoundSamples = 826 ; 870, 84 or 871, and 872 are alternatives fanfares. SoundPlayed = 83 -Power = 10 15 20 25 30 35 40 45 50 +Power = 10 15 20 25 30 35 40 45 50 50 Cost = 1 2 3 4 5 6 7 8 9 Duration = 1 Castability = ALL_GROUND @@ -1617,7 +1617,7 @@ PointerSprites = 120 PanelTabIndex = 9 SoundSamples = 837 SoundPlayed = 927 -Power = 0 5 6 7 8 9 10 11 12 +Power = 0 5 6 7 8 9 10 11 12 12 Cost = 1000 1200 1400 1600 1800 2000 2200 2400 2600 Duration = 100 Castability = ALL_GROUND REVEALED_TEMP @@ -1637,8 +1637,8 @@ PointerSprites = 104 PanelTabIndex = 10 SoundSamples = 829 SoundPlayed = 37 -Power = 80 120 160 210 280 360 480 680 950 -Cost = 300 400 500 600 700 800 900 1000 1200 +Power = 80 120 160 210 280 360 480 680 950 950 +Cost = 300 400 500 600 700 800 900 1000 1200 Duration = 16 Castability = ALL_GROUND OWNED_CRTRS ALLIED_CRTRS BOUND_CRTRS CUSTODY_CRTRS Artifact = SPELLBOOK_HEAL @@ -1658,7 +1658,7 @@ PointerSprites = 0 PanelTabIndex = 8 SoundSamples = 830 SoundPlayed = 58 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 1000 0 0 0 0 0 0 0 0 Castability = ANYWHERE UNREVEALED Artifact = SPELLBOOK_HLDAUD @@ -1677,7 +1677,7 @@ PointerSprites = 88 PanelTabIndex = 11 SoundSamples = 833 SoundPlayed = 55 -Power = 3 4 5 7 9 12 14 16 30 +Power = 3 4 5 7 9 12 14 16 30 30 Cost = 600 1200 1300 1700 1800 2000 2200 2400 3000 Cooldown = 20 Castability = ALL_GROUND REVEALED_TEMP NEEDS_DELAY @@ -1698,8 +1698,8 @@ PanelTabIndex = 4 SoundSamples = 838 ; 938 is an alternative power speed sound. SoundPlayed = 38 -Power = 300 400 500 600 700 800 900 1000 1100 -Cost = 100 200 300 400 500 600 700 800 900 +Power = 300 400 500 600 700 800 900 1000 1100 1100 +Cost = 100 200 300 400 500 600 700 800 900 Castability = ALL_GROUND OWNED_CRTRS ALLIED_CRTRS BOUND_CRTRS CUSTODY_CRTRS Artifact = SPELLBOOK_SPDC Properties = @@ -1718,8 +1718,8 @@ PointerSprites = 112 PanelTabIndex = 12 SoundSamples = 825 SoundPlayed = 153 -Power = 300 400 500 600 700 800 900 1000 1100 -Cost = 100 200 300 400 500 600 700 800 900 +Power = 300 400 500 600 700 800 900 1000 1100 1100 +Cost = 100 200 300 400 500 600 700 800 900 Castability = ALL_GROUND OWNED_CRTRS ALLIED_CRTRS BOUND_CRTRS Artifact = SPELLBOOK_PROT Properties = @@ -1738,8 +1738,8 @@ PointerSprites = 48 PanelTabIndex = 7 SoundSamples = 832 SoundPlayed = 154 -Power = 300 400 500 600 700 800 900 1000 1100 -Cost = 100 200 300 400 500 600 700 800 900 +Power = 300 400 500 600 700 800 900 1000 1100 1100 +Cost = 100 200 300 400 500 600 700 800 900 Castability = ALL_GROUND OWNED_CRTRS ALLIED_CRTRS BOUND_CRTRS Artifact = SPELLBOOK_CONCL Properties = @@ -1758,7 +1758,7 @@ PointerSprites = 64 PanelTabIndex = 14 SoundSamples = 835 SoundPlayed = 59 -Power = 300 400 500 600 700 800 900 1000 1100 +Power = 300 400 500 600 700 800 900 1000 1100 1100 Cost = 7000 7200 7400 7600 7800 8000 8200 8400 9000 Castability = OWNED_GROUND ALLIED_GROUND ENEMY_CRTRS CUSTODY_CRTRS Artifact = SPELLBOOK_DISEASE @@ -1778,7 +1778,7 @@ PointerSprites = 56 PanelTabIndex = 13 SoundSamples = 827 SoundPlayed = 109 -Power = 300 350 400 450 500 550 600 650 1000 +Power = 300 350 400 450 500 550 600 650 1000 1000 Cost = 1200 1300 1400 1500 1600 1700 1800 1900 3000 Duration = 10 Castability = OWNED_GROUND ALLIED_GROUND ENEMY_CRTRS CUSTODY_CRTRS @@ -1799,7 +1799,7 @@ PointerSprites = 72 PanelTabIndex = 16 SoundSamples = 839 SoundPlayed = 73 -Power = 0 1 2 3 4 5 6 7 8 +Power = 0 1 2 3 4 5 6 7 8 8 Cost = 10000 12000 14000 16000 18000 20000 22000 24000 26000 Castability = ALL_TALL CLAIMABLE Artifact = SPELLBOOK_DWAL @@ -1818,7 +1818,7 @@ PointerSprites = 182 PanelTabIndex = 18 SoundSamples = 0 SoundPlayed = 0 -Power = 40 60 80 100 120 140 160 180 200 +Power = 40 60 80 100 120 140 160 180 200 200 Cost = 2000 2100 2200 2300 2400 2500 2600 2700 2800 Cooldown = 30 Castability = ALL_GROUND ONLY_DIGGERS OWNED_CRTRS BOUND_CRTRS NEEDS_DELAY @@ -1839,7 +1839,7 @@ PointerSprites = 96 PanelTabIndex = 1 SoundSamples = 836 SoundPlayed = 39 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 0 0 0 0 0 0 0 0 0 Castability = ALL_GROUND OWNED_CRTRS OWNED_FOOD Artifact = SPELLBOOK_POSS @@ -1858,7 +1858,7 @@ PointerSprites = 0 PanelTabIndex = 15 SoundSamples = 824 SoundPlayed = 180 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 60000 0 0 0 0 0 0 0 0 Castability = ANYWHERE UNREVEALED Artifact = SPELLBOOK_ARMG @@ -1877,7 +1877,7 @@ PointerSprites = 0 PanelTabIndex = 0 SoundSamples = 0 SoundPlayed = 0 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 0 0 0 0 0 0 0 0 0 Castability = ANYWHERE OWNED_CRTRS CUSTODY_CRTRS Artifact = NULL @@ -1896,7 +1896,7 @@ PointerSprites = 0 PanelTabIndex = 0 SoundSamples = 0 SoundPlayed = 0 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 0 0 0 0 0 0 0 0 0 Castability = OWNED_GROUND UNCLMD_GROUND ALL_GOLD Artifact = NULL @@ -1915,7 +1915,7 @@ PointerSprites = 0 PanelTabIndex = 0 SoundSamples = 0 SoundPlayed = 109 -Power = 0 0 0 0 0 0 0 0 0 +Power = 0 0 0 0 0 0 0 0 0 0 Cost = 0 0 0 0 0 0 0 0 0 Castability = ANYWHERE OWNED_FOOD Artifact = NULL @@ -1935,8 +1935,8 @@ PanelTabIndex = 28 SoundSamples = 0 SoundPlayed = 926 ; Because Rebound is now linked to the creature spell all the levels share the same power by default, with 'general_expand' you have to change these values however you like. -Power = 250 250 250 250 250 250 250 250 250 -Cost = 100 200 300 400 500 600 700 800 900 +Power = 250 250 250 250 250 250 250 250 250 250 +Cost = 100 200 300 400 500 600 700 800 900 Castability = ALL_GROUND OWNED_CRTRS ALLIED_CRTRS BOUND_CRTRS Artifact = SPELLBOOK_RBND Properties = @@ -1957,7 +1957,7 @@ PanelTabIndex = 29 SoundSamples = 0 SoundPlayed = 50 ; Because Freeze is now linked to the creature spell all the levels share the same power by default, with 'general_expand' you have to change these values however you like. -Power = 125 125 125 125 125 125 125 125 125 +Power = 125 125 125 125 125 125 125 125 125 125 Cost = 1250 1375 1500 1625 1750 1875 2000 2125 2250 Cooldown = 20 Castability = OWNED_GROUND ALLIED_GROUND UNCLMD_GROUND NEUTRL_GROUND ENEMY_CRTRS CUSTODY_CRTRS NEEDS_DELAY @@ -1981,8 +1981,8 @@ PanelTabIndex = 20 SoundSamples = 0 SoundPlayed = 50 ; Because Slow is now linked to the creature spell all the levels share the same power by default, with 'general_expand' you have to change these values however you like. -Power = 500 500 500 500 500 500 500 500 500 -Cost = 100 200 300 400 500 600 700 800 900 +Power = 500 500 500 500 500 500 500 500 500 500 +Cost = 100 200 300 400 500 600 700 800 900 Castability = ALL_GROUND ENEMY_CRTRS CUSTODY_CRTRS Artifact = SPELLBOOK_SLOW Properties = @@ -2004,8 +2004,8 @@ PanelTabIndex = 22 SoundSamples = 0 SoundPlayed = 953 ; Because Flight is now linked to the creature spell all the levels share the same power by default, with 'general_expand' you have to change these values however you like. -Power = 750 750 750 750 750 750 750 750 750 -Cost = 100 200 300 400 500 600 700 800 900 +Power = 750 750 750 750 750 750 750 750 750 750 +Cost = 100 200 300 400 500 600 700 800 900 Castability = ALL_GROUND OWNED_CRTRS ALLIED_CRTRS BOUND_CRTRS Artifact = SPELLBOOK_FLGT Properties = @@ -2025,8 +2025,8 @@ PointerSprites = 336 PanelTabIndex = 19 SoundSamples = 0 SoundPlayed = 923 -Power = 576 640 704 768 832 896 960 1024 1088 -Cost = 100 200 300 400 500 600 700 800 900 +Power = 576 640 704 768 832 896 960 1024 1088 1088 +Cost = 100 200 300 400 500 600 700 800 900 Castability = ALL_GROUND OWNED_CRTRS ALLIED_CRTRS BOUND_CRTRS Artifact = SPELLBOOK_VSN Properties = diff --git a/levels/legacy_cfgs/creature.cfg b/levels/legacy_cfgs/creature.cfg index 19f3f83f48..6e4d273b6e 100644 --- a/levels/legacy_cfgs/creature.cfg +++ b/levels/legacy_cfgs/creature.cfg @@ -7,6 +7,11 @@ RangeIncreaseOnExp = 2 DexterityIncreaseOnExp = 35 DefenseIncreaseOnExp = 35 +[instance16] +Name = SLOW +ResetTime = 550 +FPResetTime = 500 + [instance19] Name = MISSILE FPResetTime = 2 @@ -20,7 +25,21 @@ Name = FLAME_BREATH FPTime = 1 FPActionTime = 1 +[instance22] +Name = WIND +ResetTime = 1200 + +[instance23] +Name = LIGHT +ResetTime = 8 +FPResetTime = 3 + [instance26] Name = GRENADE ResetTime = 60 FPResetTime = 20 + +[instance30] +Name = DIG +ForceVisibility = 0 + diff --git a/levels/legacy_cfgs/magic.cfg b/levels/legacy_cfgs/magic.cfg index f3f6523f20..5025f3759a 100644 --- a/levels/legacy_cfgs/magic.cfg +++ b/levels/legacy_cfgs/magic.cfg @@ -1,6 +1,50 @@ ; KeeperFX Partial Magic Configuration file version 1.0 for Legacy maps and campaigns, by Mefistotelis. ; Note that it is partial config file - do not replace global config with this file. +[shot2] +Name = SHOT_FIREBOMB +Damage = 100 +AreaDamage = 0 160 255 + [shot12] Name = SHOT_DRAIN Properties = REBOUND_IMMUNE WIND_IMMUNE LIFE_DRAIN FIXED_DAMAGE + +[shot14] +Name = SHOT_ARROW +Damage = 30 +Properties = + +[shot15] +Name = SHOT_BOULDER +Health = 210 + +[spell21] +Name = SPELL_SIGHT +SpellPower = POWER_SIGHT + +[power5] +Name = POWER_SIGHT +Spell = SPELL_SIGHT +Power = 576 640 704 768 832 896 960 1024 1088 1 + +[power8] +Name = POWER_HEAL_CREATURE +Power = 80 120 160 190 220 270 290 340 500 1000 +Cost = 300 400 500 600 700 800 900 1000 1100 + +[power11] +Name = POWER_SPEED +Power = 300 400 500 600 700 800 900 1000 1100 100 + +[power12] +Name = POWER_PROTECT +Power = 300 400 500 600 700 800 900 1000 1100 100 + +[power13] +Name = POWER_CONCEAL +Power = 300 400 500 600 700 800 900 1000 1100 7000 + +[power15] +Name = POWER_CHICKEN +Power = 300 350 400 450 500 550 600 650 1000 1000 diff --git a/levels/legacy_cfgs/rules.cfg b/levels/legacy_cfgs/rules.cfg index bcd69d3d53..7f72ce27bd 100644 --- a/levels/legacy_cfgs/rules.cfg +++ b/levels/legacy_cfgs/rules.cfg @@ -12,6 +12,10 @@ DiseaseHPTemplePercentage = 50 [magic] ArmageddonTeleportNeutrals = 1 +DiseaseTransferPercentage = 25 +DiseaseLosePercentageHealth = 10 +DiseaseLoseHealthTime = 400 +CollapseDungeonDamage = 10 FriendlyFightAreaRangePercent = 5 FriendlyFightAreaDamagePercent = 100 diff --git a/levels/legacy_cfgs/trapdoor.cfg b/levels/legacy_cfgs/trapdoor.cfg new file mode 100644 index 0000000000..1c97913f01 --- /dev/null +++ b/levels/legacy_cfgs/trapdoor.cfg @@ -0,0 +1,23 @@ +; KeeperFX Partial Traps and Doors Configuration file version 1.0 for Legacy maps and campaigns. +; Note that it is partial config file - do not replace global config with this file. + +[door2] +Name = BRACED +Health = 750 + +[door3] +Name = STEEL +Health = 1500 + +[door4] +Name = MAGIC +Health = 3000 + +[trap1] +Name = BOULDER +Health = 210 + +[trap4] +Name = LIGHTNING +Shots = 8 + diff --git a/levels/legacy_crtr/archer.cfg b/levels/legacy_crtr/archer.cfg index 100cb7ddae..45d776f150 100644 --- a/levels/legacy_crtr/archer.cfg +++ b/levels/legacy_crtr/archer.cfg @@ -4,9 +4,10 @@ [attributes] Name = ARCHER -Dexterity = 62 FearStronger = 10000 FearsomeFactor = 100 +Defence = 60 +Luck = 6 Pay = 60 DamageToBoulder = 20 diff --git a/levels/legacy_crtr/avatar.cfg b/levels/legacy_crtr/avatar.cfg index 73c34d411a..a6d4fc6f96 100644 --- a/levels/legacy_crtr/avatar.cfg +++ b/levels/legacy_crtr/avatar.cfg @@ -4,9 +4,10 @@ [attributes] Name = AVATAR -Strength = 74 -Dexterity = 79 +Dexterity = 180 FearWounded = 0 +Defence = 110 +Luck = 8 DamageToBoulder = 20 Properties = BLEEDS HUMANOID_SKELETON NEVER_CHICKENS IMMUNE_TO_BOULDER ONE_OF_KIND diff --git a/levels/legacy_crtr/barbarian.cfg b/levels/legacy_crtr/barbarian.cfg index 2fe96c00bc..6218fc8294 100644 --- a/levels/legacy_crtr/barbarian.cfg +++ b/levels/legacy_crtr/barbarian.cfg @@ -4,10 +4,10 @@ [attributes] Name = BARBARIAN -Strength = 45 -Dexterity = 50 FearStronger = 10000 FearsomeFactor = 100 +Defence = 60 +Luck = 4 DamageToBoulder = 20 [attraction] diff --git a/levels/legacy_crtr/bile_demon.cfg b/levels/legacy_crtr/bile_demon.cfg index 9105bf416b..511c048ef3 100644 --- a/levels/legacy_crtr/bile_demon.cfg +++ b/levels/legacy_crtr/bile_demon.cfg @@ -4,10 +4,10 @@ [attributes] Name = BILE_DEMON -Strength = 55 -Dexterity = 35 FearStronger = 10000 FearsomeFactor = 100 +Defence = 30 +Luck = 2 DamageToBoulder = 20 [jobs] diff --git a/levels/legacy_crtr/bug.cfg b/levels/legacy_crtr/bug.cfg index 1b69ec7c6b..774f1d232d 100644 --- a/levels/legacy_crtr/bug.cfg +++ b/levels/legacy_crtr/bug.cfg @@ -4,6 +4,6 @@ [attributes] Name = BUG -Dexterity = 43 FearStronger = 10000 -Luck = 3 +Defence = 40 +Luck = 1 diff --git a/levels/legacy_crtr/dark_mistress.cfg b/levels/legacy_crtr/dark_mistress.cfg index 017f8be422..ef17c6a6a9 100644 --- a/levels/legacy_crtr/dark_mistress.cfg +++ b/levels/legacy_crtr/dark_mistress.cfg @@ -4,10 +4,10 @@ [attributes] Name = DARK_MISTRESS -Strength = 45 -Dexterity = 50 FearStronger = 10000 FearsomeFactor = 100 +Defence = 70 +Luck = 8 DamageToBoulder = 20 [jobs] diff --git a/levels/legacy_crtr/demonspawn.cfg b/levels/legacy_crtr/demonspawn.cfg index 2d24e302d3..7101a9c67f 100644 --- a/levels/legacy_crtr/demonspawn.cfg +++ b/levels/legacy_crtr/demonspawn.cfg @@ -4,9 +4,9 @@ [attributes] Name = DEMONSPAWN -Strength = 40 -Dexterity = 50 FearStronger = 10000 +Defence = 50 +Luck = 8 [annoyance] Untrained = 0 0 diff --git a/levels/legacy_crtr/dragon.cfg b/levels/legacy_crtr/dragon.cfg index 5b8c58b4dd..992765eb39 100644 --- a/levels/legacy_crtr/dragon.cfg +++ b/levels/legacy_crtr/dragon.cfg @@ -5,10 +5,10 @@ [attributes] Name = DRAGON HealRequirement = 150 -Strength = 58 Armour = 90 -Dexterity = 45 FearStronger = 10000 +Defence = 50 +Luck = 7 DamageToBoulder = 20 [senses] diff --git a/levels/legacy_crtr/dwarfa.cfg b/levels/legacy_crtr/dwarfa.cfg index e758eab51e..9effb07bba 100644 --- a/levels/legacy_crtr/dwarfa.cfg +++ b/levels/legacy_crtr/dwarfa.cfg @@ -4,9 +4,9 @@ [attributes] Name = DWARFA -Strength = 40 -Dexterity = 42 FearStronger = 10000 +Defence = 30 +Luck = 1 [attraction] EntranceRoom = NULL NULL NULL diff --git a/levels/legacy_crtr/fairy.cfg b/levels/legacy_crtr/fairy.cfg index 41e6d19771..3aba8e31a6 100644 --- a/levels/legacy_crtr/fairy.cfg +++ b/levels/legacy_crtr/fairy.cfg @@ -4,9 +4,10 @@ [attributes] Name = FAIRY -Dexterity = 50 FearStronger = 10000 FearsomeFactor = 100 +Defence = 30 +Luck = 16 DamageToBoulder = 20 [attraction] diff --git a/levels/legacy_crtr/fly.cfg b/levels/legacy_crtr/fly.cfg index 73f583821a..6372c8396a 100644 --- a/levels/legacy_crtr/fly.cfg +++ b/levels/legacy_crtr/fly.cfg @@ -4,6 +4,7 @@ [attributes] Name = FLY -Dexterity = 40 FearStronger = 10000 +Defence = 30 +Luck = 6 DamageToBoulder = 20 diff --git a/levels/legacy_crtr/ghost.cfg b/levels/legacy_crtr/ghost.cfg index 0c73dccab4..dc8250fc8b 100644 --- a/levels/legacy_crtr/ghost.cfg +++ b/levels/legacy_crtr/ghost.cfg @@ -4,8 +4,9 @@ [attributes] Name = GHOST -Dexterity = 58 FearStronger = 10000 +Defence = 60 +Luck = 4 Properties = IMMUNE_TO_GAS FLYING SEE_INVISIBLE EVIL [experience] diff --git a/levels/legacy_crtr/giant.cfg b/levels/legacy_crtr/giant.cfg index fdf9c64b32..cd63a4fe5f 100644 --- a/levels/legacy_crtr/giant.cfg +++ b/levels/legacy_crtr/giant.cfg @@ -4,9 +4,9 @@ [attributes] Name = GIANT -Strength = 62 -Dexterity = 45 FearStronger = 10000 +Defence = 30 +Luck = 8 DamageToBoulder = 20 Properties = BLEEDS HUMANOID_SKELETON diff --git a/levels/legacy_crtr/hell_hound.cfg b/levels/legacy_crtr/hell_hound.cfg index 05bd84f493..9a775c0cb3 100644 --- a/levels/legacy_crtr/hell_hound.cfg +++ b/levels/legacy_crtr/hell_hound.cfg @@ -4,9 +4,9 @@ [attributes] Name = HELL_HOUND -Strength = 48 -Dexterity = 50 FearStronger = 10000 +Defence = 50 +Luck = 3 DamageToBoulder = 20 [jobs] diff --git a/levels/legacy_crtr/horny.cfg b/levels/legacy_crtr/horny.cfg index 96f9db5a6c..e2ef14c7ab 100644 --- a/levels/legacy_crtr/horny.cfg +++ b/levels/legacy_crtr/horny.cfg @@ -4,8 +4,9 @@ [attributes] Name = HORNY -Strength = 74 -Dexterity = 76 +Strength = 150 +Dexterity = 160 FearWounded = 0 -Luck = 30 +Defence = 70 +Luck = 12 DamageToBoulder = 20 diff --git a/levels/legacy_crtr/imp.cfg b/levels/legacy_crtr/imp.cfg index 73fee3de03..17573a1e22 100644 --- a/levels/legacy_crtr/imp.cfg +++ b/levels/legacy_crtr/imp.cfg @@ -4,8 +4,10 @@ [attributes] Name = IMP -Dexterity = 45 FearStronger = 10000 +Defence = 5 +; Luck values in legacy are 2.55 times higher than in the original game. KeeperFX has luck as a percentage, DK1 as a x/255 ratio. +Luck = 0 DamageToBoulder = 20 HealRequirement = 0 Properties = BLEEDS HUMANOID_SKELETON SPECIAL_DIGGER EVIL NO_ENMHEART_ATTCK diff --git a/levels/legacy_crtr/knight.cfg b/levels/legacy_crtr/knight.cfg index b1a024c860..90ddfeac4c 100644 --- a/levels/legacy_crtr/knight.cfg +++ b/levels/legacy_crtr/knight.cfg @@ -4,9 +4,9 @@ [attributes] Name = KNIGHT -Strength = 55 -Dexterity = 74 FearWounded = 0 +Defence = 30 +Luck = 6 DamageToBoulder = 20 [attraction] diff --git a/levels/legacy_crtr/monk.cfg b/levels/legacy_crtr/monk.cfg index 79d08f1cce..57604ca52e 100644 --- a/levels/legacy_crtr/monk.cfg +++ b/levels/legacy_crtr/monk.cfg @@ -4,10 +4,10 @@ [attributes] Name = MONK -Strength = 35 -Dexterity = 55 FearStronger = 10000 FearsomeFactor = 100 +Defence = 80 +Luck = 12 DamageToBoulder = 20 [attraction] diff --git a/levels/legacy_crtr/orc.cfg b/levels/legacy_crtr/orc.cfg index 590e94fafe..09a41ffe42 100644 --- a/levels/legacy_crtr/orc.cfg +++ b/levels/legacy_crtr/orc.cfg @@ -4,10 +4,10 @@ [attributes] Name = ORC -Strength = 48 -Dexterity = 45 FearWounded = 4 FearStronger = 10000 +Defence = 65 +Luck = 5 DamageToBoulder = 20 [jobs] diff --git a/levels/legacy_crtr/samurai.cfg b/levels/legacy_crtr/samurai.cfg index 4ab9c4dc80..ffc894a7f3 100644 --- a/levels/legacy_crtr/samurai.cfg +++ b/levels/legacy_crtr/samurai.cfg @@ -4,10 +4,10 @@ [attributes] Name = SAMURAI -Strength = 55 -Dexterity = 58 FearStronger = 10000 FearsomeFactor = 100 +Defence = 70 +Luck = 8 DamageToBoulder = 20 Properties = BLEEDS HUMANOID_SKELETON SEE_INVISIBLE diff --git a/levels/legacy_crtr/skeleton.cfg b/levels/legacy_crtr/skeleton.cfg index 5935479994..32ca6e4ba5 100644 --- a/levels/legacy_crtr/skeleton.cfg +++ b/levels/legacy_crtr/skeleton.cfg @@ -4,8 +4,8 @@ [attributes] Name = SKELETON -Strength = 48 -Dexterity = 50 +Defence = 50 +Luck = 1 [jobs] PrimaryJobs = TRAIN diff --git a/levels/legacy_crtr/sorceror.cfg b/levels/legacy_crtr/sorceror.cfg index 0a40a37949..ab5bec6061 100644 --- a/levels/legacy_crtr/sorceror.cfg +++ b/levels/legacy_crtr/sorceror.cfg @@ -4,9 +4,10 @@ [attributes] Name = SORCEROR -Dexterity = 62 FearStronger = 10000 FearsomeFactor = 100 +Defence = 30 +Luck = 2 DamageToBoulder = 20 [annoyance] diff --git a/levels/legacy_crtr/spider.cfg b/levels/legacy_crtr/spider.cfg index 7c7383f6a5..267f5c803a 100644 --- a/levels/legacy_crtr/spider.cfg +++ b/levels/legacy_crtr/spider.cfg @@ -4,9 +4,9 @@ [attributes] Name = SPIDER -Strength = 35 -Dexterity = 45 FearStronger = 10000 +Defence = 50 +Luck = 1 [senses] EyeEffect = NULL diff --git a/levels/legacy_crtr/tentacle.cfg b/levels/legacy_crtr/tentacle.cfg index 8d31136440..15b1de98ca 100644 --- a/levels/legacy_crtr/tentacle.cfg +++ b/levels/legacy_crtr/tentacle.cfg @@ -4,9 +4,9 @@ [attributes] Name = TENTACLE -Strength = 40 -Dexterity = 48 FearStronger = 10000 +Defence = 50 +Luck = 1 DamageToBoulder = 20 [senses] diff --git a/levels/legacy_crtr/thief.cfg b/levels/legacy_crtr/thief.cfg index 7737d049b2..23b7ab228f 100644 --- a/levels/legacy_crtr/thief.cfg +++ b/levels/legacy_crtr/thief.cfg @@ -4,8 +4,9 @@ [attributes] Name = THIEF -Dexterity = 68 FearStronger = 10000 +Defence = 80 +Luck = 5 DamageToBoulder = 20 [attraction] diff --git a/levels/legacy_crtr/troll.cfg b/levels/legacy_crtr/troll.cfg index bc2e56ea30..6a8e06f52e 100644 --- a/levels/legacy_crtr/troll.cfg +++ b/levels/legacy_crtr/troll.cfg @@ -4,9 +4,9 @@ [attributes] Name = TROLL -Strength = 35 -Dexterity = 40 FearStronger = 10000 +Defence = 50 +Luck = 4 DamageToBoulder = 20 [jobs] diff --git a/levels/legacy_crtr/tunneller.cfg b/levels/legacy_crtr/tunneller.cfg index c0912a82a8..874c82f876 100644 --- a/levels/legacy_crtr/tunneller.cfg +++ b/levels/legacy_crtr/tunneller.cfg @@ -4,9 +4,8 @@ [attributes] Name = TUNNELLER -Strength = 35 -Dexterity = 35 FearStronger = 10000 +Defence = 40 GoldHold = 500 [experience] diff --git a/levels/legacy_crtr/vampire.cfg b/levels/legacy_crtr/vampire.cfg index f9f15816a3..52284b20f3 100644 --- a/levels/legacy_crtr/vampire.cfg +++ b/levels/legacy_crtr/vampire.cfg @@ -4,8 +4,8 @@ [attributes] Name = VAMPIRE -Strength = 50 -Dexterity = 55 +Defence = 80 +Luck = 10 DamageToBoulder = 20 [jobs] diff --git a/levels/legacy_crtr/witch.cfg b/levels/legacy_crtr/witch.cfg index ee819c7759..9063405306 100644 --- a/levels/legacy_crtr/witch.cfg +++ b/levels/legacy_crtr/witch.cfg @@ -4,9 +4,10 @@ [attributes] Name = WITCH -Dexterity = 55 FearStronger = 10000 FearsomeFactor = 100 +Defence = 30 +Luck = 2 DamageToBoulder = 20 [attraction] diff --git a/levels/legacy_crtr/wizard.cfg b/levels/legacy_crtr/wizard.cfg index 5000055491..269189bfdd 100644 --- a/levels/legacy_crtr/wizard.cfg +++ b/levels/legacy_crtr/wizard.cfg @@ -4,9 +4,10 @@ [attributes] Name = WIZARD -Dexterity = 62 FearStronger = 10000 FearsomeFactor = 100 +Defence = 30 +Luck = 2 DamageToBoulder = 20 [attraction] diff --git a/src/config_magic.c b/src/config_magic.c index b4e1a47d8f..9ccb3d42ec 100644 --- a/src/config_magic.c +++ b/src/config_magic.c @@ -1915,7 +1915,11 @@ TbBool parse_magic_power_blocks(char *buf, long len, const char *config_textname pwrdynst->strength[n] = k; n++; } - if (n <= SPELL_MAX_LEVEL) + if (n == POWER_MAX_LEVEL+1) // Old power max is one short for spell max, so duplicate final power value to use for lvl10 creatures. + { + pwrdynst->strength[n] = pwrdynst->strength[n-1]; + } + if (n <= POWER_MAX_LEVEL) { CONFWRNLOG("Couldn't read all \"%s\" parameters in [%s] block of %s file.", COMMAND_TEXT(cmd_num),block_buf,config_textname); @@ -1925,7 +1929,7 @@ TbBool parse_magic_power_blocks(char *buf, long len, const char *config_textname while (get_conf_parameter_single(buf,&pos,len,word_buf,sizeof(word_buf)) > 0) { k = atoi(word_buf); - if (n > SPELL_MAX_LEVEL) + if (n > POWER_MAX_LEVEL) { CONFWRNLOG("Too many \"%s\" parameters in [%s] block of %s file.", COMMAND_TEXT(cmd_num),block_buf,config_textname); @@ -1934,7 +1938,7 @@ TbBool parse_magic_power_blocks(char *buf, long len, const char *config_textname pwrdynst->cost[n] = k; n++; } - if (n <= SPELL_MAX_LEVEL) + if (n <= POWER_MAX_LEVEL) { CONFWRNLOG("Couldn't read all \"%s\" parameters in [%s] block of %s file.", COMMAND_TEXT(cmd_num),block_buf,config_textname); diff --git a/src/config_magic.h b/src/config_magic.h index dbc6c19f35..acb8327d0f 100644 --- a/src/config_magic.h +++ b/src/config_magic.h @@ -31,7 +31,8 @@ extern "C" { /******************************************************************************/ #define MAGIC_ITEMS_MAX 2000 -#define SPELL_MAX_LEVEL 8 +#define SPELL_MAX_LEVEL 9 +#define POWER_MAX_LEVEL 8 #define MAGIC_OVERCHARGE_LEVELS (SPELL_MAX_LEVEL+1) #define POWER_TYPES_MAX 2000 diff --git a/src/game_merge.h b/src/game_merge.h index a941e8846c..5f47bb8d58 100644 --- a/src/game_merge.h +++ b/src/game_merge.h @@ -212,6 +212,7 @@ unsigned short get_extra_level_kind_visibility(unsigned short elv_kind); short is_extra_level_visible(struct PlayerInfo *player, long ex_lvnum); void update_extra_levels_visibility(void); TbBool set_bonus_level_visibility_for_singleplayer_level(struct PlayerInfo *player, unsigned long sp_lvnum, short visible); +TbBool emulate_integer_overflow(unsigned short nbits); /******************************************************************************/ #ifdef __cplusplus diff --git a/src/magic.c b/src/magic.c index c815d59aec..176fce228c 100644 --- a/src/magic.c +++ b/src/magic.c @@ -1042,8 +1042,8 @@ void turn_off_power_sight_of_evil(PlayerNumber plyr_idx) const struct MagicStats *pwrdynst; pwrdynst = get_power_dynamic_stats(PwrK_SIGHT); spl_lev = dungeon->sight_casted_splevel; - if (spl_lev > SPELL_MAX_LEVEL) - spl_lev = SPELL_MAX_LEVEL; + if (spl_lev > POWER_MAX_LEVEL) + spl_lev = POWER_MAX_LEVEL; i = game.play_gameturn - dungeon->sight_casted_gameturn; imax = abs(pwrdynst->strength[spl_lev]/4) >> 2; if (i > imax) @@ -2190,8 +2190,8 @@ int get_power_overcharge_level(struct PlayerInfo *player) { int i; i = (player->cast_expand_level >> 2); - if (i > SPELL_MAX_LEVEL) - return SPELL_MAX_LEVEL; + if (i > POWER_MAX_LEVEL) + return POWER_MAX_LEVEL; return i; } @@ -2205,8 +2205,8 @@ TbBool update_power_overcharge(struct PlayerInfo *player, int pwkind) const struct MagicStats *pwrdynst; pwrdynst = get_power_dynamic_stats(pwkind); i = (player->cast_expand_level+1) >> 2; - if (i > SPELL_MAX_LEVEL) - i = SPELL_MAX_LEVEL; + if (i > POWER_MAX_LEVEL) + i = POWER_MAX_LEVEL; if (pwrdynst->cost[i] <= dungeon->total_money_owned) { // If we have more money, increase overcharge @@ -2224,7 +2224,7 @@ TbBool update_power_overcharge(struct PlayerInfo *player, int pwkind) else player->cast_expand_level = 0; } - return (i < SPELL_MAX_LEVEL); + return (i < POWER_MAX_LEVEL); } /******************************************************************************/ #ifdef __cplusplus diff --git a/src/player_compchecks.c b/src/player_compchecks.c index 414c5362de..83b83c83aa 100644 --- a/src/player_compchecks.c +++ b/src/player_compchecks.c @@ -790,7 +790,7 @@ struct Thing *computer_check_creatures_in_room_for_accelerate(struct Computer2 * struct StateInfo* stati = get_thing_state_info_num(n); if (stati->state_type == CrStTyp_Work) { - if (try_game_action(comp, dungeon->owner, GA_UsePwrSpeedUp, SPELL_MAX_LEVEL, 0, 0, thing->index, 0) > Lb_OK) + if (try_game_action(comp, dungeon->owner, GA_UsePwrSpeedUp, POWER_MAX_LEVEL, 0, 0, thing->index, 0) > Lb_OK) { return thing; } @@ -829,7 +829,7 @@ struct Thing *computer_check_creatures_in_room_for_flight(struct Computer2 *comp struct StateInfo* stati = get_thing_state_info_num(n); if (stati->state_type == CrStTyp_Work) { - if (try_game_action(comp, dungeon->owner, GA_UsePwrFlight, SPELL_MAX_LEVEL, 0, 0, thing->index, 0) > Lb_OK) + if (try_game_action(comp, dungeon->owner, GA_UsePwrFlight, POWER_MAX_LEVEL, 0, 0, thing->index, 0) > Lb_OK) { return thing; } @@ -868,7 +868,7 @@ struct Thing *computer_check_creatures_in_room_for_vision(struct Computer2 *comp struct StateInfo* stati = get_thing_state_info_num(n); if (stati->state_type == CrStTyp_Work) { - if (try_game_action(comp, dungeon->owner, GA_UsePwrVision, SPELL_MAX_LEVEL, 0, 0, thing->index, 0) > Lb_OK) + if (try_game_action(comp, dungeon->owner, GA_UsePwrVision, POWER_MAX_LEVEL, 0, 0, thing->index, 0) > Lb_OK) { return thing; } diff --git a/src/power_process.c b/src/power_process.c index 884ae0a8ed..e8595e803a 100644 --- a/src/power_process.c +++ b/src/power_process.c @@ -341,8 +341,8 @@ void god_lightning_choose_next_creature(struct Thing *shotng) { const struct MagicStats* pwrdynst = get_power_dynamic_stats(PwrK_LIGHTNING); int spell_lev = shotng->shot.spell_level; - if (spell_lev > SPELL_MAX_LEVEL) - spell_lev = SPELL_MAX_LEVEL; + if (spell_lev > POWER_MAX_LEVEL) + spell_lev = POWER_MAX_LEVEL; if (subtile_coord(pwrdynst->strength[spell_lev],0) > dist) { if (line_of_sight_2d(&shotng->mappos, &thing->mappos)) { diff --git a/src/thing_stats.c b/src/thing_stats.c index 512b13b677..4e11e244a8 100644 --- a/src/thing_stats.c +++ b/src/thing_stats.c @@ -351,8 +351,11 @@ long compute_creature_max_defense(long base_param,unsigned short crlevel) base_param = 10000; if (crlevel >= CREATURE_MAX_LEVEL) crlevel = CREATURE_MAX_LEVEL-1; - long max_param = base_param + (game.conf.crtr_conf.exp.defense_increase_on_exp * base_param * (long)crlevel) / 100; - return saturate_set_unsigned(max_param, 8); + long defense = base_param + (game.conf.crtr_conf.exp.defense_increase_on_exp * base_param * (long)crlevel) / 100; + unsigned long long max = (1 << (8)) - 1; + if ((defense >= max) && (!emulate_integer_overflow(8))) + return max; + return defense; } /** @@ -375,14 +378,19 @@ long compute_creature_max_dexterity(long base_param,unsigned short crlevel) */ long compute_creature_max_strength(long base_param,unsigned short crlevel) { - if (base_param <= 0) - return 0; - if (base_param > 60000) + if (base_param <= 0) + return 0; + if (base_param > 60000) base_param = 60000; - if (crlevel >= CREATURE_MAX_LEVEL) - crlevel = CREATURE_MAX_LEVEL-1; - long max_param = base_param + (game.conf.crtr_conf.exp.strength_increase_on_exp * base_param * (long)crlevel) / 100; - return saturate_set_unsigned(max_param, 15); + if (crlevel >= CREATURE_MAX_LEVEL) + crlevel = CREATURE_MAX_LEVEL-1; + long max_param = base_param + (game.conf.crtr_conf.exp.strength_increase_on_exp * base_param * (long)crlevel) / 100; + long strength = saturate_set_unsigned(max_param, 15); + if (flag_is_set(game.conf.rules.game.classic_bugs_flags, ClscBug_Overflow8bitVal)) + { + return min(strength, UCHAR_MAX+1); //DK1 limited shot damage to 256, not 255 + } + return strength; } /** diff --git a/src/thing_traps.c b/src/thing_traps.c index 0ae74ed22d..b348c4d177 100644 --- a/src/thing_traps.c +++ b/src/thing_traps.c @@ -575,15 +575,15 @@ void activate_trap_god_spell(struct Thing *traptng, struct Thing *creatng, Power struct PowerConfigStats *powerst = get_power_model_stats(pwkind); if (powerst->can_cast_flags & PwCast_AllThings) { - magic_use_power_on_thing(traptng->owner, pwkind, SPELL_MAX_LEVEL, creatng->mappos.x.stl.num, creatng->mappos.y.stl.num, creatng, PwMod_CastForFree); + magic_use_power_on_thing(traptng->owner, pwkind, POWER_MAX_LEVEL, creatng->mappos.x.stl.num, creatng->mappos.y.stl.num, creatng, PwMod_CastForFree); } else if (powerst->can_cast_flags & PwCast_AllGround) { - magic_use_power_on_subtile(traptng->owner, pwkind, SPELL_MAX_LEVEL, creatng->mappos.x.stl.num, creatng->mappos.y.stl.num, PwCast_None, PwMod_CastForFree); + magic_use_power_on_subtile(traptng->owner, pwkind, POWER_MAX_LEVEL, creatng->mappos.x.stl.num, creatng->mappos.y.stl.num, PwCast_None, PwMod_CastForFree); } else if (powerst->can_cast_flags & PwCast_Anywhere) { - magic_use_power_on_level(traptng->owner, pwkind, SPELL_MAX_LEVEL, PwMod_CastForFree); + magic_use_power_on_level(traptng->owner, pwkind, POWER_MAX_LEVEL, PwMod_CastForFree); } else { @@ -1228,7 +1228,7 @@ void trap_fire_shot_without_target(struct Thing *firing, ThingModel shot_model, // Compute shot damage if (shotst->fixed_damage == 0) { - if ((shotst->model_flags & ShMF_StrengthBased) != 0) + if (flag_is_set(shotst->model_flags,ShMF_StrengthBased)) { damage = calculate_melee_damage(firing); }