Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell Flags Refactor #3751

Merged
merged 99 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
c4ceee5
SpellFlagsRefactor
walt253 Dec 11, 2024
2f09848
Clarify comments about CastAtThing & SelfCasted
walt253 Dec 11, 2024
6c89475
Clean-up config_creature.h
walt253 Dec 11, 2024
9b5c3be
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 11, 2024
13d8db6
Fix for slap not exploding frozen creature
walt253 Dec 12, 2024
7d39d6e
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 12, 2024
fbab7f7
Better check&fix for backward compatibility
walt253 Dec 12, 2024
2136b17
Split 'delete_effects_attached_to_creature'
walt253 Dec 12, 2024
7e6d84e
Fix a mistake
walt253 Dec 12, 2024
979d1b9
delete_armour_effects_attached_to_creature
walt253 Dec 12, 2024
877610d
Added comments for every spell flags on magic.cfg
walt253 Dec 13, 2024
28a4d3b
Handles all the cases for the "useless" spell flags
walt253 Dec 13, 2024
b612098
Revert last commit
walt253 Dec 13, 2024
8f28750
Stop non functional spell flags to be set on config
walt253 Dec 13, 2024
2348021
Fix related to delete_thing_structure
walt253 Dec 13, 2024
beb5e1d
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 13, 2024
6b9b186
Fix Chicken countdown and implements HealingRecovery
walt253 Dec 13, 2024
d1a2ea2
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 13, 2024
bfaa0fb
Fix a mistake
walt253 Dec 13, 2024
f9ead38
Update magic.cfg
walt253 Dec 14, 2024
e5bbc68
Various bug fixes
walt253 Dec 14, 2024
9b6ea71
Update engine_redraw.c
walt253 Dec 14, 2024
f07080d
Update engine_redraw.c
walt253 Dec 14, 2024
b4ed9cb
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 14, 2024
a0b9cb5
Complete Fear Implementation
walt253 Dec 14, 2024
8944082
Update creature_states_combt.c
walt253 Dec 14, 2024
48ffea9
Remove CSAfF_ExpLevelUp + Various clean-up.
walt253 Dec 14, 2024
1f9ef9c
Define WEIGHT_DIVISOR constant
walt253 Dec 14, 2024
3127255
Names changes for functions
walt253 Dec 14, 2024
01d50e3
Remove EXP_LEVEL_UP from configs
walt253 Dec 14, 2024
662b59d
Remove Fat check on compute_creature_weight + grammar fix
walt253 Dec 14, 2024
237489b
Rename another function
walt253 Dec 14, 2024
b04e0ff
Remove SPLK_NONE constant
walt253 Dec 14, 2024
1b52dde
Clean-up CSAfF_CalledToArms
walt253 Dec 14, 2024
9119b3a
Implements Cleanse Support
walt253 Dec 14, 2024
6285d08
Implements DamageOverTime + Better Cleanse
walt253 Dec 15, 2024
cdea7e5
Update config for new properties flags
walt253 Dec 15, 2024
075101a
Update thing_creature.c
walt253 Dec 15, 2024
047cffb
Oops fix GameTurnDelta duration
walt253 Dec 15, 2024
e9ec104
Fix: better aura effect implementation & clean-up bad code
walt253 Dec 15, 2024
a668ec4
Update thing_creature.c
walt253 Dec 15, 2024
a519cdc
lvl_script_commands.c replace the switch with bitwise left shift oper…
walt253 Dec 15, 2024
746da13
Update lvl_script_commands.c
walt253 Dec 15, 2024
31371df
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 17, 2024
d9a6313
fix
walt253 Dec 18, 2024
4991e05
Update magic.cfg
walt253 Dec 18, 2024
d4b9dae
Various fixes based on feedback
walt253 Dec 18, 2024
ef12eae
Mad Killing remove traces of combat when it ends
walt253 Dec 18, 2024
d48ae80
Fix SelfCasted comment + -script command check
walt253 Dec 18, 2024
8d696fe
Better Cleanse implementation & Improved DoT implementation
walt253 Dec 18, 2024
ee4f677
Update thing_creature.c
walt253 Dec 18, 2024
ea9d060
IMPORTANT BUG FIX
walt253 Dec 19, 2024
0985e82
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 19, 2024
cf241f8
remove damage type
walt253 Dec 20, 2024
459d436
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 21, 2024
ed53570
random sound play in script command too
walt253 Dec 21, 2024
9cecf97
use to_flag for clarity
walt253 Dec 21, 2024
625bd44
Update lvl_script_commands.c
walt253 Dec 21, 2024
fd5535d
script command accepts numbers
walt253 Dec 21, 2024
2a90333
Fixed blocking build warning
Loobinex Dec 22, 2024
1f357c5
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 22, 2024
1a120cc
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 27, 2024
5fb4138
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 27, 2024
c8d4e93
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 28, 2024
0328475
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 29, 2024
d458089
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 29, 2024
2088e08
Init immunity flags at correct location
walt253 Dec 29, 2024
0105983
clean-up removed variable from init
walt253 Dec 29, 2024
ffbe100
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 29, 2024
166a0e4
Merge branch 'master' into SpellFlagsRefactor
walt253 Dec 29, 2024
29da00e
Update creature_control.h
walt253 Dec 29, 2024
bc05ed6
Merge branch 'master' into SpellFlagsRefactor
walt253 Jan 1, 2025
35c0fbd
fix aura for special
walt253 Jan 2, 2025
b348be8
Merge branch 'master' into SpellFlagsRefactor
walt253 Jan 2, 2025
3196595
clean-up comment + fix aura/duration
walt253 Jan 2, 2025
04ba982
better implementation for script command
walt253 Jan 3, 2025
5cd573f
Update lvl_script_commands.c
walt253 Jan 3, 2025
190de96
fix longs
walt253 Jan 3, 2025
7e43301
Merge branch 'master' into SpellFlagsRefactor
walt253 Jan 3, 2025
7427daf
cleanup of toflag stuff
Loobinex Jan 3, 2025
55e7b3d
fix indentation
walt253 Jan 3, 2025
b7e124f
Update config_magic.c
walt253 Jan 3, 2025
b461ac8
error when invalid flag on config
walt253 Jan 3, 2025
0df8b4c
Update config_crtrmodel.c
walt253 Jan 3, 2025
ec94a85
Update lvl_script_commands.c
walt253 Jan 3, 2025
2acd405
deallocate script value if spellimmunity flag is out of range
walt253 Jan 3, 2025
6fb1cfa
value1 < 0
walt253 Jan 3, 2025
3815881
Update lvl_script_commands.c
walt253 Jan 3, 2025
16fe7e0
CleanseFlag clean-up too
walt253 Jan 3, 2025
a72e94d
renamed magic_spell_flags
Loobinex Jan 3, 2025
68278ad
adding numbers power of 2 on magic.cfg
walt253 Jan 3, 2025
de925aa
Update magic.cfg
walt253 Jan 3, 2025
6fa761e
Update imp.cfg
walt253 Jan 3, 2025
044c884
Reworked jobs to be the same as spellimmunity
Loobinex Jan 4, 2025
03999ab
Update lvl_script_commands.c
walt253 Jan 4, 2025
7e271e9
Merge branch 'master' into SpellFlagsRefactor
walt253 Jan 4, 2025
234c6e3
fix mistake
walt253 Jan 4, 2025
1c0e287
Update imp.cfg
walt253 Jan 4, 2025
7666302
Don't duplicate SpellImmunity on campaign configs
Loobinex Jan 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion campgns/ami2019_crtr/avatar.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Name = AVATAR
Defence = 110
ThingSize = 256 512
Properties = BLEEDS HUMANOID_SKELETON NEVER_CHICKENS IMMUNE_TO_BOULDER LORD NO_STEAL_HERO
Properties = BLEEDS HUMANOID_SKELETON IMMUNE_TO_BOULDER LORD NO_STEAL_HERO

[experience]
Powers = SWING_WEAPON_SWORD ARMOUR WORD_OF_POWER HEAL NULL FREEZE LIGHTNING FIRE_BOMB INVISIBILITY SPEED
Expand Down
3 changes: 2 additions & 1 deletion campgns/dzjr06lv_crtr/bile_demon.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ LairSize = 4
BaseSpeed = 40
Pay = 182
DamageToBoulder = 20
Properties = BLEEDS UNAFFECTED_BY_WIND EVIL TREMBLING FAT
Properties = BLEEDS EVIL TREMBLING FAT
SpellImmunity = WIND

[attraction]
EntranceRoom = BARRACKS GARDEN NULL
Expand Down
3 changes: 2 additions & 1 deletion campgns/dzjr06lv_crtr/bug.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Recovery = 8
HungerRate = 10000
BaseSpeed = 120
SlapsToKill = 18
Properties = BLEEDS IMMUNE_TO_GAS EVIL INSECT
Properties = BLEEDS EVIL INSECT
SpellImmunity = POISON_CLOUD

[attraction]
EntranceRoom = LAIR NULL NULL
Expand Down
3 changes: 2 additions & 1 deletion campgns/dzjr06lv_crtr/ghost.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ HungerFill = 1
BaseSpeed = 56
AttackPreference = RANGED
Pay = 38
Properties = IMMUNE_TO_GAS FLYING SEE_INVISIBLE PASS_LOCKED_DOORS EVIL
Properties = FLYING SEE_INVISIBLE PASS_LOCKED_DOORS EVIL
SpellImmunity = POISON_CLOUD

[attraction]
RoomSlabsRequired = 9 0 0
Expand Down
3 changes: 2 additions & 1 deletion campgns/dzjr06lv_crtr/samurai.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ FearsomeFactor = 100
Defence = 170
Pay = 820
DamageToBoulder = 20
Properties = BLEEDS IMMUNE_TO_GAS HUMANOID_SKELETON SEE_INVISIBLE
Properties = BLEEDS HUMANOID_SKELETON SEE_INVISIBLE
SpellImmunity = POISON_CLOUD

[attraction]
EntranceRoom = NULL TEMPLE NULL
Expand Down
3 changes: 2 additions & 1 deletion campgns/dzjr06lv_crtr/skeleton.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Recovery = 24
HungerFill = 1
BaseSpeed = 72
Pay = 46
Properties = IMMUNE_TO_GAS EVIL
Properties = EVIL
SpellImmunity = POISON_CLOUD

[attraction]
EntranceRoom = NULL PRISON NULL
Expand Down
3 changes: 2 additions & 1 deletion campgns/dzjr06lv_crtr/spider.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Luck = 8
Recovery = 4
LairSize = 2
Pay = 86
Properties = BLEEDS IMMUNE_TO_GAS ARACHNID EVIL INSECT
Properties = BLEEDS ARACHNID EVIL INSECT
SpellImmunity = POISON_CLOUD

[attraction]
EntranceRoom = RESEARCH GARDEN NULL
Expand Down
2 changes: 1 addition & 1 deletion campgns/lqizgood_crtr/avatar.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

[attributes]
Name = AVATAR
Properties = BLEEDS HUMANOID_SKELETON NEVER_CHICKENS IMMUNE_TO_BOULDER ONE_OF_KIND NO_STEAL_HERO
Properties = BLEEDS HUMANOID_SKELETON IMMUNE_TO_BOULDER ONE_OF_KIND NO_STEAL_HERO
2 changes: 1 addition & 1 deletion campgns/twinkprs_crtr/ghost.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

[attributes]
Name = GHOST
Properties = IMMUNE_TO_GAS FLYING SEE_INVISIBLE EVIL
Properties = FLYING SEE_INVISIBLE EVIL
3 changes: 2 additions & 1 deletion config/creatrs/avatar.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ DamageToBoulder = 60
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 256 590
LairObject = LAIR_AVATR
Properties = BLEEDS HUMANOID_SKELETON NEVER_CHICKENS IMMUNE_TO_BOULDER LORD ONE_OF_KIND NO_STEAL_HERO
SpellImmunity = CHICKEN
Properties = BLEEDS HUMANOID_SKELETON IMMUNE_TO_BOULDER LORD ONE_OF_KIND NO_STEAL_HERO

[attraction]
EntranceRoom = LAIR TRAINING GARDEN
Expand Down
3 changes: 2 additions & 1 deletion config/creatrs/bile_demon.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ DamageToBoulder = 50
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 256 512
LairObject = LAIR_BILDM
Properties = BLEEDS UNAFFECTED_BY_WIND IMMUNE_TO_GAS EVIL TREMBLING FAT
SpellImmunity = POISON_CLOUD WIND
Properties = BLEEDS EVIL TREMBLING FAT

[attraction]
EntranceRoom = GARDEN LAIR NULL
Expand Down
3 changes: 2 additions & 1 deletion config/creatrs/fairy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ DamageToBoulder = 15
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 256 560
LairObject = LAIR_FAIRY
Properties = BLEEDS IMMUNE_TO_GAS HUMANOID_SKELETON FLYING FEMALE
SpellImmunity = POISON_CLOUD
Properties = BLEEDS HUMANOID_SKELETON FLYING FEMALE

[attraction]
EntranceRoom = RESEARCH LAIR NULL
Expand Down
3 changes: 2 additions & 1 deletion config/creatrs/floating_spirit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ SlapsToKill = 0
DamageToBoulder = 0
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 0 0
Properties = UNAFFECTED_BY_WIND IMMUNE_TO_GAS FLYING SEE_INVISIBLE PASS_LOCKED_DOORS SPECTATOR
SpellImmunity = POISON_CLOUD WIND
Properties = FLYING SEE_INVISIBLE PASS_LOCKED_DOORS SPECTATOR

[attraction]
EntranceRoom = NULL NULL NULL
Expand Down
3 changes: 2 additions & 1 deletion config/creatrs/ghost.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ DamageToBoulder = 20
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 256 512
LairObject = LAIR_GHOST
Properties = IMMUNE_TO_GAS FLYING SEE_INVISIBLE PASS_LOCKED_DOORS EVIL NO_CORPSE_ROTTING
SpellImmunity = POISON_CLOUD
Properties = FLYING SEE_INVISIBLE PASS_LOCKED_DOORS EVIL NO_CORPSE_ROTTING

[attraction]
EntranceRoom = TORTURE NULL NULL
Expand Down
1 change: 1 addition & 0 deletions config/creatrs/horny.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ DamageToBoulder = 40
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 256 600
LairObject = LAIR_HORNY
SpellImmunity = FEAR
Properties = BLEEDS HUMANOID_SKELETON EVIL

[attraction]
Expand Down
13 changes: 9 additions & 4 deletions config/creatrs/imp.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ PrisonKind = NULL
; Defines the kind of creature it will become if it dies from torture.
; The same rule applies as above, except it does not consider the 'HUMANOID_SKELETON' property.
TortureKind = NULL
; Set to 0, leave empty, or remove the field for the creature to have no immunities.
SpellImmunity = 0
; Creature properties:
; BLEEDS - the creature leaves blood when is hit, slapped, dying or being injured in any way.
; UNAFFECTED_BY_WIND - the creature isn't pushed back by Wind spell.
; IMMUNE_TO_GAS - the creature isn't injured by Gas Traps and Farts.
; HUMANOID_SKELETON - the creature leaves a skeleton if left in prison to die.
walt253 marked this conversation as resolved.
Show resolved Hide resolved
; PISS_ON_DEAD - creature feels urge to piss on nearby dead bodies.
; FLYING - creature normally isn't touching ground when moving and can move up and down.
Expand All @@ -113,7 +113,6 @@ TortureKind = NULL
; EVENTFUL_DEATH - when the creature dies the LAST_DEATH_EVENT[] script variable is updated, so mapmaker can use the location.
; SPECTATOR - creature is just a spectator for multiplayer games.
; EVIL - creature has evil nature.
; NEVER_CHICKENS - creature isn't affected by Chicken spell.
; IMMUNE_TO_BOULDER - when boulder trap hits the creature, falls apart without dealing any damage.
; NO_CORPSE_ROTTING - Creature body can't be taken to rot on graveyard and will disappear quickly.
; NO_ENMHEART_ATTCK - Creature won't attack enemy dungeon heart on sight.
Expand All @@ -127,10 +126,16 @@ TortureKind = NULL
; NO_TRANSFER - Creature cannot be transferred with a transfer creature special.
; NO_STEAL_HERO - Creature cannot be stolen from a steal hero special.
; PREFER_STEAL - Creature can be generated from steal hero special if there is nothing to steal from.
; IMMUNE_TO_DISEASE - Creature cannot get diseased.
; ILLUMINATED - A bright light will shine from the Creature.
; ALLURING_SCVNGR - When scavenging will give the keeper a portal boost compared to rival keepers.
Properties = BLEEDS SPECIAL_DIGGER EVIL NO_ENMHEART_ATTCK NO_CORPSE_ROTTING
; Creature immunities. Takes 'SpellFlags', see magic.cfg for the names or numbers.
; Special cases:
; LIGHT - Prevents 'LIGHT', but does not stop 'ILLUMINATED' from working.
; POISON_CLOUD - Prevents damages/status from effects with 'AreaAffectType' set to 1/2/3.
; MAD_KILLING - Prevents 'MAD_KILLING', but does not stop 'MAD_PSYCHO' anger job.
; FEAR - Prevents 'FEAR', but does not stop fleeing/real fear.
; WIND - Prevents the creature from being blown away from shots with 'UpdateLogic' set to 2.

[attraction]
; Rooms required to attract the creature from entrance, and number of slabs which is needed (max 3 rooms).
Expand Down
3 changes: 2 additions & 1 deletion config/creatrs/skeleton.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ DamageToBoulder = 20
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 256 512
LairObject = LAIR_SKELT
Properties = IMMUNE_TO_GAS HUMANOID_SKELETON EVIL
SpellImmunity = POISON_CLOUD
Properties = HUMANOID_SKELETON EVIL

[attraction]
EntranceRoom = NULL PRISON TRAINING
Expand Down
3 changes: 2 additions & 1 deletion config/creatrs/vampire.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ DamageToBoulder = 40
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 256 560
LairObject = LAIR_VAMP
Properties = BLEEDS IMMUNE_TO_GAS HUMANOID_SKELETON SEE_INVISIBLE EVIL ALLURING_SCVNGR
SpellImmunity = POISON_CLOUD
Properties = BLEEDS HUMANOID_SKELETON SEE_INVISIBLE EVIL ALLURING_SCVNGR

[attraction]
EntranceRoom = GRAVEYARD LAIR NULL
Expand Down
3 changes: 2 additions & 1 deletion config/creatrs/wizard.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ DamageToBoulder = 30
; Creature thing size - XY and Z, one cube is 256x256.
ThingSize = 256 512
LairObject = LAIR_WIZRD
Properties = BLEEDS IMMUNE_TO_GAS HUMANOID_SKELETON
SpellImmunity = POISON_CLOUD
Properties = BLEEDS HUMANOID_SKELETON

[attraction]
EntranceRoom = RESEARCH NULL NULL
Expand Down
Loading